Tizen 2.0 release update
authorHasan Wan <hasan.wan@intel.com>
Tue, 19 Feb 2013 10:20:51 +0000 (18:20 +0800)
committerHasan Wan <hasan.wan@intel.com>
Tue, 19 Feb 2013 10:20:51 +0000 (18:20 +0800)
102 files changed:
TC/_export_env.sh [new file with mode: 0755]
TC/_export_target_env.sh [new file with mode: 0755]
TC/build.sh [new file with mode: 0755]
TC/clean.sh [new file with mode: 0755]
TC/config [new file with mode: 0755]
TC/execute.sh [new file with mode: 0755]
TC/testcase/Makefile [new file with mode: 0755]
TC/testcase/res/UTsXml/libXml2Test.xml [new file with mode: 0755]
TC/testcase/res/UTsXml/test.xml [new file with mode: 0755]
TC/testcase/res/UTsXml/test/valid/127772.xml [new file with mode: 0755]
TC/testcase/res/UTsXml/test/valid/REC-xml-19980210.xml [new file with mode: 0755]
TC/testcase/res/UTsXml/test/valid/UTF16Entity.xml [new file with mode: 0755]
TC/testcase/res/UTsXml/test/valid/dia.xml [new file with mode: 0755]
TC/testcase/res/UTsXml/test/valid/dtds/127772.dtd [new file with mode: 0755]
TC/testcase/res/UTsXml/test/valid/dtds/NewsMLv1.0.dtd [new file with mode: 0755]
TC/testcase/res/UTsXml/test/valid/dtds/destfoo.ent [new file with mode: 0755]
TC/testcase/res/UTsXml/test/valid/dtds/external.ent [new file with mode: 0755]
TC/testcase/res/UTsXml/test/valid/dtds/external2.ent [new file with mode: 0755]
TC/testcase/res/UTsXml/test/valid/dtds/nitf-2-5.dtd [new file with mode: 0755]
TC/testcase/res/UTsXml/test/valid/dtds/notes.dtd [new file with mode: 0755]
TC/testcase/res/UTsXml/test/valid/dtds/objednavka.dtd [new file with mode: 0755]
TC/testcase/res/UTsXml/test/valid/dtds/spec.dtd [new file with mode: 0755]
TC/testcase/res/UTsXml/test/valid/dtds/utf16b.ent [new file with mode: 0755]
TC/testcase/res/UTsXml/test/valid/dtds/utf16l.ent [new file with mode: 0755]
TC/testcase/res/UTsXml/test/valid/dtds/xhtml-lat1.ent [new file with mode: 0755]
TC/testcase/res/UTsXml/test/valid/dtds/xhtml-special.ent [new file with mode: 0755]
TC/testcase/res/UTsXml/test/valid/dtds/xhtml-symbol.ent [new file with mode: 0755]
TC/testcase/res/UTsXml/test/valid/dtds/xhtml.cat [new file with mode: 0755]
TC/testcase/res/UTsXml/test/valid/dtds/xhtml1-frameset.dtd [new file with mode: 0755]
TC/testcase/res/UTsXml/test/valid/dtds/xhtml1-strict.dtd [new file with mode: 0755]
TC/testcase/res/UTsXml/test/valid/dtds/xhtml1-transitional.dtd [new file with mode: 0755]
TC/testcase/res/UTsXml/test/valid/dtds/xhtml1.dcl [new file with mode: 0755]
TC/testcase/res/UTsXml/test/valid/dtds/xmlspec.dtd [new file with mode: 0755]
TC/testcase/res/UTsXml/test/valid/id1.xml [new file with mode: 0755]
TC/testcase/res/UTsXml/test/valid/id2.xml [new file with mode: 0755]
TC/testcase/res/UTsXml/test/valid/id3.xml [new file with mode: 0755]
TC/testcase/res/UTsXml/test/valid/index.xml [new file with mode: 0755]
TC/testcase/res/UTsXml/test/valid/mixed_ns.xml [new file with mode: 0755]
TC/testcase/res/UTsXml/test/valid/notes.xml [new file with mode: 0755]
TC/testcase/res/UTsXml/test/valid/ns.xml [new file with mode: 0755]
TC/testcase/res/UTsXml/test/valid/ns2.xml [new file with mode: 0755]
TC/testcase/res/UTsXml/test/valid/objednavka.xml [new file with mode: 0755]
TC/testcase/res/UTsXml/test/valid/rss.xml [new file with mode: 0755]
TC/testcase/res/UTsXml/test/valid/t10.xml [new file with mode: 0755]
TC/testcase/res/UTsXml/test/valid/t11.xml [new file with mode: 0755]
TC/testcase/res/UTsXml/test/valid/t4.dtd [new file with mode: 0755]
TC/testcase/res/UTsXml/test/valid/t4.xml [new file with mode: 0755]
TC/testcase/res/UTsXml/test/valid/t4a.dtd [new file with mode: 0755]
TC/testcase/res/UTsXml/test/valid/t4a.xml [new file with mode: 0755]
TC/testcase/res/UTsXml/test/valid/t6.dtd [new file with mode: 0755]
TC/testcase/res/UTsXml/test/valid/t6.xml [new file with mode: 0755]
TC/testcase/res/UTsXml/test/valid/t8.xml [new file with mode: 0755]
TC/testcase/res/UTsXml/test/valid/t8a.xml [new file with mode: 0755]
TC/testcase/res/UTsXml/test/valid/t9.xml [new file with mode: 0755]
TC/testcase/res/UTsXml/test/valid/t9a.xml [new file with mode: 0755]
TC/testcase/res/UTsXml/test/valid/xhtml1.xhtml [new file with mode: 0755]
TC/testcase/res/UTsXml/test/valid/xlink.xml [new file with mode: 0755]
TC/testcase/res/UTsXml/valid/REC-xml-19980210-bak.xml [new file with mode: 0755]
TC/testcase/res/UTsXml/valid/REC-xml-19980210.xml [new file with mode: 0755]
TC/testcase/res/UTsXml/valid/UTF16Entity.xml [new file with mode: 0755]
TC/testcase/res/UTsXml/valid/attrib.xml [new file with mode: 0755]
TC/testcase/res/UTsXml/valid/ent1 [new file with mode: 0755]
TC/testcase/res/UTsXml/valid/ent2 [new file with mode: 0755]
TC/testcase/res/UTsXml/valid/schema.xml [new file with mode: 0755]
TC/testcase/res/UTsXml/valid/schema.xsd [new file with mode: 0755]
TC/testcase/res/UTsXml/valid/test.xml [new file with mode: 0755]
TC/testcase/res/UTsXml/valid/title.xml [new file with mode: 0755]
TC/testcase/res/UTsXml/valid/xhtml1-strict.dtd [new file with mode: 0755]
TC/testcase/res/UTsXml/valid/xhtml1.xhtml [new file with mode: 0755]
TC/testcase/res/UTsXml/valid/xlink.xml [new file with mode: 0755]
TC/testcase/tslist [new file with mode: 0755]
TC/testcase/utc_libxml_Error.c [new file with mode: 0755]
TC/testcase/utc_libxml_HTMLParser.c [new file with mode: 0755]
TC/testcase/utc_libxml_HTMLtree.c [new file with mode: 0755]
TC/testcase/utc_libxml_Hash.c [new file with mode: 0755]
TC/testcase/utc_libxml_ParserInternals.c [new file with mode: 0755]
TC/testcase/utc_libxml_Sax.c [new file with mode: 0755]
TC/testcase/utc_libxml_XmlDict.c [new file with mode: 0755]
TC/testcase/utc_libxml_XmlEncoding.c [new file with mode: 0755]
TC/testcase/utc_libxml_XmlEntity.c [new file with mode: 0755]
TC/testcase/utc_libxml_XmlInclude.c [new file with mode: 0755]
TC/testcase/utc_libxml_XmlIo.c [new file with mode: 0755]
TC/testcase/utc_libxml_XmlList.c [new file with mode: 0755]
TC/testcase/utc_libxml_XmlParser.c [new file with mode: 0755]
TC/testcase/utc_libxml_XmlPattern.c [new file with mode: 0755]
TC/testcase/utc_libxml_XmlReader.c [new file with mode: 0755]
TC/testcase/utc_libxml_XmlSave.c [new file with mode: 0755]
TC/testcase/utc_libxml_XmlSchemas.c [new file with mode: 0755]
TC/testcase/utc_libxml_XmlString.c [new file with mode: 0755]
TC/testcase/utc_libxml_XmlTree.c [new file with mode: 0755]
TC/testcase/utc_libxml_XmlUnicode.c [new file with mode: 0755]
TC/testcase/utc_libxml_XmlUri.c [new file with mode: 0755]
TC/testcase/utc_libxml_XmlWriter.c [new file with mode: 0755]
TC/testcase/utc_libxml_XmlXPath.c [new file with mode: 0755]
TC/testcase/utc_libxml_XmlchValid.c [new file with mode: 0755]
TC/testcase/utc_libxml_Xmlvalid.c [new file with mode: 0755]
TC/testcase/utc_libxml_include.h [new file with mode: 0755]
TC/testcase/utc_libxml_xpointer.c [new file with mode: 0755]
TC/tet_scen [new file with mode: 0755]
TC/tetbuild.cfg [new file with mode: 0755]
TC/tetclean.cfg [new file with mode: 0755]
TC/tetexec.cfg [new file with mode: 0755]

diff --git a/TC/_export_env.sh b/TC/_export_env.sh
new file mode 100755 (executable)
index 0000000..c5b6405
--- /dev/null
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+#. ./config
+#export TET_INSTALL_PATH=/mnt/nfs/dts_tool/TETware #tetware root path
+export TET_INSTALL_PATH=/home/munmendu/dts_tool/TETware #tetware root path
+export TET_TARGET_PATH=$TET_INSTALL_PATH/tetware-target # tetware target path
+#export TET_TARGET_PATH=$TET_INSTALL_PATH/tetware-simulator # tetware simulator path
+export PATH=$TET_TARGET_PATH/bin:$PATH
+export LD_LIBRARY_PATH=$TET_TARGET_PATH/lib/tet3:$LD_LIBRARY_PATH
+export TET_ROOT=$TET_TARGET_PATH
diff --git a/TC/_export_target_env.sh b/TC/_export_target_env.sh
new file mode 100755 (executable)
index 0000000..4885fd1
--- /dev/null
@@ -0,0 +1,9 @@
+#!/bin/sh
+. ./config
+#export TET_INSTALL_PATH=/mnt/nfs/dts_tool/TETware # path to path
+export TET_INSTALL_PATH=/mnt/nfs/TETware # path to path
+export TET_TARGET_PATH=$TET_INSTALL_PATH/tetware-target
+#export TET_TARGET_PATH=$TET_INSTALL_PATH/tetware-simulator # tetware simulator path
+export PATH=$TET_TARGET_PATH/bin:$PATH
+export LD_LIBRARY_PATH=$TET_TARGET_PATH/lib/tet3:$LD_LIBRARY_PATH
+export TET_ROOT=$TET_TARGET_PATH
diff --git a/TC/build.sh b/TC/build.sh
new file mode 100755 (executable)
index 0000000..72aad6c
--- /dev/null
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+. ./_export_env.sh                              # setting environment variables
+
+export TET_SUITE_ROOT=`pwd`
+FILE_NAME_EXTENSION=`date +%s`
+
+RESULT_DIR=results
+HTML_RESULT=$RESULT_DIR/build-tar-result-$FILE_NAME_EXTENSION.html
+JOURNAL_RESULT=$RESULT_DIR/build-tar-result-$FILE_NAME_EXTENSION.journal
+
+mkdir -p $RESULT_DIR
+
+tcc -c -p ./
+tcc -b -j $JOURNAL_RESULT -p ./
+grw -c 7 -f chtml -o $HTML_RESULT $JOURNAL_RESULT
diff --git a/TC/clean.sh b/TC/clean.sh
new file mode 100755 (executable)
index 0000000..29743e0
--- /dev/null
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+. ./_export_env.sh                              # setting environment variables
+
+export TET_SUITE_ROOT=`pwd`
+RESULT_DIR=results
+
+tcc -c -p ./                                # executing tcc, with clean option (-c)
+rm -r $RESULT_DIR
+rm -r tet_tmp_dir
+rm testcase/tet_captured
diff --git a/TC/config b/TC/config
new file mode 100755 (executable)
index 0000000..1c235ed
--- /dev/null
+++ b/TC/config
@@ -0,0 +1,2 @@
+TET_INSTALL_HOST_PATH=/home/gopal/dts_tool/TETware
+TET_INSTALL_TARGET_PATH=/home/gopal/dts_tool/TETware
diff --git a/TC/execute.sh b/TC/execute.sh
new file mode 100755 (executable)
index 0000000..0fe02e2
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+. ./_export_target_env.sh                    # setting environment variables
+
+export TET_SUITE_ROOT=`pwd`
+FILE_NAME_EXTENSION=`date +%s`
+
+RESULT_DIR=results
+HTML_RESULT=$RESULT_DIR/exec-tar-result-$FILE_NAME_EXTENSION.html
+JOURNAL_RESULT=$RESULT_DIR/exec-tar-result-$FILE_NAME_EXTENSION.journal
+
+mkdir -p $RESULT_DIR
+
+tcc -e -j $JOURNAL_RESULT -p ./
+grw -c 7 -f chtml -o $HTML_RESULT $JOURNAL_RESULT
diff --git a/TC/testcase/Makefile b/TC/testcase/Makefile
new file mode 100755 (executable)
index 0000000..65e22ba
--- /dev/null
@@ -0,0 +1,24 @@
+CC ?= gcc
+
+C_FILES = $(shell ls *.c)
+       
+PKGS = libxml-2.0
+
+LDFLAGS = `pkg-config --libs $(PKGS)`
+LDFLAGS += $(TET_ROOT)/lib/tet3/tcm_s.o
+LDFLAGS += -L$(TET_ROOT)/lib/tet3 -ltcm_s
+LDFLAGS += -L$(TET_ROOT)/lib/tet3 -lapi_s
+
+CFLAGS = -I. `pkg-config --cflags $(PKGS)`
+CFLAGS += -I$(TET_ROOT)/inc/tet3
+CFLAGS += -Wall
+
+TCS := $(shell ls -1 *.c | cut -d. -f1)
+
+all: $(TCS)
+
+%: %.c
+       $(CC) -o $@ $< $(CFLAGS) $(LDFLAGS)
+
+clean:
+       rm -f $(TCS)
diff --git a/TC/testcase/res/UTsXml/libXml2Test.xml b/TC/testcase/res/UTsXml/libXml2Test.xml
new file mode 100755 (executable)
index 0000000..6f116e2
--- /dev/null
@@ -0,0 +1,29 @@
+<?xml version="1.0" standalone="no"?>\r
+\r
+<!DOCTYPE MEMO [\r
+<!ELEMENT MEMO     (TO,FROM,SUBJECT,BODY,SIGN)> \r
+<!ATTLIST MEMO     importance   (HIGH|MEDIUM|LOW) "LOW">\r
+<!ELEMENT TO       (#PCDATA)>\r
+<!ELEMENT FROM     (#PCDATA)>\r
+<!ELEMENT SUBJECT  (#PCDATA)>\r
+<!ELEMENT BODY     (P+)>\r
+<!ELEMENT P        (#PCDATA)>\r
+<!ELEMENT SIGN     (#PCDATA)>\r
+<!ATTLIST SIGN     email         CDATA #REQUIRED> \r
+]>\r
+\r
+<MEMO importance="HIGH">\r
+<TO>Tutorial Takers</TO>\r
+<FROM>Tutorial Writer</FROM>\r
+<SUBJECT>Your impressions</SUBJECT>\r
+<BODY>\r
+<P>Now that you are almost done the tutorial, you must be getting\r
+an idea of what XML is about. These emerging technologies sometimes \r
+take time though before they catch on.</P>\r
+<P>Did you find the tutorial helpful? Which areas did you find\r
+confusing? How would you improve them?</P>\r
+</BODY>\r
+<SIGN email="rlander@pdbeam.uwaterloo.ca">Richard</SIGN> \r
+</MEMO>\r
+\r
+\r
diff --git a/TC/testcase/res/UTsXml/test.xml b/TC/testcase/res/UTsXml/test.xml
new file mode 100755 (executable)
index 0000000..3ca58b4
--- /dev/null
@@ -0,0 +1,3 @@
+<?xml version ="1.0"?>\r
+<html>\r
+</html>
\ No newline at end of file
diff --git a/TC/testcase/res/UTsXml/test/valid/127772.xml b/TC/testcase/res/UTsXml/test/valid/127772.xml
new file mode 100755 (executable)
index 0000000..ba39194
--- /dev/null
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<!DOCTYPE a SYSTEM "dtds/127772.dtd">
+
+<a>
+  <b xlink:href="http://fakeurl.net">b text</b>
+</a>
+
diff --git a/TC/testcase/res/UTsXml/test/valid/REC-xml-19980210.xml b/TC/testcase/res/UTsXml/test/valid/REC-xml-19980210.xml
new file mode 100755 (executable)
index 0000000..4e93fb3
--- /dev/null
@@ -0,0 +1,4197 @@
+<?xml version='1.0' encoding='ISO-8859-1' standalone='no'?>
+<!DOCTYPE spec SYSTEM "dtds/spec.dtd" [
+
+<!-- LAST TOUCHED BY: Tim Bray, 8 February 1997 -->
+
+<!-- The words 'FINAL EDIT' in comments mark places where changes
+need to be made after approval of the document by the ERB, before
+publication.  -->
+
+<!ENTITY XML.version "1.0">
+<!ENTITY doc.date "10 February 1998">
+<!ENTITY iso6.doc.date "19980210">
+<!ENTITY w3c.doc.date "02-Feb-1998">
+<!ENTITY draft.day '10'>
+<!ENTITY draft.month 'February'>
+<!ENTITY draft.year '1998'>
+
+<!ENTITY WebSGML 
+ 'WebSGML Adaptations Annex to ISO 8879'>
+
+<!ENTITY lt     "<"> 
+<!ENTITY gt     ">"> 
+<!ENTITY xmlpio "'&lt;?xml'">
+<!ENTITY pic    "'?>'">
+<!ENTITY br     "\n">
+<!ENTITY cellback '#c0d9c0'>
+<!ENTITY mdash  "--"> <!-- &#x2014, but nsgmls doesn't grok hex -->
+<!ENTITY com    "--">
+<!ENTITY como   "--">
+<!ENTITY comc   "--">
+<!ENTITY hcro   "&amp;#x">
+<!-- <!ENTITY nbsp " "> -->
+<!ENTITY nbsp   "&#160;">
+<!ENTITY magicents "<code>amp</code>,
+<code>lt</code>,
+<code>gt</code>,
+<code>apos</code>,
+<code>quot</code>">
+<!-- audience and distribution status:  for use at publication time -->
+<!ENTITY doc.audience "public review and discussion">
+<!ENTITY doc.distribution "may be distributed freely, as long as
+all text and legal notices remain intact">
+
+]>
+
+<!-- for Panorama *-->
+<?VERBATIM "eg" ?>
+
+<spec>
+<header>
+<title>Extensible Markup Language (XML) 1.0</title>
+<version></version>
+<w3c-designation>REC-xml-&iso6.doc.date;</w3c-designation>
+<w3c-doctype>W3C Recommendation</w3c-doctype>
+<pubdate><day>&draft.day;</day><month>&draft.month;</month><year>&draft.year;</year></pubdate>
+
+<publoc>
+<loc  href="http://www.w3.org/TR/1998/REC-xml-&iso6.doc.date;">
+http://www.w3.org/TR/1998/REC-xml-&iso6.doc.date;</loc>
+<loc  href="http://www.w3.org/TR/1998/REC-xml-&iso6.doc.date;.xml">
+http://www.w3.org/TR/1998/REC-xml-&iso6.doc.date;.xml</loc>
+<loc  href="http://www.w3.org/TR/1998/REC-xml-&iso6.doc.date;.html">
+http://www.w3.org/TR/1998/REC-xml-&iso6.doc.date;.html</loc>
+<loc  href="http://www.w3.org/TR/1998/REC-xml-&iso6.doc.date;.pdf">
+http://www.w3.org/TR/1998/REC-xml-&iso6.doc.date;.pdf</loc>
+<loc  href="http://www.w3.org/TR/1998/REC-xml-&iso6.doc.date;.ps">
+http://www.w3.org/TR/1998/REC-xml-&iso6.doc.date;.ps</loc>
+</publoc>
+<latestloc>
+<loc  href="http://www.w3.org/TR/REC-xml">
+http://www.w3.org/TR/REC-xml</loc>
+</latestloc>
+<prevlocs>
+<loc  href="http://www.w3.org/TR/PR-xml-971208">
+http://www.w3.org/TR/PR-xml-971208</loc>
+<!--
+<loc  href='http://www.w3.org/TR/WD-xml-961114'>
+http://www.w3.org/TR/WD-xml-961114</loc>
+<loc  href='http://www.w3.org/TR/WD-xml-lang-970331'>
+http://www.w3.org/TR/WD-xml-lang-970331</loc>
+<loc  href='http://www.w3.org/TR/WD-xml-lang-970630'>
+http://www.w3.org/TR/WD-xml-lang-970630</loc>
+<loc  href='http://www.w3.org/TR/WD-xml-970807'>
+http://www.w3.org/TR/WD-xml-970807</loc>
+<loc  href='http://www.w3.org/TR/WD-xml-971117'>
+http://www.w3.org/TR/WD-xml-971117</loc>-->
+</prevlocs>
+<authlist>
+<author><name>Tim Bray</name>
+<affiliation>Textuality and Netscape</affiliation>
+<email 
+href="mailto:tbray@textuality.com">tbray@textuality.com</email></author>
+<author><name>Jean Paoli</name>
+<affiliation>Microsoft</affiliation>
+<email href="mailto:jeanpa@microsoft.com">jeanpa@microsoft.com</email></author>
+<author><name>C. M. Sperberg-McQueen</name>
+<affiliation>University of Illinois at Chicago</affiliation>
+<email href="mailto:cmsmcq@uic.edu">cmsmcq@uic.edu</email></author>
+</authlist>
+<abstract>
+<p>The Extensible Markup Language (XML) is a subset of
+SGML that is completely described in this document. Its goal is to
+enable generic SGML to be served, received, and processed on the Web
+in the way that is now possible with HTML. XML has been designed for
+ease of implementation and for interoperability with both SGML and
+HTML.</p>
+</abstract>
+<status>
+<p>This document has been reviewed by W3C Members and
+other interested parties and has been endorsed by the
+Director as a W3C Recommendation. It is a stable
+document and may be used as reference material or cited
+as a normative reference from another document. W3C's
+role in making the Recommendation is to draw attention
+to the specification and to promote its widespread
+deployment. This enhances the functionality and
+interoperability of the Web.</p>
+<p>
+This document specifies a syntax created by subsetting an existing,
+widely used international text processing standard (Standard
+Generalized Markup Language, ISO 8879:1986(E) as amended and
+corrected) for use on the World Wide Web.  It is a product of the W3C
+XML Activity, details of which can be found at <loc
+href='http://www.w3.org/XML'>http://www.w3.org/XML</loc>.  A list of
+current W3C Recommendations and other technical documents can be found
+at <loc href='http://www.w3.org/TR'>http://www.w3.org/TR</loc>.
+</p>
+<p>This specification uses the term URI, which is defined by <bibref
+ref="Berners-Lee"/>, a work in progress expected to update <bibref
+ref="RFC1738"/> and <bibref ref="RFC1808"/>. 
+</p>
+<p>The list of known errors in this specification is 
+available at 
+<loc href='http://www.w3.org/XML/xml-19980210-errata'>http://www.w3.org/XML/xml-19980210-errata</loc>.</p>
+<p>Please report errors in this document to 
+<loc href='mailto:xml-editor@w3.org'>xml-editor@w3.org</loc>.
+</p>
+</status>
+
+
+<pubstmt>
+<p>Chicago, Vancouver, Mountain View, et al.:
+World-Wide Web Consortium, XML Working Group, 1996, 1997.</p>
+</pubstmt>
+<sourcedesc>
+<p>Created in electronic form.</p>
+</sourcedesc>
+<langusage>
+<language id='EN'>English</language>
+<language id='ebnf'>Extended Backus-Naur Form (formal grammar)</language>
+</langusage>
+<revisiondesc>
+<slist>
+<sitem>1997-12-03 : CMSMcQ : yet further changes</sitem>
+<sitem>1997-12-02 : TB : further changes (see TB to XML WG,
+2 December 1997)</sitem>
+<sitem>1997-12-02 : CMSMcQ : deal with as many corrections and
+comments from the proofreaders as possible:
+entify hard-coded document date in pubdate element,
+change expansion of entity WebSGML,
+update status description as per Dan Connolly (am not sure
+about refernece to Berners-Lee et al.),
+add 'The' to abstract as per WG decision,
+move Relationship to Existing Standards to back matter and
+combine with References,
+re-order back matter so normative appendices come first,
+re-tag back matter so informative appendices are tagged informdiv1,
+remove XXX XXX from list of 'normative' specs in prose,
+move some references from Other References to Normative References,
+add RFC 1738, 1808, and 2141 to Other References (they are not
+normative since we do not require the processor to enforce any 
+rules based on them),
+add reference to 'Fielding draft' (Berners-Lee et al.),
+move notation section to end of body,
+drop URIchar non-terminal and use SkipLit instead,
+lose stray reference to defunct nonterminal 'markupdecls',
+move reference to Aho et al. into appendix (Tim's right),
+add prose note saying that hash marks and fragment identifiers are
+NOT part of the URI formally speaking, and are NOT legal in 
+system identifiers (processor 'may' signal an error).
+Work through:
+Tim Bray reacting to James Clark,
+Tim Bray on his own,
+Eve Maler,
+
+NOT DONE YET:
+change binary / text to unparsed / parsed.
+handle James's suggestion about &lt; in attriubte values
+uppercase hex characters,
+namechar list,
+</sitem>
+<sitem>1997-12-01 : JB : add some column-width parameters</sitem>
+<sitem>1997-12-01 : CMSMcQ : begin round of changes to incorporate
+recent WG decisions and other corrections:
+binding sources of character encoding info (27 Aug / 3 Sept),
+correct wording of Faust quotation (restore dropped line),
+drop SDD from EncodingDecl,
+change text at version number 1.0,
+drop misleading (wrong!) sentence about ignorables and extenders,
+modify definition of PCData to make bar on msc grammatical,
+change grammar's handling of internal subset (drop non-terminal markupdecls),
+change definition of includeSect to allow conditional sections,
+add integral-declaration constraint on internal subset,
+drop misleading / dangerous sentence about relationship of
+entities with system storage objects,
+change table body tag to htbody as per EM change to DTD,
+add rule about space normalization in public identifiers,
+add description of how to generate our name-space rules from 
+Unicode character database (needs further work!).
+</sitem>
+<sitem>1997-10-08 : TB : Removed %-constructs again, new rules
+for PE appearance.</sitem>
+<sitem>1997-10-01 : TB : Case-sensitive markup; cleaned up
+element-type defs, lotsa little edits for style</sitem>
+<sitem>1997-09-25 : TB : Change to elm's new DTD, with
+substantial detail cleanup as a side-effect</sitem>
+<sitem>1997-07-24 : CMSMcQ : correct error (lost *) in definition 
+of ignoreSectContents (thanks to Makoto Murata)</sitem>
+<sitem>Allow all empty elements to have end-tags, consistent with
+SGML TC (as per JJC).</sitem>
+<sitem>1997-07-23 : CMSMcQ : pre-emptive strike on pending corrections:
+introduce the term 'empty-element tag', note that all empty elements
+may use it, and elements declared EMPTY must use it.
+Add WFC requiring encoding decl to come first in an entity.
+Redefine notations to point to PIs as well as binary entities.
+Change autodetection table by removing bytes 3 and 4 from 
+examples with Byte Order Mark.
+Add content model as a term and clarify that it applies to both
+mixed and element content.
+</sitem>
+<sitem>1997-06-30 : CMSMcQ : change date, some cosmetic changes,
+changes to productions for choice, seq, Mixed, NotationType,
+Enumeration.  Follow James Clark's suggestion and prohibit 
+conditional sections in internal subset.  TO DO:  simplify
+production for ignored sections as a result, since we don't 
+need to worry about parsers which don't expand PErefs finding
+a conditional section.</sitem>
+<sitem>1997-06-29 : TB : various edits</sitem>
+<sitem>1997-06-29 : CMSMcQ : further changes:
+Suppress old FINAL EDIT comments and some dead material.
+Revise occurrences of % in grammar to exploit Henry Thompson's pun,
+especially markupdecl and attdef.
+Remove RMD requirement relating to element content (?).
+</sitem>
+<sitem>1997-06-28 : CMSMcQ : Various changes for 1 July draft:
+Add text for draconian error handling (introduce
+the term Fatal Error).
+RE deleta est (changing wording from 
+original announcement to restrict the requirement to validating
+parsers).
+Tag definition of validating processor and link to it.
+Add colon as name character.
+Change def of %operator.
+Change standard definitions of lt, gt, amp.
+Strip leading zeros from #x00nn forms.</sitem>
+<sitem>1997-04-02 : CMSMcQ : final corrections of editorial errors
+found in last night's proofreading.  Reverse course once more on
+well-formed:   Webster's Second hyphenates it, and that's enough
+for me.</sitem>
+<sitem>1997-04-01 : CMSMcQ : corrections from JJC, EM, HT, and self</sitem>
+<sitem>1997-03-31 : Tim Bray : many changes</sitem>
+<sitem>1997-03-29 : CMSMcQ : some Henry Thompson (on entity handling),
+some Charles Goldfarb, some ERB decisions (PE handling in miscellaneous
+declarations.  Changed Ident element to accept def attribute.
+Allow normalization of Unicode characters.  move def of systemliteral
+into section on literals.</sitem>
+<sitem>1997-03-28 : CMSMcQ : make as many corrections as possible, from
+Terry Allen, Norbert Mikula, James Clark, Jon Bosak, Henry Thompson,
+Paul Grosso, and self.  Among other things:  give in on "well formed"
+(Terry is right), tentatively rename QuotedCData as AttValue
+and Literal as EntityValue to be more informative, since attribute
+values are the <emph>only</emph> place QuotedCData was used, and
+vice versa for entity text and Literal. (I'd call it Entity Text, 
+but 8879 uses that name for both internal and external entities.)</sitem>
+<sitem>1997-03-26 : CMSMcQ : resynch the two forks of this draft, reapply
+my changes dated 03-20 and 03-21.  Normalize old 'may not' to 'must not'
+except in the one case where it meant 'may or may not'.</sitem>
+<sitem>1997-03-21 : TB : massive changes on plane flight from Chicago
+to Vancouver</sitem>
+<sitem>1997-03-21 : CMSMcQ : correct as many reported errors as possible.
+</sitem>
+<sitem>1997-03-20 : CMSMcQ : correct typos listed in CMSMcQ hand copy of spec.</sitem>
+<sitem>1997-03-20 : CMSMcQ : cosmetic changes preparatory to revision for
+WWW conference April 1997:  restore some of the internal entity 
+references (e.g. to docdate, etc.), change character xA0 to &amp;nbsp;
+and define nbsp as &amp;#160;, and refill a lot of paragraphs for
+legibility.</sitem>
+<sitem>1996-11-12 : CMSMcQ : revise using Tim's edits:
+Add list type of NUMBERED and change most lists either to
+BULLETS or to NUMBERED.
+Suppress QuotedNames, Names (not used).
+Correct trivial-grammar doc type decl.
+Rename 'marked section' as 'CDATA section' passim.
+Also edits from James Clark:
+Define the set of characters from which [^abc] subtracts.
+Charref should use just [0-9] not Digit.
+Location info needs cleaner treatment:  remove?  (ERB
+question).
+One example of a PI has wrong pic.
+Clarify discussion of encoding names.
+Encoding failure should lead to unspecified results; don't
+prescribe error recovery.
+Don't require exposure of entity boundaries.
+Ignore white space in element content.
+Reserve entity names of the form u-NNNN.
+Clarify relative URLs.
+And some of my own:
+Correct productions for content model:  model cannot
+consist of a name, so "elements ::= cp" is no good.
+</sitem>
+<sitem>1996-11-11 : CMSMcQ : revise for style.
+Add new rhs to entity declaration, for parameter entities.</sitem>
+<sitem>1996-11-10 : CMSMcQ : revise for style.
+Fix / complete section on names, characters.
+Add sections on parameter entities, conditional sections.
+Still to do:  Add compatibility note on deterministic content models.
+Finish stylistic revision.</sitem>
+<sitem>1996-10-31 : TB : Add Entity Handling section</sitem>
+<sitem>1996-10-30 : TB : Clean up term &amp; termdef.  Slip in
+ERB decision re EMPTY.</sitem>
+<sitem>1996-10-28 : TB : Change DTD.  Implement some of Michael's
+suggestions.  Change comments back to //.  Introduce language for
+XML namespace reservation.  Add section on white-space handling.
+Lots more cleanup.</sitem>
+<sitem>1996-10-24 : CMSMcQ : quick tweaks, implement some ERB
+decisions.  Characters are not integers.  Comments are /* */ not //.
+Add bibliographic refs to 10646, HyTime, Unicode.
+Rename old Cdata as MsData since it's <emph>only</emph> seen
+in marked sections.  Call them attribute-value pairs not
+name-value pairs, except once.  Internal subset is optional, needs
+'?'.  Implied attributes should be signaled to the app, not
+have values supplied by processor.</sitem>
+<sitem>1996-10-16 : TB : track down &amp; excise all DSD references;
+introduce some EBNF for entity declarations.</sitem>
+<sitem>1996-10-?? : TB : consistency check, fix up scraps so
+they all parse, get formatter working, correct a few productions.</sitem>
+<sitem>1996-10-10/11 : CMSMcQ : various maintenance, stylistic, and
+organizational changes:
+Replace a few literals with xmlpio and
+pic entities, to make them consistent and ensure we can change pic
+reliably when the ERB votes.
+Drop paragraph on recognizers from notation section.
+Add match, exact match to terminology.
+Move old 2.2 XML Processors and Apps into intro.
+Mention comments, PIs, and marked sections in discussion of
+delimiter escaping.
+Streamline discussion of doctype decl syntax.
+Drop old section of 'PI syntax' for doctype decl, and add
+section on partial-DTD summary PIs to end of Logical Structures
+section.
+Revise DSD syntax section to use Tim's subset-in-a-PI
+mechanism.</sitem>
+<sitem>1996-10-10 : TB : eliminate name recognizers (and more?)</sitem>
+<sitem>1996-10-09 : CMSMcQ : revise for style, consistency through 2.3
+(Characters)</sitem>
+<sitem>1996-10-09 : CMSMcQ : re-unite everything for convenience,
+at least temporarily, and revise quickly</sitem>
+<sitem>1996-10-08 : TB : first major homogenization pass</sitem>
+<sitem>1996-10-08 : TB : turn "current" attribute on div type into 
+CDATA</sitem>
+<sitem>1996-10-02 : TB : remould into skeleton + entities</sitem>
+<sitem>1996-09-30 : CMSMcQ : add a few more sections prior to exchange
+                            with Tim.</sitem>
+<sitem>1996-09-20 : CMSMcQ : finish transcribing notes.</sitem>
+<sitem>1996-09-19 : CMSMcQ : begin transcribing notes for draft.</sitem>
+<sitem>1996-09-13 : CMSMcQ : made outline from notes of 09-06,
+do some housekeeping</sitem>
+</slist>
+</revisiondesc>
+</header>
+<body> 
+<div1 id='sec-intro'>
+<head>Introduction</head>
+<p>Extensible Markup Language, abbreviated XML, describes a class of
+data objects called <termref def="dt-xml-doc">XML documents</termref> and
+partially describes the behavior of 
+computer programs which process them. XML is an application profile or
+restricted form of SGML, the Standard Generalized Markup 
+Language <bibref ref='ISO8879'/>.
+By construction, XML documents 
+are conforming SGML documents.
+</p>
+<p>XML documents are made up of storage units called <termref
+def="dt-entity">entities</termref>, which contain either parsed
+or unparsed data.
+Parsed data is made up of <termref def="dt-character">characters</termref>,
+some 
+of which form <termref def="dt-chardata">character data</termref>, 
+and some of which form <termref def="dt-markup">markup</termref>.
+Markup encodes a description of the document's storage layout and
+logical structure. XML provides a mechanism to impose constraints on
+the storage layout and logical structure.</p>
+<p><termdef id="dt-xml-proc" term="XML Processor">A software module
+called an <term>XML processor</term> is used to read XML documents
+and provide access to their content and structure.</termdef> <termdef
+id="dt-app" term="Application">It is assumed that an XML processor is
+doing its work on behalf of another module, called the
+<term>application</term>.</termdef> This specification describes the
+required behavior of an XML processor in terms of how it must read XML
+data and the information it must provide to the application.</p>
+<div2 id='sec-origin-goals'>
+<head>Origin and Goals</head>
+<p>XML was developed by an XML Working Group (originally known as the
+SGML Editorial Review Board) formed under the auspices of the World
+Wide Web Consortium (W3C) in 1996.
+It was chaired by Jon Bosak of Sun
+Microsystems with the active participation of an XML Special
+Interest Group (previously known as the SGML Working Group) also
+organized by the W3C. The membership of the XML Working Group is given
+in an appendix. Dan Connolly served as the WG's contact with the W3C.
+</p>
+<p>The design goals for XML are:<olist>
+<item><p>XML shall be straightforwardly usable over the
+Internet.</p></item>
+<item><p>XML shall support a wide variety of applications.</p></item>
+<item><p>XML shall be compatible with SGML.</p></item>
+<item><p>It shall be easy to write programs which process XML
+documents.</p></item>
+<item><p>The number of optional features in XML is to be kept to the
+absolute minimum, ideally zero.</p></item>
+<item><p>XML documents should be human-legible and reasonably
+clear.</p></item>
+<item><p>The XML design should be prepared quickly.</p></item>
+<item><p>The design of XML shall be formal and concise.</p></item>
+<item><p>XML documents shall be easy to create.</p></item>
+<item><p>Terseness in XML markup is of minimal importance.</p></item></olist>
+</p>
+<p>This specification, 
+together with associated standards
+(Unicode and ISO/IEC 10646 for characters,
+Internet RFC 1766 for language identification tags, 
+ISO 639 for language name codes, and 
+ISO 3166 for country name codes),
+provides all the information necessary to understand 
+XML Version &XML.version;
+and construct computer programs to process it.</p>
+<p>This version of the XML specification
+<!-- is for &doc.audience;.-->
+&doc.distribution;.</p>
+
+</div2>
+
+
+<div2 id='sec-terminology'>
+<head>Terminology</head>
+<p>The terminology used to describe XML documents is defined in the body of
+this specification.
+The terms defined in the following list are used in building those
+definitions and in describing the actions of an XML processor:
+<glist>
+<gitem>
+<label>may</label>
+<def><p><termdef id="dt-may" term="May">Conforming documents and XML
+processors are permitted to but need not behave as
+described.</termdef></p></def>
+</gitem>
+<gitem>
+<label>must</label>
+<def><p>Conforming documents and XML processors 
+are required to behave as described; otherwise they are in error.
+<!-- do NOT change this! this is what defines a violation of
+a 'must' clause as 'an error'. -MSM -->
+</p></def>
+</gitem>
+<gitem>
+<label>error</label>
+<def><p><termdef id='dt-error' term='Error'
+>A violation of the rules of this
+specification; results are
+undefined.  Conforming software may detect and report an error and may
+recover from it.</termdef></p></def>
+</gitem>
+<gitem>
+<label>fatal error</label>
+<def><p><termdef id="dt-fatal" term="Fatal Error">An error
+which a conforming <termref def="dt-xml-proc">XML processor</termref>
+must detect and report to the application.
+After encountering a fatal error, the
+processor may continue
+processing the data to search for further errors and may report such
+errors to the application.  In order to support correction of errors,
+the processor may make unprocessed data from the document (with
+intermingled character data and markup) available to the application.
+Once a fatal error is detected, however, the processor must not
+continue normal processing (i.e., it must not
+continue to pass character data and information about the document's
+logical structure to the application in the normal way).
+</termdef></p></def>
+</gitem>
+<gitem>
+<label>at user option</label>
+<def><p>Conforming software may or must (depending on the modal verb in the
+sentence) behave as described; if it does, it must
+provide users a means to enable or disable the behavior
+described.</p></def>
+</gitem>
+<gitem>
+<label>validity constraint</label>
+<def><p>A rule which applies to all 
+<termref def="dt-valid">valid</termref> XML documents.
+Violations of validity constraints are errors; they must, at user option, 
+be reported by 
+<termref def="dt-validating">validating XML processors</termref>.</p></def>
+</gitem>
+<gitem>
+<label>well-formedness constraint</label>
+<def><p>A rule which applies to all <termref
+def="dt-wellformed">well-formed</termref> XML documents.
+Violations of well-formedness constraints are 
+<termref def="dt-fatal">fatal errors</termref>.</p></def>
+</gitem>
+
+<gitem>
+<label>match</label>
+<def><p><termdef id="dt-match" term="match">(Of strings or names:) 
+Two strings or names being compared must be identical.
+Characters with multiple possible representations in ISO/IEC 10646 (e.g.
+characters with 
+both precomposed and base+diacritic forms) match only if they have the
+same representation in both strings.
+At user option, processors may normalize such characters to
+some canonical form.
+No case folding is performed. 
+(Of strings and rules in the grammar:)  
+A string matches a grammatical production if it belongs to the
+language generated by that production.
+(Of content and content models:)
+An element matches its declaration when it conforms
+in the fashion described in the constraint
+<specref ref='elementvalid'/>.
+</termdef>
+</p></def>
+</gitem>
+<gitem>
+<label>for compatibility</label>
+<def><p><termdef id="dt-compat" term="For Compatibility">A feature of
+XML included solely to ensure that XML remains compatible with SGML.
+</termdef></p></def>
+</gitem>
+<gitem>
+<label>for interoperability</label>
+<def><p><termdef id="dt-interop" term="For interoperability">A
+non-binding recommendation included to increase the chances that XML
+documents can be processed by the existing installed base of SGML
+processors which predate the
+&WebSGML;.</termdef></p></def>
+</gitem>
+</glist>
+</p>
+</div2>
+
+</div1>
+<!-- &Docs; -->
+<div1 id='sec-documents'>
+<head>Documents</head>
+<p><termdef id="dt-xml-doc" term="XML Document">
+A data object is an
+<term>XML document</term> if it is
+<termref def="dt-wellformed">well-formed</termref>, as
+defined in this specification.
+A well-formed XML document may in addition be
+<termref def="dt-valid">valid</termref> if it meets certain further 
+constraints.</termdef></p>
+<p>Each XML document has both a logical and a physical structure.
+Physically, the document is composed of units called <termref
+def="dt-entity">entities</termref>.  An entity may <termref
+def="dt-entref">refer</termref> to other entities to cause their
+inclusion in the document. A document begins in a "root"  or <termref
+def="dt-docent">document entity</termref>.
+Logically, the document is composed of declarations, elements, 
+comments,
+character references, and
+processing
+instructions, all of which are indicated in the document by explicit
+markup.
+The logical and physical structures must nest properly, as described  
+in <specref ref='wf-entities'/>.
+</p>
+<div2 id='sec-well-formed'>
+<head>Well-Formed XML Documents</head>
+<p><termdef id="dt-wellformed" term="Well-Formed">
+A textual object is 
+a well-formed XML document if:</termdef>
+<olist>
+<item><p>Taken as a whole, it
+matches the production labeled <nt def='NT-document'>document</nt>.</p></item>
+<item><p>It
+meets all the well-formedness constraints given in this specification.</p>
+</item>
+<item><p>Each of the <termref def='dt-parsedent'>parsed entities</termref> 
+which is referenced directly or indirectly within the document is
+<titleref href='wf-entities'>well-formed</titleref>.</p></item>
+</olist></p>
+<p>
+<scrap lang='ebnf' id='document'>
+<head>Document</head>
+<prod id='NT-document'><lhs>document</lhs>
+<rhs><nt def='NT-prolog'>prolog</nt> 
+<nt def='NT-element'>element</nt> 
+<nt def='NT-Misc'>Misc</nt>*</rhs></prod>
+</scrap>
+</p>
+<p>Matching the <nt def="NT-document">document</nt> production 
+implies that:
+<olist>
+<item><p>It contains one or more
+<termref def="dt-element">elements</termref>.</p>
+</item>
+<!--* N.B. some readers (notably JC) find the following
+paragraph awkward and redundant.  I agree it's logically redundant:
+it *says* it is summarizing the logical implications of
+matching the grammar, and that means by definition it's
+logically redundant.  I don't think it's rhetorically
+redundant or unnecessary, though, so I'm keeping it.  It
+could however use some recasting when the editors are feeling
+stronger. -MSM *-->
+<item><p><termdef id="dt-root" term="Root Element">There is  exactly
+one element, called the <term>root</term>, or document element,  no
+part of which appears in the <termref
+def="dt-content">content</termref> of any other element.</termdef>
+For all other elements, if the start-tag is in the content of another
+element, the end-tag is in the content of the same element.  More
+simply stated, the elements, delimited by start- and end-tags, nest
+properly within each other.
+</p></item>
+</olist>
+</p>
+<p><termdef id="dt-parentchild" term="Parent/Child">As a consequence 
+of this,
+for each non-root element
+<code>C</code> in the document, there is one other element <code>P</code>
+in the document such that 
+<code>C</code> is in the content of <code>P</code>, but is not in
+the content of any other element that is in the content of
+<code>P</code>.  
+<code>P</code> is referred to as the
+<term>parent</term> of <code>C</code>, and <code>C</code> as a
+<term>child</term> of <code>P</code>.</termdef></p></div2>
+<div2 id="charsets">
+<head>Characters</head>
+<p><termdef id="dt-text" term="Text">A parsed entity contains
+<term>text</term>, a sequence of 
+<termref def="dt-character">characters</termref>, 
+which may represent markup or character data.</termdef> 
+<termdef id="dt-character" term="Character">A <term>character</term> 
+is an atomic unit of text as specified by
+ISO/IEC 10646 <bibref ref="ISO10646"/>.
+Legal characters are tab, carriage return, line feed, and the legal
+graphic characters of Unicode and ISO/IEC 10646.
+The use of "compatibility characters", as defined in section 6.8
+of <bibref ref='Unicode'/>, is discouraged.
+</termdef> 
+<scrap lang="ebnf" id="char32">
+<head>Character Range</head>
+<prodgroup pcw2="4" pcw4="17.5" pcw5="11">
+<prod id="NT-Char"><lhs>Char</lhs> 
+<rhs>#x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] 
+| [#x10000-#x10FFFF]</rhs> 
+<com>any Unicode character, excluding the
+surrogate blocks, FFFE, and FFFF.</com> </prod>
+</prodgroup>
+</scrap>
+</p>
+
+<p>The mechanism for encoding character code points into bit patterns may
+vary from entity to entity. All XML processors must accept the UTF-8
+and UTF-16 encodings of 10646; the mechanisms for signaling which of
+the two is in use, or for bringing other encodings into play, are
+discussed later, in <specref ref='charencoding'/>.
+</p>
+<!--
+<p>Regardless of the specific encoding used, any character in the ISO/IEC
+10646 character set may be referred to by the decimal or hexadecimal
+equivalent of its 
+UCS-4 code value.
+</p>-->
+</div2>
+<div2 id='sec-common-syn'>
+<head>Common Syntactic Constructs</head>
+<p>This section defines some symbols used widely in the grammar.</p>
+<p><nt def="NT-S">S</nt> (white space) consists of one or more space (#x20)
+characters, carriage returns, line feeds, or tabs.
+
+<scrap lang="ebnf" id='white'>
+<head>White Space</head>
+<prodgroup pcw2="4" pcw4="17.5" pcw5="11">
+<prod id='NT-S'><lhs>S</lhs>
+<rhs>(#x20 | #x9 | #xD | #xA)+</rhs>
+</prod>
+</prodgroup>
+</scrap></p>
+<p>Characters are classified for convenience as letters, digits, or other
+characters.  Letters consist of an alphabetic or syllabic 
+base character possibly
+followed by one or more combining characters, or of an ideographic
+character.  
+Full definitions of the specific characters in each class
+are given in <specref ref='CharClasses'/>.</p>
+<p><termdef id="dt-name" term="Name">A <term>Name</term> is a token
+beginning with a letter or one of a few punctuation characters, and continuing
+with letters, digits, hyphens, underscores, colons, or full stops, together
+known as name characters.</termdef>
+Names beginning with the string "<code>xml</code>", or any string
+which would match <code>(('X'|'x') ('M'|'m') ('L'|'l'))</code>, are
+reserved for standardization in this or future versions of this
+specification.
+</p>
+<note>
+<p>The colon character within XML names is reserved for experimentation with
+name spaces.  
+Its meaning is expected to be
+standardized at some future point, at which point those documents 
+using the colon for experimental purposes may need to be updated.
+(There is no guarantee that any name-space mechanism
+adopted for XML will in fact use the colon as a name-space delimiter.)
+In practice, this means that authors should not use the colon in XML
+names except as part of name-space experiments, but that XML processors
+should accept the colon as a name character.</p>
+</note>
+<p>An
+<nt def='NT-Nmtoken'>Nmtoken</nt> (name token) is any mixture of
+name characters.
+<scrap lang='ebnf'>
+<head>Names and Tokens</head>
+<prod id='NT-NameChar'><lhs>NameChar</lhs>
+<rhs><nt def="NT-Letter">Letter</nt> 
+| <nt def='NT-Digit'>Digit</nt> 
+| '.' | '-' | '_' | ':'
+| <nt def='NT-CombiningChar'>CombiningChar</nt> 
+| <nt def='NT-Extender'>Extender</nt></rhs>
+</prod>
+<prod id='NT-Name'><lhs>Name</lhs>
+<rhs>(<nt def='NT-Letter'>Letter</nt> | '_' | ':')
+(<nt def='NT-NameChar'>NameChar</nt>)*</rhs></prod>
+<prod id='NT-Names'><lhs>Names</lhs>
+<rhs><nt def='NT-Name'>Name</nt> 
+(<nt def='NT-S'>S</nt> <nt def='NT-Name'>Name</nt>)*</rhs></prod>
+<prod id='NT-Nmtoken'><lhs>Nmtoken</lhs>
+<rhs>(<nt def='NT-NameChar'>NameChar</nt>)+</rhs></prod>
+<prod id='NT-Nmtokens'><lhs>Nmtokens</lhs>
+<rhs><nt def='NT-Nmtoken'>Nmtoken</nt> (<nt def='NT-S'>S</nt> <nt def='NT-Nmtoken'>Nmtoken</nt>)*</rhs></prod>
+</scrap>
+</p>
+<p>Literal data is any quoted string not containing
+the quotation mark used as a delimiter for that string.
+Literals are used
+for specifying the content of internal entities
+(<nt def='NT-EntityValue'>EntityValue</nt>),
+the values of attributes (<nt def='NT-AttValue'>AttValue</nt>), 
+and external identifiers 
+(<nt def="NT-SystemLiteral">SystemLiteral</nt>).  
+Note that a <nt def='NT-SystemLiteral'>SystemLiteral</nt>
+can be parsed without scanning for markup.
+<scrap lang='ebnf'>
+<head>Literals</head>
+<prod id='NT-EntityValue'><lhs>EntityValue</lhs>
+<rhs>'"' 
+([^%&amp;"] 
+| <nt def='NT-PEReference'>PEReference</nt> 
+| <nt def='NT-Reference'>Reference</nt>)*
+'"' 
+</rhs>
+<rhs>|&nbsp; 
+"'" 
+([^%&amp;'] 
+| <nt def='NT-PEReference'>PEReference</nt> 
+| <nt def='NT-Reference'>Reference</nt>)* 
+"'"</rhs>
+</prod>
+<prod id='NT-AttValue'><lhs>AttValue</lhs>
+<rhs>'"' 
+([^&lt;&amp;"] 
+| <nt def='NT-Reference'>Reference</nt>)* 
+'"' 
+</rhs>
+<rhs>|&nbsp; 
+"'" 
+([^&lt;&amp;'] 
+| <nt def='NT-Reference'>Reference</nt>)* 
+"'"</rhs>
+</prod>
+<prod id="NT-SystemLiteral"><lhs>SystemLiteral</lhs>
+<rhs>('"' [^"]* '"') |&nbsp;("'" [^']* "'")
+</rhs>
+</prod>
+<prod id="NT-PubidLiteral"><lhs>PubidLiteral</lhs>
+<rhs>'"' <nt def='NT-PubidChar'>PubidChar</nt>* 
+'"' 
+| "'" (<nt def='NT-PubidChar'>PubidChar</nt> - "'")* "'"</rhs>
+</prod>
+<prod id="NT-PubidChar"><lhs>PubidChar</lhs>
+<rhs>#x20 | #xD | #xA 
+|&nbsp;[a-zA-Z0-9]
+|&nbsp;[-'()+,./:=?;!*#@$_%]</rhs>
+</prod>
+</scrap>
+</p>
+
+</div2>
+
+<div2 id='syntax'>
+<head>Character Data and Markup</head>
+<p><termref def='dt-text'>Text</termref> consists of intermingled 
+<termref def="dt-chardata">character
+data</termref> and markup.
+<termdef id="dt-markup" term="Markup"><term>Markup</term> takes the form of
+<termref def="dt-stag">start-tags</termref>,
+<termref def="dt-etag">end-tags</termref>,
+<termref def="dt-empty">empty-element tags</termref>,
+<termref def="dt-entref">entity references</termref>,
+<termref def="dt-charref">character references</termref>,
+<termref def="dt-comment">comments</termref>,
+<termref def="dt-cdsection">CDATA section</termref> delimiters,
+<termref def="dt-doctype">document type declarations</termref>, and
+<termref def="dt-pi">processing instructions</termref>.
+</termdef>
+</p>
+<p><termdef id="dt-chardata" term="Character Data">All text that is not markup
+constitutes the <term>character data</term> of
+the document.</termdef></p>
+<p>The ampersand character (&amp;) and the left angle bracket (&lt;)
+may appear in their literal form <emph>only</emph> when used as markup
+delimiters, or within a <termref def="dt-comment">comment</termref>, a
+<termref def="dt-pi">processing instruction</termref>, 
+or a <termref def="dt-cdsection">CDATA section</termref>.  
+
+They are also legal within the <termref def='dt-litentval'>literal entity
+value</termref> of an internal entity declaration; see
+<specref ref='wf-entities'/>.
+<!-- FINAL EDIT:  restore internal entity decl or leave it out. -->
+If they are needed elsewhere,
+they must be <termref def="dt-escape">escaped</termref>
+using either <termref def='dt-charref'>numeric character references</termref>
+or the strings
+"<code>&amp;amp;</code>" and "<code>&amp;lt;</code>" respectively. 
+The right angle
+bracket (>) may be represented using the string
+"<code>&amp;gt;</code>", and must, <termref def='dt-compat'>for
+compatibility</termref>, 
+be escaped using
+"<code>&amp;gt;</code>" or a character reference 
+when it appears in the string
+"<code>]]&gt;</code>"
+in content, 
+when that string is not marking the end of 
+a <termref def="dt-cdsection">CDATA section</termref>. 
+</p>
+<p>
+In the content of elements, character data 
+is any string of characters which does
+not contain the start-delimiter of any markup.  
+In a CDATA section, character data
+is any string of characters not including the CDATA-section-close
+delimiter, "<code>]]&gt;</code>".</p>
+<p>
+To allow attribute values to contain both single and double quotes, the
+apostrophe or single-quote character (') may be represented as
+"<code>&amp;apos;</code>", and the double-quote character (") as
+"<code>&amp;quot;</code>".
+<scrap lang="ebnf">
+<head>Character Data</head>
+<prod id='NT-CharData'>
+<lhs>CharData</lhs>
+<rhs>[^&lt;&amp;]* - ([^&lt;&amp;]* ']]&gt;' [^&lt;&amp;]*)</rhs>
+</prod>
+</scrap>
+</p>
+</div2>
+<div2 id='sec-comments'>
+<head>Comments</head>
+<p><termdef id="dt-comment" term="Comment"><term>Comments</term> may 
+appear anywhere in a document outside other 
+<termref def='dt-markup'>markup</termref>; in addition,
+they may appear within the document type declaration
+at places allowed by the grammar.
+They are not part of the document's <termref def="dt-chardata">character
+data</termref>; an XML
+processor may, but need not, make it possible for an application to
+retrieve the text of comments.
+<termref def="dt-compat">For compatibility</termref>, the string
+"<code>--</code>" (double-hyphen) must not occur within
+comments.
+<scrap lang="ebnf">
+<head>Comments</head>
+<prod id='NT-Comment'><lhs>Comment</lhs>
+<rhs>'&lt;!--'
+((<nt def='NT-Char'>Char</nt> - '-') 
+| ('-' (<nt def='NT-Char'>Char</nt> - '-')))* 
+'-->'</rhs>
+</prod>
+</scrap>
+</termdef></p>
+<p>An example of a comment:
+<eg>&lt;!&como; declarations for &lt;head> &amp; &lt;body> &comc;&gt;</eg>
+</p>
+</div2>
+<div2 id='sec-pi'>
+<head>Processing Instructions</head>
+<p><termdef id="dt-pi" term="Processing instruction"><term>Processing
+instructions</term> (PIs) allow documents to contain instructions
+for applications.
+<scrap lang="ebnf">
+<head>Processing Instructions</head>
+<prod id='NT-PI'><lhs>PI</lhs>
+<rhs>'&lt;?' <nt def='NT-PITarget'>PITarget</nt> 
+(<nt def='NT-S'>S</nt> 
+(<nt def='NT-Char'>Char</nt>* - 
+(<nt def='NT-Char'>Char</nt>* &pic; <nt def='NT-Char'>Char</nt>*)))?
+&pic;</rhs></prod>
+<prod id='NT-PITarget'><lhs>PITarget</lhs>
+<rhs><nt def='NT-Name'>Name</nt> - 
+(('X' | 'x') ('M' | 'm') ('L' | 'l'))</rhs>
+</prod>
+</scrap></termdef>
+PIs are not part of the document's <termref def="dt-chardata">character
+data</termref>, but must be passed through to the application. The
+PI begins with a target (<nt def='NT-PITarget'>PITarget</nt>) used
+to identify the application to which the instruction is directed.  
+The target names "<code>XML</code>", "<code>xml</code>", and so on are
+reserved for standardization in this or future versions of this
+specification.
+The 
+XML <termref def='dt-notation'>Notation</termref> mechanism
+may be used for
+formal declaration of PI targets.
+</p>
+</div2>
+<div2 id='sec-cdata-sect'>
+<head>CDATA Sections</head>
+<p><termdef id="dt-cdsection" term="CDATA Section"><term>CDATA sections</term>
+may occur 
+anywhere character data may occur; they are
+used to escape blocks of text containing characters which would
+otherwise be recognized as markup.  CDATA sections begin with the
+string "<code>&lt;![CDATA[</code>" and end with the string
+"<code>]]&gt;</code>":
+<scrap lang="ebnf">
+<head>CDATA Sections</head>
+<prod id='NT-CDSect'><lhs>CDSect</lhs>
+<rhs><nt def='NT-CDStart'>CDStart</nt> 
+<nt def='NT-CData'>CData</nt> 
+<nt def='NT-CDEnd'>CDEnd</nt></rhs></prod>
+<prod id='NT-CDStart'><lhs>CDStart</lhs>
+<rhs>'&lt;![CDATA['</rhs>
+</prod>
+<prod id='NT-CData'><lhs>CData</lhs>
+<rhs>(<nt def='NT-Char'>Char</nt>* - 
+(<nt def='NT-Char'>Char</nt>* ']]&gt;' <nt def='NT-Char'>Char</nt>*))
+</rhs>
+</prod>
+<prod id='NT-CDEnd'><lhs>CDEnd</lhs>
+<rhs>']]&gt;'</rhs>
+</prod>
+</scrap>
+
+Within a CDATA section, only the <nt def='NT-CDEnd'>CDEnd</nt> string is
+recognized as markup, so that left angle brackets and ampersands may occur in
+their literal form; they need not (and cannot) be escaped using
+"<code>&amp;lt;</code>" and "<code>&amp;amp;</code>".  CDATA sections
+cannot nest.</termdef>
+</p>
+
+<p>An example of a CDATA section, in which "<code>&lt;greeting></code>" and 
+"<code>&lt;/greeting></code>"
+are recognized as <termref def='dt-chardata'>character data</termref>, not
+<termref def='dt-markup'>markup</termref>:
+<eg>&lt;![CDATA[&lt;greeting>Hello, world!&lt;/greeting>]]&gt;</eg>
+</p>
+</div2>
+<div2 id='sec-prolog-dtd'>
+<head>Prolog and Document Type Declaration</head>
+<p><termdef id='dt-xmldecl' term='XML Declaration'>XML documents 
+may, and should, 
+begin with an <term>XML declaration</term> which specifies
+the version of
+XML being used.</termdef>
+For example, the following is a complete XML document, <termref
+def="dt-wellformed">well-formed</termref> but not
+<termref def="dt-valid">valid</termref>:
+<eg><![CDATA[<?xml version="1.0"?>
+<greeting>Hello, world!</greeting>
+]]></eg>
+and so is this:
+<eg><![CDATA[<greeting>Hello, world!</greeting>
+]]></eg>
+</p>
+
+<p>The version number "<code>1.0</code>" should be used to indicate
+conformance to this version of this specification; it is an error
+for a document to use the value "<code>1.0</code>" 
+if it does not conform to this version of this specification.
+It is the intent
+of the XML working group to give later versions of this specification
+numbers other than "<code>1.0</code>", but this intent does not
+indicate a
+commitment to produce any future versions of XML, nor if any are produced, to
+use any particular numbering scheme.
+Since future versions are not ruled out, this construct is provided 
+as a means to allow the possibility of automatic version recognition, should
+it become necessary.
+Processors may signal an error if they receive documents labeled with 
+versions they do not support. 
+</p>
+<p>The function of the markup in an XML document is to describe its
+storage and logical structure and to associate attribute-value pairs
+with its logical structures.  XML provides a mechanism, the <termref
+def="dt-doctype">document type declaration</termref>, to define
+constraints on the logical structure and to support the use of
+predefined storage units.
+
+<termdef id="dt-valid" term="Validity">An XML document is 
+<term>valid</term> if it has an associated document type
+declaration and if the document
+complies with the constraints expressed in it.</termdef></p>
+<p>The document type declaration must appear before
+the first <termref def="dt-element">element</termref> in the document.
+<scrap lang="ebnf" id='xmldoc'>
+<head>Prolog</head>
+<prodgroup pcw2="6" pcw4="17.5" pcw5="9">
+<prod id='NT-prolog'><lhs>prolog</lhs>
+<rhs><nt def='NT-XMLDecl'>XMLDecl</nt>? 
+<nt def='NT-Misc'>Misc</nt>* 
+(<nt def='NT-doctypedecl'>doctypedecl</nt> 
+<nt def='NT-Misc'>Misc</nt>*)?</rhs></prod>
+<prod id='NT-XMLDecl'><lhs>XMLDecl</lhs>
+<rhs>&xmlpio; 
+<nt def='NT-VersionInfo'>VersionInfo</nt> 
+<nt def='NT-EncodingDecl'>EncodingDecl</nt>? 
+<nt def='NT-SDDecl'>SDDecl</nt>? 
+<nt def="NT-S">S</nt>? 
+&pic;</rhs>
+</prod>
+<prod id='NT-VersionInfo'><lhs>VersionInfo</lhs>
+<rhs><nt def="NT-S">S</nt> 'version' <nt def='NT-Eq'>Eq</nt> 
+(' <nt def="NT-VersionNum">VersionNum</nt> ' 
+| " <nt def="NT-VersionNum">VersionNum</nt> ")</rhs>
+</prod>
+<prod id='NT-Eq'><lhs>Eq</lhs>
+<rhs><nt def='NT-S'>S</nt>? '=' <nt def='NT-S'>S</nt>?</rhs></prod>
+<prod id="NT-VersionNum">
+<lhs>VersionNum</lhs>
+<rhs>([a-zA-Z0-9_.:] | '-')+</rhs>
+</prod>
+<prod id='NT-Misc'><lhs>Misc</lhs>
+<rhs><nt def='NT-Comment'>Comment</nt> | <nt def='NT-PI'>PI</nt> | 
+<nt def='NT-S'>S</nt></rhs></prod>
+</prodgroup>
+</scrap></p>
+
+<p><termdef id="dt-doctype" term="Document Type Declaration">The XML
+<term>document type declaration</term> 
+contains or points to 
+<termref def='dt-markupdecl'>markup declarations</termref> 
+that provide a grammar for a
+class of documents.  
+This grammar is known as a document type definition,
+or <term>DTD</term>.  
+The document type declaration can point to an external subset (a
+special kind of 
+<termref def='dt-extent'>external entity</termref>) containing markup
+declarations, or can 
+contain the markup declarations directly in an internal subset, or can do
+both.   
+The DTD for a document consists of both subsets taken
+together.</termdef>
+</p>
+<p><termdef id="dt-markupdecl" term="markup declaration">
+A <term>markup declaration</term> is 
+an <termref def="dt-eldecl">element type declaration</termref>, 
+an <termref def="dt-attdecl">attribute-list declaration</termref>, 
+an <termref def="dt-entdecl">entity declaration</termref>, or
+a <termref def="dt-notdecl">notation declaration</termref>.
+</termdef>
+These declarations may be contained in whole or in part
+within <termref def='dt-PE'>parameter entities</termref>,
+as described in the well-formedness and validity constraints below.
+For fuller information, see
+<specref ref="sec-physical-struct"/>.</p>
+<scrap lang="ebnf" id='dtd'>
+<head>Document Type Definition</head>
+<prodgroup pcw2="6" pcw4="17.5" pcw5="9">
+<prod id='NT-doctypedecl'><lhs>doctypedecl</lhs>
+<rhs>'&lt;!DOCTYPE' <nt def='NT-S'>S</nt> 
+<nt def='NT-Name'>Name</nt> (<nt def='NT-S'>S</nt> 
+<nt def='NT-ExternalID'>ExternalID</nt>)? 
+<nt def='NT-S'>S</nt>? ('[' 
+(<nt def='NT-markupdecl'>markupdecl</nt> 
+| <nt def='NT-PEReference'>PEReference</nt> 
+| <nt def='NT-S'>S</nt>)*
+']' 
+<nt def='NT-S'>S</nt>?)? '>'</rhs>
+<vc def="vc-roottype"/>
+</prod>
+<prod id='NT-markupdecl'><lhs>markupdecl</lhs>
+<rhs><nt def='NT-elementdecl'>elementdecl</nt> 
+| <nt def='NT-AttlistDecl'>AttlistDecl</nt> 
+| <nt def='NT-EntityDecl'>EntityDecl</nt> 
+| <nt def='NT-NotationDecl'>NotationDecl</nt> 
+| <nt def='NT-PI'>PI</nt> 
+| <nt def='NT-Comment'>Comment</nt>
+</rhs>
+<vc def='vc-PEinMarkupDecl'/>
+<wfc def="wfc-PEinInternalSubset"/>
+</prod>
+
+</prodgroup>
+</scrap>
+
+<p>The markup declarations may be made up in whole or in part of
+the <termref def='dt-repltext'>replacement text</termref> of 
+<termref def='dt-PE'>parameter entities</termref>.
+The productions later in this specification for
+individual nonterminals (<nt def='NT-elementdecl'>elementdecl</nt>,
+<nt def='NT-AttlistDecl'>AttlistDecl</nt>, and so on) describe 
+the declarations <emph>after</emph> all the parameter entities have been 
+<termref def='dt-include'>included</termref>.</p>
+
+<vcnote id="vc-roottype">
+<head>Root Element Type</head>
+<p>
+The <nt def='NT-Name'>Name</nt> in the document type declaration must
+match the element type of the <termref def='dt-root'>root element</termref>.
+</p>
+</vcnote>
+
+<vcnote id='vc-PEinMarkupDecl'>
+<head>Proper Declaration/PE Nesting</head>
+<p>Parameter-entity 
+<termref def='dt-repltext'>replacement text</termref> must be properly nested
+with markup declarations. 
+That is to say, if either the first character
+or the last character of a markup
+declaration (<nt def='NT-markupdecl'>markupdecl</nt> above)
+is contained in the replacement text for a 
+<termref def='dt-PERef'>parameter-entity reference</termref>,
+both must be contained in the same replacement text.</p>
+</vcnote>
+<wfcnote id="wfc-PEinInternalSubset">
+<head>PEs in Internal Subset</head>
+<p>In the internal DTD subset, 
+<termref def='dt-PERef'>parameter-entity references</termref>
+can occur only where markup declarations can occur, not
+within markup declarations.  (This does not apply to
+references that occur in
+external parameter entities or to the external subset.)
+</p>
+</wfcnote>
+<p>
+Like the internal subset, the external subset and 
+any external parameter entities referred to in the DTD 
+must consist of a series of complete markup declarations of the types 
+allowed by the non-terminal symbol
+<nt def="NT-markupdecl">markupdecl</nt>, interspersed with white space
+or <termref def="dt-PERef">parameter-entity references</termref>.
+However, portions of the contents
+of the 
+external subset or of external parameter entities may conditionally be ignored
+by using 
+the <termref def="dt-cond-section">conditional section</termref>
+construct; this is not allowed in the internal subset.
+
+<scrap id="ext-Subset">
+<head>External Subset</head>
+<prodgroup pcw2="6" pcw4="17.5" pcw5="9">
+<prod id='NT-extSubset'><lhs>extSubset</lhs>
+<rhs><nt def='NT-TextDecl'>TextDecl</nt>?
+<nt def='NT-extSubsetDecl'>extSubsetDecl</nt></rhs></prod>
+<prod id='NT-extSubsetDecl'><lhs>extSubsetDecl</lhs>
+<rhs>(
+<nt def='NT-markupdecl'>markupdecl</nt> 
+| <nt def='NT-conditionalSect'>conditionalSect</nt> 
+| <nt def='NT-PEReference'>PEReference</nt> 
+| <nt def='NT-S'>S</nt>
+)*</rhs>
+</prod>
+</prodgroup>
+</scrap></p>
+<p>The external subset and external parameter entities also differ 
+from the internal subset in that in them,
+<termref def="dt-PERef">parameter-entity references</termref>
+are permitted <emph>within</emph> markup declarations,
+not only <emph>between</emph> markup declarations.</p>
+<p>An example of an XML document with a document type declaration:
+<eg><![CDATA[<?xml version="1.0"?>
+<!DOCTYPE greeting SYSTEM "hello.dtd">
+<greeting>Hello, world!</greeting>
+]]></eg>
+The <termref def="dt-sysid">system identifier</termref> 
+"<code>hello.dtd</code>" gives the URI of a DTD for the document.</p>
+<p>The declarations can also be given locally, as in this 
+example:
+<eg><![CDATA[<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE greeting [
+  <!ELEMENT greeting (#PCDATA)>
+]>
+<greeting>Hello, world!</greeting>
+]]></eg>
+If both the external and internal subsets are used, the 
+internal subset is considered to occur before the external subset.
+<!-- 'is considered to'? boo. whazzat mean? -->
+This has the effect that entity and attribute-list declarations in the
+internal subset take precedence over those in the external subset.
+</p>
+</div2>
+<div2 id='sec-rmd'>
+<head>Standalone Document Declaration</head>
+<p>Markup declarations can affect the content of the document,
+as passed from an <termref def="dt-xml-proc">XML processor</termref> 
+to an application; examples are attribute defaults and entity
+declarations.
+The standalone document declaration,
+which may appear as a component of the XML declaration, signals
+whether or not there are such declarations which appear external to 
+the <termref def='dt-docent'>document entity</termref>.
+<scrap lang="ebnf" id='fulldtd'>
+<head>Standalone Document Declaration</head>
+<prodgroup pcw2="4" pcw4="19.5" pcw5="9">
+<prod id='NT-SDDecl'><lhs>SDDecl</lhs>
+<rhs>
+<nt def="NT-S">S</nt> 
+'standalone' <nt def='NT-Eq'>Eq</nt> 
+(("'" ('yes' | 'no') "'") | ('"' ('yes' | 'no') '"'))
+</rhs>
+<vc def='vc-check-rmd'/></prod>
+</prodgroup>
+</scrap></p>
+<p>
+In a standalone document declaration, the value "<code>yes</code>" indicates
+that there 
+are no markup declarations external to the <termref def='dt-docent'>document
+entity</termref> (either in the DTD external subset, or in an
+external parameter entity referenced from the internal subset)
+which affect the information passed from the XML processor to
+the application.  
+The value "<code>no</code>" indicates that there are or may be such
+external markup declarations.
+Note that the standalone document declaration only 
+denotes the presence of external <emph>declarations</emph>; the presence, in a
+document, of 
+references to external <emph>entities</emph>, when those entities are
+internally declared, 
+does not change its standalone status.</p>
+<p>If there are no external markup declarations, the standalone document
+declaration has no meaning. 
+If there are external markup declarations but there is no standalone
+document declaration, the value "<code>no</code>" is assumed.</p>
+<p>Any XML document for which <code>standalone="no"</code> holds can 
+be converted algorithmically to a standalone document, 
+which may be desirable for some network delivery applications.</p>
+<vcnote id='vc-check-rmd'>
+<head>Standalone Document Declaration</head>
+<p>The standalone document declaration must have
+the value "<code>no</code>" if any external markup declarations
+contain declarations of:</p><ulist>
+<item><p>attributes with <termref def="dt-default">default</termref> values, if
+elements to which
+these attributes apply appear in the document without
+specifications of values for these attributes, or</p></item>
+<item><p>entities (other than &magicents;), 
+if <termref def="dt-entref">references</termref> to those
+entities appear in the document, or</p>
+</item>
+<item><p>attributes with values subject to
+<titleref href='AVNormalize'>normalization</titleref>, where the
+attribute appears in the document with a value which will
+change as a result of normalization, or</p>
+</item>
+<item>
+<p>element types with <termref def="dt-elemcontent">element content</termref>, 
+if white space occurs
+directly within any instance of those types.
+</p></item>
+</ulist>
+
+</vcnote>
+<p>An example XML declaration with a standalone document declaration:<eg
+>&lt;?xml version="&XML.version;" standalone='yes'?></eg></p>
+</div2>
+<div2 id='sec-white-space'>
+<head>White Space Handling</head>
+
+<p>In editing XML documents, it is often convenient to use "white space"
+(spaces, tabs, and blank lines, denoted by the nonterminal 
+<nt def='NT-S'>S</nt> in this specification) to
+set apart the markup for greater readability.  Such white space is typically
+not intended for inclusion in the delivered version of the document.
+On the other hand, "significant" white space that should be preserved in the
+delivered version is common, for example in poetry and
+source code.</p>
+<p>An <termref def='dt-xml-proc'>XML processor</termref> 
+must always pass all characters in a document that are not
+markup through to the application.   A <termref def='dt-validating'>
+validating XML processor</termref> must also inform the application
+which  of these characters constitute white space appearing
+in <termref def="dt-elemcontent">element content</termref>.
+</p>
+<p>A special <termref def='dt-attr'>attribute</termref> 
+named <kw>xml:space</kw> may be attached to an element
+to signal an intention that in that element,
+white space should be preserved by applications.
+In valid documents, this attribute, like any other, must be 
+<termref def="dt-attdecl">declared</termref> if it is used.
+When declared, it must be given as an 
+<termref def='dt-enumerated'>enumerated type</termref> whose only
+possible values are "<code>default</code>" and "<code>preserve</code>".
+For example:<eg><![CDATA[    <!ATTLIST poem   xml:space (default|preserve) 'preserve'>]]></eg></p>
+<p>The value "<code>default</code>" signals that applications'
+default white-space processing modes are acceptable for this element; the
+value "<code>preserve</code>" indicates the intent that applications preserve
+all the white space.
+This declared intent is considered to apply to all elements within the content
+of the element where it is specified, unless overriden with another instance
+of the <kw>xml:space</kw> attribute.
+</p>
+<p>The <termref def='dt-root'>root element</termref> of any document
+is considered to have signaled no intentions as regards application space
+handling, unless it provides a value for 
+this attribute or the attribute is declared with a default value.
+</p>
+
+</div2>
+<div2 id='sec-line-ends'>
+<head>End-of-Line Handling</head>
+<p>XML <termref def='dt-parsedent'>parsed entities</termref> are often stored in
+computer files which, for editing convenience, are organized into lines.
+These lines are typically separated by some combination of the characters
+carriage-return (#xD) and line-feed (#xA).</p>
+<p>To simplify the tasks of <termref def='dt-app'>applications</termref>,
+wherever an external parsed entity or the literal entity value
+of an internal parsed entity contains either the literal 
+two-character sequence "#xD#xA" or a standalone literal
+#xD, an <termref def='dt-xml-proc'>XML processor</termref> must 
+pass to the application the single character #xA.
+(This behavior can 
+conveniently be produced by normalizing all 
+line breaks to #xA on input, before parsing.)
+</p>
+</div2>
+<div2 id='sec-lang-tag'>
+<head>Language Identification</head>
+<p>In document processing, it is often useful to
+identify the natural or formal language 
+in which the content is 
+written.
+A special <termref def="dt-attr">attribute</termref> named
+<kw>xml:lang</kw> may be inserted in
+documents to specify the 
+language used in the contents and attribute values 
+of any element in an XML document.
+In valid documents, this attribute, like any other, must be 
+<termref def="dt-attdecl">declared</termref> if it is used.
+The values of the attribute are language identifiers as defined
+by <bibref ref="RFC1766"/>, "Tags for the Identification of Languages":
+<scrap lang='ebnf'>
+<head>Language Identification</head>
+<prod id='NT-LanguageID'><lhs>LanguageID</lhs>
+<rhs><nt def='NT-Langcode'>Langcode</nt> 
+('-' <nt def='NT-Subcode'>Subcode</nt>)*</rhs></prod>
+<prod id='NT-Langcode'><lhs>Langcode</lhs>
+<rhs><nt def='NT-ISO639Code'>ISO639Code</nt> | 
+<nt def='NT-IanaCode'>IanaCode</nt> | 
+<nt def='NT-UserCode'>UserCode</nt></rhs>
+</prod>
+<prod id='NT-ISO639Code'><lhs>ISO639Code</lhs>
+<rhs>([a-z] | [A-Z]) ([a-z] | [A-Z])</rhs></prod>
+<prod id='NT-IanaCode'><lhs>IanaCode</lhs>
+<rhs>('i' | 'I') '-' ([a-z] | [A-Z])+</rhs></prod>
+<prod id='NT-UserCode'><lhs>UserCode</lhs>
+<rhs>('x' | 'X') '-' ([a-z] | [A-Z])+</rhs></prod>
+<prod id='NT-Subcode'><lhs>Subcode</lhs>
+<rhs>([a-z] | [A-Z])+</rhs></prod>
+</scrap>
+The <nt def='NT-Langcode'>Langcode</nt> may be any of the following:
+<ulist>
+<item><p>a two-letter language code as defined by 
+<bibref ref="ISO639"/>, "Codes
+for the representation of names of languages"</p></item>
+<item><p>a language identifier registered with the Internet
+Assigned Numbers Authority <bibref ref='IANA'/>; these begin with the 
+prefix "<code>i-</code>" (or "<code>I-</code>")</p></item>
+<item><p>a language identifier assigned by the user, or agreed on
+between parties in private use; these must begin with the
+prefix "<code>x-</code>" or "<code>X-</code>" in order to ensure that they do not conflict 
+with names later standardized or registered with IANA</p></item>
+</ulist></p>
+<p>There may be any number of <nt def='NT-Subcode'>Subcode</nt> segments; if
+the first 
+subcode segment exists and the Subcode consists of two 
+letters, then it must be a country code from 
+<bibref ref="ISO3166"/>, "Codes 
+for the representation of names of countries."
+If the first 
+subcode consists of more than two letters, it must be
+a subcode for the language in question registered with IANA,
+unless the <nt def='NT-Langcode'>Langcode</nt> begins with the prefix 
+"<code>x-</code>" or
+"<code>X-</code>". </p>
+<p>It is customary to give the language code in lower case, and
+the country code (if any) in upper case.
+Note that these values, unlike other names in XML documents,
+are case insensitive.</p>
+<p>For example:
+<eg><![CDATA[<p xml:lang="en">The quick brown fox jumps over the lazy dog.</p>
+<p xml:lang="en-GB">What colour is it?</p>
+<p xml:lang="en-US">What color is it?</p>
+<sp who="Faust" desc='leise' xml:lang="de">
+  <l>Habe nun, ach! Philosophie,</l>
+  <l>Juristerei, und Medizin</l>
+  <l>und leider auch Theologie</l>
+  <l>durchaus studiert mit heißem Bemüh'n.</l>
+  </sp>]]></eg></p>
+<!--<p>The xml:lang value is considered to apply both to the contents of an
+element and 
+(unless otherwise via attribute default values) to the
+values of all of its attributes with free-text (CDATA) values.  -->
+<p>The intent declared with <kw>xml:lang</kw> is considered to apply to
+all attributes and content of the element where it is specified,
+unless overridden with an instance of <kw>xml:lang</kw>
+on another element within that content.</p>
+<!--
+If no
+value is specified for xml:lang on an element, and no default value is
+defined for it in the DTD, then the xml:lang attribute of any element
+takes the same value it has in the parent element, if any.  The two
+technical terms in the following example both have the same effective
+value for xml:lang:
+
+  <p xml:lang="en">Here the keywords are
+  <term xml:lang="en">shift</term> and
+  <term>reduce</term>. ...</p>
+
+The application, not the XML processor, is responsible for this '
+inheritance' of attribute values.
+-->
+<p>A simple declaration for <kw>xml:lang</kw> might take
+the form
+<eg>xml:lang  NMTOKEN  #IMPLIED</eg>
+but specific default values may also be given, if appropriate.  In a
+collection of French poems for English students, with glosses and
+notes in English, the xml:lang attribute might be declared this way:
+<eg><![CDATA[    <!ATTLIST poem   xml:lang NMTOKEN 'fr'>
+    <!ATTLIST gloss  xml:lang NMTOKEN 'en'>
+    <!ATTLIST note   xml:lang NMTOKEN 'en'>]]></eg>
+</p>
+
+</div2>
+</div1>
+<!-- &Elements; -->
+<div1 id='sec-logical-struct'>
+<head>Logical Structures</head>
+<p><termdef id="dt-element" term="Element">Each <termref
+def="dt-xml-doc">XML document</termref> contains one or more
+<term>elements</term>, the boundaries of which are 
+either delimited by <termref def="dt-stag">start-tags</termref> 
+and <termref def="dt-etag">end-tags</termref>, or, for <termref
+def="dt-empty">empty</termref> elements, by an <termref
+def="dt-eetag">empty-element tag</termref>. Each element has a type,
+identified by name, sometimes called its "generic
+identifier" (GI), and may have a set of
+attribute specifications.</termdef>  Each attribute specification 
+has a <termref
+def="dt-attrname">name</termref> and a <termref
+def="dt-attrval">value</termref>.
+</p>
+<scrap lang='ebnf'><head>Element</head>
+<prod id='NT-element'><lhs>element</lhs>
+<rhs><nt def='NT-EmptyElemTag'>EmptyElemTag</nt></rhs>
+<rhs>| <nt def='NT-STag'>STag</nt> <nt def='NT-content'>content</nt> 
+<nt def='NT-ETag'>ETag</nt></rhs>
+<wfc def='GIMatch'/>
+<vc def='elementvalid'/>
+</prod>
+</scrap>
+<p>This specification does not constrain the semantics, use, or (beyond
+syntax) names of the element types and attributes, except that names
+beginning with a match to <code>(('X'|'x')('M'|'m')('L'|'l'))</code>
+are reserved for standardization in this or future versions of this
+specification.
+</p>
+<wfcnote id='GIMatch'>
+<head>Element Type Match</head>
+<p>
+The <nt def='NT-Name'>Name</nt> in an element's end-tag must match 
+the element type in
+the start-tag.
+</p>
+</wfcnote>
+<vcnote id='elementvalid'>
+<head>Element Valid</head>
+<p>An element is
+valid if
+there is a declaration matching 
+<nt def='NT-elementdecl'>elementdecl</nt> where the
+<nt def='NT-Name'>Name</nt> matches the element type, and
+one of the following holds:</p>
+<olist>
+<item><p>The declaration matches <kw>EMPTY</kw> and the element has no 
+<termref def='dt-content'>content</termref>.</p></item>
+<item><p>The declaration matches <nt def='NT-children'>children</nt> and
+the sequence of 
+<termref def="dt-parentchild">child elements</termref>
+belongs to the language generated by the regular expression in
+the content model, with optional white space (characters 
+matching the nonterminal <nt def='NT-S'>S</nt>) between each pair
+of child elements.</p></item>
+<item><p>The declaration matches <nt def='NT-Mixed'>Mixed</nt> and 
+the content consists of <termref def='dt-chardata'>character 
+data</termref> and <termref def='dt-parentchild'>child elements</termref>
+whose types match names in the content model.</p></item>
+<item><p>The declaration matches <kw>ANY</kw>, and the types
+of any <termref def='dt-parentchild'>child elements</termref> have
+been declared.</p></item>
+</olist>
+</vcnote>
+
+<div2 id='sec-starttags'>
+<head>Start-Tags, End-Tags, and Empty-Element Tags</head>
+<p><termdef id="dt-stag" term="Start-Tag">The beginning of every
+non-empty XML element is marked by a <term>start-tag</term>.
+<scrap lang='ebnf'>
+<head>Start-tag</head>
+<prodgroup pcw2="6" pcw4="15" pcw5="11.5">
+<prod id='NT-STag'><lhs>STag</lhs>
+<rhs>'&lt;' <nt def='NT-Name'>Name</nt> 
+(<nt def='NT-S'>S</nt> <nt def='NT-Attribute'>Attribute</nt>)* 
+<nt def='NT-S'>S</nt>? '>'</rhs>
+<wfc def="uniqattspec"/>
+</prod>
+<prod id='NT-Attribute'><lhs>Attribute</lhs>
+<rhs><nt def='NT-Name'>Name</nt> <nt def='NT-Eq'>Eq</nt> 
+<nt def='NT-AttValue'>AttValue</nt></rhs>
+<vc def='ValueType'/>
+<wfc def='NoExternalRefs'/>
+<wfc def='CleanAttrVals'/></prod>
+</prodgroup>
+</scrap>
+The <nt def='NT-Name'>Name</nt> in
+the start- and end-tags gives the 
+element's <term>type</term>.</termdef>
+<termdef id="dt-attr" term="Attribute">
+The <nt def='NT-Name'>Name</nt>-<nt def='NT-AttValue'>AttValue</nt> pairs are
+referred to as 
+the <term>attribute specifications</term> of the element</termdef>,
+<termdef id="dt-attrname" term="Attribute Name">with the 
+<nt def='NT-Name'>Name</nt> in each pair
+referred to as the <term>attribute name</term></termdef> and
+<termdef id="dt-attrval" term="Attribute Value">the content of the
+<nt def='NT-AttValue'>AttValue</nt> (the text between the
+<code>'</code> or <code>"</code> delimiters)
+as the <term>attribute value</term>.</termdef>
+</p>
+<wfcnote id='uniqattspec'>
+<head>Unique Att Spec</head>
+<p>
+No attribute name may appear more than once in the same start-tag
+or empty-element tag.
+</p>
+</wfcnote>
+<vcnote id='ValueType'>
+<head>Attribute Value Type</head>
+<p>
+The attribute must have been declared; the value must be of the type 
+declared for it.
+(For attribute types, see <specref ref='attdecls'/>.)
+</p>
+</vcnote>
+<wfcnote id='NoExternalRefs'>
+<head>No External Entity References</head>
+<p>
+Attribute values cannot contain direct or indirect entity references 
+to external entities.
+</p>
+</wfcnote>
+<wfcnote id='CleanAttrVals'>
+<head>No <code>&lt;</code> in Attribute Values</head>
+<p>The <termref def='dt-repltext'>replacement text</termref> of any entity
+referred to directly or indirectly in an attribute
+value (other than "<code>&amp;lt;</code>") must not contain
+a <code>&lt;</code>.
+</p></wfcnote>
+<p>An example of a start-tag:
+<eg>&lt;termdef id="dt-dog" term="dog"></eg></p>
+<p><termdef id="dt-etag" term="End Tag">The end of every element 
+that begins with a start-tag must
+be marked by an <term>end-tag</term>
+containing a name that echoes the element's type as given in the
+start-tag:
+<scrap lang='ebnf'>
+<head>End-tag</head>
+<prodgroup pcw2="6" pcw4="15" pcw5="11.5">
+<prod id='NT-ETag'><lhs>ETag</lhs>
+<rhs>'&lt;/' <nt def='NT-Name'>Name</nt> 
+<nt def='NT-S'>S</nt>? '>'</rhs></prod>
+</prodgroup>
+</scrap>
+</termdef></p>
+<p>An example of an end-tag:<eg>&lt;/termdef></eg></p>
+<p><termdef id="dt-content" term="Content">The 
+<termref def='dt-text'>text</termref> between the start-tag and
+end-tag is called the element's
+<term>content</term>:
+<scrap lang='ebnf'>
+<head>Content of Elements</head>
+<prodgroup pcw2="6" pcw4="15" pcw5="11.5">
+<prod id='NT-content'><lhs>content</lhs>
+<rhs>(<nt def='NT-element'>element</nt> | <nt def='NT-CharData'>CharData</nt> 
+| <nt def='NT-Reference'>Reference</nt> | <nt def='NT-CDSect'>CDSect</nt> 
+| <nt def='NT-PI'>PI</nt> | <nt def='NT-Comment'>Comment</nt>)*</rhs>
+</prod>
+</prodgroup>
+</scrap>
+</termdef></p>
+<p><termdef id="dt-empty" term="Empty">If an element is <term>empty</term>,
+it must be represented either by a start-tag immediately followed
+by an end-tag or by an empty-element tag.</termdef>
+<termdef id="dt-eetag" term="empty-element tag">An 
+<term>empty-element tag</term> takes a special form:
+<scrap lang='ebnf'>
+<head>Tags for Empty Elements</head>
+<prodgroup pcw2="6" pcw4="15" pcw5="11.5">
+<prod id='NT-EmptyElemTag'><lhs>EmptyElemTag</lhs>
+<rhs>'&lt;' <nt def='NT-Name'>Name</nt> (<nt def='NT-S'>S</nt> 
+<nt def='NT-Attribute'>Attribute</nt>)* <nt def='NT-S'>S</nt>? 
+'/&gt;'</rhs>
+<wfc def="uniqattspec"/>
+</prod>
+</prodgroup>
+</scrap>
+</termdef></p>
+<p>Empty-element tags may be used for any element which has no
+content, whether or not it is declared using the keyword
+<kw>EMPTY</kw>.
+<termref def='dt-interop'>For interoperability</termref>, the empty-element
+tag must be used, and can only be used, for elements which are
+<termref def='dt-eldecl'>declared</termref> <kw>EMPTY</kw>.</p>
+<p>Examples of empty elements:
+<eg>&lt;IMG align="left"
+ src="http://www.w3.org/Icons/WWW/w3c_home" />
+&lt;br>&lt;/br>
+&lt;br/></eg></p>
+</div2>
+<div2 id='elemdecls'>
+<head>Element Type Declarations</head>
+<p>The <termref def="dt-element">element</termref> structure of an
+<termref def="dt-xml-doc">XML document</termref> may, for 
+<termref def="dt-valid">validation</termref> purposes, 
+be constrained
+using element type and attribute-list declarations.
+An element type declaration constrains the element's
+<termref def="dt-content">content</termref>.
+</p>
+
+<p>Element type declarations often constrain which element types can
+appear as <termref def="dt-parentchild">children</termref> of the element.
+At user option, an XML processor may issue a warning
+when a declaration mentions an element type for which no declaration
+is provided, but this is not an error.</p>
+<p><termdef id="dt-eldecl" term="Element Type declaration">An <term>element
+type declaration</term> takes the form:
+<scrap lang='ebnf'>
+<head>Element Type Declaration</head>
+<prodgroup pcw2="5.5" pcw4="18" pcw5="9">
+<prod id='NT-elementdecl'><lhs>elementdecl</lhs>
+<rhs>'&lt;!ELEMENT' <nt def='NT-S'>S</nt> 
+<nt def='NT-Name'>Name</nt> 
+<nt def='NT-S'>S</nt> 
+<nt def='NT-contentspec'>contentspec</nt>
+<nt def='NT-S'>S</nt>? '>'</rhs>
+<vc def='EDUnique'/></prod>
+<prod id='NT-contentspec'><lhs>contentspec</lhs>
+<rhs>'EMPTY' 
+| 'ANY' 
+| <nt def='NT-Mixed'>Mixed</nt> 
+| <nt def='NT-children'>children</nt>
+</rhs>
+</prod>
+</prodgroup>
+</scrap>
+where the <nt def='NT-Name'>Name</nt> gives the element type 
+being declared.</termdef>
+</p>
+
+<vcnote id='EDUnique'>
+<head>Unique Element Type Declaration</head>
+<p>
+No element type may be declared more than once.
+</p>
+</vcnote>
+
+<p>Examples of element type declarations:
+<eg>&lt;!ELEMENT br EMPTY>
+&lt;!ELEMENT p (#PCDATA|emph)* >
+&lt;!ELEMENT %name.para; %content.para; >
+&lt;!ELEMENT container ANY></eg></p>
+<div3 id='sec-element-content'>
+<head>Element Content</head>
+<p><termdef id='dt-elemcontent' term='Element content'>An element <termref
+def="dt-stag">type</termref> has
+<term>element content</term> when elements of that
+type must contain only <termref def='dt-parentchild'>child</termref> 
+elements (no character data), optionally separated by 
+white space (characters matching the nonterminal 
+<nt def='NT-S'>S</nt>).
+</termdef>
+In this case, the
+constraint includes a content model, a simple grammar governing
+the allowed types of the child
+elements and the order in which they are allowed to appear.  
+The grammar is built on
+content particles (<nt def='NT-cp'>cp</nt>s), which consist of names, 
+choice lists of content particles, or
+sequence lists of content particles:
+<scrap lang='ebnf'>
+<head>Element-content Models</head>
+<prodgroup pcw2="5.5" pcw4="16" pcw5="11">
+<prod id='NT-children'><lhs>children</lhs>
+<rhs>(<nt def='NT-choice'>choice</nt> 
+| <nt def='NT-seq'>seq</nt>) 
+('?' | '*' | '+')?</rhs></prod>
+<prod id='NT-cp'><lhs>cp</lhs>
+<rhs>(<nt def='NT-Name'>Name</nt> 
+| <nt def='NT-choice'>choice</nt> 
+| <nt def='NT-seq'>seq</nt>) 
+('?' | '*' | '+')?</rhs></prod>
+<prod id='NT-choice'><lhs>choice</lhs>
+<rhs>'(' <nt def='NT-S'>S</nt>? cp 
+( <nt def='NT-S'>S</nt>? '|' <nt def='NT-S'>S</nt>? <nt def='NT-cp'>cp</nt> )*
+<nt def='NT-S'>S</nt>? ')'</rhs>
+<vc def='vc-PEinGroup'/></prod>
+<prod id='NT-seq'><lhs>seq</lhs>
+<rhs>'(' <nt def='NT-S'>S</nt>? cp 
+( <nt def='NT-S'>S</nt>? ',' <nt def='NT-S'>S</nt>? <nt def='NT-cp'>cp</nt> )*
+<nt def='NT-S'>S</nt>? ')'</rhs>
+<vc def='vc-PEinGroup'/></prod>
+
+</prodgroup>
+</scrap>
+where each <nt def='NT-Name'>Name</nt> is the type of an element which may
+appear as a <termref def="dt-parentchild">child</termref>.  
+Any content
+particle in a choice list may appear in the <termref
+def="dt-elemcontent">element content</termref> at the location where
+the choice list appears in the grammar;
+content particles occurring in a sequence list must each
+appear in the <termref def="dt-elemcontent">element content</termref> in the
+order given in the list.  
+The optional character following a name or list governs
+whether the element or the content particles in the list may occur one
+or more (<code>+</code>), zero or more (<code>*</code>), or zero or 
+one times (<code>?</code>).  
+The absence of such an operator means that the element or content particle
+must appear exactly once.
+This syntax
+and meaning are identical to those used in the productions in this
+specification.</p>
+<p>
+The content of an element matches a content model if and only if it is
+possible to trace out a path through the content model, obeying the
+sequence, choice, and repetition operators and matching each element in
+the content against an element type in the content model.  <termref
+def='dt-compat'>For compatibility</termref>, it is an error
+if an element in the document can
+match more than one occurrence of an element type in the content model.
+For more information, see <specref ref="determinism"/>.
+<!-- appendix <specref ref="determinism"/>. -->
+<!-- appendix on deterministic content models. -->
+</p>
+<vcnote id='vc-PEinGroup'>
+<head>Proper Group/PE Nesting</head>
+<p>Parameter-entity 
+<termref def='dt-repltext'>replacement text</termref> must be properly nested
+with parenthetized groups.
+That is to say, if either of the opening or closing parentheses
+in a <nt def='NT-choice'>choice</nt>, <nt def='NT-seq'>seq</nt>, or
+<nt def='NT-Mixed'>Mixed</nt> construct 
+is contained in the replacement text for a 
+<termref def='dt-PERef'>parameter entity</termref>,
+both must be contained in the same replacement text.</p>
+<p><termref def='dt-interop'>For interoperability</termref>, 
+if a parameter-entity reference appears in a 
+<nt def='NT-choice'>choice</nt>, <nt def='NT-seq'>seq</nt>, or
+<nt def='NT-Mixed'>Mixed</nt> construct, its replacement text
+should not be empty, and 
+neither the first nor last non-blank
+character of the replacement text should be a connector 
+(<code>|</code> or <code>,</code>).
+</p>
+</vcnote>
+<p>Examples of element-content models:
+<eg>&lt;!ELEMENT spec (front, body, back?)>
+&lt;!ELEMENT div1 (head, (p | list | note)*, div2*)>
+&lt;!ELEMENT dictionary-body (%div.mix; | %dict.mix;)*></eg></p>
+</div3>
+
+<div3 id='sec-mixed-content'>
+<head>Mixed Content</head>
+<p><termdef id='dt-mixed' term='Mixed Content'>An element 
+<termref def='dt-stag'>type</termref> has 
+<term>mixed content</term> when elements of that type may contain
+character data, optionally interspersed with
+<termref def="dt-parentchild">child</termref> elements.</termdef>
+In this case, the types of the child elements
+may be constrained, but not their order or their number of occurrences:
+<scrap lang='ebnf'>
+<head>Mixed-content Declaration</head>
+<prodgroup pcw2="5.5" pcw4="16" pcw5="11">
+<prod id='NT-Mixed'><lhs>Mixed</lhs>
+<rhs>'(' <nt def='NT-S'>S</nt>? 
+'#PCDATA'
+(<nt def='NT-S'>S</nt>? 
+'|' 
+<nt def='NT-S'>S</nt>? 
+<nt def='NT-Name'>Name</nt>)* 
+<nt def='NT-S'>S</nt>? 
+')*' </rhs>
+<rhs>| '(' <nt def='NT-S'>S</nt>? '#PCDATA' <nt def='NT-S'>S</nt>? ')'
+</rhs><vc def='vc-PEinGroup'/>
+<vc def='vc-MixedChildrenUnique'/>
+</prod>
+
+</prodgroup>
+</scrap>
+where the <nt def='NT-Name'>Name</nt>s give the types of elements
+that may appear as children.
+</p>
+<vcnote id='vc-MixedChildrenUnique'>
+<head>No Duplicate Types</head>
+<p>The same name must not appear more than once in a single mixed-content
+declaration.
+</p></vcnote>
+<p>Examples of mixed content declarations:
+<eg>&lt;!ELEMENT p (#PCDATA|a|ul|b|i|em)*>
+&lt;!ELEMENT p (#PCDATA | %font; | %phrase; | %special; | %form;)* >
+&lt;!ELEMENT b (#PCDATA)></eg></p>
+</div3>
+</div2>
+<div2 id='attdecls'>
+<head>Attribute-List Declarations</head>
+<p><termref def="dt-attr">Attributes</termref> are used to associate
+name-value pairs with <termref def="dt-element">elements</termref>.
+Attribute specifications may appear only within <termref
+def="dt-stag">start-tags</termref>
+and <termref def="dt-eetag">empty-element tags</termref>; 
+thus, the productions used to
+recognize them appear in <specref ref='sec-starttags'/>.  
+Attribute-list
+declarations may be used:
+<ulist>
+<item><p>To define the set of attributes pertaining to a given
+element type.</p></item>
+<item><p>To establish type constraints for these
+attributes.</p></item>
+<item><p>To provide <termref def="dt-default">default values</termref>
+for attributes.</p></item>
+</ulist>
+</p>
+<p><termdef id="dt-attdecl" term="Attribute-List Declaration">
+<term>Attribute-list declarations</term> specify the name, data type, and default
+value (if any) of each attribute associated with a given element type:
+<scrap lang='ebnf'>
+<head>Attribute-list Declaration</head>
+<prod id='NT-AttlistDecl'><lhs>AttlistDecl</lhs>
+<rhs>'&lt;!ATTLIST' <nt def='NT-S'>S</nt> 
+<nt def='NT-Name'>Name</nt> 
+<nt def='NT-AttDef'>AttDef</nt>*
+<nt def='NT-S'>S</nt>? '&gt;'</rhs>
+</prod>
+<prod id='NT-AttDef'><lhs>AttDef</lhs>
+<rhs><nt def='NT-S'>S</nt> <nt def='NT-Name'>Name</nt> 
+<nt def='NT-S'>S</nt> <nt def='NT-AttType'>AttType</nt> 
+<nt def='NT-S'>S</nt> <nt def='NT-DefaultDecl'>DefaultDecl</nt></rhs>
+</prod>
+</scrap>
+The <nt def="NT-Name">Name</nt> in the
+<nt def='NT-AttlistDecl'>AttlistDecl</nt> rule is the type of an element.  At
+user option, an XML processor may issue a warning if attributes are
+declared for an element type not itself declared, but this is not an
+error.  The <nt def='NT-Name'>Name</nt> in the 
+<nt def='NT-AttDef'>AttDef</nt> rule is
+the name of the attribute.</termdef></p>
+<p>
+When more than one <nt def='NT-AttlistDecl'>AttlistDecl</nt> is provided for a
+given element type, the contents of all those provided are merged.  When
+more than one definition is provided for the same attribute of a
+given element type, the first declaration is binding and later
+declarations are ignored.  
+<termref def='dt-interop'>For interoperability,</termref> writers of DTDs
+may choose to provide at most one attribute-list declaration
+for a given element type, at most one attribute definition
+for a given attribute name, and at least one attribute definition
+in each attribute-list declaration.
+For interoperability, an XML processor may at user option
+issue a warning when more than one attribute-list declaration is
+provided for a given element type, or more than one attribute definition
+is provided 
+for a given attribute, but this is not an error.
+</p>
+
+<div3 id='sec-attribute-types'>
+<head>Attribute Types</head>
+<p>XML attribute types are of three kinds:  a string type, a
+set of tokenized types, and enumerated types.  The string type may take
+any literal string as a value; the tokenized types have varying lexical
+and semantic constraints, as noted:
+<scrap lang='ebnf'>
+<head>Attribute Types</head>
+<prodgroup pcw4="14" pcw5="11.5">
+<prod id='NT-AttType'><lhs>AttType</lhs>
+<rhs><nt def='NT-StringType'>StringType</nt> 
+| <nt def='NT-TokenizedType'>TokenizedType</nt> 
+| <nt def='NT-EnumeratedType'>EnumeratedType</nt>
+</rhs>
+</prod>
+<prod id='NT-StringType'><lhs>StringType</lhs>
+<rhs>'CDATA'</rhs>
+</prod>
+<prod id='NT-TokenizedType'><lhs>TokenizedType</lhs>
+<rhs>'ID'</rhs>
+<vc def='id'/>
+<vc def='one-id-per-el'/>
+<vc def='id-default'/>
+<rhs>| 'IDREF'</rhs>
+<vc def='idref'/>
+<rhs>| 'IDREFS'</rhs>
+<vc def='idref'/>
+<rhs>| 'ENTITY'</rhs>
+<vc def='entname'/>
+<rhs>| 'ENTITIES'</rhs>
+<vc def='entname'/>
+<rhs>| 'NMTOKEN'</rhs>
+<vc def='nmtok'/>
+<rhs>| 'NMTOKENS'</rhs>
+<vc def='nmtok'/></prod>
+</prodgroup>
+</scrap>
+</p>
+<vcnote id='id' >
+<head>ID</head>
+<p>
+Values of type <kw>ID</kw> must match the 
+<nt def='NT-Name'>Name</nt> production.  
+A name must not appear more than once in
+an XML document as a value of this type; i.e., ID values must uniquely
+identify the elements which bear them.   
+</p>
+</vcnote>
+<vcnote id='one-id-per-el'>
+<head>One ID per Element Type</head>
+<p>No element type may have more than one ID attribute specified.</p>
+</vcnote>
+<vcnote id='id-default'>
+<head>ID Attribute Default</head>
+<p>An ID attribute must have a declared default of <kw>#IMPLIED</kw> or
+<kw>#REQUIRED</kw>.</p>
+</vcnote>
+<vcnote id='idref'>
+<head>IDREF</head>
+<p>
+Values of type <kw>IDREF</kw> must match
+the <nt def="NT-Name">Name</nt> production, and
+values of type <kw>IDREFS</kw> must match
+<nt def="NT-Names">Names</nt>; 
+each <nt def='NT-Name'>Name</nt> must match the value of an ID attribute on 
+some element in the XML document; i.e. <kw>IDREF</kw> values must 
+match the value of some ID attribute. 
+</p>
+</vcnote>
+<vcnote id='entname'>
+<head>Entity Name</head>
+<p>
+Values of type <kw>ENTITY</kw> 
+must match the <nt def="NT-Name">Name</nt> production,
+values of type <kw>ENTITIES</kw> must match
+<nt def="NT-Names">Names</nt>;
+each <nt def="NT-Name">Name</nt> must 
+match the
+name of an <termref def="dt-unparsed">unparsed entity</termref> declared in the
+<termref def="dt-doctype">DTD</termref>.
+</p>
+</vcnote>
+<vcnote id='nmtok'>
+<head>Name Token</head>
+<p>
+Values of type <kw>NMTOKEN</kw> must match the
+<nt def="NT-Nmtoken">Nmtoken</nt> production;
+values of type <kw>NMTOKENS</kw> must 
+match <termref def="NT-Nmtokens">Nmtokens</termref>.
+</p>
+</vcnote>
+<!-- why?
+<p>The XML processor must normalize attribute values before
+passing them to the application, as described in 
+<specref ref="AVNormalize"/>.</p>-->
+<p><termdef id='dt-enumerated' term='Enumerated Attribute
+Values'><term>Enumerated attributes</term> can take one 
+of a list of values provided in the declaration</termdef>. There are two
+kinds of enumerated types:
+<scrap lang='ebnf'>
+<head>Enumerated Attribute Types</head>
+<prod id='NT-EnumeratedType'><lhs>EnumeratedType</lhs> 
+<rhs><nt def='NT-NotationType'>NotationType</nt> 
+| <nt def='NT-Enumeration'>Enumeration</nt>
+</rhs></prod>
+<prod id='NT-NotationType'><lhs>NotationType</lhs> 
+<rhs>'NOTATION' 
+<nt def='NT-S'>S</nt> 
+'(' 
+<nt def='NT-S'>S</nt>?  
+<nt def='NT-Name'>Name</nt> 
+(<nt def='NT-S'>S</nt>? '|' <nt def='NT-S'>S</nt>?  
+<nt def='NT-Name'>Name</nt>)*
+<nt def='NT-S'>S</nt>? ')'
+</rhs>
+<vc def='notatn' /></prod>
+<prod id='NT-Enumeration'><lhs>Enumeration</lhs> 
+<rhs>'(' <nt def='NT-S'>S</nt>?
+<nt def='NT-Nmtoken'>Nmtoken</nt> 
+(<nt def='NT-S'>S</nt>? '|' 
+<nt def='NT-S'>S</nt>?  
+<nt def='NT-Nmtoken'>Nmtoken</nt>)* 
+<nt def='NT-S'>S</nt>? 
+')'</rhs> 
+<vc def='enum'/></prod>
+</scrap>
+A <kw>NOTATION</kw> attribute identifies a 
+<termref def='dt-notation'>notation</termref>, declared in the 
+DTD with associated system and/or public identifiers, to
+be used in interpreting the element to which the attribute
+is attached.
+</p>
+
+<vcnote id='notatn'>
+<head>Notation Attributes</head>
+<p>
+Values of this type must match
+one of the <titleref href='Notations'>notation</titleref> names included in
+the declaration; all notation names in the declaration must
+be declared.
+</p>
+</vcnote>
+<vcnote id='enum'>
+<head>Enumeration</head>
+<p>
+Values of this type
+must match one of the <nt def='NT-Nmtoken'>Nmtoken</nt> tokens in the
+declaration. 
+</p>
+</vcnote>
+<p><termref def='dt-interop'>For interoperability,</termref> the same
+<nt def='NT-Nmtoken'>Nmtoken</nt> should not occur more than once in the
+enumerated attribute types of a single element type.
+</p>
+</div3>
+
+<div3 id='sec-attr-defaults'>
+<head>Attribute Defaults</head>
+<p>An <termref def="dt-attdecl">attribute declaration</termref> provides
+information on whether
+the attribute's presence is required, and if not, how an XML processor should
+react if a declared attribute is absent in a document.
+<scrap lang='ebnf'>
+<head>Attribute Defaults</head>
+<prodgroup pcw4="14" pcw5="11.5">
+<prod id='NT-DefaultDecl'><lhs>DefaultDecl</lhs>
+<rhs>'#REQUIRED' 
+|&nbsp;'#IMPLIED' </rhs>
+<rhs>| (('#FIXED' S)? <nt def='NT-AttValue'>AttValue</nt>)</rhs>
+<vc def='RequiredAttr'/>
+<vc def='defattrvalid'/>
+<wfc def="CleanAttrVals"/>
+<vc def='FixedAttr'/>
+</prod>
+</prodgroup>
+</scrap>
+
+</p>
+<p>In an attribute declaration, <kw>#REQUIRED</kw> means that the
+attribute must always be provided, <kw>#IMPLIED</kw> that no default 
+value is provided.
+<!-- not any more!!
+<kw>#IMPLIED</kw> means that if the attribute is omitted
+from an element of this type,
+the XML processor must inform the application
+that no value was specified; no constraint is placed on the behavior
+of the application. -->
+<termdef id="dt-default" term="Attribute Default">If the 
+declaration
+is neither <kw>#REQUIRED</kw> nor <kw>#IMPLIED</kw>, then the
+<nt def='NT-AttValue'>AttValue</nt> value contains the declared
+<term>default</term> value; the <kw>#FIXED</kw> keyword states that
+the attribute must always have the default value.
+If a default value
+is declared, when an XML processor encounters an omitted attribute, it
+is to behave as though the attribute were present with 
+the declared default value.</termdef></p>
+<vcnote id='RequiredAttr'>
+<head>Required Attribute</head>
+<p>If the default declaration is the keyword <kw>#REQUIRED</kw>, then
+the attribute must be specified for
+all elements of the type in the attribute-list declaration.
+</p></vcnote>
+<vcnote id='defattrvalid'>
+<head>Attribute Default Legal</head>
+<p>
+The declared
+default value must meet the lexical constraints of the declared attribute type.
+</p>
+</vcnote>
+<vcnote id='FixedAttr'>
+<head>Fixed Attribute Default</head>
+<p>If an attribute has a default value declared with the 
+<kw>#FIXED</kw> keyword, instances of that attribute must
+match the default value.
+</p></vcnote>
+
+<p>Examples of attribute-list declarations:
+<eg>&lt;!ATTLIST termdef
+          id      ID      #REQUIRED
+          name    CDATA   #IMPLIED>
+&lt;!ATTLIST list
+          type    (bullets|ordered|glossary)  "ordered">
+&lt;!ATTLIST form
+          method  CDATA   #FIXED "POST"></eg></p>
+</div3>
+<div3 id='AVNormalize'>
+<head>Attribute-Value Normalization</head>
+<p>Before the value of an attribute is passed to the application
+or checked for validity, the
+XML processor must normalize it as follows:
+<ulist>
+<item><p>a character reference is processed by appending the referenced    
+character to the attribute value</p></item>
+<item><p>an entity reference is processed by recursively processing the
+replacement text of the entity</p></item>
+<item><p>a whitespace character (#x20, #xD, #xA, #x9) is processed by
+appending #x20 to the normalized value, except that only a single #x20
+is appended for a "#xD#xA" sequence that is part of an external
+parsed entity or the literal entity value of an internal parsed
+entity</p></item>
+<item><p>other characters are processed by appending them to the normalized
+value</p>
+</item></ulist>
+</p>
+<p>If the declared value is not CDATA, then the XML processor must
+further process the normalized attribute value by discarding any
+leading and trailing space (#x20) characters, and by replacing
+sequences of space (#x20) characters by a single space (#x20)
+character.</p>
+<p>
+All attributes for which no declaration has been read should be treated
+by a non-validating parser as if declared
+<kw>CDATA</kw>.
+</p>
+</div3>
+</div2>
+<div2 id='sec-condition-sect'>
+<head>Conditional Sections</head>
+<p><termdef id='dt-cond-section' term='conditional section'>
+<term>Conditional sections</term> are portions of the
+<termref def='dt-doctype'>document type declaration external subset</termref>
+which are 
+included in, or excluded from, the logical structure of the DTD based on
+the keyword which governs them.</termdef>
+<scrap lang='ebnf'>
+<head>Conditional Section</head>
+<prodgroup pcw2="9" pcw4="14.5">
+<prod id='NT-conditionalSect'><lhs>conditionalSect</lhs>
+<rhs><nt def='NT-includeSect'>includeSect</nt>
+| <nt def='NT-ignoreSect'>ignoreSect</nt>
+</rhs>
+</prod>
+<prod id='NT-includeSect'><lhs>includeSect</lhs>
+<rhs>'&lt;![' S? 'INCLUDE' S? '[' 
+
+<nt def="NT-extSubsetDecl">extSubsetDecl</nt>
+']]&gt;'
+</rhs>
+</prod>
+<prod id='NT-ignoreSect'><lhs>ignoreSect</lhs>
+<rhs>'&lt;![' S? 'IGNORE' S? '[' 
+<nt def="NT-ignoreSectContents">ignoreSectContents</nt>*
+']]&gt;'</rhs>
+</prod>
+
+<prod id='NT-ignoreSectContents'><lhs>ignoreSectContents</lhs>
+<rhs><nt def='NT-Ignore'>Ignore</nt>
+('&lt;![' <nt def='NT-ignoreSectContents'>ignoreSectContents</nt> ']]&gt;' 
+<nt def='NT-Ignore'>Ignore</nt>)*</rhs></prod>
+<prod id='NT-Ignore'><lhs>Ignore</lhs>
+<rhs><nt def='NT-Char'>Char</nt>* - 
+(<nt def='NT-Char'>Char</nt>* ('&lt;![' | ']]&gt;') 
+<nt def='NT-Char'>Char</nt>*)
+</rhs></prod>
+
+</prodgroup>
+</scrap>
+</p>
+<p>Like the internal and external DTD subsets, a conditional section
+may contain one or more complete declarations,
+comments, processing instructions, 
+or nested conditional sections, intermingled with white space.
+</p>
+<p>If the keyword of the
+conditional section is <kw>INCLUDE</kw>, then the contents of the conditional
+section are part of the DTD.
+If the keyword of the conditional
+section is <kw>IGNORE</kw>, then the contents of the conditional section are
+not logically part of the DTD.
+Note that for reliable parsing, the contents of even ignored
+conditional sections must be read in order to
+detect nested conditional sections and ensure that the end of the
+outermost (ignored) conditional section is properly detected.
+If a conditional section with a
+keyword of <kw>INCLUDE</kw> occurs within a larger conditional
+section with a keyword of <kw>IGNORE</kw>, both the outer and the
+inner conditional sections are ignored.</p>
+<p>If the keyword of the conditional section is a 
+parameter-entity reference, the parameter entity must be replaced by its
+content before the processor decides whether to
+include or ignore the conditional section.</p>
+<p>An example:
+<eg>&lt;!ENTITY % draft 'INCLUDE' >
+&lt;!ENTITY % final 'IGNORE' >
+&lt;![%draft;[
+&lt;!ELEMENT book (comments*, title, body, supplements?)>
+]]&gt;
+&lt;![%final;[
+&lt;!ELEMENT book (title, body, supplements?)>
+]]&gt;
+</eg>
+</p>
+</div2>
+
+
+<!-- 
+<div2 id='sec-pass-to-app'>
+<head>XML Processor Treatment of Logical Structure</head>
+<p>When an XML processor encounters a start-tag, it must make
+at least the following information available to the application:
+<ulist>
+<item>
+<p>the element type's generic identifier</p>
+</item>
+<item>
+<p>the names of attributes known to apply to this element type
+(validating processors must make available names of all attributes
+declared for the element type; non-validating processors must
+make available at least the names of the attributes for which
+values are specified.
+</p>
+</item>
+</ulist>
+</p>
+</div2>
+--> 
+
+</div1>
+<!-- &Entities; -->
+<div1 id='sec-physical-struct'>
+<head>Physical Structures</head>
+<p><termdef id="dt-entity" term="Entity">An XML document may consist
+of one or many storage units.   These are called
+<term>entities</term>; they all have <term>content</term> and are all
+(except for the document entity, see below, and 
+the <termref def='dt-doctype'>external DTD subset</termref>) 
+identified by <term>name</term>.
+</termdef>
+Each XML document has one entity
+called the <termref def="dt-docent">document entity</termref>, which serves
+as the starting point for the <termref def="dt-xml-proc">XML
+processor</termref> and may contain the whole document.</p>
+<p>Entities may be either parsed or unparsed.
+<termdef id="dt-parsedent" term="Text Entity">A <term>parsed entity's</term>
+contents are referred to as its 
+<termref def='dt-repltext'>replacement text</termref>;
+this <termref def="dt-text">text</termref> is considered an
+integral part of the document.</termdef></p>
+
+<p><termdef id="dt-unparsed" term="Unparsed Entity">An 
+<term>unparsed entity</term> 
+is a resource whose contents may or may not be
+<termref def='dt-text'>text</termref>, and if text, may not be XML.
+Each unparsed entity
+has an associated <termref
+def="dt-notation">notation</termref>, identified by name.
+Beyond a requirement
+that an XML processor make the identifiers for the entity and 
+notation available to the application,
+XML places no constraints on the contents of unparsed entities.</termdef> 
+</p>
+<p>
+Parsed entities are invoked by name using entity references;
+unparsed entities by name, given in the value of <kw>ENTITY</kw>
+or <kw>ENTITIES</kw>
+attributes.</p>
+<p><termdef id='gen-entity' term='general entity'
+><term>General entities</term>
+are entities for use within the document content.
+In this specification, general entities are sometimes referred 
+to with the unqualified term <emph>entity</emph> when this leads
+to no ambiguity.</termdef> 
+<termdef id='dt-PE' term='Parameter entity'>Parameter entities 
+are parsed entities for use within the DTD.</termdef>
+These two types of entities use different forms of reference and
+are recognized in different contexts.
+Furthermore, they occupy different namespaces; a parameter entity and
+a general entity with the same name are two distinct entities.
+</p>
+
+<div2 id='sec-references'>
+<head>Character and Entity References</head>
+<p><termdef id="dt-charref" term="Character Reference">
+A <term>character reference</term> refers to a specific character in the
+ISO/IEC 10646 character set, for example one not directly accessible from
+available input devices.
+<scrap lang='ebnf'>
+<head>Character Reference</head>
+<prod id='NT-CharRef'><lhs>CharRef</lhs>
+<rhs>'&amp;#' [0-9]+ ';' </rhs>
+<rhs>| '&hcro;' [0-9a-fA-F]+ ';'</rhs>
+<wfc def="wf-Legalchar"/>
+</prod>
+</scrap>
+<wfcnote id="wf-Legalchar">
+<head>Legal Character</head>
+<p>Characters referred to using character references must
+match the production for
+<termref def="NT-Char">Char</termref>.</p>
+</wfcnote>
+If the character reference begins with "<code>&amp;#x</code>", the digits and
+letters up to the terminating <code>;</code> provide a hexadecimal
+representation of the character's code point in ISO/IEC 10646.
+If it begins just with "<code>&amp;#</code>", the digits up to the terminating
+<code>;</code> provide a decimal representation of the character's 
+code point.
+</termdef>
+</p>
+<p><termdef id="dt-entref" term="Entity Reference">An <term>entity
+reference</term> refers to the content of a named entity.</termdef>
+<termdef id='dt-GERef' term='General Entity Reference'>References to 
+parsed general entities
+use ampersand (<code>&amp;</code>) and semicolon (<code>;</code>) as
+delimiters.</termdef>
+<termdef id='dt-PERef' term='Parameter-entity reference'>
+<term>Parameter-entity references</term> use percent-sign (<code>%</code>) and
+semicolon 
+(<code>;</code>) as delimiters.</termdef>
+</p>
+<scrap lang="ebnf">
+<head>Entity Reference</head>
+<prod id='NT-Reference'><lhs>Reference</lhs>
+<rhs><nt def='NT-EntityRef'>EntityRef</nt> 
+| <nt def='NT-CharRef'>CharRef</nt></rhs></prod>
+<prod id='NT-EntityRef'><lhs>EntityRef</lhs>
+<rhs>'&amp;' <nt def='NT-Name'>Name</nt> ';'</rhs>
+<wfc def='wf-entdeclared'/>
+<vc def='vc-entdeclared'/>
+<wfc def='textent'/>
+<wfc def='norecursion'/>
+</prod>
+<prod id='NT-PEReference'><lhs>PEReference</lhs>
+<rhs>'%' <nt def='NT-Name'>Name</nt> ';'</rhs>
+<vc def='vc-entdeclared'/>
+<wfc def='norecursion'/>
+<wfc def='indtd'/>
+</prod>
+</scrap>
+
+<wfcnote id='wf-entdeclared'>
+<head>Entity Declared</head>
+<p>In a document without any DTD, a document with only an internal
+DTD subset which contains no parameter entity references, or a document with
+"<code>standalone='yes'</code>", 
+the <nt def='NT-Name'>Name</nt> given in the entity reference must 
+<termref def="dt-match">match</termref> that in an 
+<titleref href='sec-entity-decl'>entity declaration</titleref>, except that
+well-formed documents need not declare 
+any of the following entities: &magicents;.  
+The declaration of a parameter entity must precede any reference to it.
+Similarly, the declaration of a general entity must precede any
+reference to it which appears in a default value in an attribute-list
+declaration.</p>
+<p>Note that if entities are declared in the external subset or in 
+external parameter entities, a non-validating processor is 
+<titleref href='include-if-valid'>not obligated to</titleref> read
+and process their declarations; for such documents, the rule that
+an entity must be declared is a well-formedness constraint only
+if <titleref href='sec-rmd'>standalone='yes'</titleref>.</p>
+</wfcnote>
+<vcnote id="vc-entdeclared">
+<head>Entity Declared</head>
+<p>In a document with an external subset or external parameter
+entities with "<code>standalone='no'</code>",
+the <nt def='NT-Name'>Name</nt> given in the entity reference must <termref
+def="dt-match">match</termref> that in an 
+<titleref href='sec-entity-decl'>entity declaration</titleref>.
+For interoperability, valid documents should declare the entities 
+&magicents;, in the form
+specified in <specref ref="sec-predefined-ent"/>.
+The declaration of a parameter entity must precede any reference to it.
+Similarly, the declaration of a general entity must precede any
+reference to it which appears in a default value in an attribute-list
+declaration.</p>
+</vcnote>
+<!-- FINAL EDIT:  is this duplication too clumsy? -->
+<wfcnote id='textent'>
+<head>Parsed Entity</head>
+<p>
+An entity reference must not contain the name of an <termref
+def="dt-unparsed">unparsed entity</termref>. Unparsed entities may be referred
+to only in <termref def="dt-attrval">attribute values</termref> declared to
+be of type <kw>ENTITY</kw> or <kw>ENTITIES</kw>.
+</p>
+</wfcnote>
+<wfcnote id='norecursion'>
+<head>No Recursion</head>
+<p>
+A parsed entity must not contain a recursive reference to itself,
+either directly or indirectly.
+</p>
+</wfcnote>
+<wfcnote id='indtd'>
+<head>In DTD</head>
+<p>
+Parameter-entity references may only appear in the 
+<termref def='dt-doctype'>DTD</termref>.
+</p>
+</wfcnote>
+<p>Examples of character and entity references:
+<eg>Type &lt;key>less-than&lt;/key> (&hcro;3C;) to save options.
+This document was prepared on &amp;docdate; and
+is classified &amp;security-level;.</eg></p>
+<p>Example of a parameter-entity reference:
+<eg><![CDATA[<!-- declare the parameter entity "ISOLat2"... -->
+<!ENTITY % ISOLat2
+         SYSTEM "http://www.xml.com/iso/isolat2-xml.entities" >
+<!-- ... now reference it. -->
+%ISOLat2;]]></eg></p>
+</div2>
+<div2 id='sec-entity-decl'>
+<head>Entity Declarations</head>
+<p><termdef id="dt-entdecl" term="entity declaration">
+Entities are declared thus:
+<scrap lang='ebnf'>
+<head>Entity Declaration</head>
+<prodgroup pcw2="5" pcw4="18.5">
+<prod id='NT-EntityDecl'><lhs>EntityDecl</lhs>
+<rhs><nt def="NT-GEDecl">GEDecl</nt><!--</rhs><com>General entities</com>
+<rhs>--> | <nt def="NT-PEDecl">PEDecl</nt></rhs>
+<!--<com>Parameter entities</com>-->
+</prod>
+<prod id='NT-GEDecl'><lhs>GEDecl</lhs>
+<rhs>'&lt;!ENTITY' <nt def='NT-S'>S</nt> <nt def='NT-Name'>Name</nt> 
+<nt def='NT-S'>S</nt> <nt def='NT-EntityDef'>EntityDef</nt> 
+<nt def='NT-S'>S</nt>? '&gt;'</rhs>
+</prod>
+<prod id='NT-PEDecl'><lhs>PEDecl</lhs>
+<rhs>'&lt;!ENTITY' <nt def='NT-S'>S</nt> '%' <nt def='NT-S'>S</nt> 
+<nt def='NT-Name'>Name</nt> <nt def='NT-S'>S</nt> 
+<nt def='NT-PEDef'>PEDef</nt> <nt def='NT-S'>S</nt>? '&gt;'</rhs>
+<!--<com>Parameter entities</com>-->
+</prod>
+<prod id='NT-EntityDef'><lhs>EntityDef</lhs>
+<rhs><nt def='NT-EntityValue'>EntityValue</nt>
+<!--</rhs>
+<rhs>-->| (<nt def='NT-ExternalID'>ExternalID</nt> 
+<nt def='NT-NDataDecl'>NDataDecl</nt>?)</rhs>
+<!-- <nt def='NT-ExternalDef'>ExternalDef</nt></rhs> -->
+</prod>
+<!-- FINAL EDIT: what happened to WFs here? -->
+<prod id='NT-PEDef'><lhs>PEDef</lhs>
+<rhs><nt def='NT-EntityValue'>EntityValue</nt> 
+| <nt def='NT-ExternalID'>ExternalID</nt></rhs></prod>
+</prodgroup>
+</scrap>
+The <nt def='NT-Name'>Name</nt> identifies the entity in an
+<termref def="dt-entref">entity reference</termref> or, in the case of an
+unparsed entity, in the value of an <kw>ENTITY</kw> or <kw>ENTITIES</kw>
+attribute.
+If the same entity is declared more than once, the first declaration
+encountered is binding; at user option, an XML processor may issue a
+warning if entities are declared multiple times.</termdef>
+</p>
+
+<div3 id='sec-internal-ent'>
+<head>Internal Entities</head>
+<p><termdef id='dt-internent' term="Internal Entity Replacement Text">If 
+the entity definition is an 
+<nt def='NT-EntityValue'>EntityValue</nt>,  
+the defined entity is called an <term>internal entity</term>.  
+There is no separate physical
+storage object, and the content of the entity is given in the
+declaration. </termdef>
+Note that some processing of entity and character references in the
+<termref def='dt-litentval'>literal entity value</termref> may be required to
+produce the correct <termref def='dt-repltext'>replacement 
+text</termref>: see <specref ref='intern-replacement'/>.
+</p>
+<p>An internal entity is a <termref def="dt-parsedent">parsed
+entity</termref>.</p>
+<p>Example of an internal entity declaration:
+<eg>&lt;!ENTITY Pub-Status "This is a pre-release of the
+ specification."></eg></p>
+</div3>
+<div3 id='sec-external-ent'>
+<head>External Entities</head>
+<p><termdef id="dt-extent" term="External Entity">If the entity is not
+internal, it is an <term>external
+entity</term>, declared as follows:
+<scrap lang='ebnf'>
+<head>External Entity Declaration</head>
+<!--
+<prod id='NT-ExternalDef'><lhs>ExternalDef</lhs>
+<rhs></prod> -->
+<prod id='NT-ExternalID'><lhs>ExternalID</lhs>
+<rhs>'SYSTEM' <nt def='NT-S'>S</nt> 
+<nt def='NT-SystemLiteral'>SystemLiteral</nt></rhs>
+<rhs>| 'PUBLIC' <nt def='NT-S'>S</nt> 
+<nt def='NT-PubidLiteral'>PubidLiteral</nt> 
+<nt def='NT-S'>S</nt> 
+<nt def='NT-SystemLiteral'>SystemLiteral</nt>
+</rhs>
+</prod>
+<prod id='NT-NDataDecl'><lhs>NDataDecl</lhs>
+<rhs><nt def='NT-S'>S</nt> 'NDATA' <nt def='NT-S'>S</nt> 
+<nt def='NT-Name'>Name</nt></rhs>
+<vc def='not-declared'/></prod>
+</scrap>
+If the <nt def='NT-NDataDecl'>NDataDecl</nt> is present, this is a
+general <termref def="dt-unparsed">unparsed
+entity</termref>; otherwise it is a parsed entity.</termdef></p>
+<vcnote id='not-declared'>
+<head>Notation Declared</head>
+<p>
+The <nt def='NT-Name'>Name</nt> must match the declared name of a
+<termref def="dt-notation">notation</termref>.
+</p>
+</vcnote>
+<p><termdef id="dt-sysid" term="System Identifier">The
+<nt def='NT-SystemLiteral'>SystemLiteral</nt> 
+is called the entity's <term>system identifier</term>. It is a URI,
+which may be used to retrieve the entity.</termdef>
+Note that the hash mark (<code>#</code>) and fragment identifier 
+frequently used with URIs are not, formally, part of the URI itself; 
+an XML processor may signal an error if a fragment identifier is 
+given as part of a system identifier.
+Unless otherwise provided by information outside the scope of this
+specification (e.g. a special XML element type defined by a particular
+DTD, or a processing instruction defined by a particular application
+specification), relative URIs are relative to the location of the
+resource within which the entity declaration occurs.
+A URI might thus be relative to the 
+<termref def='dt-docent'>document entity</termref>, to the entity
+containing the <termref def='dt-doctype'>external DTD subset</termref>, 
+or to some other <termref def='dt-extent'>external parameter entity</termref>.
+</p>
+<p>An XML processor should handle a non-ASCII character in a URI by
+representing the character in UTF-8 as one or more bytes, and then 
+escaping these bytes with the URI escaping mechanism (i.e., by
+converting each byte to %HH, where HH is the hexadecimal notation of the
+byte value).</p>
+<p><termdef id="dt-pubid" term="Public identifier">
+In addition to a system identifier, an external identifier may
+include a <term>public identifier</term>.</termdef>  
+An XML processor attempting to retrieve the entity's content may use the public
+identifier to try to generate an alternative URI.  If the processor
+is unable to do so, it must use the URI specified in the system
+literal.  Before a match is attempted, all strings
+of white space in the public identifier must be normalized to single space characters (#x20),
+and leading and trailing white space must be removed.</p>
+<p>Examples of external entity declarations:
+<eg>&lt;!ENTITY open-hatch
+         SYSTEM "http://www.textuality.com/boilerplate/OpenHatch.xml">
+&lt;!ENTITY open-hatch
+         PUBLIC "-//Textuality//TEXT Standard open-hatch boilerplate//EN"
+         "http://www.textuality.com/boilerplate/OpenHatch.xml">
+&lt;!ENTITY hatch-pic
+         SYSTEM "../grafix/OpenHatch.gif"
+         NDATA gif ></eg></p>
+</div3>
+</div2>
+
+<div2 id='TextEntities'>
+<head>Parsed Entities</head>
+<div3 id='sec-TextDecl'>
+<head>The Text Declaration</head>
+<p>External parsed entities may each begin with a <term>text
+declaration</term>. 
+<scrap lang='ebnf'>
+<head>Text Declaration</head>
+<prodgroup pcw4="12.5" pcw5="13">
+<prod id='NT-TextDecl'><lhs>TextDecl</lhs>
+<rhs>&xmlpio; 
+<nt def='NT-VersionInfo'>VersionInfo</nt>?
+<nt def='NT-EncodingDecl'>EncodingDecl</nt>
+<nt def='NT-S'>S</nt>? &pic;</rhs>
+</prod>
+</prodgroup>
+</scrap>
+</p>
+<p>The text declaration must be provided literally, not
+by reference to a parsed entity.
+No text declaration may appear at any position other than the beginning of
+an external parsed entity.</p>
+</div3>
+<div3 id='wf-entities'>
+<head>Well-Formed Parsed Entities</head>
+<p>The document entity is well-formed if it matches the production labeled
+<nt def='NT-document'>document</nt>.
+An external general 
+parsed entity is well-formed if it matches the production labeled
+<nt def='NT-extParsedEnt'>extParsedEnt</nt>.
+An external parameter
+entity is well-formed if it matches the production labeled
+<nt def='NT-extPE'>extPE</nt>.
+<scrap lang='ebnf'>
+<head>Well-Formed External Parsed Entity</head>
+<prod id='NT-extParsedEnt'><lhs>extParsedEnt</lhs>
+<rhs><nt def='NT-TextDecl'>TextDecl</nt>? 
+<nt def='NT-content'>content</nt></rhs>
+</prod>
+<prod id='NT-extPE'><lhs>extPE</lhs>
+<rhs><nt def='NT-TextDecl'>TextDecl</nt>? 
+<nt def='NT-extSubsetDecl'>extSubsetDecl</nt></rhs>
+</prod>
+</scrap>
+An internal general parsed entity is well-formed if its replacement text 
+matches the production labeled
+<nt def='NT-content'>content</nt>.
+All internal parameter entities are well-formed by definition.
+</p>
+<p>A consequence of well-formedness in entities is that the logical 
+and physical structures in an XML document are properly nested; no 
+<termref def='dt-stag'>start-tag</termref>,
+<termref def='dt-etag'>end-tag</termref>,
+<termref def="dt-empty">empty-element tag</termref>,
+<termref def='dt-element'>element</termref>, 
+<termref def='dt-comment'>comment</termref>, 
+<termref def='dt-pi'>processing instruction</termref>, 
+<termref def='dt-charref'>character
+reference</termref>, or
+<termref def='dt-entref'>entity reference</termref> 
+can begin in one entity and end in another.</p>
+</div3>
+<div3 id='charencoding'>
+<head>Character Encoding in Entities</head>
+<p>Each external parsed entity in an XML document may use a different
+encoding for its characters. All XML processors must be able to read
+entities in either UTF-8 or UTF-16. 
+
+</p>
+<p>Entities encoded in UTF-16 must
+begin with the Byte Order Mark described by ISO/IEC 10646 Annex E and
+Unicode Appendix B (the ZERO WIDTH NO-BREAK SPACE character, #xFEFF).
+This is an encoding signature, not part of either the markup or the
+character data of the XML document.
+XML processors must be able to use this character to
+differentiate between UTF-8 and UTF-16 encoded documents.</p>
+<p>Although an XML processor is required to read only entities in
+the UTF-8 and UTF-16 encodings, it is recognized that other encodings are
+used around the world, and it may be desired for XML processors
+to read entities that use them.
+Parsed entities which are stored in an encoding other than
+UTF-8 or UTF-16 must begin with a <titleref href='TextDecl'>text
+declaration</titleref> containing an encoding declaration:
+<scrap lang='ebnf'>
+<head>Encoding Declaration</head>
+<prod id='NT-EncodingDecl'><lhs>EncodingDecl</lhs>
+<rhs><nt def="NT-S">S</nt>
+'encoding' <nt def='NT-Eq'>Eq</nt> 
+('"' <nt def='NT-EncName'>EncName</nt> '"' | 
+"'" <nt def='NT-EncName'>EncName</nt> "'" )
+</rhs>
+</prod>
+<prod id='NT-EncName'><lhs>EncName</lhs>
+<rhs>[A-Za-z] ([A-Za-z0-9._] | '-')*</rhs>
+<com>Encoding name contains only Latin characters</com>
+</prod>
+</scrap>
+In the <termref def='dt-docent'>document entity</termref>, the encoding
+declaration is part of the <termref def="dt-xmldecl">XML declaration</termref>.
+The <nt def="NT-EncName">EncName</nt> is the name of the encoding used.
+</p>
+<!-- FINAL EDIT:  check name of IANA and charset names -->
+<p>In an encoding declaration, the values
+"<code>UTF-8</code>",
+"<code>UTF-16</code>",
+"<code>ISO-10646-UCS-2</code>", and
+"<code>ISO-10646-UCS-4</code>" should be 
+used for the various encodings and transformations of Unicode /
+ISO/IEC 10646, the values
+"<code>ISO-8859-1</code>",
+"<code>ISO-8859-2</code>", ...
+"<code>ISO-8859-9</code>" should be used for the parts of ISO 8859, and
+the values
+"<code>ISO-2022-JP</code>",
+"<code>Shift_JIS</code>", and
+"<code>EUC-JP</code>"
+should be used for the various encoded forms of JIS X-0208-1997.  XML
+processors may recognize other encodings; it is recommended that
+character encodings registered (as <emph>charset</emph>s) 
+with the Internet Assigned Numbers
+Authority <bibref ref='IANA'/>, other than those just listed, should be
+referred to
+using their registered names.
+Note that these registered names are defined to be 
+case-insensitive, so processors wishing to match against them 
+should do so in a case-insensitive
+way.</p>
+<p>In the absence of information provided by an external
+transport protocol (e.g. HTTP or MIME), 
+it is an <termref def="dt-error">error</termref> for an entity including
+an encoding declaration to be presented to the XML processor 
+in an encoding other than that named in the declaration, 
+for an encoding declaration to occur other than at the beginning 
+of an external entity, or for
+an entity which begins with neither a Byte Order Mark nor an encoding
+declaration to use an encoding other than UTF-8.
+Note that since ASCII
+is a subset of UTF-8, ordinary ASCII entities do not strictly need
+an encoding declaration.</p>
+
+<p>It is a <termref def='dt-fatal'>fatal error</termref> when an XML processor
+encounters an entity with an encoding that it is unable to process.</p>
+<p>Examples of encoding declarations:
+<eg>&lt;?xml encoding='UTF-8'?>
+&lt;?xml encoding='EUC-JP'?></eg></p>
+</div3>
+</div2>
+<div2 id='entproc'>
+<head>XML Processor Treatment of Entities and References</head>
+<p>The table below summarizes the contexts in which character references,
+entity references, and invocations of unparsed entities might appear and the
+required behavior of an <termref def='dt-xml-proc'>XML processor</termref> in
+each case.  
+The labels in the leftmost column describe the recognition context:
+<glist>
+<gitem><label>Reference in Content</label>
+<def><p>as a reference
+anywhere after the <termref def='dt-stag'>start-tag</termref> and
+before the <termref def='dt-etag'>end-tag</termref> of an element; corresponds
+to the nonterminal <nt def='NT-content'>content</nt>.</p></def>
+</gitem>
+<gitem>
+<label>Reference in Attribute Value</label>
+<def><p>as a reference within either the value of an attribute in a 
+<termref def='dt-stag'>start-tag</termref>, or a default
+value in an <termref def='dt-attdecl'>attribute declaration</termref>;
+corresponds to the nonterminal
+<nt def='NT-AttValue'>AttValue</nt>.</p></def></gitem>
+<gitem>
+<label>Occurs as Attribute Value</label>
+<def><p>as a <nt def='NT-Name'>Name</nt>, not a reference, appearing either as
+the value of an 
+attribute which has been declared as type <kw>ENTITY</kw>, or as one of
+the space-separated tokens in the value of an attribute which has been
+declared as type <kw>ENTITIES</kw>.</p>
+</def></gitem>
+<gitem><label>Reference in Entity Value</label>
+<def><p>as a reference
+within a parameter or internal entity's 
+<termref def='dt-litentval'>literal entity value</termref> in
+the entity's declaration; corresponds to the nonterminal 
+<nt def='NT-EntityValue'>EntityValue</nt>.</p></def></gitem>
+<gitem><label>Reference in DTD</label>
+<def><p>as a reference within either the internal or external subsets of the 
+<termref def='dt-doctype'>DTD</termref>, but outside
+of an <nt def='NT-EntityValue'>EntityValue</nt> or
+<nt def="NT-AttValue">AttValue</nt>.</p></def>
+</gitem>
+</glist></p>
+<htable border='1' cellpadding='7' align='center'>
+<htbody>
+<tr><td bgcolor='&cellback;' rowspan='2' colspan='1'></td>
+<td bgcolor='&cellback;' align='center' valign='bottom' colspan='4'>Entity Type</td>
+<td bgcolor='&cellback;' rowspan='2' align='center'>Character</td>
+</tr>
+<tr align='center' valign='bottom'>
+<td bgcolor='&cellback;'>Parameter</td>
+<td bgcolor='&cellback;'>Internal
+General</td>
+<td bgcolor='&cellback;'>External Parsed
+General</td>
+<td bgcolor='&cellback;'>Unparsed</td>
+</tr>
+<tr align='center' valign='middle'>
+
+<td bgcolor='&cellback;' align='right'>Reference
+in Content</td>
+<td bgcolor='&cellback;'><titleref href='not-recognized'>Not recognized</titleref></td>
+<td bgcolor='&cellback;'><titleref href='included'>Included</titleref></td>
+<td bgcolor='&cellback;'><titleref href='include-if-valid'>Included if validating</titleref></td>
+<td bgcolor='&cellback;'><titleref href='forbidden'>Forbidden</titleref></td>
+<td bgcolor='&cellback;'><titleref href='included'>Included</titleref></td>
+</tr>
+<tr align='center' valign='middle'>
+<td bgcolor='&cellback;' align='right'>Reference
+in Attribute Value</td>
+<td bgcolor='&cellback;'><titleref href='not-recognized'>Not recognized</titleref></td>
+<td bgcolor='&cellback;'><titleref href='inliteral'>Included in literal</titleref></td>
+<td bgcolor='&cellback;'><titleref href='forbidden'>Forbidden</titleref></td>
+<td bgcolor='&cellback;'><titleref href='forbidden'>Forbidden</titleref></td>
+<td bgcolor='&cellback;'><titleref href='included'>Included</titleref></td>
+</tr>
+<tr align='center' valign='middle'>
+<td bgcolor='&cellback;' align='right'>Occurs as
+Attribute Value</td>
+<td bgcolor='&cellback;'><titleref href='not-recognized'>Not recognized</titleref></td>
+<td bgcolor='&cellback;'><titleref href='not-recognized'>Forbidden</titleref></td>
+<td bgcolor='&cellback;'><titleref href='not-recognized'>Forbidden</titleref></td>
+<td bgcolor='&cellback;'><titleref href='notify'>Notify</titleref></td>
+<td bgcolor='&cellback;'><titleref href='not recognized'>Not recognized</titleref></td>
+</tr>
+<tr align='center' valign='middle'>
+<td bgcolor='&cellback;' align='right'>Reference
+in EntityValue</td>
+<td bgcolor='&cellback;'><titleref href='inliteral'>Included in literal</titleref></td>
+<td bgcolor='&cellback;'><titleref href='bypass'>Bypassed</titleref></td>
+<td bgcolor='&cellback;'><titleref href='bypass'>Bypassed</titleref></td>
+<td bgcolor='&cellback;'><titleref href='forbidden'>Forbidden</titleref></td>
+<td bgcolor='&cellback;'><titleref href='included'>Included</titleref></td>
+</tr>
+<tr align='center' valign='middle'>
+<td bgcolor='&cellback;' align='right'>Reference
+in DTD</td>
+<td bgcolor='&cellback;'><titleref href='as-PE'>Included as PE</titleref></td>
+<td bgcolor='&cellback;'><titleref href='forbidden'>Forbidden</titleref></td>
+<td bgcolor='&cellback;'><titleref href='forbidden'>Forbidden</titleref></td>
+<td bgcolor='&cellback;'><titleref href='forbidden'>Forbidden</titleref></td>
+<td bgcolor='&cellback;'><titleref href='forbidden'>Forbidden</titleref></td>
+</tr>
+</htbody>
+</htable>
+<div3 id='not-recognized'>
+<head>Not Recognized</head>
+<p>Outside the DTD, the <code>%</code> character has no
+special significance; thus, what would be parameter entity references in the
+DTD are not recognized as markup in <nt def='NT-content'>content</nt>.
+Similarly, the names of unparsed entities are not recognized except
+when they appear in the value of an appropriately declared attribute.
+</p>
+</div3>
+<div3 id='included'>
+<head>Included</head>
+<p><termdef id="dt-include" term="Include">An entity is 
+<term>included</term> when its 
+<termref def='dt-repltext'>replacement text</termref> is retrieved 
+and processed, in place of the reference itself,
+as though it were part of the document at the location the
+reference was recognized.
+The replacement text may contain both 
+<termref def='dt-chardata'>character data</termref>
+and (except for parameter entities) <termref def="dt-markup">markup</termref>,
+which must be recognized in
+the usual way, except that the replacement text of entities used to escape
+markup delimiters (the entities &magicents;) is always treated as
+data.  (The string "<code>AT&amp;amp;T;</code>" expands to
+"<code>AT&amp;T;</code>" and the remaining ampersand is not recognized
+as an entity-reference delimiter.) 
+A character reference is <term>included</term> when the indicated
+character is processed in place of the reference itself.
+</termdef></p>
+</div3>
+<div3 id='include-if-valid'>
+<head>Included If Validating</head>
+<p>When an XML processor recognizes a reference to a parsed entity, in order
+to <termref def="dt-valid">validate</termref>
+the document, the processor must 
+<termref def="dt-include">include</termref> its
+replacement text.
+If the entity is external, and the processor is not
+attempting to validate the XML document, the
+processor <termref def="dt-may">may</termref>, but need not, 
+include the entity's replacement text.
+If a non-validating parser does not include the replacement text,
+it must inform the application that it recognized, but did not
+read, the entity.</p>
+<p>This rule is based on the recognition that the automatic inclusion
+provided by the SGML and XML entity mechanism, primarily designed
+to support modularity in authoring, is not necessarily 
+appropriate for other applications, in particular document browsing.
+Browsers, for example, when encountering an external parsed entity reference,
+might choose to provide a visual indication of the entity's
+presence and retrieve it for display only on demand.
+</p>
+</div3>
+<div3 id='forbidden'>
+<head>Forbidden</head>
+<p>The following are forbidden, and constitute
+<termref def='dt-fatal'>fatal</termref> errors:
+<ulist>
+<item><p>the appearance of a reference to an
+<termref def='dt-unparsed'>unparsed entity</termref>.
+</p></item>
+<item><p>the appearance of any character or general-entity reference in the
+DTD except within an <nt def='NT-EntityValue'>EntityValue</nt> or 
+<nt def="NT-AttValue">AttValue</nt>.</p></item>
+<item><p>a reference to an external entity in an attribute value.</p>
+</item>
+</ulist>
+</p>
+</div3>
+<div3 id='inliteral'>
+<head>Included in Literal</head>
+<p>When an <termref def='dt-entref'>entity reference</termref> appears in an
+attribute value, or a parameter entity reference appears in a literal entity
+value, its <termref def='dt-repltext'>replacement text</termref> is
+processed in place of the reference itself as though it
+were part of the document at the location the reference was recognized,
+except that a single or double quote character in the replacement text
+is always treated as a normal data character and will not terminate the
+literal. 
+For example, this is well-formed:
+<eg><![CDATA[<!ENTITY % YN '"Yes"' >
+<!ENTITY WhatHeSaid "He said &YN;" >]]></eg>
+while this is not:
+<eg>&lt;!ENTITY EndAttr "27'" >
+&lt;element attribute='a-&amp;EndAttr;></eg>
+</p></div3>
+<div3 id='notify'>
+<head>Notify</head>
+<p>When the name of an <termref def='dt-unparsed'>unparsed
+entity</termref> appears as a token in the
+value of an attribute of declared type <kw>ENTITY</kw> or <kw>ENTITIES</kw>,
+a validating processor must inform the
+application of the <termref def='dt-sysid'>system</termref> 
+and <termref def='dt-pubid'>public</termref> (if any)
+identifiers for both the entity and its associated
+<termref def="dt-notation">notation</termref>.</p>
+</div3>
+<div3 id='bypass'>
+<head>Bypassed</head>
+<p>When a general entity reference appears in the
+<nt def='NT-EntityValue'>EntityValue</nt> in an entity declaration,
+it is bypassed and left as is.</p>
+</div3>
+<div3 id='as-PE'>
+<head>Included as PE</head>
+<p>Just as with external parsed entities, parameter entities
+need only be <titleref href='include-if-valid'>included if
+validating</titleref>. 
+When a parameter-entity reference is recognized in the DTD
+and included, its 
+<termref def='dt-repltext'>replacement
+text</termref> is enlarged by the attachment of one leading and one following
+space (#x20) character; the intent is to constrain the replacement
+text of parameter 
+entities to contain an integral number of grammatical tokens in the DTD.
+</p>
+</div3>
+
+</div2>
+<div2 id='intern-replacement'>
+<head>Construction of Internal Entity Replacement Text</head>
+<p>In discussing the treatment
+of internal entities, it is  
+useful to distinguish two forms of the entity's value.
+<termdef id="dt-litentval" term='Literal Entity Value'>The <term>literal
+entity value</term> is the quoted string actually
+present in the entity declaration, corresponding to the
+non-terminal <nt def='NT-EntityValue'>EntityValue</nt>.</termdef>
+<termdef id='dt-repltext' term='Replacement Text'>The <term>replacement
+text</term> is the content of the entity, after
+replacement of character references and parameter-entity
+references.
+</termdef></p>
+
+<p>The literal entity value 
+as given in an internal entity declaration
+(<nt def='NT-EntityValue'>EntityValue</nt>) may contain character,
+parameter-entity, and general-entity references.
+Such references must be contained entirely within the
+literal entity value.
+The actual replacement text that is 
+<termref def='dt-include'>included</termref> as described above
+must contain the <emph>replacement text</emph> of any 
+parameter entities referred to, and must contain the character
+referred to, in place of any character references in the
+literal entity value; however,
+general-entity references must be left as-is, unexpanded.
+For example, given the following declarations:
+
+<eg><![CDATA[<!ENTITY % pub    "&#xc9;ditions Gallimard" >
+<!ENTITY   rights "All rights reserved" >
+<!ENTITY   book   "La Peste: Albert Camus, 
+&#xA9; 1947 %pub;. &rights;" >]]></eg>
+then the replacement text for the entity "<code>book</code>" is:
+<eg>La Peste: Albert Camus, 
+&#169; 1947 &#201;ditions Gallimard. &amp;rights;</eg>
+The general-entity reference "<code>&amp;rights;</code>" would be expanded
+should the reference "<code>&amp;book;</code>" appear in the document's
+content or an attribute value.</p>
+<p>These simple rules may have complex interactions; for a detailed
+discussion of a difficult example, see
+<specref ref='sec-entexpand'/>.
+</p>
+
+</div2>
+<div2 id='sec-predefined-ent'>
+<head>Predefined Entities</head>
+<p><termdef id="dt-escape" term="escape">Entity and character
+references can both be used to <term>escape</term> the left angle bracket,
+ampersand, and other delimiters.   A set of general entities
+(&magicents;) is specified for this purpose.
+Numeric character references may also be used; they are
+expanded immediately when recognized and must be treated as
+character data, so the numeric character references
+"<code>&amp;#60;</code>" and "<code>&amp;#38;</code>" may be used to 
+escape <code>&lt;</code> and <code>&amp;</code> when they occur
+in character data.</termdef></p>
+<p>All XML processors must recognize these entities whether they
+are declared or not.  
+<termref def='dt-interop'>For interoperability</termref>,
+valid XML documents should declare these
+entities, like any others, before using them.
+If the entities in question are declared, they must be declared
+as internal entities whose replacement text is the single
+character being escaped or a character reference to
+that character, as shown below.
+<eg><![CDATA[<!ENTITY lt     "&#38;#60;"> 
+<!ENTITY gt     "&#62;"> 
+<!ENTITY amp    "&#38;#38;"> 
+<!ENTITY apos   "&#39;"> 
+<!ENTITY quot   "&#34;"> 
+]]></eg>
+Note that the <code>&lt;</code> and <code>&amp;</code> characters
+in the declarations of "<code>lt</code>" and "<code>amp</code>"
+are doubly escaped to meet the requirement that entity replacement
+be well-formed.
+</p>
+</div2>
+
+<div2 id='Notations'>
+<head>Notation Declarations</head>
+<p><termdef id="dt-notation" term="Notation"><term>Notations</term> identify by
+name the format of <termref def="dt-extent">unparsed
+entities</termref>, the
+format of elements which bear a notation attribute, 
+or the application to which  
+a <termref def="dt-pi">processing instruction</termref> is
+addressed.</termdef></p>
+<p><termdef id="dt-notdecl" term="Notation Declaration">
+<term>Notation declarations</term>
+provide a name for the notation, for use in
+entity and attribute-list declarations and in attribute specifications,
+and an external identifier for the notation which may allow an XML
+processor or its client application to locate a helper application
+capable of processing data in the given notation.
+<scrap lang='ebnf'>
+<head>Notation Declarations</head>
+<prod id='NT-NotationDecl'><lhs>NotationDecl</lhs>
+<rhs>'&lt;!NOTATION' <nt def='NT-S'>S</nt> <nt def='NT-Name'>Name</nt> 
+<nt def='NT-S'>S</nt> 
+(<nt def='NT-ExternalID'>ExternalID</nt> | 
+<nt def='NT-PublicID'>PublicID</nt>)
+<nt def='NT-S'>S</nt>? '>'</rhs></prod>
+<prod id='NT-PublicID'><lhs>PublicID</lhs>
+<rhs>'PUBLIC' <nt def='NT-S'>S</nt> 
+<nt def='NT-PubidLiteral'>PubidLiteral</nt> 
+</rhs></prod>
+</scrap>
+</termdef></p>
+<p>XML processors must provide applications with the name and external
+identifier(s) of any notation declared and referred to in an attribute
+value, attribute definition, or entity declaration.  They may
+additionally resolve the external identifier into the
+<termref def="dt-sysid">system identifier</termref>,
+file name, or other information needed to allow the
+application to call a processor for data in the notation described.  (It
+is not an error, however, for XML documents to declare and refer to
+notations for which notation-specific applications are not available on
+the system where the XML processor or application is running.)</p>
+</div2>
+
+<div2 id='sec-doc-entity'>
+<head>Document Entity</head>
+<p><termdef id="dt-docent" term="Document Entity">The <term>document
+entity</term> serves as the root of the entity
+tree and a starting-point for an <termref def="dt-xml-proc">XML
+processor</termref>.</termdef>
+This specification does
+not specify how the document entity is to be located by an XML
+processor; unlike other entities, the document entity has no name and might
+well appear on a processor input stream 
+without any identification at all.</p>
+</div2>
+
+
+</div1>
+<!-- &Conformance; -->
+<div1 id='sec-conformance'>
+<head>Conformance</head>
+<div2 id='proc-types'>
+<head>Validating and Non-Validating Processors</head>
+<p>Conforming <termref def="dt-xml-proc">XML processors</termref> fall into two
+classes: validating and non-validating.</p>
+<p>Validating and non-validating processors alike must report
+violations of this specification's well-formedness constraints
+in the content of the
+<termref def='dt-docent'>document entity</termref> and any 
+other <termref def='dt-parsedent'>parsed entities</termref> that 
+they read.</p>
+<p><termdef id="dt-validating" term="Validating Processor">
+<term>Validating processors</term> must report
+violations of the constraints expressed by the declarations in the
+<termref def="dt-doctype">DTD</termref>, and
+failures to fulfill the validity constraints given
+in this specification.
+</termdef>
+To accomplish this, validating XML processors must read and process the entire
+DTD and all external parsed entities referenced in the document.
+</p>
+<p>Non-validating processors are required to check only the 
+<termref def='dt-docent'>document entity</termref>, including
+the entire internal DTD subset, for well-formedness.
+<termdef id='dt-use-mdecl' term='Process Declarations'>
+While they are not required to check the document for validity,
+they are required to 
+<term>process</term> all the declarations they read in the
+internal DTD subset and in any parameter entity that they
+read, up to the first reference
+to a parameter entity that they do <emph>not</emph> read; that is to 
+say, they must
+use the information in those declarations to
+<titleref href='AVNormalize'>normalize</titleref> attribute values,
+<titleref href='included'>include</titleref> the replacement text of 
+internal entities, and supply 
+<titleref href='sec-attr-defaults'>default attribute values</titleref>.
+</termdef>
+They must not <termref def='dt-use-mdecl'>process</termref>
+<termref def='dt-entdecl'>entity declarations</termref> or 
+<termref def='dt-attdecl'>attribute-list declarations</termref> 
+encountered after a reference to a parameter entity that is not
+read, since the entity may have contained overriding declarations.
+</p>
+</div2>
+<div2 id='safe-behavior'>
+<head>Using XML Processors</head>
+<p>The behavior of a validating XML processor is highly predictable; it
+must read every piece of a document and report all well-formedness and
+validity violations.
+Less is required of a non-validating processor; it need not read any
+part of the document other than the document entity.
+This has two effects that may be important to users of XML processors:
+<ulist>
+<item><p>Certain well-formedness errors, specifically those that require
+reading external entities, may not be detected by a non-validating processor.
+Examples include the constraints entitled 
+<titleref href='wf-entdeclared'>Entity Declared</titleref>, 
+<titleref href='wf-textent'>Parsed Entity</titleref>, and
+<titleref href='wf-norecursion'>No Recursion</titleref>, as well
+as some of the cases described as
+<titleref href='forbidden'>forbidden</titleref> in 
+<specref ref='entproc'/>.</p></item>
+<item><p>The information passed from the processor to the application may
+vary, depending on whether the processor reads
+parameter and external entities.
+For example, a non-validating processor may not 
+<titleref href='AVNormalize'>normalize</titleref> attribute values,
+<titleref href='included'>include</titleref> the replacement text of 
+internal entities, or supply 
+<titleref href='sec-attr-defaults'>default attribute values</titleref>,
+where doing so depends on having read declarations in 
+external or parameter entities.</p></item>
+</ulist>
+</p>
+<p>For maximum reliability in interoperating between different XML
+processors, applications which use non-validating processors should not 
+rely on any behaviors not required of such processors.
+Applications which require facilities such as the use of default
+attributes or internal entities which are declared in external
+entities should use validating XML processors.</p>
+</div2>
+</div1>
+
+<div1 id='sec-notation'>
+<head>Notation</head>
+<p>The formal grammar of XML is given in this specification using a simple
+Extended Backus-Naur Form (EBNF) notation.  Each rule in the grammar defines
+one symbol, in the form
+<eg>symbol ::= expression</eg></p>
+<p>Symbols are written with an initial capital letter if they are
+defined by a regular expression, or with an initial lower case letter 
+otherwise.
+Literal strings are quoted.
+
+</p>
+
+<p>Within the expression on the right-hand side of a rule, the following
+expressions are used to match strings of one or more characters:
+<glist>
+<gitem>
+<label><code>#xN</code></label>
+<def><p>where <code>N</code> is a hexadecimal integer, the
+expression matches the character in ISO/IEC 10646 whose canonical
+(UCS-4) 
+code value, when interpreted as an unsigned binary number, has
+the value indicated.  The number of leading zeros in the
+<code>#xN</code> form is insignificant; the number of leading
+zeros in the corresponding code value 
+is governed by the character
+encoding in use and is not significant for XML.</p></def>
+</gitem>
+<gitem>
+<label><code>[a-zA-Z]</code>, <code>[#xN-#xN]</code></label>
+<def><p>matches any <termref def='dt-character'>character</termref> 
+with a value in the range(s) indicated (inclusive).</p></def>
+</gitem>
+<gitem>
+<label><code>[^a-z]</code>, <code>[^#xN-#xN]</code></label>
+<def><p>matches any <termref def='dt-character'>character</termref> 
+with a value <emph>outside</emph> the
+range indicated.</p></def>
+</gitem>
+<gitem>
+<label><code>[^abc]</code>, <code>[^#xN#xN#xN]</code></label>
+<def><p>matches any <termref def='dt-character'>character</termref>
+with a value not among the characters given.</p></def>
+</gitem>
+<gitem>
+<label><code>"string"</code></label>
+<def><p>matches a literal string <termref def="dt-match">matching</termref>
+that given inside the double quotes.</p></def>
+</gitem>
+<gitem>
+<label><code>'string'</code></label>
+<def><p>matches a literal string <termref def="dt-match">matching</termref>
+that given inside the single quotes.</p></def>
+</gitem>
+</glist>
+These symbols may be combined to match more complex patterns as follows,
+where <code>A</code> and <code>B</code> represent simple expressions:
+<glist>
+<gitem>
+<label>(<code>expression</code>)</label>
+<def><p><code>expression</code> is treated as a unit 
+and may be combined as described in this list.</p></def>
+</gitem>
+<gitem>
+<label><code>A?</code></label>
+<def><p>matches <code>A</code> or nothing; optional <code>A</code>.</p></def>
+</gitem>
+<gitem>
+<label><code>A B</code></label>
+<def><p>matches <code>A</code> followed by <code>B</code>.</p></def>
+</gitem>
+<gitem>
+<label><code>A | B</code></label>
+<def><p>matches <code>A</code> or <code>B</code> but not both.</p></def>
+</gitem>
+<gitem>
+<label><code>A - B</code></label>
+<def><p>matches any string that matches <code>A</code> but does not match
+<code>B</code>.
+</p></def>
+</gitem>
+<gitem>
+<label><code>A+</code></label>
+<def><p>matches one or more occurrences of <code>A</code>.</p></def>
+</gitem>
+<gitem>
+<label><code>A*</code></label>
+<def><p>matches zero or more occurrences of <code>A</code>.</p></def>
+</gitem>
+
+</glist>
+Other notations used in the productions are:
+<glist>
+<gitem>
+<label><code>/* ... */</code></label>
+<def><p>comment.</p></def>
+</gitem>
+<gitem>
+<label><code>[ wfc: ... ]</code></label>
+<def><p>well-formedness constraint; this identifies by name a 
+constraint on 
+<termref def="dt-wellformed">well-formed</termref> documents
+associated with a production.</p></def>
+</gitem>
+<gitem>
+<label><code>[ vc: ... ]</code></label>
+<def><p>validity constraint; this identifies by name a constraint on
+<termref def="dt-valid">valid</termref> documents associated with
+a production.</p></def>
+</gitem>
+</glist>
+</p></div1>
+
+</body>
+<back>
+<!-- &SGML; -->
+
+<!-- &Biblio; -->
+<div1 id='sec-bibliography'>
+
+<head>References</head>
+<div2 id='sec-existing-stds'>
+<head>Normative References</head>
+
+<blist>
+<bibl id='IANA' key='IANA'>
+(Internet Assigned Numbers Authority) <emph>Official Names for 
+Character Sets</emph>,
+ed. Keld Simonsen et al.
+See <loc href='ftp://ftp.isi.edu/in-notes/iana/assignments/character-sets'>ftp://ftp.isi.edu/in-notes/iana/assignments/character-sets</loc>.
+</bibl>
+
+<bibl id='RFC1766' key='IETF RFC 1766'>
+IETF (Internet Engineering Task Force).
+<emph>RFC 1766:  Tags for the Identification of Languages</emph>,
+ed. H. Alvestrand.
+1995.
+</bibl>
+
+<bibl id='ISO639' key='ISO 639'>
+(International Organization for Standardization).
+<emph>ISO 639:1988 (E).
+Code for the representation of names of languages.</emph>
+[Geneva]:  International Organization for
+Standardization, 1988.</bibl>
+
+<bibl id='ISO3166' key='ISO 3166'>
+(International Organization for Standardization).
+<emph>ISO 3166-1:1997 (E).
+Codes for the representation of names of countries and their subdivisions 
+&mdash; Part 1: Country codes</emph>
+[Geneva]:  International Organization for
+Standardization, 1997.</bibl>
+
+<bibl id='ISO10646' key='ISO/IEC 10646'>ISO
+(International Organization for Standardization).
+<emph>ISO/IEC 10646-1993 (E).  Information technology &mdash; Universal
+Multiple-Octet Coded Character Set (UCS) &mdash; Part 1:
+Architecture and Basic Multilingual Plane.</emph>
+[Geneva]:  International Organization for
+Standardization, 1993 (plus amendments AM 1 through AM 7).
+</bibl>
+
+<bibl id='Unicode' key='Unicode'>The Unicode Consortium.
+<emph>The Unicode Standard, Version 2.0.</emph>
+Reading, Mass.:  Addison-Wesley Developers Press, 1996.</bibl>
+
+</blist>
+
+</div2>
+
+<div2><head>Other References</head> 
+
+<blist>
+
+<bibl id='Aho' key='Aho/Ullman'>Aho, Alfred V., 
+Ravi Sethi, and Jeffrey D. Ullman.
+<emph>Compilers:  Principles, Techniques, and Tools</emph>.
+Reading:  Addison-Wesley, 1986, rpt. corr. 1988.</bibl>
+
+<bibl id="Berners-Lee" xml-link="simple" key="Berners-Lee et al.">
+Berners-Lee, T., R. Fielding, and L. Masinter.
+<emph>Uniform Resource Identifiers (URI):  Generic Syntax and
+Semantics</emph>.
+1997.
+(Work in progress; see updates to RFC1738.)</bibl>
+
+<bibl id='ABK' key='Brüggemann-Klein'>Brüggemann-Klein, Anne.
+<emph>Regular Expressions into Finite Automata</emph>.
+Extended abstract in I. Simon, Hrsg., LATIN 1992, 
+S. 97-98. Springer-Verlag, Berlin 1992. 
+Full Version in Theoretical Computer Science 120: 197-213, 1993.
+
+</bibl>
+
+<bibl id='ABKDW' key='Brüggemann-Klein and Wood'>Brüggemann-Klein, Anne,
+and Derick Wood.
+<emph>Deterministic Regular Languages</emph>.
+Universität Freiburg, Institut für Informatik,
+Bericht 38, Oktober 1991.
+</bibl>
+
+<bibl id='Clark' key='Clark'>James Clark.
+Comparison of SGML and XML. See
+<loc href='http://www.w3.org/TR/NOTE-sgml-xml-971215'>http://www.w3.org/TR/NOTE-sgml-xml-971215</loc>.
+</bibl>
+<bibl id="RFC1738" xml-link="simple" key="IETF RFC1738">
+IETF (Internet Engineering Task Force).
+<emph>RFC 1738:  Uniform Resource Locators (URL)</emph>, 
+ed. T. Berners-Lee, L. Masinter, M. McCahill.
+1994.
+</bibl>
+
+<bibl id="RFC1808" xml-link="simple" key="IETF RFC1808">
+IETF (Internet Engineering Task Force).
+<emph>RFC 1808:  Relative Uniform Resource Locators</emph>, 
+ed. R. Fielding.
+1995.
+</bibl>
+
+<bibl id="RFC2141" xml-link="simple" key="IETF RFC2141">
+IETF (Internet Engineering Task Force).
+<emph>RFC 2141:  URN Syntax</emph>, 
+ed. R. Moats.
+1997.
+</bibl>
+
+<bibl id='ISO8879' key='ISO 8879'>ISO
+(International Organization for Standardization).
+<emph>ISO 8879:1986(E).  Information processing &mdash; Text and Office
+Systems &mdash; Standard Generalized Markup Language (SGML).</emph>  First
+edition &mdash; 1986-10-15.  [Geneva]:  International Organization for
+Standardization, 1986.
+</bibl>
+
+
+<bibl id='ISO10744' key='ISO/IEC 10744'>ISO
+(International Organization for Standardization).
+<emph>ISO/IEC 10744-1992 (E).  Information technology &mdash;
+Hypermedia/Time-based Structuring Language (HyTime).
+</emph>
+[Geneva]:  International Organization for
+Standardization, 1992.
+<emph>Extended Facilities Annexe.</emph>
+[Geneva]:  International Organization for
+Standardization, 1996. 
+</bibl>
+
+
+
+</blist>
+</div2>
+</div1>
+<div1 id='CharClasses'>
+<head>Character Classes</head>
+<p>Following the characteristics defined in the Unicode standard,
+characters are classed as base characters (among others, these
+contain the alphabetic characters of the Latin alphabet, without
+diacritics), ideographic characters, and combining characters (among
+others, this class contains most diacritics); these classes combine
+to form the class of letters.  Digits and extenders are
+also distinguished.
+<scrap lang="ebnf" id="CHARACTERS">
+<head>Characters</head>
+<prodgroup pcw3="3" pcw4="15">
+<prod id="NT-Letter"><lhs>Letter</lhs>
+<rhs><nt def="NT-BaseChar">BaseChar</nt> 
+| <nt def="NT-Ideographic">Ideographic</nt></rhs> </prod>
+<prod id='NT-BaseChar'><lhs>BaseChar</lhs>
+<rhs>[#x0041-#x005A]
+|&nbsp;[#x0061-#x007A]
+|&nbsp;[#x00C0-#x00D6]
+|&nbsp;[#x00D8-#x00F6]
+|&nbsp;[#x00F8-#x00FF]
+|&nbsp;[#x0100-#x0131]
+|&nbsp;[#x0134-#x013E]
+|&nbsp;[#x0141-#x0148]
+|&nbsp;[#x014A-#x017E]
+|&nbsp;[#x0180-#x01C3]
+|&nbsp;[#x01CD-#x01F0]
+|&nbsp;[#x01F4-#x01F5]
+|&nbsp;[#x01FA-#x0217]
+|&nbsp;[#x0250-#x02A8]
+|&nbsp;[#x02BB-#x02C1]
+|&nbsp;#x0386
+|&nbsp;[#x0388-#x038A]
+|&nbsp;#x038C
+|&nbsp;[#x038E-#x03A1]
+|&nbsp;[#x03A3-#x03CE]
+|&nbsp;[#x03D0-#x03D6]
+|&nbsp;#x03DA
+|&nbsp;#x03DC
+|&nbsp;#x03DE
+|&nbsp;#x03E0
+|&nbsp;[#x03E2-#x03F3]
+|&nbsp;[#x0401-#x040C]
+|&nbsp;[#x040E-#x044F]
+|&nbsp;[#x0451-#x045C]
+|&nbsp;[#x045E-#x0481]
+|&nbsp;[#x0490-#x04C4]
+|&nbsp;[#x04C7-#x04C8]
+|&nbsp;[#x04CB-#x04CC]
+|&nbsp;[#x04D0-#x04EB]
+|&nbsp;[#x04EE-#x04F5]
+|&nbsp;[#x04F8-#x04F9]
+|&nbsp;[#x0531-#x0556]
+|&nbsp;#x0559
+|&nbsp;[#x0561-#x0586]
+|&nbsp;[#x05D0-#x05EA]
+|&nbsp;[#x05F0-#x05F2]
+|&nbsp;[#x0621-#x063A]
+|&nbsp;[#x0641-#x064A]
+|&nbsp;[#x0671-#x06B7]
+|&nbsp;[#x06BA-#x06BE]
+|&nbsp;[#x06C0-#x06CE]
+|&nbsp;[#x06D0-#x06D3]
+|&nbsp;#x06D5
+|&nbsp;[#x06E5-#x06E6]
+|&nbsp;[#x0905-#x0939]
+|&nbsp;#x093D
+|&nbsp;[#x0958-#x0961]
+|&nbsp;[#x0985-#x098C]
+|&nbsp;[#x098F-#x0990]
+|&nbsp;[#x0993-#x09A8]
+|&nbsp;[#x09AA-#x09B0]
+|&nbsp;#x09B2
+|&nbsp;[#x09B6-#x09B9]
+|&nbsp;[#x09DC-#x09DD]
+|&nbsp;[#x09DF-#x09E1]
+|&nbsp;[#x09F0-#x09F1]
+|&nbsp;[#x0A05-#x0A0A]
+|&nbsp;[#x0A0F-#x0A10]
+|&nbsp;[#x0A13-#x0A28]
+|&nbsp;[#x0A2A-#x0A30]
+|&nbsp;[#x0A32-#x0A33]
+|&nbsp;[#x0A35-#x0A36]
+|&nbsp;[#x0A38-#x0A39]
+|&nbsp;[#x0A59-#x0A5C]
+|&nbsp;#x0A5E
+|&nbsp;[#x0A72-#x0A74]
+|&nbsp;[#x0A85-#x0A8B]
+|&nbsp;#x0A8D
+|&nbsp;[#x0A8F-#x0A91]
+|&nbsp;[#x0A93-#x0AA8]
+|&nbsp;[#x0AAA-#x0AB0]
+|&nbsp;[#x0AB2-#x0AB3]
+|&nbsp;[#x0AB5-#x0AB9]
+|&nbsp;#x0ABD
+|&nbsp;#x0AE0
+|&nbsp;[#x0B05-#x0B0C]
+|&nbsp;[#x0B0F-#x0B10]
+|&nbsp;[#x0B13-#x0B28]
+|&nbsp;[#x0B2A-#x0B30]
+|&nbsp;[#x0B32-#x0B33]
+|&nbsp;[#x0B36-#x0B39]
+|&nbsp;#x0B3D
+|&nbsp;[#x0B5C-#x0B5D]
+|&nbsp;[#x0B5F-#x0B61]
+|&nbsp;[#x0B85-#x0B8A]
+|&nbsp;[#x0B8E-#x0B90]
+|&nbsp;[#x0B92-#x0B95]
+|&nbsp;[#x0B99-#x0B9A]
+|&nbsp;#x0B9C
+|&nbsp;[#x0B9E-#x0B9F]
+|&nbsp;[#x0BA3-#x0BA4]
+|&nbsp;[#x0BA8-#x0BAA]
+|&nbsp;[#x0BAE-#x0BB5]
+|&nbsp;[#x0BB7-#x0BB9]
+|&nbsp;[#x0C05-#x0C0C]
+|&nbsp;[#x0C0E-#x0C10]
+|&nbsp;[#x0C12-#x0C28]
+|&nbsp;[#x0C2A-#x0C33]
+|&nbsp;[#x0C35-#x0C39]
+|&nbsp;[#x0C60-#x0C61]
+|&nbsp;[#x0C85-#x0C8C]
+|&nbsp;[#x0C8E-#x0C90]
+|&nbsp;[#x0C92-#x0CA8]
+|&nbsp;[#x0CAA-#x0CB3]
+|&nbsp;[#x0CB5-#x0CB9]
+|&nbsp;#x0CDE
+|&nbsp;[#x0CE0-#x0CE1]
+|&nbsp;[#x0D05-#x0D0C]
+|&nbsp;[#x0D0E-#x0D10]
+|&nbsp;[#x0D12-#x0D28]
+|&nbsp;[#x0D2A-#x0D39]
+|&nbsp;[#x0D60-#x0D61]
+|&nbsp;[#x0E01-#x0E2E]
+|&nbsp;#x0E30
+|&nbsp;[#x0E32-#x0E33]
+|&nbsp;[#x0E40-#x0E45]
+|&nbsp;[#x0E81-#x0E82]
+|&nbsp;#x0E84
+|&nbsp;[#x0E87-#x0E88]
+|&nbsp;#x0E8A
+|&nbsp;#x0E8D
+|&nbsp;[#x0E94-#x0E97]
+|&nbsp;[#x0E99-#x0E9F]
+|&nbsp;[#x0EA1-#x0EA3]
+|&nbsp;#x0EA5
+|&nbsp;#x0EA7
+|&nbsp;[#x0EAA-#x0EAB]
+|&nbsp;[#x0EAD-#x0EAE]
+|&nbsp;#x0EB0
+|&nbsp;[#x0EB2-#x0EB3]
+|&nbsp;#x0EBD
+|&nbsp;[#x0EC0-#x0EC4]
+|&nbsp;[#x0F40-#x0F47]
+|&nbsp;[#x0F49-#x0F69]
+|&nbsp;[#x10A0-#x10C5]
+|&nbsp;[#x10D0-#x10F6]
+|&nbsp;#x1100
+|&nbsp;[#x1102-#x1103]
+|&nbsp;[#x1105-#x1107]
+|&nbsp;#x1109
+|&nbsp;[#x110B-#x110C]
+|&nbsp;[#x110E-#x1112]
+|&nbsp;#x113C
+|&nbsp;#x113E
+|&nbsp;#x1140
+|&nbsp;#x114C
+|&nbsp;#x114E
+|&nbsp;#x1150
+|&nbsp;[#x1154-#x1155]
+|&nbsp;#x1159
+|&nbsp;[#x115F-#x1161]
+|&nbsp;#x1163
+|&nbsp;#x1165
+|&nbsp;#x1167
+|&nbsp;#x1169
+|&nbsp;[#x116D-#x116E]
+|&nbsp;[#x1172-#x1173]
+|&nbsp;#x1175
+|&nbsp;#x119E
+|&nbsp;#x11A8
+|&nbsp;#x11AB
+|&nbsp;[#x11AE-#x11AF]
+|&nbsp;[#x11B7-#x11B8]
+|&nbsp;#x11BA
+|&nbsp;[#x11BC-#x11C2]
+|&nbsp;#x11EB
+|&nbsp;#x11F0
+|&nbsp;#x11F9
+|&nbsp;[#x1E00-#x1E9B]
+|&nbsp;[#x1EA0-#x1EF9]
+|&nbsp;[#x1F00-#x1F15]
+|&nbsp;[#x1F18-#x1F1D]
+|&nbsp;[#x1F20-#x1F45]
+|&nbsp;[#x1F48-#x1F4D]
+|&nbsp;[#x1F50-#x1F57]
+|&nbsp;#x1F59
+|&nbsp;#x1F5B
+|&nbsp;#x1F5D
+|&nbsp;[#x1F5F-#x1F7D]
+|&nbsp;[#x1F80-#x1FB4]
+|&nbsp;[#x1FB6-#x1FBC]
+|&nbsp;#x1FBE
+|&nbsp;[#x1FC2-#x1FC4]
+|&nbsp;[#x1FC6-#x1FCC]
+|&nbsp;[#x1FD0-#x1FD3]
+|&nbsp;[#x1FD6-#x1FDB]
+|&nbsp;[#x1FE0-#x1FEC]
+|&nbsp;[#x1FF2-#x1FF4]
+|&nbsp;[#x1FF6-#x1FFC]
+|&nbsp;#x2126
+|&nbsp;[#x212A-#x212B]
+|&nbsp;#x212E
+|&nbsp;[#x2180-#x2182]
+|&nbsp;[#x3041-#x3094]
+|&nbsp;[#x30A1-#x30FA]
+|&nbsp;[#x3105-#x312C]
+|&nbsp;[#xAC00-#xD7A3]
+</rhs></prod>
+<prod id='NT-Ideographic'><lhs>Ideographic</lhs>
+<rhs>[#x4E00-#x9FA5]
+|&nbsp;#x3007
+|&nbsp;[#x3021-#x3029]
+</rhs></prod>
+<prod id='NT-CombiningChar'><lhs>CombiningChar</lhs>
+<rhs>[#x0300-#x0345]
+|&nbsp;[#x0360-#x0361]
+|&nbsp;[#x0483-#x0486]
+|&nbsp;[#x0591-#x05A1]
+|&nbsp;[#x05A3-#x05B9]
+|&nbsp;[#x05BB-#x05BD]
+|&nbsp;#x05BF
+|&nbsp;[#x05C1-#x05C2]
+|&nbsp;#x05C4
+|&nbsp;[#x064B-#x0652]
+|&nbsp;#x0670
+|&nbsp;[#x06D6-#x06DC]
+|&nbsp;[#x06DD-#x06DF]
+|&nbsp;[#x06E0-#x06E4]
+|&nbsp;[#x06E7-#x06E8]
+|&nbsp;[#x06EA-#x06ED]
+|&nbsp;[#x0901-#x0903]
+|&nbsp;#x093C
+|&nbsp;[#x093E-#x094C]
+|&nbsp;#x094D
+|&nbsp;[#x0951-#x0954]
+|&nbsp;[#x0962-#x0963]
+|&nbsp;[#x0981-#x0983]
+|&nbsp;#x09BC
+|&nbsp;#x09BE
+|&nbsp;#x09BF
+|&nbsp;[#x09C0-#x09C4]
+|&nbsp;[#x09C7-#x09C8]
+|&nbsp;[#x09CB-#x09CD]
+|&nbsp;#x09D7
+|&nbsp;[#x09E2-#x09E3]
+|&nbsp;#x0A02
+|&nbsp;#x0A3C
+|&nbsp;#x0A3E
+|&nbsp;#x0A3F
+|&nbsp;[#x0A40-#x0A42]
+|&nbsp;[#x0A47-#x0A48]
+|&nbsp;[#x0A4B-#x0A4D]
+|&nbsp;[#x0A70-#x0A71]
+|&nbsp;[#x0A81-#x0A83]
+|&nbsp;#x0ABC
+|&nbsp;[#x0ABE-#x0AC5]
+|&nbsp;[#x0AC7-#x0AC9]
+|&nbsp;[#x0ACB-#x0ACD]
+|&nbsp;[#x0B01-#x0B03]
+|&nbsp;#x0B3C
+|&nbsp;[#x0B3E-#x0B43]
+|&nbsp;[#x0B47-#x0B48]
+|&nbsp;[#x0B4B-#x0B4D]
+|&nbsp;[#x0B56-#x0B57]
+|&nbsp;[#x0B82-#x0B83]
+|&nbsp;[#x0BBE-#x0BC2]
+|&nbsp;[#x0BC6-#x0BC8]
+|&nbsp;[#x0BCA-#x0BCD]
+|&nbsp;#x0BD7
+|&nbsp;[#x0C01-#x0C03]
+|&nbsp;[#x0C3E-#x0C44]
+|&nbsp;[#x0C46-#x0C48]
+|&nbsp;[#x0C4A-#x0C4D]
+|&nbsp;[#x0C55-#x0C56]
+|&nbsp;[#x0C82-#x0C83]
+|&nbsp;[#x0CBE-#x0CC4]
+|&nbsp;[#x0CC6-#x0CC8]
+|&nbsp;[#x0CCA-#x0CCD]
+|&nbsp;[#x0CD5-#x0CD6]
+|&nbsp;[#x0D02-#x0D03]
+|&nbsp;[#x0D3E-#x0D43]
+|&nbsp;[#x0D46-#x0D48]
+|&nbsp;[#x0D4A-#x0D4D]
+|&nbsp;#x0D57
+|&nbsp;#x0E31
+|&nbsp;[#x0E34-#x0E3A]
+|&nbsp;[#x0E47-#x0E4E]
+|&nbsp;#x0EB1
+|&nbsp;[#x0EB4-#x0EB9]
+|&nbsp;[#x0EBB-#x0EBC]
+|&nbsp;[#x0EC8-#x0ECD]
+|&nbsp;[#x0F18-#x0F19]
+|&nbsp;#x0F35
+|&nbsp;#x0F37
+|&nbsp;#x0F39
+|&nbsp;#x0F3E
+|&nbsp;#x0F3F
+|&nbsp;[#x0F71-#x0F84]
+|&nbsp;[#x0F86-#x0F8B]
+|&nbsp;[#x0F90-#x0F95]
+|&nbsp;#x0F97
+|&nbsp;[#x0F99-#x0FAD]
+|&nbsp;[#x0FB1-#x0FB7]
+|&nbsp;#x0FB9
+|&nbsp;[#x20D0-#x20DC]
+|&nbsp;#x20E1
+|&nbsp;[#x302A-#x302F]
+|&nbsp;#x3099
+|&nbsp;#x309A
+</rhs></prod>
+<prod id='NT-Digit'><lhs>Digit</lhs>
+<rhs>[#x0030-#x0039]
+|&nbsp;[#x0660-#x0669]
+|&nbsp;[#x06F0-#x06F9]
+|&nbsp;[#x0966-#x096F]
+|&nbsp;[#x09E6-#x09EF]
+|&nbsp;[#x0A66-#x0A6F]
+|&nbsp;[#x0AE6-#x0AEF]
+|&nbsp;[#x0B66-#x0B6F]
+|&nbsp;[#x0BE7-#x0BEF]
+|&nbsp;[#x0C66-#x0C6F]
+|&nbsp;[#x0CE6-#x0CEF]
+|&nbsp;[#x0D66-#x0D6F]
+|&nbsp;[#x0E50-#x0E59]
+|&nbsp;[#x0ED0-#x0ED9]
+|&nbsp;[#x0F20-#x0F29]
+</rhs></prod>
+<prod id='NT-Extender'><lhs>Extender</lhs>
+<rhs>#x00B7
+|&nbsp;#x02D0
+|&nbsp;#x02D1
+|&nbsp;#x0387
+|&nbsp;#x0640
+|&nbsp;#x0E46
+|&nbsp;#x0EC6
+|&nbsp;#x3005
+|&nbsp;[#x3031-#x3035]
+|&nbsp;[#x309D-#x309E]
+|&nbsp;[#x30FC-#x30FE]
+</rhs></prod>
+
+</prodgroup>
+</scrap>
+</p>
+<p>The character classes defined here can be derived from the
+Unicode character database as follows:
+<ulist>
+<item>
+<p>Name start characters must have one of the categories Ll, Lu,
+Lo, Lt, Nl.</p>
+</item>
+<item>
+<p>Name characters other than Name-start characters 
+must have one of the categories Mc, Me, Mn, Lm, or Nd.</p>
+</item>
+<item>
+<p>Characters in the compatibility area (i.e. with character code
+greater than #xF900 and less than #xFFFE) are not allowed in XML
+names.</p>
+</item>
+<item>
+<p>Characters which have a font or compatibility decomposition (i.e. those
+with a "compatibility formatting tag" in field 5 of the database --
+marked by field 5 beginning with a "&lt;") are not allowed.</p>
+</item>
+<item>
+<p>The following characters are treated as name-start characters
+rather than name characters, because the property file classifies
+them as Alphabetic:  [#x02BB-#x02C1], #x0559, #x06E5, #x06E6.</p>
+</item>
+<item>
+<p>Characters #x20DD-#x20E0 are excluded (in accordance with 
+Unicode, section 5.14).</p>
+</item>
+<item>
+<p>Character #x00B7 is classified as an extender, because the
+property list so identifies it.</p>
+</item>
+<item>
+<p>Character #x0387 is added as a name character, because #x00B7
+is its canonical equivalent.</p>
+</item>
+<item>
+<p>Characters ':' and '_' are allowed as name-start characters.</p>
+</item>
+<item>
+<p>Characters '-' and '.' are allowed as name characters.</p>
+</item>
+</ulist>
+</p>
+</div1>
+<inform-div1 id="sec-xml-and-sgml">
+<head>XML and SGML</head>
+<p>XML is designed to be a subset of SGML, in that every
+<termref def="dt-valid">valid</termref> XML document should also be a
+conformant SGML document.
+For a detailed comparison of the additional restrictions that XML places on
+documents beyond those of SGML, see <bibref ref='Clark'/>.
+</p>
+</inform-div1>
+<inform-div1 id="sec-entexpand">
+<head>Expansion of Entity and Character References</head>
+<p>This appendix contains some examples illustrating the
+sequence of entity- and character-reference recognition and
+expansion, as specified in <specref ref='entproc'/>.</p>
+<p>
+If the DTD contains the declaration 
+<eg><![CDATA[<!ENTITY example "<p>An ampersand (&#38;#38;) may be escaped
+numerically (&#38;#38;#38;) or with a general entity
+(&amp;amp;).</p>" >
+]]></eg>
+then the XML processor will recognize the character references 
+when it parses the entity declaration, and resolve them before 
+storing the following string as the
+value of the entity "<code>example</code>":
+<eg><![CDATA[<p>An ampersand (&#38;) may be escaped
+numerically (&#38;#38;) or with a general entity
+(&amp;amp;).</p>
+]]></eg>
+A reference in the document to "<code>&amp;example;</code>" 
+will cause the text to be reparsed, at which time the 
+start- and end-tags of the "<code>p</code>" element will be recognized 
+and the three references will be recognized and expanded, 
+resulting in a "<code>p</code>" element with the following content
+(all data, no delimiters or markup):
+<eg><![CDATA[An ampersand (&) may be escaped
+numerically (&#38;) or with a general entity
+(&amp;).
+]]></eg>
+</p>
+<p>A more complex example will illustrate the rules and their
+effects fully.  In the following example, the line numbers are
+solely for reference.
+<eg><![CDATA[1 <?xml version='1.0'?>
+2 <!DOCTYPE test [
+3 <!ELEMENT test (#PCDATA) >
+4 <!ENTITY % xx '&#37;zz;'>
+5 <!ENTITY % zz '&#60;!ENTITY tricky "error-prone" >' >
+6 %xx;
+7 ]>
+8 <test>This sample shows a &tricky; method.</test>
+]]></eg>
+This produces the following:
+<ulist spacing="compact">
+<item><p>in line 4, the reference to character 37 is expanded immediately,
+and the parameter entity "<code>xx</code>" is stored in the symbol
+table with the value "<code>%zz;</code>".  Since the replacement text
+is not rescanned, the reference to parameter entity "<code>zz</code>"
+is not recognized.  (And it would be an error if it were, since
+"<code>zz</code>" is not yet declared.)</p></item>
+<item><p>in line 5, the character reference "<code>&amp;#60;</code>" is
+expanded immediately and the parameter entity "<code>zz</code>" is
+stored with the replacement text 
+"<code>&lt;!ENTITY tricky "error-prone" ></code>",
+which is a well-formed entity declaration.</p></item>
+<item><p>in line 6, the reference to "<code>xx</code>" is recognized,
+and the replacement text of "<code>xx</code>" (namely 
+"<code>%zz;</code>") is parsed.  The reference to "<code>zz</code>"
+is recognized in its turn, and its replacement text 
+("<code>&lt;!ENTITY tricky "error-prone" ></code>") is parsed.
+The general entity "<code>tricky</code>" has now been
+declared, with the replacement text "<code>error-prone</code>".</p></item>
+<item><p>
+in line 8, the reference to the general entity "<code>tricky</code>" is
+recognized, and it is expanded, so the full content of the
+"<code>test</code>" element is the self-describing (and ungrammatical) string
+<emph>This sample shows a error-prone method.</emph>
+</p></item>
+</ulist>
+</p>
+</inform-div1> 
+<inform-div1 id="determinism">
+<head>Deterministic Content Models</head>
+<p><termref def='dt-compat'>For compatibility</termref>, it is
+required
+that content models in element type declarations be deterministic.  
+</p>
+<!-- FINAL EDIT:  WebSGML allows ambiguity? -->
+<p>SGML
+requires deterministic content models (it calls them
+"unambiguous"); XML processors built using SGML systems may
+flag non-deterministic content models as errors.</p>
+<p>For example, the content model <code>((b, c) | (b, d))</code> is
+non-deterministic, because given an initial <code>b</code> the parser
+cannot know which <code>b</code> in the model is being matched without
+looking ahead to see which element follows the <code>b</code>.
+In this case, the two references to
+<code>b</code> can be collapsed 
+into a single reference, making the model read
+<code>(b, (c | d))</code>.  An initial <code>b</code> now clearly
+matches only a single name in the content model.  The parser doesn't
+need to look ahead to see what follows; either <code>c</code> or
+<code>d</code> would be accepted.</p>
+<p>More formally:  a finite state automaton may be constructed from the
+content model using the standard algorithms, e.g. algorithm 3.5 
+in section 3.9
+of Aho, Sethi, and Ullman <bibref ref='Aho'/>.
+In many such algorithms, a follow set is constructed for each 
+position in the regular expression (i.e., each leaf 
+node in the 
+syntax tree for the regular expression);
+if any position has a follow set in which 
+more than one following position is 
+labeled with the same element type name, 
+then the content model is in error
+and may be reported as an error.
+</p>
+<p>Algorithms exist which allow many but not all non-deterministic
+content models to be reduced automatically to equivalent deterministic
+models; see Brüggemann-Klein 1991 <bibref ref='ABK'/>.</p>
+</inform-div1>
+<inform-div1 id="sec-guessing">
+<head>Autodetection of Character Encodings</head>
+<p>The XML encoding declaration functions as an internal label on each
+entity, indicating which character encoding is in use.  Before an XML
+processor can read the internal label, however, it apparently has to
+know what character encoding is in use&mdash;which is what the internal label
+is trying to indicate.  In the general case, this is a hopeless
+situation. It is not entirely hopeless in XML, however, because XML
+limits the general case in two ways:  each implementation is assumed
+to support only a  finite set of character encodings, and the XML
+encoding declaration is restricted in position and content in order to
+make it feasible to autodetect the character encoding in use in each
+entity in normal cases.  Also, in many cases other sources of information
+are available in addition to the XML data stream itself.  
+Two cases may be distinguished, 
+depending on whether the XML entity is presented to the
+processor without, or with, any accompanying
+(external) information.  We consider the first case first.
+</p>
+<p>
+Because each XML entity not in UTF-8 or UTF-16 format <emph>must</emph>
+begin with an XML encoding declaration, in which the first  characters
+must be '<code>&lt;?xml</code>', any conforming processor can detect,
+after two to four octets of input, which of the following cases apply. 
+In reading this list, it may help to know that in UCS-4, '&lt;' is
+"<code>#x0000003C</code>" and '?' is "<code>#x0000003F</code>", and the Byte
+Order Mark required of UTF-16 data streams is "<code>#xFEFF</code>".</p>
+<p>
+<ulist>
+<item>
+<p><code>00 00 00 3C</code>: UCS-4, big-endian machine (1234 order)</p>
+</item>
+<item>
+<p><code>3C 00 00 00</code>: UCS-4, little-endian machine (4321 order)</p>
+</item>
+<item>
+<p><code>00 00 3C 00</code>: UCS-4, unusual octet order (2143)</p>
+</item>
+<item>
+<p><code>00 3C 00 00</code>: UCS-4, unusual octet order (3412)</p>
+</item>
+<item>
+<p><code>FE FF</code>: UTF-16, big-endian</p>
+</item>
+<item>
+<p><code>FF FE</code>: UTF-16, little-endian</p>
+</item>
+<item>
+<p><code>00 3C 00 3F</code>: UTF-16, big-endian, no Byte Order Mark
+(and thus, strictly speaking, in error)</p>
+</item>
+<item>
+<p><code>3C 00 3F 00</code>: UTF-16, little-endian, no Byte Order Mark
+(and thus, strictly speaking, in error)</p>
+</item>
+<item>
+<p><code>3C 3F 78 6D</code>: UTF-8, ISO 646, ASCII, some part of ISO 8859, 
+Shift-JIS, EUC, or any other 7-bit, 8-bit, or mixed-width encoding
+which ensures that the characters of ASCII have their normal positions,
+width,
+and values; the actual encoding declaration must be read to 
+detect which of these applies, but since all of these encodings
+use the same bit patterns for the ASCII characters, the encoding 
+declaration itself may be read reliably
+</p>
+</item>
+<item>
+<p><code>4C 6F A7 94</code>: EBCDIC (in some flavor; the full
+encoding declaration must be read to tell which code page is in 
+use)</p>
+</item>
+<item>
+<p>other: UTF-8 without an encoding declaration, or else 
+the data stream is corrupt, fragmentary, or enclosed in
+a wrapper of some kind</p>
+</item>
+</ulist>
+</p>
+<p>
+This level of autodetection is enough to read the XML encoding
+declaration and parse the character-encoding identifier, which is
+still necessary to distinguish the individual members of each family
+of encodings (e.g. to tell  UTF-8 from 8859, and the parts of 8859
+from each other, or to distinguish the specific EBCDIC code page in
+use, and so on).
+</p>
+<p>
+Because the contents of the encoding declaration are restricted to
+ASCII characters, a processor can reliably read the entire encoding
+declaration as soon as it has detected which family of encodings is in
+use.  Since in practice, all widely used character encodings fall into
+one of the categories above, the XML encoding declaration allows
+reasonably reliable in-band labeling of character encodings, even when
+external sources of information at the operating-system or
+transport-protocol level are unreliable.
+</p>
+<p>
+Once the processor has detected the character encoding in use, it can
+act appropriately, whether by invoking a separate input routine for
+each case, or by calling the proper conversion function on each
+character of input. 
+</p>
+<p>
+Like any self-labeling system, the XML encoding declaration will not
+work if any software changes the entity's character set or encoding
+without updating the encoding declaration.  Implementors of
+character-encoding routines should be careful to ensure the accuracy
+of the internal and external information used to label the entity.
+</p>
+<p>The second possible case occurs when the XML entity is accompanied
+by encoding information, as in some file systems and some network
+protocols.
+When multiple sources of information are available,
+
+their relative
+priority and the preferred method of handling conflict should be
+specified as part of the higher-level protocol used to deliver XML.
+Rules for the relative priority of the internal label and the
+MIME-type label in an external header, for example, should be part of the
+RFC document defining the text/xml and application/xml MIME types. In
+the interests of interoperability, however, the following rules
+are recommended.
+<ulist>
+<item><p>If an XML entity is in a file, the Byte-Order Mark
+and encoding-declaration PI are used (if present) to determine the
+character encoding.  All other heuristics and sources of information
+are solely for error recovery.
+</p></item>
+<item><p>If an XML entity is delivered with a
+MIME type of text/xml, then the <code>charset</code> parameter
+on the MIME type determines the
+character encoding method; all other heuristics and sources of
+information are solely for error recovery.
+</p></item>
+<item><p>If an XML entity is delivered 
+with a
+MIME type of application/xml, then the Byte-Order Mark and
+encoding-declaration PI are used (if present) to determine the
+character encoding.  All other heuristics and sources of
+information are solely for error recovery.
+</p></item>
+</ulist>
+These rules apply only in the absence of protocol-level documentation;
+in particular, when the MIME types text/xml and application/xml are
+defined, the recommendations of the relevant RFC will supersede
+these rules.
+</p>
+
+</inform-div1>
+
+<inform-div1 id="sec-xml-wg">
+<head>W3C XML Working Group</head>
+<p>This specification was prepared and approved for publication by the
+W3C XML Working Group (WG).  WG approval of this specification does
+not necessarily imply that all WG members voted for its approval.  
+The current and former members of the XML WG are:</p>
+<orglist>
+<member><name>Jon Bosak, Sun</name><role>Chair</role></member>
+<member><name>James Clark</name><role>Technical Lead</role></member>
+<member><name>Tim Bray, Textuality and Netscape</name><role>XML Co-editor</role></member>
+<member><name>Jean Paoli, Microsoft</name><role>XML Co-editor</role></member>
+<member><name>C. M. Sperberg-McQueen, U. of Ill.</name><role>XML
+Co-editor</role></member>
+<member><name>Dan Connolly, W3C</name><role>W3C Liaison</role></member>
+<member><name>Paula Angerstein, Texcel</name></member>
+<member><name>Steve DeRose, INSO</name></member>
+<member><name>Dave Hollander, HP</name></member>
+<member><name>Eliot Kimber, ISOGEN</name></member>
+<member><name>Eve Maler, ArborText</name></member>
+<member><name>Tom Magliery, NCSA</name></member>
+<member><name>Murray Maloney, Muzmo and Grif</name></member>
+<member><name>Makoto Murata, Fuji Xerox Information Systems</name></member>
+<member><name>Joel Nava, Adobe</name></member>
+<member><name>Conleth O'Connell, Vignette</name></member>
+<member><name>Peter Sharpe, SoftQuad</name></member>
+<member><name>John Tigue, DataChannel</name></member>
+</orglist>
+
+</inform-div1>
+</back>
+</spec>
+<!-- Keep this comment at the end of the file
+Local variables:
+mode: sgml
+sgml-default-dtd-file:"~/sgml/spec.ced"
+sgml-omittag:t
+sgml-shorttag:t
+End:
+-->
diff --git a/TC/testcase/res/UTsXml/test/valid/UTF16Entity.xml b/TC/testcase/res/UTsXml/test/valid/UTF16Entity.xml
new file mode 100755 (executable)
index 0000000..8bb29ac
--- /dev/null
@@ -0,0 +1,8 @@
+<!DOCTYPE foo [
+<!ELEMENT foo (root*)>
+<!ELEMENT root EMPTY>
+<!ENTITY utf16b SYSTEM "dtds/utf16b.ent">
+<!ENTITY utf16l SYSTEM "dtds/utf16l.ent">
+]>
+
+<foo> &utf16b; &utf16l; </foo>
diff --git a/TC/testcase/res/UTsXml/test/valid/dia.xml b/TC/testcase/res/UTsXml/test/valid/dia.xml
new file mode 100755 (executable)
index 0000000..3ab3d06
--- /dev/null
@@ -0,0 +1,163 @@
+<?xml version="1.0"?>
+<!DOCTYPE dia:diagram [
+<!ELEMENT dia:diagram (dia:diagramdata, (dia:layer)*) >
+<!ATTLIST dia:diagram
+          xmlns:dia CDATA #FIXED "http://www.lysator.liu.se/~alla/dia/">
+          
+
+<!ELEMENT dia:diagramdata (dia:attribute)* >
+
+<!ELEMENT dia:layer (dia:object | dia:group)*>
+<!ATTLIST dia:layer
+   dia:name CDATA #REQUIRED
+   dia:visible (true|false) #REQUIRED >
+
+<!ELEMENT dia:object ((dia:attribute)*, dia:connections?)>
+<!ATTLIST dia:object
+   dia:type CDATA #REQUIRED
+   dia:version NMTOKEN #REQUIRED
+   dia:id ID #REQUIRED >
+
+<!ELEMENT dia:connections (dia:connection)*>
+
+<!ELEMENT dia:connection EMPTY>
+<!ATTLIST dia:connection
+   dia:handle NMTOKEN #REQUIRED
+   dia:to IDREF #REQUIRED
+   dia:connection NMTOKEN #REQUIRED>
+
+<!ELEMENT dia:group (dia:object | dia:group)*>
+
+<!ELEMENT dia:attribute (dia:composite | dia:int | dia:enum | dia:real | dia:boolean |
+                     dia:color | dia:point | dia:rectangle | dia:string | dia:font)*>
+<!ATTLIST dia:attribute  dia:name CDATA #REQUIRED >
+
+<!ELEMENT dia:composite (dia:attribute)*>
+<!ATTLIST dia:composite  dia:type CDATA #IMPLIED>
+
+<!ELEMENT dia:int EMPTY>
+<!ATTLIST dia:int  dia:val NMTOKEN #REQUIRED>
+
+<!ELEMENT dia:enum EMPTY>
+<!ATTLIST dia:enum  dia:val NMTOKEN #REQUIRED>
+
+<!ELEMENT dia:real EMPTY>
+<!ATTLIST dia:real  dia:val CDATA #REQUIRED>
+
+<!ELEMENT dia:boolean EMPTY>
+<!ATTLIST dia:boolean  dia:val (true|false) #REQUIRED>
+
+<!ELEMENT dia:color EMPTY>
+<!ATTLIST dia:color  dia:val CDATA #REQUIRED>
+
+<!ELEMENT dia:point EMPTY>
+<!ATTLIST dia:point  dia:val CDATA #REQUIRED>
+
+<!ELEMENT dia:rectangle EMPTY>
+<!ATTLIST dia:rectangle  dia:val CDATA #REQUIRED>
+
+<!ELEMENT dia:string EMPTY>
+<!ATTLIST dia:string  dia:val CDATA #IMPLIED>
+
+<!ELEMENT dia:font EMPTY>
+<!ATTLIST dia:font dia:name CDATA #REQUIRED>
+]>
+
+<dia:diagram xmlns:dia="http://www.lysator.liu.se/~alla/dia/">
+  <dia:diagramdata>
+    <dia:attribute dia:name="background">
+      <dia:color dia:val="#ffffff"/>
+    </dia:attribute>
+  </dia:diagramdata>
+  <dia:layer dia:name="Background" dia:visible="true">
+    <dia:object dia:type="Standard - Line" dia:version="0" dia:id="O0">
+      <dia:attribute dia:name="obj_pos">
+        <dia:point dia:val="1.95,6.85"/>
+      </dia:attribute>
+      <dia:attribute dia:name="obj_bb">
+        <dia:rectangle dia:val="1.9,6.8;11,8.55"/>
+      </dia:attribute>
+      <dia:attribute dia:name="conn_endpoints">
+        <dia:point dia:val="1.95,6.85"/>
+        <dia:point dia:val="10.95,8.5"/>
+      </dia:attribute>
+      <dia:attribute dia:name="line_color">
+        <dia:color dia:val="#000000"/>
+      </dia:attribute>
+      <dia:attribute dia:name="line_width">
+        <dia:real dia:val="0.1"/>
+      </dia:attribute>
+      <dia:attribute dia:name="line_style">
+        <dia:enum dia:val="0"/>
+      </dia:attribute>
+      <dia:attribute dia:name="start_arrow">
+        <dia:enum dia:val="0"/>
+      </dia:attribute>
+      <dia:attribute dia:name="end_arrow">
+        <dia:enum dia:val="0"/>
+      </dia:attribute>
+      <dia:connections>
+        <dia:connection dia:handle="1" dia:to="O2" dia:connection="3"/>
+      </dia:connections>
+    </dia:object>
+    <dia:object dia:type="Standard - Text" dia:version="0" dia:id="O1">
+      <dia:attribute dia:name="obj_pos">
+        <dia:point dia:val="4.8,4.75"/>
+      </dia:attribute>
+      <dia:attribute dia:name="obj_bb">
+        <dia:rectangle dia:val="2.579,3.96359;7.021,4.96359"/>
+      </dia:attribute>
+      <dia:attribute dia:name="text">
+        <dia:composite dia:type="text">
+          <dia:attribute dia:name="string">
+            <dia:string dia:val="sdfsdfg"/>
+          </dia:attribute>
+          <dia:attribute dia:name="font">
+            <dia:font dia:name="Courier"/>
+          </dia:attribute>
+          <dia:attribute dia:name="height">
+            <dia:real dia:val="1"/>
+          </dia:attribute>
+          <dia:attribute dia:name="pos">
+            <dia:point dia:val="4.8,4.75"/>
+          </dia:attribute>
+          <dia:attribute dia:name="color">
+            <dia:color dia:val="#000000"/>
+          </dia:attribute>
+          <dia:attribute dia:name="alignment">
+            <dia:enum dia:val="1"/>
+          </dia:attribute>
+        </dia:composite>
+      </dia:attribute>
+    </dia:object>
+    <dia:object dia:type="Standard - Box" dia:version="0" dia:id="O2">
+      <dia:attribute dia:name="obj_pos">
+        <dia:point dia:val="10.95,7.5"/>
+      </dia:attribute>
+      <dia:attribute dia:name="obj_bb">
+        <dia:rectangle dia:val="10.9,7.45;13.05,9.55"/>
+      </dia:attribute>
+      <dia:attribute dia:name="elem_corner">
+        <dia:point dia:val="10.95,7.5"/>
+      </dia:attribute>
+      <dia:attribute dia:name="elem_width">
+        <dia:real dia:val="2.05"/>
+      </dia:attribute>
+      <dia:attribute dia:name="elem_height">
+        <dia:real dia:val="2"/>
+      </dia:attribute>
+      <dia:attribute dia:name="border_width">
+        <dia:real dia:val="0.1"/>
+      </dia:attribute>
+      <dia:attribute dia:name="border_color">
+        <dia:color dia:val="#000000"/>
+      </dia:attribute>
+      <dia:attribute dia:name="inner_color">
+        <dia:color dia:val="#ffffff"/>
+      </dia:attribute>
+      <dia:attribute dia:name="line_style">
+        <dia:enum dia:val="0"/>
+      </dia:attribute>
+    </dia:object>
+  </dia:layer>
+</dia:diagram>
diff --git a/TC/testcase/res/UTsXml/test/valid/dtds/127772.dtd b/TC/testcase/res/UTsXml/test/valid/dtds/127772.dtd
new file mode 100755 (executable)
index 0000000..873fb35
--- /dev/null
@@ -0,0 +1,7 @@
+<!ELEMENT a (b*)>
+
+<!ELEMENT b (#PCDATA)>
+<!ATTLIST b xmlns:xlink  CDATA     #FIXED 'http://www.w3.org/1999/xlink'
+            xlink:type   (simple)  #FIXED 'simple'
+            xlink:href   CDATA     #IMPLIED>
+
diff --git a/TC/testcase/res/UTsXml/test/valid/dtds/NewsMLv1.0.dtd b/TC/testcase/res/UTsXml/test/valid/dtds/NewsMLv1.0.dtd
new file mode 100755 (executable)
index 0000000..5799b29
--- /dev/null
@@ -0,0 +1,1578 @@
+<!-- \r
+                   ===========================================\r
+                   NewsML Document Type Definition Version 1.0\r
+                   ===========================================\r
+                 International Press Telecommunications Council\r
+                                6 October 2000\r
+                            Copyright (c) IPTC, 2000\r
+                              All rights reserved\r
+                         NewsML is a trademark of IPTC\r
+\r
+                     ======================================\r
+                     DO NOT REMOVE THESE LICENCE CONDITIONS\r
+                     ======================================\r
+         LICENCE OF THE IPTC NewsML TRADEMARK TO NON-MEMBERS OF THE IPTC\r
+\r
+Use of the IPTC trademark shall be licensed by the IPTC ("the Licensor") to a\r
+Non-Member ("the Licensee") in consideration of the following obligations\r
+undertaken by the Licensee under the terms of this contract.\r
+\r
+ 1. The Licensee recognises the Licensor as the sole owner of the intellectual\r
+    property protected by the trademark.\r
+\r
+ 2. The Licensee recognises that the Licensor has the right to grant licenses\r
+    of the intellectual property protected by the trademark and has agreed to\r
+    grant such a licence to the Licensee in the terms set out in this contract.\r
+\r
+ 3. The Licensee shall not during the subsistence of this contract or at any\r
+    future time register to use in its own name as proprietor any of the\r
+    intellectual property protected by the trademark. \r
+\r
+ 4. The Licensee shall not claim any right title or interest in the\r
+    intellectual property or any part of it save as is granted by this contract.\r
+\r
+ 5. The Licensee shall immediately call to the attention of the Licensor the use\r
+    of any part of the intellectual property by any third party or any activity\r
+    of any third party which might in the opinion of the Licensee amount to\r
+    infringement of the rights protected by the trademark.\r
+\r
+ 6. The Licensee shall not assign the benefit of this contract or grant any\r
+    sub-licence without the prior written consent of the Licensor.\r
+\r
+ 7. Use of the IPTC trademark is licensed only to those Licensees who comply\r
+    with the requirements of the official published description of NewsML.\r
+\r
+ 8. The Licensee promises to respect the integrity and quality standard of the\r
+    trademark and shall refrain from all acts and omissions which threaten the\r
+    integrity of the trademark as a mark of quality.\r
+\r
+ 9. The Licensee shall communicate immediately to the IPTC any instances of\r
+    actual or suspected misuse or non-compliance with the official published\r
+    description of NewsML which come to the attention of the Licensee.\r
+\r
+10. The Licensee shall, at the request of the IPTC Management Committee acting\r
+    unanimously, accede to any reasonable request of the IPTC to inspect the\r
+    address of the Licensee to verify compliance and each Licensee shall afford\r
+    to the IPTC such assistance as is requested by the IPTC in response to the\r
+    latter's reasonable enquiries in instances of suspected non-compliance with\r
+    the official published description of NewsML requirements.\r
+\r
+The Licensee shall from time to time provide the IPTC with the full address of\r
+its place of business and that place will be deemed the Licensee's address.\r
+\r
+The IPTC reserves the right to terminate the use of the trademark by the\r
+Licensee at any time without notice or without the need to give reasons to the\r
+Licensee for such termination.\r
+\r
+This contract shall be governed and construed in accordance with the laws of\r
+England and Wales whose courts shall be courts of competent jurisdiction.\r
+-->\r
+<!-- \r
+                                ================\r
+                                NOTE ON SPELLING\r
+                                ================\r
+NewsML element and attribute names use US-English spellings. With this\r
+exception, this DTD and its accompanying specification use British English\r
+spellings.\r
+-->\r
+<!-- \r
+                         =============================\r
+                         PARAMETER ENTITY DECLARATIONS \r
+                         =============================\r
+-->\r
+<!-- \r
+================================================================================\r
+                                 Attribute sets \r
+================================================================================\r
+-->\r
+<!-- \r
+================================== assignment ==================================\r
+AssignedBy\r
+==========\r
+An identifier for the party assigning a piece of metadata. This can be a\r
+string that designates the party informally (for example, a person's name),\r
+or a pointer in the form a fragment identifier consisting of a # character\r
+followed by the Duid of a Topic corresponding to the party.\r
+\r
+Importance\r
+==========\r
+An indication of the importance the party assigning a piece of metadata\r
+attaches to it. The value of the Importance attribute is a formal name for a\r
+level of importance. Its meaning and permitted values are determined by a\r
+controlled vocabulary.\r
+\r
+Confidence\r
+==========\r
+An indication of the confidence with which a piece of metadata has been\r
+assigned. The value of the Confidence attribute is a formal name for a\r
+degree of confidence. Its meaning and permitted values are determined by a\r
+controlled vocabulary.\r
+\r
+HowPresent\r
+==========\r
+An indication of the way in which a piece of metadata applies. The value of\r
+the HowPresent attribute is a formal name for the way the metadata applies.\r
+Its meaning and permitted values are determined by a controlled vocabulary.\r
+\r
+DateAndTime\r
+===========\r
+The date and (optionally) time at which a piece of metadata was assigned. \r
+\r
+Uses the format CCYYMMDDTHHMMSS{+or-}HHMM (century, year, month, day, time\r
+separator, hours, minutes, seconds, timezone separator, hours, minutes). If\r
+only the Date is needed, then the substring from T onwards may be omitted.\r
+\r
+This is the Basic Format defined by ISO 8601. CCYY is a 4-digit year number.\r
+MM is a 2-digit month number. DD is a 2-digit day number. T is the letter 'T'.\r
+HH is a 2-digit hour number (using a 24-hour clock). MM is a 2 digit minute\r
+number. (Note that midnight may be represented as 2400 or 240000 on the date\r
+of the day that is ending, or as 0000 or 000000 on the date of the day that is\r
+beginning.)\r
+\r
+{+or-} is the '+' character or the '-' character, and the following HHMM are\r
+hours and minutes of offset from Universal Co-ordinated Time (UTC) as defined\r
+by ISO 8601. If the time is being expressed in UTC, then the timezone offset\r
+may be '+0000' or '-0000'. If the time is behind UTC, the timezone separator\r
+is '-'. If the time is ahead of UTC the timezone separator is '+'.\r
+\r
+Example: 10:27 p.m. in New York on 31 December 2000 would be expressed as \r
+"20001231T222700-0500" as New York is five hours behind UTC in winter.\r
+At the same moment in London, the date and time would be expressed as \r
+time would be expressed as "20010101T032700+0000" or as , "20010101T00+0000", as\r
+in London, it is now 3:27 a.m.  on 1 January 2001. At the same moment in Paris,\r
+the date and time would be expressed as "20010101T042700+0100", as Paris is one\r
+hour ahead of UTC in winter, and it is now 4:27 a.m. on 1 January 2001.\r
+================================================================================\r
+\r
+-->\r
+<!ENTITY % assignment " AssignedBy  CDATA  #IMPLIED\r
+                     Importance  CDATA  #IMPLIED\r
+                     Confidence  CDATA  #IMPLIED\r
+                     HowPresent  CDATA  #IMPLIED\r
+                     DateAndTime CDATA  #IMPLIED">\r
+\r
+<!-- \r
+================================= formalname ===================================\r
+\r
+FormalName\r
+==========\r
+A string of characters whose meaning is determined by a controlled vocabulary.\r
+\r
+Vocabulary\r
+==========\r
+The Vocabulary attribute, if present, provides a pointer to a TopicSet which is\r
+the controlled vocabulary that can be used to resolve the meaning of the\r
+FormalName. The value of the Vocabulary attribute is an http URL or a NewsML\r
+URN, or the # character followed by the value of the Duid attribute of the a\r
+TopicSet in the current document.\r
+\r
+If there is no Vocabulary attribute, then the controlled vocabulary to be used\r
+is located by the following algorithm:\r
+- Proceed to the parent of the current element.\r
+- If it has a Catalog element as its immediate child, see whether that Catalog\r
+  contains a Resource element whose DefaultVocabularyFor child contains an XPath\r
+  pattern that is matched by the current element. If so, then the controlled\r
+  vocabulary is the resource identified by that Resource element.\r
+- If the parent does not meet the above condition, proceed to its parent and\r
+  check the same condition.\r
+- Continue until a vocabulary is found, or no further parent elements are\r
+  available because the root element has been reached and it too fails to meet\r
+  the condition.\r
+\r
+If there is no Vocabulary attribute and the above algorithm fails to identify\r
+a resource that serves as the controlled vocabulary, there is an error, which\r
+the NewsML system may signal to the user.\r
+\r
+The NewsML system may also signal an error if a vocabulary is successfully\r
+identified, but it contains no item that matches the value of the FormalName\r
+whose meaning is sought.\r
+\r
+Scheme\r
+======\r
+The Scheme attribute, if present, serves to distinguish which of possibly\r
+multiple naming schemes in the controlled vocabulary is the one that governs\r
+this FormalName. For a match to be obtained within the controlled vocabulary,\r
+the rule is that the FormalName and the Scheme must both match. If there is\r
+no Scheme attribute on the current element, the match will be to an item in\r
+the vocabulary that has the current formal name and no scheme. If there is a\r
+Scheme attribute on the current element, then both the formal name and the\r
+scheme in the controlled vocabulary must match.\r
+================================================================================\r
+-->\r
+<!ENTITY % formalname " FormalName CDATA  #REQUIRED\r
+                     Vocabulary CDATA  #IMPLIED\r
+                     Scheme     CDATA  #IMPLIED">\r
+\r
+<!-- \r
+=================================== localid ====================================\r
+\r
+Duid\r
+====\r
+Duid is a "Document-unique Identifier". It must satisfy the rules for XML ID\r
+attributes: it must only contain name characters, and it must start with a \r
+name-start character (not a digit). Its value must be unique within any NewsML\r
+document.\r
+\r
+Every NewsML element type has Duid as an optional attribute. Combined with the\r
+Identifier element, providing a value for the Duid of any element in a NewsML\r
+document makes the element globally identifiable. The Identifier element gives\r
+global identification to the document, and the Duid provides local\r
+identification for the element within the document.\r
+\r
+Euid\r
+====\r
+Euid is an "Element-unique Identifier". Its value must be unique among elements\r
+of the same element-type and having the same parent element.\r
+\r
+Use of Euid attribute makes it possible to identify any NewsML element within\r
+the context of its local branch of the NewsML document tree. This makes it\r
+possible to copy, or include by reference, subtrees into new combinations in\r
+ways that would break the uniqueness of Duids (thereby forcing new Duids to be\r
+allocated), but still being able to retain the identity of each element. If\r
+Euids are maintained at every level, it is possible to identify, for example\r
+"The ContentItem whose Euid is abc within the NewsComponent whose Euid is def".\r
+Such identification patterns would be preserved even after "pruning and\r
+grafting" of subtrees.\r
+================================================================================\r
+-->\r
+<!ENTITY % localid " Duid ID     #IMPLIED\r
+                     Euid CDATA  #IMPLIED">\r
+\r
+<!-- \r
+================================================================================\r
+                                 Content Models \r
+================================================================================\r
+-->\r
+<!-- \r
+===================================== data =====================================\r
+Where data is included, it may be directly in the form of a DataContent element,\r
+or in the form of DataContent wrapped in an Encoding element, or by reference\r
+through an Href attribute, in which case neither a DataContent nor an Encoding\r
+element will be present.\r
+================================================================================\r
+-->\r
+<!ENTITY % data " (Encoding\r
+                 | DataContent )?">\r
+\r
+<!-- \r
+==================================== party =====================================\r
+Person, organisation or company playing a specific role in the\r
+news workflow. The role being played is determined by the parent element. More\r
+information about it can be provided in the optional Comment subelements. \r
+================================================================================\r
+\r
+-->\r
+<!ENTITY % party " (Comment*\r
+                  , Party+ )">\r
+\r
+<!-- \r
+                           =========================\r
+                           ELEMENT TYPE DECLARATIONS \r
+                           =========================\r
+-->\r
+<!-- \r
+============================ AdministrativeMetadata ============================\r
+Information about the provenance of a NewsComponent. \r
+================================================================================\r
+-->\r
+<!ELEMENT AdministrativeMetadata  (Catalog? , FileName? , SystemIdentifier? , Provider? , Creator? , Source* , Contributor* , Property* )>\r
+<!ATTLIST AdministrativeMetadata  %localid; >\r
+<!-- \r
+\r
+================================ AssociatedWith ================================\r
+A reference to a NewsItem with which this one is associated (for example, a\r
+series of articles, or a collection of photos, of which it is a part). The \r
+NewsItem attribute identifies the relevant NewsItem. Its value can be an\r
+http URL or a NewsML URN as described in the comment to PublicIdentifier. The\r
+Comment can be used to indicate the nature of the association.\r
+================================================================================\r
+\r
+-->\r
+<!ELEMENT AssociatedWith  (Comment* )>\r
+<!ATTLIST AssociatedWith  %localid;\r
+                          NewsItem CDATA  #IMPLIED >\r
+<!-- \r
+================================ BasisForChoice ================================\r
+The content of this element is an XPath statement or element-type name\r
+identifying information within each NewsComponent or ContentItem that can be\r
+used as a basis for choice between equivalent NewsComponents or ContentItems.\r
+The root of the XPath corresponds to the NewsComponent or ContentItem itself.\r
+The optional Rank attribute allows providers to place a numerical order on the\r
+importance they think should be attached to the different bases for choice.\r
+Smaller numbers represent higher importance.\r
+================================================================================\r
+-->\r
+<!ELEMENT BasisForChoice  (#PCDATA )>\r
+<!ATTLIST BasisForChoice  %localid;\r
+                          Rank    CDATA  #IMPLIED >\r
+<!-- \r
+\r
+==================================== ByLine ====================================\r
+A natural-language statement of the author/creator information.\r
+================================================================================\r
+-->\r
+<!ELEMENT ByLine  (#PCDATA | Origin )*>\r
+<!ATTLIST ByLine  %localid;\r
+                  xml:lang CDATA  #IMPLIED >\r
+<!-- \r
+=================================== Catalog ====================================\r
+A container for Resource and TopicUse elements. Resource elements map URNs to\r
+URLs and indicate default vocabularies which apply to the formal names of\r
+certain elements within the subtree that begins with the immediate parent of\r
+the Catalog element. TopicUse elements indicate where in the NewsML document\r
+certain Topics are used. The optional Href attribute provides a pointer to\r
+a Catalog element elsewhere in this or another document. Its value consists of\r
+a # character followed by the value of the Duid attribute of the referenced\r
+Catalog element and preceded, if the referenced Catalog is not in the current\r
+document, by an http URL or a NewsML URN identifying the document or NewsItem\r
+in which the Catalog appears. If the Href attribute is present on a Catalog\r
+element, then that element should be empty. If it contains subelements, the\r
+NewsML system may signal an error.\r
+================================================================================\r
+-->\r
+<!ELEMENT Catalog  (Resource* , TopicUse* )>\r
+<!ATTLIST Catalog  %localid;\r
+                   Href    CDATA  #IMPLIED >\r
+<!-- \r
+=============================== Characteristics ================================\r
+Information about the physical characteristics of a ContentItem.\r
+================================================================================\r
+-->\r
+<!ELEMENT Characteristics  (SizeInBytes? , Property* )>\r
+<!ATTLIST Characteristics  %localid; >\r
+<!-- \r
+=================================== Comment ====================================\r
+A natural-language description of, or statement about, the current element. The\r
+optional TranslationOf attribute is a pointer to another Comment element, of\r
+which this one is a direct translation.\r
+================================================================================\r
+-->\r
+<!ELEMENT Comment  (#PCDATA )>\r
+<!ATTLIST Comment  %localid;\r
+                   xml:lang      CDATA  #IMPLIED\r
+                   TranslationOf IDREF  #IMPLIED >\r
+<!-- \r
+================================= ContentItem ==================================\r
+A news object that carries or identifies content intended for presentation to\r
+humans.\r
+================================================================================\r
+-->\r
+<!ELEMENT ContentItem  (Comment* , Catalog? , MediaType? , Format? , MimeType? , Notation? , Characteristics? , %data; )>\r
+<!ATTLIST ContentItem  %localid;\r
+                       Href    CDATA  #IMPLIED >\r
+<!-- \r
+================================= Contributor ==================================\r
+An individual and/or company or organisation that modified or enhanced a news\r
+object after its creation.\r
+================================================================================\r
+-->\r
+<!ELEMENT Contributor  (%party; )>\r
+<!ATTLIST Contributor  %localid; >\r
+<!-- \r
+================================== Copyright ===================================\r
+The copyright that pertains to a news object.\r
+================================================================================\r
+-->\r
+<!ELEMENT Copyright  (Comment* , CopyrightHolder , CopyrightDate )>\r
+<!ATTLIST Copyright  %localid;\r
+                     %assignment; >\r
+<!-- \r
+================================ CopyrightDate =================================\r
+A natural-language statement of the copyright date.\r
+================================================================================\r
+\r
+-->\r
+<!ELEMENT CopyrightDate  (#PCDATA | Origin )*>\r
+<!ATTLIST CopyrightDate  %localid;\r
+                         xml:lang CDATA  #IMPLIED >\r
+<!-- \r
+=============================== CopyrightHolder ================================\r
+A natural-language statement indicating who owns the copyright.\r
+================================================================================\r
+-->\r
+<!ELEMENT CopyrightHolder  (#PCDATA | Origin )*>\r
+<!ATTLIST CopyrightHolder  %localid;\r
+                           xml:lang CDATA  #IMPLIED >\r
+<!-- \r
+================================ CopyrightLine =================================\r
+A natural-language statement of the copyright information.\r
+================================================================================\r
+-->\r
+<!ELEMENT CopyrightLine  (#PCDATA | Origin )*>\r
+<!ATTLIST CopyrightLine  %localid;\r
+                         xml:lang CDATA  #IMPLIED >\r
+<!-- \r
+=================================== Creator ====================================\r
+An individual and/or company or organisation that created a news object.\r
+================================================================================\r
+-->\r
+<!ELEMENT Creator  (%party; )>\r
+<!ATTLIST Creator  %localid; >\r
+<!-- \r
+================================== CreditLine ==================================\r
+A natural-language statement of credit information.\r
+================================================================================\r
+-->\r
+<!ELEMENT CreditLine  (#PCDATA | Origin )*>\r
+<!ATTLIST CreditLine  %localid;\r
+                      xml:lang CDATA  #IMPLIED >\r
+<!-- \r
+================================= DataContent ==================================\r
+The data that carries the content of a ContentItem.\r
+================================================================================\r
+-->\r
+<!ELEMENT DataContent ANY>\r
+<!ATTLIST DataContent  %localid; >\r
+<!-- \r
+================================= DateAndTime ==================================\r
+A formal representation of a date and, optionally, time, expressed in ISO 8601\r
+Basic Format, as described in the comment to the DateAndTime attribute within\r
+the assignment ENTITY declaration above.\r
+================================================================================\r
+-->\r
+<!ELEMENT DateAndTime  (#PCDATA )>\r
+<!ATTLIST DateAndTime  %localid; >\r
+<!-- \r
+==================================== DateId ====================================\r
+A date identifier of a NewsItem in short ISO 8601 Basic Format (CCYYMMDD), as\r
+described in the comment to the DateAndTime attribute within the assignment\r
+ENTITY declaration above. The DateId is part of the formal identification of the\r
+NewsItem, and must remain the same through successive revisions of the same\r
+NewsItem.\r
+================================================================================\r
+-->\r
+<!ELEMENT DateId  (#PCDATA )>\r
+\r
+<!-- \r
+================================== DateLabel ===================================\r
+A string representation of a date or date and time, used by human users to help\r
+identify a NewsItem.\r
+================================================================================\r
+-->\r
+<!ELEMENT DateLabel  (#PCDATA )>\r
+<!ATTLIST DateLabel  %localid; >\r
+<!--\r
+=================================== DateLine ===================================\r
+A natural-language statement of the date and/or place of creation.\r
+================================================================================\r
+-->\r
+<!ELEMENT DateLine  (#PCDATA | Origin )*>\r
+<!ATTLIST DateLine  %localid;\r
+                    xml:lang CDATA  #IMPLIED >\r
+<!-- \r
+============================ DefaultVocabularyFor ==============================\r
+An indication that the parent Resource provides the default vocabulary that\r
+determines the meanings and permitted values of the data occurring in a\r
+particular part of a NewsML document subtree. The Context attribute is an\r
+XPath statement identifying the data to which the default vocabulary applies.\r
+The optional Scheme attribute identifies the relevant naming scheme if the\r
+Resource contains more than one naming scheme. If the Resource is a NewsML\r
+TopicSet, then the meaning of the data identified by the Context is provided\r
+by the Topic whose FormalName subelement matches that data. If the Resource is\r
+not a NewsML TopicSet, then the way in which it is interpreted in order to\r
+provide a meaning for the data is not defined by NewsML but by the authority\r
+that governs whatever format the Resource uses.\r
+\r
+Example:\r
+<DescriptiveMetadata>\r
+ <Catalog>\r
+  <Resource Duid="resource1">\r
+   <Urn>urn:newsml:iptc.org:20001006:Ranking:1</Urn>\r
+   <Url>www.iptc.com/vocabularies/iptc-rank.xml</Url>\r
+   <DefaultVocabularyFor Context="@Confidence"/>\r
+   <DefaultVocabularyFor Context="@Importance"/>\r
+  </Resource>\r
+  <Resource Duid="resource2">\r
+   <Urn>urn:newsml:iptc.org:20001006:TopicTypes:1</Urn>\r
+   <Url>www.iptc.com/vocabularies/iptc-topictype.xml</Url>\r
+   <DefaultVocabularyFor Context="TopicType@FormalName"/>\r
+  </Resource>\r
+ </Catalog>\r
+ <TopicSet>\r
+  <Topic Duid="topic1">\r
+   <TopicType FormalName="Person">\r
+   <Description Variant="Name">Bill Clinton</Description>\r
+   <Description Variant="Position">President of the USA</Description>\r
+  </Topic>\r
+ </TopicSet>\r
+ <TopicOccurrence\r
+  AssignedBy="Desk Editor"\r
+  Confidence="High"\r
+  HowPresent="principal subject"\r
+  Topic="#topic1"/>\r
+</DescriptiveMetadata>\r
+================================================================================\r
+-->\r
+<!ELEMENT DefaultVocabularyFor EMPTY>\r
+<!ATTLIST DefaultVocabularyFor  %localid;\r
+                                Context CDATA  #REQUIRED\r
+                                Scheme  CDATA  #IMPLIED >\r
+<!--\r
+==================================== Delete ====================================\r
+An instruction to delete an element within a NewsItem. The NewsItem is\r
+the previous revision of the current one, and the element to be deleted is the\r
+one whose Duid value is equal to the value of the Delete element's DuidRef\r
+attribute.\r
+================================================================================\r
+-->\r
+<!ELEMENT Delete EMPTY>\r
+<!ATTLIST Delete  %localid;\r
+                  DuidRef CDATA  #REQUIRED >\r
+<!-- \r
+================================= DerivedFrom ==================================\r
+A reference to an NewsItem from which this one is derived. The NewsItem attribute\r
+identifies the relevant NewsItem. Its value can be an http URL or a NewsML URN\r
+as described in the comment to PublicIdentifier.\r
+================================================================================\r
+-->\r
+<!ELEMENT DerivedFrom  (Comment* )>\r
+<!ATTLIST DerivedFrom  %localid;\r
+                       NewsItem CDATA  #IMPLIED >\r
+<!-- \r
+================================= Description ==================================\r
+A description that identifies a Topic, thereby indicating the meaning of a\r
+formal name associated with that Topic. The xml:lang attribute indicates what\r
+language the description is in. The optional Variant attribute allows multiple\r
+descriptions to be given in the same language, and meaningfully distinguished\r
+from one another.\r
+================================================================================\r
+-->\r
+<!ELEMENT Description  (#PCDATA )>\r
+<!ATTLIST Description  %localid;\r
+                       xml:lang CDATA  #IMPLIED\r
+                       Variant  CDATA  #IMPLIED >\r
+<!-- \r
+============================= DescriptiveMetadata ==============================\r
+Information describing the content of a NewsComponent. \r
+================================================================================\r
+-->\r
+<!ELEMENT DescriptiveMetadata  (Catalog? , Language* , Genre? , SubjectCode* , OfInterestTo* , TopicOccurrence* , Property* )>\r
+<!ATTLIST DescriptiveMetadata  %localid;\r
+                               %assignment; >\r
+<!-- \r
+=================================== Encoding ===================================\r
+The encoding of the data comprising the content of a ContentItem. \r
+================================================================================\r
+-->\r
+<!ELEMENT Encoding %data;>\r
+<!ATTLIST Encoding  %localid;\r
+                    Notation CDATA  #REQUIRED >\r
+<!-- \r
+=================================== EndDate ====================================\r
+A natural-language statement of the date at which specified usage rights come\r
+to an end.\r
+================================================================================\r
+-->\r
+<!ELEMENT EndDate  (#PCDATA | Origin )*>\r
+<!ATTLIST EndDate  %localid;\r
+                   xml:lang   CDATA  #IMPLIED\r
+                   %assignment; >\r
+<!-- \r
+=================================== FileName ===================================\r
+The suggested or actual storage file name for a NewsItem. \r
+================================================================================\r
+-->\r
+<!ELEMENT FileName  (#PCDATA )>\r
+<!ATTLIST FileName  %localid; >\r
+<!-- \r
+================================= FirstCreated =================================\r
+The date and, optionally, time at which a NewsItem was first created, expressed\r
+in ISO 8601 Basic Format, as described in the comment to the DateAndTime\r
+attribute within the assignment ENTITY declaration above.\r
+================================================================================\r
+-->\r
+<!ELEMENT FirstCreated  (#PCDATA )>\r
+<!ATTLIST FirstCreated  %localid; >\r
+<!-- \r
+================================= FormalName ===================================\r
+A string of characters whose meaning is determined by a naming scheme within a\r
+controlled vocabulary. The controlled vocabulary may (but is not required to)\r
+take the form of a NewsML TopicSet. The optional Scheme attribute determines\r
+which naming scheme applies, when several exist within the same controlled\r
+vocabulary.\r
+================================================================================\r
+-->\r
+<!ELEMENT FormalName  (#PCDATA )>\r
+<!ATTLIST FormalName  %localid;\r
+                      Scheme  CDATA  #IMPLIED >\r
+<!-- \r
+==================================== Format ====================================\r
+An indication of the format of a ContentItem. The value of the FormalName\r
+attribute is a formal name for the Format. Its meaning and permitted values are\r
+determined by a controlled vocabulary as described in the comment to the\r
+formalname ENTITY declaration above.\r
+================================================================================\r
+-->\r
+<!ELEMENT Format EMPTY>\r
+<!ATTLIST Format  %localid;\r
+                  %formalname; >\r
+<!-- \r
+================================= FutureStatus =================================\r
+An indication of the status a NewsItem will have at a specified future date. The\r
+value of the FormalName attribute is a formal name for the FutureStatus. Its\r
+meaning is determined by a controlled vocabulary as described in the comment\r
+to the formalname ENTITY declaration above.\r
+================================================================================\r
+-->\r
+<!ELEMENT FutureStatus EMPTY>\r
+<!ATTLIST FutureStatus  %localid;\r
+                        %formalname; >\r
+<!-- \r
+==================================== Genre =====================================\r
+An indication of the Genre of a NewsComponent. The value of the FormalName\r
+attribute is a formal name for the Genre. Its meaning and permitted values are\r
+determined by a controlled vocabulary as described in the comment to the\r
+formalname ENTITY declaration above.\r
+================================================================================\r
+-->\r
+<!ELEMENT Genre EMPTY>\r
+<!ATTLIST Genre  %localid;\r
+                 %formalname;\r
+                 %assignment; >\r
+<!-- \r
+================================== Geography ===================================\r
+A natural-language statement of the geographical area or areas to which\r
+specified usage rights apply.\r
+================================================================================\r
+-->\r
+<!ELEMENT Geography  (#PCDATA | Origin )*>\r
+<!ATTLIST Geography  %localid;\r
+                     xml:lang   CDATA  #IMPLIED\r
+                     %assignment; >\r
+<!-- \r
+=================================== HeadLine ===================================\r
+A displayable headline.\r
+================================================================================\r
+-->\r
+<!ELEMENT HeadLine  (#PCDATA | Origin )*>\r
+<!ATTLIST HeadLine  %localid;\r
+                    xml:lang CDATA  #IMPLIED >\r
+<!-- \r
+================================ Identification ================================\r
+Identification information for the NewsItem.\r
+================================================================================\r
+-->\r
+<!ELEMENT Identification  (NewsIdentifier , NameLabel? , DateLabel? , Label* )>\r
+<!ATTLIST Identification  %localid; >\r
+<!--\r
+================================= InsertAfter ==================================\r
+An instruction to insert content after a designated element within a NewsItem.\r
+The content to be inserted is the content of the InsertAfter element. The\r
+NewsItem into which it is to be inserted is the previous revision of the current\r
+one, and the element after which it is to be inserted is the one whose Duid\r
+value is equal to the value of the InsertAfter element's DuidRef attribute.\r
+================================================================================\r
+-->\r
+<!ELEMENT InsertAfter ANY>\r
+<!ATTLIST InsertAfter  %localid;\r
+                       DuidRef CDATA  #REQUIRED >\r
+<!--\r
+================================= InsertBefore =================================\r
+An instruction to insert content before a designated element within a NewsItem.\r
+The content to be inserted is the content of the InsertBefore element. The\r
+NewsItem into which it is to be inserted is the previous revision of the current\r
+one, and the element before which it is to be inserted is the one whose Duid\r
+value is equal to the value of the InsertBefore element's DuidRef attribute.\r
+================================================================================\r
+-->\r
+<!ELEMENT InsertBefore ANY>\r
+<!ATTLIST InsertBefore  %localid;\r
+                        DuidRef CDATA  #REQUIRED >\r
+<!--\r
+================================= Instruction ==================================\r
+An instruction from a news provider to the recipient of a NewsItem. A special\r
+case of Instruction is an indication of the effect the current revision of a\r
+NewsItem has on the status of any previous revisions of the NewsItem that may\r
+still be on the recipient's system. In this case, it will contain one or more\r
+RevisionStatus elements. Otherwise, the value of the FormalName attribute is a\r
+formal name for the Instruction, and its meaning is determined by a controlled\r
+vocabulary as described in the comment to the formalname ENTITY declaration\r
+above.\r
+================================================================================\r
+-->\r
+<!ELEMENT Instruction  (RevisionStatus* )>\r
+<!ATTLIST Instruction  %localid;\r
+                       %formalname; >\r
+<!-- \r
+================================= KeywordLine ==================================\r
+A displayable set of keywords relevant to a news object. This can be used by a\r
+NewsML system to assist manual or automated searches.\r
+================================================================================\r
+-->\r
+<!ELEMENT KeywordLine  (#PCDATA | Origin )*>\r
+<!ATTLIST KeywordLine  %localid;\r
+                       xml:lang CDATA  #IMPLIED >\r
+<!-- \r
+==================================== Label =====================================\r
+A human-readable label for a NewsItem.\r
+================================================================================\r
+-->\r
+<!ELEMENT Label  (LabelType , LabelText )>\r
+<!ATTLIST Label  %localid; >\r
+<!-- \r
+=================================== LabelText ==================================\r
+The text that constitutes a Label of a given LabelType.\r
+================================================================================\r
+-->\r
+<!ELEMENT LabelText  (#PCDATA )>\r
+<!ATTLIST LabelText  %localid; >\r
+<!-- \r
+================================= LabelType ====================================\r
+A user-defined type of label. The value of the FormalName attribute is a formal\r
+name for the LabelType. Its meaning and permitted values are determined by a\r
+controlled vocabulary as described in the comment to the formalname ENTITY\r
+declaration above.\r
+================================================================================\r
+-->\r
+<!ELEMENT LabelType EMPTY>\r
+<!ATTLIST LabelType  %localid;\r
+                     %formalname; >\r
+<!-- \r
+=================================== Language ===================================\r
+An indication of the, or a, language used in a content item. The value of the\r
+FormalName attribute is a formal name for the Language. Its meaning and\r
+permitted values are determined by a controlled vocabulary as described in the\r
+comment to the formalname ENTITY declaration above.\r
+================================================================================\r
+-->\r
+<!ELEMENT Language EMPTY>\r
+<!ATTLIST Language  %localid;\r
+                    %formalname;\r
+                    %assignment; >\r
+<!-- \r
+================================= Limitations ==================================\r
+A natural-language statement of the terms and conditions that apply to the\r
+specified usage rights.\r
+================================================================================\r
+-->\r
+<!ELEMENT Limitations  (#PCDATA | Origin )*>\r
+<!ATTLIST Limitations  %localid;\r
+                       xml:lang   CDATA  #IMPLIED\r
+                       %assignment; >\r
+<!-- \r
+================================== MediaType ===================================\r
+An indication of the media type of a ContentItem. The value of the FormalName\r
+attribute is a formal name for the MediaType. Its meaning and permitted values\r
+are determined by a controlled vocabulary as described in the comment to the\r
+formalname ENTITY declaration above.\r
+================================================================================\r
+-->\r
+<!ELEMENT MediaType EMPTY>\r
+<!ATTLIST MediaType  %localid;\r
+                     %formalname; >\r
+<!-- \r
+=================================== Metadata ===================================\r
+An container for a user-defined type of metadata.\r
+================================================================================\r
+-->\r
+<!ELEMENT Metadata  (Catalog? , MetadataType , Property+ )>\r
+<!ATTLIST Metadata  %localid; >\r
+<!-- \r
+=============================== MetadataType ===================================\r
+An indication of the type of metadata that is represented by the Property\r
+elements within this Metadata element. The value of the FormalName attribute is\r
+a formal name for the MetadataType. Its meaning and permitted values are\r
+determined by a controlled vocabulary as described in the comment to the\r
+formalname ENTITY declaration above.\r
+================================================================================\r
+-->\r
+<!ELEMENT MetadataType EMPTY>\r
+<!ATTLIST MetadataType  %localid;\r
+                        %formalname; >\r
+<!-- \r
+=================================== MimeType ===================================\r
+An indication of the MIME-type of a ContentItem. The value of the FormalName\r
+attribute is a formal name for the MimeType. Its meaning and permitted values\r
+are determined by a controlled vocabulary as described in the comment to the\r
+formalname ENTITY declaration above.\r
+================================================================================\r
+-->\r
+<!ELEMENT MimeType EMPTY>\r
+<!ATTLIST MimeType  %localid;\r
+                    %formalname; >\r
+<!-- \r
+================================== NameLabel ===================================\r
+A string used by human users as a name to help identify a NewsItem. Its form is\r
+determined by the provider. It might be identical to the textual content of\r
+the SlugLine element, for example, but even if this is so, the system should not\r
+process the NameLabel as a slugline. Nothing can be assumed about the nature of\r
+the string within NameLabel beyond the fact that it can help to identify the\r
+NewsItem to humans.\r
+================================================================================\r
+-->\r
+<!ELEMENT NameLabel  (#PCDATA )>\r
+<!ATTLIST NameLabel  %localid; >\r
+<!-- \r
+================================ NewsComponent =================================\r
+A container for news objects, used to identify the role of news objects in\r
+relation to one another, and to ascribe metadata to them. The Essential\r
+attribute indicates whether the provider considers that this NewsComponent\r
+is essential to the meaning of the NewsComponent within which it is contained.\r
+The EquivalentsList attribute indicates whether or not the NewsItems or\r
+NewsItemRefs, NewsComponents or ContentItems contained within this one are\r
+equivalent to one another in content and/or meaning\r
+================================================================================\r
+-->\r
+<!ELEMENT NewsComponent  (Comment* , Catalog? , TopicSet* , Role? , BasisForChoice* , NewsLines? , AdministrativeMetadata? , RightsMetadata? , DescriptiveMetadata? , Metadata* ,  ( (NewsItem | NewsItemRef )+ | NewsComponent+ | ContentItem+ )? )>\r
+<!ATTLIST NewsComponent  %localid;\r
+                         Essential        (yes | no )  'no'\r
+                         EquivalentsList  (yes | no )  'no'\r
+                         xml:lang        CDATA  #IMPLIED >\r
+<!-- \r
+================================= NewsEnvelope =================================\r
+Information about the transmission of one or more NewsItems as a NewsML\r
+document.\r
+================================================================================\r
+-->\r
+<!ELEMENT NewsEnvelope  (TransmissionId? , SentFrom? , SentTo? , DateAndTime , NewsService* , NewsProduct* , Priority? )>\r
+<!ATTLIST NewsEnvelope  %localid; >\r
+<!-- \r
+================================ NewsIdentifier ================================\r
+A globally unique identifier for a NewsItem. \r
+================================================================================\r
+-->\r
+<!ELEMENT NewsIdentifier  (ProviderId , DateId , NewsItemId , RevisionId , PublicIdentifier )>\r
+\r
+<!-- \r
+=================================== NewsItem ===================================\r
+A managed set of information representing a point of view, at a given time, on\r
+some event or events. Its Identification and NewsManagement provide\r
+manageability. It may contain either a NewsComponent, or one or more Updates\r
+that modify aspects of a previous Revision of the same NewsItem, or a\r
+TopicSet.\r
+================================================================================\r
+-->\r
+<!ELEMENT NewsItem  (Comment* , Catalog? , Identification , NewsManagement ,  (NewsComponent | Update+ | TopicSet )? )>\r
+<!ATTLIST NewsItem  %localid;\r
+                    xml:lang CDATA  #IMPLIED >\r
+<!-- \r
+================================== NewsItemId ==================================\r
+An identifier for the NewsItem. The combination of NewsItemId and DateId must\r
+be unique among NewsItems that emanate from the same provider. Within these\r
+constraints, the NewsItemId can take any form the provider wishes. It may take\r
+the form of a name for the NewsItem that will be meaningful to humans, but this\r
+is not a requirement. The provider may optionally relate the values of\r
+NewsItemId to a controlled vocabulary, which is invoked by the Vocabulary\r
+attribute. The value ofthe Vocabulary attribute may be an http URL, a NewsML\r
+URN, or the # character followed by the value of the Duid attribute of a\r
+TopicSet in the current document. The Scheme attribute, if present, serves to\r
+distinguish which of possibly multiple naming schemes in the controlled\r
+vocabulary is the one that governs the NewsItemId.\r
+================================================================================\r
+-->\r
+<!ELEMENT NewsItemId  (#PCDATA )>\r
+<!ATTLIST NewsItemId  Vocabulary CDATA  #IMPLIED\r
+                      Scheme     CDATA  #IMPLIED >\r
+<!-- \r
+================================= NewsItemRef ==================================\r
+A pointer to a NewsItem that is deemed to replace the NewsItemRef element. The\r
+NewsItem attribute is a pointer to the relevant NewsItem. Its value can be an\r
+http URL, or a NewsML URN as described in the comment to PublicIdentifier, or a\r
+fragment identifier consisting of a # character followed by the Duid of a\r
+NewsItem in the current document.\r
+================================================================================\r
+-->\r
+<!ELEMENT NewsItemRef  (Comment* )>\r
+<!ATTLIST NewsItemRef  %localid;\r
+                       NewsItem CDATA  #IMPLIED >\r
+<!--\r
+================================= NewsItemType =================================\r
+An indication of the type of a NewsItem. The value of the FormalName attribute\r
+is a formal name for the NewsItemType. Its meaning and permitted values are\r
+determined by a controlled vocabulary as described in the comment to the\r
+formalname ENTITY declaration above.\r
+================================================================================\r
+-->\r
+<!ELEMENT NewsItemType EMPTY>\r
+<!ATTLIST NewsItemType  %localid;\r
+                        %formalname; >\r
+<!-- \r
+=================================== NewsLine ===================================\r
+A newsline of a type not included in the NewsML specification.\r
+================================================================================\r
+-->\r
+<!ELEMENT NewsLine  (NewsLineType , NewsLineText+ )>\r
+<!ATTLIST NewsLine  %localid; >\r
+<!-- \r
+=================================== NewsLineText ===================================\r
+The text of a NewsLine of user-defined type.\r
+================================================================================\r
+-->\r
+<!ELEMENT NewsLineText  (#PCDATA | Origin )*>\r
+<!ATTLIST NewsLineText  %localid;\r
+                        xml:lang CDATA  #IMPLIED >\r
+<!-- \r
+================================ NewsLineType ==================================\r
+An indication of a user-defined NewsLine type. The value of the FormalName\r
+attribute is a formal name for the NewsLineType. Its meaning and permitted\r
+values are determined by a controlled vocabulary as described in the comment\r
+to the formalname ENTITY declaration above.\r
+================================================================================\r
+-->\r
+<!ELEMENT NewsLineType EMPTY>\r
+<!ATTLIST NewsLineType  %localid;\r
+                        %formalname; >\r
+<!-- \r
+================================== NewsLines ===================================\r
+A container for all the NewsLines that a NewsComponent has.\r
+================================================================================\r
+-->\r
+<!ELEMENT NewsLines  ( (HeadLine , SubHeadLine? )* , ByLine* , DateLine* , CreditLine* , CopyrightLine* , RightsLine* , SeriesLine* , SlugLine* , KeywordLine* , NewsLine* )>\r
+<!ATTLIST NewsLines  %localid; >\r
+<!-- \r
+================================ NewsManagement ================================\r
+Information relevant to the management of a NewsItem.\r
+================================================================================\r
+-->\r
+<!ELEMENT NewsManagement  (NewsItemType , FirstCreated , ThisRevisionCreated , Status , StatusWillChange? , Urgency? , RevisionHistory? , DerivedFrom* , AssociatedWith* , Instruction* , Property* )>\r
+<!ATTLIST NewsManagement  %localid; >\r
+<!-- \r
+==================================== NewsML ====================================\r
+A NewsML document, which must contain a NewsEnvelope and one or more NewsItems,\r
+and may include a Catalog element and a TopicSet element.\r
+================================================================================\r
+-->\r
+<!ELEMENT NewsML  (Catalog? , TopicSet* ,  (NewsEnvelope , NewsItem+ ) )>\r
+<!ATTLIST NewsML  %localid; >\r
+<!-- \r
+================================= NewsProduct ==================================\r
+An identifier for a product to which all the NewsItems in a NewsML document\r
+belong. The value of the FormalName attribute is a formal name for the\r
+NewsProduct. Its meaning and permitted values are determined by a controlled\r
+vocabulary as described in the comment to the formalname ENTITY declaration\r
+above.\r
+================================================================================\r
+-->\r
+<!ELEMENT NewsProduct EMPTY>\r
+<!ATTLIST NewsProduct  %localid;\r
+                       %formalname; >\r
+<!-- \r
+================================= NewsService ==================================\r
+An identifier for a service to which all the NewsItems in a NewsML document\r
+belong. The value of the FormalName attribute is a formal name for the\r
+NewsService. Its meaning and permitted values are determined by a controlled\r
+vocabulary as described in the comment to the formalname ENTITY declaration\r
+above.\r
+================================================================================\r
+-->\r
+<!ELEMENT NewsService EMPTY>\r
+<!ATTLIST NewsService  %localid;\r
+                       %formalname; >\r
+<!-- \r
+=================================== Notation ===================================\r
+An indication of the notation of a ContentItem. The value of the FormalName\r
+attribute is a formal name for the Notation. Its meaning and permitted values\r
+are determined by a controlled vocabulary as described in the comment to the\r
+formalname ENTITY declaration above.\r
+================================================================================\r
+-->\r
+<!ELEMENT Notation EMPTY>\r
+<!ATTLIST Notation  %localid;\r
+                    %formalname; >\r
+<!-- \r
+================================= OfInterestTo =================================\r
+An indication of the target audience of a NewsItem. The value of the FormalName\r
+attribute is a formal name for the target audience. Its meaning and permitted\r
+values are determined by a controlled vocabulary as described in the comment to\r
+the formalname ENTITY declaration above.\r
+================================================================================\r
+-->\r
+<!ELEMENT OfInterestTo  (Relevance? )>\r
+<!ATTLIST OfInterestTo  %localid;\r
+                        %formalname;\r
+                        %assignment; >\r
+<!-- \r
+==================================== Origin ====================================\r
+A wrapper for all or part of the text of a piece of text, which provides a\r
+pointer to an item of data corresponding formally to what is being described\r
+here in natural language. The Href attribute identifies the relevant data, and\r
+may be an http URL or a NewsML URN as described in the comment to\r
+PublicIdentifier, optionally including a fragment identifier. Alternatively, it\r
+can be a simple fragment identifier consisting of a # character followed by the\r
+value of the Duid of an element in the current document.\r
+================================================================================\r
+-->\r
+<!ELEMENT Origin  (#PCDATA | Origin )*>\r
+<!ATTLIST Origin  %localid;\r
+                  %assignment;\r
+                  Href       CDATA  #IMPLIED >\r
+<!-- \r
+=================================== Party ======================================\r
+An indication of the person, company or organisation that has a particular\r
+relationship to this NewsItem in the news workflow. The value of the FormalName\r
+attribute is a formal name for the Party. Its meaning and permitted values\r
+are determined by a controlled vocabulary as described in the comment to the\r
+formalname ENTITY declaration above.\r
+================================================================================\r
+-->\r
+<!ELEMENT Party EMPTY>\r
+<!ATTLIST Party  %localid;\r
+                 %formalname;\r
+                 Topic      CDATA  #IMPLIED >\r
+<!-- \r
+=================================== Priority ===================================\r
+An indication of the priority notation of a NewsItem. The value of the\r
+FormalName attribute is a formal name for the Priority. Its meaning and\r
+permitted values are determined by a controlled vocabulary as described in\r
+the comment to the formalname ENTITY declaration above.\r
+================================================================================\r
+-->\r
+<!ELEMENT Priority EMPTY>\r
+<!ATTLIST Priority  %localid;\r
+                    %formalname; >\r
+<!-- \r
+=================================== Property ===================================\r
+A property of a NewsComponent or of a Topic. The property has a name and either\r
+a simple Value or a complex value consisting of a set of further properties.\r
+\r
+Value\r
+=====\r
+A string representation of the value of a Property.\r
+\r
+ValueRef\r
+========\r
+A pointer to the value of the Property. This might be a Topic in a TopicSet, or\r
+any other piece of data. If both Value and ValueRef are provided, then ValueRef\r
+identifies the actual value of the property, with Value simply providing a\r
+string representation or mnemonic for it.\r
+\r
+\r
+Example:\r
+<Catalog>\r
+ <Resource Duid="resource1">\r
+  <Urn>urn:newsml:reuters.com:20001001:Physical Characteristics:3</Urn>\r
+  <Url>www.reuters.com/vocabs/physical.xml</Url>\r
+  <Url>www.iptc.com/vocabularies/memberdefined/reuters/physical.xml</Url>\r
+  <DefaultVocabularyFor Scheme="short" Context="Metadata/Property[@FormalName='Width']"/>\r
+ </Resource>\r
+</Catalog>\r
+<Property FormalName="Width" Vocabulary="#resource1">\r
+ <Property FormalName="Unit" ValueRef="urn:newsml:iptc.org:20001006:units:1#cm"/>\r
+ <Property FormalName="Quantity" Value="7.5"/>\r
+</Property>\r
+\r
+AllowedValues\r
+=============\r
+The AllowedValues attribute, if present, is a pointer to a controlled vocabulary\r
+that delimits the set of allowed values for the property. This may be an http\r
+URL, or a NewsML URN, or a fragment identifier consisting of a # charactger\r
+followed by the Duid of an element in the current document. The pointer must\r
+reference either a Resource element that designates an external controlled\r
+vocabulary, or a TopicSet element, that is itself the controlled vocabulary.\r
+================================================================================\r
+-->\r
+<!ELEMENT Property  (Property* )>\r
+<!ATTLIST Property  %localid;\r
+                    %formalname;\r
+                    %assignment;\r
+                    Value         CDATA  #IMPLIED\r
+                    ValueRef      CDATA  #IMPLIED\r
+                    AllowedValues CDATA  #IMPLIED >\r
+<!-- \r
+=================================== Provider ===================================\r
+An individual and/or company or organisation that released a news object for\r
+publication.\r
+================================================================================\r
+-->\r
+<!ELEMENT Provider  (%party; )>\r
+<!ATTLIST Provider  %localid; >\r
+<!-- \r
+================================== ProviderId ==================================\r
+An identifier for the news provider that produced the NewsItem. The\r
+provider's ID is specified in the element content. This should be an Internet\r
+domain name that is owned by the provider at the date identified by the DateId\r
+subelement of the NewsIdentifier, or the name for the Provider drawn from a\r
+controlled vocabulary identified by a URN specified in the Vocabulary attribute.\r
+This will ensure that the identity of the provider can be inferred unambiguously\r
+from the full NewsIdentifier.\r
+\r
+Example: \r
+<NewsIdentifier>\r
+ <ProviderId>iptc.org</ProviderId>\r
+ <DateId>20001001</DateId>\r
+ <NewsItemId>NewsML version 1.0</NewsItemId>\r
+ <RevisionId>1</RevisionId\r
+</NewsIdentifier>\r
+\r
+Because the domain name "iptc.org" was owned on 1 October 2000 by the\r
+International Press Telecommunications Council (IPTC) and no-one else, it is\r
+certain that IPTC is the provider in this case.\r
+================================================================================\r
+-->\r
+<!ELEMENT ProviderId  (#PCDATA )>\r
+<!ATTLIST ProviderId  Vocabulary CDATA  #IMPLIED >\r
+<!-- \r
+=============================== PublicIdentifier ===============================\r
+A public identifier (in the sense defined by the XML 1,0 Specification) for a\r
+NewsItem. This is the NewsML URN, and must be constructed as follows: \r
+\r
+If the ProviderId is a domain name\r
+\r
+urn:newsml:{ProviderId}:{DateId}:{NewsItemId}:{RevisionId}{RevisionId@Update}\r
+\r
+If the ProviderId is name drawn from a controlled vocabulary\r
+\r
+urn:newsml:|{ProviderId@Vocabulary}|{ProviderId}|:{DateId}:{NewsItemId}:{RevisionId}{RevisionId@Update}\r
+\r
+where {x} means "the content of the x subelement of the NewsIdentifier" and\r
+{x@y} means "the value of the y attribute of the x subelement of the\r
+NewsIdentifier", with the exception that if the Update attribute of the\r
+RevisionId element has its default value of N, it is omitted from the URN, and\r
+that the Vocabulary attribute of the ProviderId element is stripped of the\r
+substring "urn:" with which it begins. The Vocabulary attribute of ProviderId\r
+necessarily begins with the characters "urn:" because, as stated in the\r
+comment to the ProviderId element above, it must take the form of a URN\r
+identifying a controlled vocabulary.\r
+\r
+Note that the existence of this URN enables the NewsItem to be referenced\r
+unambiguously by pointers from other XML elements or resources. Within such\r
+pointers, if  the RevisionId, its preceding : character and its following Update\r
+qualifier are omitted, then the pointer designates the most recent revision at\r
+the time it is resolved.\r
+================================================================================\r
+-->\r
+<!ELEMENT PublicIdentifier  (#PCDATA )>\r
+\r
+<!-- \r
+================================== Relevance ===================================\r
+An indication of the relevance of a NewsItem to a given target audience. The\r
+value of the FormalName attribute is a formal name for the Relevance. Its\r
+meaning and permitted values are determined by a controlled vocabulary as\r
+described in the comment to the formalname ENTITY declaration above.\r
+================================================================================\r
+-->\r
+<!ELEMENT Relevance EMPTY>\r
+<!ATTLIST Relevance  %localid;\r
+                     %formalname;\r
+                     %assignment; >\r
+<!--\r
+=================================== Replace ====================================\r
+An instruction to replace a designated element within a NewsItem. The element\r
+that is to replace the designated element is the content of the Replace element.\r
+The NewsItem within which the replacement takes place is the previous revision\r
+of the current one, and the element to be replaced is the one whose Duid\r
+value is equal to the value of the Replace element's DuidRef attribute.\r
+================================================================================\r
+-->\r
+<!ELEMENT Replace ANY>\r
+<!ATTLIST Replace  %localid;\r
+                   DuidRef CDATA  #REQUIRED >\r
+<!-- \r
+================================== Resource ====================================\r
+An indication where a given resource can be found, and whether it is to be used\r
+as the default vocabulary for certain formal names within the current subtree\r
+of a NewsML document. The Urn attribute provides a NewsML URN for the resource.\r
+THe Url attribute(s) provide(s) a location or locations where the resource may\r
+be found. The DefaultVocabularyFor element contains an XPath pattern. The\r
+identified resource acts as default vocabulary for any element within the\r
+subtree whose root is the parent of the current Catalog, that matches this XPath\r
+pattern.\r
+================================================================================\r
+-->\r
+<!ELEMENT Resource  (Urn? , Url* , DefaultVocabularyFor* )>\r
+<!ATTLIST Resource  %localid; >\r
+<!-- \r
+=============================== RevisionHistory ================================\r
+A pointer to a file containing the revision history of the NewsItem.\r
+================================================================================\r
+-->\r
+<!ELEMENT RevisionHistory EMPTY>\r
+<!ATTLIST RevisionHistory  %localid;\r
+                           Href    CDATA  #REQUIRED >\r
+<!-- \r
+================================== RevisionId ==================================\r
+A positive integer indicating which Revision of a given NewsItem this is. Any\r
+positive integer may be used, but it must always be the case that of two\r
+instances of a NewsItem that have the same ProviderId, DateId and NewsItemId,\r
+the one whose RevisionId has the larger value must be the more recent revision.\r
+A RevisionId of 0 is not permitted. The PreviousRevision attribute must be\r
+present, and its value must be equal to the content of the RevisionId element\r
+of the NewsItem's previous revision, if there is one, and 0 if the NewsItem has\r
+no previous revision. If the NewsItem contains an Update element or elements,\r
+then the Update attribute must be set to U. If the NewsItem consists only of a\r
+replacement set of NewsManagement data, then the Update attribute must be set\r
+to A. If neither of these is the case, then the Update attribute must be set\r
+to N.\r
+================================================================================\r
+-->\r
+<!ELEMENT RevisionId  (#PCDATA )>\r
+<!ATTLIST RevisionId  PreviousRevision CDATA  #REQUIRED\r
+                      Update           CDATA  #REQUIRED >\r
+<!-- \r
+================================ RevisionStatus ================================\r
+Indicates the status that previous revisions now has as a result of the release\r
+of the current revision. The optional Revision attribute is an integer, equal to\r
+the RevisionId of the revision in question. If it is not present, then the\r
+status applies to ALL previous revisions, without exception.\r
+================================================================================\r
+-->\r
+<!ELEMENT RevisionStatus  (Status )>\r
+<!ATTLIST RevisionStatus  %localid;\r
+                          Revision CDATA  #IMPLIED >\r
+<!-- \r
+================================= RightsHolder =================================\r
+A string of text indicating who has the usage rights, optionally enriched with\r
+pointers to further information about the relevant people, companies or\r
+organisations.\r
+================================================================================\r
+-->\r
+<!ELEMENT RightsHolder  (#PCDATA | Origin )*>\r
+<!ATTLIST RightsHolder  %localid;\r
+                        xml:lang   CDATA  #IMPLIED\r
+                        %assignment; >\r
+<!-- \r
+================================== RightsLine ==================================\r
+A displayable version of rights information. Note that this is distinct from\r
+copyright information. Copyright information is about who owns a news object;\r
+rights information is about who is allowed to use it, in what way and under\r
+what circumstances.\r
+================================================================================\r
+-->\r
+<!ELEMENT RightsLine  (#PCDATA | Origin )*>\r
+<!ATTLIST RightsLine  %localid;\r
+                      xml:lang CDATA  #IMPLIED >\r
+<!-- \r
+================================ RightsMetadata ================================\r
+Information about the rights pertaining to a NewsComponent. \r
+================================================================================\r
+-->\r
+<!ELEMENT RightsMetadata  (Catalog? , Copyright* , UsageRights* , Property* )>\r
+<!ATTLIST RightsMetadata  %localid;\r
+                          %assignment; >\r
+<!-- \r
+===================================== Role =====================================\r
+An identifier of the role played by a NewsComponent within a NewsComponent\r
+that contains it. The outermost NewsComponent within a NewsItem need not\r
+specify a Role attribute value. The value of the FormalName attribute is a\r
+formal name for the Role. Its meaning and permitted values are determined by\r
+a controlled vocabulary as described in the comment to the formalname ENTITY\r
+declaration above.\r
+================================================================================\r
+-->\r
+<!ELEMENT Role EMPTY>\r
+<!ATTLIST Role  %localid;\r
+                %formalname; >\r
+<!-- \r
+=================================== SentFrom ===================================\r
+An individual and/or company or organisation from whom the NewsML document is\r
+being sent.\r
+================================================================================\r
+-->\r
+<!ELEMENT SentFrom  (%party; )>\r
+<!ATTLIST SentFrom  %localid; >\r
+<!-- \r
+==================================== SentTo ====================================\r
+An individual and/or company or organisation to whom the NewsML document is\r
+being sent.\r
+================================================================================\r
+-->\r
+<!ELEMENT SentTo  (%party; )>\r
+<!ATTLIST SentTo  %localid; >\r
+<!-- \r
+================================== SeriesLine ==================================\r
+A displayable version of information about a news object's place in a series.\r
+================================================================================\r
+-->\r
+<!ELEMENT SeriesLine  (#PCDATA | Origin )*>\r
+<!ATTLIST SeriesLine  %localid;\r
+                      xml:lang CDATA  #IMPLIED >\r
+<!-- \r
+================================== SizeInBytes =================================\r
+The exact size in bytes of a ContentItem's inline or referenced data object. \r
+================================================================================\r
+-->\r
+<!ELEMENT SizeInBytes  (#PCDATA )>\r
+<!ATTLIST SizeInBytes  %localid; >\r
+<!-- \r
+=================================== SlugLine ===================================\r
+A string of text, possibly embellished by hyperlinks and/or formatting, used to\r
+display a NewsItem's slug line. (Note that the meaning of the term "slug line",\r
+and the uses to which it is put, are a matter for individual providers to\r
+define within their own workflow and business practice.) \r
+================================================================================\r
+-->\r
+<!ELEMENT SlugLine  (#PCDATA | Origin )*>\r
+<!ATTLIST SlugLine  %localid;\r
+                    xml:lang CDATA  #IMPLIED >\r
+<!-- \r
+==================================== Source ====================================\r
+An individual and/or company or organisation that provided source material for\r
+a news object. The optional NewsItem attribute must be present in the case of\r
+a syndicated NewsItem. It provides the URN of the NewsItem that is being\r
+syndicated. Note that a sequence of Source elements can be used to indicate the\r
+sequence of syndicators through which a NewsItem has passed.\r
+================================================================================\r
+-->\r
+<!ELEMENT Source  (%party; )>\r
+<!ATTLIST Source  %localid;\r
+                  NewsItem CDATA  #IMPLIED >\r
+<!-- \r
+================================== StartDate ===================================\r
+A natural-language statement of the date at which specified usage rights come\r
+into effect.\r
+================================================================================\r
+-->\r
+<!ELEMENT StartDate  (#PCDATA | Origin )*>\r
+<!ATTLIST StartDate  %localid;\r
+                     xml:lang   CDATA  #IMPLIED\r
+                     %assignment; >\r
+<!-- \r
+==================================== Status ===================================\r
+An indication of the Status of a NewsItem. The value of the FormalName\r
+attribute is a formal name for the Status. Its meaning and permitted values\r
+are determined by a controlled vocabulary as described in the comment to the\r
+formalname ENTITY declaration above.\r
+================================================================================\r
+-->\r
+<!ELEMENT Status EMPTY>\r
+<!ATTLIST Status  %localid;\r
+                  %formalname; >\r
+<!-- \r
+=============================== StatusWillChange ===============================\r
+Advance notification of a status change that will automatically occur at the\r
+specified date and time. For example, an item with a Status of "embargoed" might\r
+have a StatusWillChange element stating that the status will become "usable" at\r
+a specified time. This is equivalent to announcing in advance the time at which\r
+the embargo will end and the item will be released.\r
+================================================================================\r
+-->\r
+<!ELEMENT StatusWillChange  (FutureStatus , DateAndTime )>\r
+<!ATTLIST StatusWillChange  %localid; >\r
+<!-- \r
+================================= SubHeadLine ==================================\r
+A displayable subsidiary headline.\r
+================================================================================\r
+-->\r
+<!ELEMENT SubHeadLine  (#PCDATA | Origin )*>\r
+<!ATTLIST SubHeadLine  %localid;\r
+                       xml:lang CDATA  #IMPLIED >\r
+<!-- \r
+=================================== Subject ====================================\r
+An indication of the Subject of a NewsItem. The value of the FormalName\r
+attribute is a formal name for the Subject. Its meaning and permitted values\r
+are determined by a controlled vocabulary as described in the comment to the\r
+formalname ENTITY declaration above.\r
+================================================================================\r
+-->\r
+<!ELEMENT Subject EMPTY>\r
+<!ATTLIST Subject  %localid;\r
+                   %formalname;\r
+                   %assignment; >\r
+<!-- \r
+================================= SubjectCode ==================================\r
+A container for the IPTC Subject Codes that indicate the subject of a NewsItem,\r
+as defined in the IPTC Information Interchange Model. It consists of one more\r
+Subject, SubjectMatter and SubjectDetail elements, optionally amplified by one\r
+or more SubjectQualifier elements.\r
+================================================================================\r
+-->\r
+<!ELEMENT SubjectCode  ( (Subject | SubjectMatter | SubjectDetail ) , SubjectQualifier* )*>\r
+<!ATTLIST SubjectCode  %localid;\r
+                       %assignment; >\r
+<!-- \r
+================================ SubjectDetail =================================\r
+An indication of the SubjectDetail of a NewsItem. The value of the FormalName\r
+attribute is a formal name for the SubjectDetail. Its meaning and permitted\r
+values are determined by a controlled vocabulary as described in the comment\r
+to the formalname ENTITY declaration above.\r
+================================================================================\r
+-->\r
+<!ELEMENT SubjectDetail EMPTY>\r
+<!ATTLIST SubjectDetail  %localid;\r
+                         %formalname;\r
+                         %assignment; >\r
+<!-- \r
+================================ SubjectMatter =================================\r
+An indication of the SubjectMatter of a NewsItem. The value of the FormalName\r
+attribute is a formal name for the SubjectMatter. Its meaning and permitted\r
+values are determined by a controlled vocabulary as described in the comment to\r
+the formalname ENTITY declaration above.\r
+================================================================================\r
+-->\r
+<!ELEMENT SubjectMatter EMPTY>\r
+<!ATTLIST SubjectMatter  %localid;\r
+                         %formalname;\r
+                         %assignment; >\r
+<!-- \r
+=============================== SubjectQualifier ===============================\r
+An indication of the SubjectQualifier of a NewsItem. The value of the FormalName\r
+attribute is a formal name for the SubjectQualifier. Its meaning and permitted\r
+values are determined by a controlled vocabulary as described in the comment to\r
+the formalname ENTITY declaration above.\r
+================================================================================\r
+-->\r
+<!ELEMENT SubjectQualifier EMPTY>\r
+<!ATTLIST SubjectQualifier  %localid;\r
+                            %formalname;\r
+                            %assignment; >\r
+<!-- \r
+=============================== SystemIdentifier ===============================\r
+A system identifier (in the sense defined by the XML 1,0 Specification) for a\r
+NewsItem.\r
+================================================================================\r
+-->\r
+<!ELEMENT SystemIdentifier  (#PCDATA )>\r
+<!ATTLIST SystemIdentifier  %localid; >\r
+<!-- \r
+============================= ThisRevisionCreated ==============================\r
+The date and, optionally, time at which the current revision of a NewsItem was\r
+created, expressed in ISO 8601 Basic Format, as described in the comment to the\r
+DateAndTime attribute within the assignment ENTITY declaration above.\r
+================================================================================\r
+-->\r
+<!ELEMENT ThisRevisionCreated  (#PCDATA )>\r
+<!ATTLIST ThisRevisionCreated  %localid; >\r
+<!--\r
+==================================== Topic =====================================\r
+This element provides information about a thing (Topic) named by a formal\r
+name or occurring in a NewsComponent. A Topic must have one or more TopicType\r
+subelements, which state what type of Topic it is. The optional Details\r
+attribute provides a pointer, in the form of a URL or URN, to additional\r
+information about the Topic.\r
+================================================================================\r
+-->\r
+<!ELEMENT Topic  (Comment* , Catalog? , TopicType+ , FormalName* , Description* , Property* )>\r
+<!ATTLIST Topic  %localid;\r
+                 Details CDATA  #IMPLIED >\r
+<!-- \r
+=============================== TopicOccurrence ================================\r
+An indication that a particular topic occurs within the content of a\r
+NewsComponent. The optional HowPresent attribute indicates the nature of that\r
+topic's occurrence. The value of the Topic attribute must consist of a #\r
+character followed by the value of the Duid attribute of a Topic in the current\r
+document.\r
+================================================================================\r
+-->\r
+<!ELEMENT TopicOccurrence EMPTY>\r
+<!ATTLIST TopicOccurrence  %localid;\r
+                           %assignment;\r
+                           Topic      CDATA  #IMPLIED >\r
+<!-- \r
+================================== TopicSet ====================================\r
+A container for Topics. The value of the FormalName attribute is a formal name\r
+for the TopicSet. Its meaning and permitted values are determined by a\r
+controlled vocabulary as described in the comment to the formalname ENTITY\r
+declaration above.\r
+================================================================================\r
+-->\r
+<!ELEMENT TopicSet  (Comment* , Catalog? , TopicSetRef* , Topic* )>\r
+<!ATTLIST TopicSet  %localid;\r
+                    %formalname; >\r
+<!-- \r
+================================= TopicSetRef ==================================\r
+A pointer to a TopicSet that is to be merged with the current one. The TopicSet\r
+attribute is a pointer to the relevant TopicSet. Its value can be an http URL,\r
+or a NewsML URN as described in the comment to PublicIdentifier, or a fragment\r
+identifier consisting of a # character followed by the Duid of a TopicSet in the\r
+current document. The presence of a TopicSetRef child in a TopicSet has the\r
+effect that all the Topics in the referenced TopicSet are included by reference\r
+within the current TopicSet. When this merging results in there exising two\r
+FormalName grandchildren of the same TopicSet that have the same content and\r
+the same Scheme attribute value, then the Topics whose children are in fact the\r
+same topic, and are deemed to be merged. The merging of Topics need not be\r
+performed physically by the system, but the meaning of the data is\r
+exactly the same as if the merging were actually performed. Merging two\r
+Topcis consists of creating a single Topic that contains all the children of\r
+both, and eliminating duplicates.\r
+================================================================================\r
+-->\r
+<!ELEMENT TopicSetRef  (Comment* )>\r
+<!ATTLIST TopicSetRef  %localid;\r
+                       TopicSet CDATA  #IMPLIED >\r
+<!-- \r
+================================== TopicType ===================================\r
+An indication of the type of a Topic. The value of the FormalName attribute is\r
+a formal name for the TopicType. Its meaning and permitted values are determined\r
+by a controlled vocabulary as described in the comment to the formalname ENTITY\r
+declaration above.\r
+================================================================================\r
+-->\r
+<!ELEMENT TopicType EMPTY>\r
+<!ATTLIST TopicType  %localid;\r
+                     %formalname; >\r
+<!-- \r
+================================== TopicUse ====================================\r
+An indication of where a particular Topic is used in a NewsML document. The\r
+value of the Topic attribute must consist of a # character followed by the\r
+value of the Duid of a Topic in the current document. The value of the Context\r
+attribute is an XPath pattern indicating the context where the referenced topic\r
+is used within the subtree to which the current Catalog applies. If the Context\r
+attribute is not present, the TopicUse element simply states that this topic is\r
+present somewhere in the subtree.\r
+================================================================================\r
+-->\r
+<!ELEMENT TopicUse EMPTY>\r
+<!ATTLIST TopicUse  Topic   CDATA  #REQUIRED\r
+                    Context CDATA  #IMPLIED >\r
+<!-- \r
+================================ TransmissionId ================================\r
+An identifier for the NewsML document transmission. This should be unique among\r
+all distinct transmissions from the same publisher. If a transmission is\r
+repeated (perhaps because the sender is not confident that it was successfully\r
+received) then the same TransmissionId content may be used, but a Repeat\r
+attribute should be provided to distinguish the second transmission from the\r
+first. The form that the value of the Repeat attribute takes is determined by\r
+the provider. Likewise, the format for the TransmissionId itself is for the\r
+provider to decide. It could for example consist of a channel identifier\r
+followed by a sequence number.\r
+================================================================================\r
+-->\r
+<!ELEMENT TransmissionId  (#PCDATA )>\r
+<!ATTLIST TransmissionId  %localid;\r
+                          Repeat  CDATA  #IMPLIED >\r
+<!-- \r
+==================================== Update ====================================\r
+A modification to an existing NewsItem. This can be an insertion, replacement\r
+or deletion. Note that the Update element cannot be used to modify the\r
+NewsManagement or Identification element, or any of their descendants.\r
+Modifications to these parts of the NewsItem can be made by issuing the\r
+NewsItem under the current revision number, with only the Identification and\r
+NewsManagement elements present. These will replace the previous Identification\r
+and NewsManagement elements in their totality.\r
+================================================================================\r
+-->\r
+<!ELEMENT Update  (InsertBefore | InsertAfter | Replace | Delete )*>\r
+<!ATTLIST Update  %localid; >\r
+<!-- \r
+=================================== Urgency ====================================\r
+An indication of the urgency of a NewsItem. The value of the FormalName\r
+attribute is a formal name for the Urgency. Its meaning and permitted values\r
+are determined by a controlled vocabulary as described in the comment to the\r
+formalname ENTITY declaration above.\r
+================================================================================\r
+-->\r
+<!ELEMENT Urgency EMPTY>\r
+<!ATTLIST Urgency  %localid;\r
+                   %formalname; >\r
+<!-- \r
+===================================== Url ======================================\r
+A URL that can be used to locate a Resource.\r
+================================================================================\r
+-->\r
+<!ELEMENT Url  (#PCDATA )>\r
+<!ATTLIST Url  %localid; >\r
+<!-- \r
+===================================== Urn ======================================\r
+A URN that provides a global identifier for a resource. This will typically (but\r
+not necessarily) be a NewsML URN as described in the comment to PublicIdentifier.\r
+================================================================================\r
+-->\r
+<!ELEMENT Urn  (#PCDATA )>\r
+<!ATTLIST Urn  %localid; >\r
+<!--\r
+================================= UsageRights ==================================\r
+Information about the usage rights pertaining to a NewsComponent. \r
+================================================================================\r
+-->\r
+<!ELEMENT UsageRights  (UsageType? , Geography? , RightsHolder? , Limitations? , StartDate? , EndDate? )>\r
+<!ATTLIST UsageRights  %localid;\r
+                       %assignment; >\r
+<!-- \r
+================================== UsageType ===================================\r
+A natural-language indication of the type of usage to which the rights apply.\r
+================================================================================\r
+-->\r
+<!ELEMENT UsageType  (#PCDATA | Origin )*>\r
+<!ATTLIST UsageType  %localid;\r
+                     xml:lang   CDATA  #IMPLIED\r
+                     %assignment; >\r
diff --git a/TC/testcase/res/UTsXml/test/valid/dtds/destfoo.ent b/TC/testcase/res/UTsXml/test/valid/dtds/destfoo.ent
new file mode 100755 (executable)
index 0000000..0791e1a
--- /dev/null
@@ -0,0 +1 @@
+<dest id='foo'/>
diff --git a/TC/testcase/res/UTsXml/test/valid/dtds/external.ent b/TC/testcase/res/UTsXml/test/valid/dtds/external.ent
new file mode 100755 (executable)
index 0000000..8a4495d
--- /dev/null
@@ -0,0 +1,3 @@
+<!ELEMENT root (#PCDATA)>
+<!ENTITY % peInCdata SYSTEM "external2.ent">
+<!ENTITY peInCdata "<![CDATA[%peInCdata;]]>">
diff --git a/TC/testcase/res/UTsXml/test/valid/dtds/external2.ent b/TC/testcase/res/UTsXml/test/valid/dtds/external2.ent
new file mode 100755 (executable)
index 0000000..348e1db
--- /dev/null
@@ -0,0 +1 @@
+<!ATTLIST root attr1 NMTOKEN "attrvalue">
diff --git a/TC/testcase/res/UTsXml/test/valid/dtds/nitf-2-5.dtd b/TC/testcase/res/UTsXml/test/valid/dtds/nitf-2-5.dtd
new file mode 100755 (executable)
index 0000000..253e620
--- /dev/null
@@ -0,0 +1,1004 @@
+ <!--\r
+       News Industry Text Format\r
+       Document Type Definition - Version 2.5\r
+       http://www.nitf.org/\r
+\r
+       Copyright (c) 2000. All Rights Reserved.\r
+       International Press Telecommunications Council\r
+       http://www.iptc.org\r
+               \r
+       Last changed: 9 August 2000  wb/kr/ak\r
+       \r
+       For the list of modifications from previous releases, see:\r
+               http://www.nitf.org/recent-modifications.html \r
+\r
+       For the list of proposed modifications, see:\r
+               http://www.nitf.org/proposed-changes.html \r
+-->\r
+\r
+\r
+\r
+<!ENTITY % enriched-text '\r
+       #PCDATA\r
+       | chron\r
+       | copyrite\r
+       | event\r
+       | function\r
+       | location\r
+       | money\r
+       | num\r
+       | object.title\r
+       | org\r
+       | person\r
+       | postaddr\r
+       | virtloc\r
+       | a\r
+       | br\r
+       | em\r
+       | lang\r
+       | pronounce\r
+       | q\r
+       '>\r
+\r
+<!ENTITY % block.head "dateline?, copyrite?, abstract?">\r
+<!ENTITY % block.content "p | hl2 | table | media | ol | ul | dl | bq | fn | note | pre | hr">\r
+<!ENTITY % block.end "datasource?">\r
+\r
+\r
+<!ENTITY % global-attributes '\r
+       id      ID                                              #IMPLIED\r
+       '>\r
+<!ENTITY % common-attributes '\r
+       %global-attributes;\r
+       class   NMTOKENS                                        #IMPLIED\r
+       style   CDATA                                           #IMPLIED\r
+       lang    NMTOKEN                                         #IMPLIED\r
+       dir     (ltr | rtl)                                     #IMPLIED\r
+       '>\r
+<!ENTITY % cell.align '\r
+       align   (left | center | right | justify | char)        #IMPLIED\r
+       char    CDATA                                           #IMPLIED\r
+       charoff CDATA                                           #IMPLIED\r
+       '>\r
+<!ENTITY % cell.valign '\r
+       valign  (top | middle | bottom | baseline)              #IMPLIED\r
+       '>\r
+<!ENTITY % url.link '\r
+       md      CDATA                                           #IMPLIED\r
+       '>\r
+<!ENTITY % boolean '(true | false)'>\r
+\r
+\r
+<!ELEMENT nitf (head, body)>\r
+<!ATTLIST nitf\r
+       %global-attributes;\r
+       uno             CDATA           #IMPLIED\r
+       version         CDATA           #FIXED          "-//IPTC-NAA//DTD NITF-XML 2.1//EN"\r
+       change.date     CDATA           #FIXED          "4 July 2000"\r
+       change.time     CDATA           #FIXED          "1900"\r
+       baselang        CDATA           #IMPLIED\r
+       class           NMTOKENS        #IMPLIED\r
+       >\r
+       \r
+\r
+<!ELEMENT head (title?, meta*, tobject?, iim?, docdata?, pubdata*, revision-history*)>\r
+<!ATTLIST head\r
+       %global-attributes;\r
+       >\r
+       \r
+<!ELEMENT title (#PCDATA)>\r
+<!ATTLIST title\r
+       %global-attributes;\r
+       type    (\r
+               main\r
+               | subtitle\r
+               | parttitle\r
+               | alternate\r
+               | abbrev\r
+               | other\r
+               )       #IMPLIED\r
+       >\r
+       \r
+<!ELEMENT meta EMPTY>\r
+<!ATTLIST meta\r
+       %global-attributes;\r
+       http-equiv      NMTOKEN         #IMPLIED\r
+       name            NMTOKEN         #IMPLIED\r
+       content         CDATA           #REQUIRED\r
+       >\r
+       \r
+<!ELEMENT tobject (tobject.property*, tobject.subject*)>\r
+<!ATTLIST tobject\r
+       %global-attributes;\r
+       tobject.type            CDATA   "news"\r
+       >\r
+       \r
+       <!ELEMENT tobject.property EMPTY>\r
+       <!ATTLIST tobject.property\r
+               %global-attributes;\r
+               tobject.property.type   CDATA   "current"\r
+               >\r
+               \r
+       <!ELEMENT tobject.subject  EMPTY>\r
+       <!ATTLIST tobject.subject\r
+               %global-attributes;\r
+               tobject.subject.ipr             CDATA           "IPTC"\r
+               tobject.subject.refnum          NMTOKEN         #REQUIRED\r
+               tobject.subject.code            CDATA           #IMPLIED\r
+               tobject.subject.type            CDATA           #IMPLIED\r
+               tobject.subject.matter          CDATA           #IMPLIED\r
+               tobject.subject.detail          CDATA           #IMPLIED\r
+               >\r
+               \r
+<!ELEMENT iim (ds*)>\r
+<!ATTLIST iim\r
+       %global-attributes;\r
+       ver     NMTOKEN         #IMPLIED\r
+       >\r
+       \r
+       <!ELEMENT ds EMPTY>\r
+       <!ATTLIST ds\r
+               %global-attributes;\r
+               num             NMTOKEN         #REQUIRED\r
+               value           CDATA           #IMPLIED\r
+               >\r
+               \r
+<!ELEMENT docdata (\r
+       correction\r
+       | evloc\r
+       | doc-id\r
+       | del-list\r
+       | urgency\r
+       | fixture\r
+       | date.issue\r
+       | date.release\r
+       | date.expire\r
+       | doc-scope\r
+       | series\r
+       | ed-msg\r
+       | du-key\r
+       | doc.copyright\r
+       | doc.rights\r
+       | key-list\r
+       )*>\r
+<!ATTLIST docdata\r
+       %global-attributes;\r
+       >\r
+       \r
+       <!ELEMENT correction EMPTY>\r
+       <!ATTLIST correction\r
+               %global-attributes;\r
+               info            CDATA   #IMPLIED\r
+               id-string       CDATA   #IMPLIED\r
+               reg-src         CDATA   #IMPLIED\r
+               >\r
+               \r
+       <!ELEMENT evloc EMPTY>\r
+       <!ATTLIST evloc\r
+               %global-attributes;\r
+               iso-cc          CDATA   #IMPLIED\r
+               state-prov      CDATA   #IMPLIED\r
+               county-dist     CDATA   #IMPLIED\r
+               city            CDATA   #IMPLIED\r
+               >\r
+               \r
+       <!ELEMENT doc-id EMPTY>\r
+       <!ATTLIST doc-id\r
+               %global-attributes;\r
+               regsrc          CDATA   #IMPLIED\r
+               id-string       CDATA   #IMPLIED\r
+               >\r
+               \r
+       <!ELEMENT del-list (from-src)*>\r
+       <!ATTLIST del-list\r
+               %global-attributes;\r
+               >\r
+               \r
+               <!ELEMENT from-src EMPTY>\r
+               <!ATTLIST from-src\r
+                       %global-attributes;\r
+                       src-name        CDATA   #IMPLIED\r
+                       level-number    CDATA   #IMPLIED\r
+                       >\r
+                       \r
+       <!ELEMENT urgency EMPTY>\r
+       <!ATTLIST urgency\r
+               %global-attributes;\r
+               ed-urg          NMTOKEN         #IMPLIED\r
+               >\r
+               \r
+       <!ELEMENT fixture EMPTY>\r
+       <!ATTLIST fixture\r
+               %global-attributes;\r
+               fix-id          CDATA   #IMPLIED\r
+               >\r
+               \r
+       <!ELEMENT date.issue EMPTY>\r
+       <!ATTLIST date.issue\r
+               %global-attributes;\r
+               norm            CDATA   #IMPLIED\r
+               >\r
+               \r
+       <!ELEMENT date.release EMPTY>\r
+       <!ATTLIST date.release\r
+               %global-attributes;\r
+               norm            CDATA   #IMPLIED\r
+               >\r
+               \r
+       <!ELEMENT date.expire EMPTY>\r
+       <!ATTLIST date.expire\r
+               %global-attributes;\r
+               norm            CDATA   #IMPLIED\r
+               >\r
+               \r
+       <!ELEMENT doc-scope EMPTY>\r
+       <!ATTLIST doc-scope\r
+               %global-attributes;\r
+               scope           CDATA   #IMPLIED\r
+               >\r
+               \r
+       <!ELEMENT series EMPTY>\r
+       <!ATTLIST series\r
+               %global-attributes;\r
+               series.name             CDATA           #IMPLIED\r
+               series.part             NMTOKEN         "0"\r
+               series.totalpart        NMTOKEN         "0"\r
+               >\r
+               \r
+       <!ELEMENT ed-msg EMPTY>\r
+       <!ATTLIST ed-msg\r
+               %global-attributes;\r
+               msg-type        CDATA   #IMPLIED\r
+               info            CDATA   #IMPLIED\r
+               >\r
+               \r
+       <!ELEMENT du-key EMPTY>\r
+       <!ATTLIST du-key\r
+               %global-attributes;\r
+               generation      NMTOKEN         #IMPLIED\r
+               part            NMTOKEN         #IMPLIED\r
+               version         NMTOKEN         #IMPLIED\r
+               key             CDATA           #IMPLIED\r
+               >\r
+               \r
+       <!ELEMENT doc.copyright EMPTY>\r
+       <!ATTLIST doc.copyright\r
+               %global-attributes;\r
+               year            NMTOKEN         #IMPLIED\r
+               holder          CDATA           #IMPLIED\r
+               >\r
+               \r
+       <!ELEMENT doc.rights EMPTY>\r
+       <!ATTLIST doc.rights\r
+               %global-attributes;\r
+               owner           CDATA           #IMPLIED\r
+               startdate       CDATA           #IMPLIED\r
+               enddate         CDATA           #IMPLIED\r
+               agent           CDATA           #IMPLIED\r
+               geography       CDATA           #IMPLIED\r
+               location-code   CDATA           #IMPLIED\r
+               code-source     CDATA           #IMPLIED\r
+               type            CDATA           #IMPLIED\r
+               limitations     CDATA           #IMPLIED\r
+               >\r
+               \r
+       <!ELEMENT key-list (keyword)*>\r
+       <!ATTLIST key-list\r
+               %global-attributes;\r
+               >\r
+               \r
+               <!ELEMENT keyword EMPTY>\r
+               <!ATTLIST keyword\r
+                       %global-attributes;\r
+                       key             CDATA   #IMPLIED\r
+                       >\r
+                       \r
+<!ELEMENT pubdata EMPTY>\r
+<!ATTLIST pubdata\r
+       %global-attributes;\r
+       type                    (\r
+                               print\r
+                               | audio\r
+                               | video\r
+                               | web\r
+                               | appliance\r
+                               | other\r
+                               )               #IMPLIED\r
+       item-length             CDATA           #IMPLIED\r
+       unit-of-measure         (\r
+                               word\r
+                               | character\r
+                               | byte\r
+                               | inch\r
+                               | pica\r
+                               | cm\r
+                               | hour\r
+                               | minute\r
+                               | second\r
+                               | other\r
+                               )               #IMPLIED\r
+       date.publication        CDATA           #IMPLIED\r
+       name                    CDATA           #IMPLIED\r
+       issn                    CDATA           #IMPLIED\r
+       volume                  CDATA           #IMPLIED\r
+       number                  CDATA           #IMPLIED\r
+       issue                   CDATA           #IMPLIED\r
+       edition.name            CDATA           #IMPLIED\r
+       edition.area            CDATA           #IMPLIED\r
+       position.section        CDATA           #IMPLIED\r
+       position.sequence       CDATA           #IMPLIED\r
+       ex-ref                  CDATA           #IMPLIED\r
+       >\r
+       \r
+<!ELEMENT revision-history EMPTY>\r
+<!ATTLIST revision-history\r
+       %global-attributes;\r
+       name            CDATA                   #IMPLIED\r
+       function        (\r
+                       writer-author\r
+                       | editor\r
+                       | producer\r
+                       | archivist\r
+                       | videographer\r
+                       | graphic-artist\r
+                       | photographer\r
+                       | statistician\r
+                       | other\r
+                       )                       #IMPLIED\r
+       norm            CDATA                   #IMPLIED\r
+       comment         CDATA                   #IMPLIED\r
+       >\r
+       \r
+\r
+<!ELEMENT body (body.head?, body.content*, body.end?)>\r
+<!ATTLIST body\r
+       %common-attributes;\r
+       background      CDATA           #IMPLIED\r
+       >\r
+       \r
+\r
+<!ELEMENT body.head (\r
+       hedline?,\r
+       note*,\r
+       rights?,\r
+       byline*,\r
+       distributor?,\r
+       dateline*,\r
+       abstract?,\r
+       series?\r
+       )>\r
+<!ATTLIST body.head\r
+       %global-attributes;\r
+       >\r
+       \r
+<!ELEMENT hedline (hl1, hl2*)>\r
+<!ATTLIST hedline\r
+       %global-attributes;\r
+       >\r
+       \r
+       <!ELEMENT hl1 (%enriched-text;)*>\r
+       <!ATTLIST hl1 %common-attributes;>\r
+       \r
+       <!ELEMENT hl2 (%enriched-text;)*>\r
+       <!ATTLIST hl2 %common-attributes;>\r
+       \r
+<!ELEMENT note (body.content)+>\r
+<!ATTLIST note\r
+       %common-attributes;\r
+       noteclass       (\r
+                       cpyrt\r
+                       | end\r
+                       | hd\r
+                       | editorsnote\r
+                       | trademk\r
+                       | undef\r
+                       )                       #IMPLIED\r
+       type            (std | pa | npa)        "std"\r
+       src             CDATA                   #IMPLIED\r
+       %url.link;\r
+       >\r
+       \r
+<!ELEMENT rights (\r
+       #PCDATA\r
+       | rights.owner\r
+       | rights.startdate\r
+       | rights.enddate\r
+       | rights.agent\r
+       | rights.geography\r
+       | rights.type\r
+       | rights.limitations\r
+       )*>\r
+<!ATTLIST rights\r
+       %global-attributes;\r
+       >\r
+       \r
+       <!ELEMENT rights.owner (#PCDATA)>\r
+       <!ATTLIST rights.owner\r
+               %global-attributes;\r
+               contact         CDATA   #IMPLIED\r
+               >\r
+               \r
+       <!ELEMENT rights.startdate (#PCDATA)>\r
+       <!ATTLIST rights.startdate\r
+               %global-attributes;\r
+               norm            CDATA   #IMPLIED\r
+               >\r
+               \r
+       <!ELEMENT rights.enddate (#PCDATA)>\r
+       <!ATTLIST rights.enddate\r
+               %global-attributes;\r
+               norm            CDATA   #IMPLIED\r
+               >\r
+               \r
+       <!ELEMENT rights.agent (#PCDATA)>\r
+       <!ATTLIST rights.agent\r
+               %global-attributes;\r
+               contact         CDATA   #IMPLIED\r
+               >\r
+               \r
+       <!ELEMENT rights.geography (#PCDATA)>\r
+       <!ATTLIST rights.geography\r
+               %global-attributes;\r
+               location-code   CDATA   #IMPLIED\r
+               code-source     CDATA   #IMPLIED\r
+               >\r
+               \r
+       <!ELEMENT rights.type (#PCDATA)>\r
+       <!ATTLIST rights.type\r
+               %global-attributes;\r
+               >\r
+               \r
+       <!ELEMENT rights.limitations (#PCDATA)>\r
+       <!ATTLIST rights.limitations\r
+               %global-attributes;\r
+               >\r
+               \r
+<!ELEMENT byline (#PCDATA | person | byttl | location | virtloc)*>\r
+<!ATTLIST byline\r
+       %global-attributes;\r
+       >\r
+       \r
+       <!ELEMENT byttl (#PCDATA | org )*>\r
+       <!ATTLIST byttl\r
+               %global-attributes;\r
+               >\r
+               \r
+<!ELEMENT distributor (#PCDATA | org)*>\r
+<!ATTLIST distributor\r
+       %global-attributes;\r
+       >\r
+       \r
+<!ELEMENT dateline (#PCDATA | location | story.date)*>\r
+<!ATTLIST dateline %common-attributes;>\r
+       \r
+       <!ELEMENT story.date (#PCDATA)>\r
+       <!ATTLIST story.date\r
+               %global-attributes;\r
+               norm            CDATA   #IMPLIED\r
+               >\r
+               \r
+<!ELEMENT abstract (%block.content;)+>\r
+<!ATTLIST abstract\r
+       %global-attributes;\r
+       >\r
+       \r
+\r
+<!ELEMENT copyrite (#PCDATA | copyrite.year | copyrite.holder)*>\r
+<!ATTLIST copyrite\r
+       %global-attributes;\r
+       >\r
+       \r
+       <!ELEMENT copyrite.year (#PCDATA)>\r
+       <!ATTLIST copyrite.year\r
+               %global-attributes;\r
+               >\r
+               \r
+       <!ELEMENT copyrite.holder (#PCDATA)>\r
+       <!ATTLIST copyrite.holder\r
+               %global-attributes;\r
+               >\r
+               \r
+\r
+<!ELEMENT body.content (block | %block.content;)*>\r
+<!ATTLIST body.content\r
+       %global-attributes;\r
+       >\r
+       \r
+<!ELEMENT block ((%block.head;)?, (%block.content;)*, (%block.end;)?)>\r
+<!ATTLIST block %common-attributes;>\r
+       \r
+<!ELEMENT p (%enriched-text;)*>\r
+<!ATTLIST p\r
+       %common-attributes;\r
+       lede            %boolean;       #IMPLIED\r
+       summary         %boolean;       #IMPLIED\r
+       optional-text   %boolean;       #IMPLIED\r
+       >\r
+       \r
+\r
+<!ELEMENT table (caption?, (col* | colgroup*), thead?, tfoot?, tbody+)>\r
+<!ATTLIST table\r
+       %common-attributes;\r
+       tabletype       ENTITY          #IMPLIED\r
+       align           (\r
+                       left\r
+                       | center\r
+                       | right\r
+                       )               #IMPLIED\r
+       width           CDATA           #IMPLIED\r
+       cols            NMTOKEN         #IMPLIED\r
+       border          CDATA           #IMPLIED\r
+       frame           (\r
+                       void\r
+                       | above\r
+                       | below\r
+                       | hsides\r
+                       | lhs\r
+                       | rhs\r
+                       | vsides\r
+                       | box\r
+                       | border\r
+                       )               #IMPLIED\r
+       rules           (\r
+                       none\r
+                       | basic\r
+                       | rows\r
+                       | cols\r
+                       | all\r
+                       )               #IMPLIED\r
+       cellspacing     CDATA           #IMPLIED\r
+       cellpadding     CDATA           #IMPLIED\r
+       table.fmt       CDATA           #IMPLIED\r
+       table.domain    CDATA           #IMPLIED\r
+       table.inst      CDATA           #IMPLIED\r
+       >\r
+       \r
+<!ELEMENT media (media-metadata*, media-reference, media-object?, media-caption*, media-producer?)>\r
+<!ATTLIST media\r
+       %common-attributes;\r
+       media-type      (\r
+                       text\r
+                       | audio\r
+                       | image\r
+                       | video\r
+                       | data\r
+                       | application\r
+                       | other\r
+                       )               #REQUIRED\r
+       >\r
+       \r
+       <!ELEMENT media-reference (#PCDATA)>\r
+       <!ATTLIST media-reference\r
+               %common-attributes;\r
+               data-location           CDATA           #REQUIRED\r
+               name                    CDATA           #IMPLIED\r
+               source                  CDATA           #IMPLIED\r
+               mime-type               CDATA           #REQUIRED\r
+               coding                  CDATA           #IMPLIED\r
+               time                    CDATA           #IMPLIED\r
+               time-unit-of-measure    CDATA           #IMPLIED\r
+               outcue                  CDATA           #IMPLIED\r
+               source-credit           CDATA           #IMPLIED\r
+               copyright               CDATA           #IMPLIED\r
+               alternate-text          CDATA           #IMPLIED\r
+               height                  NMTOKEN         #IMPLIED\r
+               width                   NMTOKEN         #IMPLIED\r
+               units                   (pixels)        "pixels"\r
+               imagemap                CDATA           #IMPLIED\r
+               noflow                  (noflow)        #IMPLIED\r
+               >\r
+               \r
+       <!ELEMENT media-metadata EMPTY>\r
+       <!ATTLIST media-metadata\r
+               %common-attributes;\r
+               name            CDATA           #REQUIRED\r
+               value           CDATA           #IMPLIED\r
+               >\r
+               \r
+       <!ELEMENT media-object (#PCDATA)>\r
+       <!ATTLIST media-object\r
+               %common-attributes;\r
+               encoding        CDATA   #REQUIRED\r
+               >\r
+               \r
+       <!ELEMENT media-caption (%enriched-text; | %block.content;)*>\r
+       <!ATTLIST media-caption\r
+               %common-attributes;\r
+               >\r
+               \r
+       <!ELEMENT media-producer (%enriched-text;)*>\r
+       <!ATTLIST media-producer\r
+               %common-attributes;\r
+               >\r
+               \r
+<!ELEMENT ol (li)+>\r
+<!ATTLIST ol\r
+       %common-attributes;\r
+       continue        (continue)      #IMPLIED\r
+       seqnum          NMTOKEN         #IMPLIED\r
+       compact         (compact)       #IMPLIED\r
+       >\r
+       \r
+<!ELEMENT ul (li)+>\r
+<!ATTLIST ul\r
+       %common-attributes;\r
+       wrap            (vert | horiz | none)   "none"\r
+       plain           (plain)                 #IMPLIED\r
+       dingbat         ENTITY                  #IMPLIED\r
+       src             CDATA                   #IMPLIED\r
+       %url.link;\r
+       compact         (compact)               #IMPLIED\r
+       >\r
+       \r
+       <!ELEMENT li (%enriched-text; | %block.content;)*>\r
+       <!ATTLIST li\r
+               %common-attributes;\r
+               dingbat         ENTITY          #IMPLIED\r
+               src             CDATA           #IMPLIED\r
+               %url.link;\r
+               skip            NMTOKEN         "0"\r
+               >\r
+               \r
+<!ELEMENT dl (dt | dd)+>\r
+<!ATTLIST dl %common-attributes;>\r
+       \r
+       <!ELEMENT dt (%enriched-text;)*>\r
+       <!ATTLIST dt %common-attributes;>\r
+               \r
+       <!ELEMENT dd (block)*>\r
+       <!ATTLIST dd %common-attributes;>\r
+               \r
+<!ELEMENT bq (block+, credit?)*>\r
+<!ATTLIST bq\r
+       %common-attributes;\r
+       nowrap          (nowrap)        #IMPLIED\r
+       quote-source    CDATA           #IMPLIED\r
+       >\r
+       \r
+       <!ELEMENT credit (%enriched-text;)*>\r
+       <!ATTLIST credit %common-attributes;>\r
+       \r
+<!ELEMENT fn (body.content)+>\r
+<!ATTLIST fn %common-attributes;>\r
+       \r
+\r
+<!ELEMENT pre (#PCDATA)>\r
+<!ATTLIST pre\r
+       %global-attributes;\r
+       >\r
+       \r
+<!ELEMENT hr EMPTY>\r
+<!ATTLIST hr\r
+       %global-attributes;\r
+       src             CDATA   #IMPLIED\r
+       >\r
+       \r
+\r
+<!ELEMENT datasource (#PCDATA)>\r
+<!ATTLIST datasource\r
+       %global-attributes;\r
+       >\r
+       \r
+\r
+\r
+<!ELEMENT caption (%enriched-text; | %block.content;)*>\r
+<!ATTLIST caption\r
+       %common-attributes;\r
+       align           (\r
+                       top\r
+                       | bottom\r
+                       | left\r
+                       | right\r
+                       )               #IMPLIED\r
+       >\r
+       \r
+<!ELEMENT col EMPTY>\r
+<!ATTLIST col\r
+       %common-attributes;\r
+       span            NMTOKEN         "1"\r
+       width           CDATA           #IMPLIED\r
+       %cell.align;\r
+       %cell.valign;\r
+       >\r
+       \r
+<!ELEMENT colgroup (col+)>\r
+<!ATTLIST colgroup\r
+       %common-attributes;\r
+       %cell.align;\r
+       %cell.valign;\r
+       >\r
+       \r
+<!ELEMENT thead (tr+)>\r
+<!ATTLIST thead\r
+       %common-attributes;\r
+       %cell.align;\r
+       %cell.valign;\r
+       >\r
+       \r
+<!ELEMENT tbody (tr+)>\r
+<!ATTLIST tbody\r
+       %common-attributes;\r
+       %cell.align;\r
+       %cell.valign;\r
+       >\r
+       \r
+<!ELEMENT tfoot (tr+)>\r
+<!ATTLIST tfoot\r
+       %common-attributes;\r
+       %cell.align;\r
+       %cell.valign;\r
+       >\r
+       \r
+<!ELEMENT tr (th | td)+>\r
+<!ATTLIST tr\r
+       %common-attributes;\r
+       %cell.align;\r
+       %cell.valign;\r
+       >\r
+       \r
+<!ELEMENT th (%enriched-text; | %block.content;)*>\r
+<!ATTLIST th\r
+       %common-attributes;\r
+       axis            CDATA           #IMPLIED\r
+       axes            CDATA           #IMPLIED\r
+       nowrap          (nowrap)        #IMPLIED\r
+       rowspan         NMTOKEN         "1"\r
+       colspan         NMTOKEN         "1"\r
+       %cell.align;\r
+       %cell.valign;\r
+       >\r
+       \r
+<!ELEMENT td (%enriched-text; | %block.content;)*>\r
+<!ATTLIST td\r
+       %common-attributes;\r
+       axis            CDATA           #IMPLIED\r
+       axes            CDATA           #IMPLIED\r
+       nowrap          (nowrap)        #IMPLIED\r
+       rowspan         NMTOKEN         "1"\r
+       colspan         NMTOKEN         "1"\r
+       %cell.align;\r
+       %cell.valign;\r
+       >\r
+       \r
+\r
+<!ELEMENT chron (#PCDATA)>\r
+<!ATTLIST chron\r
+       %global-attributes;\r
+       norm            CDATA   #IMPLIED\r
+       >\r
+       \r
+\r
+<!ELEMENT event (#PCDATA | alt-code)*>\r
+<!ATTLIST event\r
+       %global-attributes;\r
+       start-date      CDATA           #IMPLIED\r
+       end-date        CDATA           #IMPLIED\r
+       idsrc           CDATA           #REQUIRED\r
+       value           CDATA           #REQUIRED\r
+       >\r
+       \r
+<!ELEMENT function (#PCDATA | alt-code)*>\r
+<!ATTLIST function\r
+       %global-attributes;\r
+       idsrc           CDATA           #REQUIRED\r
+       value           CDATA           #REQUIRED\r
+       >\r
+       \r
+<!ELEMENT location (#PCDATA | sublocation | city | state | region | country | alt-code)*>\r
+<!ATTLIST location\r
+       %global-attributes;\r
+       location-code   CDATA   #IMPLIED\r
+       code-source     CDATA   #IMPLIED\r
+       >\r
+       \r
+       <!ELEMENT sublocation (#PCDATA | alt-code)*>\r
+       <!ATTLIST sublocation\r
+               %global-attributes;\r
+               location-code   CDATA   #IMPLIED\r
+               code-source     CDATA   #IMPLIED\r
+               >\r
+               \r
+       <!ELEMENT city (#PCDATA | alt-code)*>\r
+       <!ATTLIST city\r
+               %global-attributes;\r
+               city-code       CDATA   #IMPLIED\r
+               code-source     CDATA   #IMPLIED\r
+               >\r
+               \r
+       <!ELEMENT state (#PCDATA | alt-code)*>\r
+       <!ATTLIST state\r
+               %global-attributes;\r
+               state-code      CDATA   #IMPLIED\r
+               code-source     CDATA   #IMPLIED\r
+               >\r
+               \r
+       <!ELEMENT region (#PCDATA | alt-code)*>\r
+       <!ATTLIST region\r
+               %global-attributes;\r
+               region-code     CDATA   #IMPLIED\r
+               code-source     CDATA   #IMPLIED\r
+               >\r
+               \r
+       <!ELEMENT country (#PCDATA | alt-code)*>\r
+       <!ATTLIST country\r
+               %global-attributes;\r
+               iso-cc          CDATA   #IMPLIED\r
+               >\r
+               \r
+<!ELEMENT money (#PCDATA)>\r
+<!ATTLIST money\r
+       %global-attributes;\r
+       unit            CDATA   #IMPLIED\r
+       date            CDATA   #IMPLIED\r
+       >\r
+       \r
+<!ELEMENT num (#PCDATA | frac | sub | sup)*>\r
+<!ATTLIST num\r
+       %global-attributes;\r
+       units           CDATA   #IMPLIED\r
+       decimal-ch      CDATA   #IMPLIED\r
+       thousands-ch    CDATA   #IMPLIED\r
+       >\r
+       \r
+       <!ELEMENT frac (numer, frac-sep?, denom)>\r
+       <!ATTLIST frac\r
+               %global-attributes;\r
+               >\r
+               \r
+               <!ELEMENT numer (#PCDATA)>\r
+               <!ATTLIST numer\r
+                       %global-attributes;\r
+                       >\r
+                       \r
+               <!ELEMENT frac-sep (#PCDATA)>\r
+               <!ATTLIST frac-sep\r
+                       %global-attributes;\r
+                       >\r
+                       \r
+               <!ELEMENT denom (#PCDATA)>\r
+               <!ATTLIST denom\r
+                       %global-attributes;\r
+                       >\r
+                       \r
+       <!ELEMENT sub (#PCDATA)>\r
+       <!ATTLIST sub %common-attributes;>\r
+               \r
+       <!ELEMENT sup (#PCDATA)>\r
+       <!ATTLIST sup %common-attributes;>\r
+               \r
+<!ELEMENT object.title (#PCDATA | alt-code)*>\r
+<!ATTLIST object.title \r
+       %common-attributes;\r
+       idsrc   CDATA   #REQUIRED\r
+       value   CDATA   #REQUIRED\r
+       >\r
+       \r
+<!ELEMENT org (#PCDATA | alt-code)*>\r
+<!ATTLIST org\r
+       %global-attributes;\r
+       idsrc   CDATA   #REQUIRED\r
+       value   CDATA   #REQUIRED\r
+       >\r
+       \r
+       <!ELEMENT alt-code EMPTY>\r
+       <!ATTLIST alt-code\r
+               %global-attributes;\r
+               idsrc   CDATA   #REQUIRED\r
+               value   CDATA   #REQUIRED\r
+               >\r
+               \r
+<!ELEMENT person (#PCDATA | name.given | name.family | function | alt-code)*>\r
+<!ATTLIST person\r
+       %global-attributes;\r
+       idsrc   CDATA   #REQUIRED\r
+       value   CDATA   #REQUIRED\r
+       >\r
+       \r
+       <!ELEMENT name.given (#PCDATA)>\r
+       <!ATTLIST name.given\r
+               %global-attributes;\r
+               >\r
+               \r
+       <!ELEMENT name.family (#PCDATA)>\r
+       <!ATTLIST name.family\r
+               %global-attributes;\r
+               >\r
+               \r
+<!ELEMENT postaddr (addressee, delivery.point?, (postcode | delivery.office | region | country)*)>\r
+<!ATTLIST postaddr\r
+       %global-attributes;\r
+       >\r
+       \r
+<!ELEMENT virtloc (#PCDATA | alt-code)*>\r
+<!ATTLIST virtloc\r
+       %global-attributes;\r
+       idsrc           CDATA           #REQUIRED\r
+       value           CDATA           #REQUIRED\r
+       >\r
+       \r
+<!ELEMENT a (%enriched-text;)*>\r
+<!ATTLIST a\r
+       %common-attributes;\r
+       href            CDATA           #IMPLIED\r
+       name            CDATA           #IMPLIED\r
+       %url.link;\r
+       rel             NMTOKEN         #IMPLIED\r
+       rev             NMTOKEN         #IMPLIED\r
+       title           CDATA           #IMPLIED\r
+       methods         NMTOKENS        #IMPLIED\r
+       >\r
+       \r
+<!ELEMENT br EMPTY>\r
+<!ATTLIST br\r
+       %global-attributes;\r
+       >\r
+       \r
+<!ELEMENT em (%enriched-text;)*>\r
+<!ATTLIST em %common-attributes;>\r
+       \r
+<!ELEMENT lang (%enriched-text;)*>\r
+<!ATTLIST lang %common-attributes;>\r
+       \r
+<!ELEMENT pronounce (%enriched-text;)*>\r
+<!ATTLIST pronounce\r
+       %global-attributes;\r
+       guide           CDATA   #IMPLIED\r
+       phonetic        CDATA   #IMPLIED\r
+       >\r
+       \r
+<!ELEMENT q (%enriched-text;)*>\r
+<!ATTLIST q\r
+       %common-attributes;\r
+       quote-source    CDATA   #IMPLIED\r
+       >\r
+       \r
+\r
+<!ELEMENT addressee (person, function?, care.of?)>\r
+<!ATTLIST addressee\r
+       %global-attributes;\r
+       >\r
+       \r
+       <!ELEMENT care.of (#PCDATA)>\r
+       <!ATTLIST care.of\r
+               %global-attributes;\r
+               >\r
+               \r
+<!ELEMENT delivery.point (#PCDATA | br)*>\r
+<!ATTLIST delivery.point\r
+       %global-attributes;\r
+       point-code      CDATA   #IMPLIED\r
+       code-source     CDATA   #IMPLIED\r
+       >\r
+       \r
+<!ELEMENT postcode (#PCDATA)>\r
+<!ATTLIST postcode\r
+       %global-attributes;\r
+       code-source     CDATA   #IMPLIED\r
+       >\r
+       \r
+<!ELEMENT delivery.office (#PCDATA | br)*>\r
+<!ATTLIST delivery.office\r
+       %global-attributes;\r
+       office-code     CDATA   #IMPLIED\r
+       code-source     CDATA   #IMPLIED\r
+       >\r
+       \r
+\r
+\r
+\r
+<!ELEMENT body.end (tagline?, bibliography?)>\r
+<!ATTLIST body.end\r
+       %global-attributes;\r
+       >\r
+       \r
+<!ELEMENT tagline (%enriched-text;)*>\r
+<!ATTLIST tagline\r
+       %global-attributes;\r
+       type            (std | pa | npa)        "std"\r
+       >\r
+       \r
+<!ELEMENT bibliography (#PCDATA)>\r
+<!ATTLIST bibliography\r
+       %global-attributes;\r
+       >\r
+       \r
diff --git a/TC/testcase/res/UTsXml/test/valid/dtds/notes.dtd b/TC/testcase/res/UTsXml/test/valid/dtds/notes.dtd
new file mode 100755 (executable)
index 0000000..b40a8ac
--- /dev/null
@@ -0,0 +1,19 @@
+<!--
+This gets parsed without complaint:
+<!ELEMENT pfx:notes  ( #PCDATA | note | pfx:note )* >
+-->
+
+<!--
+This triggers a diagnostic:
+notes.dtd:13: validity error : Definition of notes has duplicate 
+references of note
+<!ELEMENT pfx:notes  ( #PCDATA | pfx:note | note )* >
+-->
+
+<!ELEMENT pfx:notes  ( #PCDATA | pfx:note | note )* >
+
+<!ATTLIST notes
+       xmlns:pfx CDATA #FIXED 'http://namespace/uri/here'
+>
+<!ELEMENT note EMPTY >
+<!ELEMENT pfx:note EMPTY >
diff --git a/TC/testcase/res/UTsXml/test/valid/dtds/objednavka.dtd b/TC/testcase/res/UTsXml/test/valid/dtds/objednavka.dtd
new file mode 100755 (executable)
index 0000000..ac63df1
--- /dev/null
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<!ELEMENT objednavka (AdDoručeni, AdÚčtovací, ZpůsobDopravy, ZpůsobPlatby, DatumPřijetí, DatumDoručení, ObsahObjednávky, Komentář?)>\r
+<!ELEMENT  AdDoručeni (Jméno,  Ulice, Město, PSČ)>\r
+<!ELEMENT  AdÚčtovací (Jméno,  Ulice, Město, PSČ)>\r
+<!ELEMENT  Jméno     (#PCDATA)>\r
+<!ELEMENT  Ulice        (#PCDATA)>\r
+<!ELEMENT  Město      (#PCDATA)>\r
+<!ELEMENT  PSČ        (#PCDATA)>\r
+<!ELEMENT ZpůsobDopravy (#PCDATA) >\r
+<!ELEMENT ZpůsobPlatby (#PCDATA) >\r
+<!ELEMENT  DatumPřijetí (#PCDATA)>\r
+<!ELEMENT  DatumDoručení (#PCDATA)>\r
+<!ELEMENT ObsahObjednávky (Zboží+) >\r
+<!ELEMENT Zboží (Kód, Název, Počet, Cena, Popis?) >\r
+<!ELEMENT  Kód (#PCDATA)>\r
+<!ELEMENT Název (#PCDATA) >\r
+<!ELEMENT  Počet (#PCDATA)>\r
+<!ELEMENT Cena (#PCDATA) >\r
+<!ELEMENT Popis (#PCDATA) >\r
+<!ELEMENT Komentář (Řádka*) >\r
+<!ELEMENT  Řádka (#PCDATA)>\r
+<!ATTLIST Počet\r
+                    jednotka      (ks | kg | m2 | m)      #IMPLIED>\r
diff --git a/TC/testcase/res/UTsXml/test/valid/dtds/spec.dtd b/TC/testcase/res/UTsXml/test/valid/dtds/spec.dtd
new file mode 100755 (executable)
index 0000000..0fdfb86
--- /dev/null
@@ -0,0 +1,972 @@
+<!-- ............................................................... -->
+<!-- XML specification DTD ......................................... -->
+<!-- ............................................................... -->
+
+<!--
+TYPICAL INVOCATION:
+#  <!DOCTYPE spec PUBLIC
+#       "-//W3C//DTD Specification::19980323//EN"
+#       "http://www.w3.org/XML/Group/DTD/xmlspec.dtd">
+
+PURPOSE:
+  This DTD was developed for use with the XML family of W3C
+  specifications.  It is an XML-compliant DTD based in part on
+  the TEI Lite and Sweb DTDs.
+
+DEPENDENCIES:
+  None.
+
+CHANGE HISTORY:
+  The list of changes is at the end of the DTD.
+
+  For all details, see the design report at:
+
+    <http://www.w3.org/XML/Group/DTD/xmlspec-report.htm>
+
+  The "typical invocation" FPI always gets updated to reflect the
+  date of the most recent changes.
+
+  Search this file for "#" in the first column to see change history
+  comments.
+
+MAINTAINER:
+  Eve Maler
+  ArborText Inc.
+  elm@arbortext.com
+  voice: +1 781 270 5750
+  fax:   +1 781 273 3760
+-->
+
+<!-- ............................................................... -->
+<!-- Entities for characters and symbols ........................... -->
+
+<!--
+#1998-03-10: maler: Added &ldquo; and &rdquo;.
+#                   Used 8879:1986-compatible decimal character
+#                   references.
+#                   Merged charent.mod file back into main file.
+-->
+
+<!ENTITY lt     "&#38;#60;">
+<!ENTITY gt     "&#62;">
+<!ENTITY amp    "&#38;#38;">
+<!ENTITY apos   "&#39;">
+<!ENTITY quot   "&#34;">
+<!ENTITY mdash  "--">
+<!ENTITY nbsp   "&#160;">
+<!ENTITY ldquo  "#x201C;">
+<!ENTITY rdquo  "#x201D;">
+
+<!-- ............................................................... -->
+<!-- Entities for classes of standalone elements ................... -->
+
+<!--
+#1997-10-16: maler: Added table to %illus.class;.
+#1997-11-28: maler: Added htable to %illus.class;.
+#1997-12-29: maler: IGNOREd table.
+#1998-03-10: maler: Removed SGML Open-specific %illus.class;.
+#                   Added "local" entities for customization.
+-->
+
+<!ENTITY % local.p.class        "">
+<!ENTITY % p.class              "p
+                                %local.p.class;">
+
+<!ENTITY % local.statusp.class  "">
+<!ENTITY % statusp.class        "statusp
+                                %local.statusp.class;">
+
+<!ENTITY % local.list.class     "">
+<!ENTITY % list.class           "ulist|olist|slist|glist
+                                %local.list.class;">
+
+<!ENTITY % local.speclist.class "">
+<!ENTITY % speclist.class       "orglist|blist
+                                %local.speclist.class;">
+
+<!ENTITY % local.note.class     "">
+<!ENTITY % note.class           "note|wfcnote|vcnote
+                                %local.note.class;">
+
+<!ENTITY % local.illus.class    "">
+<!ENTITY % illus.class          "eg|graphic|scrap|htable
+                                %local.illus.class;">
+
+<!-- ............................................................... -->
+<!-- Entities for classes of phrase-level elements ................. -->
+
+<!--
+#1997-12-29: maler: Added xspecref to %ref.class;.
+#1998-03-10: maler: Added %ednote.class;.
+#                   Added "local" entities for customization.
+-->
+
+<!ENTITY % local.annot.class    "">
+<!ENTITY % annot.class          "footnote
+                                %local.annot.class;">
+
+<!ENTITY % local.termdef.class    "">
+<!ENTITY % termdef.class        "termdef|term
+                                %local.termdef.class;">
+
+<!ENTITY % local.emph.class    "">
+<!ENTITY % emph.class           "emph|quote
+                                %local.emph.class;">
+
+<!ENTITY % local.ref.class    "">
+<!ENTITY % ref.class            "bibref|specref|termref|titleref
+                                |xspecref|xtermref
+                                %local.ref.class;">
+
+<!ENTITY % local.loc.class    "">
+<!ENTITY % loc.class            "loc
+                                %local.loc.class;">
+
+<!ENTITY % local.tech.class    "">
+<!ENTITY % tech.class           "kw|nt|xnt|code
+                                %local.tech.class;">
+
+<!ENTITY % local.ednote.class    "">
+<!ENTITY % ednote.class         "ednote
+                                %local.ednote.class;">
+
+<!-- ............................................................... -->
+<!-- Entities for mixtures of standalone elements .................. -->
+
+<!--
+#1997-09-30: maler: Created %p.mix; to eliminate p from self.
+#1997-09-30: maler: Added %speclist.class; to %obj.mix; and %p.mix;.
+#1997-09-30: maler: Added %note.class; to %obj.mix; and %p.mix;.
+#1997-10-16: maler: Created %entry.mix;.  Note that some elements
+#                   left out here are still allowed in termdef,
+#                   which entry can contain through %p.pcd.mix;.
+#1997-11-28: maler: Added %p.class; to %statusobj.mix;.
+#1998-03-10: maler: Added %ednote.class; to all mixtures, except
+#                   %p.mix; and %statusobj.mix;, because paragraphs
+#                   and status paragraphs will contain ednote
+#                   through %p.pcd.mix;.
+#1998-03-123: maler: Added %termdef.mix; (broken out from
+#                    %termdef.pcd.mix;).
+-->
+
+<!ENTITY % div.mix
+        "%p.class;|%list.class;|%speclist.class;|%note.class;
+        |%illus.class;|%ednote.class;">
+<!ENTITY % obj.mix
+        "%p.class;|%list.class;|%speclist.class;|%note.class;
+        |%illus.class;|%ednote.class;">
+<!ENTITY % p.mix
+        "%list.class;|%speclist.class;|%note.class;|%illus.class;">
+<!ENTITY % entry.mix
+        "%list.class;|note|eg|graphic|%ednote.class;">
+<!ENTITY % statusobj.mix
+        "%p.class;|%statusp.class;|%list.class;">
+<!ENTITY % hdr.mix
+        "%p.class;|%list.class;|%ednote.class;">
+<!ENTITY % termdef.mix
+        "%note.class;|%illus.class;">
+
+<!-- ............................................................... -->
+<!-- Entities for mixtures of #PCDATA and phrase-level elements .... -->
+
+<!--    Note that %termdef.pcd.mix contains %note.class;
+        and %illus.class;, considered standalone elements. -->
+
+<!--
+#1997-09-30: maler: Added scrap and %note.class; to %termdef.pcd.mix;.
+#1997-11-28: maler: Added %loc.class; to %p.pcd.mix;.
+#1998-03-10: maler: Added %ednote.class; to all mixtures.
+#1998-03-23: maler: Moved some %termdef.pcd.mix; stuff out to
+#                   %termdef.mix;.
+-->
+
+<!ENTITY % p.pcd.mix
+        "#PCDATA|%annot.class;|%termdef.class;|%emph.class;
+        |%ref.class;|%tech.class;|%loc.class;|%ednote.class;">
+<!ENTITY % statusp.pcd.mix
+        "#PCDATA|%annot.class;|%termdef.class;|%emph.class;
+        |%ref.class;|%tech.class;|%loc.class;|%ednote.class;">
+<!ENTITY % head.pcd.mix
+        "#PCDATA|%annot.class;|%emph.class;|%tech.class;|%ednote.class;">
+<!ENTITY % label.pcd.mix
+        "#PCDATA|%annot.class;|%termdef.class;|%emph.class;|%tech.class;
+        |%ednote.class;">
+<!ENTITY % eg.pcd.mix
+        "#PCDATA|%annot.class;|%emph.class;|%ednote.class;">
+<!ENTITY % termdef.pcd.mix
+        "#PCDATA|term|%emph.class;|%ref.class;|%tech.class;
+        |%ednote.class;">
+<!ENTITY % bibl.pcd.mix
+        "#PCDATA|%emph.class;|%ref.class;|%loc.class;|%ednote.class;">
+<!ENTITY % tech.pcd.mix
+        "#PCDATA|%ednote.class;">
+<!ENTITY % loc.pcd.mix
+        "#PCDATA|%loc.class;|%ednote.class;">
+
+<!-- ............................................................... -->
+<!-- Entities for customizable content models ...................... -->
+
+<!--
+#1998-03-10: maler: Added customization entities.
+-->
+
+<!ENTITY % spec.mdl
+        "header, front?, body, back?">
+
+<!ENTITY % header.mdl
+        "title, subtitle?, version, w3c-designation, w3c-doctype,
+        pubdate, notice*, publoc, latestloc?, prevlocs?, authlist,
+        abstract, status, pubstmt?, sourcedesc?, langusage,
+        revisiondesc">
+
+<!ENTITY % pubdate.mdl
+        "day?, month, year">
+
+<!-- ............................................................... -->
+<!-- Entities for common attributes ................................ -->
+
+<!--    key attribute:
+        Optionally provides a sorting or indexing key, for cases when
+        the element content is inappropriate for this purpose. -->
+<!ENTITY % key.att
+        'key                    CDATA           #IMPLIED'>
+
+<!--    def attribute:
+        Points to the element where the relevant definition can be
+        found, using the IDREF mechanism.  %def.att; is for optional
+        def attributes, and %def-req.att; is for required def
+        attributes. -->
+<!ENTITY % def.att
+        'def                    IDREF           #IMPLIED'>
+<!ENTITY % def-req.att
+        'def                    IDREF           #REQUIRED'>
+
+<!--    ref attribute:
+        Points to the element where more information can be found,
+        using the IDREF mechanism.  %ref.att; is for optional
+        ref attributes, and %ref-req.att; is for required ref
+        attributes. -->
+<!ENTITY % ref.att
+        'ref                    IDREF           #IMPLIED'>
+<!ENTITY % ref-req.att
+        'ref                    IDREF           #REQUIRED'>
+
+<!--
+#1998-03-23: maler: Added show and actuate attributes to href.
+#                   Added semi-common xml:space attribute.
+-->
+
+<!--    HREF and source attributes:
+        Points to the element where more information or source data
+        can be found, using the URL (XLL simple link) mechanism.
+        For some purposes, is associated with additional XLL
+        attributes. %href.att; is for optional HREF attributes,
+        and %href-req.att; is for required HREF attributes.
+        %source-req.att; is for the source attribute, which
+        is always required. -->
+<!ENTITY % href.att
+        'xml-link               CDATA           #FIXED "simple"
+        href                    CDATA           #IMPLIED
+        show                    CDATA           #FIXED "embed"
+        actuate                 CDATA           #FIXED "auto"'>
+
+<!ENTITY % href-req.att
+        'xml-link               CDATA           #FIXED "simple"
+        href                    CDATA           #REQUIRED
+        show                    CDATA           #FIXED "embed"
+        actuate                 CDATA           #FIXED "auto"'>
+
+<!ENTITY % source-req.att
+        'xml-link               CDATA           #FIXED "simple"
+        xml:attributes          NMTOKENS        #FIXED "href source"
+        source                  CDATA           #REQUIRED
+        show                    CDATA           #FIXED "embed"
+        actuate                 CDATA           #FIXED "auto"'>
+
+<!--    xml:space attribute:
+        Indicates that the element contains white space
+        that the formatter or other application should retain,
+        as appropriate to its function. -->
+<!ENTITY % xmlspace.att
+        'xml:space              (default
+                                |preserve)      #FIXED "preserve"'>
+
+<!--    Common attributes:
+        Every element has an ID attribute (sometimes required,
+        but usually optional) for links, and a Role attribute
+        for extending the useful life of the DTD by allowing
+        authors to make subclasses for any element. %common.att;
+        is for common attributes where the ID is optional, and
+        %common-idreq.att; is for common attributes where the
+        ID is required. -->
+<!ENTITY % common.att
+        'id                     ID              #IMPLIED
+        role                    NMTOKEN         #IMPLIED'>
+<!ENTITY % common-idreq.att
+        'id                     ID              #REQUIRED
+        role                    NMTOKEN         #IMPLIED'>
+
+<!-- ............................................................... -->
+<!-- Common elements ............................................... -->
+
+<!--    head: Title on divisions, productions, and the like -->
+<!ELEMENT head (%head.pcd.mix;)*>
+<!ATTLIST head %common.att;>
+
+<!-- ............................................................... -->
+<!-- Major specification structure ................................. -->
+
+<!--
+#1998-03-10: maler: Made spec content model easily customizable.
+-->
+
+<!ELEMENT spec (%spec.mdl;)>
+<!ATTLIST spec %common.att;>
+
+<!ELEMENT front (div1+)>
+<!ATTLIST front %common.att;>
+
+<!ELEMENT body (div1+)>
+<!ATTLIST body %common.att;>
+
+<!--
+#1997-09-30: maler: Added inform-div1 to back content.
+-->
+
+<!ELEMENT back ((div1+, inform-div1*) | inform-div1+)>
+<!ATTLIST back %common.att;>
+
+<!ELEMENT div1 (head, (%div.mix;)*, div2*)>
+<!ATTLIST div1 %common.att;>
+
+<!--
+#1997-09-30: maler: Added inform-div1 declarations.
+-->
+
+<!--    inform-div1: Non-normative division in back matter -->
+<!ELEMENT inform-div1 (head, (%div.mix;)*, div2*)>
+<!ATTLIST inform-div1 %common.att;>
+
+<!ELEMENT div2 (head, (%div.mix;)*, div3*)>
+<!ATTLIST div2 %common.att;>
+
+<!ELEMENT div3 (head, (%div.mix;)*, div4*)>
+<!ATTLIST div3 %common.att;>
+
+<!ELEMENT div4 (head, (%div.mix;)*)>
+<!ATTLIST div4 %common.att;>
+
+<!-- Specification header .......... -->
+
+<!--
+#1998-03-10: maler: Made header content model easily customizable.
+-->
+
+<!ELEMENT header (%header.mdl;)>
+<!ATTLIST header %common.att;>
+
+<!--    Example of title: "Extensible Cheese Language (XCL)" -->
+<!ELEMENT title (#PCDATA)>
+<!ATTLIST title %common.att;>
+
+<!--    Example of subtitle: "A Cheesy Specification" -->
+<!ELEMENT subtitle (#PCDATA)>
+<!ATTLIST subtitle %common.att;>
+
+<!--    Example of version: "Version 666.0" -->
+<!ELEMENT version (#PCDATA)>
+<!ATTLIST version %common.att;>
+
+<!--    Example of w3c-designation: "WD-xcl-19991231" -->
+<!ELEMENT w3c-designation (#PCDATA)>
+<!ATTLIST w3c-designation %common.att;>
+
+<!--    Example of w3c-doctype: "World Wide Web Consortium Working
+        Draft" -->
+<!ELEMENT w3c-doctype (#PCDATA)>
+<!ATTLIST w3c-doctype %common.att;>
+
+<!--
+#1998-03-10: maler: Made pubdate content model easily customizable.
+-->
+
+<!ELEMENT pubdate (%pubdate.mdl;)>
+<!ATTLIST pubdate %common.att;>
+
+<!ELEMENT day (#PCDATA)>
+<!ATTLIST day %common.att;>
+
+<!ELEMENT month (#PCDATA)>
+<!ATTLIST month %common.att;>
+
+<!ELEMENT year (#PCDATA)>
+<!ATTLIST year %common.att;>
+
+<!--    Example of notice: "This draft is for public comment..." -->
+<!ELEMENT notice (%hdr.mix;)+>
+<!ATTLIST notice %common.att;>
+
+<!ELEMENT publoc (loc+)>
+<!ATTLIST publoc %common.att;>
+
+<!ELEMENT prevlocs (loc+)>
+<!ATTLIST prevlocs %common.att;>
+
+<!ELEMENT latestloc (loc+)>
+<!ATTLIST latestloc %common.att;>
+
+<!--      loc (defined in "Phrase-level elements" below) -->
+
+<!ELEMENT authlist (author+)>
+<!ATTLIST authlist %common.att;>
+
+<!--
+#1997-09-30: maler: Made affiliation optional.
+#1998-03-10: maler: Made email optional.
+-->
+
+<!ELEMENT author (name, affiliation?, email?)>
+<!ATTLIST author %common.att;>
+
+<!ELEMENT name (#PCDATA)>
+<!ATTLIST name
+        %common.att;
+        %key.att;>
+
+<!ELEMENT affiliation (#PCDATA)>
+<!ATTLIST affiliation %common.att;>
+
+<!ELEMENT email (#PCDATA)>
+<!--    HREF attribute:
+        email functions as a hypertext reference through this
+        required attribute.  Typically the reference would use
+        the mailto: scheme. -->
+<!ATTLIST email
+        %common.att;
+        %href-req.att;>
+
+<!--    The status element now contains both statusp and p, and
+        the latter now allows loc.  Use p; statusp will be removed
+        eventually. -->
+<!ELEMENT status (%statusobj.mix;)+>
+<!ATTLIST status %common.att;>
+
+<!ELEMENT abstract (%hdr.mix;)*>
+<!ATTLIST abstract %common.att;>
+
+<!ELEMENT pubstmt (%hdr.mix;)+>
+<!ATTLIST pubstmt %common.att;>
+
+<!ELEMENT sourcedesc (%hdr.mix;)+>
+<!ATTLIST sourcedesc %common.att;>
+
+<!ELEMENT langusage (language+)>
+<!ATTLIST langusage %common.att;>
+
+<!ELEMENT language (#PCDATA)>
+<!ATTLIST language %common.att;>
+
+<!ELEMENT revisiondesc (%hdr.mix;)+>
+<!ATTLIST revisiondesc %common.att;>
+
+<!-- ............................................................... -->
+<!-- Standalone elements ........................................... -->
+
+<!-- Paragraphs .................... -->
+
+<!--
+#1997-09-30: maler: Changed from %obj.mix; to %p.mix;.
+#1997-12-29: maler: Changed order of %p.mix; and %p.pcd.mix; references.
+#1997-12-29: maler: Changed order of %statusobj.mix; and %statusp.pcd.mix;
+#                   references.
+-->
+
+<!ELEMENT p (%p.pcd.mix;|%p.mix;)*>
+<!ATTLIST p %common.att;>
+
+<!--    statusp: Special paragraph that allows loc inside it (note that
+        p now also allows loc) -->
+<!ELEMENT statusp (%statusp.pcd.mix;|%statusobj.mix;)*>
+<!ATTLIST statusp %common.att;>
+
+<!-- Lists ......................... -->
+
+<!ELEMENT ulist (item+)>
+<!--    spacing attribute:
+        Use "normal" to get normal vertical spacing for items;
+        use "compact" to get less spacing.  The default is dependent
+        on the stylesheet. -->
+<!ATTLIST ulist
+        %common.att;
+        spacing         (normal|compact)        #IMPLIED>
+
+<!ELEMENT olist (item+)>
+<!--    spacing attribute:
+        Use "normal" to get normal vertical spacing for items;
+        use "compact" to get less spacing.  The default is dependent
+        on the stylesheet. -->
+<!ATTLIST olist
+        %common.att;
+        spacing         (normal|compact)        #IMPLIED>
+
+<!ELEMENT item (%obj.mix;)+>
+<!ATTLIST item %common.att;>
+
+<!ELEMENT slist (sitem+)>
+<!ATTLIST slist %common.att;>
+
+<!ELEMENT sitem (%p.pcd.mix;)*>
+<!ATTLIST sitem %common.att;>
+
+<!ELEMENT glist (gitem+)>
+<!ATTLIST glist %common.att;>
+
+<!ELEMENT gitem (label, def)>
+<!ATTLIST gitem %common.att;>
+
+<!ELEMENT label (%label.pcd.mix;)*>
+<!ATTLIST label %common.att;>
+
+<!ELEMENT def (%obj.mix;)*>
+<!ATTLIST def %common.att;>
+
+<!-- Special lists ................. -->
+
+<!ELEMENT blist (bibl+)>
+<!ATTLIST blist %common.att;>
+
+<!ELEMENT bibl (%bibl.pcd.mix;)*>
+
+<!--    HREF attribute:
+        bibl optionally functions as a hypertext reference to the
+        referred-to resource through this attribute. -->
+
+<!ATTLIST bibl
+        %common.att;
+        %href.att;
+        %key.att;>
+
+<!ELEMENT orglist (member+)>
+<!ATTLIST orglist %common.att;>
+
+<!--
+#1997-09-30: maler: Added optional affiliation.
+-->
+
+<!ELEMENT member (name, affiliation?, role?)>
+<!ATTLIST member %common.att;>
+
+<!--      name (defined in "Specification header" above) -->
+<!--      affiliation (defined in "Specification header" above) -->
+
+<!ELEMENT role (#PCDATA)>
+<!ATTLIST role %common.att;>
+
+<!-- Notes ......................... -->
+
+<!ELEMENT note (%obj.mix;)+>
+<!ATTLIST note %common.att;>
+
+<!ELEMENT wfcnote (head, (%obj.mix;)+)>
+<!--    ID attribute:
+        wfcnote must have an ID so that it can be pointed to
+        from a wfc element in a production. -->
+<!ATTLIST wfcnote
+        %common-idreq.att;>
+
+<!ELEMENT vcnote (head, (%obj.mix;)+)>
+<!--    ID attribute:
+        vcnote must have an ID so that it can be pointed to
+        from a vc element in a production. -->
+<!ATTLIST vcnote
+        %common-idreq.att;>
+
+<!-- Illustrations ................. -->
+
+<!--
+#1998-03-23: maler: Added xml:space attribute.
+-->
+
+<!ELEMENT eg (%eg.pcd.mix;)*>
+<!ATTLIST eg
+        %common.att;
+        %xmlspace.att;>
+
+<!ELEMENT graphic EMPTY>
+<!--    source attribute:
+        The graphic data must reside at the location pointed to.
+        This is a hypertext reference, but for practical purposes,
+        for now it should just be a pathname. -->
+<!ATTLIST graphic
+        %common.att;
+        %source-req.att;
+        alt             CDATA           #IMPLIED>
+
+<!--
+#1997-11-28: maler: Added prodgroup to scrap and defined it.
+-->
+
+<!ELEMENT scrap (head, (prodgroup+ | prod+ | bnf))>
+<!--    lang attribute:
+        The scrap can link to a description of the language used,
+        found in a language element in the header. -->
+<!ATTLIST scrap
+        %common.att;
+        lang            IDREF           #IMPLIED>
+
+<!ELEMENT prodgroup (prod+)>
+<!--    pcw<n> attributes:
+        Presentational attributes to control the width
+        of the "pseudo-table" columns used to output
+        groups of productions. -->
+<!ATTLIST prodgroup
+        %common.att;
+        pcw1            CDATA           #IMPLIED
+        pcw2            CDATA           #IMPLIED
+        pcw3            CDATA           #IMPLIED
+        pcw4            CDATA           #IMPLIED
+        pcw5            CDATA           #IMPLIED
+>
+
+<!ELEMENT prod (lhs, (rhs, (com|wfc|vc)*)+)>
+<!--    ID attribute:
+        The production must have an ID so that cross-references
+        (specref) and mentions of nonterminals (nt) can link to
+        it. -->
+<!ATTLIST prod
+        %common-idreq.att;>
+
+<!ELEMENT lhs (#PCDATA)>
+<!ATTLIST lhs %common.att;>
+
+<!ELEMENT rhs (#PCDATA|nt|xnt|com)*>
+<!ATTLIST rhs %common.att;>
+
+<!--      nt and xnt (defined in "Phrase-level elements" below) -->
+
+<!--
+#1997-11-28: maler: Added loc and bibref to com content.
+-->
+
+<!ELEMENT com (#PCDATA|loc|bibref)*>
+<!ATTLIST com %common.att;>
+
+<!--    wfc: Should generate the head of the wfcnote pointed to -->
+<!ELEMENT wfc EMPTY>
+<!--    def attribute:
+        Each well formedness tagline in a production must link to the
+        wfcnote that defines it. -->
+<!ATTLIST wfc
+        %def-req.att;
+        %common.att;>
+
+<!--    vc: Should generate the head of the vcnote pointed to -->
+<!ELEMENT vc EMPTY>
+<!--    def attribute:
+        Each validity tagline in a production must link to the vcnote
+        that defines it. -->
+<!ATTLIST vc
+        %def-req.att;
+        %common.att;>
+
+<!--
+#1998-03-23: maler: Added xml:space attribute.
+-->
+
+<!--    bnf: Un-marked-up production -->
+<!ELEMENT bnf (%eg.pcd.mix;)*>
+<!ATTLIST bnf
+        %common.att;
+        %xmlspace.att;>
+
+<!--
+#1997-10-16: maler: Added table mechanism.
+#1997-11-28: maler: Added non-null system ID to entity declaration.
+#                   Added HTML table module.
+#1997-12-29: maler: IGNOREd SGML Open table model.
+#1998-03-10: maler: Removed SGML Open table model.
+#                   Merged html-tbl.mod file into main file.
+#                   Added %common.att; to all HTML table elements.
+-->
+
+<!--    TR and TD attributes:
+        Alignment attributes.  No default. -->
+<!ENTITY % trtd.att
+        "align          (left
+                        |center
+                        |right)         #IMPLIED
+        valign          (top
+                        |middle
+                        |bottom)        #IMPLIED">
+
+<!ELEMENT htable (htbody+)>
+<!ATTLIST htable
+          border        CDATA           "0"
+          cellpadding   CDATA           "0"
+          align         (left
+                        |center
+                        |right)         "left">
+
+<!ELEMENT htbody (tr+)>
+<!ATTLIST htbody %common.att;>
+
+<!ELEMENT tr     (td+)>
+<!ATTLIST tr
+        %common.att;
+        %trtd.att;>
+
+<!ELEMENT td     (%p.pcd.mix;)*>
+<!ATTLIST td
+        %common.att;
+        %trtd.att;
+        bgcolor         CDATA           #IMPLIED
+        rowspan         CDATA           "1"
+        colspan         CDATA           "1">
+
+<!-- ............................................................... -->
+<!-- Phrase-level elements ......................................... -->
+
+<!--    bibref: Should generate, in square brackets, "key" on bibl -->
+<!ELEMENT bibref EMPTY>
+<!--    ref attribute:
+        A bibliography reference must link to the bibl element that
+        describes the resource. -->
+<!ATTLIST bibref
+        %common.att;
+        %ref-req.att;>
+
+<!ELEMENT code (%tech.pcd.mix;)*>
+<!ATTLIST code %common.att;>
+
+<!--
+#1998-03-10: maler: Declared ednote and related elements.
+-->
+
+<!ELEMENT ednote (name?, date?, edtext)>
+<!ATTLIST ednote %common.att;>
+
+<!ELEMENT date (#PCDATA)>
+<!ATTLIST date %common.att;>
+
+<!ELEMENT edtext (#PCDATA)>
+<!ATTLIST edtext %common.att;>
+
+<!ELEMENT emph (#PCDATA)>
+<!ATTLIST emph %common.att;>
+
+<!--    footnote: Both footnote content and call to footnote -->
+<!ELEMENT footnote (%obj.mix;)+>
+<!ATTLIST footnote %common.att;>
+
+<!ELEMENT kw (%tech.pcd.mix;)*>
+<!ATTLIST kw %common.att;>
+
+<!ELEMENT loc (#PCDATA)>
+<!--    HREF attribute:
+        The purpose of a loc element is to function as a hypertext
+        link to a resource.  (Ideally, the content of loc will also
+        mention the URI of the resource, so that readers of the
+        printed version will be able to locate the resource.) -->
+<!ATTLIST loc
+        %common.att;
+        %href-req.att;>
+
+<!ELEMENT nt (#PCDATA)>
+<!--    def attribute:
+        The nonterminal must link to the production that defines
+        it. -->
+<!ATTLIST nt
+        %common.att;
+        %def-req.att;>
+
+<!--
+#1998-03-10: maler: Declared quote.
+-->
+
+<!--    quote: Scare quotes and other purely presentational quotes -->
+<!ELEMENT quote (%p.pcd.mix;)*>
+<!ATTLIST quote %common.att;>
+
+<!--    specref: Should generate italic "[n.n], Section Title" for
+        div, "n" for numbered item, or "[n]" for production -->
+<!ELEMENT specref EMPTY>
+<!--    ref attribute:
+        The purpose of a specref element is to link to a div, item
+        in an olist, or production in the current spec. -->
+<!ATTLIST specref
+        %common.att;
+        %ref-req.att;>
+
+<!ELEMENT term (#PCDATA)>
+<!ATTLIST term %common.att;>
+
+<!ELEMENT termdef (%termdef.pcd.mix;|%termdef.mix;)*>
+<!--    ID attribute:
+        A term definition must have an ID so that it can be linked
+        to from termref elements. -->
+<!--    term attribute:
+        The canonical form of the term or phrase being defined must
+        appear in this attribute, even if the term or phrase also
+        appears in the element content in identical form (e.g., in
+        the term element). -->
+<!ATTLIST termdef
+        %common-idreq.att;
+        term            CDATA           #REQUIRED>
+
+<!ELEMENT termref (#PCDATA)>
+<!--    ref attribute:
+        A term reference must link to the termdef element that
+        defines the term. -->
+<!ATTLIST termref
+        %common.att;
+        %def-req.att;>
+
+<!ELEMENT titleref (#PCDATA)>
+<!--    HREF attribute:
+        A title reference can optionally function as a hypertext
+        link to the resource with this title. -->
+<!ATTLIST titleref
+        %common.att;
+        %href.att;>
+
+<!ELEMENT xnt (#PCDATA)>
+<!--    HREF attribute:
+        The nonterminal must hyperlink to a resource that serves
+        to define it (e.g., a production in a related XML
+        specification). -->
+<!ATTLIST xnt
+        %common.att;
+        %href-req.att;>
+
+<!--
+#1997-12-29: maler: Declared xspecref.
+-->
+
+<!ELEMENT xspecref (#PCDATA)>
+<!--    HREF attribute:
+        The spec reference must hyperlink to the resource to
+        cross-refer to (e.g., a section in a related XML
+        specification). -->
+<!ATTLIST xspecref
+        %common.att;
+        %href-req.att;>
+
+<!ELEMENT xtermref (#PCDATA)>
+<!--    HREF attribute:
+        The term reference must hyperlink to the resource that
+        serves to define the term (e.g., a term definition in
+        a related XML specification). -->
+<!ATTLIST xtermref
+        %common.att;
+        %href-req.att;>
+
+<!-- ............................................................... -->
+<!-- Unused elements for ADEPT ..................................... -->
+
+<!--
+#1997-09-30: maler: Added unusued elements.
+#1997-10-14: maler: Fixed div to move nested div to the mixture.
+-->
+
+<!--    The following elements are purposely declared but never
+        referenced.  Declaring them allows them to be pasted from
+        an HTML document into a document using this DTD in ADEPT.
+        The ATD Context Transformation mechanism will try to convert
+        them to the appropriate element for this DTD.  While this
+        conversion will not work for all fragments, it does allow
+        many cases to work reasonably well. -->
+
+<!ELEMENT div
+        (head?, (%div.mix;|ul|ol|h1|h2|h3|h4|h5|h6|div)*)>
+<!ELEMENT h1 (%head.pcd.mix;|em|a)*>
+<!ELEMENT h2 (%head.pcd.mix;|em|a)*>
+<!ELEMENT h3 (%head.pcd.mix;|em|a)*>
+<!ELEMENT h4 (%head.pcd.mix;|em|a)*>
+<!ELEMENT h5 (%head.pcd.mix;|em|a)*>
+<!ELEMENT h6 (%head.pcd.mix;|em|a)*>
+<!ELEMENT pre (%eg.pcd.mix;|em)*>
+<!ELEMENT ul (item|li)*>
+<!ELEMENT ol (item|li)*>
+<!ELEMENT li (#PCDATA|%obj.mix;)*>
+<!ELEMENT em (#PCDATA)>
+<!ELEMENT a (#PCDATA)>
+
+<!-- ............................................................... -->
+<!-- Change history ................................................ -->
+
+<!--
+#1997-08-18: maler
+#- Did a major revision.
+#1997-09-10: maler
+#- Updated FPI.
+#- Removed namekey element and put key attribute on name element.
+#- Made statusp element and supporting entities.
+#- Added slist element with sitem+ content.
+#- Required head on scrap and added new bnf subelement.
+#- Added an xnt element and allowed it and nt in regular text and rhs.
+#- Removed the ntref element.
+#- Added back the com element to the content of rhs.
+#- Added a key attribute to bibl.
+#- Removed the ident element.
+#- Added a term element to be used inside termdef.
+#- Added an xtermref element parallel to termref.
+#- Beefed up DTD comments.
+#1997-09-12: maler
+#- Allowed term element in general text.
+#- Changed bibref to EMPTY.
+#- Added ref.class to termdef.pcd.mix.
+#1997-09-14: maler
+#- Changed main attribute of xtermref from def to href.
+#- Added termdef.class to label contents.
+#1997-09-30: maler
+#- Added character entity module and added new entities.
+#- Removed p from appearing directly in self; created %p.mix;.
+#- Added inform-div (non-normative division) element.
+#- Fixed xtermref comment to mention HREF, not ref.
+#- Extended orglist model to allow optional affiliation.
+#- Modified author to make affiliation optional.
+#- Added %speclist.class; and %note.class; to %obj.mix; and %p.mix;.
+#- Added %note.class; and %illus.class; to %termdef.pcd.mix;.
+#- Added unused HTML elements.
+#- Put empty system ID next to public ID in entity declarations.
+#1997-10-14: maler
+#- Fixed "unused" div content model to move nested div to mixture.
+#1997-10-16: maler
+#- Added SGML Open Exchange tables.
+#1997-11-28: maler
+#- Added support for prodgroup and its attributes.
+#- Added support for HTML tables.
+#- Added loc and bibref to content of com.
+#- Added loc to general p content models.
+#- Allowed p as alternative to statusp in status.
+#- Added non-null system IDs to external parameter entity declarations.
+#- (Modified the SGML Open table module to make it XML-compliant.)
+#- (Modified the character entity module.)
+#1997-12-29: maler
+#- Moved #PCDATA occurrences to come before GIs in content models.
+#- Removed use of the SGML Open table module.
+#- Added xspecref element.
+#- Ensured that all FPIs contain 4-digit year.
+#- (Modified the character entity module.)
+#1997-03-10: maler
+#- Merged the character entity and table modules into the main file.
+#- Added ldquo and rdquo entities.
+#- Added common attributes to prodgroup.
+#- Made the email element in header optional.
+#- Removed reference to the SGML Open table model.
+#- Added ednote element.
+#- Added quote element.
+#- Updated XLink usage to reflect 3 March 1998 WD.
+#- Added "local" entities to the class entities for customization.
+#- Parameterized several content models to allow for customization.
+#1997-03-23: maler
+#- Cleaned up some comments and removed some others.
+#- Added xml:space semi-common attribute to eg and bnf elements.
+#- Added show and embed attributes on all the uses of href.
+#- Added %common.att; to all HTML table elements.
+#- Added a real URI to the "typical invocation" comment.
+-->
+
+<!-- ............................................................... -->
+<!-- End of XML specification DTD .................................. -->
+<!-- ............................................................... -->
diff --git a/TC/testcase/res/UTsXml/test/valid/dtds/utf16b.ent b/TC/testcase/res/UTsXml/test/valid/dtds/utf16b.ent
new file mode 100755 (executable)
index 0000000..52c7e2d
Binary files /dev/null and b/TC/testcase/res/UTsXml/test/valid/dtds/utf16b.ent differ
diff --git a/TC/testcase/res/UTsXml/test/valid/dtds/utf16l.ent b/TC/testcase/res/UTsXml/test/valid/dtds/utf16l.ent
new file mode 100755 (executable)
index 0000000..2cad40a
Binary files /dev/null and b/TC/testcase/res/UTsXml/test/valid/dtds/utf16l.ent differ
diff --git a/TC/testcase/res/UTsXml/test/valid/dtds/xhtml-lat1.ent b/TC/testcase/res/UTsXml/test/valid/dtds/xhtml-lat1.ent
new file mode 100755 (executable)
index 0000000..aaae738
--- /dev/null
@@ -0,0 +1,196 @@
+<!-- Portions (C) International Organization for Standardization 1986
+     Permission to copy in any form is granted for use with
+     conforming SGML systems and applications as defined in
+     ISO 8879, provided this notice is included in all copies.
+-->
+<!-- Character entity set. Typical invocation:
+    <!ENTITY % HTMLlat1 PUBLIC
+       "-//W3C//ENTITIES Latin 1 for XHTML//EN"
+       "http://www.w3.org/TR/xhtml1/DTD/xhtml-lat1.ent">
+    %HTMLlat1;
+-->
+
+<!ENTITY nbsp   "&#160;"> <!-- no-break space = non-breaking space,
+                                  U+00A0 ISOnum -->
+<!ENTITY iexcl  "&#161;"> <!-- inverted exclamation mark, U+00A1 ISOnum -->
+<!ENTITY cent   "&#162;"> <!-- cent sign, U+00A2 ISOnum -->
+<!ENTITY pound  "&#163;"> <!-- pound sign, U+00A3 ISOnum -->
+<!ENTITY curren "&#164;"> <!-- currency sign, U+00A4 ISOnum -->
+<!ENTITY yen    "&#165;"> <!-- yen sign = yuan sign, U+00A5 ISOnum -->
+<!ENTITY brvbar "&#166;"> <!-- broken bar = broken vertical bar,
+                                  U+00A6 ISOnum -->
+<!ENTITY sect   "&#167;"> <!-- section sign, U+00A7 ISOnum -->
+<!ENTITY uml    "&#168;"> <!-- diaeresis = spacing diaeresis,
+                                  U+00A8 ISOdia -->
+<!ENTITY copy   "&#169;"> <!-- copyright sign, U+00A9 ISOnum -->
+<!ENTITY ordf   "&#170;"> <!-- feminine ordinal indicator, U+00AA ISOnum -->
+<!ENTITY laquo  "&#171;"> <!-- left-pointing double angle quotation mark
+                                  = left pointing guillemet, U+00AB ISOnum -->
+<!ENTITY not    "&#172;"> <!-- not sign = discretionary hyphen,
+                                  U+00AC ISOnum -->
+<!ENTITY shy    "&#173;"> <!-- soft hyphen = discretionary hyphen,
+                                  U+00AD ISOnum -->
+<!ENTITY reg    "&#174;"> <!-- registered sign = registered trade mark sign,
+                                  U+00AE ISOnum -->
+<!ENTITY macr   "&#175;"> <!-- macron = spacing macron = overline
+                                  = APL overbar, U+00AF ISOdia -->
+<!ENTITY deg    "&#176;"> <!-- degree sign, U+00B0 ISOnum -->
+<!ENTITY plusmn "&#177;"> <!-- plus-minus sign = plus-or-minus sign,
+                                  U+00B1 ISOnum -->
+<!ENTITY sup2   "&#178;"> <!-- superscript two = superscript digit two
+                                  = squared, U+00B2 ISOnum -->
+<!ENTITY sup3   "&#179;"> <!-- superscript three = superscript digit three
+                                  = cubed, U+00B3 ISOnum -->
+<!ENTITY acute  "&#180;"> <!-- acute accent = spacing acute,
+                                  U+00B4 ISOdia -->
+<!ENTITY micro  "&#181;"> <!-- micro sign, U+00B5 ISOnum -->
+<!ENTITY para   "&#182;"> <!-- pilcrow sign = paragraph sign,
+                                  U+00B6 ISOnum -->
+<!ENTITY middot "&#183;"> <!-- middle dot = Georgian comma
+                                  = Greek middle dot, U+00B7 ISOnum -->
+<!ENTITY cedil  "&#184;"> <!-- cedilla = spacing cedilla, U+00B8 ISOdia -->
+<!ENTITY sup1   "&#185;"> <!-- superscript one = superscript digit one,
+                                  U+00B9 ISOnum -->
+<!ENTITY ordm   "&#186;"> <!-- masculine ordinal indicator,
+                                  U+00BA ISOnum -->
+<!ENTITY raquo  "&#187;"> <!-- right-pointing double angle quotation mark
+                                  = right pointing guillemet, U+00BB ISOnum -->
+<!ENTITY frac14 "&#188;"> <!-- vulgar fraction one quarter
+                                  = fraction one quarter, U+00BC ISOnum -->
+<!ENTITY frac12 "&#189;"> <!-- vulgar fraction one half
+                                  = fraction one half, U+00BD ISOnum -->
+<!ENTITY frac34 "&#190;"> <!-- vulgar fraction three quarters
+                                  = fraction three quarters, U+00BE ISOnum -->
+<!ENTITY iquest "&#191;"> <!-- inverted question mark
+                                  = turned question mark, U+00BF ISOnum -->
+<!ENTITY Agrave "&#192;"> <!-- latin capital letter A with grave
+                                  = latin capital letter A grave,
+                                  U+00C0 ISOlat1 -->
+<!ENTITY Aacute "&#193;"> <!-- latin capital letter A with acute,
+                                  U+00C1 ISOlat1 -->
+<!ENTITY Acirc  "&#194;"> <!-- latin capital letter A with circumflex,
+                                  U+00C2 ISOlat1 -->
+<!ENTITY Atilde "&#195;"> <!-- latin capital letter A with tilde,
+                                  U+00C3 ISOlat1 -->
+<!ENTITY Auml   "&#196;"> <!-- latin capital letter A with diaeresis,
+                                  U+00C4 ISOlat1 -->
+<!ENTITY Aring  "&#197;"> <!-- latin capital letter A with ring above
+                                  = latin capital letter A ring,
+                                  U+00C5 ISOlat1 -->
+<!ENTITY AElig  "&#198;"> <!-- latin capital letter AE
+                                  = latin capital ligature AE,
+                                  U+00C6 ISOlat1 -->
+<!ENTITY Ccedil "&#199;"> <!-- latin capital letter C with cedilla,
+                                  U+00C7 ISOlat1 -->
+<!ENTITY Egrave "&#200;"> <!-- latin capital letter E with grave,
+                                  U+00C8 ISOlat1 -->
+<!ENTITY Eacute "&#201;"> <!-- latin capital letter E with acute,
+                                  U+00C9 ISOlat1 -->
+<!ENTITY Ecirc  "&#202;"> <!-- latin capital letter E with circumflex,
+                                  U+00CA ISOlat1 -->
+<!ENTITY Euml   "&#203;"> <!-- latin capital letter E with diaeresis,
+                                  U+00CB ISOlat1 -->
+<!ENTITY Igrave "&#204;"> <!-- latin capital letter I with grave,
+                                  U+00CC ISOlat1 -->
+<!ENTITY Iacute "&#205;"> <!-- latin capital letter I with acute,
+                                  U+00CD ISOlat1 -->
+<!ENTITY Icirc  "&#206;"> <!-- latin capital letter I with circumflex,
+                                  U+00CE ISOlat1 -->
+<!ENTITY Iuml   "&#207;"> <!-- latin capital letter I with diaeresis,
+                                  U+00CF ISOlat1 -->
+<!ENTITY ETH    "&#208;"> <!-- latin capital letter ETH, U+00D0 ISOlat1 -->
+<!ENTITY Ntilde "&#209;"> <!-- latin capital letter N with tilde,
+                                  U+00D1 ISOlat1 -->
+<!ENTITY Ograve "&#210;"> <!-- latin capital letter O with grave,
+                                  U+00D2 ISOlat1 -->
+<!ENTITY Oacute "&#211;"> <!-- latin capital letter O with acute,
+                                  U+00D3 ISOlat1 -->
+<!ENTITY Ocirc  "&#212;"> <!-- latin capital letter O with circumflex,
+                                  U+00D4 ISOlat1 -->
+<!ENTITY Otilde "&#213;"> <!-- latin capital letter O with tilde,
+                                  U+00D5 ISOlat1 -->
+<!ENTITY Ouml   "&#214;"> <!-- latin capital letter O with diaeresis,
+                                  U+00D6 ISOlat1 -->
+<!ENTITY times  "&#215;"> <!-- multiplication sign, U+00D7 ISOnum -->
+<!ENTITY Oslash "&#216;"> <!-- latin capital letter O with stroke
+                                  = latin capital letter O slash,
+                                  U+00D8 ISOlat1 -->
+<!ENTITY Ugrave "&#217;"> <!-- latin capital letter U with grave,
+                                  U+00D9 ISOlat1 -->
+<!ENTITY Uacute "&#218;"> <!-- latin capital letter U with acute,
+                                  U+00DA ISOlat1 -->
+<!ENTITY Ucirc  "&#219;"> <!-- latin capital letter U with circumflex,
+                                  U+00DB ISOlat1 -->
+<!ENTITY Uuml   "&#220;"> <!-- latin capital letter U with diaeresis,
+                                  U+00DC ISOlat1 -->
+<!ENTITY Yacute "&#221;"> <!-- latin capital letter Y with acute,
+                                  U+00DD ISOlat1 -->
+<!ENTITY THORN  "&#222;"> <!-- latin capital letter THORN,
+                                  U+00DE ISOlat1 -->
+<!ENTITY szlig  "&#223;"> <!-- latin small letter sharp s = ess-zed,
+                                  U+00DF ISOlat1 -->
+<!ENTITY agrave "&#224;"> <!-- latin small letter a with grave
+                                  = latin small letter a grave,
+                                  U+00E0 ISOlat1 -->
+<!ENTITY aacute "&#225;"> <!-- latin small letter a with acute,
+                                  U+00E1 ISOlat1 -->
+<!ENTITY acirc  "&#226;"> <!-- latin small letter a with circumflex,
+                                  U+00E2 ISOlat1 -->
+<!ENTITY atilde "&#227;"> <!-- latin small letter a with tilde,
+                                  U+00E3 ISOlat1 -->
+<!ENTITY auml   "&#228;"> <!-- latin small letter a with diaeresis,
+                                  U+00E4 ISOlat1 -->
+<!ENTITY aring  "&#229;"> <!-- latin small letter a with ring above
+                                  = latin small letter a ring,
+                                  U+00E5 ISOlat1 -->
+<!ENTITY aelig  "&#230;"> <!-- latin small letter ae
+                                  = latin small ligature ae, U+00E6 ISOlat1 -->
+<!ENTITY ccedil "&#231;"> <!-- latin small letter c with cedilla,
+                                  U+00E7 ISOlat1 -->
+<!ENTITY egrave "&#232;"> <!-- latin small letter e with grave,
+                                  U+00E8 ISOlat1 -->
+<!ENTITY eacute "&#233;"> <!-- latin small letter e with acute,
+                                  U+00E9 ISOlat1 -->
+<!ENTITY ecirc  "&#234;"> <!-- latin small letter e with circumflex,
+                                  U+00EA ISOlat1 -->
+<!ENTITY euml   "&#235;"> <!-- latin small letter e with diaeresis,
+                                  U+00EB ISOlat1 -->
+<!ENTITY igrave "&#236;"> <!-- latin small letter i with grave,
+                                  U+00EC ISOlat1 -->
+<!ENTITY iacute "&#237;"> <!-- latin small letter i with acute,
+                                  U+00ED ISOlat1 -->
+<!ENTITY icirc  "&#238;"> <!-- latin small letter i with circumflex,
+                                  U+00EE ISOlat1 -->
+<!ENTITY iuml   "&#239;"> <!-- latin small letter i with diaeresis,
+                                  U+00EF ISOlat1 -->
+<!ENTITY eth    "&#240;"> <!-- latin small letter eth, U+00F0 ISOlat1 -->
+<!ENTITY ntilde "&#241;"> <!-- latin small letter n with tilde,
+                                  U+00F1 ISOlat1 -->
+<!ENTITY ograve "&#242;"> <!-- latin small letter o with grave,
+                                  U+00F2 ISOlat1 -->
+<!ENTITY oacute "&#243;"> <!-- latin small letter o with acute,
+                                  U+00F3 ISOlat1 -->
+<!ENTITY ocirc  "&#244;"> <!-- latin small letter o with circumflex,
+                                  U+00F4 ISOlat1 -->
+<!ENTITY otilde "&#245;"> <!-- latin small letter o with tilde,
+                                  U+00F5 ISOlat1 -->
+<!ENTITY ouml   "&#246;"> <!-- latin small letter o with diaeresis,
+                                  U+00F6 ISOlat1 -->
+<!ENTITY divide "&#247;"> <!-- division sign, U+00F7 ISOnum -->
+<!ENTITY oslash "&#248;"> <!-- latin small letter o with stroke,
+                                  = latin small letter o slash,
+                                  U+00F8 ISOlat1 -->
+<!ENTITY ugrave "&#249;"> <!-- latin small letter u with grave,
+                                  U+00F9 ISOlat1 -->
+<!ENTITY uacute "&#250;"> <!-- latin small letter u with acute,
+                                  U+00FA ISOlat1 -->
+<!ENTITY ucirc  "&#251;"> <!-- latin small letter u with circumflex,
+                                  U+00FB ISOlat1 -->
+<!ENTITY uuml   "&#252;"> <!-- latin small letter u with diaeresis,
+                                  U+00FC ISOlat1 -->
+<!ENTITY yacute "&#253;"> <!-- latin small letter y with acute,
+                                  U+00FD ISOlat1 -->
+<!ENTITY thorn  "&#254;"> <!-- latin small letter thorn with,
+                                  U+00FE ISOlat1 -->
+<!ENTITY yuml   "&#255;"> <!-- latin small letter y with diaeresis,
+                                  U+00FF ISOlat1 -->
diff --git a/TC/testcase/res/UTsXml/test/valid/dtds/xhtml-special.ent b/TC/testcase/res/UTsXml/test/valid/dtds/xhtml-special.ent
new file mode 100755 (executable)
index 0000000..cf709d1
--- /dev/null
@@ -0,0 +1,79 @@
+<!-- Special characters for HTML -->
+
+<!-- Character entity set. Typical invocation:
+     <!ENTITY % HTMLspecial PUBLIC
+        "-//W3C//ENTITIES Special for XHTML//EN"
+        "http://www.w3.org/TR/xhtml1/DTD/xhtml-special.ent">
+     %HTMLspecial;
+-->
+
+<!-- Portions (C) International Organization for Standardization 1986:
+     Permission to copy in any form is granted for use with
+     conforming SGML systems and applications as defined in
+     ISO 8879, provided this notice is included in all copies.
+-->
+
+<!-- Relevant ISO entity set is given unless names are newly introduced.
+     New names (i.e., not in ISO 8879 list) do not clash with any
+     existing ISO 8879 entity names. ISO 10646 character numbers
+     are given for each character, in hex. values are decimal
+     conversions of the ISO 10646 values and refer to the document
+     character set. Names are Unicode names. 
+-->
+
+<!-- C0 Controls and Basic Latin -->
+<!ENTITY quot    "&#34;"> <!--  quotation mark = APL quote,
+                                    U+0022 ISOnum -->
+<!ENTITY amp     "&#38;#38;"> <!--  ampersand, U+0026 ISOnum -->
+<!ENTITY lt      "&#38;#60;"> <!--  less-than sign, U+003C ISOnum -->
+<!ENTITY gt      "&#62;"> <!--  greater-than sign, U+003E ISOnum -->
+<!ENTITY apos   "&#39;"> <!--  apostrophe mark, U+0027 ISOnum -->
+
+<!-- Latin Extended-A -->
+<!ENTITY OElig   "&#338;"> <!--  latin capital ligature OE,
+                                    U+0152 ISOlat2 -->
+<!ENTITY oelig   "&#339;"> <!--  latin small ligature oe, U+0153 ISOlat2 -->
+<!-- ligature is a misnomer, this is a separate character in some languages -->
+<!ENTITY Scaron  "&#352;"> <!--  latin capital letter S with caron,
+                                    U+0160 ISOlat2 -->
+<!ENTITY scaron  "&#353;"> <!--  latin small letter s with caron,
+                                    U+0161 ISOlat2 -->
+<!ENTITY Yuml    "&#376;"> <!--  latin capital letter Y with diaeresis,
+                                    U+0178 ISOlat2 -->
+
+<!-- Spacing Modifier Letters -->
+<!ENTITY circ    "&#710;"> <!--  modifier letter circumflex accent,
+                                    U+02C6 ISOpub -->
+<!ENTITY tilde   "&#732;"> <!--  small tilde, U+02DC ISOdia -->
+
+<!-- General Punctuation -->
+<!ENTITY ensp    "&#8194;"> <!-- en space, U+2002 ISOpub -->
+<!ENTITY emsp    "&#8195;"> <!-- em space, U+2003 ISOpub -->
+<!ENTITY thinsp  "&#8201;"> <!-- thin space, U+2009 ISOpub -->
+<!ENTITY zwnj    "&#8204;"> <!-- zero width non-joiner,
+                                    U+200C NEW RFC 2070 -->
+<!ENTITY zwj     "&#8205;"> <!-- zero width joiner, U+200D NEW RFC 2070 -->
+<!ENTITY lrm     "&#8206;"> <!-- left-to-right mark, U+200E NEW RFC 2070 -->
+<!ENTITY rlm     "&#8207;"> <!-- right-to-left mark, U+200F NEW RFC 2070 -->
+<!ENTITY ndash   "&#8211;"> <!-- en dash, U+2013 ISOpub -->
+<!ENTITY mdash   "&#8212;"> <!-- em dash, U+2014 ISOpub -->
+<!ENTITY lsquo   "&#8216;"> <!-- left single quotation mark,
+                                    U+2018 ISOnum -->
+<!ENTITY rsquo   "&#8217;"> <!-- right single quotation mark,
+                                    U+2019 ISOnum -->
+<!ENTITY sbquo   "&#8218;"> <!-- single low-9 quotation mark, U+201A NEW -->
+<!ENTITY ldquo   "&#8220;"> <!-- left double quotation mark,
+                                    U+201C ISOnum -->
+<!ENTITY rdquo   "&#8221;"> <!-- right double quotation mark,
+                                    U+201D ISOnum -->
+<!ENTITY bdquo   "&#8222;"> <!-- double low-9 quotation mark, U+201E NEW -->
+<!ENTITY dagger  "&#8224;"> <!-- dagger, U+2020 ISOpub -->
+<!ENTITY Dagger  "&#8225;"> <!-- double dagger, U+2021 ISOpub -->
+<!ENTITY permil  "&#8240;"> <!-- per mille sign, U+2030 ISOtech -->
+<!ENTITY lsaquo  "&#8249;"> <!-- single left-pointing angle quotation mark,
+                                    U+2039 ISO proposed -->
+<!-- lsaquo is proposed but not yet ISO standardized -->
+<!ENTITY rsaquo  "&#8250;"> <!-- single right-pointing angle quotation mark,
+                                    U+203A ISO proposed -->
+<!-- rsaquo is proposed but not yet ISO standardized -->
+<!ENTITY euro   "&#8364;"> <!--  euro sign, U+20AC NEW -->
diff --git a/TC/testcase/res/UTsXml/test/valid/dtds/xhtml-symbol.ent b/TC/testcase/res/UTsXml/test/valid/dtds/xhtml-symbol.ent
new file mode 100755 (executable)
index 0000000..16f876b
--- /dev/null
@@ -0,0 +1,242 @@
+<!-- Mathematical, Greek and Symbolic characters for HTML -->
+
+<!-- Character entity set. Typical invocation:
+     <!ENTITY % HTMLsymbol PUBLIC
+        "-//W3C//ENTITIES Symbols for XHTML//EN"
+        "http://www.w3.org/TR/xhtml1/DTD/xhtml-symbol.ent">
+     %HTMLsymbol;
+-->
+
+<!-- Portions (C) International Organization for Standardization 1986:
+     Permission to copy in any form is granted for use with
+     conforming SGML systems and applications as defined in
+     ISO 8879, provided this notice is included in all copies.
+-->
+
+<!-- Relevant ISO entity set is given unless names are newly introduced.
+     New names (i.e., not in ISO 8879 list) do not clash with any
+     existing ISO 8879 entity names. ISO 10646 character numbers
+     are given for each character, in hex. values are decimal
+     conversions of the ISO 10646 values and refer to the document
+     character set. Names are Unicode names. 
+-->
+
+<!-- Latin Extended-B -->
+<!ENTITY fnof     "&#402;"> <!-- latin small f with hook = function
+                                    = florin, U+0192 ISOtech -->
+
+<!-- Greek -->
+<!ENTITY Alpha    "&#913;"> <!-- greek capital letter alpha, U+0391 -->
+<!ENTITY Beta     "&#914;"> <!-- greek capital letter beta, U+0392 -->
+<!ENTITY Gamma    "&#915;"> <!-- greek capital letter gamma,
+                                    U+0393 ISOgrk3 -->
+<!ENTITY Delta    "&#916;"> <!-- greek capital letter delta,
+                                    U+0394 ISOgrk3 -->
+<!ENTITY Epsilon  "&#917;"> <!-- greek capital letter epsilon, U+0395 -->
+<!ENTITY Zeta     "&#918;"> <!-- greek capital letter zeta, U+0396 -->
+<!ENTITY Eta      "&#919;"> <!-- greek capital letter eta, U+0397 -->
+<!ENTITY Theta    "&#920;"> <!-- greek capital letter theta,
+                                    U+0398 ISOgrk3 -->
+<!ENTITY Iota     "&#921;"> <!-- greek capital letter iota, U+0399 -->
+<!ENTITY Kappa    "&#922;"> <!-- greek capital letter kappa, U+039A -->
+<!ENTITY Lambda   "&#923;"> <!-- greek capital letter lambda,
+                                    U+039B ISOgrk3 -->
+<!ENTITY Mu       "&#924;"> <!-- greek capital letter mu, U+039C -->
+<!ENTITY Nu       "&#925;"> <!-- greek capital letter nu, U+039D -->
+<!ENTITY Xi       "&#926;"> <!-- greek capital letter xi, U+039E ISOgrk3 -->
+<!ENTITY Omicron  "&#927;"> <!-- greek capital letter omicron, U+039F -->
+<!ENTITY Pi       "&#928;"> <!-- greek capital letter pi, U+03A0 ISOgrk3 -->
+<!ENTITY Rho      "&#929;"> <!-- greek capital letter rho, U+03A1 -->
+<!-- there is no Sigmaf, and no U+03A2 character either -->
+<!ENTITY Sigma    "&#931;"> <!-- greek capital letter sigma,
+                                    U+03A3 ISOgrk3 -->
+<!ENTITY Tau      "&#932;"> <!-- greek capital letter tau, U+03A4 -->
+<!ENTITY Upsilon  "&#933;"> <!-- greek capital letter upsilon,
+                                    U+03A5 ISOgrk3 -->
+<!ENTITY Phi      "&#934;"> <!-- greek capital letter phi,
+                                    U+03A6 ISOgrk3 -->
+<!ENTITY Chi      "&#935;"> <!-- greek capital letter chi, U+03A7 -->
+<!ENTITY Psi      "&#936;"> <!-- greek capital letter psi,
+                                    U+03A8 ISOgrk3 -->
+<!ENTITY Omega    "&#937;"> <!-- greek capital letter omega,
+                                    U+03A9 ISOgrk3 -->
+
+<!ENTITY alpha    "&#945;"> <!-- greek small letter alpha,
+                                    U+03B1 ISOgrk3 -->
+<!ENTITY beta     "&#946;"> <!-- greek small letter beta, U+03B2 ISOgrk3 -->
+<!ENTITY gamma    "&#947;"> <!-- greek small letter gamma,
+                                    U+03B3 ISOgrk3 -->
+<!ENTITY delta    "&#948;"> <!-- greek small letter delta,
+                                    U+03B4 ISOgrk3 -->
+<!ENTITY epsilon  "&#949;"> <!-- greek small letter epsilon,
+                                    U+03B5 ISOgrk3 -->
+<!ENTITY zeta     "&#950;"> <!-- greek small letter zeta, U+03B6 ISOgrk3 -->
+<!ENTITY eta      "&#951;"> <!-- greek small letter eta, U+03B7 ISOgrk3 -->
+<!ENTITY theta    "&#952;"> <!-- greek small letter theta,
+                                    U+03B8 ISOgrk3 -->
+<!ENTITY iota     "&#953;"> <!-- greek small letter iota, U+03B9 ISOgrk3 -->
+<!ENTITY kappa    "&#954;"> <!-- greek small letter kappa,
+                                    U+03BA ISOgrk3 -->
+<!ENTITY lambda   "&#955;"> <!-- greek small letter lambda,
+                                    U+03BB ISOgrk3 -->
+<!ENTITY mu       "&#956;"> <!-- greek small letter mu, U+03BC ISOgrk3 -->
+<!ENTITY nu       "&#957;"> <!-- greek small letter nu, U+03BD ISOgrk3 -->
+<!ENTITY xi       "&#958;"> <!-- greek small letter xi, U+03BE ISOgrk3 -->
+<!ENTITY omicron  "&#959;"> <!-- greek small letter omicron, U+03BF NEW -->
+<!ENTITY pi       "&#960;"> <!-- greek small letter pi, U+03C0 ISOgrk3 -->
+<!ENTITY rho      "&#961;"> <!-- greek small letter rho, U+03C1 ISOgrk3 -->
+<!ENTITY sigmaf   "&#962;"> <!-- greek small letter final sigma,
+                                    U+03C2 ISOgrk3 -->
+<!ENTITY sigma    "&#963;"> <!-- greek small letter sigma,
+                                    U+03C3 ISOgrk3 -->
+<!ENTITY tau      "&#964;"> <!-- greek small letter tau, U+03C4 ISOgrk3 -->
+<!ENTITY upsilon  "&#965;"> <!-- greek small letter upsilon,
+                                    U+03C5 ISOgrk3 -->
+<!ENTITY phi      "&#966;"> <!-- greek small letter phi, U+03C6 ISOgrk3 -->
+<!ENTITY chi      "&#967;"> <!-- greek small letter chi, U+03C7 ISOgrk3 -->
+<!ENTITY psi      "&#968;"> <!-- greek small letter psi, U+03C8 ISOgrk3 -->
+<!ENTITY omega    "&#969;"> <!-- greek small letter omega,
+                                    U+03C9 ISOgrk3 -->
+<!ENTITY thetasym "&#977;"> <!-- greek small letter theta symbol,
+                                    U+03D1 NEW -->
+<!ENTITY upsih    "&#978;"> <!-- greek upsilon with hook symbol,
+                                    U+03D2 NEW -->
+<!ENTITY piv      "&#982;"> <!-- greek pi symbol, U+03D6 ISOgrk3 -->
+
+<!-- General Punctuation -->
+<!ENTITY bull     "&#8226;"> <!-- bullet = black small circle,
+                                     U+2022 ISOpub  -->
+<!-- bullet is NOT the same as bullet operator, U+2219 -->
+<!ENTITY hellip   "&#8230;"> <!-- horizontal ellipsis = three dot leader,
+                                     U+2026 ISOpub  -->
+<!ENTITY prime    "&#8242;"> <!-- prime = minutes = feet, U+2032 ISOtech -->
+<!ENTITY Prime    "&#8243;"> <!-- double prime = seconds = inches,
+                                     U+2033 ISOtech -->
+<!ENTITY oline    "&#8254;"> <!-- overline = spacing overscore,
+                                     U+203E NEW -->
+<!ENTITY frasl    "&#8260;"> <!-- fraction slash, U+2044 NEW -->
+
+<!-- Letterlike Symbols -->
+<!ENTITY weierp   "&#8472;"> <!-- script capital P = power set
+                                     = Weierstrass p, U+2118 ISOamso -->
+<!ENTITY image    "&#8465;"> <!-- blackletter capital I = imaginary part,
+                                     U+2111 ISOamso -->
+<!ENTITY real     "&#8476;"> <!-- blackletter capital R = real part symbol,
+                                     U+211C ISOamso -->
+<!ENTITY trade    "&#8482;"> <!-- trade mark sign, U+2122 ISOnum -->
+<!ENTITY alefsym  "&#8501;"> <!-- alef symbol = first transfinite cardinal,
+                                     U+2135 NEW -->
+<!-- alef symbol is NOT the same as hebrew letter alef,
+     U+05D0 although the same glyph could be used to depict both characters -->
+
+<!-- Arrows -->
+<!ENTITY larr     "&#8592;"> <!-- leftwards arrow, U+2190 ISOnum -->
+<!ENTITY uarr     "&#8593;"> <!-- upwards arrow, U+2191 ISOnum-->
+<!ENTITY rarr     "&#8594;"> <!-- rightwards arrow, U+2192 ISOnum -->
+<!ENTITY darr     "&#8595;"> <!-- downwards arrow, U+2193 ISOnum -->
+<!ENTITY harr     "&#8596;"> <!-- left right arrow, U+2194 ISOamsa -->
+<!ENTITY crarr    "&#8629;"> <!-- downwards arrow with corner leftwards
+                                     = carriage return, U+21B5 NEW -->
+<!ENTITY lArr     "&#8656;"> <!-- leftwards double arrow, U+21D0 ISOtech -->
+<!-- Unicode does not say that lArr is the same as the 'is implied by' arrow
+    but also does not have any other character for that function. So ? lArr can
+    be used for 'is implied by' as ISOtech suggests -->
+<!ENTITY uArr     "&#8657;"> <!-- upwards double arrow, U+21D1 ISOamsa -->
+<!ENTITY rArr     "&#8658;"> <!-- rightwards double arrow,
+                                     U+21D2 ISOtech -->
+<!-- Unicode does not say this is the 'implies' character but does not have 
+     another character with this function so ?
+     rArr can be used for 'implies' as ISOtech suggests -->
+<!ENTITY dArr     "&#8659;"> <!-- downwards double arrow, U+21D3 ISOamsa -->
+<!ENTITY hArr     "&#8660;"> <!-- left right double arrow,
+                                     U+21D4 ISOamsa -->
+
+<!-- Mathematical Operators -->
+<!ENTITY forall   "&#8704;"> <!-- for all, U+2200 ISOtech -->
+<!ENTITY part     "&#8706;"> <!-- partial differential, U+2202 ISOtech  -->
+<!ENTITY exist    "&#8707;"> <!-- there exists, U+2203 ISOtech -->
+<!ENTITY empty    "&#8709;"> <!-- empty set = null set = diameter,
+                                     U+2205 ISOamso -->
+<!ENTITY nabla    "&#8711;"> <!-- nabla = backward difference,
+                                     U+2207 ISOtech -->
+<!ENTITY isin     "&#8712;"> <!-- element of, U+2208 ISOtech -->
+<!ENTITY notin    "&#8713;"> <!-- not an element of, U+2209 ISOtech -->
+<!ENTITY ni       "&#8715;"> <!-- contains as member, U+220B ISOtech -->
+<!-- should there be a more memorable name than 'ni'? -->
+<!ENTITY prod     "&#8719;"> <!-- n-ary product = product sign,
+                                     U+220F ISOamsb -->
+<!-- prod is NOT the same character as U+03A0 'greek capital letter pi' though
+     the same glyph might be used for both -->
+<!ENTITY sum      "&#8721;"> <!-- n-ary sumation, U+2211 ISOamsb -->
+<!-- sum is NOT the same character as U+03A3 'greek capital letter sigma'
+     though the same glyph might be used for both -->
+<!ENTITY minus    "&#8722;"> <!-- minus sign, U+2212 ISOtech -->
+<!ENTITY lowast   "&#8727;"> <!-- asterisk operator, U+2217 ISOtech -->
+<!ENTITY radic    "&#8730;"> <!-- square root = radical sign,
+                                     U+221A ISOtech -->
+<!ENTITY prop     "&#8733;"> <!-- proportional to, U+221D ISOtech -->
+<!ENTITY infin    "&#8734;"> <!-- infinity, U+221E ISOtech -->
+<!ENTITY ang      "&#8736;"> <!-- angle, U+2220 ISOamso -->
+<!ENTITY and      "&#8743;"> <!-- logical and = wedge, U+2227 ISOtech -->
+<!ENTITY or       "&#8744;"> <!-- logical or = vee, U+2228 ISOtech -->
+<!ENTITY cap      "&#8745;"> <!-- intersection = cap, U+2229 ISOtech -->
+<!ENTITY cup      "&#8746;"> <!-- union = cup, U+222A ISOtech -->
+<!ENTITY int      "&#8747;"> <!-- integral, U+222B ISOtech -->
+<!ENTITY there4   "&#8756;"> <!-- therefore, U+2234 ISOtech -->
+<!ENTITY sim      "&#8764;"> <!-- tilde operator = varies with = similar to,
+                                     U+223C ISOtech -->
+<!-- tilde operator is NOT the same character as the tilde, U+007E,
+     although the same glyph might be used to represent both  -->
+<!ENTITY cong     "&#8773;"> <!-- approximately equal to, U+2245 ISOtech -->
+<!ENTITY asymp    "&#8776;"> <!-- almost equal to = asymptotic to,
+                                     U+2248 ISOamsr -->
+<!ENTITY ne       "&#8800;"> <!-- not equal to, U+2260 ISOtech -->
+<!ENTITY equiv    "&#8801;"> <!-- identical to, U+2261 ISOtech -->
+<!ENTITY le       "&#8804;"> <!-- less-than or equal to, U+2264 ISOtech -->
+<!ENTITY ge       "&#8805;"> <!-- greater-than or equal to,
+                                     U+2265 ISOtech -->
+<!ENTITY sub      "&#8834;"> <!-- subset of, U+2282 ISOtech -->
+<!ENTITY sup      "&#8835;"> <!-- superset of, U+2283 ISOtech -->
+<!-- note that nsup, 'not a superset of, U+2283' is not covered by the Symbol 
+     font encoding and is not included. Should it be, for symmetry?
+     It is in ISOamsn  --> 
+<!ENTITY nsub     "&#8836;"> <!-- not a subset of, U+2284 ISOamsn -->
+<!ENTITY sube     "&#8838;"> <!-- subset of or equal to, U+2286 ISOtech -->
+<!ENTITY supe     "&#8839;"> <!-- superset of or equal to,
+                                     U+2287 ISOtech -->
+<!ENTITY oplus    "&#8853;"> <!-- circled plus = direct sum,
+                                     U+2295 ISOamsb -->
+<!ENTITY otimes   "&#8855;"> <!-- circled times = vector product,
+                                     U+2297 ISOamsb -->
+<!ENTITY perp     "&#8869;"> <!-- up tack = orthogonal to = perpendicular,
+                                     U+22A5 ISOtech -->
+<!ENTITY sdot     "&#8901;"> <!-- dot operator, U+22C5 ISOamsb -->
+<!-- dot operator is NOT the same character as U+00B7 middle dot -->
+
+<!-- Miscellaneous Technical -->
+<!ENTITY lceil    "&#8968;"> <!-- left ceiling = apl upstile,
+                                     U+2308 ISOamsc  -->
+<!ENTITY rceil    "&#8969;"> <!-- right ceiling, U+2309 ISOamsc  -->
+<!ENTITY lfloor   "&#8970;"> <!-- left floor = apl downstile,
+                                     U+230A ISOamsc  -->
+<!ENTITY rfloor   "&#8971;"> <!-- right floor, U+230B ISOamsc  -->
+<!ENTITY lang     "&#9001;"> <!-- left-pointing angle bracket = bra,
+                                     U+2329 ISOtech -->
+<!-- lang is NOT the same character as U+003C 'less than' 
+     or U+2039 'single left-pointing angle quotation mark' -->
+<!ENTITY rang     "&#9002;"> <!-- right-pointing angle bracket = ket,
+                                     U+232A ISOtech -->
+<!-- rang is NOT the same character as U+003E 'greater than' 
+     or U+203A 'single right-pointing angle quotation mark' -->
+
+<!-- Geometric Shapes -->
+<!ENTITY loz      "&#9674;"> <!-- lozenge, U+25CA ISOpub -->
+
+<!-- Miscellaneous Symbols -->
+<!ENTITY spades   "&#9824;"> <!-- black spade suit, U+2660 ISOpub -->
+<!-- black here seems to mean filled as opposed to hollow -->
+<!ENTITY clubs    "&#9827;"> <!-- black club suit = shamrock,
+                                     U+2663 ISOpub -->
+<!ENTITY hearts   "&#9829;"> <!-- black heart suit = valentine,
+                                     U+2665 ISOpub -->
+<!ENTITY diams    "&#9830;"> <!-- black diamond suit, U+2666 ISOpub -->
diff --git a/TC/testcase/res/UTsXml/test/valid/dtds/xhtml.cat b/TC/testcase/res/UTsXml/test/valid/dtds/xhtml.cat
new file mode 100755 (executable)
index 0000000..0624dea
--- /dev/null
@@ -0,0 +1,14 @@
+OVERRIDE       YES
+        -- Oasis entity catalog for Extensible HTML 1.0 --
+
+PUBLIC  "-//W3C//DTD XHTML 1.0 Strict//EN"        "xhtml1-strict.dtd"
+PUBLIC  "-//W3C//DTD XHTML 1.0 Transitional//EN"  "xhtml1-transitional.dtd"
+PUBLIC  "-//W3C//DTD XHTML 1.0 Frameset//EN"      "xhtml1-frameset.dtd"
+
+        -- ISO latin 1 entity set for Extensible HTML (XML 1.0 format) --
+
+PUBLIC "-//W3C//ENTITIES Latin 1 for XHTML//EN"  "xhtml-lat1.ent"
+PUBLIC "-//W3C//ENTITIES Symbols for XHTML//EN" "xhtml-symbol.ent"
+PUBLIC "-//W3C//ENTITIES Special for XHTML//EN" "xhtml-special.ent"
+
+SGMLDECL "xhtml1.dcl"
diff --git a/TC/testcase/res/UTsXml/test/valid/dtds/xhtml1-frameset.dtd b/TC/testcase/res/UTsXml/test/valid/dtds/xhtml1-frameset.dtd
new file mode 100755 (executable)
index 0000000..1dd44e5
--- /dev/null
@@ -0,0 +1,1223 @@
+<!--
+   Extensible HTML version 1.0 Frameset DTD
+
+   This is the same as HTML 4.0 Frameset except for
+   changes due to the differences between XML and SGML.
+
+   Namespace = http://www.w3.org/1999/xhtml
+
+   For further information, see: http://www.w3.org/TR/xhtml1
+
+   Copyright (c) 1998-1999 W3C (MIT, INRIA, Keio),
+   All Rights Reserved. 
+
+   This DTD module is identified by the PUBLIC and SYSTEM identifiers:
+
+   PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
+   SYSTEM "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"
+
+
+-->
+
+<!--================ Character mnemonic entities =========================-->
+
+<!ENTITY % HTMLlat1 PUBLIC
+   "-//W3C//ENTITIES Latin 1 for XHTML//EN"
+   "http://www.w3.org/TR/xhtml1/DTD/xhtml-lat1.ent">
+%HTMLlat1;
+
+<!ENTITY % HTMLsymbol PUBLIC
+   "-//W3C//ENTITIES Symbols for XHTML//EN"
+   "http://www.w3.org/TR/xhtml1/DTD/xhtml-symbol.ent">
+%HTMLsymbol;
+
+<!ENTITY % HTMLspecial PUBLIC
+   "-//W3C//ENTITIES Special for XHTML//EN"
+   "http://www.w3.org/TR/xhtml1/DTD/xhtml-special.ent">
+%HTMLspecial;
+
+<!--================== Imported Names ====================================-->
+
+<!ENTITY % ContentType "CDATA">
+    <!-- media type, as per [RFC2045] -->
+
+<!ENTITY % ContentTypes "CDATA">
+    <!-- comma-separated list of media types, as per [RFC2045] -->
+
+<!ENTITY % Charset "CDATA">
+    <!-- a character encoding, as per [RFC2045] -->
+
+<!ENTITY % Charsets "CDATA">
+    <!-- a space separated list of character encodings, as per [RFC2045] -->
+
+<!ENTITY % LanguageCode "NMTOKEN">
+    <!-- a language code, as per [RFC1766] -->
+
+<!ENTITY % Character "CDATA">
+    <!-- a single character from [ISO10646] -->
+
+<!ENTITY % Number "CDATA">
+    <!-- one or more digits -->
+
+<!ENTITY % LinkTypes "CDATA">
+    <!-- space-separated list of link types -->
+
+<!ENTITY % MediaDesc "CDATA">
+    <!-- single or comma-separated list of media descriptors -->
+
+<!ENTITY % URI "CDATA">
+    <!-- a Uniform Resource Identifier, see [RFC2396] -->
+
+<!ENTITY % UriList "CDATA">
+    <!-- a space separated list of Uniform Resource Identifiers -->
+
+<!ENTITY % Datetime "CDATA">
+    <!-- date and time information. ISO date format -->
+
+<!ENTITY % Script "CDATA">
+    <!-- script expression -->
+
+<!ENTITY % StyleSheet "CDATA">
+    <!-- style sheet data -->
+
+<!ENTITY % Text "CDATA">
+    <!-- used for titles etc. -->
+
+<!ENTITY % FrameTarget "NMTOKEN">
+    <!-- render in this frame -->
+
+<!ENTITY % Length "CDATA">
+    <!-- nn for pixels or nn% for percentage length -->
+
+<!ENTITY % MultiLength "CDATA">
+    <!-- pixel, percentage, or relative -->
+
+<!ENTITY % MultiLengths "CDATA">
+    <!-- comma-separated list of MultiLength -->
+
+<!ENTITY % Pixels "CDATA">
+    <!-- integer representing length in pixels -->
+
+<!-- these are used for image maps -->
+
+<!ENTITY % Shape "(rect|circle|poly|default)">
+
+<!ENTITY % Coords "CDATA">
+    <!-- comma separated list of lengths -->
+
+<!-- used for object, applet, img, input and iframe -->
+<!ENTITY % ImgAlign "(top|middle|bottom|left|right)">
+
+<!-- a color using sRGB: #RRGGBB as Hex values -->
+<!ENTITY % Color "CDATA">
+
+<!-- There are also 16 widely known color names with their sRGB values:
+
+    Black  = #000000    Green  = #008000
+    Silver = #C0C0C0    Lime   = #00FF00
+    Gray   = #808080    Olive  = #808000
+    White  = #FFFFFF    Yellow = #FFFF00
+    Maroon = #800000    Navy   = #000080
+    Red    = #FF0000    Blue   = #0000FF
+    Purple = #800080    Teal   = #008080
+    Fuchsia= #FF00FF    Aqua   = #00FFFF
+-->
+
+<!--=================== Generic Attributes ===============================-->
+
+<!-- core attributes common to most elements
+  id       document-wide unique id
+  class    space separated list of classes
+  style    associated style info
+  title    advisory title/amplification
+-->
+<!ENTITY % coreattrs
+ "id          ID             #IMPLIED
+  class       CDATA          #IMPLIED
+  style       %StyleSheet;   #IMPLIED
+  title       %Text;         #IMPLIED"
+  >
+
+<!-- internationalization attributes
+  lang        language code (backwards compatible)
+  xml:lang    language code (as per XML 1.0 spec)
+  dir         direction for weak/neutral text
+-->
+<!ENTITY % i18n
+ "lang        %LanguageCode; #IMPLIED
+  xml:lang    %LanguageCode; #IMPLIED
+  dir         (ltr|rtl)      #IMPLIED"
+  >
+
+<!-- attributes for common UI events
+  onclick     a pointer button was clicked
+  ondblclick  a pointer button was double clicked
+  onmousedown a pointer button was pressed down
+  onmouseup   a pointer button was released
+  onmousemove a pointer was moved onto the element
+  onmouseout  a pointer was moved away from the element
+  onkeypress  a key was pressed and released
+  onkeydown   a key was pressed down
+  onkeyup     a key was released
+-->
+<!ENTITY % events
+ "onclick     %Script;       #IMPLIED
+  ondblclick  %Script;       #IMPLIED
+  onmousedown %Script;       #IMPLIED
+  onmouseup   %Script;       #IMPLIED
+  onmouseover %Script;       #IMPLIED
+  onmousemove %Script;       #IMPLIED
+  onmouseout  %Script;       #IMPLIED
+  onkeypress  %Script;       #IMPLIED
+  onkeydown   %Script;       #IMPLIED
+  onkeyup     %Script;       #IMPLIED"
+  >
+
+<!-- attributes for elements that can get the focus
+  accesskey   accessibility key character
+  tabindex    position in tabbing order
+  onfocus     the element got the focus
+  onblur      the element lost the focus
+-->
+<!ENTITY % focus
+ "accesskey   %Character;    #IMPLIED
+  tabindex    %Number;       #IMPLIED
+  onfocus     %Script;       #IMPLIED
+  onblur      %Script;       #IMPLIED"
+  >
+
+<!ENTITY % attrs "%coreattrs; %i18n; %events;">
+
+<!-- text alignment for p, div, h1-h6. The default is
+     align="left" for ltr headings, "right" for rtl -->
+
+<!ENTITY % TextAlign "align (left|center|right) #IMPLIED">
+
+<!--=================== Text Elements ====================================-->
+
+<!ENTITY % special
+   "br | span | bdo |object | applet | img | map | iframe">
+
+<!ENTITY % fontstyle "tt | i | b | big | small | u
+                      | s | strike |font | basefont">
+
+<!ENTITY % phrase "em | strong | dfn | code | q | sub | sup |
+                   samp | kbd | var | cite | abbr | acronym">
+
+<!ENTITY % inline.forms "input | select | textarea | label | button">
+
+<!-- these can occur at block or inline level -->
+<!ENTITY % misc "ins | del | script | noscript">
+
+<!ENTITY % inline "a | %special; | %fontstyle; | %phrase; | %inline.forms;">
+
+<!-- %Inline; covers inline or "text-level" elements -->
+<!ENTITY % Inline "(#PCDATA | %inline; | %misc;)*">
+
+<!--================== Block level elements ==============================-->
+
+<!ENTITY % heading "h1|h2|h3|h4|h5|h6">
+<!ENTITY % lists "ul | ol | dl | menu | dir">
+<!ENTITY % blocktext "pre | hr | blockquote | address | center">
+
+<!ENTITY % block
+    "p | %heading; | div | %lists; | %blocktext; | isindex | fieldset | table">
+
+<!ENTITY % Block "(%block; | form | %misc;)*">
+
+<!-- %Flow; mixes Block and Inline and is used for list items etc. -->
+<!ENTITY % Flow "(#PCDATA | %block; | form | %inline; | %misc;)*">
+
+<!--================== Content models for exclusions =====================-->
+
+<!-- a elements use %Inline; excluding a -->
+
+<!ENTITY % a.content
+   "(#PCDATA | %special; | %fontstyle; | %phrase; | %inline.forms; | %misc;)*">
+
+<!-- pre uses %Inline excluding img, object, applet, big, small,
+     sub, sup, font, or basefont -->
+
+<!ENTITY % pre.content
+   "(#PCDATA | a | br | span | bdo | map | tt | i | b | u | s |
+      %phrase; | %inline.forms;)*">
+
+<!-- form uses %Flow; excluding form -->
+
+<!ENTITY % form.content "(#PCDATA | %block; | %inline; | %misc;)*">
+
+<!-- button uses %Flow; but excludes a, form, form controls, iframe -->
+
+<!ENTITY % button.content
+   "(#PCDATA | p | %heading; | div | %lists; | %blocktext; |
+      table | br | span | bdo | object | applet | img | map |
+      %fontstyle; | %phrase; | %misc;)*">
+
+<!--================ Document Structure ==================================-->
+
+<!-- the namespace URI designates the document profile -->
+
+<!ELEMENT html (head, frameset)>
+<!ATTLIST html
+  %i18n;
+  xmlns       %URI;          #FIXED 'http://www.w3.org/1999/xhtml'
+  >
+
+<!--================ Document Head =======================================-->
+
+<!ENTITY % head.misc "(script|style|meta|link|object|isindex)*">
+
+<!-- content model is %head.misc; combined with a single
+     title and an optional base element in any order -->
+
+<!ELEMENT head (%head.misc;,
+     ((title, %head.misc;, (base, %head.misc;)?) |
+      (base, %head.misc;, (title, %head.misc;))))>
+
+<!ATTLIST head
+  %i18n;
+  profile     %URI;          #IMPLIED
+  >
+
+<!-- The title element is not considered part of the flow of text.
+       It should be displayed, for example as the page header or
+       window title. Exactly one title is required per document.
+    -->
+<!ELEMENT title (#PCDATA)>
+<!ATTLIST title %i18n;>
+
+<!-- document base URI -->
+
+<!ELEMENT base EMPTY>
+<!ATTLIST base
+  href        %URI;          #IMPLIED
+  target      %FrameTarget;  #IMPLIED
+  >
+
+<!-- generic metainformation -->
+<!ELEMENT meta EMPTY>
+<!ATTLIST meta
+  %i18n;
+  http-equiv  CDATA          #IMPLIED
+  name        CDATA          #IMPLIED
+  content     CDATA          #REQUIRED
+  scheme      CDATA          #IMPLIED
+  >
+
+<!--
+  Relationship values can be used in principle:
+
+   a) for document specific toolbars/menus when used
+      with the link element in document head e.g.
+        start, contents, previous, next, index, end, help
+   b) to link to a separate style sheet (rel="stylesheet")
+   c) to make a link to a script (rel="script")
+   d) by stylesheets to control how collections of
+      html nodes are rendered into printed documents
+   e) to make a link to a printable version of this document
+      e.g. a PostScript or PDF version (rel="alternate" media="print")
+-->
+
+<!ELEMENT link EMPTY>
+<!ATTLIST link
+  %attrs;
+  charset     %Charset;      #IMPLIED
+  href        %URI;          #IMPLIED
+  hreflang    %LanguageCode; #IMPLIED
+  type        %ContentType;  #IMPLIED
+  rel         %LinkTypes;    #IMPLIED
+  rev         %LinkTypes;    #IMPLIED
+  media       %MediaDesc;    #IMPLIED
+  target      %FrameTarget;  #IMPLIED
+  >
+
+<!-- style info, which may include CDATA sections -->
+<!ELEMENT style (#PCDATA)>
+<!ATTLIST style
+  %i18n;
+  type        %ContentType;  #REQUIRED
+  media       %MediaDesc;    #IMPLIED
+  title       %Text;         #IMPLIED
+  xml:space   (preserve)     #FIXED 'preserve'
+  >
+
+<!-- script statements, which may include CDATA sections -->
+<!ELEMENT script (#PCDATA)>
+<!ATTLIST script
+  charset     %Charset;      #IMPLIED
+  type        %ContentType;  #REQUIRED
+  language    CDATA          #IMPLIED
+  src         %URI;          #IMPLIED
+  defer       (defer)        #IMPLIED
+  xml:space   (preserve)     #FIXED 'preserve'
+  >
+
+<!-- alternate content container for non script-based rendering -->
+
+<!ELEMENT noscript %Flow;>
+<!ATTLIST noscript
+  %attrs;
+  >
+
+<!--======================= Frames =======================================-->
+
+<!-- only one noframes element permitted per document -->
+
+<!ELEMENT frameset (frameset|frame|noframes)*>
+<!ATTLIST frameset
+  %coreattrs;
+  rows        %MultiLengths; #IMPLIED
+  cols        %MultiLengths; #IMPLIED
+  onload      %Script;       #IMPLIED
+  onunload    %Script;       #IMPLIED
+  >
+
+<!-- reserved frame names start with "_" otherwise starts with letter -->
+
+<!-- tiled window within frameset -->
+
+<!ELEMENT frame EMPTY>
+<!ATTLIST frame
+  %coreattrs;
+  longdesc    %URI;          #IMPLIED
+  name        NMTOKEN        #IMPLIED
+  src         %URI;          #IMPLIED
+  frameborder (1|0)          "1"
+  marginwidth %Pixels;       #IMPLIED
+  marginheight %Pixels;      #IMPLIED
+  noresize    (noresize)     #IMPLIED
+  scrolling   (yes|no|auto)  "auto"
+  >
+
+<!-- inline subwindow -->
+
+<!ELEMENT iframe %Flow;>
+<!ATTLIST iframe
+  %coreattrs;
+  longdesc    %URI;          #IMPLIED
+  name        NMTOKEN        #IMPLIED
+  src         %URI;          #IMPLIED
+  frameborder (1|0)          "1"
+  marginwidth %Pixels;       #IMPLIED
+  marginheight %Pixels;      #IMPLIED
+  scrolling   (yes|no|auto)  "auto"
+  align       %ImgAlign;     #IMPLIED
+  height      %Length;       #IMPLIED
+  width       %Length;       #IMPLIED
+  >
+
+<!-- alternate content container for non frame-based rendering -->
+
+<!ELEMENT noframes (body)>
+<!ATTLIST noframes
+  %attrs;
+  >
+
+<!--=================== Document Body ====================================-->
+
+<!ELEMENT body %Flow;>
+<!ATTLIST body
+  %attrs;
+  onload      %Script;       #IMPLIED
+  onunload    %Script;       #IMPLIED
+  background  %URI;          #IMPLIED
+  bgcolor     %Color;        #IMPLIED
+  text        %Color;        #IMPLIED
+  link        %Color;        #IMPLIED
+  vlink       %Color;        #IMPLIED
+  alink       %Color;        #IMPLIED
+  >
+
+<!ELEMENT div %Flow;>  <!-- generic language/style container -->
+<!ATTLIST div
+  %attrs;
+  %TextAlign;
+  >
+
+<!--=================== Paragraphs =======================================-->
+
+<!ELEMENT p %Inline;>
+<!ATTLIST p
+  %attrs;
+  %TextAlign;
+  >
+
+<!--=================== Headings =========================================-->
+
+<!--
+  There are six levels of headings from h1 (the most important)
+  to h6 (the least important).
+-->
+
+<!ELEMENT h1  %Inline;>
+<!ATTLIST h1
+  %attrs;
+  %TextAlign;
+  >
+
+<!ELEMENT h2 %Inline;>
+<!ATTLIST h2
+  %attrs;
+  %TextAlign;
+  >
+
+<!ELEMENT h3 %Inline;>
+<!ATTLIST h3
+  %attrs;
+  %TextAlign;
+  >
+
+<!ELEMENT h4 %Inline;>
+<!ATTLIST h4
+  %attrs;
+  %TextAlign;
+  >
+
+<!ELEMENT h5 %Inline;>
+<!ATTLIST h5
+  %attrs;
+  %TextAlign;
+  >
+
+<!ELEMENT h6 %Inline;>
+<!ATTLIST h6
+  %attrs;
+  %TextAlign;
+  >
+
+<!--=================== Lists ============================================-->
+
+<!-- Unordered list bullet styles -->
+
+<!ENTITY % ULStyle "(disc|square|circle)">
+
+<!-- Unordered list -->
+
+<!ELEMENT ul (li)+>
+<!ATTLIST ul
+  %attrs;
+  type        %ULStyle;     #IMPLIED
+  compact     (compact)     #IMPLIED
+  >
+
+<!-- Ordered list numbering style
+
+    1   arabic numbers      1, 2, 3, ...
+    a   lower alpha         a, b, c, ...
+    A   upper alpha         A, B, C, ...
+    i   lower roman         i, ii, iii, ...
+    I   upper roman         I, II, III, ...
+
+    The style is applied to the sequence number which by default
+    is reset to 1 for the first list item in an ordered list.
+-->
+<!ENTITY % OLStyle "CDATA">
+
+<!-- Ordered (numbered) list -->
+
+<!ELEMENT ol (li)+>
+<!ATTLIST ol
+  %attrs;
+  type        %OLStyle;      #IMPLIED
+  compact     (compact)      #IMPLIED
+  start       %Number;       #IMPLIED
+  >
+
+<!-- single column list (DEPRECATED) --> 
+<!ELEMENT menu (li)+>
+<!ATTLIST menu
+  %attrs;
+  compact     (compact)     #IMPLIED
+  >
+
+<!-- multiple column list (DEPRECATED) --> 
+<!ELEMENT dir (li)+>
+<!ATTLIST dir
+  %attrs;
+  compact     (compact)     #IMPLIED
+  >
+
+<!-- LIStyle is constrained to: "(%ULStyle;|%OLStyle;)" -->
+<!ENTITY % LIStyle "CDATA">
+
+<!-- list item -->
+
+<!ELEMENT li %Flow;>
+<!ATTLIST li
+  %attrs;
+  type        %LIStyle;      #IMPLIED
+  value       %Number;       #IMPLIED
+  >
+
+<!-- definition lists - dt for term, dd for its definition -->
+
+<!ELEMENT dl (dt|dd)+>
+<!ATTLIST dl
+  %attrs;
+  compact     (compact)      #IMPLIED
+  >
+
+<!ELEMENT dt %Inline;>
+<!ATTLIST dt
+  %attrs;
+  >
+
+<!ELEMENT dd %Flow;>
+<!ATTLIST dd
+  %attrs;
+  >
+
+<!--=================== Address ==========================================-->
+
+<!-- information on author -->
+
+<!ELEMENT address %Inline;>
+<!ATTLIST address
+  %attrs;
+  >
+
+<!--=================== Horizontal Rule ==================================-->
+
+<!ELEMENT hr EMPTY>
+<!ATTLIST hr
+  %attrs;
+  align       (left|center|right) #IMPLIED
+  noshade     (noshade)      #IMPLIED
+  size        %Pixels;       #IMPLIED
+  width       %Length;       #IMPLIED
+  >
+
+<!--=================== Preformatted Text ================================-->
+
+<!-- content is %Inline; excluding 
+        "img|object|applet|big|small|sub|sup|font|basefont" -->
+
+<!ELEMENT pre %pre.content;>
+<!ATTLIST pre
+  %attrs;
+  width       %Number;      #IMPLIED
+  xml:space   (preserve)    #FIXED 'preserve'
+  >
+
+<!--=================== Block-like Quotes ================================-->
+
+<!ELEMENT blockquote %Flow;>
+<!ATTLIST blockquote
+  %attrs;
+  cite        %URI;          #IMPLIED
+  >
+
+<!--=================== Text alignment ===================================-->
+
+<!-- center content -->
+<!ELEMENT center %Flow;>
+<!ATTLIST center
+  %attrs;
+  >
+
+<!--=================== Inserted/Deleted Text ============================-->
+
+
+<!--
+  ins/del are allowed in block and inline content, but its
+  inappropriate to include block content within an ins element
+  occurring in inline content.
+-->
+<!ELEMENT ins %Flow;>
+<!ATTLIST ins
+  %attrs;
+  cite        %URI;          #IMPLIED
+  datetime    %Datetime;     #IMPLIED
+  >
+
+<!ELEMENT del %Flow;>
+<!ATTLIST del
+  %attrs;
+  cite        %URI;          #IMPLIED
+  datetime    %Datetime;     #IMPLIED
+  >
+
+<!--================== The Anchor Element ================================-->
+
+<!-- content is %Inline; except that anchors shouldn't be nested -->
+
+<!ELEMENT a %a.content;>
+<!ATTLIST a
+  %attrs;
+  charset     %Charset;      #IMPLIED
+  type        %ContentType;  #IMPLIED
+  name        NMTOKEN        #IMPLIED
+  href        %URI;          #IMPLIED
+  hreflang    %LanguageCode; #IMPLIED
+  rel         %LinkTypes;    #IMPLIED
+  rev         %LinkTypes;    #IMPLIED
+  accesskey   %Character;    #IMPLIED
+  shape       %Shape;        "rect"
+  coords      %Coords;       #IMPLIED
+  tabindex    %Number;       #IMPLIED
+  onfocus     %Script;       #IMPLIED
+  onblur      %Script;       #IMPLIED
+  target      %FrameTarget;  #IMPLIED
+  >
+
+<!--===================== Inline Elements ================================-->
+
+<!ELEMENT span %Inline;> <!-- generic language/style container -->
+<!ATTLIST span
+  %attrs;
+  >
+
+<!ELEMENT bdo %Inline;>  <!-- I18N BiDi over-ride -->
+<!ATTLIST bdo
+  %coreattrs;
+  %events;
+  lang        %LanguageCode; #IMPLIED
+  xml:lang    %LanguageCode; #IMPLIED
+  dir         (ltr|rtl)      #REQUIRED
+  >
+
+<!ELEMENT br EMPTY>   <!-- forced line break -->
+<!ATTLIST br
+  %coreattrs;
+  clear       (left|all|right|none) "none"
+  >
+
+<!ELEMENT em %Inline;>   <!-- emphasis -->
+<!ATTLIST em %attrs;>
+
+<!ELEMENT strong %Inline;>   <!-- strong emphasis -->
+<!ATTLIST strong %attrs;>
+
+<!ELEMENT dfn %Inline;>   <!-- definitional -->
+<!ATTLIST dfn %attrs;>
+
+<!ELEMENT code %Inline;>   <!-- program code -->
+<!ATTLIST code %attrs;>
+
+<!ELEMENT samp %Inline;>   <!-- sample -->
+<!ATTLIST samp %attrs;>
+
+<!ELEMENT kbd %Inline;>  <!-- something user would type -->
+<!ATTLIST kbd %attrs;>
+
+<!ELEMENT var %Inline;>   <!-- variable -->
+<!ATTLIST var %attrs;>
+
+<!ELEMENT cite %Inline;>   <!-- citation -->
+<!ATTLIST cite %attrs;>
+
+<!ELEMENT abbr %Inline;>   <!-- abbreviation -->
+<!ATTLIST abbr %attrs;>
+
+<!ELEMENT acronym %Inline;>   <!-- acronym -->
+<!ATTLIST acronym %attrs;>
+
+<!ELEMENT q %Inline;>   <!-- inlined quote -->
+<!ATTLIST q
+   %attrs;
+  cite        %URI;          #IMPLIED
+   >
+
+<!ELEMENT sub %Inline;> <!-- subscript -->
+<!ATTLIST sub %attrs;>
+
+<!ELEMENT sup %Inline;> <!-- superscript -->
+<!ATTLIST sup %attrs;>
+
+<!ELEMENT tt %Inline;>   <!-- fixed pitch font -->
+<!ATTLIST tt %attrs;>
+
+<!ELEMENT i %Inline;>   <!-- italic font -->
+<!ATTLIST i %attrs;>
+
+<!ELEMENT b %Inline;>   <!-- bold font -->
+<!ATTLIST b %attrs;>
+
+<!ELEMENT big %Inline;>   <!-- bigger font -->
+<!ATTLIST big %attrs;>
+
+<!ELEMENT small %Inline;>   <!-- smaller font -->
+<!ATTLIST small %attrs;>
+
+<!ELEMENT u %Inline;>   <!-- underline -->
+<!ATTLIST u %attrs;>
+
+<!ELEMENT s %Inline;>   <!-- strike-through -->
+<!ATTLIST s %attrs;>
+
+<!ELEMENT strike %Inline;>   <!-- strike-through -->
+<!ATTLIST strike %attrs;>
+
+<!ELEMENT basefont EMPTY>  <!-- base font size -->
+<!ATTLIST basefont
+  id          ID             #IMPLIED
+  size        CDATA          #REQUIRED
+  color       %Color;        #IMPLIED
+  face        CDATA          #IMPLIED
+  >
+
+<!ELEMENT font %Inline;> <!-- local change to font -->
+<!ATTLIST font
+  %coreattrs;
+  %i18n;
+  size        CDATA          #IMPLIED
+  color       %Color;        #IMPLIED
+  face        CDATA          #IMPLIED
+  >
+
+<!--==================== Object ======================================-->
+<!--
+  object is used to embed objects as part of HTML pages.
+  param elements should precede other content. Parameters
+  can also be expressed as attribute/value pairs on the
+  object element itself when brevity is desired.
+-->
+
+<!ELEMENT object (#PCDATA | param | %block; | form |%inline; | %misc;)*>
+<!ATTLIST object
+  %attrs;
+  declare     (declare)      #IMPLIED
+  classid     %URI;          #IMPLIED
+  codebase    %URI;          #IMPLIED
+  data        %URI;          #IMPLIED
+  type        %ContentType;  #IMPLIED
+  codetype    %ContentType;  #IMPLIED
+  archive     %UriList;      #IMPLIED
+  standby     %Text;         #IMPLIED
+  height      %Length;       #IMPLIED
+  width       %Length;       #IMPLIED
+  usemap      %URI;          #IMPLIED
+  name        NMTOKEN        #IMPLIED
+  tabindex    %Number;       #IMPLIED
+  align       %ImgAlign;     #IMPLIED
+  border      %Pixels;       #IMPLIED
+  hspace      %Pixels;       #IMPLIED
+  vspace      %Pixels;       #IMPLIED
+  >
+
+<!--
+  param is used to supply a named property value.
+  In XML it would seem natural to follow RDF and support an
+  abbreviated syntax where the param elements are replaced
+  by attribute value pairs on the object start tag.
+-->
+<!ELEMENT param EMPTY>
+<!ATTLIST param
+  id          ID             #IMPLIED
+  name        CDATA          #REQUIRED
+  value       CDATA          #IMPLIED
+  valuetype   (data|ref|object) "data"
+  type        %ContentType;  #IMPLIED
+  >
+
+<!--=================== Java applet ==================================-->
+<!--
+  One of code or object attributes must be present.
+  Place param elements before other content.
+-->
+<!ELEMENT applet (#PCDATA | param | %block; | form | %inline; | %misc;)*>
+<!ATTLIST applet
+  %coreattrs;
+  codebase    %URI;          #IMPLIED
+  archive     CDATA          #IMPLIED
+  code        CDATA          #IMPLIED
+  object      CDATA          #IMPLIED
+  alt         %Text;         #IMPLIED
+  name        NMTOKEN        #IMPLIED
+  width       %Length;       #REQUIRED
+  height      %Length;       #REQUIRED
+  align       %ImgAlign;     #IMPLIED
+  hspace      %Pixels;       #IMPLIED
+  vspace      %Pixels;       #IMPLIED
+  >
+
+<!--=================== Images ===========================================-->
+
+<!--
+   To avoid accessibility problems for people who aren't
+   able to see the image, you should provide a text
+   description using the alt and longdesc attributes.
+   In addition, avoid the use of server-side image maps.
+-->
+
+<!ELEMENT img EMPTY>
+<!ATTLIST img
+  %attrs;
+  src         %URI;          #REQUIRED
+  alt         %Text;         #REQUIRED
+  name        NMTOKEN        #IMPLIED
+  longdesc    %URI;          #IMPLIED
+  height      %Length;       #IMPLIED
+  width       %Length;       #IMPLIED
+  usemap      %URI;          #IMPLIED
+  ismap       (ismap)        #IMPLIED
+  align       %ImgAlign;     #IMPLIED
+  border      %Pixels;       #IMPLIED
+  hspace      %Pixels;       #IMPLIED
+  vspace      %Pixels;       #IMPLIED
+  >
+
+<!-- usemap points to a map element which may be in this document
+  or an external document, although the latter is not widely supported -->
+
+<!--================== Client-side image maps ============================-->
+
+<!-- These can be placed in the same document or grouped in a
+     separate document although this isn't yet widely supported -->
+
+<!ELEMENT map ((%block; | form | %misc;)+ | area+)>
+<!ATTLIST map
+  %i18n;
+  %events;
+  id          ID             #REQUIRED
+  class       CDATA          #IMPLIED
+  style       %StyleSheet;   #IMPLIED
+  title       %Text;         #IMPLIED
+  name        NMTOKEN        #IMPLIED
+  >
+
+<!ELEMENT area EMPTY>
+<!ATTLIST area
+  %attrs;
+  shape       %Shape;        "rect"
+  coords      %Coords;       #IMPLIED
+  href        %URI;          #IMPLIED
+  nohref      (nohref)       #IMPLIED
+  alt         %Text;         #REQUIRED
+  tabindex    %Number;       #IMPLIED
+  accesskey   %Character;    #IMPLIED
+  onfocus     %Script;       #IMPLIED
+  onblur      %Script;       #IMPLIED
+  target      %FrameTarget;  #IMPLIED
+  >
+
+<!--================ Forms ===============================================-->
+
+<!ELEMENT form %form.content;>   <!-- forms shouldn't be nested -->
+
+<!ATTLIST form
+  %attrs;
+  action      %URI;          #REQUIRED
+  method      (get|post)     "get"
+  name        NMTOKEN        #IMPLIED
+  enctype     %ContentType;  "application/x-www-form-urlencoded"
+  onsubmit    %Script;       #IMPLIED
+  onreset     %Script;       #IMPLIED
+  accept      %ContentTypes; #IMPLIED
+  accept-charset %Charsets;  #IMPLIED
+  target      %FrameTarget;  #IMPLIED
+  >
+
+<!--
+  Each label must not contain more than ONE field
+  Label elements shouldn't be nested.
+-->
+<!ELEMENT label %Inline;>
+<!ATTLIST label
+  %attrs;
+  for         IDREF          #IMPLIED
+  accesskey   %Character;    #IMPLIED
+  onfocus     %Script;       #IMPLIED
+  onblur      %Script;       #IMPLIED
+  >
+
+<!ENTITY % InputType
+  "(text | password | checkbox |
+    radio | submit | reset |
+    file | hidden | image | button)"
+   >
+
+<!-- the name attribute is required for all but submit & reset -->
+
+<!ELEMENT input EMPTY>     <!-- form control -->
+<!ATTLIST input
+  %attrs;
+  type        %InputType;    "text"
+  name        CDATA          #IMPLIED
+  value       CDATA          #IMPLIED
+  checked     (checked)      #IMPLIED
+  disabled    (disabled)     #IMPLIED
+  readonly    (readonly)     #IMPLIED
+  size        CDATA          #IMPLIED
+  maxlength   %Number;       #IMPLIED
+  src         %URI;          #IMPLIED
+  alt         CDATA          #IMPLIED
+  usemap      %URI;          #IMPLIED
+  tabindex    %Number;       #IMPLIED
+  accesskey   %Character;    #IMPLIED
+  onfocus     %Script;       #IMPLIED
+  onblur      %Script;       #IMPLIED
+  onselect    %Script;       #IMPLIED
+  onchange    %Script;       #IMPLIED
+  accept      %ContentTypes; #IMPLIED
+  align       %ImgAlign;     #IMPLIED
+  >
+
+<!ELEMENT select (optgroup|option)+>  <!-- option selector -->
+<!ATTLIST select
+  %attrs;
+  name        CDATA          #IMPLIED
+  size        %Number;       #IMPLIED
+  multiple    (multiple)     #IMPLIED
+  disabled    (disabled)     #IMPLIED
+  tabindex    %Number;       #IMPLIED
+  onfocus     %Script;       #IMPLIED
+  onblur      %Script;       #IMPLIED
+  onchange    %Script;       #IMPLIED
+  >
+
+<!ELEMENT optgroup (option)+>   <!-- option group -->
+<!ATTLIST optgroup
+  %attrs;
+  disabled    (disabled)     #IMPLIED
+  label       %Text;         #REQUIRED
+  >
+
+<!ELEMENT option (#PCDATA)>     <!-- selectable choice -->
+<!ATTLIST option
+  %attrs;
+  selected    (selected)     #IMPLIED
+  disabled    (disabled)     #IMPLIED
+  label       %Text;         #IMPLIED
+  value       CDATA          #IMPLIED
+  >
+
+<!ELEMENT textarea (#PCDATA)>     <!-- multi-line text field -->
+<!ATTLIST textarea
+  %attrs;
+  name        CDATA          #IMPLIED
+  rows        %Number;       #REQUIRED
+  cols        %Number;       #REQUIRED
+  disabled    (disabled)     #IMPLIED
+  readonly    (readonly)     #IMPLIED
+  tabindex    %Number;       #IMPLIED
+  accesskey   %Character;    #IMPLIED
+  onfocus     %Script;       #IMPLIED
+  onblur      %Script;       #IMPLIED
+  onselect    %Script;       #IMPLIED
+  onchange    %Script;       #IMPLIED
+  >
+
+<!--
+  The fieldset element is used to group form fields.
+  Only one legend element should occur in the content
+  and if present should only be preceded by whitespace.
+-->
+<!ELEMENT fieldset (#PCDATA | legend | %block; | form | %inline; | %misc;)*>
+<!ATTLIST fieldset
+  %attrs;
+  >
+
+<!ENTITY % LAlign "(top|bottom|left|right)">
+
+<!ELEMENT legend %Inline;>     <!-- fieldset label -->
+<!ATTLIST legend
+  %attrs;
+  accesskey   %Character;    #IMPLIED
+  align       %LAlign;       #IMPLIED
+  >
+
+<!--
+ Content is %Flow; excluding a, form, form controls, iframe
+--> 
+<!ELEMENT button %button.content;>  <!-- push button -->
+<!ATTLIST button
+  %attrs;
+  name        CDATA          #IMPLIED
+  value       CDATA          #IMPLIED
+  type        (button|submit|reset) "submit"
+  disabled    (disabled)     #IMPLIED
+  tabindex    %Number;       #IMPLIED
+  accesskey   %Character;    #IMPLIED
+  onfocus     %Script;       #IMPLIED
+  onblur      %Script;       #IMPLIED
+  >
+
+<!-- single-line text input control (DEPRECATED) -->
+<!ELEMENT isindex EMPTY>
+<!ATTLIST isindex
+  %coreattrs;
+  %i18n;
+  prompt      %Text;         #IMPLIED
+  >
+
+<!--======================= Tables =======================================-->
+
+<!-- Derived from IETF HTML table standard, see [RFC1942] -->
+
+<!--
+ The border attribute sets the thickness of the frame around the
+ table. The default units are screen pixels.
+
+ The frame attribute specifies which parts of the frame around
+ the table should be rendered. The values are not the same as
+ CALS to avoid a name clash with the valign attribute.
+-->
+<!ENTITY % TFrame "(void|above|below|hsides|lhs|rhs|vsides|box|border)">
+
+<!--
+ The rules attribute defines which rules to draw between cells:
+
+ If rules is absent then assume:
+     "none" if border is absent or border="0" otherwise "all"
+-->
+
+<!ENTITY % TRules "(none | groups | rows | cols | all)">
+  
+<!-- horizontal placement of table relative to document -->
+<!ENTITY % TAlign "(left|center|right)">
+
+<!-- horizontal alignment attributes for cell contents
+
+  char        alignment char, e.g. char=":"
+  charoff     offset for alignment char
+-->
+<!ENTITY % cellhalign
+  "align      (left|center|right|justify|char) #IMPLIED
+   char       %Character;    #IMPLIED
+   charoff    %Length;       #IMPLIED"
+  >
+
+<!-- vertical alignment attributes for cell contents -->
+<!ENTITY % cellvalign
+  "valign     (top|middle|bottom|baseline) #IMPLIED"
+  >
+
+<!ELEMENT table
+     (caption?, (col*|colgroup*), thead?, tfoot?, (tbody+|tr+))>
+<!ELEMENT caption  %Inline;>
+<!ELEMENT thead    (tr)+>
+<!ELEMENT tfoot    (tr)+>
+<!ELEMENT tbody    (tr)+>
+<!ELEMENT colgroup (col)*>
+<!ELEMENT col      EMPTY>
+<!ELEMENT tr       (th|td)+>
+<!ELEMENT th       %Flow;>
+<!ELEMENT td       %Flow;>
+
+<!ATTLIST table
+  %attrs;
+  summary     %Text;         #IMPLIED
+  width       %Length;       #IMPLIED
+  border      %Pixels;       #IMPLIED
+  frame       %TFrame;       #IMPLIED
+  rules       %TRules;       #IMPLIED
+  cellspacing %Length;       #IMPLIED
+  cellpadding %Length;       #IMPLIED
+  align       %TAlign;       #IMPLIED
+  bgcolor     %Color;        #IMPLIED
+  >
+
+<!ENTITY % CAlign "(top|bottom|left|right)">
+
+<!ATTLIST caption
+  %attrs;
+  align       %CAlign;       #IMPLIED
+  >
+
+<!--
+colgroup groups a set of col elements. It allows you to group
+several semantically related columns together.
+-->
+<!ATTLIST colgroup
+  %attrs;
+  span        %Number;       "1"
+  width       %MultiLength;  #IMPLIED
+  %cellhalign;
+  %cellvalign;
+  >
+
+<!--
+ col elements define the alignment properties for cells in
+ one or more columns.
+
+ The width attribute specifies the width of the columns, e.g.
+
+     width=64        width in screen pixels
+     width=0.5*      relative width of 0.5
+
+ The span attribute causes the attributes of one
+ col element to apply to more than one column.
+-->
+<!ATTLIST col
+  %attrs;
+  span        %Number;       "1"
+  width       %MultiLength;  #IMPLIED
+  %cellhalign;
+  %cellvalign;
+  >
+
+<!--
+    Use thead to duplicate headers when breaking table
+    across page boundaries, or for static headers when
+    tbody sections are rendered in scrolling panel.
+
+    Use tfoot to duplicate footers when breaking table
+    across page boundaries, or for static footers when
+    tbody sections are rendered in scrolling panel.
+
+    Use multiple tbody sections when rules are needed
+    between groups of table rows.
+-->
+<!ATTLIST thead
+  %attrs;
+  %cellhalign;
+  %cellvalign;
+  >
+
+<!ATTLIST tfoot
+  %attrs;
+  %cellhalign;
+  %cellvalign;
+  >
+
+<!ATTLIST tbody
+  %attrs;
+  %cellhalign;
+  %cellvalign;
+  >
+
+<!ATTLIST tr
+  %attrs;
+  %cellhalign;
+  %cellvalign;
+  bgcolor     %Color;        #IMPLIED
+  >
+
+<!-- Scope is simpler than headers attribute for common tables -->
+<!ENTITY % Scope "(row|col|rowgroup|colgroup)">
+
+<!-- th is for headers, td for data and for cells acting as both -->
+
+<!ATTLIST th
+  %attrs;
+  abbr        %Text;         #IMPLIED
+  axis        CDATA          #IMPLIED
+  headers     IDREFS         #IMPLIED
+  scope       %Scope;        #IMPLIED
+  rowspan     %Number;       "1"
+  colspan     %Number;       "1"
+  %cellhalign;
+  %cellvalign;
+  nowrap      (nowrap)       #IMPLIED
+  bgcolor     %Color;        #IMPLIED
+  width       %Pixels;       #IMPLIED
+  height      %Pixels;       #IMPLIED
+  >
+
+<!ATTLIST td
+  %attrs;
+  abbr        %Text;         #IMPLIED
+  axis        CDATA          #IMPLIED
+  headers     IDREFS         #IMPLIED
+  scope       %Scope;        #IMPLIED
+  rowspan     %Number;       "1"
+  colspan     %Number;       "1"
+  %cellhalign;
+  %cellvalign;
+  nowrap      (nowrap)       #IMPLIED
+  bgcolor     %Color;        #IMPLIED
+  width       %Pixels;       #IMPLIED
+  height      %Pixels;       #IMPLIED
+  >
+
diff --git a/TC/testcase/res/UTsXml/test/valid/dtds/xhtml1-strict.dtd b/TC/testcase/res/UTsXml/test/valid/dtds/xhtml1-strict.dtd
new file mode 100755 (executable)
index 0000000..d7c3da2
--- /dev/null
@@ -0,0 +1,986 @@
+<!--
+   Extensible HTML version 1.0 Strict DTD
+
+   This is the same as HTML 4.0 Strict except for
+   changes due to the differences between XML and SGML.
+
+   Namespace = http://www.w3.org/1999/xhtml
+
+   For further information, see: http://www.w3.org/TR/xhtml1
+
+   Copyright (c) 1998-1999 W3C (MIT, INRIA, Keio),
+   All Rights Reserved. 
+
+   This DTD module is identified by the PUBLIC and SYSTEM identifiers:
+
+   PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+   SYSTEM "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
+
+
+-->
+
+<!--================ Character mnemonic entities =========================-->
+
+<!ENTITY % HTMLlat1 PUBLIC
+   "-//W3C//ENTITIES Latin 1 for XHTML//EN"
+   "xhtml-lat1.ent">
+%HTMLlat1;
+
+<!ENTITY % HTMLsymbol PUBLIC
+   "-//W3C//ENTITIES Symbols for XHTML//EN"
+   "xhtml-symbol.ent">
+%HTMLsymbol;
+
+<!ENTITY % HTMLspecial PUBLIC
+   "-//W3C//ENTITIES Special for XHTML//EN"
+   "xhtml-special.ent">
+%HTMLspecial;
+
+<!--================== Imported Names ====================================-->
+
+<!ENTITY % ContentType "CDATA">
+    <!-- media type, as per [RFC2045] -->
+
+<!ENTITY % ContentTypes "CDATA">
+    <!-- comma-separated list of media types, as per [RFC2045] -->
+
+<!ENTITY % Charset "CDATA">
+    <!-- a character encoding, as per [RFC2045] -->
+
+<!ENTITY % Charsets "CDATA">
+    <!-- a space separated list of character encodings, as per [RFC2045] -->
+
+<!ENTITY % LanguageCode "NMTOKEN">
+    <!-- a language code, as per [RFC1766] -->
+
+<!ENTITY % Character "CDATA">
+    <!-- a single character from [ISO10646] -->
+
+<!ENTITY % Number "CDATA">
+    <!-- one or more digits -->
+
+<!ENTITY % LinkTypes "CDATA">
+    <!-- space-separated list of link types -->
+
+<!ENTITY % MediaDesc "CDATA">
+    <!-- single or comma-separated list of media descriptors -->
+
+<!ENTITY % URI "CDATA">
+    <!-- a Uniform Resource Identifier, see [RFC2396] -->
+
+<!ENTITY % UriList "CDATA">
+    <!-- a space separated list of Uniform Resource Identifiers -->
+
+<!ENTITY % Datetime "CDATA">
+    <!-- date and time information. ISO date format -->
+
+<!ENTITY % Script "CDATA">
+    <!-- script expression -->
+
+<!ENTITY % StyleSheet "CDATA">
+    <!-- style sheet data -->
+
+<!ENTITY % Text "CDATA">
+    <!-- used for titles etc. -->
+
+<!ENTITY % FrameTarget "NMTOKEN">
+    <!-- render in this frame -->
+
+<!ENTITY % Length "CDATA">
+    <!-- nn for pixels or nn% for percentage length -->
+
+<!ENTITY % MultiLength "CDATA">
+    <!-- pixel, percentage, or relative -->
+
+<!ENTITY % MultiLengths "CDATA">
+    <!-- comma-separated list of MultiLength -->
+
+<!ENTITY % Pixels "CDATA">
+    <!-- integer representing length in pixels -->
+
+<!-- these are used for image maps -->
+
+<!ENTITY % Shape "(rect|circle|poly|default)">
+
+<!ENTITY % Coords "CDATA">
+    <!-- comma separated list of lengths -->
+
+<!--=================== Generic Attributes ===============================-->
+
+<!-- core attributes common to most elements
+  id       document-wide unique id
+  class    space separated list of classes
+  style    associated style info
+  title    advisory title/amplification
+-->
+<!ENTITY % coreattrs
+ "id          ID             #IMPLIED
+  class       CDATA          #IMPLIED
+  style       %StyleSheet;   #IMPLIED
+  title       %Text;         #IMPLIED"
+  >
+
+<!-- internationalization attributes
+  lang        language code (backwards compatible)
+  xml:lang    language code (as per XML 1.0 spec)
+  dir         direction for weak/neutral text
+-->
+<!ENTITY % i18n
+ "lang        %LanguageCode; #IMPLIED
+  xml:lang    %LanguageCode; #IMPLIED
+  dir         (ltr|rtl)      #IMPLIED"
+  >
+
+<!-- attributes for common UI events
+  onclick     a pointer button was clicked
+  ondblclick  a pointer button was double clicked
+  onmousedown a pointer button was pressed down
+  onmouseup   a pointer button was released
+  onmousemove a pointer was moved onto the element
+  onmouseout  a pointer was moved away from the element
+  onkeypress  a key was pressed and released
+  onkeydown   a key was pressed down
+  onkeyup     a key was released
+-->
+<!ENTITY % events
+ "onclick     %Script;       #IMPLIED
+  ondblclick  %Script;       #IMPLIED
+  onmousedown %Script;       #IMPLIED
+  onmouseup   %Script;       #IMPLIED
+  onmouseover %Script;       #IMPLIED
+  onmousemove %Script;       #IMPLIED
+  onmouseout  %Script;       #IMPLIED
+  onkeypress  %Script;       #IMPLIED
+  onkeydown   %Script;       #IMPLIED
+  onkeyup     %Script;       #IMPLIED"
+  >
+
+<!-- attributes for elements that can get the focus
+  accesskey   accessibility key character
+  tabindex    position in tabbing order
+  onfocus     the element got the focus
+  onblur      the element lost the focus
+-->
+<!ENTITY % focus
+ "accesskey   %Character;    #IMPLIED
+  tabindex    %Number;       #IMPLIED
+  onfocus     %Script;       #IMPLIED
+  onblur      %Script;       #IMPLIED"
+  >
+
+<!ENTITY % attrs "%coreattrs; %i18n; %events;">
+
+<!--=================== Text Elements ====================================-->
+
+<!ENTITY % special
+   "br | span | bdo | object | img | map">
+
+<!ENTITY % fontstyle "tt | i | b | big | small">
+
+<!ENTITY % phrase "em | strong | dfn | code | q | sub | sup |
+                   samp | kbd | var | cite | abbr | acronym">
+
+<!ENTITY % inline.forms "input | select | textarea | label | button">
+
+<!-- these can occur at block or inline level -->
+<!ENTITY % misc "ins | del | script | noscript">
+
+<!ENTITY % inline "a | %special; | %fontstyle; | %phrase; | %inline.forms;">
+
+<!-- %Inline; covers inline or "text-level" elements -->
+<!ENTITY % Inline "(#PCDATA | %inline; | %misc;)*">
+
+<!--================== Block level elements ==============================-->
+
+<!ENTITY % heading "h1|h2|h3|h4|h5|h6">
+<!ENTITY % lists "ul | ol | dl">
+<!ENTITY % blocktext "pre | hr | blockquote | address">
+
+<!ENTITY % block
+     "p | %heading; | div | %lists; | %blocktext; | fieldset | table">
+
+<!ENTITY % Block "(%block; | form | %misc;)*">
+
+<!-- %Flow; mixes Block and Inline and is used for list items etc. -->
+<!ENTITY % Flow "(#PCDATA | %block; | form | %inline; | %misc;)*">
+
+<!--================== Content models for exclusions =====================-->
+
+<!-- a elements use %Inline; excluding a -->
+
+<!ENTITY % a.content
+   "(#PCDATA | %special; | %fontstyle; | %phrase; | %inline.forms; | %misc;)*">
+
+<!-- pre uses %Inline excluding img, object, big, small, sup or sup -->
+
+<!ENTITY % pre.content
+   "(#PCDATA | a | br | span | bdo | map | tt | i | b |
+      %phrase; | %inline.forms;)*">
+
+<!-- form uses %Block; excluding form -->
+
+<!ENTITY % form.content "(%block; | %misc;)*">
+
+<!-- button uses %Flow; but excludes a, form and form controls -->
+
+<!ENTITY % button.content
+   "(#PCDATA | p | %heading; | div | %lists; | %blocktext; |
+    table | %special; | %fontstyle; | %phrase; | %misc;)*">
+
+<!--================ Document Structure ==================================-->
+
+<!-- the namespace URI designates the document profile -->
+
+<!ELEMENT html (head, body)>
+<!ATTLIST html
+  %i18n;
+  xmlns       %URI;          #FIXED 'http://www.w3.org/1999/xhtml'
+  >
+
+<!--================ Document Head =======================================-->
+
+<!ENTITY % head.misc "(script|style|meta|link|object)*">
+
+<!-- content model is %head.misc; combined with a single
+     title and an optional base element in any order -->
+
+<!ELEMENT head (%head.misc;,
+     ((title, %head.misc;, (base, %head.misc;)?) |
+      (base, %head.misc;, (title, %head.misc;))))>
+
+<!ATTLIST head
+  %i18n;
+  profile     %URI;          #IMPLIED
+  >
+
+<!-- The title element is not considered part of the flow of text.
+       It should be displayed, for example as the page header or
+       window title. Exactly one title is required per document.
+    -->
+<!ELEMENT title (#PCDATA)>
+<!ATTLIST title %i18n;>
+
+<!-- document base URI -->
+
+<!ELEMENT base EMPTY>
+<!ATTLIST base
+  href        %URI;          #IMPLIED
+  >
+
+<!-- generic metainformation -->
+<!ELEMENT meta EMPTY>
+<!ATTLIST meta
+  %i18n;
+  http-equiv  CDATA          #IMPLIED
+  name        CDATA          #IMPLIED
+  content     CDATA          #REQUIRED
+  scheme      CDATA          #IMPLIED
+  >
+
+<!--
+  Relationship values can be used in principle:
+
+   a) for document specific toolbars/menus when used
+      with the link element in document head e.g.
+        start, contents, previous, next, index, end, help
+   b) to link to a separate style sheet (rel="stylesheet")
+   c) to make a link to a script (rel="script")
+   d) by stylesheets to control how collections of
+      html nodes are rendered into printed documents
+   e) to make a link to a printable version of this document
+      e.g. a PostScript or PDF version (rel="alternate" media="print")
+-->
+
+<!ELEMENT link EMPTY>
+<!ATTLIST link
+  %attrs;
+  charset     %Charset;      #IMPLIED
+  href        %URI;          #IMPLIED
+  hreflang    %LanguageCode; #IMPLIED
+  type        %ContentType;  #IMPLIED
+  rel         %LinkTypes;    #IMPLIED
+  rev         %LinkTypes;    #IMPLIED
+  media       %MediaDesc;    #IMPLIED
+  >
+
+<!-- style info, which may include CDATA sections -->
+<!ELEMENT style (#PCDATA)>
+<!ATTLIST style
+  %i18n;
+  type        %ContentType;  #REQUIRED
+  media       %MediaDesc;    #IMPLIED
+  title       %Text;         #IMPLIED
+  xml:space   (preserve)     #FIXED 'preserve'
+  >
+
+<!-- script statements, which may include CDATA sections -->
+<!ELEMENT script (#PCDATA)>
+<!ATTLIST script
+  charset     %Charset;      #IMPLIED
+  type        %ContentType;  #REQUIRED
+  src         %URI;          #IMPLIED
+  defer       (defer)        #IMPLIED
+  xml:space   (preserve)     #FIXED 'preserve'
+  >
+
+<!-- alternate content container for non script-based rendering -->
+
+<!ELEMENT noscript %Block;>
+<!ATTLIST noscript
+  %attrs;
+  >
+
+<!--=================== Document Body ====================================-->
+
+<!ELEMENT body %Block;>
+<!ATTLIST body
+  %attrs;
+  onload          %Script;   #IMPLIED
+  onunload        %Script;   #IMPLIED
+  >
+
+<!ELEMENT div %Flow;>  <!-- generic language/style container -->
+<!ATTLIST div
+  %attrs;
+  >
+
+<!--=================== Paragraphs =======================================-->
+
+<!ELEMENT p %Inline;>
+<!ATTLIST p
+  %attrs;
+  >
+
+<!--=================== Headings =========================================-->
+
+<!--
+  There are six levels of headings from h1 (the most important)
+  to h6 (the least important).
+-->
+
+<!ELEMENT h1  %Inline;>
+<!ATTLIST h1
+   %attrs;
+   >
+
+<!ELEMENT h2 %Inline;>
+<!ATTLIST h2
+   %attrs;
+   >
+
+<!ELEMENT h3 %Inline;>
+<!ATTLIST h3
+   %attrs;
+   >
+
+<!ELEMENT h4 %Inline;>
+<!ATTLIST h4
+   %attrs;
+   >
+
+<!ELEMENT h5 %Inline;>
+<!ATTLIST h5
+   %attrs;
+   >
+
+<!ELEMENT h6 %Inline;>
+<!ATTLIST h6
+   %attrs;
+   >
+
+<!--=================== Lists ============================================-->
+
+<!-- Unordered list -->
+
+<!ELEMENT ul (li)+>
+<!ATTLIST ul
+  %attrs;
+  >
+
+<!-- Ordered (numbered) list -->
+
+<!ELEMENT ol (li)+>
+<!ATTLIST ol
+  %attrs;
+  >
+
+<!-- list item -->
+
+<!ELEMENT li %Flow;>
+<!ATTLIST li
+  %attrs;
+  >
+
+<!-- definition lists - dt for term, dd for its definition -->
+
+<!ELEMENT dl (dt|dd)+>
+<!ATTLIST dl
+  %attrs;
+  >
+
+<!ELEMENT dt %Inline;>
+<!ATTLIST dt
+  %attrs;
+  >
+
+<!ELEMENT dd %Flow;>
+<!ATTLIST dd
+  %attrs;
+  >
+
+<!--=================== Address ==========================================-->
+
+<!-- information on author -->
+
+<!ELEMENT address %Inline;>
+<!ATTLIST address
+  %attrs;
+  >
+
+<!--=================== Horizontal Rule ==================================-->
+
+<!ELEMENT hr EMPTY>
+<!ATTLIST hr
+  %attrs;
+  >
+
+<!--=================== Preformatted Text ================================-->
+
+<!-- content is %Inline; excluding "img|object|big|small|sub|sup" -->
+
+<!ELEMENT pre %pre.content;>
+<!ATTLIST pre
+  %attrs;
+  xml:space (preserve) #FIXED 'preserve'
+  >
+
+<!--=================== Block-like Quotes ================================-->
+
+<!ELEMENT blockquote %Block;>
+<!ATTLIST blockquote
+  %attrs;
+  cite        %URI;          #IMPLIED
+  >
+
+<!--=================== Inserted/Deleted Text ============================-->
+
+<!--
+  ins/del are allowed in block and inline content, but its
+  inappropriate to include block content within an ins element
+  occurring in inline content.
+-->
+<!ELEMENT ins %Flow;>
+<!ATTLIST ins
+  %attrs;
+  cite        %URI;          #IMPLIED
+  datetime    %Datetime;     #IMPLIED
+  >
+
+<!ELEMENT del %Flow;>
+<!ATTLIST del
+  %attrs;
+  cite        %URI;          #IMPLIED
+  datetime    %Datetime;     #IMPLIED
+  >
+
+<!--================== The Anchor Element ================================-->
+
+<!-- content is %Inline; except that anchors shouldn't be nested -->
+
+<!ELEMENT a %a.content;>
+<!ATTLIST a
+  %attrs;
+  charset     %Charset;      #IMPLIED
+  type        %ContentType;  #IMPLIED
+  name        NMTOKEN        #IMPLIED
+  href        %URI;          #IMPLIED
+  hreflang    %LanguageCode; #IMPLIED
+  rel         %LinkTypes;    #IMPLIED
+  rev         %LinkTypes;    #IMPLIED
+  accesskey   %Character;    #IMPLIED
+  shape       %Shape;        "rect"
+  coords      %Coords;       #IMPLIED
+  tabindex    %Number;       #IMPLIED
+  onfocus     %Script;       #IMPLIED
+  onblur      %Script;       #IMPLIED
+  >
+
+<!--===================== Inline Elements ================================-->
+
+<!ELEMENT span %Inline;> <!-- generic language/style container -->
+<!ATTLIST span
+  %attrs;
+  >
+
+<!ELEMENT bdo %Inline;>  <!-- I18N BiDi over-ride -->
+<!ATTLIST bdo
+  %coreattrs;
+  %events;
+  lang        %LanguageCode; #IMPLIED
+  xml:lang    %LanguageCode; #IMPLIED
+  dir         (ltr|rtl)      #REQUIRED
+  >
+
+<!ELEMENT br EMPTY>   <!-- forced line break -->
+<!ATTLIST br
+  %coreattrs;
+  >
+
+<!ELEMENT em %Inline;>   <!-- emphasis -->
+<!ATTLIST em %attrs;>
+
+<!ELEMENT strong %Inline;>   <!-- strong emphasis -->
+<!ATTLIST strong %attrs;>
+
+<!ELEMENT dfn %Inline;>   <!-- definitional -->
+<!ATTLIST dfn %attrs;>
+
+<!ELEMENT code %Inline;>   <!-- program code -->
+<!ATTLIST code %attrs;>
+
+<!ELEMENT samp %Inline;>   <!-- sample -->
+<!ATTLIST samp %attrs;>
+
+<!ELEMENT kbd %Inline;>  <!-- something user would type -->
+<!ATTLIST kbd %attrs;>
+
+<!ELEMENT var %Inline;>   <!-- variable -->
+<!ATTLIST var %attrs;>
+
+<!ELEMENT cite %Inline;>   <!-- citation -->
+<!ATTLIST cite %attrs;>
+
+<!ELEMENT abbr %Inline;>   <!-- abbreviation -->
+<!ATTLIST abbr %attrs;>
+
+<!ELEMENT acronym %Inline;>   <!-- acronym -->
+<!ATTLIST acronym %attrs;>
+
+<!ELEMENT q %Inline;>   <!-- inlined quote -->
+<!ATTLIST q
+  %attrs;
+  cite        %URI;          #IMPLIED
+  >
+
+<!ELEMENT sub %Inline;> <!-- subscript -->
+<!ATTLIST sub %attrs;>
+
+<!ELEMENT sup %Inline;> <!-- superscript -->
+<!ATTLIST sup %attrs;>
+
+<!ELEMENT tt %Inline;>   <!-- fixed pitch font -->
+<!ATTLIST tt %attrs;>
+
+<!ELEMENT i %Inline;>   <!-- italic font -->
+<!ATTLIST i %attrs;>
+
+<!ELEMENT b %Inline;>   <!-- bold font -->
+<!ATTLIST b %attrs;>
+
+<!ELEMENT big %Inline;>   <!-- bigger font -->
+<!ATTLIST big %attrs;>
+
+<!ELEMENT small %Inline;>   <!-- smaller font -->
+<!ATTLIST small %attrs;>
+
+<!--==================== Object ======================================-->
+<!--
+  object is used to embed objects as part of HTML pages.
+  param elements should precede other content. Parameters
+  can also be expressed as attribute/value pairs on the
+  object element itself when brevity is desired.
+-->
+
+<!ELEMENT object (#PCDATA | param | %block; | form | %inline; | %misc;)*>
+<!ATTLIST object
+  %attrs;
+  declare     (declare)      #IMPLIED
+  classid     %URI;          #IMPLIED
+  codebase    %URI;          #IMPLIED
+  data        %URI;          #IMPLIED
+  type        %ContentType;  #IMPLIED
+  codetype    %ContentType;  #IMPLIED
+  archive     %UriList;      #IMPLIED
+  standby     %Text;         #IMPLIED
+  height      %Length;       #IMPLIED
+  width       %Length;       #IMPLIED
+  usemap      %URI;          #IMPLIED
+  name        NMTOKEN        #IMPLIED
+  tabindex    %Number;       #IMPLIED
+  >
+
+<!--
+  param is used to supply a named property value.
+  In XML it would seem natural to follow RDF and support an
+  abbreviated syntax where the param elements are replaced
+  by attribute value pairs on the object start tag.
+-->
+<!ELEMENT param EMPTY>
+<!ATTLIST param
+  id          ID             #IMPLIED
+  name        CDATA          #IMPLIED
+  value       CDATA          #IMPLIED
+  valuetype   (data|ref|object) "data"
+  type        %ContentType;  #IMPLIED
+  >
+
+<!--=================== Images ===========================================-->
+
+<!--
+   To avoid accessibility problems for people who aren't
+   able to see the image, you should provide a text
+   description using the alt and longdesc attributes.
+   In addition, avoid the use of server-side image maps.
+   Note that in this DTD there is no name attribute. That
+   is only available in the transitional and frameset DTD.
+-->
+
+<!ELEMENT img EMPTY>
+<!ATTLIST img
+  %attrs;
+  src         %URI;          #REQUIRED
+  alt         %Text;         #REQUIRED
+  longdesc    %URI;          #IMPLIED
+  height      %Length;       #IMPLIED
+  width       %Length;       #IMPLIED
+  usemap      %URI;          #IMPLIED
+  ismap       (ismap)        #IMPLIED
+  >
+
+<!-- usemap points to a map element which may be in this document
+  or an external document, although the latter is not widely supported -->
+
+<!--================== Client-side image maps ============================-->
+
+<!-- These can be placed in the same document or grouped in a
+     separate document although this isn't yet widely supported -->
+
+<!ELEMENT map ((%block; | form | %misc;)+ | area+)>
+<!ATTLIST map
+  %i18n;
+  %events;
+  id          ID             #REQUIRED
+  class       CDATA          #IMPLIED
+  style       %StyleSheet;   #IMPLIED
+  title       %Text;         #IMPLIED
+  name        NMTOKEN        #IMPLIED
+  >
+
+<!ELEMENT area EMPTY>
+<!ATTLIST area
+  %attrs;
+  shape       %Shape;        "rect"
+  coords      %Coords;       #IMPLIED
+  href        %URI;          #IMPLIED
+  nohref      (nohref)       #IMPLIED
+  alt         %Text;         #REQUIRED
+  tabindex    %Number;       #IMPLIED
+  accesskey   %Character;    #IMPLIED
+  onfocus     %Script;       #IMPLIED
+  onblur      %Script;       #IMPLIED
+  >
+
+<!--================ Forms ===============================================-->
+<!ELEMENT form %form.content;>   <!-- forms shouldn't be nested -->
+
+<!ATTLIST form
+  %attrs;
+  action      %URI;          #REQUIRED
+  method      (get|post)     "get"
+  enctype     %ContentType;  "application/x-www-form-urlencoded"
+  onsubmit    %Script;       #IMPLIED
+  onreset     %Script;       #IMPLIED
+  accept      %ContentTypes; #IMPLIED
+  accept-charset %Charsets;  #IMPLIED
+  >
+
+<!--
+  Each label must not contain more than ONE field
+  Label elements shouldn't be nested.
+-->
+<!ELEMENT label %Inline;>
+<!ATTLIST label
+  %attrs;
+  for         IDREF          #IMPLIED
+  accesskey   %Character;    #IMPLIED
+  onfocus     %Script;       #IMPLIED
+  onblur      %Script;       #IMPLIED
+  >
+
+<!ENTITY % InputType
+  "(text | password | checkbox |
+    radio | submit | reset |
+    file | hidden | image | button)"
+   >
+
+<!-- the name attribute is required for all but submit & reset -->
+
+<!ELEMENT input EMPTY>     <!-- form control -->
+<!ATTLIST input
+  %attrs;
+  type        %InputType;    "text"
+  name        CDATA          #IMPLIED
+  value       CDATA          #IMPLIED
+  checked     (checked)      #IMPLIED
+  disabled    (disabled)     #IMPLIED
+  readonly    (readonly)     #IMPLIED
+  size        CDATA          #IMPLIED
+  maxlength   %Number;       #IMPLIED
+  src         %URI;          #IMPLIED
+  alt         CDATA          #IMPLIED
+  usemap      %URI;          #IMPLIED
+  tabindex    %Number;       #IMPLIED
+  accesskey   %Character;    #IMPLIED
+  onfocus     %Script;       #IMPLIED
+  onblur      %Script;       #IMPLIED
+  onselect    %Script;       #IMPLIED
+  onchange    %Script;       #IMPLIED
+  accept      %ContentTypes; #IMPLIED
+  >
+
+<!ELEMENT select (optgroup|option)+>  <!-- option selector -->
+<!ATTLIST select
+  %attrs;
+  name        CDATA          #IMPLIED
+  size        %Number;       #IMPLIED
+  multiple    (multiple)     #IMPLIED
+  disabled    (disabled)     #IMPLIED
+  tabindex    %Number;       #IMPLIED
+  onfocus     %Script;       #IMPLIED
+  onblur      %Script;       #IMPLIED
+  onchange    %Script;       #IMPLIED
+  >
+
+<!ELEMENT optgroup (option)+>   <!-- option group -->
+<!ATTLIST optgroup
+  %attrs;
+  disabled    (disabled)     #IMPLIED
+  label       %Text;         #REQUIRED
+  >
+
+<!ELEMENT option (#PCDATA)>     <!-- selectable choice -->
+<!ATTLIST option
+  %attrs;
+  selected    (selected)     #IMPLIED
+  disabled    (disabled)     #IMPLIED
+  label       %Text;         #IMPLIED
+  value       CDATA          #IMPLIED
+  >
+
+<!ELEMENT textarea (#PCDATA)>     <!-- multi-line text field -->
+<!ATTLIST textarea
+  %attrs;
+  name        CDATA          #IMPLIED
+  rows        %Number;       #REQUIRED
+  cols        %Number;       #REQUIRED
+  disabled    (disabled)     #IMPLIED
+  readonly    (readonly)     #IMPLIED
+  tabindex    %Number;       #IMPLIED
+  accesskey   %Character;    #IMPLIED
+  onfocus     %Script;       #IMPLIED
+  onblur      %Script;       #IMPLIED
+  onselect    %Script;       #IMPLIED
+  onchange    %Script;       #IMPLIED
+  >
+
+<!--
+  The fieldset element is used to group form fields.
+  Only one legend element should occur in the content
+  and if present should only be preceded by whitespace.
+-->
+<!ELEMENT fieldset (#PCDATA | legend | %block; | form | %inline; | %misc;)*>
+<!ATTLIST fieldset
+  %attrs;
+  >
+
+<!ELEMENT legend %Inline;>     <!-- fieldset label -->
+<!ATTLIST legend
+  %attrs;
+  accesskey   %Character;    #IMPLIED
+  >
+
+<!--
+ Content is %Flow; excluding a, form and form controls
+--> 
+<!ELEMENT button %button.content;>  <!-- push button -->
+<!ATTLIST button
+  %attrs;
+  name        CDATA          #IMPLIED
+  value       CDATA          #IMPLIED
+  type        (button|submit|reset) "submit"
+  disabled    (disabled)     #IMPLIED
+  tabindex    %Number;       #IMPLIED
+  accesskey   %Character;    #IMPLIED
+  onfocus     %Script;       #IMPLIED
+  onblur      %Script;       #IMPLIED
+  >
+
+<!--======================= Tables =======================================-->
+
+<!-- Derived from IETF HTML table standard, see [RFC1942] -->
+
+<!--
+ The border attribute sets the thickness of the frame around the
+ table. The default units are screen pixels.
+
+ The frame attribute specifies which parts of the frame around
+ the table should be rendered. The values are not the same as
+ CALS to avoid a name clash with the valign attribute.
+-->
+<!ENTITY % TFrame "(void|above|below|hsides|lhs|rhs|vsides|box|border)">
+
+<!--
+ The rules attribute defines which rules to draw between cells:
+
+ If rules is absent then assume:
+     "none" if border is absent or border="0" otherwise "all"
+-->
+
+<!ENTITY % TRules "(none | groups | rows | cols | all)">
+  
+<!-- horizontal placement of table relative to document -->
+<!ENTITY % TAlign "(left|center|right)">
+
+<!-- horizontal alignment attributes for cell contents
+
+  char        alignment char, e.g. char=':'
+  charoff     offset for alignment char
+-->
+<!ENTITY % cellhalign
+  "align      (left|center|right|justify|char) #IMPLIED
+   char       %Character;    #IMPLIED
+   charoff    %Length;       #IMPLIED"
+  >
+
+<!-- vertical alignment attributes for cell contents -->
+<!ENTITY % cellvalign
+  "valign     (top|middle|bottom|baseline) #IMPLIED"
+  >
+
+<!ELEMENT table
+     (caption?, (col*|colgroup*), thead?, tfoot?, (tbody+|tr+))>
+<!ELEMENT caption  %Inline;>
+<!ELEMENT thead    (tr)+>
+<!ELEMENT tfoot    (tr)+>
+<!ELEMENT tbody    (tr)+>
+<!ELEMENT colgroup (col)*>
+<!ELEMENT col      EMPTY>
+<!ELEMENT tr       (th|td)+>
+<!ELEMENT th       %Flow;>
+<!ELEMENT td       %Flow;>
+
+<!ATTLIST table
+  %attrs;
+  summary     %Text;         #IMPLIED
+  width       %Length;       #IMPLIED
+  border      %Pixels;       #IMPLIED
+  frame       %TFrame;       #IMPLIED
+  rules       %TRules;       #IMPLIED
+  cellspacing %Length;       #IMPLIED
+  cellpadding %Length;       #IMPLIED
+  >
+
+<!ENTITY % CAlign "(top|bottom|left|right)">
+
+<!ATTLIST caption
+  %attrs;
+  >
+
+<!--
+colgroup groups a set of col elements. It allows you to group
+several semantically related columns together.
+-->
+<!ATTLIST colgroup
+  %attrs;
+  span        %Number;       "1"
+  width       %MultiLength;  #IMPLIED
+  %cellhalign;
+  %cellvalign;
+  >
+
+<!--
+ col elements define the alignment properties for cells in
+ one or more columns.
+
+ The width attribute specifies the width of the columns, e.g.
+
+     width=64        width in screen pixels
+     width=0.5*      relative width of 0.5
+
+ The span attribute causes the attributes of one
+ col element to apply to more than one column.
+-->
+<!ATTLIST col
+  %attrs;
+  span        %Number;       "1"
+  width       %MultiLength;  #IMPLIED
+  %cellhalign;
+  %cellvalign;
+  >
+
+<!--
+    Use thead to duplicate headers when breaking table
+    across page boundaries, or for static headers when
+    tbody sections are rendered in scrolling panel.
+
+    Use tfoot to duplicate footers when breaking table
+    across page boundaries, or for static footers when
+    tbody sections are rendered in scrolling panel.
+
+    Use multiple tbody sections when rules are needed
+    between groups of table rows.
+-->
+<!ATTLIST thead
+  %attrs;
+  %cellhalign;
+  %cellvalign;
+  >
+
+<!ATTLIST tfoot
+  %attrs;
+  %cellhalign;
+  %cellvalign;
+  >
+
+<!ATTLIST tbody
+  %attrs;
+  %cellhalign;
+  %cellvalign;
+  >
+
+<!ATTLIST tr
+  %attrs;
+  %cellhalign;
+  %cellvalign;
+  >
+
+
+<!-- Scope is simpler than headers attribute for common tables -->
+<!ENTITY % Scope "(row|col|rowgroup|colgroup)">
+
+<!-- th is for headers, td for data and for cells acting as both -->
+
+<!ATTLIST th
+  %attrs;
+  abbr        %Text;         #IMPLIED
+  axis        CDATA          #IMPLIED
+  headers     IDREFS         #IMPLIED
+  scope       %Scope;        #IMPLIED
+  rowspan     %Number;       "1"
+  colspan     %Number;       "1"
+  %cellhalign;
+  %cellvalign;
+  >
+
+<!ATTLIST td
+  %attrs;
+  abbr        %Text;         #IMPLIED
+  axis        CDATA          #IMPLIED
+  headers     IDREFS         #IMPLIED
+  scope       %Scope;        #IMPLIED
+  rowspan     %Number;       "1"
+  colspan     %Number;       "1"
+  %cellhalign;
+  %cellvalign;
+  >
+
diff --git a/TC/testcase/res/UTsXml/test/valid/dtds/xhtml1-transitional.dtd b/TC/testcase/res/UTsXml/test/valid/dtds/xhtml1-transitional.dtd
new file mode 100755 (executable)
index 0000000..def8d66
--- /dev/null
@@ -0,0 +1,1194 @@
+<!--
+   Extensible HTML version 1.0 Transitional DTD
+
+   This is the same as HTML 4.0 Transitional except for
+   changes due to the differences between XML and SGML.
+
+   Namespace = http://www.w3.org/1999/xhtml
+
+   For further information, see: http://www.w3.org/TR/xhtml1
+
+   Copyright (c) 1998-1999 W3C (MIT, INRIA, Keio),
+   All Rights Reserved. 
+
+   This DTD module is identified by the PUBLIC and SYSTEM identifiers:
+
+   PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+   SYSTEM "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
+
+
+-->
+
+<!--================ Character mnemonic entities =========================-->
+
+<!ENTITY % HTMLlat1 PUBLIC
+   "-//W3C//ENTITIES Latin 1 for XHTML//EN"
+   "http://www.w3.org/TR/xhtml1/DTD/xhtml-lat1.ent">
+%HTMLlat1;
+
+<!ENTITY % HTMLsymbol PUBLIC
+   "-//W3C//ENTITIES Symbols for XHTML//EN"
+   "http://www.w3.org/TR/xhtml1/DTD/xhtml-symbol.ent">
+%HTMLsymbol;
+
+<!ENTITY % HTMLspecial PUBLIC
+   "-//W3C//ENTITIES Special for XHTML//EN"
+   "http://www.w3.org/TR/xhtml1/DTD/xhtml-special.ent">
+%HTMLspecial;
+
+<!--================== Imported Names ====================================-->
+
+<!ENTITY % ContentType "CDATA">
+    <!-- media type, as per [RFC2045] -->
+
+<!ENTITY % ContentTypes "CDATA">
+    <!-- comma-separated list of media types, as per [RFC2045] -->
+
+<!ENTITY % Charset "CDATA">
+    <!-- a character encoding, as per [RFC2045] -->
+
+<!ENTITY % Charsets "CDATA">
+    <!-- a space separated list of character encodings, as per [RFC2045] -->
+
+<!ENTITY % LanguageCode "NMTOKEN">
+    <!-- a language code, as per [RFC1766] -->
+
+<!ENTITY % Character "CDATA">
+    <!-- a single character from [ISO10646] -->
+
+<!ENTITY % Number "CDATA">
+    <!-- one or more digits -->
+
+<!ENTITY % LinkTypes "CDATA">
+    <!-- space-separated list of link types -->
+
+<!ENTITY % MediaDesc "CDATA">
+    <!-- single or comma-separated list of media descriptors -->
+
+<!ENTITY % URI "CDATA">
+    <!-- a Uniform Resource Identifier, see [RFC2396] -->
+
+<!ENTITY % UriList "CDATA">
+    <!-- a space separated list of Uniform Resource Identifiers -->
+
+<!ENTITY % Datetime "CDATA">
+    <!-- date and time information. ISO date format -->
+
+<!ENTITY % Script "CDATA">
+    <!-- script expression -->
+
+<!ENTITY % StyleSheet "CDATA">
+    <!-- style sheet data -->
+
+<!ENTITY % Text "CDATA">
+    <!-- used for titles etc. -->
+
+<!ENTITY % FrameTarget "NMTOKEN">
+    <!-- render in this frame -->
+
+<!ENTITY % Length "CDATA">
+    <!-- nn for pixels or nn% for percentage length -->
+
+<!ENTITY % MultiLength "CDATA">
+    <!-- pixel, percentage, or relative -->
+
+<!ENTITY % MultiLengths "CDATA">
+    <!-- comma-separated list of MultiLength -->
+
+<!ENTITY % Pixels "CDATA">
+    <!-- integer representing length in pixels -->
+
+<!-- these are used for image maps -->
+
+<!ENTITY % Shape "(rect|circle|poly|default)">
+
+<!ENTITY % Coords "CDATA">
+    <!-- comma separated list of lengths -->
+
+<!-- used for object, applet, img, input and iframe -->
+<!ENTITY % ImgAlign "(top|middle|bottom|left|right)">
+
+<!-- a color using sRGB: #RRGGBB as Hex values -->
+<!ENTITY % Color "CDATA">
+
+<!-- There are also 16 widely known color names with their sRGB values:
+
+    Black  = #000000    Green  = #008000
+    Silver = #C0C0C0    Lime   = #00FF00
+    Gray   = #808080    Olive  = #808000
+    White  = #FFFFFF    Yellow = #FFFF00
+    Maroon = #800000    Navy   = #000080
+    Red    = #FF0000    Blue   = #0000FF
+    Purple = #800080    Teal   = #008080
+    Fuchsia= #FF00FF    Aqua   = #00FFFF
+-->
+
+<!--=================== Generic Attributes ===============================-->
+
+<!-- core attributes common to most elements
+  id       document-wide unique id
+  class    space separated list of classes
+  style    associated style info
+  title    advisory title/amplification
+-->
+<!ENTITY % coreattrs
+ "id          ID             #IMPLIED
+  class       CDATA          #IMPLIED
+  style       %StyleSheet;   #IMPLIED
+  title       %Text;         #IMPLIED"
+  >
+
+<!-- internationalization attributes
+  lang        language code (backwards compatible)
+  xml:lang    language code (as per XML 1.0 spec)
+  dir         direction for weak/neutral text
+-->
+<!ENTITY % i18n
+ "lang        %LanguageCode; #IMPLIED
+  xml:lang    %LanguageCode; #IMPLIED
+  dir         (ltr|rtl)      #IMPLIED"
+  >
+
+<!-- attributes for common UI events
+  onclick     a pointer button was clicked
+  ondblclick  a pointer button was double clicked
+  onmousedown a pointer button was pressed down
+  onmouseup   a pointer button was released
+  onmousemove a pointer was moved onto the element
+  onmouseout  a pointer was moved away from the element
+  onkeypress  a key was pressed and released
+  onkeydown   a key was pressed down
+  onkeyup     a key was released
+-->
+<!ENTITY % events
+ "onclick     %Script;       #IMPLIED
+  ondblclick  %Script;       #IMPLIED
+  onmousedown %Script;       #IMPLIED
+  onmouseup   %Script;       #IMPLIED
+  onmouseover %Script;       #IMPLIED
+  onmousemove %Script;       #IMPLIED
+  onmouseout  %Script;       #IMPLIED
+  onkeypress  %Script;       #IMPLIED
+  onkeydown   %Script;       #IMPLIED
+  onkeyup     %Script;       #IMPLIED"
+  >
+
+<!-- attributes for elements that can get the focus
+  accesskey   accessibility key character
+  tabindex    position in tabbing order
+  onfocus     the element got the focus
+  onblur      the element lost the focus
+-->
+<!ENTITY % focus
+ "accesskey   %Character;    #IMPLIED
+  tabindex    %Number;       #IMPLIED
+  onfocus     %Script;       #IMPLIED
+  onblur      %Script;       #IMPLIED"
+  >
+
+<!ENTITY % attrs "%coreattrs; %i18n; %events;">
+
+<!-- text alignment for p, div, h1-h6. The default is
+     align="left" for ltr headings, "right" for rtl -->
+
+<!ENTITY % TextAlign "align (left|center|right) #IMPLIED">
+
+<!--=================== Text Elements ====================================-->
+
+<!ENTITY % special
+   "br | span | bdo | object | applet | img | map | iframe">
+
+<!ENTITY % fontstyle "tt | i | b | big | small | u
+                      | s | strike |font | basefont">
+
+<!ENTITY % phrase "em | strong | dfn | code | q | sub | sup |
+                   samp | kbd | var | cite | abbr | acronym">
+
+<!ENTITY % inline.forms "input | select | textarea | label | button">
+
+<!-- these can occur at block or inline level -->
+<!ENTITY % misc "ins | del | script | noscript">
+
+<!ENTITY % inline "a | %special; | %fontstyle; | %phrase; | %inline.forms;">
+
+<!-- %Inline; covers inline or "text-level" elements -->
+<!ENTITY % Inline "(#PCDATA | %inline; | %misc;)*">
+
+<!--================== Block level elements ==============================-->
+
+<!ENTITY % heading "h1|h2|h3|h4|h5|h6">
+<!ENTITY % lists "ul | ol | dl | menu | dir">
+<!ENTITY % blocktext "pre | hr | blockquote | address | center | noframes">
+
+<!ENTITY % block
+    "p | %heading; | div | %lists; | %blocktext; | isindex |fieldset | table">
+
+<!ENTITY % Block "(%block; | form | %misc;)*">
+
+<!-- %Flow; mixes Block and Inline and is used for list items etc. -->
+<!ENTITY % Flow "(#PCDATA | %block; | form | %inline; | %misc;)*">
+
+<!--================== Content models for exclusions =====================-->
+
+<!-- a elements use %Inline; excluding a -->
+
+<!ENTITY % a.content
+   "(#PCDATA | %special; | %fontstyle; | %phrase; | %inline.forms; | %misc;)*">
+
+<!-- pre uses %Inline excluding img, object, applet, big, small,
+     sub, sup, font, or basefont -->
+
+<!ENTITY % pre.content
+   "(#PCDATA | a | br | span | bdo | map | tt | i | b | u | s |
+      %phrase; | %inline.forms;)*">
+
+<!-- form uses %Flow; excluding form -->
+
+<!ENTITY % form.content "(#PCDATA | %block; | %inline; | %misc;)*">
+
+<!-- button uses %Flow; but excludes a, form, form controls, iframe -->
+
+<!ENTITY % button.content
+   "(#PCDATA | p | %heading; | div | %lists; | %blocktext; |
+      table | br | span | bdo | object | applet | img | map |
+      %fontstyle; | %phrase; | %misc;)*">
+
+<!--================ Document Structure ==================================-->
+
+<!-- the namespace URI designates the document profile -->
+
+<!ELEMENT html (head, body)>
+<!ATTLIST html
+  %i18n;
+  xmlns       %URI;          #FIXED 'http://www.w3.org/1999/xhtml'
+  >
+
+<!--================ Document Head =======================================-->
+
+<!ENTITY % head.misc "(script|style|meta|link|object|isindex)*">
+
+<!-- content model is %head.misc; combined with a single
+     title and an optional base element in any order -->
+
+<!ELEMENT head (%head.misc;,
+     ((title, %head.misc;, (base, %head.misc;)?) |
+      (base, %head.misc;, (title, %head.misc;))))>
+
+<!ATTLIST head
+  %i18n;
+  profile     %URI;          #IMPLIED
+  >
+
+<!-- The title element is not considered part of the flow of text.
+       It should be displayed, for example as the page header or
+       window title. Exactly one title is required per document.
+    -->
+<!ELEMENT title (#PCDATA)>
+<!ATTLIST title %i18n;>
+
+<!-- document base URI -->
+
+<!ELEMENT base EMPTY>
+<!ATTLIST base
+  href        %URI;          #IMPLIED
+  target      %FrameTarget;  #IMPLIED
+  >
+
+<!-- generic metainformation -->
+<!ELEMENT meta EMPTY>
+<!ATTLIST meta
+  %i18n;
+  http-equiv  CDATA          #IMPLIED
+  name        CDATA          #IMPLIED
+  content     CDATA          #REQUIRED
+  scheme      CDATA          #IMPLIED
+  >
+
+<!--
+  Relationship values can be used in principle:
+
+   a) for document specific toolbars/menus when used
+      with the link element in document head e.g.
+        start, contents, previous, next, index, end, help
+   b) to link to a separate style sheet (rel="stylesheet")
+   c) to make a link to a script (rel="script")
+   d) by stylesheets to control how collections of
+      html nodes are rendered into printed documents
+   e) to make a link to a printable version of this document
+      e.g. a PostScript or PDF version (rel="alternate" media="print")
+-->
+
+<!ELEMENT link EMPTY>
+<!ATTLIST link
+  %attrs;
+  charset     %Charset;      #IMPLIED
+  href        %URI;          #IMPLIED
+  hreflang    %LanguageCode; #IMPLIED
+  type        %ContentType;  #IMPLIED
+  rel         %LinkTypes;    #IMPLIED
+  rev         %LinkTypes;    #IMPLIED
+  media       %MediaDesc;    #IMPLIED
+  target      %FrameTarget;  #IMPLIED
+  >
+
+<!-- style info, which may include CDATA sections -->
+<!ELEMENT style (#PCDATA)>
+<!ATTLIST style
+  %i18n;
+  type        %ContentType;  #REQUIRED
+  media       %MediaDesc;    #IMPLIED
+  title       %Text;         #IMPLIED
+  xml:space   (preserve)     #FIXED 'preserve'
+  >
+
+<!-- script statements, which may include CDATA sections -->
+<!ELEMENT script (#PCDATA)>
+<!ATTLIST script
+  charset     %Charset;      #IMPLIED
+  type        %ContentType;  #REQUIRED
+  language    CDATA          #IMPLIED
+  src         %URI;          #IMPLIED
+  defer       (defer)        #IMPLIED
+  xml:space   (preserve)     #FIXED 'preserve'
+  >
+
+<!-- alternate content container for non script-based rendering -->
+
+<!ELEMENT noscript %Flow;>
+<!ATTLIST noscript
+  %attrs;
+  >
+
+<!--======================= Frames =======================================-->
+
+<!-- inline subwindow -->
+
+<!ELEMENT iframe %Flow;>
+<!ATTLIST iframe
+  %coreattrs;
+  longdesc    %URI;          #IMPLIED
+  name        NMTOKEN        #IMPLIED
+  src         %URI;          #IMPLIED
+  frameborder (1|0)          "1"
+  marginwidth %Pixels;       #IMPLIED
+  marginheight %Pixels;      #IMPLIED
+  scrolling   (yes|no|auto)  "auto"
+  align       %ImgAlign;     #IMPLIED
+  height      %Length;       #IMPLIED
+  width       %Length;       #IMPLIED
+  >
+
+<!-- alternate content container for non frame-based rendering -->
+
+<!ELEMENT noframes %Flow;>
+<!ATTLIST noframes
+  %attrs;
+  >
+
+<!--=================== Document Body ====================================-->
+
+<!ELEMENT body %Flow;>
+<!ATTLIST body
+  %attrs;
+  onload      %Script;       #IMPLIED
+  onunload    %Script;       #IMPLIED
+  background  %URI;          #IMPLIED
+  bgcolor     %Color;        #IMPLIED
+  text        %Color;        #IMPLIED
+  link        %Color;        #IMPLIED
+  vlink       %Color;        #IMPLIED
+  alink       %Color;        #IMPLIED
+  >
+
+<!ELEMENT div %Flow;>  <!-- generic language/style container -->
+<!ATTLIST div
+  %attrs;
+  %TextAlign;
+  >
+
+<!--=================== Paragraphs =======================================-->
+
+<!ELEMENT p %Inline;>
+<!ATTLIST p
+  %attrs;
+  %TextAlign;
+  >
+
+<!--=================== Headings =========================================-->
+
+<!--
+  There are six levels of headings from h1 (the most important)
+  to h6 (the least important).
+-->
+
+<!ELEMENT h1  %Inline;>
+<!ATTLIST h1
+  %attrs;
+  %TextAlign;
+  >
+
+<!ELEMENT h2 %Inline;>
+<!ATTLIST h2
+  %attrs;
+  %TextAlign;
+  >
+
+<!ELEMENT h3 %Inline;>
+<!ATTLIST h3
+  %attrs;
+  %TextAlign;
+  >
+
+<!ELEMENT h4 %Inline;>
+<!ATTLIST h4
+  %attrs;
+  %TextAlign;
+  >
+
+<!ELEMENT h5 %Inline;>
+<!ATTLIST h5
+  %attrs;
+  %TextAlign;
+  >
+
+<!ELEMENT h6 %Inline;>
+<!ATTLIST h6
+  %attrs;
+  %TextAlign;
+  >
+
+<!--=================== Lists ============================================-->
+
+<!-- Unordered list bullet styles -->
+
+<!ENTITY % ULStyle "(disc|square|circle)">
+
+<!-- Unordered list -->
+
+<!ELEMENT ul (li)+>
+<!ATTLIST ul
+  %attrs;
+  type        %ULStyle;     #IMPLIED
+  compact     (compact)     #IMPLIED
+  >
+
+<!-- Ordered list numbering style
+
+    1   arabic numbers      1, 2, 3, ...
+    a   lower alpha         a, b, c, ...
+    A   upper alpha         A, B, C, ...
+    i   lower roman         i, ii, iii, ...
+    I   upper roman         I, II, III, ...
+
+    The style is applied to the sequence number which by default
+    is reset to 1 for the first list item in an ordered list.
+-->
+<!ENTITY % OLStyle "CDATA">
+
+<!-- Ordered (numbered) list -->
+
+<!ELEMENT ol (li)+>
+<!ATTLIST ol
+  %attrs;
+  type        %OLStyle;      #IMPLIED
+  compact     (compact)      #IMPLIED
+  start       %Number;       #IMPLIED
+  >
+
+<!-- single column list (DEPRECATED) --> 
+<!ELEMENT menu (li)+>
+<!ATTLIST menu
+  %attrs;
+  compact     (compact)     #IMPLIED
+  >
+
+<!-- multiple column list (DEPRECATED) --> 
+<!ELEMENT dir (li)+>
+<!ATTLIST dir
+  %attrs;
+  compact     (compact)     #IMPLIED
+  >
+
+<!-- LIStyle is constrained to: "(%ULStyle;|%OLStyle;)" -->
+<!ENTITY % LIStyle "CDATA">
+
+<!-- list item -->
+
+<!ELEMENT li %Flow;>
+<!ATTLIST li
+  %attrs;
+  type        %LIStyle;      #IMPLIED
+  value       %Number;       #IMPLIED
+  >
+
+<!-- definition lists - dt for term, dd for its definition -->
+
+<!ELEMENT dl (dt|dd)+>
+<!ATTLIST dl
+  %attrs;
+  compact     (compact)      #IMPLIED
+  >
+
+<!ELEMENT dt %Inline;>
+<!ATTLIST dt
+  %attrs;
+  >
+
+<!ELEMENT dd %Flow;>
+<!ATTLIST dd
+  %attrs;
+  >
+
+<!--=================== Address ==========================================-->
+
+<!-- information on author -->
+
+<!ELEMENT address %Inline;>
+<!ATTLIST address
+  %attrs;
+  >
+
+<!--=================== Horizontal Rule ==================================-->
+
+<!ELEMENT hr EMPTY>
+<!ATTLIST hr
+  %attrs;
+  align       (left|center|right) #IMPLIED
+  noshade     (noshade)      #IMPLIED
+  size        %Pixels;       #IMPLIED
+  width       %Length;       #IMPLIED
+  >
+
+<!--=================== Preformatted Text ================================-->
+
+<!-- content is %Inline; excluding 
+        "img|object|applet|big|small|sub|sup|font|basefont" -->
+
+<!ELEMENT pre %pre.content;>
+<!ATTLIST pre
+  %attrs;
+  width       %Number;      #IMPLIED
+  xml:space   (preserve)    #FIXED 'preserve'
+  >
+
+<!--=================== Block-like Quotes ================================-->
+
+<!ELEMENT blockquote %Flow;>
+<!ATTLIST blockquote
+  %attrs;
+  cite        %URI;          #IMPLIED
+  >
+
+<!--=================== Text alignment ===================================-->
+
+<!-- center content -->
+<!ELEMENT center %Flow;>
+<!ATTLIST center
+  %attrs;
+  >
+
+<!--=================== Inserted/Deleted Text ============================-->
+
+<!--
+  ins/del are allowed in block and inline content, but its
+  inappropriate to include block content within an ins element
+  occurring in inline content.
+-->
+<!ELEMENT ins %Flow;>
+<!ATTLIST ins
+  %attrs;
+  cite        %URI;          #IMPLIED
+  datetime    %Datetime;     #IMPLIED
+  >
+
+<!ELEMENT del %Flow;>
+<!ATTLIST del
+  %attrs;
+  cite        %URI;          #IMPLIED
+  datetime    %Datetime;     #IMPLIED
+  >
+
+<!--================== The Anchor Element ================================-->
+
+<!-- content is %Inline; except that anchors shouldn't be nested -->
+
+<!ELEMENT a %a.content;>
+<!ATTLIST a
+  %attrs;
+  charset     %Charset;      #IMPLIED
+  type        %ContentType;  #IMPLIED
+  name        NMTOKEN        #IMPLIED
+  href        %URI;          #IMPLIED
+  hreflang    %LanguageCode; #IMPLIED
+  rel         %LinkTypes;    #IMPLIED
+  rev         %LinkTypes;    #IMPLIED
+  accesskey   %Character;    #IMPLIED
+  shape       %Shape;        "rect"
+  coords      %Coords;       #IMPLIED
+  tabindex    %Number;       #IMPLIED
+  onfocus     %Script;       #IMPLIED
+  onblur      %Script;       #IMPLIED
+  target      %FrameTarget;  #IMPLIED
+  >
+
+<!--===================== Inline Elements ================================-->
+
+<!ELEMENT span %Inline;> <!-- generic language/style container -->
+<!ATTLIST span
+  %attrs;
+  >
+
+<!ELEMENT bdo %Inline;>  <!-- I18N BiDi over-ride -->
+<!ATTLIST bdo
+  %coreattrs;
+  %events;
+  lang        %LanguageCode; #IMPLIED
+  xml:lang    %LanguageCode; #IMPLIED
+  dir         (ltr|rtl)      #REQUIRED
+  >
+
+<!ELEMENT br EMPTY>   <!-- forced line break -->
+<!ATTLIST br
+  %coreattrs;
+  clear       (left|all|right|none) "none"
+  >
+
+<!ELEMENT em %Inline;>   <!-- emphasis -->
+<!ATTLIST em %attrs;>
+
+<!ELEMENT strong %Inline;>   <!-- strong emphasis -->
+<!ATTLIST strong %attrs;>
+
+<!ELEMENT dfn %Inline;>   <!-- definitional -->
+<!ATTLIST dfn %attrs;>
+
+<!ELEMENT code %Inline;>   <!-- program code -->
+<!ATTLIST code %attrs;>
+
+<!ELEMENT samp %Inline;>   <!-- sample -->
+<!ATTLIST samp %attrs;>
+
+<!ELEMENT kbd %Inline;>  <!-- something user would type -->
+<!ATTLIST kbd %attrs;>
+
+<!ELEMENT var %Inline;>   <!-- variable -->
+<!ATTLIST var %attrs;>
+
+<!ELEMENT cite %Inline;>   <!-- citation -->
+<!ATTLIST cite %attrs;>
+
+<!ELEMENT abbr %Inline;>   <!-- abbreviation -->
+<!ATTLIST abbr %attrs;>
+
+<!ELEMENT acronym %Inline;>   <!-- acronym -->
+<!ATTLIST acronym %attrs;>
+
+<!ELEMENT q %Inline;>   <!-- inlined quote -->
+<!ATTLIST q
+  %attrs;
+  cite        %URI;          #IMPLIED
+  >
+
+<!ELEMENT sub %Inline;> <!-- subscript -->
+<!ATTLIST sub %attrs;>
+
+<!ELEMENT sup %Inline;> <!-- superscript -->
+<!ATTLIST sup %attrs;>
+
+<!ELEMENT tt %Inline;>   <!-- fixed pitch font -->
+<!ATTLIST tt %attrs;>
+
+<!ELEMENT i %Inline;>   <!-- italic font -->
+<!ATTLIST i %attrs;>
+
+<!ELEMENT b %Inline;>   <!-- bold font -->
+<!ATTLIST b %attrs;>
+
+<!ELEMENT big %Inline;>   <!-- bigger font -->
+<!ATTLIST big %attrs;>
+
+<!ELEMENT small %Inline;>   <!-- smaller font -->
+<!ATTLIST small %attrs;>
+
+<!ELEMENT u %Inline;>   <!-- underline -->
+<!ATTLIST u %attrs;>
+
+<!ELEMENT s %Inline;>   <!-- strike-through -->
+<!ATTLIST s %attrs;>
+
+<!ELEMENT strike %Inline;>   <!-- strike-through -->
+<!ATTLIST strike %attrs;>
+
+<!ELEMENT basefont EMPTY>  <!-- base font size -->
+<!ATTLIST basefont
+  id          ID             #IMPLIED
+  size        CDATA          #REQUIRED
+  color       %Color;        #IMPLIED
+  face        CDATA          #IMPLIED
+  >
+
+<!ELEMENT font %Inline;> <!-- local change to font -->
+<!ATTLIST font
+  %coreattrs;
+  %i18n;
+  size        CDATA          #IMPLIED
+  color       %Color;        #IMPLIED
+  face        CDATA          #IMPLIED
+  >
+
+<!--==================== Object ======================================-->
+<!--
+  object is used to embed objects as part of HTML pages.
+  param elements should precede other content. Parameters
+  can also be expressed as attribute/value pairs on the
+  object element itself when brevity is desired.
+-->
+
+<!ELEMENT object (#PCDATA | param | %block; | form | %inline; | %misc;)*>
+<!ATTLIST object
+  %attrs;
+  declare     (declare)      #IMPLIED
+  classid     %URI;          #IMPLIED
+  codebase    %URI;          #IMPLIED
+  data        %URI;          #IMPLIED
+  type        %ContentType;  #IMPLIED
+  codetype    %ContentType;  #IMPLIED
+  archive     %UriList;      #IMPLIED
+  standby     %Text;         #IMPLIED
+  height      %Length;       #IMPLIED
+  width       %Length;       #IMPLIED
+  usemap      %URI;          #IMPLIED
+  name        NMTOKEN        #IMPLIED
+  tabindex    %Number;       #IMPLIED
+  align       %ImgAlign;     #IMPLIED
+  border      %Pixels;       #IMPLIED
+  hspace      %Pixels;       #IMPLIED
+  vspace      %Pixels;       #IMPLIED
+  >
+
+<!--
+  param is used to supply a named property value.
+  In XML it would seem natural to follow RDF and support an
+  abbreviated syntax where the param elements are replaced
+  by attribute value pairs on the object start tag.
+-->
+<!ELEMENT param EMPTY>
+<!ATTLIST param
+  id          ID             #IMPLIED
+  name        CDATA          #REQUIRED
+  value       CDATA          #IMPLIED
+  valuetype   (data|ref|object) "data"
+  type        %ContentType;  #IMPLIED
+  >
+
+<!--=================== Java applet ==================================-->
+<!--
+  One of code or object attributes must be present.
+  Place param elements before other content.
+-->
+<!ELEMENT applet (#PCDATA | param | %block; | form | %inline; | %misc;)*>
+<!ATTLIST applet
+  %coreattrs;
+  codebase    %URI;          #IMPLIED
+  archive     CDATA          #IMPLIED
+  code        CDATA          #IMPLIED
+  object      CDATA          #IMPLIED
+  alt         %Text;         #IMPLIED
+  name        NMTOKEN        #IMPLIED
+  width       %Length;       #REQUIRED
+  height      %Length;       #REQUIRED
+  align       %ImgAlign;     #IMPLIED
+  hspace      %Pixels;       #IMPLIED
+  vspace      %Pixels;       #IMPLIED
+  >
+
+<!--=================== Images ===========================================-->
+
+<!--
+   To avoid accessibility problems for people who aren't
+   able to see the image, you should provide a text
+   description using the alt and longdesc attributes.
+   In addition, avoid the use of server-side image maps.
+-->
+
+<!ELEMENT img EMPTY>
+<!ATTLIST img
+  %attrs;
+  src         %URI;          #REQUIRED
+  alt         %Text;         #REQUIRED
+  name        NMTOKEN        #IMPLIED
+  longdesc    %URI;          #IMPLIED
+  height      %Length;       #IMPLIED
+  width       %Length;       #IMPLIED
+  usemap      %URI;          #IMPLIED
+  ismap       (ismap)        #IMPLIED
+  align       %ImgAlign;     #IMPLIED
+  border      %Length;       #IMPLIED
+  hspace      %Pixels;       #IMPLIED
+  vspace      %Pixels;       #IMPLIED
+  >
+
+<!-- usemap points to a map element which may be in this document
+  or an external document, although the latter is not widely supported -->
+
+<!--================== Client-side image maps ============================-->
+
+<!-- These can be placed in the same document or grouped in a
+     separate document although this isn't yet widely supported -->
+
+<!ELEMENT map ((%block; | form | %misc;)+ | area+)>
+<!ATTLIST map
+  %i18n;
+  %events;
+  id          ID             #REQUIRED
+  class       CDATA          #IMPLIED
+  style       %StyleSheet;   #IMPLIED
+  title       %Text;         #IMPLIED
+  name        CDATA          #IMPLIED
+  >
+
+<!ELEMENT area EMPTY>
+<!ATTLIST area
+  %attrs;
+  shape       %Shape;        "rect"
+  coords      %Coords;       #IMPLIED
+  href        %URI;          #IMPLIED
+  nohref      (nohref)       #IMPLIED
+  alt         %Text;         #REQUIRED
+  tabindex    %Number;       #IMPLIED
+  accesskey   %Character;    #IMPLIED
+  onfocus     %Script;       #IMPLIED
+  onblur      %Script;       #IMPLIED
+  target      %FrameTarget;  #IMPLIED
+  >
+
+<!--================ Forms ===============================================-->
+
+<!ELEMENT form %form.content;>   <!-- forms shouldn't be nested -->
+
+<!ATTLIST form
+  %attrs;
+  action      %URI;          #REQUIRED
+  method      (get|post)     "get"
+  name        NMTOKEN        #IMPLIED
+  enctype     %ContentType;  "application/x-www-form-urlencoded"
+  onsubmit    %Script;       #IMPLIED
+  onreset     %Script;       #IMPLIED
+  accept      %ContentTypes; #IMPLIED
+  accept-charset %Charsets;  #IMPLIED
+  target      %FrameTarget;  #IMPLIED
+  >
+
+<!--
+  Each label must not contain more than ONE field
+  Label elements shouldn't be nested.
+-->
+<!ELEMENT label %Inline;>
+<!ATTLIST label
+  %attrs;
+  for         IDREF          #IMPLIED
+  accesskey   %Character;    #IMPLIED
+  onfocus     %Script;       #IMPLIED
+  onblur      %Script;       #IMPLIED
+  >
+
+<!ENTITY % InputType
+  "(text | password | checkbox |
+    radio | submit | reset |
+    file | hidden | image | button)"
+   >
+
+<!-- the name attribute is required for all but submit & reset -->
+
+<!ELEMENT input EMPTY>     <!-- form control -->
+<!ATTLIST input
+  %attrs;
+  type        %InputType;    "text"
+  name        CDATA          #IMPLIED
+  value       CDATA          #IMPLIED
+  checked     (checked)      #IMPLIED
+  disabled    (disabled)     #IMPLIED
+  readonly    (readonly)     #IMPLIED
+  size        CDATA          #IMPLIED
+  maxlength   %Number;       #IMPLIED
+  src         %URI;          #IMPLIED
+  alt         CDATA          #IMPLIED
+  usemap      %URI;          #IMPLIED
+  tabindex    %Number;       #IMPLIED
+  accesskey   %Character;    #IMPLIED
+  onfocus     %Script;       #IMPLIED
+  onblur      %Script;       #IMPLIED
+  onselect    %Script;       #IMPLIED
+  onchange    %Script;       #IMPLIED
+  accept      %ContentTypes; #IMPLIED
+  align       %ImgAlign;     #IMPLIED
+  >
+
+<!ELEMENT select (optgroup|option)+>  <!-- option selector -->
+<!ATTLIST select
+  %attrs;
+  name        CDATA          #IMPLIED
+  size        %Number;       #IMPLIED
+  multiple    (multiple)     #IMPLIED
+  disabled    (disabled)     #IMPLIED
+  tabindex    %Number;       #IMPLIED
+  onfocus     %Script;       #IMPLIED
+  onblur      %Script;       #IMPLIED
+  onchange    %Script;       #IMPLIED
+  >
+
+<!ELEMENT optgroup (option)+>   <!-- option group -->
+<!ATTLIST optgroup
+  %attrs;
+  disabled    (disabled)     #IMPLIED
+  label       %Text;         #REQUIRED
+  >
+
+<!ELEMENT option (#PCDATA)>     <!-- selectable choice -->
+<!ATTLIST option
+  %attrs;
+  selected    (selected)     #IMPLIED
+  disabled    (disabled)     #IMPLIED
+  label       %Text;         #IMPLIED
+  value       CDATA          #IMPLIED
+  >
+
+<!ELEMENT textarea (#PCDATA)>     <!-- multi-line text field -->
+<!ATTLIST textarea
+  %attrs;
+  name        CDATA          #IMPLIED
+  rows        %Number;       #REQUIRED
+  cols        %Number;       #REQUIRED
+  disabled    (disabled)     #IMPLIED
+  readonly    (readonly)     #IMPLIED
+  tabindex    %Number;       #IMPLIED
+  accesskey   %Character;    #IMPLIED
+  onfocus     %Script;       #IMPLIED
+  onblur      %Script;       #IMPLIED
+  onselect    %Script;       #IMPLIED
+  onchange    %Script;       #IMPLIED
+  >
+
+<!--
+  The fieldset element is used to group form fields.
+  Only one legend element should occur in the content
+  and if present should only be preceded by whitespace.
+-->
+<!ELEMENT fieldset (#PCDATA | legend | %block; | form | %inline; | %misc;)*>
+<!ATTLIST fieldset
+  %attrs;
+  >
+
+<!ENTITY % LAlign "(top|bottom|left|right)">
+
+<!ELEMENT legend %Inline;>     <!-- fieldset label -->
+<!ATTLIST legend
+  %attrs;
+  accesskey   %Character;    #IMPLIED
+  align       %LAlign;       #IMPLIED
+  >
+
+<!--
+ Content is %Flow; excluding a, form, form controls, iframe
+--> 
+<!ELEMENT button %button.content;>  <!-- push button -->
+<!ATTLIST button
+  %attrs;
+  name        CDATA          #IMPLIED
+  value       CDATA          #IMPLIED
+  type        (button|submit|reset) "submit"
+  disabled    (disabled)     #IMPLIED
+  tabindex    %Number;       #IMPLIED
+  accesskey   %Character;    #IMPLIED
+  onfocus     %Script;       #IMPLIED
+  onblur      %Script;       #IMPLIED
+  >
+
+<!-- single-line text input control (DEPRECATED) -->
+<!ELEMENT isindex EMPTY>
+<!ATTLIST isindex
+  %coreattrs;
+  %i18n;
+  prompt      %Text;         #IMPLIED
+  >
+
+<!--======================= Tables =======================================-->
+
+<!-- Derived from IETF HTML table standard, see [RFC1942] -->
+
+<!--
+ The border attribute sets the thickness of the frame around the
+ table. The default units are screen pixels.
+
+ The frame attribute specifies which parts of the frame around
+ the table should be rendered. The values are not the same as
+ CALS to avoid a name clash with the valign attribute.
+-->
+<!ENTITY % TFrame "(void|above|below|hsides|lhs|rhs|vsides|box|border)">
+
+<!--
+ The rules attribute defines which rules to draw between cells:
+
+ If rules is absent then assume:
+     "none" if border is absent or border="0" otherwise "all"
+-->
+
+<!ENTITY % TRules "(none | groups | rows | cols | all)">
+  
+<!-- horizontal placement of table relative to document -->
+<!ENTITY % TAlign "(left|center|right)">
+
+<!-- horizontal alignment attributes for cell contents
+
+  char        alignment char, e.g. char=':'
+  charoff     offset for alignment char
+-->
+<!ENTITY % cellhalign
+  "align      (left|center|right|justify|char) #IMPLIED
+   char       %Character;    #IMPLIED
+   charoff    %Length;       #IMPLIED"
+  >
+
+<!-- vertical alignment attributes for cell contents -->
+<!ENTITY % cellvalign
+  "valign     (top|middle|bottom|baseline) #IMPLIED"
+  >
+
+<!ELEMENT table
+     (caption?, (col*|colgroup*), thead?, tfoot?, (tbody+|tr+))>
+<!ELEMENT caption  %Inline;>
+<!ELEMENT thead    (tr)+>
+<!ELEMENT tfoot    (tr)+>
+<!ELEMENT tbody    (tr)+>
+<!ELEMENT colgroup (col)*>
+<!ELEMENT col      EMPTY>
+<!ELEMENT tr       (th|td)+>
+<!ELEMENT th       %Flow;>
+<!ELEMENT td       %Flow;>
+
+<!ATTLIST table
+  %attrs;
+  summary     %Text;         #IMPLIED
+  width       %Length;       #IMPLIED
+  border      %Pixels;       #IMPLIED
+  frame       %TFrame;       #IMPLIED
+  rules       %TRules;       #IMPLIED
+  cellspacing %Length;       #IMPLIED
+  cellpadding %Length;       #IMPLIED
+  align       %TAlign;       #IMPLIED
+  bgcolor     %Color;        #IMPLIED
+  >
+
+<!ENTITY % CAlign "(top|bottom|left|right)">
+
+<!ATTLIST caption
+  %attrs;
+  align       %CAlign;       #IMPLIED
+  >
+
+<!--
+colgroup groups a set of col elements. It allows you to group
+several semantically related columns together.
+-->
+<!ATTLIST colgroup
+  %attrs;
+  span        %Number;       "1"
+  width       %MultiLength;  #IMPLIED
+  %cellhalign;
+  %cellvalign;
+  >
+
+<!--
+ col elements define the alignment properties for cells in
+ one or more columns.
+
+ The width attribute specifies the width of the columns, e.g.
+
+     width=64        width in screen pixels
+     width=0.5*      relative width of 0.5
+
+ The span attribute causes the attributes of one
+ col element to apply to more than one column.
+-->
+<!ATTLIST col
+  %attrs;
+  span        %Number;       "1"
+  width       %MultiLength;  #IMPLIED
+  %cellhalign;
+  %cellvalign;
+  >
+
+<!--
+    Use thead to duplicate headers when breaking table
+    across page boundaries, or for static headers when
+    tbody sections are rendered in scrolling panel.
+
+    Use tfoot to duplicate footers when breaking table
+    across page boundaries, or for static footers when
+    tbody sections are rendered in scrolling panel.
+
+    Use multiple tbody sections when rules are needed
+    between groups of table rows.
+-->
+<!ATTLIST thead
+  %attrs;
+  %cellhalign;
+  %cellvalign;
+  >
+
+<!ATTLIST tfoot
+  %attrs;
+  %cellhalign;
+  %cellvalign;
+  >
+
+<!ATTLIST tbody
+  %attrs;
+  %cellhalign;
+  %cellvalign;
+  >
+
+<!ATTLIST tr
+  %attrs;
+  %cellhalign;
+  %cellvalign;
+  bgcolor     %Color;        #IMPLIED
+  >
+
+<!-- Scope is simpler than headers attribute for common tables -->
+<!ENTITY % Scope "(row|col|rowgroup|colgroup)">
+
+<!-- th is for headers, td for data and for cells acting as both -->
+
+<!ATTLIST th
+  %attrs;
+  abbr        %Text;         #IMPLIED
+  axis        CDATA          #IMPLIED
+  headers     IDREFS         #IMPLIED
+  scope       %Scope;        #IMPLIED
+  rowspan     %Number;       "1"
+  colspan     %Number;       "1"
+  %cellhalign;
+  %cellvalign;
+  nowrap      (nowrap)       #IMPLIED
+  bgcolor     %Color;        #IMPLIED
+  width       %Pixels;       #IMPLIED
+  height      %Pixels;       #IMPLIED
+  >
+
+<!ATTLIST td
+  %attrs;
+  abbr        %Text;         #IMPLIED
+  axis        CDATA          #IMPLIED
+  headers     IDREFS         #IMPLIED
+  scope       %Scope;        #IMPLIED
+  rowspan     %Number;       "1"
+  colspan     %Number;       "1"
+  %cellhalign;
+  %cellvalign;
+  nowrap      (nowrap)       #IMPLIED
+  bgcolor     %Color;        #IMPLIED
+  width       %Pixels;       #IMPLIED
+  height      %Pixels;       #IMPLIED
+  >
+
diff --git a/TC/testcase/res/UTsXml/test/valid/dtds/xhtml1.dcl b/TC/testcase/res/UTsXml/test/valid/dtds/xhtml1.dcl
new file mode 100755 (executable)
index 0000000..fed2103
--- /dev/null
@@ -0,0 +1,179 @@
+<!SGML -- SGML Declaration for valid XML documents --
+     "ISO 8879:1986 (WWW)"
+
+     CHARSET
+         BASESET
+             "ISO Registration Number 176//CHARSET
+             ISO/IEC 10646-1:1993 UCS-4 with implementation 
+             level 3//ESC 2/5 2/15 4/6"
+         DESCSET
+                0       9       UNUSED
+                9       2       9
+                11      2       UNUSED
+                13      1       13
+                14      18      UNUSED
+                32      95      32
+                127     1       UNUSED
+                128     32      UNUSED
+             -- use this instead of the official declaration because SP only
+                supports 16-bit characters --
+                160     65374   160
+                65534   2       UNUSED 
+             -- 55296   2048    UNUSED
+                57344   8190    57344
+                65534   2       UNUSED
+                65536   1048576 65536 --
+     CAPACITY NONE
+
+     SCOPE DOCUMENT
+
+     SYNTAX
+         SHUNCHAR NONE
+         BASESET "ISO Registration Number 176//CHARSET
+                 ISO/IEC 10646-1:1993 UCS-4 with implementation 
+                 level 3//ESC 2/5 2/15 4/6"
+         DESCSET
+             0 1114112 0
+         FUNCTION
+             RE    13
+             RS    10
+             SPACE 32
+             TAB   SEPCHAR 9
+
+         NAMING
+             LCNMSTRT ""
+             UCNMSTRT ""
+             NAMESTRT
+                 58 95 192-214 216-246 248-305 308-318 321-328
+                 330-382 384-451 461-496 500-501 506-535 592-680
+                 699-705 902 904-906 908 910-929 931-974 976-982
+                 986 988 990 992 994-1011 1025-1036 1038-1103
+                 1105-1116 1118-1153 1168-1220 1223-1224
+                 1227-1228 1232-1259 1262-1269 1272-1273
+                 1329-1366 1369 1377-1414 1488-1514 1520-1522
+                 1569-1594 1601-1610 1649-1719 1722-1726
+                 1728-1742 1744-1747 1749 1765-1766 2309-2361
+                 2365 2392-2401 2437-2444 2447-2448 2451-2472
+                 2474-2480 2482 2486-2489 2524-2525 2527-2529
+                 2544-2545 2565-2570 2575-2576 2579-2600
+                 2602-2608 2610-2611 2613-2614 2616-2617
+                 2649-2652 2654 2674-2676 2693-2699 2701
+                 2703-2705 2707-2728 2730-2736 2738-2739
+                 2741-2745 2749 2784 2821-2828 2831-2832
+                 2835-2856 2858-2864 2866-2867 2870-2873 2877
+                 2908-2909 2911-2913 2949-2954 2958-2960
+                 2962-2965 2969-2970 2972 2974-2975 2979-2980
+                 2984-2986 2990-2997 2999-3001 3077-3084
+                 3086-3088 3090-3112 3114-3123 3125-3129
+                 3168-3169 3205-3212 3214-3216 3218-3240
+                 3242-3251 3253-3257 3294 3296-3297 3333-3340
+                 3342-3344 3346-3368 3370-3385 3424-3425
+                 3585-3630 3632 3634-3635 3648-3653 3713-3714
+                 3716 3719-3720 3722 3725 3732-3735 3737-3743
+                 3745-3747 3749 3751 3754-3755 3757-3758 3760
+                 3762-3763 3773 3776-3780 3904-3911 3913-3945
+                 4256-4293 4304-4342 4352 4354-4355 4357-4359
+                 4361 4363-4364 4366-4370 4412 4414 4416 4428
+                 4430 4432 4436-4437 4441 4447-4449 4451 4453
+                 4455 4457 4461-4462 4466-4467 4469 4510 4520
+                 4523 4526-4527 4535-4536 4538 4540-4546 4587
+                 4592 4601 7680-7835 7840-7929 7936-7957
+                 7960-7965 7968-8005 8008-8013 8016-8023 8025
+                 8027 8029 8031-8061 8064-8116 8118-8124 8126
+                 8130-8132 8134-8140 8144-8147 8150-8155
+                 8160-8172 8178-8180 8182-8188 8486 8490-8491
+                 8494 8576-8578 12295 12321-12329 12353-12436
+                 12449-12538 12549-12588 19968-40869 44032-55203
+
+             LCNMCHAR ""
+             UCNMCHAR ""
+             NAMECHAR
+                 45-46 183 720-721 768-837 864-865 903 1155-1158
+                 1425-1441 1443-1465 1467-1469 1471 1473-1474
+                 1476 1600 1611-1618 1632-1641 1648 1750-1764
+                 1767-1768 1770-1773 1776-1785 2305-2307 2364
+                 2366-2381 2385-2388 2402-2403 2406-2415
+                 2433-2435 2492 2494-2500 2503-2504 2507-2509
+                 2519 2530-2531 2534-2543 2562 2620 2622-2626
+                 2631-2632 2635-2637 2662-2673 2689-2691 2748
+                 2750-2757 2759-2761 2763-2765 2790-2799
+                 2817-2819 2876 2878-2883 2887-2888 2891-2893
+                 2902-2903 2918-2927 2946-2947 3006-3010
+                 3014-3016 3018-3021 3031 3047-3055 3073-3075
+                 3134-3140 3142-3144 3146-3149 3157-3158
+                 3174-3183 3202-3203 3262-3268 3270-3272
+                 3274-3277 3285-3286 3302-3311 3330-3331
+                 3390-3395 3398-3400 3402-3405 3415 3430-3439
+                 3633 3636-3642 3654-3662 3664-3673 3761
+                 3764-3769 3771-3772 3782 3784-3789 3792-3801
+                 3864-3865 3872-3881 3893 3895 3897 3902-3903
+                 3953-3972 3974-3979 3984-3989 3991 3993-4013
+                 4017-4023 4025 8400-8412 8417 12293 12330-12335
+                 12337-12341 12441-12442 12445-12446 12540-12542
+
+             NAMECASE
+                 GENERAL NO
+                 ENTITY  NO
+
+         DELIM
+             GENERAL SGMLREF
+             HCRO "&#38;#x" -- 38 is the number for ampersand --
+             NESTC "/"
+             NET ">"
+             PIC "?>"
+             SHORTREF NONE
+
+         NAMES
+             SGMLREF
+
+         QUANTITY NONE
+
+         ENTITIES
+             "amp" 38
+             "lt" 60
+             "gt" 62
+             "quot" 34
+             "apos" 39
+
+     FEATURES
+         MINIMIZE
+             DATATAG NO
+             OMITTAG NO
+             RANK NO
+             SHORTTAG
+                 STARTTAG
+                     EMPTY NO
+                     UNCLOSED NO 
+                     NETENABL IMMEDNET
+                 ENDTAG
+                     EMPTY NO 
+                     UNCLOSED NO
+                 ATTRIB
+                     DEFAULT YES
+                     OMITNAME NO
+                     VALUE NO
+             EMPTYNRM YES
+             IMPLYDEF
+                 ATTLIST NO
+                 DOCTYPE NO
+                 ELEMENT NO
+                 ENTITY NO
+                 NOTATION NO
+         LINK
+             SIMPLE NO
+             IMPLICIT NO
+             EXPLICIT NO
+         OTHER
+             CONCUR NO
+             SUBDOC NO
+             FORMAL NO
+             URN NO
+             KEEPRSRE YES
+             VALIDITY TYPE
+             ENTITIES
+                 REF ANY
+                 INTEGRAL YES
+     APPINFO NONE
+     SEEALSO "ISO 8879:1986//NOTATION
+             Extensible Markup Language (XML) 1.0//EN"
+>
diff --git a/TC/testcase/res/UTsXml/test/valid/dtds/xmlspec.dtd b/TC/testcase/res/UTsXml/test/valid/dtds/xmlspec.dtd
new file mode 100755 (executable)
index 0000000..55cfba6
--- /dev/null
@@ -0,0 +1,1102 @@
+<!-- ............................................................... -->
+<!-- XML specification DTD ......................................... -->
+<!-- ............................................................... -->
+
+<!--
+TYPICAL INVOCATION:
+#  <!DOCTYPE spec PUBLIC
+#       "-//W3C//DTD Specification::19980521//EN"
+#       "http://www.w3.org/XML/1998/06/xmlspec-19980521.dtd">
+
+PURPOSE:
+  This DTD was developed for use with the XML family of W3C
+  specifications.  It is an XML-compliant DTD based in part on
+  the TEI Lite and Sweb DTDs.
+
+DEPENDENCIES:
+  None.
+
+CHANGE HISTORY:
+  The list of changes is at the end of the DTD.
+
+  For all details, see the design report at:
+
+#   <http://www.w3.org/XML/1998/06/xmlspec-report-19980521.htm>
+
+  The "typical invocation" FPI always gets updated to reflect the
+  date of the most recent changes.
+
+  Search this file for "#" in the first column to see change history
+  comments.
+
+MAINTAINER:
+  Eve Maler
+  ArborText Inc.
+  elm@arbortext.com
+  voice: +1 781 270 5750
+  fax:   +1 781 273 3760
+-->
+
+<!-- ............................................................... -->
+<!-- Entities for characters and symbols ........................... -->
+
+<!--
+#1998-03-10: maler: Added &ldquo; and &rdquo;.
+#                   Used 8879:1986-compatible decimal character
+#                   references.
+#                   Merged charent.mod file back into main file.
+#1998-05-14: maler: Fixed ldquo and rdquo.  Gave mdash a real number.
+-->
+
+<!ENTITY lt     "&#38;#60;">
+<!ENTITY gt     "&#62;">
+<!ENTITY amp    "&#38;#38;">
+<!ENTITY apos   "&#39;">
+<!ENTITY quot   "&#34;">
+<!ENTITY nbsp   "&#160;">
+<!--
+<!ENTITY mdash  "&#x2014;">
+<!ENTITY ldquo  "&#x201C;">
+<!ENTITY rdquo  "&#x201D;">
+-->
+
+<!-- ............................................................... -->
+<!-- Entities for classes of standalone elements ................... -->
+
+<!--
+#1997-10-16: maler: Added table to %illus.class;.
+#1997-11-28: maler: Added htable to %illus.class;.
+#1997-12-29: maler: IGNOREd table.
+#1998-03-10: maler: Removed SGML Open-specific %illus.class;.
+#                   Added "local" entities for customization.
+#1998-05-14: maler: Added issue to %note.class;.
+#                   Removed %[local.]statusp.class;.
+#1998-05-21: maler: Added constraintnote to %note.class;.
+-->
+
+<!ENTITY % local.p.class        "">
+<!ENTITY % p.class              "p
+                                %local.p.class;">
+
+<!ENTITY % local.list.class     "">
+<!ENTITY % list.class           "ulist|olist|slist|glist
+                                %local.list.class;">
+
+<!ENTITY % local.speclist.class "">
+<!ENTITY % speclist.class       "orglist|blist
+                                %local.speclist.class;">
+
+<!ENTITY % local.note.class     "">
+<!ENTITY % note.class           "note|issue|wfcnote|vcnote
+                                |constraintnote %local.note.class;">
+
+<!ENTITY % local.illus.class    "">
+<!ENTITY % illus.class          "eg|graphic|scrap|htable
+                                %local.illus.class;">
+
+<!-- ............................................................... -->
+<!-- Entities for classes of phrase-level elements ................. -->
+
+<!--
+#1997-12-29: maler: Added xspecref to %ref.class;.
+#1998-03-10: maler: Added %ednote.class;.
+#                   Added "local" entities for customization.
+-->
+
+<!ENTITY % local.annot.class    "">
+<!ENTITY % annot.class          "footnote
+                                %local.annot.class;">
+
+<!ENTITY % local.termdef.class    "">
+<!ENTITY % termdef.class        "termdef|term
+                                %local.termdef.class;">
+
+<!ENTITY % local.emph.class    "">
+<!ENTITY % emph.class           "emph|quote
+                                %local.emph.class;">
+
+<!ENTITY % local.ref.class    "">
+<!ENTITY % ref.class            "bibref|specref|termref|titleref
+                                |xspecref|xtermref
+                                %local.ref.class;">
+
+<!ENTITY % local.loc.class    "">
+<!ENTITY % loc.class            "loc
+                                %local.loc.class;">
+
+<!ENTITY % local.tech.class    "">
+<!ENTITY % tech.class           "kw|nt|xnt|code
+                                %local.tech.class;">
+
+<!ENTITY % local.ednote.class    "">
+<!ENTITY % ednote.class         "ednote
+                                %local.ednote.class;">
+
+<!-- ............................................................... -->
+<!-- Entities for mixtures of standalone elements .................. -->
+
+<!--
+#1997-09-30: maler: Created %p.mix; to eliminate p from self.
+#1997-09-30: maler: Added %speclist.class; to %obj.mix; and %p.mix;.
+#1997-09-30: maler: Added %note.class; to %obj.mix; and %p.mix;.
+#1997-10-16: maler: Created %entry.mix;.  Note that some elements
+#                   left out here are still allowed in termdef,
+#                   which entry can contain through %p.pcd.mix;.
+#1997-11-28: maler: Added %p.class; to %statusobj.mix;.
+#1998-03-10: maler: Added %ednote.class; to all mixtures, except
+#                   %p.mix; and %statusobj.mix;, because paragraphs
+#                   and status paragraphs will contain ednote
+#                   through %p.pcd.mix;.
+#1998-03-23: maler: Added %termdef.mix; (broken out from
+#                    %termdef.pcd.mix;).
+#1998-05-14: maler: Removed %statusobj.mix; and all mentions of
+#                   %statusp.mix;.
+-->
+
+<!ENTITY % div.mix
+        "%p.class;|%list.class;|%speclist.class;|%note.class;
+        |%illus.class;|%ednote.class;">
+<!ENTITY % obj.mix
+        "%p.class;|%list.class;|%speclist.class;|%note.class;
+        |%illus.class;|%ednote.class;">
+<!ENTITY % p.mix
+        "%list.class;|%speclist.class;|%note.class;|%illus.class;">
+<!ENTITY % entry.mix
+        "%list.class;|note|eg|graphic|%ednote.class;">
+<!ENTITY % hdr.mix
+        "%p.class;|%list.class;|%ednote.class;">
+<!ENTITY % termdef.mix
+        "%note.class;|%illus.class;">
+
+<!-- ............................................................... -->
+<!-- Entities for mixtures of #PCDATA and phrase-level elements .... -->
+
+<!--    Note that %termdef.pcd.mix contains %note.class;
+        and %illus.class;, considered standalone elements. -->
+
+<!--
+#1997-09-30: maler: Added scrap and %note.class; to %termdef.pcd.mix;.
+#1997-11-28: maler: Added %loc.class; to %p.pcd.mix;.
+#1998-03-10: maler: Added %ednote.class; to all mixtures.
+#1998-03-23: maler: Moved some %termdef.pcd.mix; stuff out to
+#                   %termdef.mix;.
+#1998-05-14: maler: Removed %statusp.pcd.mix;.
+#1998-05-21: maler: Added constraint element to %eg.pcd.mix;.
+-->
+
+<!ENTITY % p.pcd.mix
+        "#PCDATA|%annot.class;|%termdef.class;|%emph.class;
+        |%ref.class;|%tech.class;|%loc.class;|%ednote.class;">
+<!ENTITY % head.pcd.mix
+        "#PCDATA|%annot.class;|%emph.class;|%tech.class;|%ednote.class;">
+<!ENTITY % label.pcd.mix
+        "#PCDATA|%annot.class;|%termdef.class;|%emph.class;|%tech.class;
+        |%ednote.class;">
+<!ENTITY % eg.pcd.mix
+        "#PCDATA|%annot.class;|%emph.class;|%ednote.class;|constraint">
+<!ENTITY % termdef.pcd.mix
+        "#PCDATA|term|%emph.class;|%ref.class;|%tech.class;
+        |%ednote.class;">
+<!ENTITY % bibl.pcd.mix
+        "#PCDATA|%emph.class;|%ref.class;|%loc.class;|%ednote.class;">
+<!ENTITY % tech.pcd.mix
+        "#PCDATA|%ednote.class;">
+<!ENTITY % loc.pcd.mix
+        "#PCDATA|%loc.class;|%ednote.class;">
+
+<!-- ............................................................... -->
+<!-- Entities for customizable content models ...................... -->
+
+<!--
+#1998-03-10: maler: Added customization entities.
+#1998-05-14: maler: Allowed prevlocs and latestloc in either order.
+-->
+
+<!ENTITY % spec.mdl
+        "header, front?, body, back?">
+
+<!ENTITY % header.mdl
+        "title, subtitle?, version, w3c-designation, w3c-doctype,
+        pubdate, notice*, publoc, ((prevlocs, latestloc?) |
+        (latestloc, prevlocs?))?, authlist, status, abstract,
+        pubstmt?, sourcedesc?, langusage, revisiondesc">
+
+<!ENTITY % pubdate.mdl
+        "day?, month, year">
+
+<!-- ............................................................... -->
+<!-- Entities for common attributes ................................ -->
+
+<!--    key attribute:
+        Optionally provides a sorting or indexing key, for cases when
+        the element content is inappropriate for this purpose. -->
+<!ENTITY % key.att
+        'key                    CDATA           #IMPLIED'>
+
+<!--    def attribute:
+        Points to the element where the relevant definition can be
+        found, using the IDREF mechanism.  %def.att; is for optional
+        def attributes, and %def-req.att; is for required def
+        attributes. -->
+<!ENTITY % def.att
+        'def                    IDREF           #IMPLIED'>
+<!ENTITY % def-req.att
+        'def                    IDREF           #REQUIRED'>
+
+<!--    ref attribute:
+        Points to the element where more information can be found,
+        using the IDREF mechanism.  %ref.att; is for optional
+        ref attributes, and %ref-req.att; is for required ref
+        attributes. -->
+<!ENTITY % ref.att
+        'ref                    IDREF           #IMPLIED'>
+<!ENTITY % ref-req.att
+        'ref                    IDREF           #REQUIRED'>
+
+<!--
+#1998-03-23: maler: Added show and actuate attributes to href.
+#                   Added semi-common xml:space attribute.
+-->
+
+<!--    HREF and source attributes:
+        Points to the element where more information or source data
+        can be found, using the URL (XLL simple link) mechanism.
+        For some purposes, is associated with additional XLL
+        attributes. %href.att; is for optional HREF attributes,
+        and %href-req.att; is for required HREF attributes.
+        %source-req.att; is for the source attribute, which
+        is always required. -->
+<!ENTITY % href.att
+        'xml:link               CDATA           #FIXED "simple"
+        href                    CDATA           #IMPLIED
+        show                    CDATA           #FIXED "embed"
+        actuate                 CDATA           #FIXED "auto"'>
+
+<!ENTITY % href-req.att
+        'xml:link               CDATA           #FIXED "simple"
+        href                    CDATA           #REQUIRED
+        show                    CDATA           #FIXED "embed"
+        actuate                 CDATA           #FIXED "auto"'>
+
+<!ENTITY % source-req.att
+        'xml:link               CDATA           #FIXED "simple"
+        xml:attributes          NMTOKENS        #FIXED "href source"
+        source                  CDATA           #REQUIRED
+        show                    CDATA           #FIXED "embed"
+        actuate                 CDATA           #FIXED "auto"'>
+
+<!--    xml:space attribute:
+        Indicates that the element contains white space
+        that the formatter or other application should retain,
+        as appropriate to its function. -->
+<!ENTITY % xmlspace.att
+        'xml:space              (default
+                                |preserve)      #FIXED "preserve"'>
+
+<!--    Common attributes:
+        Every element has an ID attribute (sometimes required,
+        but usually optional) for links, and a Role attribute
+        for extending the useful life of the DTD by allowing
+        authors to make subclasses for any element. %common.att;
+        is for common attributes where the ID is optional, and
+        %common-idreq.att; is for common attributes where the
+        ID is required. -->
+<!ENTITY % common.att
+        'id                     ID              #IMPLIED
+        role                    NMTOKEN         #IMPLIED'>
+<!ENTITY % common-idreq.att
+        'id                     ID              #REQUIRED
+        role                    NMTOKEN         #IMPLIED'>
+
+<!-- ............................................................... -->
+<!-- Common elements ............................................... -->
+
+<!--    head: Title on divisions, productions, and the like -->
+<!ELEMENT head (%head.pcd.mix;)*>
+<!ATTLIST head %common.att;>
+
+<!-- ............................................................... -->
+<!-- Major specification structure ................................. -->
+
+<!--
+#1998-03-10: maler: Made spec content model easily customizable.
+-->
+
+<!ELEMENT spec (%spec.mdl;)>
+<!ATTLIST spec %common.att;>
+
+<!ELEMENT front (div1+)>
+<!ATTLIST front %common.att;>
+
+<!ELEMENT body (div1+)>
+<!ATTLIST body %common.att;>
+
+<!--
+#1997-09-30: maler: Added inform-div1 to back content.
+-->
+
+<!ELEMENT back ((div1+, inform-div1*) | inform-div1+)>
+<!ATTLIST back %common.att;>
+
+<!ELEMENT div1 (head, (%div.mix;)*, div2*)>
+<!ATTLIST div1 %common.att;>
+
+<!--
+#1997-09-30: maler: Added inform-div1 declarations.
+-->
+
+<!--    inform-div1: Non-normative division in back matter -->
+<!ELEMENT inform-div1 (head, (%div.mix;)*, div2*)>
+<!ATTLIST inform-div1 %common.att;>
+
+<!ELEMENT div2 (head, (%div.mix;)*, div3*)>
+<!ATTLIST div2 %common.att;>
+
+<!ELEMENT div3 (head, (%div.mix;)*, div4*)>
+<!ATTLIST div3 %common.att;>
+
+<!ELEMENT div4 (head, (%div.mix;)*)>
+<!ATTLIST div4 %common.att;>
+
+<!-- Specification header .......... -->
+
+<!--
+#1998-03-10: maler: Made header content model easily customizable.
+-->
+
+<!ELEMENT header (%header.mdl;)>
+<!ATTLIST header %common.att;>
+
+<!--    Example of title: "Extensible Cheese Language (XCL)" -->
+<!ELEMENT title (#PCDATA)>
+<!ATTLIST title %common.att;>
+
+<!--    Example of subtitle: "A Cheesy Specification" -->
+<!ELEMENT subtitle (#PCDATA)>
+<!ATTLIST subtitle %common.att;>
+
+<!--    Example of version: "Version 666.0" -->
+<!ELEMENT version (#PCDATA)>
+<!ATTLIST version %common.att;>
+
+<!--    Example of w3c-designation: "WD-xcl-19991231" -->
+<!ELEMENT w3c-designation (#PCDATA)>
+<!ATTLIST w3c-designation %common.att;>
+
+<!--    Example of w3c-doctype: "World Wide Web Consortium Working
+        Draft" -->
+<!ELEMENT w3c-doctype (#PCDATA)>
+<!ATTLIST w3c-doctype %common.att;>
+
+<!--
+#1998-03-10: maler: Made pubdate content model easily customizable.
+-->
+
+<!ELEMENT pubdate (%pubdate.mdl;)>
+<!ATTLIST pubdate %common.att;>
+
+<!ELEMENT day (#PCDATA)>
+<!ATTLIST day %common.att;>
+
+<!ELEMENT month (#PCDATA)>
+<!ATTLIST month %common.att;>
+
+<!ELEMENT year (#PCDATA)>
+<!ATTLIST year %common.att;>
+
+<!--    Example of notice: "This draft is for public comment..." -->
+<!ELEMENT notice (%hdr.mix;)+>
+<!ATTLIST notice %common.att;>
+
+<!ELEMENT publoc (loc+)>
+<!ATTLIST publoc %common.att;>
+
+<!ELEMENT prevlocs (loc+)>
+<!ATTLIST prevlocs %common.att;>
+
+<!ELEMENT latestloc (loc+)>
+<!ATTLIST latestloc %common.att;>
+
+<!--      loc (defined in "Phrase-level elements" below) -->
+
+<!ELEMENT authlist (author+)>
+<!ATTLIST authlist %common.att;>
+
+<!--
+#1997-09-30: maler: Made affiliation optional.
+#1998-03-10: maler: Made email optional.
+-->
+
+<!ELEMENT author (name, affiliation?, email?)>
+<!ATTLIST author %common.att;>
+
+<!ELEMENT name (#PCDATA)>
+<!ATTLIST name
+        %common.att;
+        %key.att;>
+
+<!ELEMENT affiliation (#PCDATA)>
+<!ATTLIST affiliation %common.att;>
+
+<!ELEMENT email (#PCDATA)>
+<!--    HREF attribute:
+        email functions as a hypertext reference through this
+        required attribute.  Typically the reference would use
+        the mailto: scheme. -->
+<!ATTLIST email
+        %common.att;
+        %href-req.att;>
+
+<!--
+#1998-05-15: maler: Changed status content from %statusobj.mix;
+#                   to plain %obj.mix;.  statusp is obsolete.
+-->
+
+<!ELEMENT status (%obj.mix;)+>
+<!ATTLIST status %common.att;>
+
+<!ELEMENT abstract (%hdr.mix;)*>
+<!ATTLIST abstract %common.att;>
+
+<!ELEMENT pubstmt (%hdr.mix;)+>
+<!ATTLIST pubstmt %common.att;>
+
+<!ELEMENT sourcedesc (%hdr.mix;)+>
+<!ATTLIST sourcedesc %common.att;>
+
+<!ELEMENT langusage (language+)>
+<!ATTLIST langusage %common.att;>
+
+<!ELEMENT language (#PCDATA)>
+<!ATTLIST language %common.att;>
+
+<!ELEMENT revisiondesc (%hdr.mix;)+>
+<!ATTLIST revisiondesc %common.att;>
+
+<!-- ............................................................... -->
+<!-- Standalone elements ........................................... -->
+
+<!-- Paragraphs .................... -->
+
+<!--
+#1997-09-30: maler: Changed from %obj.mix; to %p.mix;.
+#1997-12-29: maler: Changed order of %p.mix; and %p.pcd.mix;
+#                   references.
+#1997-12-29: maler: Changed order of %statusobj.mix; and
+#                   %statusp.pcd.mix; references.
+#1998-05-14: maler: Removed statusp declarations.
+-->
+
+<!ELEMENT p (%p.pcd.mix;|%p.mix;)*>
+<!ATTLIST p %common.att;>
+
+<!-- Lists ......................... -->
+
+<!ELEMENT ulist (item+)>
+<!--    spacing attribute:
+        Use "normal" to get normal vertical spacing for items;
+        use "compact" to get less spacing.  The default is dependent
+        on the stylesheet. -->
+<!ATTLIST ulist
+        %common.att;
+        spacing         (normal|compact)        #IMPLIED>
+
+<!ELEMENT olist (item+)>
+<!--    spacing attribute:
+        Use "normal" to get normal vertical spacing for items;
+        use "compact" to get less spacing.  The default is dependent
+        on the stylesheet. -->
+<!ATTLIST olist
+        %common.att;
+        spacing         (normal|compact)        #IMPLIED>
+
+<!ELEMENT item (%obj.mix;)+>
+<!ATTLIST item %common.att;>
+
+<!ELEMENT slist (sitem+)>
+<!ATTLIST slist %common.att;>
+
+<!ELEMENT sitem (%p.pcd.mix;)*>
+<!ATTLIST sitem %common.att;>
+
+<!ELEMENT glist (gitem+)>
+<!ATTLIST glist %common.att;>
+
+<!ELEMENT gitem (label, def)>
+<!ATTLIST gitem %common.att;>
+
+<!ELEMENT label (%label.pcd.mix;)*>
+<!ATTLIST label %common.att;>
+
+<!ELEMENT def (%obj.mix;)*>
+<!ATTLIST def %common.att;>
+
+<!-- Special lists ................. -->
+
+<!ELEMENT blist (bibl+)>
+<!ATTLIST blist %common.att;>
+
+<!ELEMENT bibl (%bibl.pcd.mix;)*>
+<!--    HREF attribute:
+        bibl optionally functions as a hypertext reference to the
+        referred-to resource through this attribute. -->
+<!ATTLIST bibl
+        %common.att;
+        %href.att;
+        %key.att;>
+
+<!ELEMENT orglist (member+)>
+<!ATTLIST orglist %common.att;>
+
+<!--
+#1997-09-30: maler: Added optional affiliation.
+-->
+
+<!ELEMENT member (name, affiliation?, role?)>
+<!ATTLIST member %common.att;>
+
+<!--      name (defined in "Specification header" above) -->
+<!--      affiliation (defined in "Specification header" above) -->
+
+<!ELEMENT role (#PCDATA)>
+<!ATTLIST role %common.att;>
+
+<!-- Notes ......................... -->
+
+<!ELEMENT note (%obj.mix;)+>
+<!ATTLIST note %common.att;>
+
+<!--
+#1998-05-14: maler: Declared issue element.
+-->
+
+<!ELEMENT issue (%obj.mix;)+>
+<!ATTLIST issue %common-idreq.att;>
+
+<!ELEMENT wfcnote (head, (%obj.mix;)+)>
+<!--    ID attribute:
+        wfcnote must have an ID so that it can be pointed to
+        from a wfc element in a production. -->
+<!ATTLIST wfcnote
+        %common-idreq.att;>
+
+<!ELEMENT vcnote (head, (%obj.mix;)+)>
+<!--    ID attribute:
+        vcnote must have an ID so that it can be pointed to
+        from a vc element in a production. -->
+<!ATTLIST vcnote
+        %common-idreq.att;>
+
+<!--
+#1998-05-21: maler: Declared generic constraintnote element.
+-->
+
+<!ELEMENT constraintnote (head, (%obj.mix;)+)>
+<!--    ID attribute:
+        cnote must have an ID so that it can be pointed to
+        from a constraint element in a production. -->
+<!--    type attribute:
+        cnote must have a type value keyword so that it can be
+        correctly characterized in the specification. -->
+<!ATTLIST constraintnote
+        %common-idreq.att;
+        type            NMTOKEN         #REQUIRED>
+
+<!-- Illustrations ................. -->
+
+<!--
+#1998-03-23: maler: Added xml:space attribute.
+-->
+
+<!ELEMENT eg (%eg.pcd.mix;)*>
+<!ATTLIST eg
+        %common.att;
+        %xmlspace.att;>
+
+<!ELEMENT graphic EMPTY>
+<!--    source attribute:
+        The graphic data must reside at the location pointed to.
+        This is a hypertext reference, but for practical purposes,
+        for now it should just be a pathname. -->
+<!ATTLIST graphic
+        %common.att;
+        %source-req.att;
+        alt             CDATA           #IMPLIED>
+
+<!--
+#1997-11-28: maler: Added prodgroup to scrap and defined it.
+#1998-05-21: maler: Added constraint to prod.
+-->
+
+<!ELEMENT scrap (head, (prodgroup+ | prod+ | bnf))>
+<!--    lang attribute:
+        The scrap can link to a description of the language used,
+        found in a language element in the header. -->
+<!ATTLIST scrap
+        %common.att;
+        lang            IDREF           #IMPLIED>
+
+<!ELEMENT prodgroup (prod+)>
+<!--    pcw<n> attributes:
+        Presentational attributes to control the width
+        of the "pseudo-table" columns used to output
+        groups of productions. -->
+<!ATTLIST prodgroup
+        %common.att;
+        pcw1            CDATA           #IMPLIED
+        pcw2            CDATA           #IMPLIED
+        pcw3            CDATA           #IMPLIED
+        pcw4            CDATA           #IMPLIED
+        pcw5            CDATA           #IMPLIED
+>
+
+<!ELEMENT prod (lhs, (rhs, (com|wfc|vc|constraint)*)+)>
+<!--    ID attribute:
+        The production must have an ID so that cross-references
+        (specref) and mentions of nonterminals (nt) can link to
+        it. -->
+<!ATTLIST prod
+        %common-idreq.att;>
+
+<!ELEMENT lhs (#PCDATA)>
+<!ATTLIST lhs %common.att;>
+
+<!ELEMENT rhs (#PCDATA|nt|xnt|com)*>
+<!ATTLIST rhs %common.att;>
+
+<!--      nt and xnt (defined in "Phrase-level elements" below) -->
+
+<!--
+#1997-11-28: maler: Added loc and bibref to com content.
+-->
+
+<!ELEMENT com (#PCDATA|loc|bibref)*>
+<!ATTLIST com %common.att;>
+
+<!--    wfc: Should generate the head of the wfcnote pointed to -->
+<!ELEMENT wfc EMPTY>
+<!--    def attribute:
+        Each well formedness tagline in a production must link to the
+        wfcnote that defines it. -->
+<!ATTLIST wfc
+        %def-req.att;
+        %common.att;>
+
+<!--    vc: Should generate the head of the vcnote pointed to -->
+<!ELEMENT vc EMPTY>
+<!--    def attribute:
+        Each validity tagline in a production must link to the vcnote
+        that defines it. -->
+<!ATTLIST vc
+        %def-req.att;
+        %common.att;>
+
+<!--
+#1998-05-21: maler: Declared generic constraint element.
+-->
+
+<!--    constraint: Should generate the head of the constraintnote
+        pointed to -->
+<!ELEMENT constraint EMPTY>
+<!--    def attribute:
+        Each constraint tagline in a production must link to the
+        constraint note that defines it. -->
+<!ATTLIST constraint
+        %def-req.att;
+        %common.att;>
+
+<!--
+#1998-03-23: maler: Added xml:space attribute.
+-->
+
+<!--    bnf: Un-marked-up production -->
+<!ELEMENT bnf (%eg.pcd.mix;)*>
+<!ATTLIST bnf
+        %common.att;
+        %xmlspace.att;>
+
+<!--
+#1997-10-16: maler: Added table mechanism.
+#1997-11-28: maler: Added non-null system ID to entity declaration.
+#                   Added HTML table module.
+#1997-12-29: maler: IGNOREd SGML Open table model.
+#1998-03-10: maler: Removed SGML Open table model.
+#                   Merged html-tbl.mod file into main file.
+#                   Added %common.att; to all HTML table elements.
+#1998-05-14: maler: Replaced table model with full HTML 4.0 model.
+#                   Removed htable in favor of table.
+#                   Removed htbody in favor of tbody.
+-->
+
+<!ENTITY % cellhalign.att
+        'align          (left|center
+                        |right|justify
+                        |char)          #IMPLIED
+        char            CDATA           #IMPLIED
+        charoff         CDATA           #IMPLIED'>
+
+<!ENTITY % cellvalign.att
+        'valign         (top|middle
+                        |bottom
+                        |baseline)      #IMPLIED'>
+
+<!ENTITY % thtd.att
+        'abbr           CDATA           #IMPLIED
+        axis            CDATA           #IMPLIED
+        headers         IDREFS          #IMPLIED
+        scope           (row
+                        |col
+                        |rowgroup
+                        |colgroup)      #IMPLIED
+        rowspan         NMTOKEN         "1"
+        colspan         NMTOKEN         "1"'>
+
+<!ENTITY % width.att
+        'width          CDATA           #IMPLIED'>
+
+<!ENTITY % span.att
+        'span           NMTOKEN         "1"'>
+
+<!ELEMENT table
+        (caption?, (col*|colgroup*), thead?, tfoot?, tbody+)>
+<!ATTLIST table
+        %common.att;
+        %width.att;
+        summary         CDATA           #IMPLIED
+        border          CDATA           #IMPLIED
+        frame           (void|above
+                        |below|hsides
+                        |lhs|rhs
+                        |vsides|box
+                        |border)        #IMPLIED
+        rules           (none|groups
+                        |rows|cols
+                        |all)           #IMPLIED
+        cellspacing     CDATA           #IMPLIED
+        cellpadding     CDATA           #IMPLIED>
+
+<!ELEMENT caption (%p.pcd.mix;)*>
+<!ATTLIST caption %common.att;>
+
+<!ELEMENT col EMPTY>
+<!ATTLIST col
+        %common.att;
+        %span.att;
+        %width.att;
+        %cellhalign.att;
+        %cellvalign.att;>
+
+<!ELEMENT colgroup (col)*>
+<!ATTLIST colgroup
+        %common.att;
+        %span.att;
+        %width.att;
+        %cellhalign.att;
+        %cellvalign.att;>
+
+<!ELEMENT thead (tr)+>
+<!ATTLIST thead
+        %common.att;
+        %cellhalign.att;
+        %cellvalign.att;>
+
+<!ELEMENT tfoot (tr)+>
+<!ATTLIST tfoot
+        %common.att;
+        %cellhalign.att;
+        %cellvalign.att;>
+
+<!ELEMENT tbody (tr)+>
+<!ATTLIST tbody
+        %common.att;
+        %cellhalign.att;
+        %cellvalign.att;>
+
+<!ELEMENT tr (th|td)+>
+<!ATTLIST tr
+        %common.att;
+        %cellhalign.att;
+        %cellvalign.att;>
+
+<!ELEMENT th (%p.pcd.mix;|%p.mix;)*>
+<!ATTLIST th
+        %common.att;
+        %thtd.att;
+        %cellhalign.att;
+        %cellvalign.att;>
+
+<!ELEMENT td (%p.pcd.mix;|%p.mix;)*>
+<!ATTLIST td
+        %common.att;
+        %thtd.att;
+        %cellhalign.att;
+        %cellvalign.att;>
+
+<!-- ............................................................... -->
+<!-- Phrase-level elements ......................................... -->
+
+<!--    bibref: Should generate, in square brackets, "key" on bibl -->
+<!ELEMENT bibref EMPTY>
+<!--    ref attribute:
+        A bibliography reference must link to the bibl element that
+        describes the resource. -->
+<!ATTLIST bibref
+        %common.att;
+        %ref-req.att;>
+
+<!ELEMENT code (%tech.pcd.mix;)*>
+<!ATTLIST code %common.att;>
+
+<!--
+#1998-03-10: maler: Declared ednote and related elements.
+-->
+
+<!ELEMENT ednote (name?, date?, edtext)>
+<!ATTLIST ednote %common.att;>
+
+<!ELEMENT date (#PCDATA)>
+<!ATTLIST date %common.att;>
+
+<!ELEMENT edtext (#PCDATA)>
+<!ATTLIST edtext %common.att;>
+
+<!ELEMENT emph (#PCDATA)>
+<!ATTLIST emph %common.att;>
+
+<!--    footnote: Both footnote content and call to footnote -->
+<!ELEMENT footnote (%obj.mix;)+>
+<!ATTLIST footnote %common.att;>
+
+<!ELEMENT kw (%tech.pcd.mix;)*>
+<!ATTLIST kw %common.att;>
+
+<!ELEMENT loc (#PCDATA)>
+<!--    HREF attribute:
+        The purpose of a loc element is to function as a hypertext
+        link to a resource.  (Ideally, the content of loc will also
+        mention the URI of the resource, so that readers of the
+        printed version will be able to locate the resource.) -->
+<!ATTLIST loc
+        %common.att;
+        %href-req.att;>
+
+<!ELEMENT nt (#PCDATA)>
+<!--    def attribute:
+        The nonterminal must link to the production that defines
+        it. -->
+<!ATTLIST nt
+        %common.att;
+        %def-req.att;>
+
+<!--
+#1998-03-10: maler: Declared quote.
+-->
+
+<!--    quote: Scare quotes and other purely presentational quotes -->
+<!ELEMENT quote (%p.pcd.mix;)*>
+<!ATTLIST quote %common.att;>
+
+<!--    specref: Should generate italic "[n.n], Section Title" for
+        div, "n" for numbered item, "[n]" for production, or
+        "Issue n" for issue -->
+<!ELEMENT specref EMPTY>
+<!--    ref attribute:
+        The purpose of a specref element is to link to a div, item
+        in an olist, or production in the current spec. -->
+<!ATTLIST specref
+        %common.att;
+        %ref-req.att;>
+
+<!ELEMENT term (#PCDATA)>
+<!ATTLIST term %common.att;>
+
+<!ELEMENT termdef (%termdef.pcd.mix;|%termdef.mix;)*>
+<!--    ID attribute:
+        A term definition must have an ID so that it can be linked
+        to from termref elements. -->
+<!--    term attribute:
+        The canonical form of the term or phrase being defined must
+        appear in this attribute, even if the term or phrase also
+        appears in the element content in identical form (e.g., in
+        the term element). -->
+<!ATTLIST termdef
+        %common-idreq.att;
+        term            CDATA           #REQUIRED>
+
+<!ELEMENT termref (#PCDATA)>
+<!--    ref attribute:
+        A term reference must link to the termdef element that
+        defines the term. -->
+<!ATTLIST termref
+        %common.att;
+        %def-req.att;>
+
+<!ELEMENT titleref (#PCDATA)>
+<!--    HREF attribute:
+        A title reference can optionally function as a hypertext
+        link to the resource with this title. -->
+<!ATTLIST titleref
+        %common.att;
+        %href.att;>
+
+<!ELEMENT xnt (#PCDATA)>
+<!--    HREF attribute:
+        The nonterminal must hyperlink to a resource that serves
+        to define it (e.g., a production in a related XML
+        specification). -->
+<!ATTLIST xnt
+        %common.att;
+        %href-req.att;>
+
+<!--
+#1997-12-29: maler: Declared xspecref.
+-->
+
+<!ELEMENT xspecref (#PCDATA)>
+<!--    HREF attribute:
+        The spec reference must hyperlink to the resource to
+        cross-refer to (e.g., a section in a related XML
+        specification). -->
+<!ATTLIST xspecref
+        %common.att;
+        %href-req.att;>
+
+<!ELEMENT xtermref (#PCDATA)>
+<!--    HREF attribute:
+        The term reference must hyperlink to the resource that
+        serves to define the term (e.g., a term definition in
+        a related XML specification). -->
+<!ATTLIST xtermref
+        %common.att;
+        %href-req.att;>
+
+<!-- ............................................................... -->
+<!-- Unused elements for ADEPT ..................................... -->
+
+<!--
+#1997-09-30: maler: Added unusued elements.
+#1997-10-14: maler: Fixed div to move nested div to the mixture.
+#1998-05-14: maler: Added key-term, htable, and htbody.
+-->
+
+<!--    The following elements are purposely declared but never
+        referenced.  Declaring them allows them to be pasted from
+        an HTML document or an earlier version of an XML spec document
+        into a document using this DTD in ADEPT.  The ATD Context
+        Transformation mechanism will try to convert them to the
+        appropriate element for this DTD.  While this conversion
+        will not work for all fragments, it does allow many cases
+        to work reasonably well. -->
+
+<!ELEMENT div
+        (head?, (%div.mix;|ul|ol|h1|h2|h3|h4|h5|h6|div)*)>
+<!ELEMENT h1 (%head.pcd.mix;|em|a)*>
+<!ELEMENT h2 (%head.pcd.mix;|em|a)*>
+<!ELEMENT h3 (%head.pcd.mix;|em|a)*>
+<!ELEMENT h4 (%head.pcd.mix;|em|a)*>
+<!ELEMENT h5 (%head.pcd.mix;|em|a)*>
+<!ELEMENT h6 (%head.pcd.mix;|em|a)*>
+<!ELEMENT pre (%eg.pcd.mix;|em)*>
+<!ELEMENT ul (item|li)*>
+<!ELEMENT ol (item|li)*>
+<!ELEMENT li (#PCDATA|%obj.mix;)*>
+<!ELEMENT em (#PCDATA)>
+<!ELEMENT a (#PCDATA)>
+
+<!ELEMENT key-term (#PCDATA)>
+<!ELEMENT htable
+        (caption?, (col*|colgroup*), thead?, tfoot?, tbody+)>
+<!ELEMENT htbody (tr)+>
+<!ELEMENT statusp (%p.pcd.mix;|%p.mix;)*>
+
+<!-- ............................................................... -->
+<!-- Change history ................................................ -->
+
+<!--
+#1997-08-18: maler
+#- Did a major revision.
+#1997-09-10: maler
+#- Updated FPI.
+#- Removed namekey element and put key attribute on name element.
+#- Made statusp element and supporting entities.
+#- Added slist element with sitem+ content.
+#- Required head on scrap and added new bnf subelement.
+#- Added an xnt element and allowed it and nt in regular text and rhs.
+#- Removed the ntref element.
+#- Added back the com element to the content of rhs.
+#- Added a key attribute to bibl.
+#- Removed the ident element.
+#- Added a term element to be used inside termdef.
+#- Added an xtermref element parallel to termref.
+#- Beefed up DTD comments.
+#1997-09-12: maler
+#- Allowed term element in general text.
+#- Changed bibref to EMPTY.
+#- Added ref.class to termdef.pcd.mix.
+#1997-09-14: maler
+#- Changed main attribute of xtermref from def to href.
+#- Added termdef.class to label contents.
+#1997-09-30: maler
+#- Added character entity module and added new entities.
+#- Removed p from appearing directly in self; created %p.mix;.
+#- Added inform-div (non-normative division) element.
+#- Fixed xtermref comment to mention HREF, not ref.
+#- Extended orglist model to allow optional affiliation.
+#- Modified author to make affiliation optional.
+#- Added %speclist.class; and %note.class; to %obj.mix; and %p.mix;.
+#- Added %note.class; and %illus.class; to %termdef.pcd.mix;.
+#- Added unused HTML elements.
+#- Put empty system ID next to public ID in entity declarations.
+#1997-10-14: maler
+#- Fixed "unused" div content model to move nested div to mixture.
+#1997-10-16: maler
+#- Added SGML Open Exchange tables.
+#1997-11-28: maler
+#- Added support for prodgroup and its attributes.
+#- Added support for HTML tables.
+#- Added loc and bibref to content of com.
+#- Added loc to general p content models.
+#- Allowed p as alternative to statusp in status.
+#- Added non-null system IDs to external parameter entity declarations.
+#- (Modified the SGML Open table module to make it XML-compliant.)
+#- (Modified the character entity module.)
+#1997-12-29: maler
+#- Moved #PCDATA occurrences to come before GIs in content models.
+#- Removed use of the SGML Open table module.
+#- Added xspecref element.
+#- Ensured that all FPIs contain 4-digit year.
+#- (Modified the character entity module.)
+#1998-03-10: maler
+#- Merged the character entity and table modules into the main file.
+#- Added ldquo and rdquo entities.
+#- Added common attributes to prodgroup.
+#- Made the email element in header optional.
+#- Removed reference to the SGML Open table model.
+#- Added ednote element.
+#- Added quote element.
+#- Updated XLink usage to reflect 3 March 1998 WD.
+#- Added "local" entities to the class entities for customization.
+#- Parameterized several content models to allow for customization.
+#1998-03-23: maler
+#- Cleaned up some comments and removed some others.
+#- Added xml:space semi-common attribute to eg and bnf elements.
+#- Added show and embed attributes on all the uses of href.
+#- Added %common.att; to all HTML table elements.
+#- Added a real URI to the "typical invocation" comment.
+#1998-05-14: maler
+#- Fixed mdash, ldquo, and rdquo character entities.
+#- Switched to the full HTML 4.0 table model.
+#- Removed htable/htbody elements and replaced them with table/tbody.
+#- Added issue element to %note.class; and declared it.
+#- Allowed prevlocs and latestloc in either order.
+#- Added key-term, htable, htbody, and statusp as unused elements.
+#- Removed real statusp element in favor of plain p.
+#1998-05-21: maler
+#- Declared generic constraint and constraintnote elements.
+#- Added constraintnote to %note.class;.
+#- Added constraint to %eg.pcd.mix; and prod content model.
+-->
+
+<!-- ............................................................... -->
+<!-- End of XML specification DTD .................................. -->
+<!-- ............................................................... -->
\ No newline at end of file
diff --git a/TC/testcase/res/UTsXml/test/valid/id1.xml b/TC/testcase/res/UTsXml/test/valid/id1.xml
new file mode 100755 (executable)
index 0000000..7390f5e
--- /dev/null
@@ -0,0 +1,13 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (src | dest)*>
+<!ELEMENT src EMPTY>
+<!ELEMENT dest EMPTY>
+<!ATTLIST src ref IDREF #IMPLIED>
+<!ATTLIST dest id ID #IMPLIED>
+]>
+<doc>
+  <src ref="foo"/>
+  <dest id="foo"/>
+  <src ref="foo"/>
+</doc>
+
diff --git a/TC/testcase/res/UTsXml/test/valid/id2.xml b/TC/testcase/res/UTsXml/test/valid/id2.xml
new file mode 100755 (executable)
index 0000000..5b4a77a
--- /dev/null
@@ -0,0 +1,14 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (src | dest)*>
+<!ELEMENT src EMPTY>
+<!ELEMENT dest EMPTY>
+<!ATTLIST src ref IDREF #IMPLIED>
+<!ATTLIST dest id ID #IMPLIED>
+<!ENTITY dest "<dest id='foo'/>">
+]>
+<doc>
+  <src ref="foo"/>
+  &dest;
+  <src ref="foo"/>
+</doc>
+
diff --git a/TC/testcase/res/UTsXml/test/valid/id3.xml b/TC/testcase/res/UTsXml/test/valid/id3.xml
new file mode 100755 (executable)
index 0000000..933d06d
--- /dev/null
@@ -0,0 +1,14 @@
+<!DOCTYPE doc [
+<!ELEMENT doc (src | dest)*>
+<!ELEMENT src EMPTY>
+<!ELEMENT dest EMPTY>
+<!ATTLIST src ref IDREF #IMPLIED>
+<!ATTLIST dest id ID #IMPLIED>
+<!ENTITY dest SYSTEM "dtds/destfoo.ent">
+]>
+<doc>
+  <src ref="foo"/>
+  &dest;
+  <src ref="foo"/>
+</doc>
+
diff --git a/TC/testcase/res/UTsXml/test/valid/index.xml b/TC/testcase/res/UTsXml/test/valid/index.xml
new file mode 100755 (executable)
index 0000000..2a0e671
--- /dev/null
@@ -0,0 +1,111 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE NewsML PUBLIC "urn:newsml:iptc.org:20001006:NewsMLv1.0:1" "dtds/NewsMLv1.0.dtd" [
+  <!ENTITY % nitf SYSTEM "dtds/nitf-2-5.dtd">
+  %nitf;
+]>
+<NewsML>
+  <Catalog Href="http://www.afp.com/dtd/AFPCatalog.xml"/>
+  <NewsEnvelope>
+    <DateAndTime>20011022T154508Z</DateAndTime>
+  </NewsEnvelope>
+  <NewsItem>
+    <Identification>
+      <NewsIdentifier>
+        <ProviderId>afp.com</ProviderId>
+        <DateId>20011022</DateId>
+        <NewsItemId>mmd--deutsch--journal--spo</NewsItemId>
+        <RevisionId PreviousRevision="0" Update="N">1</RevisionId>
+        <PublicIdentifier>urn:NewsML:afp.com:20011022:mmd--deutsch--journal--spo:1</PublicIdentifier>
+      </NewsIdentifier>
+      <NameLabel>HINTERGRUND</NameLabel>
+    </Identification>
+    <NewsManagement>
+      <NewsItemType FormalName="News"/>
+      <FirstCreated>20011022T154508Z</FirstCreated>
+      <ThisRevisionCreated>20011022T154508Z</ThisRevisionCreated>
+      <Status FormalName="Usable"/>
+    </NewsManagement>
+    <NewsComponent>
+      <AdministrativeMetadata>
+        <Provider>
+          <Party FormalName="AFP"/>
+        </Provider>
+      </AdministrativeMetadata>
+      <DescriptiveMetadata>
+        <Language FormalName="de"/> 
+      </DescriptiveMetadata>
+      <NewsComponent>
+        <NewsLines>
+          <HeadLine>Berliner SPD führt Gespräche mit FDP und Grünen</HeadLine>
+        </NewsLines>
+        <NewsItemRef NewsItem="011022154450.sq80bp9h.xml"/>
+      </NewsComponent>
+      <NewsComponent>
+        <NewsLines>
+          <HeadLine>INFOGRAFIK: Das Berliner Wahlergebnis</HeadLine>
+        </NewsLines>
+        <NewsItemRef NewsItem="011022113032.remo00m7.xml"/>
+      </NewsComponent>
+      <NewsComponent>
+        <NewsLines>
+          <HeadLine>Schwierige Koalitionsverhandlungen in Berlin</HeadLine>
+        </NewsLines>
+        <NewsItemRef NewsItem="011022124314.9hv2kozk.xml"/>
+      </NewsComponent>
+      <NewsComponent>
+        <NewsLines>
+          <HeadLine>Die Lieblingsfarben des Kanzlers sind Rot Gelb Grün</HeadLine>
+        </NewsLines>
+        <NewsItemRef NewsItem="011022134541.cmmaoim7.xml"/>
+      </NewsComponent>
+      <NewsComponent>
+        <NewsLines>
+          <HeadLine>INFOGRAFIK: Wen wählt Wowereit?</HeadLine>
+        </NewsLines>
+        <NewsItemRef NewsItem="011022122545.hl3z2as6.xml"/>
+      </NewsComponent>
+      <NewsComponent>
+        <NewsLines>
+          <HeadLine>CDU ist auch in kommunalen Rathäusern der Verlierer</HeadLine>
+        </NewsLines>
+        <NewsItemRef NewsItem="011022120205.b8sykfvu.xml"/>
+      </NewsComponent>
+      <NewsComponent>
+        <NewsLines>
+          <HeadLine>Gutes Abschneiden der PDS hat verschiedene Gründe</HeadLine>
+        </NewsLines>
+        <NewsItemRef NewsItem="011022134159.agvne048.xml"/>
+      </NewsComponent>
+      <NewsComponent>
+        <NewsLines>
+          <HeadLine>Ans Regieren hat sich Klaus Wowereit gewöhnt</HeadLine>
+        </NewsLines>
+        <NewsItemRef NewsItem="011021161031.1oq7qyub.xml"/>
+      </NewsComponent>
+      <NewsComponent>
+        <NewsLines>
+          <HeadLine>Steffel brachte CDU nicht auf Erfolgskurs</HeadLine>
+        </NewsLines>
+        <NewsItemRef NewsItem="011021165007.kt9qog9m.xml"/>
+      </NewsComponent>
+      <NewsComponent>
+        <NewsLines>
+          <HeadLine>Sibyll Klotz: Vollblutpolitikerin mit "Berliner Schnauze"</HeadLine>
+        </NewsLines>
+        <NewsItemRef NewsItem="011021184658.lctevest.xml"/>
+      </NewsComponent>
+      <NewsComponent>
+        <NewsLines>
+          <HeadLine>Mit Gysi muss weiter gerechnet werden</HeadLine>
+        </NewsLines>
+        <NewsItemRef NewsItem="011021180441.6tpvgx0y.xml"/>
+      </NewsComponent>
+      <NewsComponent>
+        <NewsLines>
+          <HeadLine>Rexrodt - das Stehaufmännchen der Berliner FDP</HeadLine>
+        </NewsLines>
+        <NewsItemRef NewsItem="011021165558.gujrz59m.xml"/>
+      </NewsComponent>
+    </NewsComponent>
+  </NewsItem>
+</NewsML>
diff --git a/TC/testcase/res/UTsXml/test/valid/mixed_ns.xml b/TC/testcase/res/UTsXml/test/valid/mixed_ns.xml
new file mode 100755 (executable)
index 0000000..22d8ed8
--- /dev/null
@@ -0,0 +1,16 @@
+<?xml version="1.0"?>
+<!DOCTYPE a [
+<!ELEMENT a (#PCDATA|b|s:b)*>
+<!ATTLIST a xmlns:s CDATA #IMPLIED>
+<!ELEMENT b EMPTY>
+<!ATTLIST b xmlns:s CDATA #IMPLIED>
+<!ELEMENT s:b EMPTY>
+<!ATTLIST s:b xmlns:s CDATA #IMPLIED>
+]>
+<a xmlns:s="http://some.test.ns/a">
+  Some text.
+       <b/>
+  Some text.
+       <s:b/>
+  Some text.
+</a>
diff --git a/TC/testcase/res/UTsXml/test/valid/notes.xml b/TC/testcase/res/UTsXml/test/valid/notes.xml
new file mode 100755 (executable)
index 0000000..157d178
--- /dev/null
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!DOCTYPE notes SYSTEM "dtds/notes.dtd">
+<pfx:notes
+xmlns:pfx="http://namespace/uri/here"
+><note/><pfx:note/></pfx:notes>
diff --git a/TC/testcase/res/UTsXml/test/valid/ns.xml b/TC/testcase/res/UTsXml/test/valid/ns.xml
new file mode 100755 (executable)
index 0000000..117c30f
--- /dev/null
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>\r
+<!DOCTYPE a:outer [\r
+\r
+<!ELEMENT a:outer EMPTY>\r
+<!ATTLIST a:outer xmlns:a CDATA #FIXED 'urn:namespace'>\r
+<!ATTLIST a:outer xmlns:b CDATA #FIXED 'urn:namespaceb'>\r
+]>\r
+\r
+<a:outer />\r
diff --git a/TC/testcase/res/UTsXml/test/valid/ns2.xml b/TC/testcase/res/UTsXml/test/valid/ns2.xml
new file mode 100755 (executable)
index 0000000..bfab69a
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0"?>
+<!DOCTYPE a:outer [
+
+<!ELEMENT a:outer (a:inner)>
+<!ATTLIST a:outer xmlns:a CDATA #FIXED 'urn:namespace'>
+
+<!ELEMENT a:inner EMPTY>
+<!ATTLIST a:inner xmlns:a CDATA #FIXED 'urn:namespace'>
+<!ATTLIST a:inner attr CDATA #FIXED 'yes'>
+]>
+
+<a:outer xmlns:a="urn:namespace">
+  <a:inner />
+</a:outer>
diff --git a/TC/testcase/res/UTsXml/test/valid/objednavka.xml b/TC/testcase/res/UTsXml/test/valid/objednavka.xml
new file mode 100755 (executable)
index 0000000..c785b1a
--- /dev/null
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<!DOCTYPE objednavka SYSTEM "dtds/objednavka.dtd">\r
+<objednavka>\r
+    <AdDoručeni>\r
+        <Jméno>Jan Novák</Jméno>\r
+        <Ulice>Bělehradská 147</Ulice>\r
+        <Město>Praha 2</Město>\r
+        <PSČ>12000</PSČ>\r
+    </AdDoručeni>\r
+    <AdÚčtovací>\r
+        <Jméno>Petra Nováková</Jméno>\r
+        <Ulice>Anglická 15</Ulice>\r
+        <Město>Praha 2</Město>\r
+        <PSČ>12000</PSČ>\r
+    </AdÚčtovací>\r
+    <ZpůsobDopravy>DPD</ZpůsobDopravy>\r
+    <ZpůsobPlatby>dobírka</ZpůsobPlatby>\r
+    <DatumPřijetí>2004-11-14</DatumPřijetí>\r
+    <DatumDoručení>2004-11-19</DatumDoručení>\r
+    <ObsahObjednávky>\r
+        <Zboží>\r
+            <Kód>2N7-516</Kód>\r
+            <Název>Sekačka na trávu</Název>\r
+            <Počet  jednotka="ks">1</Počet>\r
+            <Cena>2999</Cena>\r
+            <Popis>http://example.org/sekacka.html</Popis>\r
+        </Zboží>\r
+        <Zboží>\r
+            <Kód>Q3Y-116</Kód>\r
+            <Název>Travní semeno</Název>\r
+            <Počet  jednotka="kg">2.5</Počet>\r
+            <Cena>127.50</Cena>\r
+        </Zboží>\r
+    </ObsahObjednávky>\r
+    <Komentář>\r
+        <Řádka>O dodávku mám zájem pouze v případě, že se jedná o trávu v odrůdě konopí.</Řádka>\r
+        <Řádka>Dále jsem se chtěl zeptat, zda je doprava zdarma.</Řádka>\r
+    </Komentář>\r
+</objednavka>\r
diff --git a/TC/testcase/res/UTsXml/test/valid/rss.xml b/TC/testcase/res/UTsXml/test/valid/rss.xml
new file mode 100755 (executable)
index 0000000..5d6102d
--- /dev/null
@@ -0,0 +1,177 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE rss [
+<!--
+
+  Rich Site Summary (RSS) 0.91 official DTD, proposed.
+  
+  RSS is an XML vocabulary for describing
+  metadata about websites, and enabling the display of
+  "channels" on the "My Netscape" website.
+  
+  RSS Info can be found at http://my.netscape.com/publish/
+  XML Info can be found at http://www.w3.org/XML/ 
+  
+  copyright Netscape Communications, 1999
+
+  Dan Libby - danda@netscape.com
+  
+  Based on RSS DTD originally created by
+  Lars Marius Garshol - larsga@ifi.uio.no.
+  
+-->
+<!ELEMENT rss (channel)>
+<!ATTLIST rss version CDATA #REQUIRED>
+<!-- must be "0.91"> --><!ELEMENT channel (title | description | link 
+| language | item+ | rating? | image? | textinput? | copyright? | 
+pubDate? | lastBuildDate? | docs? | managingEditor? | webMaster? | 
+skipHours? | skipDays?)*>
+<!ELEMENT title (#PCDATA)>
+<!ELEMENT description (#PCDATA)>
+<!ELEMENT link (#PCDATA)>
+<!ELEMENT image (title | url | link | width? | height? | description?)*>
+<!ELEMENT url (#PCDATA)>
+<!ELEMENT item (title | link | description)*>
+<!ELEMENT textinput (title | description | name | link)*>
+<!ELEMENT name (#PCDATA)>
+<!ELEMENT rating (#PCDATA)>
+<!ELEMENT language (#PCDATA)>
+<!ELEMENT width (#PCDATA)>
+<!ELEMENT height (#PCDATA)>
+<!ELEMENT copyright (#PCDATA)>
+<!ELEMENT pubDate (#PCDATA)>
+<!ELEMENT lastBuildDate (#PCDATA)>
+<!ELEMENT docs (#PCDATA)>
+<!ELEMENT managingEditor (#PCDATA)>
+<!ELEMENT webMaster (#PCDATA)>
+<!ELEMENT hour (#PCDATA)>
+<!ELEMENT day (#PCDATA)>
+<!ELEMENT skipHours (hour)+>
+<!ELEMENT skipDays (day)+>
+<!--
+     Copied from HTML 3.2 DTD, with modifications (removed CDATA)
+     http://www.w3.org/TR/REC-html32.html#dtd
+     =============== BEGIN ===================
+-->
+<!-- 
+     Character Entities for ISO Latin-1
+     
+     (C) International Organization for Standardization 1986
+     Permission to copy in any form is granted for use with
+     conforming SGML systems and applications as defined in
+     ISO 8879, provided this notice is included in all copies.
+     This has been extended for use with HTML to cover the full
+     set of codes in the range 160-255 decimal.
+-->
+<!-- Character entity set. Typical invocation:
+     <!ENTITY % ISOlat1 PUBLIC
+       "ISO 8879-1986//ENTITIES Added Latin 1//EN//HTML">
+     %ISOlat1;
+-->
+<!ENTITY nbsp "&#160;"> <!-- no-break space -->
+<!ENTITY iexcl "&#161;">
+<!-- inverted exclamation mark --><!ENTITY cent "&#162;">
+<!-- cent sign --><!ENTITY pound "&#163;">
+<!-- pound sterling sign --><!ENTITY curren "&#164;">
+<!-- general currency sign --><!ENTITY yen "&#165;">
+<!-- yen sign --><!ENTITY brvbar "&#166;">
+<!-- broken (vertical) bar --><!ENTITY sect "&#167;">
+<!-- section sign --><!ENTITY uml "&#168;">
+<!-- umlaut (dieresis) --><!ENTITY copy "&#169;">
+<!-- copyright sign --><!ENTITY ordf "&#170;">
+<!-- ordinal indicator, feminine --><!ENTITY laquo "&#171;">
+<!-- angle quotation mark, left --><!ENTITY not "&#172;">
+<!-- not sign --><!ENTITY shy "&#173;">
+<!-- soft hyphen --><!ENTITY reg "&#174;">
+<!-- registered sign --><!ENTITY macr "&#175;">
+<!-- macron --><!ENTITY deg "&#176;">
+<!-- degree sign --><!ENTITY plusmn "&#177;">
+<!-- plus-or-minus sign --><!ENTITY sup2 "&#178;">
+<!-- superscript two --><!ENTITY sup3 "&#179;">
+<!-- superscript three --><!ENTITY acute "&#180;">
+<!-- acute accent --><!ENTITY micro "&#181;">
+<!-- micro sign --><!ENTITY para "&#182;">
+<!-- pilcrow (paragraph sign) --><!ENTITY middot "&#183;">
+<!-- middle dot --><!ENTITY cedil "&#184;">
+<!-- cedilla --><!ENTITY sup1 "&#185;">
+<!-- superscript one --><!ENTITY ordm "&#186;">
+<!-- ordinal indicator, masculine --><!ENTITY raquo "&#187;">
+<!-- angle quotation mark, right --><!ENTITY frac14 "&#188;">
+<!-- fraction one-quarter --><!ENTITY frac12 "&#189;">
+<!-- fraction one-half --><!ENTITY frac34 "&#190;">
+<!-- fraction three-quarters --><!ENTITY iquest "&#191;">
+<!-- inverted question mark --><!ENTITY Agrave "&#192;">
+<!-- capital A, grave accent --><!ENTITY Aacute "&#193;">
+<!-- capital A, acute accent --><!ENTITY Acirc "&#194;">
+<!-- capital A, circumflex accent --><!ENTITY Atilde "&#195;">
+<!-- capital A, tilde --><!ENTITY Auml "&#196;">
+<!-- capital A, dieresis or umlaut mark --><!ENTITY Aring "&#197;">
+<!-- capital A, ring --><!ENTITY AElig "&#198;">
+<!-- capital AE diphthong (ligature) --><!ENTITY Ccedil "&#199;">
+<!-- capital C, cedilla --><!ENTITY Egrave "&#200;">
+<!-- capital E, grave accent --><!ENTITY Eacute "&#201;">
+<!-- capital E, acute accent --><!ENTITY Ecirc "&#202;">
+<!-- capital E, circumflex accent --><!ENTITY Euml "&#203;">
+<!-- capital E, dieresis or umlaut mark --><!ENTITY Igrave "&#204;">
+<!-- capital I, grave accent --><!ENTITY Iacute "&#205;">
+<!-- capital I, acute accent --><!ENTITY Icirc "&#206;">
+<!-- capital I, circumflex accent --><!ENTITY Iuml "&#207;">
+<!-- capital I, dieresis or umlaut mark --><!ENTITY ETH "&#208;">
+<!-- capital Eth, Icelandic --><!ENTITY Ntilde "&#209;">
+<!-- capital N, tilde --><!ENTITY Ograve "&#210;">
+<!-- capital O, grave accent --><!ENTITY Oacute "&#211;">
+<!-- capital O, acute accent --><!ENTITY Ocirc "&#212;">
+<!-- capital O, circumflex accent --><!ENTITY Otilde "&#213;">
+<!-- capital O, tilde --><!ENTITY Ouml "&#214;">
+<!-- capital O, dieresis or umlaut mark --><!ENTITY times "&#215;">
+<!-- multiply sign --><!ENTITY Oslash "&#216;">
+<!-- capital O, slash --><!ENTITY Ugrave "&#217;">
+<!-- capital U, grave accent --><!ENTITY Uacute "&#218;">
+<!-- capital U, acute accent --><!ENTITY Ucirc "&#219;">
+<!-- capital U, circumflex accent --><!ENTITY Uuml "&#220;">
+<!-- capital U, dieresis or umlaut mark --><!ENTITY Yacute "&#221;">
+<!-- capital Y, acute accent --><!ENTITY THORN "&#222;">
+<!-- capital THORN, Icelandic --><!ENTITY szlig "&#223;">
+<!-- small sharp s, German (sz ligature) --><!ENTITY agrave "&#224;">
+<!-- small a, grave accent --><!ENTITY aacute "&#225;">
+<!-- small a, acute accent --><!ENTITY acirc "&#226;">
+<!-- small a, circumflex accent --><!ENTITY atilde "&#227;">
+<!-- small a, tilde --><!ENTITY auml "&#228;">
+<!-- small a, dieresis or umlaut mark --><!ENTITY aring "&#229;">
+<!-- small a, ring --><!ENTITY aelig "&#230;">
+<!-- small ae diphthong (ligature) --><!ENTITY ccedil "&#231;">
+<!-- small c, cedilla --><!ENTITY egrave "&#232;">
+<!-- small e, grave accent --><!ENTITY eacute "&#233;">
+<!-- small e, acute accent --><!ENTITY ecirc "&#234;">
+<!-- small e, circumflex accent --><!ENTITY euml "&#235;">
+<!-- small e, dieresis or umlaut mark --><!ENTITY igrave "&#236;">
+<!-- small i, grave accent --><!ENTITY iacute "&#237;">
+<!-- small i, acute accent --><!ENTITY icirc "&#238;">
+<!-- small i, circumflex accent --><!ENTITY iuml "&#239;">
+<!-- small i, dieresis or umlaut mark --><!ENTITY eth "&#240;">
+<!-- small eth, Icelandic --><!ENTITY ntilde "&#241;">
+<!-- small n, tilde --><!ENTITY ograve "&#242;">
+<!-- small o, grave accent --><!ENTITY oacute "&#243;">
+<!-- small o, acute accent --><!ENTITY ocirc "&#244;">
+<!-- small o, circumflex accent --><!ENTITY otilde "&#245;">
+<!-- small o, tilde --><!ENTITY ouml "&#246;">
+<!-- small o, dieresis or umlaut mark --><!ENTITY divide "&#247;">
+<!-- divide sign --><!ENTITY oslash "&#248;">
+<!-- small o, slash --><!ENTITY ugrave "&#249;">
+<!-- small u, grave accent --><!ENTITY uacute "&#250;">
+<!-- small u, acute accent --><!ENTITY ucirc "&#251;">
+<!-- small u, circumflex accent --><!ENTITY uuml "&#252;">
+<!-- small u, dieresis or umlaut mark --><!ENTITY yacute "&#253;">
+<!-- small y, acute accent --><!ENTITY thorn "&#254;">
+<!-- small thorn, Icelandic --><!ENTITY yuml "&#255;">
+<!-- small y, dieresis or umlaut mark --><!--
+     Copied from HTML 3.2 DTD, with modifications (removed CDATA)
+     http://www.w3.org/TR/REC-html32.html#dtd
+     ================= END ===================
+-->
+]>
+<rss>
+<channel>
+<image/>
+<title>PP</title>
+</channel>
+</rss>
diff --git a/TC/testcase/res/UTsXml/test/valid/t10.xml b/TC/testcase/res/UTsXml/test/valid/t10.xml
new file mode 100755 (executable)
index 0000000..de066f9
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0" standalone="yes"?>
+<!DOCTYPE root [
+<!ELEMENT root  (cont1, (cont1, cont2?)+)>
+  <!ELEMENT cont1  EMPTY>
+  <!ELEMENT cont2  EMPTY>
+]>
+<root>
+  <cont1/>
+  <cont1/>
+  <cont1/>
+  <cont1/>
+</root>
diff --git a/TC/testcase/res/UTsXml/test/valid/t11.xml b/TC/testcase/res/UTsXml/test/valid/t11.xml
new file mode 100755 (executable)
index 0000000..cc3fb31
--- /dev/null
@@ -0,0 +1,2 @@
+<!DOCTYPE root SYSTEM "dtds/external.ent">
+<root>&peInCdata;</root>
diff --git a/TC/testcase/res/UTsXml/test/valid/t4.dtd b/TC/testcase/res/UTsXml/test/valid/t4.dtd
new file mode 100755 (executable)
index 0000000..27292bc
--- /dev/null
@@ -0,0 +1,4 @@
+<!ENTITY % percent "&#x25;">
+<!ENTITY %percent; def "ghi">
+<!ENTITY abc "%def;">
+<!ELEMENT root (#PCDATA)>
diff --git a/TC/testcase/res/UTsXml/test/valid/t4.xml b/TC/testcase/res/UTsXml/test/valid/t4.xml
new file mode 100755 (executable)
index 0000000..baeb9d0
--- /dev/null
@@ -0,0 +1,3 @@
+<?xml version='1.0'?>
+<!DOCTYPE root SYSTEM 't4.dtd'>
+<root>&abc;</root>
diff --git a/TC/testcase/res/UTsXml/test/valid/t4a.dtd b/TC/testcase/res/UTsXml/test/valid/t4a.dtd
new file mode 100755 (executable)
index 0000000..b7cdc7c
--- /dev/null
@@ -0,0 +1,5 @@
+<!ENTITY % percent "&#x25;">
+<!ENTITY%percent;def "ghi">
+<!ENTITY abc "%def;">
+<!ELEMENT root (#PCDATA)>
+
diff --git a/TC/testcase/res/UTsXml/test/valid/t4a.xml b/TC/testcase/res/UTsXml/test/valid/t4a.xml
new file mode 100755 (executable)
index 0000000..27fa603
--- /dev/null
@@ -0,0 +1,3 @@
+<?xml version='1.0'?>
+<!DOCTYPE root SYSTEM 't4a.dtd'>
+<root>&abc;</root>
diff --git a/TC/testcase/res/UTsXml/test/valid/t6.dtd b/TC/testcase/res/UTsXml/test/valid/t6.dtd
new file mode 100755 (executable)
index 0000000..7497c28
--- /dev/null
@@ -0,0 +1,5 @@
+<!ENTITY % xdef "def">
+<!ENTITY % %xdef; "ghi">
+<!ENTITY abc "%def;">
+<!ELEMENT root (#PCDATA)>
+
diff --git a/TC/testcase/res/UTsXml/test/valid/t6.xml b/TC/testcase/res/UTsXml/test/valid/t6.xml
new file mode 100755 (executable)
index 0000000..b9f62ca
--- /dev/null
@@ -0,0 +1,3 @@
+<?xml version='1.0'?>
+<!DOCTYPE root SYSTEM 't6.dtd'>
+<root>&abc;</root>
diff --git a/TC/testcase/res/UTsXml/test/valid/t8.xml b/TC/testcase/res/UTsXml/test/valid/t8.xml
new file mode 100755 (executable)
index 0000000..c7c2b0a
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version='1.0'?>\r
+<!DOCTYPE root [\r
+<!ENTITY % deftest '&lt;!ELEMENT test (#PCDATA) >' >\r
+<!ENTITY % defmiddle '&lt;!ELEMENT middle (test) >' >\r
+<!ENTITY % defroot '&lt;!ELEMENT root (middle) >' >\r
+%defroot; %defmiddle; %deftest;\r
+]>\r
+<root><middle><test>sample</test></middle></root>\r
diff --git a/TC/testcase/res/UTsXml/test/valid/t8a.xml b/TC/testcase/res/UTsXml/test/valid/t8a.xml
new file mode 100755 (executable)
index 0000000..13470eb
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version='1.0'?>\r
+<!DOCTYPE root [\r
+<!ENTITY % deftest '&lt;!ELEMENT test (#PCDATA) >' >\r
+<!ENTITY % defmiddle '&lt;!ELEMENT middle (test) >' >\r
+<!ENTITY % defroot '&lt;!ELEMENT root (middle) >' >\r
+%defroot;%defmiddle;%deftest;\r
+]>\r
+<root><middle><test>sample</test></middle></root>\r
diff --git a/TC/testcase/res/UTsXml/test/valid/t9.xml b/TC/testcase/res/UTsXml/test/valid/t9.xml
new file mode 100755 (executable)
index 0000000..645d35a
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version='1.0'?>\r
+<!DOCTYPE root [\r
+<!ENTITY % deftest '&#60;!ELEMENT test (#PCDATA) >' >\r
+<!ENTITY % defmiddle '&#60;!ELEMENT middle (test) >' >\r
+<!ENTITY % defroot '&#60;!ELEMENT root (middle) >' >\r
+%defroot; %defmiddle; %deftest;\r
+]>\r
+<root><middle><test>sample</test></middle></root>\r
diff --git a/TC/testcase/res/UTsXml/test/valid/t9a.xml b/TC/testcase/res/UTsXml/test/valid/t9a.xml
new file mode 100755 (executable)
index 0000000..23d3c06
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version='1.0'?>\r
+<!DOCTYPE root [\r
+<!ENTITY % deftest '&#60;!ELEMENT test (#PCDATA) >' >\r
+<!ENTITY % defmiddle '&#60;!ELEMENT middle (test) >' >\r
+<!ENTITY % defroot '&#60;!ELEMENT root (middle) >' >\r
+%defroot;%defmiddle;%deftest;\r
+]>\r
+<root><middle><test>sample</test></middle></root>\r
diff --git a/TC/testcase/res/UTsXml/test/valid/xhtml1.xhtml b/TC/testcase/res/UTsXml/test/valid/xhtml1.xhtml
new file mode 100755 (executable)
index 0000000..24d68f4
--- /dev/null
@@ -0,0 +1,1505 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "dtds/xhtml1-strict.dtd">
+<?xml-stylesheet href="W3C-PR.css" type="text/css"?>
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
+<head>
+<title>XHTML 1.0: The Extensible HyperText Markup
+Language</title>
+<link rel="stylesheet"
+href="W3C-PR.css" type="text/css" />
+<style type="text/css">
+span.term { font-style: italic; color: rgb(0, 0, 192) }
+code {
+       color: green;
+       font-family: monospace;
+       font-weight: bold;
+}
+
+code.greenmono {
+       color: green;
+       font-family: monospace;
+       font-weight: bold;
+}
+.good {
+       border: solid green;
+       border-width: 2px;
+       color: green;
+       font-weight: bold;
+       margin-right: 5%;
+       margin-left: 0;
+}
+.bad  {
+       border: solid red;
+       border-width: 2px;
+       margin-left: 0;
+       margin-right: 5%;
+       color: rgb(192, 101, 101);
+}
+
+img {
+       color: white;
+       border: none;
+}
+
+div.navbar { text-align: center; }
+div.contents {
+       background-color: rgb(204,204,255);
+       padding: 0.5em;
+       border: none;
+       margin-right: 5%;
+}
+.tocline { list-style: none; }
+table.exceptions { background-color: rgb(255,255,153); }
+</style>
+</head>
+<body>
+<div class="navbar">
+  <a href="#toc">table of contents</a> 
+  <hr />
+</div>
+<div class="head"><p><a href="http://www.w3.org/"><img class="head"
+src="w3c_home.gif" alt="W3C" /></a></p>
+
+<h1 class="head"><a name="title" id="title">XHTML</a><sup>&#8482;</sup> 1.0:
+The Extensible HyperText Markup Language</h1>
+
+<h2>A Reformulation of HTML 4.0 in XML 1.0</h2>
+
+<h3>W3C Proposed Recommendation 10 December 1999</h3>
+
+<dl>
+<dt>This version:</dt>
+
+<dd><a href=
+"http://www.w3.org/TR/1999/PR-xhtml1-19991210">
+http://www.w3.org/TR/1999/PR-xhtml1-19991210</a> <br />
+(<a href="xhtml1.ps">Postscript version</a>,
+<a href="xhtml1.pdf">PDF version</a>,
+<a href="xhtml1.zip">ZIP archive</a>, or
+<a href="xhtml1.tgz">Gzip'd TAR archive</a>)
+</dd>
+
+<dt>Latest version:</dt>
+
+<dd><a href="http://www.w3.org/TR/xhtml1">
+http://www.w3.org/TR/xhtml1</a></dd>
+
+<dt>Previous versions:</dt>
+
+<dd><a href=
+"http://www.w3.org/TR/1999/WD-xhtml1-19991124">
+http://www.w3.org/TR/1999/WD-xhtml1-19991124</a></dd>
+<dd><a href=
+"http://www.w3.org/TR/1999/PR-xhtml1-19990824">
+http://www.w3.org/TR/1999/PR-xhtml1-19990824</a></dd>
+
+<dt>Authors:</dt>
+
+<dd>See <a href="#acks">acknowledgements</a>.</dd>
+</dl>
+
+<p class="copyright"><a href= 
+"http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">
+Copyright</a> &copy; 1999 <a href="http://www.w3.org/">W3C</a><sup>&reg;</sup>
+(<a href="http://www.lcs.mit.edu/">MIT</a>, <a href= 
+"http://www.inria.fr/">INRIA</a>, <a href=
+"http://www.keio.ac.jp/">Keio</a>), All Rights Reserved. <abbr
+title="World Wide Web Consortium">W3C</abbr> <a
+href= 
+"http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">
+liability</a>, <a href= 
+"http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">
+trademark</a>, <a href= 
+"http://www.w3.org/Consortium/Legal/copyright-documents">document
+use</a> and <a href= 
+"http://www.w3.org/Consortium/Legal/copyright-software">software
+licensing</a> rules apply.</p>
+<hr />
+</div>
+
+<h2 class="notoc">Abstract</h2>
+
+<p>This specification defines <abbr title="Extensible Hypertext Markup
+Language">XHTML</abbr> 1.0, a reformulation of HTML
+4.0 as an XML 1.0 application, and three <abbr title="Document Type
+Definition">DTDs</abbr> corresponding to
+the ones defined by HTML 4.0. The semantics of the elements and
+their attributes are defined in the W3C Recommendation for HTML
+4.0. These semantics provide the foundation for future
+extensibility of XHTML. Compatibility with existing HTML user
+agents is possible by following a small set of guidelines.</p>
+
+<h2>Status of this document</h2>
+
+<p><em>This section describes the status of this document at the time
+of its publication. Other documents may supersede this document. The
+latest status of this document series is maintained at the W3C.</em></p>
+
+<p>This specification is a Proposed Recommendation of the HTML Working Group. It is 
+a revision of the Proposed Recommendation dated <a
+href= "http://www.w3.org/TR/1999/PR-xhtml1-19990824/">24 August
+1999</a> incorporating changes as a result of comments from the Proposed
+Recommendation review, and 
+comments and further deliberations of the W3C HTML Working Group. A 
+<a href="xhtml1-diff-19991210.html">diff-marked version</a> from the previous
+proposed recommendation is available for comparison purposes.</p>
+
+<p>On 10 December 1999, this document enters a
+<a href="http://www.w3.org/Consortium/Process/#RecsPR">
+Proposed Recommendation</a> review period. From that date until 8 January
+2000,
+W3C Advisory Committee representatives are encouraged
+to review this specification and return comments in their completed
+ballots to w3c-html-review@w3.org. Please send any comments of a
+confidential nature in separate email to w3t-html@w3.org, which is
+visible to the Team only.</p>
+
+<p>No sooner than 14 days after the end of the review period, the
+Director will announce the document's disposition: it may become a W3C
+Recommendation (possibly with minor changes), it may revert to Working
+Draft status, or it may be dropped as a W3C work item.</p>
+
+<p>Publication as a Proposed Recommendation does not imply endorsement
+by the W3C membership.  This is still a draft document and may be
+updated, replaced or obsoleted by other documents at any time. It is
+inappropriate to cite W3C Proposed Recommendation as other than "work
+in progress."</p>
+
+<p>This document has been produced as part of the <a href= 
+"http://www.w3.org/MarkUp/">W3C HTML Activity</a>. The goals of
+the <a href="http://www.w3.org/MarkUp/Group/">HTML Working
+Group</a> <i>(<a href="http://cgi.w3.org/MemberAccess/">members
+only</a>)</i> are discussed in the <a href= 
+"http://www.w3.org/MarkUp/Group/HTMLcharter">HTML Working Group
+charter</a> <i>(<a href="http://cgi.w3.org/MemberAccess/">members
+only</a>)</i>.</p>
+
+<p>A list of current W3C Recommendations and other technical documents
+can be found at <a
+href="http://www.w3.org/TR">http://www.w3.org/TR</a>.</p>
+
+<p>Public discussion on <abbr title="HyperText Markup
+Language">HTML</abbr> features takes place on the mailing list <a
+href="mailto:www-html@w3.org"> www-html@w3.org</a> (<a href=
+"http://lists.w3.org/Archives/Public/www-html/">archive</a>). The W3C
+staff contact for work on HTML is <a href= "mailto:dsr@w3.org">Dave
+Raggett</a>.</p>
+
+<p>Please report errors in this document to <a
+href="mailto:www-html-editor@w3.org">www-html-editor@w3.org</a>.</p>
+
+<p>The list of known errors in this specification is available at <a
+href="http://www.w3.org/1999/12/PR-xhtml1-19991210-errata">http://www.w3.org/1999/12/PR-xhtml1-19991210-errata</a>.</p>
+
+<h2 class="notoc"><a id="toc" name="toc">Contents</a></h2>
+
+<div class="contents">
+<ul class="toc">
+<li class="tocline">1. <a href="#xhtml">What is XHTML?</a> 
+
+<ul class="toc">
+<li class="tocline">1.1 <a href="#html4">What is HTML 4.0?</a></li>
+
+<li class="tocline">1.2 <a href="#xml">What is XML?</a></li>
+
+<li class="tocline">1.3 <a href="#why">Why the need for XHTML?</a></li>
+</ul>
+</li>
+
+<li class="tocline">2. <a href="#defs">Definitions</a> 
+
+<ul class="toc">
+<li class="tocline">2.1 <a href="#terms">Terminology</a></li>
+
+<li class="tocline">2.2 <a href="#general">General Terms</a></li>
+</ul>
+</li>
+
+<li class="tocline">3. <a href="#normative">Normative Definition of XHTML 1.0</a>
+
+
+<ul class="toc">
+<li class="tocline">3.1 <a href="#docconf">Document Conformance</a></li>
+
+<li class="tocline">3.2 <a href="#uaconf">User Agent Conformance</a></li>
+</ul>
+</li>
+
+<li class="tocline">4. <a href="#diffs">Differences with HTML 4.0</a> 
+
+</li>
+
+<li class="tocline">5. <a href="#issues">Compatibility Issues</a> 
+
+<ul class="toc">
+<li class="tocline">5.1 <a href="#media">Internet Media Types</a></li>
+</ul>
+</li>
+
+<li class="tocline">6. <a href="#future">Future Directions</a> 
+
+<ul class="toc">
+<li class="tocline">6.1 <a href="#mods">Modularizing HTML</a></li>
+
+<li class="tocline">6.2 <a href="#extensions">Subsets and Extensibility</a></li>
+
+<li class="tocline">6.3 <a href="#profiles">Document Profiles</a></li>
+</ul>
+</li>
+
+<li class="tocline"><a href="#dtds">Appendix A. DTDs</a></li>
+
+<li class="tocline"><a href="#prohibitions">Appendix B. Element
+Prohibitions</a></li>
+
+<li class="tocline"><a href="#guidelines">Appendix C. HTML Compatibility Guidelines</a></li>
+
+<li class="tocline"><a href="#acks">Appendix D. Acknowledgements</a></li>
+
+<li class="tocline"><a href="#refs">Appendix E. References</a></li>
+</ul>
+</div>
+
+<!--OddPage-->
+<h1><a name="xhtml" id="xhtml">1. What is XHTML?</a></h1>
+
+<p>XHTML is a family of current and future document types and modules that
+reproduce, subset, and extend HTML 4.0 <a href="#ref-html4">[HTML]</a>. XHTML family document types are <abbr title="Extensible Markup Language">XML</abbr> based,
+and ultimately are designed to work in conjunction with XML-based user agents.
+The details of this family and its evolution are
+discussed in more detail in the section on <a href="#future">Future
+Directions</a>. </p>
+
+<p>XHTML 1.0 (this specification) is the first document type in the XHTML
+family. It is a reformulation of the three HTML 4.0 document types as
+applications of XML 1.0 <a href="#ref-xml"> [XML]</a>. It is intended
+to be used as a language for content that is both XML-conforming and, if some
+simple <a href="#guidelines">guidelines</a> are followed, 
+operates in HTML 4.0 conforming user agents. Developers who migrate
+their content to XHTML 1.0 will realize the following benefits:</p>
+
+<ul>
+<li>XHTML documents are XML conforming. As such, they are readily viewed,
+edited, and validated with standard XML tools.</li>
+<li>XHTML documents can be written to
+to operate as well or better than they did before in existing
+HTML 4.0-conforming user agents as well as in new, XHTML 1.0 conforming user
+agents.</li>
+<li>XHTML documents can utilize applications (e.g. scripts and applets) that rely
+upon either the HTML Document Object Model or the XML Document Object Model <a
+href="#ref-dom">[DOM]</a>.</li>
+<li>As the XHTML family evolves, documents conforming to XHTML 1.0 will be more
+likely to interoperate within and among various XHTML environments.</li>
+</ul>
+
+<p>The XHTML family is the next step in the evolution of the Internet. By
+migrating to XHTML today, content developers can enter the XML world with all
+of its attendant benefits, while still remaining confident in their
+content's backward and future compatibility.</p>
+
+<h2><a name="html4" id="html4">1.1 What is HTML 4.0?</a></h2>
+
+<p>HTML 4.0 <a href="#ref-html4">[HTML]</a> is an <abbr title="Standard
+Generalized Markup Language">SGML</abbr> (Standard
+Generalized Markup Language) application conforming to
+International Standard <abbr title="Organization for International
+Standardization">ISO</abbr> 8879, and is widely regarded as the
+standard publishing language of the World Wide Web.</p>
+
+<p>SGML is a language for describing markup languages,
+particularly those used in electronic document exchange, document
+management, and document publishing. HTML is an example of a
+language defined in SGML.</p>
+
+<p>SGML has been around since the middle 1980's and has remained
+quite stable. Much of this stability stems from the fact that the
+language is both feature-rich and flexible. This flexibility,
+however, comes at a price, and that price is a level of
+complexity that has inhibited its adoption in a diversity of
+environments, including the World Wide Web.</p>
+
+<p>HTML, as originally conceived, was to be a language for the
+exchange of scientific and other technical documents, suitable
+for use by non-document specialists. HTML addressed the problem
+of SGML complexity by specifying a small set of structural and
+semantic tags suitable for authoring relatively simple documents.
+In addition to simplifying the document structure, HTML added
+support for hypertext. Multimedia capabilities were added
+later.</p>
+
+<p>In a remarkably short space of time, HTML became wildly
+popular and rapidly outgrew its original purpose. Since HTML's
+inception, there has been rapid invention of new elements for use
+within HTML (as a standard) and for adapting HTML to vertical,
+highly specialized, markets. This plethora of new elements has
+led to compatibility problems for documents across different
+platforms.</p>
+
+<p>As the heterogeneity of both software and platforms rapidly
+proliferate, it is clear that the suitability of 'classic' HTML
+4.0 for use on these platforms is somewhat limited.</p>
+
+<h2><a name="xml" id="xml">1.2 What is XML?</a></h2>
+
+<p>XML<sup>&#8482;</sup> is the shorthand for Extensible Markup
+Language, and is an acronym of Extensible Markup Language <a
+href="#ref-xml">[XML]</a>.</p>
+
+<p>XML was conceived as a means of regaining the power and
+flexibility of SGML without most of its complexity. Although a
+restricted form of SGML, XML nonetheless preserves most of SGML's
+power and richness, and yet still retains all of SGML's commonly
+used features.</p>
+
+<p>While retaining these beneficial features, XML removes many of
+the more complex features of SGML that make the authoring and
+design of suitable software both difficult and costly.</p>
+
+<h2><a name="why" id="why">1.3 Why the need for XHTML?</a></h2>
+
+<p>The benefits of migrating to XHTML 1.0 are described above. Some of the
+benefits of migrating to XHTML in general are:</p>
+
+<ul>
+<li>Document developers and user agent designers are constantly
+discovering new ways to express their ideas through new markup. In XML, it is
+relatively easy to introduce new elements or additional element
+attributes.  The XHTML family is designed to accommodate these extensions
+through XHTML modules and techniques for developing new XHTML-conforming
+modules (described in the forthcoming XHTML Modularization specification).
+These modules will permit the combination of existing and
+new feature sets when developing content and when designing new user
+agents.</li>
+
+<li>Alternate ways of accessing the Internet are constantly being
+introduced.  Some estimates indicate that by the year 2002, 75% of
+Internet document viewing will be carried out on these alternate
+platforms.  The XHTML family is designed with general user agent
+interoperability in mind. Through a new user agent and document profiling
+mechanism, servers, proxies, and user agents will be able to perform
+best effort content transformation. Ultimately, it will be possible to
+develop XHTML-conforming content that is usable by any XHTML-conforming
+user agent.</li>
+
+</ul>
+<!--OddPage-->
+<h1><a name="defs" id="defs">2. Definitions</a></h1>
+
+<h2><a name="terms" id="terms">2.1 Terminology</a></h2>
+
+<p>The following terms are used in this specification. These
+terms extend the definitions in <a href="#ref-rfc2119">
+[RFC2119]</a> in ways based upon similar definitions in ISO/<abbr
+title="International Electro-technical Commission">IEC</abbr>
+9945-1:1990 <a href="#ref-posix">[POSIX.1]</a>:</p>
+
+<dl>
+<dt>Implementation-defined</dt>
+
+<dd>A value or behavior is implementation-defined when it is left
+to the implementation to define [and document] the corresponding
+requirements for correct document construction.</dd>
+
+<dt>May</dt>
+
+<dd>With respect to implementations, the word "may" is to be
+interpreted as an optional feature that is not required in this
+specification but can be provided. With respect to <a href= 
+"#docconf">Document Conformance</a>, the word "may" means that
+the optional feature must not be used. The term "optional" has
+the same definition as "may".</dd>
+
+<dt>Must</dt>
+
+<dd>In this specification, the word "must" is to be interpreted
+as a mandatory requirement on the implementation or on Strictly
+Conforming XHTML Documents, depending upon the context. The term
+"shall" has the same definition as "must".</dd>
+
+<dt>Reserved</dt>
+
+<dd>A value or behavior is unspecified, but it is not allowed to
+be used by Conforming Documents nor to be supported by a
+Conforming User Agents.</dd>
+
+<dt>Should</dt>
+
+<dd>With respect to implementations, the word "should" is to be
+interpreted as an implementation recommendation, but not a
+requirement. With respect to documents, the word "should" is to
+be interpreted as recommended programming practice for documents
+and a requirement for Strictly Conforming XHTML Documents.</dd>
+
+<dt>Supported</dt>
+
+<dd>Certain facilities in this specification are optional. If a
+facility is supported, it behaves as specified by this
+specification.</dd>
+
+<dt>Unspecified</dt>
+
+<dd>When a value or behavior is unspecified, the specification
+defines no portability requirements for a facility on an
+implementation even when faced with a document that uses the
+facility. A document that requires specific behavior in such an
+instance, rather than tolerating any behavior when using that
+facility, is not a Strictly Conforming XHTML Document.</dd>
+</dl>
+
+<h2><a name="general" id="general">2.2 General Terms</a></h2>
+
+<dl>
+<dt>Attribute</dt>
+
+<dd>An attribute is a parameter to an element declared in the
+DTD. An attribute's type and value range, including a possible
+default value, are defined in the DTD.</dd>
+
+<dt>DTD</dt>
+
+<dd>A DTD, or document type definition, is a collection of XML
+declarations that, as a collection, defines the legal structure,
+<span class="term">elements</span>, and <span class="term">
+attributes</span> that are available for use in a document that
+complies to the DTD.</dd>
+
+<dt>Document</dt>
+
+<dd>A document is a stream of data that, after being combined
+with any other streams it references, is structured such that it
+holds information contained within <span class="term">
+elements</span> that are organized as defined in the associated
+<span class="term">DTD</span>. See <a href="#docconf">Document
+Conformance</a> for more information.</dd>
+
+<dt>Element</dt>
+
+<dd>An element is a document structuring unit declared in the
+<span class="term">DTD</span>. The element's content model is
+defined in the <span class="term">DTD</span>, and additional
+semantics may be defined in the prose description of the
+element.</dd>
+
+<dt><a name="facilities" id="facilities">Facilities</a></dt>
+
+<dd>Functionality includes <span class="term">elements</span>,
+<span class="term">attributes</span>, and the semantics
+associated with those <span class="term">elements</span> and
+<span class="term">attributes</span>. An implementation
+supporting that functionality is said to provide the necessary
+facilities.</dd>
+
+<dt>Implementation</dt>
+
+<dd>An implementation is a system that provides collection of
+<span class="term">facilities</span> and services that supports
+this specification. See <a href="#uaconf">User Agent
+Conformance</a> for more information.</dd>
+
+<dt>Parsing</dt>
+
+<dd>Parsing is the act whereby a <span class="term">
+document</span> is scanned, and the information contained within
+the <span class="term">document</span> is filtered into the
+context of the <span class="term">elements</span> in which the
+information is structured.</dd>
+
+<dt>Rendering</dt>
+
+<dd>Rendering is the act whereby the information in a <span
+class="term">document</span> is presented. This presentation is
+done in the form most appropriate to the environment (e.g.
+aurally, visually, in print).</dd>
+
+<dt>User Agent</dt>
+
+<dd>A user agent is an <span class="term">implementation</span>
+that retrieves and processes XHTML documents. See <a href=
+"#uaconf">User Agent Conformance</a> for more information.</dd>
+
+<dt>Validation</dt>
+
+<dd>Validation is a process whereby <span class="term">
+documents</span> are verified against the associated <span class= 
+"term">DTD</span>, ensuring that the structure, use of <span
+class="term">elements</span>, and use of <span class="term">
+attributes</span> are consistent with the definitions in the
+<span class="term">DTD</span>.</dd>
+
+<dt><a name="wellformed" id="wellformed">Well-formed</a></dt>
+
+<dd>A <span class="term">document</span> is well-formed when it
+is structured according to the rules defined in <a href= 
+"http://www.w3.org/TR/REC-xml#sec-well-formed">Section 2.1</a> of
+the XML 1.0 Recommendation <a href="#ref-xml">[XML]</a>.
+Basically, this definition states that elements, delimited by
+their start and end tags, are nested properly within one
+another.</dd>
+</dl>
+
+<!--OddPage-->
+<h1><a name="normative" id="normative">3. Normative Definition of
+XHTML 1.0</a></h1>
+
+<h2><a name="docconf" id="docconf">3.1 Document
+Conformance</a></h2>
+
+<p>This version of XHTML provides a definition of strictly
+conforming XHTML documents, which are restricted to tags and
+attributes from the XHTML namespace. See <a href=
+"#well-formed">Section 3.1.2</a> for information on using XHTML
+with other namespaces, for instance, to include metadata
+expressed in <abbr title="Resource Description Format">RDF</abbr> within XHTML documents.</p>
+
+<h3><a name="strict" id="strict">3.1.1 Strictly Conforming
+Documents</a></h3>
+
+<p>A Strictly Conforming XHTML Document is a document that
+requires only the facilities described as mandatory in this
+specification. Such a document must meet all of the following
+criteria:</p>
+
+<ol>
+<li>
+<p>It must validate against one of the three DTDs found in <a
+href="#dtds">Appendix&#160;A</a>.</p>
+</li>
+
+<li>
+<p>The root element of the document must be <code>
+&lt;html&gt;</code>.</p>
+</li>
+
+<li>
+<p>The root element of the document must designate the XHTML
+namespace using the <code>xmlns</code> attribute <a href= 
+"#ref-xmlns">[XMLNAMES]</a>. The namespace for XHTML is
+defined to be 
+<code>http://www.w3.org/1999/xhtml</code>.</p>
+</li>
+
+<li>
+<p>There must be a DOCTYPE declaration in the document prior to
+the root element. The public identifier included in
+the DOCTYPE declaration must reference one of the three DTDs
+found in <a href="#dtds">Appendix&#160;A</a> using the respective
+Formal Public Identifier. The system identifier may be changed to reflect
+local system conventions.</p>
+
+<pre>
+&lt;!DOCTYPE html 
+     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+     "http://www.w3.org/TR/1999/PR-xhtml1-19991210/DTD/xhtml1-strict.dtd&gt;
+
+&lt;!DOCTYPE html 
+     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+     "http://www.w3.org/TR/1999/PR-xhtml1-19991210/DTD/xhtml1-transitional.dtd&gt;
+
+&lt;!DOCTYPE html 
+     PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
+     "http://www.w3.org/TR/1999/PR-xhtml1-19991210/DTD/xhtml1-frameset.dtd&gt;
+</pre>
+</li>
+</ol>
+
+<p>Here is an example of a minimal XHTML document.</p>
+
+<div class="good">
+<pre>
+&lt;?xml version="1.0" encoding="UTF-8"?&gt;
+&lt;!DOCTYPE html 
+     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+    "http://www.w3.org/TR/1999/PR-xhtml1-19991210/DTD/xhtml1-strict.dtd"&gt;
+&lt;html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"&gt;
+  &lt;head&gt;
+    &lt;title&gt;Virtual Library&lt;/title&gt;
+  &lt;/head&gt;
+  &lt;body&gt;
+    &lt;p&gt;Moved to &lt;a href="http://vlib.org/"&gt;vlib.org&lt;/a&gt;.&lt;/p&gt;
+  &lt;/body&gt;
+&lt;/html&gt;</pre>
+</div>
+
+<p>Note that in this example, the XML declaration is included. An XML
+declaration like the one above is
+not required in all XML documents. XHTML document authors are strongly encouraged to use XML declarations in all their documents. Such a declaration is required
+when the character encoding of the document is other than the default UTF-8 or
+UTF-16.</p>
+
+<h3><a name="well-formed" id="well-formed">3.1.2 Using XHTML with
+other namespaces</a></h3>
+
+<p>The XHTML namespace may be used with other XML namespaces
+as per <a href="#ref-xmlns">[XMLNAMES]</a>, although such
+documents are not strictly conforming XHTML 1.0 documents as
+defined above. Future work by W3C will address ways to specify
+conformance for documents involving multiple namespaces.</p>
+
+<p>The following example shows the way in which XHTML 1.0 could
+be used in conjunction with the MathML Recommendation:</p>
+
+<div class="good">
+<pre>
+&lt;html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"&gt;
+  &lt;head&gt;
+    &lt;title&gt;A Math Example&lt;/title&gt;
+  &lt;/head&gt;
+  &lt;body&gt;
+    &lt;p&gt;The following is MathML markup:&lt;/p&gt;
+    &lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;
+      &lt;apply&gt; &lt;log/&gt;
+        &lt;logbase&gt;
+          &lt;cn&gt; 3 &lt;/cn&gt;
+        &lt;/logbase&gt;
+        &lt;ci&gt; x &lt;/ci&gt;
+      &lt;/apply&gt;
+    &lt;/math&gt;
+  &lt;/body&gt;
+&lt;/html&gt;
+</pre>
+</div>
+
+<p>The following example shows the way in which XHTML 1.0 markup
+could be incorporated into another XML namespace:</p>
+
+<div class="good">
+<pre>
+&lt;?xml version="1.0" encoding="UTF-8"?&gt;
+&lt;!-- initially, the default namespace is "books" --&gt;
+&lt;book xmlns='urn:loc.gov:books'
+    xmlns:isbn='urn:ISBN:0-395-36341-6' xml:lang="en" lang="en"&gt;
+  &lt;title&gt;Cheaper by the Dozen&lt;/title&gt;
+  &lt;isbn:number&gt;1568491379&lt;/isbn:number&gt;
+  &lt;notes&gt;
+    &lt;!-- make HTML the default namespace for a hypertext commentary --&gt;
+    &lt;p xmlns='http://www.w3.org/1999/xhtml'&gt;
+        This is also available &lt;a href="http://www.w3.org/"&gt;online&lt;/a&gt;.
+    &lt;/p&gt;
+  &lt;/notes&gt;
+&lt;/book&gt;
+</pre>
+</div>
+
+<h2><a name="uaconf" id="uaconf">3.2 User Agent
+Conformance</a></h2>
+
+<p>A conforming user agent must meet all of the following
+criteria:</p>
+
+<ol>
+<li>In order to be consistent with the XML 1.0 Recommendation <a
+href="#ref-xml">[XML]</a>, the user agent must parse and evaluate
+an XHTML document for well-formedness. If the user agent claims
+to be a validating user agent, it must also validate documents
+against their referenced DTDs according to <a href="#ref-xml">
+[XML]</a>.</li>
+
+<li>When the user agent claims to support <a href="#facilities">
+facilities</a> defined within this specification or required by
+this specification through normative reference, it must do so in
+ways consistent with the facilities' definition.</li>
+
+<li>When a user agent processes an XHTML document as generic XML,
+it shall only recognize attributes of type
+<code>ID</code> (e.g. the <code>id</code> attribute on most XHTML elements)
+as fragment identifiers.</li>
+
+<li>If a user agent encounters an element it does not recognize,
+it must render the element's content.</li>
+
+<li>If a user agent encounters an attribute it does not
+recognize, it must ignore the entire attribute specification
+(i.e., the attribute and its value).</li>
+
+<li>If a user agent encounters an attribute value it doesn't
+recognize, it must use the default attribute value.</li>
+
+<li>If it encounters an entity reference (other than one
+of the predefined entities) for which the User Agent has 
+processed no declaration (which could happen if the declaration
+is in the external subset which the User Agent hasn't read), the entity 
+reference should be rendered as the characters (starting
+with the ampersand and ending with the semi-colon) that
+make up the entity reference.</li>
+
+<li>When rendering content, User Agents that encounter 
+characters or character entity references that are recognized but not renderable should display the document in such a way that it is obvious to the user that normal rendering has not taken place.</li>
+
+<li>
+The following characters are defined in [XML] as whitespace characters:
+
+<ul>
+<li>Space (&amp;#x0020;)</li>
+<li>Tab (&amp;#x0009;)</li>
+<li>Carriage return (&amp;#x000D;)</li>
+<li>Line feed (&amp;#x000A;)</li>
+</ul>
+
+<p>
+The XML processor normalizes different system's line end codes into one
+single line-feed character, that is passed up to the application. The XHTML
+user agent in addition, must treat the following characters as whitespace:
+</p>
+
+<ul>
+<li>Form feed (&amp;#x000C;)</li>
+<li>Zero-width space (&amp;#x200B;)</li>
+</ul>
+
+<p>
+In elements where the 'xml:space' attribute is set to 'preserve', the user
+agent must leave all whitespace characters intact (with the exception of
+leading and trailing whitespace characters, which should be removed).
+Otherwise, whitespace
+is handled according to the following rules:
+</p>
+
+<ul>
+<li>
+All whitespace surrounding block elements should be removed.
+</li>
+<li>
+Comments are removed entirely and do not affect whitespace handling. One
+whitespace character on either side of a comment is treated as two white
+space characters.
+</li>
+<li>
+Leading and trailing whitespace inside a block element must be removed.
+</li>
+<li>Line feed characters within a block element must be converted into a
+space (except when the 'xml:space' attribute is set to 'preserve').
+</li>
+<li>
+A sequence of white space characters must be reduced to a single space
+character (except when the 'xml:space' attribute is set to 'preserve').
+</li>
+<li>
+With regard to rendition,
+the User Agent should render the content in a
+manner appropriate to the language in which the content is written.
+In languages whose primary script is Latinate, the ASCII space
+character is typically used to encode both grammatical word boundaries and
+typographic whitespace; in languages whose script is related to Nagari
+(e.g., Sanskrit, Thai, etc.), grammatical boundaries may be encoded using
+the ZW 'space' character, but will not typically be represented by
+typographic whitespace in rendered output; languages using Arabiform scripts
+may encode typographic whitespace using a space character, but may also use
+the ZW space character to delimit 'internal' grammatical boundaries (what
+look like words in Arabic to an English eye frequently encode several words,
+e.g. 'kitAbuhum' = 'kitAbu-hum' = 'book them' == their book); and languages
+in the Chinese script tradition typically neither encode such delimiters nor
+use typographic whitespace in this way. 
+</li>
+</ul>
+
+<p>Whitespace in attribute values is processed according to <a
+href="#ref-xml">[XML]</a>.</p>
+</li>
+</ol>
+
+<!--OddPage-->
+<h1><a name="diffs" id="diffs">4. Differences with HTML
+4.0</a></h1>
+
+<p>Due to the fact that XHTML is an XML application, certain
+practices that were perfectly legal in SGML-based HTML 4.0 <a
+href="#ref-html4">[HTML]</a> must be changed.</p>
+
+<h2><a name="h-4.1" id="h-4.1">4.1 Documents must be
+well-formed</a></h2>
+
+<p><a href="#wellformed">Well-formedness</a> is a new concept
+introduced by <a href="#ref-xml">[XML]</a>. Essentially this
+means that all elements must either have closing tags or be
+written in a special form (as described below), and that all the
+elements must nest.</p>
+
+<p>Although overlapping is illegal in SGML, it was widely
+tolerated in existing browsers.</p>
+
+<div class="good">
+<p><strong><em>CORRECT: nested elements.</em></strong></p>
+
+<p>&lt;p&gt;here is an emphasized
+&lt;em&gt;paragraph&lt;/em&gt;.&lt;/p&gt;</p>
+</div>
+
+<div class="bad">
+<p><strong><em>INCORRECT: overlapping elements</em></strong></p>
+
+<p>&lt;p&gt;here is an emphasized
+&lt;em&gt;paragraph.&lt;/p&gt;&lt;/em&gt;</p>
+</div>
+
+<h2><a name="h-4.2" id="h-4.2">4.2 Element and attribute
+names must be in lower case</a></h2>
+
+<p>XHTML documents must use lower case for all HTML element and
+attribute names. This difference is necessary because XML is
+case-sensitive e.g. &lt;li&gt; and &lt;LI&gt; are different
+tags.</p>
+
+<h2><a name="h-4.3" id="h-4.3">4.3 For non-empty elements,
+end tags are required</a></h2>
+
+<p>In SGML-based HTML 4.0 certain elements were permitted to omit
+the end tag; with the elements that followed implying closure.
+This omission is not permitted in XML-based XHTML. All elements
+other than those declared in the DTD as <code>EMPTY</code> must
+have an end tag.</p>
+
+<div class="good">
+<p><strong><em>CORRECT: terminated elements</em></strong></p>
+
+<p>&lt;p&gt;here is a paragraph.&lt;/p&gt;&lt;p&gt;here is
+another paragraph.&lt;/p&gt;</p>
+</div>
+
+<div class="bad">
+<p><strong><em>INCORRECT: unterminated elements</em></strong></p>
+
+<p>&lt;p&gt;here is a paragraph.&lt;p&gt;here is another
+paragraph.</p>
+</div>
+
+<h2><a name="h-4.4" id="h-4.4">4.4 Attribute values must
+always be quoted</a></h2>
+
+<p>All attribute values must be quoted, even those which appear
+to be numeric.</p>
+
+<div class="good">
+<p><strong><em>CORRECT: quoted attribute values</em></strong></p>
+
+<p>&lt;table rows="3"&gt;</p>
+</div>
+
+<div class="bad">
+<p><strong><em>INCORRECT: unquoted attribute values</em></strong></p>
+
+<p>&lt;table rows=3&gt;</p>
+</div>
+
+<h2><a name="h-4.5" id="h-4.5">4.5 Attribute
+Minimization</a></h2>
+
+<p>XML does not support attribute minimization. Attribute-value
+pairs must be written in full. Attribute names such as <code>
+compact</code> and <code>checked</code> cannot occur in elements
+without their value being specified.</p>
+
+<div class="good">
+<p><strong><em>CORRECT: unminimized attributes</em></strong></p>
+
+<p>&lt;dl compact="compact"&gt;</p>
+</div>
+
+<div class="bad">
+<p><strong><em>INCORRECT: minimized attributes</em></strong></p>
+
+<p>&lt;dl compact&gt;</p>
+</div>
+
+<h2><a name="h-4.6" id="h-4.6">4.6 Empty Elements</a></h2>
+
+<p>Empty elements must either have an end tag or the start tag must end with <code>/&gt;</code>. For instance,
+<code>&lt;br/&gt;</code> or <code>&lt;hr&gt;&lt;/hr&gt;</code>. See <a
+href="#guidelines">HTML Compatibility Guidelines</a> for information on ways to
+ensure this is backward compatible with HTML 4.0 user agents.</p>
+
+<div class="good">
+<p><strong><em>CORRECT: terminated empty tags</em></strong></p>
+
+<p>&lt;br/&gt;&lt;hr/&gt;</p>
+</div>
+
+<div class="bad">
+<p><strong><em>INCORRECT: unterminated empty tags</em></strong></p>
+
+<p>&lt;br&gt;&lt;hr&gt;</p>
+</div>
+
+<h2><a name="h-4.7" id="h-4.7">4.7 Whitespace handling in
+attribute values</a></h2>
+
+<p>In attribute values, user agents will strip leading and
+trailing whitespace from attribute values and map sequences
+of one or more whitespace characters (including line breaks) to
+a single inter-word space (an ASCII space character for western
+scripts). See <a href="http://www.w3.org/TR/REC-xml#AVNormalize">
+Section 3.3.3</a> of <a href="#ref-xml">[XML]</a>.</p>
+
+<h2><a name="h-4.8" id="h-4.8">4.8 Script and Style
+elements</a></h2>
+
+<p>In XHTML, the script and style elements are declared as having
+<code>#PCDATA</code> content. As a result, <code>&lt;</code> and
+<code>&amp;</code> will be treated as the start of markup, and
+entities such as <code>&amp;lt;</code> and <code>&amp;amp;</code>
+will be recognized as entity references by the XML processor to
+<code>&lt;</code> and <code>&amp;</code> respectively. Wrapping
+the content of the script or style element within a <code>
+CDATA</code> marked section avoids the expansion of these
+entities.</p>
+
+<div class="good">
+<pre>
+&lt;script&gt;
+ &lt;![CDATA[
+ ... unescaped script content ...
+ ]]&gt;
+ &lt;/script&gt;
+</pre>
+</div>
+
+<p><code>CDATA</code> sections are recognized by the XML
+processor and appear as nodes in the Document Object Model, see
+<a href= 
+"http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#ID-E067D597">
+Section 1.3</a> of the DOM Level 1 Recommendation <a href= 
+"#ref-dom">[DOM]</a>.</p>
+
+<p>An alternative is to use external script and style
+documents.</p>
+
+<h2><a name="h-4.9" id="h-4.9">4.9 SGML exclusions</a></h2>
+
+<p>SGML gives the writer of a DTD the ability to exclude specific
+elements from being contained within an element. Such
+prohibitions (called "exclusions") are not possible in XML.</p>
+
+<p>For example, the HTML 4.0 Strict DTD forbids the nesting of an
+'<code>a</code>' element within another '<code>a</code>' element
+to any descendant depth. It is not possible to spell out such
+prohibitions in XML. Even though these prohibitions cannot be
+defined in the DTD, certain elements should not be nested. A
+summary of such elements and the elements that should not be
+nested in them is found in the normative <a href="#prohibitions">
+Appendix&#160;B</a>.</p>
+
+<h2><a name="h-4.10" id="h-4.10">4.10 The elements with 'id' and 'name'
+attributes</a></h2>
+
+<p>HTML 4.0 defined the <code>name</code> attribute for the elements
+<code>a</code>,
+<code>applet</code>, <code>frame</code>,
+<code>iframe</code>, <code>img</code>, and <code>map</code>.
+HTML 4.0 also introduced
+the <code>id</code> attribute. Both of these attributes are designed to be
+used as fragment identifiers.</p>
+<p>In XML, fragment identifiers are of type <code>ID</code>, and
+there can only be a single attribute of type <code>ID</code> per element.
+Therefore, in XHTML 1.0 the <code>id</code>
+attribute is defined to be of type <code>ID</code>. In order to
+ensure that XHTML 1.0 documents are well-structured XML documents, XHTML 1.0
+documents MUST use the <code>id</code> attribute when defining fragment
+identifiers, even on elements that historically have also had a
+<code>name</code> attribute.
+See the <a href="#guidelines">HTML Compatibility
+Guidelines</a> for information on ensuring such anchors are backwards
+compatible when serving XHTML documents as media type <code>text/html</code>.
+</p>
+<p>Note that in XHTML 1.0, the <code>name</code> attribute of these
+elements is formally deprecated, and will be removed in a
+subsequent version of XHTML.</p>
+
+<!--OddPage-->
+<h1><a name="issues" id="issues">5. Compatibility Issues</a></h1>
+
+<p>Although there is no requirement for XHTML 1.0 documents to be
+compatible with existing user agents, in practice this is easy to
+accomplish. Guidelines for creating compatible documents can be
+found in <a href="#guidelines">Appendix&#160;C</a>.</p>
+
+<h2><a name="media" id="media">5.1 Internet Media Type</a></h2>
+<p>As of the publication of this recommendation, the general
+recommended MIME labeling for XML-based applications
+has yet to be resolved.</p>
+
+<p>However, XHTML Documents which follow the guidelines set forth
+in <a href="#guidelines">Appendix C</a>, "HTML Compatibility Guidelines" may be
+labeled with the Internet Media Type "text/html", as they
+are compatible with most HTML browsers. This document
+makes no recommendation about MIME labeling of other
+XHTML documents.</p>
+
+<!--OddPage-->
+<h1><a name="future" id="future">6. Future Directions</a></h1>
+
+<p>XHTML 1.0 provides the basis for a family of document types
+that will extend and subset XHTML, in order to support a wide
+range of new devices and applications, by defining modules and
+specifying a mechanism for combining these modules. This
+mechanism will enable the extension and sub-setting of XHTML 1.0
+in a uniform way through the definition of new modules.</p>
+
+<h2><a name="mods" id="mods">6.1 Modularizing HTML</a></h2>
+
+<p>As the use of XHTML moves from the traditional desktop user
+agents to other platforms, it is clear that not all of the XHTML
+elements will be required on all platforms. For example a hand
+held device or a cell-phone may only support a subset of XHTML
+elements.</p>
+
+<p>The process of modularization breaks XHTML up into a series of
+smaller element sets. These elements can then be recombined to
+meet the needs of different communities.</p>
+
+<p>These modules will be defined in a later W3C document.</p>
+
+<h2><a name="extensions" id="extensions">6.2 Subsets and
+Extensibility</a></h2>
+
+<p>Modularization brings with it several advantages:</p>
+
+<ul>
+<li>
+<p>It provides a formal mechanism for sub-setting XHTML.</p>
+</li>
+
+<li>
+<p>It provides a formal mechanism for extending XHTML.</p>
+</li>
+
+<li>
+<p>It simplifies the transformation between document types.</p>
+</li>
+
+<li>
+<p>It promotes the reuse of modules in new document types.</p>
+</li>
+</ul>
+
+<h2><a name="profiles" id="profiles">6.3 Document
+Profiles</a></h2>
+
+<p>A document profile specifies the syntax and semantics of a set
+of documents. Conformance to a document profile provides a basis
+for interoperability guarantees. The document profile specifies
+the facilities required to process documents of that type, e.g.
+which image formats can be used, levels of scripting, style sheet
+support, and so on.</p>
+
+<p>For product designers this enables various groups to define
+their own standard profile.</p>
+
+<p>For authors this will obviate the need to write several
+different versions of documents for different clients.</p>
+
+<p>For special groups such as chemists, medical doctors, or
+mathematicians this allows a special profile to be built using
+standard HTML elements plus a group of elements geared to the
+specialist's needs.</p>
+
+<!--OddPage-->
+<h1><a name="appendices" id="appendices"></a>
+<a name="dtds" id="dtds">Appendix A. DTDs</a></h1>
+
+<p><b>This appendix is normative.</b></p>
+
+<p>These DTDs and entity sets form a normative part of this
+specification. The complete set of DTD files together with an XML
+declaration and SGML Open Catalog is included in the <a href= 
+"xhtml1.zip">zip file</a> for this specification.</p>
+
+<h2><a name="h-A1" id="h-A1">A.1 Document Type
+Definitions</a></h2>
+
+<p>These DTDs approximate the HTML 4.0 DTDs. It is likely that
+when the DTDs are modularized, a method of DTD construction will
+be employed that corresponds more closely to HTML 4.0.</p>
+
+<ul>
+<li>
+<p><a href="DTD/xhtml1-strict.dtd" type="text/plain">
+XHTML-1.0-Strict</a></p>
+</li>
+
+<li>
+<p><a href="DTD/xhtml1-transitional.dtd" type="text/plain">
+XHTML-1.0-Transitional</a></p>
+</li>
+
+<li>
+<p><a href="DTD/xhtml1-frameset.dtd" type="text/plain">
+XHTML-1.0-Frameset</a></p>
+</li>
+</ul>
+
+<h2><a name="h-A2" id="h-A2">A.2 Entity Sets</a></h2>
+
+<p>The XHTML entity sets are the same as for HTML 4.0, but have
+been modified to be valid XML 1.0 entity declarations. Note the
+entity for the Euro currency sign (<code>&amp;euro;</code> or
+<code>&amp;#8364;</code> or <code>&amp;#x20AC;</code>) is defined
+as part of the special characters.</p>
+
+<ul>
+<li>
+<p><a href="DTD/xhtml-lat1.ent">Latin-1 characters</a></p>
+</li>
+
+<li>
+<p><a href="DTD/xhtml-special.ent">Special characters</a></p>
+</li>
+
+<li>
+<p><a href="DTD/xhtml-symbol.ent">Symbols</a></p>
+</li>
+</ul>
+
+<!--OddPage-->
+<h1><a name="prohibitions" id="prohibitions">Appendix B. Element
+Prohibitions</a></h1>
+
+<p><b>This appendix is normative.</b></p>
+
+<p>The following elements have prohibitions on which elements
+they can contain (see <a href="#h-4.9">Section 4.9</a>). This
+prohibition applies to all depths of nesting, i.e. it contains
+all the descendant elements.</p>
+
+<dl><dt><code class="tag">a</code></dt>
+<dd>
+cannot contain other <code>a</code> elements.</dd>
+<dt><code class="tag">pre</code></dt>
+<dd>cannot contain the <code>img</code>, <code>object</code>,
+<code>big</code>, <code>small</code>, <code>sub</code>, or <code>
+sup</code> elements.</dd>
+
+<dt><code class="tag">button</code></dt>
+<dd>cannot contain the <code>input</code>, <code>select</code>,
+<code>textarea</code>, <code>label</code>, <code>button</code>,
+<code>form</code>, <code>fieldset</code>, <code>iframe</code> or
+<code>isindex</code> elements.</dd>
+<dt><code class="tag">label</code></dt>
+<dd>cannot contain other <code class="tag">label</code> elements.</dd>
+<dt><code class="tag">form</code></dt>
+<dd>cannot contain other <code>form</code> elements.</dd>
+</dl>
+
+<!--OddPage-->
+<h1><a name="guidelines" id="guidelines">Appendix C.
+HTML Compatibility Guidelines</a></h1>
+
+<p><b>This appendix is informative.</b></p>
+
+<p>This appendix summarizes design guidelines for authors who
+wish their XHTML documents to render on existing HTML user
+agents.</p>
+
+<h2>C.1 Processing Instructions</h2>
+<p>Be aware that processing instructions are rendered on some
+user agents. However, also note that when the XML declaration is not included
+in a document, the document can only use the default character encodings UTF-8
+or UTF-16.</p>
+
+<h2>C.2 Empty Elements</h2>
+<p>Include a space before the trailing <code>/</code> and <code>
+&gt;</code> of empty elements, e.g. <code class="greenmono">
+&lt;br&#160;/&gt;</code>, <code class="greenmono">
+&lt;hr&#160;/&gt;</code> and <code class="greenmono">&lt;img
+src="karen.jpg" alt="Karen"&#160;/&gt;</code>. Also, use the
+minimized tag syntax for empty elements, e.g. <code class= 
+"greenmono">&lt;br /&gt;</code>, as the alternative syntax <code
+class="greenmono">&lt;br&gt;&lt;/br&gt;</code> allowed by XML
+gives uncertain results in many existing user agents.</p>
+
+<h2>C.3 Element Minimization and Empty Element Content</h2>
+<p>Given an empty instance of an element whose content model is
+not <code>EMPTY</code> (for example, an empty title or paragraph)
+do not use the minimized form (e.g. use <code class="greenmono">
+&lt;p&gt; &lt;/p&gt;</code> and not <code class="greenmono">
+&lt;p&#160;/&gt;</code>).</p>
+
+<h2>C.4 Embedded Style Sheets and Scripts</h2>
+<p>Use external style sheets if your style sheet uses <code>
+&lt;</code> or <code>&amp;</code> or <code>]]&gt;</code> or <code>--</code>. Use
+external scripts if your script uses <code>&lt;</code> or <code>
+&amp;</code> or <code>]]&gt;</code> or <code>--</code>. Note that XML parsers
+are permitted to silently remove the contents of comments. Therefore, the historical
+practice of "hiding" scripts and style sheets within comments to make the
+documents backward compatible is likely to not work as expected in XML-based
+implementations.</p>
+
+<h2>C.5 Line Breaks within Attribute Values</h2>
+<p>Avoid line breaks and multiple whitespace characters within
+attribute values. These are handled inconsistently by user
+agents.</p>
+
+<h2>C.6 Isindex</h2>
+<p>Don't include more than one <code>isindex</code> element in
+the document <code>head</code>. The <code>isindex</code> element
+is deprecated in favor of the <code>input</code> element.</p>
+
+<h2>C.7 The <code>lang</code> and <code>xml:lang</code> Attributes</h2>
+<p>Use both the <code>lang</code> and <code>xml:lang</code>
+attributes when specifying the language of an element. The value
+of the <code>xml:lang</code> attribute takes precedence.</p>
+
+<h2>C.8 Fragment Identifiers</h2>
+<p>In XML, <abbr title="Uniform Resource Identifiers">URIs</abbr> [<a href="#ref-rfc2396">RFC2396</a>] that end with fragment identifiers of the form
+<code>"#foo"</code> do not refer to elements with an attribute
+<code>name="foo"</code>; rather, they refer to elements with an
+attribute defined to be of type <code>ID</code>, e.g., the <code>
+id</code> attribute in HTML 4.0. Many existing HTML clients don't
+support the use of <code>ID</code>-type attributes in this way,
+so identical values may be supplied for both of these attributes to ensure
+maximum forward and backward compatibility (e.g., <code class= 
+"greenmono">&lt;a id="foo" name="foo"&gt;...&lt;/a&gt;</code>).</p>
+
+<p>Further, since the set of
+legal values for attributes of type <code>ID</code> is much smaller than
+for those of type <code>CDATA</code>, the type of the <code>name</code>
+attribute has been changed to <code>NMTOKEN</code>. This attribute is 
+constrained such that it can only have the same values as type
+<code>ID</code>, or as the <code>Name</code> production in XML 1.0 Section
+2.5, production 5. Unfortunately, this constraint cannot be expressed in the
+XHTML 1.0 DTDs.  Because of this change, care must be taken when
+converting existing HTML documents. The values of these attributes
+must be unique within the document, valid, and any references to these 
+fragment identifiers (both
+internal and external) must be updated should the values be changed during
+conversion.</p>
+<p>Finally, note that XHTML 1.0 has deprecated the
+<code>name</code> attribute of the <code>a</code>, <code>applet</code>, <code>frame</code>, <code>iframe</code>, <code>img</code>, and <code>map</code>
+elements, and it will be
+removed from XHTML in subsequent versions.</p>
+
+<h2>C.9 Character Encoding</h2>
+<p>To specify a character encoding in the document, use both the
+encoding attribute specification on the xml declaration (e.g.
+<code class="greenmono">&lt;?xml version="1.0"
+encoding="EUC-JP"?&gt;</code>) and a meta http-equiv statement
+(e.g. <code class="greenmono">&lt;meta http-equiv="Content-type"
+content='text/html; charset="EUC-JP"'&#160;/&gt;</code>). The
+value of the encoding attribute of the xml processing instruction
+takes precedence.</p>
+
+<h2>C.10 Boolean Attributes</h2>
+<p>Some HTML user agents are unable to interpret boolean
+attributes when these appear in their full (non-minimized) form,
+as required by XML 1.0. Note this problem doesn't effect user
+agents compliant with HTML 4.0. The following attributes are
+involved: <code>compact</code>, <code>nowrap</code>, <code>
+ismap</code>, <code>declare</code>, <code>noshade</code>, <code>
+checked</code>, <code>disabled</code>, <code>readonly</code>,
+<code>multiple</code>, <code>selected</code>, <code>
+noresize</code>, <code>defer</code>.</p>
+
+<h2>C.11 Document Object Model and XHTML</h2>
+<p>
+The Document Object Model level 1 Recommendation [<a href="#ref-dom">DOM</a>]
+defines document object model interfaces for XML and HTML 4.0. The HTML 4.0
+document object model specifies that HTML element and attribute names are
+returned in upper-case. The XML document object model specifies that 
+element and attribute names are returned in the case they are specified. In
+XHTML 1.0, elements and attributes are specified in lower-case. This apparent difference can be
+addressed in two ways:
+</p>
+<ol>
+<li>Applications that access XHTML documents served as Internet media type
+<code>text/html</code>
+via the <abbr title="Document Object Model">DOM</abbr> can use the HTML DOM,
+and can rely upon element and attribute names being returned in
+upper-case from those interfaces.</li>
+<li>Applications that access XHTML documents served as Internet media types
+<code>text/xml</code> or <code>application/xml</code>
+can also use the XML DOM. Elements and attributes will be returned in lower-case.
+Also, some XHTML elements may or may
+not appear
+in the object tree because they are optional in the content model
+(e.g. the <code>tbody</code> element within
+<code>table</code>).  This occurs because in HTML 4.0 some elements were
+permitted to be minimized such that their start and end tags are both omitted
+(an SGML feature).
+This is not possible in XML. Rather than require document authors to insert
+extraneous elements, XHTML has made the elements optional. 
+Applications need to adapt to this
+accordingly.</li>
+</ol>
+
+<h2>C.12 Using Ampersands in Attribute Values</h2>
+<p>
+When an attribute value contains an ampersand, it must be expressed as a character
+entity reference
+(e.g. "<code>&amp;amp;</code>"). For example, when the
+<code>href</code> attribute
+of the <code>a</code> element refers to a
+CGI script that takes parameters, it must be expressed as
+<code>http://my.site.dom/cgi-bin/myscript.pl?class=guest&amp;amp;name=user</code>
+rather than as
+<code>http://my.site.dom/cgi-bin/myscript.pl?class=guest&amp;name=user</code>.
+</p>
+
+<h2>C.13 Cascading Style Sheets (CSS) and XHTML</h2>
+
+<p>The Cascading Style Sheets level 2 Recommendation [<a href="#ref-css2">CSS2</a>] defines style
+properties which are applied to the parse tree of the HTML or XML
+document.  Differences in parsing will produce different visual or
+aural results, depending on the selectors used. The following hints
+will reduce this effect for documents which are served without
+modification as both media types:</p>
+
+<ol>
+<li>
+CSS style sheets for XHTML should use lower case element and
+attribute names.</li>
+
+
+<li>In tables, the tbody element will be inferred by the parser of an
+HTML user agent, but not by the parser of an XML user agent. Therefore
+you should always explicitely add a tbody element if it is referred to
+in a CSS selector.</li>
+
+<li>Within the XHTML name space, user agents are expected to
+recognize the "id" attribute as an attribute of type ID.
+Therefore, style sheets should be able to continue using the
+shorthand "#" selector syntax even if the user agent does not read
+the DTD.</li>
+
+<li>Within the XHTML name space, user agents are expected to
+recognize the "class" attribute. Therefore, style sheets should be
+able to continue using the shorthand "." selector syntax.</li>
+
+<li>
+CSS defines different conformance rules for HTML and XML documents;
+be aware that the HTML rules apply to XHTML documents delivered as
+HTML and the XML rules apply to XHTML documents delivered as XML.</li>
+</ol>
+<!--OddPage-->
+<h1><a name="acks" id="acks">Appendix D.
+Acknowledgements</a></h1>
+
+<p><b>This appendix is informative.</b></p>
+
+<p>This specification was written with the participation of the
+members of the W3C HTML working group:</p>
+
+<dl>
+<dd>Steven Pemberton, CWI (HTML Working Group Chair)<br />
+Murray Altheim, Sun Microsystems<br />
+Daniel Austin, CNET: The Computer Network<br />
+Frank Boumphrey, HTML Writers Guild<br />
+John Burger, Mitre<br />
+Andrew W. Donoho, IBM<br />
+Sam Dooley, IBM<br />
+Klaus Hofrichter, GMD<br />
+Philipp Hoschka, W3C<br />
+Masayasu Ishikawa, W3C<br />
+Warner ten Kate, Philips Electronics<br />
+Peter King, Phone.com<br />
+Paula Klante, JetForm<br />
+Shin'ichi Matsui, W3C/Panasonic<br />
+Shane McCarron, Applied Testing and Technology (The Open Group through August
+1999)<br />
+Ann Navarro, HTML Writers Guild<br />
+Zach Nies, Quark<br />
+Dave Raggett, W3C/HP (W3C lead for HTML)<br />
+Patrick Schmitz, Microsoft<br />
+Sebastian Schnitzenbaumer, Stack Overflow<br />
+Chris Wilson, Microsoft<br />
+Ted Wugofski, Gateway 2000<br />
+Dan Zigmond, WebTV Networks</dd>
+</dl>
+
+<!--OddPage-->
+<h1><a name="refs" id="refs">Appendix E. References</a></h1>
+
+<p><b>This appendix is informative.</b></p>
+
+<dl>
+
+<dt><a name="ref-css2" id="ref-css2"><b>[CSS2]</b></a></dt>
+
+<dd><a href="http://www.w3.org/TR/REC-CSS2">"Cascading Style Sheets, level 2 (CSS2) Specification"</a>, B.
+Bos, H. W. Lie, C. Lilley, I. Jacobs, 12 May 1998.<br />
+Available at: <a href="http://www.w3.org/TR/REC-CSS2">
+http://www.w3.org/TR/REC-CSS2</a></dd>
+
+<dt><a name="ref-dom" id="ref-dom"><b>[DOM]</b></a></dt>
+
+<dd><a href="http://www.w3.org/TR/REC-DOM-Level-1">"Document Object Model (DOM) Level 1 Specification"</a>, Lauren
+Wood <i>et al.</i>, 1 October 1998.<br />
+Available at: <a href="http://www.w3.org/TR/REC-DOM-Level-1">
+http://www.w3.org/TR/REC-DOM-Level-1</a></dd>
+
+<dt><a name="ref-html4" id="ref-html4"><b>[HTML]</b></a></dt>
+
+<dd><a href="http://www.w3.org/TR/1999/PR-html40-19990824">"HTML 4.01 Specification"</a>, D. Raggett, A. Le&#160;Hors, I.
+Jacobs, 24 August 1999.<br />
+Available at: <a href="http://www.w3.org/TR/1999/PR-html40-19990824">
+http://www.w3.org/TR/1999/PR-html40-19990824</a></dd>
+
+<dt><a name="ref-posix" id="ref-posix"><b>[POSIX.1]</b></a></dt>
+
+<dd>"ISO/IEC 9945-1:1990 Information Technology - Portable
+Operating System Interface (POSIX) - Part 1: System Application
+Program Interface (API) [C Language]", Institute of Electrical
+and Electronics Engineers, Inc, 1990.</dd>
+
+<dt><a name="ref-rfc2046" id="ref-rfc2046"><b>
+[RFC2046]</b></a></dt>
+
+<dd><a href="http://www.ietf.org/rfc/rfc2046.txt">"RFC2046: Multipurpose Internet Mail Extensions (MIME) Part
+Two: Media Types"</a>, N. Freed and N. Borenstein, November
+1996.<br />
+Available at <a href="http://www.ietf.org/rfc/rfc2046.txt">
+http://www.ietf.org/rfc/rfc2046.txt</a>. Note that this RFC
+obsoletes RFC1521, RFC1522, and RFC1590.</dd>
+
+<dt><a name="ref-rfc2119" id="ref-rfc2119"><b>
+[RFC2119]</b></a></dt>
+
+<dd><a href="http://www.ietf.org/rfc/rfc2119.txt">"RFC2119: Key words for use in RFCs to Indicate Requirement
+Levels"</a>, S. Bradner, March 1997.<br />
+Available at: <a href="http://www.ietf.org/rfc/rfc2119.txt">
+http://www.ietf.org/rfc/rfc2119.txt</a></dd>
+
+<dt><a name="ref-rfc2376" id="ref-rfc2376"><b>
+[RFC2376]</b></a></dt>
+
+<dd><a href="http://www.ietf.org/rfc/rfc2376.txt">"RFC2376: XML Media Types"</a>, E. Whitehead, M. Murata, July
+1998.<br />
+Available at: <a href="http://www.ietf.org/rfc/rfc2376.txt">
+http://www.ietf.org/rfc/rfc2376.txt</a></dd>
+
+<dt><a name="ref-rfc2396" id="ref-rfc2396"><b>
+[RFC2396]</b></a></dt>
+
+<dd><a href="http://www.ietf.org/rfc/rfc2396.txt">"RFC2396: Uniform Resource Identifiers (URI): Generic
+Syntax"</a>, T. Berners-Lee, R. Fielding, L. Masinter, August
+1998.<br />
+This document updates RFC1738 and RFC1808.<br />
+Available at: <a href="http://www.ietf.org/rfc/rfc2396.txt">
+http://www.ietf.org/rfc/rfc2396.txt</a></dd>
+
+<dt><a name="ref-xml" id="ref-xml"><b>[XML]</b></a></dt>
+
+<dd><a href="http://www.w3.org/TR/REC-xml">"Extensible Markup Language (XML) 1.0 Specification"</a>, T.
+Bray, J. Paoli, C. M. Sperberg-McQueen, 10 February 1998.<br />
+Available at: <a href="http://www.w3.org/TR/REC-xml">
+http://www.w3.org/TR/REC-xml</a></dd>
+
+<dt><a name="ref-xmlns" id="ref-xmlns"><b>[XMLNAMES]</b></a></dt>
+
+<dd><a href="http://www.w3.org/TR/REC-xml-names">"Namespaces in XML"</a>, T. Bray, D. Hollander, A. Layman, 14
+January 1999.<br />
+XML namespaces provide a simple method for qualifying names used
+in XML documents by associating them with namespaces identified
+by URI.<br />
+Available at: <a href="http://www.w3.org/TR/REC-xml-names">
+http://www.w3.org/TR/REC-xml-names</a></dd>
+
+</dl>
+<p><a href="http://www.w3.org/WAI/WCAG1AAA-Conformance"
+title="Explanation of Level Triple-A Conformance">
+<img height="32" width="88" 
+src="wcag1AAA.gif"
+alt="Level Triple-A conformance icon, W3C-WAI Web Content Accessibility Guidelines 1.0" /></a></p>
+<div class="navbar">
+  <hr />
+  <a href="#toc">table of contents</a> 
+</div>
+</body>
+</html>
+
diff --git a/TC/testcase/res/UTsXml/test/valid/xlink.xml b/TC/testcase/res/UTsXml/test/valid/xlink.xml
new file mode 100755 (executable)
index 0000000..19194aa
--- /dev/null
@@ -0,0 +1,529 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE spec PUBLIC "-//W3C//DTD Specification::19990205//EN" "dtds/xmlspec.dtd" [
+<!ENTITY doc-type "WD">
+<!ENTITY iso6.doc.date '29-May-1999'>
+]>
+<!--ArborText, Inc., 1988-1998, v.4002-->
+<?Pub UDT _bookmark _target?>
+<?Pub Inc?>
+<?xml-stylesheet
+href="file:///C|/Program%20Files/SoftQuad/XMetaL%201/display/xmlspec.css"
+type="text/css"?>
+<spec>
+
+<!-- Last edited: 27 May 1999 by bent -->
+<header><?Pub Dtl?>
+       <title>XML Linking Language (XLink)</title>
+       <version>Version 1.0</version>
+       <w3c-designation><!-- &doc-type;-&iso6.doc.date; --> WD-xlink-19990527</w3c-designation>
+       <w3c-doctype>World Wide Web Consortium Working Draft</w3c-doctype>
+       <pubdate><day>29</day><month>May</month><year>1999</year></pubdate>
+       <notice>
+       <p>This draft is for public discussion.</p>
+       </notice>
+       <publoc><loc href="http://www.w3.org/XML/Group/1999/05/WD-xlink-current">http://www.w3.org/XML/Group/1999/05/WD-xlink-current</loc></publoc>
+       <prevlocs>
+       <!--Check: was it actually August?-->
+       <loc href="http://www.w3.org/XML/Group/1999/05/WD-xlink-19990527">http://www.w3.org/XML/Group/1999/05/WD-xlink-19990527</loc>
+       <loc href="http://www.w3.org/XML/Group/1999/05/WD-xlink-19990505">http://www.w3.org/XML/Group/1999/05/WD-xlink-19990505</loc>
+       <loc href="http://www.w3.org/TR/1998/WD-xlink-19980303">http://www.w3.org/TR/1998/WD-xlink-19980303</loc>
+       <loc href="http://www.w3.org/TR/WD-xml-link-970630">http://www.w3.org/TR/WD-xml-link-970630</loc></prevlocs>
+
+       <authlist>
+               <!--Updated author hrefs  dorchard-->
+               <!-- Update Steve's email - bent --> 
+               <author>
+                       <name>Steve DeRose</name>
+                       <affiliation>Inso Corp. and Brown University</affiliation>
+                       <email href="mailto:Steven_DeRose@Brown.edu">Steven_DeRose@Brown.edu</email>
+               </author>
+               <author>
+                       <name>David Orchard</name>
+                       <affiliation>IBM Corp.</affiliation>
+                       <email href="mailto:dorchard@ca.ibm.com">dorchard@ca.ibm.com</email>
+               </author>
+               <author>
+                       <name>Ben Trafford</name>
+                       <affiliation>Invited Expert</affiliation>
+                       <email href="mailto:bent@exemplary.net">bent@exemplary.net</email>
+               </author>
+               <!-- I suggest we move Eve and Tim down to the Acknowledgements section. We
+               also ought to add Gabe Beged-Dov there, as well. bent
+               how shall we cite Tim? sjd What about with an Acknowledgments section?
+               -elm <AUTHOR> <NAME>Tim Bray</NAME> <AFFILIATION>Textuality</AFFILIATION>
+               <EMAIL>tbray@textuality.com</EMAIL> </AUTHOR>-->
+       </authlist>
+
+       <status>
+               <p>This is a W3C Working Draft for review by W3C members and other interested parties. It is a draft document and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use W3C Working Drafts as reference material or to cite them as other than "work in progress". A list of current W3C working drafts can be found at <loc href="http://www.w3.org/TR">http://www.w3.org/TR</loc>.</p>
+               <p><emph>Note:</emph> Since working drafts are subject to frequent change, you are advised to reference the above URI, rather than the URIs for working drafts themselves. Some of the work remaining is described in <specref ref="unfinished"/>. </p>
+               <p>This work is part of the W3C XML Activity (for current status, see <loc href="http://www.w3.org/MarkUp/SGML/Activity">http://www.w3.org/XML/Activity                   </loc>). For information about the XPointer language which is expected to be used with XLink, see <loc href="http://www.w3.org/MarkUp/SGML/Activity">http://www.w3.org/TR/WD-xptr</loc>.
+               </p>
+               <p>See <loc href="http://www.w3.org/TR/NOTE-xlink-principles">http://www.w3.org/TR/NOTE-xlink-principles </loc> for additional background on the design principles informing XLink.</p>
+               <p>Also see <loc href="http://www.w3.org/TR/NOTE-xlink-req/">http://www.w3.org/TR/NOTE-xlink-req/</loc> for the XLink requirements that this document attempts to satisfy.</p>
+       </status>
+
+       <abstract>
+               <!-- edited the abstract for further clarity - bent -->
+               <p>This specification defines constructs that may be inserted into XML DTDs, schemas and document instances to describe links between objects. It uses XML syntax to create structures that can describe the simple unidirectional hyperlinks of today's HTML as well as more sophisticated links.</p>
+       </abstract>
+
+       <pubstmt>
+               <p>Burlington, Seekonk, et al.: World-Wide Web Consortium, XML Working Group, 1998.</p>
+       </pubstmt>
+
+       <sourcedesc>
+               <p>Created in electronic form.</p>
+       </sourcedesc>
+
+       <langusage>
+               <language id="en">English</language>
+               <language id="ebnf">Extended Backus-Naur Form (formal grammar)</language>
+       </langusage>
+
+       <revisiondesc>
+               <slist>
+                       <sitem>1997-01-15 : Skeleton draft by TB</sitem>
+                       <sitem>1997-01-24 : Fleshed out by sjd</sitem>
+                       <sitem>1997-04-08 : Substantive draft</sitem>
+                       <sitem>1997-06-30 : Public draft</sitem>
+                       <sitem>1997-08-01 : Public draft</sitem>
+                       <sitem>1997-08-05 : Prose/organization work by sjd</sitem>
+                       <sitem>1997-10-14: Conformance and design principles; a bit of cleanup by elm</sitem>
+                       <sitem>1997-11-07: Update for editorial issues per issues doc, by sjd.</sitem>
+                       <sitem>1997-12-01: Update for editorial issues per issues doc in preparation for F2F meeting, by sjd.</sitem>
+                       <sitem>1998-01-13: Editorial cleanup, addition of new design principles, by elm.</sitem>
+                       <sitem>1998-02-27: Splitting out of XLink and XPointer, by elm.</sitem>
+                       <sitem>1998-03-03: Moved most of the XPointer locator stuff here. elm</sitem>
+                       <sitem>1999-04-24: Editorial rewrites to represent new ideas on XLink, especially the inclusion of arcs. bent</sitem>
+                       <sitem>1999-05-05: Prose/organization work by dorchard. Moved much of the semantics section around, from: locators, link semantics, remote resource semantics, local resource semantics; to: resource semantics, locators, behavior semantics, link semantics, arc semantics</sitem>
+                       <sitem>1999-05-12: Prose/organization work. Re-organized some of the sections, removed XML constructs from the document, added descriptive prose, edited document text for clarity. Rewrote the link recognition section. bent</sitem>
+                       <sitem>1999-05-17: Further prose work. Added non-normative examples. Clarified arcs. bent</sitem>
+                       <sitem>1999-05-23: Edited for grammar and clarity. bent</sitem>
+                       <sitem>1999-05-27: Final once-over before sending to group. Fixed sjd's email address. bent</sitem>
+               </slist>
+       </revisiondesc>
+</header>
+
+<body>
+       <div1><?Pub Dtl?>
+               <head>Introduction</head>
+               <p>This specification defines constructs that may be inserted into XML DTDs, schemas, and document instances to describe links between objects. A <termref def="dt-link">link</termref>, as the term is used here, is an explicit relationship between two or more data objects or portions of data objects. This specification is concerned with the syntax used to assert link existence and describe link characteristics. Implicit (unasserted) relationships, for example that of one word to the next or that of a word in a text to its entry in an on-line dictionary are obviously important, but outside its scope.</p>
+               <p>Links are asserted by <xtermref href="WD-xml-lang.html#dt-element">elements </xtermref> contained in <xtermref href="WD-xml-lang.html#dt-xml-doc">XML document instances</xtermref>. The simplest case is very like an HTML <code>A</code> link, and has these characteristics:
+                       <ulist>
+                               <item><p>The link is expressed at one of its ends (similar to the <code>A</code> element in some document)</p></item>
+                               <item><p>Users can only initiate travel from that end to the other</p></item>
+                               <item><p>The link's effect on windows, frames, go-back lists, stylesheets in use, and so on is mainly determined by browsers, not by the link itself. For example, traveral of <code>A</code> links normally replaces the current view, perhaps with a user option to open a new window.</p></item>
+                               <item><p>The link goes to only one destination (although a server may have great freedom in finding or dynamically creating that destination).</p></item>
+                       </ulist>
+               </p>
+               <p>While this set of characteristics is already very powerful and obviously has proven itself highly useful and effective, each of these assumptions also limits the range of hypertext functionality. The linking model defined here provides ways to create links that go beyond each of these specific characteristics, thus providing features previously available mostly in dedicated hypermedia systems.
+               </p>
+
+<div2>
+       <head>Origin and Goals</head>
+       <p>Following is a summary of the design principles governing XLink:
+               <olist>
+                       <item><p>XLink must be straightforwardly usable over the Internet. </p></item>
+                       <item><p>XLink must be usable by a wide variety of link usage domains and classes of linking application software.</p></item>
+                       <item><p>XLink must support HTML 4.0 linking constructs.</p></item>
+                       <item><p>The XLink expression language must be XML.</p></item>
+                       <item><p>The XLink design must be formal, concise, and illustrative.</p></item>
+                       <item><p>XLinks must be human-readable and human-writable.</p></item>
+                       <item><p>XLinks may reside within or outside the documents in which the
+                       participating resources reside. </p></item>
+                       <item><p>XLink must represent the abstract structure and significance of links.</p></item>
+                       <item><p>XLink must be feasible to implement.</p></item>
+                       <item><p>XLink must be informed by knowledge of established hypermedia systems and standards.</p></item>
+               </olist>
+       </p>
+</div2>
+<!--Changed the list of requirements to reflect current XLink requirements
+document. bent-->
+
+<div2>
+       <head>Relationship to Existing Standards</head>
+       <p>Three standards have been especially influential:
+               <ulist>
+                       <item><p><emph>HTML:</emph> Defines several SGML element types that represent links.</p></item>
+                       <item><p><emph>HyTime:</emph> Defines inline and out-of-line link structures and some semantic features, including traversal control and presentation of objects. <!--Changed from "placement of objects into a display or other space" -elm-->
+                       </p></item>
+                       <item><p><emph>Text Encoding Initiative Guidelines (TEI P3):</emph> Provides structures for creating links, aggregate objects, and link collections out of them.</p></item>
+               </ulist>
+       </p>
+       <p>Many other linking systems have also informed this design, especially Dexter, FRESS, MicroCosm, and InterMedia.</p>
+</div2>
+
+<div2>
+       <head>Terminology</head>
+       <p>The following basic terms apply in this document. <!--<IMG
+       SRC="local://./linkdiag.gif">(figure to be inserted)-->
+               <glist>
+                       <gitem>
+                       <label><termdef id="dt-arc" term="Arc">arc</termdef></label>
+                       <def><p>A symbolic representation of traversal behavior in links, especially the direction, context and timing of traversal.</p></def>
+                       </gitem>
+                       <gitem>
+                               <label><termdef id="dt-eltree" term="Element Tree">element tree</termdef></label>
+                               <def><p>A representation of the relevant structure specified by the tags and attributes in an XML document, based on "groves" as defined in the ISO DSSSL standard. </p></def>
+                       </gitem>
+                       <gitem>
+                               <label><termdef id="dt-inline" term="In-Line Link">inline link</termdef></label>
+                               <def><p>Abstractly, a <termref def="dt-link">link</termref> which serves as one of its own <termref def="dt-resource">resources</termref>. Concretely, a link where the content of the <termref def="dt-linkel">linking element</termref> serves as a <termref def="dt-particip-resource">participating resource</termref>.
+                               HTML <code>A</code>, HyTime <code>clink</code>, and TEI <code>XREF</code>
+                               are all inline links.</p></def>
+                       </gitem>
+                       <gitem>
+                               <label><termdef id="dt-link" term="Link">link</termdef></label>
+                               <def><p>An explicit relationship between two or more data objects or portions of data objects.</p></def>
+                       </gitem>
+                       <gitem>
+                               <label><termdef id="dt-linkel" term="Linking Element">linking element </termdef></label>
+                               <def><p>An <xtermref href="WD-xml-lang.html#dt-element">element</xtermref> that asserts the existence and describes the characteristics of a <termref def="dt-link"> link</termref>.</p></def>
+                       </gitem>
+                       <gitem>
+                               <label><termdef id="dt-local-resource" term="Local Resource">local resource</termdef></label>
+                               <def><p>The content of an <termref def="dt-inline">inline</termref>linking element. Note that the content of the linking element could be explicitly pointed to by means of a regular <termref def="dt-locator">locator</termref> in the same linking element, in which case the resource is considered <termref def="dt-remote-resource"> remote</termref>, not local.</p></def>
+                       </gitem>
+                       <gitem>
+                               <label><termdef id="dt-locator" term="Locator">locator</termdef> </label>
+                               <def><p>Data, provided as part of a link, which identifies a
+                               <termref def="dt-resource">resource</termref>.</p></def>
+                       </gitem>
+                       <gitem>
+                               <label><termdef id="dt-multidir" term="Multi-Directional Link">multidirectional link</termdef></label>
+                               <def><p>A <termref def="dt-link">link</termref> whose <termref def="dt-traversal"> traversal</termref> can be initiated from more than one of its <termref      def="dt-particip-resource"> participating resources</termref>. Note that being able to "go back" after following a one-directional link does not make the link multidirectional.</p></def>
+                       </gitem>
+                       <gitem>
+                               <label><termdef id="dt-outofline" term="Out-of-line Link">out-of-line link</termdef></label>
+                               <def><p>A <termref def="dt-link">link</termref> whose content does not serve as one of the link's <termref def="dt-particip-resource">participating resources </termref>. Such links                                            presuppose a notion like <termref def="dt-xlg">extended link groups</termref>, which instruct application software where to look for links. Out-of-line links are generally required for supporting multidirectional <termref def="dt-traversal">traversal</termref> and for allowing read-only resources to have outgoing links.</p></def>
+                       </gitem>
+                       <gitem>
+                               <label><termdef id="dt-parsedq" term="Parsed">parsed</termdef></label> <def><p>In the context of link behavior, a parsed link is any link                       whose content is transcluded into the document where the link originated. The   use of the term "parsed" directly refers to the concept in XML of a
+                               parsed entity.</p></def>
+                       </gitem>
+                       <gitem>
+                               <label><termdef id="dt-particip-resource" term="Participating Resource"> participating resource</termdef></label>
+                               <def><p>A <termref def="dt-resource">resource</termref> that belongs to a link. All resources are potential contributors to a link; participating       resources are the actual contributors to a particular link.</p></def>
+                       </gitem>
+                       <gitem>
+                               <label><termdef id="dt-remote-resource" term="Remote Resource">remote resource</termdef></label>
+                               <def><p>Any participating resource of a link that is pointed to with a locator. </p></def>
+                       </gitem>
+                       <gitem>
+                               <label><termdef id="dt-resource" term="Resource">resource</termdef></label>
+                               <def><p>In the abstract sense, an addressable unit of information or service that is participating in a <termref def="dt-link">link</termref>. Examples include files, images, documents, programs, and query results. Concretely, anything reachable by the use of a <termref def="dt-locator">locator</termref> in some <termref def="dt-linkel">linking      element</termref>. Note that this term and its definition are taken from the basic specifications governing the World Wide Web. <!--Joel notes: need link here. bent asks: A link?-->
+                                </p></def>
+                       </gitem>
+                       <gitem>
+                               <label><termdef id="dt-subresource" term="sub-Resource">sub-resource</termdef></label>
+                               <def><p>A portion of a resource, pointed to as the precise      destination of a link. As one example, a link might specify that an entire      document be retrieved and displayed, but that some specific part(s) of it is the specific linked data, to be treated in an application-appropriate manner such as indication by highlighting, scrolling, etc.</p></def>
+                       </gitem>
+                       <gitem>
+                               <label><termdef id="dt-traversal" term="Traversal">traversal</termdef></label>
+                               <def><p>The action of using a <termref def="dt-link">link</termref>; that is, of accessing a <termref def="dt-resource">resource</termref>. Traversal may be initiated by a user action (for example, clicking on the displayed content of a <termref def="dt-linkel">linking element</termref>) or occur under program control.</p></def>
+                       </gitem>
+               </glist>
+       </p>
+</div2>
+
+<div2>
+       <head>Notation</head>
+       <p>The formal grammar for <termref def="dt-locator">locators</termref> is given using a simple Extended Backus-Naur Form (EBNF) location, as described in <xspecref href="http://www.w3.org/TR/REC-xml#sec-notation">the XML specification</xspecref>.</p>
+       <!-- fixed link to XML spec - bent -->
+</div2>
+</div1>
+
+<div1 id="addressing"><?Pub Dtl?>
+       <head>Locator Syntax</head>
+       <p>The locator for a <termref def="dt-resource">resource</termref> is typically provided by means of a Uniform Resource Identifier, or URI. XPointers can be used in conjunction with the URI structure, as fragment identifiers, to specify a more precise sub-resource. </p>
+       <!-- Removed the discussion of queries from the previous paragraph, due to contention within the WG. bent -->
+       <p>A locator generally contains a URI, as described in IETF RFCs <bibref ref="rfc1738"/> and <bibref ref="rfc1808"/>. As these RFCs state, the URI may include a trailing <emph>query</emph> (marked by a leading "<code>?</code>"), and be followed by a "<code>#</code>" and a <emph>fragment identifier</emph>, with the query interpreted by the host providing the indicated resource, and the interpretation of the fragment identifier dependent on the data type of the indicated resource.</p>
+       <!--Is there some restriction on URNs having queries and/or fragment identifiers?  Since these RFCs don't mention URIs explicitly, should the wording here lead from URLs to URIs more explicitly? -elm-->
+       <p>In order to locate XML documents and portions of documents, a locator value may contain either a <xtermref href="http://www.w3.org/Addressing/rfc1738.txt"> URI</xtermref> or a fragment identifier, or both. Any fragment identifier for pointing into XML must be an <xtermref href="http://www.w3.org/TR/WD-xptr#dt-xpointer"> XPointer</xtermref>.</p>
+       <p>Special syntax may be used to request the use of particular processing models in accessing the locator's resource. This is designed to reflect the realities of network operation, where it may or may not be desirable to exercise fine control over the distribution of work between local and remote processors. 
+               <scrap id="locator" lang="ebnf">
+                       <head>Locator</head>
+                       <prod id="nt-locator">
+                               <lhs>Locator</lhs>
+                               <rhs><nt def="nt-uri">URI</nt></rhs>
+                               <rhs>| <nt def="nt-connector">Connector</nt> (<xnt href="http://www.w3.org/TR/WD-xptr">XPointer</xnt> | <xnt href="WD-xml-lang.html#NT-Name">Name</xnt>)</rhs>
+                               <rhs>| <nt def="nt-uri">URI</nt> <nt def="nt-connector">Connector</nt> (<xnt href="http://www.w3.org/TR/WD-xptr">XPointer</xnt> | <xnt href="WD-xml-lang.html#NT-Name">Name</xnt>)</rhs>
+                       </prod>
+                       <prod id="nt-connector">
+                               <lhs>Connector</lhs><rhs>'#' | '|'</rhs>
+                       </prod>
+                       <prod id="nt-uri">
+                               <lhs>URI</lhs><rhs><xnt href="WD-xml-lang.html#NT-URLchar">URIchar*</xnt></rhs>
+                       </prod>
+               </scrap>
+       </p>
+       <p><termdef id="dt-designated" term="Designated Resource">In this discussion, the term <term>designated resource</term> refers to the resource which an entire locator serves to locate.</termdef> The following rules apply:
+               <ulist>
+                       <item>
+                               <p><termdef id="dt-containing-resource" term="Containing Resource">               The URI, if provided, locates a resource called the <term>containing resource</term>.</termdef></p>
+                       </item>
+                       <item>
+                               <p>If the URI is not provided, the containing resource is considered to be the document in which the linking element is contained. 
+                               </p></item>
+                       <item>
+                               <p><termdef id="dt-sub-resource" term="Sub-Resource">If an XPointer                               is provided, the designated resource is a <term>sub-resource</term>
+                               of the containing resource; otherwise the designated resource is the
+                               containing resource.</termdef></p>
+                       </item>
+                       <!--Is this now incorrect, given the nature of the switch from here() to origin()? -elm 
+                       Oy, yes, i think so. it will require some fun wording, though, so i haven't fixed it yet here -sjd-->
+                       <item>
+                               <p>If the <nt def="nt-connector">Connector</nt> is followed directly by a <xnt href="http://www.w3.org/TR/REC-xml#NT-Name">Name</xnt>, the <xnt href="http://www.w3.org/TR/REC-xml#NT-Name">Name</xnt> is shorthand for the XPointer"<code>id(Name)</code>"; that is, the sub-resource is the element in the containing resource that has an XML <xtermref href="http://www.w3.org/TR/REC-xml#sec-attrtypes">ID attribute</xtermref> whose value <xtermref href="http://www.w3.org/TR/REC-xml#dt-match">matches</xtermref> the                            <xnt href="http://www.w3.org/TR/REC-xml#NT-Name">Name</xnt>. This shorthand is to encourage use of the robust <code>id</code> addressing mode.</p>
+                       </item>
+                       <!-- fixed links to the XML recommendation - bent -->
+                       <item>
+                               <p>If the connector is "<code>#</code>", this signals an intent that the containing resource is to be fetched as a whole from the host that provides it, and that the XPointer processing to extract the sub-resource
+                               is to be performed on the client, that is to say on the same system where the linking element is recognized and processed.</p>
+                       </item>
+                       <item>
+                               <p>If the connector is "<code>|</code>", no intent is signaled as to what processing model is to be used to go about accessing the designated resource.</p>
+                       </item>
+               </ulist>
+       </p>
+       <p>Note that the definition of a URI includes an optional query component. </p>
+       <p>In the case where the URI contains a query (to be interpreted by the server), information providers and authors of server software are urged to use queries as follows: 
+               <scrap id="querysyntax" lang="ebnf">
+                       <head>Query</head>
+                       <prod id="nt-query">
+                               <lhs>Query</lhs><rhs>'XML-XPTR=' (<xnt href="http://www.w3.org/TR/WD-xptr"> XPointer</xnt> | <xnt href="http://www.w3.org/TR/REC-xml#NT-Name">Name</xnt>)</rhs>
+                       </prod>
+               </scrap>
+       </p>
+       <!-- fixed link to XML recommendation - bent -->
+</div1>
+
+<div1><?Pub Dtl?>
+       <head>Link Recognition</head>
+       <p>The existence of a <termref def="dt-link">link</termref> is asserted by a <termref def="dt-linkel">linking element</termref>. Linking elements must be recognized reliably by application software in order to provide appropriate display and behavior. There are several ways link recognition could be accomplished: for example, reserving element type names, reserving attributes names, leaving the matter of recognition entirely up to stylesheets and application software, or using the XLink <xtermref href="http://www.w3.org/TR/REC-xml-names/">namespace</xtermref> to specify element names and attribute names that would be recognized by namespace and XLink-aware processors. Using element and attribute names within the XLink namespace provides a balance between giving users control of their own markup language design and keeping the identification of linking elements simple and unambiguous.</p>
+       <p>The two approaches to identifying linking elements are relatively simple to implement. For example, here's how the HTML <code>A</code> element would be declared using attributes within the XLink namespace, and then how an element within the XLink namespace might do the same:
+               <eg>&lt;A xlink:type="simple" xlink:href="http://www.w3.org/TR/wd-xlink/"
+xlink:title="The Xlink Working Draft"&gt;The XLink Working Draft.&lt;/A&gt;</eg>
+               <eg>&lt;xlink:simple href="http://www.w3.org/TR/wd-xlink/"
+title="The XLink Working Draft"&gt;The XLink Working Draft&lt;/xlink:simple&gt;</eg>
+       Any arbitrary element can be made into an XLink by using the <code>xlink:type</code> attribute. And, of course, the explicit XLink elements may be used, as well. This document will go on to describe the linking attributes that are associated with linking elements. It may be assumed by the reader that these attributes would require the <code>xlink</code> namespace prefix if they existed within an arbitrary element, or that they may be used directly if they exist within an explicit Xlink element.</p>
+               <!-- heavily modified this section to accomodate namespace-aware link recognition - bent -->
+</div1>
+
+<!-- Rewrote this entire section. - bent -->
+<div1>
+       <head>Linking Attributes</head>
+       <p>XLink has several attributes associated with the variety of links it may represent. These attributes define four main concepts: locators, arcs, behaviors, and semantics. <emph>Locators</emph> define where the actual resource is located. <emph>Arcs</emph> define the traversal of links. Where does the link come from? Where does it go to? All this information can be stored in the arc attributes. <emph>Behaviors</emph> define how the link is activated, and what the application should do with the resource being linked to. <emph>Semantics</emph> define useful information that the application may use, and enables the link for such specalized targets as constricted devices and accessibility software.</p>
+       
+       <div2 id="link-locators">
+               <head>Locator Attributes</head>
+               <p>The only locator attribute at this time is <code>href</code>. This attribute must contain either a string in the form of a URI that defines the remote resource being linked to, a string containing a fragment identifier that links to a local resource, or a string containing a URI with a fragment identifier concacenated onto it.</p>
+       </div2>
+
+       <div2 id="link-arcs">
+               <head>Arc Attributes</head>
+               <p>Arcs contain two attributes, <code>from</code> and <code>to</code>. The <code>from</code> attribute may contain a string containing the content of a <code>role</code> attribute from the resource being linked from. The purpose of the <code>from</code> attribute is to define where this link is being actuated from.</p>
+               <p>The <code>to</code> attribute may contain a string containing the content of a <code>role</code> attribute from the resource being linked to. The purpose of the <code>to</code> attribute is to define where this link traverses to.</p>
+               <p>The application may use this information in a number of ways, especially in a complex hypertext system, but it is mainly useful in providing context for application behavior.</p>
+               <!-- I'm at a loss as to how to describe arcs more clearly than this. I don't want to devolve into discussions of directed graphs and n-ary links. -bent -->
+       </div2>
+
+       <div2 id="link-behaviors">
+               <head>Behavior Attributes</head>
+               <p>There are two attributes associated with behavior: <code>show</code> and <code>actuate</code>. The <code>show</code> attribute defines how the remote resource is to be revealed to the user. It has three options: <code>new</code>, <code>parsed</code>, and <code>replace</code>. The <code>new</code> option indicates that the remote resource should be shown in a new window (or other device context) without replacing the previous content. The <code>parsed</code> option, relating directly to the XML concept of a parsed entity, indicates that the content should be integrated into the document from which the link was actuated. The <code>replace</code> option is the one most commonly seen on the World Wide Web, where the document being linked from is entirely replaced by the object being linked to.</p>
+               <p>The <code>actuate</code> attribute defines how the link is initiated. It has two options: <code>user</code> and <code>auto</code>. The <code>user</code> option indicates that the link must be initiated by some sort of human-initiated selection, such as clicking on an HTML anchor. The <code>auto</code> option indicates that the link is automatically initiated when the application deems that the user has reached the link. It then follows the behavior set out in the <code>show</code> option.</p>
+               <!-- Something should be put here in terms of an example. Idea: "A" link versus automatically updating encyclopedia. -bent -->
+       </div2>
+
+       <div2 id="link-semantics">
+               <head>Semantic Attributes</head>
+               <p>There are two attributes associated with semantics, <code>role</code> and <code>title</code>. The <code>role</code> attribute is a generic string used to describe the function of the link's content. For example, a poem might have a link with a <code>role="stanza"</code>. The <code>role</code> is also used as an identifier for the <code>from</code> and <code>to</code> attributes of arcs.</p>
+               <p>The <code>title</code> attribute is designed to provide human-readable text describing the link. It is very useful for those who have text-based applications, whether that be due to a constricted device that cannot display the link's content, or if it's being read by an application to a visually-impaired user, or if it's being used to create a table of links. The <code>title</code> attribute contains a simple, descriptive string.</p>
+       </div2>
+</div1>
+
+<div1 id="linking-elements">
+       <head>Linking Elements</head>
+       <p>There are several kinds of linking elements in XLink: <code>simple</code> links, <code>locators</code>, <code>arcs</code>, and <code>extended</code> links. These elements may be instantiated via element declarations from the XLink namespace, or they may be instantiated via attribute declarations from the XLink namespace. Both kinds of instantiation are described in the definition of each linking element.</p>
+       <p>The <code>simple</code> link is used to declare a link that approximates the functionality of the HTML <code>A</code> element. It has, however, a few added features to increase its value, including the potential declaration of semantics and behavior. The <code>locator</code> elements are used to define the resource being linked to. Some links may contain multiple locators, representing a choice of potential links to be traversed. The <code>arcs</code> are used to define the traversal semantics of the link. Finally, an <code>extended</code> linking element differs from a simple link in that it can connect any number of resources, not just one local resource (optionally) and one remote resource, and in that extended links are more often out-of-line than simple links.</p>
+
+<div2 id="simple-links">
+       <head>Simple Links</head>
+       <p id="dt-simplelink"><termdef id="dt-simpleline" term="Simple Link"><term>Simple links</term> can be used for purposes that approximate the functionality of a basic HTML <code>A</code> link, but they can also support a limited amount of additional functionality. Simple links have only one locator and thus, for convenience, combine the functions of a linking element and a locator into a single element.</termdef> As a result of this combination, the simple linking element offers both a locator attribute and all the behavior and semantic attributes.</p>
+       <p>The following are two examples of linking elements, each showing all the possible attributes that can be associated with a simple link. Here is the explicit XLink simple linking element.
+       <eg>&lt;!ELEMENT xlink:simple ANY&gt;
+&lt;!ATTLIST xlink:slink
+    href           CDATA                               #REQUIRED
+    role           CDATA                               #IMPLIED
+    title          CDATA                               #IMPLIED
+    show           (new|parsed|replace)        "replace"
+    actuate        (user|auto)                                 "user"
+&gt;</eg>
+       And here is how to make an arbitrary element into a simple link.
+       <eg>&lt;!ELEMENT xlink:simple ANY&gt;
+&lt;!ATTLIST foo
+       xlink:type     (simple|extended|locator|arc) #FIXED "simple"            
+    xlink:href     CDATA                               #REQUIRED
+    xlink:role     CDATA                               #IMPLIED
+    xlink:title    CDATA                               #IMPLIED
+    xlink:show     (new|parsed|replace)        "replace"
+    xlink:actuate  (user|auto)                                 "user"
+&gt;</eg>
+       Here is how the first example might look in a document:
+<eg>&lt;xlink:simple href="http://www.w3.org/TR/wd-xlink" role="working draft" 
+       title="The XLink Working Draft" show="replace" actuate="user"&gt;
+The XLink Working Draft.&lt;/xlink:simple&gt;</eg>
+<eg>&lt;foo xlink:href="http://www.w3.org/TR/wd-xlink" xlink:role="working draft"
+       xlink:title="The XLink Working Draft" xlink:show="new" xlink:actuate="user"&gt;
+The XLink Working Draft.&lt;/foo&gt;</eg>
+       Alternately, a simple link could be as terse as this:
+<eg>&lt;foo xlink:href="#stanza1"&gt;The First Stanza.&lt;/foo&gt;</eg>
+       </p>
+       <p>
+       There are no constraints on the contents of a simple linking element. In
+       the sample declaration above, it is given a content model of <code>ANY</code>
+       to illustrate that any content model or declared content is acceptable. In
+       a valid document, every element that is significant to XLink must still conform
+       to the constraints expressed in its governing DTD.</p>
+       <p>Note that it is meaningful to have an out-of-line simple link, although
+       such links are uncommon. They are called "one-ended" and are typically used
+       to associate discrete semantic properties with locations. The properties might
+       be expressed by attributes on the link, the link's element type name, or in
+       some other way, and are not considered full-fledged resources of the link.
+       Most out-of-line links are extended links, as these have a far wider range
+       of uses.</p>
+</div2>
+
+<div2 id="extended-link">
+<head>Extended Links</head>
+       <p><termdef id="dt-extendedlink" term="Extended Link">An <term>extended link</term> differs from a simple link in that it can connect any number of resources, not just one local resource (optionally) and one remote resource, and in that extended links are more often out-of-line than simple links.</termdef></p>
+       <p>These additional capabilities of extended links are required for:  
+               <ulist>
+                       <item>
+                               <p>Enabling outgoing links in documents that cannot be modified to add an inline link</p>
+                       </item>
+                       <item>
+                               <p>Creating links to and from resources in formats with no native support for embedded links (such as most multimedia formats)</p>
+                       </item>
+                       <item>
+                               <p>Applying and filtering sets of relevant links on demand</p>
+                       </item>
+                       <item><p>Enabling other advanced hypermedia capabilities</p></item>
+               </ulist>
+       </p>
+       <p>Application software might be expected to provide traversal among all of a link's participating resources (subject to semantic constraints outside the scope of this specification) and to signal the fact that a given resource or sub-resource participates in one or more links when it is displayed (even though there is no markup at exactly that point to signal it).</p>
+       <p>A linking element for an extended link contains a series of <xtermref href="http://www.w3.org/TR/REC-xml/#dt-parentchild">child elements</xtermref> that serve as locators and arcs. Because an extended link can have more than one remote resource, it separates out linking itself from the mechanisms used to locate each resource (whereas a simple link combines the two).</p>
+       <p>The <code>xlink:type</code> attribute value for an extended link must be <code> extended</code>, if the link is being instantiated on an arbitrary element. Note that extended links introduce variants of the <code>show</code> and <code>actuate</code> behavior attributes. These attributes, the <code>showdefault</code> and <code>actuatedefault</code> define the same behavior as their counterparts. However, in this case, they are considered to define the default behavior for all the linking elements that they contain.</p>
+       <p>However, when a linking element within an extended link has a <code>show</code> or <code>actuate</code> attribute of its own, that attribute overrides the defaults set on the extended linking element.</p>
+       <p>The extended linking element itself retains those attributes relevant to the link as a whole, and to its local resource if any. Following are two sample declaration for an extended link. The first is an example of the explicit XLink extended link:
+       
+<eg>&lt;!ELEMENT xlink:extended ((xlink:arc | xlink:locator)*)>
+&lt;!ATTLIST xlink:extended
+       role           CDATA                                    #IMPLIED
+       title          CDATA                                    #IMPLIED
+       showdefault    (new|parsed|replace)     #IMPLIED 
+    actuatedefault (user|auto)                                 #IMPLIED &gt;</eg>
+
+       The second is an example of an arbitrary element being used an extended link:
+
+<eg>&lt;!ELEMENT foo ((xlink:arc | xlink:locator)*)>
+&lt;!ATTLIST foo
+       xlink:type      (simple|extended|locator|arc)   #FIXED "extended"
+       xlink:role           CDATA                                      #IMPLIED
+       xlink:title          CDATA                                      #IMPLIED
+       xlink:showdefault    (new|parsed|replace)       #IMPLIED 
+    xlink:actuatedefault (user|auto)                           #IMPLIED &gt;</eg>
+
+       The following two examples demonstrate how each of the above might appear within a document instance. Note that the content of these examples would be other elements. For brevity's sake, they've been left blank. The first example shows how the link might appear, using an explicit XLink extended link:
+
+<eg>&lt;xlink:extended role="address book" title="Ben's Address Book" showdefault="replace" actuatedefault="user"&gt; ... &lt;/xlink:extended&gt;</eg>
+
+       And the second shows how the link might appear, using an arbitrary element:
+
+<eg>&lt;foo xlink:type="extended" xlink:role="address book" xlink:title="Ben's Address Book" xlink:showdefault="replace" xlink:actuatedefault="user"&gt; ... &lt;/foo&gt;</eg>
+       </p>
+
+</div2>
+
+<div2 id="xlink-arcs">
+       <head>Arc Elements</head>
+       <p><termdef id="dt-arc" term="Arc">An <term>arc</term> is contained within an extended link for the purpose of defining traversal behavior.</termdef> More than one arc may be associated with a link. Otherwise, arc elements function exactly as the arc attributes might lead on to expect.</p>
+       <!-- More here? -bent -->
+</div2>
+
+</div1>
+<div1>
+<head>Conformance</head>
+<p>An element conforms to XLink if:  <olist>
+<item><p>The element has an <code>xml:link</code> attribute whose value is
+one of the attribute values prescribed by this specification, and</p></item>
+<item><p>the element and all of its attributes and content adhere to the
+syntactic
+requirements imposed by the chosen <code>xml:link</code> attribute value,
+as prescribed in this specification.</p></item>
+</olist></p>
+<p>Note that conformance is assessed at the level of individual elements,
+rather than whole XML documents, because XLink and non-XLink linking mechanisms
+may be used side by side in any one document.</p>
+<p>An application conforms to XLink if it interprets XLink-conforming elements
+according to all required semantics prescribed by this specification and,
+for any optional semantics it chooses to support, supports them in the way
+prescribed. <!--If/when we split out the XLinkfunctionality
+(e.g. inline links and out-of-line links), the
+conformance language will have to address the different
+levels of support. -elm--> </p>
+</div1>
+</body><back>
+<div1 id="unfinished">
+<head>Unfinished Work</head>
+<div2>
+<head>Structured Titles</head>
+<p>The simple title mechanism described in this draft is insufficient to cope
+with internationalization or the use of multimedia in link titles. A future
+version will provide a mechanism for the use of structured link titles.</p>
+</div2>
+</div1>
+<div1>
+<head>References</head>
+<blist>
+<bibl id="xptr" key="XPTR">Eve Maler and Steve DeRose, editors. <titleref>
+XML Pointer Language (XPointer) V1.0</titleref>. ArborText, Inso, and Brown
+University. Burlington, Seekonk, et al.: World Wide Web Consortium, 1998.
+(See <loc href="http://www.w3.org/TR/WD-xptr">http://www.w3.org/TR/WD-xptr
+ </loc>.)</bibl>
+<bibl id="iso10744" key="ISO/IEC 10744">ISO (International Organization for
+Standardization). <titleref>ISO/IEC 10744-1992 (E). Information technology
+- Hypermedia/Time-based Structuring Language (HyTime).</titleref> [Geneva]:
+International Organization for Standardization, 1992. <titleref>Extended
+Facilities
+Annex.</titleref> [Geneva]: International Organization for Standardization,
+1996. (See  <loc
+href="http://www.ornl.gov/sgml/wg8/hytime/html/is10744r.html">http://www.ornl.go
+v/sgml/wg8/hytime/html/is10744r.html </loc> <!--p m-r says this link is
+broken. elm --> ).</bibl>
+<bibl id="rfc1738" key="IETF RFC 1738">IETF (Internet Engineering Task
+Force). <titleref>
+RFC 1738: Uniform Resource Locators</titleref>. 1991. (See  <loc
+href="http://www.w3.org/Addressing/rfc1738.txt">
+http://www.w3.org/Addressing/rfc1738.txt</loc>).</bibl>
+<bibl id="rfc1808" key="IETF RFC 1808">IETF (Internet Engineering Task
+Force). <titleref>
+RFC 1808: Relative Uniform Resource Locators</titleref>. 1995. (See  <loc
+href="http://www.w3.org/Addressing/rfc1808.txt">http://www.w3.org/Addressing/rfc
+1808.txt </loc>).</bibl>
+<bibl id="tei" key="TEI">C. M. Sperberg-McQueen and Lou Burnard, editors.
+<titleref>
+Guidelines for Electronic Text Encoding and Interchange</titleref>. Association
+for Computers and the Humanities (ACH), Association for Computational
+Linguistics
+(ACL), and Association for Literary and Linguistic Computing (ALLC). Chicago,
+Oxford: Text Encoding Initiative, 1994. <!-- add cite to DOM work --> </bibl>
+<bibl id="chum" key="CHUM">]Steven J. DeRose and David G. Durand. 1995. "The
+TEI Hypertext Guidelines." In <titleref>Computing and the Humanities
+</titleref>29(3).
+Reprinted in <titleref>Text Encoding Initiative: Background and
+Context</titleref>,
+ed. Nancy Ide and Jean ronis <!-- fix this name -->, ISBN 0-7923-3704-2. </bibl>
+</blist></div1>
+</back></spec>
+<?Pub *0000052575?>
diff --git a/TC/testcase/res/UTsXml/valid/REC-xml-19980210-bak.xml b/TC/testcase/res/UTsXml/valid/REC-xml-19980210-bak.xml
new file mode 100755 (executable)
index 0000000..fd46b87
--- /dev/null
@@ -0,0 +1,1342 @@
+<?xml version='1.0' encoding='ISO-8859-1' standalone='no'?>\r
+<!DOCTYPE spec SYSTEM "dtds/spec.dtd" [\r
+\r
+<!-- LAST TOUCHED BY: Tim Bray, 8 February 1997 -->\r
+\r
+<!-- The words 'FINAL EDIT' in comments mark places where changes\r
+need to be made after approval of the document by the ERB, before\r
+publication.  -->\r
+\r
+<!ENTITY XML.version "1.0">\r
+<!ENTITY doc.date "10 February 1998">\r
+<!ENTITY iso6.doc.date "19980210">\r
+<!ENTITY w3c.doc.date "02-Feb-1998">\r
+<!ENTITY draft.day '10'>\r
+<!ENTITY draft.month 'February'>\r
+<!ENTITY draft.year '1998'>\r
+\r
+<!ENTITY WebSGML \r
+ 'WebSGML Adaptations Annex to ISO 8879'>\r
+\r
+<!ENTITY lt     "<"> \r
+<!ENTITY gt     ">"> \r
+<!ENTITY xmlpio "'&lt;?xml'">\r
+<!ENTITY pic    "'?>'">\r
+<!ENTITY br     "\n">\r
+<!ENTITY cellback '#c0d9c0'>\r
+<!ENTITY mdash  "--"> <!-- &#x2014, but nsgmls doesn't grok hex -->\r
+<!ENTITY com    "--">\r
+<!ENTITY como   "--">\r
+<!ENTITY comc   "--">\r
+<!ENTITY hcro   "&amp;#x">\r
+<!-- <!ENTITY nbsp " "> -->\r
+<!ENTITY nbsp   "&#160;">\r
+<!ENTITY magicents "<code>amp</code>,\r
+<code>lt</code>,\r
+<code>gt</code>,\r
+<code>apos</code>,\r
+<code>quot</code>">\r
\r
+<!-- audience and distribution status:  for use at publication time -->\r
+<!ENTITY doc.audience "public review and discussion">\r
+<!ENTITY doc.distribution "may be distributed freely, as long as\r
+all text and legal notices remain intact">\r
+\r
+]>\r
+\r
+<!-- for Panorama *-->\r
+<?VERBATIM "eg" ?>\r
+\r
+<spec>\r
+<header>\r
+<title>Extensible Markup Language (XML) 1.0</title>\r
+<version></version>\r
+<w3c-designation>REC-xml-&iso6.doc.date;</w3c-designation>\r
+<w3c-doctype>W3C Recommendation</w3c-doctype>\r
+<pubdate><day>&draft.day;</day><month>&draft.month;</month><year>&draft.year;</year></pubdate>\r
+\r
+<publoc>\r
+<loc  href="http://www.w3.org/TR/1998/REC-xml-&iso6.doc.date;">\r
+http://www.w3.org/TR/1998/REC-xml-&iso6.doc.date;</loc>\r
+<loc  href="http://www.w3.org/TR/1998/REC-xml-&iso6.doc.date;.xml">\r
+http://www.w3.org/TR/1998/REC-xml-&iso6.doc.date;.xml</loc>\r
+<loc  href="http://www.w3.org/TR/1998/REC-xml-&iso6.doc.date;.html">\r
+http://www.w3.org/TR/1998/REC-xml-&iso6.doc.date;.html</loc>\r
+<loc  href="http://www.w3.org/TR/1998/REC-xml-&iso6.doc.date;.pdf">\r
+http://www.w3.org/TR/1998/REC-xml-&iso6.doc.date;.pdf</loc>\r
+<loc  href="http://www.w3.org/TR/1998/REC-xml-&iso6.doc.date;.ps">\r
+http://www.w3.org/TR/1998/REC-xml-&iso6.doc.date;.ps</loc>\r
+</publoc>\r
+<latestloc>\r
+<loc  href="http://www.w3.org/TR/REC-xml">\r
+http://www.w3.org/TR/REC-xml</loc>\r
+</latestloc>\r
+<prevlocs>\r
+<loc  href="http://www.w3.org/TR/PR-xml-971208">\r
+http://www.w3.org/TR/PR-xml-971208</loc>\r
+<!--\r
+<loc  href='http://www.w3.org/TR/WD-xml-961114'>\r
+http://www.w3.org/TR/WD-xml-961114</loc>\r
+<loc  href='http://www.w3.org/TR/WD-xml-lang-970331'>\r
+http://www.w3.org/TR/WD-xml-lang-970331</loc>\r
+<loc  href='http://www.w3.org/TR/WD-xml-lang-970630'>\r
+http://www.w3.org/TR/WD-xml-lang-970630</loc>\r
+<loc  href='http://www.w3.org/TR/WD-xml-970807'>\r
+http://www.w3.org/TR/WD-xml-970807</loc>\r
+<loc  href='http://www.w3.org/TR/WD-xml-971117'>\r
+http://www.w3.org/TR/WD-xml-971117</loc>-->\r
+</prevlocs>\r
+<authlist>\r
+<author><name>Tim Bray</name>\r
+<affiliation>Textuality and Netscape</affiliation>\r
+<email \r
+href="mailto:tbray@textuality.com">tbray@textuality.com</email></author>\r
+<author><name>Jean Paoli</name>\r
+<affiliation>Microsoft</affiliation>\r
+<email href="mailto:jeanpa@microsoft.com">jeanpa@microsoft.com</email></author>\r
+<author><name>C. M. Sperberg-McQueen</name>\r
+<affiliation>University of Illinois at Chicago</affiliation>\r
+<email href="mailto:cmsmcq@uic.edu">cmsmcq@uic.edu</email></author>\r
+</authlist>\r
+<abstract>\r
+<p>The Extensible Markup Language (XML) is a subset of\r
+SGML that is completely described in this document. Its goal is to\r
+enable generic SGML to be served, received, and processed on the Web\r
+in the way that is now possible with HTML. XML has been designed for\r
+ease of implementation and for interoperability with both SGML and\r
+HTML.</p>\r
+</abstract>\r
+<status>\r
+<p>This document has been reviewed by W3C Members and\r
+other interested parties and has been endorsed by the\r
+Director as a W3C Recommendation. It is a stable\r
+document and may be used as reference material or cited\r
+as a normative reference from another document. W3C's\r
+role in making the Recommendation is to draw attention\r
+to the specification and to promote its widespread\r
+deployment. This enhances the functionality and\r
+interoperability of the Web.</p>\r
+<p>\r
+This document specifies a syntax created by subsetting an existing,\r
+widely used international text processing standard (Standard\r
+Generalized Markup Language, ISO 8879:1986(E) as amended and\r
+corrected) for use on the World Wide Web.  It is a product of the W3C\r
+XML Activity, details of which can be found at <loc\r
+href='http://www.w3.org/XML'>http://www.w3.org/XML</loc>.  A list of\r
+current W3C Recommendations and other technical documents can be found\r
+at <loc href='http://www.w3.org/TR'>http://www.w3.org/TR</loc>.\r
+</p>\r
+<p>This specification uses the term URI, which is defined by <bibref\r
+ref="Berners-Lee"/>, a work in progress expected to update <bibref\r
+ref="RFC1738"/> and <bibref ref="RFC1808"/>. \r
+</p>\r
+<p>The list of known errors in this specification is \r
+available at \r
+<loc href='http://www.w3.org/XML/xml-19980210-errata'>http://www.w3.org/XML/xml-19980210-errata</loc>.</p>\r
+<p>Please report errors in this document to \r
+<loc href='mailto:xml-editor@w3.org'>xml-editor@w3.org</loc>.\r
+</p>\r
+</status>\r
+\r
+\r
+<pubstmt>\r
+<p>Chicago, Vancouver, Mountain View, et al.:\r
+World-Wide Web Consortium, XML Working Group, 1996, 1997.</p>\r
+</pubstmt>\r
+<sourcedesc>\r
+<p>Created in electronic form.</p>\r
+</sourcedesc>\r
+<langusage>\r
+<language id='EN'>English</language>\r
+<language id='ebnf'>Extended Backus-Naur Form (formal grammar)</language>\r
+</langusage>\r
+<revisiondesc>\r
+<slist>\r
+<sitem>1997-12-03 : CMSMcQ : yet further changes</sitem>\r
+<sitem>1997-12-02 : TB : further changes (see TB to XML WG,\r
+2 December 1997)</sitem>\r
+<sitem>1997-12-02 : CMSMcQ : deal with as many corrections and\r
+comments from the proofreaders as possible:\r
+entify hard-coded document date in pubdate element,\r
+change expansion of entity WebSGML,\r
+update status description as per Dan Connolly (am not sure\r
+about refernece to Berners-Lee et al.),\r
+add 'The' to abstract as per WG decision,\r
+move Relationship to Existing Standards to back matter and\r
+combine with References,\r
+re-order back matter so normative appendices come first,\r
+re-tag back matter so informative appendices are tagged informdiv1,\r
+remove XXX XXX from list of 'normative' specs in prose,\r
+move some references from Other References to Normative References,\r
+add RFC 1738, 1808, and 2141 to Other References (they are not\r
+normative since we do not require the processor to enforce any \r
+rules based on them),\r
+add reference to 'Fielding draft' (Berners-Lee et al.),\r
+move notation section to end of body,\r
+drop URIchar non-terminal and use SkipLit instead,\r
+lose stray reference to defunct nonterminal 'markupdecls',\r
+move reference to Aho et al. into appendix (Tim's right),\r
+add prose note saying that hash marks and fragment identifiers are\r
+NOT part of the URI formally speaking, and are NOT legal in \r
+system identifiers (processor 'may' signal an error).\r
+Work through:\r
+Tim Bray reacting to James Clark,\r
+Tim Bray on his own,\r
+Eve Maler,\r
+\r
+NOT DONE YET:\r
+change binary / text to unparsed / parsed.\r
+handle James's suggestion about &lt; in attriubte values\r
+uppercase hex characters,\r
+namechar list,\r
+</sitem>\r
+<sitem>1997-12-01 : JB : add some column-width parameters</sitem>\r
+<sitem>1997-12-01 : CMSMcQ : begin round of changes to incorporate\r
+recent WG decisions and other corrections:\r
+binding sources of character encoding info (27 Aug / 3 Sept),\r
+correct wording of Faust quotation (restore dropped line),\r
+drop SDD from EncodingDecl,\r
+change text at version number 1.0,\r
+drop misleading (wrong!) sentence about ignorables and extenders,\r
+modify definition of PCData to make bar on msc grammatical,\r
+change grammar's handling of internal subset (drop non-terminal markupdecls),\r
+change definition of includeSect to allow conditional sections,\r
+add integral-declaration constraint on internal subset,\r
+drop misleading / dangerous sentence about relationship of\r
+entities with system storage objects,\r
+change table body tag to htbody as per EM change to DTD,\r
+add rule about space normalization in public identifiers,\r
+add description of how to generate our name-space rules from \r
+Unicode character database (needs further work!).\r
+</sitem>\r
+<sitem>1997-10-08 : TB : Removed %-constructs again, new rules\r
+for PE appearance.</sitem>\r
+<sitem>1997-10-01 : TB : Case-sensitive markup; cleaned up\r
+element-type defs, lotsa little edits for style</sitem>\r
+<sitem>1997-09-25 : TB : Change to elm's new DTD, with\r
+substantial detail cleanup as a side-effect</sitem>\r
+<sitem>1997-07-24 : CMSMcQ : correct error (lost *) in definition \r
+of ignoreSectContents (thanks to Makoto Murata)</sitem>\r
+<sitem>Allow all empty elements to have end-tags, consistent with\r
+SGML TC (as per JJC).</sitem>\r
+<sitem>1997-07-23 : CMSMcQ : pre-emptive strike on pending corrections:\r
+introduce the term 'empty-element tag', note that all empty elements\r
+may use it, and elements declared EMPTY must use it.\r
+Add WFC requiring encoding decl to come first in an entity.\r
+Redefine notations to point to PIs as well as binary entities.\r
+Change autodetection table by removing bytes 3 and 4 from \r
+examples with Byte Order Mark.\r
+Add content model as a term and clarify that it applies to both\r
+mixed and element content.\r
+</sitem>\r
+<sitem>1997-06-30 : CMSMcQ : change date, some cosmetic changes,\r
+changes to productions for choice, seq, Mixed, NotationType,\r
+Enumeration.  Follow James Clark's suggestion and prohibit \r
+conditional sections in internal subset.  TO DO:  simplify\r
+production for ignored sections as a result, since we don't \r
+need to worry about parsers which don't expand PErefs finding\r
+a conditional section.</sitem>\r
+<sitem>1997-06-29 : TB : various edits</sitem>\r
+<sitem>1997-06-29 : CMSMcQ : further changes:\r
+Suppress old FINAL EDIT comments and some dead material.\r
+Revise occurrences of % in grammar to exploit Henry Thompson's pun,\r
+especially markupdecl and attdef.\r
+Remove RMD requirement relating to element content (?).\r
+</sitem>\r
+<sitem>1997-06-28 : CMSMcQ : Various changes for 1 July draft:\r
+Add text for draconian error handling (introduce\r
+the term Fatal Error).\r
+RE deleta est (changing wording from \r
+original announcement to restrict the requirement to validating\r
+parsers).\r
+Tag definition of validating processor and link to it.\r
+Add colon as name character.\r
+Change def of %operator.\r
+Change standard definitions of lt, gt, amp.\r
+Strip leading zeros from #x00nn forms.</sitem>\r
+<sitem>1997-04-02 : CMSMcQ : final corrections of editorial errors\r
+found in last night's proofreading.  Reverse course once more on\r
+well-formed:   Webster's Second hyphenates it, and that's enough\r
+for me.</sitem>\r
+<sitem>1997-04-01 : CMSMcQ : corrections from JJC, EM, HT, and self</sitem>\r
+<sitem>1997-03-31 : Tim Bray : many changes</sitem>\r
+<sitem>1997-03-29 : CMSMcQ : some Henry Thompson (on entity handling),\r
+some Charles Goldfarb, some ERB decisions (PE handling in miscellaneous\r
+declarations.  Changed Ident element to accept def attribute.\r
+Allow normalization of Unicode characters.  move def of systemliteral\r
+into section on literals.</sitem>\r
+<sitem>1997-03-28 : CMSMcQ : make as many corrections as possible, from\r
+Terry Allen, Norbert Mikula, James Clark, Jon Bosak, Henry Thompson,\r
+Paul Grosso, and self.  Among other things:  give in on "well formed"\r
+(Terry is right), tentatively rename QuotedCData as AttValue\r
+and Literal as EntityValue to be more informative, since attribute\r
+values are the <emph>only</emph> place QuotedCData was used, and\r
+vice versa for entity text and Literal. (I'd call it Entity Text, \r
+but 8879 uses that name for both internal and external entities.)</sitem>\r
+<sitem>1997-03-26 : CMSMcQ : resynch the two forks of this draft, reapply\r
+my changes dated 03-20 and 03-21.  Normalize old 'may not' to 'must not'\r
+except in the one case where it meant 'may or may not'.</sitem>\r
+<sitem>1997-03-21 : TB : massive changes on plane flight from Chicago\r
+to Vancouver</sitem>\r
+<sitem>1997-03-21 : CMSMcQ : correct as many reported errors as possible.\r
+</sitem>\r
+<sitem>1997-03-20 : CMSMcQ : correct typos listed in CMSMcQ hand copy of spec.</sitem>\r
+<sitem>1997-03-20 : CMSMcQ : cosmetic changes preparatory to revision for\r
+WWW conference April 1997:  restore some of the internal entity \r
+references (e.g. to docdate, etc.), change character xA0 to &amp;nbsp;\r
+and define nbsp as &amp;#160;, and refill a lot of paragraphs for\r
+legibility.</sitem>\r
+<sitem>1996-11-12 : CMSMcQ : revise using Tim's edits:\r
+Add list type of NUMBERED and change most lists either to\r
+BULLETS or to NUMBERED.\r
+Suppress QuotedNames, Names (not used).\r
+Correct trivial-grammar doc type decl.\r
+Rename 'marked section' as 'CDATA section' passim.\r
+Also edits from James Clark:\r
+Define the set of characters from which [^abc] subtracts.\r
+Charref should use just [0-9] not Digit.\r
+Location info needs cleaner treatment:  remove?  (ERB\r
+question).\r
+One example of a PI has wrong pic.\r
+Clarify discussion of encoding names.\r
+Encoding failure should lead to unspecified results; don't\r
+prescribe error recovery.\r
+Don't require exposure of entity boundaries.\r
+Ignore white space in element content.\r
+Reserve entity names of the form u-NNNN.\r
+Clarify relative URLs.\r
+And some of my own:\r
+Correct productions for content model:  model cannot\r
+consist of a name, so "elements ::= cp" is no good.\r
+</sitem>\r
+<sitem>1996-11-11 : CMSMcQ : revise for style.\r
+Add new rhs to entity declaration, for parameter entities.</sitem>\r
+<sitem>1996-11-10 : CMSMcQ : revise for style.\r
+Fix / complete section on names, characters.\r
+Add sections on parameter entities, conditional sections.\r
+Still to do:  Add compatibility note on deterministic content models.\r
+Finish stylistic revision.</sitem>\r
+<sitem>1996-10-31 : TB : Add Entity Handling section</sitem>\r
+<sitem>1996-10-30 : TB : Clean up term &amp; termdef.  Slip in\r
+ERB decision re EMPTY.</sitem>\r
+<sitem>1996-10-28 : TB : Change DTD.  Implement some of Michael's\r
+suggestions.  Change comments back to //.  Introduce language for\r
+XML namespace reservation.  Add section on white-space handling.\r
+Lots more cleanup.</sitem>\r
+<sitem>1996-10-24 : CMSMcQ : quick tweaks, implement some ERB\r
+decisions.  Characters are not integers.  Comments are /* */ not //.\r
+Add bibliographic refs to 10646, HyTime, Unicode.\r
+Rename old Cdata as MsData since it's <emph>only</emph> seen\r
+in marked sections.  Call them attribute-value pairs not\r
+name-value pairs, except once.  Internal subset is optional, needs\r
+'?'.  Implied attributes should be signaled to the app, not\r
+have values supplied by processor.</sitem>\r
+<sitem>1996-10-16 : TB : track down &amp; excise all DSD references;\r
+introduce some EBNF for entity declarations.</sitem>\r
+<sitem>1996-10-?? : TB : consistency check, fix up scraps so\r
+they all parse, get formatter working, correct a few productions.</sitem>\r
+<sitem>1996-10-10/11 : CMSMcQ : various maintenance, stylistic, and\r
+organizational changes:\r
+Replace a few literals with xmlpio and\r
+pic entities, to make them consistent and ensure we can change pic\r
+reliably when the ERB votes.\r
+Drop paragraph on recognizers from notation section.\r
+Add match, exact match to terminology.\r
+Move old 2.2 XML Processors and Apps into intro.\r
+Mention comments, PIs, and marked sections in discussion of\r
+delimiter escaping.\r
+Streamline discussion of doctype decl syntax.\r
+Drop old section of 'PI syntax' for doctype decl, and add\r
+section on partial-DTD summary PIs to end of Logical Structures\r
+section.\r
+Revise DSD syntax section to use Tim's subset-in-a-PI\r
+mechanism.</sitem>\r
+<sitem>1996-10-10 : TB : eliminate name recognizers (and more?)</sitem>\r
+<sitem>1996-10-09 : CMSMcQ : revise for style, consistency through 2.3\r
+(Characters)</sitem>\r
+<sitem>1996-10-09 : CMSMcQ : re-unite everything for convenience,\r
+at least temporarily, and revise quickly</sitem>\r
+<sitem>1996-10-08 : TB : first major homogenization pass</sitem>\r
+<sitem>1996-10-08 : TB : turn "current" attribute on div type into \r
+CDATA</sitem>\r
+<sitem>1996-10-02 : TB : remould into skeleton + entities</sitem>\r
+<sitem>1996-09-30 : CMSMcQ : add a few more sections prior to exchange\r
+                            with Tim.</sitem>\r
+<sitem>1996-09-20 : CMSMcQ : finish transcribing notes.</sitem>\r
+<sitem>1996-09-19 : CMSMcQ : begin transcribing notes for draft.</sitem>\r
+<sitem>1996-09-13 : CMSMcQ : made outline from notes of 09-06,\r
+do some housekeeping</sitem>\r
+</slist>\r
+</revisiondesc>\r
+</header>\r
+<body>\r
+<!-- &Elements; -->\r
+<div1 id='sec-notation'>\r
+<head>Notation</head>\r
\r
+<p>The formal grammar of XML is given in this specification using a simple\r
+Extended Backus-Naur Form (EBNF) notation.  Each rule in the grammar defines\r
+one symbol, in the form\r
+<eg>symbol ::= expression</eg></p>\r
+<p>Symbols are written with an initial capital letter if they are\r
+defined by a regular expression, or with an initial lower case letter \r
+otherwise.\r
+Literal strings are quoted.\r
+\r
+</p>\r
+\r
+<p>Within the expression on the right-hand side of a rule, the following\r
+expressions are used to match strings of one or more characters:\r
+<glist>\r
+<gitem>\r
+<label><code>#xN</code></label>\r
+<def><p>where <code>N</code> is a hexadecimal integer, the\r
+expression matches the character in ISO/IEC 10646 whose canonical\r
+(UCS-4) \r
+code value, when interpreted as an unsigned binary number, has\r
+the value indicated.  The number of leading zeros in the\r
+<code>#xN</code> form is insignificant; the number of leading\r
+zeros in the corresponding code value \r
+is governed by the character\r
+encoding in use and is not significant for XML.</p></def>\r
+</gitem>\r
+<gitem>\r
+<label><code>[a-zA-Z]</code>, <code>[#xN-#xN]</code></label>\r
+<def><p>matches any <termref def='dt-character'>character</termref> \r
+with a value in the range(s) indicated (inclusive).</p></def>\r
+</gitem>\r
+<gitem>\r
+<label><code>[^a-z]</code>, <code>[^#xN-#xN]</code></label>\r
+<def><p>matches any <termref def='dt-character'>character</termref> \r
+with a value <emph>outside</emph> the\r
+range indicated.</p></def>\r
+</gitem>\r
+<gitem>\r
+<label><code>[^abc]</code>, <code>[^#xN#xN#xN]</code></label>\r
+<def><p>matches any <termref def='dt-character'>character</termref>\r
+with a value not among the characters given.</p></def>\r
+</gitem>\r
+<gitem>\r
+<label><code>"string"</code></label>\r
+<def><p>matches a literal string <termref def="dt-match">matching</termref>\r
+that given inside the double quotes.</p></def>\r
+</gitem>\r
+<gitem>\r
+<label><code>'string'</code></label>\r
+<def><p>matches a literal string <termref def="dt-match">matching</termref>\r
+that given inside the single quotes.</p></def>\r
+</gitem>\r
+</glist>\r
+These symbols may be combined to match more complex patterns as follows,\r
+where <code>A</code> and <code>B</code> represent simple expressions:\r
+<glist>\r
+<gitem>\r
+<label>(<code>expression</code>)</label>\r
+<def><p><code>expression</code> is treated as a unit \r
+and may be combined as described in this list.</p></def>\r
+</gitem>\r
+<gitem>\r
+<label><code>A?</code></label>\r
+<def><p>matches <code>A</code> or nothing; optional <code>A</code>.</p></def>\r
+</gitem>\r
+<gitem>\r
+<label><code>A B</code></label>\r
+<def><p>matches <code>A</code> followed by <code>B</code>.</p></def>\r
+</gitem>\r
+<gitem>\r
+<label><code>A | B</code></label>\r
+<def><p>matches <code>A</code> or <code>B</code> but not both.</p></def>\r
+</gitem>\r
+<gitem>\r
+<label><code>A - B</code></label>\r
+<def><p>matches any string that matches <code>A</code> but does not match\r
+<code>B</code>.\r
+</p></def>\r
+</gitem>\r
+<gitem>\r
+<label><code>A+</code></label>\r
+<def><p>matches one or more occurrences of <code>A</code>.</p></def>\r
+</gitem>\r
+<gitem>\r
+<label><code>A*</code></label>\r
+<def><p>matches zero or more occurrences of <code>A</code>.</p></def>\r
+</gitem>\r
+\r
+</glist>\r
+Other notations used in the productions are:\r
+<glist>\r
+<gitem>\r
+<label><code>/* ... */</code></label>\r
+<def><p>comment.</p></def>\r
+</gitem>\r
+<gitem>\r
+<label><code>[ wfc: ... ]</code></label>\r
+<def><p>well-formedness constraint; this identifies by name a \r
+constraint on \r
+<termref def="dt-wellformed">well-formed</termref> documents\r
+associated with a production.</p></def>\r
+</gitem>\r
+<gitem>\r
+<label><code>[ vc: ... ]</code></label>\r
+<def><p>validity constraint; this identifies by name a constraint on\r
+<termref def="dt-valid">valid</termref> documents associated with\r
+a production.</p></def>\r
+</gitem>\r
+</glist>\r
+</p></div1>\r
+\r
+</body>\r
+<back>\r
+<!-- &SGML; -->\r
\r
+\r
+<!-- &Biblio; -->\r
+<div1 id='sec-bibliography'>\r
+\r
+<head>References</head>\r
+<div2 id='sec-existing-stds'>\r
+<head>Normative References</head>\r
+\r
+<blist>\r
+<bibl id='IANA' key='IANA'>\r
+(Internet Assigned Numbers Authority) <emph>Official Names for \r
+Character Sets</emph>,\r
+ed. Keld Simonsen et al.\r
+See <loc href='ftp://ftp.isi.edu/in-notes/iana/assignments/character-sets'>ftp://ftp.isi.edu/in-notes/iana/assignments/character-sets</loc>.\r
+</bibl>\r
+\r
+<bibl id='RFC1766' key='IETF RFC 1766'>\r
+IETF (Internet Engineering Task Force).\r
+<emph>RFC 1766:  Tags for the Identification of Languages</emph>,\r
+ed. H. Alvestrand.\r
+1995.\r
+</bibl>\r
+\r
+<bibl id='ISO639' key='ISO 639'>\r
+(International Organization for Standardization).\r
+<emph>ISO 639:1988 (E).\r
+Code for the representation of names of languages.</emph>\r
+[Geneva]:  International Organization for\r
+Standardization, 1988.</bibl>\r
+\r
+<bibl id='ISO3166' key='ISO 3166'>\r
+(International Organization for Standardization).\r
+<emph>ISO 3166-1:1997 (E).\r
+Codes for the representation of names of countries and their subdivisions \r
+&mdash; Part 1: Country codes</emph>\r
+[Geneva]:  International Organization for\r
+Standardization, 1997.</bibl>\r
+\r
+<bibl id='ISO10646' key='ISO/IEC 10646'>ISO\r
+(International Organization for Standardization).\r
+<emph>ISO/IEC 10646-1993 (E).  Information technology &mdash; Universal\r
+Multiple-Octet Coded Character Set (UCS) &mdash; Part 1:\r
+Architecture and Basic Multilingual Plane.</emph>\r
+[Geneva]:  International Organization for\r
+Standardization, 1993 (plus amendments AM 1 through AM 7).\r
+</bibl>\r
+\r
+<bibl id='Unicode' key='Unicode'>The Unicode Consortium.\r
+<emph>The Unicode Standard, Version 2.0.</emph>\r
+Reading, Mass.:  Addison-Wesley Developers Press, 1996.</bibl>\r
+\r
+</blist>\r
+\r
+</div2>\r
+\r
+<div2><head>Other References</head> \r
+\r
+<blist>\r
+\r
+<bibl id='Aho' key='Aho/Ullman'>Aho, Alfred V., \r
+Ravi Sethi, and Jeffrey D. Ullman.\r
+<emph>Compilers:  Principles, Techniques, and Tools</emph>.\r
+Reading:  Addison-Wesley, 1986, rpt. corr. 1988.</bibl>\r
+\r
+<bibl id="Berners-Lee" xml-link="simple" key="Berners-Lee et al.">\r
+Berners-Lee, T., R. Fielding, and L. Masinter.\r
+<emph>Uniform Resource Identifiers (URI):  Generic Syntax and\r
+Semantics</emph>.\r
+1997.\r
+(Work in progress; see updates to RFC1738.)</bibl>\r
+\r
+<bibl id='ABK' key='Brüggemann-Klein'>Brüggemann-Klein, Anne.\r
+<emph>Regular Expressions into Finite Automata</emph>.\r
+Extended abstract in I. Simon, Hrsg., LATIN 1992, \r
+S. 97-98. Springer-Verlag, Berlin 1992. \r
+Full Version in Theoretical Computer Science 120: 197-213, 1993.\r
+\r
+</bibl>\r
+\r
+<bibl id='ABKDW' key='Brüggemann-Klein and Wood'>Brüggemann-Klein, Anne,\r
+and Derick Wood.\r
+<emph>Deterministic Regular Languages</emph>.\r
+Universität Freiburg, Institut für Informatik,\r
+Bericht 38, Oktober 1991.\r
+</bibl>\r
+\r
+<bibl id='Clark' key='Clark'>James Clark.\r
+Comparison of SGML and XML. See\r
+<loc href='http://www.w3.org/TR/NOTE-sgml-xml-971215'>http://www.w3.org/TR/NOTE-sgml-xml-971215</loc>.\r
+</bibl>\r
+<bibl id="RFC1738" xml-link="simple" key="IETF RFC1738">\r
+IETF (Internet Engineering Task Force).\r
+<emph>RFC 1738:  Uniform Resource Locators (URL)</emph>, \r
+ed. T. Berners-Lee, L. Masinter, M. McCahill.\r
+1994.\r
+</bibl>\r
+\r
+<bibl id="RFC1808" xml-link="simple" key="IETF RFC1808">\r
+IETF (Internet Engineering Task Force).\r
+<emph>RFC 1808:  Relative Uniform Resource Locators</emph>, \r
+ed. R. Fielding.\r
+1995.\r
+</bibl>\r
+\r
+<bibl id="RFC2141" xml-link="simple" key="IETF RFC2141">\r
+IETF (Internet Engineering Task Force).\r
+<emph>RFC 2141:  URN Syntax</emph>, \r
+ed. R. Moats.\r
+1997.\r
+</bibl>\r
+\r
+<bibl id='ISO8879' key='ISO 8879'>ISO\r
+(International Organization for Standardization).\r
+<emph>ISO 8879:1986(E).  Information processing &mdash; Text and Office\r
+Systems &mdash; Standard Generalized Markup Language (SGML).</emph>  First\r
+edition &mdash; 1986-10-15.  [Geneva]:  International Organization for\r
+Standardization, 1986.\r
+</bibl>\r
+\r
+\r
+<bibl id='ISO10744' key='ISO/IEC 10744'>ISO\r
+(International Organization for Standardization).\r
+<emph>ISO/IEC 10744-1992 (E).  Information technology &mdash;\r
+Hypermedia/Time-based Structuring Language (HyTime).\r
+</emph>\r
+[Geneva]:  International Organization for\r
+Standardization, 1992.\r
+<emph>Extended Facilities Annexe.</emph>\r
+[Geneva]:  International Organization for\r
+Standardization, 1996. \r
+</bibl>\r
+\r
+\r
+\r
+</blist>\r
+</div2>\r
+</div1>\r
+<div1 id='CharClasses'>\r
+<head>Character Classes</head>\r
+<p>Following the characteristics defined in the Unicode standard,\r
+characters are classed as base characters (among others, these\r
+contain the alphabetic characters of the Latin alphabet, without\r
+diacritics), ideographic characters, and combining characters (among\r
+others, this class contains most diacritics); these classes combine\r
+to form the class of letters.  Digits and extenders are\r
+also distinguished.\r
+<scrap lang="ebnf" id="CHARACTERS">\r
+<head>Characters</head>\r
+<prodgroup pcw3="3" pcw4="15">\r
+<prod id="NT-Letter"><lhs>Letter</lhs>\r
+<rhs><nt def="NT-BaseChar">BaseChar</nt> \r
+| <nt def="NT-Ideographic">Ideographic</nt></rhs> </prod>\r
+<prod id='NT-BaseChar'><lhs>BaseChar</lhs>\r
+<rhs>[#x0041-#x005A]\r
+|&nbsp;[#x0061-#x007A]\r
+|&nbsp;[#x00C0-#x00D6]\r
+|&nbsp;[#x00D8-#x00F6]\r
+|&nbsp;[#x00F8-#x00FF]\r
+|&nbsp;[#x0100-#x0131]\r
+|&nbsp;[#x0134-#x013E]\r
+|&nbsp;[#x0141-#x0148]\r
+|&nbsp;[#x014A-#x017E]\r
+|&nbsp;[#x0180-#x01C3]\r
+|&nbsp;[#x01CD-#x01F0]\r
+|&nbsp;[#x01F4-#x01F5]\r
+|&nbsp;[#x01FA-#x0217]\r
+|&nbsp;[#x0250-#x02A8]\r
+|&nbsp;[#x02BB-#x02C1]\r
+|&nbsp;#x0386\r
+|&nbsp;[#x0388-#x038A]\r
+|&nbsp;#x038C\r
+|&nbsp;[#x038E-#x03A1]\r
+|&nbsp;[#x03A3-#x03CE]\r
+|&nbsp;[#x03D0-#x03D6]\r
+|&nbsp;#x03DA\r
+|&nbsp;#x03DC\r
+|&nbsp;#x03DE\r
+|&nbsp;#x03E0\r
+|&nbsp;[#x03E2-#x03F3]\r
+|&nbsp;[#x0401-#x040C]\r
+|&nbsp;[#x040E-#x044F]\r
+|&nbsp;[#x0451-#x045C]\r
+|&nbsp;[#x045E-#x0481]\r
+|&nbsp;[#x0490-#x04C4]\r
+|&nbsp;[#x04C7-#x04C8]\r
+|&nbsp;[#x04CB-#x04CC]\r
+|&nbsp;[#x04D0-#x04EB]\r
+|&nbsp;[#x04EE-#x04F5]\r
+|&nbsp;[#x04F8-#x04F9]\r
+|&nbsp;[#x0531-#x0556]\r
+|&nbsp;#x0559\r
+|&nbsp;[#x0561-#x0586]\r
+|&nbsp;[#x05D0-#x05EA]\r
+|&nbsp;[#x05F0-#x05F2]\r
+|&nbsp;[#x0621-#x063A]\r
+|&nbsp;[#x0641-#x064A]\r
+|&nbsp;[#x0671-#x06B7]\r
+|&nbsp;[#x06BA-#x06BE]\r
+|&nbsp;[#x06C0-#x06CE]\r
+|&nbsp;[#x06D0-#x06D3]\r
+|&nbsp;#x06D5\r
+|&nbsp;[#x06E5-#x06E6]\r
+|&nbsp;[#x0905-#x0939]\r
+|&nbsp;#x093D\r
+|&nbsp;[#x0958-#x0961]\r
+|&nbsp;[#x0985-#x098C]\r
+|&nbsp;[#x098F-#x0990]\r
+|&nbsp;[#x0993-#x09A8]\r
+|&nbsp;[#x09AA-#x09B0]\r
+|&nbsp;#x09B2\r
+|&nbsp;[#x09B6-#x09B9]\r
+|&nbsp;[#x09DC-#x09DD]\r
+|&nbsp;[#x09DF-#x09E1]\r
+|&nbsp;[#x09F0-#x09F1]\r
+|&nbsp;[#x0A05-#x0A0A]\r
+|&nbsp;[#x0A0F-#x0A10]\r
+|&nbsp;[#x0A13-#x0A28]\r
+|&nbsp;[#x0A2A-#x0A30]\r
+|&nbsp;[#x0A32-#x0A33]\r
+|&nbsp;[#x0A35-#x0A36]\r
+|&nbsp;[#x0A38-#x0A39]\r
+|&nbsp;[#x0A59-#x0A5C]\r
+|&nbsp;#x0A5E\r
+|&nbsp;[#x0A72-#x0A74]\r
+|&nbsp;[#x0A85-#x0A8B]\r
+|&nbsp;#x0A8D\r
+|&nbsp;[#x0A8F-#x0A91]\r
+|&nbsp;[#x0A93-#x0AA8]\r
+|&nbsp;[#x0AAA-#x0AB0]\r
+|&nbsp;[#x0AB2-#x0AB3]\r
+|&nbsp;[#x0AB5-#x0AB9]\r
+|&nbsp;#x0ABD\r
+|&nbsp;#x0AE0\r
+|&nbsp;[#x0B05-#x0B0C]\r
+|&nbsp;[#x0B0F-#x0B10]\r
+|&nbsp;[#x0B13-#x0B28]\r
+|&nbsp;[#x0B2A-#x0B30]\r
+|&nbsp;[#x0B32-#x0B33]\r
+|&nbsp;[#x0B36-#x0B39]\r
+|&nbsp;#x0B3D\r
+|&nbsp;[#x0B5C-#x0B5D]\r
+|&nbsp;[#x0B5F-#x0B61]\r
+|&nbsp;[#x0B85-#x0B8A]\r
+|&nbsp;[#x0B8E-#x0B90]\r
+|&nbsp;[#x0B92-#x0B95]\r
+|&nbsp;[#x0B99-#x0B9A]\r
+|&nbsp;#x0B9C\r
+|&nbsp;[#x0B9E-#x0B9F]\r
+|&nbsp;[#x0BA3-#x0BA4]\r
+|&nbsp;[#x0BA8-#x0BAA]\r
+|&nbsp;[#x0BAE-#x0BB5]\r
+|&nbsp;[#x0BB7-#x0BB9]\r
+|&nbsp;[#x0C05-#x0C0C]\r
+|&nbsp;[#x0C0E-#x0C10]\r
+|&nbsp;[#x0C12-#x0C28]\r
+|&nbsp;[#x0C2A-#x0C33]\r
+|&nbsp;[#x0C35-#x0C39]\r
+|&nbsp;[#x0C60-#x0C61]\r
+|&nbsp;[#x0C85-#x0C8C]\r
+|&nbsp;[#x0C8E-#x0C90]\r
+|&nbsp;[#x0C92-#x0CA8]\r
+|&nbsp;[#x0CAA-#x0CB3]\r
+|&nbsp;[#x0CB5-#x0CB9]\r
+|&nbsp;#x0CDE\r
+|&nbsp;[#x0CE0-#x0CE1]\r
+|&nbsp;[#x0D05-#x0D0C]\r
+|&nbsp;[#x0D0E-#x0D10]\r
+|&nbsp;[#x0D12-#x0D28]\r
+|&nbsp;[#x0D2A-#x0D39]\r
+|&nbsp;[#x0D60-#x0D61]\r
+|&nbsp;[#x0E01-#x0E2E]\r
+|&nbsp;#x0E30\r
+|&nbsp;[#x0E32-#x0E33]\r
+|&nbsp;[#x0E40-#x0E45]\r
+|&nbsp;[#x0E81-#x0E82]\r
+|&nbsp;#x0E84\r
+|&nbsp;[#x0E87-#x0E88]\r
+|&nbsp;#x0E8A\r
+|&nbsp;#x0E8D\r
+|&nbsp;[#x0E94-#x0E97]\r
+|&nbsp;[#x0E99-#x0E9F]\r
+|&nbsp;[#x0EA1-#x0EA3]\r
+|&nbsp;#x0EA5\r
+|&nbsp;#x0EA7\r
+|&nbsp;[#x0EAA-#x0EAB]\r
+|&nbsp;[#x0EAD-#x0EAE]\r
+|&nbsp;#x0EB0\r
+|&nbsp;[#x0EB2-#x0EB3]\r
+|&nbsp;#x0EBD\r
+|&nbsp;[#x0EC0-#x0EC4]\r
+|&nbsp;[#x0F40-#x0F47]\r
+|&nbsp;[#x0F49-#x0F69]\r
+|&nbsp;[#x10A0-#x10C5]\r
+|&nbsp;[#x10D0-#x10F6]\r
+|&nbsp;#x1100\r
+|&nbsp;[#x1102-#x1103]\r
+|&nbsp;[#x1105-#x1107]\r
+|&nbsp;#x1109\r
+|&nbsp;[#x110B-#x110C]\r
+|&nbsp;[#x110E-#x1112]\r
+|&nbsp;#x113C\r
+|&nbsp;#x113E\r
+|&nbsp;#x1140\r
+|&nbsp;#x114C\r
+|&nbsp;#x114E\r
+|&nbsp;#x1150\r
+|&nbsp;[#x1154-#x1155]\r
+|&nbsp;#x1159\r
+|&nbsp;[#x115F-#x1161]\r
+|&nbsp;#x1163\r
+|&nbsp;#x1165\r
+|&nbsp;#x1167\r
+|&nbsp;#x1169\r
+|&nbsp;[#x116D-#x116E]\r
+|&nbsp;[#x1172-#x1173]\r
+|&nbsp;#x1175\r
+|&nbsp;#x119E\r
+|&nbsp;#x11A8\r
+|&nbsp;#x11AB\r
+|&nbsp;[#x11AE-#x11AF]\r
+|&nbsp;[#x11B7-#x11B8]\r
+|&nbsp;#x11BA\r
+|&nbsp;[#x11BC-#x11C2]\r
+|&nbsp;#x11EB\r
+|&nbsp;#x11F0\r
+|&nbsp;#x11F9\r
+|&nbsp;[#x1E00-#x1E9B]\r
+|&nbsp;[#x1EA0-#x1EF9]\r
+|&nbsp;[#x1F00-#x1F15]\r
+|&nbsp;[#x1F18-#x1F1D]\r
+|&nbsp;[#x1F20-#x1F45]\r
+|&nbsp;[#x1F48-#x1F4D]\r
+|&nbsp;[#x1F50-#x1F57]\r
+|&nbsp;#x1F59\r
+|&nbsp;#x1F5B\r
+|&nbsp;#x1F5D\r
+|&nbsp;[#x1F5F-#x1F7D]\r
+|&nbsp;[#x1F80-#x1FB4]\r
+|&nbsp;[#x1FB6-#x1FBC]\r
+|&nbsp;#x1FBE\r
+|&nbsp;[#x1FC2-#x1FC4]\r
+|&nbsp;[#x1FC6-#x1FCC]\r
+|&nbsp;[#x1FD0-#x1FD3]\r
+|&nbsp;[#x1FD6-#x1FDB]\r
+|&nbsp;[#x1FE0-#x1FEC]\r
+|&nbsp;[#x1FF2-#x1FF4]\r
+|&nbsp;[#x1FF6-#x1FFC]\r
+|&nbsp;#x2126\r
+|&nbsp;[#x212A-#x212B]\r
+|&nbsp;#x212E\r
+|&nbsp;[#x2180-#x2182]\r
+|&nbsp;[#x3041-#x3094]\r
+|&nbsp;[#x30A1-#x30FA]\r
+|&nbsp;[#x3105-#x312C]\r
+|&nbsp;[#xAC00-#xD7A3]\r
+</rhs></prod>\r
+<prod id='NT-Ideographic'><lhs>Ideographic</lhs>\r
+<rhs>[#x4E00-#x9FA5]\r
+|&nbsp;#x3007\r
+|&nbsp;[#x3021-#x3029]\r
+</rhs></prod>\r
+<prod id='NT-CombiningChar'><lhs>CombiningChar</lhs>\r
+<rhs>[#x0300-#x0345]\r
+|&nbsp;[#x0360-#x0361]\r
+|&nbsp;[#x0483-#x0486]\r
+|&nbsp;[#x0591-#x05A1]\r
+|&nbsp;[#x05A3-#x05B9]\r
+|&nbsp;[#x05BB-#x05BD]\r
+|&nbsp;#x05BF\r
+|&nbsp;[#x05C1-#x05C2]\r
+|&nbsp;#x05C4\r
+|&nbsp;[#x064B-#x0652]\r
+|&nbsp;#x0670\r
+|&nbsp;[#x06D6-#x06DC]\r
+|&nbsp;[#x06DD-#x06DF]\r
+|&nbsp;[#x06E0-#x06E4]\r
+|&nbsp;[#x06E7-#x06E8]\r
+|&nbsp;[#x06EA-#x06ED]\r
+|&nbsp;[#x0901-#x0903]\r
+|&nbsp;#x093C\r
+|&nbsp;[#x093E-#x094C]\r
+|&nbsp;#x094D\r
+|&nbsp;[#x0951-#x0954]\r
+|&nbsp;[#x0962-#x0963]\r
+|&nbsp;[#x0981-#x0983]\r
+|&nbsp;#x09BC\r
+|&nbsp;#x09BE\r
+|&nbsp;#x09BF\r
+|&nbsp;[#x09C0-#x09C4]\r
+|&nbsp;[#x09C7-#x09C8]\r
+|&nbsp;[#x09CB-#x09CD]\r
+|&nbsp;#x09D7\r
+|&nbsp;[#x09E2-#x09E3]\r
+|&nbsp;#x0A02\r
+|&nbsp;#x0A3C\r
+|&nbsp;#x0A3E\r
+|&nbsp;#x0A3F\r
+|&nbsp;[#x0A40-#x0A42]\r
+|&nbsp;[#x0A47-#x0A48]\r
+|&nbsp;[#x0A4B-#x0A4D]\r
+|&nbsp;[#x0A70-#x0A71]\r
+|&nbsp;[#x0A81-#x0A83]\r
+|&nbsp;#x0ABC\r
+|&nbsp;[#x0ABE-#x0AC5]\r
+|&nbsp;[#x0AC7-#x0AC9]\r
+|&nbsp;[#x0ACB-#x0ACD]\r
+|&nbsp;[#x0B01-#x0B03]\r
+|&nbsp;#x0B3C\r
+|&nbsp;[#x0B3E-#x0B43]\r
+|&nbsp;[#x0B47-#x0B48]\r
+|&nbsp;[#x0B4B-#x0B4D]\r
+|&nbsp;[#x0B56-#x0B57]\r
+|&nbsp;[#x0B82-#x0B83]\r
+|&nbsp;[#x0BBE-#x0BC2]\r
+|&nbsp;[#x0BC6-#x0BC8]\r
+|&nbsp;[#x0BCA-#x0BCD]\r
+|&nbsp;#x0BD7\r
+|&nbsp;[#x0C01-#x0C03]\r
+|&nbsp;[#x0C3E-#x0C44]\r
+|&nbsp;[#x0C46-#x0C48]\r
+|&nbsp;[#x0C4A-#x0C4D]\r
+|&nbsp;[#x0C55-#x0C56]\r
+|&nbsp;[#x0C82-#x0C83]\r
+|&nbsp;[#x0CBE-#x0CC4]\r
+|&nbsp;[#x0CC6-#x0CC8]\r
+|&nbsp;[#x0CCA-#x0CCD]\r
+|&nbsp;[#x0CD5-#x0CD6]\r
+|&nbsp;[#x0D02-#x0D03]\r
+|&nbsp;[#x0D3E-#x0D43]\r
+|&nbsp;[#x0D46-#x0D48]\r
+|&nbsp;[#x0D4A-#x0D4D]\r
+|&nbsp;#x0D57\r
+|&nbsp;#x0E31\r
+|&nbsp;[#x0E34-#x0E3A]\r
+|&nbsp;[#x0E47-#x0E4E]\r
+|&nbsp;#x0EB1\r
+|&nbsp;[#x0EB4-#x0EB9]\r
+|&nbsp;[#x0EBB-#x0EBC]\r
+|&nbsp;[#x0EC8-#x0ECD]\r
+|&nbsp;[#x0F18-#x0F19]\r
+|&nbsp;#x0F35\r
+|&nbsp;#x0F37\r
+|&nbsp;#x0F39\r
+|&nbsp;#x0F3E\r
+|&nbsp;#x0F3F\r
+|&nbsp;[#x0F71-#x0F84]\r
+|&nbsp;[#x0F86-#x0F8B]\r
+|&nbsp;[#x0F90-#x0F95]\r
+|&nbsp;#x0F97\r
+|&nbsp;[#x0F99-#x0FAD]\r
+|&nbsp;[#x0FB1-#x0FB7]\r
+|&nbsp;#x0FB9\r
+|&nbsp;[#x20D0-#x20DC]\r
+|&nbsp;#x20E1\r
+|&nbsp;[#x302A-#x302F]\r
+|&nbsp;#x3099\r
+|&nbsp;#x309A\r
+</rhs></prod>\r
+<prod id='NT-Digit'><lhs>Digit</lhs>\r
+<rhs>[#x0030-#x0039]\r
+|&nbsp;[#x0660-#x0669]\r
+|&nbsp;[#x06F0-#x06F9]\r
+|&nbsp;[#x0966-#x096F]\r
+|&nbsp;[#x09E6-#x09EF]\r
+|&nbsp;[#x0A66-#x0A6F]\r
+|&nbsp;[#x0AE6-#x0AEF]\r
+|&nbsp;[#x0B66-#x0B6F]\r
+|&nbsp;[#x0BE7-#x0BEF]\r
+|&nbsp;[#x0C66-#x0C6F]\r
+|&nbsp;[#x0CE6-#x0CEF]\r
+|&nbsp;[#x0D66-#x0D6F]\r
+|&nbsp;[#x0E50-#x0E59]\r
+|&nbsp;[#x0ED0-#x0ED9]\r
+|&nbsp;[#x0F20-#x0F29]\r
+</rhs></prod>\r
+<prod id='NT-Extender'><lhs>Extender</lhs>\r
+<rhs>#x00B7\r
+|&nbsp;#x02D0\r
+|&nbsp;#x02D1\r
+|&nbsp;#x0387\r
+|&nbsp;#x0640\r
+|&nbsp;#x0E46\r
+|&nbsp;#x0EC6\r
+|&nbsp;#x3005\r
+|&nbsp;[#x3031-#x3035]\r
+|&nbsp;[#x309D-#x309E]\r
+|&nbsp;[#x30FC-#x30FE]\r
+</rhs></prod>\r
+\r
+</prodgroup>\r
+</scrap>\r
+</p>\r
+<p>The character classes defined here can be derived from the\r
+Unicode character database as follows:\r
+<ulist>\r
+<item>\r
+<p>Name start characters must have one of the categories Ll, Lu,\r
+Lo, Lt, Nl.</p>\r
+</item>\r
+<item>\r
+<p>Name characters other than Name-start characters \r
+must have one of the categories Mc, Me, Mn, Lm, or Nd.</p>\r
+</item>\r
+<item>\r
+<p>Characters in the compatibility area (i.e. with character code\r
+greater than #xF900 and less than #xFFFE) are not allowed in XML\r
+names.</p>\r
+</item>\r
+<item>\r
+<p>Characters which have a font or compatibility decomposition (i.e. those\r
+with a "compatibility formatting tag" in field 5 of the database --\r
+marked by field 5 beginning with a "&lt;") are not allowed.</p>\r
+</item>\r
+<item>\r
+<p>The following characters are treated as name-start characters\r
+rather than name characters, because the property file classifies\r
+them as Alphabetic:  [#x02BB-#x02C1], #x0559, #x06E5, #x06E6.</p>\r
+</item>\r
+<item>\r
+<p>Characters #x20DD-#x20E0 are excluded (in accordance with \r
+Unicode, section 5.14).</p>\r
+</item>\r
+<item>\r
+<p>Character #x00B7 is classified as an extender, because the\r
+property list so identifies it.</p>\r
+</item>\r
+<item>\r
+<p>Character #x0387 is added as a name character, because #x00B7\r
+is its canonical equivalent.</p>\r
+</item>\r
+<item>\r
+<p>Characters ':' and '_' are allowed as name-start characters.</p>\r
+</item>\r
+<item>\r
+<p>Characters '-' and '.' are allowed as name characters.</p>\r
+</item>\r
+</ulist>\r
+</p>\r
+</div1>\r
+<inform-div1 id="sec-xml-and-sgml">\r
+<head>XML and SGML</head>\r
\r
+<p>XML is designed to be a subset of SGML, in that every\r
+<termref def="dt-valid">valid</termref> XML document should also be a\r
+conformant SGML document.\r
+For a detailed comparison of the additional restrictions that XML places on\r
+documents beyond those of SGML, see <bibref ref='Clark'/>.\r
+</p>\r
+</inform-div1>\r
+<inform-div1 id="sec-entexpand">\r
+<head>Expansion of Entity and Character References</head>\r
+<p>This appendix contains some examples illustrating the\r
+sequence of entity- and character-reference recognition and\r
+expansion, as specified in <specref ref='entproc'/>.</p>\r
+<p>\r
+If the DTD contains the declaration \r
+<eg><![CDATA[<!ENTITY example "<p>An ampersand (&#38;#38;) may be escaped\r
+numerically (&#38;#38;#38;) or with a general entity\r
+(&amp;amp;).</p>" >\r
+]]></eg>\r
+then the XML processor will recognize the character references \r
+when it parses the entity declaration, and resolve them before \r
+storing the following string as the\r
+value of the entity "<code>example</code>":\r
+<eg><![CDATA[<p>An ampersand (&#38;) may be escaped\r
+numerically (&#38;#38;) or with a general entity\r
+(&amp;amp;).</p>\r
+]]></eg>\r
+A reference in the document to "<code>&amp;example;</code>" \r
+will cause the text to be reparsed, at which time the \r
+start- and end-tags of the "<code>p</code>" element will be recognized \r
+and the three references will be recognized and expanded, \r
+resulting in a "<code>p</code>" element with the following content\r
+(all data, no delimiters or markup):\r
+<eg><![CDATA[An ampersand (&) may be escaped\r
+numerically (&#38;) or with a general entity\r
+(&amp;).\r
+]]></eg>\r
+</p>\r
+<p>A more complex example will illustrate the rules and their\r
+effects fully.  In the following example, the line numbers are\r
+solely for reference.\r
+<eg><![CDATA[1 <?xml version='1.0'?>\r
+2 <!DOCTYPE test [\r
+3 <!ELEMENT test (#PCDATA) >\r
+4 <!ENTITY % xx '&#37;zz;'>\r
+5 <!ENTITY % zz '&#60;!ENTITY tricky "error-prone" >' >\r
+6 %xx;\r
+7 ]>\r
+8 <test>This sample shows a &tricky; method.</test>\r
+]]></eg>\r
+This produces the following:\r
+<ulist spacing="compact">\r
+<item><p>in line 4, the reference to character 37 is expanded immediately,\r
+and the parameter entity "<code>xx</code>" is stored in the symbol\r
+table with the value "<code>%zz;</code>".  Since the replacement text\r
+is not rescanned, the reference to parameter entity "<code>zz</code>"\r
+is not recognized.  (And it would be an error if it were, since\r
+"<code>zz</code>" is not yet declared.)</p></item>\r
+<item><p>in line 5, the character reference "<code>&amp;#60;</code>" is\r
+expanded immediately and the parameter entity "<code>zz</code>" is\r
+stored with the replacement text \r
+"<code>&lt;!ENTITY tricky "error-prone" ></code>",\r
+which is a well-formed entity declaration.</p></item>\r
+<item><p>in line 6, the reference to "<code>xx</code>" is recognized,\r
+and the replacement text of "<code>xx</code>" (namely \r
+"<code>%zz;</code>") is parsed.  The reference to "<code>zz</code>"\r
+is recognized in its turn, and its replacement text \r
+("<code>&lt;!ENTITY tricky "error-prone" ></code>") is parsed.\r
+The general entity "<code>tricky</code>" has now been\r
+declared, with the replacement text "<code>error-prone</code>".</p></item>\r
+<item><p>\r
+in line 8, the reference to the general entity "<code>tricky</code>" is\r
+recognized, and it is expanded, so the full content of the\r
+"<code>test</code>" element is the self-describing (and ungrammatical) string\r
+<emph>This sample shows a error-prone method.</emph>\r
+</p></item>\r
+</ulist>\r
+</p>\r
+</inform-div1> \r
+<inform-div1 id="determinism">\r
+<head>Deterministic Content Models</head>\r
+<p><termref def='dt-compat'>For compatibility</termref>, it is\r
+required\r
+that content models in element type declarations be deterministic.  \r
+</p>\r
+<!-- FINAL EDIT:  WebSGML allows ambiguity? -->\r
+<p>SGML\r
+requires deterministic content models (it calls them\r
+"unambiguous"); XML processors built using SGML systems may\r
+flag non-deterministic content models as errors.</p>\r
+<p>For example, the content model <code>((b, c) | (b, d))</code> is\r
+non-deterministic, because given an initial <code>b</code> the parser\r
+cannot know which <code>b</code> in the model is being matched without\r
+looking ahead to see which element follows the <code>b</code>.\r
+In this case, the two references to\r
+<code>b</code> can be collapsed \r
+into a single reference, making the model read\r
+<code>(b, (c | d))</code>.  An initial <code>b</code> now clearly\r
+matches only a single name in the content model.  The parser doesn't\r
+need to look ahead to see what follows; either <code>c</code> or\r
+<code>d</code> would be accepted.</p>\r
+<p>More formally:  a finite state automaton may be constructed from the\r
+content model using the standard algorithms, e.g. algorithm 3.5 \r
+in section 3.9\r
+of Aho, Sethi, and Ullman <bibref ref='Aho'/>.\r
+In many such algorithms, a follow set is constructed for each \r
+position in the regular expression (i.e., each leaf \r
+node in the \r
+syntax tree for the regular expression);\r
+if any position has a follow set in which \r
+more than one following position is \r
+labeled with the same element type name, \r
+then the content model is in error\r
+and may be reported as an error.\r
+</p>\r
+<p>Algorithms exist which allow many but not all non-deterministic\r
+content models to be reduced automatically to equivalent deterministic\r
+models; see Brüggemann-Klein 1991 <bibref ref='ABK'/>.</p>\r
+</inform-div1>\r
+<inform-div1 id="sec-guessing">\r
+<head>Autodetection of Character Encodings</head>\r
+<p>The XML encoding declaration functions as an internal label on each\r
+entity, indicating which character encoding is in use.  Before an XML\r
+processor can read the internal label, however, it apparently has to\r
+know what character encoding is in use&mdash;which is what the internal label\r
+is trying to indicate.  In the general case, this is a hopeless\r
+situation. It is not entirely hopeless in XML, however, because XML\r
+limits the general case in two ways:  each implementation is assumed\r
+to support only a  finite set of character encodings, and the XML\r
+encoding declaration is restricted in position and content in order to\r
+make it feasible to autodetect the character encoding in use in each\r
+entity in normal cases.  Also, in many cases other sources of information\r
+are available in addition to the XML data stream itself.  \r
+Two cases may be distinguished, \r
+depending on whether the XML entity is presented to the\r
+processor without, or with, any accompanying\r
+(external) information.  We consider the first case first.\r
+</p>\r
+<p>\r
+Because each XML entity not in UTF-8 or UTF-16 format <emph>must</emph>\r
+begin with an XML encoding declaration, in which the first  characters\r
+must be '<code>&lt;?xml</code>', any conforming processor can detect,\r
+after two to four octets of input, which of the following cases apply. \r
+In reading this list, it may help to know that in UCS-4, '&lt;' is\r
+"<code>#x0000003C</code>" and '?' is "<code>#x0000003F</code>", and the Byte\r
+Order Mark required of UTF-16 data streams is "<code>#xFEFF</code>".</p>\r
+<p>\r
+<ulist>\r
+<item>\r
+<p><code>00 00 00 3C</code>: UCS-4, big-endian machine (1234 order)</p>\r
+</item>\r
+<item>\r
+<p><code>3C 00 00 00</code>: UCS-4, little-endian machine (4321 order)</p>\r
+</item>\r
+<item>\r
+<p><code>00 00 3C 00</code>: UCS-4, unusual octet order (2143)</p>\r
+</item>\r
+<item>\r
+<p><code>00 3C 00 00</code>: UCS-4, unusual octet order (3412)</p>\r
+</item>\r
+<item>\r
+<p><code>FE FF</code>: UTF-16, big-endian</p>\r
+</item>\r
+<item>\r
+<p><code>FF FE</code>: UTF-16, little-endian</p>\r
+</item>\r
+<item>\r
+<p><code>00 3C 00 3F</code>: UTF-16, big-endian, no Byte Order Mark\r
+(and thus, strictly speaking, in error)</p>\r
+</item>\r
+<item>\r
+<p><code>3C 00 3F 00</code>: UTF-16, little-endian, no Byte Order Mark\r
+(and thus, strictly speaking, in error)</p>\r
+</item>\r
+<item>\r
+<p><code>3C 3F 78 6D</code>: UTF-8, ISO 646, ASCII, some part of ISO 8859, \r
+Shift-JIS, EUC, or any other 7-bit, 8-bit, or mixed-width encoding\r
+which ensures that the characters of ASCII have their normal positions,\r
+width,\r
+and values; the actual encoding declaration must be read to \r
+detect which of these applies, but since all of these encodings\r
+use the same bit patterns for the ASCII characters, the encoding \r
+declaration itself may be read reliably\r
+</p>\r
+</item>\r
+<item>\r
+<p><code>4C 6F A7 94</code>: EBCDIC (in some flavor; the full\r
+encoding declaration must be read to tell which code page is in \r
+use)</p>\r
+</item>\r
+<item>\r
+<p>other: UTF-8 without an encoding declaration, or else \r
+the data stream is corrupt, fragmentary, or enclosed in\r
+a wrapper of some kind</p>\r
+</item>\r
+</ulist>\r
+</p>\r
+<p>\r
+This level of autodetection is enough to read the XML encoding\r
+declaration and parse the character-encoding identifier, which is\r
+still necessary to distinguish the individual members of each family\r
+of encodings (e.g. to tell  UTF-8 from 8859, and the parts of 8859\r
+from each other, or to distinguish the specific EBCDIC code page in\r
+use, and so on).\r
+</p>\r
+<p>\r
+Because the contents of the encoding declaration are restricted to\r
+ASCII characters, a processor can reliably read the entire encoding\r
+declaration as soon as it has detected which family of encodings is in\r
+use.  Since in practice, all widely used character encodings fall into\r
+one of the categories above, the XML encoding declaration allows\r
+reasonably reliable in-band labeling of character encodings, even when\r
+external sources of information at the operating-system or\r
+transport-protocol level are unreliable.\r
+</p>\r
+<p>\r
+Once the processor has detected the character encoding in use, it can\r
+act appropriately, whether by invoking a separate input routine for\r
+each case, or by calling the proper conversion function on each\r
+character of input. \r
+</p>\r
+<p>\r
+Like any self-labeling system, the XML encoding declaration will not\r
+work if any software changes the entity's character set or encoding\r
+without updating the encoding declaration.  Implementors of\r
+character-encoding routines should be careful to ensure the accuracy\r
+of the internal and external information used to label the entity.\r
+</p>\r
+<p>The second possible case occurs when the XML entity is accompanied\r
+by encoding information, as in some file systems and some network\r
+protocols.\r
+When multiple sources of information are available,\r
+\r
+their relative\r
+priority and the preferred method of handling conflict should be\r
+specified as part of the higher-level protocol used to deliver XML.\r
+Rules for the relative priority of the internal label and the\r
+MIME-type label in an external header, for example, should be part of the\r
+RFC document defining the text/xml and application/xml MIME types. In\r
+the interests of interoperability, however, the following rules\r
+are recommended.\r
+<ulist>\r
+<item><p>If an XML entity is in a file, the Byte-Order Mark\r
+and encoding-declaration PI are used (if present) to determine the\r
+character encoding.  All other heuristics and sources of information\r
+are solely for error recovery.\r
+</p></item>\r
+<item><p>If an XML entity is delivered with a\r
+MIME type of text/xml, then the <code>charset</code> parameter\r
+on the MIME type determines the\r
+character encoding method; all other heuristics and sources of\r
+information are solely for error recovery.\r
+</p></item>\r
+<item><p>If an XML entity is delivered \r
+with a\r
+MIME type of application/xml, then the Byte-Order Mark and\r
+encoding-declaration PI are used (if present) to determine the\r
+character encoding.  All other heuristics and sources of\r
+information are solely for error recovery.\r
+</p></item>\r
+</ulist>\r
+These rules apply only in the absence of protocol-level documentation;\r
+in particular, when the MIME types text/xml and application/xml are\r
+defined, the recommendations of the relevant RFC will supersede\r
+these rules.\r
+</p>\r
+\r
+</inform-div1>\r
+\r
+<inform-div1 id="sec-xml-wg">\r
+<head>W3C XML Working Group</head>\r
\r
+<p>This specification was prepared and approved for publication by the\r
+W3C XML Working Group (WG).  WG approval of this specification does\r
+not necessarily imply that all WG members voted for its approval.  \r
+The current and former members of the XML WG are:</p>\r
\r
+<orglist>\r
+<member><name>Jon Bosak, Sun</name><role>Chair</role></member>\r
+<member><name>James Clark</name><role>Technical Lead</role></member>\r
+<member><name>Tim Bray, Textuality and Netscape</name><role>XML Co-editor</role></member>\r
+<member><name>Jean Paoli, Microsoft</name><role>XML Co-editor</role></member>\r
+<member><name>C. M. Sperberg-McQueen, U. of Ill.</name><role>XML\r
+Co-editor</role></member>\r
+<member><name>Dan Connolly, W3C</name><role>W3C Liaison</role></member>\r
+<member><name>Paula Angerstein, Texcel</name></member>\r
+<member><name>Steve DeRose, INSO</name></member>\r
+<member><name>Dave Hollander, HP</name></member>\r
+<member><name>Eliot Kimber, ISOGEN</name></member>\r
+<member><name>Eve Maler, ArborText</name></member>\r
+<member><name>Tom Magliery, NCSA</name></member>\r
+<member><name>Murray Maloney, Muzmo and Grif</name></member>\r
+<member><name>Makoto Murata, Fuji Xerox Information Systems</name></member>\r
+<member><name>Joel Nava, Adobe</name></member>\r
+<member><name>Conleth O'Connell, Vignette</name></member>\r
+<member><name>Peter Sharpe, SoftQuad</name></member>\r
+<member><name>John Tigue, DataChannel</name></member>\r
+</orglist>\r
+\r
+</inform-div1>\r
+</back>\r
+</spec>\r
+<!-- Keep this comment at the end of the file\r
+Local variables:\r
+mode: sgml\r
+sgml-default-dtd-file:"~/sgml/spec.ced"\r
+sgml-omittag:t\r
+sgml-shorttag:t\r
+End:\r
+-->\r
diff --git a/TC/testcase/res/UTsXml/valid/REC-xml-19980210.xml b/TC/testcase/res/UTsXml/valid/REC-xml-19980210.xml
new file mode 100755 (executable)
index 0000000..4e93fb3
--- /dev/null
@@ -0,0 +1,4197 @@
+<?xml version='1.0' encoding='ISO-8859-1' standalone='no'?>
+<!DOCTYPE spec SYSTEM "dtds/spec.dtd" [
+
+<!-- LAST TOUCHED BY: Tim Bray, 8 February 1997 -->
+
+<!-- The words 'FINAL EDIT' in comments mark places where changes
+need to be made after approval of the document by the ERB, before
+publication.  -->
+
+<!ENTITY XML.version "1.0">
+<!ENTITY doc.date "10 February 1998">
+<!ENTITY iso6.doc.date "19980210">
+<!ENTITY w3c.doc.date "02-Feb-1998">
+<!ENTITY draft.day '10'>
+<!ENTITY draft.month 'February'>
+<!ENTITY draft.year '1998'>
+
+<!ENTITY WebSGML 
+ 'WebSGML Adaptations Annex to ISO 8879'>
+
+<!ENTITY lt     "<"> 
+<!ENTITY gt     ">"> 
+<!ENTITY xmlpio "'&lt;?xml'">
+<!ENTITY pic    "'?>'">
+<!ENTITY br     "\n">
+<!ENTITY cellback '#c0d9c0'>
+<!ENTITY mdash  "--"> <!-- &#x2014, but nsgmls doesn't grok hex -->
+<!ENTITY com    "--">
+<!ENTITY como   "--">
+<!ENTITY comc   "--">
+<!ENTITY hcro   "&amp;#x">
+<!-- <!ENTITY nbsp " "> -->
+<!ENTITY nbsp   "&#160;">
+<!ENTITY magicents "<code>amp</code>,
+<code>lt</code>,
+<code>gt</code>,
+<code>apos</code>,
+<code>quot</code>">
+<!-- audience and distribution status:  for use at publication time -->
+<!ENTITY doc.audience "public review and discussion">
+<!ENTITY doc.distribution "may be distributed freely, as long as
+all text and legal notices remain intact">
+
+]>
+
+<!-- for Panorama *-->
+<?VERBATIM "eg" ?>
+
+<spec>
+<header>
+<title>Extensible Markup Language (XML) 1.0</title>
+<version></version>
+<w3c-designation>REC-xml-&iso6.doc.date;</w3c-designation>
+<w3c-doctype>W3C Recommendation</w3c-doctype>
+<pubdate><day>&draft.day;</day><month>&draft.month;</month><year>&draft.year;</year></pubdate>
+
+<publoc>
+<loc  href="http://www.w3.org/TR/1998/REC-xml-&iso6.doc.date;">
+http://www.w3.org/TR/1998/REC-xml-&iso6.doc.date;</loc>
+<loc  href="http://www.w3.org/TR/1998/REC-xml-&iso6.doc.date;.xml">
+http://www.w3.org/TR/1998/REC-xml-&iso6.doc.date;.xml</loc>
+<loc  href="http://www.w3.org/TR/1998/REC-xml-&iso6.doc.date;.html">
+http://www.w3.org/TR/1998/REC-xml-&iso6.doc.date;.html</loc>
+<loc  href="http://www.w3.org/TR/1998/REC-xml-&iso6.doc.date;.pdf">
+http://www.w3.org/TR/1998/REC-xml-&iso6.doc.date;.pdf</loc>
+<loc  href="http://www.w3.org/TR/1998/REC-xml-&iso6.doc.date;.ps">
+http://www.w3.org/TR/1998/REC-xml-&iso6.doc.date;.ps</loc>
+</publoc>
+<latestloc>
+<loc  href="http://www.w3.org/TR/REC-xml">
+http://www.w3.org/TR/REC-xml</loc>
+</latestloc>
+<prevlocs>
+<loc  href="http://www.w3.org/TR/PR-xml-971208">
+http://www.w3.org/TR/PR-xml-971208</loc>
+<!--
+<loc  href='http://www.w3.org/TR/WD-xml-961114'>
+http://www.w3.org/TR/WD-xml-961114</loc>
+<loc  href='http://www.w3.org/TR/WD-xml-lang-970331'>
+http://www.w3.org/TR/WD-xml-lang-970331</loc>
+<loc  href='http://www.w3.org/TR/WD-xml-lang-970630'>
+http://www.w3.org/TR/WD-xml-lang-970630</loc>
+<loc  href='http://www.w3.org/TR/WD-xml-970807'>
+http://www.w3.org/TR/WD-xml-970807</loc>
+<loc  href='http://www.w3.org/TR/WD-xml-971117'>
+http://www.w3.org/TR/WD-xml-971117</loc>-->
+</prevlocs>
+<authlist>
+<author><name>Tim Bray</name>
+<affiliation>Textuality and Netscape</affiliation>
+<email 
+href="mailto:tbray@textuality.com">tbray@textuality.com</email></author>
+<author><name>Jean Paoli</name>
+<affiliation>Microsoft</affiliation>
+<email href="mailto:jeanpa@microsoft.com">jeanpa@microsoft.com</email></author>
+<author><name>C. M. Sperberg-McQueen</name>
+<affiliation>University of Illinois at Chicago</affiliation>
+<email href="mailto:cmsmcq@uic.edu">cmsmcq@uic.edu</email></author>
+</authlist>
+<abstract>
+<p>The Extensible Markup Language (XML) is a subset of
+SGML that is completely described in this document. Its goal is to
+enable generic SGML to be served, received, and processed on the Web
+in the way that is now possible with HTML. XML has been designed for
+ease of implementation and for interoperability with both SGML and
+HTML.</p>
+</abstract>
+<status>
+<p>This document has been reviewed by W3C Members and
+other interested parties and has been endorsed by the
+Director as a W3C Recommendation. It is a stable
+document and may be used as reference material or cited
+as a normative reference from another document. W3C's
+role in making the Recommendation is to draw attention
+to the specification and to promote its widespread
+deployment. This enhances the functionality and
+interoperability of the Web.</p>
+<p>
+This document specifies a syntax created by subsetting an existing,
+widely used international text processing standard (Standard
+Generalized Markup Language, ISO 8879:1986(E) as amended and
+corrected) for use on the World Wide Web.  It is a product of the W3C
+XML Activity, details of which can be found at <loc
+href='http://www.w3.org/XML'>http://www.w3.org/XML</loc>.  A list of
+current W3C Recommendations and other technical documents can be found
+at <loc href='http://www.w3.org/TR'>http://www.w3.org/TR</loc>.
+</p>
+<p>This specification uses the term URI, which is defined by <bibref
+ref="Berners-Lee"/>, a work in progress expected to update <bibref
+ref="RFC1738"/> and <bibref ref="RFC1808"/>. 
+</p>
+<p>The list of known errors in this specification is 
+available at 
+<loc href='http://www.w3.org/XML/xml-19980210-errata'>http://www.w3.org/XML/xml-19980210-errata</loc>.</p>
+<p>Please report errors in this document to 
+<loc href='mailto:xml-editor@w3.org'>xml-editor@w3.org</loc>.
+</p>
+</status>
+
+
+<pubstmt>
+<p>Chicago, Vancouver, Mountain View, et al.:
+World-Wide Web Consortium, XML Working Group, 1996, 1997.</p>
+</pubstmt>
+<sourcedesc>
+<p>Created in electronic form.</p>
+</sourcedesc>
+<langusage>
+<language id='EN'>English</language>
+<language id='ebnf'>Extended Backus-Naur Form (formal grammar)</language>
+</langusage>
+<revisiondesc>
+<slist>
+<sitem>1997-12-03 : CMSMcQ : yet further changes</sitem>
+<sitem>1997-12-02 : TB : further changes (see TB to XML WG,
+2 December 1997)</sitem>
+<sitem>1997-12-02 : CMSMcQ : deal with as many corrections and
+comments from the proofreaders as possible:
+entify hard-coded document date in pubdate element,
+change expansion of entity WebSGML,
+update status description as per Dan Connolly (am not sure
+about refernece to Berners-Lee et al.),
+add 'The' to abstract as per WG decision,
+move Relationship to Existing Standards to back matter and
+combine with References,
+re-order back matter so normative appendices come first,
+re-tag back matter so informative appendices are tagged informdiv1,
+remove XXX XXX from list of 'normative' specs in prose,
+move some references from Other References to Normative References,
+add RFC 1738, 1808, and 2141 to Other References (they are not
+normative since we do not require the processor to enforce any 
+rules based on them),
+add reference to 'Fielding draft' (Berners-Lee et al.),
+move notation section to end of body,
+drop URIchar non-terminal and use SkipLit instead,
+lose stray reference to defunct nonterminal 'markupdecls',
+move reference to Aho et al. into appendix (Tim's right),
+add prose note saying that hash marks and fragment identifiers are
+NOT part of the URI formally speaking, and are NOT legal in 
+system identifiers (processor 'may' signal an error).
+Work through:
+Tim Bray reacting to James Clark,
+Tim Bray on his own,
+Eve Maler,
+
+NOT DONE YET:
+change binary / text to unparsed / parsed.
+handle James's suggestion about &lt; in attriubte values
+uppercase hex characters,
+namechar list,
+</sitem>
+<sitem>1997-12-01 : JB : add some column-width parameters</sitem>
+<sitem>1997-12-01 : CMSMcQ : begin round of changes to incorporate
+recent WG decisions and other corrections:
+binding sources of character encoding info (27 Aug / 3 Sept),
+correct wording of Faust quotation (restore dropped line),
+drop SDD from EncodingDecl,
+change text at version number 1.0,
+drop misleading (wrong!) sentence about ignorables and extenders,
+modify definition of PCData to make bar on msc grammatical,
+change grammar's handling of internal subset (drop non-terminal markupdecls),
+change definition of includeSect to allow conditional sections,
+add integral-declaration constraint on internal subset,
+drop misleading / dangerous sentence about relationship of
+entities with system storage objects,
+change table body tag to htbody as per EM change to DTD,
+add rule about space normalization in public identifiers,
+add description of how to generate our name-space rules from 
+Unicode character database (needs further work!).
+</sitem>
+<sitem>1997-10-08 : TB : Removed %-constructs again, new rules
+for PE appearance.</sitem>
+<sitem>1997-10-01 : TB : Case-sensitive markup; cleaned up
+element-type defs, lotsa little edits for style</sitem>
+<sitem>1997-09-25 : TB : Change to elm's new DTD, with
+substantial detail cleanup as a side-effect</sitem>
+<sitem>1997-07-24 : CMSMcQ : correct error (lost *) in definition 
+of ignoreSectContents (thanks to Makoto Murata)</sitem>
+<sitem>Allow all empty elements to have end-tags, consistent with
+SGML TC (as per JJC).</sitem>
+<sitem>1997-07-23 : CMSMcQ : pre-emptive strike on pending corrections:
+introduce the term 'empty-element tag', note that all empty elements
+may use it, and elements declared EMPTY must use it.
+Add WFC requiring encoding decl to come first in an entity.
+Redefine notations to point to PIs as well as binary entities.
+Change autodetection table by removing bytes 3 and 4 from 
+examples with Byte Order Mark.
+Add content model as a term and clarify that it applies to both
+mixed and element content.
+</sitem>
+<sitem>1997-06-30 : CMSMcQ : change date, some cosmetic changes,
+changes to productions for choice, seq, Mixed, NotationType,
+Enumeration.  Follow James Clark's suggestion and prohibit 
+conditional sections in internal subset.  TO DO:  simplify
+production for ignored sections as a result, since we don't 
+need to worry about parsers which don't expand PErefs finding
+a conditional section.</sitem>
+<sitem>1997-06-29 : TB : various edits</sitem>
+<sitem>1997-06-29 : CMSMcQ : further changes:
+Suppress old FINAL EDIT comments and some dead material.
+Revise occurrences of % in grammar to exploit Henry Thompson's pun,
+especially markupdecl and attdef.
+Remove RMD requirement relating to element content (?).
+</sitem>
+<sitem>1997-06-28 : CMSMcQ : Various changes for 1 July draft:
+Add text for draconian error handling (introduce
+the term Fatal Error).
+RE deleta est (changing wording from 
+original announcement to restrict the requirement to validating
+parsers).
+Tag definition of validating processor and link to it.
+Add colon as name character.
+Change def of %operator.
+Change standard definitions of lt, gt, amp.
+Strip leading zeros from #x00nn forms.</sitem>
+<sitem>1997-04-02 : CMSMcQ : final corrections of editorial errors
+found in last night's proofreading.  Reverse course once more on
+well-formed:   Webster's Second hyphenates it, and that's enough
+for me.</sitem>
+<sitem>1997-04-01 : CMSMcQ : corrections from JJC, EM, HT, and self</sitem>
+<sitem>1997-03-31 : Tim Bray : many changes</sitem>
+<sitem>1997-03-29 : CMSMcQ : some Henry Thompson (on entity handling),
+some Charles Goldfarb, some ERB decisions (PE handling in miscellaneous
+declarations.  Changed Ident element to accept def attribute.
+Allow normalization of Unicode characters.  move def of systemliteral
+into section on literals.</sitem>
+<sitem>1997-03-28 : CMSMcQ : make as many corrections as possible, from
+Terry Allen, Norbert Mikula, James Clark, Jon Bosak, Henry Thompson,
+Paul Grosso, and self.  Among other things:  give in on "well formed"
+(Terry is right), tentatively rename QuotedCData as AttValue
+and Literal as EntityValue to be more informative, since attribute
+values are the <emph>only</emph> place QuotedCData was used, and
+vice versa for entity text and Literal. (I'd call it Entity Text, 
+but 8879 uses that name for both internal and external entities.)</sitem>
+<sitem>1997-03-26 : CMSMcQ : resynch the two forks of this draft, reapply
+my changes dated 03-20 and 03-21.  Normalize old 'may not' to 'must not'
+except in the one case where it meant 'may or may not'.</sitem>
+<sitem>1997-03-21 : TB : massive changes on plane flight from Chicago
+to Vancouver</sitem>
+<sitem>1997-03-21 : CMSMcQ : correct as many reported errors as possible.
+</sitem>
+<sitem>1997-03-20 : CMSMcQ : correct typos listed in CMSMcQ hand copy of spec.</sitem>
+<sitem>1997-03-20 : CMSMcQ : cosmetic changes preparatory to revision for
+WWW conference April 1997:  restore some of the internal entity 
+references (e.g. to docdate, etc.), change character xA0 to &amp;nbsp;
+and define nbsp as &amp;#160;, and refill a lot of paragraphs for
+legibility.</sitem>
+<sitem>1996-11-12 : CMSMcQ : revise using Tim's edits:
+Add list type of NUMBERED and change most lists either to
+BULLETS or to NUMBERED.
+Suppress QuotedNames, Names (not used).
+Correct trivial-grammar doc type decl.
+Rename 'marked section' as 'CDATA section' passim.
+Also edits from James Clark:
+Define the set of characters from which [^abc] subtracts.
+Charref should use just [0-9] not Digit.
+Location info needs cleaner treatment:  remove?  (ERB
+question).
+One example of a PI has wrong pic.
+Clarify discussion of encoding names.
+Encoding failure should lead to unspecified results; don't
+prescribe error recovery.
+Don't require exposure of entity boundaries.
+Ignore white space in element content.
+Reserve entity names of the form u-NNNN.
+Clarify relative URLs.
+And some of my own:
+Correct productions for content model:  model cannot
+consist of a name, so "elements ::= cp" is no good.
+</sitem>
+<sitem>1996-11-11 : CMSMcQ : revise for style.
+Add new rhs to entity declaration, for parameter entities.</sitem>
+<sitem>1996-11-10 : CMSMcQ : revise for style.
+Fix / complete section on names, characters.
+Add sections on parameter entities, conditional sections.
+Still to do:  Add compatibility note on deterministic content models.
+Finish stylistic revision.</sitem>
+<sitem>1996-10-31 : TB : Add Entity Handling section</sitem>
+<sitem>1996-10-30 : TB : Clean up term &amp; termdef.  Slip in
+ERB decision re EMPTY.</sitem>
+<sitem>1996-10-28 : TB : Change DTD.  Implement some of Michael's
+suggestions.  Change comments back to //.  Introduce language for
+XML namespace reservation.  Add section on white-space handling.
+Lots more cleanup.</sitem>
+<sitem>1996-10-24 : CMSMcQ : quick tweaks, implement some ERB
+decisions.  Characters are not integers.  Comments are /* */ not //.
+Add bibliographic refs to 10646, HyTime, Unicode.
+Rename old Cdata as MsData since it's <emph>only</emph> seen
+in marked sections.  Call them attribute-value pairs not
+name-value pairs, except once.  Internal subset is optional, needs
+'?'.  Implied attributes should be signaled to the app, not
+have values supplied by processor.</sitem>
+<sitem>1996-10-16 : TB : track down &amp; excise all DSD references;
+introduce some EBNF for entity declarations.</sitem>
+<sitem>1996-10-?? : TB : consistency check, fix up scraps so
+they all parse, get formatter working, correct a few productions.</sitem>
+<sitem>1996-10-10/11 : CMSMcQ : various maintenance, stylistic, and
+organizational changes:
+Replace a few literals with xmlpio and
+pic entities, to make them consistent and ensure we can change pic
+reliably when the ERB votes.
+Drop paragraph on recognizers from notation section.
+Add match, exact match to terminology.
+Move old 2.2 XML Processors and Apps into intro.
+Mention comments, PIs, and marked sections in discussion of
+delimiter escaping.
+Streamline discussion of doctype decl syntax.
+Drop old section of 'PI syntax' for doctype decl, and add
+section on partial-DTD summary PIs to end of Logical Structures
+section.
+Revise DSD syntax section to use Tim's subset-in-a-PI
+mechanism.</sitem>
+<sitem>1996-10-10 : TB : eliminate name recognizers (and more?)</sitem>
+<sitem>1996-10-09 : CMSMcQ : revise for style, consistency through 2.3
+(Characters)</sitem>
+<sitem>1996-10-09 : CMSMcQ : re-unite everything for convenience,
+at least temporarily, and revise quickly</sitem>
+<sitem>1996-10-08 : TB : first major homogenization pass</sitem>
+<sitem>1996-10-08 : TB : turn "current" attribute on div type into 
+CDATA</sitem>
+<sitem>1996-10-02 : TB : remould into skeleton + entities</sitem>
+<sitem>1996-09-30 : CMSMcQ : add a few more sections prior to exchange
+                            with Tim.</sitem>
+<sitem>1996-09-20 : CMSMcQ : finish transcribing notes.</sitem>
+<sitem>1996-09-19 : CMSMcQ : begin transcribing notes for draft.</sitem>
+<sitem>1996-09-13 : CMSMcQ : made outline from notes of 09-06,
+do some housekeeping</sitem>
+</slist>
+</revisiondesc>
+</header>
+<body> 
+<div1 id='sec-intro'>
+<head>Introduction</head>
+<p>Extensible Markup Language, abbreviated XML, describes a class of
+data objects called <termref def="dt-xml-doc">XML documents</termref> and
+partially describes the behavior of 
+computer programs which process them. XML is an application profile or
+restricted form of SGML, the Standard Generalized Markup 
+Language <bibref ref='ISO8879'/>.
+By construction, XML documents 
+are conforming SGML documents.
+</p>
+<p>XML documents are made up of storage units called <termref
+def="dt-entity">entities</termref>, which contain either parsed
+or unparsed data.
+Parsed data is made up of <termref def="dt-character">characters</termref>,
+some 
+of which form <termref def="dt-chardata">character data</termref>, 
+and some of which form <termref def="dt-markup">markup</termref>.
+Markup encodes a description of the document's storage layout and
+logical structure. XML provides a mechanism to impose constraints on
+the storage layout and logical structure.</p>
+<p><termdef id="dt-xml-proc" term="XML Processor">A software module
+called an <term>XML processor</term> is used to read XML documents
+and provide access to their content and structure.</termdef> <termdef
+id="dt-app" term="Application">It is assumed that an XML processor is
+doing its work on behalf of another module, called the
+<term>application</term>.</termdef> This specification describes the
+required behavior of an XML processor in terms of how it must read XML
+data and the information it must provide to the application.</p>
+<div2 id='sec-origin-goals'>
+<head>Origin and Goals</head>
+<p>XML was developed by an XML Working Group (originally known as the
+SGML Editorial Review Board) formed under the auspices of the World
+Wide Web Consortium (W3C) in 1996.
+It was chaired by Jon Bosak of Sun
+Microsystems with the active participation of an XML Special
+Interest Group (previously known as the SGML Working Group) also
+organized by the W3C. The membership of the XML Working Group is given
+in an appendix. Dan Connolly served as the WG's contact with the W3C.
+</p>
+<p>The design goals for XML are:<olist>
+<item><p>XML shall be straightforwardly usable over the
+Internet.</p></item>
+<item><p>XML shall support a wide variety of applications.</p></item>
+<item><p>XML shall be compatible with SGML.</p></item>
+<item><p>It shall be easy to write programs which process XML
+documents.</p></item>
+<item><p>The number of optional features in XML is to be kept to the
+absolute minimum, ideally zero.</p></item>
+<item><p>XML documents should be human-legible and reasonably
+clear.</p></item>
+<item><p>The XML design should be prepared quickly.</p></item>
+<item><p>The design of XML shall be formal and concise.</p></item>
+<item><p>XML documents shall be easy to create.</p></item>
+<item><p>Terseness in XML markup is of minimal importance.</p></item></olist>
+</p>
+<p>This specification, 
+together with associated standards
+(Unicode and ISO/IEC 10646 for characters,
+Internet RFC 1766 for language identification tags, 
+ISO 639 for language name codes, and 
+ISO 3166 for country name codes),
+provides all the information necessary to understand 
+XML Version &XML.version;
+and construct computer programs to process it.</p>
+<p>This version of the XML specification
+<!-- is for &doc.audience;.-->
+&doc.distribution;.</p>
+
+</div2>
+
+
+<div2 id='sec-terminology'>
+<head>Terminology</head>
+<p>The terminology used to describe XML documents is defined in the body of
+this specification.
+The terms defined in the following list are used in building those
+definitions and in describing the actions of an XML processor:
+<glist>
+<gitem>
+<label>may</label>
+<def><p><termdef id="dt-may" term="May">Conforming documents and XML
+processors are permitted to but need not behave as
+described.</termdef></p></def>
+</gitem>
+<gitem>
+<label>must</label>
+<def><p>Conforming documents and XML processors 
+are required to behave as described; otherwise they are in error.
+<!-- do NOT change this! this is what defines a violation of
+a 'must' clause as 'an error'. -MSM -->
+</p></def>
+</gitem>
+<gitem>
+<label>error</label>
+<def><p><termdef id='dt-error' term='Error'
+>A violation of the rules of this
+specification; results are
+undefined.  Conforming software may detect and report an error and may
+recover from it.</termdef></p></def>
+</gitem>
+<gitem>
+<label>fatal error</label>
+<def><p><termdef id="dt-fatal" term="Fatal Error">An error
+which a conforming <termref def="dt-xml-proc">XML processor</termref>
+must detect and report to the application.
+After encountering a fatal error, the
+processor may continue
+processing the data to search for further errors and may report such
+errors to the application.  In order to support correction of errors,
+the processor may make unprocessed data from the document (with
+intermingled character data and markup) available to the application.
+Once a fatal error is detected, however, the processor must not
+continue normal processing (i.e., it must not
+continue to pass character data and information about the document's
+logical structure to the application in the normal way).
+</termdef></p></def>
+</gitem>
+<gitem>
+<label>at user option</label>
+<def><p>Conforming software may or must (depending on the modal verb in the
+sentence) behave as described; if it does, it must
+provide users a means to enable or disable the behavior
+described.</p></def>
+</gitem>
+<gitem>
+<label>validity constraint</label>
+<def><p>A rule which applies to all 
+<termref def="dt-valid">valid</termref> XML documents.
+Violations of validity constraints are errors; they must, at user option, 
+be reported by 
+<termref def="dt-validating">validating XML processors</termref>.</p></def>
+</gitem>
+<gitem>
+<label>well-formedness constraint</label>
+<def><p>A rule which applies to all <termref
+def="dt-wellformed">well-formed</termref> XML documents.
+Violations of well-formedness constraints are 
+<termref def="dt-fatal">fatal errors</termref>.</p></def>
+</gitem>
+
+<gitem>
+<label>match</label>
+<def><p><termdef id="dt-match" term="match">(Of strings or names:) 
+Two strings or names being compared must be identical.
+Characters with multiple possible representations in ISO/IEC 10646 (e.g.
+characters with 
+both precomposed and base+diacritic forms) match only if they have the
+same representation in both strings.
+At user option, processors may normalize such characters to
+some canonical form.
+No case folding is performed. 
+(Of strings and rules in the grammar:)  
+A string matches a grammatical production if it belongs to the
+language generated by that production.
+(Of content and content models:)
+An element matches its declaration when it conforms
+in the fashion described in the constraint
+<specref ref='elementvalid'/>.
+</termdef>
+</p></def>
+</gitem>
+<gitem>
+<label>for compatibility</label>
+<def><p><termdef id="dt-compat" term="For Compatibility">A feature of
+XML included solely to ensure that XML remains compatible with SGML.
+</termdef></p></def>
+</gitem>
+<gitem>
+<label>for interoperability</label>
+<def><p><termdef id="dt-interop" term="For interoperability">A
+non-binding recommendation included to increase the chances that XML
+documents can be processed by the existing installed base of SGML
+processors which predate the
+&WebSGML;.</termdef></p></def>
+</gitem>
+</glist>
+</p>
+</div2>
+
+</div1>
+<!-- &Docs; -->
+<div1 id='sec-documents'>
+<head>Documents</head>
+<p><termdef id="dt-xml-doc" term="XML Document">
+A data object is an
+<term>XML document</term> if it is
+<termref def="dt-wellformed">well-formed</termref>, as
+defined in this specification.
+A well-formed XML document may in addition be
+<termref def="dt-valid">valid</termref> if it meets certain further 
+constraints.</termdef></p>
+<p>Each XML document has both a logical and a physical structure.
+Physically, the document is composed of units called <termref
+def="dt-entity">entities</termref>.  An entity may <termref
+def="dt-entref">refer</termref> to other entities to cause their
+inclusion in the document. A document begins in a "root"  or <termref
+def="dt-docent">document entity</termref>.
+Logically, the document is composed of declarations, elements, 
+comments,
+character references, and
+processing
+instructions, all of which are indicated in the document by explicit
+markup.
+The logical and physical structures must nest properly, as described  
+in <specref ref='wf-entities'/>.
+</p>
+<div2 id='sec-well-formed'>
+<head>Well-Formed XML Documents</head>
+<p><termdef id="dt-wellformed" term="Well-Formed">
+A textual object is 
+a well-formed XML document if:</termdef>
+<olist>
+<item><p>Taken as a whole, it
+matches the production labeled <nt def='NT-document'>document</nt>.</p></item>
+<item><p>It
+meets all the well-formedness constraints given in this specification.</p>
+</item>
+<item><p>Each of the <termref def='dt-parsedent'>parsed entities</termref> 
+which is referenced directly or indirectly within the document is
+<titleref href='wf-entities'>well-formed</titleref>.</p></item>
+</olist></p>
+<p>
+<scrap lang='ebnf' id='document'>
+<head>Document</head>
+<prod id='NT-document'><lhs>document</lhs>
+<rhs><nt def='NT-prolog'>prolog</nt> 
+<nt def='NT-element'>element</nt> 
+<nt def='NT-Misc'>Misc</nt>*</rhs></prod>
+</scrap>
+</p>
+<p>Matching the <nt def="NT-document">document</nt> production 
+implies that:
+<olist>
+<item><p>It contains one or more
+<termref def="dt-element">elements</termref>.</p>
+</item>
+<!--* N.B. some readers (notably JC) find the following
+paragraph awkward and redundant.  I agree it's logically redundant:
+it *says* it is summarizing the logical implications of
+matching the grammar, and that means by definition it's
+logically redundant.  I don't think it's rhetorically
+redundant or unnecessary, though, so I'm keeping it.  It
+could however use some recasting when the editors are feeling
+stronger. -MSM *-->
+<item><p><termdef id="dt-root" term="Root Element">There is  exactly
+one element, called the <term>root</term>, or document element,  no
+part of which appears in the <termref
+def="dt-content">content</termref> of any other element.</termdef>
+For all other elements, if the start-tag is in the content of another
+element, the end-tag is in the content of the same element.  More
+simply stated, the elements, delimited by start- and end-tags, nest
+properly within each other.
+</p></item>
+</olist>
+</p>
+<p><termdef id="dt-parentchild" term="Parent/Child">As a consequence 
+of this,
+for each non-root element
+<code>C</code> in the document, there is one other element <code>P</code>
+in the document such that 
+<code>C</code> is in the content of <code>P</code>, but is not in
+the content of any other element that is in the content of
+<code>P</code>.  
+<code>P</code> is referred to as the
+<term>parent</term> of <code>C</code>, and <code>C</code> as a
+<term>child</term> of <code>P</code>.</termdef></p></div2>
+<div2 id="charsets">
+<head>Characters</head>
+<p><termdef id="dt-text" term="Text">A parsed entity contains
+<term>text</term>, a sequence of 
+<termref def="dt-character">characters</termref>, 
+which may represent markup or character data.</termdef> 
+<termdef id="dt-character" term="Character">A <term>character</term> 
+is an atomic unit of text as specified by
+ISO/IEC 10646 <bibref ref="ISO10646"/>.
+Legal characters are tab, carriage return, line feed, and the legal
+graphic characters of Unicode and ISO/IEC 10646.
+The use of "compatibility characters", as defined in section 6.8
+of <bibref ref='Unicode'/>, is discouraged.
+</termdef> 
+<scrap lang="ebnf" id="char32">
+<head>Character Range</head>
+<prodgroup pcw2="4" pcw4="17.5" pcw5="11">
+<prod id="NT-Char"><lhs>Char</lhs> 
+<rhs>#x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] 
+| [#x10000-#x10FFFF]</rhs> 
+<com>any Unicode character, excluding the
+surrogate blocks, FFFE, and FFFF.</com> </prod>
+</prodgroup>
+</scrap>
+</p>
+
+<p>The mechanism for encoding character code points into bit patterns may
+vary from entity to entity. All XML processors must accept the UTF-8
+and UTF-16 encodings of 10646; the mechanisms for signaling which of
+the two is in use, or for bringing other encodings into play, are
+discussed later, in <specref ref='charencoding'/>.
+</p>
+<!--
+<p>Regardless of the specific encoding used, any character in the ISO/IEC
+10646 character set may be referred to by the decimal or hexadecimal
+equivalent of its 
+UCS-4 code value.
+</p>-->
+</div2>
+<div2 id='sec-common-syn'>
+<head>Common Syntactic Constructs</head>
+<p>This section defines some symbols used widely in the grammar.</p>
+<p><nt def="NT-S">S</nt> (white space) consists of one or more space (#x20)
+characters, carriage returns, line feeds, or tabs.
+
+<scrap lang="ebnf" id='white'>
+<head>White Space</head>
+<prodgroup pcw2="4" pcw4="17.5" pcw5="11">
+<prod id='NT-S'><lhs>S</lhs>
+<rhs>(#x20 | #x9 | #xD | #xA)+</rhs>
+</prod>
+</prodgroup>
+</scrap></p>
+<p>Characters are classified for convenience as letters, digits, or other
+characters.  Letters consist of an alphabetic or syllabic 
+base character possibly
+followed by one or more combining characters, or of an ideographic
+character.  
+Full definitions of the specific characters in each class
+are given in <specref ref='CharClasses'/>.</p>
+<p><termdef id="dt-name" term="Name">A <term>Name</term> is a token
+beginning with a letter or one of a few punctuation characters, and continuing
+with letters, digits, hyphens, underscores, colons, or full stops, together
+known as name characters.</termdef>
+Names beginning with the string "<code>xml</code>", or any string
+which would match <code>(('X'|'x') ('M'|'m') ('L'|'l'))</code>, are
+reserved for standardization in this or future versions of this
+specification.
+</p>
+<note>
+<p>The colon character within XML names is reserved for experimentation with
+name spaces.  
+Its meaning is expected to be
+standardized at some future point, at which point those documents 
+using the colon for experimental purposes may need to be updated.
+(There is no guarantee that any name-space mechanism
+adopted for XML will in fact use the colon as a name-space delimiter.)
+In practice, this means that authors should not use the colon in XML
+names except as part of name-space experiments, but that XML processors
+should accept the colon as a name character.</p>
+</note>
+<p>An
+<nt def='NT-Nmtoken'>Nmtoken</nt> (name token) is any mixture of
+name characters.
+<scrap lang='ebnf'>
+<head>Names and Tokens</head>
+<prod id='NT-NameChar'><lhs>NameChar</lhs>
+<rhs><nt def="NT-Letter">Letter</nt> 
+| <nt def='NT-Digit'>Digit</nt> 
+| '.' | '-' | '_' | ':'
+| <nt def='NT-CombiningChar'>CombiningChar</nt> 
+| <nt def='NT-Extender'>Extender</nt></rhs>
+</prod>
+<prod id='NT-Name'><lhs>Name</lhs>
+<rhs>(<nt def='NT-Letter'>Letter</nt> | '_' | ':')
+(<nt def='NT-NameChar'>NameChar</nt>)*</rhs></prod>
+<prod id='NT-Names'><lhs>Names</lhs>
+<rhs><nt def='NT-Name'>Name</nt> 
+(<nt def='NT-S'>S</nt> <nt def='NT-Name'>Name</nt>)*</rhs></prod>
+<prod id='NT-Nmtoken'><lhs>Nmtoken</lhs>
+<rhs>(<nt def='NT-NameChar'>NameChar</nt>)+</rhs></prod>
+<prod id='NT-Nmtokens'><lhs>Nmtokens</lhs>
+<rhs><nt def='NT-Nmtoken'>Nmtoken</nt> (<nt def='NT-S'>S</nt> <nt def='NT-Nmtoken'>Nmtoken</nt>)*</rhs></prod>
+</scrap>
+</p>
+<p>Literal data is any quoted string not containing
+the quotation mark used as a delimiter for that string.
+Literals are used
+for specifying the content of internal entities
+(<nt def='NT-EntityValue'>EntityValue</nt>),
+the values of attributes (<nt def='NT-AttValue'>AttValue</nt>), 
+and external identifiers 
+(<nt def="NT-SystemLiteral">SystemLiteral</nt>).  
+Note that a <nt def='NT-SystemLiteral'>SystemLiteral</nt>
+can be parsed without scanning for markup.
+<scrap lang='ebnf'>
+<head>Literals</head>
+<prod id='NT-EntityValue'><lhs>EntityValue</lhs>
+<rhs>'"' 
+([^%&amp;"] 
+| <nt def='NT-PEReference'>PEReference</nt> 
+| <nt def='NT-Reference'>Reference</nt>)*
+'"' 
+</rhs>
+<rhs>|&nbsp; 
+"'" 
+([^%&amp;'] 
+| <nt def='NT-PEReference'>PEReference</nt> 
+| <nt def='NT-Reference'>Reference</nt>)* 
+"'"</rhs>
+</prod>
+<prod id='NT-AttValue'><lhs>AttValue</lhs>
+<rhs>'"' 
+([^&lt;&amp;"] 
+| <nt def='NT-Reference'>Reference</nt>)* 
+'"' 
+</rhs>
+<rhs>|&nbsp; 
+"'" 
+([^&lt;&amp;'] 
+| <nt def='NT-Reference'>Reference</nt>)* 
+"'"</rhs>
+</prod>
+<prod id="NT-SystemLiteral"><lhs>SystemLiteral</lhs>
+<rhs>('"' [^"]* '"') |&nbsp;("'" [^']* "'")
+</rhs>
+</prod>
+<prod id="NT-PubidLiteral"><lhs>PubidLiteral</lhs>
+<rhs>'"' <nt def='NT-PubidChar'>PubidChar</nt>* 
+'"' 
+| "'" (<nt def='NT-PubidChar'>PubidChar</nt> - "'")* "'"</rhs>
+</prod>
+<prod id="NT-PubidChar"><lhs>PubidChar</lhs>
+<rhs>#x20 | #xD | #xA 
+|&nbsp;[a-zA-Z0-9]
+|&nbsp;[-'()+,./:=?;!*#@$_%]</rhs>
+</prod>
+</scrap>
+</p>
+
+</div2>
+
+<div2 id='syntax'>
+<head>Character Data and Markup</head>
+<p><termref def='dt-text'>Text</termref> consists of intermingled 
+<termref def="dt-chardata">character
+data</termref> and markup.
+<termdef id="dt-markup" term="Markup"><term>Markup</term> takes the form of
+<termref def="dt-stag">start-tags</termref>,
+<termref def="dt-etag">end-tags</termref>,
+<termref def="dt-empty">empty-element tags</termref>,
+<termref def="dt-entref">entity references</termref>,
+<termref def="dt-charref">character references</termref>,
+<termref def="dt-comment">comments</termref>,
+<termref def="dt-cdsection">CDATA section</termref> delimiters,
+<termref def="dt-doctype">document type declarations</termref>, and
+<termref def="dt-pi">processing instructions</termref>.
+</termdef>
+</p>
+<p><termdef id="dt-chardata" term="Character Data">All text that is not markup
+constitutes the <term>character data</term> of
+the document.</termdef></p>
+<p>The ampersand character (&amp;) and the left angle bracket (&lt;)
+may appear in their literal form <emph>only</emph> when used as markup
+delimiters, or within a <termref def="dt-comment">comment</termref>, a
+<termref def="dt-pi">processing instruction</termref>, 
+or a <termref def="dt-cdsection">CDATA section</termref>.  
+
+They are also legal within the <termref def='dt-litentval'>literal entity
+value</termref> of an internal entity declaration; see
+<specref ref='wf-entities'/>.
+<!-- FINAL EDIT:  restore internal entity decl or leave it out. -->
+If they are needed elsewhere,
+they must be <termref def="dt-escape">escaped</termref>
+using either <termref def='dt-charref'>numeric character references</termref>
+or the strings
+"<code>&amp;amp;</code>" and "<code>&amp;lt;</code>" respectively. 
+The right angle
+bracket (>) may be represented using the string
+"<code>&amp;gt;</code>", and must, <termref def='dt-compat'>for
+compatibility</termref>, 
+be escaped using
+"<code>&amp;gt;</code>" or a character reference 
+when it appears in the string
+"<code>]]&gt;</code>"
+in content, 
+when that string is not marking the end of 
+a <termref def="dt-cdsection">CDATA section</termref>. 
+</p>
+<p>
+In the content of elements, character data 
+is any string of characters which does
+not contain the start-delimiter of any markup.  
+In a CDATA section, character data
+is any string of characters not including the CDATA-section-close
+delimiter, "<code>]]&gt;</code>".</p>
+<p>
+To allow attribute values to contain both single and double quotes, the
+apostrophe or single-quote character (') may be represented as
+"<code>&amp;apos;</code>", and the double-quote character (") as
+"<code>&amp;quot;</code>".
+<scrap lang="ebnf">
+<head>Character Data</head>
+<prod id='NT-CharData'>
+<lhs>CharData</lhs>
+<rhs>[^&lt;&amp;]* - ([^&lt;&amp;]* ']]&gt;' [^&lt;&amp;]*)</rhs>
+</prod>
+</scrap>
+</p>
+</div2>
+<div2 id='sec-comments'>
+<head>Comments</head>
+<p><termdef id="dt-comment" term="Comment"><term>Comments</term> may 
+appear anywhere in a document outside other 
+<termref def='dt-markup'>markup</termref>; in addition,
+they may appear within the document type declaration
+at places allowed by the grammar.
+They are not part of the document's <termref def="dt-chardata">character
+data</termref>; an XML
+processor may, but need not, make it possible for an application to
+retrieve the text of comments.
+<termref def="dt-compat">For compatibility</termref>, the string
+"<code>--</code>" (double-hyphen) must not occur within
+comments.
+<scrap lang="ebnf">
+<head>Comments</head>
+<prod id='NT-Comment'><lhs>Comment</lhs>
+<rhs>'&lt;!--'
+((<nt def='NT-Char'>Char</nt> - '-') 
+| ('-' (<nt def='NT-Char'>Char</nt> - '-')))* 
+'-->'</rhs>
+</prod>
+</scrap>
+</termdef></p>
+<p>An example of a comment:
+<eg>&lt;!&como; declarations for &lt;head> &amp; &lt;body> &comc;&gt;</eg>
+</p>
+</div2>
+<div2 id='sec-pi'>
+<head>Processing Instructions</head>
+<p><termdef id="dt-pi" term="Processing instruction"><term>Processing
+instructions</term> (PIs) allow documents to contain instructions
+for applications.
+<scrap lang="ebnf">
+<head>Processing Instructions</head>
+<prod id='NT-PI'><lhs>PI</lhs>
+<rhs>'&lt;?' <nt def='NT-PITarget'>PITarget</nt> 
+(<nt def='NT-S'>S</nt> 
+(<nt def='NT-Char'>Char</nt>* - 
+(<nt def='NT-Char'>Char</nt>* &pic; <nt def='NT-Char'>Char</nt>*)))?
+&pic;</rhs></prod>
+<prod id='NT-PITarget'><lhs>PITarget</lhs>
+<rhs><nt def='NT-Name'>Name</nt> - 
+(('X' | 'x') ('M' | 'm') ('L' | 'l'))</rhs>
+</prod>
+</scrap></termdef>
+PIs are not part of the document's <termref def="dt-chardata">character
+data</termref>, but must be passed through to the application. The
+PI begins with a target (<nt def='NT-PITarget'>PITarget</nt>) used
+to identify the application to which the instruction is directed.  
+The target names "<code>XML</code>", "<code>xml</code>", and so on are
+reserved for standardization in this or future versions of this
+specification.
+The 
+XML <termref def='dt-notation'>Notation</termref> mechanism
+may be used for
+formal declaration of PI targets.
+</p>
+</div2>
+<div2 id='sec-cdata-sect'>
+<head>CDATA Sections</head>
+<p><termdef id="dt-cdsection" term="CDATA Section"><term>CDATA sections</term>
+may occur 
+anywhere character data may occur; they are
+used to escape blocks of text containing characters which would
+otherwise be recognized as markup.  CDATA sections begin with the
+string "<code>&lt;![CDATA[</code>" and end with the string
+"<code>]]&gt;</code>":
+<scrap lang="ebnf">
+<head>CDATA Sections</head>
+<prod id='NT-CDSect'><lhs>CDSect</lhs>
+<rhs><nt def='NT-CDStart'>CDStart</nt> 
+<nt def='NT-CData'>CData</nt> 
+<nt def='NT-CDEnd'>CDEnd</nt></rhs></prod>
+<prod id='NT-CDStart'><lhs>CDStart</lhs>
+<rhs>'&lt;![CDATA['</rhs>
+</prod>
+<prod id='NT-CData'><lhs>CData</lhs>
+<rhs>(<nt def='NT-Char'>Char</nt>* - 
+(<nt def='NT-Char'>Char</nt>* ']]&gt;' <nt def='NT-Char'>Char</nt>*))
+</rhs>
+</prod>
+<prod id='NT-CDEnd'><lhs>CDEnd</lhs>
+<rhs>']]&gt;'</rhs>
+</prod>
+</scrap>
+
+Within a CDATA section, only the <nt def='NT-CDEnd'>CDEnd</nt> string is
+recognized as markup, so that left angle brackets and ampersands may occur in
+their literal form; they need not (and cannot) be escaped using
+"<code>&amp;lt;</code>" and "<code>&amp;amp;</code>".  CDATA sections
+cannot nest.</termdef>
+</p>
+
+<p>An example of a CDATA section, in which "<code>&lt;greeting></code>" and 
+"<code>&lt;/greeting></code>"
+are recognized as <termref def='dt-chardata'>character data</termref>, not
+<termref def='dt-markup'>markup</termref>:
+<eg>&lt;![CDATA[&lt;greeting>Hello, world!&lt;/greeting>]]&gt;</eg>
+</p>
+</div2>
+<div2 id='sec-prolog-dtd'>
+<head>Prolog and Document Type Declaration</head>
+<p><termdef id='dt-xmldecl' term='XML Declaration'>XML documents 
+may, and should, 
+begin with an <term>XML declaration</term> which specifies
+the version of
+XML being used.</termdef>
+For example, the following is a complete XML document, <termref
+def="dt-wellformed">well-formed</termref> but not
+<termref def="dt-valid">valid</termref>:
+<eg><![CDATA[<?xml version="1.0"?>
+<greeting>Hello, world!</greeting>
+]]></eg>
+and so is this:
+<eg><![CDATA[<greeting>Hello, world!</greeting>
+]]></eg>
+</p>
+
+<p>The version number "<code>1.0</code>" should be used to indicate
+conformance to this version of this specification; it is an error
+for a document to use the value "<code>1.0</code>" 
+if it does not conform to this version of this specification.
+It is the intent
+of the XML working group to give later versions of this specification
+numbers other than "<code>1.0</code>", but this intent does not
+indicate a
+commitment to produce any future versions of XML, nor if any are produced, to
+use any particular numbering scheme.
+Since future versions are not ruled out, this construct is provided 
+as a means to allow the possibility of automatic version recognition, should
+it become necessary.
+Processors may signal an error if they receive documents labeled with 
+versions they do not support. 
+</p>
+<p>The function of the markup in an XML document is to describe its
+storage and logical structure and to associate attribute-value pairs
+with its logical structures.  XML provides a mechanism, the <termref
+def="dt-doctype">document type declaration</termref>, to define
+constraints on the logical structure and to support the use of
+predefined storage units.
+
+<termdef id="dt-valid" term="Validity">An XML document is 
+<term>valid</term> if it has an associated document type
+declaration and if the document
+complies with the constraints expressed in it.</termdef></p>
+<p>The document type declaration must appear before
+the first <termref def="dt-element">element</termref> in the document.
+<scrap lang="ebnf" id='xmldoc'>
+<head>Prolog</head>
+<prodgroup pcw2="6" pcw4="17.5" pcw5="9">
+<prod id='NT-prolog'><lhs>prolog</lhs>
+<rhs><nt def='NT-XMLDecl'>XMLDecl</nt>? 
+<nt def='NT-Misc'>Misc</nt>* 
+(<nt def='NT-doctypedecl'>doctypedecl</nt> 
+<nt def='NT-Misc'>Misc</nt>*)?</rhs></prod>
+<prod id='NT-XMLDecl'><lhs>XMLDecl</lhs>
+<rhs>&xmlpio; 
+<nt def='NT-VersionInfo'>VersionInfo</nt> 
+<nt def='NT-EncodingDecl'>EncodingDecl</nt>? 
+<nt def='NT-SDDecl'>SDDecl</nt>? 
+<nt def="NT-S">S</nt>? 
+&pic;</rhs>
+</prod>
+<prod id='NT-VersionInfo'><lhs>VersionInfo</lhs>
+<rhs><nt def="NT-S">S</nt> 'version' <nt def='NT-Eq'>Eq</nt> 
+(' <nt def="NT-VersionNum">VersionNum</nt> ' 
+| " <nt def="NT-VersionNum">VersionNum</nt> ")</rhs>
+</prod>
+<prod id='NT-Eq'><lhs>Eq</lhs>
+<rhs><nt def='NT-S'>S</nt>? '=' <nt def='NT-S'>S</nt>?</rhs></prod>
+<prod id="NT-VersionNum">
+<lhs>VersionNum</lhs>
+<rhs>([a-zA-Z0-9_.:] | '-')+</rhs>
+</prod>
+<prod id='NT-Misc'><lhs>Misc</lhs>
+<rhs><nt def='NT-Comment'>Comment</nt> | <nt def='NT-PI'>PI</nt> | 
+<nt def='NT-S'>S</nt></rhs></prod>
+</prodgroup>
+</scrap></p>
+
+<p><termdef id="dt-doctype" term="Document Type Declaration">The XML
+<term>document type declaration</term> 
+contains or points to 
+<termref def='dt-markupdecl'>markup declarations</termref> 
+that provide a grammar for a
+class of documents.  
+This grammar is known as a document type definition,
+or <term>DTD</term>.  
+The document type declaration can point to an external subset (a
+special kind of 
+<termref def='dt-extent'>external entity</termref>) containing markup
+declarations, or can 
+contain the markup declarations directly in an internal subset, or can do
+both.   
+The DTD for a document consists of both subsets taken
+together.</termdef>
+</p>
+<p><termdef id="dt-markupdecl" term="markup declaration">
+A <term>markup declaration</term> is 
+an <termref def="dt-eldecl">element type declaration</termref>, 
+an <termref def="dt-attdecl">attribute-list declaration</termref>, 
+an <termref def="dt-entdecl">entity declaration</termref>, or
+a <termref def="dt-notdecl">notation declaration</termref>.
+</termdef>
+These declarations may be contained in whole or in part
+within <termref def='dt-PE'>parameter entities</termref>,
+as described in the well-formedness and validity constraints below.
+For fuller information, see
+<specref ref="sec-physical-struct"/>.</p>
+<scrap lang="ebnf" id='dtd'>
+<head>Document Type Definition</head>
+<prodgroup pcw2="6" pcw4="17.5" pcw5="9">
+<prod id='NT-doctypedecl'><lhs>doctypedecl</lhs>
+<rhs>'&lt;!DOCTYPE' <nt def='NT-S'>S</nt> 
+<nt def='NT-Name'>Name</nt> (<nt def='NT-S'>S</nt> 
+<nt def='NT-ExternalID'>ExternalID</nt>)? 
+<nt def='NT-S'>S</nt>? ('[' 
+(<nt def='NT-markupdecl'>markupdecl</nt> 
+| <nt def='NT-PEReference'>PEReference</nt> 
+| <nt def='NT-S'>S</nt>)*
+']' 
+<nt def='NT-S'>S</nt>?)? '>'</rhs>
+<vc def="vc-roottype"/>
+</prod>
+<prod id='NT-markupdecl'><lhs>markupdecl</lhs>
+<rhs><nt def='NT-elementdecl'>elementdecl</nt> 
+| <nt def='NT-AttlistDecl'>AttlistDecl</nt> 
+| <nt def='NT-EntityDecl'>EntityDecl</nt> 
+| <nt def='NT-NotationDecl'>NotationDecl</nt> 
+| <nt def='NT-PI'>PI</nt> 
+| <nt def='NT-Comment'>Comment</nt>
+</rhs>
+<vc def='vc-PEinMarkupDecl'/>
+<wfc def="wfc-PEinInternalSubset"/>
+</prod>
+
+</prodgroup>
+</scrap>
+
+<p>The markup declarations may be made up in whole or in part of
+the <termref def='dt-repltext'>replacement text</termref> of 
+<termref def='dt-PE'>parameter entities</termref>.
+The productions later in this specification for
+individual nonterminals (<nt def='NT-elementdecl'>elementdecl</nt>,
+<nt def='NT-AttlistDecl'>AttlistDecl</nt>, and so on) describe 
+the declarations <emph>after</emph> all the parameter entities have been 
+<termref def='dt-include'>included</termref>.</p>
+
+<vcnote id="vc-roottype">
+<head>Root Element Type</head>
+<p>
+The <nt def='NT-Name'>Name</nt> in the document type declaration must
+match the element type of the <termref def='dt-root'>root element</termref>.
+</p>
+</vcnote>
+
+<vcnote id='vc-PEinMarkupDecl'>
+<head>Proper Declaration/PE Nesting</head>
+<p>Parameter-entity 
+<termref def='dt-repltext'>replacement text</termref> must be properly nested
+with markup declarations. 
+That is to say, if either the first character
+or the last character of a markup
+declaration (<nt def='NT-markupdecl'>markupdecl</nt> above)
+is contained in the replacement text for a 
+<termref def='dt-PERef'>parameter-entity reference</termref>,
+both must be contained in the same replacement text.</p>
+</vcnote>
+<wfcnote id="wfc-PEinInternalSubset">
+<head>PEs in Internal Subset</head>
+<p>In the internal DTD subset, 
+<termref def='dt-PERef'>parameter-entity references</termref>
+can occur only where markup declarations can occur, not
+within markup declarations.  (This does not apply to
+references that occur in
+external parameter entities or to the external subset.)
+</p>
+</wfcnote>
+<p>
+Like the internal subset, the external subset and 
+any external parameter entities referred to in the DTD 
+must consist of a series of complete markup declarations of the types 
+allowed by the non-terminal symbol
+<nt def="NT-markupdecl">markupdecl</nt>, interspersed with white space
+or <termref def="dt-PERef">parameter-entity references</termref>.
+However, portions of the contents
+of the 
+external subset or of external parameter entities may conditionally be ignored
+by using 
+the <termref def="dt-cond-section">conditional section</termref>
+construct; this is not allowed in the internal subset.
+
+<scrap id="ext-Subset">
+<head>External Subset</head>
+<prodgroup pcw2="6" pcw4="17.5" pcw5="9">
+<prod id='NT-extSubset'><lhs>extSubset</lhs>
+<rhs><nt def='NT-TextDecl'>TextDecl</nt>?
+<nt def='NT-extSubsetDecl'>extSubsetDecl</nt></rhs></prod>
+<prod id='NT-extSubsetDecl'><lhs>extSubsetDecl</lhs>
+<rhs>(
+<nt def='NT-markupdecl'>markupdecl</nt> 
+| <nt def='NT-conditionalSect'>conditionalSect</nt> 
+| <nt def='NT-PEReference'>PEReference</nt> 
+| <nt def='NT-S'>S</nt>
+)*</rhs>
+</prod>
+</prodgroup>
+</scrap></p>
+<p>The external subset and external parameter entities also differ 
+from the internal subset in that in them,
+<termref def="dt-PERef">parameter-entity references</termref>
+are permitted <emph>within</emph> markup declarations,
+not only <emph>between</emph> markup declarations.</p>
+<p>An example of an XML document with a document type declaration:
+<eg><![CDATA[<?xml version="1.0"?>
+<!DOCTYPE greeting SYSTEM "hello.dtd">
+<greeting>Hello, world!</greeting>
+]]></eg>
+The <termref def="dt-sysid">system identifier</termref> 
+"<code>hello.dtd</code>" gives the URI of a DTD for the document.</p>
+<p>The declarations can also be given locally, as in this 
+example:
+<eg><![CDATA[<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE greeting [
+  <!ELEMENT greeting (#PCDATA)>
+]>
+<greeting>Hello, world!</greeting>
+]]></eg>
+If both the external and internal subsets are used, the 
+internal subset is considered to occur before the external subset.
+<!-- 'is considered to'? boo. whazzat mean? -->
+This has the effect that entity and attribute-list declarations in the
+internal subset take precedence over those in the external subset.
+</p>
+</div2>
+<div2 id='sec-rmd'>
+<head>Standalone Document Declaration</head>
+<p>Markup declarations can affect the content of the document,
+as passed from an <termref def="dt-xml-proc">XML processor</termref> 
+to an application; examples are attribute defaults and entity
+declarations.
+The standalone document declaration,
+which may appear as a component of the XML declaration, signals
+whether or not there are such declarations which appear external to 
+the <termref def='dt-docent'>document entity</termref>.
+<scrap lang="ebnf" id='fulldtd'>
+<head>Standalone Document Declaration</head>
+<prodgroup pcw2="4" pcw4="19.5" pcw5="9">
+<prod id='NT-SDDecl'><lhs>SDDecl</lhs>
+<rhs>
+<nt def="NT-S">S</nt> 
+'standalone' <nt def='NT-Eq'>Eq</nt> 
+(("'" ('yes' | 'no') "'") | ('"' ('yes' | 'no') '"'))
+</rhs>
+<vc def='vc-check-rmd'/></prod>
+</prodgroup>
+</scrap></p>
+<p>
+In a standalone document declaration, the value "<code>yes</code>" indicates
+that there 
+are no markup declarations external to the <termref def='dt-docent'>document
+entity</termref> (either in the DTD external subset, or in an
+external parameter entity referenced from the internal subset)
+which affect the information passed from the XML processor to
+the application.  
+The value "<code>no</code>" indicates that there are or may be such
+external markup declarations.
+Note that the standalone document declaration only 
+denotes the presence of external <emph>declarations</emph>; the presence, in a
+document, of 
+references to external <emph>entities</emph>, when those entities are
+internally declared, 
+does not change its standalone status.</p>
+<p>If there are no external markup declarations, the standalone document
+declaration has no meaning. 
+If there are external markup declarations but there is no standalone
+document declaration, the value "<code>no</code>" is assumed.</p>
+<p>Any XML document for which <code>standalone="no"</code> holds can 
+be converted algorithmically to a standalone document, 
+which may be desirable for some network delivery applications.</p>
+<vcnote id='vc-check-rmd'>
+<head>Standalone Document Declaration</head>
+<p>The standalone document declaration must have
+the value "<code>no</code>" if any external markup declarations
+contain declarations of:</p><ulist>
+<item><p>attributes with <termref def="dt-default">default</termref> values, if
+elements to which
+these attributes apply appear in the document without
+specifications of values for these attributes, or</p></item>
+<item><p>entities (other than &magicents;), 
+if <termref def="dt-entref">references</termref> to those
+entities appear in the document, or</p>
+</item>
+<item><p>attributes with values subject to
+<titleref href='AVNormalize'>normalization</titleref>, where the
+attribute appears in the document with a value which will
+change as a result of normalization, or</p>
+</item>
+<item>
+<p>element types with <termref def="dt-elemcontent">element content</termref>, 
+if white space occurs
+directly within any instance of those types.
+</p></item>
+</ulist>
+
+</vcnote>
+<p>An example XML declaration with a standalone document declaration:<eg
+>&lt;?xml version="&XML.version;" standalone='yes'?></eg></p>
+</div2>
+<div2 id='sec-white-space'>
+<head>White Space Handling</head>
+
+<p>In editing XML documents, it is often convenient to use "white space"
+(spaces, tabs, and blank lines, denoted by the nonterminal 
+<nt def='NT-S'>S</nt> in this specification) to
+set apart the markup for greater readability.  Such white space is typically
+not intended for inclusion in the delivered version of the document.
+On the other hand, "significant" white space that should be preserved in the
+delivered version is common, for example in poetry and
+source code.</p>
+<p>An <termref def='dt-xml-proc'>XML processor</termref> 
+must always pass all characters in a document that are not
+markup through to the application.   A <termref def='dt-validating'>
+validating XML processor</termref> must also inform the application
+which  of these characters constitute white space appearing
+in <termref def="dt-elemcontent">element content</termref>.
+</p>
+<p>A special <termref def='dt-attr'>attribute</termref> 
+named <kw>xml:space</kw> may be attached to an element
+to signal an intention that in that element,
+white space should be preserved by applications.
+In valid documents, this attribute, like any other, must be 
+<termref def="dt-attdecl">declared</termref> if it is used.
+When declared, it must be given as an 
+<termref def='dt-enumerated'>enumerated type</termref> whose only
+possible values are "<code>default</code>" and "<code>preserve</code>".
+For example:<eg><![CDATA[    <!ATTLIST poem   xml:space (default|preserve) 'preserve'>]]></eg></p>
+<p>The value "<code>default</code>" signals that applications'
+default white-space processing modes are acceptable for this element; the
+value "<code>preserve</code>" indicates the intent that applications preserve
+all the white space.
+This declared intent is considered to apply to all elements within the content
+of the element where it is specified, unless overriden with another instance
+of the <kw>xml:space</kw> attribute.
+</p>
+<p>The <termref def='dt-root'>root element</termref> of any document
+is considered to have signaled no intentions as regards application space
+handling, unless it provides a value for 
+this attribute or the attribute is declared with a default value.
+</p>
+
+</div2>
+<div2 id='sec-line-ends'>
+<head>End-of-Line Handling</head>
+<p>XML <termref def='dt-parsedent'>parsed entities</termref> are often stored in
+computer files which, for editing convenience, are organized into lines.
+These lines are typically separated by some combination of the characters
+carriage-return (#xD) and line-feed (#xA).</p>
+<p>To simplify the tasks of <termref def='dt-app'>applications</termref>,
+wherever an external parsed entity or the literal entity value
+of an internal parsed entity contains either the literal 
+two-character sequence "#xD#xA" or a standalone literal
+#xD, an <termref def='dt-xml-proc'>XML processor</termref> must 
+pass to the application the single character #xA.
+(This behavior can 
+conveniently be produced by normalizing all 
+line breaks to #xA on input, before parsing.)
+</p>
+</div2>
+<div2 id='sec-lang-tag'>
+<head>Language Identification</head>
+<p>In document processing, it is often useful to
+identify the natural or formal language 
+in which the content is 
+written.
+A special <termref def="dt-attr">attribute</termref> named
+<kw>xml:lang</kw> may be inserted in
+documents to specify the 
+language used in the contents and attribute values 
+of any element in an XML document.
+In valid documents, this attribute, like any other, must be 
+<termref def="dt-attdecl">declared</termref> if it is used.
+The values of the attribute are language identifiers as defined
+by <bibref ref="RFC1766"/>, "Tags for the Identification of Languages":
+<scrap lang='ebnf'>
+<head>Language Identification</head>
+<prod id='NT-LanguageID'><lhs>LanguageID</lhs>
+<rhs><nt def='NT-Langcode'>Langcode</nt> 
+('-' <nt def='NT-Subcode'>Subcode</nt>)*</rhs></prod>
+<prod id='NT-Langcode'><lhs>Langcode</lhs>
+<rhs><nt def='NT-ISO639Code'>ISO639Code</nt> | 
+<nt def='NT-IanaCode'>IanaCode</nt> | 
+<nt def='NT-UserCode'>UserCode</nt></rhs>
+</prod>
+<prod id='NT-ISO639Code'><lhs>ISO639Code</lhs>
+<rhs>([a-z] | [A-Z]) ([a-z] | [A-Z])</rhs></prod>
+<prod id='NT-IanaCode'><lhs>IanaCode</lhs>
+<rhs>('i' | 'I') '-' ([a-z] | [A-Z])+</rhs></prod>
+<prod id='NT-UserCode'><lhs>UserCode</lhs>
+<rhs>('x' | 'X') '-' ([a-z] | [A-Z])+</rhs></prod>
+<prod id='NT-Subcode'><lhs>Subcode</lhs>
+<rhs>([a-z] | [A-Z])+</rhs></prod>
+</scrap>
+The <nt def='NT-Langcode'>Langcode</nt> may be any of the following:
+<ulist>
+<item><p>a two-letter language code as defined by 
+<bibref ref="ISO639"/>, "Codes
+for the representation of names of languages"</p></item>
+<item><p>a language identifier registered with the Internet
+Assigned Numbers Authority <bibref ref='IANA'/>; these begin with the 
+prefix "<code>i-</code>" (or "<code>I-</code>")</p></item>
+<item><p>a language identifier assigned by the user, or agreed on
+between parties in private use; these must begin with the
+prefix "<code>x-</code>" or "<code>X-</code>" in order to ensure that they do not conflict 
+with names later standardized or registered with IANA</p></item>
+</ulist></p>
+<p>There may be any number of <nt def='NT-Subcode'>Subcode</nt> segments; if
+the first 
+subcode segment exists and the Subcode consists of two 
+letters, then it must be a country code from 
+<bibref ref="ISO3166"/>, "Codes 
+for the representation of names of countries."
+If the first 
+subcode consists of more than two letters, it must be
+a subcode for the language in question registered with IANA,
+unless the <nt def='NT-Langcode'>Langcode</nt> begins with the prefix 
+"<code>x-</code>" or
+"<code>X-</code>". </p>
+<p>It is customary to give the language code in lower case, and
+the country code (if any) in upper case.
+Note that these values, unlike other names in XML documents,
+are case insensitive.</p>
+<p>For example:
+<eg><![CDATA[<p xml:lang="en">The quick brown fox jumps over the lazy dog.</p>
+<p xml:lang="en-GB">What colour is it?</p>
+<p xml:lang="en-US">What color is it?</p>
+<sp who="Faust" desc='leise' xml:lang="de">
+  <l>Habe nun, ach! Philosophie,</l>
+  <l>Juristerei, und Medizin</l>
+  <l>und leider auch Theologie</l>
+  <l>durchaus studiert mit heißem Bemüh'n.</l>
+  </sp>]]></eg></p>
+<!--<p>The xml:lang value is considered to apply both to the contents of an
+element and 
+(unless otherwise via attribute default values) to the
+values of all of its attributes with free-text (CDATA) values.  -->
+<p>The intent declared with <kw>xml:lang</kw> is considered to apply to
+all attributes and content of the element where it is specified,
+unless overridden with an instance of <kw>xml:lang</kw>
+on another element within that content.</p>
+<!--
+If no
+value is specified for xml:lang on an element, and no default value is
+defined for it in the DTD, then the xml:lang attribute of any element
+takes the same value it has in the parent element, if any.  The two
+technical terms in the following example both have the same effective
+value for xml:lang:
+
+  <p xml:lang="en">Here the keywords are
+  <term xml:lang="en">shift</term> and
+  <term>reduce</term>. ...</p>
+
+The application, not the XML processor, is responsible for this '
+inheritance' of attribute values.
+-->
+<p>A simple declaration for <kw>xml:lang</kw> might take
+the form
+<eg>xml:lang  NMTOKEN  #IMPLIED</eg>
+but specific default values may also be given, if appropriate.  In a
+collection of French poems for English students, with glosses and
+notes in English, the xml:lang attribute might be declared this way:
+<eg><![CDATA[    <!ATTLIST poem   xml:lang NMTOKEN 'fr'>
+    <!ATTLIST gloss  xml:lang NMTOKEN 'en'>
+    <!ATTLIST note   xml:lang NMTOKEN 'en'>]]></eg>
+</p>
+
+</div2>
+</div1>
+<!-- &Elements; -->
+<div1 id='sec-logical-struct'>
+<head>Logical Structures</head>
+<p><termdef id="dt-element" term="Element">Each <termref
+def="dt-xml-doc">XML document</termref> contains one or more
+<term>elements</term>, the boundaries of which are 
+either delimited by <termref def="dt-stag">start-tags</termref> 
+and <termref def="dt-etag">end-tags</termref>, or, for <termref
+def="dt-empty">empty</termref> elements, by an <termref
+def="dt-eetag">empty-element tag</termref>. Each element has a type,
+identified by name, sometimes called its "generic
+identifier" (GI), and may have a set of
+attribute specifications.</termdef>  Each attribute specification 
+has a <termref
+def="dt-attrname">name</termref> and a <termref
+def="dt-attrval">value</termref>.
+</p>
+<scrap lang='ebnf'><head>Element</head>
+<prod id='NT-element'><lhs>element</lhs>
+<rhs><nt def='NT-EmptyElemTag'>EmptyElemTag</nt></rhs>
+<rhs>| <nt def='NT-STag'>STag</nt> <nt def='NT-content'>content</nt> 
+<nt def='NT-ETag'>ETag</nt></rhs>
+<wfc def='GIMatch'/>
+<vc def='elementvalid'/>
+</prod>
+</scrap>
+<p>This specification does not constrain the semantics, use, or (beyond
+syntax) names of the element types and attributes, except that names
+beginning with a match to <code>(('X'|'x')('M'|'m')('L'|'l'))</code>
+are reserved for standardization in this or future versions of this
+specification.
+</p>
+<wfcnote id='GIMatch'>
+<head>Element Type Match</head>
+<p>
+The <nt def='NT-Name'>Name</nt> in an element's end-tag must match 
+the element type in
+the start-tag.
+</p>
+</wfcnote>
+<vcnote id='elementvalid'>
+<head>Element Valid</head>
+<p>An element is
+valid if
+there is a declaration matching 
+<nt def='NT-elementdecl'>elementdecl</nt> where the
+<nt def='NT-Name'>Name</nt> matches the element type, and
+one of the following holds:</p>
+<olist>
+<item><p>The declaration matches <kw>EMPTY</kw> and the element has no 
+<termref def='dt-content'>content</termref>.</p></item>
+<item><p>The declaration matches <nt def='NT-children'>children</nt> and
+the sequence of 
+<termref def="dt-parentchild">child elements</termref>
+belongs to the language generated by the regular expression in
+the content model, with optional white space (characters 
+matching the nonterminal <nt def='NT-S'>S</nt>) between each pair
+of child elements.</p></item>
+<item><p>The declaration matches <nt def='NT-Mixed'>Mixed</nt> and 
+the content consists of <termref def='dt-chardata'>character 
+data</termref> and <termref def='dt-parentchild'>child elements</termref>
+whose types match names in the content model.</p></item>
+<item><p>The declaration matches <kw>ANY</kw>, and the types
+of any <termref def='dt-parentchild'>child elements</termref> have
+been declared.</p></item>
+</olist>
+</vcnote>
+
+<div2 id='sec-starttags'>
+<head>Start-Tags, End-Tags, and Empty-Element Tags</head>
+<p><termdef id="dt-stag" term="Start-Tag">The beginning of every
+non-empty XML element is marked by a <term>start-tag</term>.
+<scrap lang='ebnf'>
+<head>Start-tag</head>
+<prodgroup pcw2="6" pcw4="15" pcw5="11.5">
+<prod id='NT-STag'><lhs>STag</lhs>
+<rhs>'&lt;' <nt def='NT-Name'>Name</nt> 
+(<nt def='NT-S'>S</nt> <nt def='NT-Attribute'>Attribute</nt>)* 
+<nt def='NT-S'>S</nt>? '>'</rhs>
+<wfc def="uniqattspec"/>
+</prod>
+<prod id='NT-Attribute'><lhs>Attribute</lhs>
+<rhs><nt def='NT-Name'>Name</nt> <nt def='NT-Eq'>Eq</nt> 
+<nt def='NT-AttValue'>AttValue</nt></rhs>
+<vc def='ValueType'/>
+<wfc def='NoExternalRefs'/>
+<wfc def='CleanAttrVals'/></prod>
+</prodgroup>
+</scrap>
+The <nt def='NT-Name'>Name</nt> in
+the start- and end-tags gives the 
+element's <term>type</term>.</termdef>
+<termdef id="dt-attr" term="Attribute">
+The <nt def='NT-Name'>Name</nt>-<nt def='NT-AttValue'>AttValue</nt> pairs are
+referred to as 
+the <term>attribute specifications</term> of the element</termdef>,
+<termdef id="dt-attrname" term="Attribute Name">with the 
+<nt def='NT-Name'>Name</nt> in each pair
+referred to as the <term>attribute name</term></termdef> and
+<termdef id="dt-attrval" term="Attribute Value">the content of the
+<nt def='NT-AttValue'>AttValue</nt> (the text between the
+<code>'</code> or <code>"</code> delimiters)
+as the <term>attribute value</term>.</termdef>
+</p>
+<wfcnote id='uniqattspec'>
+<head>Unique Att Spec</head>
+<p>
+No attribute name may appear more than once in the same start-tag
+or empty-element tag.
+</p>
+</wfcnote>
+<vcnote id='ValueType'>
+<head>Attribute Value Type</head>
+<p>
+The attribute must have been declared; the value must be of the type 
+declared for it.
+(For attribute types, see <specref ref='attdecls'/>.)
+</p>
+</vcnote>
+<wfcnote id='NoExternalRefs'>
+<head>No External Entity References</head>
+<p>
+Attribute values cannot contain direct or indirect entity references 
+to external entities.
+</p>
+</wfcnote>
+<wfcnote id='CleanAttrVals'>
+<head>No <code>&lt;</code> in Attribute Values</head>
+<p>The <termref def='dt-repltext'>replacement text</termref> of any entity
+referred to directly or indirectly in an attribute
+value (other than "<code>&amp;lt;</code>") must not contain
+a <code>&lt;</code>.
+</p></wfcnote>
+<p>An example of a start-tag:
+<eg>&lt;termdef id="dt-dog" term="dog"></eg></p>
+<p><termdef id="dt-etag" term="End Tag">The end of every element 
+that begins with a start-tag must
+be marked by an <term>end-tag</term>
+containing a name that echoes the element's type as given in the
+start-tag:
+<scrap lang='ebnf'>
+<head>End-tag</head>
+<prodgroup pcw2="6" pcw4="15" pcw5="11.5">
+<prod id='NT-ETag'><lhs>ETag</lhs>
+<rhs>'&lt;/' <nt def='NT-Name'>Name</nt> 
+<nt def='NT-S'>S</nt>? '>'</rhs></prod>
+</prodgroup>
+</scrap>
+</termdef></p>
+<p>An example of an end-tag:<eg>&lt;/termdef></eg></p>
+<p><termdef id="dt-content" term="Content">The 
+<termref def='dt-text'>text</termref> between the start-tag and
+end-tag is called the element's
+<term>content</term>:
+<scrap lang='ebnf'>
+<head>Content of Elements</head>
+<prodgroup pcw2="6" pcw4="15" pcw5="11.5">
+<prod id='NT-content'><lhs>content</lhs>
+<rhs>(<nt def='NT-element'>element</nt> | <nt def='NT-CharData'>CharData</nt> 
+| <nt def='NT-Reference'>Reference</nt> | <nt def='NT-CDSect'>CDSect</nt> 
+| <nt def='NT-PI'>PI</nt> | <nt def='NT-Comment'>Comment</nt>)*</rhs>
+</prod>
+</prodgroup>
+</scrap>
+</termdef></p>
+<p><termdef id="dt-empty" term="Empty">If an element is <term>empty</term>,
+it must be represented either by a start-tag immediately followed
+by an end-tag or by an empty-element tag.</termdef>
+<termdef id="dt-eetag" term="empty-element tag">An 
+<term>empty-element tag</term> takes a special form:
+<scrap lang='ebnf'>
+<head>Tags for Empty Elements</head>
+<prodgroup pcw2="6" pcw4="15" pcw5="11.5">
+<prod id='NT-EmptyElemTag'><lhs>EmptyElemTag</lhs>
+<rhs>'&lt;' <nt def='NT-Name'>Name</nt> (<nt def='NT-S'>S</nt> 
+<nt def='NT-Attribute'>Attribute</nt>)* <nt def='NT-S'>S</nt>? 
+'/&gt;'</rhs>
+<wfc def="uniqattspec"/>
+</prod>
+</prodgroup>
+</scrap>
+</termdef></p>
+<p>Empty-element tags may be used for any element which has no
+content, whether or not it is declared using the keyword
+<kw>EMPTY</kw>.
+<termref def='dt-interop'>For interoperability</termref>, the empty-element
+tag must be used, and can only be used, for elements which are
+<termref def='dt-eldecl'>declared</termref> <kw>EMPTY</kw>.</p>
+<p>Examples of empty elements:
+<eg>&lt;IMG align="left"
+ src="http://www.w3.org/Icons/WWW/w3c_home" />
+&lt;br>&lt;/br>
+&lt;br/></eg></p>
+</div2>
+<div2 id='elemdecls'>
+<head>Element Type Declarations</head>
+<p>The <termref def="dt-element">element</termref> structure of an
+<termref def="dt-xml-doc">XML document</termref> may, for 
+<termref def="dt-valid">validation</termref> purposes, 
+be constrained
+using element type and attribute-list declarations.
+An element type declaration constrains the element's
+<termref def="dt-content">content</termref>.
+</p>
+
+<p>Element type declarations often constrain which element types can
+appear as <termref def="dt-parentchild">children</termref> of the element.
+At user option, an XML processor may issue a warning
+when a declaration mentions an element type for which no declaration
+is provided, but this is not an error.</p>
+<p><termdef id="dt-eldecl" term="Element Type declaration">An <term>element
+type declaration</term> takes the form:
+<scrap lang='ebnf'>
+<head>Element Type Declaration</head>
+<prodgroup pcw2="5.5" pcw4="18" pcw5="9">
+<prod id='NT-elementdecl'><lhs>elementdecl</lhs>
+<rhs>'&lt;!ELEMENT' <nt def='NT-S'>S</nt> 
+<nt def='NT-Name'>Name</nt> 
+<nt def='NT-S'>S</nt> 
+<nt def='NT-contentspec'>contentspec</nt>
+<nt def='NT-S'>S</nt>? '>'</rhs>
+<vc def='EDUnique'/></prod>
+<prod id='NT-contentspec'><lhs>contentspec</lhs>
+<rhs>'EMPTY' 
+| 'ANY' 
+| <nt def='NT-Mixed'>Mixed</nt> 
+| <nt def='NT-children'>children</nt>
+</rhs>
+</prod>
+</prodgroup>
+</scrap>
+where the <nt def='NT-Name'>Name</nt> gives the element type 
+being declared.</termdef>
+</p>
+
+<vcnote id='EDUnique'>
+<head>Unique Element Type Declaration</head>
+<p>
+No element type may be declared more than once.
+</p>
+</vcnote>
+
+<p>Examples of element type declarations:
+<eg>&lt;!ELEMENT br EMPTY>
+&lt;!ELEMENT p (#PCDATA|emph)* >
+&lt;!ELEMENT %name.para; %content.para; >
+&lt;!ELEMENT container ANY></eg></p>
+<div3 id='sec-element-content'>
+<head>Element Content</head>
+<p><termdef id='dt-elemcontent' term='Element content'>An element <termref
+def="dt-stag">type</termref> has
+<term>element content</term> when elements of that
+type must contain only <termref def='dt-parentchild'>child</termref> 
+elements (no character data), optionally separated by 
+white space (characters matching the nonterminal 
+<nt def='NT-S'>S</nt>).
+</termdef>
+In this case, the
+constraint includes a content model, a simple grammar governing
+the allowed types of the child
+elements and the order in which they are allowed to appear.  
+The grammar is built on
+content particles (<nt def='NT-cp'>cp</nt>s), which consist of names, 
+choice lists of content particles, or
+sequence lists of content particles:
+<scrap lang='ebnf'>
+<head>Element-content Models</head>
+<prodgroup pcw2="5.5" pcw4="16" pcw5="11">
+<prod id='NT-children'><lhs>children</lhs>
+<rhs>(<nt def='NT-choice'>choice</nt> 
+| <nt def='NT-seq'>seq</nt>) 
+('?' | '*' | '+')?</rhs></prod>
+<prod id='NT-cp'><lhs>cp</lhs>
+<rhs>(<nt def='NT-Name'>Name</nt> 
+| <nt def='NT-choice'>choice</nt> 
+| <nt def='NT-seq'>seq</nt>) 
+('?' | '*' | '+')?</rhs></prod>
+<prod id='NT-choice'><lhs>choice</lhs>
+<rhs>'(' <nt def='NT-S'>S</nt>? cp 
+( <nt def='NT-S'>S</nt>? '|' <nt def='NT-S'>S</nt>? <nt def='NT-cp'>cp</nt> )*
+<nt def='NT-S'>S</nt>? ')'</rhs>
+<vc def='vc-PEinGroup'/></prod>
+<prod id='NT-seq'><lhs>seq</lhs>
+<rhs>'(' <nt def='NT-S'>S</nt>? cp 
+( <nt def='NT-S'>S</nt>? ',' <nt def='NT-S'>S</nt>? <nt def='NT-cp'>cp</nt> )*
+<nt def='NT-S'>S</nt>? ')'</rhs>
+<vc def='vc-PEinGroup'/></prod>
+
+</prodgroup>
+</scrap>
+where each <nt def='NT-Name'>Name</nt> is the type of an element which may
+appear as a <termref def="dt-parentchild">child</termref>.  
+Any content
+particle in a choice list may appear in the <termref
+def="dt-elemcontent">element content</termref> at the location where
+the choice list appears in the grammar;
+content particles occurring in a sequence list must each
+appear in the <termref def="dt-elemcontent">element content</termref> in the
+order given in the list.  
+The optional character following a name or list governs
+whether the element or the content particles in the list may occur one
+or more (<code>+</code>), zero or more (<code>*</code>), or zero or 
+one times (<code>?</code>).  
+The absence of such an operator means that the element or content particle
+must appear exactly once.
+This syntax
+and meaning are identical to those used in the productions in this
+specification.</p>
+<p>
+The content of an element matches a content model if and only if it is
+possible to trace out a path through the content model, obeying the
+sequence, choice, and repetition operators and matching each element in
+the content against an element type in the content model.  <termref
+def='dt-compat'>For compatibility</termref>, it is an error
+if an element in the document can
+match more than one occurrence of an element type in the content model.
+For more information, see <specref ref="determinism"/>.
+<!-- appendix <specref ref="determinism"/>. -->
+<!-- appendix on deterministic content models. -->
+</p>
+<vcnote id='vc-PEinGroup'>
+<head>Proper Group/PE Nesting</head>
+<p>Parameter-entity 
+<termref def='dt-repltext'>replacement text</termref> must be properly nested
+with parenthetized groups.
+That is to say, if either of the opening or closing parentheses
+in a <nt def='NT-choice'>choice</nt>, <nt def='NT-seq'>seq</nt>, or
+<nt def='NT-Mixed'>Mixed</nt> construct 
+is contained in the replacement text for a 
+<termref def='dt-PERef'>parameter entity</termref>,
+both must be contained in the same replacement text.</p>
+<p><termref def='dt-interop'>For interoperability</termref>, 
+if a parameter-entity reference appears in a 
+<nt def='NT-choice'>choice</nt>, <nt def='NT-seq'>seq</nt>, or
+<nt def='NT-Mixed'>Mixed</nt> construct, its replacement text
+should not be empty, and 
+neither the first nor last non-blank
+character of the replacement text should be a connector 
+(<code>|</code> or <code>,</code>).
+</p>
+</vcnote>
+<p>Examples of element-content models:
+<eg>&lt;!ELEMENT spec (front, body, back?)>
+&lt;!ELEMENT div1 (head, (p | list | note)*, div2*)>
+&lt;!ELEMENT dictionary-body (%div.mix; | %dict.mix;)*></eg></p>
+</div3>
+
+<div3 id='sec-mixed-content'>
+<head>Mixed Content</head>
+<p><termdef id='dt-mixed' term='Mixed Content'>An element 
+<termref def='dt-stag'>type</termref> has 
+<term>mixed content</term> when elements of that type may contain
+character data, optionally interspersed with
+<termref def="dt-parentchild">child</termref> elements.</termdef>
+In this case, the types of the child elements
+may be constrained, but not their order or their number of occurrences:
+<scrap lang='ebnf'>
+<head>Mixed-content Declaration</head>
+<prodgroup pcw2="5.5" pcw4="16" pcw5="11">
+<prod id='NT-Mixed'><lhs>Mixed</lhs>
+<rhs>'(' <nt def='NT-S'>S</nt>? 
+'#PCDATA'
+(<nt def='NT-S'>S</nt>? 
+'|' 
+<nt def='NT-S'>S</nt>? 
+<nt def='NT-Name'>Name</nt>)* 
+<nt def='NT-S'>S</nt>? 
+')*' </rhs>
+<rhs>| '(' <nt def='NT-S'>S</nt>? '#PCDATA' <nt def='NT-S'>S</nt>? ')'
+</rhs><vc def='vc-PEinGroup'/>
+<vc def='vc-MixedChildrenUnique'/>
+</prod>
+
+</prodgroup>
+</scrap>
+where the <nt def='NT-Name'>Name</nt>s give the types of elements
+that may appear as children.
+</p>
+<vcnote id='vc-MixedChildrenUnique'>
+<head>No Duplicate Types</head>
+<p>The same name must not appear more than once in a single mixed-content
+declaration.
+</p></vcnote>
+<p>Examples of mixed content declarations:
+<eg>&lt;!ELEMENT p (#PCDATA|a|ul|b|i|em)*>
+&lt;!ELEMENT p (#PCDATA | %font; | %phrase; | %special; | %form;)* >
+&lt;!ELEMENT b (#PCDATA)></eg></p>
+</div3>
+</div2>
+<div2 id='attdecls'>
+<head>Attribute-List Declarations</head>
+<p><termref def="dt-attr">Attributes</termref> are used to associate
+name-value pairs with <termref def="dt-element">elements</termref>.
+Attribute specifications may appear only within <termref
+def="dt-stag">start-tags</termref>
+and <termref def="dt-eetag">empty-element tags</termref>; 
+thus, the productions used to
+recognize them appear in <specref ref='sec-starttags'/>.  
+Attribute-list
+declarations may be used:
+<ulist>
+<item><p>To define the set of attributes pertaining to a given
+element type.</p></item>
+<item><p>To establish type constraints for these
+attributes.</p></item>
+<item><p>To provide <termref def="dt-default">default values</termref>
+for attributes.</p></item>
+</ulist>
+</p>
+<p><termdef id="dt-attdecl" term="Attribute-List Declaration">
+<term>Attribute-list declarations</term> specify the name, data type, and default
+value (if any) of each attribute associated with a given element type:
+<scrap lang='ebnf'>
+<head>Attribute-list Declaration</head>
+<prod id='NT-AttlistDecl'><lhs>AttlistDecl</lhs>
+<rhs>'&lt;!ATTLIST' <nt def='NT-S'>S</nt> 
+<nt def='NT-Name'>Name</nt> 
+<nt def='NT-AttDef'>AttDef</nt>*
+<nt def='NT-S'>S</nt>? '&gt;'</rhs>
+</prod>
+<prod id='NT-AttDef'><lhs>AttDef</lhs>
+<rhs><nt def='NT-S'>S</nt> <nt def='NT-Name'>Name</nt> 
+<nt def='NT-S'>S</nt> <nt def='NT-AttType'>AttType</nt> 
+<nt def='NT-S'>S</nt> <nt def='NT-DefaultDecl'>DefaultDecl</nt></rhs>
+</prod>
+</scrap>
+The <nt def="NT-Name">Name</nt> in the
+<nt def='NT-AttlistDecl'>AttlistDecl</nt> rule is the type of an element.  At
+user option, an XML processor may issue a warning if attributes are
+declared for an element type not itself declared, but this is not an
+error.  The <nt def='NT-Name'>Name</nt> in the 
+<nt def='NT-AttDef'>AttDef</nt> rule is
+the name of the attribute.</termdef></p>
+<p>
+When more than one <nt def='NT-AttlistDecl'>AttlistDecl</nt> is provided for a
+given element type, the contents of all those provided are merged.  When
+more than one definition is provided for the same attribute of a
+given element type, the first declaration is binding and later
+declarations are ignored.  
+<termref def='dt-interop'>For interoperability,</termref> writers of DTDs
+may choose to provide at most one attribute-list declaration
+for a given element type, at most one attribute definition
+for a given attribute name, and at least one attribute definition
+in each attribute-list declaration.
+For interoperability, an XML processor may at user option
+issue a warning when more than one attribute-list declaration is
+provided for a given element type, or more than one attribute definition
+is provided 
+for a given attribute, but this is not an error.
+</p>
+
+<div3 id='sec-attribute-types'>
+<head>Attribute Types</head>
+<p>XML attribute types are of three kinds:  a string type, a
+set of tokenized types, and enumerated types.  The string type may take
+any literal string as a value; the tokenized types have varying lexical
+and semantic constraints, as noted:
+<scrap lang='ebnf'>
+<head>Attribute Types</head>
+<prodgroup pcw4="14" pcw5="11.5">
+<prod id='NT-AttType'><lhs>AttType</lhs>
+<rhs><nt def='NT-StringType'>StringType</nt> 
+| <nt def='NT-TokenizedType'>TokenizedType</nt> 
+| <nt def='NT-EnumeratedType'>EnumeratedType</nt>
+</rhs>
+</prod>
+<prod id='NT-StringType'><lhs>StringType</lhs>
+<rhs>'CDATA'</rhs>
+</prod>
+<prod id='NT-TokenizedType'><lhs>TokenizedType</lhs>
+<rhs>'ID'</rhs>
+<vc def='id'/>
+<vc def='one-id-per-el'/>
+<vc def='id-default'/>
+<rhs>| 'IDREF'</rhs>
+<vc def='idref'/>
+<rhs>| 'IDREFS'</rhs>
+<vc def='idref'/>
+<rhs>| 'ENTITY'</rhs>
+<vc def='entname'/>
+<rhs>| 'ENTITIES'</rhs>
+<vc def='entname'/>
+<rhs>| 'NMTOKEN'</rhs>
+<vc def='nmtok'/>
+<rhs>| 'NMTOKENS'</rhs>
+<vc def='nmtok'/></prod>
+</prodgroup>
+</scrap>
+</p>
+<vcnote id='id' >
+<head>ID</head>
+<p>
+Values of type <kw>ID</kw> must match the 
+<nt def='NT-Name'>Name</nt> production.  
+A name must not appear more than once in
+an XML document as a value of this type; i.e., ID values must uniquely
+identify the elements which bear them.   
+</p>
+</vcnote>
+<vcnote id='one-id-per-el'>
+<head>One ID per Element Type</head>
+<p>No element type may have more than one ID attribute specified.</p>
+</vcnote>
+<vcnote id='id-default'>
+<head>ID Attribute Default</head>
+<p>An ID attribute must have a declared default of <kw>#IMPLIED</kw> or
+<kw>#REQUIRED</kw>.</p>
+</vcnote>
+<vcnote id='idref'>
+<head>IDREF</head>
+<p>
+Values of type <kw>IDREF</kw> must match
+the <nt def="NT-Name">Name</nt> production, and
+values of type <kw>IDREFS</kw> must match
+<nt def="NT-Names">Names</nt>; 
+each <nt def='NT-Name'>Name</nt> must match the value of an ID attribute on 
+some element in the XML document; i.e. <kw>IDREF</kw> values must 
+match the value of some ID attribute. 
+</p>
+</vcnote>
+<vcnote id='entname'>
+<head>Entity Name</head>
+<p>
+Values of type <kw>ENTITY</kw> 
+must match the <nt def="NT-Name">Name</nt> production,
+values of type <kw>ENTITIES</kw> must match
+<nt def="NT-Names">Names</nt>;
+each <nt def="NT-Name">Name</nt> must 
+match the
+name of an <termref def="dt-unparsed">unparsed entity</termref> declared in the
+<termref def="dt-doctype">DTD</termref>.
+</p>
+</vcnote>
+<vcnote id='nmtok'>
+<head>Name Token</head>
+<p>
+Values of type <kw>NMTOKEN</kw> must match the
+<nt def="NT-Nmtoken">Nmtoken</nt> production;
+values of type <kw>NMTOKENS</kw> must 
+match <termref def="NT-Nmtokens">Nmtokens</termref>.
+</p>
+</vcnote>
+<!-- why?
+<p>The XML processor must normalize attribute values before
+passing them to the application, as described in 
+<specref ref="AVNormalize"/>.</p>-->
+<p><termdef id='dt-enumerated' term='Enumerated Attribute
+Values'><term>Enumerated attributes</term> can take one 
+of a list of values provided in the declaration</termdef>. There are two
+kinds of enumerated types:
+<scrap lang='ebnf'>
+<head>Enumerated Attribute Types</head>
+<prod id='NT-EnumeratedType'><lhs>EnumeratedType</lhs> 
+<rhs><nt def='NT-NotationType'>NotationType</nt> 
+| <nt def='NT-Enumeration'>Enumeration</nt>
+</rhs></prod>
+<prod id='NT-NotationType'><lhs>NotationType</lhs> 
+<rhs>'NOTATION' 
+<nt def='NT-S'>S</nt> 
+'(' 
+<nt def='NT-S'>S</nt>?  
+<nt def='NT-Name'>Name</nt> 
+(<nt def='NT-S'>S</nt>? '|' <nt def='NT-S'>S</nt>?  
+<nt def='NT-Name'>Name</nt>)*
+<nt def='NT-S'>S</nt>? ')'
+</rhs>
+<vc def='notatn' /></prod>
+<prod id='NT-Enumeration'><lhs>Enumeration</lhs> 
+<rhs>'(' <nt def='NT-S'>S</nt>?
+<nt def='NT-Nmtoken'>Nmtoken</nt> 
+(<nt def='NT-S'>S</nt>? '|' 
+<nt def='NT-S'>S</nt>?  
+<nt def='NT-Nmtoken'>Nmtoken</nt>)* 
+<nt def='NT-S'>S</nt>? 
+')'</rhs> 
+<vc def='enum'/></prod>
+</scrap>
+A <kw>NOTATION</kw> attribute identifies a 
+<termref def='dt-notation'>notation</termref>, declared in the 
+DTD with associated system and/or public identifiers, to
+be used in interpreting the element to which the attribute
+is attached.
+</p>
+
+<vcnote id='notatn'>
+<head>Notation Attributes</head>
+<p>
+Values of this type must match
+one of the <titleref href='Notations'>notation</titleref> names included in
+the declaration; all notation names in the declaration must
+be declared.
+</p>
+</vcnote>
+<vcnote id='enum'>
+<head>Enumeration</head>
+<p>
+Values of this type
+must match one of the <nt def='NT-Nmtoken'>Nmtoken</nt> tokens in the
+declaration. 
+</p>
+</vcnote>
+<p><termref def='dt-interop'>For interoperability,</termref> the same
+<nt def='NT-Nmtoken'>Nmtoken</nt> should not occur more than once in the
+enumerated attribute types of a single element type.
+</p>
+</div3>
+
+<div3 id='sec-attr-defaults'>
+<head>Attribute Defaults</head>
+<p>An <termref def="dt-attdecl">attribute declaration</termref> provides
+information on whether
+the attribute's presence is required, and if not, how an XML processor should
+react if a declared attribute is absent in a document.
+<scrap lang='ebnf'>
+<head>Attribute Defaults</head>
+<prodgroup pcw4="14" pcw5="11.5">
+<prod id='NT-DefaultDecl'><lhs>DefaultDecl</lhs>
+<rhs>'#REQUIRED' 
+|&nbsp;'#IMPLIED' </rhs>
+<rhs>| (('#FIXED' S)? <nt def='NT-AttValue'>AttValue</nt>)</rhs>
+<vc def='RequiredAttr'/>
+<vc def='defattrvalid'/>
+<wfc def="CleanAttrVals"/>
+<vc def='FixedAttr'/>
+</prod>
+</prodgroup>
+</scrap>
+
+</p>
+<p>In an attribute declaration, <kw>#REQUIRED</kw> means that the
+attribute must always be provided, <kw>#IMPLIED</kw> that no default 
+value is provided.
+<!-- not any more!!
+<kw>#IMPLIED</kw> means that if the attribute is omitted
+from an element of this type,
+the XML processor must inform the application
+that no value was specified; no constraint is placed on the behavior
+of the application. -->
+<termdef id="dt-default" term="Attribute Default">If the 
+declaration
+is neither <kw>#REQUIRED</kw> nor <kw>#IMPLIED</kw>, then the
+<nt def='NT-AttValue'>AttValue</nt> value contains the declared
+<term>default</term> value; the <kw>#FIXED</kw> keyword states that
+the attribute must always have the default value.
+If a default value
+is declared, when an XML processor encounters an omitted attribute, it
+is to behave as though the attribute were present with 
+the declared default value.</termdef></p>
+<vcnote id='RequiredAttr'>
+<head>Required Attribute</head>
+<p>If the default declaration is the keyword <kw>#REQUIRED</kw>, then
+the attribute must be specified for
+all elements of the type in the attribute-list declaration.
+</p></vcnote>
+<vcnote id='defattrvalid'>
+<head>Attribute Default Legal</head>
+<p>
+The declared
+default value must meet the lexical constraints of the declared attribute type.
+</p>
+</vcnote>
+<vcnote id='FixedAttr'>
+<head>Fixed Attribute Default</head>
+<p>If an attribute has a default value declared with the 
+<kw>#FIXED</kw> keyword, instances of that attribute must
+match the default value.
+</p></vcnote>
+
+<p>Examples of attribute-list declarations:
+<eg>&lt;!ATTLIST termdef
+          id      ID      #REQUIRED
+          name    CDATA   #IMPLIED>
+&lt;!ATTLIST list
+          type    (bullets|ordered|glossary)  "ordered">
+&lt;!ATTLIST form
+          method  CDATA   #FIXED "POST"></eg></p>
+</div3>
+<div3 id='AVNormalize'>
+<head>Attribute-Value Normalization</head>
+<p>Before the value of an attribute is passed to the application
+or checked for validity, the
+XML processor must normalize it as follows:
+<ulist>
+<item><p>a character reference is processed by appending the referenced    
+character to the attribute value</p></item>
+<item><p>an entity reference is processed by recursively processing the
+replacement text of the entity</p></item>
+<item><p>a whitespace character (#x20, #xD, #xA, #x9) is processed by
+appending #x20 to the normalized value, except that only a single #x20
+is appended for a "#xD#xA" sequence that is part of an external
+parsed entity or the literal entity value of an internal parsed
+entity</p></item>
+<item><p>other characters are processed by appending them to the normalized
+value</p>
+</item></ulist>
+</p>
+<p>If the declared value is not CDATA, then the XML processor must
+further process the normalized attribute value by discarding any
+leading and trailing space (#x20) characters, and by replacing
+sequences of space (#x20) characters by a single space (#x20)
+character.</p>
+<p>
+All attributes for which no declaration has been read should be treated
+by a non-validating parser as if declared
+<kw>CDATA</kw>.
+</p>
+</div3>
+</div2>
+<div2 id='sec-condition-sect'>
+<head>Conditional Sections</head>
+<p><termdef id='dt-cond-section' term='conditional section'>
+<term>Conditional sections</term> are portions of the
+<termref def='dt-doctype'>document type declaration external subset</termref>
+which are 
+included in, or excluded from, the logical structure of the DTD based on
+the keyword which governs them.</termdef>
+<scrap lang='ebnf'>
+<head>Conditional Section</head>
+<prodgroup pcw2="9" pcw4="14.5">
+<prod id='NT-conditionalSect'><lhs>conditionalSect</lhs>
+<rhs><nt def='NT-includeSect'>includeSect</nt>
+| <nt def='NT-ignoreSect'>ignoreSect</nt>
+</rhs>
+</prod>
+<prod id='NT-includeSect'><lhs>includeSect</lhs>
+<rhs>'&lt;![' S? 'INCLUDE' S? '[' 
+
+<nt def="NT-extSubsetDecl">extSubsetDecl</nt>
+']]&gt;'
+</rhs>
+</prod>
+<prod id='NT-ignoreSect'><lhs>ignoreSect</lhs>
+<rhs>'&lt;![' S? 'IGNORE' S? '[' 
+<nt def="NT-ignoreSectContents">ignoreSectContents</nt>*
+']]&gt;'</rhs>
+</prod>
+
+<prod id='NT-ignoreSectContents'><lhs>ignoreSectContents</lhs>
+<rhs><nt def='NT-Ignore'>Ignore</nt>
+('&lt;![' <nt def='NT-ignoreSectContents'>ignoreSectContents</nt> ']]&gt;' 
+<nt def='NT-Ignore'>Ignore</nt>)*</rhs></prod>
+<prod id='NT-Ignore'><lhs>Ignore</lhs>
+<rhs><nt def='NT-Char'>Char</nt>* - 
+(<nt def='NT-Char'>Char</nt>* ('&lt;![' | ']]&gt;') 
+<nt def='NT-Char'>Char</nt>*)
+</rhs></prod>
+
+</prodgroup>
+</scrap>
+</p>
+<p>Like the internal and external DTD subsets, a conditional section
+may contain one or more complete declarations,
+comments, processing instructions, 
+or nested conditional sections, intermingled with white space.
+</p>
+<p>If the keyword of the
+conditional section is <kw>INCLUDE</kw>, then the contents of the conditional
+section are part of the DTD.
+If the keyword of the conditional
+section is <kw>IGNORE</kw>, then the contents of the conditional section are
+not logically part of the DTD.
+Note that for reliable parsing, the contents of even ignored
+conditional sections must be read in order to
+detect nested conditional sections and ensure that the end of the
+outermost (ignored) conditional section is properly detected.
+If a conditional section with a
+keyword of <kw>INCLUDE</kw> occurs within a larger conditional
+section with a keyword of <kw>IGNORE</kw>, both the outer and the
+inner conditional sections are ignored.</p>
+<p>If the keyword of the conditional section is a 
+parameter-entity reference, the parameter entity must be replaced by its
+content before the processor decides whether to
+include or ignore the conditional section.</p>
+<p>An example:
+<eg>&lt;!ENTITY % draft 'INCLUDE' >
+&lt;!ENTITY % final 'IGNORE' >
+&lt;![%draft;[
+&lt;!ELEMENT book (comments*, title, body, supplements?)>
+]]&gt;
+&lt;![%final;[
+&lt;!ELEMENT book (title, body, supplements?)>
+]]&gt;
+</eg>
+</p>
+</div2>
+
+
+<!-- 
+<div2 id='sec-pass-to-app'>
+<head>XML Processor Treatment of Logical Structure</head>
+<p>When an XML processor encounters a start-tag, it must make
+at least the following information available to the application:
+<ulist>
+<item>
+<p>the element type's generic identifier</p>
+</item>
+<item>
+<p>the names of attributes known to apply to this element type
+(validating processors must make available names of all attributes
+declared for the element type; non-validating processors must
+make available at least the names of the attributes for which
+values are specified.
+</p>
+</item>
+</ulist>
+</p>
+</div2>
+--> 
+
+</div1>
+<!-- &Entities; -->
+<div1 id='sec-physical-struct'>
+<head>Physical Structures</head>
+<p><termdef id="dt-entity" term="Entity">An XML document may consist
+of one or many storage units.   These are called
+<term>entities</term>; they all have <term>content</term> and are all
+(except for the document entity, see below, and 
+the <termref def='dt-doctype'>external DTD subset</termref>) 
+identified by <term>name</term>.
+</termdef>
+Each XML document has one entity
+called the <termref def="dt-docent">document entity</termref>, which serves
+as the starting point for the <termref def="dt-xml-proc">XML
+processor</termref> and may contain the whole document.</p>
+<p>Entities may be either parsed or unparsed.
+<termdef id="dt-parsedent" term="Text Entity">A <term>parsed entity's</term>
+contents are referred to as its 
+<termref def='dt-repltext'>replacement text</termref>;
+this <termref def="dt-text">text</termref> is considered an
+integral part of the document.</termdef></p>
+
+<p><termdef id="dt-unparsed" term="Unparsed Entity">An 
+<term>unparsed entity</term> 
+is a resource whose contents may or may not be
+<termref def='dt-text'>text</termref>, and if text, may not be XML.
+Each unparsed entity
+has an associated <termref
+def="dt-notation">notation</termref>, identified by name.
+Beyond a requirement
+that an XML processor make the identifiers for the entity and 
+notation available to the application,
+XML places no constraints on the contents of unparsed entities.</termdef> 
+</p>
+<p>
+Parsed entities are invoked by name using entity references;
+unparsed entities by name, given in the value of <kw>ENTITY</kw>
+or <kw>ENTITIES</kw>
+attributes.</p>
+<p><termdef id='gen-entity' term='general entity'
+><term>General entities</term>
+are entities for use within the document content.
+In this specification, general entities are sometimes referred 
+to with the unqualified term <emph>entity</emph> when this leads
+to no ambiguity.</termdef> 
+<termdef id='dt-PE' term='Parameter entity'>Parameter entities 
+are parsed entities for use within the DTD.</termdef>
+These two types of entities use different forms of reference and
+are recognized in different contexts.
+Furthermore, they occupy different namespaces; a parameter entity and
+a general entity with the same name are two distinct entities.
+</p>
+
+<div2 id='sec-references'>
+<head>Character and Entity References</head>
+<p><termdef id="dt-charref" term="Character Reference">
+A <term>character reference</term> refers to a specific character in the
+ISO/IEC 10646 character set, for example one not directly accessible from
+available input devices.
+<scrap lang='ebnf'>
+<head>Character Reference</head>
+<prod id='NT-CharRef'><lhs>CharRef</lhs>
+<rhs>'&amp;#' [0-9]+ ';' </rhs>
+<rhs>| '&hcro;' [0-9a-fA-F]+ ';'</rhs>
+<wfc def="wf-Legalchar"/>
+</prod>
+</scrap>
+<wfcnote id="wf-Legalchar">
+<head>Legal Character</head>
+<p>Characters referred to using character references must
+match the production for
+<termref def="NT-Char">Char</termref>.</p>
+</wfcnote>
+If the character reference begins with "<code>&amp;#x</code>", the digits and
+letters up to the terminating <code>;</code> provide a hexadecimal
+representation of the character's code point in ISO/IEC 10646.
+If it begins just with "<code>&amp;#</code>", the digits up to the terminating
+<code>;</code> provide a decimal representation of the character's 
+code point.
+</termdef>
+</p>
+<p><termdef id="dt-entref" term="Entity Reference">An <term>entity
+reference</term> refers to the content of a named entity.</termdef>
+<termdef id='dt-GERef' term='General Entity Reference'>References to 
+parsed general entities
+use ampersand (<code>&amp;</code>) and semicolon (<code>;</code>) as
+delimiters.</termdef>
+<termdef id='dt-PERef' term='Parameter-entity reference'>
+<term>Parameter-entity references</term> use percent-sign (<code>%</code>) and
+semicolon 
+(<code>;</code>) as delimiters.</termdef>
+</p>
+<scrap lang="ebnf">
+<head>Entity Reference</head>
+<prod id='NT-Reference'><lhs>Reference</lhs>
+<rhs><nt def='NT-EntityRef'>EntityRef</nt> 
+| <nt def='NT-CharRef'>CharRef</nt></rhs></prod>
+<prod id='NT-EntityRef'><lhs>EntityRef</lhs>
+<rhs>'&amp;' <nt def='NT-Name'>Name</nt> ';'</rhs>
+<wfc def='wf-entdeclared'/>
+<vc def='vc-entdeclared'/>
+<wfc def='textent'/>
+<wfc def='norecursion'/>
+</prod>
+<prod id='NT-PEReference'><lhs>PEReference</lhs>
+<rhs>'%' <nt def='NT-Name'>Name</nt> ';'</rhs>
+<vc def='vc-entdeclared'/>
+<wfc def='norecursion'/>
+<wfc def='indtd'/>
+</prod>
+</scrap>
+
+<wfcnote id='wf-entdeclared'>
+<head>Entity Declared</head>
+<p>In a document without any DTD, a document with only an internal
+DTD subset which contains no parameter entity references, or a document with
+"<code>standalone='yes'</code>", 
+the <nt def='NT-Name'>Name</nt> given in the entity reference must 
+<termref def="dt-match">match</termref> that in an 
+<titleref href='sec-entity-decl'>entity declaration</titleref>, except that
+well-formed documents need not declare 
+any of the following entities: &magicents;.  
+The declaration of a parameter entity must precede any reference to it.
+Similarly, the declaration of a general entity must precede any
+reference to it which appears in a default value in an attribute-list
+declaration.</p>
+<p>Note that if entities are declared in the external subset or in 
+external parameter entities, a non-validating processor is 
+<titleref href='include-if-valid'>not obligated to</titleref> read
+and process their declarations; for such documents, the rule that
+an entity must be declared is a well-formedness constraint only
+if <titleref href='sec-rmd'>standalone='yes'</titleref>.</p>
+</wfcnote>
+<vcnote id="vc-entdeclared">
+<head>Entity Declared</head>
+<p>In a document with an external subset or external parameter
+entities with "<code>standalone='no'</code>",
+the <nt def='NT-Name'>Name</nt> given in the entity reference must <termref
+def="dt-match">match</termref> that in an 
+<titleref href='sec-entity-decl'>entity declaration</titleref>.
+For interoperability, valid documents should declare the entities 
+&magicents;, in the form
+specified in <specref ref="sec-predefined-ent"/>.
+The declaration of a parameter entity must precede any reference to it.
+Similarly, the declaration of a general entity must precede any
+reference to it which appears in a default value in an attribute-list
+declaration.</p>
+</vcnote>
+<!-- FINAL EDIT:  is this duplication too clumsy? -->
+<wfcnote id='textent'>
+<head>Parsed Entity</head>
+<p>
+An entity reference must not contain the name of an <termref
+def="dt-unparsed">unparsed entity</termref>. Unparsed entities may be referred
+to only in <termref def="dt-attrval">attribute values</termref> declared to
+be of type <kw>ENTITY</kw> or <kw>ENTITIES</kw>.
+</p>
+</wfcnote>
+<wfcnote id='norecursion'>
+<head>No Recursion</head>
+<p>
+A parsed entity must not contain a recursive reference to itself,
+either directly or indirectly.
+</p>
+</wfcnote>
+<wfcnote id='indtd'>
+<head>In DTD</head>
+<p>
+Parameter-entity references may only appear in the 
+<termref def='dt-doctype'>DTD</termref>.
+</p>
+</wfcnote>
+<p>Examples of character and entity references:
+<eg>Type &lt;key>less-than&lt;/key> (&hcro;3C;) to save options.
+This document was prepared on &amp;docdate; and
+is classified &amp;security-level;.</eg></p>
+<p>Example of a parameter-entity reference:
+<eg><![CDATA[<!-- declare the parameter entity "ISOLat2"... -->
+<!ENTITY % ISOLat2
+         SYSTEM "http://www.xml.com/iso/isolat2-xml.entities" >
+<!-- ... now reference it. -->
+%ISOLat2;]]></eg></p>
+</div2>
+<div2 id='sec-entity-decl'>
+<head>Entity Declarations</head>
+<p><termdef id="dt-entdecl" term="entity declaration">
+Entities are declared thus:
+<scrap lang='ebnf'>
+<head>Entity Declaration</head>
+<prodgroup pcw2="5" pcw4="18.5">
+<prod id='NT-EntityDecl'><lhs>EntityDecl</lhs>
+<rhs><nt def="NT-GEDecl">GEDecl</nt><!--</rhs><com>General entities</com>
+<rhs>--> | <nt def="NT-PEDecl">PEDecl</nt></rhs>
+<!--<com>Parameter entities</com>-->
+</prod>
+<prod id='NT-GEDecl'><lhs>GEDecl</lhs>
+<rhs>'&lt;!ENTITY' <nt def='NT-S'>S</nt> <nt def='NT-Name'>Name</nt> 
+<nt def='NT-S'>S</nt> <nt def='NT-EntityDef'>EntityDef</nt> 
+<nt def='NT-S'>S</nt>? '&gt;'</rhs>
+</prod>
+<prod id='NT-PEDecl'><lhs>PEDecl</lhs>
+<rhs>'&lt;!ENTITY' <nt def='NT-S'>S</nt> '%' <nt def='NT-S'>S</nt> 
+<nt def='NT-Name'>Name</nt> <nt def='NT-S'>S</nt> 
+<nt def='NT-PEDef'>PEDef</nt> <nt def='NT-S'>S</nt>? '&gt;'</rhs>
+<!--<com>Parameter entities</com>-->
+</prod>
+<prod id='NT-EntityDef'><lhs>EntityDef</lhs>
+<rhs><nt def='NT-EntityValue'>EntityValue</nt>
+<!--</rhs>
+<rhs>-->| (<nt def='NT-ExternalID'>ExternalID</nt> 
+<nt def='NT-NDataDecl'>NDataDecl</nt>?)</rhs>
+<!-- <nt def='NT-ExternalDef'>ExternalDef</nt></rhs> -->
+</prod>
+<!-- FINAL EDIT: what happened to WFs here? -->
+<prod id='NT-PEDef'><lhs>PEDef</lhs>
+<rhs><nt def='NT-EntityValue'>EntityValue</nt> 
+| <nt def='NT-ExternalID'>ExternalID</nt></rhs></prod>
+</prodgroup>
+</scrap>
+The <nt def='NT-Name'>Name</nt> identifies the entity in an
+<termref def="dt-entref">entity reference</termref> or, in the case of an
+unparsed entity, in the value of an <kw>ENTITY</kw> or <kw>ENTITIES</kw>
+attribute.
+If the same entity is declared more than once, the first declaration
+encountered is binding; at user option, an XML processor may issue a
+warning if entities are declared multiple times.</termdef>
+</p>
+
+<div3 id='sec-internal-ent'>
+<head>Internal Entities</head>
+<p><termdef id='dt-internent' term="Internal Entity Replacement Text">If 
+the entity definition is an 
+<nt def='NT-EntityValue'>EntityValue</nt>,  
+the defined entity is called an <term>internal entity</term>.  
+There is no separate physical
+storage object, and the content of the entity is given in the
+declaration. </termdef>
+Note that some processing of entity and character references in the
+<termref def='dt-litentval'>literal entity value</termref> may be required to
+produce the correct <termref def='dt-repltext'>replacement 
+text</termref>: see <specref ref='intern-replacement'/>.
+</p>
+<p>An internal entity is a <termref def="dt-parsedent">parsed
+entity</termref>.</p>
+<p>Example of an internal entity declaration:
+<eg>&lt;!ENTITY Pub-Status "This is a pre-release of the
+ specification."></eg></p>
+</div3>
+<div3 id='sec-external-ent'>
+<head>External Entities</head>
+<p><termdef id="dt-extent" term="External Entity">If the entity is not
+internal, it is an <term>external
+entity</term>, declared as follows:
+<scrap lang='ebnf'>
+<head>External Entity Declaration</head>
+<!--
+<prod id='NT-ExternalDef'><lhs>ExternalDef</lhs>
+<rhs></prod> -->
+<prod id='NT-ExternalID'><lhs>ExternalID</lhs>
+<rhs>'SYSTEM' <nt def='NT-S'>S</nt> 
+<nt def='NT-SystemLiteral'>SystemLiteral</nt></rhs>
+<rhs>| 'PUBLIC' <nt def='NT-S'>S</nt> 
+<nt def='NT-PubidLiteral'>PubidLiteral</nt> 
+<nt def='NT-S'>S</nt> 
+<nt def='NT-SystemLiteral'>SystemLiteral</nt>
+</rhs>
+</prod>
+<prod id='NT-NDataDecl'><lhs>NDataDecl</lhs>
+<rhs><nt def='NT-S'>S</nt> 'NDATA' <nt def='NT-S'>S</nt> 
+<nt def='NT-Name'>Name</nt></rhs>
+<vc def='not-declared'/></prod>
+</scrap>
+If the <nt def='NT-NDataDecl'>NDataDecl</nt> is present, this is a
+general <termref def="dt-unparsed">unparsed
+entity</termref>; otherwise it is a parsed entity.</termdef></p>
+<vcnote id='not-declared'>
+<head>Notation Declared</head>
+<p>
+The <nt def='NT-Name'>Name</nt> must match the declared name of a
+<termref def="dt-notation">notation</termref>.
+</p>
+</vcnote>
+<p><termdef id="dt-sysid" term="System Identifier">The
+<nt def='NT-SystemLiteral'>SystemLiteral</nt> 
+is called the entity's <term>system identifier</term>. It is a URI,
+which may be used to retrieve the entity.</termdef>
+Note that the hash mark (<code>#</code>) and fragment identifier 
+frequently used with URIs are not, formally, part of the URI itself; 
+an XML processor may signal an error if a fragment identifier is 
+given as part of a system identifier.
+Unless otherwise provided by information outside the scope of this
+specification (e.g. a special XML element type defined by a particular
+DTD, or a processing instruction defined by a particular application
+specification), relative URIs are relative to the location of the
+resource within which the entity declaration occurs.
+A URI might thus be relative to the 
+<termref def='dt-docent'>document entity</termref>, to the entity
+containing the <termref def='dt-doctype'>external DTD subset</termref>, 
+or to some other <termref def='dt-extent'>external parameter entity</termref>.
+</p>
+<p>An XML processor should handle a non-ASCII character in a URI by
+representing the character in UTF-8 as one or more bytes, and then 
+escaping these bytes with the URI escaping mechanism (i.e., by
+converting each byte to %HH, where HH is the hexadecimal notation of the
+byte value).</p>
+<p><termdef id="dt-pubid" term="Public identifier">
+In addition to a system identifier, an external identifier may
+include a <term>public identifier</term>.</termdef>  
+An XML processor attempting to retrieve the entity's content may use the public
+identifier to try to generate an alternative URI.  If the processor
+is unable to do so, it must use the URI specified in the system
+literal.  Before a match is attempted, all strings
+of white space in the public identifier must be normalized to single space characters (#x20),
+and leading and trailing white space must be removed.</p>
+<p>Examples of external entity declarations:
+<eg>&lt;!ENTITY open-hatch
+         SYSTEM "http://www.textuality.com/boilerplate/OpenHatch.xml">
+&lt;!ENTITY open-hatch
+         PUBLIC "-//Textuality//TEXT Standard open-hatch boilerplate//EN"
+         "http://www.textuality.com/boilerplate/OpenHatch.xml">
+&lt;!ENTITY hatch-pic
+         SYSTEM "../grafix/OpenHatch.gif"
+         NDATA gif ></eg></p>
+</div3>
+</div2>
+
+<div2 id='TextEntities'>
+<head>Parsed Entities</head>
+<div3 id='sec-TextDecl'>
+<head>The Text Declaration</head>
+<p>External parsed entities may each begin with a <term>text
+declaration</term>. 
+<scrap lang='ebnf'>
+<head>Text Declaration</head>
+<prodgroup pcw4="12.5" pcw5="13">
+<prod id='NT-TextDecl'><lhs>TextDecl</lhs>
+<rhs>&xmlpio; 
+<nt def='NT-VersionInfo'>VersionInfo</nt>?
+<nt def='NT-EncodingDecl'>EncodingDecl</nt>
+<nt def='NT-S'>S</nt>? &pic;</rhs>
+</prod>
+</prodgroup>
+</scrap>
+</p>
+<p>The text declaration must be provided literally, not
+by reference to a parsed entity.
+No text declaration may appear at any position other than the beginning of
+an external parsed entity.</p>
+</div3>
+<div3 id='wf-entities'>
+<head>Well-Formed Parsed Entities</head>
+<p>The document entity is well-formed if it matches the production labeled
+<nt def='NT-document'>document</nt>.
+An external general 
+parsed entity is well-formed if it matches the production labeled
+<nt def='NT-extParsedEnt'>extParsedEnt</nt>.
+An external parameter
+entity is well-formed if it matches the production labeled
+<nt def='NT-extPE'>extPE</nt>.
+<scrap lang='ebnf'>
+<head>Well-Formed External Parsed Entity</head>
+<prod id='NT-extParsedEnt'><lhs>extParsedEnt</lhs>
+<rhs><nt def='NT-TextDecl'>TextDecl</nt>? 
+<nt def='NT-content'>content</nt></rhs>
+</prod>
+<prod id='NT-extPE'><lhs>extPE</lhs>
+<rhs><nt def='NT-TextDecl'>TextDecl</nt>? 
+<nt def='NT-extSubsetDecl'>extSubsetDecl</nt></rhs>
+</prod>
+</scrap>
+An internal general parsed entity is well-formed if its replacement text 
+matches the production labeled
+<nt def='NT-content'>content</nt>.
+All internal parameter entities are well-formed by definition.
+</p>
+<p>A consequence of well-formedness in entities is that the logical 
+and physical structures in an XML document are properly nested; no 
+<termref def='dt-stag'>start-tag</termref>,
+<termref def='dt-etag'>end-tag</termref>,
+<termref def="dt-empty">empty-element tag</termref>,
+<termref def='dt-element'>element</termref>, 
+<termref def='dt-comment'>comment</termref>, 
+<termref def='dt-pi'>processing instruction</termref>, 
+<termref def='dt-charref'>character
+reference</termref>, or
+<termref def='dt-entref'>entity reference</termref> 
+can begin in one entity and end in another.</p>
+</div3>
+<div3 id='charencoding'>
+<head>Character Encoding in Entities</head>
+<p>Each external parsed entity in an XML document may use a different
+encoding for its characters. All XML processors must be able to read
+entities in either UTF-8 or UTF-16. 
+
+</p>
+<p>Entities encoded in UTF-16 must
+begin with the Byte Order Mark described by ISO/IEC 10646 Annex E and
+Unicode Appendix B (the ZERO WIDTH NO-BREAK SPACE character, #xFEFF).
+This is an encoding signature, not part of either the markup or the
+character data of the XML document.
+XML processors must be able to use this character to
+differentiate between UTF-8 and UTF-16 encoded documents.</p>
+<p>Although an XML processor is required to read only entities in
+the UTF-8 and UTF-16 encodings, it is recognized that other encodings are
+used around the world, and it may be desired for XML processors
+to read entities that use them.
+Parsed entities which are stored in an encoding other than
+UTF-8 or UTF-16 must begin with a <titleref href='TextDecl'>text
+declaration</titleref> containing an encoding declaration:
+<scrap lang='ebnf'>
+<head>Encoding Declaration</head>
+<prod id='NT-EncodingDecl'><lhs>EncodingDecl</lhs>
+<rhs><nt def="NT-S">S</nt>
+'encoding' <nt def='NT-Eq'>Eq</nt> 
+('"' <nt def='NT-EncName'>EncName</nt> '"' | 
+"'" <nt def='NT-EncName'>EncName</nt> "'" )
+</rhs>
+</prod>
+<prod id='NT-EncName'><lhs>EncName</lhs>
+<rhs>[A-Za-z] ([A-Za-z0-9._] | '-')*</rhs>
+<com>Encoding name contains only Latin characters</com>
+</prod>
+</scrap>
+In the <termref def='dt-docent'>document entity</termref>, the encoding
+declaration is part of the <termref def="dt-xmldecl">XML declaration</termref>.
+The <nt def="NT-EncName">EncName</nt> is the name of the encoding used.
+</p>
+<!-- FINAL EDIT:  check name of IANA and charset names -->
+<p>In an encoding declaration, the values
+"<code>UTF-8</code>",
+"<code>UTF-16</code>",
+"<code>ISO-10646-UCS-2</code>", and
+"<code>ISO-10646-UCS-4</code>" should be 
+used for the various encodings and transformations of Unicode /
+ISO/IEC 10646, the values
+"<code>ISO-8859-1</code>",
+"<code>ISO-8859-2</code>", ...
+"<code>ISO-8859-9</code>" should be used for the parts of ISO 8859, and
+the values
+"<code>ISO-2022-JP</code>",
+"<code>Shift_JIS</code>", and
+"<code>EUC-JP</code>"
+should be used for the various encoded forms of JIS X-0208-1997.  XML
+processors may recognize other encodings; it is recommended that
+character encodings registered (as <emph>charset</emph>s) 
+with the Internet Assigned Numbers
+Authority <bibref ref='IANA'/>, other than those just listed, should be
+referred to
+using their registered names.
+Note that these registered names are defined to be 
+case-insensitive, so processors wishing to match against them 
+should do so in a case-insensitive
+way.</p>
+<p>In the absence of information provided by an external
+transport protocol (e.g. HTTP or MIME), 
+it is an <termref def="dt-error">error</termref> for an entity including
+an encoding declaration to be presented to the XML processor 
+in an encoding other than that named in the declaration, 
+for an encoding declaration to occur other than at the beginning 
+of an external entity, or for
+an entity which begins with neither a Byte Order Mark nor an encoding
+declaration to use an encoding other than UTF-8.
+Note that since ASCII
+is a subset of UTF-8, ordinary ASCII entities do not strictly need
+an encoding declaration.</p>
+
+<p>It is a <termref def='dt-fatal'>fatal error</termref> when an XML processor
+encounters an entity with an encoding that it is unable to process.</p>
+<p>Examples of encoding declarations:
+<eg>&lt;?xml encoding='UTF-8'?>
+&lt;?xml encoding='EUC-JP'?></eg></p>
+</div3>
+</div2>
+<div2 id='entproc'>
+<head>XML Processor Treatment of Entities and References</head>
+<p>The table below summarizes the contexts in which character references,
+entity references, and invocations of unparsed entities might appear and the
+required behavior of an <termref def='dt-xml-proc'>XML processor</termref> in
+each case.  
+The labels in the leftmost column describe the recognition context:
+<glist>
+<gitem><label>Reference in Content</label>
+<def><p>as a reference
+anywhere after the <termref def='dt-stag'>start-tag</termref> and
+before the <termref def='dt-etag'>end-tag</termref> of an element; corresponds
+to the nonterminal <nt def='NT-content'>content</nt>.</p></def>
+</gitem>
+<gitem>
+<label>Reference in Attribute Value</label>
+<def><p>as a reference within either the value of an attribute in a 
+<termref def='dt-stag'>start-tag</termref>, or a default
+value in an <termref def='dt-attdecl'>attribute declaration</termref>;
+corresponds to the nonterminal
+<nt def='NT-AttValue'>AttValue</nt>.</p></def></gitem>
+<gitem>
+<label>Occurs as Attribute Value</label>
+<def><p>as a <nt def='NT-Name'>Name</nt>, not a reference, appearing either as
+the value of an 
+attribute which has been declared as type <kw>ENTITY</kw>, or as one of
+the space-separated tokens in the value of an attribute which has been
+declared as type <kw>ENTITIES</kw>.</p>
+</def></gitem>
+<gitem><label>Reference in Entity Value</label>
+<def><p>as a reference
+within a parameter or internal entity's 
+<termref def='dt-litentval'>literal entity value</termref> in
+the entity's declaration; corresponds to the nonterminal 
+<nt def='NT-EntityValue'>EntityValue</nt>.</p></def></gitem>
+<gitem><label>Reference in DTD</label>
+<def><p>as a reference within either the internal or external subsets of the 
+<termref def='dt-doctype'>DTD</termref>, but outside
+of an <nt def='NT-EntityValue'>EntityValue</nt> or
+<nt def="NT-AttValue">AttValue</nt>.</p></def>
+</gitem>
+</glist></p>
+<htable border='1' cellpadding='7' align='center'>
+<htbody>
+<tr><td bgcolor='&cellback;' rowspan='2' colspan='1'></td>
+<td bgcolor='&cellback;' align='center' valign='bottom' colspan='4'>Entity Type</td>
+<td bgcolor='&cellback;' rowspan='2' align='center'>Character</td>
+</tr>
+<tr align='center' valign='bottom'>
+<td bgcolor='&cellback;'>Parameter</td>
+<td bgcolor='&cellback;'>Internal
+General</td>
+<td bgcolor='&cellback;'>External Parsed
+General</td>
+<td bgcolor='&cellback;'>Unparsed</td>
+</tr>
+<tr align='center' valign='middle'>
+
+<td bgcolor='&cellback;' align='right'>Reference
+in Content</td>
+<td bgcolor='&cellback;'><titleref href='not-recognized'>Not recognized</titleref></td>
+<td bgcolor='&cellback;'><titleref href='included'>Included</titleref></td>
+<td bgcolor='&cellback;'><titleref href='include-if-valid'>Included if validating</titleref></td>
+<td bgcolor='&cellback;'><titleref href='forbidden'>Forbidden</titleref></td>
+<td bgcolor='&cellback;'><titleref href='included'>Included</titleref></td>
+</tr>
+<tr align='center' valign='middle'>
+<td bgcolor='&cellback;' align='right'>Reference
+in Attribute Value</td>
+<td bgcolor='&cellback;'><titleref href='not-recognized'>Not recognized</titleref></td>
+<td bgcolor='&cellback;'><titleref href='inliteral'>Included in literal</titleref></td>
+<td bgcolor='&cellback;'><titleref href='forbidden'>Forbidden</titleref></td>
+<td bgcolor='&cellback;'><titleref href='forbidden'>Forbidden</titleref></td>
+<td bgcolor='&cellback;'><titleref href='included'>Included</titleref></td>
+</tr>
+<tr align='center' valign='middle'>
+<td bgcolor='&cellback;' align='right'>Occurs as
+Attribute Value</td>
+<td bgcolor='&cellback;'><titleref href='not-recognized'>Not recognized</titleref></td>
+<td bgcolor='&cellback;'><titleref href='not-recognized'>Forbidden</titleref></td>
+<td bgcolor='&cellback;'><titleref href='not-recognized'>Forbidden</titleref></td>
+<td bgcolor='&cellback;'><titleref href='notify'>Notify</titleref></td>
+<td bgcolor='&cellback;'><titleref href='not recognized'>Not recognized</titleref></td>
+</tr>
+<tr align='center' valign='middle'>
+<td bgcolor='&cellback;' align='right'>Reference
+in EntityValue</td>
+<td bgcolor='&cellback;'><titleref href='inliteral'>Included in literal</titleref></td>
+<td bgcolor='&cellback;'><titleref href='bypass'>Bypassed</titleref></td>
+<td bgcolor='&cellback;'><titleref href='bypass'>Bypassed</titleref></td>
+<td bgcolor='&cellback;'><titleref href='forbidden'>Forbidden</titleref></td>
+<td bgcolor='&cellback;'><titleref href='included'>Included</titleref></td>
+</tr>
+<tr align='center' valign='middle'>
+<td bgcolor='&cellback;' align='right'>Reference
+in DTD</td>
+<td bgcolor='&cellback;'><titleref href='as-PE'>Included as PE</titleref></td>
+<td bgcolor='&cellback;'><titleref href='forbidden'>Forbidden</titleref></td>
+<td bgcolor='&cellback;'><titleref href='forbidden'>Forbidden</titleref></td>
+<td bgcolor='&cellback;'><titleref href='forbidden'>Forbidden</titleref></td>
+<td bgcolor='&cellback;'><titleref href='forbidden'>Forbidden</titleref></td>
+</tr>
+</htbody>
+</htable>
+<div3 id='not-recognized'>
+<head>Not Recognized</head>
+<p>Outside the DTD, the <code>%</code> character has no
+special significance; thus, what would be parameter entity references in the
+DTD are not recognized as markup in <nt def='NT-content'>content</nt>.
+Similarly, the names of unparsed entities are not recognized except
+when they appear in the value of an appropriately declared attribute.
+</p>
+</div3>
+<div3 id='included'>
+<head>Included</head>
+<p><termdef id="dt-include" term="Include">An entity is 
+<term>included</term> when its 
+<termref def='dt-repltext'>replacement text</termref> is retrieved 
+and processed, in place of the reference itself,
+as though it were part of the document at the location the
+reference was recognized.
+The replacement text may contain both 
+<termref def='dt-chardata'>character data</termref>
+and (except for parameter entities) <termref def="dt-markup">markup</termref>,
+which must be recognized in
+the usual way, except that the replacement text of entities used to escape
+markup delimiters (the entities &magicents;) is always treated as
+data.  (The string "<code>AT&amp;amp;T;</code>" expands to
+"<code>AT&amp;T;</code>" and the remaining ampersand is not recognized
+as an entity-reference delimiter.) 
+A character reference is <term>included</term> when the indicated
+character is processed in place of the reference itself.
+</termdef></p>
+</div3>
+<div3 id='include-if-valid'>
+<head>Included If Validating</head>
+<p>When an XML processor recognizes a reference to a parsed entity, in order
+to <termref def="dt-valid">validate</termref>
+the document, the processor must 
+<termref def="dt-include">include</termref> its
+replacement text.
+If the entity is external, and the processor is not
+attempting to validate the XML document, the
+processor <termref def="dt-may">may</termref>, but need not, 
+include the entity's replacement text.
+If a non-validating parser does not include the replacement text,
+it must inform the application that it recognized, but did not
+read, the entity.</p>
+<p>This rule is based on the recognition that the automatic inclusion
+provided by the SGML and XML entity mechanism, primarily designed
+to support modularity in authoring, is not necessarily 
+appropriate for other applications, in particular document browsing.
+Browsers, for example, when encountering an external parsed entity reference,
+might choose to provide a visual indication of the entity's
+presence and retrieve it for display only on demand.
+</p>
+</div3>
+<div3 id='forbidden'>
+<head>Forbidden</head>
+<p>The following are forbidden, and constitute
+<termref def='dt-fatal'>fatal</termref> errors:
+<ulist>
+<item><p>the appearance of a reference to an
+<termref def='dt-unparsed'>unparsed entity</termref>.
+</p></item>
+<item><p>the appearance of any character or general-entity reference in the
+DTD except within an <nt def='NT-EntityValue'>EntityValue</nt> or 
+<nt def="NT-AttValue">AttValue</nt>.</p></item>
+<item><p>a reference to an external entity in an attribute value.</p>
+</item>
+</ulist>
+</p>
+</div3>
+<div3 id='inliteral'>
+<head>Included in Literal</head>
+<p>When an <termref def='dt-entref'>entity reference</termref> appears in an
+attribute value, or a parameter entity reference appears in a literal entity
+value, its <termref def='dt-repltext'>replacement text</termref> is
+processed in place of the reference itself as though it
+were part of the document at the location the reference was recognized,
+except that a single or double quote character in the replacement text
+is always treated as a normal data character and will not terminate the
+literal. 
+For example, this is well-formed:
+<eg><![CDATA[<!ENTITY % YN '"Yes"' >
+<!ENTITY WhatHeSaid "He said &YN;" >]]></eg>
+while this is not:
+<eg>&lt;!ENTITY EndAttr "27'" >
+&lt;element attribute='a-&amp;EndAttr;></eg>
+</p></div3>
+<div3 id='notify'>
+<head>Notify</head>
+<p>When the name of an <termref def='dt-unparsed'>unparsed
+entity</termref> appears as a token in the
+value of an attribute of declared type <kw>ENTITY</kw> or <kw>ENTITIES</kw>,
+a validating processor must inform the
+application of the <termref def='dt-sysid'>system</termref> 
+and <termref def='dt-pubid'>public</termref> (if any)
+identifiers for both the entity and its associated
+<termref def="dt-notation">notation</termref>.</p>
+</div3>
+<div3 id='bypass'>
+<head>Bypassed</head>
+<p>When a general entity reference appears in the
+<nt def='NT-EntityValue'>EntityValue</nt> in an entity declaration,
+it is bypassed and left as is.</p>
+</div3>
+<div3 id='as-PE'>
+<head>Included as PE</head>
+<p>Just as with external parsed entities, parameter entities
+need only be <titleref href='include-if-valid'>included if
+validating</titleref>. 
+When a parameter-entity reference is recognized in the DTD
+and included, its 
+<termref def='dt-repltext'>replacement
+text</termref> is enlarged by the attachment of one leading and one following
+space (#x20) character; the intent is to constrain the replacement
+text of parameter 
+entities to contain an integral number of grammatical tokens in the DTD.
+</p>
+</div3>
+
+</div2>
+<div2 id='intern-replacement'>
+<head>Construction of Internal Entity Replacement Text</head>
+<p>In discussing the treatment
+of internal entities, it is  
+useful to distinguish two forms of the entity's value.
+<termdef id="dt-litentval" term='Literal Entity Value'>The <term>literal
+entity value</term> is the quoted string actually
+present in the entity declaration, corresponding to the
+non-terminal <nt def='NT-EntityValue'>EntityValue</nt>.</termdef>
+<termdef id='dt-repltext' term='Replacement Text'>The <term>replacement
+text</term> is the content of the entity, after
+replacement of character references and parameter-entity
+references.
+</termdef></p>
+
+<p>The literal entity value 
+as given in an internal entity declaration
+(<nt def='NT-EntityValue'>EntityValue</nt>) may contain character,
+parameter-entity, and general-entity references.
+Such references must be contained entirely within the
+literal entity value.
+The actual replacement text that is 
+<termref def='dt-include'>included</termref> as described above
+must contain the <emph>replacement text</emph> of any 
+parameter entities referred to, and must contain the character
+referred to, in place of any character references in the
+literal entity value; however,
+general-entity references must be left as-is, unexpanded.
+For example, given the following declarations:
+
+<eg><![CDATA[<!ENTITY % pub    "&#xc9;ditions Gallimard" >
+<!ENTITY   rights "All rights reserved" >
+<!ENTITY   book   "La Peste: Albert Camus, 
+&#xA9; 1947 %pub;. &rights;" >]]></eg>
+then the replacement text for the entity "<code>book</code>" is:
+<eg>La Peste: Albert Camus, 
+&#169; 1947 &#201;ditions Gallimard. &amp;rights;</eg>
+The general-entity reference "<code>&amp;rights;</code>" would be expanded
+should the reference "<code>&amp;book;</code>" appear in the document's
+content or an attribute value.</p>
+<p>These simple rules may have complex interactions; for a detailed
+discussion of a difficult example, see
+<specref ref='sec-entexpand'/>.
+</p>
+
+</div2>
+<div2 id='sec-predefined-ent'>
+<head>Predefined Entities</head>
+<p><termdef id="dt-escape" term="escape">Entity and character
+references can both be used to <term>escape</term> the left angle bracket,
+ampersand, and other delimiters.   A set of general entities
+(&magicents;) is specified for this purpose.
+Numeric character references may also be used; they are
+expanded immediately when recognized and must be treated as
+character data, so the numeric character references
+"<code>&amp;#60;</code>" and "<code>&amp;#38;</code>" may be used to 
+escape <code>&lt;</code> and <code>&amp;</code> when they occur
+in character data.</termdef></p>
+<p>All XML processors must recognize these entities whether they
+are declared or not.  
+<termref def='dt-interop'>For interoperability</termref>,
+valid XML documents should declare these
+entities, like any others, before using them.
+If the entities in question are declared, they must be declared
+as internal entities whose replacement text is the single
+character being escaped or a character reference to
+that character, as shown below.
+<eg><![CDATA[<!ENTITY lt     "&#38;#60;"> 
+<!ENTITY gt     "&#62;"> 
+<!ENTITY amp    "&#38;#38;"> 
+<!ENTITY apos   "&#39;"> 
+<!ENTITY quot   "&#34;"> 
+]]></eg>
+Note that the <code>&lt;</code> and <code>&amp;</code> characters
+in the declarations of "<code>lt</code>" and "<code>amp</code>"
+are doubly escaped to meet the requirement that entity replacement
+be well-formed.
+</p>
+</div2>
+
+<div2 id='Notations'>
+<head>Notation Declarations</head>
+<p><termdef id="dt-notation" term="Notation"><term>Notations</term> identify by
+name the format of <termref def="dt-extent">unparsed
+entities</termref>, the
+format of elements which bear a notation attribute, 
+or the application to which  
+a <termref def="dt-pi">processing instruction</termref> is
+addressed.</termdef></p>
+<p><termdef id="dt-notdecl" term="Notation Declaration">
+<term>Notation declarations</term>
+provide a name for the notation, for use in
+entity and attribute-list declarations and in attribute specifications,
+and an external identifier for the notation which may allow an XML
+processor or its client application to locate a helper application
+capable of processing data in the given notation.
+<scrap lang='ebnf'>
+<head>Notation Declarations</head>
+<prod id='NT-NotationDecl'><lhs>NotationDecl</lhs>
+<rhs>'&lt;!NOTATION' <nt def='NT-S'>S</nt> <nt def='NT-Name'>Name</nt> 
+<nt def='NT-S'>S</nt> 
+(<nt def='NT-ExternalID'>ExternalID</nt> | 
+<nt def='NT-PublicID'>PublicID</nt>)
+<nt def='NT-S'>S</nt>? '>'</rhs></prod>
+<prod id='NT-PublicID'><lhs>PublicID</lhs>
+<rhs>'PUBLIC' <nt def='NT-S'>S</nt> 
+<nt def='NT-PubidLiteral'>PubidLiteral</nt> 
+</rhs></prod>
+</scrap>
+</termdef></p>
+<p>XML processors must provide applications with the name and external
+identifier(s) of any notation declared and referred to in an attribute
+value, attribute definition, or entity declaration.  They may
+additionally resolve the external identifier into the
+<termref def="dt-sysid">system identifier</termref>,
+file name, or other information needed to allow the
+application to call a processor for data in the notation described.  (It
+is not an error, however, for XML documents to declare and refer to
+notations for which notation-specific applications are not available on
+the system where the XML processor or application is running.)</p>
+</div2>
+
+<div2 id='sec-doc-entity'>
+<head>Document Entity</head>
+<p><termdef id="dt-docent" term="Document Entity">The <term>document
+entity</term> serves as the root of the entity
+tree and a starting-point for an <termref def="dt-xml-proc">XML
+processor</termref>.</termdef>
+This specification does
+not specify how the document entity is to be located by an XML
+processor; unlike other entities, the document entity has no name and might
+well appear on a processor input stream 
+without any identification at all.</p>
+</div2>
+
+
+</div1>
+<!-- &Conformance; -->
+<div1 id='sec-conformance'>
+<head>Conformance</head>
+<div2 id='proc-types'>
+<head>Validating and Non-Validating Processors</head>
+<p>Conforming <termref def="dt-xml-proc">XML processors</termref> fall into two
+classes: validating and non-validating.</p>
+<p>Validating and non-validating processors alike must report
+violations of this specification's well-formedness constraints
+in the content of the
+<termref def='dt-docent'>document entity</termref> and any 
+other <termref def='dt-parsedent'>parsed entities</termref> that 
+they read.</p>
+<p><termdef id="dt-validating" term="Validating Processor">
+<term>Validating processors</term> must report
+violations of the constraints expressed by the declarations in the
+<termref def="dt-doctype">DTD</termref>, and
+failures to fulfill the validity constraints given
+in this specification.
+</termdef>
+To accomplish this, validating XML processors must read and process the entire
+DTD and all external parsed entities referenced in the document.
+</p>
+<p>Non-validating processors are required to check only the 
+<termref def='dt-docent'>document entity</termref>, including
+the entire internal DTD subset, for well-formedness.
+<termdef id='dt-use-mdecl' term='Process Declarations'>
+While they are not required to check the document for validity,
+they are required to 
+<term>process</term> all the declarations they read in the
+internal DTD subset and in any parameter entity that they
+read, up to the first reference
+to a parameter entity that they do <emph>not</emph> read; that is to 
+say, they must
+use the information in those declarations to
+<titleref href='AVNormalize'>normalize</titleref> attribute values,
+<titleref href='included'>include</titleref> the replacement text of 
+internal entities, and supply 
+<titleref href='sec-attr-defaults'>default attribute values</titleref>.
+</termdef>
+They must not <termref def='dt-use-mdecl'>process</termref>
+<termref def='dt-entdecl'>entity declarations</termref> or 
+<termref def='dt-attdecl'>attribute-list declarations</termref> 
+encountered after a reference to a parameter entity that is not
+read, since the entity may have contained overriding declarations.
+</p>
+</div2>
+<div2 id='safe-behavior'>
+<head>Using XML Processors</head>
+<p>The behavior of a validating XML processor is highly predictable; it
+must read every piece of a document and report all well-formedness and
+validity violations.
+Less is required of a non-validating processor; it need not read any
+part of the document other than the document entity.
+This has two effects that may be important to users of XML processors:
+<ulist>
+<item><p>Certain well-formedness errors, specifically those that require
+reading external entities, may not be detected by a non-validating processor.
+Examples include the constraints entitled 
+<titleref href='wf-entdeclared'>Entity Declared</titleref>, 
+<titleref href='wf-textent'>Parsed Entity</titleref>, and
+<titleref href='wf-norecursion'>No Recursion</titleref>, as well
+as some of the cases described as
+<titleref href='forbidden'>forbidden</titleref> in 
+<specref ref='entproc'/>.</p></item>
+<item><p>The information passed from the processor to the application may
+vary, depending on whether the processor reads
+parameter and external entities.
+For example, a non-validating processor may not 
+<titleref href='AVNormalize'>normalize</titleref> attribute values,
+<titleref href='included'>include</titleref> the replacement text of 
+internal entities, or supply 
+<titleref href='sec-attr-defaults'>default attribute values</titleref>,
+where doing so depends on having read declarations in 
+external or parameter entities.</p></item>
+</ulist>
+</p>
+<p>For maximum reliability in interoperating between different XML
+processors, applications which use non-validating processors should not 
+rely on any behaviors not required of such processors.
+Applications which require facilities such as the use of default
+attributes or internal entities which are declared in external
+entities should use validating XML processors.</p>
+</div2>
+</div1>
+
+<div1 id='sec-notation'>
+<head>Notation</head>
+<p>The formal grammar of XML is given in this specification using a simple
+Extended Backus-Naur Form (EBNF) notation.  Each rule in the grammar defines
+one symbol, in the form
+<eg>symbol ::= expression</eg></p>
+<p>Symbols are written with an initial capital letter if they are
+defined by a regular expression, or with an initial lower case letter 
+otherwise.
+Literal strings are quoted.
+
+</p>
+
+<p>Within the expression on the right-hand side of a rule, the following
+expressions are used to match strings of one or more characters:
+<glist>
+<gitem>
+<label><code>#xN</code></label>
+<def><p>where <code>N</code> is a hexadecimal integer, the
+expression matches the character in ISO/IEC 10646 whose canonical
+(UCS-4) 
+code value, when interpreted as an unsigned binary number, has
+the value indicated.  The number of leading zeros in the
+<code>#xN</code> form is insignificant; the number of leading
+zeros in the corresponding code value 
+is governed by the character
+encoding in use and is not significant for XML.</p></def>
+</gitem>
+<gitem>
+<label><code>[a-zA-Z]</code>, <code>[#xN-#xN]</code></label>
+<def><p>matches any <termref def='dt-character'>character</termref> 
+with a value in the range(s) indicated (inclusive).</p></def>
+</gitem>
+<gitem>
+<label><code>[^a-z]</code>, <code>[^#xN-#xN]</code></label>
+<def><p>matches any <termref def='dt-character'>character</termref> 
+with a value <emph>outside</emph> the
+range indicated.</p></def>
+</gitem>
+<gitem>
+<label><code>[^abc]</code>, <code>[^#xN#xN#xN]</code></label>
+<def><p>matches any <termref def='dt-character'>character</termref>
+with a value not among the characters given.</p></def>
+</gitem>
+<gitem>
+<label><code>"string"</code></label>
+<def><p>matches a literal string <termref def="dt-match">matching</termref>
+that given inside the double quotes.</p></def>
+</gitem>
+<gitem>
+<label><code>'string'</code></label>
+<def><p>matches a literal string <termref def="dt-match">matching</termref>
+that given inside the single quotes.</p></def>
+</gitem>
+</glist>
+These symbols may be combined to match more complex patterns as follows,
+where <code>A</code> and <code>B</code> represent simple expressions:
+<glist>
+<gitem>
+<label>(<code>expression</code>)</label>
+<def><p><code>expression</code> is treated as a unit 
+and may be combined as described in this list.</p></def>
+</gitem>
+<gitem>
+<label><code>A?</code></label>
+<def><p>matches <code>A</code> or nothing; optional <code>A</code>.</p></def>
+</gitem>
+<gitem>
+<label><code>A B</code></label>
+<def><p>matches <code>A</code> followed by <code>B</code>.</p></def>
+</gitem>
+<gitem>
+<label><code>A | B</code></label>
+<def><p>matches <code>A</code> or <code>B</code> but not both.</p></def>
+</gitem>
+<gitem>
+<label><code>A - B</code></label>
+<def><p>matches any string that matches <code>A</code> but does not match
+<code>B</code>.
+</p></def>
+</gitem>
+<gitem>
+<label><code>A+</code></label>
+<def><p>matches one or more occurrences of <code>A</code>.</p></def>
+</gitem>
+<gitem>
+<label><code>A*</code></label>
+<def><p>matches zero or more occurrences of <code>A</code>.</p></def>
+</gitem>
+
+</glist>
+Other notations used in the productions are:
+<glist>
+<gitem>
+<label><code>/* ... */</code></label>
+<def><p>comment.</p></def>
+</gitem>
+<gitem>
+<label><code>[ wfc: ... ]</code></label>
+<def><p>well-formedness constraint; this identifies by name a 
+constraint on 
+<termref def="dt-wellformed">well-formed</termref> documents
+associated with a production.</p></def>
+</gitem>
+<gitem>
+<label><code>[ vc: ... ]</code></label>
+<def><p>validity constraint; this identifies by name a constraint on
+<termref def="dt-valid">valid</termref> documents associated with
+a production.</p></def>
+</gitem>
+</glist>
+</p></div1>
+
+</body>
+<back>
+<!-- &SGML; -->
+
+<!-- &Biblio; -->
+<div1 id='sec-bibliography'>
+
+<head>References</head>
+<div2 id='sec-existing-stds'>
+<head>Normative References</head>
+
+<blist>
+<bibl id='IANA' key='IANA'>
+(Internet Assigned Numbers Authority) <emph>Official Names for 
+Character Sets</emph>,
+ed. Keld Simonsen et al.
+See <loc href='ftp://ftp.isi.edu/in-notes/iana/assignments/character-sets'>ftp://ftp.isi.edu/in-notes/iana/assignments/character-sets</loc>.
+</bibl>
+
+<bibl id='RFC1766' key='IETF RFC 1766'>
+IETF (Internet Engineering Task Force).
+<emph>RFC 1766:  Tags for the Identification of Languages</emph>,
+ed. H. Alvestrand.
+1995.
+</bibl>
+
+<bibl id='ISO639' key='ISO 639'>
+(International Organization for Standardization).
+<emph>ISO 639:1988 (E).
+Code for the representation of names of languages.</emph>
+[Geneva]:  International Organization for
+Standardization, 1988.</bibl>
+
+<bibl id='ISO3166' key='ISO 3166'>
+(International Organization for Standardization).
+<emph>ISO 3166-1:1997 (E).
+Codes for the representation of names of countries and their subdivisions 
+&mdash; Part 1: Country codes</emph>
+[Geneva]:  International Organization for
+Standardization, 1997.</bibl>
+
+<bibl id='ISO10646' key='ISO/IEC 10646'>ISO
+(International Organization for Standardization).
+<emph>ISO/IEC 10646-1993 (E).  Information technology &mdash; Universal
+Multiple-Octet Coded Character Set (UCS) &mdash; Part 1:
+Architecture and Basic Multilingual Plane.</emph>
+[Geneva]:  International Organization for
+Standardization, 1993 (plus amendments AM 1 through AM 7).
+</bibl>
+
+<bibl id='Unicode' key='Unicode'>The Unicode Consortium.
+<emph>The Unicode Standard, Version 2.0.</emph>
+Reading, Mass.:  Addison-Wesley Developers Press, 1996.</bibl>
+
+</blist>
+
+</div2>
+
+<div2><head>Other References</head> 
+
+<blist>
+
+<bibl id='Aho' key='Aho/Ullman'>Aho, Alfred V., 
+Ravi Sethi, and Jeffrey D. Ullman.
+<emph>Compilers:  Principles, Techniques, and Tools</emph>.
+Reading:  Addison-Wesley, 1986, rpt. corr. 1988.</bibl>
+
+<bibl id="Berners-Lee" xml-link="simple" key="Berners-Lee et al.">
+Berners-Lee, T., R. Fielding, and L. Masinter.
+<emph>Uniform Resource Identifiers (URI):  Generic Syntax and
+Semantics</emph>.
+1997.
+(Work in progress; see updates to RFC1738.)</bibl>
+
+<bibl id='ABK' key='Brüggemann-Klein'>Brüggemann-Klein, Anne.
+<emph>Regular Expressions into Finite Automata</emph>.
+Extended abstract in I. Simon, Hrsg., LATIN 1992, 
+S. 97-98. Springer-Verlag, Berlin 1992. 
+Full Version in Theoretical Computer Science 120: 197-213, 1993.
+
+</bibl>
+
+<bibl id='ABKDW' key='Brüggemann-Klein and Wood'>Brüggemann-Klein, Anne,
+and Derick Wood.
+<emph>Deterministic Regular Languages</emph>.
+Universität Freiburg, Institut für Informatik,
+Bericht 38, Oktober 1991.
+</bibl>
+
+<bibl id='Clark' key='Clark'>James Clark.
+Comparison of SGML and XML. See
+<loc href='http://www.w3.org/TR/NOTE-sgml-xml-971215'>http://www.w3.org/TR/NOTE-sgml-xml-971215</loc>.
+</bibl>
+<bibl id="RFC1738" xml-link="simple" key="IETF RFC1738">
+IETF (Internet Engineering Task Force).
+<emph>RFC 1738:  Uniform Resource Locators (URL)</emph>, 
+ed. T. Berners-Lee, L. Masinter, M. McCahill.
+1994.
+</bibl>
+
+<bibl id="RFC1808" xml-link="simple" key="IETF RFC1808">
+IETF (Internet Engineering Task Force).
+<emph>RFC 1808:  Relative Uniform Resource Locators</emph>, 
+ed. R. Fielding.
+1995.
+</bibl>
+
+<bibl id="RFC2141" xml-link="simple" key="IETF RFC2141">
+IETF (Internet Engineering Task Force).
+<emph>RFC 2141:  URN Syntax</emph>, 
+ed. R. Moats.
+1997.
+</bibl>
+
+<bibl id='ISO8879' key='ISO 8879'>ISO
+(International Organization for Standardization).
+<emph>ISO 8879:1986(E).  Information processing &mdash; Text and Office
+Systems &mdash; Standard Generalized Markup Language (SGML).</emph>  First
+edition &mdash; 1986-10-15.  [Geneva]:  International Organization for
+Standardization, 1986.
+</bibl>
+
+
+<bibl id='ISO10744' key='ISO/IEC 10744'>ISO
+(International Organization for Standardization).
+<emph>ISO/IEC 10744-1992 (E).  Information technology &mdash;
+Hypermedia/Time-based Structuring Language (HyTime).
+</emph>
+[Geneva]:  International Organization for
+Standardization, 1992.
+<emph>Extended Facilities Annexe.</emph>
+[Geneva]:  International Organization for
+Standardization, 1996. 
+</bibl>
+
+
+
+</blist>
+</div2>
+</div1>
+<div1 id='CharClasses'>
+<head>Character Classes</head>
+<p>Following the characteristics defined in the Unicode standard,
+characters are classed as base characters (among others, these
+contain the alphabetic characters of the Latin alphabet, without
+diacritics), ideographic characters, and combining characters (among
+others, this class contains most diacritics); these classes combine
+to form the class of letters.  Digits and extenders are
+also distinguished.
+<scrap lang="ebnf" id="CHARACTERS">
+<head>Characters</head>
+<prodgroup pcw3="3" pcw4="15">
+<prod id="NT-Letter"><lhs>Letter</lhs>
+<rhs><nt def="NT-BaseChar">BaseChar</nt> 
+| <nt def="NT-Ideographic">Ideographic</nt></rhs> </prod>
+<prod id='NT-BaseChar'><lhs>BaseChar</lhs>
+<rhs>[#x0041-#x005A]
+|&nbsp;[#x0061-#x007A]
+|&nbsp;[#x00C0-#x00D6]
+|&nbsp;[#x00D8-#x00F6]
+|&nbsp;[#x00F8-#x00FF]
+|&nbsp;[#x0100-#x0131]
+|&nbsp;[#x0134-#x013E]
+|&nbsp;[#x0141-#x0148]
+|&nbsp;[#x014A-#x017E]
+|&nbsp;[#x0180-#x01C3]
+|&nbsp;[#x01CD-#x01F0]
+|&nbsp;[#x01F4-#x01F5]
+|&nbsp;[#x01FA-#x0217]
+|&nbsp;[#x0250-#x02A8]
+|&nbsp;[#x02BB-#x02C1]
+|&nbsp;#x0386
+|&nbsp;[#x0388-#x038A]
+|&nbsp;#x038C
+|&nbsp;[#x038E-#x03A1]
+|&nbsp;[#x03A3-#x03CE]
+|&nbsp;[#x03D0-#x03D6]
+|&nbsp;#x03DA
+|&nbsp;#x03DC
+|&nbsp;#x03DE
+|&nbsp;#x03E0
+|&nbsp;[#x03E2-#x03F3]
+|&nbsp;[#x0401-#x040C]
+|&nbsp;[#x040E-#x044F]
+|&nbsp;[#x0451-#x045C]
+|&nbsp;[#x045E-#x0481]
+|&nbsp;[#x0490-#x04C4]
+|&nbsp;[#x04C7-#x04C8]
+|&nbsp;[#x04CB-#x04CC]
+|&nbsp;[#x04D0-#x04EB]
+|&nbsp;[#x04EE-#x04F5]
+|&nbsp;[#x04F8-#x04F9]
+|&nbsp;[#x0531-#x0556]
+|&nbsp;#x0559
+|&nbsp;[#x0561-#x0586]
+|&nbsp;[#x05D0-#x05EA]
+|&nbsp;[#x05F0-#x05F2]
+|&nbsp;[#x0621-#x063A]
+|&nbsp;[#x0641-#x064A]
+|&nbsp;[#x0671-#x06B7]
+|&nbsp;[#x06BA-#x06BE]
+|&nbsp;[#x06C0-#x06CE]
+|&nbsp;[#x06D0-#x06D3]
+|&nbsp;#x06D5
+|&nbsp;[#x06E5-#x06E6]
+|&nbsp;[#x0905-#x0939]
+|&nbsp;#x093D
+|&nbsp;[#x0958-#x0961]
+|&nbsp;[#x0985-#x098C]
+|&nbsp;[#x098F-#x0990]
+|&nbsp;[#x0993-#x09A8]
+|&nbsp;[#x09AA-#x09B0]
+|&nbsp;#x09B2
+|&nbsp;[#x09B6-#x09B9]
+|&nbsp;[#x09DC-#x09DD]
+|&nbsp;[#x09DF-#x09E1]
+|&nbsp;[#x09F0-#x09F1]
+|&nbsp;[#x0A05-#x0A0A]
+|&nbsp;[#x0A0F-#x0A10]
+|&nbsp;[#x0A13-#x0A28]
+|&nbsp;[#x0A2A-#x0A30]
+|&nbsp;[#x0A32-#x0A33]
+|&nbsp;[#x0A35-#x0A36]
+|&nbsp;[#x0A38-#x0A39]
+|&nbsp;[#x0A59-#x0A5C]
+|&nbsp;#x0A5E
+|&nbsp;[#x0A72-#x0A74]
+|&nbsp;[#x0A85-#x0A8B]
+|&nbsp;#x0A8D
+|&nbsp;[#x0A8F-#x0A91]
+|&nbsp;[#x0A93-#x0AA8]
+|&nbsp;[#x0AAA-#x0AB0]
+|&nbsp;[#x0AB2-#x0AB3]
+|&nbsp;[#x0AB5-#x0AB9]
+|&nbsp;#x0ABD
+|&nbsp;#x0AE0
+|&nbsp;[#x0B05-#x0B0C]
+|&nbsp;[#x0B0F-#x0B10]
+|&nbsp;[#x0B13-#x0B28]
+|&nbsp;[#x0B2A-#x0B30]
+|&nbsp;[#x0B32-#x0B33]
+|&nbsp;[#x0B36-#x0B39]
+|&nbsp;#x0B3D
+|&nbsp;[#x0B5C-#x0B5D]
+|&nbsp;[#x0B5F-#x0B61]
+|&nbsp;[#x0B85-#x0B8A]
+|&nbsp;[#x0B8E-#x0B90]
+|&nbsp;[#x0B92-#x0B95]
+|&nbsp;[#x0B99-#x0B9A]
+|&nbsp;#x0B9C
+|&nbsp;[#x0B9E-#x0B9F]
+|&nbsp;[#x0BA3-#x0BA4]
+|&nbsp;[#x0BA8-#x0BAA]
+|&nbsp;[#x0BAE-#x0BB5]
+|&nbsp;[#x0BB7-#x0BB9]
+|&nbsp;[#x0C05-#x0C0C]
+|&nbsp;[#x0C0E-#x0C10]
+|&nbsp;[#x0C12-#x0C28]
+|&nbsp;[#x0C2A-#x0C33]
+|&nbsp;[#x0C35-#x0C39]
+|&nbsp;[#x0C60-#x0C61]
+|&nbsp;[#x0C85-#x0C8C]
+|&nbsp;[#x0C8E-#x0C90]
+|&nbsp;[#x0C92-#x0CA8]
+|&nbsp;[#x0CAA-#x0CB3]
+|&nbsp;[#x0CB5-#x0CB9]
+|&nbsp;#x0CDE
+|&nbsp;[#x0CE0-#x0CE1]
+|&nbsp;[#x0D05-#x0D0C]
+|&nbsp;[#x0D0E-#x0D10]
+|&nbsp;[#x0D12-#x0D28]
+|&nbsp;[#x0D2A-#x0D39]
+|&nbsp;[#x0D60-#x0D61]
+|&nbsp;[#x0E01-#x0E2E]
+|&nbsp;#x0E30
+|&nbsp;[#x0E32-#x0E33]
+|&nbsp;[#x0E40-#x0E45]
+|&nbsp;[#x0E81-#x0E82]
+|&nbsp;#x0E84
+|&nbsp;[#x0E87-#x0E88]
+|&nbsp;#x0E8A
+|&nbsp;#x0E8D
+|&nbsp;[#x0E94-#x0E97]
+|&nbsp;[#x0E99-#x0E9F]
+|&nbsp;[#x0EA1-#x0EA3]
+|&nbsp;#x0EA5
+|&nbsp;#x0EA7
+|&nbsp;[#x0EAA-#x0EAB]
+|&nbsp;[#x0EAD-#x0EAE]
+|&nbsp;#x0EB0
+|&nbsp;[#x0EB2-#x0EB3]
+|&nbsp;#x0EBD
+|&nbsp;[#x0EC0-#x0EC4]
+|&nbsp;[#x0F40-#x0F47]
+|&nbsp;[#x0F49-#x0F69]
+|&nbsp;[#x10A0-#x10C5]
+|&nbsp;[#x10D0-#x10F6]
+|&nbsp;#x1100
+|&nbsp;[#x1102-#x1103]
+|&nbsp;[#x1105-#x1107]
+|&nbsp;#x1109
+|&nbsp;[#x110B-#x110C]
+|&nbsp;[#x110E-#x1112]
+|&nbsp;#x113C
+|&nbsp;#x113E
+|&nbsp;#x1140
+|&nbsp;#x114C
+|&nbsp;#x114E
+|&nbsp;#x1150
+|&nbsp;[#x1154-#x1155]
+|&nbsp;#x1159
+|&nbsp;[#x115F-#x1161]
+|&nbsp;#x1163
+|&nbsp;#x1165
+|&nbsp;#x1167
+|&nbsp;#x1169
+|&nbsp;[#x116D-#x116E]
+|&nbsp;[#x1172-#x1173]
+|&nbsp;#x1175
+|&nbsp;#x119E
+|&nbsp;#x11A8
+|&nbsp;#x11AB
+|&nbsp;[#x11AE-#x11AF]
+|&nbsp;[#x11B7-#x11B8]
+|&nbsp;#x11BA
+|&nbsp;[#x11BC-#x11C2]
+|&nbsp;#x11EB
+|&nbsp;#x11F0
+|&nbsp;#x11F9
+|&nbsp;[#x1E00-#x1E9B]
+|&nbsp;[#x1EA0-#x1EF9]
+|&nbsp;[#x1F00-#x1F15]
+|&nbsp;[#x1F18-#x1F1D]
+|&nbsp;[#x1F20-#x1F45]
+|&nbsp;[#x1F48-#x1F4D]
+|&nbsp;[#x1F50-#x1F57]
+|&nbsp;#x1F59
+|&nbsp;#x1F5B
+|&nbsp;#x1F5D
+|&nbsp;[#x1F5F-#x1F7D]
+|&nbsp;[#x1F80-#x1FB4]
+|&nbsp;[#x1FB6-#x1FBC]
+|&nbsp;#x1FBE
+|&nbsp;[#x1FC2-#x1FC4]
+|&nbsp;[#x1FC6-#x1FCC]
+|&nbsp;[#x1FD0-#x1FD3]
+|&nbsp;[#x1FD6-#x1FDB]
+|&nbsp;[#x1FE0-#x1FEC]
+|&nbsp;[#x1FF2-#x1FF4]
+|&nbsp;[#x1FF6-#x1FFC]
+|&nbsp;#x2126
+|&nbsp;[#x212A-#x212B]
+|&nbsp;#x212E
+|&nbsp;[#x2180-#x2182]
+|&nbsp;[#x3041-#x3094]
+|&nbsp;[#x30A1-#x30FA]
+|&nbsp;[#x3105-#x312C]
+|&nbsp;[#xAC00-#xD7A3]
+</rhs></prod>
+<prod id='NT-Ideographic'><lhs>Ideographic</lhs>
+<rhs>[#x4E00-#x9FA5]
+|&nbsp;#x3007
+|&nbsp;[#x3021-#x3029]
+</rhs></prod>
+<prod id='NT-CombiningChar'><lhs>CombiningChar</lhs>
+<rhs>[#x0300-#x0345]
+|&nbsp;[#x0360-#x0361]
+|&nbsp;[#x0483-#x0486]
+|&nbsp;[#x0591-#x05A1]
+|&nbsp;[#x05A3-#x05B9]
+|&nbsp;[#x05BB-#x05BD]
+|&nbsp;#x05BF
+|&nbsp;[#x05C1-#x05C2]
+|&nbsp;#x05C4
+|&nbsp;[#x064B-#x0652]
+|&nbsp;#x0670
+|&nbsp;[#x06D6-#x06DC]
+|&nbsp;[#x06DD-#x06DF]
+|&nbsp;[#x06E0-#x06E4]
+|&nbsp;[#x06E7-#x06E8]
+|&nbsp;[#x06EA-#x06ED]
+|&nbsp;[#x0901-#x0903]
+|&nbsp;#x093C
+|&nbsp;[#x093E-#x094C]
+|&nbsp;#x094D
+|&nbsp;[#x0951-#x0954]
+|&nbsp;[#x0962-#x0963]
+|&nbsp;[#x0981-#x0983]
+|&nbsp;#x09BC
+|&nbsp;#x09BE
+|&nbsp;#x09BF
+|&nbsp;[#x09C0-#x09C4]
+|&nbsp;[#x09C7-#x09C8]
+|&nbsp;[#x09CB-#x09CD]
+|&nbsp;#x09D7
+|&nbsp;[#x09E2-#x09E3]
+|&nbsp;#x0A02
+|&nbsp;#x0A3C
+|&nbsp;#x0A3E
+|&nbsp;#x0A3F
+|&nbsp;[#x0A40-#x0A42]
+|&nbsp;[#x0A47-#x0A48]
+|&nbsp;[#x0A4B-#x0A4D]
+|&nbsp;[#x0A70-#x0A71]
+|&nbsp;[#x0A81-#x0A83]
+|&nbsp;#x0ABC
+|&nbsp;[#x0ABE-#x0AC5]
+|&nbsp;[#x0AC7-#x0AC9]
+|&nbsp;[#x0ACB-#x0ACD]
+|&nbsp;[#x0B01-#x0B03]
+|&nbsp;#x0B3C
+|&nbsp;[#x0B3E-#x0B43]
+|&nbsp;[#x0B47-#x0B48]
+|&nbsp;[#x0B4B-#x0B4D]
+|&nbsp;[#x0B56-#x0B57]
+|&nbsp;[#x0B82-#x0B83]
+|&nbsp;[#x0BBE-#x0BC2]
+|&nbsp;[#x0BC6-#x0BC8]
+|&nbsp;[#x0BCA-#x0BCD]
+|&nbsp;#x0BD7
+|&nbsp;[#x0C01-#x0C03]
+|&nbsp;[#x0C3E-#x0C44]
+|&nbsp;[#x0C46-#x0C48]
+|&nbsp;[#x0C4A-#x0C4D]
+|&nbsp;[#x0C55-#x0C56]
+|&nbsp;[#x0C82-#x0C83]
+|&nbsp;[#x0CBE-#x0CC4]
+|&nbsp;[#x0CC6-#x0CC8]
+|&nbsp;[#x0CCA-#x0CCD]
+|&nbsp;[#x0CD5-#x0CD6]
+|&nbsp;[#x0D02-#x0D03]
+|&nbsp;[#x0D3E-#x0D43]
+|&nbsp;[#x0D46-#x0D48]
+|&nbsp;[#x0D4A-#x0D4D]
+|&nbsp;#x0D57
+|&nbsp;#x0E31
+|&nbsp;[#x0E34-#x0E3A]
+|&nbsp;[#x0E47-#x0E4E]
+|&nbsp;#x0EB1
+|&nbsp;[#x0EB4-#x0EB9]
+|&nbsp;[#x0EBB-#x0EBC]
+|&nbsp;[#x0EC8-#x0ECD]
+|&nbsp;[#x0F18-#x0F19]
+|&nbsp;#x0F35
+|&nbsp;#x0F37
+|&nbsp;#x0F39
+|&nbsp;#x0F3E
+|&nbsp;#x0F3F
+|&nbsp;[#x0F71-#x0F84]
+|&nbsp;[#x0F86-#x0F8B]
+|&nbsp;[#x0F90-#x0F95]
+|&nbsp;#x0F97
+|&nbsp;[#x0F99-#x0FAD]
+|&nbsp;[#x0FB1-#x0FB7]
+|&nbsp;#x0FB9
+|&nbsp;[#x20D0-#x20DC]
+|&nbsp;#x20E1
+|&nbsp;[#x302A-#x302F]
+|&nbsp;#x3099
+|&nbsp;#x309A
+</rhs></prod>
+<prod id='NT-Digit'><lhs>Digit</lhs>
+<rhs>[#x0030-#x0039]
+|&nbsp;[#x0660-#x0669]
+|&nbsp;[#x06F0-#x06F9]
+|&nbsp;[#x0966-#x096F]
+|&nbsp;[#x09E6-#x09EF]
+|&nbsp;[#x0A66-#x0A6F]
+|&nbsp;[#x0AE6-#x0AEF]
+|&nbsp;[#x0B66-#x0B6F]
+|&nbsp;[#x0BE7-#x0BEF]
+|&nbsp;[#x0C66-#x0C6F]
+|&nbsp;[#x0CE6-#x0CEF]
+|&nbsp;[#x0D66-#x0D6F]
+|&nbsp;[#x0E50-#x0E59]
+|&nbsp;[#x0ED0-#x0ED9]
+|&nbsp;[#x0F20-#x0F29]
+</rhs></prod>
+<prod id='NT-Extender'><lhs>Extender</lhs>
+<rhs>#x00B7
+|&nbsp;#x02D0
+|&nbsp;#x02D1
+|&nbsp;#x0387
+|&nbsp;#x0640
+|&nbsp;#x0E46
+|&nbsp;#x0EC6
+|&nbsp;#x3005
+|&nbsp;[#x3031-#x3035]
+|&nbsp;[#x309D-#x309E]
+|&nbsp;[#x30FC-#x30FE]
+</rhs></prod>
+
+</prodgroup>
+</scrap>
+</p>
+<p>The character classes defined here can be derived from the
+Unicode character database as follows:
+<ulist>
+<item>
+<p>Name start characters must have one of the categories Ll, Lu,
+Lo, Lt, Nl.</p>
+</item>
+<item>
+<p>Name characters other than Name-start characters 
+must have one of the categories Mc, Me, Mn, Lm, or Nd.</p>
+</item>
+<item>
+<p>Characters in the compatibility area (i.e. with character code
+greater than #xF900 and less than #xFFFE) are not allowed in XML
+names.</p>
+</item>
+<item>
+<p>Characters which have a font or compatibility decomposition (i.e. those
+with a "compatibility formatting tag" in field 5 of the database --
+marked by field 5 beginning with a "&lt;") are not allowed.</p>
+</item>
+<item>
+<p>The following characters are treated as name-start characters
+rather than name characters, because the property file classifies
+them as Alphabetic:  [#x02BB-#x02C1], #x0559, #x06E5, #x06E6.</p>
+</item>
+<item>
+<p>Characters #x20DD-#x20E0 are excluded (in accordance with 
+Unicode, section 5.14).</p>
+</item>
+<item>
+<p>Character #x00B7 is classified as an extender, because the
+property list so identifies it.</p>
+</item>
+<item>
+<p>Character #x0387 is added as a name character, because #x00B7
+is its canonical equivalent.</p>
+</item>
+<item>
+<p>Characters ':' and '_' are allowed as name-start characters.</p>
+</item>
+<item>
+<p>Characters '-' and '.' are allowed as name characters.</p>
+</item>
+</ulist>
+</p>
+</div1>
+<inform-div1 id="sec-xml-and-sgml">
+<head>XML and SGML</head>
+<p>XML is designed to be a subset of SGML, in that every
+<termref def="dt-valid">valid</termref> XML document should also be a
+conformant SGML document.
+For a detailed comparison of the additional restrictions that XML places on
+documents beyond those of SGML, see <bibref ref='Clark'/>.
+</p>
+</inform-div1>
+<inform-div1 id="sec-entexpand">
+<head>Expansion of Entity and Character References</head>
+<p>This appendix contains some examples illustrating the
+sequence of entity- and character-reference recognition and
+expansion, as specified in <specref ref='entproc'/>.</p>
+<p>
+If the DTD contains the declaration 
+<eg><![CDATA[<!ENTITY example "<p>An ampersand (&#38;#38;) may be escaped
+numerically (&#38;#38;#38;) or with a general entity
+(&amp;amp;).</p>" >
+]]></eg>
+then the XML processor will recognize the character references 
+when it parses the entity declaration, and resolve them before 
+storing the following string as the
+value of the entity "<code>example</code>":
+<eg><![CDATA[<p>An ampersand (&#38;) may be escaped
+numerically (&#38;#38;) or with a general entity
+(&amp;amp;).</p>
+]]></eg>
+A reference in the document to "<code>&amp;example;</code>" 
+will cause the text to be reparsed, at which time the 
+start- and end-tags of the "<code>p</code>" element will be recognized 
+and the three references will be recognized and expanded, 
+resulting in a "<code>p</code>" element with the following content
+(all data, no delimiters or markup):
+<eg><![CDATA[An ampersand (&) may be escaped
+numerically (&#38;) or with a general entity
+(&amp;).
+]]></eg>
+</p>
+<p>A more complex example will illustrate the rules and their
+effects fully.  In the following example, the line numbers are
+solely for reference.
+<eg><![CDATA[1 <?xml version='1.0'?>
+2 <!DOCTYPE test [
+3 <!ELEMENT test (#PCDATA) >
+4 <!ENTITY % xx '&#37;zz;'>
+5 <!ENTITY % zz '&#60;!ENTITY tricky "error-prone" >' >
+6 %xx;
+7 ]>
+8 <test>This sample shows a &tricky; method.</test>
+]]></eg>
+This produces the following:
+<ulist spacing="compact">
+<item><p>in line 4, the reference to character 37 is expanded immediately,
+and the parameter entity "<code>xx</code>" is stored in the symbol
+table with the value "<code>%zz;</code>".  Since the replacement text
+is not rescanned, the reference to parameter entity "<code>zz</code>"
+is not recognized.  (And it would be an error if it were, since
+"<code>zz</code>" is not yet declared.)</p></item>
+<item><p>in line 5, the character reference "<code>&amp;#60;</code>" is
+expanded immediately and the parameter entity "<code>zz</code>" is
+stored with the replacement text 
+"<code>&lt;!ENTITY tricky "error-prone" ></code>",
+which is a well-formed entity declaration.</p></item>
+<item><p>in line 6, the reference to "<code>xx</code>" is recognized,
+and the replacement text of "<code>xx</code>" (namely 
+"<code>%zz;</code>") is parsed.  The reference to "<code>zz</code>"
+is recognized in its turn, and its replacement text 
+("<code>&lt;!ENTITY tricky "error-prone" ></code>") is parsed.
+The general entity "<code>tricky</code>" has now been
+declared, with the replacement text "<code>error-prone</code>".</p></item>
+<item><p>
+in line 8, the reference to the general entity "<code>tricky</code>" is
+recognized, and it is expanded, so the full content of the
+"<code>test</code>" element is the self-describing (and ungrammatical) string
+<emph>This sample shows a error-prone method.</emph>
+</p></item>
+</ulist>
+</p>
+</inform-div1> 
+<inform-div1 id="determinism">
+<head>Deterministic Content Models</head>
+<p><termref def='dt-compat'>For compatibility</termref>, it is
+required
+that content models in element type declarations be deterministic.  
+</p>
+<!-- FINAL EDIT:  WebSGML allows ambiguity? -->
+<p>SGML
+requires deterministic content models (it calls them
+"unambiguous"); XML processors built using SGML systems may
+flag non-deterministic content models as errors.</p>
+<p>For example, the content model <code>((b, c) | (b, d))</code> is
+non-deterministic, because given an initial <code>b</code> the parser
+cannot know which <code>b</code> in the model is being matched without
+looking ahead to see which element follows the <code>b</code>.
+In this case, the two references to
+<code>b</code> can be collapsed 
+into a single reference, making the model read
+<code>(b, (c | d))</code>.  An initial <code>b</code> now clearly
+matches only a single name in the content model.  The parser doesn't
+need to look ahead to see what follows; either <code>c</code> or
+<code>d</code> would be accepted.</p>
+<p>More formally:  a finite state automaton may be constructed from the
+content model using the standard algorithms, e.g. algorithm 3.5 
+in section 3.9
+of Aho, Sethi, and Ullman <bibref ref='Aho'/>.
+In many such algorithms, a follow set is constructed for each 
+position in the regular expression (i.e., each leaf 
+node in the 
+syntax tree for the regular expression);
+if any position has a follow set in which 
+more than one following position is 
+labeled with the same element type name, 
+then the content model is in error
+and may be reported as an error.
+</p>
+<p>Algorithms exist which allow many but not all non-deterministic
+content models to be reduced automatically to equivalent deterministic
+models; see Brüggemann-Klein 1991 <bibref ref='ABK'/>.</p>
+</inform-div1>
+<inform-div1 id="sec-guessing">
+<head>Autodetection of Character Encodings</head>
+<p>The XML encoding declaration functions as an internal label on each
+entity, indicating which character encoding is in use.  Before an XML
+processor can read the internal label, however, it apparently has to
+know what character encoding is in use&mdash;which is what the internal label
+is trying to indicate.  In the general case, this is a hopeless
+situation. It is not entirely hopeless in XML, however, because XML
+limits the general case in two ways:  each implementation is assumed
+to support only a  finite set of character encodings, and the XML
+encoding declaration is restricted in position and content in order to
+make it feasible to autodetect the character encoding in use in each
+entity in normal cases.  Also, in many cases other sources of information
+are available in addition to the XML data stream itself.  
+Two cases may be distinguished, 
+depending on whether the XML entity is presented to the
+processor without, or with, any accompanying
+(external) information.  We consider the first case first.
+</p>
+<p>
+Because each XML entity not in UTF-8 or UTF-16 format <emph>must</emph>
+begin with an XML encoding declaration, in which the first  characters
+must be '<code>&lt;?xml</code>', any conforming processor can detect,
+after two to four octets of input, which of the following cases apply. 
+In reading this list, it may help to know that in UCS-4, '&lt;' is
+"<code>#x0000003C</code>" and '?' is "<code>#x0000003F</code>", and the Byte
+Order Mark required of UTF-16 data streams is "<code>#xFEFF</code>".</p>
+<p>
+<ulist>
+<item>
+<p><code>00 00 00 3C</code>: UCS-4, big-endian machine (1234 order)</p>
+</item>
+<item>
+<p><code>3C 00 00 00</code>: UCS-4, little-endian machine (4321 order)</p>
+</item>
+<item>
+<p><code>00 00 3C 00</code>: UCS-4, unusual octet order (2143)</p>
+</item>
+<item>
+<p><code>00 3C 00 00</code>: UCS-4, unusual octet order (3412)</p>
+</item>
+<item>
+<p><code>FE FF</code>: UTF-16, big-endian</p>
+</item>
+<item>
+<p><code>FF FE</code>: UTF-16, little-endian</p>
+</item>
+<item>
+<p><code>00 3C 00 3F</code>: UTF-16, big-endian, no Byte Order Mark
+(and thus, strictly speaking, in error)</p>
+</item>
+<item>
+<p><code>3C 00 3F 00</code>: UTF-16, little-endian, no Byte Order Mark
+(and thus, strictly speaking, in error)</p>
+</item>
+<item>
+<p><code>3C 3F 78 6D</code>: UTF-8, ISO 646, ASCII, some part of ISO 8859, 
+Shift-JIS, EUC, or any other 7-bit, 8-bit, or mixed-width encoding
+which ensures that the characters of ASCII have their normal positions,
+width,
+and values; the actual encoding declaration must be read to 
+detect which of these applies, but since all of these encodings
+use the same bit patterns for the ASCII characters, the encoding 
+declaration itself may be read reliably
+</p>
+</item>
+<item>
+<p><code>4C 6F A7 94</code>: EBCDIC (in some flavor; the full
+encoding declaration must be read to tell which code page is in 
+use)</p>
+</item>
+<item>
+<p>other: UTF-8 without an encoding declaration, or else 
+the data stream is corrupt, fragmentary, or enclosed in
+a wrapper of some kind</p>
+</item>
+</ulist>
+</p>
+<p>
+This level of autodetection is enough to read the XML encoding
+declaration and parse the character-encoding identifier, which is
+still necessary to distinguish the individual members of each family
+of encodings (e.g. to tell  UTF-8 from 8859, and the parts of 8859
+from each other, or to distinguish the specific EBCDIC code page in
+use, and so on).
+</p>
+<p>
+Because the contents of the encoding declaration are restricted to
+ASCII characters, a processor can reliably read the entire encoding
+declaration as soon as it has detected which family of encodings is in
+use.  Since in practice, all widely used character encodings fall into
+one of the categories above, the XML encoding declaration allows
+reasonably reliable in-band labeling of character encodings, even when
+external sources of information at the operating-system or
+transport-protocol level are unreliable.
+</p>
+<p>
+Once the processor has detected the character encoding in use, it can
+act appropriately, whether by invoking a separate input routine for
+each case, or by calling the proper conversion function on each
+character of input. 
+</p>
+<p>
+Like any self-labeling system, the XML encoding declaration will not
+work if any software changes the entity's character set or encoding
+without updating the encoding declaration.  Implementors of
+character-encoding routines should be careful to ensure the accuracy
+of the internal and external information used to label the entity.
+</p>
+<p>The second possible case occurs when the XML entity is accompanied
+by encoding information, as in some file systems and some network
+protocols.
+When multiple sources of information are available,
+
+their relative
+priority and the preferred method of handling conflict should be
+specified as part of the higher-level protocol used to deliver XML.
+Rules for the relative priority of the internal label and the
+MIME-type label in an external header, for example, should be part of the
+RFC document defining the text/xml and application/xml MIME types. In
+the interests of interoperability, however, the following rules
+are recommended.
+<ulist>
+<item><p>If an XML entity is in a file, the Byte-Order Mark
+and encoding-declaration PI are used (if present) to determine the
+character encoding.  All other heuristics and sources of information
+are solely for error recovery.
+</p></item>
+<item><p>If an XML entity is delivered with a
+MIME type of text/xml, then the <code>charset</code> parameter
+on the MIME type determines the
+character encoding method; all other heuristics and sources of
+information are solely for error recovery.
+</p></item>
+<item><p>If an XML entity is delivered 
+with a
+MIME type of application/xml, then the Byte-Order Mark and
+encoding-declaration PI are used (if present) to determine the
+character encoding.  All other heuristics and sources of
+information are solely for error recovery.
+</p></item>
+</ulist>
+These rules apply only in the absence of protocol-level documentation;
+in particular, when the MIME types text/xml and application/xml are
+defined, the recommendations of the relevant RFC will supersede
+these rules.
+</p>
+
+</inform-div1>
+
+<inform-div1 id="sec-xml-wg">
+<head>W3C XML Working Group</head>
+<p>This specification was prepared and approved for publication by the
+W3C XML Working Group (WG).  WG approval of this specification does
+not necessarily imply that all WG members voted for its approval.  
+The current and former members of the XML WG are:</p>
+<orglist>
+<member><name>Jon Bosak, Sun</name><role>Chair</role></member>
+<member><name>James Clark</name><role>Technical Lead</role></member>
+<member><name>Tim Bray, Textuality and Netscape</name><role>XML Co-editor</role></member>
+<member><name>Jean Paoli, Microsoft</name><role>XML Co-editor</role></member>
+<member><name>C. M. Sperberg-McQueen, U. of Ill.</name><role>XML
+Co-editor</role></member>
+<member><name>Dan Connolly, W3C</name><role>W3C Liaison</role></member>
+<member><name>Paula Angerstein, Texcel</name></member>
+<member><name>Steve DeRose, INSO</name></member>
+<member><name>Dave Hollander, HP</name></member>
+<member><name>Eliot Kimber, ISOGEN</name></member>
+<member><name>Eve Maler, ArborText</name></member>
+<member><name>Tom Magliery, NCSA</name></member>
+<member><name>Murray Maloney, Muzmo and Grif</name></member>
+<member><name>Makoto Murata, Fuji Xerox Information Systems</name></member>
+<member><name>Joel Nava, Adobe</name></member>
+<member><name>Conleth O'Connell, Vignette</name></member>
+<member><name>Peter Sharpe, SoftQuad</name></member>
+<member><name>John Tigue, DataChannel</name></member>
+</orglist>
+
+</inform-div1>
+</back>
+</spec>
+<!-- Keep this comment at the end of the file
+Local variables:
+mode: sgml
+sgml-default-dtd-file:"~/sgml/spec.ced"
+sgml-omittag:t
+sgml-shorttag:t
+End:
+-->
diff --git a/TC/testcase/res/UTsXml/valid/UTF16Entity.xml b/TC/testcase/res/UTsXml/valid/UTF16Entity.xml
new file mode 100755 (executable)
index 0000000..9dd4b96
--- /dev/null
@@ -0,0 +1,8 @@
+<!DOCTYPE foo [\r
+<!ELEMENT foo (root*)>\r
+<!ELEMENT root EMPTY>\r
+<!ENTITY utf16b SYSTEM "dtds/utf16b.ent">\r
+<!ENTITY utf16l SYSTEM "dtds/utf16l.ent">\r
+]>\r
+\r
+<foo> &utf16b; &utf16l; </foo>\r
diff --git a/TC/testcase/res/UTsXml/valid/attrib.xml b/TC/testcase/res/UTsXml/valid/attrib.xml
new file mode 100755 (executable)
index 0000000..aad5eef
--- /dev/null
@@ -0,0 +1 @@
+<item title="Icrontic.com - Warning: Breakdancing midget with tourette&apos;s syndrome on-board&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;" url="http://www.icrontic.com/" first_time="985034339" last_time="985034339" visits="1"/>\r
diff --git a/TC/testcase/res/UTsXml/valid/ent1 b/TC/testcase/res/UTsXml/valid/ent1
new file mode 100755 (executable)
index 0000000..700da00
--- /dev/null
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>\r
+<!DOCTYPE EXAMPLE SYSTEM "example.dtd" [\r
+<!ENTITY xml "Extensible Markup Language">\r
+]>\r
+<EXAMPLE>\r
+    &xml;\r
+</EXAMPLE>\r
diff --git a/TC/testcase/res/UTsXml/valid/ent2 b/TC/testcase/res/UTsXml/valid/ent2
new file mode 100755 (executable)
index 0000000..5b54032
--- /dev/null
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>\r
+<!DOCTYPE EXAMPLE SYSTEM "example.dtd" [\r
+<!ENTITY xml "Extensible Markup Language">\r
+<!ENTITY title PUBLIC "-//MY-TITLE//FR" "title.xml">\r
+<!ENTITY image SYSTEM "img.gif" NDATA GIF>\r
+]>\r
+<foo:root xmlns:foo="http://www.w3.org/TR/html4/" >\r
+<foo:table>\r
+  <foo:tr>\r
+    <foo:td>Apples</foo:td>\r
+    <foo:td>Bananas</foo:td>\r
+  </foo:tr>\r
+</foo:table>\r
+\r
+<foo:table>\r
+  <foo:name>African Coffee Table</foo:name>\r
+  <foo:width>80</foo:width>\r
+  <foo:length>120</foo:length>\r
+</foo:table>\r
+</foo:root> \r
+\r
+\r
diff --git a/TC/testcase/res/UTsXml/valid/schema.xml b/TC/testcase/res/UTsXml/valid/schema.xml
new file mode 100755 (executable)
index 0000000..cf65d56
--- /dev/null
@@ -0,0 +1,54 @@
+<datebook id="datebook-schema-00011520" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="c:\Publishing\Sonic\datebook1.xsd"> 
+   <schedule id="datebook-schema-00011521">
+   <track>Technical</track>
+   <description>This describes the technical track of the seminar.</description>
+   <event id="datebook-schema-00011522">
+      <title>Introducing XML</title>
+      <description>This is the introductory session for the seminar.</description>
+      <speaker> 
+         <name>Kurt Cagle</name>
+         <email>kurt@kurtcagle.net</email>
+         <description>Kurt Cagle is an author specializing in XML technologies</description> 
+         <link>http://www.metaphoricalweb.com</link>
+      </speaker>
+      <scheduledTime>
+      <dateTime>2003-01-20T09:00:00</dateTime>
+         <duration>PT3H</duration>
+      </scheduledTime>
+      <address>
+         <room>Ranier (Room 25)</room>
+         <building>C</building>
+      </address>
+   </event>
+   <event id="datebook-schema-00011523">
+      <title>Lunch</title>
+      <description>This is a working lunch.</description>
+      <scheduledTime>
+      <dateTime>2003-01-20T12:00:00</dateTime>
+         <duration>PT1H</duration>
+      </scheduledTime>
+      <address>
+         <room>Main Ballroom</room>
+         <building>C</building>
+      </address>
+   </event>
+   <event id="datebook-schema-00011524">
+      <title>Working with XSLT</title>
+      <description>This session deals with XSLT</description>
+      <speaker>
+         <name>Ellison Dean</name>
+         <email>Ellison@sonic.com</email>
+         <description>Ellison is an author specializing in XSLT technologies</description>
+         <link>http://www.stylusstudio.com</link>
+      </speaker>
+      <scheduledTime>
+      <dateTime>2003-01-20T13:00:00</dateTime>
+         <duration>PT3H</duration>
+      </scheduledTime>
+      <address>
+         <room>Ranier (Room 25)</room>
+         <building>C</building>
+      </address>
+   </event>
+   </schedule>
+</datebook>
diff --git a/TC/testcase/res/UTsXml/valid/schema.xsd b/TC/testcase/res/UTsXml/valid/schema.xsd
new file mode 100755 (executable)
index 0000000..eeebe94
--- /dev/null
@@ -0,0 +1,73 @@
+<xsd:schema  xmlns:xsd="http://www.w3.org/2001/XMLSchema"  >  
+ <xsd:element  name="track"  type="xsd:string"/>  
+ <xsd:element  name="title"  type="xsd:string"/>  
+ <xsd:element  name="name"  type="xsd:string"/>  
+ <xsd:element  name="email"  type="xsd:string"/>  
+ <xsd:element  name="description"  type="xsd:string"/>  
+ <xsd:element  name="link"  type="xsd:string"/>  
+ <xsd:element  name="speaker">  
+   <xsd:complexType>  
+     <xsd:sequence>  
+       <xsd:element  ref="name"/>  
+       <xsd:element  ref="email"/>  
+       <xsd:element  ref="description"/>  
+       <xsd:element  ref="link"/>  
+     </xsd:sequence>  
+   </xsd:complexType>  
+ </xsd:element>  
+ <xsd:element  name="dateTime"  type="xsd:string"/>  
+ <xsd:element  name="duration"  type="xsd:string"/>  
+ <xsd:element  name="scheduledTime">  
+   <xsd:complexType>  
+     <xsd:sequence>  
+       <xsd:element  ref="dateTime"/>  
+       <xsd:element  ref="duration"/>  
+     </xsd:sequence>  
+   </xsd:complexType>  
+ </xsd:element>  
+ <xsd:element  name="room"  type="xsd:string"/>  
+ <xsd:element  name="building"  type="xsd:string"/>  
+ <xsd:element  name="address">  
+   <xsd:complexType>  
+     <xsd:sequence>  
+       <xsd:element  ref="room"/>  
+       <xsd:element  ref="building"/>  
+     </xsd:sequence>  
+   </xsd:complexType>  
+ </xsd:element>  
+ <xsd:element  name="event">  
+   <xsd:complexType>  
+     <xsd:sequence>  
+       <xsd:element  ref="title"/>  
+       <xsd:element  ref="description"/>  
+       <xsd:sequence  minOccurs="0"  maxOccurs="1">  
+         <xsd:element  ref="speaker"/>  
+       </xsd:sequence>  
+       <xsd:element  ref="scheduledTime"/>  
+       <xsd:element  ref="address"/>  
+     </xsd:sequence>  
+     <xsd:attribute  name="id"  type="xsd:ID"  use="required"/>  
+   </xsd:complexType>  
+ </xsd:element>  
+ <xsd:element  name="schedule">  
+   <xsd:complexType>  
+     <xsd:sequence>  
+       <xsd:element  ref="track"/>  
+       <xsd:element  ref="description"/>  
+       <xsd:sequence  maxOccurs="unbounded">  
+         <xsd:element  ref="event"/>  
+       </xsd:sequence>  
+     </xsd:sequence>  
+     <xsd:attribute  name="id"  type="xsd:ID"  use="required"/>  
+   </xsd:complexType>  
+ </xsd:element>  
+ <xsd:element  name="datebook">  
+   <xsd:complexType>  
+     <xsd:sequence>  
+       <xsd:element  ref="schedule"/>  
+     </xsd:sequence>  
+     <xsd:attribute  name="id"  type="xsd:ID"  use="required"/>  
+   </xsd:complexType>  
+ </xsd:element>  
+</xsd:schema>
+
diff --git a/TC/testcase/res/UTsXml/valid/test.xml b/TC/testcase/res/UTsXml/valid/test.xml
new file mode 100755 (executable)
index 0000000..3ca58b4
--- /dev/null
@@ -0,0 +1,3 @@
+<?xml version ="1.0"?>\r
+<html>\r
+</html>
\ No newline at end of file
diff --git a/TC/testcase/res/UTsXml/valid/title.xml b/TC/testcase/res/UTsXml/valid/title.xml
new file mode 100755 (executable)
index 0000000..85b35c2
--- /dev/null
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<title>my title</title>\r
diff --git a/TC/testcase/res/UTsXml/valid/xhtml1-strict.dtd b/TC/testcase/res/UTsXml/valid/xhtml1-strict.dtd
new file mode 100755 (executable)
index 0000000..20abd1d
--- /dev/null
@@ -0,0 +1,986 @@
+<!--\r
+   Extensible HTML version 1.0 Strict DTD\r
+\r
+   This is the same as HTML 4.0 Strict except for\r
+   changes due to the differences between XML and SGML.\r
+\r
+   Namespace = http://www.w3.org/1999/xhtml\r
+\r
+   For further information, see: http://www.w3.org/TR/xhtml1\r
+\r
+   Copyright (c) 1998-1999 W3C (MIT, INRIA, Keio),\r
+   All Rights Reserved. \r
+\r
+   This DTD module is identified by the PUBLIC and SYSTEM identifiers:\r
+\r
+   PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"\r
+   SYSTEM "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"\r
+\r
+\r
+-->\r
+\r
+<!--================ Character mnemonic entities =========================-->\r
+\r
+<!ENTITY % HTMLlat1 PUBLIC\r
+   "-//W3C//ENTITIES Latin 1 for XHTML//EN"\r
+   "xhtml-lat1.ent">\r
+%HTMLlat1;\r
+\r
+<!ENTITY % HTMLsymbol PUBLIC\r
+   "-//W3C//ENTITIES Symbols for XHTML//EN"\r
+   "xhtml-symbol.ent">\r
+%HTMLsymbol;\r
+\r
+<!ENTITY % HTMLspecial PUBLIC\r
+   "-//W3C//ENTITIES Special for XHTML//EN"\r
+   "xhtml-special.ent">\r
+%HTMLspecial;\r
+\r
+<!--================== Imported Names ====================================-->\r
+\r
+<!ENTITY % ContentType "CDATA">\r
+    <!-- media type, as per [RFC2045] -->\r
+\r
+<!ENTITY % ContentTypes "CDATA">\r
+    <!-- comma-separated list of media types, as per [RFC2045] -->\r
+\r
+<!ENTITY % Charset "CDATA">\r
+    <!-- a character encoding, as per [RFC2045] -->\r
+\r
+<!ENTITY % Charsets "CDATA">\r
+    <!-- a space separated list of character encodings, as per [RFC2045] -->\r
+\r
+<!ENTITY % LanguageCode "NMTOKEN">\r
+    <!-- a language code, as per [RFC1766] -->\r
+\r
+<!ENTITY % Character "CDATA">\r
+    <!-- a single character from [ISO10646] -->\r
+\r
+<!ENTITY % Number "CDATA">\r
+    <!-- one or more digits -->\r
+\r
+<!ENTITY % LinkTypes "CDATA">\r
+    <!-- space-separated list of link types -->\r
+\r
+<!ENTITY % MediaDesc "CDATA">\r
+    <!-- single or comma-separated list of media descriptors -->\r
+\r
+<!ENTITY % URI "CDATA">\r
+    <!-- a Uniform Resource Identifier, see [RFC2396] -->\r
+\r
+<!ENTITY % UriList "CDATA">\r
+    <!-- a space separated list of Uniform Resource Identifiers -->\r
+\r
+<!ENTITY % Datetime "CDATA">\r
+    <!-- date and time information. ISO date format -->\r
+\r
+<!ENTITY % Script "CDATA">\r
+    <!-- script expression -->\r
+\r
+<!ENTITY % StyleSheet "CDATA">\r
+    <!-- style sheet data -->\r
+\r
+<!ENTITY % Text "CDATA">\r
+    <!-- used for titles etc. -->\r
+\r
+<!ENTITY % FrameTarget "NMTOKEN">\r
+    <!-- render in this frame -->\r
+\r
+<!ENTITY % Length "CDATA">\r
+    <!-- nn for pixels or nn% for percentage length -->\r
+\r
+<!ENTITY % MultiLength "CDATA">\r
+    <!-- pixel, percentage, or relative -->\r
+\r
+<!ENTITY % MultiLengths "CDATA">\r
+    <!-- comma-separated list of MultiLength -->\r
+\r
+<!ENTITY % Pixels "CDATA">\r
+    <!-- integer representing length in pixels -->\r
+\r
+<!-- these are used for image maps -->\r
+\r
+<!ENTITY % Shape "(rect|circle|poly|default)">\r
+\r
+<!ENTITY % Coords "CDATA">\r
+    <!-- comma separated list of lengths -->\r
+\r
+<!--=================== Generic Attributes ===============================-->\r
+\r
+<!-- core attributes common to most elements\r
+  id       document-wide unique id\r
+  class    space separated list of classes\r
+  style    associated style info\r
+  title    advisory title/amplification\r
+-->\r
+<!ENTITY % coreattrs\r
+ "id          ID             #IMPLIED\r
+  class       CDATA          #IMPLIED\r
+  style       %StyleSheet;   #IMPLIED\r
+  title       %Text;         #IMPLIED"\r
+  >\r
+\r
+<!-- internationalization attributes\r
+  lang        language code (backwards compatible)\r
+  xml:lang    language code (as per XML 1.0 spec)\r
+  dir         direction for weak/neutral text\r
+-->\r
+<!ENTITY % i18n\r
+ "lang        %LanguageCode; #IMPLIED\r
+  xml:lang    %LanguageCode; #IMPLIED\r
+  dir         (ltr|rtl)      #IMPLIED"\r
+  >\r
+\r
+<!-- attributes for common UI events\r
+  onclick     a pointer button was clicked\r
+  ondblclick  a pointer button was double clicked\r
+  onmousedown a pointer button was pressed down\r
+  onmouseup   a pointer button was released\r
+  onmousemove a pointer was moved onto the element\r
+  onmouseout  a pointer was moved away from the element\r
+  onkeypress  a key was pressed and released\r
+  onkeydown   a key was pressed down\r
+  onkeyup     a key was released\r
+-->\r
+<!ENTITY % events\r
+ "onclick     %Script;       #IMPLIED\r
+  ondblclick  %Script;       #IMPLIED\r
+  onmousedown %Script;       #IMPLIED\r
+  onmouseup   %Script;       #IMPLIED\r
+  onmouseover %Script;       #IMPLIED\r
+  onmousemove %Script;       #IMPLIED\r
+  onmouseout  %Script;       #IMPLIED\r
+  onkeypress  %Script;       #IMPLIED\r
+  onkeydown   %Script;       #IMPLIED\r
+  onkeyup     %Script;       #IMPLIED"\r
+  >\r
+\r
+<!-- attributes for elements that can get the focus\r
+  accesskey   accessibility key character\r
+  tabindex    position in tabbing order\r
+  onfocus     the element got the focus\r
+  onblur      the element lost the focus\r
+-->\r
+<!ENTITY % focus\r
+ "accesskey   %Character;    #IMPLIED\r
+  tabindex    %Number;       #IMPLIED\r
+  onfocus     %Script;       #IMPLIED\r
+  onblur      %Script;       #IMPLIED"\r
+  >\r
+\r
+<!ENTITY % attrs "%coreattrs; %i18n; %events;">\r
+\r
+<!--=================== Text Elements ====================================-->\r
+\r
+<!ENTITY % special\r
+   "br | span | bdo | object | img | map">\r
+\r
+<!ENTITY % fontstyle "tt | i | b | big | small">\r
+\r
+<!ENTITY % phrase "em | strong | dfn | code | q | sub | sup |\r
+                   samp | kbd | var | cite | abbr | acronym">\r
+\r
+<!ENTITY % inline.forms "input | select | textarea | label | button">\r
+\r
+<!-- these can occur at block or inline level -->\r
+<!ENTITY % misc "ins | del | script | noscript">\r
+\r
+<!ENTITY % inline "a | %special; | %fontstyle; | %phrase; | %inline.forms;">\r
+\r
+<!-- %Inline; covers inline or "text-level" elements -->\r
+<!ENTITY % Inline "(#PCDATA | %inline; | %misc;)*">\r
+\r
+<!--================== Block level elements ==============================-->\r
+\r
+<!ENTITY % heading "h1|h2|h3|h4|h5|h6">\r
+<!ENTITY % lists "ul | ol | dl">\r
+<!ENTITY % blocktext "pre | hr | blockquote | address">\r
+\r
+<!ENTITY % block\r
+     "p | %heading; | div | %lists; | %blocktext; | fieldset | table">\r
+\r
+<!ENTITY % Block "(%block; | form | %misc;)*">\r
+\r
+<!-- %Flow; mixes Block and Inline and is used for list items etc. -->\r
+<!ENTITY % Flow "(#PCDATA | %block; | form | %inline; | %misc;)*">\r
+\r
+<!--================== Content models for exclusions =====================-->\r
+\r
+<!-- a elements use %Inline; excluding a -->\r
+\r
+<!ENTITY % a.content\r
+   "(#PCDATA | %special; | %fontstyle; | %phrase; | %inline.forms; | %misc;)*">\r
+\r
+<!-- pre uses %Inline excluding img, object, big, small, sup or sup -->\r
+\r
+<!ENTITY % pre.content\r
+   "(#PCDATA | a | br | span | bdo | map | tt | i | b |\r
+      %phrase; | %inline.forms;)*">\r
+\r
+<!-- form uses %Block; excluding form -->\r
+\r
+<!ENTITY % form.content "(%block; | %misc;)*">\r
+\r
+<!-- button uses %Flow; but excludes a, form and form controls -->\r
+\r
+<!ENTITY % button.content\r
+   "(#PCDATA | p | %heading; | div | %lists; | %blocktext; |\r
+    table | %special; | %fontstyle; | %phrase; | %misc;)*">\r
+\r
+<!--================ Document Structure ==================================-->\r
+\r
+<!-- the namespace URI designates the document profile -->\r
+\r
+<!ELEMENT html (head, body)>\r
+<!ATTLIST html\r
+  %i18n;\r
+  xmlns       %URI;          #FIXED 'http://www.w3.org/1999/xhtml'\r
+  >\r
+\r
+<!--================ Document Head =======================================-->\r
+\r
+<!ENTITY % head.misc "(script|style|meta|link|object)*">\r
+\r
+<!-- content model is %head.misc; combined with a single\r
+     title and an optional base element in any order -->\r
+\r
+<!ELEMENT head (%head.misc;,\r
+     ((title, %head.misc;, (base, %head.misc;)?) |\r
+      (base, %head.misc;, (title, %head.misc;))))>\r
+\r
+<!ATTLIST head\r
+  %i18n;\r
+  profile     %URI;          #IMPLIED\r
+  >\r
+\r
+<!-- The title element is not considered part of the flow of text.\r
+       It should be displayed, for example as the page header or\r
+       window title. Exactly one title is required per document.\r
+    -->\r
+<!ELEMENT title (#PCDATA)>\r
+<!ATTLIST title %i18n;>\r
+\r
+<!-- document base URI -->\r
+\r
+<!ELEMENT base EMPTY>\r
+<!ATTLIST base\r
+  href        %URI;          #IMPLIED\r
+  >\r
+\r
+<!-- generic metainformation -->\r
+<!ELEMENT meta EMPTY>\r
+<!ATTLIST meta\r
+  %i18n;\r
+  http-equiv  CDATA          #IMPLIED\r
+  name        CDATA          #IMPLIED\r
+  content     CDATA          #REQUIRED\r
+  scheme      CDATA          #IMPLIED\r
+  >\r
+\r
+<!--\r
+  Relationship values can be used in principle:\r
+\r
+   a) for document specific toolbars/menus when used\r
+      with the link element in document head e.g.\r
+        start, contents, previous, next, index, end, help\r
+   b) to link to a separate style sheet (rel="stylesheet")\r
+   c) to make a link to a script (rel="script")\r
+   d) by stylesheets to control how collections of\r
+      html nodes are rendered into printed documents\r
+   e) to make a link to a printable version of this document\r
+      e.g. a PostScript or PDF version (rel="alternate" media="print")\r
+-->\r
+\r
+<!ELEMENT link EMPTY>\r
+<!ATTLIST link\r
+  %attrs;\r
+  charset     %Charset;      #IMPLIED\r
+  href        %URI;          #IMPLIED\r
+  hreflang    %LanguageCode; #IMPLIED\r
+  type        %ContentType;  #IMPLIED\r
+  rel         %LinkTypes;    #IMPLIED\r
+  rev         %LinkTypes;    #IMPLIED\r
+  media       %MediaDesc;    #IMPLIED\r
+  >\r
+\r
+<!-- style info, which may include CDATA sections -->\r
+<!ELEMENT style (#PCDATA)>\r
+<!ATTLIST style\r
+  %i18n;\r
+  type        %ContentType;  #REQUIRED\r
+  media       %MediaDesc;    #IMPLIED\r
+  title       %Text;         #IMPLIED\r
+  xml:space   (preserve)     #FIXED 'preserve'\r
+  >\r
+\r
+<!-- script statements, which may include CDATA sections -->\r
+<!ELEMENT script (#PCDATA)>\r
+<!ATTLIST script\r
+  charset     %Charset;      #IMPLIED\r
+  type        %ContentType;  #REQUIRED\r
+  src         %URI;          #IMPLIED\r
+  defer       (defer)        #IMPLIED\r
+  xml:space   (preserve)     #FIXED 'preserve'\r
+  >\r
+\r
+<!-- alternate content container for non script-based rendering -->\r
+\r
+<!ELEMENT noscript %Block;>\r
+<!ATTLIST noscript\r
+  %attrs;\r
+  >\r
+\r
+<!--=================== Document Body ====================================-->\r
+\r
+<!ELEMENT body %Block;>\r
+<!ATTLIST body\r
+  %attrs;\r
+  onload          %Script;   #IMPLIED\r
+  onunload        %Script;   #IMPLIED\r
+  >\r
+\r
+<!ELEMENT div %Flow;>  <!-- generic language/style container -->\r
+<!ATTLIST div\r
+  %attrs;\r
+  >\r
+\r
+<!--=================== Paragraphs =======================================-->\r
+\r
+<!ELEMENT p %Inline;>\r
+<!ATTLIST p\r
+  %attrs;\r
+  >\r
+\r
+<!--=================== Headings =========================================-->\r
+\r
+<!--\r
+  There are six levels of headings from h1 (the most important)\r
+  to h6 (the least important).\r
+-->\r
+\r
+<!ELEMENT h1  %Inline;>\r
+<!ATTLIST h1\r
+   %attrs;\r
+   >\r
+\r
+<!ELEMENT h2 %Inline;>\r
+<!ATTLIST h2\r
+   %attrs;\r
+   >\r
+\r
+<!ELEMENT h3 %Inline;>\r
+<!ATTLIST h3\r
+   %attrs;\r
+   >\r
+\r
+<!ELEMENT h4 %Inline;>\r
+<!ATTLIST h4\r
+   %attrs;\r
+   >\r
+\r
+<!ELEMENT h5 %Inline;>\r
+<!ATTLIST h5\r
+   %attrs;\r
+   >\r
+\r
+<!ELEMENT h6 %Inline;>\r
+<!ATTLIST h6\r
+   %attrs;\r
+   >\r
+\r
+<!--=================== Lists ============================================-->\r
+\r
+<!-- Unordered list -->\r
+\r
+<!ELEMENT ul (li)+>\r
+<!ATTLIST ul\r
+  %attrs;\r
+  >\r
+\r
+<!-- Ordered (numbered) list -->\r
+\r
+<!ELEMENT ol (li)+>\r
+<!ATTLIST ol\r
+  %attrs;\r
+  >\r
+\r
+<!-- list item -->\r
+\r
+<!ELEMENT li %Flow;>\r
+<!ATTLIST li\r
+  %attrs;\r
+  >\r
+\r
+<!-- definition lists - dt for term, dd for its definition -->\r
+\r
+<!ELEMENT dl (dt|dd)+>\r
+<!ATTLIST dl\r
+  %attrs;\r
+  >\r
+\r
+<!ELEMENT dt %Inline;>\r
+<!ATTLIST dt\r
+  %attrs;\r
+  >\r
+\r
+<!ELEMENT dd %Flow;>\r
+<!ATTLIST dd\r
+  %attrs;\r
+  >\r
+\r
+<!--=================== Address ==========================================-->\r
+\r
+<!-- information on author -->\r
+\r
+<!ELEMENT address %Inline;>\r
+<!ATTLIST address\r
+  %attrs;\r
+  >\r
+\r
+<!--=================== Horizontal Rule ==================================-->\r
+\r
+<!ELEMENT hr EMPTY>\r
+<!ATTLIST hr\r
+  %attrs;\r
+  >\r
+\r
+<!--=================== Preformatted Text ================================-->\r
+\r
+<!-- content is %Inline; excluding "img|object|big|small|sub|sup" -->\r
+\r
+<!ELEMENT pre %pre.content;>\r
+<!ATTLIST pre\r
+  %attrs;\r
+  xml:space (preserve) #FIXED 'preserve'\r
+  >\r
+\r
+<!--=================== Block-like Quotes ================================-->\r
+\r
+<!ELEMENT blockquote %Block;>\r
+<!ATTLIST blockquote\r
+  %attrs;\r
+  cite        %URI;          #IMPLIED\r
+  >\r
+\r
+<!--=================== Inserted/Deleted Text ============================-->\r
+\r
+<!--\r
+  ins/del are allowed in block and inline content, but its\r
+  inappropriate to include block content within an ins element\r
+  occurring in inline content.\r
+-->\r
+<!ELEMENT ins %Flow;>\r
+<!ATTLIST ins\r
+  %attrs;\r
+  cite        %URI;          #IMPLIED\r
+  datetime    %Datetime;     #IMPLIED\r
+  >\r
+\r
+<!ELEMENT del %Flow;>\r
+<!ATTLIST del\r
+  %attrs;\r
+  cite        %URI;          #IMPLIED\r
+  datetime    %Datetime;     #IMPLIED\r
+  >\r
+\r
+<!--================== The Anchor Element ================================-->\r
+\r
+<!-- content is %Inline; except that anchors shouldn't be nested -->\r
+\r
+<!ELEMENT a %a.content;>\r
+<!ATTLIST a\r
+  %attrs;\r
+  charset     %Charset;      #IMPLIED\r
+  type        %ContentType;  #IMPLIED\r
+  name        NMTOKEN        #IMPLIED\r
+  href        %URI;          #IMPLIED\r
+  hreflang    %LanguageCode; #IMPLIED\r
+  rel         %LinkTypes;    #IMPLIED\r
+  rev         %LinkTypes;    #IMPLIED\r
+  accesskey   %Character;    #IMPLIED\r
+  shape       %Shape;        "rect"\r
+  coords      %Coords;       #IMPLIED\r
+  tabindex    %Number;       #IMPLIED\r
+  onfocus     %Script;       #IMPLIED\r
+  onblur      %Script;       #IMPLIED\r
+  >\r
+\r
+<!--===================== Inline Elements ================================-->\r
+\r
+<!ELEMENT span %Inline;> <!-- generic language/style container -->\r
+<!ATTLIST span\r
+  %attrs;\r
+  >\r
+\r
+<!ELEMENT bdo %Inline;>  <!-- I18N BiDi over-ride -->\r
+<!ATTLIST bdo\r
+  %coreattrs;\r
+  %events;\r
+  lang        %LanguageCode; #IMPLIED\r
+  xml:lang    %LanguageCode; #IMPLIED\r
+  dir         (ltr|rtl)      #REQUIRED\r
+  >\r
+\r
+<!ELEMENT br EMPTY>   <!-- forced line break -->\r
+<!ATTLIST br\r
+  %coreattrs;\r
+  >\r
+\r
+<!ELEMENT em %Inline;>   <!-- emphasis -->\r
+<!ATTLIST em %attrs;>\r
+\r
+<!ELEMENT strong %Inline;>   <!-- strong emphasis -->\r
+<!ATTLIST strong %attrs;>\r
+\r
+<!ELEMENT dfn %Inline;>   <!-- definitional -->\r
+<!ATTLIST dfn %attrs;>\r
+\r
+<!ELEMENT code %Inline;>   <!-- program code -->\r
+<!ATTLIST code %attrs;>\r
+\r
+<!ELEMENT samp %Inline;>   <!-- sample -->\r
+<!ATTLIST samp %attrs;>\r
+\r
+<!ELEMENT kbd %Inline;>  <!-- something user would type -->\r
+<!ATTLIST kbd %attrs;>\r
+\r
+<!ELEMENT var %Inline;>   <!-- variable -->\r
+<!ATTLIST var %attrs;>\r
+\r
+<!ELEMENT cite %Inline;>   <!-- citation -->\r
+<!ATTLIST cite %attrs;>\r
+\r
+<!ELEMENT abbr %Inline;>   <!-- abbreviation -->\r
+<!ATTLIST abbr %attrs;>\r
+\r
+<!ELEMENT acronym %Inline;>   <!-- acronym -->\r
+<!ATTLIST acronym %attrs;>\r
+\r
+<!ELEMENT q %Inline;>   <!-- inlined quote -->\r
+<!ATTLIST q\r
+  %attrs;\r
+  cite        %URI;          #IMPLIED\r
+  >\r
+\r
+<!ELEMENT sub %Inline;> <!-- subscript -->\r
+<!ATTLIST sub %attrs;>\r
+\r
+<!ELEMENT sup %Inline;> <!-- superscript -->\r
+<!ATTLIST sup %attrs;>\r
+\r
+<!ELEMENT tt %Inline;>   <!-- fixed pitch font -->\r
+<!ATTLIST tt %attrs;>\r
+\r
+<!ELEMENT i %Inline;>   <!-- italic font -->\r
+<!ATTLIST i %attrs;>\r
+\r
+<!ELEMENT b %Inline;>   <!-- bold font -->\r
+<!ATTLIST b %attrs;>\r
+\r
+<!ELEMENT big %Inline;>   <!-- bigger font -->\r
+<!ATTLIST big %attrs;>\r
+\r
+<!ELEMENT small %Inline;>   <!-- smaller font -->\r
+<!ATTLIST small %attrs;>\r
+\r
+<!--==================== Object ======================================-->\r
+<!--\r
+  object is used to embed objects as part of HTML pages.\r
+  param elements should precede other content. Parameters\r
+  can also be expressed as attribute/value pairs on the\r
+  object element itself when brevity is desired.\r
+-->\r
+\r
+<!ELEMENT object (#PCDATA | param | %block; | form | %inline; | %misc;)*>\r
+<!ATTLIST object\r
+  %attrs;\r
+  declare     (declare)      #IMPLIED\r
+  classid     %URI;          #IMPLIED\r
+  codebase    %URI;          #IMPLIED\r
+  data        %URI;          #IMPLIED\r
+  type        %ContentType;  #IMPLIED\r
+  codetype    %ContentType;  #IMPLIED\r
+  archive     %UriList;      #IMPLIED\r
+  standby     %Text;         #IMPLIED\r
+  height      %Length;       #IMPLIED\r
+  width       %Length;       #IMPLIED\r
+  usemap      %URI;          #IMPLIED\r
+  name        NMTOKEN        #IMPLIED\r
+  tabindex    %Number;       #IMPLIED\r
+  >\r
+\r
+<!--\r
+  param is used to supply a named property value.\r
+  In XML it would seem natural to follow RDF and support an\r
+  abbreviated syntax where the param elements are replaced\r
+  by attribute value pairs on the object start tag.\r
+-->\r
+<!ELEMENT param EMPTY>\r
+<!ATTLIST param\r
+  id          ID             #IMPLIED\r
+  name        CDATA          #IMPLIED\r
+  value       CDATA          #IMPLIED\r
+  valuetype   (data|ref|object) "data"\r
+  type        %ContentType;  #IMPLIED\r
+  >\r
+\r
+<!--=================== Images ===========================================-->\r
+\r
+<!--\r
+   To avoid accessibility problems for people who aren't\r
+   able to see the image, you should provide a text\r
+   description using the alt and longdesc attributes.\r
+   In addition, avoid the use of server-side image maps.\r
+   Note that in this DTD there is no name attribute. That\r
+   is only available in the transitional and frameset DTD.\r
+-->\r
+\r
+<!ELEMENT img EMPTY>\r
+<!ATTLIST img\r
+  %attrs;\r
+  src         %URI;          #REQUIRED\r
+  alt         %Text;         #REQUIRED\r
+  longdesc    %URI;          #IMPLIED\r
+  height      %Length;       #IMPLIED\r
+  width       %Length;       #IMPLIED\r
+  usemap      %URI;          #IMPLIED\r
+  ismap       (ismap)        #IMPLIED\r
+  >\r
+\r
+<!-- usemap points to a map element which may be in this document\r
+  or an external document, although the latter is not widely supported -->\r
+\r
+<!--================== Client-side image maps ============================-->\r
+\r
+<!-- These can be placed in the same document or grouped in a\r
+     separate document although this isn't yet widely supported -->\r
+\r
+<!ELEMENT map ((%block; | form | %misc;)+ | area+)>\r
+<!ATTLIST map\r
+  %i18n;\r
+  %events;\r
+  id          ID             #REQUIRED\r
+  class       CDATA          #IMPLIED\r
+  style       %StyleSheet;   #IMPLIED\r
+  title       %Text;         #IMPLIED\r
+  name        NMTOKEN        #IMPLIED\r
+  >\r
+\r
+<!ELEMENT area EMPTY>\r
+<!ATTLIST area\r
+  %attrs;\r
+  shape       %Shape;        "rect"\r
+  coords      %Coords;       #IMPLIED\r
+  href        %URI;          #IMPLIED\r
+  nohref      (nohref)       #IMPLIED\r
+  alt         %Text;         #REQUIRED\r
+  tabindex    %Number;       #IMPLIED\r
+  accesskey   %Character;    #IMPLIED\r
+  onfocus     %Script;       #IMPLIED\r
+  onblur      %Script;       #IMPLIED\r
+  >\r
+\r
+<!--================ Forms ===============================================-->\r
+<!ELEMENT form %form.content;>   <!-- forms shouldn't be nested -->\r
+\r
+<!ATTLIST form\r
+  %attrs;\r
+  action      %URI;          #REQUIRED\r
+  method      (get|post)     "get"\r
+  enctype     %ContentType;  "application/x-www-form-urlencoded"\r
+  onsubmit    %Script;       #IMPLIED\r
+  onreset     %Script;       #IMPLIED\r
+  accept      %ContentTypes; #IMPLIED\r
+  accept-charset %Charsets;  #IMPLIED\r
+  >\r
+\r
+<!--\r
+  Each label must not contain more than ONE field\r
+  Label elements shouldn't be nested.\r
+-->\r
+<!ELEMENT label %Inline;>\r
+<!ATTLIST label\r
+  %attrs;\r
+  for         IDREF          #IMPLIED\r
+  accesskey   %Character;    #IMPLIED\r
+  onfocus     %Script;       #IMPLIED\r
+  onblur      %Script;       #IMPLIED\r
+  >\r
+\r
+<!ENTITY % InputType\r
+  "(text | password | checkbox |\r
+    radio | submit | reset |\r
+    file | hidden | image | button)"\r
+   >\r
+\r
+<!-- the name attribute is required for all but submit & reset -->\r
+\r
+<!ELEMENT input EMPTY>     <!-- form control -->\r
+<!ATTLIST input\r
+  %attrs;\r
+  type        %InputType;    "text"\r
+  name        CDATA          #IMPLIED\r
+  value       CDATA          #IMPLIED\r
+  checked     (checked)      #IMPLIED\r
+  disabled    (disabled)     #IMPLIED\r
+  readonly    (readonly)     #IMPLIED\r
+  size        CDATA          #IMPLIED\r
+  maxlength   %Number;       #IMPLIED\r
+  src         %URI;          #IMPLIED\r
+  alt         CDATA          #IMPLIED\r
+  usemap      %URI;          #IMPLIED\r
+  tabindex    %Number;       #IMPLIED\r
+  accesskey   %Character;    #IMPLIED\r
+  onfocus     %Script;       #IMPLIED\r
+  onblur      %Script;       #IMPLIED\r
+  onselect    %Script;       #IMPLIED\r
+  onchange    %Script;       #IMPLIED\r
+  accept      %ContentTypes; #IMPLIED\r
+  >\r
+\r
+<!ELEMENT select (optgroup|option)+>  <!-- option selector -->\r
+<!ATTLIST select\r
+  %attrs;\r
+  name        CDATA          #IMPLIED\r
+  size        %Number;       #IMPLIED\r
+  multiple    (multiple)     #IMPLIED\r
+  disabled    (disabled)     #IMPLIED\r
+  tabindex    %Number;       #IMPLIED\r
+  onfocus     %Script;       #IMPLIED\r
+  onblur      %Script;       #IMPLIED\r
+  onchange    %Script;       #IMPLIED\r
+  >\r
+\r
+<!ELEMENT optgroup (option)+>   <!-- option group -->\r
+<!ATTLIST optgroup\r
+  %attrs;\r
+  disabled    (disabled)     #IMPLIED\r
+  label       %Text;         #REQUIRED\r
+  >\r
+\r
+<!ELEMENT option (#PCDATA)>     <!-- selectable choice -->\r
+<!ATTLIST option\r
+  %attrs;\r
+  selected    (selected)     #IMPLIED\r
+  disabled    (disabled)     #IMPLIED\r
+  label       %Text;         #IMPLIED\r
+  value       CDATA          #IMPLIED\r
+  >\r
+\r
+<!ELEMENT textarea (#PCDATA)>     <!-- multi-line text field -->\r
+<!ATTLIST textarea\r
+  %attrs;\r
+  name        CDATA          #IMPLIED\r
+  rows        %Number;       #REQUIRED\r
+  cols        %Number;       #REQUIRED\r
+  disabled    (disabled)     #IMPLIED\r
+  readonly    (readonly)     #IMPLIED\r
+  tabindex    %Number;       #IMPLIED\r
+  accesskey   %Character;    #IMPLIED\r
+  onfocus     %Script;       #IMPLIED\r
+  onblur      %Script;       #IMPLIED\r
+  onselect    %Script;       #IMPLIED\r
+  onchange    %Script;       #IMPLIED\r
+  >\r
+\r
+<!--\r
+  The fieldset element is used to group form fields.\r
+  Only one legend element should occur in the content\r
+  and if present should only be preceded by whitespace.\r
+-->\r
+<!ELEMENT fieldset (#PCDATA | legend | %block; | form | %inline; | %misc;)*>\r
+<!ATTLIST fieldset\r
+  %attrs;\r
+  >\r
+\r
+<!ELEMENT legend %Inline;>     <!-- fieldset label -->\r
+<!ATTLIST legend\r
+  %attrs;\r
+  accesskey   %Character;    #IMPLIED\r
+  >\r
+\r
+<!--\r
+ Content is %Flow; excluding a, form and form controls\r
+--> \r
+<!ELEMENT button %button.content;>  <!-- push button -->\r
+<!ATTLIST button\r
+  %attrs;\r
+  name        CDATA          #IMPLIED\r
+  value       CDATA          #IMPLIED\r
+  type        (button|submit|reset) "submit"\r
+  disabled    (disabled)     #IMPLIED\r
+  tabindex    %Number;       #IMPLIED\r
+  accesskey   %Character;    #IMPLIED\r
+  onfocus     %Script;       #IMPLIED\r
+  onblur      %Script;       #IMPLIED\r
+  >\r
+\r
+<!--======================= Tables =======================================-->\r
+\r
+<!-- Derived from IETF HTML table standard, see [RFC1942] -->\r
+\r
+<!--\r
+ The border attribute sets the thickness of the frame around the\r
+ table. The default units are screen pixels.\r
+\r
+ The frame attribute specifies which parts of the frame around\r
+ the table should be rendered. The values are not the same as\r
+ CALS to avoid a name clash with the valign attribute.\r
+-->\r
+<!ENTITY % TFrame "(void|above|below|hsides|lhs|rhs|vsides|box|border)">\r
+\r
+<!--\r
+ The rules attribute defines which rules to draw between cells:\r
+\r
+ If rules is absent then assume:\r
+     "none" if border is absent or border="0" otherwise "all"\r
+-->\r
+\r
+<!ENTITY % TRules "(none | groups | rows | cols | all)">\r
+  \r
+<!-- horizontal placement of table relative to document -->\r
+<!ENTITY % TAlign "(left|center|right)">\r
+\r
+<!-- horizontal alignment attributes for cell contents\r
+\r
+  char        alignment char, e.g. char=':'\r
+  charoff     offset for alignment char\r
+-->\r
+<!ENTITY % cellhalign\r
+  "align      (left|center|right|justify|char) #IMPLIED\r
+   char       %Character;    #IMPLIED\r
+   charoff    %Length;       #IMPLIED"\r
+  >\r
+\r
+<!-- vertical alignment attributes for cell contents -->\r
+<!ENTITY % cellvalign\r
+  "valign     (top|middle|bottom|baseline) #IMPLIED"\r
+  >\r
+\r
+<!ELEMENT table\r
+     (caption?, (col*|colgroup*), thead?, tfoot?, (tbody+|tr+))>\r
+<!ELEMENT caption  %Inline;>\r
+<!ELEMENT thead    (tr)+>\r
+<!ELEMENT tfoot    (tr)+>\r
+<!ELEMENT tbody    (tr)+>\r
+<!ELEMENT colgroup (col)*>\r
+<!ELEMENT col      EMPTY>\r
+<!ELEMENT tr       (th|td)+>\r
+<!ELEMENT th       %Flow;>\r
+<!ELEMENT td       %Flow;>\r
+\r
+<!ATTLIST table\r
+  %attrs;\r
+  summary     %Text;         #IMPLIED\r
+  width       %Length;       #IMPLIED\r
+  border      %Pixels;       #IMPLIED\r
+  frame       %TFrame;       #IMPLIED\r
+  rules       %TRules;       #IMPLIED\r
+  cellspacing %Length;       #IMPLIED\r
+  cellpadding %Length;       #IMPLIED\r
+  >\r
+\r
+<!ENTITY % CAlign "(top|bottom|left|right)">\r
+\r
+<!ATTLIST caption\r
+  %attrs;\r
+  >\r
+\r
+<!--\r
+colgroup groups a set of col elements. It allows you to group\r
+several semantically related columns together.\r
+-->\r
+<!ATTLIST colgroup\r
+  %attrs;\r
+  span        %Number;       "1"\r
+  width       %MultiLength;  #IMPLIED\r
+  %cellhalign;\r
+  %cellvalign;\r
+  >\r
+\r
+<!--\r
+ col elements define the alignment properties for cells in\r
+ one or more columns.\r
+\r
+ The width attribute specifies the width of the columns, e.g.\r
+\r
+     width=64        width in screen pixels\r
+     width=0.5*      relative width of 0.5\r
+\r
+ The span attribute causes the attributes of one\r
+ col element to apply to more than one column.\r
+-->\r
+<!ATTLIST col\r
+  %attrs;\r
+  span        %Number;       "1"\r
+  width       %MultiLength;  #IMPLIED\r
+  %cellhalign;\r
+  %cellvalign;\r
+  >\r
+\r
+<!--\r
+    Use thead to duplicate headers when breaking table\r
+    across page boundaries, or for static headers when\r
+    tbody sections are rendered in scrolling panel.\r
+\r
+    Use tfoot to duplicate footers when breaking table\r
+    across page boundaries, or for static footers when\r
+    tbody sections are rendered in scrolling panel.\r
+\r
+    Use multiple tbody sections when rules are needed\r
+    between groups of table rows.\r
+-->\r
+<!ATTLIST thead\r
+  %attrs;\r
+  %cellhalign;\r
+  %cellvalign;\r
+  >\r
+\r
+<!ATTLIST tfoot\r
+  %attrs;\r
+  %cellhalign;\r
+  %cellvalign;\r
+  >\r
+\r
+<!ATTLIST tbody\r
+  %attrs;\r
+  %cellhalign;\r
+  %cellvalign;\r
+  >\r
+\r
+<!ATTLIST tr\r
+  %attrs;\r
+  %cellhalign;\r
+  %cellvalign;\r
+  >\r
+\r
+\r
+<!-- Scope is simpler than headers attribute for common tables -->\r
+<!ENTITY % Scope "(row|col|rowgroup|colgroup)">\r
+\r
+<!-- th is for headers, td for data and for cells acting as both -->\r
+\r
+<!ATTLIST th\r
+  %attrs;\r
+  abbr        %Text;         #IMPLIED\r
+  axis        CDATA          #IMPLIED\r
+  headers     IDREFS         #IMPLIED\r
+  scope       %Scope;        #IMPLIED\r
+  rowspan     %Number;       "1"\r
+  colspan     %Number;       "1"\r
+  %cellhalign;\r
+  %cellvalign;\r
+  >\r
+\r
+<!ATTLIST td\r
+  %attrs;\r
+  abbr        %Text;         #IMPLIED\r
+  axis        CDATA          #IMPLIED\r
+  headers     IDREFS         #IMPLIED\r
+  scope       %Scope;        #IMPLIED\r
+  rowspan     %Number;       "1"\r
+  colspan     %Number;       "1"\r
+  %cellhalign;\r
+  %cellvalign;\r
+  >\r
+\r
diff --git a/TC/testcase/res/UTsXml/valid/xhtml1.xhtml b/TC/testcase/res/UTsXml/valid/xhtml1.xhtml
new file mode 100755 (executable)
index 0000000..63b3f41
--- /dev/null
@@ -0,0 +1,1505 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "dtds/xhtml1-strict.dtd">\r
+<?xml-stylesheet href="W3C-PR.css" type="text/css"?>\r
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">\r
+<head>\r
+<title>XHTML 1.0: The Extensible HyperText Markup\r
+Language</title>\r
+<link rel="stylesheet"\r
+href="W3C-PR.css" type="text/css" />\r
+<style type="text/css">\r
+span.term { font-style: italic; color: rgb(0, 0, 192) }\r
+code {\r
+       color: green;\r
+       font-family: monospace;\r
+       font-weight: bold;\r
+}\r
+\r
+code.greenmono {\r
+       color: green;\r
+       font-family: monospace;\r
+       font-weight: bold;\r
+}\r
+.good {\r
+       border: solid green;\r
+       border-width: 2px;\r
+       color: green;\r
+       font-weight: bold;\r
+       margin-right: 5%;\r
+       margin-left: 0;\r
+}\r
+.bad  {\r
+       border: solid red;\r
+       border-width: 2px;\r
+       margin-left: 0;\r
+       margin-right: 5%;\r
+       color: rgb(192, 101, 101);\r
+}\r
+\r
+img {\r
+       color: white;\r
+       border: none;\r
+}\r
+\r
+div.navbar { text-align: center; }\r
+div.contents {\r
+       background-color: rgb(204,204,255);\r
+       padding: 0.5em;\r
+       border: none;\r
+       margin-right: 5%;\r
+}\r
+.tocline { list-style: none; }\r
+table.exceptions { background-color: rgb(255,255,153); }\r
+</style>\r
+</head>\r
+<body>\r
+<div class="navbar">\r
+  <a href="#toc">table of contents</a> \r
+  <hr />\r
+</div>\r
+<div class="head"><p><a href="http://www.w3.org/"><img class="head"\r
+src="w3c_home.gif" alt="W3C" /></a></p>\r
+\r
+<h1 class="head"><a name="title" id="title">XHTML</a><sup>&#8482;</sup> 1.0:\r
+The Extensible HyperText Markup Language</h1>\r
+\r
+<h2>A Reformulation of HTML 4.0 in XML 1.0</h2>\r
+\r
+<h3>W3C Proposed Recommendation 10 December 1999</h3>\r
+\r
+<dl>\r
+<dt>This version:</dt>\r
+\r
+<dd><a href=\r
+"http://www.w3.org/TR/1999/PR-xhtml1-19991210">\r
+http://www.w3.org/TR/1999/PR-xhtml1-19991210</a> <br />\r
+(<a href="xhtml1.ps">Postscript version</a>,\r
+<a href="xhtml1.pdf">PDF version</a>,\r
+<a href="xhtml1.zip">ZIP archive</a>, or\r
+<a href="xhtml1.tgz">Gzip'd TAR archive</a>)\r
+</dd>\r
+\r
+<dt>Latest version:</dt>\r
+\r
+<dd><a href="http://www.w3.org/TR/xhtml1">\r
+http://www.w3.org/TR/xhtml1</a></dd>\r
+\r
+<dt>Previous versions:</dt>\r
+\r
+<dd><a href=\r
+"http://www.w3.org/TR/1999/WD-xhtml1-19991124">\r
+http://www.w3.org/TR/1999/WD-xhtml1-19991124</a></dd>\r
+<dd><a href=\r
+"http://www.w3.org/TR/1999/PR-xhtml1-19990824">\r
+http://www.w3.org/TR/1999/PR-xhtml1-19990824</a></dd>\r
+\r
+<dt>Authors:</dt>\r
+\r
+<dd>See <a href="#acks">acknowledgements</a>.</dd>\r
+</dl>\r
+\r
+<p class="copyright"><a href= \r
+"http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">\r
+Copyright</a> &copy; 1999 <a href="http://www.w3.org/">W3C</a><sup>&reg;</sup>\r
+(<a href="http://www.lcs.mit.edu/">MIT</a>, <a href= \r
+"http://www.inria.fr/">INRIA</a>, <a href=\r
+"http://www.keio.ac.jp/">Keio</a>), All Rights Reserved. <abbr\r
+title="World Wide Web Consortium">W3C</abbr> <a\r
+href= \r
+"http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">\r
+liability</a>, <a href= \r
+"http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">\r
+trademark</a>, <a href= \r
+"http://www.w3.org/Consortium/Legal/copyright-documents">document\r
+use</a> and <a href= \r
+"http://www.w3.org/Consortium/Legal/copyright-software">software\r
+licensing</a> rules apply.</p>\r
+<hr />\r
+</div>\r
+\r
+<h2 class="notoc">Abstract</h2>\r
+\r
+<p>This specification defines <abbr title="Extensible Hypertext Markup\r
+Language">XHTML</abbr> 1.0, a reformulation of HTML\r
+4.0 as an XML 1.0 application, and three <abbr title="Document Type\r
+Definition">DTDs</abbr> corresponding to\r
+the ones defined by HTML 4.0. The semantics of the elements and\r
+their attributes are defined in the W3C Recommendation for HTML\r
+4.0. These semantics provide the foundation for future\r
+extensibility of XHTML. Compatibility with existing HTML user\r
+agents is possible by following a small set of guidelines.</p>\r
+\r
+<h2>Status of this document</h2>\r
+\r
+<p><em>This section describes the status of this document at the time\r
+of its publication. Other documents may supersede this document. The\r
+latest status of this document series is maintained at the W3C.</em></p>\r
+\r
+<p>This specification is a Proposed Recommendation of the HTML Working Group. It is \r
+a revision of the Proposed Recommendation dated <a\r
+href= "http://www.w3.org/TR/1999/PR-xhtml1-19990824/">24 August\r
+1999</a> incorporating changes as a result of comments from the Proposed\r
+Recommendation review, and \r
+comments and further deliberations of the W3C HTML Working Group. A \r
+<a href="xhtml1-diff-19991210.html">diff-marked version</a> from the previous\r
+proposed recommendation is available for comparison purposes.</p>\r
+\r
+<p>On 10 December 1999, this document enters a\r
+<a href="http://www.w3.org/Consortium/Process/#RecsPR">\r
+Proposed Recommendation</a> review period. From that date until 8 January\r
+2000,\r
+W3C Advisory Committee representatives are encouraged\r
+to review this specification and return comments in their completed\r
+ballots to w3c-html-review@w3.org. Please send any comments of a\r
+confidential nature in separate email to w3t-html@w3.org, which is\r
+visible to the Team only.</p>\r
+\r
+<p>No sooner than 14 days after the end of the review period, the\r
+Director will announce the document's disposition: it may become a W3C\r
+Recommendation (possibly with minor changes), it may revert to Working\r
+Draft status, or it may be dropped as a W3C work item.</p>\r
+\r
+<p>Publication as a Proposed Recommendation does not imply endorsement\r
+by the W3C membership.  This is still a draft document and may be\r
+updated, replaced or obsoleted by other documents at any time. It is\r
+inappropriate to cite W3C Proposed Recommendation as other than "work\r
+in progress."</p>\r
+\r
+<p>This document has been produced as part of the <a href= \r
+"http://www.w3.org/MarkUp/">W3C HTML Activity</a>. The goals of\r
+the <a href="http://www.w3.org/MarkUp/Group/">HTML Working\r
+Group</a> <i>(<a href="http://cgi.w3.org/MemberAccess/">members\r
+only</a>)</i> are discussed in the <a href= \r
+"http://www.w3.org/MarkUp/Group/HTMLcharter">HTML Working Group\r
+charter</a> <i>(<a href="http://cgi.w3.org/MemberAccess/">members\r
+only</a>)</i>.</p>\r
+\r
+<p>A list of current W3C Recommendations and other technical documents\r
+can be found at <a\r
+href="http://www.w3.org/TR">http://www.w3.org/TR</a>.</p>\r
+\r
+<p>Public discussion on <abbr title="HyperText Markup\r
+Language">HTML</abbr> features takes place on the mailing list <a\r
+href="mailto:www-html@w3.org"> www-html@w3.org</a> (<a href=\r
+"http://lists.w3.org/Archives/Public/www-html/">archive</a>). The W3C\r
+staff contact for work on HTML is <a href= "mailto:dsr@w3.org">Dave\r
+Raggett</a>.</p>\r
+\r
+<p>Please report errors in this document to <a\r
+href="mailto:www-html-editor@w3.org">www-html-editor@w3.org</a>.</p>\r
+\r
+<p>The list of known errors in this specification is available at <a\r
+href="http://www.w3.org/1999/12/PR-xhtml1-19991210-errata">http://www.w3.org/1999/12/PR-xhtml1-19991210-errata</a>.</p>\r
+\r
+<h2 class="notoc"><a id="toc" name="toc">Contents</a></h2>\r
+\r
+<div class="contents">\r
+<ul class="toc">\r
+<li class="tocline">1. <a href="#xhtml">What is XHTML?</a> \r
+\r
+<ul class="toc">\r
+<li class="tocline">1.1 <a href="#html4">What is HTML 4.0?</a></li>\r
+\r
+<li class="tocline">1.2 <a href="#xml">What is XML?</a></li>\r
+\r
+<li class="tocline">1.3 <a href="#why">Why the need for XHTML?</a></li>\r
+</ul>\r
+</li>\r
+\r
+<li class="tocline">2. <a href="#defs">Definitions</a> \r
+\r
+<ul class="toc">\r
+<li class="tocline">2.1 <a href="#terms">Terminology</a></li>\r
+\r
+<li class="tocline">2.2 <a href="#general">General Terms</a></li>\r
+</ul>\r
+</li>\r
+\r
+<li class="tocline">3. <a href="#normative">Normative Definition of XHTML 1.0</a>\r
+\r
+\r
+<ul class="toc">\r
+<li class="tocline">3.1 <a href="#docconf">Document Conformance</a></li>\r
+\r
+<li class="tocline">3.2 <a href="#uaconf">User Agent Conformance</a></li>\r
+</ul>\r
+</li>\r
+\r
+<li class="tocline">4. <a href="#diffs">Differences with HTML 4.0</a> \r
+\r
+</li>\r
+\r
+<li class="tocline">5. <a href="#issues">Compatibility Issues</a> \r
+\r
+<ul class="toc">\r
+<li class="tocline">5.1 <a href="#media">Internet Media Types</a></li>\r
+</ul>\r
+</li>\r
+\r
+<li class="tocline">6. <a href="#future">Future Directions</a> \r
+\r
+<ul class="toc">\r
+<li class="tocline">6.1 <a href="#mods">Modularizing HTML</a></li>\r
+\r
+<li class="tocline">6.2 <a href="#extensions">Subsets and Extensibility</a></li>\r
+\r
+<li class="tocline">6.3 <a href="#profiles">Document Profiles</a></li>\r
+</ul>\r
+</li>\r
+\r
+<li class="tocline"><a href="#dtds">Appendix A. DTDs</a></li>\r
+\r
+<li class="tocline"><a href="#prohibitions">Appendix B. Element\r
+Prohibitions</a></li>\r
+\r
+<li class="tocline"><a href="#guidelines">Appendix C. HTML Compatibility Guidelines</a></li>\r
+\r
+<li class="tocline"><a href="#acks">Appendix D. Acknowledgements</a></li>\r
+\r
+<li class="tocline"><a href="#refs">Appendix E. References</a></li>\r
+</ul>\r
+</div>\r
+\r
+<!--OddPage-->\r
+<h1><a name="xhtml" id="xhtml">1. What is XHTML?</a></h1>\r
+\r
+<p>XHTML is a family of current and future document types and modules that\r
+reproduce, subset, and extend HTML 4.0 <a href="#ref-html4">[HTML]</a>. XHTML family document types are <abbr title="Extensible Markup Language">XML</abbr> based,\r
+and ultimately are designed to work in conjunction with XML-based user agents.\r
+The details of this family and its evolution are\r
+discussed in more detail in the section on <a href="#future">Future\r
+Directions</a>. </p>\r
+\r
+<p>XHTML 1.0 (this specification) is the first document type in the XHTML\r
+family. It is a reformulation of the three HTML 4.0 document types as\r
+applications of XML 1.0 <a href="#ref-xml"> [XML]</a>. It is intended\r
+to be used as a language for content that is both XML-conforming and, if some\r
+simple <a href="#guidelines">guidelines</a> are followed, \r
+operates in HTML 4.0 conforming user agents. Developers who migrate\r
+their content to XHTML 1.0 will realize the following benefits:</p>\r
+\r
+<ul>\r
+<li>XHTML documents are XML conforming. As such, they are readily viewed,\r
+edited, and validated with standard XML tools.</li>\r
+<li>XHTML documents can be written to\r
+to operate as well or better than they did before in existing\r
+HTML 4.0-conforming user agents as well as in new, XHTML 1.0 conforming user\r
+agents.</li>\r
+<li>XHTML documents can utilize applications (e.g. scripts and applets) that rely\r
+upon either the HTML Document Object Model or the XML Document Object Model <a\r
+href="#ref-dom">[DOM]</a>.</li>\r
+<li>As the XHTML family evolves, documents conforming to XHTML 1.0 will be more\r
+likely to interoperate within and among various XHTML environments.</li>\r
+</ul>\r
+\r
+<p>The XHTML family is the next step in the evolution of the Internet. By\r
+migrating to XHTML today, content developers can enter the XML world with all\r
+of its attendant benefits, while still remaining confident in their\r
+content's backward and future compatibility.</p>\r
+\r
+<h2><a name="html4" id="html4">1.1 What is HTML 4.0?</a></h2>\r
+\r
+<p>HTML 4.0 <a href="#ref-html4">[HTML]</a> is an <abbr title="Standard\r
+Generalized Markup Language">SGML</abbr> (Standard\r
+Generalized Markup Language) application conforming to\r
+International Standard <abbr title="Organization for International\r
+Standardization">ISO</abbr> 8879, and is widely regarded as the\r
+standard publishing language of the World Wide Web.</p>\r
+\r
+<p>SGML is a language for describing markup languages,\r
+particularly those used in electronic document exchange, document\r
+management, and document publishing. HTML is an example of a\r
+language defined in SGML.</p>\r
+\r
+<p>SGML has been around since the middle 1980's and has remained\r
+quite stable. Much of this stability stems from the fact that the\r
+language is both feature-rich and flexible. This flexibility,\r
+however, comes at a price, and that price is a level of\r
+complexity that has inhibited its adoption in a diversity of\r
+environments, including the World Wide Web.</p>\r
+\r
+<p>HTML, as originally conceived, was to be a language for the\r
+exchange of scientific and other technical documents, suitable\r
+for use by non-document specialists. HTML addressed the problem\r
+of SGML complexity by specifying a small set of structural and\r
+semantic tags suitable for authoring relatively simple documents.\r
+In addition to simplifying the document structure, HTML added\r
+support for hypertext. Multimedia capabilities were added\r
+later.</p>\r
+\r
+<p>In a remarkably short space of time, HTML became wildly\r
+popular and rapidly outgrew its original purpose. Since HTML's\r
+inception, there has been rapid invention of new elements for use\r
+within HTML (as a standard) and for adapting HTML to vertical,\r
+highly specialized, markets. This plethora of new elements has\r
+led to compatibility problems for documents across different\r
+platforms.</p>\r
+\r
+<p>As the heterogeneity of both software and platforms rapidly\r
+proliferate, it is clear that the suitability of 'classic' HTML\r
+4.0 for use on these platforms is somewhat limited.</p>\r
+\r
+<h2><a name="xml" id="xml">1.2 What is XML?</a></h2>\r
+\r
+<p>XML<sup>&#8482;</sup> is the shorthand for Extensible Markup\r
+Language, and is an acronym of Extensible Markup Language <a\r
+href="#ref-xml">[XML]</a>.</p>\r
+\r
+<p>XML was conceived as a means of regaining the power and\r
+flexibility of SGML without most of its complexity. Although a\r
+restricted form of SGML, XML nonetheless preserves most of SGML's\r
+power and richness, and yet still retains all of SGML's commonly\r
+used features.</p>\r
+\r
+<p>While retaining these beneficial features, XML removes many of\r
+the more complex features of SGML that make the authoring and\r
+design of suitable software both difficult and costly.</p>\r
+\r
+<h2><a name="why" id="why">1.3 Why the need for XHTML?</a></h2>\r
+\r
+<p>The benefits of migrating to XHTML 1.0 are described above. Some of the\r
+benefits of migrating to XHTML in general are:</p>\r
+\r
+<ul>\r
+<li>Document developers and user agent designers are constantly\r
+discovering new ways to express their ideas through new markup. In XML, it is\r
+relatively easy to introduce new elements or additional element\r
+attributes.  The XHTML family is designed to accommodate these extensions\r
+through XHTML modules and techniques for developing new XHTML-conforming\r
+modules (described in the forthcoming XHTML Modularization specification).\r
+These modules will permit the combination of existing and\r
+new feature sets when developing content and when designing new user\r
+agents.</li>\r
+\r
+<li>Alternate ways of accessing the Internet are constantly being\r
+introduced.  Some estimates indicate that by the year 2002, 75% of\r
+Internet document viewing will be carried out on these alternate\r
+platforms.  The XHTML family is designed with general user agent\r
+interoperability in mind. Through a new user agent and document profiling\r
+mechanism, servers, proxies, and user agents will be able to perform\r
+best effort content transformation. Ultimately, it will be possible to\r
+develop XHTML-conforming content that is usable by any XHTML-conforming\r
+user agent.</li>\r
+\r
+</ul>\r
+<!--OddPage-->\r
+<h1><a name="defs" id="defs">2. Definitions</a></h1>\r
+\r
+<h2><a name="terms" id="terms">2.1 Terminology</a></h2>\r
+\r
+<p>The following terms are used in this specification. These\r
+terms extend the definitions in <a href="#ref-rfc2119">\r
+[RFC2119]</a> in ways based upon similar definitions in ISO/<abbr\r
+title="International Electro-technical Commission">IEC</abbr>\r
+9945-1:1990 <a href="#ref-posix">[POSIX.1]</a>:</p>\r
+\r
+<dl>\r
+<dt>Implementation-defined</dt>\r
+\r
+<dd>A value or behavior is implementation-defined when it is left\r
+to the implementation to define [and document] the corresponding\r
+requirements for correct document construction.</dd>\r
+\r
+<dt>May</dt>\r
+\r
+<dd>With respect to implementations, the word "may" is to be\r
+interpreted as an optional feature that is not required in this\r
+specification but can be provided. With respect to <a href= \r
+"#docconf">Document Conformance</a>, the word "may" means that\r
+the optional feature must not be used. The term "optional" has\r
+the same definition as "may".</dd>\r
+\r
+<dt>Must</dt>\r
+\r
+<dd>In this specification, the word "must" is to be interpreted\r
+as a mandatory requirement on the implementation or on Strictly\r
+Conforming XHTML Documents, depending upon the context. The term\r
+"shall" has the same definition as "must".</dd>\r
+\r
+<dt>Reserved</dt>\r
+\r
+<dd>A value or behavior is unspecified, but it is not allowed to\r
+be used by Conforming Documents nor to be supported by a\r
+Conforming User Agents.</dd>\r
+\r
+<dt>Should</dt>\r
+\r
+<dd>With respect to implementations, the word "should" is to be\r
+interpreted as an implementation recommendation, but not a\r
+requirement. With respect to documents, the word "should" is to\r
+be interpreted as recommended programming practice for documents\r
+and a requirement for Strictly Conforming XHTML Documents.</dd>\r
+\r
+<dt>Supported</dt>\r
+\r
+<dd>Certain facilities in this specification are optional. If a\r
+facility is supported, it behaves as specified by this\r
+specification.</dd>\r
+\r
+<dt>Unspecified</dt>\r
+\r
+<dd>When a value or behavior is unspecified, the specification\r
+defines no portability requirements for a facility on an\r
+implementation even when faced with a document that uses the\r
+facility. A document that requires specific behavior in such an\r
+instance, rather than tolerating any behavior when using that\r
+facility, is not a Strictly Conforming XHTML Document.</dd>\r
+</dl>\r
+\r
+<h2><a name="general" id="general">2.2 General Terms</a></h2>\r
+\r
+<dl>\r
+<dt>Attribute</dt>\r
+\r
+<dd>An attribute is a parameter to an element declared in the\r
+DTD. An attribute's type and value range, including a possible\r
+default value, are defined in the DTD.</dd>\r
+\r
+<dt>DTD</dt>\r
+\r
+<dd>A DTD, or document type definition, is a collection of XML\r
+declarations that, as a collection, defines the legal structure,\r
+<span class="term">elements</span>, and <span class="term">\r
+attributes</span> that are available for use in a document that\r
+complies to the DTD.</dd>\r
+\r
+<dt>Document</dt>\r
+\r
+<dd>A document is a stream of data that, after being combined\r
+with any other streams it references, is structured such that it\r
+holds information contained within <span class="term">\r
+elements</span> that are organized as defined in the associated\r
+<span class="term">DTD</span>. See <a href="#docconf">Document\r
+Conformance</a> for more information.</dd>\r
+\r
+<dt>Element</dt>\r
+\r
+<dd>An element is a document structuring unit declared in the\r
+<span class="term">DTD</span>. The element's content model is\r
+defined in the <span class="term">DTD</span>, and additional\r
+semantics may be defined in the prose description of the\r
+element.</dd>\r
+\r
+<dt><a name="facilities" id="facilities">Facilities</a></dt>\r
+\r
+<dd>Functionality includes <span class="term">elements</span>,\r
+<span class="term">attributes</span>, and the semantics\r
+associated with those <span class="term">elements</span> and\r
+<span class="term">attributes</span>. An implementation\r
+supporting that functionality is said to provide the necessary\r
+facilities.</dd>\r
+\r
+<dt>Implementation</dt>\r
+\r
+<dd>An implementation is a system that provides collection of\r
+<span class="term">facilities</span> and services that supports\r
+this specification. See <a href="#uaconf">User Agent\r
+Conformance</a> for more information.</dd>\r
+\r
+<dt>Parsing</dt>\r
+\r
+<dd>Parsing is the act whereby a <span class="term">\r
+document</span> is scanned, and the information contained within\r
+the <span class="term">document</span> is filtered into the\r
+context of the <span class="term">elements</span> in which the\r
+information is structured.</dd>\r
+\r
+<dt>Rendering</dt>\r
+\r
+<dd>Rendering is the act whereby the information in a <span\r
+class="term">document</span> is presented. This presentation is\r
+done in the form most appropriate to the environment (e.g.\r
+aurally, visually, in print).</dd>\r
+\r
+<dt>User Agent</dt>\r
+\r
+<dd>A user agent is an <span class="term">implementation</span>\r
+that retrieves and processes XHTML documents. See <a href=\r
+"#uaconf">User Agent Conformance</a> for more information.</dd>\r
+\r
+<dt>Validation</dt>\r
+\r
+<dd>Validation is a process whereby <span class="term">\r
+documents</span> are verified against the associated <span class= \r
+"term">DTD</span>, ensuring that the structure, use of <span\r
+class="term">elements</span>, and use of <span class="term">\r
+attributes</span> are consistent with the definitions in the\r
+<span class="term">DTD</span>.</dd>\r
+\r
+<dt><a name="wellformed" id="wellformed">Well-formed</a></dt>\r
+\r
+<dd>A <span class="term">document</span> is well-formed when it\r
+is structured according to the rules defined in <a href= \r
+"http://www.w3.org/TR/REC-xml#sec-well-formed">Section 2.1</a> of\r
+the XML 1.0 Recommendation <a href="#ref-xml">[XML]</a>.\r
+Basically, this definition states that elements, delimited by\r
+their start and end tags, are nested properly within one\r
+another.</dd>\r
+</dl>\r
+\r
+<!--OddPage-->\r
+<h1><a name="normative" id="normative">3. Normative Definition of\r
+XHTML 1.0</a></h1>\r
+\r
+<h2><a name="docconf" id="docconf">3.1 Document\r
+Conformance</a></h2>\r
+\r
+<p>This version of XHTML provides a definition of strictly\r
+conforming XHTML documents, which are restricted to tags and\r
+attributes from the XHTML namespace. See <a href=\r
+"#well-formed">Section 3.1.2</a> for information on using XHTML\r
+with other namespaces, for instance, to include metadata\r
+expressed in <abbr title="Resource Description Format">RDF</abbr> within XHTML documents.</p>\r
+\r
+<h3><a name="strict" id="strict">3.1.1 Strictly Conforming\r
+Documents</a></h3>\r
+\r
+<p>A Strictly Conforming XHTML Document is a document that\r
+requires only the facilities described as mandatory in this\r
+specification. Such a document must meet all of the following\r
+criteria:</p>\r
+\r
+<ol>\r
+<li>\r
+<p>It must validate against one of the three DTDs found in <a\r
+href="#dtds">Appendix&#160;A</a>.</p>\r
+</li>\r
+\r
+<li>\r
+<p>The root element of the document must be <code>\r
+&lt;html&gt;</code>.</p>\r
+</li>\r
+\r
+<li>\r
+<p>The root element of the document must designate the XHTML\r
+namespace using the <code>xmlns</code> attribute <a href= \r
+"#ref-xmlns">[XMLNAMES]</a>. The namespace for XHTML is\r
+defined to be \r
+<code>http://www.w3.org/1999/xhtml</code>.</p>\r
+</li>\r
+\r
+<li>\r
+<p>There must be a DOCTYPE declaration in the document prior to\r
+the root element. The public identifier included in\r
+the DOCTYPE declaration must reference one of the three DTDs\r
+found in <a href="#dtds">Appendix&#160;A</a> using the respective\r
+Formal Public Identifier. The system identifier may be changed to reflect\r
+local system conventions.</p>\r
+\r
+<pre>\r
+&lt;!DOCTYPE html \r
+     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"\r
+     "http://www.w3.org/TR/1999/PR-xhtml1-19991210/DTD/xhtml1-strict.dtd&gt;\r
+\r
+&lt;!DOCTYPE html \r
+     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"\r
+     "http://www.w3.org/TR/1999/PR-xhtml1-19991210/DTD/xhtml1-transitional.dtd&gt;\r
+\r
+&lt;!DOCTYPE html \r
+     PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"\r
+     "http://www.w3.org/TR/1999/PR-xhtml1-19991210/DTD/xhtml1-frameset.dtd&gt;\r
+</pre>\r
+</li>\r
+</ol>\r
+\r
+<p>Here is an example of a minimal XHTML document.</p>\r
+\r
+<div class="good">\r
+<pre>\r
+&lt;?xml version="1.0" encoding="UTF-8"?&gt;\r
+&lt;!DOCTYPE html \r
+     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"\r
+    "http://www.w3.org/TR/1999/PR-xhtml1-19991210/DTD/xhtml1-strict.dtd"&gt;\r
+&lt;html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"&gt;\r
+  &lt;head&gt;\r
+    &lt;title&gt;Virtual Library&lt;/title&gt;\r
+  &lt;/head&gt;\r
+  &lt;body&gt;\r
+    &lt;p&gt;Moved to &lt;a href="http://vlib.org/"&gt;vlib.org&lt;/a&gt;.&lt;/p&gt;\r
+  &lt;/body&gt;\r
+&lt;/html&gt;</pre>\r
+</div>\r
+\r
+<p>Note that in this example, the XML declaration is included. An XML\r
+declaration like the one above is\r
+not required in all XML documents. XHTML document authors are strongly encouraged to use XML declarations in all their documents. Such a declaration is required\r
+when the character encoding of the document is other than the default UTF-8 or\r
+UTF-16.</p>\r
+\r
+<h3><a name="well-formed" id="well-formed">3.1.2 Using XHTML with\r
+other namespaces</a></h3>\r
+\r
+<p>The XHTML namespace may be used with other XML namespaces\r
+as per <a href="#ref-xmlns">[XMLNAMES]</a>, although such\r
+documents are not strictly conforming XHTML 1.0 documents as\r
+defined above. Future work by W3C will address ways to specify\r
+conformance for documents involving multiple namespaces.</p>\r
+\r
+<p>The following example shows the way in which XHTML 1.0 could\r
+be used in conjunction with the MathML Recommendation:</p>\r
+\r
+<div class="good">\r
+<pre>\r
+&lt;html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"&gt;\r
+  &lt;head&gt;\r
+    &lt;title&gt;A Math Example&lt;/title&gt;\r
+  &lt;/head&gt;\r
+  &lt;body&gt;\r
+    &lt;p&gt;The following is MathML markup:&lt;/p&gt;\r
+    &lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;\r
+      &lt;apply&gt; &lt;log/&gt;\r
+        &lt;logbase&gt;\r
+          &lt;cn&gt; 3 &lt;/cn&gt;\r
+        &lt;/logbase&gt;\r
+        &lt;ci&gt; x &lt;/ci&gt;\r
+      &lt;/apply&gt;\r
+    &lt;/math&gt;\r
+  &lt;/body&gt;\r
+&lt;/html&gt;\r
+</pre>\r
+</div>\r
+\r
+<p>The following example shows the way in which XHTML 1.0 markup\r
+could be incorporated into another XML namespace:</p>\r
+\r
+<div class="good">\r
+<pre>\r
+&lt;?xml version="1.0" encoding="UTF-8"?&gt;\r
+&lt;!-- initially, the default namespace is "books" --&gt;\r
+&lt;book xmlns='urn:loc.gov:books'\r
+    xmlns:isbn='urn:ISBN:0-395-36341-6' xml:lang="en" lang="en"&gt;\r
+  &lt;title&gt;Cheaper by the Dozen&lt;/title&gt;\r
+  &lt;isbn:number&gt;1568491379&lt;/isbn:number&gt;\r
+  &lt;notes&gt;\r
+    &lt;!-- make HTML the default namespace for a hypertext commentary --&gt;\r
+    &lt;p xmlns='http://www.w3.org/1999/xhtml'&gt;\r
+        This is also available &lt;a href="http://www.w3.org/"&gt;online&lt;/a&gt;.\r
+    &lt;/p&gt;\r
+  &lt;/notes&gt;\r
+&lt;/book&gt;\r
+</pre>\r
+</div>\r
+\r
+<h2><a name="uaconf" id="uaconf">3.2 User Agent\r
+Conformance</a></h2>\r
+\r
+<p>A conforming user agent must meet all of the following\r
+criteria:</p>\r
+\r
+<ol>\r
+<li>In order to be consistent with the XML 1.0 Recommendation <a\r
+href="#ref-xml">[XML]</a>, the user agent must parse and evaluate\r
+an XHTML document for well-formedness. If the user agent claims\r
+to be a validating user agent, it must also validate documents\r
+against their referenced DTDs according to <a href="#ref-xml">\r
+[XML]</a>.</li>\r
+\r
+<li>When the user agent claims to support <a href="#facilities">\r
+facilities</a> defined within this specification or required by\r
+this specification through normative reference, it must do so in\r
+ways consistent with the facilities' definition.</li>\r
+\r
+<li>When a user agent processes an XHTML document as generic XML,\r
+it shall only recognize attributes of type\r
+<code>ID</code> (e.g. the <code>id</code> attribute on most XHTML elements)\r
+as fragment identifiers.</li>\r
+\r
+<li>If a user agent encounters an element it does not recognize,\r
+it must render the element's content.</li>\r
+\r
+<li>If a user agent encounters an attribute it does not\r
+recognize, it must ignore the entire attribute specification\r
+(i.e., the attribute and its value).</li>\r
+\r
+<li>If a user agent encounters an attribute value it doesn't\r
+recognize, it must use the default attribute value.</li>\r
+\r
+<li>If it encounters an entity reference (other than one\r
+of the predefined entities) for which the User Agent has \r
+processed no declaration (which could happen if the declaration\r
+is in the external subset which the User Agent hasn't read), the entity \r
+reference should be rendered as the characters (starting\r
+with the ampersand and ending with the semi-colon) that\r
+make up the entity reference.</li>\r
+\r
+<li>When rendering content, User Agents that encounter \r
+characters or character entity references that are recognized but not renderable should display the document in such a way that it is obvious to the user that normal rendering has not taken place.</li>\r
+\r
+<li>\r
+The following characters are defined in [XML] as whitespace characters:\r
+\r
+<ul>\r
+<li>Space (&amp;#x0020;)</li>\r
+<li>Tab (&amp;#x0009;)</li>\r
+<li>Carriage return (&amp;#x000D;)</li>\r
+<li>Line feed (&amp;#x000A;)</li>\r
+</ul>\r
+\r
+<p>\r
+The XML processor normalizes different system's line end codes into one\r
+single line-feed character, that is passed up to the application. The XHTML\r
+user agent in addition, must treat the following characters as whitespace:\r
+</p>\r
+\r
+<ul>\r
+<li>Form feed (&amp;#x000C;)</li>\r
+<li>Zero-width space (&amp;#x200B;)</li>\r
+</ul>\r
+\r
+<p>\r
+In elements where the 'xml:space' attribute is set to 'preserve', the user\r
+agent must leave all whitespace characters intact (with the exception of\r
+leading and trailing whitespace characters, which should be removed).\r
+Otherwise, whitespace\r
+is handled according to the following rules:\r
+</p>\r
+\r
+<ul>\r
+<li>\r
+All whitespace surrounding block elements should be removed.\r
+</li>\r
+<li>\r
+Comments are removed entirely and do not affect whitespace handling. One\r
+whitespace character on either side of a comment is treated as two white\r
+space characters.\r
+</li>\r
+<li>\r
+Leading and trailing whitespace inside a block element must be removed.\r
+</li>\r
+<li>Line feed characters within a block element must be converted into a\r
+space (except when the 'xml:space' attribute is set to 'preserve').\r
+</li>\r
+<li>\r
+A sequence of white space characters must be reduced to a single space\r
+character (except when the 'xml:space' attribute is set to 'preserve').\r
+</li>\r
+<li>\r
+With regard to rendition,\r
+the User Agent should render the content in a\r
+manner appropriate to the language in which the content is written.\r
+In languages whose primary script is Latinate, the ASCII space\r
+character is typically used to encode both grammatical word boundaries and\r
+typographic whitespace; in languages whose script is related to Nagari\r
+(e.g., Sanskrit, Thai, etc.), grammatical boundaries may be encoded using\r
+the ZW 'space' character, but will not typically be represented by\r
+typographic whitespace in rendered output; languages using Arabiform scripts\r
+may encode typographic whitespace using a space character, but may also use\r
+the ZW space character to delimit 'internal' grammatical boundaries (what\r
+look like words in Arabic to an English eye frequently encode several words,\r
+e.g. 'kitAbuhum' = 'kitAbu-hum' = 'book them' == their book); and languages\r
+in the Chinese script tradition typically neither encode such delimiters nor\r
+use typographic whitespace in this way. \r
+</li>\r
+</ul>\r
+\r
+<p>Whitespace in attribute values is processed according to <a\r
+href="#ref-xml">[XML]</a>.</p>\r
+</li>\r
+</ol>\r
+\r
+<!--OddPage-->\r
+<h1><a name="diffs" id="diffs">4. Differences with HTML\r
+4.0</a></h1>\r
+\r
+<p>Due to the fact that XHTML is an XML application, certain\r
+practices that were perfectly legal in SGML-based HTML 4.0 <a\r
+href="#ref-html4">[HTML]</a> must be changed.</p>\r
+\r
+<h2><a name="h-4.1" id="h-4.1">4.1 Documents must be\r
+well-formed</a></h2>\r
+\r
+<p><a href="#wellformed">Well-formedness</a> is a new concept\r
+introduced by <a href="#ref-xml">[XML]</a>. Essentially this\r
+means that all elements must either have closing tags or be\r
+written in a special form (as described below), and that all the\r
+elements must nest.</p>\r
+\r
+<p>Although overlapping is illegal in SGML, it was widely\r
+tolerated in existing browsers.</p>\r
+\r
+<div class="good">\r
+<p><strong><em>CORRECT: nested elements.</em></strong></p>\r
+\r
+<p>&lt;p&gt;here is an emphasized\r
+&lt;em&gt;paragraph&lt;/em&gt;.&lt;/p&gt;</p>\r
+</div>\r
+\r
+<div class="bad">\r
+<p><strong><em>INCORRECT: overlapping elements</em></strong></p>\r
+\r
+<p>&lt;p&gt;here is an emphasized\r
+&lt;em&gt;paragraph.&lt;/p&gt;&lt;/em&gt;</p>\r
+</div>\r
+\r
+<h2><a name="h-4.2" id="h-4.2">4.2 Element and attribute\r
+names must be in lower case</a></h2>\r
+\r
+<p>XHTML documents must use lower case for all HTML element and\r
+attribute names. This difference is necessary because XML is\r
+case-sensitive e.g. &lt;li&gt; and &lt;LI&gt; are different\r
+tags.</p>\r
+\r
+<h2><a name="h-4.3" id="h-4.3">4.3 For non-empty elements,\r
+end tags are required</a></h2>\r
+\r
+<p>In SGML-based HTML 4.0 certain elements were permitted to omit\r
+the end tag; with the elements that followed implying closure.\r
+This omission is not permitted in XML-based XHTML. All elements\r
+other than those declared in the DTD as <code>EMPTY</code> must\r
+have an end tag.</p>\r
+\r
+<div class="good">\r
+<p><strong><em>CORRECT: terminated elements</em></strong></p>\r
+\r
+<p>&lt;p&gt;here is a paragraph.&lt;/p&gt;&lt;p&gt;here is\r
+another paragraph.&lt;/p&gt;</p>\r
+</div>\r
+\r
+<div class="bad">\r
+<p><strong><em>INCORRECT: unterminated elements</em></strong></p>\r
+\r
+<p>&lt;p&gt;here is a paragraph.&lt;p&gt;here is another\r
+paragraph.</p>\r
+</div>\r
+\r
+<h2><a name="h-4.4" id="h-4.4">4.4 Attribute values must\r
+always be quoted</a></h2>\r
+\r
+<p>All attribute values must be quoted, even those which appear\r
+to be numeric.</p>\r
+\r
+<div class="good">\r
+<p><strong><em>CORRECT: quoted attribute values</em></strong></p>\r
+\r
+<p>&lt;table rows="3"&gt;</p>\r
+</div>\r
+\r
+<div class="bad">\r
+<p><strong><em>INCORRECT: unquoted attribute values</em></strong></p>\r
+\r
+<p>&lt;table rows=3&gt;</p>\r
+</div>\r
+\r
+<h2><a name="h-4.5" id="h-4.5">4.5 Attribute\r
+Minimization</a></h2>\r
+\r
+<p>XML does not support attribute minimization. Attribute-value\r
+pairs must be written in full. Attribute names such as <code>\r
+compact</code> and <code>checked</code> cannot occur in elements\r
+without their value being specified.</p>\r
+\r
+<div class="good">\r
+<p><strong><em>CORRECT: unminimized attributes</em></strong></p>\r
+\r
+<p>&lt;dl compact="compact"&gt;</p>\r
+</div>\r
+\r
+<div class="bad">\r
+<p><strong><em>INCORRECT: minimized attributes</em></strong></p>\r
+\r
+<p>&lt;dl compact&gt;</p>\r
+</div>\r
+\r
+<h2><a name="h-4.6" id="h-4.6">4.6 Empty Elements</a></h2>\r
+\r
+<p>Empty elements must either have an end tag or the start tag must end with <code>/&gt;</code>. For instance,\r
+<code>&lt;br/&gt;</code> or <code>&lt;hr&gt;&lt;/hr&gt;</code>. See <a\r
+href="#guidelines">HTML Compatibility Guidelines</a> for information on ways to\r
+ensure this is backward compatible with HTML 4.0 user agents.</p>\r
+\r
+<div class="good">\r
+<p><strong><em>CORRECT: terminated empty tags</em></strong></p>\r
+\r
+<p>&lt;br/&gt;&lt;hr/&gt;</p>\r
+</div>\r
+\r
+<div class="bad">\r
+<p><strong><em>INCORRECT: unterminated empty tags</em></strong></p>\r
+\r
+<p>&lt;br&gt;&lt;hr&gt;</p>\r
+</div>\r
+\r
+<h2><a name="h-4.7" id="h-4.7">4.7 Whitespace handling in\r
+attribute values</a></h2>\r
+\r
+<p>In attribute values, user agents will strip leading and\r
+trailing whitespace from attribute values and map sequences\r
+of one or more whitespace characters (including line breaks) to\r
+a single inter-word space (an ASCII space character for western\r
+scripts). See <a href="http://www.w3.org/TR/REC-xml#AVNormalize">\r
+Section 3.3.3</a> of <a href="#ref-xml">[XML]</a>.</p>\r
+\r
+<h2><a name="h-4.8" id="h-4.8">4.8 Script and Style\r
+elements</a></h2>\r
+\r
+<p>In XHTML, the script and style elements are declared as having\r
+<code>#PCDATA</code> content. As a result, <code>&lt;</code> and\r
+<code>&amp;</code> will be treated as the start of markup, and\r
+entities such as <code>&amp;lt;</code> and <code>&amp;amp;</code>\r
+will be recognized as entity references by the XML processor to\r
+<code>&lt;</code> and <code>&amp;</code> respectively. Wrapping\r
+the content of the script or style element within a <code>\r
+CDATA</code> marked section avoids the expansion of these\r
+entities.</p>\r
+\r
+<div class="good">\r
+<pre>\r
+&lt;script&gt;\r
+ &lt;![CDATA[\r
+ ... unescaped script content ...\r
+ ]]&gt;\r
+ &lt;/script&gt;\r
+</pre>\r
+</div>\r
+\r
+<p><code>CDATA</code> sections are recognized by the XML\r
+processor and appear as nodes in the Document Object Model, see\r
+<a href= \r
+"http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#ID-E067D597">\r
+Section 1.3</a> of the DOM Level 1 Recommendation <a href= \r
+"#ref-dom">[DOM]</a>.</p>\r
+\r
+<p>An alternative is to use external script and style\r
+documents.</p>\r
+\r
+<h2><a name="h-4.9" id="h-4.9">4.9 SGML exclusions</a></h2>\r
+\r
+<p>SGML gives the writer of a DTD the ability to exclude specific\r
+elements from being contained within an element. Such\r
+prohibitions (called "exclusions") are not possible in XML.</p>\r
+\r
+<p>For example, the HTML 4.0 Strict DTD forbids the nesting of an\r
+'<code>a</code>' element within another '<code>a</code>' element\r
+to any descendant depth. It is not possible to spell out such\r
+prohibitions in XML. Even though these prohibitions cannot be\r
+defined in the DTD, certain elements should not be nested. A\r
+summary of such elements and the elements that should not be\r
+nested in them is found in the normative <a href="#prohibitions">\r
+Appendix&#160;B</a>.</p>\r
+\r
+<h2><a name="h-4.10" id="h-4.10">4.10 The elements with 'id' and 'name'\r
+attributes</a></h2>\r
+\r
+<p>HTML 4.0 defined the <code>name</code> attribute for the elements\r
+<code>a</code>,\r
+<code>applet</code>, <code>frame</code>,\r
+<code>iframe</code>, <code>img</code>, and <code>map</code>.\r
+HTML 4.0 also introduced\r
+the <code>id</code> attribute. Both of these attributes are designed to be\r
+used as fragment identifiers.</p>\r
+<p>In XML, fragment identifiers are of type <code>ID</code>, and\r
+there can only be a single attribute of type <code>ID</code> per element.\r
+Therefore, in XHTML 1.0 the <code>id</code>\r
+attribute is defined to be of type <code>ID</code>. In order to\r
+ensure that XHTML 1.0 documents are well-structured XML documents, XHTML 1.0\r
+documents MUST use the <code>id</code> attribute when defining fragment\r
+identifiers, even on elements that historically have also had a\r
+<code>name</code> attribute.\r
+See the <a href="#guidelines">HTML Compatibility\r
+Guidelines</a> for information on ensuring such anchors are backwards\r
+compatible when serving XHTML documents as media type <code>text/html</code>.\r
+</p>\r
+<p>Note that in XHTML 1.0, the <code>name</code> attribute of these\r
+elements is formally deprecated, and will be removed in a\r
+subsequent version of XHTML.</p>\r
+\r
+<!--OddPage-->\r
+<h1><a name="issues" id="issues">5. Compatibility Issues</a></h1>\r
+\r
+<p>Although there is no requirement for XHTML 1.0 documents to be\r
+compatible with existing user agents, in practice this is easy to\r
+accomplish. Guidelines for creating compatible documents can be\r
+found in <a href="#guidelines">Appendix&#160;C</a>.</p>\r
+\r
+<h2><a name="media" id="media">5.1 Internet Media Type</a></h2>\r
+<p>As of the publication of this recommendation, the general\r
+recommended MIME labeling for XML-based applications\r
+has yet to be resolved.</p>\r
+\r
+<p>However, XHTML Documents which follow the guidelines set forth\r
+in <a href="#guidelines">Appendix C</a>, "HTML Compatibility Guidelines" may be\r
+labeled with the Internet Media Type "text/html", as they\r
+are compatible with most HTML browsers. This document\r
+makes no recommendation about MIME labeling of other\r
+XHTML documents.</p>\r
+\r
+<!--OddPage-->\r
+<h1><a name="future" id="future">6. Future Directions</a></h1>\r
+\r
+<p>XHTML 1.0 provides the basis for a family of document types\r
+that will extend and subset XHTML, in order to support a wide\r
+range of new devices and applications, by defining modules and\r
+specifying a mechanism for combining these modules. This\r
+mechanism will enable the extension and sub-setting of XHTML 1.0\r
+in a uniform way through the definition of new modules.</p>\r
+\r
+<h2><a name="mods" id="mods">6.1 Modularizing HTML</a></h2>\r
+\r
+<p>As the use of XHTML moves from the traditional desktop user\r
+agents to other platforms, it is clear that not all of the XHTML\r
+elements will be required on all platforms. For example a hand\r
+held device or a cell-phone may only support a subset of XHTML\r
+elements.</p>\r
+\r
+<p>The process of modularization breaks XHTML up into a series of\r
+smaller element sets. These elements can then be recombined to\r
+meet the needs of different communities.</p>\r
+\r
+<p>These modules will be defined in a later W3C document.</p>\r
+\r
+<h2><a name="extensions" id="extensions">6.2 Subsets and\r
+Extensibility</a></h2>\r
+\r
+<p>Modularization brings with it several advantages:</p>\r
+\r
+<ul>\r
+<li>\r
+<p>It provides a formal mechanism for sub-setting XHTML.</p>\r
+</li>\r
+\r
+<li>\r
+<p>It provides a formal mechanism for extending XHTML.</p>\r
+</li>\r
+\r
+<li>\r
+<p>It simplifies the transformation between document types.</p>\r
+</li>\r
+\r
+<li>\r
+<p>It promotes the reuse of modules in new document types.</p>\r
+</li>\r
+</ul>\r
+\r
+<h2><a name="profiles" id="profiles">6.3 Document\r
+Profiles</a></h2>\r
+\r
+<p>A document profile specifies the syntax and semantics of a set\r
+of documents. Conformance to a document profile provides a basis\r
+for interoperability guarantees. The document profile specifies\r
+the facilities required to process documents of that type, e.g.\r
+which image formats can be used, levels of scripting, style sheet\r
+support, and so on.</p>\r
+\r
+<p>For product designers this enables various groups to define\r
+their own standard profile.</p>\r
+\r
+<p>For authors this will obviate the need to write several\r
+different versions of documents for different clients.</p>\r
+\r
+<p>For special groups such as chemists, medical doctors, or\r
+mathematicians this allows a special profile to be built using\r
+standard HTML elements plus a group of elements geared to the\r
+specialist's needs.</p>\r
+\r
+<!--OddPage-->\r
+<h1><a name="appendices" id="appendices"></a>\r
+<a name="dtds" id="dtds">Appendix A. DTDs</a></h1>\r
+\r
+<p><b>This appendix is normative.</b></p>\r
+\r
+<p>These DTDs and entity sets form a normative part of this\r
+specification. The complete set of DTD files together with an XML\r
+declaration and SGML Open Catalog is included in the <a href= \r
+"xhtml1.zip">zip file</a> for this specification.</p>\r
+\r
+<h2><a name="h-A1" id="h-A1">A.1 Document Type\r
+Definitions</a></h2>\r
+\r
+<p>These DTDs approximate the HTML 4.0 DTDs. It is likely that\r
+when the DTDs are modularized, a method of DTD construction will\r
+be employed that corresponds more closely to HTML 4.0.</p>\r
+\r
+<ul>\r
+<li>\r
+<p><a href="DTD/xhtml1-strict.dtd" type="text/plain">\r
+XHTML-1.0-Strict</a></p>\r
+</li>\r
+\r
+<li>\r
+<p><a href="DTD/xhtml1-transitional.dtd" type="text/plain">\r
+XHTML-1.0-Transitional</a></p>\r
+</li>\r
+\r
+<li>\r
+<p><a href="DTD/xhtml1-frameset.dtd" type="text/plain">\r
+XHTML-1.0-Frameset</a></p>\r
+</li>\r
+</ul>\r
+\r
+<h2><a name="h-A2" id="h-A2">A.2 Entity Sets</a></h2>\r
+\r
+<p>The XHTML entity sets are the same as for HTML 4.0, but have\r
+been modified to be valid XML 1.0 entity declarations. Note the\r
+entity for the Euro currency sign (<code>&amp;euro;</code> or\r
+<code>&amp;#8364;</code> or <code>&amp;#x20AC;</code>) is defined\r
+as part of the special characters.</p>\r
+\r
+<ul>\r
+<li>\r
+<p><a href="DTD/xhtml-lat1.ent">Latin-1 characters</a></p>\r
+</li>\r
+\r
+<li>\r
+<p><a href="DTD/xhtml-special.ent">Special characters</a></p>\r
+</li>\r
+\r
+<li>\r
+<p><a href="DTD/xhtml-symbol.ent">Symbols</a></p>\r
+</li>\r
+</ul>\r
+\r
+<!--OddPage-->\r
+<h1><a name="prohibitions" id="prohibitions">Appendix B. Element\r
+Prohibitions</a></h1>\r
+\r
+<p><b>This appendix is normative.</b></p>\r
+\r
+<p>The following elements have prohibitions on which elements\r
+they can contain (see <a href="#h-4.9">Section 4.9</a>). This\r
+prohibition applies to all depths of nesting, i.e. it contains\r
+all the descendant elements.</p>\r
+\r
+<dl><dt><code class="tag">a</code></dt>\r
+<dd>\r
+cannot contain other <code>a</code> elements.</dd>\r
+<dt><code class="tag">pre</code></dt>\r
+<dd>cannot contain the <code>img</code>, <code>object</code>,\r
+<code>big</code>, <code>small</code>, <code>sub</code>, or <code>\r
+sup</code> elements.</dd>\r
+\r
+<dt><code class="tag">button</code></dt>\r
+<dd>cannot contain the <code>input</code>, <code>select</code>,\r
+<code>textarea</code>, <code>label</code>, <code>button</code>,\r
+<code>form</code>, <code>fieldset</code>, <code>iframe</code> or\r
+<code>isindex</code> elements.</dd>\r
+<dt><code class="tag">label</code></dt>\r
+<dd>cannot contain other <code class="tag">label</code> elements.</dd>\r
+<dt><code class="tag">form</code></dt>\r
+<dd>cannot contain other <code>form</code> elements.</dd>\r
+</dl>\r
+\r
+<!--OddPage-->\r
+<h1><a name="guidelines" id="guidelines">Appendix C.\r
+HTML Compatibility Guidelines</a></h1>\r
+\r
+<p><b>This appendix is informative.</b></p>\r
+\r
+<p>This appendix summarizes design guidelines for authors who\r
+wish their XHTML documents to render on existing HTML user\r
+agents.</p>\r
+\r
+<h2>C.1 Processing Instructions</h2>\r
+<p>Be aware that processing instructions are rendered on some\r
+user agents. However, also note that when the XML declaration is not included\r
+in a document, the document can only use the default character encodings UTF-8\r
+or UTF-16.</p>\r
+\r
+<h2>C.2 Empty Elements</h2>\r
+<p>Include a space before the trailing <code>/</code> and <code>\r
+&gt;</code> of empty elements, e.g. <code class="greenmono">\r
+&lt;br&#160;/&gt;</code>, <code class="greenmono">\r
+&lt;hr&#160;/&gt;</code> and <code class="greenmono">&lt;img\r
+src="karen.jpg" alt="Karen"&#160;/&gt;</code>. Also, use the\r
+minimized tag syntax for empty elements, e.g. <code class= \r
+"greenmono">&lt;br /&gt;</code>, as the alternative syntax <code\r
+class="greenmono">&lt;br&gt;&lt;/br&gt;</code> allowed by XML\r
+gives uncertain results in many existing user agents.</p>\r
+\r
+<h2>C.3 Element Minimization and Empty Element Content</h2>\r
+<p>Given an empty instance of an element whose content model is\r
+not <code>EMPTY</code> (for example, an empty title or paragraph)\r
+do not use the minimized form (e.g. use <code class="greenmono">\r
+&lt;p&gt; &lt;/p&gt;</code> and not <code class="greenmono">\r
+&lt;p&#160;/&gt;</code>).</p>\r
+\r
+<h2>C.4 Embedded Style Sheets and Scripts</h2>\r
+<p>Use external style sheets if your style sheet uses <code>\r
+&lt;</code> or <code>&amp;</code> or <code>]]&gt;</code> or <code>--</code>. Use\r
+external scripts if your script uses <code>&lt;</code> or <code>\r
+&amp;</code> or <code>]]&gt;</code> or <code>--</code>. Note that XML parsers\r
+are permitted to silently remove the contents of comments. Therefore, the historical\r
+practice of "hiding" scripts and style sheets within comments to make the\r
+documents backward compatible is likely to not work as expected in XML-based\r
+implementations.</p>\r
+\r
+<h2>C.5 Line Breaks within Attribute Values</h2>\r
+<p>Avoid line breaks and multiple whitespace characters within\r
+attribute values. These are handled inconsistently by user\r
+agents.</p>\r
+\r
+<h2>C.6 Isindex</h2>\r
+<p>Don't include more than one <code>isindex</code> element in\r
+the document <code>head</code>. The <code>isindex</code> element\r
+is deprecated in favor of the <code>input</code> element.</p>\r
+\r
+<h2>C.7 The <code>lang</code> and <code>xml:lang</code> Attributes</h2>\r
+<p>Use both the <code>lang</code> and <code>xml:lang</code>\r
+attributes when specifying the language of an element. The value\r
+of the <code>xml:lang</code> attribute takes precedence.</p>\r
+\r
+<h2>C.8 Fragment Identifiers</h2>\r
+<p>In XML, <abbr title="Uniform Resource Identifiers">URIs</abbr> [<a href="#ref-rfc2396">RFC2396</a>] that end with fragment identifiers of the form\r
+<code>"#foo"</code> do not refer to elements with an attribute\r
+<code>name="foo"</code>; rather, they refer to elements with an\r
+attribute defined to be of type <code>ID</code>, e.g., the <code>\r
+id</code> attribute in HTML 4.0. Many existing HTML clients don't\r
+support the use of <code>ID</code>-type attributes in this way,\r
+so identical values may be supplied for both of these attributes to ensure\r
+maximum forward and backward compatibility (e.g., <code class= \r
+"greenmono">&lt;a id="foo" name="foo"&gt;...&lt;/a&gt;</code>).</p>\r
+\r
+<p>Further, since the set of\r
+legal values for attributes of type <code>ID</code> is much smaller than\r
+for those of type <code>CDATA</code>, the type of the <code>name</code>\r
+attribute has been changed to <code>NMTOKEN</code>. This attribute is \r
+constrained such that it can only have the same values as type\r
+<code>ID</code>, or as the <code>Name</code> production in XML 1.0 Section\r
+2.5, production 5. Unfortunately, this constraint cannot be expressed in the\r
+XHTML 1.0 DTDs.  Because of this change, care must be taken when\r
+converting existing HTML documents. The values of these attributes\r
+must be unique within the document, valid, and any references to these \r
+fragment identifiers (both\r
+internal and external) must be updated should the values be changed during\r
+conversion.</p>\r
+<p>Finally, note that XHTML 1.0 has deprecated the\r
+<code>name</code> attribute of the <code>a</code>, <code>applet</code>, <code>frame</code>, <code>iframe</code>, <code>img</code>, and <code>map</code>\r
+elements, and it will be\r
+removed from XHTML in subsequent versions.</p>\r
+\r
+<h2>C.9 Character Encoding</h2>\r
+<p>To specify a character encoding in the document, use both the\r
+encoding attribute specification on the xml declaration (e.g.\r
+<code class="greenmono">&lt;?xml version="1.0"\r
+encoding="EUC-JP"?&gt;</code>) and a meta http-equiv statement\r
+(e.g. <code class="greenmono">&lt;meta http-equiv="Content-type"\r
+content='text/html; charset="EUC-JP"'&#160;/&gt;</code>). The\r
+value of the encoding attribute of the xml processing instruction\r
+takes precedence.</p>\r
+\r
+<h2>C.10 Boolean Attributes</h2>\r
+<p>Some HTML user agents are unable to interpret boolean\r
+attributes when these appear in their full (non-minimized) form,\r
+as required by XML 1.0. Note this problem doesn't effect user\r
+agents compliant with HTML 4.0. The following attributes are\r
+involved: <code>compact</code>, <code>nowrap</code>, <code>\r
+ismap</code>, <code>declare</code>, <code>noshade</code>, <code>\r
+checked</code>, <code>disabled</code>, <code>readonly</code>,\r
+<code>multiple</code>, <code>selected</code>, <code>\r
+noresize</code>, <code>defer</code>.</p>\r
+\r
+<h2>C.11 Document Object Model and XHTML</h2>\r
+<p>\r
+The Document Object Model level 1 Recommendation [<a href="#ref-dom">DOM</a>]\r
+defines document object model interfaces for XML and HTML 4.0. The HTML 4.0\r
+document object model specifies that HTML element and attribute names are\r
+returned in upper-case. The XML document object model specifies that \r
+element and attribute names are returned in the case they are specified. In\r
+XHTML 1.0, elements and attributes are specified in lower-case. This apparent difference can be\r
+addressed in two ways:\r
+</p>\r
+<ol>\r
+<li>Applications that access XHTML documents served as Internet media type\r
+<code>text/html</code>\r
+via the <abbr title="Document Object Model">DOM</abbr> can use the HTML DOM,\r
+and can rely upon element and attribute names being returned in\r
+upper-case from those interfaces.</li>\r
+<li>Applications that access XHTML documents served as Internet media types\r
+<code>text/xml</code> or <code>application/xml</code>\r
+can also use the XML DOM. Elements and attributes will be returned in lower-case.\r
+Also, some XHTML elements may or may\r
+not appear\r
+in the object tree because they are optional in the content model\r
+(e.g. the <code>tbody</code> element within\r
+<code>table</code>).  This occurs because in HTML 4.0 some elements were\r
+permitted to be minimized such that their start and end tags are both omitted\r
+(an SGML feature).\r
+This is not possible in XML. Rather than require document authors to insert\r
+extraneous elements, XHTML has made the elements optional. \r
+Applications need to adapt to this\r
+accordingly.</li>\r
+</ol>\r
+\r
+<h2>C.12 Using Ampersands in Attribute Values</h2>\r
+<p>\r
+When an attribute value contains an ampersand, it must be expressed as a character\r
+entity reference\r
+(e.g. "<code>&amp;amp;</code>"). For example, when the\r
+<code>href</code> attribute\r
+of the <code>a</code> element refers to a\r
+CGI script that takes parameters, it must be expressed as\r
+<code>http://my.site.dom/cgi-bin/myscript.pl?class=guest&amp;amp;name=user</code>\r
+rather than as\r
+<code>http://my.site.dom/cgi-bin/myscript.pl?class=guest&amp;name=user</code>.\r
+</p>\r
+\r
+<h2>C.13 Cascading Style Sheets (CSS) and XHTML</h2>\r
+\r
+<p>The Cascading Style Sheets level 2 Recommendation [<a href="#ref-css2">CSS2</a>] defines style\r
+properties which are applied to the parse tree of the HTML or XML\r
+document.  Differences in parsing will produce different visual or\r
+aural results, depending on the selectors used. The following hints\r
+will reduce this effect for documents which are served without\r
+modification as both media types:</p>\r
+\r
+<ol>\r
+<li>\r
+CSS style sheets for XHTML should use lower case element and\r
+attribute names.</li>\r
+\r
+\r
+<li>In tables, the tbody element will be inferred by the parser of an\r
+HTML user agent, but not by the parser of an XML user agent. Therefore\r
+you should always explicitely add a tbody element if it is referred to\r
+in a CSS selector.</li>\r
+\r
+<li>Within the XHTML name space, user agents are expected to\r
+recognize the "id" attribute as an attribute of type ID.\r
+Therefore, style sheets should be able to continue using the\r
+shorthand "#" selector syntax even if the user agent does not read\r
+the DTD.</li>\r
+\r
+<li>Within the XHTML name space, user agents are expected to\r
+recognize the "class" attribute. Therefore, style sheets should be\r
+able to continue using the shorthand "." selector syntax.</li>\r
+\r
+<li>\r
+CSS defines different conformance rules for HTML and XML documents;\r
+be aware that the HTML rules apply to XHTML documents delivered as\r
+HTML and the XML rules apply to XHTML documents delivered as XML.</li>\r
+</ol>\r
+<!--OddPage-->\r
+<h1><a name="acks" id="acks">Appendix D.\r
+Acknowledgements</a></h1>\r
+\r
+<p><b>This appendix is informative.</b></p>\r
+\r
+<p>This specification was written with the participation of the\r
+members of the W3C HTML working group:</p>\r
+\r
+<dl>\r
+<dd>Steven Pemberton, CWI (HTML Working Group Chair)<br />\r
+Murray Altheim, Sun Microsystems<br />\r
+Daniel Austin, CNET: The Computer Network<br />\r
+Frank Boumphrey, HTML Writers Guild<br />\r
+John Burger, Mitre<br />\r
+Andrew W. Donoho, IBM<br />\r
+Sam Dooley, IBM<br />\r
+Klaus Hofrichter, GMD<br />\r
+Philipp Hoschka, W3C<br />\r
+Masayasu Ishikawa, W3C<br />\r
+Warner ten Kate, Philips Electronics<br />\r
+Peter King, Phone.com<br />\r
+Paula Klante, JetForm<br />\r
+Shin'ichi Matsui, W3C/Panasonic<br />\r
+Shane McCarron, Applied Testing and Technology (The Open Group through August\r
+1999)<br />\r
+Ann Navarro, HTML Writers Guild<br />\r
+Zach Nies, Quark<br />\r
+Dave Raggett, W3C/HP (W3C lead for HTML)<br />\r
+Patrick Schmitz, Microsoft<br />\r
+Sebastian Schnitzenbaumer, Stack Overflow<br />\r
+Chris Wilson, Microsoft<br />\r
+Ted Wugofski, Gateway 2000<br />\r
+Dan Zigmond, WebTV Networks</dd>\r
+</dl>\r
+\r
+<!--OddPage-->\r
+<h1><a name="refs" id="refs">Appendix E. References</a></h1>\r
+\r
+<p><b>This appendix is informative.</b></p>\r
+\r
+<dl>\r
+\r
+<dt><a name="ref-css2" id="ref-css2"><b>[CSS2]</b></a></dt>\r
+\r
+<dd><a href="http://www.w3.org/TR/REC-CSS2">"Cascading Style Sheets, level 2 (CSS2) Specification"</a>, B.\r
+Bos, H. W. Lie, C. Lilley, I. Jacobs, 12 May 1998.<br />\r
+Available at: <a href="http://www.w3.org/TR/REC-CSS2">\r
+http://www.w3.org/TR/REC-CSS2</a></dd>\r
+\r
+<dt><a name="ref-dom" id="ref-dom"><b>[DOM]</b></a></dt>\r
+\r
+<dd><a href="http://www.w3.org/TR/REC-DOM-Level-1">"Document Object Model (DOM) Level 1 Specification"</a>, Lauren\r
+Wood <i>et al.</i>, 1 October 1998.<br />\r
+Available at: <a href="http://www.w3.org/TR/REC-DOM-Level-1">\r
+http://www.w3.org/TR/REC-DOM-Level-1</a></dd>\r
+\r
+<dt><a name="ref-html4" id="ref-html4"><b>[HTML]</b></a></dt>\r
+\r
+<dd><a href="http://www.w3.org/TR/1999/PR-html40-19990824">"HTML 4.01 Specification"</a>, D. Raggett, A. Le&#160;Hors, I.\r
+Jacobs, 24 August 1999.<br />\r
+Available at: <a href="http://www.w3.org/TR/1999/PR-html40-19990824">\r
+http://www.w3.org/TR/1999/PR-html40-19990824</a></dd>\r
+\r
+<dt><a name="ref-posix" id="ref-posix"><b>[POSIX.1]</b></a></dt>\r
+\r
+<dd>"ISO/IEC 9945-1:1990 Information Technology - Portable\r
+Operating System Interface (POSIX) - Part 1: System Application\r
+Program Interface (API) [C Language]", Institute of Electrical\r
+and Electronics Engineers, Inc, 1990.</dd>\r
+\r
+<dt><a name="ref-rfc2046" id="ref-rfc2046"><b>\r
+[RFC2046]</b></a></dt>\r
+\r
+<dd><a href="http://www.ietf.org/rfc/rfc2046.txt">"RFC2046: Multipurpose Internet Mail Extensions (MIME) Part\r
+Two: Media Types"</a>, N. Freed and N. Borenstein, November\r
+1996.<br />\r
+Available at <a href="http://www.ietf.org/rfc/rfc2046.txt">\r
+http://www.ietf.org/rfc/rfc2046.txt</a>. Note that this RFC\r
+obsoletes RFC1521, RFC1522, and RFC1590.</dd>\r
+\r
+<dt><a name="ref-rfc2119" id="ref-rfc2119"><b>\r
+[RFC2119]</b></a></dt>\r
+\r
+<dd><a href="http://www.ietf.org/rfc/rfc2119.txt">"RFC2119: Key words for use in RFCs to Indicate Requirement\r
+Levels"</a>, S. Bradner, March 1997.<br />\r
+Available at: <a href="http://www.ietf.org/rfc/rfc2119.txt">\r
+http://www.ietf.org/rfc/rfc2119.txt</a></dd>\r
+\r
+<dt><a name="ref-rfc2376" id="ref-rfc2376"><b>\r
+[RFC2376]</b></a></dt>\r
+\r
+<dd><a href="http://www.ietf.org/rfc/rfc2376.txt">"RFC2376: XML Media Types"</a>, E. Whitehead, M. Murata, July\r
+1998.<br />\r
+Available at: <a href="http://www.ietf.org/rfc/rfc2376.txt">\r
+http://www.ietf.org/rfc/rfc2376.txt</a></dd>\r
+\r
+<dt><a name="ref-rfc2396" id="ref-rfc2396"><b>\r
+[RFC2396]</b></a></dt>\r
+\r
+<dd><a href="http://www.ietf.org/rfc/rfc2396.txt">"RFC2396: Uniform Resource Identifiers (URI): Generic\r
+Syntax"</a>, T. Berners-Lee, R. Fielding, L. Masinter, August\r
+1998.<br />\r
+This document updates RFC1738 and RFC1808.<br />\r
+Available at: <a href="http://www.ietf.org/rfc/rfc2396.txt">\r
+http://www.ietf.org/rfc/rfc2396.txt</a></dd>\r
+\r
+<dt><a name="ref-xml" id="ref-xml"><b>[XML]</b></a></dt>\r
+\r
+<dd><a href="http://www.w3.org/TR/REC-xml">"Extensible Markup Language (XML) 1.0 Specification"</a>, T.\r
+Bray, J. Paoli, C. M. Sperberg-McQueen, 10 February 1998.<br />\r
+Available at: <a href="http://www.w3.org/TR/REC-xml">\r
+http://www.w3.org/TR/REC-xml</a></dd>\r
+\r
+<dt><a name="ref-xmlns" id="ref-xmlns"><b>[XMLNAMES]</b></a></dt>\r
+\r
+<dd><a href="http://www.w3.org/TR/REC-xml-names">"Namespaces in XML"</a>, T. Bray, D. Hollander, A. Layman, 14\r
+January 1999.<br />\r
+XML namespaces provide a simple method for qualifying names used\r
+in XML documents by associating them with namespaces identified\r
+by URI.<br />\r
+Available at: <a href="http://www.w3.org/TR/REC-xml-names">\r
+http://www.w3.org/TR/REC-xml-names</a></dd>\r
+\r
+</dl>\r
+<p><a href="http://www.w3.org/WAI/WCAG1AAA-Conformance"\r
+title="Explanation of Level Triple-A Conformance">\r
+<img height="32" width="88" \r
+src="wcag1AAA.gif"\r
+alt="Level Triple-A conformance icon, W3C-WAI Web Content Accessibility Guidelines 1.0" /></a></p>\r
+<div class="navbar">\r
+  <hr />\r
+  <a href="#toc">table of contents</a> \r
+</div>\r
+</body>\r
+</html>\r
+\r
diff --git a/TC/testcase/res/UTsXml/valid/xlink.xml b/TC/testcase/res/UTsXml/valid/xlink.xml
new file mode 100755 (executable)
index 0000000..887e47d
--- /dev/null
@@ -0,0 +1,529 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<!DOCTYPE spec PUBLIC "-//W3C//DTD Specification::19990205//EN" "dtds/xmlspec.dtd" [\r
+<!ENTITY doc-type "WD">\r
+<!ENTITY iso6.doc.date '29-May-1999'>\r
+]>\r
+<!--ArborText, Inc., 1988-1998, v.4002-->\r
+<?Pub UDT _bookmark _target?>\r
+<?Pub Inc?>\r
+<?xml-stylesheet\r
+href="file:///C|/Program%20Files/SoftQuad/XMetaL%201/display/xmlspec.css"\r
+type="text/css"?>\r
+<spec>\r
+\r
+<!-- Last edited: 27 May 1999 by bent -->\r
+<header><?Pub Dtl?>\r
+       <title>XML Linking Language (XLink)</title>\r
+       <version>Version 1.0</version>\r
+       <w3c-designation><!-- &doc-type;-&iso6.doc.date; --> WD-xlink-19990527</w3c-designation>\r
+       <w3c-doctype>World Wide Web Consortium Working Draft</w3c-doctype>\r
+       <pubdate><day>29</day><month>May</month><year>1999</year></pubdate>\r
+       <notice>\r
+       <p>This draft is for public discussion.</p>\r
+       </notice>\r
+       <publoc><loc href="http://www.w3.org/XML/Group/1999/05/WD-xlink-current">http://www.w3.org/XML/Group/1999/05/WD-xlink-current</loc></publoc>\r
+       <prevlocs>\r
+       <!--Check: was it actually August?-->\r
+       <loc href="http://www.w3.org/XML/Group/1999/05/WD-xlink-19990527">http://www.w3.org/XML/Group/1999/05/WD-xlink-19990527</loc>\r
+       <loc href="http://www.w3.org/XML/Group/1999/05/WD-xlink-19990505">http://www.w3.org/XML/Group/1999/05/WD-xlink-19990505</loc>\r
+       <loc href="http://www.w3.org/TR/1998/WD-xlink-19980303">http://www.w3.org/TR/1998/WD-xlink-19980303</loc>\r
+       <loc href="http://www.w3.org/TR/WD-xml-link-970630">http://www.w3.org/TR/WD-xml-link-970630</loc></prevlocs>\r
+\r
+       <authlist>\r
+               <!--Updated author hrefs  dorchard-->\r
+               <!-- Update Steve's email - bent --> \r
+               <author>\r
+                       <name>Steve DeRose</name>\r
+                       <affiliation>Inso Corp. and Brown University</affiliation>\r
+                       <email href="mailto:Steven_DeRose@Brown.edu">Steven_DeRose@Brown.edu</email>\r
+               </author>\r
+               <author>\r
+                       <name>David Orchard</name>\r
+                       <affiliation>IBM Corp.</affiliation>\r
+                       <email href="mailto:dorchard@ca.ibm.com">dorchard@ca.ibm.com</email>\r
+               </author>\r
+               <author>\r
+                       <name>Ben Trafford</name>\r
+                       <affiliation>Invited Expert</affiliation>\r
+                       <email href="mailto:bent@exemplary.net">bent@exemplary.net</email>\r
+               </author>\r
+               <!-- I suggest we move Eve and Tim down to the Acknowledgements section. We\r
+               also ought to add Gabe Beged-Dov there, as well. bent\r
+               how shall we cite Tim? sjd What about with an Acknowledgments section?\r
+               -elm <AUTHOR> <NAME>Tim Bray</NAME> <AFFILIATION>Textuality</AFFILIATION>\r
+               <EMAIL>tbray@textuality.com</EMAIL> </AUTHOR>-->\r
+       </authlist>\r
+\r
+       <status>\r
+               <p>This is a W3C Working Draft for review by W3C members and other interested parties. It is a draft document and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use W3C Working Drafts as reference material or to cite them as other than "work in progress". A list of current W3C working drafts can be found at <loc href="http://www.w3.org/TR">http://www.w3.org/TR</loc>.</p>\r
+               <p><emph>Note:</emph> Since working drafts are subject to frequent change, you are advised to reference the above URI, rather than the URIs for working drafts themselves. Some of the work remaining is described in <specref ref="unfinished"/>. </p>\r
+               <p>This work is part of the W3C XML Activity (for current status, see <loc href="http://www.w3.org/MarkUp/SGML/Activity">http://www.w3.org/XML/Activity                   </loc>). For information about the XPointer language which is expected to be used with XLink, see <loc href="http://www.w3.org/MarkUp/SGML/Activity">http://www.w3.org/TR/WD-xptr</loc>.\r
+               </p>\r
+               <p>See <loc href="http://www.w3.org/TR/NOTE-xlink-principles">http://www.w3.org/TR/NOTE-xlink-principles </loc> for additional background on the design principles informing XLink.</p>\r
+               <p>Also see <loc href="http://www.w3.org/TR/NOTE-xlink-req/">http://www.w3.org/TR/NOTE-xlink-req/</loc> for the XLink requirements that this document attempts to satisfy.</p>\r
+       </status>\r
+\r
+       <abstract>\r
+               <!-- edited the abstract for further clarity - bent -->\r
+               <p>This specification defines constructs that may be inserted into XML DTDs, schemas and document instances to describe links between objects. It uses XML syntax to create structures that can describe the simple unidirectional hyperlinks of today's HTML as well as more sophisticated links.</p>\r
+       </abstract>\r
+\r
+       <pubstmt>\r
+               <p>Burlington, Seekonk, et al.: World-Wide Web Consortium, XML Working Group, 1998.</p>\r
+       </pubstmt>\r
+\r
+       <sourcedesc>\r
+               <p>Created in electronic form.</p>\r
+       </sourcedesc>\r
+\r
+       <langusage>\r
+               <language id="en">English</language>\r
+               <language id="ebnf">Extended Backus-Naur Form (formal grammar)</language>\r
+       </langusage>\r
+\r
+       <revisiondesc>\r
+               <slist>\r
+                       <sitem>1997-01-15 : Skeleton draft by TB</sitem>\r
+                       <sitem>1997-01-24 : Fleshed out by sjd</sitem>\r
+                       <sitem>1997-04-08 : Substantive draft</sitem>\r
+                       <sitem>1997-06-30 : Public draft</sitem>\r
+                       <sitem>1997-08-01 : Public draft</sitem>\r
+                       <sitem>1997-08-05 : Prose/organization work by sjd</sitem>\r
+                       <sitem>1997-10-14: Conformance and design principles; a bit of cleanup by elm</sitem>\r
+                       <sitem>1997-11-07: Update for editorial issues per issues doc, by sjd.</sitem>\r
+                       <sitem>1997-12-01: Update for editorial issues per issues doc in preparation for F2F meeting, by sjd.</sitem>\r
+                       <sitem>1998-01-13: Editorial cleanup, addition of new design principles, by elm.</sitem>\r
+                       <sitem>1998-02-27: Splitting out of XLink and XPointer, by elm.</sitem>\r
+                       <sitem>1998-03-03: Moved most of the XPointer locator stuff here. elm</sitem>\r
+                       <sitem>1999-04-24: Editorial rewrites to represent new ideas on XLink, especially the inclusion of arcs. bent</sitem>\r
+                       <sitem>1999-05-05: Prose/organization work by dorchard. Moved much of the semantics section around, from: locators, link semantics, remote resource semantics, local resource semantics; to: resource semantics, locators, behavior semantics, link semantics, arc semantics</sitem>\r
+                       <sitem>1999-05-12: Prose/organization work. Re-organized some of the sections, removed XML constructs from the document, added descriptive prose, edited document text for clarity. Rewrote the link recognition section. bent</sitem>\r
+                       <sitem>1999-05-17: Further prose work. Added non-normative examples. Clarified arcs. bent</sitem>\r
+                       <sitem>1999-05-23: Edited for grammar and clarity. bent</sitem>\r
+                       <sitem>1999-05-27: Final once-over before sending to group. Fixed sjd's email address. bent</sitem>\r
+               </slist>\r
+       </revisiondesc>\r
+</header>\r
+\r
+<body>\r
+       <div1><?Pub Dtl?>\r
+               <head>Introduction</head>\r
+               <p>This specification defines constructs that may be inserted into XML DTDs, schemas, and document instances to describe links between objects. A <termref def="dt-link">link</termref>, as the term is used here, is an explicit relationship between two or more data objects or portions of data objects. This specification is concerned with the syntax used to assert link existence and describe link characteristics. Implicit (unasserted) relationships, for example that of one word to the next or that of a word in a text to its entry in an on-line dictionary are obviously important, but outside its scope.</p>\r
+               <p>Links are asserted by <xtermref href="WD-xml-lang.html#dt-element">elements </xtermref> contained in <xtermref href="WD-xml-lang.html#dt-xml-doc">XML document instances</xtermref>. The simplest case is very like an HTML <code>A</code> link, and has these characteristics:\r
+                       <ulist>\r
+                               <item><p>The link is expressed at one of its ends (similar to the <code>A</code> element in some document)</p></item>\r
+                               <item><p>Users can only initiate travel from that end to the other</p></item>\r
+                               <item><p>The link's effect on windows, frames, go-back lists, stylesheets in use, and so on is mainly determined by browsers, not by the link itself. For example, traveral of <code>A</code> links normally replaces the current view, perhaps with a user option to open a new window.</p></item>\r
+                               <item><p>The link goes to only one destination (although a server may have great freedom in finding or dynamically creating that destination).</p></item>\r
+                       </ulist>\r
+               </p>\r
+               <p>While this set of characteristics is already very powerful and obviously has proven itself highly useful and effective, each of these assumptions also limits the range of hypertext functionality. The linking model defined here provides ways to create links that go beyond each of these specific characteristics, thus providing features previously available mostly in dedicated hypermedia systems.\r
+               </p>\r
+\r
+<div2>\r
+       <head>Origin and Goals</head>\r
+       <p>Following is a summary of the design principles governing XLink:\r
+               <olist>\r
+                       <item><p>XLink must be straightforwardly usable over the Internet. </p></item>\r
+                       <item><p>XLink must be usable by a wide variety of link usage domains and classes of linking application software.</p></item>\r
+                       <item><p>XLink must support HTML 4.0 linking constructs.</p></item>\r
+                       <item><p>The XLink expression language must be XML.</p></item>\r
+                       <item><p>The XLink design must be formal, concise, and illustrative.</p></item>\r
+                       <item><p>XLinks must be human-readable and human-writable.</p></item>\r
+                       <item><p>XLinks may reside within or outside the documents in which the\r
+                       participating resources reside. </p></item>\r
+                       <item><p>XLink must represent the abstract structure and significance of links.</p></item>\r
+                       <item><p>XLink must be feasible to implement.</p></item>\r
+                       <item><p>XLink must be informed by knowledge of established hypermedia systems and standards.</p></item>\r
+               </olist>\r
+       </p>\r
+</div2>\r
+<!--Changed the list of requirements to reflect current XLink requirements\r
+document. bent-->\r
+\r
+<div2>\r
+       <head>Relationship to Existing Standards</head>\r
+       <p>Three standards have been especially influential:\r
+               <ulist>\r
+                       <item><p><emph>HTML:</emph> Defines several SGML element types that represent links.</p></item>\r
+                       <item><p><emph>HyTime:</emph> Defines inline and out-of-line link structures and some semantic features, including traversal control and presentation of objects. <!--Changed from "placement of objects into a display or other space" -elm-->\r
+                       </p></item>\r
+                       <item><p><emph>Text Encoding Initiative Guidelines (TEI P3):</emph> Provides structures for creating links, aggregate objects, and link collections out of them.</p></item>\r
+               </ulist>\r
+       </p>\r
+       <p>Many other linking systems have also informed this design, especially Dexter, FRESS, MicroCosm, and InterMedia.</p>\r
+</div2>\r
+\r
+<div2>\r
+       <head>Terminology</head>\r
+       <p>The following basic terms apply in this document. <!--<IMG\r
+       SRC="local://./linkdiag.gif">(figure to be inserted)-->\r
+               <glist>\r
+                       <gitem>\r
+                       <label><termdef id="dt-arc" term="Arc">arc</termdef></label>\r
+                       <def><p>A symbolic representation of traversal behavior in links, especially the direction, context and timing of traversal.</p></def>\r
+                       </gitem>\r
+                       <gitem>\r
+                               <label><termdef id="dt-eltree" term="Element Tree">element tree</termdef></label>\r
+                               <def><p>A representation of the relevant structure specified by the tags and attributes in an XML document, based on "groves" as defined in the ISO DSSSL standard. </p></def>\r
+                       </gitem>\r
+                       <gitem>\r
+                               <label><termdef id="dt-inline" term="In-Line Link">inline link</termdef></label>\r
+                               <def><p>Abstractly, a <termref def="dt-link">link</termref> which serves as one of its own <termref def="dt-resource">resources</termref>. Concretely, a link where the content of the <termref def="dt-linkel">linking element</termref> serves as a <termref def="dt-particip-resource">participating resource</termref>.\r
+                               HTML <code>A</code>, HyTime <code>clink</code>, and TEI <code>XREF</code>\r
+                               are all inline links.</p></def>\r
+                       </gitem>\r
+                       <gitem>\r
+                               <label><termdef id="dt-link" term="Link">link</termdef></label>\r
+                               <def><p>An explicit relationship between two or more data objects or portions of data objects.</p></def>\r
+                       </gitem>\r
+                       <gitem>\r
+                               <label><termdef id="dt-linkel" term="Linking Element">linking element </termdef></label>\r
+                               <def><p>An <xtermref href="WD-xml-lang.html#dt-element">element</xtermref> that asserts the existence and describes the characteristics of a <termref def="dt-link"> link</termref>.</p></def>\r
+                       </gitem>\r
+                       <gitem>\r
+                               <label><termdef id="dt-local-resource" term="Local Resource">local resource</termdef></label>\r
+                               <def><p>The content of an <termref def="dt-inline">inline</termref>linking element. Note that the content of the linking element could be explicitly pointed to by means of a regular <termref def="dt-locator">locator</termref> in the same linking element, in which case the resource is considered <termref def="dt-remote-resource"> remote</termref>, not local.</p></def>\r
+                       </gitem>\r
+                       <gitem>\r
+                               <label><termdef id="dt-locator" term="Locator">locator</termdef> </label>\r
+                               <def><p>Data, provided as part of a link, which identifies a\r
+                               <termref def="dt-resource">resource</termref>.</p></def>\r
+                       </gitem>\r
+                       <gitem>\r
+                               <label><termdef id="dt-multidir" term="Multi-Directional Link">multidirectional link</termdef></label>\r
+                               <def><p>A <termref def="dt-link">link</termref> whose <termref def="dt-traversal"> traversal</termref> can be initiated from more than one of its <termref      def="dt-particip-resource"> participating resources</termref>. Note that being able to "go back" after following a one-directional link does not make the link multidirectional.</p></def>\r
+                       </gitem>\r
+                       <gitem>\r
+                               <label><termdef id="dt-outofline" term="Out-of-line Link">out-of-line link</termdef></label>\r
+                               <def><p>A <termref def="dt-link">link</termref> whose content does not serve as one of the link's <termref def="dt-particip-resource">participating resources </termref>. Such links                                            presuppose a notion like <termref def="dt-xlg">extended link groups</termref>, which instruct application software where to look for links. Out-of-line links are generally required for supporting multidirectional <termref def="dt-traversal">traversal</termref> and for allowing read-only resources to have outgoing links.</p></def>\r
+                       </gitem>\r
+                       <gitem>\r
+                               <label><termdef id="dt-parsedq" term="Parsed">parsed</termdef></label> <def><p>In the context of link behavior, a parsed link is any link                       whose content is transcluded into the document where the link originated. The   use of the term "parsed" directly refers to the concept in XML of a\r
+                               parsed entity.</p></def>\r
+                       </gitem>\r
+                       <gitem>\r
+                               <label><termdef id="dt-particip-resource" term="Participating Resource"> participating resource</termdef></label>\r
+                               <def><p>A <termref def="dt-resource">resource</termref> that belongs to a link. All resources are potential contributors to a link; participating       resources are the actual contributors to a particular link.</p></def>\r
+                       </gitem>\r
+                       <gitem>\r
+                               <label><termdef id="dt-remote-resource" term="Remote Resource">remote resource</termdef></label>\r
+                               <def><p>Any participating resource of a link that is pointed to with a locator. </p></def>\r
+                       </gitem>\r
+                       <gitem>\r
+                               <label><termdef id="dt-resource" term="Resource">resource</termdef></label>\r
+                               <def><p>In the abstract sense, an addressable unit of information or service that is participating in a <termref def="dt-link">link</termref>. Examples include files, images, documents, programs, and query results. Concretely, anything reachable by the use of a <termref def="dt-locator">locator</termref> in some <termref def="dt-linkel">linking      element</termref>. Note that this term and its definition are taken from the basic specifications governing the World Wide Web. <!--Joel notes: need link here. bent asks: A link?-->\r
+                                </p></def>\r
+                       </gitem>\r
+                       <gitem>\r
+                               <label><termdef id="dt-subresource" term="sub-Resource">sub-resource</termdef></label>\r
+                               <def><p>A portion of a resource, pointed to as the precise      destination of a link. As one example, a link might specify that an entire      document be retrieved and displayed, but that some specific part(s) of it is the specific linked data, to be treated in an application-appropriate manner such as indication by highlighting, scrolling, etc.</p></def>\r
+                       </gitem>\r
+                       <gitem>\r
+                               <label><termdef id="dt-traversal" term="Traversal">traversal</termdef></label>\r
+                               <def><p>The action of using a <termref def="dt-link">link</termref>; that is, of accessing a <termref def="dt-resource">resource</termref>. Traversal may be initiated by a user action (for example, clicking on the displayed content of a <termref def="dt-linkel">linking element</termref>) or occur under program control.</p></def>\r
+                       </gitem>\r
+               </glist>\r
+       </p>\r
+</div2>\r
+\r
+<div2>\r
+       <head>Notation</head>\r
+       <p>The formal grammar for <termref def="dt-locator">locators</termref> is given using a simple Extended Backus-Naur Form (EBNF) location, as described in <xspecref href="http://www.w3.org/TR/REC-xml#sec-notation">the XML specification</xspecref>.</p>\r
+       <!-- fixed link to XML spec - bent -->\r
+</div2>\r
+</div1>\r
+\r
+<div1 id="addressing"><?Pub Dtl?>\r
+       <head>Locator Syntax</head>\r
+       <p>The locator for a <termref def="dt-resource">resource</termref> is typically provided by means of a Uniform Resource Identifier, or URI. XPointers can be used in conjunction with the URI structure, as fragment identifiers, to specify a more precise sub-resource. </p>\r
+       <!-- Removed the discussion of queries from the previous paragraph, due to contention within the WG. bent -->\r
+       <p>A locator generally contains a URI, as described in IETF RFCs <bibref ref="rfc1738"/> and <bibref ref="rfc1808"/>. As these RFCs state, the URI may include a trailing <emph>query</emph> (marked by a leading "<code>?</code>"), and be followed by a "<code>#</code>" and a <emph>fragment identifier</emph>, with the query interpreted by the host providing the indicated resource, and the interpretation of the fragment identifier dependent on the data type of the indicated resource.</p>\r
+       <!--Is there some restriction on URNs having queries and/or fragment identifiers?  Since these RFCs don't mention URIs explicitly, should the wording here lead from URLs to URIs more explicitly? -elm-->\r
+       <p>In order to locate XML documents and portions of documents, a locator value may contain either a <xtermref href="http://www.w3.org/Addressing/rfc1738.txt"> URI</xtermref> or a fragment identifier, or both. Any fragment identifier for pointing into XML must be an <xtermref href="http://www.w3.org/TR/WD-xptr#dt-xpointer"> XPointer</xtermref>.</p>\r
+       <p>Special syntax may be used to request the use of particular processing models in accessing the locator's resource. This is designed to reflect the realities of network operation, where it may or may not be desirable to exercise fine control over the distribution of work between local and remote processors. \r
+               <scrap id="locator" lang="ebnf">\r
+                       <head>Locator</head>\r
+                       <prod id="nt-locator">\r
+                               <lhs>Locator</lhs>\r
+                               <rhs><nt def="nt-uri">URI</nt></rhs>\r
+                               <rhs>| <nt def="nt-connector">Connector</nt> (<xnt href="http://www.w3.org/TR/WD-xptr">XPointer</xnt> | <xnt href="WD-xml-lang.html#NT-Name">Name</xnt>)</rhs>\r
+                               <rhs>| <nt def="nt-uri">URI</nt> <nt def="nt-connector">Connector</nt> (<xnt href="http://www.w3.org/TR/WD-xptr">XPointer</xnt> | <xnt href="WD-xml-lang.html#NT-Name">Name</xnt>)</rhs>\r
+                       </prod>\r
+                       <prod id="nt-connector">\r
+                               <lhs>Connector</lhs><rhs>'#' | '|'</rhs>\r
+                       </prod>\r
+                       <prod id="nt-uri">\r
+                               <lhs>URI</lhs><rhs><xnt href="WD-xml-lang.html#NT-URLchar">URIchar*</xnt></rhs>\r
+                       </prod>\r
+               </scrap>\r
+       </p>\r
+       <p><termdef id="dt-designated" term="Designated Resource">In this discussion, the term <term>designated resource</term> refers to the resource which an entire locator serves to locate.</termdef> The following rules apply:\r
+               <ulist>\r
+                       <item>\r
+                               <p><termdef id="dt-containing-resource" term="Containing Resource">               The URI, if provided, locates a resource called the <term>containing resource</term>.</termdef></p>\r
+                       </item>\r
+                       <item>\r
+                               <p>If the URI is not provided, the containing resource is considered to be the document in which the linking element is contained. \r
+                               </p></item>\r
+                       <item>\r
+                               <p><termdef id="dt-sub-resource" term="Sub-Resource">If an XPointer                               is provided, the designated resource is a <term>sub-resource</term>\r
+                               of the containing resource; otherwise the designated resource is the\r
+                               containing resource.</termdef></p>\r
+                       </item>\r
+                       <!--Is this now incorrect, given the nature of the switch from here() to origin()? -elm \r
+                       Oy, yes, i think so. it will require some fun wording, though, so i haven't fixed it yet here -sjd-->\r
+                       <item>\r
+                               <p>If the <nt def="nt-connector">Connector</nt> is followed directly by a <xnt href="http://www.w3.org/TR/REC-xml#NT-Name">Name</xnt>, the <xnt href="http://www.w3.org/TR/REC-xml#NT-Name">Name</xnt> is shorthand for the XPointer"<code>id(Name)</code>"; that is, the sub-resource is the element in the containing resource that has an XML <xtermref href="http://www.w3.org/TR/REC-xml#sec-attrtypes">ID attribute</xtermref> whose value <xtermref href="http://www.w3.org/TR/REC-xml#dt-match">matches</xtermref> the                            <xnt href="http://www.w3.org/TR/REC-xml#NT-Name">Name</xnt>. This shorthand is to encourage use of the robust <code>id</code> addressing mode.</p>\r
+                       </item>\r
+                       <!-- fixed links to the XML recommendation - bent -->\r
+                       <item>\r
+                               <p>If the connector is "<code>#</code>", this signals an intent that the containing resource is to be fetched as a whole from the host that provides it, and that the XPointer processing to extract the sub-resource\r
+                               is to be performed on the client, that is to say on the same system where the linking element is recognized and processed.</p>\r
+                       </item>\r
+                       <item>\r
+                               <p>If the connector is "<code>|</code>", no intent is signaled as to what processing model is to be used to go about accessing the designated resource.</p>\r
+                       </item>\r
+               </ulist>\r
+       </p>\r
+       <p>Note that the definition of a URI includes an optional query component. </p>\r
+       <p>In the case where the URI contains a query (to be interpreted by the server), information providers and authors of server software are urged to use queries as follows: \r
+               <scrap id="querysyntax" lang="ebnf">\r
+                       <head>Query</head>\r
+                       <prod id="nt-query">\r
+                               <lhs>Query</lhs><rhs>'XML-XPTR=' (<xnt href="http://www.w3.org/TR/WD-xptr"> XPointer</xnt> | <xnt href="http://www.w3.org/TR/REC-xml#NT-Name">Name</xnt>)</rhs>\r
+                       </prod>\r
+               </scrap>\r
+       </p>\r
+       <!-- fixed link to XML recommendation - bent -->\r
+</div1>\r
+\r
+<div1><?Pub Dtl?>\r
+       <head>Link Recognition</head>\r
+       <p>The existence of a <termref def="dt-link">link</termref> is asserted by a <termref def="dt-linkel">linking element</termref>. Linking elements must be recognized reliably by application software in order to provide appropriate display and behavior. There are several ways link recognition could be accomplished: for example, reserving element type names, reserving attributes names, leaving the matter of recognition entirely up to stylesheets and application software, or using the XLink <xtermref href="http://www.w3.org/TR/REC-xml-names/">namespace</xtermref> to specify element names and attribute names that would be recognized by namespace and XLink-aware processors. Using element and attribute names within the XLink namespace provides a balance between giving users control of their own markup language design and keeping the identification of linking elements simple and unambiguous.</p>\r
+       <p>The two approaches to identifying linking elements are relatively simple to implement. For example, here's how the HTML <code>A</code> element would be declared using attributes within the XLink namespace, and then how an element within the XLink namespace might do the same:\r
+               <eg>&lt;A xlink:type="simple" xlink:href="http://www.w3.org/TR/wd-xlink/"\r
+xlink:title="The Xlink Working Draft"&gt;The XLink Working Draft.&lt;/A&gt;</eg>\r
+               <eg>&lt;xlink:simple href="http://www.w3.org/TR/wd-xlink/"\r
+title="The XLink Working Draft"&gt;The XLink Working Draft&lt;/xlink:simple&gt;</eg>\r
+       Any arbitrary element can be made into an XLink by using the <code>xlink:type</code> attribute. And, of course, the explicit XLink elements may be used, as well. This document will go on to describe the linking attributes that are associated with linking elements. It may be assumed by the reader that these attributes would require the <code>xlink</code> namespace prefix if they existed within an arbitrary element, or that they may be used directly if they exist within an explicit Xlink element.</p>\r
+               <!-- heavily modified this section to accomodate namespace-aware link recognition - bent -->\r
+</div1>\r
+\r
+<!-- Rewrote this entire section. - bent -->\r
+<div1>\r
+       <head>Linking Attributes</head>\r
+       <p>XLink has several attributes associated with the variety of links it may represent. These attributes define four main concepts: locators, arcs, behaviors, and semantics. <emph>Locators</emph> define where the actual resource is located. <emph>Arcs</emph> define the traversal of links. Where does the link come from? Where does it go to? All this information can be stored in the arc attributes. <emph>Behaviors</emph> define how the link is activated, and what the application should do with the resource being linked to. <emph>Semantics</emph> define useful information that the application may use, and enables the link for such specalized targets as constricted devices and accessibility software.</p>\r
+       \r
+       <div2 id="link-locators">\r
+               <head>Locator Attributes</head>\r
+               <p>The only locator attribute at this time is <code>href</code>. This attribute must contain either a string in the form of a URI that defines the remote resource being linked to, a string containing a fragment identifier that links to a local resource, or a string containing a URI with a fragment identifier concacenated onto it.</p>\r
+       </div2>\r
+\r
+       <div2 id="link-arcs">\r
+               <head>Arc Attributes</head>\r
+               <p>Arcs contain two attributes, <code>from</code> and <code>to</code>. The <code>from</code> attribute may contain a string containing the content of a <code>role</code> attribute from the resource being linked from. The purpose of the <code>from</code> attribute is to define where this link is being actuated from.</p>\r
+               <p>The <code>to</code> attribute may contain a string containing the content of a <code>role</code> attribute from the resource being linked to. The purpose of the <code>to</code> attribute is to define where this link traverses to.</p>\r
+               <p>The application may use this information in a number of ways, especially in a complex hypertext system, but it is mainly useful in providing context for application behavior.</p>\r
+               <!-- I'm at a loss as to how to describe arcs more clearly than this. I don't want to devolve into discussions of directed graphs and n-ary links. -bent -->\r
+       </div2>\r
+\r
+       <div2 id="link-behaviors">\r
+               <head>Behavior Attributes</head>\r
+               <p>There are two attributes associated with behavior: <code>show</code> and <code>actuate</code>. The <code>show</code> attribute defines how the remote resource is to be revealed to the user. It has three options: <code>new</code>, <code>parsed</code>, and <code>replace</code>. The <code>new</code> option indicates that the remote resource should be shown in a new window (or other device context) without replacing the previous content. The <code>parsed</code> option, relating directly to the XML concept of a parsed entity, indicates that the content should be integrated into the document from which the link was actuated. The <code>replace</code> option is the one most commonly seen on the World Wide Web, where the document being linked from is entirely replaced by the object being linked to.</p>\r
+               <p>The <code>actuate</code> attribute defines how the link is initiated. It has two options: <code>user</code> and <code>auto</code>. The <code>user</code> option indicates that the link must be initiated by some sort of human-initiated selection, such as clicking on an HTML anchor. The <code>auto</code> option indicates that the link is automatically initiated when the application deems that the user has reached the link. It then follows the behavior set out in the <code>show</code> option.</p>\r
+               <!-- Something should be put here in terms of an example. Idea: "A" link versus automatically updating encyclopedia. -bent -->\r
+       </div2>\r
+\r
+       <div2 id="link-semantics">\r
+               <head>Semantic Attributes</head>\r
+               <p>There are two attributes associated with semantics, <code>role</code> and <code>title</code>. The <code>role</code> attribute is a generic string used to describe the function of the link's content. For example, a poem might have a link with a <code>role="stanza"</code>. The <code>role</code> is also used as an identifier for the <code>from</code> and <code>to</code> attributes of arcs.</p>\r
+               <p>The <code>title</code> attribute is designed to provide human-readable text describing the link. It is very useful for those who have text-based applications, whether that be due to a constricted device that cannot display the link's content, or if it's being read by an application to a visually-impaired user, or if it's being used to create a table of links. The <code>title</code> attribute contains a simple, descriptive string.</p>\r
+       </div2>\r
+</div1>\r
+\r
+<div1 id="linking-elements">\r
+       <head>Linking Elements</head>\r
+       <p>There are several kinds of linking elements in XLink: <code>simple</code> links, <code>locators</code>, <code>arcs</code>, and <code>extended</code> links. These elements may be instantiated via element declarations from the XLink namespace, or they may be instantiated via attribute declarations from the XLink namespace. Both kinds of instantiation are described in the definition of each linking element.</p>\r
+       <p>The <code>simple</code> link is used to declare a link that approximates the functionality of the HTML <code>A</code> element. It has, however, a few added features to increase its value, including the potential declaration of semantics and behavior. The <code>locator</code> elements are used to define the resource being linked to. Some links may contain multiple locators, representing a choice of potential links to be traversed. The <code>arcs</code> are used to define the traversal semantics of the link. Finally, an <code>extended</code> linking element differs from a simple link in that it can connect any number of resources, not just one local resource (optionally) and one remote resource, and in that extended links are more often out-of-line than simple links.</p>\r
+\r
+<div2 id="simple-links">\r
+       <head>Simple Links</head>\r
+       <p id="dt-simplelink"><termdef id="dt-simpleline" term="Simple Link"><term>Simple links</term> can be used for purposes that approximate the functionality of a basic HTML <code>A</code> link, but they can also support a limited amount of additional functionality. Simple links have only one locator and thus, for convenience, combine the functions of a linking element and a locator into a single element.</termdef> As a result of this combination, the simple linking element offers both a locator attribute and all the behavior and semantic attributes.</p>\r
+       <p>The following are two examples of linking elements, each showing all the possible attributes that can be associated with a simple link. Here is the explicit XLink simple linking element.\r
+       <eg>&lt;!ELEMENT xlink:simple ANY&gt;\r
+&lt;!ATTLIST xlink:slink\r
+    href           CDATA                               #REQUIRED\r
+    role           CDATA                               #IMPLIED\r
+    title          CDATA                               #IMPLIED\r
+    show           (new|parsed|replace)        "replace"\r
+    actuate        (user|auto)                                 "user"\r
+&gt;</eg>\r
+       And here is how to make an arbitrary element into a simple link.\r
+       <eg>&lt;!ELEMENT xlink:simple ANY&gt;\r
+&lt;!ATTLIST foo\r
+       xlink:type     (simple|extended|locator|arc) #FIXED "simple"            \r
+    xlink:href     CDATA                               #REQUIRED\r
+    xlink:role     CDATA                               #IMPLIED\r
+    xlink:title    CDATA                               #IMPLIED\r
+    xlink:show     (new|parsed|replace)        "replace"\r
+    xlink:actuate  (user|auto)                                 "user"\r
+&gt;</eg>\r
+       Here is how the first example might look in a document:\r
+<eg>&lt;xlink:simple href="http://www.w3.org/TR/wd-xlink" role="working draft" \r
+       title="The XLink Working Draft" show="replace" actuate="user"&gt;\r
+The XLink Working Draft.&lt;/xlink:simple&gt;</eg>\r
+<eg>&lt;foo xlink:href="http://www.w3.org/TR/wd-xlink" xlink:role="working draft"\r
+       xlink:title="The XLink Working Draft" xlink:show="new" xlink:actuate="user"&gt;\r
+The XLink Working Draft.&lt;/foo&gt;</eg>\r
+       Alternately, a simple link could be as terse as this:\r
+<eg>&lt;foo xlink:href="#stanza1"&gt;The First Stanza.&lt;/foo&gt;</eg>\r
+       </p>\r
+       <p>\r
+       There are no constraints on the contents of a simple linking element. In\r
+       the sample declaration above, it is given a content model of <code>ANY</code>\r
+       to illustrate that any content model or declared content is acceptable. In\r
+       a valid document, every element that is significant to XLink must still conform\r
+       to the constraints expressed in its governing DTD.</p>\r
+       <p>Note that it is meaningful to have an out-of-line simple link, although\r
+       such links are uncommon. They are called "one-ended" and are typically used\r
+       to associate discrete semantic properties with locations. The properties might\r
+       be expressed by attributes on the link, the link's element type name, or in\r
+       some other way, and are not considered full-fledged resources of the link.\r
+       Most out-of-line links are extended links, as these have a far wider range\r
+       of uses.</p>\r
+</div2>\r
+\r
+<div2 id="extended-link">\r
+<head>Extended Links</head>\r
+       <p><termdef id="dt-extendedlink" term="Extended Link">An <term>extended link</term> differs from a simple link in that it can connect any number of resources, not just one local resource (optionally) and one remote resource, and in that extended links are more often out-of-line than simple links.</termdef></p>\r
+       <p>These additional capabilities of extended links are required for:  \r
+               <ulist>\r
+                       <item>\r
+                               <p>Enabling outgoing links in documents that cannot be modified to add an inline link</p>\r
+                       </item>\r
+                       <item>\r
+                               <p>Creating links to and from resources in formats with no native support for embedded links (such as most multimedia formats)</p>\r
+                       </item>\r
+                       <item>\r
+                               <p>Applying and filtering sets of relevant links on demand</p>\r
+                       </item>\r
+                       <item><p>Enabling other advanced hypermedia capabilities</p></item>\r
+               </ulist>\r
+       </p>\r
+       <p>Application software might be expected to provide traversal among all of a link's participating resources (subject to semantic constraints outside the scope of this specification) and to signal the fact that a given resource or sub-resource participates in one or more links when it is displayed (even though there is no markup at exactly that point to signal it).</p>\r
+       <p>A linking element for an extended link contains a series of <xtermref href="http://www.w3.org/TR/REC-xml/#dt-parentchild">child elements</xtermref> that serve as locators and arcs. Because an extended link can have more than one remote resource, it separates out linking itself from the mechanisms used to locate each resource (whereas a simple link combines the two).</p>\r
+       <p>The <code>xlink:type</code> attribute value for an extended link must be <code> extended</code>, if the link is being instantiated on an arbitrary element. Note that extended links introduce variants of the <code>show</code> and <code>actuate</code> behavior attributes. These attributes, the <code>showdefault</code> and <code>actuatedefault</code> define the same behavior as their counterparts. However, in this case, they are considered to define the default behavior for all the linking elements that they contain.</p>\r
+       <p>However, when a linking element within an extended link has a <code>show</code> or <code>actuate</code> attribute of its own, that attribute overrides the defaults set on the extended linking element.</p>\r
+       <p>The extended linking element itself retains those attributes relevant to the link as a whole, and to its local resource if any. Following are two sample declaration for an extended link. The first is an example of the explicit XLink extended link:\r
+       \r
+<eg>&lt;!ELEMENT xlink:extended ((xlink:arc | xlink:locator)*)>\r
+&lt;!ATTLIST xlink:extended\r
+       role           CDATA                                    #IMPLIED\r
+       title          CDATA                                    #IMPLIED\r
+       showdefault    (new|parsed|replace)     #IMPLIED \r
+    actuatedefault (user|auto)                                 #IMPLIED &gt;</eg>\r
+\r
+       The second is an example of an arbitrary element being used an extended link:\r
+\r
+<eg>&lt;!ELEMENT foo ((xlink:arc | xlink:locator)*)>\r
+&lt;!ATTLIST foo\r
+       xlink:type      (simple|extended|locator|arc)   #FIXED "extended"\r
+       xlink:role           CDATA                                      #IMPLIED\r
+       xlink:title          CDATA                                      #IMPLIED\r
+       xlink:showdefault    (new|parsed|replace)       #IMPLIED \r
+    xlink:actuatedefault (user|auto)                           #IMPLIED &gt;</eg>\r
+\r
+       The following two examples demonstrate how each of the above might appear within a document instance. Note that the content of these examples would be other elements. For brevity's sake, they've been left blank. The first example shows how the link might appear, using an explicit XLink extended link:\r
+\r
+<eg>&lt;xlink:extended role="address book" title="Ben's Address Book" showdefault="replace" actuatedefault="user"&gt; ... &lt;/xlink:extended&gt;</eg>\r
+\r
+       And the second shows how the link might appear, using an arbitrary element:\r
+\r
+<eg>&lt;foo xlink:type="extended" xlink:role="address book" xlink:title="Ben's Address Book" xlink:showdefault="replace" xlink:actuatedefault="user"&gt; ... &lt;/foo&gt;</eg>\r
+       </p>\r
+\r
+</div2>\r
+\r
+<div2 id="xlink-arcs">\r
+       <head>Arc Elements</head>\r
+       <p><termdef id="dt-arc" term="Arc">An <term>arc</term> is contained within an extended link for the purpose of defining traversal behavior.</termdef> More than one arc may be associated with a link. Otherwise, arc elements function exactly as the arc attributes might lead on to expect.</p>\r
+       <!-- More here? -bent -->\r
+</div2>\r
+\r
+</div1>\r
+<div1>\r
+<head>Conformance</head>\r
+<p>An element conforms to XLink if:  <olist>\r
+<item><p>The element has an <code>xml:link</code> attribute whose value is\r
+one of the attribute values prescribed by this specification, and</p></item>\r
+<item><p>the element and all of its attributes and content adhere to the\r
+syntactic\r
+requirements imposed by the chosen <code>xml:link</code> attribute value,\r
+as prescribed in this specification.</p></item>\r
+</olist></p>\r
+<p>Note that conformance is assessed at the level of individual elements,\r
+rather than whole XML documents, because XLink and non-XLink linking mechanisms\r
+may be used side by side in any one document.</p>\r
+<p>An application conforms to XLink if it interprets XLink-conforming elements\r
+according to all required semantics prescribed by this specification and,\r
+for any optional semantics it chooses to support, supports them in the way\r
+prescribed. <!--If/when we split out the XLinkfunctionality\r
+(e.g. inline links and out-of-line links), the\r
+conformance language will have to address the different\r
+levels of support. -elm--> </p>\r
+</div1>\r
+</body><back>\r
+<div1 id="unfinished">\r
+<head>Unfinished Work</head>\r
+<div2>\r
+<head>Structured Titles</head>\r
+<p>The simple title mechanism described in this draft is insufficient to cope\r
+with internationalization or the use of multimedia in link titles. A future\r
+version will provide a mechanism for the use of structured link titles.</p>\r
+</div2>\r
+</div1>\r
+<div1>\r
+<head>References</head>\r
+<blist>\r
+<bibl id="xptr" key="XPTR">Eve Maler and Steve DeRose, editors. <titleref>\r
+XML Pointer Language (XPointer) V1.0</titleref>. ArborText, Inso, and Brown\r
+University. Burlington, Seekonk, et al.: World Wide Web Consortium, 1998.\r
+(See <loc href="http://www.w3.org/TR/WD-xptr">http://www.w3.org/TR/WD-xptr\r
+ </loc>.)</bibl>\r
+<bibl id="iso10744" key="ISO/IEC 10744">ISO (International Organization for\r
+Standardization). <titleref>ISO/IEC 10744-1992 (E). Information technology\r
+- Hypermedia/Time-based Structuring Language (HyTime).</titleref> [Geneva]:\r
+International Organization for Standardization, 1992. <titleref>Extended\r
+Facilities\r
+Annex.</titleref> [Geneva]: International Organization for Standardization,\r
+1996. (See  <loc\r
+href="http://www.ornl.gov/sgml/wg8/hytime/html/is10744r.html">http://www.ornl.go\r
+v/sgml/wg8/hytime/html/is10744r.html </loc> <!--p m-r says this link is\r
+broken. elm --> ).</bibl>\r
+<bibl id="rfc1738" key="IETF RFC 1738">IETF (Internet Engineering Task\r
+Force). <titleref>\r
+RFC 1738: Uniform Resource Locators</titleref>. 1991. (See  <loc\r
+href="http://www.w3.org/Addressing/rfc1738.txt">\r
+http://www.w3.org/Addressing/rfc1738.txt</loc>).</bibl>\r
+<bibl id="rfc1808" key="IETF RFC 1808">IETF (Internet Engineering Task\r
+Force). <titleref>\r
+RFC 1808: Relative Uniform Resource Locators</titleref>. 1995. (See  <loc\r
+href="http://www.w3.org/Addressing/rfc1808.txt">http://www.w3.org/Addressing/rfc\r
+1808.txt </loc>).</bibl>\r
+<bibl id="tei" key="TEI">C. M. Sperberg-McQueen and Lou Burnard, editors.\r
+<titleref>\r
+Guidelines for Electronic Text Encoding and Interchange</titleref>. Association\r
+for Computers and the Humanities (ACH), Association for Computational\r
+Linguistics\r
+(ACL), and Association for Literary and Linguistic Computing (ALLC). Chicago,\r
+Oxford: Text Encoding Initiative, 1994. <!-- add cite to DOM work --> </bibl>\r
+<bibl id="chum" key="CHUM">]Steven J. DeRose and David G. Durand. 1995. "The\r
+TEI Hypertext Guidelines." In <titleref>Computing and the Humanities\r
+</titleref>29(3).\r
+Reprinted in <titleref>Text Encoding Initiative: Background and\r
+Context</titleref>,\r
+ed. Nancy Ide and Jean ronis <!-- fix this name -->, ISBN 0-7923-3704-2. </bibl>\r
+</blist></div1>\r
+</back></spec>\r
+<?Pub *0000052575?>\r
diff --git a/TC/testcase/tslist b/TC/testcase/tslist
new file mode 100755 (executable)
index 0000000..1395841
--- /dev/null
@@ -0,0 +1,26 @@
+/testcase/utc_libxml_Sax
+/testcase/utc_libxml_Error
+/testcase/utc_libxml_Hash
+/testcase/utc_libxml_HTMLParser
+/testcase/utc_libxml_HTMLtree
+/testcase/utc_libxml_ParserInternals
+/testcase/utc_libxml_XmlchValid
+/testcase/utc_libxml_XmlDict
+/testcase/utc_libxml_XmlEncoding
+/testcase/utc_libxml_XmlEntity
+/testcase/utc_libxml_XmlInclude
+/testcase/utc_libxml_XmlIo
+/testcase/utc_libxml_XmlList
+/testcase/utc_libxml_XmlParser
+/testcase/utc_libxml_XmlPattern
+/testcase/utc_libxml_XmlReader
+/testcase/utc_libxml_XmlSave
+/testcase/utc_libxml_XmlSchemas
+/testcase/utc_libxml_XmlString
+/testcase/utc_libxml_XmlTree
+/testcase/utc_libxml_XmlUnicode
+/testcase/utc_libxml_XmlUri
+/testcase/utc_libxml_Xmlvalid
+/testcase/utc_libxml_XmlWriter
+/testcase/utc_libxml_XmlXPath
+/testcase/utc_libxml_xpointer
diff --git a/TC/testcase/utc_libxml_Error.c b/TC/testcase/utc_libxml_Error.c
new file mode 100755 (executable)
index 0000000..3c5295d
--- /dev/null
@@ -0,0 +1,517 @@
+/*\r
+*  libxml test suite\r
+*\r
+* Copyright (c) 2012 Samsung Electronics Co., Ltd. All rights reserved.\r
+*\r
+* Contact: {Maintainer Name} <{Maintainer Email}>\r
+* \r
+* Licensed under the Apache License, Version 2.0 (the "License");\r
+* you may not use this file except in compliance with the License.\r
+* You may obtain a copy of the License at\r
+*\r
+* http://www.apache.org/licenses/LICENSE-2.0\r
+*\r
+* Unless required by applicable law or agreed to in writing, software\r
+* distributed under the License is distributed on an "AS IS" BASIS,\r
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+* See the License for the specific language governing permissions and\r
+* limitations under the License.\r
+*\r
+*/ \r
+\r
+#include "utc_libxml_include.h"\r
+\r
+\r
+//Global variables\r
+static int     MT_CHECK_FLAG   = 0;\r
+\r
+\r
+static void startup( void);\r
+static void cleanup( void);\r
+\r
+void (*tet_startup)( void) = startup;\r
+void (*tet_cleanup)( void) = cleanup;\r
+\r
+static void TestFunc( void* ctx, const char* msg, ...)\r
+{\r
+       va_list args;\r
+\r
+       va_start(args, msg);\r
+       printf(msg, args);\r
+       \r
+       va_end(args);\r
+\r
+    MT_CHECK_FLAG = XML_TRUE;\r
+}\r
+\r
+       /**    \r
+       * @test                 Dummy\r
+       * @brief                \r
+       * @desc                 \r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              \r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+\r
+static void Dummy( void)\r
+{\r
+}\r
+\r
+       /**    \r
+       * @test                 UTcInitGenericErrorDefaultFuncP01\r
+       * @brief                XMLPUBFUN void XMLCALL initGenericErrorDefaultFunc (xmlGenericErrorFunc *handler);\r
+       * @desc                 Positive Test for initGenericErrorDefaultFunc\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {NULL} => {N/A} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+\r
+static void\r
+UTcInitGenericErrorDefaultFuncP01( void)\r
+{\r
+       xmlGenericErrorFunc handler = TestFunc;                 // error handler\r
+       static void* ctx = NULL;\r
+\r
+       /**\r
+        * @remarks   input1: [N/A, N/A] @n\r
+        *            {xmlGenericErrorFunc handler} => {N/A | static void} @n\r
+        */\r
+       initGenericErrorDefaultFunc(NULL);\r
+       DTS_CHECK_NE_MESSAGE("initGenericErrorDefaultFunc", (void *)xmlGenericError, (void *)(NULL), "GenericError handler -> __XmlErrorLog[default]");\r
+}\r
+       \r
+       /**    \r
+       * @test                 UTcXmlSetGenericErrorFuncP01\r
+       * @brief                XMLPUBFUN void XMLCALL xmlSetGenericErrorFunc (void *ctx, xmlGenericErrorFunc handler)\r
+       * @desc                 Positive Test for xmlSetGenericErrorFunc\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Create a xmlGenericErrorFunc handler, N/A] @n\r
+       *                       {NULL, xmlGenericErrorFunc} => {N/A} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+\r
+static void\r
+UTcXmlSetGenericErrorFuncP01( void)\r
+{\r
+       xmlGenericErrorFunc handler = TestFunc;                                         // error handler\r
+       static void* ctx = NULL;\r
+       /**\r
+        * @remarks   input1: [N/A, N/A] @n\r
+        *            {parser context, xmlGenericErrorFunc handler} => {N/A | static void} @n\r
+        */\r
+       xmlSetGenericErrorFunc(ctx, handler);\r
+       DTS_CHECK_NE_MESSAGE("UTcXmlSetGenericErrorFuncP01", (void *)xmlGenericError, (void *)(NULL), "GenericError handler -> TestFunc");\r
+\r
+//     xmlGenericError(xmlGenericErrorContext, "xmlGenericError : %s, %s\n", "test1", "test2");\r
+//     DTS_CHECK_EQ_MESSAGE("UTcXmlSetGenericErrorFuncP01", (void *)MT_CHECK_FLAG, (void *)(XML_TRUE), "xmlSetGenericErrorFunc() Success");\r
+//     MT_CHECK_FLAG = XML_FALSE;\r
+\r
+}\r
+\r
+       /**    \r
+       * @test                 UTcXmlSetStructuredErrorFuncP01\r
+       * @brief                XMLPUBFUN void XMLCALL xmlSetStructuredErrorFunc (void *ctx, xmlStructuredErrorFunc handler)\r
+       * @desc                 Positive Test for xmlSetStructuredErrorFunc \r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Create a xmlGenericErrorFunc handler, N/A] @n\r
+       *                       {NULL, xmlGenericErrorFunc} => {N/A} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+\r
+static void\r
+UTcXmlSetStructuredErrorFuncP01( void)\r
+{\r
+       xmlStructuredErrorFunc handler  = NULL;                         // error handler\r
+       static void* ctx = NULL;\r
+\r
+       /**\r
+        * @remarks   input1: [N/A, N/A] @n\r
+        *            {parser context, xmlGenericErrorFunc handler} => {N/A | static void} @n\r
+        */\r
+       xmlSetStructuredErrorFunc(ctx, handler);\r
+       DTS_CHECK_EQ_MESSAGE("UTcXmlSetStructuredErrorFuncP01", (void *)1, (void *)(1), "xmlSetStructuredErrorFunc() Success");\r
+}\r
+       /**    \r
+       * @test                 UTcXmlParserPrintFileInfoP01\r
+       * @brief                XMLPUBFUN void XMLCALL xmlParserPrintFileInfo (xmlParserInputPtr input)\r
+       * @desc                 Positive Test for xmlParserPrintFileInfo\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {NULL} => {N/A} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+\r
+static void\r
+UTcXmlParserPrintFileInfoP01( void)\r
+{\r
+       xmlParserInputPtr input = NULL;                         // xmlParserInputPtr input\r
+\r
+       /**\r
+        * @remarks   input1: [N/A, N/A] @n\r
+        *            {xmlParserInputPtr instance} => {N/A | static void} @n\r
+        */\r
+       xmlParserPrintFileInfo(input);\r
+       DTS_CHECK_EQ_MESSAGE("UTcXmlParserPrintFileInfoP01", (void *)1, (void *)(1), "xmlParserPrintFileInfo() Success");\r
+}\r
+       /**    \r
+       * @test                 UTcXmlParserPrintFileContextP01\r
+       * @brief                XMLPUBFUN void XMLCALL xmlParserPrintFileContext (xmlParserInputPtr input)\r
+       * @desc                 Positive Test for xmlParserPrintFileContext\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {NULL} => {N/A} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+\r
+static void\r
+UTcXmlParserPrintFileContextP01( void)\r
+{\r
+\r
+       xmlParserInputPtr input = NULL;                         // xmlParserInputPtr input\r
+\r
+       /**\r
+        * @remarks   input1: [N/A, N/A] @n\r
+        *            {xmlParserInputPtr instance} => {N/A | static void} @n\r
+        */\r
+       xmlParserPrintFileContext(input);\r
+       DTS_CHECK_EQ_MESSAGE("UTcXmlParserPrintFileContextP01", (void *)1, (void *)(1), "xmlParserPrintFileContext() Success");\r
+}\r
+\r
+       /**    \r
+       * @test                 UTcXmlParserErrorP01\r
+       * @brief                XMLPUBFUN void XMLCALL xmlParserError (void *ctx, const char *msg, ...)\r
+       * @desc                 Positive Test for xmlParserError\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {NULL, char*("Error")} => {N/A} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+\r
+static void\r
+UTcXmlParserErrorP01( void)\r
+{\r
+       const char* msg = "Error";\r
+       xmlParserCtxtPtr ctxt = NULL;\r
+\r
+       /**\r
+        * @remarks   input1: [N/A, N/A, ...] @n\r
+        *            {parser context , "Error"} => {N/A | static void} @n\r
+        */\r
+       xmlParserError(ctxt , msg);\r
+       DTS_CHECK_EQ_MESSAGE("UTcXmlParserErrorP01", (void *)1, (void *)(1), "xmlParserError() Success");\r
+}\r
+\r
+       /**    \r
+       * @test                 UTcXmlParserWarningP01\r
+       * @brief                XMLPUBFUN void XMLCALL xmlParserWarning (void *ctx, const char *msg, ...)\r
+       * @desc                 Positive Test for xmlParserWarning\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {NULL, char*("Error")} => {N/A} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+\r
+static void\r
+UTcXmlParserWarningP01( void)\r
+{\r
+       const char* msg = "warning";\r
+       xmlParserCtxtPtr ctxt = NULL;\r
+\r
+       /**\r
+        * @remarks   input1: [N/A, N/A] @n\r
+        *            {parser context , "Error"} => {N/A | static void} @n\r
+        */\r
+       xmlParserWarning(ctxt, msg);\r
+       DTS_CHECK_EQ_MESSAGE("UTcXmlParserWarningP01", (void *)1, (void *)(1), "xmlParserWarning() Success");\r
+}\r
+\r
+       /**    \r
+       * @test                 UTcXmlParserValidityErrorP01\r
+       * @brief                XMLPUBFUN void XMLCALL xmlParserValidityError (void *ctx, const char *msg, ...)\r
+       * @desc                 Positive Test for xmlParserValidityError\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {NULL, char*("Error")} => {N/A} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+\r
+static void\r
+UTcXmlParserValidityErrorP01( void)\r
+{\r
+       const char* msg = "Error";\r
+       xmlParserCtxtPtr ctxt = NULL;\r
+\r
+\r
+       /**\r
+        * @remarks   input1: [N/A, N/A] @n\r
+        *            {parser context , "Error"} => {N/A | static void} @n\r
+        */\r
+       xmlParserValidityError(ctxt , msg);\r
+       DTS_CHECK_EQ_MESSAGE("UTcXmlParserValidityErrorP01", (void *)1, (void *)(1), "xmlParserValidityError() Success");\r
+}\r
+\r
+       /**    \r
+       * @test                 UTcXmlParserValidityWarningP01\r
+       * @brief                XMLPUBFUN void XMLCALL xmlParserValidityWarning (void *ctx, const char *msg, ...)\r
+       * @desc                 Positive Test for xmlParserValidityWarning\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {NULL, char*("Error")} => {N/A} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+\r
+static void\r
+UTcXmlParserValidityWarningP01( void)\r
+{\r
+       const char* msg = "Error";\r
+       xmlParserCtxtPtr ctxt = NULL;\r
+\r
+       /**\r
+        * @remarks   input1: [N/A, N/A] @n\r
+        *            {parser context , "Error"} => {N/A | static void} @n\r
+        */\r
+       xmlParserValidityWarning(ctxt , msg);\r
+       DTS_CHECK_EQ_MESSAGE("UTcXmlParserValidityWarningP01", (void *)1, (void *)(1), "xmlParserValidityWarning() Success");\r
+}\r
+\r
+       /**    \r
+       * @test                 UTcXmlGetLastErrorP01\r
+       * @brief                XMLPUBFUN xmlErrorPtr XMLCALL xmlGetLastError (void)\r
+       * @desc                 Positive Test for xmlGetLastError \r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {void} => {N/A | xmlErrorPtr instance} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+\r
+static void\r
+UTcXmlGetLastErrorP01( void)\r
+{\r
+       xmlErrorPtr pError = NULL;                                              // pointer to the error\r
+       /**\r
+        * @remarks   input1: [N/A, N/A] @n\r
+        *            {static void} => {xmlErrorPtr instance} @n\r
+        */\r
+       pError = xmlGetLastError();\r
+       DTS_CHECK_EQ_MESSAGE("UTcXmlGetLastErrorP01", (void *)pError, (void *)(NULL), "xmlGetLastError() Success");\r
+}\r
+       /**    \r
+       * @test                 UTcXmlResetErrorP01\r
+       * @brief                XMLPUBFUN void XMLCALL xmlResetError (xmlErrorPtr err)\r
+       * @desc                 Positive Test for xmlResetError\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {NULL} => {N/A} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+\r
+static void\r
+UTcXmlResetErrorP01( void)\r
+{\r
+       xmlErrorPtr err = NULL;                                                 // pointer to the error\r
+\r
+       /**\r
+        * @remarks   input1: [N/A, N/A] @n\r
+        *            {xmlErrorPtr instance} => {N/A | static void} @n\r
+        */\r
+       xmlResetError(err);\r
+       DTS_CHECK_EQ_MESSAGE("UTcXmlResetErrorP01", (void *)1, (void *)(1), "xmlResetError() Success");\r
+}\r
+       /**    \r
+       * @test                 UTcXmlResetLastErrorP01\r
+       * @brief                XMLPUBFUN void XMLCALL xmlResetLastError (void)\r
+       * @desc                 Positive Test for xmlResetLastError\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {void} => {N/A} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+\r
+static void\r
+UTcXmlResetLastErrorP01( void)\r
+{\r
+       /**\r
+        * @remarks   input1: [N/A, N/A] @n\r
+        *            {static void} => {N/A | static void} @n\r
+        */\r
+       xmlResetLastError();\r
+       DTS_CHECK_EQ_MESSAGE("UTcXmlResetLastErrorP01", (void *)1, (void *)(1), "xmlResetLastError() Success");\r
+}\r
+       /**    \r
+       * @test                 UTcXmlCtxtGetLastErrorP01\r
+       * @brief                XMLPUBFUN xmlErrorPtr XMLCALL xmlGetLastError (void)\r
+       * @desc                 Positive Test for xmlGetLastError\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {void} => {N/A | xmlErrorPtr instance} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+\r
+static void\r
+UTcXmlCtxtGetLastErrorP01( void)\r
+{\r
+       xmlErrorPtr xmlptr = NULL;                                              // pointer to the error\r
+\r
+       /**\r
+        * @remarks   input1: [N/A, N/A] @n\r
+        *            {XML parser context} => {N/A | xmlErrorPtr instance} @n\r
+        */\r
+       xmlptr = xmlGetLastError();\r
+       DTS_CHECK_EQ_MESSAGE("UTcXmlCtxtGetLastErrorP01", (void *)1, (void *)(1), "xmlGetLastError() Success");\r
+}\r
+       /**    \r
+       * @test                 UTcXmlCtxtResetLastErrorP01\r
+       * @brief                XMLPUBFUN void XMLCALL xmlCtxtResetLastError (void *ctx)\r
+       * @desc                 Positive Test for xmlCtxtResetLastError\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {NULL} => {N/A} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+\r
+static void\r
+UTcXmlCtxtResetLastErrorP01( void)\r
+{\r
+       static void* ctx = NULL;\r
+       /**\r
+        * @remarks   input1: [N/A, N/A] @n\r
+        *            {XML parser context} => {N/A | static void} @n\r
+        */\r
+       xmlCtxtResetLastError(ctx);\r
+       DTS_CHECK_EQ_MESSAGE("UTcXmlCtxtResetLastErrorP01", (void *)1, (void *)(1), "xmlCtxtResetLastError() Success");\r
+}\r
+\r
+       /**    \r
+       * @test                 UTcXmlCopyErrorP01\r
+       * @brief                XMLPUBFUN int XMLCALL xmlCopyError (xmlErrorPtr from, xmlErrorPtr to)\r
+       * @desc                 Positive Test for xmlCopyError\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {NULL, NULL} => {N/A | int} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+\r
+static void\r
+UTcXmlCopyErrorP01( void)\r
+{\r
+       int ret_val = 0;\r
+       xmlErrorPtr from = NULL;                                                // source error\r
+       xmlErrorPtr to = NULL;                                                  // target error\r
+\r
+       /**\r
+        * @remarks   input1: [N/A, N/A] @n\r
+        *            {xmlErrorPtr instance for source error , xmlErrorPtr instance for destination error } => @n\r
+                                 {N/A | 0} @n\r
+        */\r
+       ret_val = xmlCopyError(from, to);\r
+       DTS_CHECK_EQ_MESSAGE("UTcXmlCopyErrorP01", (void *)1, (void *)(1), "xmlCopyError() Success");\r
+}\r
+\r
+static void startup( void)\r
+{\r
+        /* start of TC */\r
+        tet_printf("TC starts.");\r
+}\r
+\r
+static void cleanup( void)\r
+{\r
+        /* end of TC */\r
+        tet_printf("TC ends.");\r
+}\r
+\r
+\r
+\r
+\r
+struct tet_testlist tet_testlist[] = {\r
+       // Handling of out of context errors\r
+       //{Dummy, 1},\r
+       {UTcInitGenericErrorDefaultFuncP01, 2},\r
+       {UTcXmlSetGenericErrorFuncP01, 3},\r
+       {UTcXmlSetStructuredErrorFuncP01, 4},\r
+\r
+       // Handling of parsing errors\r
+       {UTcXmlParserPrintFileInfoP01, 5},\r
+       {UTcXmlParserPrintFileContextP01, 6},\r
+       {UTcXmlParserErrorP01, 7},\r
+       {UTcXmlParserWarningP01, 8},\r
+\r
+       // Handling of validation errors\r
+       {UTcXmlParserValidityErrorP01, 9},\r
+       {UTcXmlParserValidityWarningP01, 10},\r
+\r
+       // Handling of Extended Error\r
+       {UTcXmlGetLastErrorP01, 11},\r
+       {UTcXmlResetErrorP01, 12},\r
+       {UTcXmlResetLastErrorP01, 13},\r
+       {UTcXmlCtxtGetLastErrorP01, 14},\r
+       {UTcXmlCtxtResetLastErrorP01, 15},\r
+       {UTcXmlCopyErrorP01, 16},\r
+       { NULL, 0 },\r
+       \r
+};\r
+\r
diff --git a/TC/testcase/utc_libxml_HTMLParser.c b/TC/testcase/utc_libxml_HTMLParser.c
new file mode 100755 (executable)
index 0000000..badae28
--- /dev/null
@@ -0,0 +1,2175 @@
+/*\r
+*  libxml test suite\r
+*\r
+* Copyright (c) 2012 Samsung Electronics Co., Ltd. All rights reserved.\r
+*\r
+* Contact: {Maintainer Name} <{Maintainer Email}>\r
+* \r
+* Licensed under the Apache License, Version 2.0 (the "License");\r
+* you may not use this file except in compliance with the License.\r
+* You may obtain a copy of the License at\r
+*\r
+* http://www.apache.org/licenses/LICENSE-2.0\r
+*\r
+* Unless required by applicable law or agreed to in writing, software\r
+* distributed under the License is distributed on an "AS IS" BASIS,\r
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+* See the License for the specific language governing permissions and\r
+* limitations under the License.\r
+*\r
+*/ \r
+\r
+#include "utc_libxml_include.h"\r
+\r
+\r
+/***************************************************************************\r
+* SUTsXmlWriter\r
+***************************************************************************/\r
+#define MY_ENCODING "ISO-8859-1"\r
+\r
+                    //Target\r
+#define        OUTFILE1        UTSHOME"/writer1.res"\r
+#define        OUTFILE2        UTSHOME"/missing.xml"\r
+#define        OUTFILE3        UTSHOME"/test.out"\r
+\r
+\r
+/******************************************************************************************/\r
+/******************************************************************************************/\r
+\r
+static htmlDocPtr api_doc = NULL;\r
+//static htmlDtdPtr api_dtd = NULL;\r
+static htmlNodePtr api_root = NULL;\r
+//static htmlAttrPtr api_attr = NULL;\r
+//static htmlNsPtr api_ns = NULL;\r
+\r
+static int call_tests = 0;\r
+static int inttab[1024];\r
+static xmlChar chartab[1024];\r
+/********************************************************************************************/\r
+/********************************************************************************************/\r
+#define gen_nb_const_xmlChar_ptr1 1\r
+#define gen_nb_const_htmlElemDesc_ptr 1\r
+#define gen_nb_const_htmlElemDesc_ptr1 2\r
+#define gen_nb_int 4\r
+#define gen_nb_htmlDocPtr 3\r
+#define gen_nb_htmlNodePtr 1\r
+#define gen_nb_htmlNodePtr1 2\r
+#define gen_nb_const_char_ptr 2\r
+#define gen_nb_const_char_ptr2 4\r
+#define gen_nb_htmlSAXHandlerPtr 1\r
+#define gen_nb_userdata 3\r
+#define gen_nb_fileoutput 6\r
+#define gen_nb_xmlCharEncoding 4\r
+#define gen_nb_htmlParserCtxtPtr 3\r
+#define gen_nb_const_xmlChar_ptr 5\r
+#define gen_nb_filepath 8\r
+#define gen_nb_unsigned_char_ptr 1\r
+#define gen_nb_int_ptr 2\r
+#define gen_nb_const_unsigned_char_ptr 1\r
+#define gen_nb_const_htmlNodePtr1 2\r
+#define gen_nb_unsigned_int 3\r
+#define gen_nb_unsigned_int1 4\r
+#define gen_nb_xmlChar_ptr 2\r
+#define gen_nb_const_xmlChar_ptr_ptr 1\r
+/*******************************************************************************************/\r
+/*******************************************************************************************/\r
+static void\r
+free_api_doc(void) {\r
+   // htmlFreeDoc(api_doc);\r
+    api_doc = NULL;\r
+    //api_dtd = NULL;\r
+    api_root = NULL;\r
+   // api_attr = NULL;\r
+   // api_ns = NULL;\r
+}\r
+\r
+static htmlDocPtr\r
+get_api_doc(void) {\r
+    if (api_doc == NULL) {\r
+        api_doc = htmlReadMemory("<!DOCTYPE root [<!ELEMENT root EMPTY>]><root xmlns:h='http://example.com/' h:foo='bar'/>", 88, "root_test", NULL, 0);\r
+       api_root = NULL;\r
+       //api_attr = NULL;\r
+    }\r
+    return(api_doc);\r
+}\r
+\r
+static htmlNodePtr\r
+get_api_root_NodeStatus(void) {\r
+    if ((api_root == NULL) || (api_root->type != XML_ELEMENT_NODE)) {\r
+       get_api_doc();\r
+       if ((api_doc != NULL) && (api_doc->children != NULL) &&\r
+           (api_doc->children->next != NULL) &&\r
+           (api_doc->children->next->type == XML_ELEMENT_NODE))\r
+       {\r
+               api_doc->children->next->type = XML_CDATA_SECTION_NODE;\r
+           api_root = api_doc->children->next;\r
+       }\r
+    }\r
+\r
+\r
+    return(api_root);\r
+}\r
+\r
+static htmlNodePtr\r
+get_api_root(void) {\r
+    if ((api_root == NULL) || (api_root->type != XML_ELEMENT_NODE)) {\r
+        get_api_doc();\r
+       if ((api_doc != NULL) && (api_doc->children != NULL) &&\r
+           (api_doc->children->next != NULL) &&\r
+           (api_doc->children->next->type == XML_ELEMENT_NODE))\r
+           api_root = api_doc->children->next;\r
+    }\r
+    return(api_root);\r
+}\r
+\r
+\r
+static const htmlElemDesc * gen_const_htmlElemDesc_ptr_AttrAllowed(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+    if(no == 0) return((htmlTagLookup((xmlChar *)"script")));\r
+       return(NULL);\r
+}\r
+\r
+static const htmlElemDesc * gen_const_htmlElemDesc_ptr_ElementAllowedHere(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+    if(no == 0) return((htmlTagLookup((xmlChar *)"form")));\r
+       return(NULL);\r
+}\r
+\r
+static const htmlElemDesc * gen_const_htmlElemDesc_ptr_ElementStatusHere(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+    if(no == 0) return((htmlTagLookup((xmlChar *)"script")));\r
+    if(no == 1) return((htmlTagLookup((xmlChar *)"form")));\r
+       return(NULL);\r
+}\r
+\r
+static const xmlChar * gen_htmlTagLookup_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+    if(no == 0) return((xmlChar *)"a");\r
+    if(no == 1) return((xmlChar *)"samsung");\r
+       return(NULL);\r
+}\r
+\r
+static htmlElemDesc * gen_const_htmlElemDesc_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+    //if(no == 0) return((htmlTagLookup((xmlChar *)"script")));\r
+       return(NULL);\r
+}\r
+static void des_const_htmlElemDesc_ptr(int no ATTRIBUTE_UNUSED, const htmlElemDesc * val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+}\r
+\r
+static void des_const_xmlChar_ptr(int no ATTRIBUTE_UNUSED, const xmlChar *val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+}\r
+\r
+static void des_int(int no ATTRIBUTE_UNUSED, int val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+}\r
+\r
+static xmlChar *gen_const_xmlChar_ptr(int no, int nr ATTRIBUTE_UNUSED) {\r
+    if (no == 0) return((xmlChar *) "foo");\r
+    if (no == 1) return((xmlChar *) "<foo/>");\r
+    if (no == 2) return((xmlChar *) "n?e");\r
+    if (no == 3) return((xmlChar *) " 2ab ");\r
+    return(NULL);\r
+}\r
+\r
+static xmlChar *gen_const_xmlChar_ptr_ScriptAttribute(int no, int nr ATTRIBUTE_UNUSED) {\r
+    if (no == 0) return((xmlChar *) "foo");\r
+    if (no == 1) return((xmlChar *) "<foo/>");\r
+    if (no == 2) return((xmlChar *) "n?e");\r
+    if (no == 3) return((xmlChar *) " 2ab ");\r
+    if (no == 4) return((xmlChar *) "onclick");\r
+    return(NULL);\r
+}\r
+\r
+static xmlChar *gen_const_xmlChar_ptr_AttrAllowed(int no, int nr ATTRIBUTE_UNUSED) {\r
+    if (no == 0) return((xmlChar *) "foo");\r
+    if (no == 1) return((xmlChar *) "<foo/>");\r
+    if (no == 2) return((xmlChar *) "n?e");\r
+    if (no == 3) return((xmlChar *) " 2ab ");\r
+    if (no == 4) return((xmlChar *) "type");\r
+    return(NULL);\r
+}\r
+\r
+static xmlChar *gen_const_xmlChar_ptr_htmlElementAllowedHere(int no, int nr ATTRIBUTE_UNUSED) {\r
+    if (no == 0) return((xmlChar *) "foo");\r
+    if (no == 1) return((xmlChar *) "<foo/>");\r
+    if (no == 2) return((xmlChar *) "n?e");\r
+    if (no == 3) return((xmlChar *) " 2ab ");\r
+    if (no == 4) return((xmlChar *) "pre");\r
+    return(NULL);\r
+}\r
+\r
+static xmlChar *gen_const_xmlChar_ptr_EntityLookup(int no, int nr ATTRIBUTE_UNUSED) {\r
+    if (no == 0) return((xmlChar *) "foo");\r
+    if (no == 1) return((xmlChar *) "<foo/>");\r
+    if (no == 2) return((xmlChar *) "n?e");\r
+    if (no == 3) return((xmlChar *) " 2ab ");\r
+    if (no == 4) return((xmlChar *) "amp");\r
+    return(NULL);\r
+}\r
+static int gen_int(int no, int nr ATTRIBUTE_UNUSED) {\r
+    if (no == 0) return(0);\r
+    if (no == 1) return(1);\r
+    if (no == 2) return(-1);\r
+    if (no == 3) return(122);\r
+    return(-1);\r
+}\r
+\r
+static htmlDocPtr gen_htmlDocPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+    //if (no == 0) return(htmlNewDoc(NULL, NULL));\r
+    //if (no == 0) return(htmlNewDocNoDtD(NULL, NULL));\r
+    if (no == 0) return(htmlNewDoc(NULL, NULL));\r
+    if (no == 1) return(htmlReadMemory("<html/>", 7, "test", NULL, 0));\r
+    return(NULL);\r
+}\r
+static void desret_htmlStatus(htmlStatus val ATTRIBUTE_UNUSED) {\r
+}\r
+\r
+static htmlNodePtr gen_htmlNodePtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+    //if(no == 1){return(get_api_root());}\r
+       return(NULL);\r
+}\r
+static htmlNodePtr gen_htmlNodePtr_AutoCloseTag(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+    //if(no == 1){return(get_api_root());}\r
+       //if(no == 0) return(get_api_root());\r
+       return(NULL);\r
+}\r
+static void des_htmlDocPtr(int no ATTRIBUTE_UNUSED, htmlDocPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+    if ((val != NULL) && (val != api_doc) && (val->doc != api_doc))\r
+        xmlFreeDoc(val);\r
+}\r
+static void des_htmlNodePtr(int no ATTRIBUTE_UNUSED, htmlNodePtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+}\r
+\r
+static char *gen_const_char_ptr(int no, int nr ATTRIBUTE_UNUSED) {\r
+    if (no == 0) return((char *) "foo");\r
+    if (no == 1) return((char *) "<foo/>");\r
+    if (no == 2) return((char *) "test/ent2");\r
+    return(NULL);\r
+}\r
+\r
+static htmlSAXHandlerPtr gen_htmlSAXHandlerPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+    return(NULL);\r
+}\r
+\r
+static void *gen_userdata(int no, int nr ATTRIBUTE_UNUSED) {\r
+    if (no == 0) return((void *) &call_tests);\r
+    if (no == 1) return((void *) -1);\r
+    return(NULL);\r
+}\r
+\r
+static xmlCharEncoding gen_xmlCharEncoding(int no, int nr ATTRIBUTE_UNUSED) {\r
+    if (no == 0) return(XML_CHAR_ENCODING_UTF8);\r
+    if (no == 1) return(XML_CHAR_ENCODING_NONE);\r
+    if (no == 2) return(XML_CHAR_ENCODING_8859_1);\r
+    return(XML_CHAR_ENCODING_ERROR);\r
+}\r
+\r
+static void desret_htmlParserCtxtPtr(htmlParserCtxtPtr val) {\r
+    if (val != NULL)\r
+        htmlFreeParserCtxt(val);\r
+}\r
+\r
+static void des_htmlSAXHandlerPtr(int no ATTRIBUTE_UNUSED, htmlSAXHandlerPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+}\r
+\r
+static void des_userdata(int no ATTRIBUTE_UNUSED, void *val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+}\r
+\r
+static void des_const_char_ptr(int no ATTRIBUTE_UNUSED, const char *val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+}\r
+\r
+static void des_fileoutput(int no ATTRIBUTE_UNUSED, const char *val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+}\r
+\r
+static void des_xmlCharEncoding(int no ATTRIBUTE_UNUSED, xmlCharEncoding val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+}\r
+static void desret_int(int val ATTRIBUTE_UNUSED) {\r
+}\r
+\r
+static unsigned char * gen_unsigned_char_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+    if(no == 0)return ((unsigned char*)"samsung");\r
+       return(NULL);\r
+}\r
+static htmlParserCtxtPtr gen_htmlParserCtxtPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+    if (no == 0) return(xmlNewParserCtxt());\r
+    return(NULL);\r
+}\r
+\r
+static htmlParserCtxtPtr gen_htmlParserCtxtPtr_ParseDocument(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+\r
+       if (no == 0) return(xmlNewParserCtxt());\r
+    if (no == 1) return(htmlCreateMemoryParserCtxt("<html/>", 7));\r
+    if (no == 2)\r
+    {\r
+       htmlParserCtxtPtr CtxtPtr;\r
+       CtxtPtr = htmlCreateMemoryParserCtxt("<html/>", 7);\r
+       CtxtPtr->wellFormed = 0;\r
+       return CtxtPtr;\r
+    }\r
+    return(NULL);\r
+}\r
+\r
+\r
+static const char *gen_filepath(int no, int nr ATTRIBUTE_UNUSED) {\r
+    if (no == 0) return(MISSINGXML);\r
+    if (no == 1) return("<foo/>");\r
+              //Target\r
+    if (no == 2) return(ENT2);\r
+    if (no == 3) return(RECxml19980210);\r
+    if (no == 4) return(XHTML1STRICTDTD);\r
+\r
+    if (no == 5) return(REMOTE1GOOD);\r
+    if (no == 6) return(REMOTE1BAD);\r
+    return(NULL);\r
+}\r
+\r
+static htmlParserCtxtPtr gen_htmlParserCtxtPtr_1(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+\r
+       if (no == 0) return(xmlNewParserCtxt());\r
+    if (no == 1) return(htmlCreateMemoryParserCtxt("<html/>", 7));\r
+    if (no == 2)\r
+    {\r
+       const char *char1;\r
+       htmlParserCtxtPtr CtxtPtr;\r
+       xmlParserCtxtPtr xmlCtxtPtr = NULL;\r
+       CtxtPtr = htmlCreateMemoryParserCtxt("<html/>", 7);\r
+       return CtxtPtr;\r
+    }\r
+    return(NULL);\r
+}\r
+static void desret_htmlDocPtr(htmlDocPtr val) {\r
+    if ((val != NULL) && (val != api_doc) && (val->doc != api_doc))\r
+        xmlFreeDoc(val);\r
+}\r
+\r
+static void des_htmlParserCtxtPtr(int no ATTRIBUTE_UNUSED, htmlParserCtxtPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+    if (val != NULL)\r
+        htmlFreeParserCtxt(val);\r
+}\r
+\r
+static void des_filepath(int no ATTRIBUTE_UNUSED, const char *val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+}\r
+\r
+static int *gen_int_ptr(int no, int nr) {\r
+    if (no == 0) return(&inttab[nr]);\r
+    return(NULL);\r
+}\r
+\r
+static unsigned char * gen_const_unsigned_char_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+    if(no == 0) return((unsigned char*)"samsung");\r
+       return(NULL);\r
+}\r
+static void des_const_unsigned_char_ptr(int no ATTRIBUTE_UNUSED, const unsigned char * val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+}\r
+\r
+static void des_int_ptr(int no ATTRIBUTE_UNUSED, int *val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+}\r
+\r
+static void des_unsigned_char_ptr(int no ATTRIBUTE_UNUSED, unsigned char * val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+}\r
+\r
+static htmlNodePtr gen_const_htmlNodePtr_NodeStatus(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+       if(no == 0) return(get_api_root_NodeStatus());\r
+       return(NULL);\r
+}\r
+\r
+static void des_const_htmlNodePtr(int no ATTRIBUTE_UNUSED, const htmlNodePtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+}\r
+\r
+static void desret_const_htmlEntityDesc_ptr(const htmlEntityDesc * val ATTRIBUTE_UNUSED) {\r
+}\r
+\r
+static unsigned int gen_unsigned_int(int no, int nr ATTRIBUTE_UNUSED) {\r
+    if (no == 0) return(0);\r
+    if (no == 1) return(1);\r
+    if (no == 2) return(122);\r
+    return((unsigned int) -1);\r
+}\r
+static unsigned int gen_unsigned_int_EntityValueLookup(int no, int nr ATTRIBUTE_UNUSED) {\r
+    if (no == 0) return(0);\r
+    if (no == 1) return(1);\r
+    if (no == 2) return(122);\r
+    if (no == 3) return(34);\r
+    return((unsigned int) -1);\r
+}\r
+\r
+static void des_unsigned_int(int no ATTRIBUTE_UNUSED, unsigned int val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+}\r
+\r
+static xmlChar *gen_xmlChar_ptr_ParseDoc(int no, int nr ATTRIBUTE_UNUSED) {\r
+    if (no == 0) return(&chartab[0]);\r
+   if (no == 1) return((xmlChar *) "samsung");\r
+    return(NULL);\r
+}\r
+\r
+static void des_xmlChar_ptr(int no ATTRIBUTE_UNUSED, xmlChar *val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+}\r
+\r
+static xmlChar ** gen_const_xmlChar_ptr_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+    return(NULL);\r
+}\r
+\r
+static void des_const_xmlChar_ptr_ptr(int no ATTRIBUTE_UNUSED, const xmlChar ** val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+}\r
+\r
+static xmlChar *gen_xmlChar_ptr(int no, int nr ATTRIBUTE_UNUSED) {\r
+\r
+       memset(chartab, 0, sizeof(chartab));\r
+       strncpy((char *) chartab, "  chartab\n", 20);\r
+    if (no == 0) return(&chartab[0]);\r
+    return(NULL);\r
+}\r
+/******************************************************************************************/\r
+/******************************************************************************************/\r
+\r
+       /**\r
+       * @test                 UTcHtmlAttrAllowedP01\r
+       * @brief                htmlStatus htmlAttrAllowed(const htmlElemDesc* elt, const xmlChar* attr, int legacy)\r
+       * @desc                 Positive and Negative Test for htmlAttrAllowed\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Sathish Kumar (satish.k4@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlTextWriterPtr(htmlElemDesc(html_emt_ptr),xmlChar(val_char),int(1)} => {N/A | htmlStatus(ret_html_status)} @n\r
+\r
+                                       input1: [N/A, N/A] @n\r
+       *                       {xmlTextWriterPtr(htmlElemDesc(html_emt_ptr),xmlChar(val_char),int(1)} => {N/A | htmlStatus(ret_html_status)} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+\r
+static void UTcHtmlAttrAllowedP01()\r
+{\r
+           int test_ret = 0;\r
+           htmlStatus ret_val;\r
+           const htmlElemDesc * elt; /* HTML element */\r
+           int n_elt;\r
+           xmlChar * attr; /* HTML attribute */\r
+           int n_attr;\r
+           int legacy; /* whether to allow deprecated attributes */\r
+           int n_legacy;\r
+           for (n_elt = 0;n_elt < gen_nb_const_htmlElemDesc_ptr;n_elt++) {\r
+           for (n_attr = 0;n_attr < gen_nb_const_xmlChar_ptr;n_attr++) {\r
+           for (n_legacy = 0;n_legacy < gen_nb_int;n_legacy++) {\r
+\r
+               elt = gen_const_htmlElemDesc_ptr_AttrAllowed(n_elt, 0);\r
+               attr = gen_const_xmlChar_ptr_AttrAllowed(n_attr, 1);\r
+               legacy = gen_int(n_legacy, 2);\r
+\r
+               /* * @remarks input1: [N/A, N /A] @n\r
+                * {htmlElemDesc*(elt),xmlChar*(attr),int()} => {N/A | int(!=1)} @n\r
+              */\r
+               ret_val = htmlAttrAllowed((const htmlElemDesc *)elt, (const xmlChar *)attr, legacy);\r
+               if(ret_val == 1)\r
+               {\r
+                   //Negative test\r
+                       DTS_CHECK_EQ_MESSAGE("htmlAttrAllowed", (void*)ret_val, 1, "htmlAttrAllowed Failed");\r
+               }\r
+               else\r
+               {\r
+                       //positive test\r
+                       DTS_CHECK_NE_MESSAGE("htmlAttrAllowed", (void*)ret_val, 1, "htmlAttrAllowed Failed");   \r
+               }\r
+\r
+\r
+               des_const_htmlElemDesc_ptr(n_elt, (const htmlElemDesc *)elt, 0);\r
+               des_const_xmlChar_ptr(n_attr, (const xmlChar *)attr, 1);\r
+               des_int(n_legacy, legacy, 2);\r
+               xmlResetLastError();\r
+              }\r
+             }\r
+            }\r
+}\r
+\r
+/**\r
+       * @test                 UTcHtmlAttrAllowedP01\r
+       * @brief                htmlStatus htmlAttrAllowed(const htmlElemDesc* elt, const xmlChar* attr, int legacy)\r
+       * @desc                 Positive and Negative Test for htmlAttrAllowed\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Sathish Kumar (satish.k4@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlTextWriterPtr(htmlElemDesc(html_emt_ptr),xmlChar(val_char),int(1)} => {N/A | htmlStatus(ret_html_status)} @n\r
+\r
+       *                               input2: [N/A, N/A] @n\r
+       *                       {xmlTextWriterPtr(htmlElemDesc(html_emt_ptr),xmlChar(val_char),int(1)} => {N/A | htmlStatus(ret_html_status)} @n\r
+\r
+       *                               input3: [N/A, N/A] @n\r
+    *                      {xmlTextWriterPtr(htmlDocPtr(html_emt_ptr->attrs_depr!=NULL),xmlChar(val_char='s'),xmlNodePtr(node_ptr->name='p')} => {N/A | int(1)} @n\r
+\r
+       *                               input4: [N/A, N/A] @n\r
+       *                               {xmlTextWriterPtr(htmlDocPtr(html_emt_ptr->attrs_depr!=NULL),xmlChar(val_char='s'),xmlNodePtr(node_ptr->children=NULL)} => {N/A | int(1)} @n\r
+\r
+       *                               input5: [N/A, N/A] @n\r
+       *                               {xmlTextWriterPtr(htmlDocPtr(html_emt_ptr->attrs_depr!=NULL),xmlChar(val_char='s'),xmlNodePtr(node_ptr->children!=NULL)} => {N/A | int(1)} @n\r
+\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcHtmlAutoCloseTagP01()\r
+{\r
+               int ret_val;\r
+           htmlDocPtr doc; /* the HTML document */\r
+           int n_doc;\r
+           xmlChar * name; /* The tag name */\r
+           int n_name;\r
+           htmlNodePtr elem; /* the HTML element */\r
+           int n_elem;\r
+\r
+           for (n_doc = 0;n_doc < gen_nb_htmlDocPtr;n_doc++) {\r
+           for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {\r
+           for (n_elem = 0;n_elem < gen_nb_htmlNodePtr1;n_elem++) {\r
+\r
+               doc = gen_htmlDocPtr(n_doc, 0);\r
+               name = gen_const_xmlChar_ptr(n_name, 1);\r
+               elem = gen_htmlNodePtr_AutoCloseTag(n_elem, 2);\r
+               /* * @remarks input1: [N/A, N/A] @n\r
+                  * {htmlDocPtr(doc),const xmlChar*(name),htmlNodePtr(elem)} => {N/A | int(1)} @n\r
+                  *\r
+               */\r
+               ret_val = htmlAutoCloseTag(doc, (const xmlChar *)name, elem);\r
+               if(ret_val == 1)\r
+               {\r
+                        //positive test case\r
+                       DTS_CHECK_EQ_MESSAGE("htmlAutoCloseTag", (void*)ret_val, 1, "htmlAutoCloseTag Failed");\r
+               }\r
+               else\r
+               {\r
+                       //Negative test case\r
+                       DTS_CHECK_EQ_MESSAGE("htmlAutoCloseTag", (void*)ret_val, 0, "htmlAutoCloseTag Failed");\r
+               }\r
+               desret_int(ret_val);\r
+               des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);\r
+               des_htmlNodePtr(n_elem, elem, 2);\r
+               xmlResetLastError();\r
+\r
+           }\r
+           }\r
+           }\r
+}\r
+\r
+\r
+       /**\r
+               * @test                 UTcHtmlAttrAllowedP01\r
+               * @brief                htmlParserCtxtPtr htmlCreateMemoryParserCtxt(const char *buffer, int size)\r
+               * @desc                 Positive and Negative Test for htmlCreateMemoryParserCtxt\r
+               * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+               * @b tester             Sathish Kumar (satish.k4@samsung.com)\r
+               * @return               void\r
+               * @see                  none\r
+               * @remarks input1: [N/A, N/A] @n\r
+           * {xmlTextWriterPtr(const char(buffer),int(size))} => {N/A | htmlParserCtxtPtr)} @n\r
+\r
+               * @b priority   Middle\r
+               * @b etc                none\r
+               */\r
+static void UTcHtmlCreateMemoryParserCtxtP01()\r
+{\r
+\r
+               //int test_ret = 0;\r
+\r
+           htmlParserCtxtPtr ret_val;\r
+           char * buffer; /* a pointer to a char array */\r
+           int n_buffer;\r
+           int size; /* the size of the array */\r
+           int n_size;\r
+           int count=1;\r
+\r
+           for (n_buffer = 0;n_buffer < gen_nb_const_char_ptr2;n_buffer++) {\r
+           for (n_size = 0;n_size < gen_nb_int;n_size++) {\r
+               buffer = gen_const_char_ptr(n_buffer, 0);\r
+               size = gen_int(n_size, 1);\r
+\r
+               /* * @remarks input1: [N/A, N/A] @n\r
+                * {const char*(buffer),int(size)} => {N/A | NULL)} @n\r
+                *\r
+               */\r
+               ret_val = htmlCreateMemoryParserCtxt((const char *)buffer, size);\r
+            if(ret_val == NULL)\r
+            {\r
+                  //Negative test\r
+                       DTS_CHECK_EQ_MESSAGE("htmlCreateMemoryParserCtxt", (void*)ret_val, NULL, "htmlCreateMemoryParserCtxt Failed");\r
+            }\r
+            else\r
+            {\r
+               //Positive test\r
+                       DTS_CHECK_NE_MESSAGE("htmlCreateMemoryParserCtxt", (void*)ret_val, NULL, "htmlCreateMemoryParserCtxt Failed");\r
+            }\r
+\r
+            desret_htmlParserCtxtPtr(ret_val);\r
+            des_const_char_ptr(n_buffer, (const char *)buffer, 0);\r
+            des_int(n_size, size, 1);\r
+            xmlResetLastError();\r
+            }\r
+           }\r
+}\r
+\r
+       /**\r
+       * @test                 UTcHtmlCreatePushParserCtxtP01\r
+       * @brief                htmlParserCtxtPtr htmlCreatePushParserCtxt(htmlSAXHandlerPtr sax,\r
+       *                               void *user_data,const char *chunk, int size,\r
+       *        const char *filename,xmlCharEncoding enc)\r
+       * @desc                 Positive and Negative Test for htmlCreateMemoryParserCtxt\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Sathish Kumar (satish.k4@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks input1: [N/A, N/A] @n\r
+       * {htmlSAXHandlerPtr(sax),void*(user_data),const char(*chunk),int(size),\r
+       *                       const char(*filename),xmlCharEncoding(enc)} => {N/A | htmlParserCtxtPtr)} @n\r
+\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcHtmlCreatePushParserCtxtP01()\r
+{\r
+\r
+               htmlParserCtxtPtr ret_val;\r
+           htmlSAXHandlerPtr sax; /* a SAX handler */\r
+           int n_sax;\r
+           void * user_data; /* The user data returned on SAX callbacks */\r
+           int n_user_data;\r
+           char * chunk; /* a pointer to an array of chars */\r
+           int n_chunk;\r
+           int size; /* number of chars in the array */\r
+           int n_size;\r
+           const char * filename; /* an optional file name or URI */\r
+           int n_filename;\r
+           xmlCharEncoding enc; /* an optional encoding */\r
+           int n_enc;\r
+\r
+           for (n_sax = 0;n_sax < gen_nb_htmlSAXHandlerPtr;n_sax++) {\r
+           for (n_user_data = 0;n_user_data < gen_nb_userdata;n_user_data++) {\r
+           for (n_chunk = 0;n_chunk < gen_nb_const_char_ptr;n_chunk++) {\r
+           for (n_size = 0;n_size < gen_nb_int;n_size++) {\r
+           for (n_filename = 0;n_filename < gen_nb_fileoutput;n_filename++) {\r
+           for (n_enc = 0;n_enc < gen_nb_xmlCharEncoding;n_enc++) {\r
+\r
+               sax = gen_htmlSAXHandlerPtr(n_sax, 0);\r
+               user_data = gen_userdata(n_user_data, 1);\r
+               chunk = gen_const_char_ptr(n_chunk, 2);\r
+               size = gen_int(n_size, 3);\r
+               filename = gen_fileoutput(n_filename, 4);\r
+               enc = gen_xmlCharEncoding(n_enc, 5);\r
+               /* * @remarks input1: [N/A, N/A] @n\r
+                  *{htmlSAXHandlerPtr(sax),void*(user_data),const char(*chunk),int(size),\r
+                      *        const char(*filename),xmlCharEncoding(enc)} => {N/A | htmlParserCtxtPtr)} @n\r
+                  * Note:verification for Positive(!=NULL) test.\r
+               */\r
+               ret_val = htmlCreatePushParserCtxt(sax, user_data, (const char *)chunk, size, filename, enc);\r
+               if(ret_val != NULL)\r
+               {\r
+                       //Positive test\r
+                       DTS_CHECK_NE_MESSAGE("htmlCreatePushParserCtxt", (void*)ret_val, NULL, "htmlCreatePushParserCtxt Failed");\r
+               }\r
+               else\r
+               {\r
+                       //Negative test case. As per code analysis we can not make scenario for negative test case.\r
+                       DTS_CHECK_EQ_MESSAGE("htmlCreatePushParserCtxt", (void*)ret_val, NULL, "htmlCreatePushParserCtxt Failed");\r
+               }\r
+\r
+               desret_htmlParserCtxtPtr(ret_val);\r
+\r
+               call_tests++;\r
+               des_htmlSAXHandlerPtr(n_sax, sax, 0);\r
+               des_userdata(n_user_data, user_data, 1);\r
+               des_const_char_ptr(n_chunk, (const char *)chunk, 2);\r
+               des_int(n_size, size, 3);\r
+               des_fileoutput(n_filename, filename, 4);\r
+               des_xmlCharEncoding(n_enc, enc, 5);\r
+\r
+           }\r
+           }\r
+           }\r
+           }\r
+           }\r
+           }\r
+}\r
+\r
+       /**\r
+                       * @test                 UTcHtmlCtxtReadDocP01\r
+                       * @brief                htmlDocPtr htmlCtxtReadDoc(htmlParserCtxtPtr ctxt, const xmlChar * cur,\r
+                                                                                          const char *URL, const char *encoding, int options)\r
+\r
+                       * @desc                 Positive and Negative Test for htmlCtxtReadDoc\r
+                       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+                       * @b tester             Sathish Kumar (satish.k4@samsung.com)\r
+                       * @return               void\r
+                       * @see                  none\r
+                       * @remarks input1: [N/A, N/A] @n\r
+                   * {htmlParserCtxtPtr(ctxt),const xmlChar(cur),const char(*URL),const char(*encoding),\r
+                   *                   int(option)} => {N/A | htmlDocPtr(ret_val)} @n\r
+\r
+                       * @b priority   Middle\r
+                       * @b etc                none\r
+                       */\r
+static void UTcHtmlCtxtReadDocP01()\r
+{\r
+           htmlDocPtr ret_val;\r
+           htmlParserCtxtPtr ctxt; /* an HTML parser context */\r
+           int n_ctxt;\r
+           xmlChar * cur; /* a pointer to a zero terminated string */\r
+           int n_cur;\r
+           const char * URL; /* the base URL to use for the document */\r
+           int n_URL;\r
+           char * encoding; /* the document encoding, or NULL */\r
+           int n_encoding;\r
+           int options; /* a combination of htmlParserOption(s) */\r
+           int n_options;\r
+\r
+           for (n_ctxt = 0;n_ctxt < gen_nb_htmlParserCtxtPtr;n_ctxt++) {\r
+           for (n_cur = 0;n_cur < gen_nb_const_xmlChar_ptr;n_cur++) {\r
+           for (n_URL = 0;n_URL < gen_nb_filepath;n_URL++) {\r
+           for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {\r
+           for (n_options = 0;n_options < gen_nb_int;n_options++) {\r
+               ctxt = gen_htmlParserCtxtPtr(n_ctxt, 0);\r
+               cur = gen_const_xmlChar_ptr(n_cur, 1);\r
+               URL = gen_filepath(n_URL, 2);\r
+               encoding = gen_const_char_ptr(n_encoding, 3);\r
+               options = gen_int(n_options, 4);\r
+\r
+               /* @remarks input1: [N/A, N/A] @n\r
+                * {htmlParserCtxtPtr(ctxt),const xmlChar(cur),const char(*URL),const char(*encoding),\r
+                *                      int(option)} => {N/A | htmlDocPtr(ret_val)} @n\r
+               */\r
+               ret_val = htmlCtxtReadDoc(ctxt, (const xmlChar *)cur, URL, (const char *)encoding, options);\r
+               if(ret_val==NULL)\r
+               {\r
+                       //Negative test case.\r
+                               DTS_CHECK_EQ_MESSAGE("htmlCtxtReadDoc", (void*)ret_val, NULL, "htmlCtxtReadDoc Failed");\r
+               }\r
+               else\r
+               {\r
+                       //Positive test case\r
+                               DTS_CHECK_NE_MESSAGE("htmlCtxtReadDoc", (void*)ret_val, NULL, "htmlCtxtReadDoc Failed");\r
+               }\r
+               call_tests++;\r
+            des_htmlParserCtxtPtr(n_ctxt, ctxt, 0);\r
+           des_const_xmlChar_ptr(n_cur, (const xmlChar *)cur, 1);\r
+               des_filepath(n_URL, URL, 2);\r
+               des_const_char_ptr(n_encoding, (const char *)encoding, 3);\r
+               des_int(n_options, options, 4);\r
+               xmlResetLastError();\r
+           }\r
+           }\r
+           }\r
+           }\r
+           }\r
+\r
+}\r
+\r
+/**\r
+                               * @test                 UTcHtmlCtxtReadFileP01\r
+                               * @brief                htmlDocPtr htmlCtxtReadFile(htmlParserCtxtPtr ctxt, const char *filename,\r
+                                                                                               const char *encoding, int options)\r
+\r
+\r
+                               * @desc                 Positive and Negative Test for htmlCtxtReadFile\r
+                               * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+                               * @b tester             Sathish Kumar (satish.k4@samsung.com)\r
+                               * @return               void\r
+                               * @see                  none\r
+                       * @remarks input1: [N/A, N/A] @n\r
+                   * {htmlParserCtxtPtr(ctxt),const char(filename),const char(*encoding),int(option)} => {N/A | htmlDocPtr(ret_val)} @n\r
+                       * @b priority   Middle\r
+                       * @b etc                none\r
+               */\r
+static void UTcHtmlCtxtReadFileP01()\r
+{\r
+           htmlDocPtr ret_val;\r
+           htmlParserCtxtPtr ctxt; /* an HTML parser context */\r
+           int n_ctxt;\r
+           const char* filename; /* a file or URL */\r
+           int n_filename;\r
+           char * encoding; /* the document encoding, or NULL */\r
+           int n_encoding;\r
+           int options; /* a combination of htmlParserOption(s) */\r
+           int n_options;\r
+\r
+           for (n_ctxt = 0;n_ctxt < gen_nb_htmlParserCtxtPtr;n_ctxt++) {\r
+           for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {\r
+           for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr2;n_encoding++) {\r
+           for (n_options = 0;n_options < gen_nb_int;n_options++) {\r
+               ctxt = gen_htmlParserCtxtPtr(n_ctxt, 0);\r
+               filename = gen_filepath(n_filename, 1);\r
+               encoding = gen_const_char_ptr(n_encoding, 2);\r
+               options = gen_int(n_options, 3);\r
+         /*    * @remarks input1: [N/A, N/A] @n\r
+               * {htmlParserCtxtPtr(ctxt),const char(filename),const char(*encoding),int(option)} => {N/A | htmlDocPtr(ret_val)} @n\r
+         */\r
+               ret_val = htmlCtxtReadFile(ctxt, filename, (const char *)encoding, options);\r
+               if(ret_val == NULL)\r
+               {\r
+                       //Negative test case.\r
+                       DTS_CHECK_EQ_MESSAGE("htmlCtxtReadFile", (void*)ret_val, NULL, "htmlCtxtReadFile Failed");\r
+               }\r
+               else\r
+               {\r
+                       //Positive test case,Not executing @ xmlNewInputFromFile() returning NULL;\r
+                       DTS_CHECK_NE_MESSAGE("htmlCtxtReadFile", (void*)ret_val, NULL, "htmlCtxtReadFile Failed");\r
+               }\r
+\r
+               desret_htmlDocPtr(ret_val);\r
+               des_htmlParserCtxtPtr(n_ctxt, ctxt, 0);\r
+               des_filepath(n_filename, filename, 1);\r
+               des_const_char_ptr(n_encoding, (const char *)encoding, 2);\r
+               des_int(n_options, options, 3);\r
+               xmlResetLastError();\r
+           }\r
+           }\r
+           }\r
+           }\r
+}\r
+/**\r
+               * @test                 UTcHtmlCtxtReadMemoryP01\r
+               * @brief                htmlDocPtr htmlCtxtReadMemory(htmlParserCtxtPtr ctxt, const char *buffer, int size,\r
+                                           const char *URL, const char *encoding, int options)\r
+               * @desc                 Positive and Negative Test for htmlCtxtReadFile\r
+               * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+               * @b tester             Sathish Kumar (satish.k4@samsung.com)\r
+               * @return               void\r
+               * @see                  none\r
+               * @remarks input1: [N/A, N/A] @n\r
+               * {htmlParserCtxtPtr(ctxt),const char(buffer),int(size),const char(URL), const char*(encoding),int(option)} => {N/A | htmlDocPtr(ret_val)} @n\r
+               * @b priority   Middle\r
+               * @b etc                none\r
+       */\r
+static void UTcHtmlCtxtReadMemoryP01()\r
+{\r
+    htmlDocPtr ret_val;\r
+    htmlParserCtxtPtr ctxt; /* an HTML parser context */\r
+    int n_ctxt;\r
+    char * buffer; /* a pointer to a char array */\r
+    int n_buffer;\r
+    int size; /* the size of the array */\r
+    int n_size;\r
+    const char * URL; /* the base URL to use for the document */\r
+    int n_URL;\r
+    char * encoding; /* the document encoding, or NULL */\r
+    int n_encoding;\r
+    int options; /* a combination of htmlParserOption(s) */\r
+    int n_options;\r
+\r
+    for (n_ctxt = 0;n_ctxt < gen_nb_htmlParserCtxtPtr;n_ctxt++) {\r
+    for (n_buffer = 0;n_buffer < gen_nb_const_char_ptr2;n_buffer++) {\r
+    for (n_size = 0;n_size < gen_nb_int;n_size++) {\r
+    for (n_URL = 0;n_URL < gen_nb_filepath;n_URL++) {\r
+    for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr2;n_encoding++) {\r
+    for (n_options = 0;n_options < gen_nb_int;n_options++) {\r
+        ctxt = gen_htmlParserCtxtPtr(n_ctxt, 0);\r
+        buffer = gen_const_char_ptr(n_buffer, 1);\r
+        size = gen_int(n_size, 2);\r
+        URL = gen_filepath(n_URL, 3);\r
+        encoding = gen_const_char_ptr(n_encoding, 4);\r
+        options = gen_int(n_options, 5);\r
+\r
+        /* @remarks input1: [N/A, N/A] @n\r
+               * {htmlParserCtxtPtr(ctxt),const char(buffer),int(size),const char(URL), const char*(encoding),int(option)} => {N/A | htmlDocPtr(ret_val)} @n\r
+         */\r
+        ret_val = htmlCtxtReadMemory(ctxt, (const char *)buffer, size, URL, (const char *)encoding, options);\r
+        if(ret_val == NULL)\r
+        {\r
+               //Negative test cases\r
+                       DTS_CHECK_EQ_MESSAGE("htmlCtxtReadMemory", (void*)ret_val, NULL, "htmlCtxtReadMemory Failed");\r
+        }\r
+\r
+        else\r
+        {\r
+               //Positive test case\r
+                       DTS_CHECK_NE_MESSAGE("htmlCtxtReadMemory",(void*) ret_val, NULL, "htmlCtxtReadMemory Failed");\r
+        }\r
+        des_htmlParserCtxtPtr(n_ctxt, ctxt, 0);\r
+        des_const_char_ptr(n_buffer, (const char *)buffer, 1);\r
+        des_int(n_size, size, 2);\r
+        des_filepath(n_URL, URL, 3);\r
+        des_const_char_ptr(n_encoding, (const char *)encoding, 4);\r
+        des_int(n_options, options, 5);\r
+        xmlResetLastError();\r
+\r
+    }\r
+    }\r
+    }\r
+    }\r
+    }\r
+    }\r
+\r
+}\r
+       /**\r
+                       * @test                 UTcHtmlCtxtResetP01\r
+                       * @brief                void htmlCtxtReset(htmlParserCtxtPtr ctxt)\r
+                       * @desc                 Positive and Negative Test for htmlCtxtReset\r
+                       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+                       * @b tester             Sathish Kumar (satish.k4@samsung.com)\r
+                       * @return               void\r
+                       * @see                  none\r
+                       * @remarks input1: [N/A, N/A] @n\r
+                       * {htmlParserCtxtPtr(ctxt))} => {N/A | htmlParserCtxtPtr(!NULL)} @n\r
+                       * @b priority   Middle\r
+                       * @b etc                none\r
+               */\r
+static void UTcHtmlCtxtResetP01()\r
+{\r
+       htmlParserCtxtPtr ctxt; /* an HTML parser context */\r
+       int n_ctxt;\r
+       for (n_ctxt = 0;n_ctxt < gen_nb_htmlParserCtxtPtr;n_ctxt++) {\r
+               ctxt = gen_htmlParserCtxtPtr(n_ctxt, 0);\r
+   /* * @remarks input1: [N/A, N/A] @n\r
+         * {htmlParserCtxtPtr(ctxt))} => {N/A | htmlParserCtxtPtr(!NULL)} @n\r
+   */\r
+                       htmlCtxtReset(ctxt);\r
+\r
+               if(ctxt == NULL)\r
+               {\r
+                       //Negative test cases\r
+                       DTS_CHECK_EQ_MESSAGE("htmlCtxtReset", ctxt, NULL, "htmlCtxtReset Failed");\r
+               }\r
+               else\r
+               {\r
+                       //Positive test cases\r
+                       DTS_CHECK_NE_MESSAGE("htmlCtxtReset", ctxt, NULL, "htmlCtxtReset Failed");\r
+               }\r
+               des_htmlParserCtxtPtr(n_ctxt, ctxt, 0);\r
+               xmlResetLastError();\r
+        }\r
+}\r
+\r
+\r
+/**\r
+       * @test                 UTcHtmlCtxtUseOptionsP01\r
+       * @brief                int htmlCtxtUseOptions(htmlParserCtxtPtr ctxt, int options)\r
+       * @desc                 Positive and Negative Test for htmlCtxtUseOptions\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Sathish Kumar (satish.k4@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks     input1: [N/A, N/A] @n\r
+       *               {htmlParserCtxtPtr(ctxt),int(option)} => {N/A | int(0)} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcHtmlCtxtUseOptionsP01()\r
+{\r
+       int mem_base;\r
+       int ret_val;\r
+       htmlParserCtxtPtr ctxt; /* an HTML parser context */\r
+       int n_ctxt;\r
+       int options; /* a combination of htmlParserOption(s) */\r
+       int n_options;\r
+\r
+       for (n_ctxt = 0;n_ctxt < gen_nb_htmlParserCtxtPtr;n_ctxt++) {\r
+       for (n_options = 0;n_options < gen_nb_int;n_options++) {\r
+               ctxt = gen_htmlParserCtxtPtr(n_ctxt, 0);\r
+                       options = gen_int(n_options, 1);\r
+\r
+                /*  * @remarks     input1: [N/A, N/A] @n\r
+                        *              {htmlParserCtxtPtr(ctxt),int(option)} => {N/A | int(0)} @n\r
+                */\r
+                       ret_val = htmlCtxtUseOptions(ctxt, options);\r
+                       if(ret_val == 0)\r
+                       {\r
+                          //Positive test case\r
+                               DTS_CHECK_EQ_MESSAGE("htmlCtxtUseOptions", (void*)ret_val, 0, "htmlCtxtUseOptions Failed");\r
+                       }\r
+                       else\r
+                       {\r
+                               //Negative test case\r
+                               DTS_CHECK_NE_MESSAGE("htmlCtxtUseOptions", (void*)ret_val, 0, "htmlCtxtUseOptions Failed");\r
+                       }\r
+                       desret_int(ret_val);\r
+                       call_tests++;\r
+                       des_htmlParserCtxtPtr(n_ctxt, ctxt, 0);\r
+                       des_int(n_options, options, 1);\r
+                       xmlResetLastError();\r
+       }\r
+       }\r
+\r
+}\r
+\r
+/**\r
+       * @test                 UTcHtmlElementAllowedHereP01\r
+       * @brief                int htmlElementAllowedHere(const htmlElemDesc* parent, const xmlChar* elt)\r
+       * @desc                 Positive and Negative Test for htmlElementAllowedHere\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Sathish Kumar (satish.k4@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks     input1: [N/A, N/A] @n\r
+       *               {const htmlElemDesc*(parent),const xmlChar*(elt)} => {N/A | int(1)} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcHtmlElementAllowedHereP01()\r
+{\r
+       int ret_val;\r
+       const htmlElemDesc * parent; /* HTML parent element */\r
+       int n_parent;\r
+       xmlChar * elt; /* HTML element */\r
+       int n_elt;\r
+\r
+       for (n_parent = 0;n_parent < gen_nb_const_htmlElemDesc_ptr;n_parent++) {\r
+       for (n_elt = 0;n_elt < gen_nb_const_xmlChar_ptr;n_elt++) {\r
+\r
+               parent = gen_const_htmlElemDesc_ptr_ElementAllowedHere(n_parent, 0);\r
+               elt = gen_const_xmlChar_ptr_htmlElementAllowedHere(n_elt, 1);\r
+\r
+       /*      * @remarks     input1: [N/A, N/A] @n\r
+               *               {const htmlElemDesc*(parent),const xmlChar*(elt)} => {N/A | int(1)} @n\r
+       */\r
+\r
+               ret_val = htmlElementAllowedHere((const htmlElemDesc *)parent, (const xmlChar *)elt);\r
+\r
+               if(ret_val == 0)\r
+          {\r
+                  //positive test\r
+                  DTS_CHECK_EQ_MESSAGE("htmlElementAllowedHere", (void*)ret_val, 0, "htmlElementAllowedHere Failed");\r
+          }\r
+          else\r
+          {\r
+                  //Negative test\r
+                  DTS_CHECK_NE_MESSAGE("htmlElementAllowedHere", (void*)ret_val, 0, "htmlElementAllowedHere Failed");\r
+          }\r
+               desret_int(ret_val);\r
+               des_const_htmlElemDesc_ptr(n_parent, (const htmlElemDesc *)parent, 0);\r
+               des_const_xmlChar_ptr(n_elt, (const xmlChar *)elt, 1);\r
+               xmlResetLastError();\r
+       }\r
+       }\r
+}\r
+\r
+/**\r
+       * @test                 UTcHtmlElementStatusHereP01\r
+       * @brief                htmlStatus htmlElementStatusHere(const htmlElemDesc* parent, const htmlElemDesc* elt)\r
+       * @desc                 Positive and Negative Test for htmlElementStatusHere\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Sathish Kumar (satish.k4@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks     input1: [N/A, N/A] @n\r
+       *               {const htmlElemDesc*(parent),const htmlElemDesc*(elt)} => {N/A | int(1)} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcHtmlElementStatusHereP01()\r
+{\r
+    htmlStatus ret_val;\r
+       const htmlElemDesc * parent; /* HTML parent element */\r
+    int n_parent;\r
+       const htmlElemDesc * elt; /* HTML element */\r
+    int n_elt;\r
+\r
+    for (n_parent = 0;n_parent < gen_nb_const_htmlElemDesc_ptr;n_parent++) {\r
+    for (n_elt = 0;n_elt < gen_nb_const_htmlElemDesc_ptr1;n_elt++) {\r
+        parent = gen_const_htmlElemDesc_ptr_ElementAllowedHere(n_parent, 0);\r
+        elt = gen_const_htmlElemDesc_ptr_ElementStatusHere(n_elt, 1);\r
+\r
+        ret_val = htmlElementStatusHere((const htmlElemDesc *)parent, (const htmlElemDesc *)elt);\r
+        if(ret_val == 1)\r
+        {\r
+               //Negative test\r
+                DTS_CHECK_EQ_MESSAGE("htmlElementStatusHere", (void*)ret_val, 1, "htmlElementStatusHere Failed");\r
+        }\r
+\r
+        else\r
+        {\r
+               //Positive test\r
+                DTS_CHECK_NE_MESSAGE("htmlElementStatusHere", (void*)ret_val, 0, "htmlElementStatusHere Failed");\r
+        }\r
+\r
+        desret_htmlStatus(ret_val);\r
+        des_const_htmlElemDesc_ptr(n_parent, (const htmlElemDesc *)parent, 0);\r
+        des_const_htmlElemDesc_ptr(n_elt, (const htmlElemDesc *)elt, 1);\r
+        xmlResetLastError();\r
+    }\r
+    }\r
+}\r
+\r
+/**\r
+       * @test                 UTcHtmlEncodeEntitiesP01\r
+       * @brief                int htmlEncodeEntities(unsigned char* out, int *outlen,\r
+                                                    const unsigned char* in, int *inlen, int quoteChar)\r
+       * @desc                 Positive and Negative Test for htmlEncodeEntities\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Sathish Kumar (satish.k4@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks     input1: [N/A, N/A] @n\r
+       *               {unsigned char*(out),int*(outlen),const unsigned char*(in),int*(inlen)\r
+       *               int(quoteChar)} => {N/A | int(0)} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcHtmlEncodeEntitiesP01()\r
+{\r
+       int ret_val;\r
+       unsigned char * out; /* a pointer to an array of bytes to store the result */\r
+       int n_out;\r
+       int * outlen; /* the length of @out */\r
+       int n_outlen;\r
+       unsigned char * in; /* a pointer to an array of UTF-8 chars */\r
+       int n_in;\r
+       int * inlen; /* the length of @in */\r
+       int n_inlen;\r
+       int quoteChar; /* the quote character to escape (' or ") or zero. */\r
+       int n_quoteChar;\r
+\r
+       for (n_out = 0;n_out < gen_nb_unsigned_char_ptr;n_out++) {\r
+       for (n_outlen = 0;n_outlen < gen_nb_int_ptr;n_outlen++) {\r
+       for (n_in = 0;n_in < gen_nb_const_unsigned_char_ptr;n_in++) {\r
+       for (n_inlen = 0;n_inlen < gen_nb_int_ptr;n_inlen++) {\r
+       for (n_quoteChar = 0;n_quoteChar < gen_nb_int;n_quoteChar++) {\r
+               out = gen_unsigned_char_ptr(n_out, 0);\r
+               outlen = gen_int_ptr(n_outlen, 1);\r
+               in = gen_const_unsigned_char_ptr(n_in, 2);\r
+               inlen = gen_int_ptr(n_inlen, 3);\r
+               quoteChar = gen_int(n_quoteChar, 4);\r
+\r
+                       ret_val = htmlEncodeEntities(out, outlen, (const unsigned char *)in, inlen, quoteChar);\r
+                  if(ret_val == 0)\r
+                  {\r
+                          //positive test\r
+                           DTS_CHECK_EQ_MESSAGE("htmlEncodeEntities", (void*)ret_val, 0, "htmlEncodeEntities Failed");\r
+                  }\r
+\r
+                  if(ret_val == -1)\r
+                  {\r
+                         //Negative  test\r
+                          DTS_CHECK_EQ_MESSAGE("htmlEncodeEntities", (void*)ret_val, -1, "htmlEncodeEntities Failed");\r
+                  }\r
+\r
+                       desret_int(ret_val);\r
+                       call_tests++;\r
+                       des_unsigned_char_ptr(n_out, out, 0);\r
+                       des_int_ptr(n_outlen, outlen, 1);\r
+                       des_const_unsigned_char_ptr(n_in, (const unsigned char *)in, 2);\r
+                       des_int_ptr(n_inlen, inlen, 3);\r
+                       des_int(n_quoteChar, quoteChar, 4);\r
+                       xmlResetLastError();\r
+       }\r
+       }\r
+       }\r
+       }\r
+       }\r
+\r
+}\r
+\r
+/**\r
+       * @test                 UTcHtmlHandleOmittedElemP01\r
+       * @brief                int htmlHandleOmittedElem(int val)\r
+       * @desc                 Positive and Negative Test for htmlEncodeEntities\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Sathish Kumar (satish.k4@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks     input1: [N/A, N/A] @n\r
+       *               {int(val)} => {N/A | int(0)} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcHtmlHandleOmittedElemP01()\r
+{\r
+           int ret_val;\r
+           int val; /* int 0 or 1 */\r
+           int n_val;\r
+\r
+           for (n_val = 0;n_val < gen_nb_int;n_val++) {\r
+               val = gen_int(n_val, 0);\r
+\r
+               ret_val = htmlHandleOmittedElem(val);\r
+               if(ret_val == 0)\r
+               {\r
+                       //Positive test\r
+                        DTS_CHECK_EQ_MESSAGE("htmlHandleOmittedElem", (void*)ret_val, 0, "htmlHandleOmittedElem Failed");\r
+               }\r
+\r
+               if(ret_val == 1)\r
+               {\r
+                       //Negative test\r
+                        DTS_CHECK_EQ_MESSAGE("htmlHandleOmittedElem", (void*)ret_val, 1, "htmlHandleOmittedElem Failed");\r
+               }\r
+               desret_int(ret_val);\r
+               call_tests++;\r
+               des_int(n_val, val, 0);\r
+               xmlResetLastError();\r
+           }\r
+}\r
+\r
+\r
+       /**\r
+       * @test                 UTcHtmlIsAutoClosedP01\r
+       * @brief                int htmlIsAutoClosed(htmlDocPtr doc, htmlNodePtr elem)\r
+       * @desc                 Positive and Negative Test for htmlIsAutoClosed\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Sathish Kumar (satish.k4@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks     input1: [N/A, N/A] @n\r
+       *               {htmlDocPtr(doc),htmlNodePtr(elem)} => {N/A | int(0)} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcHtmlIsAutoClosedP01()\r
+{\r
+    int ret_val;\r
+    htmlDocPtr doc; /* the HTML document */\r
+    int n_doc;\r
+    htmlNodePtr elem; /* the HTML element */\r
+    int n_elem;\r
+\r
+    for (n_doc = 0;n_doc < gen_nb_htmlDocPtr;n_doc++) {\r
+    for (n_elem = 0;n_elem < gen_nb_htmlNodePtr1;n_elem++) {\r
+        doc = gen_htmlDocPtr(n_doc, 0);\r
+        elem = gen_htmlNodePtr_AutoCloseTag(n_elem, 2);\r
+        /* @remarks     input1: [N/A, N/A] @n\r
+               *               {htmlDocPtr(doc),htmlNodePtr(elem)} => {N/A | int(1)} @n\r
+        */\r
+        ret_val = htmlIsAutoClosed(doc, elem);\r
+        if(ret_val == 1)\r
+        {\r
+               //Positive test\r
+               DTS_CHECK_EQ_MESSAGE("htmlIsAutoClosed", (void*)ret_val, 1, "htmlIsAutoClosed Failed");\r
+        }\r
+\r
+        else\r
+        {\r
+               //Negative test\r
+               DTS_CHECK_NE_MESSAGE("htmlIsAutoClosed", (void*)ret_val, 0, "htmlIsAutoClosed Failed");\r
+        }\r
+        desret_int(ret_val);\r
+        call_tests++;\r
+        des_htmlDocPtr(n_doc, doc, 0);\r
+        des_htmlNodePtr(n_elem, elem, 1);\r
+        xmlResetLastError();\r
+    }\r
+    }\r
+}\r
+\r
+/**\r
+       * @test                 UTcHtmlIsScriptAttributeP01\r
+       * @brief                int htmlIsScriptAttribute(const xmlChar *name)\r
+       * @desc                 Positive and Negative Test for htmlIsScriptAttribute\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Sathish Kumar (satish.k4@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks     input1: [N/A, N/A] @n\r
+       *               {const xmlChar*(name)} => {N/A | int(1)} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcHtmlIsScriptAttributeP01()\r
+{\r
+           int ret_val;\r
+           xmlChar * name; /* an attribute name */\r
+           int n_name;\r
+\r
+           for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {\r
+               name = gen_const_xmlChar_ptr_ScriptAttribute(n_name, 0);\r
+              /* * @remarks     input1: [N/A, N/A] @n\r
+                *               {const xmlChar*(name)} => {N/A | int(1)} @n\r
+              */\r
+               ret_val = htmlIsScriptAttribute((const xmlChar *)name);\r
+\r
+               if(ret_val == 1)\r
+               {\r
+                       //Positive Test\r
+                       DTS_CHECK_EQ_MESSAGE("htmlIsScriptAttribute", (void*)ret_val, 1, "htmlIsScriptAttribute Failed");\r
+               }\r
+\r
+               else\r
+               {\r
+                       //Negative Test\r
+                       DTS_CHECK_NE_MESSAGE("htmlIsScriptAttribute", (void*)ret_val, 1, "htmlIsScriptAttribute Failed");\r
+               }\r
+\r
+               desret_int(ret_val);\r
+               des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 0);\r
+               xmlResetLastError();\r
+           }\r
+        }\r
+\r
+/**\r
+       * @test                 UTcHtmlNewParserCtxtP01\r
+       * @brief                htmlParserCtxtPtr htmlNewParserCtxt(void)\r
+       * @desc                 Positive and Negative Test for htmlNewParserCtxt\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Sathish Kumar (satish.k4@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks     input1: [N/A, N/A] @n\r
+       *               {N/A} => {N/A | htmlParserCtxtPtr(1)} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcHtmlNewParserCtxtP01()\r
+{\r
+       htmlParserCtxtPtr ret_val = NULL;\r
+       ret_val = NULL;\r
+       //this function is static in library\r
+       ret_val = htmlNewParserCtxt();\r
+       //Positive test\r
+       DTS_CHECK_NE_MESSAGE("htmlNewParserCtxt", (void*)ret_val, NULL, "htmlNewParserCtxt Failed");\r
+       desret_htmlParserCtxtPtr(ret_val);\r
+       xmlResetLastError();\r
+}\r
+\r
+/**\r
+       * @test                 UTcHtmlNodeStatusP01\r
+       * @brief                htmlStatus htmlNodeStatus(const htmlNodePtr node, int legacy)\r
+       * @desc                 Positive and Negative Test for htmlNodeStatus\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Sathish Kumar (satish.k4@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks     input1: [N/A, N/A] @n\r
+       *               {const htmlNodePtr(node),int(legacy)} => {N/A | htmlStatus(1)} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcHtmlNodeStatusP01()\r
+{\r
+    htmlStatus ret_val;\r
+    htmlNodePtr node; /* an htmlNodePtr in a tree */\r
+    int n_node;\r
+    int legacy; /* whether to allow deprecated elements (YES is faster here for Element nodes) */\r
+    int n_legacy;\r
+\r
+    for (n_node = 0;n_node < gen_nb_const_htmlNodePtr1;n_node++) {\r
+    for (n_legacy = 0;n_legacy < gen_nb_int;n_legacy++) {\r
+        node = gen_const_htmlNodePtr_NodeStatus(n_node, 0);\r
+        legacy = gen_int(n_legacy, 1);\r
+\r
+       /* @remarks     input1: [N/A, N/A] @n\r
+       *               {const htmlNodePtr(node),int(legacy)} => {N/A | htmlStatus(1)} @n\r
+        */\r
+        ret_val = htmlNodeStatus((const htmlNodePtr)node, legacy);\r
+        if(ret_val == 1)\r
+        {\r
+               //Negative test\r
+                       DTS_CHECK_EQ_MESSAGE("htmlNodeStatus", (void*)ret_val, 1, "htmlNodeStatus Failed");\r
+        }\r
+        else\r
+        {\r
+               //Positive Test\r
+                       DTS_CHECK_NE_MESSAGE("htmlNodeStatus", (void*)ret_val, 1, "htmlNodeStatus Failed");\r
+        }\r
+        desret_htmlStatus(ret_val);\r
+        des_const_htmlNodePtr(n_node, (const htmlNodePtr)node, 0);\r
+        des_int(n_legacy, legacy, 1);\r
+        xmlResetLastError();\r
+    }\r
+    }\r
+}\r
+\r
+/**\r
+       * @test                 UTcHtmlParseCharRefP01\r
+       * @brief                int htmlParseCharRef(htmlParserCtxtPtr ctxt)\r
+       * @desc                 Positive and Negative Test for htmlParseCharRef\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Sathish Kumar (satish.k4@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks     input1: [N/A, N/A] @n\r
+       *               {htmlParserCtxtPtr(ctxt)} => {N/A | int(1)} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcHtmlParseCharRefP01()\r
+{\r
+       int ret_val;\r
+       htmlParserCtxtPtr ctxt; /* an HTML parser context */\r
+       int n_ctxt;\r
+\r
+       for (n_ctxt = 0;n_ctxt < gen_nb_htmlParserCtxtPtr;n_ctxt++) {\r
+               ctxt = gen_htmlParserCtxtPtr(n_ctxt, 0);\r
+\r
+               /* @remarks     input1: [N/A, N/A] @n\r
+                       *               {htmlParserCtxtPtr(ctxt)} => {N/A | int(1)} @n\r
+               */\r
+               //Negative test is not required.\r
+\r
+               ret_val = htmlParseCharRef(ctxt);\r
+               DTS_CHECK_EQ_MESSAGE("htmlParseCharRef", (void*)ret_val, 0, "htmlParseCharRef Failed");\r
+\r
+               desret_int(ret_val);\r
+               des_htmlParserCtxtPtr(n_ctxt, ctxt, 0);\r
+               xmlResetLastError();\r
+       }\r
+}\r
+\r
+/**\r
+       * @test                 UTcHtmlEntityLookupP01\r
+       * @brief                const htmlEntityDesc* htmlEntityLookup(const xmlChar *name)\r
+       * @desc                 Positive and Negative Test for htmlEntityLookup\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Sathish Kumar (satish.k4@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks     input1: [N/A, N/A] @n\r
+       *               {htmlParserCtxtPtr(ctxt)} => {N/A | int(1)} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcHtmlEntityLookupP01()\r
+{\r
+    const htmlEntityDesc * ret_val;\r
+    xmlChar * name; /* the entity name */\r
+    int n_name;\r
+\r
+    for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {\r
+        name = gen_const_xmlChar_ptr_EntityLookup(n_name, 0);\r
+\r
+        ret_val = htmlEntityLookup((const xmlChar *)name);\r
+        if(ret_val == NULL)\r
+        {\r
+               //Negative test\r
+                       DTS_CHECK_EQ_MESSAGE("htmlEntityLookup", (void*)ret_val, NULL, "htmlEntityLookup Failed");\r
+        }\r
+        else\r
+        {\r
+           //Negative test\r
+                  DTS_CHECK_NE_MESSAGE("htmlEntityLookup", (void*)ret_val, NULL, "htmlEntityLookup Failed");\r
+        }\r
+        desret_const_htmlEntityDesc_ptr(ret_val);\r
+        des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 0);\r
+        xmlResetLastError();\r
+    }\r
+}\r
+\r
+/**\r
+       * @test                 UTcHtmlParseChunkP01\r
+       * @brief                int htmlParseChunk(htmlParserCtxtPtr ctxt, const char *chunk, int size,\r
+                                                         int terminate)\r
+       * @desc                 Positive and Negative Test for htmlParseChunk\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Sathish Kumar (satish.k4@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks     input1: [N/A, N/A] @n\r
+       *               {htmlParserCtxtPtr(ctxt),const char *(chunk),int(size),int (terminate)} => {N/A | int(0)} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcHtmlEntityValueLookupP01()\r
+{\r
+       const htmlEntityDesc * ret_val;\r
+       unsigned int value; /* the entity's unicode value */\r
+       int n_value;\r
+\r
+       for (n_value = 0;n_value < gen_nb_unsigned_int1;n_value++) {\r
+                value = gen_unsigned_int_EntityValueLookup(n_value, 0);\r
+               /* @remarks  input1: [N/A, N/A] @n\r
+               *           {unsigned int(value)} => {N/A | const htmlEntityDesc(ret_val)} @n\r
+               */\r
+               ret_val = htmlEntityValueLookup(value);\r
+               if(ret_val == NULL)\r
+               {\r
+                  DTS_CHECK_EQ_MESSAGE("htmlEntityValueLookup", (void*)ret_val, NULL, "htmlEntityValueLookup Failed");\r
+                       //Negative test\r
+\r
+               }\r
+\r
+               else\r
+               {\r
+                       //Positive test\r
+                       DTS_CHECK_NE_MESSAGE("htmlEntityValueLookup", (void*)ret_val, NULL, "htmlEntityValueLookup Failed");\r
+               }\r
+               desret_const_htmlEntityDesc_ptr(ret_val);\r
+               call_tests++;\r
+               des_unsigned_int(n_value, value, 0);\r
+               xmlResetLastError();\r
+       }\r
+}\r
+\r
+       /**\r
+       * @test                 UTcHtmlParseChunkP01\r
+       * @brief                int htmlParseChunk(htmlParserCtxtPtr ctxt, const char *chunk, int size,\r
+                                                         int terminate)\r
+       * @desc                 Positive and Negative Test for htmlParseChunk\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Sathish Kumar (satish.k4@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks     input1: [N/A, N/A] @n\r
+       *               {htmlParserCtxtPtr(ctxt),const char *(chunk),int(size),int (terminate)} => {N/A | int(0)} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcHtmlParseChunkP01()\r
+{\r
+       int ret_val;\r
+       htmlParserCtxtPtr ctxt; /* an HTML parser context */\r
+       int n_ctxt;\r
+       char * chunk; /* an char array */\r
+       int n_chunk;\r
+       int size; /* the size in byte of the chunk */\r
+       int n_size;\r
+       int terminate; /* last chunk indicator */\r
+       int n_terminate;\r
+\r
+       for (n_ctxt = 0;n_ctxt < gen_nb_htmlParserCtxtPtr;n_ctxt++) {\r
+       for (n_chunk = 0;n_chunk < gen_nb_const_char_ptr;n_chunk++) {\r
+       for (n_size = 0;n_size < gen_nb_int;n_size++) {\r
+       for (n_terminate = 0;n_terminate < gen_nb_int;n_terminate++) {\r
+               ctxt = gen_htmlParserCtxtPtr(n_ctxt, 0);\r
+               chunk = gen_const_char_ptr(n_chunk, 1);\r
+               size = gen_int(n_size, 2);\r
+               terminate = gen_int(n_terminate, 3);\r
+   /* * @remarks     input1: [N/A, N/A] @n\r
+         *        {htmlParserCtxtPtr(ctxt),const char *(chunk),int(size),int (terminate)} => {N/A | int(0)} @n\r
+       */\r
+               ret_val = htmlParseChunk(ctxt, (const char *)chunk, size, terminate);\r
+               if(ret_val == 0)\r
+               {\r
+                       //Positive Test\r
+                        DTS_CHECK_EQ_MESSAGE("htmlParseChunk", (void*)ret_val, 0, "htmlParseChunk Failed");\r
+               }\r
+               else\r
+               {\r
+                       //Negative test\r
+                        DTS_CHECK_NE_MESSAGE("htmlParseChunk", (void*)ret_val, 0, "htmlParseChunk Failed");\r
+               }\r
+               desret_int(ret_val);\r
+               des_htmlParserCtxtPtr(n_ctxt, ctxt, 0);\r
+               des_const_char_ptr(n_chunk, (const char *)chunk, 1);\r
+               des_int(n_size, size, 2);\r
+               des_int(n_terminate, terminate, 3);\r
+               xmlResetLastError();\r
+       }\r
+       }\r
+       }\r
+       }\r
+}\r
+\r
+/**\r
+       * @test                 UTcHtmlParseDocP01\r
+       * @brief                htmlDocPtr htmlParseDoc(xmlChar *cur, const char *encoding)\r
+       * @desc                 Positive and Negative Test for htmlParseDoc\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Sathish Kumar (satish.k4@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks     input1: [N/A, N/A] @n\r
+       *               {xmlChar*(cur),const char *(encoding))} => {N/A | htmlDocPtr(ret_val)} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcHtmlParseDocP01()\r
+{\r
+       htmlDocPtr ret_val;\r
+       xmlChar * cur; /* a pointer to an array of xmlChar */\r
+       int n_cur;\r
+       char * encoding; /* a free form C string describing the HTML document encoding, or NULL */\r
+       int n_encoding;\r
+\r
+       for (n_cur = 0;n_cur < gen_nb_xmlChar_ptr;n_cur++) {\r
+       for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {\r
+               cur = gen_xmlChar_ptr_ParseDoc(n_cur, 0);\r
+               encoding = gen_const_char_ptr(n_encoding, 1);\r
+          /* * @remarks  input1: [N/A, N/A] @n\r
+               *             {xmlChar*(cur),const char *(encoding))} => {N/A | htmlDocPtr(ret_val)} @n\r
+               */\r
+               ret_val = htmlParseDoc(cur, (const char *)encoding);\r
+\r
+               if(ret_val != NULL)\r
+               {\r
+                       //Positive test\r
+                       DTS_CHECK_NE_MESSAGE("htmlParseDoc", (void*)ret_val, NULL, "htmlParseDoc Failed");\r
+               }\r
+               else\r
+               {\r
+                       //Negative test\r
+                       DTS_CHECK_EQ_MESSAGE("htmlParseDoc", (void*)ret_val, NULL, "htmlParseDoc Failed");\r
+               }\r
+               desret_htmlDocPtr(ret_val);\r
+               des_xmlChar_ptr(n_cur, cur, 0);\r
+               xmlResetLastError();\r
+       }\r
+       }\r
+}\r
+\r
+/**\r
+       * @test                 UTcHtmlParseDocumentP01\r
+       * @brief                int htmlParseDocument(htmlParserCtxtPtr ctxt)\r
+       * @desc                 Positive and Negative Test for htmlParseDocument\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Sathish Kumar (satish.k4@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks     input1: [N/A, N/A] @n\r
+       *               {htmlParserCtxtPtr(ctxt))} => {N/A |int(ret_val)} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcHtmlParseDocumentP01()\r
+{\r
+       int ret_val;\r
+       htmlParserCtxtPtr ctxt; /* an HTML parser context */\r
+       int n_ctxt;\r
+\r
+       for (n_ctxt = 0;n_ctxt < gen_nb_htmlParserCtxtPtr;n_ctxt++) {\r
+               ctxt = gen_htmlParserCtxtPtr_ParseDocument(n_ctxt, 0);\r
+          /* * @remarks     input1: [N/A, N/A] @n\r
+               *            {htmlParserCtxtPtr(ctxt)} => {N/A |N/A} @n\r
+          */\r
+               ret_val = htmlParseDocument(ctxt);\r
+          if(ret_val == 0)\r
+          {\r
+                  //Positive test\r
+                  DTS_CHECK_EQ_MESSAGE("htmlParseDocument", (void*)ret_val, 0, "htmlParseDocument Failed");\r
+          }\r
+          else if(ret_val == 1)\r
+          {\r
+                  //Negative test\r
+                  DTS_CHECK_EQ_MESSAGE("htmlParseDocument", (void*)ret_val, 1, "htmlParseDocument Failed");\r
+          }\r
+\r
+          else\r
+          {\r
+                  //Negative test\r
+                  DTS_CHECK_EQ_MESSAGE("htmlParseDocument", (void*)ret_val, -1, "htmlParseDocument Failed");\r
+          }\r
+\r
+               if (ctxt != NULL) {xmlFreeDoc(ctxt->myDoc); ctxt->myDoc = NULL;}\r
+               des_htmlParserCtxtPtr(n_ctxt, ctxt, 0);\r
+               xmlResetLastError();\r
+               }\r
+}\r
+\r
+/**\r
+       * @test                 UTcHtmlParseElementP01\r
+       * @brief                void htmlParseElement(htmlParserCtxtPtr ctxt)\r
+       * @desc                 Positive and Negative Test for htmlParseElement\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Sathish Kumar (satish.k4@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks     input1: [N/A, N/A] @n\r
+       *               {htmlParserCtxtPtr(ctxt)} => {N/A |N/A} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcHtmlParseElementP01()\r
+{\r
+       htmlParserCtxtPtr ctxt; /* an HTML parser context */\r
+       int n_ctxt;\r
+\r
+       for (n_ctxt = 0;n_ctxt < gen_nb_htmlParserCtxtPtr;n_ctxt++) {\r
+               ctxt = gen_htmlParserCtxtPtr(n_ctxt, 0);\r
+\r
+               /** @remarks     input1: [N/A, N/A] @n\r
+          *               {htmlParserCtxtPtr(ctxt))} => {N/A |int(ret_val)} @n\r
+        */\r
+               htmlParseElement(ctxt);\r
+               if(ctxt == NULL)\r
+               {\r
+                       //Negative Test\r
+                        DTS_CHECK_EQ_MESSAGE("htmlParseElement", (void*)ctxt, NULL, "htmlParseElement Failed");\r
+               }\r
+               else\r
+               {\r
+                       //Positive Test\r
+                        DTS_CHECK_NE_MESSAGE("htmlParseElement", (void*)ctxt, NULL, "htmlParseElement Failed");\r
+               }\r
+\r
+               des_htmlParserCtxtPtr(n_ctxt, ctxt, 0);\r
+               xmlResetLastError();\r
+       }\r
+}\r
+\r
+/**\r
+       * @test                 UTcHtmlParseEntityRefP01\r
+       * @brief                const htmlEntityDesc *htmlParseEntityRef(htmlParserCtxtPtr ctxt, const xmlChar **str)\r
+       * @desc                 Positive and Negative Test for htmlParseEntityRef\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Sathish Kumar (satish.k4@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks     input1: [N/A, N/A] @n\r
+       *               {htmlParserCtxtPtr(ctxt),const xmlChar (**str) } => {N/A |const htmlEntityDesc(ret_val} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcHtmlParseEntityRefP01()\r
+{\r
+       const htmlEntityDesc * ret_val;\r
+       htmlParserCtxtPtr ctxt; /* an HTML parser context */\r
+       int n_ctxt;\r
+       xmlChar ** str; /* location to store the entity name */\r
+       int n_str;\r
+\r
+       for (n_ctxt = 0;n_ctxt < gen_nb_htmlParserCtxtPtr;n_ctxt++) {\r
+       for (n_str = 0;n_str < gen_nb_const_xmlChar_ptr_ptr;n_str++) {\r
+               ctxt = gen_htmlParserCtxtPtr_1(n_ctxt, 0);\r
+               str = gen_const_xmlChar_ptr_ptr(n_str, 1);\r
+\r
+   /*  * @remarks     input1: [N/A, N/A] @n\r
+          *      {htmlParserCtxtPtr(ctxt),const xmlChar (**str) } => {N/A |const htmlEntityDesc(ret_val} @n\r
+   */\r
+               ret_val = htmlParseEntityRef(ctxt, (const xmlChar **)str);\r
+\r
+               if(ret_val == NULL)\r
+               {\r
+                       //Negative test\r
+                       DTS_CHECK_EQ_MESSAGE("htmlParseEntityRef", (void*)ret_val, NULL, "htmlParseEntityRef Failed");\r
+               }\r
+               else\r
+               {\r
+                       //Positive test\r
+                       DTS_CHECK_NE_MESSAGE("htmlParseEntityRef", (void*)ret_val, NULL, "htmlParseEntityRef Failed");\r
+               }\r
+\r
+               desret_const_htmlEntityDesc_ptr(ret_val);\r
+               call_tests++;\r
+               des_htmlParserCtxtPtr(n_ctxt, ctxt, 0);\r
+               des_const_xmlChar_ptr_ptr(n_str, (const xmlChar **)str, 1);\r
+               xmlResetLastError();\r
+       }\r
+       }\r
+}\r
+\r
+       /**\r
+       * @test                 UTcHtmlParseFileP01\r
+       * @brief                htmlDocPtr htmlParseFile(const char *filename, const char *encoding)\r
+       * @desc                 Positive and Negative Test for htmlParseFile\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Sathish Kumar (satish.k4@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks     input1: [N/A, N/A] @n\r
+       *               {const char *(filename),const char *(encoding) } => {N/A |htmlDocPtr(ret_val} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcHtmlParseFileP01()\r
+{\r
+       htmlDocPtr ret_val;\r
+       const char * filename; /* the filename */\r
+       int n_filename;\r
+       char * encoding; /* a free form C string describing the HTML document encoding, or NULL */\r
+       int n_encoding;\r
+\r
+       for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {\r
+       for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {\r
+               filename = gen_filepath(n_filename, 0);\r
+               encoding = gen_const_char_ptr(n_encoding, 1);\r
+\r
+         /*  * @remarks     input1: [N/A, N/A] @n\r
+                 *            {const char *(filename),const char *(encoding) } => {N/A |htmlDocPtr(ret_val} @n\r
+         */\r
+               ret_val = htmlParseFile(filename, (const char *)encoding);\r
+               if(ret_val == NULL)\r
+               {\r
+                       //Negative test\r
+                       DTS_CHECK_EQ_MESSAGE("htmlParseFile", (void*)ret_val, NULL, "htmlParseFile Failed");\r
+               }\r
+\r
+               else\r
+               {\r
+                       //Positive test\r
+                       DTS_CHECK_NE_MESSAGE("htmlParseFile", (void*)ret_val, NULL, "htmlParseFile Failed");\r
+               }\r
+               desret_htmlDocPtr(ret_val);\r
+               des_filepath(n_filename, filename, 0);\r
+               des_const_char_ptr(n_encoding, (const char *)encoding, 1);\r
+               xmlResetLastError();\r
+       }\r
+       }\r
+}\r
+\r
+/**\r
+       * @test             UTcHtmlReadDocP01\r
+       * @brief                htmlDocPtr htmlReadDoc(const xmlChar * cur, const char *URL, const char *encoding, int options)\r
+       * @desc                 Positive and Negative Test for htmlReadDoc\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Sathish Kumar (satish.k4@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks     input1: [N/A, N/A] @n\r
+       *               {const xmlChar*(cur),const char *(URL),const char *(encoding),int(options) } => {N/A |htmlDocPtr(ret_val} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcHtmlReadDocP01()\r
+{\r
+       htmlDocPtr ret_val;\r
+       xmlChar * cur; /* a pointer to a zero terminated string */\r
+       int n_cur;\r
+       const char * URL; /* the base URL to use for the document */\r
+       int n_URL;\r
+       char * encoding; /* the document encoding, or NULL */\r
+       int n_encoding;\r
+       int options; /* a combination of htmlParserOption(s) */\r
+       int n_options;\r
+\r
+       for (n_cur = 0;n_cur < gen_nb_const_xmlChar_ptr;n_cur++) {\r
+       for (n_URL = 0;n_URL < gen_nb_filepath;n_URL++) {\r
+       for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {\r
+       for (n_options = 0;n_options < gen_nb_int;n_options++) {\r
+               cur = gen_const_xmlChar_ptr(n_cur, 0);\r
+               URL = gen_filepath(n_URL, 1);\r
+               encoding = gen_const_char_ptr(n_encoding, 2);\r
+               options = gen_int(n_options, 3);\r
+   /* @remarks     input1: [N/A, N/A] @n\r
+       *               {const xmlChar*(cur),const char *(URL),const char *(encoding),int(options) } => {N/A |htmlDocPtr(ret_val} @n\r
+  */\r
+               ret_val = htmlReadDoc((const xmlChar *)cur, URL, (const char *)encoding, options);\r
+         if(ret_val == NULL)\r
+         {\r
+                 //Negative test\r
+                 DTS_CHECK_EQ_MESSAGE("htmlReadDoc", (void*)ret_val, NULL, "htmlReadDoc Failed");\r
+         }\r
+\r
+         else\r
+         {\r
+                 //Positive test\r
+                 DTS_CHECK_NE_MESSAGE("htmlReadDoc", (void*)ret_val, NULL, "htmlReadDoc Failed");\r
+         }\r
+               des_const_xmlChar_ptr(n_cur, (const xmlChar *)cur, 0);\r
+               des_filepath(n_URL, URL, 1);\r
+               des_const_char_ptr(n_encoding, (const char *)encoding, 2);\r
+               des_int(n_options, options, 3);\r
+               xmlResetLastError();\r
+       }\r
+       }\r
+       }\r
+       }\r
+}\r
+\r
+       /**\r
+       * @test             UTcHtmlReadFileP01\r
+       * @brief                htmlDocPtr htmlReadFile(const char *filename, const char *encoding, int options)\r
+       * @desc                 Positive and Negative Test for htmlReadFile\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Sathish Kumar (satish.k4@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks     input1: [N/A, N/A] @n\r
+       *               {const xmlChar*(filename),const char *(encoding),int(options) } => {N/A |htmlDocPtr(ret_val} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcHtmlReadFileP01()\r
+{\r
+    htmlDocPtr ret_val;\r
+    const char * filename; /* a file or URL */\r
+    int n_filename;\r
+    char * encoding; /* the document encoding, or NULL */\r
+    int n_encoding;\r
+    int options; /* a combination of htmlParserOption(s) */\r
+    int n_options;\r
+\r
+    for (n_filename = 3;n_filename < gen_nb_filepath;n_filename++) {\r
+    for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {\r
+    for (n_options = 0;n_options < gen_nb_int;n_options++) {\r
+        filename = gen_filepath(n_filename, 0);\r
+        encoding = gen_const_char_ptr(n_encoding, 1);\r
+        options = gen_int(n_options, 2);\r
+        ret_val = htmlReadFile(filename, (const char *)encoding, options);\r
+\r
+        if(ret_val != NULL)\r
+        {\r
+               //Positive test\r
+                       DTS_CHECK_NE_MESSAGE("htmlReadFile",(void*) ret_val, NULL, "htmlReadFile Failed");\r
+        }\r
+        else\r
+        {\r
+               //Negative test\r
+                       DTS_CHECK_EQ_MESSAGE("htmlReadFile", (void*)ret_val, NULL, "htmlReadFile Failed");\r
+        }\r
+        desret_htmlDocPtr(ret_val);\r
+        des_filepath(n_filename, filename, 0);\r
+        des_const_char_ptr(n_encoding, (const char *)encoding, 1);\r
+        des_int(n_options, options, 2);\r
+        xmlResetLastError();\r
+    }\r
+    }\r
+    }\r
+ }\r
+\r
+       /**\r
+       * @test             UTcHtmlReadMemoryP01\r
+       * @brief                htmlDocPtr htmlReadMemory(const char *buffer, int size, const char *URL, const char *encoding, int options)\r
+       * @desc                 Positive and Negative Test for htmlReadMemory\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Sathish Kumar (satish.k4@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks     input1: [N/A, N/A] @n\r
+       *               {const char*(buffer),int(size),const char*(URL),const char*(encoding),int(options)} => {N/A |htmlDocPtr(ret_val} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcHtmlReadMemoryP01()\r
+{\r
+       htmlDocPtr ret_val;\r
+       char * buffer; /* a pointer to a char array */\r
+       int n_buffer;\r
+       int size; /* the size of the array */\r
+       int n_size;\r
+       const char * URL; /* the base URL to use for the document */\r
+       int n_URL;\r
+       char * encoding; /* the document encoding, or NULL */\r
+       int n_encoding;\r
+       int options; /* a combination of htmlParserOption(s) */\r
+       int n_options;\r
+\r
+       for (n_buffer = 0;n_buffer < gen_nb_const_char_ptr;n_buffer++) {\r
+       for (n_size = 0;n_size < gen_nb_int;n_size++) {\r
+       for (n_URL = 0;n_URL < gen_nb_filepath;n_URL++) {\r
+       for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {\r
+       for (n_options = 0;n_options < gen_nb_int;n_options++) {\r
+               buffer = gen_const_char_ptr(n_buffer, 0);\r
+               size = gen_int(n_size, 1);\r
+               URL = gen_filepath(n_URL, 2);\r
+               encoding = gen_const_char_ptr(n_encoding, 3);\r
+               options = gen_int(n_options, 4);\r
+       /*      * @remarks input1: [N/A, N/A] @n\r
+               *           {const char*(buffer),int(size),const char*(URL),const char*(encoding),int(options)} => {N/A |htmlDocPtr(ret_val} @n\r
+        */\r
+               ret_val = htmlReadMemory((const char *)buffer, size, URL, (const char *)encoding, options);\r
+               if(ret_val == NULL)\r
+               {\r
+                       //Negative test\r
+                       DTS_CHECK_EQ_MESSAGE("htmlReadMemory", (void*)ret_val, NULL, "htmlReadMemory Failed");\r
+               }\r
+               else\r
+               {\r
+                       //Positive test\r
+                       DTS_CHECK_NE_MESSAGE("htmlReadMemory", (void*)ret_val, NULL, "htmlReadMemory Failed");\r
+               }\r
+\r
+               des_const_char_ptr(n_buffer, (const char *)buffer, 0);\r
+               des_int(n_size, size, 1);\r
+               des_filepath(n_URL, URL, 2);\r
+               des_const_char_ptr(n_encoding, (const char *)encoding, 3);\r
+               des_int(n_options, options, 4);\r
+               xmlResetLastError();\r
+       }\r
+       }\r
+       }\r
+       }\r
+       }\r
+}\r
+\r
+/**\r
+       * @test             UTcHtmlSAXParseDocP01\r
+       * @brief                htmlDocPtr htmlSAXParseDoc(xmlChar *cur, const char *encoding, htmlSAXHandlerPtr sax, void *userData)\r
+       * @desc                 Positive and Negative Test for htmlSAXParseDoc\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Sathish Kumar (satish.k4@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks     input1: [N/A, N/A] @n\r
+       *               {xmlChar *(cur), const char *(encoding), htmlSAXHandlerPtr (sax), void *(userData)} => {N/A |htmlDocPtr(ret_val} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcHtmlSAXParseDocP01()\r
+{\r
+       htmlDocPtr ret_val;\r
+       xmlChar * cur; /* a pointer to an array of xmlChar */\r
+       int n_cur;\r
+       char * encoding; /* a free form C string describing the HTML document encoding, or NULL */\r
+       int n_encoding;\r
+       htmlSAXHandlerPtr sax; /* the SAX handler block */\r
+       int n_sax;\r
+       void * userData; /* if using SAX, this pointer will be provided on callbacks. */\r
+       int n_userData;\r
+\r
+       for (n_cur = 0;n_cur < gen_nb_xmlChar_ptr;n_cur++) {\r
+       for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {\r
+       for (n_sax = 0;n_sax < gen_nb_htmlSAXHandlerPtr;n_sax++) {\r
+       for (n_userData = 0;n_userData < gen_nb_userdata;n_userData++) {\r
+               cur = gen_xmlChar_ptr(n_cur, 0);\r
+               encoding = gen_const_char_ptr(n_encoding, 1);\r
+               sax = gen_htmlSAXHandlerPtr(n_sax, 2);\r
+               userData = gen_userdata(n_userData, 3);\r
+\r
+               ret_val = htmlSAXParseDoc(cur, (const char *)encoding, sax, userData);\r
+\r
+               if(n_cur == 0)\r
+               {\r
+                       //Positive test\r
+                       DTS_CHECK_NE_MESSAGE("htmlSAXParseDoc", (void*)ret_val, NULL, "htmlSAXParseDoc Failed");\r
+               }\r
+\r
+               if(n_cur != 0)\r
+               {\r
+                       //Negative Test\r
+                       DTS_CHECK_EQ_MESSAGE("htmlSAXParseDoc",(void*) ret_val, NULL, "htmlSAXParseDoc Failed");\r
+               }\r
+               des_xmlChar_ptr(n_cur, cur, 0);\r
+               des_const_char_ptr(n_encoding, (const char *)encoding, 1);\r
+               des_htmlSAXHandlerPtr(n_sax, sax, 2);\r
+               des_userdata(n_userData, userData, 3);\r
+               xmlResetLastError();\r
+       }\r
+       }\r
+       }\r
+       }\r
+}\r
+\r
+/**\r
+       * @test             UTcHtmlSAXParseFileP01\r
+       * @brief                htmlDocPtr htmlSAXParseFile(const char *filename, const char *encoding, htmlSAXHandlerPtr sax,\r
+                 void *userData)\r
+       * @desc                 Positive and Negative Test for htmlSAXParseFile\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Sathish Kumar (satish.k4@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks     input1: [N/A, N/A] @n\r
+       *               {const char *(filename), const char *(encoding), htmlSAXHandlerPtr (sax),\r
+                      void *(userData)} => {N/A |htmlDocPtr(ret_val} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcHtmlSAXParseFileP01()\r
+{\r
+       htmlDocPtr ret_val;\r
+       const char * filename; /* the filename */\r
+       int n_filename;\r
+       char * encoding; /* a free form C string describing the HTML document encoding, or NULL */\r
+       int n_encoding;\r
+       htmlSAXHandlerPtr sax; /* the SAX handler block */\r
+       int n_sax;\r
+       void * userData; /* if using SAX, this pointer will be provided on callbacks. */\r
+       int n_userData;\r
+\r
+       for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {\r
+       for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {\r
+       for (n_sax = 0;n_sax < gen_nb_htmlSAXHandlerPtr;n_sax++) {\r
+       for (n_userData = 0;n_userData < gen_nb_userdata;n_userData++) {\r
+               filename = gen_filepath(n_filename, 0);\r
+               encoding = gen_const_char_ptr(n_encoding, 1);\r
+               sax = gen_htmlSAXHandlerPtr(n_sax, 2);\r
+               userData = gen_userdata(n_userData, 3);\r
+\r
+               /* @remarks  input1: [N/A, N/A] @n\r
+               * {const char *(filename), const char *(encoding), htmlSAXHandlerPtr (sax),\r
+                                        void *(userData)} => {N/A |htmlDocPtr(ret_val} @n\r
+               */\r
+          ret_val = htmlSAXParseFile(filename, (const char *)encoding, sax, userData);\r
+\r
+               if(ret_val != NULL)\r
+               {\r
+                       //positive test\r
+                       DTS_CHECK_NE_MESSAGE("htmlSAXParseFile", (void*)ret_val, NULL, "htmlSAXParseFile Failed");\r
+               }\r
+               else\r
+               {\r
+                       //Negative test\r
+                       DTS_CHECK_EQ_MESSAGE("htmlSAXParseFile", (void*)ret_val, NULL, "htmlSAXParseFile Failed");\r
+               }\r
+\r
+               des_filepath(n_filename, filename, 0);\r
+               des_const_char_ptr(n_encoding, (const char *)encoding, 1);\r
+               des_htmlSAXHandlerPtr(n_sax, sax, 2);\r
+               des_userdata(n_userData, userData, 3);\r
+               xmlResetLastError();\r
+       }\r
+       }\r
+       }\r
+       }\r
+}\r
+\r
+/**\r
+       * @test             UTcHtmlTagLookupP01\r
+       * @brief                const htmlElemDesc *htmlTagLookup(const xmlChar *tag)\r
+       * @desc                 Positive and Negative Test for htmlTagLookup\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Sathish Kumar (satish.k4@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks     input1: [N/A, N/A] @n\r
+       *               {const xmlChar *(tag)} => {N/A |const htmlElemDesc *(ret_val} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcHtmlTagLookupP01()\r
+{\r
+       const htmlElemDesc * ret_val;\r
+       const xmlChar * tag;\r
+       int n_elemt;\r
+       for(n_elemt = 0;n_elemt < 3; n_elemt++)\r
+       {\r
+               tag = gen_htmlTagLookup_ptr(n_elemt,1);\r
+\r
+               /* @remarks     input1: [N/A, N/A] @n\r
+               *               {const xmlChar *(tag)} => {N/A |const htmlElemDesc*(ret_val} @n\r
+               */\r
+               ret_val = htmlTagLookup((const xmlChar *)tag);\r
+\r
+               if(ret_val != NULL && n_elemt == 0)\r
+               {\r
+                       //Positive test\r
+                       DTS_CHECK_NE_MESSAGE("htmlTagLookup", (void*)ret_val, NULL, "htmlTagLookup Failed");\r
+               }\r
+               if(n_elemt == 1 || n_elemt == 2)\r
+               {\r
+                       //Negative test\r
+                       DTS_CHECK_EQ_MESSAGE("htmlTagLookup",(void*) ret_val, NULL, "htmlTagLookup Failed");\r
+               }\r
+       }\r
+}\r
+\r
+static void startup( void);\r
+static void cleanup( void);\r
+\r
+void (*tet_startup)( void) = startup;\r
+void (*tet_cleanup)( void) = cleanup;\r
+\r
+static void startup( void)\r
+{\r
+        /* start of TC */\r
+        tet_printf("TC starts.");\r
+}\r
+\r
+static void cleanup( void)\r
+{\r
+        /* end of TC */\r
+        tet_printf("TC ends.");\r
+}\r
+\r
+\r
+\r
+\r
+struct tet_testlist tet_testlist[] = {\r
+       // Handling of out of context errors\r
+       {UTcHtmlAttrAllowedP01,1},\r
+       {UTcHtmlAutoCloseTagP01,2},\r
+       {UTcHtmlCreateMemoryParserCtxtP01,3},\r
+       {UTcHtmlCreatePushParserCtxtP01,4},\r
+       {UTcHtmlCtxtReadDocP01,5},\r
+       {UTcHtmlCtxtReadFileP01,6},\r
+       {UTcHtmlCtxtReadMemoryP01,7},\r
+       {UTcHtmlCtxtResetP01,8},\r
+       {UTcHtmlCtxtUseOptionsP01,9},\r
+       {UTcHtmlElementAllowedHereP01,10},\r
+       \r
+       {UTcHtmlElementStatusHereP01,11},\r
+       {UTcHtmlEncodeEntitiesP01,12},\r
+       {UTcHtmlHandleOmittedElemP01,13},\r
+       {UTcHtmlIsAutoClosedP01,14},\r
+       {UTcHtmlIsScriptAttributeP01,15},\r
+       {UTcHtmlNewParserCtxtP01,16},\r
+       {UTcHtmlNodeStatusP01,17},\r
+       {UTcHtmlParseCharRefP01,18},\r
+       {UTcHtmlEntityLookupP01,19},\r
+       {UTcHtmlEntityValueLookupP01,20},\r
+       \r
+       {UTcHtmlParseChunkP01,21},\r
+       {UTcHtmlParseDocP01,22},\r
+       {UTcHtmlParseDocumentP01,23},\r
+       {UTcHtmlParseElementP01,24},\r
+       {UTcHtmlParseEntityRefP01,25},\r
+       {UTcHtmlParseFileP01,26},\r
+       {UTcHtmlReadDocP01,27},\r
+       {UTcHtmlReadFileP01,28},\r
+       {UTcHtmlReadMemoryP01,29},\r
+       {UTcHtmlSAXParseDocP01,30},\r
+       \r
+       {UTcHtmlSAXParseFileP01,31},\r
+       {UTcHtmlTagLookupP01,32},\r
+       { NULL, 0 },\r
+       \r
+};\r
+\r
+\r
diff --git a/TC/testcase/utc_libxml_HTMLtree.c b/TC/testcase/utc_libxml_HTMLtree.c
new file mode 100755 (executable)
index 0000000..3a27eda
--- /dev/null
@@ -0,0 +1,1291 @@
+/*\r
+*  libxml test suite\r
+*\r
+* Copyright (c) 2012 Samsung Electronics Co., Ltd. All rights reserved.\r
+*\r
+* Contact: {Maintainer Name} <{Maintainer Email}>\r
+* \r
+* Licensed under the Apache License, Version 2.0 (the "License");\r
+* you may not use this file except in compliance with the License.\r
+* You may obtain a copy of the License at\r
+*\r
+* http://www.apache.org/licenses/LICENSE-2.0\r
+*\r
+* Unless required by applicable law or agreed to in writing, software\r
+* distributed under the License is distributed on an "AS IS" BASIS,\r
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+* See the License for the specific language governing permissions and\r
+* limitations under the License.\r
+*\r
+*/ \r
+#include <libxml/HTMLtree.h>\r
+#include <libxml/tree.h>\r
+#include <libxml/encoding.h>\r
+#include <libxml/xmlmemory.h>\r
+#include "utc_libxml_include.h"\r
+\r
+/***************************************************************************\r
+* SUTsXmlWriter\r
+***************************************************************************/\r
+#define MY_ENCODING "ISO-8859-1"\r
+\r
+#define        OUTFILE2        UTSHOME"/missing.xml"\r
+#define        OUTFILE3        UTSHOME"/test.out"\r
+\r
+static xmlDocPtr api_doc = NULL;\r
+static xmlDtdPtr api_dtd = NULL;\r
+static xmlNodePtr api_root = NULL;\r
+static xmlAttrPtr api_attr = NULL;\r
+static xmlNsPtr api_ns = NULL;\r
+\r
+static int call_tests = 0;\r
+static int function_tests = 0;\r
+int test_ret = 0;\r
+#define gen_nb_htmlDocPtr 3\r
+#define gen_nb_xmlChar_ptr_ptr 1\r
+#define gen_nb_int_ptr 2\r
+static int inttab[1024];\r
+\r
+static void\r
+free_api_doc(void) {\r
+    xmlFreeDoc(api_doc);\r
+    api_doc = NULL;\r
+    api_dtd = NULL;\r
+    api_root = NULL;\r
+    api_attr = NULL;\r
+    api_ns = NULL;\r
+}\r
+\r
+static xmlDocPtr get_api_doc(void)\r
+{\r
+    if (api_doc == NULL)\r
+    {\r
+        api_doc = xmlReadMemory("<!DOCTYPE root [<!ELEMENT root EMPTY>]><root xmlns:h='http://example.com/' h:foo='bar'/>", 88, "root_test", NULL, 0);\r
+        api_root = NULL;\r
+        api_attr = NULL;\r
+    }\r
+    return(api_doc);\r
+}\r
+\r
+static xmlNodePtr get_api_root(void)\r
+{\r
+    if ((api_root == NULL) || (api_root->type != XML_ELEMENT_NODE)) {\r
+        get_api_doc();\r
+       if ((api_doc != NULL) && (api_doc->children != NULL) &&\r
+           (api_doc->children->next != NULL) &&\r
+           (api_doc->children->next->type == XML_ELEMENT_NODE))\r
+           api_root = api_doc->children->next;\r
+    }\r
+    return(api_root);\r
+}\r
+\r
+#define gen_nb_xmlOutputBufferPtr 1\r
+static xmlOutputBufferPtr gen_xmlOutputBufferPtr(int no, int nr ATTRIBUTE_UNUSED) {\r
+    if (no == 0) return(xmlOutputBufferCreateFilename(OUTFILE3, NULL, 0));\r
+    return(NULL);\r
+}\r
+static void des_xmlOutputBufferPtr(int no ATTRIBUTE_UNUSED, xmlOutputBufferPtr val, int nr ATTRIBUTE_UNUSED) {\r
+    if (val != NULL) {\r
+        xmlOutputBufferClose(val);\r
+    }\r
+}\r
+\r
+#define gen_nb_fileoutput 1\r
+\r
+static void des_fileoutput(int no ATTRIBUTE_UNUSED, const char *val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+}\r
+\r
+#define gen_nb_int 1\r
+\r
+static int gen_int(int no, int nr ATTRIBUTE_UNUSED) {\r
+    if (no == 0) return(0);\r
+    if (no == 1) return(1);\r
+    if (no == 2) return(-1);\r
+    if (no == 3) return(122);\r
+    return(-1);\r
+}\r
+\r
+static void des_int(int no ATTRIBUTE_UNUSED, int val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+}\r
+\r
+#define gen_nb_xmlBufferPtr 1\r
+static const char *static_buf_content = "a static buffer";\r
+static xmlBufferPtr gen_xmlBufferPtr(int no, int nr ATTRIBUTE_UNUSED) {\r
+    if (no == 0) return(xmlBufferCreate());\r
+    if (no == 1) return(xmlBufferCreateStatic((void *)static_buf_content, 13));\r
+    return(NULL);\r
+}\r
+static void des_xmlBufferPtr(int no ATTRIBUTE_UNUSED, xmlBufferPtr val, int nr ATTRIBUTE_UNUSED) {\r
+    if (val != NULL) {\r
+        xmlBufferFree(val);\r
+    }\r
+}\r
+\r
+#define gen_nb_const_char_ptr 2\r
+\r
+static char *gen_const_char_ptr(int no, int nr ATTRIBUTE_UNUSED) {\r
+    if (no == 0) return((char *) "foo");\r
+    if (no == 1) return((char *) "<foo/>");\r
+    if (no == 2) return((char *) "test/ent2");\r
+    return(NULL);\r
+}\r
+static void des_const_char_ptr(int no ATTRIBUTE_UNUSED, const char *val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+}\r
+\r
+static void desret_xmlParserCtxtPtr(xmlParserCtxtPtr val) {\r
+    xmlFreeParserCtxt(val);\r
+}\r
+\r
+#define gen_nb_xmlNodePtr 2\r
+static xmlNodePtr gen_xmlNodePtr(int no, int nr ATTRIBUTE_UNUSED) {\r
+    if (no == 0) return(xmlNewPI(BAD_CAST "test", NULL));\r
+    if (no == 1) return(get_api_root());\r
+    return(NULL);\r
+}\r
+\r
+static void des_xmlNodePtr(int no, xmlNodePtr val, int nr ATTRIBUTE_UNUSED) {\r
+    if (no == 1) {\r
+        free_api_doc();\r
+    } else if (val != NULL) {\r
+        xmlUnlinkNode(val);\r
+        xmlFreeNode(val);\r
+    }\r
+}\r
+\r
+#define gen_nb_xmlDocPtr 1\r
+static xmlDocPtr gen_xmlDocPtr(int no, int nr ATTRIBUTE_UNUSED) {\r
+    if (no == 0) return(xmlNewDoc(BAD_CAST "1.0"));\r
+    if (no == 1) return(xmlReadMemory("<foo/>", 6, "test", NULL, 0));\r
+    if (no == 2) return(xmlReadMemory("<!DOCTYPE foo []> <foo/>", 24, "test", NULL, 0));\r
+    return(NULL);\r
+}\r
+static void des_xmlDocPtr(int no ATTRIBUTE_UNUSED, xmlDocPtr val, int nr ATTRIBUTE_UNUSED) {\r
+    if ((val != NULL) && (val != api_doc) && (val->doc != api_doc))\r
+        xmlFreeDoc(val);\r
+}\r
+\r
+static void desret_int(int val ATTRIBUTE_UNUSED) {\r
+}\r
+\r
+static xmlChar ** gen_const_xmlChar_ptr_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+    return(NULL);\r
+}\r
+static void des_const_xmlChar_ptr_ptr(int no ATTRIBUTE_UNUSED, const xmlChar ** val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+}\r
+\r
+#define gen_nb_const_xmlChar_ptr 1\r
+\r
+static xmlChar *gen_const_xmlChar_ptr(int no, int nr ATTRIBUTE_UNUSED) {\r
+    if (no == 0) return((xmlChar *) "foo");\r
+    if (no == 1) return((xmlChar *) "<foo/>");\r
+    if (no == 2) return((xmlChar *) "n?e");\r
+    if (no == 3) return((xmlChar *) " 2ab ");\r
+    return(NULL);\r
+}\r
+static void des_const_xmlChar_ptr(int no ATTRIBUTE_UNUSED, const xmlChar *val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED)\r
+{\r
+\r
+}\r
+\r
+static FILE *gen_FILE_ptr(int no, int nr ATTRIBUTE_UNUSED)\r
+{\r
+    if (no == 0) return(fopen("test.out", "a+"));\r
+    return(NULL);\r
+}\r
+\r
+static void des_FILE_ptr(int no ATTRIBUTE_UNUSED, FILE *val, int nr ATTRIBUTE_UNUSED)\r
+{\r
+    if (val != NULL) fclose(val);\r
+}\r
+\r
+       /**    \r
+       * @test                 UTchtmlIsBooleanAttrP01\r
+       * @brief                int htmlIsBooleanAttr(const xmlChar *name);\r
+       * @desc\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Sathish Kumar (satish.k4@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks\r
+       *\r
+       * @b priority\r
+       * @b etc                none\r
+       */\r
+static void UTchtmlIsBooleanAttrP01()\r
+{\r
+       int ret_val;\r
+\r
+\r
+       const xmlChar *name1 = (const xmlChar *)"checked";\r
+       const xmlChar *name2 = (const xmlChar *)"junk";\r
+\r
+\r
+       ret_val = htmlIsBooleanAttr(name1);  // passing valid string(+ve)\r
+       DTS_CHECK_EQ_MESSAGE("htmlIsBooleanAttr", ret_val, 1, "htmlIsBooleanAttr Failes");\r
+\r
+       ret_val = htmlIsBooleanAttr(name2);  // passing invalid string(-ve)\r
+       DTS_CHECK_EQ_MESSAGE("htmlIsBooleanAttr", ret_val, 0, "htmlIsBooleanAttr Failes");\r
+\r
+       ret_val = htmlIsBooleanAttr(NULL);   // passing NULL(-ve)\r
+       DTS_CHECK_EQ_MESSAGE("htmlIsBooleanAttr", ret_val, 0, "htmlIsBooleanAttr Failes");\r
+\r
+}\r
+       /**\r
+       * @test                 UTchtmlDocDumpP01\r
+       * @brief                int htmlDocDump(FILE *f, xmlDocPtr cur);\r
+       * @desc\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Sathish Kumar (satish.k4@samsung.com)\r
+       * @return               int\r
+       * @see                  none\r
+       * @remarks\r
+       *\r
+       * @b priority\r
+       * @b etc                none\r
+       */\r
+static void UTchtmlDocDumpP01()\r
+{\r
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) && defined(STDIO_FILE)\r
+    int ret_val;\r
+    FILE * f; /* the FILE* */\r
+    int n_f;\r
+    xmlDocPtr cur; /* the document */\r
+    int n_cur;\r
+\r
+    for (n_f = 0;n_f < gen_nb_FILE_ptr;n_f++) {\r
+    for (n_cur = 0;n_cur < gen_nb_xmlDocPtr;n_cur++) {\r
+        f = gen_FILE_ptr(n_f, 0);\r
+        cur = gen_xmlDocPtr(n_cur, 1);\r
+\r
+               ret_val = htmlDocDump(f, cur);\r
+        if(ret_val == -1) // checking for failure(-ve)\r
+               {\r
+                       DTS_CHECK_EQ_MESSAGE("htmlDocDump", ret_val, -1, "htmlDocDump Failes");\r
+               }\r
+        else  // checking for success(+ve)\r
+               {\r
+                       DTS_CHECK_NE_MESSAGE("htmlDocDump", ret_val, -1, "htmlDocDump Failes");\r
+               }\r
+       ret_val = htmlDocDump(NULL, cur); // checking for failure(-ve)\r
+               DTS_CHECK_EQ_MESSAGE("htmlDocDump", ret_val, -1, "htmlDocDump Failes");\r
+\r
+               ret_val = htmlDocDump(f, NULL);   // checking for failure(-ve)\r
+               DTS_CHECK_EQ_MESSAGE("htmlDocDump", ret_val, -1, "htmlDocDump Failes");\r
+\r
+               ret_val = htmlDocDump(NULL, NULL); // checking for failure(-ve)\r
+               DTS_CHECK_EQ_MESSAGE("htmlDocDump", ret_val, -1, "htmlDocDump Failes");\r
+\r
+        desret_int(ret_val);\r
+        call_tests++;\r
+        des_FILE_ptr(n_f, f, 0);\r
+        des_xmlDocPtr(n_cur, cur, 1);\r
+        xmlResetLastError();\r
+    }\r
+    }\r
+    function_tests++;\r
+#endif\r
+}\r
+/**\r
+       * @test                 UTchtmlNodeDumpP01\r
+       * @brief                int htmlNodeDump(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur);\r
+       * @desc\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Sathish Kumar (satish.k4@samsung.com)\r
+       * @return               int\r
+       * @see                  none\r
+       * @remarks\r
+       *\r
+       * @b priority\r
+       * @b etc                none\r
+       */\r
+static void UTchtmlNodeDumpP01()\r
+{\r
+    int test_ret = 0;\r
+\r
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)\r
+    int mem_base;\r
+    int ret_val;\r
+    xmlBufferPtr buf; /* the HTML buffer output */\r
+    int n_buf;\r
+    xmlDocPtr doc; /* the document */\r
+    int n_doc;\r
+    xmlNodePtr cur; /* the current node */\r
+    int n_cur;\r
+\r
+    for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {\r
+    for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {\r
+    for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {\r
+        buf = gen_xmlBufferPtr(n_buf, 0);\r
+        doc = gen_xmlDocPtr(n_doc, 1);\r
+        cur = gen_xmlNodePtr(n_cur, 2);\r
+\r
+        ret_val = htmlNodeDump(buf, doc, cur);\r
+        if(ret_val == -1) // checking for failure(-ve)\r
+               {\r
+                       DTS_CHECK_EQ_MESSAGE("htmlNodeDump", ret_val, -1, "htmlNodeDump Failes");\r
+               }\r
+        else // checking for success(+ve)\r
+               {\r
+                       DTS_CHECK_NE_MESSAGE("htmlNodeDump", ret_val, -1, "htmlNodeDump Failes");\r
+               }               \r
+\r
+        ret_val = htmlNodeDump(NULL, doc, cur); // checking for failure(-ve)\r
+       DTS_CHECK_EQ_MESSAGE("htmlNodeDump", ret_val, -1, "htmlNodeDump Failes");\r
+\r
+        ret_val = htmlNodeDump(buf, doc, NULL); // checking for failure(-ve)\r
+        DTS_CHECK_EQ_MESSAGE("htmlNodeDump", ret_val, -1, "htmlNodeDump Failes");\r
+\r
+        ret_val = htmlNodeDump(NULL, NULL, NULL); // checking for failure(-ve)\r
+       DTS_CHECK_EQ_MESSAGE("htmlNodeDump", ret_val, -1, "htmlNodeDump Failes");\r
+\r
+        ret_val = htmlNodeDump(buf, doc, cur); // checking for failure(-ve)\r
+        DTS_CHECK_NE_MESSAGE("htmlNodeDump", ret_val, NULL, "htmlNodeDump Failes");\r
+\r
+        desret_int(ret_val);\r
+        call_tests++;\r
+        des_xmlBufferPtr(n_buf, buf, 0);\r
+        des_xmlDocPtr(n_doc, doc, 1);\r
+        des_xmlNodePtr(n_cur, cur, 2);\r
+        xmlResetLastError();\r
+    }\r
+    }\r
+    }\r
+    function_tests++;\r
+#endif\r
+}\r
+/**\r
+       * @test                 UTchtmlNodeDumpFileFormatP01\r
+       * @brief                int htmlNodeDumpFileFormat(FILE *out, xmlDocPtr doc, xmlNodePtr cur, const char *encoding, int format);\r
+       * @desc\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Sathish Kumar (satish.k4@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks\r
+       *\r
+       * @b priority\r
+       * @b etc                none\r
+       */\r
+static void UTchtmlNodeDumpFileFormatP01()\r
+{\r
+#ifdef         STDIO_FILE\r
+       /**\r
+       * @remarks   input1: [N/A, N/A] @n\r
+       *            {FILE*(out), xmlDocPtr(doc), xmlNodePtr(cur), const char*(encoding), int(format)} => { N/A | int(bytes) } @n\r
+       */\r
+    int ret_val;\r
+    FILE * out; /* the FILE pointer */\r
+    int n_out;\r
+    xmlDocPtr doc; /* the document */\r
+    int n_doc;\r
+    xmlNodePtr cur; /* the current node */\r
+    int n_cur;\r
+    char * encoding; /* the document encoding */\r
+    int n_encoding;\r
+    int format; /* should formatting spaces been added */\r
+    int n_format;\r
+\r
+    for (n_out = 0;n_out < gen_nb_FILE_ptr;n_out++) {\r
+    for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {\r
+    for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {\r
+    for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {\r
+    for (n_format = 0;n_format < gen_nb_int;n_format++) {\r
+        out = gen_FILE_ptr(n_out, 0);\r
+        doc = gen_xmlDocPtr(n_doc, 1);\r
+        cur = gen_xmlNodePtr(n_cur, 2);\r
+        encoding = gen_const_char_ptr(n_encoding, 3);\r
+        format = gen_int(n_format, 4);\r
+\r
+        ret_val = htmlNodeDumpFileFormat(out, doc, cur, (const char *)encoding, format);\r
+        if(ret_val == -1) // checking for failure(-ve)\r
+               {\r
+                       DTS_CHECK_EQ_MESSAGE("htmlNodeDumpFileFormat", ret_val, -1, "htmlNodeDumpFileFormat Failes");\r
+               }\r
+        else // checking for success(+ve)\r
+               {\r
+                       DTS_CHECK_NE_MESSAGE("htmlNodeDumpFileFormat", ret_val, -1, "htmlNodeDumpFileFormat Failes");\r
+               }               \r
+\r
+        ret_val = htmlNodeDumpFileFormat(NULL, doc, cur, (const char *)encoding, format);// checking for failure(-ve)\r
+        DTS_CHECK_EQ_MESSAGE("htmlNodeDumpFileFormat", ret_val, -1, "htmlNodeDumpFileFormat Failes");\r
+\r
+        ret_val = htmlNodeDumpFileFormat(out, NULL, cur, (const char *)encoding, format);// checking for failure(-ve)\r
+        DTS_CHECK_EQ_MESSAGE("htmlNodeDumpFileFormat", ret_val, -1, "htmlNodeDumpFileFormat Failes");\r
+\r
+        ret_val = htmlNodeDumpFileFormat(out, doc, NULL, (const char *)encoding, format);// checking for failure(-ve)\r
+        DTS_CHECK_EQ_MESSAGE("htmlNodeDumpFileFormat", ret_val, -1, "htmlNodeDumpFileFormat Failes");\r
+\r
+        desret_int(ret_val);\r
+        call_tests++;\r
+        des_FILE_ptr(n_out, out, 0);\r
+        des_xmlDocPtr(n_doc, doc, 1);\r
+        des_xmlNodePtr(n_cur, cur, 2);\r
+        des_const_char_ptr(n_encoding, (const char *)encoding, 3);\r
+        des_int(n_format, format, 4);\r
+        xmlResetLastError();\r
+    }\r
+    }\r
+    }\r
+    }\r
+    }\r
+    function_tests++;\r
+#endif /*STDIO_FILE*/\r
+}\r
+/**\r
+       * @test                 UTchtmlSaveFileP01\r
+       * @brief                int htmlSaveFile(const char *filename, xmlDocPtr cur)\r
+       * @desc\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Sathish Kumar (satish.k4@samsung.com)\r
+       * @return               int\r
+       * @see                  none\r
+       * @remarks\r
+       *\r
+       * @b priority\r
+       * @b etc                none\r
+       */\r
+static void UTchtmlSaveFileP01()\r
+{\r
+    int test_ret = 0;\r
+\r
+       /**\r
+       * @remarks   input1: [N/A, N/A] @n\r
+       *            {const char *(filename), xmlDocPtr(cur)} => { N/A | int(bytes) } @n\r
+       */\r
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)\r
+    int ret_val;\r
+    const char * filename; /* the filename (or URL) */\r
+    int n_filename;\r
+    xmlDocPtr cur; /* the document */\r
+    int n_cur;\r
+\r
+    for (n_filename = 0;n_filename < gen_nb_fileoutput;n_filename++) {\r
+    for (n_cur = 0;n_cur < gen_nb_xmlDocPtr;n_cur++) {\r
+        filename = gen_fileoutput(n_filename, 0);\r
+        cur = gen_xmlDocPtr(n_cur, 1);\r
+               \r
+        ret_val = htmlSaveFile(filename, cur);\r
+        if(ret_val == -1) // checking for failure(-ve)\r
+               {\r
+                       DTS_CHECK_EQ_MESSAGE("htmlSaveFile", ret_val, -1, "htmlSaveFile Failes");\r
+               }\r
+        else // checking for success(+ve)\r
+               {\r
+                       DTS_CHECK_NE_MESSAGE("htmlSaveFile", ret_val, -1, "htmlSaveFile Failes");\r
+               }               \r
+\r
+        ret_val = htmlSaveFile(NULL, cur); // checking for failure(-ve)\r
+        DTS_CHECK_EQ_MESSAGE("htmlSaveFile", ret_val, -1, "htmlSaveFile Failes");\r
+\r
+        ret_val = htmlSaveFile(filename, NULL); // checking for failure(-ve)\r
+        DTS_CHECK_EQ_MESSAGE("htmlSaveFile", ret_val, -1, "htmlSaveFile Failes");\r
+\r
+        ret_val = htmlSaveFile(NULL, NULL); // checking for failure(-ve)\r
+       DTS_CHECK_EQ_MESSAGE("htmlSaveFile", ret_val, -1, "htmlSaveFile Failes");\r
+\r
+        desret_int(ret_val);\r
+        call_tests++;\r
+        des_fileoutput(n_filename, filename, 0);\r
+        des_xmlDocPtr(n_cur, cur, 1);\r
+        xmlResetLastError();\r
+    }\r
+    }\r
+    function_tests++;\r
+#endif\r
+}\r
+/**\r
+       * @test                 UTchtmlNodeDumpFormatOutputP01\r
+       * @brief                void htmlNodeDumpFormatOutput(xmlOutputBufferPtr buf, xmlDocPtr doc,\r
+                       xmlNodePtr cur, const char *encoding, int format)\r
+       * @desc\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Sathish Kumar (satish.k4@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks\r
+       *\r
+       * @b priority\r
+       * @b etc                none\r
+       */\r
+static void UTchtmlNodeDumpFormatOutputP01()\r
+{\r
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)\r
+    xmlOutputBufferPtr buf; /* the HTML buffer output */\r
+    int n_buf;\r
+    xmlDocPtr doc; /* the document */\r
+    int n_doc;\r
+    xmlNodePtr cur; /* the current node */\r
+    int n_cur;\r
+    char * encoding; /* the encoding string */\r
+    int n_encoding;\r
+    int format; /* should formatting spaces been added */\r
+    int n_format;\r
+\r
+    for (n_buf = 0;n_buf < gen_nb_xmlOutputBufferPtr;n_buf++) {\r
+    for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {\r
+    for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {\r
+    for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {\r
+    for (n_format = 0;n_format < gen_nb_int;n_format++) {\r
+        buf = gen_xmlOutputBufferPtr(n_buf, 0);\r
+        doc = gen_xmlDocPtr(n_doc, 1);\r
+        cur = gen_xmlNodePtr(n_cur, 2);\r
+        encoding = gen_const_char_ptr(n_encoding, 3);\r
+        format = gen_int(n_format, 4);\r
+\r
+        htmlNodeDumpFormatOutput(buf, doc, cur, (const char *)encoding, format);\r
+        if(NULL == buf) // checking for failure(-ve)\r
+               {\r
+                       DTS_CHECK_EQ_MESSAGE("htmlNodeDumpFormatOutput", buf, NULL, "htmlNodeDumpFormatOutput Failes");\r
+               }\r
+        else // checking for success(+ve)\r
+               {\r
+                       DTS_CHECK_NE_MESSAGE("htmlNodeDumpFormatOutput", buf, NULL, "htmlNodeDumpFormatOutput Failes");\r
+               }               \r
+\r
+        call_tests++;\r
+        des_xmlOutputBufferPtr(n_buf, buf, 0);\r
+        des_xmlDocPtr(n_doc, doc, 1);\r
+        des_xmlNodePtr(n_cur, cur, 2);\r
+        des_const_char_ptr(n_encoding, (const char *)encoding, 3);\r
+        des_int(n_format, format, 4);\r
+        xmlResetLastError();\r
+    }\r
+    }\r
+    }\r
+    }\r
+    }\r
+    function_tests++;\r
+#endif\r
+}\r
+       /**\r
+       * @test                 UTchtmlNodeDumpOutputP01\r
+       * @brief                void htmlNodeDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr doc,\r
+                       xmlNodePtr cur, const char *encoding)\r
+       * @desc\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Sathish Kumar (satish.k4@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks\r
+       *\r
+       * @b priority\r
+       * @b etc                none\r
+       */\r
+static void UTchtmlNodeDumpOutputP01()\r
+{\r
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)\r
+    xmlOutputBufferPtr buf; /* the HTML buffer output */\r
+    int n_buf;\r
+    xmlDocPtr doc; /* the document */\r
+    int n_doc;\r
+    xmlNodePtr cur; /* the current node */\r
+    int n_cur;\r
+    char * encoding; /* the encoding string */\r
+    int n_encoding;\r
+\r
+    for (n_buf = 0;n_buf < gen_nb_xmlOutputBufferPtr;n_buf++) {\r
+    for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {\r
+    for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {\r
+    for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {\r
+        buf = gen_xmlOutputBufferPtr(n_buf, 0);\r
+        doc = gen_xmlDocPtr(n_doc, 1);\r
+        cur = gen_xmlNodePtr(n_cur, 2);\r
+        encoding = gen_const_char_ptr(n_encoding, 3);\r
+\r
+        htmlNodeDumpOutput(buf, doc, cur, (const char *)encoding);\r
+               if(buf == NULL)\r
+               {\r
+                       DTS_CHECK_EQ_MESSAGE("htmlNodeDumpOutput", buf, NULL, "htmlNodeDumpOutput Failes");\r
+               }\r
+        else // checking for success(+ve)\r
+               {\r
+                       DTS_CHECK_NE_MESSAGE("htmlNodeDumpOutput", buf, NULL, "htmlNodeDumpOutput Failes");\r
+               }                       \r
+        call_tests++;\r
+        des_xmlOutputBufferPtr(n_buf, buf, 0);\r
+        des_xmlDocPtr(n_doc, doc, 1);\r
+        des_xmlNodePtr(n_cur, cur, 2);\r
+        des_const_char_ptr(n_encoding, (const char *)encoding, 3);\r
+        xmlResetLastError();\r
+    }\r
+    }\r
+    }\r
+    }\r
+    function_tests++;\r
+#endif\r
+}\r
+/**\r
+       * @test                 UTchtmlSaveFileEncP01\r
+       * @brief                int htmlSaveFileEnc(const char *filename, xmlDocPtr cur, const char *encoding)\r
+       * @desc\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Sathish Kumar (satish.k4@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks\r
+       *\r
+       * @b priority\r
+       * @b etc                none\r
+       */\r
+static void UTchtmlSaveFileEncP01()\r
+{\r
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)\r
+    int ret_val;\r
+    const char * filename; /* the filename */\r
+    int n_filename;\r
+    xmlDocPtr cur; /* the document */\r
+    int n_cur;\r
+    char * encoding; /* the document encoding */\r
+    int n_encoding;\r
+\r
+    for (n_filename = 0;n_filename < gen_nb_fileoutput;n_filename++) {\r
+    for (n_cur = 0;n_cur < gen_nb_xmlDocPtr;n_cur++) {\r
+    for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {\r
+        filename = gen_fileoutput(n_filename, 0);\r
+        cur = gen_xmlDocPtr(n_cur, 1);\r
+        encoding = gen_const_char_ptr(n_encoding, 2);\r
+\r
+        ret_val = htmlSaveFileEnc(filename, cur, (const char *)encoding);\r
+               if(ret_val == -1)\r
+               {\r
+                       DTS_CHECK_EQ_MESSAGE("htmlSaveFileEnc", ret_val, -1, "htmlSaveFileEnc Failes");\r
+               }\r
+        else  // checking for success(+ve)\r
+               {\r
+                       DTS_CHECK_NE_MESSAGE("htmlSaveFileEnc", ret_val, -1, "htmlSaveFileEnc Failes");\r
+               }                       \r
+               \r
+\r
+        ret_val = htmlSaveFileEnc(NULL, cur, (const char *)encoding); // checking for failure(-ve)\r
+       DTS_CHECK_EQ_MESSAGE("htmlSaveFileEnc", ret_val, -1, "htmlSaveFileEnc Failes");\r
+\r
+        ret_val = htmlSaveFileEnc(filename, NULL, (const char *)encoding); // checking for failure(-ve)\r
+               DTS_CHECK_EQ_MESSAGE("htmlSaveFileEnc", ret_val, -1, "htmlSaveFileEnc Failes");\r
+\r
+        ret_val = htmlSaveFileEnc(NULL, NULL, NULL); // checking for failure(-ve)\r
+               DTS_CHECK_EQ_MESSAGE("htmlSaveFileEnc", ret_val, -1, "htmlSaveFileEnc Failes");\r
+\r
+        desret_int(ret_val);\r
+        call_tests++;\r
+        des_fileoutput(n_filename, filename, 0);\r
+        des_xmlDocPtr(n_cur, cur, 1);\r
+        des_const_char_ptr(n_encoding, (const char *)encoding, 2);\r
+        xmlResetLastError();\r
+    }\r
+    }\r
+    }\r
+    function_tests++;\r
+#endif\r
+}\r
+/**\r
+       * @test                 UTchtmlSaveFileFormatP01\r
+       * @brief                int htmlSaveFileFormat(const char *filename, xmlDocPtr cur,\r
+                       const char *encoding, int format)\r
+       * @desc\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Sathish Kumar (satish.k4@samsung.com)\r
+       * @return               int\r
+       * @see                  none\r
+       * @remarks\r
+       *\r
+       * @b priority\r
+       * @b etc                none\r
+       */\r
+static void UTchtmlSaveFileFormatP01()\r
+{\r
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)\r
+    int ret_val;\r
+    const char * filename; /* the filename */\r
+    int n_filename;\r
+    xmlDocPtr cur; /* the document */\r
+    int n_cur;\r
+    char * encoding; /* the document encoding */\r
+    int n_encoding;\r
+    int format; /* should formatting spaces been added */\r
+    int n_format;\r
+\r
+    for (n_filename = 0;n_filename < gen_nb_fileoutput;n_filename++) {\r
+    for (n_cur = 0;n_cur < gen_nb_xmlDocPtr;n_cur++) {\r
+    for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {\r
+    for (n_format = 0;n_format < gen_nb_int;n_format++) {\r
+        filename = gen_fileoutput(n_filename, 0);\r
+        cur = gen_xmlDocPtr(n_cur, 1);\r
+        encoding = gen_const_char_ptr(n_encoding, 2);\r
+        format = gen_int(n_format, 3);\r
+\r
+        ret_val = htmlSaveFileFormat(filename, cur, (const char *)encoding, format);\r
+        if(ret_val == -1)\r
+               {\r
+                       DTS_CHECK_EQ_MESSAGE("htmlSaveFileFormat", ret_val, -1, "htmlSaveFileFormat Failes");\r
+               }\r
+        else  // checking for success(+ve)\r
+               {\r
+                       DTS_CHECK_NE_MESSAGE("htmlSaveFileFormat", ret_val, -1, "htmlSaveFileFormat Failes");\r
+               }               \r
+\r
+        ret_val = htmlSaveFileFormat(NULL, cur, (const char *)encoding, format);\r
+               DTS_CHECK_EQ_MESSAGE("htmlSaveFileFormat", ret_val, -1, "htmlSaveFileFormat Failes");\r
+\r
+        ret_val = htmlSaveFileFormat(filename, NULL, (const char *)encoding, format);\r
+               DTS_CHECK_EQ_MESSAGE("htmlSaveFileFormat", ret_val, -1, "htmlSaveFileFormat Failes");\r
+\r
+        ret_val = htmlSaveFileFormat(NULL, NULL, NULL, format);\r
+               DTS_CHECK_EQ_MESSAGE("htmlSaveFileFormat", ret_val, -1, "htmlSaveFileFormat Failes");\r
+\r
+        desret_int(ret_val);\r
+        call_tests++;\r
+        des_fileoutput(n_filename, filename, 0);\r
+        des_xmlDocPtr(n_cur, cur, 1);\r
+        des_const_char_ptr(n_encoding, (const char *)encoding, 2);\r
+        des_int(n_format, format, 3);\r
+        xmlResetLastError();\r
+    }\r
+    }\r
+    }\r
+    }\r
+    function_tests++;\r
+#endif\r
+}\r
+\r
+static void des_htmlDocPtr(int no ATTRIBUTE_UNUSED, htmlDocPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED)\r
+{\r
+    if ((val != NULL) && (val != api_doc) && (val->doc != api_doc))\r
+        xmlFreeDoc(val);\r
+}\r
+\r
+static htmlDocPtr gen_htmlDocPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED)\r
+{\r
+    if (no == 0) return(htmlNewDoc(NULL, NULL));\r
+    if (no == 1) return(htmlReadMemory("<html/>", 7, "test", NULL, 0));\r
+    return(NULL);\r
+}\r
+/**\r
+       * @test                 UTchtmlSetMetaEncodingP01\r
+       * @brief                int htmlSetMetaEncoding(htmlDocPtr doc, const xmlChar *encoding)\r
+       * @desc\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Sathish Kumar (satish.k4@samsung.com)\r
+       * @return               int\r
+       * @see                  none\r
+       * @remarks\r
+       *\r
+       * @b priority\r
+       * @b etc                none\r
+       */\r
+static void UTchtmlSetMetaEncodingP01()\r
+{\r
+#if defined(LIBXML_HTML_ENABLED)\r
+    int ret_val;\r
+    htmlDocPtr doc; /* the document */\r
+    int n_doc;\r
+    xmlChar * encoding; /* the encoding string */\r
+    int n_encoding;\r
+\r
+    for (n_doc = 0;n_doc < gen_nb_htmlDocPtr;n_doc++) {\r
+    for (n_encoding = 0;n_encoding < gen_nb_const_xmlChar_ptr;n_encoding++) {\r
+        doc = gen_htmlDocPtr(n_doc, 0);\r
+        encoding = gen_const_xmlChar_ptr(n_encoding, 1);\r
+\r
+        if(n_doc <= 1)\r
+        {\r
+                       ret_val = htmlSetMetaEncoding(doc, (const xmlChar *)encoding);\r
+                       if(ret_val == -1)\r
+                               {\r
+                                       DTS_CHECK_EQ_MESSAGE("htmlSetMetaEncoding", ret_val, -1, "htmlSetMetaEncoding Failes");\r
+                               }\r
+                       else  // checking for success(+ve)\r
+                               {\r
+                                       DTS_CHECK_NE_MESSAGE("htmlSetMetaEncoding", ret_val, -1, "htmlSetMetaEncoding Failes");\r
+                               }                       \r
+        }\r
+        desret_int(ret_val);\r
+        call_tests++;\r
+        des_htmlDocPtr(n_doc, doc, 0);\r
+        des_const_xmlChar_ptr(n_encoding, (const xmlChar *)encoding, 1);\r
+        xmlResetLastError();\r
+    }\r
+    }\r
+    function_tests++;\r
+#endif\r
+}\r
+/**\r
+       * @test                 UTchtmlDocContentDumpFormatOutputP01\r
+       * @brief                void htmlDocContentDumpFormatOutput(xmlOutputBufferPtr buf, xmlDocPtr cur,\r
+                       const char *encoding, int format)\r
+       * @desc\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Sathish Kumar (satish.k4@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks\r
+       *\r
+       * @b priority\r
+       * @b etc                none\r
+       */\r
+static void UTchtmlDocContentDumpFormatOutputP01()\r
+{\r
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)\r
+    xmlOutputBufferPtr buf; /* the HTML buffer output */\r
+    int n_buf;\r
+    xmlDocPtr cur; /* the document */\r
+    int n_cur;\r
+    char * encoding; /* the encoding string */\r
+    int n_encoding;\r
+    int format; /* should formatting spaces been added */\r
+    int n_format;\r
+\r
+    for (n_buf = 0;n_buf < gen_nb_xmlOutputBufferPtr;n_buf++) {\r
+    for (n_cur = 0;n_cur < gen_nb_xmlDocPtr;n_cur++) {\r
+    for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {\r
+    for (n_format = 0;n_format < gen_nb_int;n_format++) {\r
+        buf = gen_xmlOutputBufferPtr(n_buf, 0);\r
+        cur = gen_xmlDocPtr(n_cur, 1);\r
+        encoding = gen_const_char_ptr(n_encoding, 2);\r
+        format = gen_int(n_format, 3);\r
+\r
+        htmlDocContentDumpFormatOutput(buf, cur, (const char *)encoding, format);\r
+        if(NULL == buf)\r
+               {\r
+                       DTS_CHECK_EQ_MESSAGE("htmlDocContentDumpFormatOutput", buf, NULL, "htmlDocContentDumpFormatOutput Failes");\r
+               }\r
+        else  // checking for success(+ve)\r
+               {\r
+                       DTS_CHECK_NE_MESSAGE("htmlDocContentDumpFormatOutput", buf, NULL, "htmlDocContentDumpFormatOutput Failes");\r
+               }                       \r
+               \r
+        call_tests++;\r
+        des_xmlOutputBufferPtr(n_buf, buf, 0);\r
+        des_xmlDocPtr(n_cur, cur, 1);\r
+        des_const_char_ptr(n_encoding, (const char *)encoding, 2);\r
+        des_int(n_format, format, 3);\r
+        xmlResetLastError();\r
+    }\r
+    }\r
+    }\r
+    }\r
+    function_tests++;\r
+#endif\r
+}\r
+/**\r
+       * @test                 UTchtmlDocContentDumpOutputP01\r
+       * @brief                void htmlDocContentDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr cur,\r
+                       const char *encoding)\r
+       * @desc\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Sathish Kumar (satish.k4@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks\r
+       *\r
+       * @b priority\r
+       * @b etc                none\r
+       */\r
+\r
+static void UTchtmlDocContentDumpOutputP01()\r
+{\r
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)\r
+    int mem_base;\r
+    xmlOutputBufferPtr buf; /* the HTML buffer output */\r
+    int n_buf;\r
+    xmlDocPtr cur; /* the document */\r
+    int n_cur;\r
+    char * encoding; /* the encoding string */\r
+    int n_encoding;\r
+\r
+    for (n_buf = 0;n_buf < gen_nb_xmlOutputBufferPtr;n_buf++) {\r
+    for (n_cur = 0;n_cur < gen_nb_xmlDocPtr;n_cur++) {\r
+    for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {\r
+        buf = gen_xmlOutputBufferPtr(n_buf, 0);\r
+        cur = gen_xmlDocPtr(n_cur, 1);\r
+        encoding = gen_const_char_ptr(n_encoding, 2);\r
+\r
+        htmlDocContentDumpOutput(buf, cur, (const char *)encoding);\r
+        if(NULL == buf)\r
+               {\r
+                       DTS_CHECK_EQ_MESSAGE("htmlDocContentDumpOutput", buf, NULL, "htmlDocContentDumpOutput Failes");\r
+               }\r
+        else  // checking for success(+ve)\r
+               {\r
+                       DTS_CHECK_NE_MESSAGE("htmlDocContentDumpOutput", buf, NULL, "htmlDocContentDumpOutput Failes");\r
+               }                       \r
+               \r
+        call_tests++;\r
+        des_xmlOutputBufferPtr(n_buf, buf, 0);\r
+        des_xmlDocPtr(n_cur, cur, 1);\r
+        des_const_char_ptr(n_encoding, (const char *)encoding, 2);\r
+        xmlResetLastError();\r
+    }\r
+    }\r
+    }\r
+    function_tests++;\r
+#endif\r
+}\r
+\r
+static void des_int_ptr(int no ATTRIBUTE_UNUSED, int *val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED)\r
+{\r
+\r
+}\r
+\r
+static void des_xmlChar_ptr_ptr(int no ATTRIBUTE_UNUSED, xmlChar ** val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED)\r
+{\r
+\r
+}\r
+\r
+static int *gen_int_ptr(int no, int nr)\r
+{\r
+    if (no == 0) return(&inttab[nr]);\r
+    return(NULL);\r
+}\r
+\r
+static xmlChar ** gen_xmlChar_ptr_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED)\r
+{\r
+    return(NULL);\r
+}\r
+\r
+/**\r
+       * @test                 UTchtmlDocDumpMemoryP01\r
+       * @brief                void htmlDocDumpMemory(xmlDocPtr cur, xmlChar**mem, int *size)\r
+       * @desc\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Sathish Kumar (satish.k4@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks\r
+       *\r
+       * @b priority\r
+       * @b etc                none\r
+       */\r
+static void UTchtmlDocDumpMemoryP01()\r
+{\r
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)\r
+    xmlDocPtr cur; /* the document */\r
+    int n_cur;\r
+    xmlChar ** mem; /* OUT: the memory pointer */\r
+    int n_mem;\r
+    int * size; /* OUT: the memory length */\r
+    int n_size;\r
+\r
+    for (n_cur = 0;n_cur < gen_nb_xmlDocPtr;n_cur++) {\r
+    for (n_mem = 0;n_mem < gen_nb_xmlChar_ptr_ptr;n_mem++) {\r
+    for (n_size = 0;n_size < gen_nb_int_ptr;n_size++) {\r
+        cur = gen_xmlDocPtr(n_cur, 0);\r
+        mem = gen_xmlChar_ptr_ptr(n_mem, 1);\r
+        size = gen_int_ptr(n_size, 2);\r
+               if( cur && mem && size )\r
+               {\r
+        htmlDocDumpMemory(cur, mem, size);\r
+        if(NULL == mem)\r
+               {\r
+                       DTS_CHECK_EQ_MESSAGE("htmlDocDumpMemory", mem, NULL, "htmlDocDumpMemory Failes");\r
+               }\r
+        else  // checking for success(+ve)\r
+               {\r
+                       DTS_CHECK_NE_MESSAGE("htmlDocDumpMemory", mem, NULL, "htmlDocDumpMemory Failes");\r
+               }                       \r
+               \r
+        call_tests++;\r
+        des_xmlDocPtr(n_cur, cur, 0);\r
+        des_xmlChar_ptr_ptr(n_mem, mem, 1);\r
+        des_int_ptr(n_size, size, 2);\r
+        xmlResetLastError();\r
+               }\r
+    }\r
+    }\r
+    }\r
+    function_tests++;\r
+#endif\r
+}\r
+\r
+static void desret_const_xmlChar_ptr(const xmlChar *val ATTRIBUTE_UNUSED)\r
+{\r
+\r
+}\r
+/**\r
+       * @test                 UTchtmlGetMetaEncodingP01\r
+       * @brief                const xmlChar *htmlGetMetaEncoding(htmlDocPtr doc)\r
+       * @desc\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Sathish Kumar (satish.k4@samsung.com)\r
+       * @return               const xmlChar *\r
+       * @see                  none\r
+       * @remarks\r
+       *\r
+       * @b priority\r
+       * @b etc                none\r
+       */\r
+static void UTchtmlGetMetaEncodingP01()\r
+{\r
+#if defined(LIBXML_HTML_ENABLED)\r
+    const xmlChar * ret_val;\r
+    htmlDocPtr doc; /* the document */\r
+    int n_doc;\r
+\r
+    for (n_doc = 0;n_doc < gen_nb_htmlDocPtr;n_doc++) {\r
+        doc = gen_htmlDocPtr(n_doc, 0);\r
+\r
+               ret_val = htmlGetMetaEncoding(doc);\r
+               if(NULL == ret_val)\r
+               {\r
+                       DTS_CHECK_EQ_MESSAGE("htmlGetMetaEncoding", ret_val, NULL, "htmlGetMetaEncoding Failes");\r
+               }\r
+        else  // checking for success(+ve)\r
+               {\r
+                       DTS_CHECK_NE_MESSAGE("htmlGetMetaEncoding", ret_val, NULL, "htmlGetMetaEncoding Failes");\r
+               }                       \r
+\r
+        desret_const_xmlChar_ptr(ret_val);\r
+        call_tests++;\r
+        des_htmlDocPtr(n_doc, doc, 0);\r
+        xmlResetLastError();\r
+    }\r
+    function_tests++;\r
+#endif\r
+}\r
+/**\r
+       * @test                 UTchtmlNodeDumpFileP01\r
+       * @brief                void htmlNodeDumpFile(FILE *out, xmlDocPtr doc, xmlNodePtr cur)\r
+       * @desc\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Sathish Kumar (satish.k4@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks\r
+       *\r
+       * @b priority\r
+       * @b etc                none\r
+       */\r
+static void UTchtmlNodeDumpFileP01()\r
+{\r
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED) && defined(STDIO_FILE)\r
+    FILE * out; /* the FILE pointer */\r
+    int n_out;\r
+    xmlDocPtr doc; /* the document */\r
+    int n_doc;\r
+    xmlNodePtr cur; /* the current node */\r
+    int n_cur;\r
+\r
+    for (n_out = 0;n_out < gen_nb_FILE_ptr;n_out++) {\r
+    for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {\r
+    for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {\r
+        out = gen_FILE_ptr(n_out, 0);\r
+        doc = gen_xmlDocPtr(n_doc, 1);\r
+        cur = gen_xmlNodePtr(n_cur, 2);\r
+               if( out && doc && cur )\r
+               {\r
+        htmlNodeDumpFile(out, doc, cur);\r
+               {\r
+                       DTS_CHECK_EQ_MESSAGE("htmlNodeDumpFile", out, NULL, "htmlNodeDumpFile Failes");\r
+               }\r
+        else  // checking for success(+ve)\r
+               {\r
+                       DTS_CHECK_NE_MESSAGE("htmlNodeDumpFile", out, NULL, "htmlNodeDumpFile Failes");\r
+               }\r
+        call_tests++;\r
+        des_FILE_ptr(n_out, out, 0);\r
+        des_xmlDocPtr(n_doc, doc, 1);\r
+        des_xmlNodePtr(n_cur, cur, 2);\r
+        xmlResetLastError();\r
+               }\r
+    }\r
+    }\r
+    }\r
+    function_tests++;\r
+#endif\r
+}\r
+/**\r
+       * @test                 UTchtmlDocDumpMemoryFormatP01\r
+       * @brief                void htmlDocDumpMemoryFormat(xmlDocPtr cur, xmlChar**mem, int *size, int format)\r
+       * @desc\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Sathish Kumar (satish.k4@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks\r
+       *\r
+       * @b priority\r
+       * @b etc                none\r
+       */\r
+static void UTchtmlDocDumpMemoryFormatP01()\r
+{\r
+#if defined(LIBXML_HTML_ENABLED) && defined(LIBXML_OUTPUT_ENABLED)\r
+    xmlDocPtr cur; /* the document */\r
+    int n_cur;\r
+    xmlChar ** mem; /* OUT: the memory pointer */\r
+    int n_mem;\r
+    int * size; /* OUT: the memory length */\r
+    int n_size;\r
+    int format; /* should formatting spaces been added */\r
+    int n_format;\r
+\r
+    for (n_cur = 0;n_cur < gen_nb_xmlDocPtr;n_cur++) {\r
+    for (n_mem = 0;n_mem < gen_nb_xmlChar_ptr_ptr;n_mem++) {\r
+    for (n_size = 0;n_size < gen_nb_int_ptr;n_size++) {\r
+    for (n_format = 0;n_format < gen_nb_int;n_format++) {\r
+        cur = gen_xmlDocPtr(n_cur, 0);\r
+        mem = gen_xmlChar_ptr_ptr(n_mem, 1);\r
+        size = gen_int_ptr(n_size, 2);\r
+        format = gen_int(n_format, 3);\r
+\r
+        htmlDocDumpMemoryFormat(cur, mem, size, format);\r
+        //DTS_CHECK_NE_MESSAGE("htmlNodeDumpFile", out, NULL, "htmlNodeDumpFile Failes");\r
+        call_tests++;\r
+        des_xmlDocPtr(n_cur, cur, 0);\r
+        des_xmlChar_ptr_ptr(n_mem, mem, 1);\r
+        des_int_ptr(n_size, size, 2);\r
+        des_int(n_format, format, 3);\r
+        xmlResetLastError();\r
+    }\r
+    }\r
+    }\r
+    }\r
+    function_tests++;\r
+#endif\r
+}\r
+\r
+static void desret_htmlDocPtr(htmlDocPtr val)\r
+{\r
+    if ((val != NULL) && (val != api_doc) && (val->doc != api_doc))\r
+        xmlFreeDoc(val);\r
+}\r
+       /**\r
+       * @test                 UTchtmlNewDocP01\r
+       * @brief                htmlDocPtr htmlNewDoc(const xmlChar *URI, const xmlChar *ExternalID)\r
+       * @desc\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Sathish Kumar (satish.k4@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks\r
+       *\r
+       * @b priority\r
+       * @b etc                none\r
+       */\r
+static void UTchtmlNewDocP01()\r
+{\r
+#if defined(LIBXML_HTML_ENABLED)\r
+    htmlDocPtr ret_val;\r
+    xmlChar * URI; /* URI for the dtd, or NULL */\r
+    int n_URI;\r
+    xmlChar * ExternalID; /* the external ID of the DTD, or NULL */\r
+    int n_ExternalID;\r
+\r
+    for (n_URI = 0;n_URI < gen_nb_const_xmlChar_ptr;n_URI++) {\r
+    for (n_ExternalID = 0;n_ExternalID < gen_nb_const_xmlChar_ptr;n_ExternalID++) {\r
+        URI = gen_const_xmlChar_ptr(n_URI, 0);\r
+        ExternalID = gen_const_xmlChar_ptr(n_ExternalID, 1);\r
+\r
+        ret_val = htmlNewDoc((const xmlChar *)URI, (const xmlChar *)ExternalID);\r
+        if(ret_val == NULL)\r
+               {\r
+                       DTS_CHECK_EQ_MESSAGE("htmlNewDoc", ret_val, NULL, "htmlNewDocFailes");\r
+               }\r
+        else  // checking for success(+ve)\r
+               {\r
+                       DTS_CHECK_NE_MESSAGE("htmlNewDoc", ret_val, NULL, "htmlNewDoc Failes");\r
+               }\r
+#if 0\r
+        ret_val = htmlNewDoc(NULL, (const xmlChar *)ExternalID);\r
+               MT_CHECK_MESSAGE2(NULL == ret_val, "API return value: %d", ret_val);\r
+\r
+        ret_val = htmlNewDoc((const xmlChar *)URI, NULL);\r
+               MT_CHECK_MESSAGE2(NULL == ret_val, "API return value: %d", ret_val);\r
+#endif\r
+        desret_htmlDocPtr(ret_val);\r
+        call_tests++;\r
+        des_const_xmlChar_ptr(n_URI, (const xmlChar *)URI, 0);\r
+        des_const_xmlChar_ptr(n_ExternalID, (const xmlChar *)ExternalID, 1);\r
+        xmlResetLastError();\r
+    }\r
+    }\r
+    function_tests++;\r
+#endif\r
+}\r
+/**\r
+       * @test                 UTchtmlNewDocNoDtDP01\r
+       * @brief                htmlDocPtr htmlNewDocNoDtD(const xmlChar *URI, const xmlChar *ExternalID)\r
+       * @desc\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Sathish Kumar (satish.k4@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks\r
+       *\r
+       * @b priority\r
+       * @b etc                none\r
+       */\r
+static void UTchtmlNewDocNoDtDP01()\r
+{\r
+#if defined(LIBXML_HTML_ENABLED)\r
+    htmlDocPtr ret_val;\r
+    xmlChar * URI; /* URI for the dtd, or NULL */\r
+    int n_URI;\r
+    xmlChar * ExternalID; /* the external ID of the DTD, or NULL */\r
+    int n_ExternalID;\r
+\r
+    for (n_URI = 0;n_URI < gen_nb_const_xmlChar_ptr;n_URI++) {\r
+    for (n_ExternalID = 0;n_ExternalID < gen_nb_const_xmlChar_ptr;n_ExternalID++) {\r
+        URI = gen_const_xmlChar_ptr(n_URI, 0);\r
+        ExternalID = gen_const_xmlChar_ptr(n_ExternalID, 1);\r
+\r
+        ret_val = htmlNewDocNoDtD((const xmlChar *)URI, (const xmlChar *)ExternalID);\r
+        if(ret_val == NULL)\r
+               {\r
+                       DTS_CHECK_EQ_MESSAGE("htmlNewDoc", ret_val, NULL, "htmlNewDocFailes");\r
+               }\r
+        else  // checking for success(+ve)\r
+               {\r
+                       DTS_CHECK_NE_MESSAGE("htmlNewDoc", ret_val, NULL, "htmlNewDoc Failes");\r
+               }\r
+        desret_htmlDocPtr(ret_val);\r
+        call_tests++;\r
+        des_const_xmlChar_ptr(n_URI, (const xmlChar *)URI, 0);\r
+        des_const_xmlChar_ptr(n_ExternalID, (const xmlChar *)ExternalID, 1);\r
+        xmlResetLastError();\r
+    }\r
+    }\r
+    function_tests++;\r
+#endif\r
+}\r
+\r
+static void startup( void);\r
+static void cleanup( void);\r
+\r
+void (*tet_startup)( void) = startup;\r
+void (*tet_cleanup)( void) = cleanup;\r
+\r
+static void startup( void)\r
+{\r
+        /* start of TC */\r
+        tet_printf("TC starts.");\r
+}\r
+\r
+static void cleanup( void)\r
+{\r
+        /* end of TC */\r
+        tet_printf("TC ends.");\r
+}\r
+\r
+struct tet_testlist tet_testlist[] = {\r
+       // Handling of out of context errors\r
+       {UTchtmlIsBooleanAttrP01,2},\r
+       //{UTchtmlDocDumpP01,3},\r
+       {UTchtmlNodeDumpP01,4},\r
+       //{UTchtmlNodeDumpFileFormatP01,5},\r
+       {UTchtmlSaveFileP01,6},\r
+       {UTchtmlNodeDumpFormatOutputP01,7},\r
+       {UTchtmlNodeDumpOutputP01,8},\r
+       {UTchtmlSaveFileEncP01,9},\r
+       {UTchtmlSaveFileFormatP01,10},\r
+       \r
+       {UTchtmlSetMetaEncodingP01,11},\r
+       {UTchtmlDocContentDumpFormatOutputP01,12},\r
+       {UTchtmlDocContentDumpOutputP01,13},\r
+       //{UTchtmlDocDumpMemoryP01,14},\r
+       {UTchtmlGetMetaEncodingP01,15},\r
+       //{UTchtmlNodeDumpFileP01,16},\r
+       //{UTchtmlDocDumpMemoryFormatP01,17},\r
+       {UTchtmlNewDocP01,18},\r
+       {UTchtmlNewDocNoDtDP01,19},\r
+       { NULL, 0 },\r
+       \r
+};\r
diff --git a/TC/testcase/utc_libxml_Hash.c b/TC/testcase/utc_libxml_Hash.c
new file mode 100755 (executable)
index 0000000..b040c52
--- /dev/null
@@ -0,0 +1,1150 @@
+/*\r
+*  libxml test suite\r
+*\r
+* Copyright (c) 2012 Samsung Electronics Co., Ltd. All rights reserved.\r
+*\r
+* Contact: {Maintainer Name} <{Maintainer Email}>\r
+* \r
+* Licensed under the Apache License, Version 2.0 (the "License");\r
+* you may not use this file except in compliance with the License.\r
+* You may obtain a copy of the License at\r
+*\r
+* http://www.apache.org/licenses/LICENSE-2.0\r
+*\r
+* Unless required by applicable law or agreed to in writing, software\r
+* distributed under the License is distributed on an "AS IS" BASIS,\r
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+* See the License for the specific language governing permissions and\r
+* limitations under the License.\r
+*\r
+*/ \r
+#include "utc_libxml_include.h"\r
+\r
+\r
+\r
+#ifdef DEBUG_MEM_LEAK\r
+extern "C"\r
+{\r
+       extern void MemStartSaveCallStack(void);\r
+       extern void MemEndSaveCallStack(void);\r
+       extern void MemPrintCurrentIndex(void);\r
+       extern void MemTraceAllocMemInfo(void);\r
+}\r
+#endif\r
+\r
+static int call_tests = 0;\r
+\r
+#define gen_nb_xmlHashTablePtr 1\r
+static xmlHashTablePtr gen_xmlHashTablePtr(int no, int nr ATTRIBUTE_UNUSED)\r
+{\r
+       if (no == 0) return(xmlHashCreate(10));\r
+       return(NULL);\r
+}\r
+static void des_xmlHashTablePtr(int no ATTRIBUTE_UNUSED, xmlHashTablePtr val, int nr ATTRIBUTE_UNUSED)\r
+{\r
+       if (val != NULL) {\r
+               xmlHashFree(val, NULL);\r
+       }\r
+}\r
+\r
+#define gen_nb_const_xmlChar_ptr 2\r
+\r
+static xmlChar *gen_const_xmlChar_ptr(int no, int nr ATTRIBUTE_UNUSED)\r
+{\r
+       if (no == 0) return((xmlChar *) "foo");\r
+       if (no == 1) return((xmlChar *) "<foo/>");\r
+       if (no == 2) return((xmlChar *) "none");\r
+       if (no == 3) return((xmlChar *) " 2ab ");\r
+       return(NULL);\r
+}\r
+static void des_const_xmlChar_ptr(int no ATTRIBUTE_UNUSED, const xmlChar *val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED)\r
+{\r
+}\r
+\r
+#define gen_nb_xmlHashDeallocator 1\r
+static void\r
+test_xmlHashDeallocator(void *payload ATTRIBUTE_UNUSED, xmlChar *name ATTRIBUTE_UNUSED)\r
+{\r
+}\r
+static void\r
+test_xmlHashScanner(void *payload ATTRIBUTE_UNUSED,void *data ATTRIBUTE_UNUSED, xmlChar *name ATTRIBUTE_UNUSED)\r
+{\r
+}\r
+static xmlHashScanner gen_xmlHashScanner(int no, int nr ATTRIBUTE_UNUSED)\r
+{\r
+       if (no == 0) return(test_xmlHashScanner);\r
+       return(NULL);\r
+}\r
+\r
+static xmlHashDeallocator gen_xmlHashDeallocator(int no, int nr ATTRIBUTE_UNUSED)\r
+{\r
+       if (no == 0) return(test_xmlHashDeallocator);\r
+       return(NULL);\r
+}\r
+static void des_xmlHashDeallocator(int no ATTRIBUTE_UNUSED, xmlHashDeallocator val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED)\r
+{\r
+}\r
+\r
+#define gen_nb_userdata 2\r
+\r
+static void *gen_userdata(int no, int nr ATTRIBUTE_UNUSED)\r
+{\r
+       if (no == 0) return((void *) &call_tests);\r
+//    if (no == 0) return(NULL);\r
+       if (no == 1) return((void *) -1);\r
+       return(NULL);\r
+}\r
+static void des_userdata(int no ATTRIBUTE_UNUSED, void *val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED)\r
+{\r
+}\r
+\r
+static void desret_int(int val ATTRIBUTE_UNUSED)\r
+{\r
+}\r
+\r
+static void desret_void_ptr(void *val ATTRIBUTE_UNUSED)\r
+{\r
+}\r
+\r
+       /**    \r
+       * @test                 UTcXmlHashCreateP01\r
+       * @brief                \r
+       * @desc                 \r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              \r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+\r
+static void\r
+UTcXmlHashCreateP01()\r
+{\r
+\r
+       /**\r
+        * @remarks   input1: [N/A, N/A] @n\r
+        *            {void} => { N/A | N/A} @n\r
+        */\r
+       DTS_CHECK_EQ_MESSAGE("UTcXmlHashCreateP01", 1, 1, "UTcXmlHashCreateP01 returned 0");\r
+}\r
+\r
+       /**    \r
+       * @test                 UTcXmlHashFreeP01\r
+       * @brief                \r
+       * @desc                 \r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              \r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcXmlHashFreeP01()\r
+{\r
+\r
+       /**\r
+        * @remarks   input1: [N/A, N/A] @n\r
+        *            {} => { | } @n\r
+        */\r
+       DTS_CHECK_EQ_MESSAGE("UTcXmlHashFreeP01", 1, 1, "UTcXmlHashFreeP01 returned 0");\r
+       /* missing type support */\r
+}\r
+\r
+       /**    \r
+       * @test                 UTcXmlHashAddEntryP01\r
+       * @brief                int xmlHashAddEntry (xmlHashTablePtr table, const xmlChar *name, void *userdata)\r
+       * @desc                 Positive Test for xmlHashAddEntry\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Create table, free the hash table and its contents] @n\r
+       *                       {xmlHashTablePtr(hash table), xmlChar *("foo", "<foo/>", "none", " 2ab " ), userdata} => {N/A | int(0)} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcXmlHashAddEntryP01()\r
+{\r
+       int ret_val;\r
+       xmlHashTablePtr table; /* the hash table */\r
+       int n_table = 0;\r
+       xmlChar * name; /* the name of the userdata */\r
+       int n_name = 0;\r
+       void * userdata; /* a pointer to the userdata */\r
+       int n_userdata = 0;\r
+\r
+       for (n_table = 0;n_table < gen_nb_xmlHashTablePtr;n_table++) {\r
+               for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {\r
+                       for (n_userdata = 0;n_userdata < gen_nb_userdata;n_userdata++) {\r
+\r
+                               table = gen_xmlHashTablePtr(n_table, 0);\r
+                               DTS_CHECK_NE_MESSAGE("xmlHashAddEntry", table, NULL, "gen_xmlHashTablePtr returned NULL");\r
+\r
+                               name = gen_const_xmlChar_ptr(n_name, 1);\r
+                               DTS_CHECK_NE_MESSAGE("xmlHashAddEntry", name, NULL, "gen_const_xmlChar_ptr returned NULL");\r
+\r
+                               userdata = gen_userdata(n_userdata, 2);\r
+                               DTS_CHECK_NE_MESSAGE("xmlHashAddEntry", userdata, NULL, "gen_userdata returned NULL");\r
+                               /**\r
+                                * @remarks   input1: [N/A, N/A] @n\r
+                                *            {table of size 10 , userdata name("foo" ,"<foo/>" ,"none"," 2ab )" , userdata} =>@n\r
+                                    *                    {N/A | 0} @n\r
+                                */\r
+                               ret_val = xmlHashAddEntry(table, (const xmlChar *)name, userdata);\r
+                               DTS_CHECK_EQ_MESSAGE("xmlHashAddEntry", ret_val, 0, "xmlHashAddEntry Failed");\r
+                               desret_int(ret_val);\r
+                               call_tests++;\r
+                               des_xmlHashTablePtr(n_table, table, 0);\r
+                               des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);\r
+                               des_userdata(n_userdata, userdata, 2);\r
+                               xmlResetLastError();\r
+                       }\r
+               }\r
+       }\r
+}\r
+/**    \r
+       * @test                 UTcXmlHashUpdateEntryP01\r
+       * @brief                int xmlHashUpdateEntry(xmlHashTablePtr table, const xmlChar *name, void *userdata, xmlHashDeallocator f)\r
+       * @desc                 Positive Test for xmlHashUpdateEntry\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Create table, free the hash table and its contents] @n\r
+       *                       {xmlHashTablePtr(hash table), xmlChar *("foo", "<foo/>", "none", " 2ab " ), userdata, xmlHashDeallocator} => {N/A | int(NOT -1)} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcXmlHashUpdateEntryP01()\r
+{\r
+       int ret_val;\r
+       xmlHashTablePtr table; /* the hash table */\r
+       int n_table;\r
+       xmlChar * name; /* the name of the userdata */\r
+       int n_name;\r
+       void * userdata; /* a pointer to the userdata */\r
+       int n_userdata;\r
+       xmlHashDeallocator f; /* the deallocator function for replaced item (if any) */\r
+       int n_f;\r
+\r
+       for (n_table = 0;n_table < gen_nb_xmlHashTablePtr;n_table++) {\r
+               for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {\r
+                       for (n_userdata = 0;n_userdata < gen_nb_userdata;n_userdata++) {\r
+                               for (n_f = 0;n_f < gen_nb_xmlHashDeallocator;n_f++) {\r
+\r
+                                       table = gen_xmlHashTablePtr(n_table, 0);\r
+                                       DTS_CHECK_NE_MESSAGE("xmlHashUpdateEntry", table, NULL, "gen_xmlHashTablePtr returned NULL");\r
+\r
+                                       name = gen_const_xmlChar_ptr(n_name, 1);\r
+                                       DTS_CHECK_NE_MESSAGE("xmlHashUpdateEntry", name, NULL, "gen_const_xmlChar_ptr returned NULL");\r
+\r
+                                       userdata = gen_userdata(n_userdata, 2);\r
+                                       DTS_CHECK_NE_MESSAGE("xmlHashUpdateEntry", userdata, NULL, "gen_userdata returned NULL");\r
+\r
+                                       f = gen_xmlHashDeallocator(n_f, 3);\r
+                                       DTS_CHECK_NE_MESSAGE("xmlHashUpdateEntry", userdata, NULL, "gen_xmlHashDeallocator returned NULL");\r
+                                       \r
+                                       /**\r
+                                                * @remarks   input1: [N/A, N/A] @n\r
+                                                *            {table of size 10 , userdata name("foo" ,"<foo/>" ,"none"," 2ab ") , userdata , deallocator} =>@n\r
+                                            *                    {N/A | 0} @n\r
+                                                */\r
+                                       ret_val = xmlHashUpdateEntry(table, (const xmlChar *)name, userdata, f);\r
+                                       DTS_CHECK_EQ_MESSAGE("xmlHashUpdateEntry", ret_val, 0, "xmlHashUpdateEntry Failed");\r
+                                       \r
+\r
+                                       desret_int(ret_val);\r
+                                       des_xmlHashTablePtr(n_table, table, 0);\r
+                                       des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);\r
+                                       des_userdata(n_userdata, userdata, 2);\r
+                                       des_xmlHashDeallocator(n_f, f, 3);\r
+                                       xmlResetLastError();\r
+                               }\r
+                       }\r
+               }\r
+       }\r
+}\r
+/**    \r
+       * @test                 UTcXmlHashAddEntry2P01\r
+       * @brief                int xmlHashAddEntry2(xmlHashTablePtr table, const xmlChar *name, const xmlChar *name2, void *userdata)\r
+       * @desc                 Positive Test for xmlHashAddEntry2\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Create table, free the hash table and its contents] @n\r
+       *                       {xmlHashTablePtr(hash table), xmlChar *("foo", "<foo/>", "none", " 2ab " ), xmlChar *("foo", "<foo/>", "none", " 2ab " ), userdata, xmlHashDeallocator} => {N/A | int(NOT -1)} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcXmlHashAddEntry2P01()\r
+{\r
+       int ret_val;\r
+       xmlHashTablePtr table; /* the hash table */\r
+       int n_table;\r
+       xmlChar * name; /* the name of the userdata */\r
+       int n_name;\r
+       xmlChar * name2; /* a second name of the userdata */\r
+       int n_name2;\r
+       void * userdata; /* a pointer to the userdata */\r
+       int n_userdata;\r
+\r
+       for (n_table = 0;n_table < gen_nb_xmlHashTablePtr;n_table++) {\r
+               for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {\r
+                       for (n_name2 = 0;n_name2 < gen_nb_const_xmlChar_ptr;n_name2++) {\r
+                               for (n_userdata = 0;n_userdata < gen_nb_userdata;n_userdata++) {\r
+                                       table = gen_xmlHashTablePtr(n_table, 0);\r
+                                       DTS_CHECK_NE_MESSAGE("xmlHashAddEntry2", table, NULL, "hash table NULL");\r
+                                       name = gen_const_xmlChar_ptr(n_name, 1);\r
+                                       DTS_CHECK_NE_MESSAGE("xmlHashAddEntry2", name, NULL, "userdata NULL");\r
+                                       name2 = gen_const_xmlChar_ptr(n_name2, 2);\r
+                                       DTS_CHECK_NE_MESSAGE("xmlHashAddEntry2", name2, NULL, "userdata NULL");\r
+                                       userdata = gen_userdata(n_userdata, 3);\r
+                                       DTS_CHECK_NE_MESSAGE("xmlHashAddEntry2", userdata, NULL, "pointer to the userdata is NULL");\r
+                                       /**\r
+                                        * @remarks   input1: [N/A, N/A] @n\r
+                                        *            {table of size 10 , userdata name("foo" ,"<foo/>" ,"none"," 2ab ") , @n\r
+                                        *                        userdata name2("foo" ,"<foo/>" ,"none"," 2ab ") ,userdata , deallocator} =>@n\r
+                                       *                         {N/A | 0} @n\r
+                                        */\r
+                                       ret_val = xmlHashAddEntry2(table, (const xmlChar *)name, (const xmlChar *)name2, userdata);\r
+                                       DTS_CHECK_EQ_MESSAGE("xmlHashAddEntry2", ret_val, 0, "xmlHashAddEntry2 Failed");\r
+                                       desret_int(ret_val);\r
+                                       des_xmlHashTablePtr(n_table, table, 0);\r
+                                       des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);\r
+                                       des_const_xmlChar_ptr(n_name2, (const xmlChar *)name2, 2);\r
+                                       des_userdata(n_userdata, userdata, 3);\r
+                               }\r
+                       }\r
+               }\r
+       }\r
+}\r
+/**    \r
+       * @test                 UTcXmlHashUpdateEntry2P01\r
+       * @brief                int xmlHashUpdateEntry2(xmlHashTablePtr table, const xmlChar *name, const xmlChar *name2, void *userdata, xmlHashDeallocator f) \r
+       * @desc                 Positive Test for xmlHashUpdateEntry2\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Create table, free the hash table and its contents] @n\r
+       *                       {xmlHashTablePtr(hash table), xmlChar *("foo", "<foo/>", "none", " 2ab " ), xmlChar *("foo", "<foo/>", "none", " 2ab " ), userdata, xmlHashDeallocator} => {N/A | int(NOT -1)} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcXmlHashUpdateEntry2P01()\r
+{\r
+       int ret_val;\r
+       xmlHashTablePtr table; /* the hash table */\r
+       int n_table;\r
+       xmlChar * name; /* the name of the userdata */\r
+       int n_name;\r
+       xmlChar * name2; /* a second name of the userdata */\r
+       int n_name2;\r
+       void * userdata; /* a pointer to the userdata */\r
+       int n_userdata;\r
+       xmlHashDeallocator f; /* the deallocator function for replaced item (if any) */\r
+       int n_f;\r
+\r
+       for (n_table = 0;n_table < gen_nb_xmlHashTablePtr;n_table++) {\r
+               for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {\r
+                       for (n_name2 = 0;n_name2 < gen_nb_const_xmlChar_ptr;n_name2++) {\r
+                               for (n_userdata = 0;n_userdata < gen_nb_userdata;n_userdata++) {\r
+                                       for (n_f = 0;n_f < gen_nb_xmlHashDeallocator;n_f++) {\r
+                                               table = gen_xmlHashTablePtr(n_table, 0);\r
+                                               DTS_CHECK_NE_MESSAGE("xmlHashUpdateEntry2", table, NULL, "hash table is NULL");\r
+                                               name = gen_const_xmlChar_ptr(n_name, 1);\r
+                                               DTS_CHECK_NE_MESSAGE("xmlHashUpdateEntry2", name, NULL, "userdata is NULL");\r
+                                               name2 = gen_const_xmlChar_ptr(n_name2, 2);\r
+                                               DTS_CHECK_NE_MESSAGE("xmlHashUpdateEntry2", name2, NULL, "userdata is NULL");\r
+                                               userdata = gen_userdata(n_userdata, 3);\r
+                                               DTS_CHECK_NE_MESSAGE("xmlHashUpdateEntry2", userdata, NULL, "pointer to the userdata is NULL");\r
+                                               f = gen_xmlHashDeallocator(n_f, 4);\r
+                                               DTS_CHECK_NE_MESSAGE("xmlHashUpdateEntry2", f, NULL, "gen_xmlHashDeallocator returned NULL");\r
+                                               /**\r
+                                                * @remarks   input1: [N/A, N/A] @n\r
+                                                *            {table of size 10 , userdata name("foo" ,"<foo/>" ,"none"," 2ab ") ,userdata , deallocator} =>@n\r
+                                                *                        {N/A | 0} @n\r
+                                                */\r
+                                               ret_val = xmlHashUpdateEntry2(table, (const xmlChar *)name, (const xmlChar *)name2, userdata, f);\r
+                                               DTS_CHECK_EQ_MESSAGE("xmlHashUpdateEntry2", ret_val, 0, "xmlHashUpdateEntry2 Failed");\r
+                                               desret_int(ret_val);\r
+                                               des_xmlHashTablePtr(n_table, table, 0);\r
+                                               des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);\r
+                                               des_const_xmlChar_ptr(n_name2, (const xmlChar *)name2, 2);\r
+                                               des_userdata(n_userdata, userdata, 3);\r
+                                               des_xmlHashDeallocator(n_f, f, 4);\r
+                                               xmlResetLastError();\r
+                                       }\r
+                               }\r
+                       }\r
+               }\r
+       }\r
+}\r
+/**    \r
+       * @test                 UTcXmlHashAddEntry3P01\r
+       * @brief                int xmlHashAddEntry3(xmlHashTablePtr table, const xmlChar *name, const xmlChar *name2, const xmlChar *name3, void *userdata) \r
+       * @desc                 Positive Test for xmlHashAddEntry3\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Create table, free the hash table and its contents] @n\r
+       *                       {xmlHashTablePtr(hash table), xmlChar *("foo", "<foo/>", "none", " 2ab " ), xmlChar *("foo", "<foo/>", "none", " 2ab " ), xmlChar *("foo", "<foo/>", "none", " 2ab " ), userdata} => {N/A | int(NOT -1)} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcXmlHashAddEntry3P01()\r
+{\r
+       int ret_val;\r
+       xmlHashTablePtr table; /* the hash table */\r
+       int n_table;\r
+       xmlChar * name; /* the name of the userdata */\r
+       int n_name;\r
+       xmlChar * name2; /* a second name of the userdata */\r
+       int n_name2;\r
+       xmlChar * name3; /* a third name of the userdata */\r
+       int n_name3;\r
+       void * userdata; /* a pointer to the userdata */\r
+       int n_userdata;\r
+\r
+       for (n_table = 0;n_table < gen_nb_xmlHashTablePtr;n_table++) {\r
+               for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {\r
+                       for (n_name2 = 0;n_name2 < gen_nb_const_xmlChar_ptr;n_name2++) {\r
+                               for (n_name3 = 0;n_name3 < gen_nb_const_xmlChar_ptr;n_name3++) {\r
+                                       for (n_userdata = 0;n_userdata < gen_nb_userdata;n_userdata++) {\r
+                                               table = gen_xmlHashTablePtr(n_table, 0);\r
+                                               DTS_CHECK_NE_MESSAGE("xmlHashAddEntry3", table, NULL, "hash table is NULL");\r
+                                               name = gen_const_xmlChar_ptr(n_name, 1);\r
+                                               DTS_CHECK_NE_MESSAGE("xmlHashAddEntry3", name, NULL, "userdata is NULL");\r
+                                               name2 = gen_const_xmlChar_ptr(n_name2, 2);\r
+                                               DTS_CHECK_NE_MESSAGE("xmlHashAddEntry3", name2, NULL, "userdata is NULL");\r
+                                               name3 = gen_const_xmlChar_ptr(n_name3, 3);\r
+                                               DTS_CHECK_NE_MESSAGE("xmlHashAddEntry3", name3, NULL, "userdata is NULL");\r
+                                               userdata = gen_userdata(n_userdata, 3);\r
+                                               DTS_CHECK_NE_MESSAGE("xmlHashAddEntry3", userdata, NULL, "pointer to the userdata is NULL");\r
+                                               \r
+                                               /**\r
+                                                * @remarks   input1: [N/A, N/A] @n\r
+                                                *            {table of size 10 , userdata name("foo" ,"<foo/>" ,"none"," 2ab ") ,@n\r
+                                                *                         userdata name2("foo" ,"<foo/>" ,"none"," 2ab ") , userdata name3("foo" ,"<foo/>" ,"none"," 2ab " )@n\r
+                                                *                         userdata , deallocator} => {N/A | 0} @n\r
+                                                */\r
+                                               ret_val = xmlHashAddEntry3(table, (const xmlChar *)name, (const xmlChar *)name2, (const xmlChar *)name3, userdata);\r
+                                               DTS_CHECK_EQ_MESSAGE("xmlHashAddEntry3", ret_val, 0, "xmlHashAddEntry3 Failed");\r
+                                               desret_int(ret_val);\r
+                                               des_xmlHashTablePtr(n_table, table, 0);\r
+                                               des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);\r
+                                               des_const_xmlChar_ptr(n_name2, (const xmlChar *)name2, 2);\r
+                                               des_const_xmlChar_ptr(n_name3, (const xmlChar *)name3, 3);\r
+                                               des_userdata(n_userdata, userdata, 4);\r
+                                               xmlResetLastError();\r
+                                       }\r
+                               }\r
+                       }\r
+               }\r
+       }\r
+}\r
+       /**    \r
+       * @test                 UTcXmlHashUpdateEntry3P01\r
+       * @brief                int xmlHashUpdateEntry3(xmlHashTablePtr table, const xmlChar *name, const xmlChar *name2, const xmlChar *name3, void *userdata, xmlHashDeallocator f)\r
+       * @desc                 Positive Test for xmlHashUpdateEntry3\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Create table, free the hash table and its contents] @n\r
+       *                       {xmlHashTablePtr(hash table), xmlChar *("foo", "<foo/>", "none", " 2ab " ), xmlChar *("foo", "<foo/>", "none", " 2ab " ), xmlChar *("foo", "<foo/>", "none", " 2ab " ), userdata, xmlHashDeallocator} => {N/A | int(NOT -1)} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcXmlHashUpdateEntry3P01()\r
+{\r
+       int ret_val;\r
+       xmlHashTablePtr table; /* the hash table */\r
+       int n_table;\r
+       xmlChar * name; /* the name of the userdata */\r
+       int n_name;\r
+       xmlChar * name2; /* a second name of the userdata */\r
+       int n_name2;\r
+       xmlChar * name3; /* a third name of the userdata */\r
+       int n_name3;\r
+       void * userdata; /* a pointer to the userdata */\r
+       int n_userdata;\r
+       xmlHashDeallocator f; /* the deallocator function for replaced item (if any) */\r
+       int n_f;\r
+\r
+       for (n_table = 0;n_table < gen_nb_xmlHashTablePtr;n_table++) {\r
+               for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {\r
+                       for (n_name2 = 0;n_name2 < gen_nb_const_xmlChar_ptr;n_name2++) {\r
+                               for (n_name3 = 0;n_name3 < gen_nb_const_xmlChar_ptr;n_name3++) {\r
+                                       for (n_userdata = 0;n_userdata < gen_nb_userdata;n_userdata++) {\r
+                                               for (n_f = 0;n_f < gen_nb_xmlHashDeallocator;n_f++) {\r
+                                                       table = gen_xmlHashTablePtr(n_table, 0);\r
+                                                       DTS_CHECK_NE_MESSAGE("xmlHashAddEntry3", table, NULL, "hash table is NULL");\r
+                                                       name = gen_const_xmlChar_ptr(n_name, 1);\r
+                                                       DTS_CHECK_NE_MESSAGE("xmlHashAddEntry3", name, NULL, "userdata is NULL");\r
+                                                       name2 = gen_const_xmlChar_ptr(n_name2, 2);\r
+                                                       DTS_CHECK_NE_MESSAGE("xmlHashAddEntry3", name2, NULL, "userdata is NULL");\r
+                                                       name3 = gen_const_xmlChar_ptr(n_name3, 3);\r
+                                                       DTS_CHECK_NE_MESSAGE("xmlHashAddEntry3", name3, NULL, "userdata is NULL");\r
+                                                       userdata = gen_userdata(n_userdata, 3);\r
+                                                       DTS_CHECK_NE_MESSAGE("xmlHashAddEntry3", userdata, NULL, "pointer to the userdata is NULL");\r
+                                                       f = gen_xmlHashDeallocator(n_f, 5);\r
+                                                       DTS_CHECK_NE_MESSAGE("xmlHashAddEntry3", f, NULL, "gen_xmlHashDeallocator returned NULL");\r
+                                                       /**\r
+                                                           * @remarks   input1: [N/A, N/A] @n\r
+                                                           *            {table of size 10 , userdata name("foo" ,"<foo/>" ,"none"," 2ab ") , @n\r
+                                                           *                     userdata name2("foo" ,"<foo/>" ,"none"," 2ab ") , userdata name3("foo" ,"<foo/>" ,"none"," 2ab ") @n\r
+                                                           *                     userdata , deallocator} => {N/A | 0} @n\r
+                                                           */\r
+                                                       ret_val = xmlHashUpdateEntry3(table, (const xmlChar *)name, (const xmlChar *)name2, (const xmlChar *)name3, userdata, f);\r
+                                                       DTS_CHECK_EQ_MESSAGE("xmlHashUpdateEntry3", ret_val, 0, "xmlHashUpdateEntry3 Failed");\r
+                                                       desret_int(ret_val);\r
+                                                       des_xmlHashTablePtr(n_table, table, 0);\r
+                                                       des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);\r
+                                                       des_const_xmlChar_ptr(n_name2, (const xmlChar *)name2, 2);\r
+                                                       des_const_xmlChar_ptr(n_name3, (const xmlChar *)name3, 3);\r
+                                                       des_userdata(n_userdata, userdata, 4);\r
+                                                       des_xmlHashDeallocator(n_f, f, 5);\r
+                                                       xmlResetLastError();\r
+                                               }\r
+                                       }\r
+                               }\r
+                       }\r
+               }\r
+       }\r
+}\r
+/**    \r
+       * @test                 UTcXmlHashRemoveEntryP01\r
+       * @brief                int xmlHashRemoveEntry(xmlHashTablePtr table, const xmlChar *name, xmlHashDeallocator f)\r
+       * @desc                 Positive Test for xmlHashRemoveEntry\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Create table, free the hash table and its contents] @n\r
+       *                       {xmlHashTablePtr(hash table), xmlChar *("foo", "<foo/>", "none", " 2ab " ), userdata, xmlHashDeallocator} => {N/A | int(0)} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcXmlHashRemoveEntryP01()\r
+{\r
+       int ret_val;\r
+       xmlHashTablePtr table; /* the hash table */\r
+       int n_table;\r
+       xmlChar * name; /* the name of the userdata */\r
+       int n_name;\r
+       xmlHashDeallocator f; /* the deallocator function for removed item (if any) */\r
+       int n_f;\r
+\r
+       for (n_table = 0;n_table < gen_nb_xmlHashTablePtr;n_table++) {\r
+               for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {\r
+                       for (n_f = 0;n_f < gen_nb_xmlHashDeallocator;n_f++) {\r
+                               table = gen_xmlHashTablePtr(n_table, 0);\r
+                               DTS_CHECK_NE_MESSAGE("xmlHashRemoveEntry", table, NULL, "hash table is NULL");\r
+                               name = gen_const_xmlChar_ptr(n_name, 1);\r
+                               DTS_CHECK_NE_MESSAGE("xmlHashRemoveEntry", name, NULL, "userdata is NULL");\r
+                               f = gen_xmlHashDeallocator(n_f, 5);\r
+                               DTS_CHECK_NE_MESSAGE("xmlHashRemoveEntry", f, NULL, "gen_xmlHashDeallocator returned NULL");\r
+                               \r
+                               /**\r
+                                * @remarks   input1: [N/A, N/A] @n\r
+                                *            {table of size 10 , userdata name("foo" ,"<foo/>" ,"none"," 2ab ") , @n\r
+                                *                        deallocator} => {N/A | 0} @n\r
+                                */\r
+\r
+                               ret_val = xmlHashAddEntry(table, (const xmlChar *)name, "NULL");\r
+                               DTS_CHECK_EQ_MESSAGE("xmlHashRemoveEntry", ret_val, 0, "xmlHashAddEntry Failed");\r
+                               ret_val = xmlHashRemoveEntry(table, (const xmlChar *)name, f);\r
+                               DTS_CHECK_EQ_MESSAGE("xmlHashRemoveEntry", ret_val, 0, "xmlHashRemoveEntry Failed");\r
+                               desret_int(ret_val);\r
+                               des_xmlHashTablePtr(n_table, table, 0);\r
+                               des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);\r
+                               des_xmlHashDeallocator(n_f, f, 2);\r
+                               xmlResetLastError();\r
+                       }\r
+               }\r
+       }\r
+}\r
+/**    \r
+       * @test                 UTcXmlHashRemoveEntry2P01\r
+       * @brief                int xmlHashRemoveEntry2(xmlHashTablePtr table, const xmlChar *name, const xmlChar *name2, xmlHashDeallocator f)\r
+       * @desc                 Positive Test for xmlHashRemoveEntry2\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Create table, free the hash table and its contents] @n\r
+       *                       {xmlHashTablePtr(hash table), xmlChar *("foo", "<foo/>", "none", " 2ab " ), xmlChar *("foo", "<foo/>", "none", " 2ab " ), xmlHashDeallocator} => {N/A | int(NOT -1)} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcXmlHashRemoveEntry2P01()\r
+{\r
+       int ret_val;\r
+       xmlHashTablePtr table; /* the hash table */\r
+       int n_table;\r
+       xmlChar * name; /* the name of the userdata */\r
+       int n_name;\r
+       xmlChar * name2; /* a second name of the userdata */\r
+       int n_name2;\r
+       xmlHashDeallocator f; /* the deallocator function for removed item (if any) */\r
+       int n_f;\r
+\r
+       for (n_table = 0;n_table < gen_nb_xmlHashTablePtr;n_table++) {\r
+               for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {\r
+                       for (n_name2 = 0;n_name2 < gen_nb_const_xmlChar_ptr;n_name2++) {\r
+                               for (n_f = 0;n_f < gen_nb_xmlHashDeallocator;n_f++) {\r
+                                       table = gen_xmlHashTablePtr(n_table, 0);\r
+                                       DTS_CHECK_NE_MESSAGE("xmlHashRemoveEntry2", table, NULL, "hash table is NULL");\r
+                                       name = gen_const_xmlChar_ptr(n_name, 1);\r
+                                       DTS_CHECK_NE_MESSAGE("xmlHashRemoveEntry2", name, NULL, "userdata is NULL");\r
+                                       name2 = gen_const_xmlChar_ptr(n_name2, 2);\r
+                                       DTS_CHECK_NE_MESSAGE("xmlHashRemoveEntry2", name2, NULL, "userdata is NULL");\r
+                                       f = gen_xmlHashDeallocator(n_f, 5);\r
+                                       DTS_CHECK_NE_MESSAGE("xmlHashRemoveEntry2", f, NULL, "gen_xmlHashDeallocator returned NULL");                                   \r
+                                       /**\r
+                                                * @remarks   input1: [N/A, N/A] @n\r
+                                                *            {table of size 10 , userdata name("foo" ,"<foo/>" ,"none"," 2ab ") , @n\r
+                                                *                        userdata name2("foo" ,"<foo/>" ,"none"," 2ab ") , deallocator} => {N/A | 0} @n\r
+                                                */\r
+                                       ret_val = xmlHashAddEntry2(table, (const xmlChar *)name, (const xmlChar *)name2, "NULL");\r
+                                       DTS_CHECK_EQ_MESSAGE("xmlHashAddEntry2", ret_val, 0, "xmlHashAddEntry2 Failed");\r
+                                       \r
+                                       ret_val = xmlHashRemoveEntry2(table, (const xmlChar *)name, (const xmlChar *)name2, f);\r
+                                       DTS_CHECK_EQ_MESSAGE("xmlHashRemoveEntry2", ret_val, 0, "xmlHashRemoveEntry2 Failed");\r
+                                       desret_int(ret_val);\r
+                                       des_xmlHashTablePtr(n_table, table, 0);\r
+                                       des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);\r
+                                       des_const_xmlChar_ptr(n_name2, (const xmlChar *)name2, 2);\r
+                                       des_xmlHashDeallocator(n_f, f, 3);\r
+                                       xmlResetLastError();\r
+                               }\r
+                       }\r
+               }\r
+       }\r
+}\r
+\r
+       /**    \r
+       * @test                 UTcXmlHashRemoveEntry3P01\r
+       * @brief                int xmlHashRemoveEntry3(xmlHashTablePtr table, const xmlChar *name, const xmlChar *name2, const xmlChar *name3, xmlHashDeallocator f)\r
+       * @desc                 Positive Test for xmlHashRemoveEntry3\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Create table, free the hash table and its contents] @n\r
+       *                       {xmlHashTablePtr(hash table), xmlChar *("foo", "<foo/>", "none", " 2ab " ), xmlChar *("foo", "<foo/>", "none", " 2ab " ), xmlChar *("foo", "<foo/>", "none", " 2ab " ), xmlHashDeallocator} => {N/A | int(NOT -1)} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcXmlHashRemoveEntry3P01()\r
+{\r
+       int ret_val;\r
+       xmlHashTablePtr table; /* the hash table */\r
+       int n_table;\r
+       xmlChar * name; /* the name of the userdata */\r
+       int n_name;\r
+       xmlChar * name2; /* a second name of the userdata */\r
+       int n_name2;\r
+       xmlChar * name3; /* a third name of the userdata */\r
+       int n_name3;\r
+       xmlHashDeallocator f; /* the deallocator function for removed item (if any) */\r
+       int n_f;\r
+\r
+       for (n_table = 0;n_table < gen_nb_xmlHashTablePtr;n_table++) {\r
+               for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {\r
+                       for (n_name2 = 0;n_name2 < gen_nb_const_xmlChar_ptr;n_name2++) {\r
+                               for (n_name3 = 0;n_name3 < gen_nb_const_xmlChar_ptr;n_name3++) {\r
+                                       for (n_f = 0;n_f < gen_nb_xmlHashDeallocator;n_f++) {\r
+                                               table = gen_xmlHashTablePtr(n_table, 0);\r
+                                               DTS_CHECK_NE_MESSAGE("xmlHashRemoveEntry3", table, NULL, "hash table is NULL");\r
+                                               name = gen_const_xmlChar_ptr(n_name, 1);\r
+                                               DTS_CHECK_NE_MESSAGE("xmlHashRemoveEntry3", name, NULL, "userdata is NULL");\r
+                                               name2 = gen_const_xmlChar_ptr(n_name2, 2);\r
+                                               DTS_CHECK_NE_MESSAGE("xmlHashRemoveEntry3", name2, NULL, "userdata is NULL");\r
+                                               name3 = gen_const_xmlChar_ptr(n_name3, 3);\r
+                                               DTS_CHECK_NE_MESSAGE("xmlHashRemoveEntry3", name3, NULL, "userdata is NULL");\r
+                                               f = gen_xmlHashDeallocator(n_f, 5);\r
+                                               DTS_CHECK_NE_MESSAGE("xmlHashRemoveEntry3", f, NULL, "gen_xmlHashDeallocator returned NULL");                                           \r
+                                               /**\r
+                                                * @remarks   input1: [N/A, N/A] @n\r
+                                                *            {table of size 10 , userdata name("foo" ,"<foo/>" ,"none"," 2ab ") , @n\r
+                                                *                        userdata name2("foo" ,"<foo/>" ,"none"," 2ab ") , userdata name3("foo" ,"<foo/>" ,"none"," 2ab ") @n\r
+                                                *                        deallocator} => {N/A | 0} @n\r
+                                                */\r
+\r
+                                               ret_val = xmlHashAddEntry3(table, (const xmlChar *)name, (const xmlChar *)name2, (const xmlChar *)name3, "NULL");\r
+                                               DTS_CHECK_EQ_MESSAGE("xmlHashRemoveEntry3", ret_val, 0, "xmlHashAddEntry3 Failed");\r
+                                               \r
+                                               ret_val = xmlHashRemoveEntry3(table, (const xmlChar *)name, (const xmlChar *)name2, (const xmlChar *)name3, f);\r
+                                               DTS_CHECK_EQ_MESSAGE("xmlHashRemoveEntry3", ret_val, 0, "xmlHashRemoveEntry3 Failed");\r
+                                               desret_int(ret_val);\r
+                                               des_xmlHashTablePtr(n_table, table, 0);\r
+                                               des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);\r
+                                               des_const_xmlChar_ptr(n_name2, (const xmlChar *)name2, 2);\r
+                                               des_const_xmlChar_ptr(n_name3, (const xmlChar *)name3, 3);\r
+                                               des_xmlHashDeallocator(n_f, f, 4);\r
+                                               xmlResetLastError();\r
+                                       }\r
+                               }\r
+                       }\r
+               }\r
+       }\r
+}\r
+       /**    \r
+       * @test                 UTcXmlHashLookupP01\r
+       * @brief                void *xmlHashLookup(xmlHashTablePtr table, const xmlChar *name)\r
+       * @desc                 Positive Test for xmlHashLookup\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Create table, free the hash table and its contents] @n\r
+       *                       {xmlHashTablePtr(hash table), xmlChar *("foo", "<foo/>", "none", " 2ab " )} => {N/A | int(NOT -1)} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcXmlHashLookupP01()\r
+{\r
+       void * ret_val;\r
+       xmlHashTablePtr table; /* the hash table */\r
+       int n_table;\r
+       xmlChar * name; /* the name of the userdata */\r
+       int n_name;\r
+\r
+       for (n_table = 0;n_table < gen_nb_xmlHashTablePtr;n_table++) {\r
+               for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {\r
+                       table = gen_xmlHashTablePtr(n_table, 0);\r
+                       DTS_CHECK_NE_MESSAGE("xmlHashLookup", table, NULL, "hash table is NULL");\r
+                       name = gen_const_xmlChar_ptr(n_name, 1);\r
+                       DTS_CHECK_NE_MESSAGE("xmlHashLookup", name, NULL, "userdata is NULL");                  \r
+                       /**\r
+                                * @remarks   input1: [N/A, N/A] @n\r
+                                *            {table of size 10 , userdata name("foo" ,"<foo/>" ,"none"," 2ab ") } @n\r
+                                *                         => {N/A | void pointer} @n\r
+                                */\r
+                       ret_val = xmlHashLookup(table, (const xmlChar *)name);\r
+                       DTS_CHECK_EQ_MESSAGE("xmlHashLookup", ret_val, 0, "xmlHashLookup Failed");\r
+                       desret_void_ptr(ret_val);\r
+                       des_xmlHashTablePtr(n_table, table, 0);\r
+                       des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);\r
+                       xmlResetLastError();\r
+               }\r
+       }\r
+}\r
+/**    \r
+       * @test                 UTcXmlHashLookup2P01\r
+       * @brief                void * xmlHashLookup2(xmlHashTablePtr table, const xmlChar *name, const xmlChar *name2) \r
+       * @desc                 Positive Test for xmlHashLookup2\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Create table, free the hash table and its contents] @n\r
+       *                       {xmlHashTablePtr(hash table), xmlChar *("foo", "<foo/>", "none", " 2ab " ), xmlChar *("foo", "<foo/>", "none", " 2ab " )} => {N/A | void*(NOT NULL)} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcXmlHashLookup2P01()\r
+{\r
+       void * ret_val;\r
+       xmlHashTablePtr table; /* the hash table */\r
+       int n_table;\r
+       xmlChar * name; /* the name of the userdata */\r
+       int n_name;\r
+       xmlChar * name2; /* a second name of the userdata */\r
+       int n_name2;\r
+\r
+       for (n_table = 0;n_table < gen_nb_xmlHashTablePtr;n_table++) {\r
+               for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {\r
+                       for (n_name2 = 0;n_name2 < gen_nb_const_xmlChar_ptr;n_name2++) {\r
+                               table = gen_xmlHashTablePtr(n_table, 0);\r
+                               DTS_CHECK_NE_MESSAGE("xmlHashLookup2", table, NULL, "hash table is NULL");\r
+                               name = gen_const_xmlChar_ptr(n_name, 1);\r
+                               DTS_CHECK_NE_MESSAGE("xmlHashLookup2", name, NULL, "userdata is NULL");\r
+                               name2 = gen_const_xmlChar_ptr(n_name2, 2);\r
+                               DTS_CHECK_NE_MESSAGE("xmlHashLookup2", name2, NULL, "userdata is NULL");                                \r
+                               /**\r
+                                        * @remarks   input1: [N/A, N/A] @n\r
+                                    *            {table of size 10 , userdata name("foo" ,"<foo/>" ,"none"," 2ab ")\r
+                                        *                        userdata name2("foo" ,"<foo/>" ,"none"," 2ab ")} => {N/A | void pointer} @n\r
+                                    */\r
+                               ret_val = xmlHashLookup2(table, (const xmlChar *)name, (const xmlChar *)name2);\r
+                               DTS_CHECK_EQ_MESSAGE("xmlHashLookup2", ret_val, 0, "xmlHashLookup2 Failed");\r
+                               desret_void_ptr(ret_val);\r
+                               des_xmlHashTablePtr(n_table, table, 0);\r
+                               des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);\r
+                               des_const_xmlChar_ptr(n_name2, (const xmlChar *)name2, 2);\r
+                               xmlResetLastError();\r
+                       }\r
+               }\r
+       }\r
+}\r
+/**    \r
+       * @test                 UTcXmlHashLookup3P01\r
+       * @brief                void *xmlHashLookup3(xmlHashTablePtr table, const xmlChar *name, const xmlChar *name2, const xmlChar *name3)\r
+       * @desc                 Positive Test for xmlHashLookup3\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Create table, free the hash table and its contents] @n\r
+       *                       {xmlHashTablePtr(hash table), xmlChar *("foo", "<foo/>", "none", " 2ab " ), xmlChar *("foo", "<foo/>", "none", " 2ab " ), xmlChar *("foo", "<foo/>", "none", " 2ab " )} => {N/A | void*(NOT NULL)} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcXmlHashLookup3P01()\r
+{\r
+       void * ret_val;\r
+       xmlHashTablePtr table; /* the hash table */\r
+       int n_table;\r
+       xmlChar * name; /* the name of the userdata */\r
+       int n_name;\r
+       xmlChar * name2; /* a second name of the userdata */\r
+       int n_name2;\r
+       xmlChar * name3; /* a third name of the userdata */\r
+       int n_name3;\r
+\r
+       for (n_table = 0;n_table < gen_nb_xmlHashTablePtr;n_table++) {\r
+               for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {\r
+                       for (n_name2 = 0;n_name2 < gen_nb_const_xmlChar_ptr;n_name2++) {\r
+                               for (n_name3 = 0;n_name3 < gen_nb_const_xmlChar_ptr;n_name3++) {\r
+                                       table = gen_xmlHashTablePtr(n_table, 0);\r
+                                       DTS_CHECK_NE_MESSAGE("xmlHashLookup3", table, NULL, "hash table is NULL");\r
+                                       name = gen_const_xmlChar_ptr(n_name, 1);\r
+                                       DTS_CHECK_NE_MESSAGE("xmlHashLookup3", name, NULL, "userdata is NULL");\r
+                                       name2 = gen_const_xmlChar_ptr(n_name2, 2);\r
+                                       DTS_CHECK_NE_MESSAGE("xmlHashLookup3", name2, NULL, "userdata is NULL");\r
+                                       name3 = gen_const_xmlChar_ptr(n_name3, 3);\r
+                                       DTS_CHECK_NE_MESSAGE("xmlHashLookup3", name3, NULL, "userdata is NULL");\r
+                                       /**\r
+                                        * @remarks   input1: [N/A, N/A] @n\r
+                                       *            {table of size 10 , userdata name("foo" ,"<foo/>" ,"none"," 2ab ")\r
+                                        *                        userdata name2("foo" ,"<foo/>" ,"none"," 2ab ") , userdata name2("foo" ,"<foo/>" ,"none"," 2ab ")}@n\r
+                                            *                    => {N/A | void pointer} @n\r
+                                       */\r
+                                       ret_val = xmlHashLookup3(table, (const xmlChar *)name, (const xmlChar *)name2, (const xmlChar *)name3);\r
+                                       DTS_CHECK_EQ_MESSAGE("xmlHashLookup3", ret_val, 0, "xmlHashLookup3 Failed");\r
+                                       desret_void_ptr(ret_val);\r
+                                       des_xmlHashTablePtr(n_table, table, 0);\r
+                                       des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);\r
+                                       des_const_xmlChar_ptr(n_name2, (const xmlChar *)name2, 2);\r
+                                       des_const_xmlChar_ptr(n_name3, (const xmlChar *)name3, 3);\r
+                                       xmlResetLastError();\r
+                               }\r
+                       }\r
+               }\r
+       }\r
+}\r
+       /**    \r
+       * @test                 UTcXmlHashQLookupP01\r
+       * @brief                void *xmlHashQLookup(xmlHashTablePtr table, const xmlChar *prefix, const xmlChar *name) \r
+       * @desc                 Positive Test for xmlHashQLookup\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Create table, free the hash table and its contents] @n\r
+       *                       {xmlHashTablePtr(hash table), xmlChar *("foo", "<foo/>", "none", " 2ab " ), xmlChar *("foo", "<foo/>", "none", " 2ab " )} => {N/A | void*(NOT NULL)} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcXmlHashQLookupP01()\r
+{\r
+       void * ret_val;\r
+       xmlHashTablePtr table; /* the hash table */\r
+       int n_table;\r
+       xmlChar * prefix; /* the prefix of the userdata */\r
+       int n_prefix;\r
+       xmlChar * name; /* the name of the userdata */\r
+       int n_name;\r
+\r
+       for (n_table = 0;n_table < gen_nb_xmlHashTablePtr;n_table++) {\r
+               for (n_prefix = 0;n_prefix < gen_nb_const_xmlChar_ptr;n_prefix++) {\r
+                       for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {\r
+                               table = gen_xmlHashTablePtr(n_table, 0);\r
+                               DTS_CHECK_NE_MESSAGE("xmlHashQLookup", table, NULL, "hash table is NULL");\r
+                               prefix = gen_const_xmlChar_ptr(n_prefix, 1);\r
+                               DTS_CHECK_NE_MESSAGE("xmlHashQLookup", prefix, NULL, "gen_const_xmlChar_ptr returned NULL");\r
+                               name = gen_const_xmlChar_ptr(n_name, 2);\r
+                               DTS_CHECK_NE_MESSAGE("xmlHashQLookup", name, NULL, "userdata is NULL");\r
+                               /**\r
+                                * @remarks   input1: [N/A, N/A] @n\r
+                               *            {table of size 10 , prefix("foo" ,"<foo/>" ,"none"," 2ab ") ,\r
+                                *                         userdata name("foo" ,"<foo/>" ,"none"," 2ab ")}@n\r
+                                *                         => {N/A | void pointer} @n\r
+                               */\r
+                               ret_val = xmlHashQLookup(table, (const xmlChar *)prefix, (const xmlChar *)name);\r
+                               DTS_CHECK_EQ_MESSAGE("xmlHashQLookup", ret_val, 0, "xmlHashQLookup Failed");\r
+                               desret_void_ptr(ret_val);\r
+                               des_xmlHashTablePtr(n_table, table, 0);\r
+                               des_const_xmlChar_ptr(n_prefix, (const xmlChar *)prefix, 1);\r
+                               des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 2);\r
+                               xmlResetLastError();\r
+                       }\r
+               }\r
+       }\r
+}\r
+/**    \r
+       * @test                 UTcXmlHashQLookup2P01\r
+       * @brief                void *xmlHashQLookup2(xmlHashTablePtr table, const xmlChar *prefix, const xmlChar *name, const xmlChar *prefix2, const xmlChar *name2)\r
+       * @desc                 Positive Test for xmlHashQLookup2\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Create table, free the hash table and its contents] @n\r
+       *                       {xmlHashTablePtr(hash table), xmlChar *("foo", "<foo/>", "none", " 2ab " ), xmlChar *("foo", "<foo/>", "none", " 2ab " ), xmlChar *("foo", "<foo/>", "none", " 2ab " ), xmlChar *("foo", "<foo/>", "none", " 2ab " )} => {N/A | void*(NOT NULL)} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcXmlHashQLookup2P01()\r
+{\r
+       void * ret_val;\r
+       xmlHashTablePtr table; /* the hash table */\r
+       int n_table;\r
+       xmlChar * prefix; /* the prefix of the userdata */\r
+       int n_prefix;\r
+       xmlChar * name; /* the name of the userdata */\r
+       int n_name;\r
+       xmlChar * prefix2; /* the second prefix of the userdata */\r
+       int n_prefix2;\r
+       xmlChar * name2; /* a second name of the userdata */\r
+       int n_name2;\r
+\r
+       for (n_table = 0;n_table < gen_nb_xmlHashTablePtr;n_table++) {\r
+               for (n_prefix = 0;n_prefix < gen_nb_const_xmlChar_ptr;n_prefix++) {\r
+                       for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {\r
+                               for (n_prefix2 = 0;n_prefix2 < gen_nb_const_xmlChar_ptr;n_prefix2++) {\r
+                                       for (n_name2 = 0;n_name2 < gen_nb_const_xmlChar_ptr;n_name2++) {\r
+                                               table = gen_xmlHashTablePtr(n_table, 0);\r
+                                               DTS_CHECK_NE_MESSAGE("xmlHashQLookup2", table, NULL, "hash table is NULL");\r
+                                               prefix = gen_const_xmlChar_ptr(n_prefix, 1);\r
+                                               DTS_CHECK_NE_MESSAGE("xmlHashQLookup2", table, NULL, "gen_const_xmlChar_ptr returned NULL");\r
+                                               name = gen_const_xmlChar_ptr(n_name, 2);\r
+                                               DTS_CHECK_NE_MESSAGE("xmlHashQLookup2", table, NULL, "userdata is NULL");\r
+                                               prefix2 = gen_const_xmlChar_ptr(n_prefix2, 3);\r
+                                               DTS_CHECK_NE_MESSAGE("xmlHashQLookup2", table, NULL, "gen_const_xmlChar_ptr returned NULL");\r
+                                               name2 = gen_const_xmlChar_ptr(n_name2, 4);\r
+                                               DTS_CHECK_NE_MESSAGE("xmlHashQLookup2", table, NULL, "userdata is NULL");\r
+                                               /**\r
+                                                    * @remarks   input1: [N/A, N/A] @n\r
+                                                *            {table of size 10 , prefix("foo" ,"<foo/>" ,"none"," 2ab ") ,\r
+                                                    *                     userdata name("foo" ,"<foo/>" ,"none"," 2ab ") ,prefix2("foo" ,"<foo/>" ,"none"," 2ab ") ,@n\r
+                                                    *                     userdata name1("foo" ,"<foo/>" ,"none"," 2ab ")}@n\r
+                                                    *                     => {N/A | void pointer} @n\r
+                                                    */\r
+                                               ret_val = xmlHashQLookup2(table, (const xmlChar *)prefix, (const xmlChar *)name, (const xmlChar *)prefix2, (const xmlChar *)name2);\r
+                                               DTS_CHECK_EQ_MESSAGE("xmlHashQLookup2", ret_val, 0, "xmlHashQLookup2 Failed");\r
+                                               desret_void_ptr(ret_val);\r
+                                               des_xmlHashTablePtr(n_table, table, 0);\r
+                                               des_const_xmlChar_ptr(n_prefix, (const xmlChar *)prefix, 1);\r
+                                               des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 2);\r
+                                               des_const_xmlChar_ptr(n_prefix2, (const xmlChar *)prefix2, 3);\r
+                                               des_const_xmlChar_ptr(n_name2, (const xmlChar *)name2, 4);\r
+                                               xmlResetLastError();\r
+                                       }\r
+                               }\r
+                       }\r
+               }\r
+       }\r
+}\r
+       /**    \r
+       * @test                 UTcXmlHashSizeP01\r
+       * @brief                int xmlHashSize(xmlHashTablePtr table)\r
+       * @desc                 Positive Test for xmlHashSize\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Create table, free the hash table and its contents] @n\r
+       *                       {xmlHashTablePtr(hash table)} => {N/A | int(NOT -1 OR NOT NULL)} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcXmlHashSizeP01()\r
+{\r
+       int ret_val;\r
+       xmlHashTablePtr table; /* the hash table */\r
+       int n_table;\r
+\r
+       for (n_table = 0;n_table < gen_nb_xmlHashTablePtr;n_table++) {\r
+               table = gen_xmlHashTablePtr(n_table, 0);\r
+               DTS_CHECK_NE_MESSAGE("xmlHashSize", table, NULL, "hash table is NULL");\r
+               /**\r
+               * @remarks   input1: [N/A, N/A] @n\r
+               *            {table of size 10} => {N/A | void pointer} @n\r
+               */\r
+               ret_val = xmlHashSize(table);\r
+               DTS_CHECK_EQ_MESSAGE("xmlHashSize", ret_val, 0, "xmlHashSize Failed");\r
+               desret_int(ret_val);\r
+               des_xmlHashTablePtr(n_table, table, 0);\r
+               xmlResetLastError();\r
+       }\r
+}\r
+/**    \r
+       * @test                 UTcXmlHashScanP01\r
+       * @brief                \r
+       * @desc                 \r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              \r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcXmlHashScanP01()\r
+{\r
+\r
+       /* missing type support */\r
+       DTS_CHECK_EQ_MESSAGE("UTcXmlHashScanP01", 1, 1, "UTcXmlHashScanP01 Failed");\r
+}\r
+/**    \r
+       * @test                 UTcXmlHashScan3P01\r
+       * @brief                void xmlHashScan3(xmlHashTablePtr table, const xmlChar *name, const xmlChar *name2, const xmlChar *name3, xmlHashScanner f, void *data)\r
+       * @desc                 Positive Test for xmlHashScan3\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Create table, free the hash table and its contents] @n\r
+       *                       {xmlHashTablePtr(hash table), xmlChar *("test1"), xmlChar *("test2"), xmlChar *("test3"), xmlHashScanner, (void *)"xmlHashScan3} => {N/A} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcXmlHashScan3P01()\r
+{\r
+       xmlHashTablePtr table; /* the hash table */\r
+       xmlHashScanner f;\r
+       xmlErrorPtr                             pError;\r
+       xmlResetLastError();\r
+\r
+       /**\r
+        * @remarks   input1: [N/A, N/A] @n\r
+            *            {table of size 10 , prefix("foo" ,"<foo/>" ,"none"," 2ab ") ,\r
+            *                     userdata name("foo" ,"<foo/>" ,"none"," 2ab ") ,prefix2("foo" ,"<foo/>" ,"none"," 2ab ") ,@n\r
+            *                     userdata name1("foo" ,"<foo/>" ,"none"," 2ab ")}@n\r
+            *                     => {N/A | void pointer} @n\r
+            */\r
+\r
+       table = xmlHashCreate(10);\r
+       f = gen_xmlHashScanner(0, 3);\r
+       DTS_CHECK_NE_MESSAGE("xmlHashScan3", f, NULL, "gen_xmlHashScanner returned NULL");\r
+\r
+       xmlHashScan3(table,(const xmlChar *)"test1",(const xmlChar *)"test2",(const xmlChar *)"test3",f,(void *)"xmlHashScan3");\r
+       pError = xmlGetLastError();\r
+       DTS_CHECK_EQ_MESSAGE("xmlHashScan3", pError, 0, "checking the result for xmlHashScan3");\r
+\r
+\r
+       xmlHashFree(table,NULL);\r
+       if (pError != NULL)\r
+               free( pError);\r
+}\r
+/**    \r
+       * @test                 UTcXmlHashScanFullP01\r
+       * @brief                \r
+       * @desc                 \r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              \r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcXmlHashScanFullP01()\r
+{\r
+\r
+       /* missing type support */\r
+       DTS_CHECK_EQ_MESSAGE("UTcXmlHashScanFullP01", 1, 1, "checking the result for xmlHashScan3");\r
+}\r
+/**    \r
+       * @test                 UTcXmlHashScanFull3P01\r
+       * @brief                \r
+       * @desc                 \r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              \r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcXmlHashScanFull3P01()\r
+{\r
+\r
+       /* missing type support */\r
+       DTS_CHECK_EQ_MESSAGE("UTcXmlHashScanFull3P01", 1, 1, "checking the result for xmlHashScan3");\r
+}\r
+\r
+static void startup( void)\r
+{\r
+        /* start of TC */\r
+        tet_printf("TC starts.");\r
+}\r
+\r
+static void cleanup( void)\r
+{\r
+        /* end of TC */\r
+        tet_printf("TC ends.");\r
+}\r
+\r
+void (*tet_startup)( void) = startup;\r
+void (*tet_cleanup)( void) = cleanup;\r
+\r
+\r
+\r
+struct tet_testlist tet_testlist[] = {\r
+       // Handling of out of context errors\r
+        {UTcXmlHashCreateP01,1},\r
+        {UTcXmlHashFreeP01,2},\r
+        {UTcXmlHashAddEntryP01,3},\r
+        {UTcXmlHashUpdateEntryP01,4},\r
+        {UTcXmlHashAddEntry2P01,5},\r
+        {UTcXmlHashUpdateEntry2P01,6},\r
+        {UTcXmlHashAddEntry3P01,7},\r
+        {UTcXmlHashUpdateEntry3P01,8},\r
+        {UTcXmlHashRemoveEntryP01,9},\r
+        {UTcXmlHashRemoveEntry2P01,10},\r
+        \r
+        {UTcXmlHashRemoveEntry3P01,11},\r
+        {UTcXmlHashLookupP01,13},\r
+        {UTcXmlHashLookup2P01,14},\r
+        {UTcXmlHashLookup3P01,15},\r
+        {UTcXmlHashQLookupP01,16},\r
+        {UTcXmlHashQLookup2P01,17},\r
+        {UTcXmlHashSizeP01,18},\r
+        {UTcXmlHashScanP01,19},\r
+        {UTcXmlHashScan3P01,20},\r
+        \r
+        {UTcXmlHashScanFullP01,21},\r
+        {UTcXmlHashScanFull3P01,22},\r
+       { NULL, 0 },\r
+       \r
+};\r
+\r
diff --git a/TC/testcase/utc_libxml_ParserInternals.c b/TC/testcase/utc_libxml_ParserInternals.c
new file mode 100755 (executable)
index 0000000..59c4fd9
--- /dev/null
@@ -0,0 +1,1143 @@
+/*\r
+*  libxml test suite\r
+*\r
+* Copyright (c) 2012 Samsung Electronics Co., Ltd. All rights reserved.\r
+*\r
+* Contact: {Maintainer Name} <{Maintainer Email}>\r
+* \r
+* Licensed under the Apache License, Version 2.0 (the "License");\r
+* you may not use this file except in compliance with the License.\r
+* You may obtain a copy of the License at\r
+*\r
+* http://www.apache.org/licenses/LICENSE-2.0\r
+*\r
+* Unless required by applicable law or agreed to in writing, software\r
+* distributed under the License is distributed on an "AS IS" BASIS,\r
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+* See the License for the specific language governing permissions and\r
+* limitations under the License.\r
+*\r
+*/ \r
+\r
+#include "utc_libxml_include.h"\r
+\r
+#ifdef DEBUG_MEM_LEAK\r
+extern "C"\r
+{\r
+       extern void MemStartSaveCallStack(void);\r
+       extern void MemEndSaveCallStack(void);\r
+       extern void MemPrintCurrentIndex(void);\r
+       extern void MemTraceAllocMemInfo(void);\r
+}\r
+#endif\r
+\r
+/***************************************************************************\r
+ * SUTsParserInternals\r
+ ***************************************************************************/\r
+static int inttab[12];\r
+static xmlChar chartab[12];\r
+\r
+#define gen_nb_xmlParserCtxtPtr 1\r
+static xmlParserCtxtPtr gen_xmlParserCtxtPtr(int no, int nr ATTRIBUTE_UNUSED)\r
+{\r
+       if (no == 0) return(xmlNewParserCtxt());\r
+       if (no == 1) return(xmlCreateMemoryParserCtxt("<doc/>", 6));\r
+       return(NULL);\r
+}\r
+static void des_xmlParserCtxtPtr(int no ATTRIBUTE_UNUSED, xmlParserCtxtPtr val, int nr ATTRIBUTE_UNUSED)\r
+{\r
+       if(val!= NULL && val->myDoc!= NULL)\r
+               xmlFreeDoc(val->myDoc);\r
+       if (val != NULL)\r
+               xmlFreeParserCtxt(val);\r
+}\r
+\r
+#define gen_nb_int 4\r
+\r
+static int gen_int(int no, int nr ATTRIBUTE_UNUSED)\r
+{\r
+       if (no == 0) return(0);\r
+       if (no == 1) return(1);\r
+       if (no == 2) return(-1);\r
+       if (no == 3) return(96);\r
+       return(-1);\r
+}\r
+#define gen_nb_xmlEntityPtr 1\r
+static xmlEntityPtr gen_xmlEntityPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED)\r
+{\r
+       return((xmlEntityPtr)"test");\r
+}\r
+\r
+static void desret_xmlParserInputPtr(xmlParserInputPtr val)\r
+{\r
+       if (val != NULL)\r
+               xmlFreeInputStream(val);\r
+}\r
+#define gen_nb_filepath 7\r
+\r
+#define gen_nb_xmlParserInputBufferPtr 7\r
+\r
+static xmlParserInputBufferPtr gen_xmlParserInputBufferPtr(int no, int nr ATTRIBUTE_UNUSED)\r
+{\r
+       if (no == 0) return(xmlParserInputBufferCreateFilename(MISSINGXML, XML_CHAR_ENCODING_NONE));\r
+       if (no == 1) return(xmlParserInputBufferCreateFilename("<foo/>", XML_CHAR_ENCODING_NONE));\r
+       if (no == 2) return(xmlParserInputBufferCreateFilename("test/ent2", XML_CHAR_ENCODING_NONE));\r
+       if (no == 3) return(xmlParserInputBufferCreateFilename(TESTRECxml19980210, XML_CHAR_ENCODING_NONE));\r
+       if (no == 4) return(xmlParserInputBufferCreateFilename(TESTXHTML1STRICTDTD, XML_CHAR_ENCODING_NONE));\r
+       if (no == 5) return(xmlParserInputBufferCreateFilename(REMOTE1GOOD, XML_CHAR_ENCODING_NONE));\r
+       if (no == 6) return(xmlParserInputBufferCreateFilename(REMOTE1BAD, XML_CHAR_ENCODING_NONE));\r
+       return(NULL);\r
+}\r
+\r
+static void des_xmlParserInputBufferPtr(int no ATTRIBUTE_UNUSED, xmlParserInputBufferPtr val, int nr ATTRIBUTE_UNUSED)\r
+{\r
+       xmlFreeParserInputBuffer(val);\r
+}\r
+static void des_filepath(int no ATTRIBUTE_UNUSED, const char *val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED)\r
+{\r
+}\r
+#define gen_nb_const_xmlChar_ptr 4\r
+\r
+static xmlChar *gen_const_xmlChar_ptr(int no, int nr ATTRIBUTE_UNUSED)\r
+{\r
+       if (no == 0) return((xmlChar *) "foo");\r
+       if (no == 1) return((xmlChar *) "<foo/>");\r
+       if (no == 2) return((xmlChar *) "none");\r
+       if (no == 3) return((xmlChar *) " 2ab ");\r
+       return(NULL);\r
+}\r
+static void des_const_xmlChar_ptr(int no ATTRIBUTE_UNUSED, const xmlChar *val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED)\r
+{\r
+}\r
+#define gen_nb_xmlParserInputPtr 1\r
+static xmlParserInputPtr gen_xmlParserInputPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED)\r
+{\r
+       if (no == 0) return((xmlParserInputPtr) "test");\r
+       return(NULL);\r
+}\r
+\r
+#define gen_nb_xmlChar_ptr_ptr 1\r
+static xmlChar ** gen_xmlChar_ptr_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED)\r
+{\r
+       if (no == 0) return((xmlChar **) "f");\r
+       return(NULL);\r
+}\r
+\r
+static void desret_xmlChar_ptr(xmlChar *val)\r
+{\r
+       if (val != NULL)\r
+               xmlFree(val);\r
+}\r
+\r
+static int *gen_int_ptr(int no, int nr)\r
+{\r
+       memset(inttab, 0,sizeof(inttab));\r
+       if (no == 0) return(&inttab[nr]);\r
+       return(NULL);\r
+}\r
+\r
+#define gen_nb_xmlCharEncoding 2\r
+static xmlCharEncoding gen_xmlCharEncoding(int no, int nr ATTRIBUTE_UNUSED)\r
+{\r
+       if (no == 0) return(XML_CHAR_ENCODING_UTF8);\r
+       if (no == 1) return(XML_CHAR_ENCODING_NONE);\r
+       return(XML_CHAR_ENCODING_ERROR);\r
+}\r
+\r
+#define gen_nb_const_xmlParserNodeInfoSeqPtr 1\r
+static xmlParserNodeInfoSeqPtr gen_const_xmlParserNodeInfoSeqPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED)\r
+{\r
+       return((xmlParserNodeInfoSeqPtr)"test");\r
+}\r
+//#define gen_nb_const_xmlParserCtxtPtr 1\r
+//static xmlParserCtxtPtr gen_const_xmlParserCtxtPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED)\r
+//{\r
+//     return(xmlNewParserCtxt());\r
+//}\r
+\r
+/**    \r
+       * @test                 UTcxmlIsLetterP01\r
+       * @brief                XMLPUBFUN int XMLCALL xmlIsLetter (int c)\r
+       * @desc                 Positive Test for xmlIsLetter \r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {int(0)} => {N/A | 1} @n\r
+       *                               input2: [N/A, N/A] @n\r
+       *                       {int('c')} => {N/A | 1} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcxmlIsLetterP01()\r
+{\r
+       int ret_val;\r
+\r
+       /**\r
+        * @remarks   input1: [N/A, N/A]        @n\r
+        *                                      {0} => {N/A |0} @n\r
+        */\r
+       ret_val = xmlIsLetter(0);\r
+       DTS_CHECK_EQ_MESSAGE("xmlIsLetter", (void *)ret_val, (void *)0, "xmlIsLetter Failes");  \r
+\r
+       /**\r
+        * @remarks   input2: [N/A, N/A]        @n\r
+        *                                      {'a'} => {N/A |1}       @n\r
+        */\r
+       ret_val = xmlIsLetter('a');\r
+       DTS_CHECK_EQ_MESSAGE("xmlIsLetter", (void *)ret_val, (void *)1, "xmlIsLetter Failes");  \r
+}\r
+/**    \r
+       * @test                 UTcxmlNewEntityInputStreamP01\r
+       * @brief                XMLPUBFUN xmlParserInputPtr XMLCALL     xmlNewEntityInputStream (xmlParserCtxtPtr ctxt, xmlEntityPtr entity)\r
+       * @desc                 Positive Test for xmlNewEntityInputStream       \r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [xmlParserCtxtPtr(ctxt) is created, Free all the memory used by a parser context] @n\r
+       *                       {xmlParserCtxtPtr(ctxt), xmlEntityPtr("test")} => {N/A | != NULL } @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcxmlNewEntityInputStreamP01()\r
+{\r
+       xmlParserInputPtr ret_val;\r
+       xmlErrorPtr                             pError;\r
+       xmlResetLastError();\r
+       xmlParserCtxtPtr ctx = xmlNewParserCtxt();\r
+\r
+       /**\r
+            * @remarks   input1: [1.xmlParserCtxtPtr(ctxt) is created, N/A]    @n\r
+            *                                  {ctxt,entity} => {N/A |xmlParserInputPtr}       @n\r
+            */\r
+       //ret_val = xmlNewEntityInputStream(ctx,(xmlEntityPtr)"test");\r
+       ret_val = xmlNewEntityInputStream(ctx,NULL);\r
+       DTS_CHECK_EQ_MESSAGE("xmlNewEntityInputStream", (void *)ret_val, (void *)NULL, "xmlNewEntityInputStream Failes");       \r
+       pError = xmlGetLastError();\r
+       DTS_CHECK_NE_MESSAGE("xmlNewEntityInputStream", (void *)pError, (void *)NULL, "xmlGetLastError Failes");        \r
+\r
+       /**\r
+            * @post delete xmlParserInputPtr objects\r
+            */\r
+       //xmlMemFree(ret_val);\r
+       xmlFreeParserCtxt(ctx);\r
+       //if (pError != NULL)// Syam->Assertion occured\r
+       //      delete pError;\r
+}\r
+/**    \r
+       * @test                 UTcxmlNewInputFromFileP01\r
+       * @brief                XMLPUBFUN xmlParserInputPtr XMLCALL     xmlNewInputFromFile     (xmlParserCtxtPtr ctxt, const char *filename)\r
+       * @desc                 Positive Test for xmlNewInputFromFile   \r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [xmlParserCtxtPtr(ctxt) is created, Free all the memory used by a parser context] @n\r
+       *                       {xmlParserCtxtPtr(ctxt), char*(LIBXML2TESTXML)} => {N/A | != NULL } @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcxmlNewInputFromFileP01()\r
+{\r
+       xmlParserInputPtr ret_val;\r
+       const char *pFilename = LIBXML2TESTXML;\r
+       \r
+       xmlErrorPtr                             pError;\r
+       xmlResetLastError();\r
+       int result = -1;\r
+       xmlParserCtxtPtr ctx = xmlNewParserCtxt();\r
+\r
+       /**\r
+        * @remarks   input1: [1.xmlParserCtxtPtr(ctxt) is created, N/A]        @n\r
+        *                                      {ctxt,LIBXML2TESTXML} => {N/A |xmlParserInputPtr}       @n\r
+        */\r
+\r
+       ret_val = xmlNewInputFromFile(ctx, pFilename);\r
+       DTS_CHECK_NE_MESSAGE("xmlNewInputFromFile", (void *)ret_val, (void *)NULL, "xmlNewInputFromFile Failes");       \r
+       \r
+       pError = xmlGetLastError();\r
+       DTS_CHECK_EQ_MESSAGE("xmlNewInputFromFile", (void *)pError, (void *)NULL, "xmlGetLastError Failes");            \r
+#if 0\r
+       result = xmlParserInputRead(ret_val, 4);\r
+       DTS_CHECK_EQ_MESSAGE("xmlNewInputFromFile", (void *)ret_val, (void *)4, "xmlParserInputRead Failes");   \r
+       \r
+       pError = xmlGetLastError();\r
+       DTS_CHECK_EQ_MESSAGE("xmlNewInputFromFile", (void *)pError, (void *)NULL, "xmlGetLastError Failes");    \r
+       \r
+#endif\r
+       /**\r
+        * @post delete xmlParserInputPtr objects\r
+        */\r
+       xmlFreeInputStream(ret_val);\r
+       xmlFreeParserCtxt(ctx);\r
+       //xmlCleanupParser();\r
+       //if (pError != NULL)// Syam->Assertion occured\r
+       //      delete pError;\r
+}\r
+/**    \r
+       * @test                 UTcxmlNewInputStreamP01\r
+       * @brief                XMLPUBFUN xmlParserInputPtr XMLCALL xmlNewInputStream (xmlParserCtxtPtr ctxt)\r
+       * @desc                 Positive Test for xmlNewInputStream \r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [xmlParserCtxtPtr(ctxt) is created, Free all the memory used by a parser context] @n\r
+       *                       {xmlParserCtxtPtr(ctxt)} => {N/A | != NULL } @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcxmlNewInputStreamP01()\r
+{\r
+       xmlParserInputPtr ret_val;\r
+       xmlErrorPtr                             pError;\r
+       xmlResetLastError();\r
+       xmlParserCtxtPtr ctx = xmlNewParserCtxt();\r
+       /**\r
+        * @remarks   input1: [1.xmlParserCtxtPtr(ctxt) is created, N/A]        @n\r
+        *                                      {ctxt} => {N/A |xmlParserInputPtr}      @n\r
+        */\r
+       ret_val = xmlNewInputStream(ctx);\r
+       DTS_CHECK_NE_MESSAGE("xmlNewInputStream", (void *)ret_val, (void *)NULL, "xmlNewInputStream Failes");\r
+       pError = xmlGetLastError();\r
+       DTS_CHECK_EQ_MESSAGE("xmlNewInputStream", (void *)pError, (void *)NULL, "xmlGetLastError Failes");\r
+       /**\r
+        * @post delete xmlParserInputPtr objects\r
+        */\r
+       xmlFreeInputStream(ret_val);\r
+       xmlFreeParserCtxt(ctx);\r
+       //if (pError != NULL)// Syam->Assertion occured\r
+       //      delete pError;\r
+}\r
+/**    \r
+       * @test                 UTcxmlNewStringInputStreamP01\r
+       * @brief                XMLPUBFUN xmlParserInputPtr XMLCALL xmlNewStringInputStream     (xmlParserCtxtPtr ctxt, const xmlChar *buffer)\r
+       * @desc                 Positive Test for xmlNewStringInputStream       \r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [xmlParserCtxtPtr(ctxt) is created, Free all the memory used by a parser context] @n\r
+       *                       {xmlParserCtxtPtr(ctxt), char*("parser")} => {N/A | != NULL } @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcxmlNewStringInputStreamP01()\r
+{\r
+       xmlParserInputPtr ret_val;\r
+       xmlParserCtxtPtr ctxt; /* an XML parser context */\r
+       ctxt = xmlCreateMemoryParserCtxt("<doc>Parsers</doc>", 18);\r
+       xmlErrorPtr                             pError;\r
+       xmlResetLastError();\r
+       /**\r
+            * @remarks   input1: [1.xmlParserCtxtPtr(ctxt) is created, N/A]    @n\r
+            *                                  {ctxt,buffer} => {N/A |xmlParserInputPtr}       @n\r
+            */\r
+\r
+       ret_val = xmlNewStringInputStream(ctxt, (const xmlChar *)"parser");\r
+       DTS_CHECK_NE_MESSAGE("xmlNewStringInputStream", (void *)ret_val, (void *)NULL, "xmlNewStringInputStream Failes");\r
+       pError = xmlGetLastError();\r
+       DTS_CHECK_EQ_MESSAGE("xmlNewStringInputStream", (void *)pError, (void *)NULL, "xmlGetLastError Failes");\r
+       /**\r
+        * @post delete xmlParserInputPtr objects\r
+        */\r
+       if (ret_val != NULL)\r
+               xmlFreeInputStream(ret_val);\r
+       if (ctxt != NULL)\r
+       {\r
+               xmlFreeParserCtxt(ctxt);\r
+               ctxt = NULL;\r
+       }\r
+       //xmlCleanupParser();\r
+       /**\r
+        * @remarks   input2: [1.xmlParserCtxtPtr(ctxt) is created, N/A]        @n\r
+        *                                      {ctxt,NULL} => {N/A |NULL}      @n\r
+        */\r
+       ctxt = xmlNewParserCtxt();\r
+       ret_val = xmlNewStringInputStream(ctxt,NULL);\r
+       DTS_CHECK_EQ_MESSAGE("xmlNewStringInputStream", (void *)ret_val, (void *)NULL, "xmlNewStringInputStream Failes");\r
+       \r
+       pError = xmlGetLastError();\r
+       DTS_CHECK_NE_MESSAGE("xmlNewStringInputStream", (void *)pError, (void *)NULL, "xmlGetLastError Failes");\r
+       \r
+\r
+       if (ctxt != NULL)\r
+               xmlFreeParserCtxt(ctxt);\r
+       xmlResetError(pError);\r
+}\r
+/**    \r
+       * @test                 UTcxmlNextCharP01\r
+       * @brief                XMLPUBFUN void XMLCALL xmlNextChar (xmlParserCtxtPtr ctxt)\r
+       * @desc                 Positive Test for xmlNextChar\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Create xmlParserInputPtr, Free all the memory used by a parser context] @n\r
+       *                       {xmlParserInputPtr} => {N/A} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcxmlNextCharP01()\r
+{\r
+       xmlParserCtxtPtr ctxt; /* the XML parser context */\r
+       int result;\r
+       int *pLen ;\r
+\r
+       xmlErrorPtr                             pError;\r
+       xmlSAXHandler *saxHandler;\r
+       saxHandler =(xmlSAXHandler *) xmlMemMalloc(sizeof(xmlSAXHandler));\r
+       char xmlIn[] =\r
+               "<test:Plan xmlns:test='http://test.org/schema'>"\r
+               "<test:Case name='test1' emptyAttribute='' test:ns_id='auio'>"\r
+               "</test:Case>"\r
+               "</test:Plan>";\r
+\r
+       /**\r
+       * @pre Initialise xmlSAXHandler\r
+       */\r
+       xmlSAX2InitDefaultSAXHandler(saxHandler,0);\r
+       DTS_CHECK_NE_MESSAGE("xmlCurrentChar", (void *)saxHandler, (void *)NULL, "xmlSAX2InitDefaultSAXHandler Failes");\r
+\r
+       ctxt = xmlCreatePushParserCtxt(saxHandler,(void *)"test:case",(const char *)"test", strlen(xmlIn) , xmlIn );\r
+       DTS_CHECK_NE_MESSAGE("xmlCurrentChar", (void *)ctxt, (void *)NULL, "xmlCreatePushParserCtxt Failes");\r
+\r
+       xmlResetLastError();\r
+       xmlSAX2StartDocument(ctxt);\r
+       pError = xmlGetLastError();\r
+       DTS_CHECK_EQ_MESSAGE("xmlCurrentChar", (void *)pError, (void *)NULL, "xmlGetLastError Failes");\r
+\r
+       pLen = gen_int_ptr(0, 1);\r
+\r
+       result = xmlCurrentChar(ctxt,pLen);\r
+       DTS_CHECK_GT_MESSAGE("xmlCurrentChar", (void *)result, (void *)0, "xmlCurrentChar Failes");\r
+\r
+       xmlResetLastError();\r
+       /**\r
+        * @remarks   input1: [1.xmlParserCtxtPtr(ctxt) is created, N/A]        @n\r
+        *                                      {ctxt} => {N/A |N/A}    @n\r
+        */\r
+       xmlNextChar(ctxt);\r
+       pError = xmlGetLastError();\r
+       DTS_CHECK_EQ_MESSAGE("xmlCurrentChar", (void *)pError, (void *)NULL, "xmlGetLastError Failes");\r
+\r
+\r
+       result = xmlCurrentChar(ctxt,pLen);\r
+       DTS_CHECK_GT_MESSAGE("xmlCurrentChar", (void *)result, (void *)0, "xmlCurrentChar Failes");\r
+\r
+       xmlSAX2EndDocument(ctxt);\r
+       /**\r
+        * @post delete xmlParserCtxtPtr\r
+        */\r
+\r
+       if(ctxt->myDoc!= NULL)\r
+               xmlFreeDoc(ctxt->myDoc);\r
+       //if (pLen != NULL)// Syam->Assertion occured\r
+       //      delete pLen;\r
+       if (ctxt != NULL)\r
+               xmlFreeParserCtxt(ctxt);\r
+       xmlMemFree(saxHandler);\r
+       //xmlCleanupParser();\r
+       xmlResetLastError();\r
+}\r
+       /**    \r
+       * @test                 UTcxmlParserInputShrinkP01\r
+       * @brief                XMLPUBFUN void XMLCALL xmlParserInputShrink (xmlParserInputPtr in);\r
+       * @desc                 Positive Test for xmlParserInputShrink \r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Create xmlParserInputPtr, Free all the memory used by a parser context] @n\r
+       *                       {xmlParserInputPtr} => {N/A} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcxmlParserInputShrinkP01()\r
+{\r
+       xmlParserCtxtPtr ctxt;\r
+       xmlErrorPtr             pError;\r
+       xmlParserInputPtr parseInputPtr; /* an XML parser input */\r
+       xmlSAXHandler *saxHandler;\r
+       saxHandler =(xmlSAXHandler *) xmlMemMalloc(sizeof(xmlSAXHandler));\r
+       char xmlIn[] =\r
+               "<test:Plan xmlns:test='http://test.org/schema'>"\r
+               "<test:Case name='test1' emptyAttribute='' test:ns_id='auio'>"\r
+               "</test:Case>"\r
+               "</test:Plan>";\r
+\r
+       xmlSAX2InitDefaultSAXHandler(saxHandler,0);\r
+       DTS_CHECK_NE_MESSAGE("xmlParserInputShrink", (void *)saxHandler, (void *)NULL, "xmlSAX2InitDefaultSAXHandler Failes");\r
+\r
+       ctxt = xmlCreatePushParserCtxt(saxHandler,(void *)"test:case",(const char *)"test", strlen(xmlIn) , xmlIn);\r
+       DTS_CHECK_NE_MESSAGE("xmlParserInputShrink", (void *)ctxt, (void *)NULL, "xmlSAX2InitDefaultSAXHandler Failes");\r
+\r
+       xmlSAX2StartDocument(ctxt);\r
+\r
+       parseInputPtr = xmlNewInputStream(ctxt);\r
+       xmlResetLastError();\r
+       /**\r
+        * @remarks   input1: [1.xmlParserInputPtr is created, N/A]     @n\r
+        *                                      {parseInputPtr} => {N/A |N/A}   @n\r
+        */\r
+       if(parseInputPtr!=NULL) xmlParserInputShrink(parseInputPtr);\r
+       pError = xmlGetLastError();\r
+       DTS_CHECK_EQ_MESSAGE("xmlParserInputShrink", (void *)pError, (void *)NULL, "xmlSAX2InitDefaultSAXHandler Failes");\r
+\r
+       xmlSAX2EndDocument(ctxt);\r
+       /**\r
+        * @post Cleanup function for the XML library.\r
+        */\r
+       if(ctxt->myDoc!= NULL)\r
+               xmlFreeDoc(ctxt->myDoc);\r
+       if (ctxt != NULL)\r
+               xmlFreeParserCtxt(ctxt);\r
+       if (parseInputPtr != NULL)\r
+               xmlFreeInputStream(parseInputPtr);\r
+       xmlMemFree(saxHandler);\r
+}\r
+/**    \r
+       * @test                 UTcxmlStringCurrentCharP01\r
+       * @brief                XMLPUBFUN int XMLCALL xmlStringCurrentChar (xmlParserCtxtPtr ctxt, const xmlChar *cur, int *len)\r
+       * @desc                 Positive Test for xmlStringCurrentChar\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Create xmlParserInputPtr, Free all the memory used by a parser context] @n\r
+       *                       {xmlParserInputPtr} => {N/A} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcxmlStringCurrentCharP01()\r
+{\r
+       int ret_val;\r
+       xmlParserCtxtPtr ctxt; /* the XML parser context */\r
+       xmlErrorPtr                             pError;\r
+       xmlResetLastError();\r
+       ctxt = xmlNewParserCtxt();\r
+\r
+       /**\r
+        * @remarks   input1: [1.xmlParserCtxtPtr(ctxt) is created, N/A]        @n\r
+        *                                      {ctxt,cur,len} => {N/A |ret_val}        @n\r
+        */\r
+\r
+       ret_val = xmlStringCurrentChar(ctxt, (const xmlChar *)"test", &inttab[0]);\r
+       DTS_CHECK_GT_MESSAGE("xmlStringCurrentChar", (void *)ret_val, (void *)0, "xmlStringCurrentChar Failes");\r
+       \r
+       pError = xmlGetLastError();\r
+       DTS_CHECK_EQ_MESSAGE("xmlStringCurrentChar", (void *)pError, (void *)NULL, "xmlGetLastError Failes");\r
+\r
+       /**\r
+        * @post delete xmlParserCtxtPtr\r
+            */\r
+       if (ctxt != NULL)\r
+               xmlFreeParserCtxt(ctxt);\r
+       //xmlCleanupParser();\r
+       //if (pError != NULL)// Syam->Assertion occured\r
+       //      delete pError;\r
+}\r
+/**    \r
+       * @test                 UTcxmlCopyCharP01\r
+       * @brief                XMLPUBFUN int XMLCALL xmlCopyChar (int len, xmlChar *out, int val)\r
+       * @desc                 Positive Test for xmlCopyChar \r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {int(1), xmlChar, int(1) } => {N/A | > 0} @n\r
+       *                               input2: [N/A, N/A] @n\r
+       *                       {int(1), xmlChar, int(1024) } => {N/A | > 0} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcxmlCopyCharP01()\r
+{\r
+       int ret_val;\r
+       xmlErrorPtr                             pError;\r
+       xmlResetLastError();\r
+\r
+       /**\r
+        * @remarks   input1: [N/A , N/A]       @n\r
+        *                                      {1,chartab[0],1} => {N/A |ret_val}      @n\r
+        */\r
+       ret_val = xmlCopyChar(1, &chartab[0], 1);\r
+       DTS_CHECK_GT_MESSAGE("xmlCopyChar", (void *)ret_val, (void *)0, "xmlCopyChar Failes");\r
+       \r
+       pError = xmlGetLastError();\r
+       DTS_CHECK_EQ_MESSAGE("xmlCopyChar", (void *)pError, (void *)NULL, "xmlGetLastError Failes");\r
+\r
+       /**\r
+        * @remarks   input2: [N/A , N/A]       @n\r
+        *                                      {1,chartab[0],1024} => {N/A |ret_val}   @n\r
+        */\r
+       ret_val = xmlCopyChar(1, &chartab[0], 1024);\r
+       DTS_CHECK_GT_MESSAGE("xmlCopyChar", (void *)ret_val, (void *)0, "xmlCopyChar Failes");\r
+       \r
+       pError = xmlGetLastError();\r
+       DTS_CHECK_EQ_MESSAGE("xmlCopyChar", (void *)pError, (void *)NULL, "xmlGetLastError Failes");\r
+\r
+       //if (pError != NULL)// Syam->Assertion occured\r
+       //      delete pError;\r
+}\r
+/**    \r
+       * @test                 UTcxmlCopyCharMultiByteP01\r
+       * @brief                XMLPUBFUN int XMLCALL xmlCopyCharMultiByte (xmlChar *out, int val)\r
+       * @desc                 Positive Test for xmlCopyCharMultiByte\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlChar, int(1) } => {N/A | > 0} @n\r
+       *                               input2: [N/A, N/A] @n\r
+       *                       {xmlChar*("test"), int(1214112) } => {N/A | > 0} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcxmlCopyCharMultiByteP01()\r
+{\r
+       int ret_val;\r
+       xmlErrorPtr                             pError;\r
+       xmlResetLastError();\r
+\r
+       /**\r
+        * @remarks   input1: [N/A , N/A]       @n\r
+        *                                      {out,val} => {N/A |ret_val}     @n\r
+        */\r
+       ret_val = xmlCopyCharMultiByte(&chartab[0], 1);\r
+       DTS_CHECK_GT_MESSAGE("xmlCopyCharMultiByte", (void *)ret_val, (void *)0, "xmlCopyCharMultiByte Failes");\r
+       \r
+       pError = xmlGetLastError();\r
+       DTS_CHECK_EQ_MESSAGE("xmlCopyCharMultiByte", (void *)pError, (void *)NULL, "xmlGetLastError Failes");\r
+       /**\r
+        * @remarks   input2: [N/A , N/A]       @n\r
+        *                                      {"test",1214112} => {N/A |0}    @n\r
+        */\r
+       ret_val = xmlCopyCharMultiByte((xmlChar *) "test", 1214112);\r
+       DTS_CHECK_EQ_MESSAGE("xmlCopyCharMultiByte", (void *)ret_val, (void *)0, "xmlCopyCharMultiByte Failes");\r
+       \r
+       pError = xmlGetLastError();\r
+       DTS_CHECK_NE_MESSAGE("xmlCopyCharMultiByte", (void *)pError, (void *)NULL, "xmlGetLastError Failes");\r
+       \r
+       xmlResetLastError();\r
+       //if (pError != NULL) // Syam->Assertion occured\r
+       //      delete pError;\r
+}\r
+       /**    \r
+       * @test                 UTcxmlNewIOInputStreamP01\r
+       * @brief                xmlParserInputPtr xmlNewIOInputStream(xmlParserCtxtPtr ctxt, xmlParserInputBufferPtr input, xmlCharEncoding enc)\r
+       * @desc                 Positive Test for xmlNewIOInputStream\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Create xmlParserInputPtr AND create xmlParserInputBufferPtr, Free all the memory used by a parser context] @n\r
+       *                       {xmlParserInputPtr, xmlParserInputBufferPtr, xmlCharEncoding} => {N/A | != NULL} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcxmlNewIOInputStreamP01()\r
+{\r
+       xmlParserInputPtr ret_val;\r
+       xmlParserCtxtPtr ctxt; /* an XML parser context */\r
+       int n_ctxt;\r
+       xmlParserInputBufferPtr input; /* an I/O Input */\r
+       int n_input;\r
+       xmlCharEncoding enc; /* the charset encoding if known */\r
+       int n_enc;\r
+       char xmlIn[] =\r
+               "<test:Plan xmlns:test='http://test.org/schema'>"\r
+               "<test:Case name='test1' emptyAttribute='' test:ns_id='auio'>"\r
+               "</test:Case>"\r
+               "</test:Plan>";\r
+       LIBXML_TEST_VERSION\r
+\r
+       for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {\r
+               for (n_input = 0;n_input < gen_nb_xmlParserInputBufferPtr;n_input++) {\r
+                       for (n_enc = 0;n_enc < gen_nb_xmlCharEncoding;n_enc++) {\r
+\r
+                               ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);\r
+                               //input = gen_xmlParserInputBufferPtr(n_input, 1);\r
+                               enc = gen_xmlCharEncoding(n_enc, 2);\r
+                               input = xmlParserInputBufferCreateMem(xmlIn , strlen (xmlIn), enc);\r
+                               /**\r
+                                * @remarks   input1: [1.xmlParserCtxtPtr(ctxt) is created, N/A]        @n\r
+                                *                                      {ctxt, input, enc} => {N/A |xmlParserInputPtr}  @n\r
+                                */\r
+                               ret_val = xmlNewIOInputStream(ctxt, input, enc);\r
+                               DTS_CHECK_NE_MESSAGE("xmlNewIOInputStream", (void *)ret_val, (void *)NULL, "xmlNewIOInputStream Failes");\r
+                               \r
+                               if (ret_val != NULL)\r
+                                       input = NULL;\r
+                               /**\r
+                                * @post delete xmlParserInputPtr\r
+                                */\r
+                               desret_xmlParserInputPtr(ret_val);\r
+\r
+                               des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);\r
+                               des_xmlParserInputBufferPtr(n_input, input, 1);\r
+                               xmlResetLastError();\r
+                               //xmlCleanupParser();\r
+\r
+                       }\r
+               }\r
+       }\r
+\r
+}\r
+/**    \r
+       * @test                 UTcxmlParserAddNodeInfoP01\r
+       * @brief                void xmlParserAddNodeInfo(xmlParserCtxtPtr ctxt, const xmlParserNodeInfoPtr info)\r
+       * @desc                 Positive Test for xmlParserAddNodeInfo\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Create xmlParserInputPtr, Free all the memory used by a parser context] @n\r
+       *                       {xmlParserInputPtr, xmlParserNodeInfoPtr("test")} => {N/A} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcxmlParserAddNodeInfoP01()\r
+{\r
+\r
+       xmlParserCtxtPtr ctxt; /* an XML parser context */\r
+       xmlErrorPtr                             pError;\r
+       xmlResetLastError();\r
+       ctxt = xmlNewParserCtxt();\r
+\r
+       /**\r
+        * @remarks   input1: [1.xmlParserCtxtPtr(ctxt) is created, N/A]        @n\r
+        *                                      {ctxt,"test"} => {N/A |N/A}     @n\r
+        */\r
+       xmlParserAddNodeInfo(ctxt, (xmlParserNodeInfoPtr)"test");\r
+       pError = xmlGetLastError();\r
+       DTS_CHECK_EQ_MESSAGE("xmlParserAddNodeInfo", (void *)pError, (void *)NULL, "xmlParserAddNodeInfo Failes");\r
+\r
+       /**\r
+        * @post delete xmlParserCtxtPtr\r
+        */\r
+       if (ctxt != NULL)\r
+       {\r
+               xmlFreeParserCtxt(ctxt);\r
+       }\r
+       //xmlCleanupParser();\r
+       //if (pError != NULL)// Syam->Assertion occured\r
+       //      delete pError;\r
+}\r
+/**    \r
+       * @test                 UTcxmlParserFindNodeInfoP01\r
+       * @brief                const xmlParserNodeInfo * xmlParserFindNodeInfo(const xmlParserCtxtPtr ctx, const xmlNodePtr node)\r
+       * @desc                 Positive Test for xmlParserFindNodeInfo\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Create xmlParserInputPtr, Free all the memory used by a parser context] @n\r
+       *                       {xmlParserInputPtr, NULL} => {N/A | NULL } @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcxmlParserFindNodeInfoP01(void)\r
+{\r
+       const xmlParserNodeInfo * ret_val=NULL;\r
+       xmlParserCtxtPtr ctx; /* an XML parser context */\r
+       int n_ctx;\r
+\r
+       for (n_ctx = 0;n_ctx < gen_nb_xmlParserCtxtPtr;n_ctx++) {\r
+               ctx = gen_xmlParserCtxtPtr(n_ctx, 0);\r
+               /**\r
+                * @remarks   input1: [1.xmlParserCtxtPtr(ctxt) is created, N/A]        @n\r
+                *                                      {ctxt,node} => {N/A |N/A}       @n\r
+                */\r
+               ret_val = xmlParserFindNodeInfo((const xmlParserCtxtPtr)ctx, NULL);\r
+               DTS_CHECK_EQ_MESSAGE("xmlParserFindNodeInfo", (void *)ret_val, (void *)NULL, "xmlParserFindNodeInfo Failes");\r
+\r
+\r
+               //xmlClearParserCtxt(ctx);\r
+               if (ctx != NULL)\r
+                       xmlFreeParserCtxt(ctx);\r
+       }\r
+       /**\r
+        * @post Cleanup function for the XML library.\r
+        */\r
+\r
+       //xmlCleanupParser();\r
+}\r
+/**    \r
+       * @test                 UTcxmlParserFindNodeInfoIndexP01\r
+       * @brief                unsigned long xmlParserFindNodeInfoIndex(const xmlParserNodeInfoSeqPtr seq, const xmlNodePtr node)\r
+       * @desc                 Positive Test for xmlParserFindNodeInfoIndex\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Create pxmlParserNodeInfoSeqPtr, N/A] @n\r
+       *                       {pxmlParserNodeInfoSeqPtr, xmlNodePtr(NULL)} => {N/A | int(0)} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcxmlParserFindNodeInfoIndexP01()\r
+{\r
+       unsigned long ret_val;\r
+       xmlErrorPtr                             pError;\r
+       xmlResetLastError();\r
+       xmlParserNodeInfoSeq *pxmlParserNodeInfoSeqPtr = (xmlParserNodeInfoSeq *) malloc(sizeof(xmlParserNodeInfoSeq) );        \r
+       //MT_CHECK_MESSAGE2(pxmlParserNodeInfoSeqPtr != NULL, "checking pxmlParserNodeInfoSeqPtr allocation \n");\r
+       DTS_CHECK_NE_MESSAGE("xmlParserFindNodeInfoIndex", (void *)pxmlParserNodeInfoSeqPtr, (void *)NULL, "malloc Failes");\r
+       \r
+       pxmlParserNodeInfoSeqPtr->length = 10;\r
+       pxmlParserNodeInfoSeqPtr->maximum = 10;\r
+       pxmlParserNodeInfoSeqPtr->buffer = (xmlParserNodeInfo*)"<item>test</item>";\r
+       /**\r
+        * @remarks   input1: [N/A, N/A]        @n\r
+        *                                      {seq,node} => {N/A |0}  @n\r
+        */\r
+       ret_val = xmlParserFindNodeInfoIndex(pxmlParserNodeInfoSeqPtr,(const xmlNodePtr)NULL);\r
+       DTS_CHECK_NE_MESSAGE("xmlParserFindNodeInfoIndex", (void *)ret_val, (void *)NULL, "xmlParserFindNodeInfoIndex Failes");\r
+       \r
+       pError = xmlGetLastError();\r
+       DTS_CHECK_EQ_MESSAGE("xmlParserFindNodeInfoIndex", (void *)pError, (void *)NULL, "xmlParserFindNodeInfo Failes");\r
+       \r
+       if(pxmlParserNodeInfoSeqPtr != NULL) {\r
+               free(pxmlParserNodeInfoSeqPtr);\r
+               pxmlParserNodeInfoSeqPtr = NULL;\r
+       }\r
+       /**\r
+        * @post Cleanup function for the XML library.\r
+        */\r
+       //if (pError != NULL)// Syam->Assertion occured\r
+       //      delete pError;\r
+       //xmlCleanupParser();\r
+}\r
+/**    \r
+       * @test                 UTcxmlKeepBlanksDefaultP01\r
+       * @brief                int xmlKeepBlanksDefault(int val)\r
+       * @desc                 Positive Test for xmlKeepBlanksDefault\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {int(0)} => {N/A | int(0)} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcxmlKeepBlanksDefaultP01(void)\r
+{\r
+       int ret_val;\r
+       int val; /* int 0 or 1 */\r
+       int n_val;\r
+       for (n_val = 0;n_val < gen_nb_int;n_val++) {\r
+\r
+               val = gen_int(n_val, 0);\r
+\r
+               ret_val = xmlKeepBlanksDefault(val);\r
+               /**\r
+                * @remarks   input1: [N/A, N/A]        @n\r
+                *                                      {val} => {N/A |val}     @n\r
+                */\r
+               ret_val = xmlKeepBlanksDefault(val);\r
+               DTS_CHECK_EQ_MESSAGE("xmlKeepBlanksDefault", (void *)ret_val, (void *)val, "xmlKeepBlanksDefault Failes");\r
+               xmlResetLastError();\r
+       }\r
+}\r
+/**    \r
+       * @test                 UTcxmlLineNumbersDefaultP01\r
+       * @brief                int xmlLineNumbersDefault(int val)\r
+       * @desc                 Positive Test for xmlLineNumbersDefault\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {int(0)} => {N/A | int(0)} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcxmlLineNumbersDefaultP01(void)\r
+{\r
+       int ret_val;\r
+       int val;\r
+       int n_val;\r
+\r
+       for (n_val = 0;n_val < gen_nb_int;n_val++) {\r
+\r
+               val = gen_int(n_val, 0);\r
+\r
+               ret_val = xmlLineNumbersDefault(val);\r
+               /**\r
+                * @remarks   input1: [N/A, N/A]        @n\r
+                *                                      {val} => {N/A |val}     @n\r
+                */\r
+               ret_val = xmlLineNumbersDefault(val);\r
+               DTS_CHECK_EQ_MESSAGE("xmlLineNumbersDefault", (void *)ret_val, (void *)val, "xmlLineNumbersDefault Failes");\r
+       }\r
+}\r
+/**    \r
+       * @test                 UTcxmlPedanticParserDefaultP01\r
+       * @brief                int xmlPedanticParserDefault(int val)\r
+       * @desc                 Positive Test for xmlPedanticParserDefault\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {int(0)} => {N/A | int(0)} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcxmlPedanticParserDefaultP01(void)\r
+{\r
+\r
+       int ret_val;\r
+       int val;\r
+       int n_val;\r
+\r
+       for (n_val = 0;n_val < gen_nb_int;n_val++) {\r
+               val = gen_int(n_val, 0);\r
+\r
+               ret_val = xmlPedanticParserDefault(val);\r
+               /**\r
+                * @remarks   input1: [N/A, N/A]        @n\r
+                *                                      {val} => {N/A |val}     @n\r
+                */\r
+               ret_val = xmlPedanticParserDefault(val);\r
+               DTS_CHECK_EQ_MESSAGE("xmlPedanticParserDefault", (void *)ret_val, (void *)val, "xmlPedanticParserDefault Failes");\r
+       }\r
+}\r
+/**    \r
+       * @test                 UTcxmlSubstituteEntitiesDefaultP01\r
+       * @brief                int xmlSubstituteEntitiesDefault(int val)\r
+       * @desc                 Positive Test for xmlSubstituteEntitiesDefault\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {int(0)} => {N/A | int(0)} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcxmlSubstituteEntitiesDefaultP01(void)\r
+{\r
+       int ret_val;\r
+       int val;\r
+       int n_val;\r
+\r
+       for (n_val = 0;n_val < gen_nb_int;n_val++) {\r
+\r
+               val = gen_int(n_val, 0);\r
+\r
+               ret_val = xmlSubstituteEntitiesDefault(val);\r
+               /**\r
+                * @remarks   input1: [N/A, N/A]        @n\r
+                *                                      {val} => {N/A |val}     @n\r
+                */\r
+               ret_val = xmlSubstituteEntitiesDefault(val);\r
+               DTS_CHECK_EQ_MESSAGE("xmlSubstituteEntitiesDefault", (void *)ret_val, (void *)val, "xmlSubstituteEntitiesDefault Failes");\r
+       }\r
+}\r
+/**    \r
+       * @test                 UTcxmlSwitchEncodingP01\r
+       * @brief                XMLPUBFUN int XMLCALL xmlSwitchEncoding (xmlParserCtxtPtr ctxt, xmlCharEncoding enc)\r
+       * @desc                 Positive Test for xmlSwitchEncoding\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Create xmlParserInputPtr, Free all the memory used by a parser context] @n\r
+       *                       {xmlParserInputPtr, xmlCharEncoding} => {N/A | int(0) } @n\r
+       *                               input2: [Create xmlParserInputPtr, Free all the memory used by a parser context] @n\r
+       *                       {xmlParserInputPtr, xmlCharEncoding(-1)} => {N/A | int(-1) } @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcxmlSwitchEncodingP01()\r
+{\r
+       int ret_val;\r
+       xmlParserCtxtPtr ctxt; /* the parser context */\r
+       int n_ctxt;\r
+       xmlCharEncoding enc; /* the encoding value (number) */\r
+       int n_enc;\r
+       xmlResetLastError();\r
+\r
+       for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {\r
+               for (n_enc = 0;n_enc < 2;n_enc++) {\r
+\r
+                       ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);\r
+                       enc = gen_xmlCharEncoding(n_enc, 1);\r
+                       /**\r
+                        * @remarks   input1: [1.xmlParserCtxtPtr(ctxt) is created, N/A]        @n\r
+                        *                                      {ctxt, enc} => {N/A |0} @n\r
+                        */\r
+                       ret_val = xmlSwitchEncoding(ctxt, enc);\r
+                       DTS_CHECK_EQ_MESSAGE("xmlSwitchEncoding", (void *)ret_val, (void *)0, "xmlSwitchEncoding Failes");\r
+                       /**\r
+                        * @post delete xmlParserCtxtPtr\r
+                        */\r
+                       xmlResetLastError();\r
+                       des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);\r
+                       //xmlCleanupParser();\r
+               }\r
+       }\r
+       /**\r
+        * @remarks   input2: [1.xmlParserCtxtPtr(ctxt) is created, N/A]        @n\r
+        *                                      {ctxt, XML_CHAR_ENCODING_ERROR} => {N/A |0}     @n\r
+        */\r
+       ctxt = xmlNewParserCtxt();\r
+       ret_val = xmlSwitchEncoding(ctxt, XML_CHAR_ENCODING_ERROR);\r
+       DTS_CHECK_EQ_MESSAGE("xmlSwitchEncoding", (void *)ret_val, (void *)-1, "xmlSwitchEncoding Failes");\r
+       xmlResetLastError();\r
+       /**\r
+        * @post Cleanup function for the XML library.\r
+        */\r
+       if (ctxt != NULL)\r
+               xmlFreeParserCtxt(ctxt);\r
+       //xmlCleanupParser();\r
+}\r
+/**    \r
+       * @test                 UTcxmlSwitchInputEncodingP01\r
+       * @brief                XMLPUBFUN int XMLCALL xmlSwitchInputEncoding (xmlParserCtxtPtr ctxt, xmlParserInputPtr input, xmlCharEncodingHandlerPtr handler)\r
+       * @desc                 Positive Test for xmlSwitchInputEncoding \r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Create xmlParserInputPtr, Free all the memory used by a parser context] @n\r
+       *                       {xmlParserInputPtr, xmlParserInputPtr("test"), NULL} => {N/A | int(-1) } @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcxmlSwitchInputEncodingP01()\r
+{\r
+       int ret_val;\r
+       xmlParserCtxtPtr ctxt; /* the parser context */\r
+       int n_ctxt;\r
+\r
+       for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {\r
+\r
+               ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);\r
+\r
+               /**\r
+                * @remarks   input1: [1.xmlParserCtxtPtr(ctxt) is created, N/A]        @n\r
+                *                                      {ctxt, input, handler} => {N/A |-1}     @n\r
+                */\r
+               ret_val = xmlSwitchInputEncoding(ctxt, (xmlParserInputPtr) "test", NULL);\r
+               DTS_CHECK_EQ_MESSAGE("xmlSwitchInputEncoding", (void *)ret_val, (void *)-1, "xmlSwitchInputEncoding Failes");\r
+               xmlResetLastError();\r
+               /**\r
+                * @post delete xmlParserCtxtPtr\r
+                */\r
+               des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);\r
+               //xmlCleanupParser();\r
+       }\r
+}\r
+/**    \r
+       * @test                 UTcxmlSwitchToEncodingP01\r
+       * @brief                XMLPUBFUN int XMLCALL xmlSwitchToEncoding (xmlParserCtxtPtr ctxt, xmlCharEncodingHandlerPtr handler)\r
+       * @desc                 Positive Test for xmlSwitchToEncoding \r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Create xmlParserInputPtr, Free all the memory used by a parser context] @n\r
+       *                       {xmlParserInputPtr, NULL} => {N/A | int(-1) } @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcxmlSwitchToEncodingP01()\r
+{\r
+       int ret_val;\r
+       xmlParserCtxtPtr ctxt; /* the parser context */\r
+       int n_ctxt;\r
+\r
+       for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {\r
+\r
+               ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);\r
+               /**\r
+                * @remarks   input1: [1.xmlParserCtxtPtr(ctxt) is created, N/A]        @n\r
+                *                                      {ctxt, handler} => {N/A |-1}    @n\r
+                */\r
+               ret_val = xmlSwitchToEncoding(ctxt, NULL);\r
+               DTS_CHECK_EQ_MESSAGE("xmlSwitchToEncoding", (void *)ret_val, (void *)-1, "xmlSwitchToEncoding Failes");\r
+               xmlResetLastError();\r
+               /**\r
+                * @post delete xmlParserCtxtPtr\r
+                */\r
+\r
+               des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);\r
+               xmlResetLastError();\r
+               //xmlCleanupParser();\r
+       }\r
+}\r
+static void startup( void);\r
+static void cleanup( void);\r
+\r
+void (*tet_startup)( void) = startup;\r
+void (*tet_cleanup)( void) = cleanup;\r
+\r
+static void startup( void)\r
+{\r
+        /* start of TC */\r
+        tet_printf("TC starts.");\r
+}\r
+\r
+static void cleanup( void)\r
+{\r
+        /* end of TC */\r
+        tet_printf("TC ends.");\r
+}\r
+\r
+struct tet_testlist tet_testlist[] = {\r
+       // Handling of out of context errors\r
+       {UTcxmlIsLetterP01,1},\r
+       {UTcxmlNewEntityInputStreamP01,2},\r
+       {UTcxmlNewInputFromFileP01,3},\r
+       {UTcxmlNewInputStreamP01,4},\r
+       {UTcxmlNewStringInputStreamP01,5},\r
+       {UTcxmlNextCharP01,6},\r
+       {UTcxmlParserInputShrinkP01,7},\r
+       {UTcxmlStringCurrentCharP01,8},\r
+       {UTcxmlSwitchEncodingP01,9},\r
+       {UTcxmlSwitchInputEncodingP01,10},\r
+       \r
+       {UTcxmlSwitchToEncodingP01,11},\r
+       {UTcxmlCopyCharP01,12},\r
+       {UTcxmlCopyCharMultiByteP01,13},\r
+       {UTcxmlParserAddNodeInfoP01,14},\r
+       {UTcxmlParserFindNodeInfoIndexP01,15},\r
+       {UTcxmlNewIOInputStreamP01,16},\r
+       {UTcxmlLineNumbersDefaultP01,17},\r
+       {UTcxmlKeepBlanksDefaultP01,18},\r
+       {UTcxmlPedanticParserDefaultP01,19},\r
+       {UTcxmlParserFindNodeInfoP01,20},\r
+       \r
+       {UTcxmlSubstituteEntitiesDefaultP01,21},\r
+       { NULL, 0 },\r
+       \r
+};\r
diff --git a/TC/testcase/utc_libxml_Sax.c b/TC/testcase/utc_libxml_Sax.c
new file mode 100755 (executable)
index 0000000..447a6d5
--- /dev/null
@@ -0,0 +1,3694 @@
+/*\r
+*  libxml test suite\r
+*\r
+* Copyright (c) 2012 Samsung Electronics Co., Ltd. All rights reserved.\r
+*\r
+* Contact: {Maintainer Name} <{Maintainer Email}>\r
+* \r
+* Licensed under the Apache License, Version 2.0 (the "License");\r
+* you may not use this file except in compliance with the License.\r
+* You may obtain a copy of the License at\r
+*\r
+* http://www.apache.org/licenses/LICENSE-2.0\r
+*\r
+* Unless required by applicable law or agreed to in writing, software\r
+* distributed under the License is distributed on an "AS IS" BASIS,\r
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+* See the License for the specific language governing permissions and\r
+* limitations under the License.\r
+*\r
+*/ \r
+\r
+#include "utc_libxml_include.h"\r
+#include <sys/types.h>\r
+#include <sys/stat.h>\r
+#include <time.h>\r
+#include <stdio.h>\r
+#include <stdlib.h>\r
+\r
+#ifdef DEBUG_MEM_LEAK\r
+extern "C"\r
+{\r
+       extern void MemStartSaveCallStack(void);\r
+       extern void MemEndSaveCallStack(void);\r
+       extern void MemPrintCurrentIndex(void);\r
+       extern void MemTraceAllocMemInfo(void);\r
+}\r
+#endif\r
+#ifdef OSP_MEM_ALLOC_INFO\r
+#include "matrix.h"\r
+#endif\r
+\r
+static int quiet = 0;\r
+static int sax2 = 0;\r
+static int repeat = 0;\r
+static int callbacks = 0;\r
+\r
+\r
+/***************************************************************************\r
+ * SUTsSax\r
+ ***************************************************************************/\r
+xmlSAXHandlerV1 emptySAXHandlerV1Struct = {\r
+       NULL, /* internalSubset */\r
+       NULL, /* isStandalone */\r
+       NULL, /* hasInternalSubset */\r
+       NULL, /* hasExternalSubset */\r
+       NULL, /* resolveEntity */\r
+       NULL, /* getEntity */\r
+       NULL, /* entityDecl */\r
+       NULL, /* notationDecl */\r
+       NULL, /* attributeDecl */\r
+       NULL, /* elementDecl */\r
+       NULL, /* unparsedEntityDecl */\r
+       NULL, /* setDocumentLocator */\r
+       NULL, /* startDocument */\r
+       NULL, /* endDocument */\r
+       NULL, /* startElement */\r
+       NULL, /* endElement */\r
+       NULL, /* reference */\r
+       NULL, /* characters */\r
+       NULL, /* ignorableWhitespace */\r
+       NULL, /* processingInstruction */\r
+       NULL, /* comment */\r
+       NULL, /* xmlParserWarning */\r
+       NULL, /* xmlParserError */\r
+       NULL, /* xmlParserError */\r
+       NULL, /* getParameterEntity */\r
+       NULL, /* cdataBlock; */\r
+       NULL, /* externalSubset; */\r
+       1\r
+};\r
+xmlSAXHandlerV1Ptr emptySAXHandlerV1 = &emptySAXHandlerV1Struct;\r
+xmlSAXHandler emptySAXHandlerStruct = {\r
+       NULL, /* internalSubset */\r
+       NULL, /* isStandalone */\r
+       NULL, /* hasInternalSubset */\r
+       NULL, /* hasExternalSubset */\r
+       NULL, /* resolveEntity */\r
+       NULL, /* getEntity */\r
+       NULL, /* entityDecl */\r
+       NULL, /* notationDecl */\r
+       NULL, /* attributeDecl */\r
+       NULL, /* elementDecl */\r
+       NULL, /* unparsedEntityDecl */\r
+       NULL, /* setDocumentLocator */\r
+       NULL, /* startDocument */\r
+       NULL, /* endDocument */\r
+       NULL, /* startElement */\r
+       NULL, /* endElement */\r
+       NULL, /* reference */\r
+       NULL, /* characters */\r
+       NULL, /* ignorableWhitespace */\r
+       NULL, /* processingInstruction */\r
+       NULL, /* comment */\r
+       NULL, /* xmlParserWarning */\r
+       NULL, /* xmlParserError */\r
+       NULL, /* xmlParserError */\r
+       NULL, /* getParameterEntity */\r
+       NULL, /* cdataBlock; */\r
+       NULL, /* externalSubset; */\r
+       1,\r
+       NULL,\r
+       NULL, /* startElementNs */\r
+       NULL, /* endElementNs */\r
+       NULL  /* xmlStructuredErrorFunc */\r
+};\r
+xmlSAXHandlerPtr emptySAXHandler = &emptySAXHandlerStruct;\r
+\r
+/************************************************************************\r
+ *                                                                     *\r
+ *                             Debug Handlers                          *\r
+ *                                                                     *\r
+ ************************************************************************/\r
+/**\r
+ * isStandaloneDebug:\r
+ * @ctxt:  An XML parser context\r
+ *\r
+ * Is this document tagged standalone ?\r
+ *\r
+ * Returns 1 if true\r
+ */\r
+static int\r
+isStandaloneDebug(void *ctx ATTRIBUTE_UNUSED)\r
+{\r
+       callbacks++;\r
+       if (quiet)\r
+               return(0);\r
+       #ifdef DISABLE_STDOUT\r
+       fprintf(stdout, "SAX.isStandalone()\n");\r
+       #endif\r
+       return(0);\r
+}\r
+/**\r
+ * hasInternalSubsetDebug:\r
+ * @ctxt:  An XML parser context\r
+ *\r
+ * Does this document has an internal subset\r
+ *\r
+ * Returns 1 if true\r
+ */\r
+static int\r
+hasInternalSubsetDebug(void *ctx ATTRIBUTE_UNUSED)\r
+{\r
+       callbacks++;\r
+       if (quiet)\r
+               return(0);\r
+       #ifdef DISABLE_STDOUT\r
+       fprintf(stdout, "SAX.hasInternalSubset()\n");\r
+       #endif\r
+       return(0);\r
+}\r
+/**\r
+ * hasExternalSubsetDebug:\r
+ * @ctxt:  An XML parser context\r
+ *\r
+ * Does this document has an external subset\r
+ *\r
+ * Returns 1 if true\r
+ */\r
+static int\r
+hasExternalSubsetDebug(void *ctx ATTRIBUTE_UNUSED)\r
+{\r
+       callbacks++;\r
+       if (quiet)\r
+               return(0);\r
+       #ifdef DISABLE_STDOUT\r
+       fprintf(stdout, "SAX.hasExternalSubset()\n");\r
+       #endif\r
+       return(0);\r
+}\r
+/**\r
+ * internalSubsetDebug:\r
+ * @ctxt:  An XML parser context\r
+ *\r
+ * Does this document has an internal subset\r
+ */\r
+static void\r
+internalSubsetDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name,\r
+                    const xmlChar *ExternalID, const xmlChar *SystemID)\r
+{\r
+       callbacks++;\r
+       if (quiet)\r
+               return;\r
+       #ifdef DISABLE_STDOUT\r
+       fprintf(stdout, "SAX.internalSubset(%s,", name);\r
+       if (ExternalID == NULL)\r
+               fprintf(stdout, " ,");\r
+       else\r
+               fprintf(stdout, " %s,", ExternalID);\r
+       if (SystemID == NULL)\r
+               fprintf(stdout, " )\n");\r
+       else\r
+               fprintf(stdout, " %s)\n", SystemID);\r
+       #endif\r
+}\r
+/**\r
+ * externalSubsetDebug:\r
+ * @ctxt:  An XML parser context\r
+ *\r
+ * Does this document has an external subset\r
+ */\r
+static void\r
+externalSubsetDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name,\r
+                    const xmlChar *ExternalID, const xmlChar *SystemID)\r
+{\r
+       callbacks++;\r
+       if (quiet)\r
+               return;\r
+       #ifdef DISABLE_STDOUT   \r
+       fprintf(stdout, "SAX.externalSubset(%s,", name);\r
+       if (ExternalID == NULL)\r
+               fprintf(stdout, " ,");\r
+       else\r
+               fprintf(stdout, " %s,", ExternalID);\r
+       if (SystemID == NULL)\r
+               fprintf(stdout, " )\n");\r
+       else\r
+               fprintf(stdout, " %s)\n", SystemID);\r
+       #endif\r
+}\r
+/**\r
+ * resolveEntityDebug:\r
+ * @ctxt:  An XML parser context\r
+ * @publicId: The public ID of the entity\r
+ * @systemId: The system ID of the entity\r
+ *\r
+ * Special entity resolver, better left to the parser, it has\r
+ * more context than the application layer.\r
+ * The default behaviour is to NOT resolve the entities, in that case\r
+ * the ENTITY_REF nodes are built in the structure (and the parameter\r
+ * values).\r
+ *\r
+ * Returns the xmlParserInputPtr if inlined or NULL for DOM behaviour.\r
+ */\r
+static xmlParserInputPtr\r
+resolveEntityDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *publicId, const xmlChar *systemId)\r
+{\r
+       callbacks++;\r
+       if (quiet)\r
+               return(NULL);\r
+       /* xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; */\r
+\r
+       #ifdef DISABLE_STDOUT\r
+       fprintf(stdout, "SAX.resolveEntity(");\r
+       if (publicId != NULL)\r
+               fprintf(stdout, "%s", (char *)publicId);\r
+       else\r
+               fprintf(stdout, " ");\r
+       if (systemId != NULL)\r
+               fprintf(stdout, ", %s)\n", (char *)systemId);\r
+       else\r
+               fprintf(stdout, ", )\n");\r
+       #endif\r
+       /*********\r
+           if (systemId != NULL) {\r
+               return(xmlNewInputFromFile(ctxt, (char *) systemId));\r
+           }\r
+        *********/\r
+       return(NULL);\r
+}\r
+/**\r
+ * getEntityDebug:\r
+ * @ctxt:  An XML parser context\r
+ * @name: The entity name\r
+ *\r
+ * Get an entity by name\r
+ *\r
+ * Returns the xmlParserInputPtr if inlined or NULL for DOM behaviour.\r
+ */\r
+static xmlEntityPtr\r
+getEntityDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name)\r
+{\r
+       callbacks++;\r
+       if (quiet)\r
+               return(NULL);\r
+       #ifdef DISABLE_STDOUT\r
+       fprintf(stdout, "SAX.getEntity(%s)\n", name);\r
+       #endif\r
+       return(NULL);\r
+}\r
+\r
+/**\r
+ * getParameterEntityDebug:\r
+ * @ctxt:  An XML parser context\r
+ * @name: The entity name\r
+ *\r
+ * Get a parameter entity by name\r
+ *\r
+ * Returns the xmlParserInputPtr\r
+ */\r
+static xmlEntityPtr\r
+getParameterEntityDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name)\r
+{\r
+       callbacks++;\r
+       if (quiet)\r
+               return(NULL);\r
+       #ifdef DISABLE_STDOUT\r
+       fprintf(stdout, "SAX.getParameterEntity(%s)\n", name);\r
+       #endif\r
+       return(NULL);\r
+}\r
+/**\r
+ * entityDeclDebug:\r
+ * @ctxt:  An XML parser context\r
+ * @name:  the entity name\r
+ * @type:  the entity type\r
+ * @publicId: The public ID of the entity\r
+ * @systemId: The system ID of the entity\r
+ * @content: the entity value (without processing).\r
+ *\r
+ * An entity definition has been parsed\r
+ */\r
+static void\r
+entityDeclDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name, int type,\r
+                const xmlChar *publicId, const xmlChar *systemId, xmlChar *content)\r
+{\r
+       const xmlChar *NULLstr = BAD_CAST "(NULL)";\r
+       /* not all libraries handle printing NULL pointers nicely */\r
+       if (publicId == NULL)\r
+               publicId = NULLstr;\r
+       if (systemId == NULL)\r
+               systemId = NULLstr;\r
+       if (content == NULL)\r
+               content = (xmlChar *)NULLstr;\r
+       callbacks++;\r
+       if (quiet)\r
+               return;\r
+       #ifdef DISABLE_STDOUT\r
+       fprintf(stdout, "SAX.entityDecl(%s, %d, %s, %s, %s)\n",\r
+               name, type, publicId, systemId, content);\r
+       #endif\r
+}\r
+/**\r
+ * attributeDeclDebug:\r
+ * @ctxt:  An XML parser context\r
+ * @name:  the attribute name\r
+ * @type:  the attribute type\r
+ *\r
+ * An attribute definition has been parsed\r
+ */\r
+static void\r
+attributeDeclDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar * elem,\r
+                   const xmlChar * name, int type, int def,\r
+                   const xmlChar * defaultValue, xmlEnumerationPtr tree)\r
+{\r
+       callbacks++;\r
+       if (quiet)\r
+               return;\r
+       #ifdef DISABLE_STDOUT\r
+       if (defaultValue == NULL)\r
+               fprintf(stdout, "SAX.attributeDecl(%s, %s, %d, %d, NULL, ...)\n",\r
+                       elem, name, type, def);\r
+       else\r
+               fprintf(stdout, "SAX.attributeDecl(%s, %s, %d, %d, %s, ...)\n",\r
+                       elem, name, type, def, defaultValue);\r
+       #endif\r
+       xmlFreeEnumeration(tree);\r
+}\r
+/**\r
+ * elementDeclDebug:\r
+ * @ctxt:  An XML parser context\r
+ * @name:  the element name\r
+ * @type:  the element type\r
+ * @content: the element value (without processing).\r
+ *\r
+ * An element definition has been parsed\r
+ */\r
+static void\r
+elementDeclDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name, int type,\r
+                 xmlElementContentPtr content ATTRIBUTE_UNUSED)\r
+{\r
+       callbacks++;\r
+       if (quiet)\r
+               return;\r
+       #ifdef DISABLE_STDOUT\r
+       fprintf(stdout, "SAX.elementDecl(%s, %d, ...)\n",\r
+               name, type);\r
+       #endif\r
+}\r
+/**\r
+ * notationDeclDebug:\r
+ * @ctxt:  An XML parser context\r
+ * @name: The name of the notation\r
+ * @publicId: The public ID of the entity\r
+ * @systemId: The system ID of the entity\r
+ *\r
+ * What to do when a notation declaration has been parsed.\r
+ */\r
+static void\r
+notationDeclDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name,\r
+                  const xmlChar *publicId, const xmlChar *systemId)\r
+{\r
+       callbacks++;\r
+       if (quiet)\r
+               return;\r
+       #ifdef DISABLE_STDOUT\r
+       fprintf(stdout, "SAX.notationDecl(%s, %s, %s)\n",\r
+               (char *) name, (char *) publicId, (char *) systemId);\r
+       #endif\r
+}\r
+/**\r
+ * unparsedEntityDeclDebug:\r
+ * @ctxt:  An XML parser context\r
+ * @name: The name of the entity\r
+ * @publicId: The public ID of the entity\r
+ * @systemId: The system ID of the entity\r
+ * @notationName: the name of the notation\r
+ *\r
+ * What to do when an unparsed entity declaration is parsed\r
+ */\r
+static void\r
+unparsedEntityDeclDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name,\r
+                        const xmlChar *publicId, const xmlChar *systemId,\r
+                        const xmlChar *notationName)\r
+{\r
+       const xmlChar *NULLstr = BAD_CAST "(NULL)";\r
+\r
+       if (publicId == NULL)\r
+               publicId = NULLstr;\r
+       if (systemId == NULL)\r
+               systemId = NULLstr;\r
+       if (notationName == NULL)\r
+               notationName = NULLstr;\r
+       callbacks++;\r
+       if (quiet)\r
+               return;\r
+       #ifdef DISABLE_STDOUT\r
+       fprintf(stdout, "SAX.unparsedEntityDecl(%s, %s, %s, %s)\n",\r
+               (char *) name, (char *) publicId, (char *) systemId,\r
+               (char *) notationName);\r
+       #endif\r
+}\r
+\r
+/**\r
+ * setDocumentLocatorDebug:\r
+ * @ctxt:  An XML parser context\r
+ * @loc: A SAX Locator\r
+ *\r
+ * Receive the document locator at startup, actually xmlDefaultSAXLocator\r
+ * Everything is available on the context, so this is useless in our case.\r
+ */\r
+static void\r
+setDocumentLocatorDebug(void *ctx ATTRIBUTE_UNUSED, xmlSAXLocatorPtr loc ATTRIBUTE_UNUSED)\r
+{\r
+       callbacks++;\r
+       if (quiet)\r
+               return;\r
+       #ifdef DISABLE_STDOUT\r
+       fprintf(stdout, "SAX.setDocumentLocator()\n");\r
+       #endif\r
+}\r
+/**\r
+ * startDocumentDebug:\r
+ * @ctxt:  An XML parser context\r
+ *\r
+ * called when the document start being processed.\r
+ */\r
+static void\r
+startDocumentDebug(void *ctx ATTRIBUTE_UNUSED)\r
+{\r
+       callbacks++;\r
+       if (quiet)\r
+               return;\r
+       #ifdef DISABLE_STDOUT\r
+       fprintf(stdout, "SAX.startDocument()\n");\r
+       #endif\r
+}\r
+\r
+/**\r
+ * endDocumentDebug:\r
+ * @ctxt:  An XML parser context\r
+ *\r
+ * called when the document end has been detected.\r
+ */\r
+static void\r
+endDocumentDebug(void *ctx ATTRIBUTE_UNUSED)\r
+{\r
+       callbacks++;\r
+       if (quiet)\r
+               return;\r
+       #ifdef DISABLE_STDOUT\r
+       fprintf(stdout, "SAX.endDocument()\n");\r
+       #endif\r
+}\r
+\r
+/**\r
+ * startElementDebug:\r
+ * @ctxt:  An XML parser context\r
+ * @name:  The element name\r
+ *\r
+ * called when an opening tag has been processed.\r
+ */\r
+static void\r
+startElementDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name, const xmlChar **atts)\r
+{\r
+       int i;\r
+\r
+       callbacks++;\r
+       if (quiet)\r
+               return;\r
+       #ifdef DISABLE_STDOUT\r
+       fprintf(stdout, "SAX.startElement(%s", (char *) name);\r
+       if (atts != NULL) {\r
+               for (i = 0;(atts[i] != NULL);i++) {\r
+                       fprintf(stdout, ", %s='", atts[i++]);\r
+                       if (atts[i] != NULL)\r
+                               fprintf(stdout, "%s'", atts[i]);\r
+               }\r
+       }\r
+       fprintf(stdout, ")\n");\r
+       #endif\r
+}\r
+\r
+/**\r
+ * endElementDebug:\r
+ * @ctxt:  An XML parser context\r
+ * @name:  The element name\r
+ *\r
+ * called when the end of an element has been detected.\r
+ */\r
+static void\r
+endElementDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name)\r
+{\r
+       callbacks++;\r
+       if (quiet)\r
+               return;\r
+       #ifdef DISABLE_STDOUT\r
+       fprintf(stdout, "SAX.endElement(%s)\n", (char *) name);\r
+       #endif\r
+}\r
+/**\r
+ * charactersDebug:\r
+ * @ctxt:  An XML parser context\r
+ * @ch:  a xmlChar string\r
+ * @len: the number of xmlChar\r
+ *\r
+ * receiving some chars from the parser.\r
+ * Question: how much at a time ???\r
+ */\r
+static void\r
+charactersDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *ch, int len)\r
+{\r
+       char output[40];\r
+       int i;\r
+\r
+       callbacks++;\r
+       if (quiet)\r
+               return;\r
+       for (i = 0;(i<len) && (i < 30);i++)\r
+               output[i] = ch[i];\r
+       output[i] = 0;\r
+       #ifdef DISABLE_STDOUT\r
+       fprintf(stdout, "SAX.characters(%s, %d)\n", output, len);\r
+       #endif\r
+}\r
+\r
+/**\r
+ * referenceDebug:\r
+ * @ctxt:  An XML parser context\r
+ * @name:  The entity name\r
+ *\r
+ * called when an entity reference is detected.\r
+ */\r
+static void\r
+referenceDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *name)\r
+{\r
+       callbacks++;\r
+       if (quiet)\r
+               return;\r
+       #ifdef DISABLE_STDOUT\r
+       fprintf(stdout, "SAX.reference(%s)\n", name);\r
+       #endif\r
+}\r
+\r
+/**\r
+ * ignorableWhitespaceDebug:\r
+ * @ctxt:  An XML parser context\r
+ * @ch:  a xmlChar string\r
+ * @start: the first char in the string\r
+ * @len: the number of xmlChar\r
+ *\r
+ * receiving some ignorable whitespaces from the parser.\r
+ * Question: how much at a time ???\r
+ */\r
+static void\r
+ignorableWhitespaceDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *ch, int len)\r
+{\r
+       char output[40];\r
+       int i;\r
+\r
+       callbacks++;\r
+       if (quiet)\r
+               return;\r
+       for (i = 0;(i<len) && (i < 30);i++)\r
+               output[i] = ch[i];\r
+       output[i] = 0;\r
+       #ifdef DISABLE_STDOUT\r
+       fprintf(stdout, "SAX.ignorableWhitespace(%s, %d)\n", output, len);\r
+       #endif\r
+}\r
+\r
+/**\r
+ * processingInstructionDebug:\r
+ * @ctxt:  An XML parser context\r
+ * @target:  the target name\r
+ * @data: the PI data's\r
+ * @len: the number of xmlChar\r
+ *\r
+ * A processing instruction has been parsed.\r
+ */\r
+static void\r
+processingInstructionDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *target,\r
+                           const xmlChar *data)\r
+{\r
+       callbacks++;\r
+       if (quiet)\r
+               return;\r
+       #ifdef DISABLE_STDOUT\r
+       if (data != NULL)\r
+               fprintf(stdout, "SAX.processingInstruction(%s, %s)\n",\r
+                       (char *) target, (char *) data);\r
+       else\r
+               fprintf(stdout, "SAX.processingInstruction(%s, NULL)\n",\r
+                       (char *) target);\r
+       #endif\r
+}\r
+/**\r
+ * cdataBlockDebug:\r
+ * @ctx: the user data (XML parser context)\r
+ * @value:  The pcdata content\r
+ * @len:  the block length\r
+ *\r
+ * called when a pcdata block has been parsed\r
+ */\r
+static void\r
+cdataBlockDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *value, int len)\r
+{\r
+       callbacks++;\r
+       if (quiet)\r
+               return;\r
+       #ifdef DISABLE_STDOUT\r
+       fprintf(stdout, "SAX.pcdata(%.20s, %d)\n",\r
+               (char *) value, len);\r
+       #endif\r
+}\r
+\r
+/**\r
+ * commentDebug:\r
+ * @ctxt:  An XML parser context\r
+ * @value:  the comment content\r
+ *\r
+ * A comment has been parsed.\r
+ */\r
+static void\r
+commentDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *value)\r
+{\r
+       callbacks++;\r
+       if (quiet)\r
+               return;\r
+       #ifdef DISABLE_STDOUT\r
+       fprintf(stdout, "SAX.comment(%s)\n", value);\r
+       #endif\r
+}\r
+/**\r
+ * warningDebug:\r
+ * @ctxt:  An XML parser context\r
+ * @msg:  the message to display/transmit\r
+ * @...:  extra parameters for the message display\r
+ *\r
+ * Display and format a warning messages, gives file, line, position and\r
+ * extra parameters.\r
+ */\r
+static void\r
+warningDebug(void *ctx ATTRIBUTE_UNUSED, const char *msg, ...)\r
+{\r
+       va_list args;\r
+\r
+       callbacks++;\r
+       if (quiet)\r
+               return;\r
+       #ifdef DISABLE_STDOUT\r
+       va_start(args, msg);\r
+       fprintf(stdout, "SAX.warning: ");\r
+       vfprintf(stdout, msg, args);\r
+       va_end(args);\r
+       #endif\r
+}\r
+\r
+/**\r
+ * errorDebug:\r
+ * @ctxt:  An XML parser context\r
+ * @msg:  the message to display/transmit\r
+ * @...:  extra parameters for the message display\r
+ *\r
+ * Display and format a error messages, gives file, line, position and\r
+ * extra parameters.\r
+ */\r
+static void\r
+errorDebug(void *ctx ATTRIBUTE_UNUSED, const char *msg, ...)\r
+{\r
+       va_list args;\r
+\r
+       callbacks++;\r
+       if (quiet)\r
+               return;\r
+       #ifdef DISABLE_STDOUT\r
+       va_start(args, msg);\r
+       fprintf(stdout, "SAX.error: ");\r
+       vfprintf(stdout, msg, args);\r
+       va_end(args);\r
+       #endif\r
+}\r
+\r
+/**\r
+ * fatalErrorDebug:\r
+ * @ctxt:  An XML parser context\r
+ * @msg:  the message to display/transmit\r
+ * @...:  extra parameters for the message display\r
+ *\r
+ * Display and format a fatalError messages, gives file, line, position and\r
+ * extra parameters.\r
+ */\r
+static void\r
+fatalErrorDebug(void *ctx ATTRIBUTE_UNUSED, const char *msg, ...)\r
+{\r
+       va_list args;\r
+\r
+       callbacks++;\r
+       if (quiet)\r
+               return;\r
+       #ifdef DISABLE_STDOUT\r
+       va_start(args, msg);\r
+       fprintf(stdout, "SAX.fatalError: ");\r
+       vfprintf(stdout, msg, args);\r
+       va_end(args);\r
+       #endif\r
+}\r
+\r
+\r
+xmlSAXHandler debugSAXHandlerStruct = {\r
+       internalSubsetDebug,\r
+       isStandaloneDebug,\r
+       hasInternalSubsetDebug,\r
+       hasExternalSubsetDebug,\r
+       resolveEntityDebug,\r
+       getEntityDebug,\r
+       entityDeclDebug,\r
+       notationDeclDebug,\r
+       attributeDeclDebug,\r
+       elementDeclDebug,\r
+       unparsedEntityDeclDebug,\r
+       setDocumentLocatorDebug,\r
+       startDocumentDebug,\r
+       endDocumentDebug,\r
+       startElementDebug,\r
+       endElementDebug,\r
+       referenceDebug,\r
+       charactersDebug,\r
+       ignorableWhitespaceDebug,\r
+       processingInstructionDebug,\r
+       commentDebug,\r
+       warningDebug,\r
+       errorDebug,\r
+       fatalErrorDebug,\r
+       getParameterEntityDebug,\r
+       cdataBlockDebug,\r
+       externalSubsetDebug,\r
+       1,\r
+       NULL,\r
+       NULL,\r
+       NULL,\r
+       NULL\r
+};\r
+xmlSAXHandlerPtr debugSAXHandler = &debugSAXHandlerStruct;\r
+\r
+/*\r
+ * SAX2 specific callbacks\r
+ */\r
+/**\r
+ * startElementNsDebug:\r
+ * @ctxt:  An XML parser context\r
+ * @name:  The element name\r
+ *\r
+ * called when an opening tag has been processed.\r
+ */\r
+static void\r
+startElementNsDebug(void *ctx ATTRIBUTE_UNUSED,\r
+                    const xmlChar *localname,\r
+                    const xmlChar *prefix,\r
+                    const xmlChar *URI,\r
+                    int nb_namespaces,\r
+                    const xmlChar **namespaces,\r
+                    int nb_attributes,\r
+                    int nb_defaulted,\r
+                    const xmlChar **attributes)\r
+{\r
+       int i;\r
+\r
+       callbacks++;\r
+       if (quiet)\r
+               return;\r
+       #ifdef DISABLE_STDOUT\r
+       fprintf(stdout, "SAX.startElementNs(%s", (char *) localname);\r
+       if (prefix == NULL)\r
+               fprintf(stdout, ", NULL");\r
+       else\r
+               fprintf(stdout, ", %s", (char *) prefix);\r
+       if (URI == NULL)\r
+               fprintf(stdout, ", NULL");\r
+       else\r
+               fprintf(stdout, ", '%s'", (char *) URI);\r
+       fprintf(stdout, ", %d", nb_namespaces);\r
+\r
+       if (namespaces != NULL) {\r
+               for (i = 0;i < nb_namespaces * 2;i++) {\r
+                       fprintf(stdout, ", xmlns");\r
+                       if (namespaces[i] != NULL)\r
+                               fprintf(stdout, ":%s", namespaces[i]);\r
+                       i++;\r
+                       fprintf(stdout, "='%s'", namespaces[i]);\r
+               }\r
+       }\r
+       fprintf(stdout, ", %d, %d", nb_attributes, nb_defaulted);\r
+       if (attributes != NULL) {\r
+               for (i = 0;i < nb_attributes;i += 5) {\r
+                       if (attributes[i + 1] != NULL)\r
+                               fprintf(stdout, ", %s:%s='", attributes[i + 1], attributes[i]);\r
+                       else\r
+                               fprintf(stdout, ", %s='", attributes[i]);\r
+                       fprintf(stdout, "%.4s...', %d", attributes[i + 3],\r
+                               (int)(attributes[i + 4] - attributes[i + 3]));\r
+               }\r
+       }\r
+       fprintf(stdout, ")\n");\r
+       #endif\r
+}\r
+\r
+/**\r
+ * endElementDebug:\r
+ * @ctxt:  An XML parser context\r
+ * @name:  The element name\r
+ *\r
+ * called when the end of an element has been detected.\r
+ */\r
+static void\r
+endElementNsDebug(void *ctx ATTRIBUTE_UNUSED,\r
+                  const xmlChar *localname,\r
+                  const xmlChar *prefix,\r
+                  const xmlChar *URI)\r
+{\r
+       callbacks++;\r
+       if (quiet)\r
+               return;\r
+       #ifdef DISABLE_STDOUT\r
+       fprintf(stdout, "SAX.endElementNs(%s", (char *) localname);\r
+       if (prefix == NULL)\r
+               fprintf(stdout, ", NULL");\r
+       else\r
+               fprintf(stdout, ", %s", (char *) prefix);\r
+       if (URI == NULL)\r
+               fprintf(stdout, ", NULL)\n");\r
+       else\r
+               fprintf(stdout, ", '%s')\n", (char *) URI);\r
+       #endif\r
+}\r
+\r
+xmlSAXHandler debugSAX2HandlerStruct = {\r
+       internalSubsetDebug,\r
+       isStandaloneDebug,\r
+       hasInternalSubsetDebug,\r
+       hasExternalSubsetDebug,\r
+       resolveEntityDebug,\r
+       getEntityDebug,\r
+       entityDeclDebug,\r
+       notationDeclDebug,\r
+       attributeDeclDebug,\r
+       elementDeclDebug,\r
+       unparsedEntityDeclDebug,\r
+       setDocumentLocatorDebug,\r
+       startDocumentDebug,\r
+       endDocumentDebug,\r
+       NULL,\r
+       NULL,\r
+       referenceDebug,\r
+       charactersDebug,\r
+       ignorableWhitespaceDebug,\r
+       processingInstructionDebug,\r
+       commentDebug,\r
+       warningDebug,\r
+       errorDebug,\r
+       fatalErrorDebug,\r
+       getParameterEntityDebug,\r
+       cdataBlockDebug,\r
+       externalSubsetDebug,\r
+       XML_SAX2_MAGIC,\r
+       NULL,\r
+       startElementNsDebug,\r
+       endElementNsDebug,\r
+       NULL\r
+};\r
+\r
+xmlSAXHandlerPtr debugSAX2Handler = &debugSAX2HandlerStruct;\r
+\r
+#define gen_nb_xmlParserCtxtPtr 1\r
+static xmlParserCtxtPtr gen_xmlParserCtxtPtr(int no, int nr ATTRIBUTE_UNUSED)\r
+{\r
+       if (no == 0) return(xmlNewParserCtxt());\r
+       if (no == 1) return(xmlCreateMemoryParserCtxt("<doc/>", 6));\r
+       return(NULL);\r
+}\r
+static void des_void_ptr(int no ATTRIBUTE_UNUSED, void *val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED)\r
+{\r
+}\r
+#define gen_nb_const_xmlChar_ptr 4\r
+\r
+static xmlChar *gen_const_xmlChar_ptr(int no, int nr ATTRIBUTE_UNUSED)\r
+{\r
+       if (no == 0) return((xmlChar *) "<foo>");\r
+       if (no == 1) return((xmlChar *) "<foo/>");\r
+       if (no == 2) return((xmlChar *) " none ");\r
+       if (no == 3) return((xmlChar *) " 2ab ");\r
+       return(NULL);\r
+}\r
+static void des_const_xmlChar_ptr(int no ATTRIBUTE_UNUSED, const xmlChar *val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED)\r
+{\r
+}\r
+static void desret_xmlEntityPtr(xmlEntityPtr val)\r
+{\r
+       if (val != NULL) {\r
+               xmlUnlinkNode((xmlNodePtr) val);\r
+               xmlFreeNode((xmlNodePtr) val);\r
+       }\r
+}\r
+\r
+#if 0\r
+/**    \r
+       * @test                 UTcSaxP01\r
+       * @brief                int xmlSAXUserParseFile (xmlSAXHandlerPtr sax, void * user_data, const char * filename)\r
+                                       int xmlParseChunk (xmlParserCtxtPtr ctxt, const char * chunk, int size,int terminate)\r
+       * @desc                 Positive Test for parsing an XML file and call the given SAX handler routines\r
+                                       Positive test for Parsing a Chunk of memory\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [1.Sax Handler is created with NULL callbacks, N/A]     @n\r
+                                       {emptySAXHandler,NULL, const char * pFilename} => {N/A |0}      @n\r
+                                       input2: [1.Sax Handler is created with NULL callbacks, N/A]     @n\r
+                                       {xmlParserCtxtPtr(ctxt), const char *(filename), int(size), int(terminate)} => {N/A |0 if no error}     @n      \r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcSaxP01()\r
+{\r
+       FILE*  file = NULL;\r
+       int i =0;\r
+       int ret = 0;\r
+       int res;\r
+       const char *pChar;\r
+       xmlParserCtxtPtr ctxt = NULL;\r
+       char *pFileBuffer = NULL;\r
+       unsigned char pByte[5];\r
+       const char *pFilename = LIBXML2TESTXML;\r
+       struct stat sb;\r
+       int  size = 0;\r
+       char Buff[64] = {0,};\r
+       int readlen =0;\r
+       \r
+       file = fopen(pFilename, "r");\r
+       if(file == NULL) {\r
+               DTS_FAIL("UTcSaxP01", "file Construct() failed in pre-condition");\r
+               return;\r
+       }\r
+       if (stat(pFilename, &sb) == -1) {\r
+               perror("stat");\r
+               return;\r
+       }\r
+\r
+       snprintf(Buff, 63, "File size: %lld bytes\n", (long long) sb.st_size);\r
+       DTS_PRINT("UTcSaxP01", Buff);   \r
+       size = (int)sb.st_size;\r
+\r
+       pFileBuffer = (char *)calloc(1, size +1);\r
+       if (pFileBuffer == NULL) {\r
+               fclose(file);\r
+               DTS_FAIL("UTcSaxP01", "ByteBuffer Construct() failed in pre-condition");\r
+       }\r
+\r
+       readlen = fread(pFileBuffer, 1, size, file);\r
+       if (readlen != size) {\r
+               free(pFileBuffer);\r
+               fclose(file);\r
+               DTS_FAIL("UTcSaxP01", "file Read() failed");\r
+       }\r
+\r
+       memcpy(pByte, pFileBuffer, 4);\r
+       size = size - 4;\r
+       pChar = (char *)(pByte);\r
+\r
+       /*\r
+        * Create xmlSAXHandlerPtr with Empty callbacks\r
+        */\r
+       ctxt = xmlCreatePushParserCtxt(emptySAXHandler, NULL,pChar, 4, pFilename);\r
+       DTS_CHECK_NE_MESSAGE("UTcSaxP01", (void *)ctxt, (void *)NULL, "Status of allocating parser context\n"); \r
+\r
+       //byteData.Flip();\r
+       for (i =0; size-i >=4 ;i=i+4) {\r
+               memcpy(pByte, pFileBuffer+i, 4);\r
+               res = xmlParseChunk(ctxt, (char *)(pByte), 4,0);\r
+               DTS_CHECK_EQ_MESSAGE("UTcSaxP01", (void *)res, (void *)0, "Failed xmlParseChunk");      \r
+\r
+       }\r
+\r
+       if (NULL == ctxt) {\r
+               free(pFileBuffer);\r
+               fclose( file);\r
+               DTS_FAIL("UTcSaxP01", "Parsing chunk failed");\r
+       }\r
+\r
+       //res = xmlParseChunk(ctxt, pChar, 0, 1);\r
+       // MT_CHECK_MESSAGE2(res != 0, "Failed xmlParseChunk");\r
+       xmlFreeParserCtxt(ctxt);\r
+       //file->Remove(pFilename);\r
+\r
+       for (i = 0; i<4;i++) {\r
+\r
+               /**\r
+                * @remarks   input1: [1.Sax Handler is created with NULL callbacks, N/A]       @n\r
+                *                                      {emptySAXHandler,NULL, pFilename} => {N/A |0}   @n\r
+                */\r
+               res = xmlSAXUserParseFile(emptySAXHandler, NULL, pFilename);\r
+               DTS_CHECK_EQ_MESSAGE("UTcSaxP01", (void *)res, (void *)0, "Failed xmlParseChunk");      \r
+\r
+       }\r
+\r
+       free(pFileBuffer);\r
+       fclose( file);  \r
+       /**\r
+        * @post Cleanup function for the XML library.\r
+        */\r
+       //if(pByte)\r
+       //      delete pByte;\r
+}\r
+/**    \r
+       * @test                 UTcSaxP02\r
+       * @brief                int xmlSAXUserParseFile (xmlSAXHandlerPtr sax, void * user_data, const char * filename)\r
+                                       int xmlParseChunk (xmlParserCtxtPtr ctxt, const char * chunk, int size,int terminate)\r
+       * @desc                 Positive Test for parsing an XML file and call the given SAX handler routines\r
+                                       Positive test for Parsing a Chunk of memory\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [1.Sax Handler is created with NULL callbacks, N/A]     @n\r
+                                       {emptySAXHandler,NULL, const char *pFilename} => {N/A |0}       @n\r
+                                       input2: [1.Sax Handler is created with NULL callbacks, N/A]     @n\r
+                                       {xmlParserCtxtPtr(ctxt), const char *(chunk), int(size), int(terminate)} => {N/A |0 if no error}        @n      \r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+       #if 0\r
+static void\r
+UTcSaxP02()\r
+{\r
+       File*  file = new File();\r
+       FileAttributes attr;\r
+       int ret = 0;\r
+       int res;\r
+       const char *pChar;\r
+       xmlParserCtxtPtr ctxt = NULL;\r
+       ByteBuffer byteData;\r
+       //byte *pByte = new byte(5);\r
+       unsigned char pByte[5];\r
+         //Target\r
+       const char *pFilename = LIBXML2TESTXML;\r
+\r
+#if 0\r
+\r
+       result r = file->Construct(pFilename, L"r");\r
+       if (r != E_SUCCESS) {\r
+               delete file;\r
+               file = NULL;\r
+               MT_FAIL("file Construct() failed in pre-condition");\r
+       }\r
+       r = file->GetAttributes(pFilename,attr);\r
+       int  size = (int)attr.GetFileSize();\r
+\r
+       r = byteData.Construct(size);\r
+       if (r != E_SUCCESS) {\r
+               delete file;\r
+               file = NULL;\r
+               MT_FAIL("ByteBuffer Construct() failed in pre-condition");\r
+       }\r
+\r
+       r = file->Read(byteData);\r
+       if (r != E_SUCCESS) {\r
+               delete file;\r
+               file = NULL;\r
+               MT_FAIL("file Read() failed");\r
+       }\r
+       byteData.Flip();\r
+\r
+       r = byteData.GetArray(pByte,0,4);\r
+       size = size - 4;\r
+       MT_CHECK_MESSAGE2(r == E_SUCCESS, "Failed byteData.GetArray()");\r
+       pChar = (char *)(pByte);\r
+#endif\r
+\r
+/** TODO GOPAL write code to read from the file **/\r
+       /*\r
+        * Create xmlSAXHandlerPtr with Empty callbacks\r
+        */\r
+       ctxt = xmlCreatePushParserCtxt(debugSAXHandler, NULL,pChar, 4, pFilename);\r
+       MT_CHECK_MESSAGE2(ctxt != NULL, "Status of allocating parser context\n");\r
+\r
+       //byteData.Flip();\r
+       for (int i =0; size-i >=4 ;i=i+4) {\r
+               r = byteData.GetArray(pByte,0,4);\r
+               if (r != E_SUCCESS) {\r
+                       break;\r
+               }\r
+               res = xmlParseChunk(ctxt, (char *)(pByte), 4,0);\r
+               MT_CHECK_MESSAGE2(res == 0, "Failed xmlParseChunk");\r
+\r
+       }\r
+\r
+       if (NULL == ctxt) {\r
+               delete file;\r
+               file = NULL;\r
+               MT_FAIL("Parsing chunk failed");\r
+       }\r
+\r
+       //res = xmlParseChunk(ctxt, pChar, 0, 1);\r
+       // MT_CHECK_MESSAGE2(res != 0, "Failed xmlParseChunk");\r
+       xmlFreeParserCtxt(ctxt);\r
+       //file->Remove(pFilename);\r
+\r
+       for (int i = 0; i<4;i++) {\r
+\r
+               /**\r
+                * @remarks   input1: [1.Sax Handler is created with NULL callbacks, N/A]       @n\r
+                *                                      {emptySAXHandler,NULL, pFilename} => {N/A |0}   @n\r
+                */\r
+               res = xmlSAXUserParseFile(debugSAXHandler, NULL, pFilename);\r
+               MT_CHECK_MESSAGE2(res == 0, "xmlSAXUserParseFile returned error %d\n", res);\r
+\r
+       }\r
+       delete file;\r
+       /**\r
+        * @post Cleanup function for the XML library.\r
+        */\r
+       //if(pByte)\r
+       //      delete pByte;\r
+}\r
+/**    \r
+       * @test                 UTcSaxP03\r
+       * @brief                int xmlSAXUserParseFile (xmlSAXHandlerPtr sax, void * user_data, const char * filename)\r
+                                       int xmlParseChunk (xmlParserCtxtPtr ctxt, const char * chunk, int size,int terminate)\r
+       * @desc                 Positive Test for parsing an XML file and call the given SAX handler routines\r
+                                       Positive test for Parsing a Chunk of memory\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [1.Sax Handler is created with NULL callbacks, N/A]     @n\r
+                                       {emptySAXHandler,NULL, const char * pFilename} => {N/A |0}      @n\r
+                                       input2: [1.Sax Handler is created with NULL callbacks, N/A]     @n\r
+                                       {xmlParserCtxtPtr(sax), const char *(chunk), int(size), int(terminate)} => {N/A |0 if no error} @n      \r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcSaxP03()\r
+{\r
+       File*  file = new File();\r
+       FileAttributes attr;\r
+       int ret = 0;\r
+       int res;\r
+       const char *pChar;\r
+       xmlParserCtxtPtr ctxt = NULL;\r
+       ByteBuffer byteData;\r
+       //byte *pByte = new byte(5);\r
+       unsigned char pByte[5];\r
+       \r
+       const char *pFilename = LIBXML2TESTXML;\r
+\r
+\r
+       result r = file->Construct(pFilename, L"r");\r
+       if (r != E_SUCCESS) {\r
+               delete file;\r
+               file = NULL;\r
+               MT_FAIL("file Construct() failed in pre-condition");\r
+       }\r
+       r = file->GetAttributes(pFilename,attr);\r
+       int  size = (int)attr.GetFileSize();\r
+\r
+       r = byteData.Construct(size);\r
+       if (r != E_SUCCESS) {\r
+               delete file;\r
+               file = NULL;\r
+               MT_FAIL("ByteBuffer Construct() failed in pre-condition");\r
+       }\r
+\r
+       r = file->Read(byteData);\r
+       if (r != E_SUCCESS) {\r
+               delete file;\r
+               file = NULL;\r
+               MT_FAIL("file Read() failed");\r
+       }\r
+       byteData.Flip();\r
+\r
+       r = byteData.GetArray(pByte,0,4);\r
+       size = size - 4;\r
+       MT_CHECK_MESSAGE2(r == E_SUCCESS, "Failed byteData.GetArray()");\r
+       pChar = (char *)(pByte);\r
+\r
+       /*\r
+        * Create xmlSAXHandlerPtr with Empty callbacks\r
+        */\r
+       ctxt = xmlCreatePushParserCtxt(debugSAX2Handler, NULL,pChar, 4, pFilename);\r
+       MT_CHECK_MESSAGE2(ctxt != NULL, "Status of allocating parser context\n");\r
+\r
+       //byteData.Flip();\r
+       for (int i =0; size-i >=4 ;i=i+4) {\r
+               r = byteData.GetArray(pByte,0,4);\r
+               if (r != E_SUCCESS) {\r
+                       break;\r
+               }\r
+               res = xmlParseChunk(ctxt, (char *)(pByte), 4,0);\r
+               MT_CHECK_MESSAGE2(res == 0, "Failed xmlParseChunk");\r
+\r
+       }\r
+\r
+       if (NULL == ctxt) {\r
+               delete file;\r
+               file = NULL;\r
+               MT_FAIL("Parsing chunk failed");\r
+       }\r
+\r
+       //res = xmlParseChunk(ctxt, pChar, 0, 1);\r
+       // MT_CHECK_MESSAGE2(res != 0, "Failed xmlParseChunk");\r
+       xmlFreeParserCtxt(ctxt);\r
+       //file->Remove(pFilename);\r
+\r
+       for (int i = 0; i<4;i++) {\r
+\r
+               /**\r
+                * @remarks   input1: [1.Sax Handler is created with NULL callbacks, N/A]       @n\r
+                *                                      {emptySAXHandler,NULL, pFilename} => {N/A |0}   @n\r
+                */\r
+               res = xmlSAXUserParseFile(debugSAX2Handler, NULL, pFilename);\r
+               MT_CHECK_MESSAGE2(res == 0, "xmlSAXUserParseFile returned error %d\n", res);\r
+\r
+       }\r
+       delete file;\r
+       /**\r
+        * @post Cleanup function for the XML library.\r
+        */\r
+       //if(pByte)\r
+       //      delete pByte;\r
+}\r
+\r
+\r
+static void ParseFSMstartElementNs(void * ctx,\r
+                           const xmlChar * localname,\r
+                           const xmlChar * prefix,\r
+                           const xmlChar * URI,\r
+                           int nb_namespaces,\r
+                           const xmlChar ** namespaces,\r
+                           int nb_attributes,\r
+                           int nb_defaulted,\r
+                           const xmlChar ** attributes) {\r
+       #ifdef DISABLE_PRINTF\r
+       printf("startElementNs: name = '%s' prefix = '%s' uri = (%p)'%s'\n", localname, prefix, URI, URI);\r
+       #endif\r
+       for (int indexNamespace = 0; indexNamespace < nb_namespaces; ++indexNamespace) {\r
+               const xmlChar *prefix = namespaces[indexNamespace*2];\r
+               const xmlChar *nsURI = namespaces[indexNamespace*2+1];\r
+               #ifdef DISABLE_PRINTF\r
+               printf("  namespace: name='%s' uri=(%p)'%s'\n", prefix, nsURI, nsURI);\r
+               #endif\r
+       }\r
+\r
+       unsigned int index = 0;\r
+       for (int indexAttribute = 0;\r
+                       indexAttribute < nb_attributes;\r
+                       ++indexAttribute, index += 5) {\r
+               const xmlChar *localname = attributes[index];\r
+               const xmlChar *prefix = attributes[index+1];\r
+               const xmlChar *nsURI = attributes[index+2];\r
+               const xmlChar *valueBegin = attributes[index+3];\r
+               const xmlChar *valueEnd = attributes[index+4];\r
+\r
+       }\r
+}\r
+\r
+static void ParseFSMendElementNs(void * ctx,\r
+                         const xmlChar * localname,\r
+                         const xmlChar * prefix,\r
+                         const xmlChar * URI) {\r
+       #ifdef DISABLE_PRINTF\r
+       printf("endElementNs: name = '%s' prefix = '%s' uri = '%s'\n", localname, prefix, URI);\r
+       #endif\r
+}\r
+\r
+/** Display and format an error messages, callback.\r
+   ctx:  an XML parser context\r
+   msg:  the message to display/transmit\r
+   ...:  extra parameters for the message display\r
+   */\r
+static void ParseFSMerror(void * ctx,\r
+                  const char * msg,\r
+                  ...) {\r
+       va_list args;\r
+       va_start(args, msg);\r
+       #ifdef DISABLE_PRINTF\r
+       vprintf(msg, args);\r
+       #endif\r
+       va_end(args);\r
+}\r
+\r
+/** Display and format a warning messages, callback.\r
+   ctx:  an XML parser context\r
+   msg:  the message to display/transmit\r
+   ...:  extra parameters for the message display\r
+   */\r
+static void ParseFSMwarning(void * ctx,\r
+                    const char * msg,\r
+                    ...) {\r
+       va_list args;\r
+       va_start(args, msg);\r
+       vprintf(msg, args);\r
+       va_end(args);\r
+}\r
+\r
+/**    \r
+       * @test                 UTcSaxP04\r
+       * @brief                int xmlSAXUserParseMemory (xmlSAXHandlerPtr sax, void * user_data, const char * buffer, int size)\r
+       * @desc                 Positive test to parse an XML in-memory buffer and call the given SAX handler routines.\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [1.Sax Handler is created and callbacks are assigned, N/A]      @n\r
+                                       {xmlSAXHandlerPtr debugSAX2Handler,const char * xmlIn,size of xmlIn} => {N/A |0}        @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcSaxP04()\r
+{\r
+\r
+       char xmlIn[] =\r
+               "<test:Plan xmlns:test='http://test.org/schema'>"\r
+               "<test:Case name='test1' emptyAttribute='' test:ns_id='auio'>"\r
+               "</test:Case>"\r
+               "</test:Plan>";\r
+\r
+       \r
+\r
+       /*\r
+        * Create xmlSAXHandlerPtr with SAX2 related callbacks\r
+        */\r
+       xmlSAXHandler saxHandler;\r
+       memset(&saxHandler, 0, sizeof(saxHandler));\r
+\r
+       saxHandler.initialized = XML_SAX2_MAGIC;\r
+       saxHandler.startElementNs = ParseFSMstartElementNs;\r
+       saxHandler.endElementNs = ParseFSMendElementNs;\r
+       saxHandler.warning = ParseFSMwarning;\r
+       saxHandler.error = ParseFSMerror;\r
+\r
+       /**\r
+        * @remarks   input1: [1.Sax Handler is created and callbacks are assigned, N/A]        @n\r
+        *                                      {debugSAX2Handler,fsm,xmlIn,size of xmlIn} => {N/A |0}  @n\r
+        */\r
+       int result = xmlSAXUserParseMemory(debugSAX2Handler, &saxHandler, xmlIn, strlen(xmlIn));\r
+       MT_CHECK_MESSAGE2(result == 0, "Failed to parse document.");\r
+\r
+       /**\r
+        * @post Cleanup function for the XML library.\r
+        */\r
+}\r
+/**    \r
+       * @test                 UTcSaxP05\r
+       * @brief                void initxmlDefaultSAXHandler (xmlSAXHandlerV1 * hdlr, int warning)\r
+       * @desc                 Positive Test for Initializing the default XML SAX version 1 handler\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {emptySAXHandlerV1,int(0)} => {N/A |N/A}        @n\r
+                                       input2: [N/A, N/A] @n\r
+       *                       {xmlSAXHandlerV1 * saxHandlerV1,int(0)} => {N/A |N/A}   @n\r
+                                       input3: [N/A, N/A] @n\r
+       *                       {xmlSAXHandlerV1 * saxHandlerV2,int(0)} => {N/A |N/A}   @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcSaxP05()\r
+{\r
+       xmlSAXHandlerV1* saxHandlerV1;\r
+       xmlSAXHandlerV1* saxHandlerV2;\r
+       \r
+       saxHandlerV1 =(xmlSAXHandlerV1 *) xmlMemMalloc(sizeof(xmlSAXHandlerV1));\r
+       saxHandlerV2 =(xmlSAXHandlerV1 *) xmlMemMalloc(sizeof(xmlSAXHandlerV1));\r
+\r
+       /**\r
+        * @remarks   input1: [N/A, N/A]        @n\r
+        *                                      {emptySAXHandlerV1,0} => {N/A |N/A}     @n\r
+        */\r
+       initxmlDefaultSAXHandler(emptySAXHandlerV1,0);\r
+       MT_CHECK_MESSAGE2(emptySAXHandlerV1 != NULL, "initxmlDefaultSAXHandler failed\n");\r
+\r
+       /**\r
+        * @remarks   input2: [N/A, N/A]        @n\r
+        *                                      {saxHandlerV1,0} => {N/A |N/A}  @n\r
+        */\r
+       initxmlDefaultSAXHandler(saxHandlerV1,0);\r
+       MT_CHECK_MESSAGE2(saxHandlerV1 != NULL, "initxmlDefaultSAXHandler failed\n");\r
+\r
+       /**\r
+        * @remarks   input3: [N/A, N/A]        @n\r
+        *                                      {saxHandlerV2,0} => {N/A |N/A}  @n\r
+        */\r
+       initxmlDefaultSAXHandler(saxHandlerV2,1);\r
+       MT_CHECK_MESSAGE2(saxHandlerV2 != NULL, "initxmlDefaultSAXHandler failed\n");\r
+\r
+       xmlMemFree(saxHandlerV1);\r
+       xmlMemFree(saxHandlerV2);\r
+       xmlFree(emptySAXHandlerV1);\r
+}\r
+/**    \r
+       * @test                 UTcSaxP06\r
+       * @brief                int     xmlSAXDefaultVersion (int version)\r
+                                       int     xmlSAX2IsStandalone     (void * ctx)\r
+                                       int     xmlSAX2HasInternalSubset (void * ctx)\r
+                                       int     xmlSAX2HasExternalSubset (void * ctx)\r
+                                       const xmlChar * xmlSAX2GetPublicId      (void * ctx)\r
+                                       const xmlChar * xmlSAX2GetPublicId      (void * ctx)\r
+                                       int     xmlSAX2GetLineNumber (void * ctx)\r
+                                       int     xmlSAX2GetColumnNumber  (void * ctx)\r
+                                       void xmlSAX2CDataBlock (void * ctx, const xmlChar * value, int len)\r
+                                       void xmlSAX2Comment (void * ctx, const xmlChar * value)\r
+                                       void xmlSAX2EndElement (void * ctx, const xmlChar * name)\r
+       * @desc                 Positive test for Setting the default version of SAX used globally by the library\r
+                                       Positive test for checking if the document is tagged for standalone\r
+                                       Positive test for checking if document has an internal subset\r
+                                       Positive test for checking if document has an external subset\r
+                                       Positive test for checking if it Provides the public ID \r
+                                       Positive test for Providing the line number of the current parsing point.\r
+                                       Positive test for Providing the column number of the current parsing point\r
+                                       Positive test for xmlSAX2CDataBlock\r
+                                       Positive test for checking if A xmlSAX2Comment has been parsed.\r
+                                       Positive test for checking if end of file is detected\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [1.calling xmlSAXDefaultVersion Api, N/A]       @n\r
+                                       {1} => {N/A | 2}        @n\r
+                                       input2: [1.Calling  xmlSAX2IsStandalone Api, N/A]       @n\r
+                                       {ctxt} => {N/A | 0}     @n\r
+                                       input3: [1.Calling  xmlSAX2HasInternalSubset Api, N/A]  @n\r
+                                       {ctxt} => {N/A | 1}     @n\r
+                                       input4: [1.Calling  xmlSAX2HasInternalSubset Api, N/A]  @n\r
+                                       {ctxt} => {N/A | 0}     @n\r
+                                       input5: [1.Calling  xmlSAX2GetPublicId Api, N/A]        @n\r
+                                       {ctxt} => {N/A | xmlChar pointer}       @n\r
+                                       input6: [1.Calling  xmlSAX2GetSystemId Api, N/A]        @n\r
+                                       {ctxt} => {N/A |const  xmlChar pointer} @n\r
+                                       input7: [1.Calling  xmlSAX2GetLineNumber Api, N/A]      @n\r
+                                       {ctxt} => {N/A |1}      @n\r
+                                       input8: [1.Calling  xmlSAX2GetColumnNumber Api, N/A]    @n\r
+                                       {ctxt} => {N/A |1}      @n\r
+                                        input9: [1.Calling  xmlSAX2CDataBlock Api, N/A]        @n\r
+                                       {ctxt,"Case",4} => {N/A |N/A}   @n\r
+                                       input10: [1.Calling  xmlSAX2Comment Api, N/A]   @n\r
+                                       {ctxt,"test"} => {N/A |N/A}     @n\r
+                                       input11: [1.Calling  xmlSAX2EndElement Api, N/A]        @n\r
+                                       {ctxt,""test""} => {N/A |N/A}   @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcSaxP06()\r
+{\r
+       xmlParserCtxtPtr ctxt;\r
+       xmlSAXHandler *saxHandler;\r
+       xmlErrorPtr                             pError;\r
+       const xmlChar * result_char = NULL;\r
+       String StrTest = "test";\r
+       String xmlIn =\r
+               "<test:Plan xmlns:test='http://test.org/schema'>"\r
+               "<test:Case name='test1' emptyAttribute='' test:ns_id='auio'>"\r
+               "</test:Case>"\r
+               "</test:Plan>";\r
+       const xmlChar *sTest[3];\r
+       sTest[0] = (xmlChar *) "testtwice";\r
+       sTest[1] = NULL;\r
+       sTest[2] = NULL;\r
+       \r
+       const char *pData = _StringConverter::CopyToCharArrayN(xmlIn);\r
+       saxHandler =(xmlSAXHandler *) xmlMemMalloc(sizeof(xmlSAXHandler));\r
+       \r
+       memset(saxHandler, 0, sizeof(xmlSAXHandler));\r
+\r
+       xmlSAX2InitDefaultSAXHandler(saxHandler,0);\r
+       MT_CHECK_MESSAGE2(saxHandler != NULL, "xmlSAX2InitDefaultSAXHandler failed\n");\r
+\r
+       /**\r
+        * @remarks   input1: [1.calling xmlSAXDefaultVersion Api, N/A] @n\r
+        *                                      {1} => {N/A | 2}        @n\r
+        */\r
+       int result = xmlSAXDefaultVersion(1);\r
+       MT_CHECK_MESSAGE2(result == 2, "xmlSAXDefaultVersion failed\n");\r
+\r
+\r
+       result = xmlSAXDefaultVersion(2);\r
+       MT_CHECK_MESSAGE2(result == 1, "xmlSAXDefaultVersion failed\n");\r
+\r
+       result = xmlSAXDefaultVersion(3);\r
+       MT_CHECK_MESSAGE2(result == -1, "xmlSAXDefaultVersion failed\n");\r
+       \r
+       ctxt = xmlCreatePushParserCtxt(saxHandler,(void *)"test:case",(const char *)"test",xmlIn.GetLength(),pData );\r
+       MT_CHECK_MESSAGE2(ctxt != NULL, "Status of allocating parser context\n");\r
+\r
+\r
+       xmlSAX2StartDocument(ctxt);\r
+\r
+       ctxt->myDoc->intSubset = xmlCreateIntSubset(ctxt->myDoc, (const xmlChar*)"intsubset",(const xmlChar*)"foo", (const xmlChar*)"foo");\r
+       ctxt->myDoc->intSubset->attributes = (void *)"test";\r
+\r
+       xmlResetLastError();\r
+       xmlSAX2StartElement(ctxt,(const xmlChar *)"test", (const xmlChar **)sTest);\r
+       pError = xmlGetLastError();\r
+       MT_CHECK_MESSAGE("checking the result for xmlSAX2StartElement", pError == NULL);\r
+\r
+       /**\r
+        * @remarks   input2: [1.Calling  xmlSAX2IsStandalone Api, N/A] @n\r
+        *                                      {ctxt} => {N/A | 0}     @n\r
+        */\r
+\r
+       result = xmlSAX2IsStandalone(ctxt);\r
+       MT_CHECK_MESSAGE2(result == 0, "xmlSAX2IsStandalone failed\n");\r
+\r
+       /**\r
+        * @remarks   input3: [1.Calling  xmlSAX2HasInternalSubset Api, N/A]    @n\r
+        *                                      {ctxt} => {N/A | 1}     @n\r
+        */\r
+       result = xmlSAX2HasInternalSubset(ctxt);\r
+       MT_CHECK_MESSAGE2(result == 1, "xmlSAX2HasInternalSubset failed\n");\r
+\r
+       /**\r
+        * @remarks   input4: [1.Calling  xmlSAX2HasInternalSubset Api, N/A]    @n\r
+        *                                      {ctxt} => {N/A | 0}     @n\r
+        */\r
+       result = xmlSAX2HasExternalSubset(ctxt);\r
+       MT_CHECK_MESSAGE2(result == 0, "xmlSAX2HasExternalSubset failed\n");\r
+\r
+       xmlResetLastError();\r
+       ctxt->inSubset = 1;\r
+       xmlSAX2EntityDecl(ctxt,(const xmlChar *)"test", 1,(const xmlChar *)"test",(const xmlChar *)"test", (xmlChar *)"hello");\r
+       pError = xmlGetLastError();\r
+       MT_CHECK_MESSAGE("checking the result for xmlSAX2EntityDecl", pError == NULL);\r
+\r
+       xmlResetLastError();\r
+\r
+#ifdef FEATURE_TODO\r
+       /**\r
+        * @remarks   input5: [1.Calling  xmlSAX2GetPublicId Api, N/A]  @n\r
+        *                                      {ctxt} => {N/A | xmlChar pointer}       @n\r
+        */\r
+       result_char = xmlSAX2GetPublicId(ctxt);\r
+       MT_CHECK_MESSAGE2(result_char != NULL, "xmlSAX2GetPublicId failed\n");\r
+       xmlFree((void *)result_char);\r
+#endif\r
+       /**\r
+        * @remarks   input6: [1.Calling  xmlSAX2GetSystemId Api, N/A]  @n\r
+        *                                      {ctxt} => {N/A |const  xmlChar pointer} @n\r
+        */\r
+       result_char = xmlSAX2GetSystemId(ctxt);\r
+       MT_CHECK_MESSAGE2(result_char != NULL, "xmlSAX2GetSystemId failed\n");\r
+       xmlFree((void *)result_char);\r
+       /**\r
+        * @remarks   input7: [1.Calling  xmlSAX2GetLineNumber Api, N/A]        @n\r
+        *                                      {ctxt} => {N/A |1}      @n\r
+        */\r
+\r
+       result = xmlSAX2GetLineNumber(ctxt);\r
+       MT_CHECK_MESSAGE2(result == 1, "xmlSAX2HasInternalSubset failed\n");\r
+\r
+       /**\r
+        * @remarks   input8: [1.Calling  xmlSAX2GetColumnNumber Api, N/A]      @n\r
+        *                                      {ctxt} => {N/A |1}      @n\r
+        */\r
+       result = xmlSAX2GetColumnNumber(ctxt);\r
+       MT_CHECK_MESSAGE2(result == 1, "xmlSAX2HasInternalSubset failed\n");\r
+\r
+       /**\r
+        * @remarks   input9: [1.Calling  xmlSAX2CDataBlock Api, N/A]   @n\r
+        *                                      {ctxt,"Case",4} => {N/A |N/A}   @n\r
+        */\r
+       xmlResetLastError();\r
+       xmlSAX2CDataBlock(ctxt,(const xmlChar *)"test",4);\r
+       pError = xmlGetLastError();\r
+        MT_CHECK_MESSAGE("checking the result for xmlSAX2EndDocument", pError == NULL);\r
+\r
+       /**\r
+        * @remarks   input10: [1.Calling  xmlSAX2Comment Api, N/A]     @n\r
+        *                                      {ctxt,"test"} => {N/A |N/A}     @n\r
+        */\r
+       xmlResetLastError();\r
+       xmlSAX2Comment(ctxt,(const xmlChar *)"test");\r
+       pError = xmlGetLastError();\r
+       MT_CHECK_MESSAGE("checking the result for xmlSAX2EndDocument", pError == NULL);\r
+\r
+       /**\r
+        * @remarks   input11: [1.Calling  xmlSAX2EndElement Api, N/A]  @n\r
+        *                                      {ctxt,""test""} => {N/A |N/A}   @n\r
+        */\r
+       xmlResetLastError();\r
+       xmlSAX2EndElement(ctxt,(const xmlChar *)"test");\r
+       pError = xmlGetLastError();\r
+       MT_CHECK_MESSAGE("checking the result for xmlSAX2EndDocument", pError == NULL);\r
+\r
+\r
+       xmlResetLastError();\r
+       xmlSAX2EndDocument(ctxt);\r
+       pError = xmlGetLastError();\r
+       MT_CHECK_MESSAGE("checking the result for xmlSAX2EndDocument", pError == NULL);\r
+\r
+       /**\r
+        * @post Cleanup function for the XML library.\r
+        */\r
+       if(pData != NULL)\r
+               delete pData;\r
+\r
+       /*if(sTest != NULL)\r
+               delete sTest;\r
+       xmlFreeDtd(ctxt->myDoc->intSubset);*/\r
+\r
+       //xmlFreeDoc(ctxt->myDoc);\r
+       xmlFreeParserCtxt(ctxt);\r
+       xmlMemFree(saxHandler);\r
+\r
+       //if(pError != NULL)\r
+       //      delete pError;\r
+}\r
+/**    \r
+       * @test                 UTcSaxP07\r
+       * @brief                void xmlSAX2EntityDecl (void * ctx, const xmlChar * name, int type, const xmlChar * publicId, const xmlChar * systemId, xmlChar * content)\r
+                                       void xmlSAX2UnparsedEntityDecl (void * ctx, const xmlChar * name, const xmlChar * publicId, const xmlChar * systemId, const xmlChar * notationName)\r
+                                       void xmlSAX2EntityDecl (void * ctx, const xmlChar * name, int type, const xmlChar * publicId, const xmlChar * systemId, xmlChar * content)\r
+                                       void xmlSAX2UnparsedEntityDecl (void * ctx, const xmlChar * name, const xmlChar * publicId, const xmlChar * systemId, const xmlChar * notationName)\r
+                                       xmlEntityPtr xmlSAX2GetEntity (void * ctx, const xmlChar * name)\r
+                                       xmlEntityPtr xmlSAX2GetParameterEntity (void * ctx, const xmlChar * name)\r
+                                       xmlEntityPtr xmlSAX2GetEntity (void * ctx, const xmlChar * name)\r
+                                       xmlEntityPtr xmlSAX2GetEntity (void * ctx, const xmlChar * name)\r
+       * @desc                 Positive Test for checking if an entity definition has been parsed\r
+                                       Positive Test for xmlSAX2UnparsedEntityDecl\r
+                                       Positive Test for getting entity name\r
+                                       Positive Test for Getting a parameter entity by name                    \r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [1.calling xmlSAX2EntityDecl Api, N/A]  @n\r
+                                       {ctxt,const xmlChar * "foo",const xmlChar * "foo"} => {N/A |N/A}        @n\r
+                                       input2: [1.calling xmlSAX2UnparsedEntityDecl Api, N/A]  @n\r
+                                       {ctxt,const xmlChar * "foo",const xmlChar * "foo",const xmlChar * "foo"} => {N/A |N/A}  @n\r
+                                        input3: [1.calling xmlSAX2EntityDecl Api, N/A] @n\r
+                                       {ctxt,const xmlChar * "foo",1,const xmlChar * "foo",const xmlChar * "foo",const xmlChar * "foo"} => {N/A |N/A}  @n\r
+                                        input4: [1.calling xmlSAX2UnparsedEntityDecl Api, N/A] @n\r
+                                       {ctxt,const xmlChar * "foo",const xmlChar * "foo",const xmlChar * "foo",const xmlChar * "foo"} => {N/A |N/A}    @n\r
+                                       input5: [1.calling xmlSAX2GetEntity Api, N/A]   @n\r
+                                       {ctxt,const xmlChar * "foo",const xmlChar * "foo",const xmlChar * "foo",const xmlChar * "foo"} => {N/A |xmlEntityPtr}   @n\r
+                                       input6: [1.calling xmlSAX2GetParameterEntity Api, N/A]  @n\r
+                                       {ctxt,const xmlChar *"foo"} => {N/A |NULL}      @n\r
+                                        input7: [1.calling xmlSAX2GetEntity Api, N/A]  @n\r
+                                       {ctxt,const xmlChar *"foo"} => {N/A |xmlEntityPtr}      @n\r
+                                       input8: [1.calling xmlSAX2GetEntity Api, N/A]   @n\r
+                                       {ctxt,const xmlChar * "foo"} => {N/A |xmlEntityPtr}     @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+\r
+static void\r
+UTcSaxP07()\r
+{\r
+       xmlParserCtxtPtr                ctxt;\r
+       xmlSAXHandler                   *pSaxHandler = NULL;\r
+       xmlErrorPtr                             pError;\r
+\r
+       xmlResetLastError();\r
+       pSaxHandler =(xmlSAXHandler *) xmlMemMalloc(sizeof(xmlSAXHandler));\r
+       String xmlIn =\r
+               "<test:Plan xmlns:test='http://test.org/schema'>"\r
+               "<test:Case name='test1' emptyAttribute='' test:ns_id='auio'>"\r
+               "</test:Case>"\r
+               "</test:Plan>";\r
+\r
+       memset(pSaxHandler, 0, sizeof(xmlSAXHandler));\r
+       \r
+       const char *pData = _StringConverter::CopyToCharArrayN(xmlIn);\r
+\r
+       xmlSAX2InitDefaultSAXHandler(pSaxHandler,0);\r
+       MT_CHECK_MESSAGE2(pSaxHandler != NULL, "xmlSAX2InitDefaultSAXHandler failed\n");\r
+\r
+       ctxt = xmlCreatePushParserCtxt(pSaxHandler,(void *)"test:case",(const char *)"test",xmlIn.GetLength(), pData);\r
+       MT_CHECK_MESSAGE2(ctxt != NULL, "Status of allocating parser context\n");\r
+\r
+       xmlResetLastError();\r
+       xmlSAX2Reference(ctxt, (const xmlChar*)"foo");\r
+       pError = xmlGetLastError();\r
+       MT_CHECK_MESSAGE("checking the result for xmlFreeEntitiesTable", pError == NULL);\r
+\r
+       xmlResetLastError();\r
+       ctxt->myDoc = xmlReadMemory("<!DOCTYPE foo []> <foo/>", 24, "test", NULL, 0);\r
+\r
+       xmlSAX2ProcessingInstruction(ctxt, (const xmlChar*)"foo", (const xmlChar*)"foo");\r
+       pError = xmlGetLastError();\r
+       MT_CHECK_MESSAGE("checking the result for xmlFreeEntitiesTable", pError == NULL);\r
+\r
+       xmlResetLastError();\r
+       ctxt->inSubset = 1;\r
+       /**\r
+        * @remarks   input1: [1.calling xmlSAX2EntityDecl Api, N/A]    @n\r
+        *                                      {ctxt,"foo","foo"} => {N/A |N/A}        @n\r
+        */\r
+       xmlSAX2EntityDecl(ctxt, (const xmlChar*)"foo", 1, (const xmlChar*)"foo", (const xmlChar*)"foo", (xmlChar*)"foo");\r
+       pError = xmlGetLastError();\r
+       MT_CHECK_MESSAGE("checking the result for xmlFreeEntitiesTable", pError == NULL);\r
+\r
+       xmlResetLastError();\r
+\r
+       /**\r
+        * @remarks   input2: [1.calling xmlSAX2UnparsedEntityDecl Api, N/A]    @n\r
+        *                                      {ctxt,"foo","foo","foo"} => {N/A |N/A}  @n\r
+        */\r
+       xmlSAX2UnparsedEntityDecl(ctxt, (const xmlChar*)"foo", (const xmlChar*)"foo", (const xmlChar*)"foo", (const xmlChar*)"foo");\r
+       pError = xmlGetLastError();\r
+       MT_CHECK_MESSAGE("checking the result for xmlFreeEntitiesTable", pError == NULL);\r
+\r
+       xmlResetLastError();\r
+       ctxt->inSubset = 2;\r
+       /**\r
+        * @remarks   input3: [1.calling xmlSAX2EntityDecl Api, N/A]    @n\r
+        *                                      {ctxt,"foo",1,"foo","foo","foo"} => {N/A |N/A}  @n\r
+        */\r
+       xmlSAX2EntityDecl(ctxt, (const xmlChar*)"foo", 1, (const xmlChar*)"foo", (const xmlChar*)"foo", (xmlChar*)"foo");\r
+       pError = xmlGetLastError();\r
+       MT_CHECK_MESSAGE("checking the result for xmlFreeEntitiesTable", pError == NULL);\r
+\r
+       xmlResetLastError();\r
+       /**\r
+        * @remarks   input4: [1.calling xmlSAX2UnparsedEntityDecl Api, N/A]    @n\r
+        *                                      {ctxt,"foo","foo","foo","foo"} => {N/A |N/A}    @n\r
+        */\r
+       xmlSAX2UnparsedEntityDecl(ctxt, (const xmlChar*)"foo", (const xmlChar*)"foo", (const xmlChar*)"foo", (const xmlChar*)"foo");\r
+       pError = xmlGetLastError();\r
+       MT_CHECK_MESSAGE("checking the result for xmlFreeEntitiesTable", pError == NULL);\r
+\r
+       /**\r
+        * @remarks   input5: [1.calling xmlSAX2GetEntity Api, N/A]     @n\r
+        *                                      {ctxt,"foo","foo","foo","foo"} => {N/A |xmlEntityPtr}   @n\r
+        */\r
+       xmlEntityPtr pEntity = xmlSAX2GetEntity(ctxt, (const xmlChar*)"foo");\r
+       MT_CHECK_MESSAGE("checking the result for xmlSAX2GetEntity", pEntity != NULL);\r
+       //if (pEntity != NULL)\r
+       //      delete pEntity;\r
+       /**\r
+        * @remarks   input6: [1.calling xmlSAX2GetParameterEntity Api, N/A]    @n\r
+        *                                      {ctxt,"foo"} => {N/A |NULL}     @n\r
+        */\r
+       ctxt->inSubset = 1;\r
+       pEntity = xmlSAX2GetParameterEntity(ctxt, (const xmlChar*)"foo");\r
+       MT_CHECK_MESSAGE("checking the result for xmlSAX2GetEntity", pEntity == NULL);\r
+       /*if (pEntity != NULL)\r
+               delete pEntity;*/\r
+       /**\r
+        * @remarks   input7: [1.calling xmlSAX2GetEntity Api, N/A]     @n\r
+        *                                      {ctxt,"foo"} => {N/A |xmlEntityPtr}     @n\r
+        */\r
+       ctxt->inSubset = 1;\r
+       pEntity = xmlSAX2GetEntity(ctxt, (const xmlChar*)"foo");\r
+       MT_CHECK_MESSAGE("checking the result for xmlSAX2GetEntity", pEntity != NULL);\r
+       /*if (pEntity != NULL)\r
+               delete pEntity;*/\r
+       /**\r
+        * @remarks   input8: [1.calling xmlSAX2GetEntity Api, N/A]     @n\r
+        *                                      {ctxt,"foo"} => {N/A |xmlEntityPtr}     @n\r
+        */\r
+       ctxt->inSubset = 0;\r
+       pEntity = xmlSAX2GetEntity(ctxt, (const xmlChar*)"foo");\r
+       MT_CHECK_MESSAGE("checking the result for xmlSAX2GetEntity", pEntity != NULL);\r
+       /*if (pEntity != NULL)\r
+               delete pEntity;*/\r
+       xmlSAX2EndDocument(ctxt);\r
+       /**\r
+        * @post Cleanup function for the XML library.\r
+        */\r
+       delete pData;\r
+       //xmlMemFree(ctxt->myDoc);\r
+       xmlFreeDoc(ctxt->myDoc);\r
+       xmlFreeParserCtxt(ctxt);\r
+       xmlMemFree(pSaxHandler);\r
+}\r
+/**    \r
+       * @test                 UTcSaxP08\r
+       * @brief                xmlParserInputPtr xmlSAX2ResolveEntity (void * ctx,const xmlChar * publicId, const xmlChar * systemId)\r
+       * @desc                 Positive Test for checking the functionality of the entity loader, to control the loading of external entities\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [1.xmlParserCtxtPtr is created, N/A]    @n\r
+                                       {ctxt,const xmlChar * "foo",const xmlChar * "foo"} => {N/A |xmlParserInputPtr}  @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcSaxP08()\r
+{\r
+       xmlEntityPtr ret_val = NULL;\r
+       xmlErrorPtr                             pError;\r
+       xmlParserCtxtPtr ctxt = NULL; /* the user data (XML parser context) */\r
+       int n_ctx;\r
+       xmlChar * name = NULL; /* The entity name */\r
+       int n_name;\r
+\r
+       \r
+\r
+       for (n_ctx = 0;n_ctx < gen_nb_xmlParserCtxtPtr;n_ctx++) {\r
+               for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {\r
+\r
+                       ctxt = gen_xmlParserCtxtPtr(n_ctx, 0);\r
+                       name = gen_const_xmlChar_ptr(n_name, 1);\r
+\r
+\r
+                       xmlResetLastError();\r
+                       xmlSAX2NotationDecl(ctxt, (const xmlChar *)name, (const xmlChar *)name, (const xmlChar *)name);\r
+                       pError = xmlGetLastError();\r
+                       MT_CHECK_MESSAGE("checking the result for xmlSAX2NotationDecl", pError == NULL);\r
+\r
+                       ret_val = xmlSAX2GetParameterEntity(ctxt, (const xmlChar *)name);\r
+                       MT_CHECK_MESSAGE("checking the result for xmlSAX2GetParameterEntity", ret_val == NULL);\r
+\r
+                       xmlResetLastError();\r
+                       /**\r
+                        * @remarks   input1: [1.xmlParserCtxtPtr is created, N/A]      @n\r
+                        *                                      {ctxt,"foo","foo"} => {N/A |xmlParserInputPtr}  @n\r
+                        */\r
+                       xmlParserInputPtr parserInputPtr = xmlSAX2ResolveEntity(ctxt,(const xmlChar *)name,(const xmlChar *)name);\r
+                       MT_CHECK_MESSAGE("checking the result for xmlSAX2ResolveEntity", parserInputPtr == NULL);\r
+\r
+                       xmlResetLastError();\r
+                       xmlSAX2AttributeDecl(ctxt,(const xmlChar *)name,(const xmlChar*)"xml:id",1,1,(const xmlChar *)name,NULL);\r
+                       xmlResetLastError();\r
+\r
+                       /*xmlFreeInputStream(parserInputPtr);\r
+                       xmlFree(name);*/\r
+                       xmlFreeDoc(ctxt->myDoc);\r
+                       xmlFreeParserCtxt(ctxt);\r
+                                       \r
+               }\r
+       }\r
+       /**\r
+        * @post Cleanup function for the XML library.\r
+        */\r
+\r
+}\r
+\r
+#endif\r
+static void startup( void);\r
+static void cleanup( void);\r
+\r
+void (*tet_startup)( void) = startup;\r
+void (*tet_cleanup)( void) = cleanup;\r
+\r
+static void startup( void)\r
+{\r
+        /* start of TC */\r
+        tet_printf("TC starts.");\r
+}\r
+\r
+static void cleanup( void)\r
+{\r
+        /* end of TC */\r
+        tet_printf("TC ends.");\r
+}\r
+\r
+struct tet_testlist tet_testlist[] = {\r
+       // Handling of out of context errors\r
+       {UTcSaxP01,1},\r
+       #if 0\r
+       {UTcSaxP02,2},\r
+       {UTcSaxP03,4},\r
+       {UTcSaxP04,5},\r
+       {UTcSaxP05,6},\r
+       {UTcSaxP06,7},\r
+       {UTcSaxP07,8},\r
+       {UTcSaxP08,9},\r
+       #endif\r
+       { NULL, 0 },\r
+       \r
+};\r
+\r
+\r
+#else\r
+\r
+static int call_tests = 0;\r
+static int function_tests = 0;\r
+static xmlChar chartab[1024];\r
+\r
+#define gen_nb_void_ptr 2\r
+\r
+static void *gen_void_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+    return(NULL);\r
+}\r
+static void desret_const_xmlChar_ptr(const xmlChar *val ATTRIBUTE_UNUSED) {\r
+}\r
+\r
+static void desret_int(int val) {\r
+       DTS_CHECK_EQ_MESSAGE("desret_int", (void *)val, (void *)0, "desret_int Failed");\r
+}\r
+\r
+static void desret_xmlParserInputPtr(xmlParserInputPtr val) {\r
+    xmlFreeInputStream(val);\r
+}\r
+\r
+static void\r
+test_docbDefaultSAXHandlerInit(void) {\r
+    int test_ret = 0;\r
+\r
+#if defined(LIBXML_DOCB_ENABLED)\r
+#ifdef LIBXML_DOCB_ENABLED\r
+    int mem_base;\r
+\r
+        mem_base = xmlMemBlocks();\r
+\r
+        docbDefaultSAXHandlerInit();\r
+        DTS_CHECK_EQ_MESSAGE("test_docbDefaultSAXHandlerInit", (void *)1, (void *)1, "docbDefaultSAXHandlerInit Failed");\r
+        call_tests++;\r
+        xmlResetLastError();\r
+        if (mem_base != xmlMemBlocks()) {\r
+            printf("Leak of %d blocks found in docbDefaultSAXHandlerInit",\r
+                  xmlMemBlocks() - mem_base);\r
+           test_ret++;\r
+            printf("\n");\r
+        }\r
+    function_tests++;\r
+#endif\r
+#endif\r
+\r
+//    return(test_ret);\r
+}\r
+\r
+\r
+static void\r
+test_htmlDefaultSAXHandlerInit(void) {\r
+    int test_ret = 0;\r
+\r
+#if defined(LIBXML_HTML_ENABLED)\r
+#ifdef LIBXML_HTML_ENABLED\r
+    int mem_base;\r
+\r
+        mem_base = xmlMemBlocks();\r
+\r
+        htmlDefaultSAXHandlerInit();\r
+       DTS_CHECK_EQ_MESSAGE("test_htmlDefaultSAXHandlerInit", (void *)1, (void *)1, "htmlDefaultSAXHandlerInit Failed");\r
+        call_tests++;\r
+        xmlResetLastError();\r
+        if (mem_base != xmlMemBlocks()) {\r
+            printf("Leak of %d blocks found in htmlDefaultSAXHandlerInit",\r
+                  xmlMemBlocks() - mem_base);\r
+           test_ret++;\r
+            printf("\n");\r
+        }\r
+    function_tests++;\r
+#endif\r
+#endif\r
+\r
+   // return(test_ret);\r
+}\r
+\r
+\r
+static void\r
+test_xmlDefaultSAXHandlerInit(void) {\r
+    int test_ret = 0;\r
+\r
+    int mem_base;\r
+\r
+        mem_base = xmlMemBlocks();\r
+\r
+        xmlDefaultSAXHandlerInit();\r
+       DTS_CHECK_EQ_MESSAGE("test_xmlDefaultSAXHandlerInit", (void *)1, (void *)1, "xmlDefaultSAXHandlerInit Failed");\r
+        call_tests++;\r
+        xmlResetLastError();\r
+        if (mem_base != xmlMemBlocks()) {\r
+            printf("Leak of %d blocks found in xmlDefaultSAXHandlerInit",\r
+                  xmlMemBlocks() - mem_base);\r
+           test_ret++;\r
+            printf("\n");\r
+        }\r
+    function_tests++;\r
+\r
+   // return(test_ret);\r
+}\r
+\r
+#define gen_nb_xmlElementContentPtr 1\r
+static xmlElementContentPtr gen_xmlElementContentPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+    return(NULL);\r
+}\r
+static void des_xmlElementContentPtr(int no ATTRIBUTE_UNUSED, xmlElementContentPtr val, int nr ATTRIBUTE_UNUSED) {\r
+    if (val != NULL)\r
+        xmlFreeElementContent(val);\r
+}\r
+static void desret_xmlElementContentPtr(xmlElementContentPtr val) {\r
+    if (val != NULL)\r
+        xmlFreeElementContent(val);\r
+}\r
+\r
+#define gen_nb_xmlEnumerationPtr 1\r
+static xmlEnumerationPtr gen_xmlEnumerationPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+    return(NULL);\r
+}\r
+static void des_xmlEnumerationPtr(int no ATTRIBUTE_UNUSED, xmlEnumerationPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+}\r
+\r
+#define gen_nb_int 4\r
+\r
+static int gen_int(int no, int nr ATTRIBUTE_UNUSED) {\r
+    if (no == 0) return(0);\r
+    if (no == 1) return(1);\r
+    if (no == 2) return(-1);\r
+    if (no == 3) return(122);\r
+    return(-1);\r
+}\r
+\r
+static void des_int(int no ATTRIBUTE_UNUSED, int val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+}\r
+\r
+#define gen_nb_xmlChar_ptr 2\r
+\r
+static xmlChar *gen_xmlChar_ptr(int no, int nr ATTRIBUTE_UNUSED) {\r
+    if (no == 0) return(&chartab[0]);\r
+    return(NULL);\r
+}\r
+static void des_xmlChar_ptr(int no ATTRIBUTE_UNUSED, xmlChar *val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+}\r
+\r
+#define gen_nb_FILE_ptr 2\r
+\r
+static FILE *gen_FILE_ptr(int no, int nr ATTRIBUTE_UNUSED) {\r
+    if (no == 0) return(fopen("test.out", "a+"));\r
+    return(NULL);\r
+}\r
+static void des_FILE_ptr(int no ATTRIBUTE_UNUSED, FILE *val, int nr ATTRIBUTE_UNUSED) {\r
+    if (val != NULL) fclose(val);\r
+}\r
+\r
+static void\r
+test_xmlSAX2AttributeDecl(void) {\r
+    int test_ret = 0;\r
+\r
+    int mem_base;\r
+    void * ctx; /* the user data (XML parser context) */\r
+    int n_ctx;\r
+    xmlChar * elem; /* the name of the element */\r
+    int n_elem;\r
+    xmlChar * fullname; /* the attribute name */\r
+    int n_fullname;\r
+    int type; /* the attribute type */\r
+    int n_type;\r
+    int def; /* the type of default value */\r
+    int n_def;\r
+    xmlChar * defaultValue; /* the attribute default value */\r
+    int n_defaultValue;\r
+    xmlEnumerationPtr tree; /* the tree of enumerated value set */\r
+    int n_tree;\r
+\r
+    for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {\r
+    for (n_elem = 0;n_elem < gen_nb_const_xmlChar_ptr;n_elem++) {\r
+    for (n_fullname = 0;n_fullname < gen_nb_const_xmlChar_ptr;n_fullname++) {\r
+    for (n_type = 0;n_type < gen_nb_int;n_type++) {\r
+    for (n_def = 0;n_def < gen_nb_int;n_def++) {\r
+    for (n_defaultValue = 0;n_defaultValue < gen_nb_const_xmlChar_ptr;n_defaultValue++) {\r
+    for (n_tree = 0;n_tree < gen_nb_xmlEnumerationPtr;n_tree++) {\r
+        mem_base = xmlMemBlocks();\r
+        ctx = gen_void_ptr(n_ctx, 0);\r
+        elem = gen_const_xmlChar_ptr(n_elem, 1);\r
+        fullname = gen_const_xmlChar_ptr(n_fullname, 2);\r
+        type = gen_int(n_type, 3);\r
+        def = gen_int(n_def, 4);\r
+        defaultValue = gen_const_xmlChar_ptr(n_defaultValue, 5);\r
+        tree = gen_xmlEnumerationPtr(n_tree, 6);\r
+\r
+        xmlSAX2AttributeDecl(ctx, (const xmlChar *)elem, (const xmlChar *)fullname, type, def, (const xmlChar *)defaultValue, tree);\r
+       DTS_CHECK_EQ_MESSAGE("test_xmlSAX2AttributeDecl", (void *)1, (void *)1, "xmlSAX2AttributeDecl Failed");\r
+       \r
+        call_tests++;\r
+        des_void_ptr(n_ctx, ctx, 0);\r
+        des_const_xmlChar_ptr(n_elem, (const xmlChar *)elem, 1);\r
+        des_const_xmlChar_ptr(n_fullname, (const xmlChar *)fullname, 2);\r
+        des_int(n_type, type, 3);\r
+        des_int(n_def, def, 4);\r
+        des_const_xmlChar_ptr(n_defaultValue, (const xmlChar *)defaultValue, 5);\r
+        des_xmlEnumerationPtr(n_tree, tree, 6);\r
+        xmlResetLastError();\r
+        if (mem_base != xmlMemBlocks()) {\r
+            printf("Leak of %d blocks found in xmlSAX2AttributeDecl",\r
+                  xmlMemBlocks() - mem_base);\r
+           test_ret++;\r
+            printf(" %d", n_ctx);\r
+            printf(" %d", n_elem);\r
+            printf(" %d", n_fullname);\r
+            printf(" %d", n_type);\r
+            printf(" %d", n_def);\r
+            printf(" %d", n_defaultValue);\r
+            printf(" %d", n_tree);\r
+            printf("\n");\r
+        }\r
+    }\r
+    }\r
+    }\r
+    }\r
+    }\r
+    }\r
+    }\r
+    function_tests++;\r
+\r
+   // return(test_ret);\r
+}\r
+\r
+\r
+static void\r
+test_xmlSAX2CDataBlock(void) {\r
+    int test_ret = 0;\r
+\r
+    int mem_base;\r
+    void * ctx; /* the user data (XML parser context) */\r
+    int n_ctx;\r
+    xmlChar * value; /* The pcdata content */\r
+    int n_value;\r
+    int len; /* the block length */\r
+    int n_len;\r
+\r
+    for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {\r
+    for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {\r
+    for (n_len = 0;n_len < gen_nb_int;n_len++) {\r
+        mem_base = xmlMemBlocks();\r
+        ctx = gen_void_ptr(n_ctx, 0);\r
+        value = gen_const_xmlChar_ptr(n_value, 1);\r
+        len = gen_int(n_len, 2);\r
+\r
+        xmlSAX2CDataBlock(ctx, (const xmlChar *)value, len);\r
+               DTS_CHECK_EQ_MESSAGE("test_xmlSAX2CDataBlock", (void *)1, (void *)1, "xmlSAX2CDataBlock Failed");\r
+        call_tests++;\r
+        des_void_ptr(n_ctx, ctx, 0);\r
+        des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 1);\r
+        des_int(n_len, len, 2);\r
+        xmlResetLastError();\r
+        if (mem_base != xmlMemBlocks()) {\r
+            printf("Leak of %d blocks found in xmlSAX2CDataBlock",\r
+                  xmlMemBlocks() - mem_base);\r
+           test_ret++;\r
+            printf(" %d", n_ctx);\r
+            printf(" %d", n_value);\r
+            printf(" %d", n_len);\r
+            printf("\n");\r
+        }\r
+    }\r
+    }\r
+    }\r
+    function_tests++;\r
+\r
+//    return(test_ret);\r
+}\r
+\r
+\r
+static void\r
+test_xmlSAX2Characters(void) {\r
+    int test_ret = 0;\r
+\r
+    int mem_base;\r
+    void * ctx; /* the user data (XML parser context) */\r
+    int n_ctx;\r
+    xmlChar * ch; /* a xmlChar string */\r
+    int n_ch;\r
+    int len; /* the number of xmlChar */\r
+    int n_len;\r
+\r
+    for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {\r
+    for (n_ch = 0;n_ch < gen_nb_const_xmlChar_ptr;n_ch++) {\r
+    for (n_len = 0;n_len < gen_nb_int;n_len++) {\r
+        mem_base = xmlMemBlocks();\r
+        ctx = gen_void_ptr(n_ctx, 0);\r
+        ch = gen_const_xmlChar_ptr(n_ch, 1);\r
+        len = gen_int(n_len, 2);\r
+\r
+        xmlSAX2Characters(ctx, (const xmlChar *)ch, len);\r
+               DTS_CHECK_EQ_MESSAGE("test_xmlSAX2Characters", (void *)1, (void *)1, "xmlSAX2Characters Failed");\r
+        call_tests++;\r
+        des_void_ptr(n_ctx, ctx, 0);\r
+        des_const_xmlChar_ptr(n_ch, (const xmlChar *)ch, 1);\r
+        des_int(n_len, len, 2);\r
+        xmlResetLastError();\r
+        if (mem_base != xmlMemBlocks()) {\r
+            printf("Leak of %d blocks found in xmlSAX2Characters",\r
+                  xmlMemBlocks() - mem_base);\r
+           test_ret++;\r
+            printf(" %d", n_ctx);\r
+            printf(" %d", n_ch);\r
+            printf(" %d", n_len);\r
+            printf("\n");\r
+        }\r
+    }\r
+    }\r
+    }\r
+    function_tests++;\r
+\r
+   // return(test_ret);\r
+}\r
+\r
+\r
+static void\r
+test_xmlSAX2Comment(void) {\r
+    int test_ret = 0;\r
+\r
+    int mem_base;\r
+    void * ctx; /* the user data (XML parser context) */\r
+    int n_ctx;\r
+    xmlChar * value; /* the xmlSAX2Comment content */\r
+    int n_value;\r
+\r
+    for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {\r
+    for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {\r
+        mem_base = xmlMemBlocks();\r
+        ctx = gen_void_ptr(n_ctx, 0);\r
+        value = gen_const_xmlChar_ptr(n_value, 1);\r
+\r
+        xmlSAX2Comment(ctx, (const xmlChar *)value);\r
+               DTS_CHECK_EQ_MESSAGE("xmlSAX2Comment", (void *)1, (void *)1, "xmlSAX2Comment Failed");\r
+        call_tests++;\r
+        des_void_ptr(n_ctx, ctx, 0);\r
+        des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 1);\r
+        xmlResetLastError();\r
+        if (mem_base != xmlMemBlocks()) {\r
+            printf("Leak of %d blocks found in xmlSAX2Comment",\r
+                  xmlMemBlocks() - mem_base);\r
+           test_ret++;\r
+            printf(" %d", n_ctx);\r
+            printf(" %d", n_value);\r
+            printf("\n");\r
+        }\r
+    }\r
+    }\r
+    function_tests++;\r
+\r
+   // return(test_ret);\r
+}\r
+\r
+\r
+static void\r
+test_xmlSAX2ElementDecl(void) {\r
+    int test_ret = 0;\r
+\r
+    int mem_base;\r
+    void * ctx; /* the user data (XML parser context) */\r
+    int n_ctx;\r
+    xmlChar * name; /* the element name */\r
+    int n_name;\r
+    int type; /* the element type */\r
+    int n_type;\r
+    xmlElementContentPtr content; /* the element value tree */\r
+    int n_content;\r
+\r
+    for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {\r
+    for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {\r
+    for (n_type = 0;n_type < gen_nb_int;n_type++) {\r
+    for (n_content = 0;n_content < gen_nb_xmlElementContentPtr;n_content++) {\r
+        mem_base = xmlMemBlocks();\r
+        ctx = gen_void_ptr(n_ctx, 0);\r
+        name = gen_const_xmlChar_ptr(n_name, 1);\r
+        type = gen_int(n_type, 2);\r
+        content = gen_xmlElementContentPtr(n_content, 3);\r
+\r
+        xmlSAX2ElementDecl(ctx, (const xmlChar *)name, type, content);\r
+       DTS_CHECK_EQ_MESSAGE("xmlSAX2ElementDecl", (void *)1, (void *)1, "xmlSAX2ElementDecl Failed");\r
+        call_tests++;\r
+        des_void_ptr(n_ctx, ctx, 0);\r
+        des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);\r
+        des_int(n_type, type, 2);\r
+        des_xmlElementContentPtr(n_content, content, 3);\r
+        xmlResetLastError();\r
+        if (mem_base != xmlMemBlocks()) {\r
+            printf("Leak of %d blocks found in xmlSAX2ElementDecl",\r
+                  xmlMemBlocks() - mem_base);\r
+           test_ret++;\r
+            printf(" %d", n_ctx);\r
+            printf(" %d", n_name);\r
+            printf(" %d", n_type);\r
+            printf(" %d", n_content);\r
+            printf("\n");\r
+        }\r
+    }\r
+    }\r
+    }\r
+    }\r
+    function_tests++;\r
+\r
+    //return(test_ret);\r
+}\r
+\r
+\r
+static void\r
+test_xmlSAX2EndDocument(void) {\r
+    int test_ret = 0;\r
+\r
+    int mem_base;\r
+    void * ctx; /* the user data (XML parser context) */\r
+    int n_ctx;\r
+\r
+    for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {\r
+        mem_base = xmlMemBlocks();\r
+        ctx = gen_void_ptr(n_ctx, 0);\r
+\r
+        xmlSAX2EndDocument(ctx);\r
+               DTS_CHECK_EQ_MESSAGE("xmlSAX2EndDocument", (void *)1, (void *)1, "xmlSAX2EndDocument Failed");\r
+        call_tests++;\r
+        des_void_ptr(n_ctx, ctx, 0);\r
+        xmlResetLastError();\r
+        if (mem_base != xmlMemBlocks()) {\r
+            printf("Leak of %d blocks found in xmlSAX2EndDocument",\r
+                  xmlMemBlocks() - mem_base);\r
+           test_ret++;\r
+            printf(" %d", n_ctx);\r
+            printf("\n");\r
+        }\r
+    }\r
+    function_tests++;\r
+\r
+    return(test_ret);\r
+}\r
+\r
+\r
+static void\r
+test_xmlSAX2EndElement(void) {\r
+    int test_ret = 0;\r
+\r
+#if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED)\r
+#ifdef LIBXML_SAX1_ENABLED\r
+    int mem_base;\r
+    void * ctx; /* the user data (XML parser context) */\r
+    int n_ctx;\r
+    xmlChar * name; /* The element name */\r
+    int n_name;\r
+\r
+    for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {\r
+    for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {\r
+        mem_base = xmlMemBlocks();\r
+        ctx = gen_void_ptr(n_ctx, 0);\r
+        name = gen_const_xmlChar_ptr(n_name, 1);\r
+\r
+        xmlSAX2EndElement(ctx, (const xmlChar *)name);\r
+               DTS_CHECK_EQ_MESSAGE("xmlSAX2EndElement", (void *)1, (void *)1, "xmlSAX2EndElement Failed");\r
+        call_tests++;\r
+        des_void_ptr(n_ctx, ctx, 0);\r
+        des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);\r
+        xmlResetLastError();\r
+        if (mem_base != xmlMemBlocks()) {\r
+            printf("Leak of %d blocks found in xmlSAX2EndElement",\r
+                  xmlMemBlocks() - mem_base);\r
+           test_ret++;\r
+            printf(" %d", n_ctx);\r
+            printf(" %d", n_name);\r
+            printf("\n");\r
+        }\r
+    }\r
+    }\r
+    function_tests++;\r
+#endif\r
+#endif\r
+\r
+   // return(test_ret);\r
+}\r
+\r
+\r
+static void\r
+test_xmlSAX2EndElementNs(void) {\r
+    int test_ret = 0;\r
+\r
+    int mem_base;\r
+    void * ctx; /* the user data (XML parser context) */\r
+    int n_ctx;\r
+    xmlChar * localname; /* the local name of the element */\r
+    int n_localname;\r
+    xmlChar * prefix; /* the element namespace prefix if available */\r
+    int n_prefix;\r
+    xmlChar * URI; /* the element namespace name if available */\r
+    int n_URI;\r
+\r
+    for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {\r
+    for (n_localname = 0;n_localname < gen_nb_const_xmlChar_ptr;n_localname++) {\r
+    for (n_prefix = 0;n_prefix < gen_nb_const_xmlChar_ptr;n_prefix++) {\r
+    for (n_URI = 0;n_URI < gen_nb_const_xmlChar_ptr;n_URI++) {\r
+        mem_base = xmlMemBlocks();\r
+        ctx = gen_void_ptr(n_ctx, 0);\r
+        localname = gen_const_xmlChar_ptr(n_localname, 1);\r
+        prefix = gen_const_xmlChar_ptr(n_prefix, 2);\r
+        URI = gen_const_xmlChar_ptr(n_URI, 3);\r
+\r
+        xmlSAX2EndElementNs(ctx, (const xmlChar *)localname, (const xmlChar *)prefix, (const xmlChar *)URI);\r
+               DTS_CHECK_EQ_MESSAGE("xmlSAX2EndElementNs", (void *)1, (void *)1, "xmlSAX2EndElementNs Failed");\r
+        call_tests++;\r
+        des_void_ptr(n_ctx, ctx, 0);\r
+        des_const_xmlChar_ptr(n_localname, (const xmlChar *)localname, 1);\r
+        des_const_xmlChar_ptr(n_prefix, (const xmlChar *)prefix, 2);\r
+        des_const_xmlChar_ptr(n_URI, (const xmlChar *)URI, 3);\r
+        xmlResetLastError();\r
+        if (mem_base != xmlMemBlocks()) {\r
+            printf("Leak of %d blocks found in xmlSAX2EndElementNs",\r
+                  xmlMemBlocks() - mem_base);\r
+           test_ret++;\r
+            printf(" %d", n_ctx);\r
+            printf(" %d", n_localname);\r
+            printf(" %d", n_prefix);\r
+            printf(" %d", n_URI);\r
+            printf("\n");\r
+        }\r
+    }\r
+    }\r
+    }\r
+    }\r
+    function_tests++;\r
+\r
+  //  return(test_ret);\r
+}\r
+\r
+\r
+static void\r
+test_xmlSAX2EntityDecl(void) {\r
+    int test_ret = 0;\r
+\r
+    int mem_base;\r
+    void * ctx; /* the user data (XML parser context) */\r
+    int n_ctx;\r
+    xmlChar * name; /* the entity name */\r
+    int n_name;\r
+    int type; /* the entity type */\r
+    int n_type;\r
+    xmlChar * publicId; /* The public ID of the entity */\r
+    int n_publicId;\r
+    xmlChar * systemId; /* The system ID of the entity */\r
+    int n_systemId;\r
+    xmlChar * content; /* the entity value (without processing). */\r
+    int n_content;\r
+\r
+    for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {\r
+    for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {\r
+    for (n_type = 0;n_type < gen_nb_int;n_type++) {\r
+    for (n_publicId = 0;n_publicId < gen_nb_const_xmlChar_ptr;n_publicId++) {\r
+    for (n_systemId = 0;n_systemId < gen_nb_const_xmlChar_ptr;n_systemId++) {\r
+    for (n_content = 0;n_content < gen_nb_xmlChar_ptr;n_content++) {\r
+        mem_base = xmlMemBlocks();\r
+        ctx = gen_void_ptr(n_ctx, 0);\r
+        name = gen_const_xmlChar_ptr(n_name, 1);\r
+        type = gen_int(n_type, 2);\r
+        publicId = gen_const_xmlChar_ptr(n_publicId, 3);\r
+        systemId = gen_const_xmlChar_ptr(n_systemId, 4);\r
+        content = gen_xmlChar_ptr(n_content, 5);\r
+\r
+        xmlSAX2EntityDecl(ctx, (const xmlChar *)name, type, (const xmlChar *)publicId, (const xmlChar *)systemId, content);\r
+               DTS_CHECK_EQ_MESSAGE("xmlSAX2EntityDecl", (void *)1, (void *)1, "xmlSAX2EntityDecl Failed");\r
+        call_tests++;\r
+        des_void_ptr(n_ctx, ctx, 0);\r
+        des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);\r
+        des_int(n_type, type, 2);\r
+        des_const_xmlChar_ptr(n_publicId, (const xmlChar *)publicId, 3);\r
+        des_const_xmlChar_ptr(n_systemId, (const xmlChar *)systemId, 4);\r
+        des_xmlChar_ptr(n_content, content, 5);\r
+        xmlResetLastError();\r
+        if (mem_base != xmlMemBlocks()) {\r
+            printf("Leak of %d blocks found in xmlSAX2EntityDecl",\r
+                  xmlMemBlocks() - mem_base);\r
+           test_ret++;\r
+            printf(" %d", n_ctx);\r
+            printf(" %d", n_name);\r
+            printf(" %d", n_type);\r
+            printf(" %d", n_publicId);\r
+            printf(" %d", n_systemId);\r
+            printf(" %d", n_content);\r
+            printf("\n");\r
+        }\r
+    }\r
+    }\r
+    }\r
+    }\r
+    }\r
+    }\r
+    function_tests++;\r
+\r
+   // return(test_ret);\r
+}\r
+\r
+\r
+static void\r
+test_xmlSAX2ExternalSubset(void) {\r
+    int test_ret = 0;\r
+\r
+    int mem_base;\r
+    void * ctx; /* the user data (XML parser context) */\r
+    int n_ctx;\r
+    xmlChar * name; /* the root element name */\r
+    int n_name;\r
+    xmlChar * ExternalID; /* the external ID */\r
+    int n_ExternalID;\r
+    xmlChar * SystemID; /* the SYSTEM ID (e.g. filename or URL) */\r
+    int n_SystemID;\r
+\r
+    for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {\r
+    for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {\r
+    for (n_ExternalID = 0;n_ExternalID < gen_nb_const_xmlChar_ptr;n_ExternalID++) {\r
+    for (n_SystemID = 0;n_SystemID < gen_nb_const_xmlChar_ptr;n_SystemID++) {\r
+        mem_base = xmlMemBlocks();\r
+        ctx = gen_void_ptr(n_ctx, 0);\r
+        name = gen_const_xmlChar_ptr(n_name, 1);\r
+        ExternalID = gen_const_xmlChar_ptr(n_ExternalID, 2);\r
+        SystemID = gen_const_xmlChar_ptr(n_SystemID, 3);\r
+\r
+        xmlSAX2ExternalSubset(ctx, (const xmlChar *)name, (const xmlChar *)ExternalID, (const xmlChar *)SystemID);\r
+               DTS_CHECK_EQ_MESSAGE("xmlSAX2ExternalSubset", (void *)1, (void *)1, "xmlSAX2ExternalSubset Failed");\r
+        call_tests++;\r
+        des_void_ptr(n_ctx, ctx, 0);\r
+        des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);\r
+        des_const_xmlChar_ptr(n_ExternalID, (const xmlChar *)ExternalID, 2);\r
+        des_const_xmlChar_ptr(n_SystemID, (const xmlChar *)SystemID, 3);\r
+        xmlResetLastError();\r
+        if (mem_base != xmlMemBlocks()) {\r
+            printf("Leak of %d blocks found in xmlSAX2ExternalSubset",\r
+                  xmlMemBlocks() - mem_base);\r
+           test_ret++;\r
+            printf(" %d", n_ctx);\r
+            printf(" %d", n_name);\r
+            printf(" %d", n_ExternalID);\r
+            printf(" %d", n_SystemID);\r
+            printf("\n");\r
+        }\r
+    }\r
+    }\r
+    }\r
+    }\r
+    function_tests++;\r
+\r
+//    return(test_ret);\r
+}\r
+\r
+\r
+static void\r
+test_xmlSAX2GetColumnNumber(void) {\r
+    int test_ret = 0;\r
+\r
+    int mem_base;\r
+    int ret_val;\r
+    void * ctx; /* the user data (XML parser context) */\r
+    int n_ctx;\r
+\r
+    for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {\r
+        mem_base = xmlMemBlocks();\r
+        ctx = gen_void_ptr(n_ctx, 0);\r
+\r
+        ret_val = xmlSAX2GetColumnNumber(ctx);\r
+               DTS_CHECK_EQ_MESSAGE("xmlSAX2GetColumnNumber", (void *)1, (void *)1, "xmlSAX2GetColumnNumber Failed");\r
+        desret_int(ret_val);\r
+        call_tests++;\r
+        des_void_ptr(n_ctx, ctx, 0);\r
+        xmlResetLastError();\r
+        if (mem_base != xmlMemBlocks()) {\r
+            printf("Leak of %d blocks found in xmlSAX2GetColumnNumber",\r
+                  xmlMemBlocks() - mem_base);\r
+           test_ret++;\r
+            printf(" %d", n_ctx);\r
+            printf("\n");\r
+        }\r
+    }\r
+    function_tests++;\r
+\r
+ //   return(test_ret);\r
+}\r
+\r
+\r
+static void\r
+test_xmlSAX2GetEntity(void) {\r
+    int test_ret = 0;\r
+\r
+    int mem_base;\r
+    xmlEntityPtr ret_val;\r
+    void * ctx; /* the user data (XML parser context) */\r
+    int n_ctx;\r
+    xmlChar * name; /* The entity name */\r
+    int n_name;\r
+\r
+    for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {\r
+    for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {\r
+        mem_base = xmlMemBlocks();\r
+        ctx = gen_void_ptr(n_ctx, 0);\r
+        name = gen_const_xmlChar_ptr(n_name, 1);\r
+\r
+        ret_val = xmlSAX2GetEntity(ctx, (const xmlChar *)name);\r
+               DTS_CHECK_EQ_MESSAGE("xmlSAX2GetEntity", (void *)1, (void *)1, "xmlSAX2GetEntity Failed");\r
+        desret_xmlEntityPtr(ret_val);\r
+        call_tests++;\r
+        des_void_ptr(n_ctx, ctx, 0);\r
+        des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);\r
+        xmlResetLastError();\r
+        if (mem_base != xmlMemBlocks()) {\r
+            printf("Leak of %d blocks found in xmlSAX2GetEntity",\r
+                  xmlMemBlocks() - mem_base);\r
+           test_ret++;\r
+            printf(" %d", n_ctx);\r
+            printf(" %d", n_name);\r
+            printf("\n");\r
+        }\r
+    }\r
+    }\r
+    function_tests++;\r
+\r
+    //return(test_ret);\r
+}\r
+\r
+\r
+static void\r
+test_xmlSAX2GetLineNumber(void) {\r
+    int test_ret = 0;\r
+\r
+    int mem_base;\r
+    int ret_val;\r
+    void * ctx; /* the user data (XML parser context) */\r
+    int n_ctx;\r
+\r
+    for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {\r
+        mem_base = xmlMemBlocks();\r
+        ctx = gen_void_ptr(n_ctx, 0);\r
+\r
+        ret_val = xmlSAX2GetLineNumber(ctx);\r
+               DTS_CHECK_EQ_MESSAGE("xmlSAX2GetLineNumber", (void *)1, (void *)1, "xmlSAX2GetLineNumber Failed");\r
+        desret_int(ret_val);\r
+        call_tests++;\r
+        des_void_ptr(n_ctx, ctx, 0);\r
+        xmlResetLastError();\r
+        if (mem_base != xmlMemBlocks()) {\r
+            printf("Leak of %d blocks found in xmlSAX2GetLineNumber",\r
+                  xmlMemBlocks() - mem_base);\r
+           test_ret++;\r
+            printf(" %d", n_ctx);\r
+            printf("\n");\r
+        }\r
+    }\r
+    function_tests++;\r
+\r
+    //return(test_ret);\r
+}\r
+\r
+\r
+static void\r
+test_xmlSAX2GetParameterEntity(void) {\r
+    int test_ret = 0;\r
+\r
+    int mem_base;\r
+    xmlEntityPtr ret_val;\r
+    void * ctx; /* the user data (XML parser context) */\r
+    int n_ctx;\r
+    xmlChar * name; /* The entity name */\r
+    int n_name;\r
+\r
+    for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {\r
+    for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {\r
+        mem_base = xmlMemBlocks();\r
+        ctx = gen_void_ptr(n_ctx, 0);\r
+        name = gen_const_xmlChar_ptr(n_name, 1);\r
+\r
+        ret_val = xmlSAX2GetParameterEntity(ctx, (const xmlChar *)name);\r
+               DTS_CHECK_EQ_MESSAGE("xmlSAX2GetParameterEntity", (void *)1, (void *)1, "xmlSAX2GetParameterEntity Failed");\r
+        desret_xmlEntityPtr(ret_val);\r
+        call_tests++;\r
+        des_void_ptr(n_ctx, ctx, 0);\r
+        des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);\r
+        xmlResetLastError();\r
+        if (mem_base != xmlMemBlocks()) {\r
+            printf("Leak of %d blocks found in xmlSAX2GetParameterEntity",\r
+                  xmlMemBlocks() - mem_base);\r
+           test_ret++;\r
+            printf(" %d", n_ctx);\r
+            printf(" %d", n_name);\r
+            printf("\n");\r
+        }\r
+    }\r
+    }\r
+    function_tests++;\r
+\r
+    //return(test_ret);\r
+}\r
+\r
+\r
+static void\r
+test_xmlSAX2GetPublicId(void) {\r
+    int test_ret = 0;\r
+\r
+    int mem_base;\r
+    const xmlChar * ret_val;\r
+    void * ctx; /* the user data (XML parser context) */\r
+    int n_ctx;\r
+\r
+    for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {\r
+        mem_base = xmlMemBlocks();\r
+        ctx = gen_void_ptr(n_ctx, 0);\r
+\r
+        ret_val = xmlSAX2GetPublicId(ctx);\r
+               DTS_CHECK_EQ_MESSAGE("xmlSAX2GetPublicId", (void *)1, (void *)1, "xmlSAX2GetPublicId Failed");\r
+        desret_const_xmlChar_ptr(ret_val);\r
+        call_tests++;\r
+        des_void_ptr(n_ctx, ctx, 0);\r
+        xmlResetLastError();\r
+        if (mem_base != xmlMemBlocks()) {\r
+            printf("Leak of %d blocks found in xmlSAX2GetPublicId",\r
+                  xmlMemBlocks() - mem_base);\r
+           test_ret++;\r
+            printf(" %d", n_ctx);\r
+            printf("\n");\r
+        }\r
+    }\r
+    function_tests++;\r
+\r
+    //return(test_ret);\r
+}\r
+\r
+\r
+static void\r
+test_xmlSAX2GetSystemId(void) {\r
+    int test_ret = 0;\r
+\r
+    int mem_base;\r
+    const xmlChar * ret_val;\r
+    void * ctx; /* the user data (XML parser context) */\r
+    int n_ctx;\r
+\r
+    for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {\r
+        mem_base = xmlMemBlocks();\r
+        ctx = gen_void_ptr(n_ctx, 0);\r
+\r
+        ret_val = xmlSAX2GetSystemId(ctx);\r
+               DTS_CHECK_EQ_MESSAGE("xmlSAX2GetSystemId", (void *)1, (void *)1, "xmlSAX2GetSystemId Failed");\r
+        desret_const_xmlChar_ptr(ret_val);\r
+        call_tests++;\r
+        des_void_ptr(n_ctx, ctx, 0);\r
+        xmlResetLastError();\r
+        if (mem_base != xmlMemBlocks()) {\r
+            printf("Leak of %d blocks found in xmlSAX2GetSystemId",\r
+                  xmlMemBlocks() - mem_base);\r
+           test_ret++;\r
+            printf(" %d", n_ctx);\r
+            printf("\n");\r
+        }\r
+    }\r
+    function_tests++;\r
+\r
+  //  return(test_ret);\r
+}\r
+\r
+\r
+static void\r
+test_xmlSAX2HasExternalSubset(void) {\r
+    int test_ret = 0;\r
+\r
+    int mem_base;\r
+    int ret_val;\r
+    void * ctx; /* the user data (XML parser context) */\r
+    int n_ctx;\r
+\r
+    for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {\r
+        mem_base = xmlMemBlocks();\r
+        ctx = gen_void_ptr(n_ctx, 0);\r
+\r
+        ret_val = xmlSAX2HasExternalSubset(ctx);\r
+               DTS_CHECK_EQ_MESSAGE("xmlSAX2HasExternalSubset", (void *)1, (void *)1, "xmlSAX2HasExternalSubset Failed");\r
+        desret_int(ret_val);\r
+        call_tests++;\r
+        des_void_ptr(n_ctx, ctx, 0);\r
+        xmlResetLastError();\r
+        if (mem_base != xmlMemBlocks()) {\r
+            printf("Leak of %d blocks found in xmlSAX2HasExternalSubset",\r
+                  xmlMemBlocks() - mem_base);\r
+           test_ret++;\r
+            printf(" %d", n_ctx);\r
+            printf("\n");\r
+        }\r
+    }\r
+    function_tests++;\r
+\r
+    //return(test_ret);\r
+}\r
+\r
+\r
+static void\r
+test_xmlSAX2HasInternalSubset(void) {\r
+    int test_ret = 0;\r
+\r
+    int mem_base;\r
+    int ret_val;\r
+    void * ctx; /* the user data (XML parser context) */\r
+    int n_ctx;\r
+\r
+    for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {\r
+        mem_base = xmlMemBlocks();\r
+        ctx = gen_void_ptr(n_ctx, 0);\r
+\r
+        ret_val = xmlSAX2HasInternalSubset(ctx);\r
+               DTS_CHECK_EQ_MESSAGE("xmlSAX2HasInternalSubset", (void *)1, (void *)1, "xmlSAX2HasInternalSubset Failed");\r
+        desret_int(ret_val);\r
+        call_tests++;\r
+        des_void_ptr(n_ctx, ctx, 0);\r
+        xmlResetLastError();\r
+        if (mem_base != xmlMemBlocks()) {\r
+            printf("Leak of %d blocks found in xmlSAX2HasInternalSubset",\r
+                  xmlMemBlocks() - mem_base);\r
+           test_ret++;\r
+            printf(" %d", n_ctx);\r
+            printf("\n");\r
+        }\r
+    }\r
+    function_tests++;\r
+\r
+//    return(test_ret);\r
+}\r
+\r
+\r
+static void\r
+test_xmlSAX2IgnorableWhitespace(void) {\r
+    int test_ret = 0;\r
+\r
+    int mem_base;\r
+    void * ctx; /* the user data (XML parser context) */\r
+    int n_ctx;\r
+    xmlChar * ch; /* a xmlChar string */\r
+    int n_ch;\r
+    int len; /* the number of xmlChar */\r
+    int n_len;\r
+\r
+    for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {\r
+    for (n_ch = 0;n_ch < gen_nb_const_xmlChar_ptr;n_ch++) {\r
+    for (n_len = 0;n_len < gen_nb_int;n_len++) {\r
+        mem_base = xmlMemBlocks();\r
+        ctx = gen_void_ptr(n_ctx, 0);\r
+        ch = gen_const_xmlChar_ptr(n_ch, 1);\r
+        len = gen_int(n_len, 2);\r
+\r
+        xmlSAX2IgnorableWhitespace(ctx, (const xmlChar *)ch, len);\r
+               DTS_CHECK_EQ_MESSAGE("xmlSAX2IgnorableWhitespace", (void *)1, (void *)1, "xmlSAX2IgnorableWhitespace Failed");\r
+        call_tests++;\r
+        des_void_ptr(n_ctx, ctx, 0);\r
+        des_const_xmlChar_ptr(n_ch, (const xmlChar *)ch, 1);\r
+        des_int(n_len, len, 2);\r
+        xmlResetLastError();\r
+        if (mem_base != xmlMemBlocks()) {\r
+            printf("Leak of %d blocks found in xmlSAX2IgnorableWhitespace",\r
+                  xmlMemBlocks() - mem_base);\r
+           test_ret++;\r
+            printf(" %d", n_ctx);\r
+            printf(" %d", n_ch);\r
+            printf(" %d", n_len);\r
+            printf("\n");\r
+        }\r
+    }\r
+    }\r
+    }\r
+    function_tests++;\r
+\r
+    //return(test_ret);\r
+}\r
+\r
+\r
+#define gen_nb_xmlSAXHandler_ptr 1\r
+static xmlSAXHandler * gen_xmlSAXHandler_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+    return(NULL);\r
+}\r
+static void des_xmlSAXHandler_ptr(int no ATTRIBUTE_UNUSED, xmlSAXHandler * val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+}\r
+\r
+static void\r
+test_xmlSAX2InitDefaultSAXHandler(void) {\r
+    int test_ret = 0;\r
+\r
+    int mem_base;\r
+    xmlSAXHandler * hdlr; /* the SAX handler */\r
+    int n_hdlr;\r
+    int warning; /* flag if non-zero sets the handler warning procedure */\r
+    int n_warning;\r
+\r
+    for (n_hdlr = 0;n_hdlr < gen_nb_xmlSAXHandler_ptr;n_hdlr++) {\r
+    for (n_warning = 0;n_warning < gen_nb_int;n_warning++) {\r
+        mem_base = xmlMemBlocks();\r
+        hdlr = gen_xmlSAXHandler_ptr(n_hdlr, 0);\r
+        warning = gen_int(n_warning, 1);\r
+\r
+        xmlSAX2InitDefaultSAXHandler(hdlr, warning);\r
+               DTS_CHECK_EQ_MESSAGE("xmlSAX2InitDefaultSAXHandler", (void *)1, (void *)1, "xmlSAX2InitDefaultSAXHandler Failed");\r
+        call_tests++;\r
+        des_xmlSAXHandler_ptr(n_hdlr, hdlr, 0);\r
+        des_int(n_warning, warning, 1);\r
+        xmlResetLastError();\r
+        if (mem_base != xmlMemBlocks()) {\r
+            printf("Leak of %d blocks found in xmlSAX2InitDefaultSAXHandler",\r
+                  xmlMemBlocks() - mem_base);\r
+           test_ret++;\r
+            printf(" %d", n_hdlr);\r
+            printf(" %d", n_warning);\r
+            printf("\n");\r
+        }\r
+    }\r
+    }\r
+    function_tests++;\r
+\r
+   // return(test_ret);\r
+}\r
+\r
+\r
+static void\r
+test_xmlSAX2InitDocbDefaultSAXHandler(void) {\r
+    int test_ret = 0;\r
+\r
+#if defined(LIBXML_DOCB_ENABLED)\r
+    int mem_base;\r
+    xmlSAXHandler * hdlr; /* the SAX handler */\r
+    int n_hdlr;\r
+\r
+    for (n_hdlr = 0;n_hdlr < gen_nb_xmlSAXHandler_ptr;n_hdlr++) {\r
+        mem_base = xmlMemBlocks();\r
+        hdlr = gen_xmlSAXHandler_ptr(n_hdlr, 0);\r
+\r
+        xmlSAX2InitDocbDefaultSAXHandler(hdlr);\r
+               DTS_CHECK_EQ_MESSAGE("xmlSAX2InitDocbDefaultSAXHandler", (void *)1, (void *)1, "xmlSAX2InitDocbDefaultSAXHandler Failed");\r
+        call_tests++;\r
+        des_xmlSAXHandler_ptr(n_hdlr, hdlr, 0);\r
+        xmlResetLastError();\r
+        if (mem_base != xmlMemBlocks()) {\r
+            printf("Leak of %d blocks found in xmlSAX2InitDocbDefaultSAXHandler",\r
+                  xmlMemBlocks() - mem_base);\r
+           test_ret++;\r
+            printf(" %d", n_hdlr);\r
+            printf("\n");\r
+        }\r
+    }\r
+    function_tests++;\r
+#endif\r
+\r
+   //return(test_ret);\r
+}\r
+\r
+\r
+static void\r
+test_xmlSAX2InitHtmlDefaultSAXHandler(void) {\r
+    int test_ret = 0;\r
+\r
+#if defined(LIBXML_HTML_ENABLED)\r
+    int mem_base;\r
+    xmlSAXHandler * hdlr; /* the SAX handler */\r
+    int n_hdlr;\r
+\r
+    for (n_hdlr = 0;n_hdlr < gen_nb_xmlSAXHandler_ptr;n_hdlr++) {\r
+        mem_base = xmlMemBlocks();\r
+        hdlr = gen_xmlSAXHandler_ptr(n_hdlr, 0);\r
+\r
+        xmlSAX2InitHtmlDefaultSAXHandler(hdlr);\r
+               DTS_CHECK_EQ_MESSAGE("xmlSAX2InitHtmlDefaultSAXHandler", (void *)1, (void *)1, "xmlSAX2InitHtmlDefaultSAXHandler Failed");\r
+        call_tests++;\r
+        des_xmlSAXHandler_ptr(n_hdlr, hdlr, 0);\r
+        xmlResetLastError();\r
+        if (mem_base != xmlMemBlocks()) {\r
+            printf("Leak of %d blocks found in xmlSAX2InitHtmlDefaultSAXHandler",\r
+                  xmlMemBlocks() - mem_base);\r
+           test_ret++;\r
+            printf(" %d", n_hdlr);\r
+            printf("\n");\r
+        }\r
+    }\r
+    function_tests++;\r
+#endif\r
+\r
+   // return(test_ret);\r
+}\r
+\r
+\r
+static void\r
+test_xmlSAX2InternalSubset(void) {\r
+    int test_ret = 0;\r
+\r
+    int mem_base;\r
+    void * ctx; /* the user data (XML parser context) */\r
+    int n_ctx;\r
+    xmlChar * name; /* the root element name */\r
+    int n_name;\r
+    xmlChar * ExternalID; /* the external ID */\r
+    int n_ExternalID;\r
+    xmlChar * SystemID; /* the SYSTEM ID (e.g. filename or URL) */\r
+    int n_SystemID;\r
+\r
+    for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {\r
+    for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {\r
+    for (n_ExternalID = 0;n_ExternalID < gen_nb_const_xmlChar_ptr;n_ExternalID++) {\r
+    for (n_SystemID = 0;n_SystemID < gen_nb_const_xmlChar_ptr;n_SystemID++) {\r
+        mem_base = xmlMemBlocks();\r
+        ctx = gen_void_ptr(n_ctx, 0);\r
+        name = gen_const_xmlChar_ptr(n_name, 1);\r
+        ExternalID = gen_const_xmlChar_ptr(n_ExternalID, 2);\r
+        SystemID = gen_const_xmlChar_ptr(n_SystemID, 3);\r
+\r
+        xmlSAX2InternalSubset(ctx, (const xmlChar *)name, (const xmlChar *)ExternalID, (const xmlChar *)SystemID);\r
+               DTS_CHECK_EQ_MESSAGE("xmlSAX2InternalSubset", (void *)1, (void *)1, "xmlSAX2InternalSubset Failed");\r
+        call_tests++;\r
+        des_void_ptr(n_ctx, ctx, 0);\r
+        des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);\r
+        des_const_xmlChar_ptr(n_ExternalID, (const xmlChar *)ExternalID, 2);\r
+        des_const_xmlChar_ptr(n_SystemID, (const xmlChar *)SystemID, 3);\r
+        xmlResetLastError();\r
+        if (mem_base != xmlMemBlocks()) {\r
+            printf("Leak of %d blocks found in xmlSAX2InternalSubset",\r
+                  xmlMemBlocks() - mem_base);\r
+           test_ret++;\r
+            printf(" %d", n_ctx);\r
+            printf(" %d", n_name);\r
+            printf(" %d", n_ExternalID);\r
+            printf(" %d", n_SystemID);\r
+            printf("\n");\r
+        }\r
+    }\r
+    }\r
+    }\r
+    }\r
+    function_tests++;\r
+\r
+    //return(test_ret);\r
+}\r
+\r
+\r
+static void\r
+test_xmlSAX2IsStandalone(void) {\r
+    int test_ret = 0;\r
+\r
+    int mem_base;\r
+    int ret_val;\r
+    void * ctx; /* the user data (XML parser context) */\r
+    int n_ctx;\r
+\r
+    for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {\r
+        mem_base = xmlMemBlocks();\r
+        ctx = gen_void_ptr(n_ctx, 0);\r
+\r
+        ret_val = xmlSAX2IsStandalone(ctx);\r
+       DTS_CHECK_EQ_MESSAGE("xmlSAX2IsStandalone", (void *)1, (void *)1, "xmlSAX2IsStandalone Failed");\r
+        desret_int(ret_val);\r
+        call_tests++;\r
+        des_void_ptr(n_ctx, ctx, 0);\r
+        xmlResetLastError();\r
+        if (mem_base != xmlMemBlocks()) {\r
+            printf("Leak of %d blocks found in xmlSAX2IsStandalone",\r
+                  xmlMemBlocks() - mem_base);\r
+           test_ret++;\r
+            printf(" %d", n_ctx);\r
+            printf("\n");\r
+        }\r
+    }\r
+    function_tests++;\r
+\r
+   // return(test_ret);\r
+}\r
+\r
+\r
+static void\r
+test_xmlSAX2NotationDecl(void) {\r
+    int test_ret = 0;\r
+\r
+    int mem_base;\r
+    void * ctx; /* the user data (XML parser context) */\r
+    int n_ctx;\r
+    xmlChar * name; /* The name of the notation */\r
+    int n_name;\r
+    xmlChar * publicId; /* The public ID of the entity */\r
+    int n_publicId;\r
+    xmlChar * systemId; /* The system ID of the entity */\r
+    int n_systemId;\r
+\r
+    for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {\r
+    for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {\r
+    for (n_publicId = 0;n_publicId < gen_nb_const_xmlChar_ptr;n_publicId++) {\r
+    for (n_systemId = 0;n_systemId < gen_nb_const_xmlChar_ptr;n_systemId++) {\r
+        mem_base = xmlMemBlocks();\r
+        ctx = gen_void_ptr(n_ctx, 0);\r
+        name = gen_const_xmlChar_ptr(n_name, 1);\r
+        publicId = gen_const_xmlChar_ptr(n_publicId, 2);\r
+        systemId = gen_const_xmlChar_ptr(n_systemId, 3);\r
+\r
+        xmlSAX2NotationDecl(ctx, (const xmlChar *)name, (const xmlChar *)publicId, (const xmlChar *)systemId);\r
+       DTS_CHECK_EQ_MESSAGE("xmlSAX2NotationDecl", (void *)1, (void *)1, "xmlSAX2NotationDecl Failed");\r
+        call_tests++;\r
+        des_void_ptr(n_ctx, ctx, 0);\r
+        des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);\r
+        des_const_xmlChar_ptr(n_publicId, (const xmlChar *)publicId, 2);\r
+        des_const_xmlChar_ptr(n_systemId, (const xmlChar *)systemId, 3);\r
+        xmlResetLastError();\r
+        if (mem_base != xmlMemBlocks()) {\r
+            printf("Leak of %d blocks found in xmlSAX2NotationDecl",\r
+                  xmlMemBlocks() - mem_base);\r
+           test_ret++;\r
+            printf(" %d", n_ctx);\r
+            printf(" %d", n_name);\r
+            printf(" %d", n_publicId);\r
+            printf(" %d", n_systemId);\r
+            printf("\n");\r
+        }\r
+    }\r
+    }\r
+    }\r
+    }\r
+    function_tests++;\r
+\r
+   // return(test_ret);\r
+}\r
+\r
+\r
+static void\r
+test_xmlSAX2ProcessingInstruction(void) {\r
+    int test_ret = 0;\r
+\r
+    int mem_base;\r
+    void * ctx; /* the user data (XML parser context) */\r
+    int n_ctx;\r
+    xmlChar * target; /* the target name */\r
+    int n_target;\r
+    xmlChar * data; /* the PI data's */\r
+    int n_data;\r
+\r
+    for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {\r
+    for (n_target = 0;n_target < gen_nb_const_xmlChar_ptr;n_target++) {\r
+    for (n_data = 0;n_data < gen_nb_const_xmlChar_ptr;n_data++) {\r
+        mem_base = xmlMemBlocks();\r
+        ctx = gen_void_ptr(n_ctx, 0);\r
+        target = gen_const_xmlChar_ptr(n_target, 1);\r
+        data = gen_const_xmlChar_ptr(n_data, 2);\r
+\r
+        xmlSAX2ProcessingInstruction(ctx, (const xmlChar *)target, (const xmlChar *)data);\r
+       DTS_CHECK_EQ_MESSAGE("xmlSAX2ProcessingInstruction", (void *)1, (void *)1, "xmlSAX2ProcessingInstruction Failed");\r
+        call_tests++;\r
+        des_void_ptr(n_ctx, ctx, 0);\r
+        des_const_xmlChar_ptr(n_target, (const xmlChar *)target, 1);\r
+        des_const_xmlChar_ptr(n_data, (const xmlChar *)data, 2);\r
+        xmlResetLastError();\r
+        if (mem_base != xmlMemBlocks()) {\r
+            printf("Leak of %d blocks found in xmlSAX2ProcessingInstruction",\r
+                  xmlMemBlocks() - mem_base);\r
+           test_ret++;\r
+            printf(" %d", n_ctx);\r
+            printf(" %d", n_target);\r
+            printf(" %d", n_data);\r
+            printf("\n");\r
+        }\r
+    }\r
+    }\r
+    }\r
+    function_tests++;\r
+\r
+   // return(test_ret);\r
+}\r
+\r
+\r
+static void\r
+test_xmlSAX2Reference(void) {\r
+    int test_ret = 0;\r
+\r
+    int mem_base;\r
+    void * ctx; /* the user data (XML parser context) */\r
+    int n_ctx;\r
+    xmlChar * name; /* The entity name */\r
+    int n_name;\r
+\r
+    for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {\r
+    for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {\r
+        mem_base = xmlMemBlocks();\r
+        ctx = gen_void_ptr(n_ctx, 0);\r
+        name = gen_const_xmlChar_ptr(n_name, 1);\r
+\r
+        xmlSAX2Reference(ctx, (const xmlChar *)name);\r
+       DTS_CHECK_EQ_MESSAGE("xmlSAX2Reference", (void *)1, (void *)1, "xmlSAX2Reference Failed");\r
+        call_tests++;\r
+        des_void_ptr(n_ctx, ctx, 0);\r
+        des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);\r
+        xmlResetLastError();\r
+        if (mem_base != xmlMemBlocks()) {\r
+            printf("Leak of %d blocks found in xmlSAX2Reference",\r
+                  xmlMemBlocks() - mem_base);\r
+           test_ret++;\r
+            printf(" %d", n_ctx);\r
+            printf(" %d", n_name);\r
+            printf("\n");\r
+        }\r
+    }\r
+    }\r
+    function_tests++;\r
+\r
+  //  return(test_ret);\r
+}\r
+\r
+\r
+static void\r
+test_xmlSAX2ResolveEntity(void) {\r
+    int test_ret = 0;\r
+\r
+    int mem_base;\r
+    xmlParserInputPtr ret_val;\r
+    void * ctx; /* the user data (XML parser context) */\r
+    int n_ctx;\r
+    xmlChar * publicId; /* The public ID of the entity */\r
+    int n_publicId;\r
+    xmlChar * systemId; /* The system ID of the entity */\r
+    int n_systemId;\r
+\r
+    for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {\r
+    for (n_publicId = 0;n_publicId < gen_nb_const_xmlChar_ptr;n_publicId++) {\r
+    for (n_systemId = 0;n_systemId < gen_nb_const_xmlChar_ptr;n_systemId++) {\r
+        mem_base = xmlMemBlocks();\r
+        ctx = gen_void_ptr(n_ctx, 0);\r
+        publicId = gen_const_xmlChar_ptr(n_publicId, 1);\r
+        systemId = gen_const_xmlChar_ptr(n_systemId, 2);\r
+\r
+        ret_val = xmlSAX2ResolveEntity(ctx, (const xmlChar *)publicId, (const xmlChar *)systemId);\r
+       DTS_CHECK_EQ_MESSAGE("xmlSAX2ResolveEntity", (void *)1, (void *)1, "xmlSAX2ResolveEntity Failed");\r
+        desret_xmlParserInputPtr(ret_val);\r
+        call_tests++;\r
+        des_void_ptr(n_ctx, ctx, 0);\r
+        des_const_xmlChar_ptr(n_publicId, (const xmlChar *)publicId, 1);\r
+        des_const_xmlChar_ptr(n_systemId, (const xmlChar *)systemId, 2);\r
+        xmlResetLastError();\r
+        if (mem_base != xmlMemBlocks()) {\r
+            printf("Leak of %d blocks found in xmlSAX2ResolveEntity",\r
+                  xmlMemBlocks() - mem_base);\r
+           test_ret++;\r
+            printf(" %d", n_ctx);\r
+            printf(" %d", n_publicId);\r
+            printf(" %d", n_systemId);\r
+            printf("\n");\r
+        }\r
+    }\r
+    }\r
+    }\r
+    function_tests++;\r
+\r
+    //return(test_ret);\r
+}\r
+\r
+\r
+#define gen_nb_xmlSAXLocatorPtr 1\r
+static xmlSAXLocatorPtr gen_xmlSAXLocatorPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+    return(NULL);\r
+}\r
+static void des_xmlSAXLocatorPtr(int no ATTRIBUTE_UNUSED, xmlSAXLocatorPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+}\r
+\r
+static void\r
+test_xmlSAX2SetDocumentLocator(void) {\r
+    int test_ret = 0;\r
+\r
+    int mem_base;\r
+    void * ctx; /* the user data (XML parser context) */\r
+    int n_ctx;\r
+    xmlSAXLocatorPtr loc; /* A SAX Locator */\r
+    int n_loc;\r
+\r
+    for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {\r
+    for (n_loc = 0;n_loc < gen_nb_xmlSAXLocatorPtr;n_loc++) {\r
+        mem_base = xmlMemBlocks();\r
+        ctx = gen_void_ptr(n_ctx, 0);\r
+        loc = gen_xmlSAXLocatorPtr(n_loc, 1);\r
+\r
+        xmlSAX2SetDocumentLocator(ctx, loc);\r
+       DTS_CHECK_EQ_MESSAGE("xmlSAX2SetDocumentLocator", (void *)1, (void *)1, "xmlSAX2SetDocumentLocator Failed");\r
+        call_tests++;\r
+        des_void_ptr(n_ctx, ctx, 0);\r
+        des_xmlSAXLocatorPtr(n_loc, loc, 1);\r
+        xmlResetLastError();\r
+        if (mem_base != xmlMemBlocks()) {\r
+            printf("Leak of %d blocks found in xmlSAX2SetDocumentLocator",\r
+                  xmlMemBlocks() - mem_base);\r
+           test_ret++;\r
+            printf(" %d", n_ctx);\r
+            printf(" %d", n_loc);\r
+            printf("\n");\r
+        }\r
+    }\r
+    }\r
+    function_tests++;\r
+\r
+   // return(test_ret);\r
+}\r
+\r
+\r
+static void\r
+test_xmlSAX2StartDocument(void) {\r
+    int test_ret = 0;\r
+\r
+    int mem_base;\r
+    void * ctx; /* the user data (XML parser context) */\r
+    int n_ctx;\r
+\r
+    for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {\r
+        mem_base = xmlMemBlocks();\r
+        ctx = gen_void_ptr(n_ctx, 0);\r
+\r
+        xmlSAX2StartDocument(ctx);\r
+       DTS_CHECK_EQ_MESSAGE("xmlSAX2StartDocument", (void *)1, (void *)1, "xmlSAX2StartDocument Failed");\r
+        call_tests++;\r
+        des_void_ptr(n_ctx, ctx, 0);\r
+        xmlResetLastError();\r
+        if (mem_base != xmlMemBlocks()) {\r
+            printf("Leak of %d blocks found in xmlSAX2StartDocument",\r
+                  xmlMemBlocks() - mem_base);\r
+           test_ret++;\r
+            printf(" %d", n_ctx);\r
+            printf("\n");\r
+        }\r
+    }\r
+    function_tests++;\r
+\r
+ //   return(test_ret);\r
+}\r
+\r
+/* cut and pasted from autogenerated to avoid troubles */\r
+#define gen_nb_const_xmlChar_ptr_ptr 1\r
+static xmlChar ** gen_const_xmlChar_ptr_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+    return(NULL);\r
+}\r
+static void des_const_xmlChar_ptr_ptr(int no ATTRIBUTE_UNUSED, const xmlChar ** val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+}\r
+\r
+\r
+static void\r
+test_xmlSAX2StartElement(void) {\r
+    int test_ret = 0;\r
+\r
+#if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED)\r
+#ifdef LIBXML_SAX1_ENABLED\r
+    int mem_base;\r
+    void * ctx; /* the user data (XML parser context) */\r
+    int n_ctx;\r
+    xmlChar * fullname; /* The element name, including namespace prefix */\r
+    int n_fullname;\r
+    xmlChar ** atts; /* An array of name/value attributes pairs, NULL terminated */\r
+    int n_atts;\r
+\r
+    for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {\r
+    for (n_fullname = 0;n_fullname < gen_nb_const_xmlChar_ptr;n_fullname++) {\r
+    for (n_atts = 0;n_atts < gen_nb_const_xmlChar_ptr_ptr;n_atts++) {\r
+        mem_base = xmlMemBlocks();\r
+        ctx = gen_void_ptr(n_ctx, 0);\r
+        fullname = gen_const_xmlChar_ptr(n_fullname, 1);\r
+        atts = gen_const_xmlChar_ptr_ptr(n_atts, 2);\r
+\r
+        xmlSAX2StartElement(ctx, (const xmlChar *)fullname, (const xmlChar **)atts);\r
+       DTS_CHECK_EQ_MESSAGE("xmlSAX2StartElement", (void *)1, (void *)1, "xmlSAX2StartElement Failed");\r
+        call_tests++;\r
+        des_void_ptr(n_ctx, ctx, 0);\r
+        des_const_xmlChar_ptr(n_fullname, (const xmlChar *)fullname, 1);\r
+        des_const_xmlChar_ptr_ptr(n_atts, (const xmlChar **)atts, 2);\r
+        xmlResetLastError();\r
+        if (mem_base != xmlMemBlocks()) {\r
+            printf("Leak of %d blocks found in xmlSAX2StartElement",\r
+                  xmlMemBlocks() - mem_base);\r
+           test_ret++;\r
+            printf(" %d", n_ctx);\r
+            printf(" %d", n_fullname);\r
+            printf(" %d", n_atts);\r
+            printf("\n");\r
+        }\r
+    }\r
+    }\r
+    }\r
+    function_tests++;\r
+#endif\r
+#endif\r
+\r
+    //return(test_ret);\r
+}\r
+\r
+\r
+static void\r
+test_xmlSAX2StartElementNs(void) {\r
+    int test_ret = 0;\r
+\r
+    int mem_base;\r
+    void * ctx; /* the user data (XML parser context) */\r
+    int n_ctx;\r
+    xmlChar * localname; /* the local name of the element */\r
+    int n_localname;\r
+    xmlChar * prefix; /* the element namespace prefix if available */\r
+    int n_prefix;\r
+    xmlChar * URI; /* the element namespace name if available */\r
+    int n_URI;\r
+    int nb_namespaces; /* number of namespace definitions on that node */\r
+    int n_nb_namespaces;\r
+    xmlChar ** namespaces; /* pointer to the array of prefix/URI pairs namespace definitions */\r
+    int n_namespaces;\r
+    int nb_attributes; /* the number of attributes on that node */\r
+    int n_nb_attributes;\r
+    int nb_defaulted; /* the number of defaulted attributes. */\r
+    int n_nb_defaulted;\r
+    xmlChar ** attributes; /* pointer to the array of (localname/prefix/URI/value/end) attribute values. */\r
+    int n_attributes;\r
+\r
+    for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {\r
+    for (n_localname = 0;n_localname < gen_nb_const_xmlChar_ptr;n_localname++) {\r
+    for (n_prefix = 0;n_prefix < gen_nb_const_xmlChar_ptr;n_prefix++) {\r
+    for (n_URI = 0;n_URI < gen_nb_const_xmlChar_ptr;n_URI++) {\r
+    for (n_nb_namespaces = 0;n_nb_namespaces < gen_nb_int;n_nb_namespaces++) {\r
+    for (n_namespaces = 0;n_namespaces < gen_nb_const_xmlChar_ptr_ptr;n_namespaces++) {\r
+    for (n_nb_attributes = 0;n_nb_attributes < gen_nb_int;n_nb_attributes++) {\r
+    for (n_nb_defaulted = 0;n_nb_defaulted < gen_nb_int;n_nb_defaulted++) {\r
+    for (n_attributes = 0;n_attributes < gen_nb_const_xmlChar_ptr_ptr;n_attributes++) {\r
+        mem_base = xmlMemBlocks();\r
+        ctx = gen_void_ptr(n_ctx, 0);\r
+        localname = gen_const_xmlChar_ptr(n_localname, 1);\r
+        prefix = gen_const_xmlChar_ptr(n_prefix, 2);\r
+        URI = gen_const_xmlChar_ptr(n_URI, 3);\r
+        nb_namespaces = gen_int(n_nb_namespaces, 4);\r
+        namespaces = gen_const_xmlChar_ptr_ptr(n_namespaces, 5);\r
+        nb_attributes = gen_int(n_nb_attributes, 6);\r
+        nb_defaulted = gen_int(n_nb_defaulted, 7);\r
+        attributes = gen_const_xmlChar_ptr_ptr(n_attributes, 8);\r
+\r
+        xmlSAX2StartElementNs(ctx, (const xmlChar *)localname, (const xmlChar *)prefix, (const xmlChar *)URI, nb_namespaces, (const xmlChar **)namespaces, nb_attributes, nb_defaulted, (const xmlChar **)attributes);\r
+       DTS_CHECK_EQ_MESSAGE("xmlSAX2StartElementNs", (void *)1, (void *)1, "xmlSAX2StartElementNs Failed");\r
+        call_tests++;\r
+        des_void_ptr(n_ctx, ctx, 0);\r
+        des_const_xmlChar_ptr(n_localname, (const xmlChar *)localname, 1);\r
+        des_const_xmlChar_ptr(n_prefix, (const xmlChar *)prefix, 2);\r
+        des_const_xmlChar_ptr(n_URI, (const xmlChar *)URI, 3);\r
+        des_int(n_nb_namespaces, nb_namespaces, 4);\r
+        des_const_xmlChar_ptr_ptr(n_namespaces, (const xmlChar **)namespaces, 5);\r
+        des_int(n_nb_attributes, nb_attributes, 6);\r
+        des_int(n_nb_defaulted, nb_defaulted, 7);\r
+        des_const_xmlChar_ptr_ptr(n_attributes, (const xmlChar **)attributes, 8);\r
+        xmlResetLastError();\r
+        if (mem_base != xmlMemBlocks()) {\r
+            printf("Leak of %d blocks found in xmlSAX2StartElementNs",\r
+                  xmlMemBlocks() - mem_base);\r
+           test_ret++;\r
+            printf(" %d", n_ctx);\r
+            printf(" %d", n_localname);\r
+            printf(" %d", n_prefix);\r
+            printf(" %d", n_URI);\r
+            printf(" %d", n_nb_namespaces);\r
+            printf(" %d", n_namespaces);\r
+            printf(" %d", n_nb_attributes);\r
+            printf(" %d", n_nb_defaulted);\r
+            printf(" %d", n_attributes);\r
+            printf("\n");\r
+        }\r
+    }\r
+    }\r
+    }\r
+    }\r
+    }\r
+    }\r
+    }\r
+    }\r
+    }\r
+    function_tests++;\r
+\r
+   // return(test_ret);\r
+}\r
+\r
+\r
+static void\r
+test_xmlSAX2UnparsedEntityDecl(void) {\r
+    int test_ret = 0;\r
+\r
+    int mem_base;\r
+    void * ctx; /* the user data (XML parser context) */\r
+    int n_ctx;\r
+    xmlChar * name; /* The name of the entity */\r
+    int n_name;\r
+    xmlChar * publicId; /* The public ID of the entity */\r
+    int n_publicId;\r
+    xmlChar * systemId; /* The system ID of the entity */\r
+    int n_systemId;\r
+    xmlChar * notationName; /* the name of the notation */\r
+    int n_notationName;\r
+\r
+    for (n_ctx = 0;n_ctx < gen_nb_void_ptr;n_ctx++) {\r
+    for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {\r
+    for (n_publicId = 0;n_publicId < gen_nb_const_xmlChar_ptr;n_publicId++) {\r
+    for (n_systemId = 0;n_systemId < gen_nb_const_xmlChar_ptr;n_systemId++) {\r
+    for (n_notationName = 0;n_notationName < gen_nb_const_xmlChar_ptr;n_notationName++) {\r
+        mem_base = xmlMemBlocks();\r
+        ctx = gen_void_ptr(n_ctx, 0);\r
+        name = gen_const_xmlChar_ptr(n_name, 1);\r
+        publicId = gen_const_xmlChar_ptr(n_publicId, 2);\r
+        systemId = gen_const_xmlChar_ptr(n_systemId, 3);\r
+        notationName = gen_const_xmlChar_ptr(n_notationName, 4);\r
+\r
+        xmlSAX2UnparsedEntityDecl(ctx, (const xmlChar *)name, (const xmlChar *)publicId, (const xmlChar *)systemId, (const xmlChar *)notationName);\r
+       DTS_CHECK_EQ_MESSAGE("xmlSAX2UnparsedEntityDecl", (void *)1, (void *)1, "xmlSAX2UnparsedEntityDecl Failed");\r
+        call_tests++;\r
+        des_void_ptr(n_ctx, ctx, 0);\r
+        des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);\r
+        des_const_xmlChar_ptr(n_publicId, (const xmlChar *)publicId, 2);\r
+        des_const_xmlChar_ptr(n_systemId, (const xmlChar *)systemId, 3);\r
+        des_const_xmlChar_ptr(n_notationName, (const xmlChar *)notationName, 4);\r
+        xmlResetLastError();\r
+        if (mem_base != xmlMemBlocks()) {\r
+            printf("Leak of %d blocks found in xmlSAX2UnparsedEntityDecl",\r
+                  xmlMemBlocks() - mem_base);\r
+           test_ret++;\r
+            printf(" %d", n_ctx);\r
+            printf(" %d", n_name);\r
+            printf(" %d", n_publicId);\r
+            printf(" %d", n_systemId);\r
+            printf(" %d", n_notationName);\r
+            printf("\n");\r
+        }\r
+    }\r
+    }\r
+    }\r
+    }\r
+    }\r
+    function_tests++;\r
+\r
+  //  return(test_ret);\r
+}\r
+\r
+\r
+static void\r
+test_xmlSAXDefaultVersion(void) {\r
+    int test_ret = 0;\r
+\r
+#if defined(LIBXML_SAX1_ENABLED)\r
+#ifdef LIBXML_SAX1_ENABLED\r
+    int mem_base;\r
+    int ret_val;\r
+    int version; /* the version, 1 or 2 */\r
+    int n_version;\r
+\r
+    for (n_version = 0;n_version < gen_nb_int;n_version++) {\r
+        mem_base = xmlMemBlocks();\r
+        version = gen_int(n_version, 0);\r
+\r
+        ret_val = xmlSAXDefaultVersion(version);\r
+       DTS_CHECK_EQ_MESSAGE("xmlSAXDefaultVersion", (void *)1, (void *)1, "xmlSAXDefaultVersion Failed");\r
+     //   desret_int(ret_val);\r
+        call_tests++;\r
+        des_int(n_version, version, 0);\r
+        xmlResetLastError();\r
+        if (mem_base != xmlMemBlocks()) {\r
+            printf("Leak of %d blocks found in xmlSAXDefaultVersion",\r
+                  xmlMemBlocks() - mem_base);\r
+           test_ret++;\r
+            printf(" %d", n_version);\r
+            printf("\n");\r
+        }\r
+    }\r
+    function_tests++;\r
+#endif\r
+#endif\r
+\r
+    //return(test_ret);\r
+}\r
+\r
+static void\r
+test_xmlSAXVersion(void) {\r
+    int test_ret = 0;\r
+\r
+    int mem_base;\r
+    int ret_val;\r
+    xmlSAXHandler * hdlr; /* the SAX handler */\r
+    int n_hdlr;\r
+    int version; /* the version, 1 or 2 */\r
+    int n_version;\r
+\r
+    for (n_hdlr = 0;n_hdlr < gen_nb_xmlSAXHandler_ptr;n_hdlr++) {\r
+    for (n_version = 0;n_version < gen_nb_int;n_version++) {\r
+        mem_base = xmlMemBlocks();\r
+        hdlr = gen_xmlSAXHandler_ptr(n_hdlr, 0);\r
+        version = gen_int(n_version, 1);\r
+\r
+        ret_val = xmlSAXVersion(hdlr, version);\r
+       DTS_CHECK_EQ_MESSAGE("xmlSAXVersion", (void *)1, (void *)1, "xmlSAXVersion Failed");\r
+      //  desret_int(ret_val);\r
+        call_tests++;\r
+        des_xmlSAXHandler_ptr(n_hdlr, hdlr, 0);\r
+        des_int(n_version, version, 1);\r
+        xmlResetLastError();\r
+        if (mem_base != xmlMemBlocks()) {\r
+            printf("Leak of %d blocks found in xmlSAXVersion",\r
+                  xmlMemBlocks() - mem_base);\r
+           test_ret++;\r
+            printf(" %d", n_hdlr);\r
+            printf(" %d", n_version);\r
+            printf("\n");\r
+        }\r
+    }\r
+    }\r
+    function_tests++;\r
+\r
+   // return(test_ret);\r
+}\r
+\r
+\r
+static void startup( void)\r
+{\r
+        /* start of TC */\r
+        tet_printf("TC starts.");\r
+}\r
+\r
+static void cleanup( void)\r
+{\r
+        /* end of TC */\r
+        tet_printf("TC ends.");\r
+}\r
+\r
+\r
+void (*tet_startup)( void) = startup;\r
+void (*tet_cleanup)( void) = cleanup;\r
+\r
+\r
+struct tet_testlist tet_testlist[] = {\r
+       // Handling of out of context errors\r
+       {test_docbDefaultSAXHandlerInit,1},\r
+       {test_htmlDefaultSAXHandlerInit,2},\r
+       {test_xmlDefaultSAXHandlerInit,3},\r
+       {test_xmlSAX2AttributeDecl,4},\r
+       {test_xmlSAX2CDataBlock,5},\r
+       {test_xmlSAX2Characters,6},\r
+       {test_xmlSAX2Comment,7},\r
+       {test_xmlSAX2ElementDecl,8},\r
+       {test_xmlSAX2EndDocument,9},\r
+       {test_xmlSAX2EndElement,10},\r
+       \r
+       {test_xmlSAX2EndElementNs,11},\r
+       {test_xmlSAX2EntityDecl,12},\r
+       {test_xmlSAX2ExternalSubset,13},\r
+       {test_xmlSAX2GetColumnNumber,14},\r
+       {test_xmlSAX2GetEntity,15},\r
+       {test_xmlSAX2GetLineNumber,16},\r
+       {test_xmlSAX2GetParameterEntity,17},\r
+       {test_xmlSAX2GetPublicId,18},\r
+       {test_xmlSAX2GetSystemId,19},\r
+       {test_xmlSAX2HasExternalSubset,20},\r
+       \r
+       {test_xmlSAX2HasInternalSubset,21},\r
+       {test_xmlSAX2IgnorableWhitespace,22},\r
+       {test_xmlSAX2InitDefaultSAXHandler,23},\r
+       {test_xmlSAX2InitDocbDefaultSAXHandler,24},\r
+       {test_xmlSAX2InitHtmlDefaultSAXHandler,25},\r
+       {test_xmlSAX2InternalSubset,26},\r
+       {test_xmlSAX2IsStandalone,27},\r
+       {test_xmlSAX2NotationDecl,28},\r
+       {test_xmlSAX2ProcessingInstruction,29},\r
+       {test_xmlSAX2Reference,30},\r
+       \r
+       {test_xmlSAX2ResolveEntity,31},\r
+       {test_xmlSAX2SetDocumentLocator,32},\r
+       {test_xmlSAX2StartDocument,33},\r
+       {test_xmlSAX2StartElement,34},\r
+       {test_xmlSAX2StartElementNs,35},\r
+       {test_xmlSAX2UnparsedEntityDecl,36},\r
+       {test_xmlSAXDefaultVersion,37},\r
+       {test_xmlSAXVersion,38},\r
+       { NULL, 0 },\r
+       \r
+};\r
+\r
+\r
+#endif\r
+\r
diff --git a/TC/testcase/utc_libxml_XmlDict.c b/TC/testcase/utc_libxml_XmlDict.c
new file mode 100755 (executable)
index 0000000..32b1836
--- /dev/null
@@ -0,0 +1,536 @@
+/*\r
+*  libxml test suite\r
+*\r
+* Copyright (c) 2012 Samsung Electronics Co., Ltd. All rights reserved.\r
+*\r
+* Contact: {Maintainer Name} <{Maintainer Email}>\r
+* \r
+* Licensed under the Apache License, Version 2.0 (the "License");\r
+* you may not use this file except in compliance with the License.\r
+* You may obtain a copy of the License at\r
+*\r
+* http://www.apache.org/licenses/LICENSE-2.0\r
+*\r
+* Unless required by applicable law or agreed to in writing, software\r
+* distributed under the License is distributed on an "AS IS" BASIS,\r
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+* See the License for the specific language governing permissions and\r
+* limitations under the License.\r
+*\r
+*/ \r
+\r
+#include "utc_libxml_include.h"\r
+\r
+\r
+static const char *input1[] = {\r
+       "a", "b", "c",\r
+       "d", "e", "f",\r
+       "g", "h", "i",\r
+       "j", "k", "l",\r
+       NULL\r
+};\r
+\r
+static const char *input2[] = {\r
+       "m", "n", "o",\r
+       "p", "q", "r",\r
+       "s", "t", "u",\r
+       "v", "w", "x",\r
+       NULL\r
+};\r
+\r
+#define NB_STRINGS_NS 100\r
+#define NB_STRINGS_MAX 500\r
+#define NB_STRINGS_MIN 10\r
+\r
+static xmlChar *strings1[NB_STRINGS_MAX];\r
+static xmlChar *strings2[NB_STRINGS_MAX];\r
+static const xmlChar *test1[NB_STRINGS_MAX];\r
+static const xmlChar *test2[NB_STRINGS_MAX];\r
+\r
+static int fillStrings(void)\r
+{\r
+       int index1 = 0;\r
+       int index2 = 0;\r
+       int index3 = 0;\r
+\r
+    for (index1 = 0; input1[index1] != NULL; index1++) {\r
+               strings1[index1] = xmlStrdup((const xmlChar *) input1[index1]);\r
+               if (strings1[index1] == NULL) {\r
+                       goto CATCH;\r
+               }\r
+    }\r
+    for (index2 = 0, index3 = 0; index1 < NB_STRINGS_MAX - NB_STRINGS_NS; index1++,index2++) {\r
+        strings1[index1] = xmlStrncatNew(strings1[index2], strings1[index3], xmlStrlen(strings1[index3]));\r
+               if (strings1[index1] == NULL) {\r
+                       goto CATCH;\r
+               }\r
+               if (index2 >= 50) {\r
+           index2 = 0;\r
+           index3++;\r
+               }\r
+    }\r
+    for (index2 = 0; (index2 < 50) && (index1 < NB_STRINGS_MAX); index1++, index2+=2) {\r
+        strings1[index1] = xmlStrncatNew(strings1[index2], (const xmlChar *) ":", 1);\r
+               if (strings1[index1] == NULL) {\r
+                        goto CATCH;\r
+               }\r
+    }\r
+    for (index2 = NB_STRINGS_MAX - NB_STRINGS_NS, index3 = 0; index1 < NB_STRINGS_MAX;index1++,index2++) {\r
+        strings1[index1] = xmlStrncatNew(strings1[index2], strings1[index3], xmlStrlen(strings1[index3]));\r
+                       if (strings1[index1] == NULL) {\r
+                         goto CATCH;\r
+                       }\r
+               index3 += 3;\r
+               if (index3 >= 50)\r
+                       index3 = 0;\r
+    }\r
+\r
+    /*\r
+     * Now do the same with the second pool of strings\r
+     */\r
+    for (index1 = 0; input2[index1] != NULL; index1++) {\r
+        strings2[index1] = xmlStrdup((const xmlChar *) input2[index1]);\r
+               if (strings2[index1] == NULL) {\r
+                         goto CATCH;\r
+                       }\r
+       }\r
+    for (index2 = 0, index3 = 0; index1 < NB_STRINGS_MAX - NB_STRINGS_NS; index1++,index2++) {\r
+        strings2[index1] = xmlStrncatNew(strings2[index2], strings2[index3], xmlStrlen(strings2[index3]));\r
+               if (strings2[index1] == NULL) {\r
+                       goto CATCH;\r
+               }\r
+               if (index2 >= 50) {\r
+                       index2 = 0;\r
+                       index3++;\r
+               }\r
+    }\r
+    for (index2 = 0; (index2 < 50) && (index1 < NB_STRINGS_MAX); index1++, index2+=2) {\r
+        strings2[index1] = xmlStrncatNew(strings2[index2], (const xmlChar *) ":", 1);\r
+                       if (strings2[index1] == NULL) {\r
+                               goto CATCH;\r
+                       }\r
+    }\r
+    for (index2 = NB_STRINGS_MAX - NB_STRINGS_NS, index3 = 0;\r
+         index1 < NB_STRINGS_MAX;index1++,index2++) {\r
+        strings2[index1] = xmlStrncatNew(strings2[index2], strings2[index3], xmlStrlen(strings2[index3]));\r
+               if (strings2[index1] == NULL) {\r
+                        goto CATCH;\r
+                       }\r
+               index3 += 3;\r
+               if (index3 >= 50) \r
+                       index3 = 0;\r
+    }\r
+       return XML_TRUE;\r
+CATCH:\r
+       return XML_FALSE;\r
+\r
+}\r
+\r
+static void \r
+cleanStrings(void) \r
+{\r
+    int index;\r
+\r
+    for (index = 0; index < NB_STRINGS_MAX; index++) {\r
+        if (strings1[index] != NULL) /* really should not happen */\r
+                               xmlFree(strings1[index]);\r
+    }\r
+    for (index = 0; index < NB_STRINGS_MAX; index++) {\r
+        if (strings2[index] != NULL) /* really should not happen */\r
+                               xmlFree(strings2[index]);\r
+    }\r
+}\r
+/**    \r
+       * @test                 UTcxmlDictP01\r
+       * @brief                const xmlChar * xmlDictLookup   (xmlDictPtr dict, const xmlChar * name, int len)\r
+                                       const xmlChar * xmlDictQLookup (xmlDictPtr dict, const xmlChar * prefix, const xmlChar * name)\r
+                                       int xmlDictOwns (xmlDictPtr dict, const xmlChar * str)\r
+       * @desc                 Positive Test for Adding the @name to the dictionnary @dict if not present\r
+                                       Positive test for Adding the QName @prefix:@name to the hash @dict if not present\r
+                                       Positive Test for checking if a string is owned by the disctionary\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [create a new dictionary, Free the hash dict and its contents] @n\r
+       *                       {xmlDictPtr(dict), xmlChar *(string with index1), length i.e int(-1)} => {N/A |Internal copy of the name or NULL} @n\r
+                                       input2: [create a new dictionary, Free the hash dict and its contents] @n\r
+       *                       {xmlDictPtr(dict), xmlChar *(string with index2), length of string int(len)} => {N/A |Internal copy of the name or NULL} @n\r
+                                       input3: [create a new dictionary, Free the hash dict and its contents] @n\r
+       *                       {xmlDictPtr(dict), xmlChar *(string with different index), length of string int(len)} => {N/A |Internal copy of the name or NULL} @n\r
+                                       input4: [Create a new dictionary, inheriting strings from the read-only dictionnary @sub, N/A]\r
+                                       {xmlDictPtr(dict), xmlChar*(prefix), xmlChar *(name)} => {N/A |Internal copy of the Qname or NULL} @n\r
+                                       input5: [Create a new dictionary, N/A]\r
+                                       {xmlDictPtr(dict), xmlChar *(str)} => {N/A |Internal copy of the Qname or NULL} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcxmlDictP01()\r
+{\r
+       int                             resultVal = 0;\r
+       int                             resultVal1 = 0; \r
+    int                                index1 = 0;\r
+       int                             index2 = 0;\r
+    xmlDictPtr         dict;\r
+    int                                ret = 0;\r
+    xmlChar                    prefix[40];\r
+    xmlChar                    *pCur = NULL;\r
+       xmlChar                 *pRef = NULL;\r
+    const xmlChar      *pTmp = NULL;\r
+\r
+LIBXML_TEST_VERSION\r
+       /*\r
+       * Test a single dictionary\r
+       */\r
+    int res = fillStrings();\r
+       DTS_CHECK_EQ_MESSAGE("xmlDictQLookup", (void *)res, (void *)XML_TRUE, "xmlDictQLookup Failed");\r
+\r
+    dict = xmlDictCreate();\r
+       DTS_CHECK_NE_MESSAGE("xmlDictQLookup", (void *)dict, (void *)NULL, "xmlDictQLookup Failed");    \r
+\r
+    memset(test1, 0, sizeof(test1));\r
+       resultVal1 = xmlDictSize(dict);\r
+       DTS_CHECK_EQ_MESSAGE("xmlDictQLookup", (void *)resultVal1, (void *)0, "xmlDictQLookup Failed");\r
+\r
+    /*\r
+     * Fill in NB_STRINGS_MIN, at this point the dictionary should not grow\r
+     * and we allocate all those doing the fast key computations\r
+     */\r
+    for (index1 = 0;index1 < NB_STRINGS_MIN;index1++) {\r
+        test1[index1] = xmlDictLookup(dict, strings1[index1], -1);\r
+               DTS_CHECK_NE_MESSAGE("xmlDictQLookup", (void *)test1[index1], (void *)NULL, "xmlDictQLookup Failed");    \r
+       }\r
+       DTS_PRINT("xmlDictQLookup", "Loop 1 Done");\r
+    index2 = NB_STRINGS_MAX - NB_STRINGS_NS;\r
+    for (index1 = 0;index1 < NB_STRINGS_MIN;index1++, index2++) {\r
+        test1[index2] = xmlDictLookup(dict, strings1[index2], xmlStrlen(strings1[index2]));\r
+       DTS_CHECK_NE_MESSAGE("xmlDictQLookup", (void *)test1[index2], (void *)NULL, "xmlDictQLookup Failed");\r
+       }\r
+DTS_PRINT("xmlDictQLookup", "Loop 2 Done");\r
+    index2 = NB_STRINGS_MAX - NB_STRINGS_MIN;\r
+    for (index1 = 0;index1 < NB_STRINGS_MIN;index1++, index2++) {\r
+        test1[index2] = xmlDictLookup(dict, strings1[index2], xmlStrlen(strings1[index2]));\r
+               DTS_CHECK_NE_MESSAGE("xmlDictQLookup", (void *)test1[index2] , (void *)NULL, "xmlDictQLookup Failed");\r
+    }\r
+DTS_PRINT("xmlDictQLookup", "Loop 3 Done");\r
+    /*\r
+     * At this point allocate all the strings\r
+     * the dictionary will grow in the process, reallocate more string tables\r
+     * and switch to the better key generator\r
+     */\r
+    for (index1 = 0;index1 < NB_STRINGS_MAX;index1++) {\r
+        if (test1[index1] != NULL)\r
+                       continue;\r
+               test1[index1] = xmlDictLookup(dict, strings1[index1], -1);\r
+               DTS_CHECK_NE_MESSAGE("xmlDictQLookup", (void *)test1[index1], (void *)NULL, "xmlDictQLookup Failed");\r
+    }\r
+DTS_PRINT("xmlDictQLookup", "Loop 4 Done");\r
+    /*\r
+     * Now we can start to test things, first that all strings1 belongs to\r
+     * the dict\r
+     */\r
+    for (index1 = 0; index1 < NB_STRINGS_MAX; index1++) {\r
+               int retval = xmlDictOwns(dict, test1[index1]);\r
+               DTS_CHECK_NE_MESSAGE("xmlDictQLookup", (void *)retval, (void *)0, "xmlDictQLookup Failed");\r
+    }\r
+\r
+DTS_PRINT("xmlDictQLookup", "Loop 41 Done");\r
+\r
+    /*\r
+     * Then that another lookup to the string will return the same\r
+     */\r
+    for (index1 = 0; index1 < NB_STRINGS_MAX; index1++) {\r
+               pTmp = xmlDictLookup(dict, strings1[index1], -1);\r
+               resultVal = xmlStrcmp(pTmp, test1[index1]);\r
+               DTS_CHECK_EQ_MESSAGE("xmlDictQLookup", (void *)resultVal, (void *)0, "xmlDictQLookup Failed");\r
+\r
+    }\r
+DTS_PRINT("xmlDictQLookup", "Loop 5 Done");\r
+    /*\r
+     * More complex, check the QName lookups\r
+     */\r
+    for (index1 = NB_STRINGS_MAX - NB_STRINGS_NS;index1 < NB_STRINGS_MAX;index1++) {\r
+        pCur = strings1[index1];\r
+               pRef = &prefix[0];\r
+               while (*pCur != ':') {\r
+                       *pRef++ = *pCur++;\r
+               }\r
+               pCur++;\r
+               *pRef = 0;\r
+               pTmp = xmlDictQLookup(dict, &prefix[0], pCur);\r
+               resultVal = xmlStrcmp(pTmp, test1[index1]);\r
+\r
+               DTS_CHECK_EQ_MESSAGE("xmlDictQLookup", (void *)resultVal, (void *)0, "xmlDictQLookup Failed");\r
+\r
+    }\r
+DTS_PRINT("xmlDictQLookup", "Loop 6 Done");\r
+    xmlDictFree(dict);\r
+    cleanStrings();\r
+}\r
+/**    \r
+       * @test                 UTcxmlDictP02\r
+       * @brief                const xmlChar * xmlDictLookup   (xmlDictPtr dict, const xmlChar * name, int len)\r
+                                       const xmlChar * xmlDictQLookup (xmlDictPtr dict, const xmlChar * prefix, const xmlChar * name)\r
+                                       int xmlDictOwns (xmlDictPtr dict, const xmlChar * str)\r
+       * @desc                 Positive Test for Adding the @name to the dictionnary @dict if not present\r
+                                       Positive test for Adding the QName @prefix:@name to the hash @dict if not present\r
+                                       Positive Test for checking if a string is owned by the disctionary\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [create a new dictionary, Free the hash dict and its contents] @n\r
+       *                       {xmlDictPtr(dict), xmlChar*(string with index1), length i.e int(-1)} => {N/A |Internal copy of the name or NULL} @n\r
+                                       input2: [create a new dictionary, Free the hash dict and its contents] @n\r
+       *                       {xmlDictPtr(dict), xmlChar *(string with index2), length of string int(len)} => {N/A |Internal copy of the name or NULL} @n\r
+                                       input3: [create a new dictionary, Free the hash dict and its contents] @n\r
+       *                       {xmlDictPtr(dict), xmlChar *(string with different index), length of string int(len)} => {N/A |Internal copy of the name or NULL} @n\r
+                                       input4: [Create a new dictionary, inheriting strings from the read-only dictionnary @sub, N/A]\r
+                                       {xmlDictPtr(dict), xmlChar *(string with index1), length i.e int(-1)} => {N/A |Internal copy of the name or NULL} @n\r
+                                       input5: [Create a new dictionary, inheriting strings from the read-only dictionnary @sub, N/A]\r
+                                       {xmlDictPtr(dict), xmlChar *(string with index2), length of string INT(LEN)} => {N/A |Internal copy of the name or NULL} @n\r
+                                       input6: [Create a new dictionary, inheriting strings from the read-only dictionnary @sub, N/A]\r
+                                       {xmlDictPtr(dict), xmlChar *(string with different index), length of string int(len)} => {N/A |Internal copy of the name or NULL} @n\r
+                                       input7: [Create a new dictionary, inheriting strings from the read-only dictionnary @sub, N/A]\r
+                                       {xmlDictPtr(dict), xmlChar* (prefix), xmlChar *(name)} => {N/A |Internal copy of the Qname or NULL} @n\r
+                                       input8: [Create a new dictionary, N/A]\r
+                                       {xmlDictPtr(dict), xmlChar *(str)} => {N/A |Internal copy of the Qname or NULL} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcxmlDictP02()\r
+{\r
+\r
+       int                             resultVal = 0;\r
+    int                                index1 = 0;\r
+       int                             index2 = 0;\r
+    xmlDictPtr         dict;\r
+       xmlDictPtr              parent;\r
+    int                                ret = 0;\r
+    xmlChar                    prefix[40];\r
+    xmlChar                    *pCur = NULL;\r
+       xmlChar                 *pRef = NULL;\r
+    const xmlChar      *pTmp = NULL;\r
+\r
+LIBXML_TEST_VERSION\r
+    int res = fillStrings();\r
+       DTS_ASSERT_MESSAGE("xmlDictQLookup", (res != XML_TRUE), "fillStrings Failed");\r
+\r
+    parent = xmlDictCreate();\r
+       DTS_ASSERT_MESSAGE("xmlDictQLookup", (parent == NULL), "xmlDictCreate Failed");\r
+\r
+       DTS_ASSERT_MESSAGE("xmlDictQLookup", (xmlDictSize(parent) != 0), "xmlDictSize Failed");\r
+\r
+    /*\r
+     * Fill in NB_STRINGS_MIN, at this point the dictionary should not grow\r
+     * and we allocate all those doing the fast key computations\r
+     */\r
+    for (index1 = 0;index1 < NB_STRINGS_MIN;index1++) {\r
+        test1[index1] = xmlDictLookup(parent, strings1[index1], -1);\r
+               DTS_ASSERT_MESSAGE("xmlDictQLookup", (test1[index1] == NULL), "xmlDictQLookup Failed");\r
+    }\r
+       DTS_PRINT("xmlDictQLookup", "Loop 1");\r
+    index2 = NB_STRINGS_MAX - NB_STRINGS_NS;\r
+    for (index1 = 0;index1 < NB_STRINGS_MIN;index1++, index2++) {\r
+        test1[index2] = xmlDictLookup(parent, strings1[index2], xmlStrlen(strings1[index2]));\r
+               DTS_ASSERT_MESSAGE("xmlDictQLookup", (test1[index2] == NULL), "xmlDictQLookup Failed");\r
+    }\r
+       DTS_PRINT("xmlDictQLookup", "Loop 2");\r
+    index2 = NB_STRINGS_MAX - NB_STRINGS_MIN;\r
+    for (index1 = 0;index1 < NB_STRINGS_MIN;index1++, index2++) {\r
+        test1[index2] = xmlDictLookup(parent, strings1[index2], xmlStrlen(strings1[index2]));\r
+               DTS_ASSERT_MESSAGE("xmlDictQLookup", (test1[index2] == NULL), "xmlDictQLookup Failed");\r
+    }\r
+       DTS_PRINT("xmlDictQLookup", "Loop 3");\r
+    /*\r
+     * At this point allocate all the strings\r
+     * the dictionary will grow in the process, reallocate more string tables\r
+     * and switch to the better key generator\r
+     */\r
+    for (index1 = 0;index1 < NB_STRINGS_MAX;index1++) {\r
+        if (test1[index1] != NULL)\r
+                       continue;\r
+               test1[index1] = xmlDictLookup(parent, strings1[index1], -1);\r
+               if(test1[index1] == NULL){\r
+               DTS_FAIL("xmlDictQLookup", "xmlDictQLookup Failed");\r
+               }\r
+    }\r
+       DTS_PRINT("xmlDictQLookup", "Loop 4");\r
+\r
+       //Create the sub directory from the parent directory\r
+    dict = xmlDictCreateSub(parent);\r
+       DTS_ASSERT_MESSAGE("xmlDictQLookup", (dict==NULL), "xmlDictQLookup Failed");\r
+\r
+       DTS_PRINT("xmlDictQLookup", "Loop 5");\r
+    memset(test2, 0, sizeof(test2));\r
+       DTS_ASSERT_MESSAGE("xmlDictQLookup", (xmlDictSize(parent) != xmlDictSize(dict)), "xmlDictQLookup Failed");\r
+       DTS_PRINT("xmlDictQLookup", "Loop 6");\r
+    /*\r
+     * Fill in NB_STRINGS_MIN, at this point the dictionary should not grow\r
+     * and we allocate all those doing the fast key computations\r
+     * All the strings are based on a different seeds subset so we know\r
+     * they are allocated in the main dictionary, not coming from the parent\r
+     */\r
+    for (index1 = 0;index1 < NB_STRINGS_MIN;index1++) {\r
+        test2[index1] = xmlDictLookup(dict, strings2[index1], -1);\r
+               DTS_ASSERT_MESSAGE("xmlDictQLookup", (test2[index1] == NULL), "xmlDictQLookup Failed");\r
+    }\r
+       DTS_PRINT("xmlDictQLookup", "Loop 7");\r
+    index2 = NB_STRINGS_MAX - NB_STRINGS_NS;\r
+\r
+    for (index1 = 0;index1 < NB_STRINGS_MIN;index1++, index2++) {\r
+        test2[index2] = xmlDictLookup(dict, strings2[index2], xmlStrlen(strings2[index2]));\r
+               DTS_ASSERT_MESSAGE("xmlDictQLookup", (test2[index2] == NULL), "xmlDictQLookup Failed");\r
+    }\r
+       DTS_PRINT("xmlDictQLookup", "Loop 8");\r
+\r
+    index2 = NB_STRINGS_MAX - NB_STRINGS_MIN;\r
+    for (index1 = 0;index1 < NB_STRINGS_MIN;index1++, index2++) {\r
+        test2[index2] = xmlDictLookup(dict, strings2[index2], xmlStrlen(strings2[index2]));\r
+               DTS_ASSERT_MESSAGE("xmlDictQLookup", (test2[index2] == NULL), "xmlDictQLookup Failed");\r
+    }\r
+       DTS_PRINT("xmlDictQLookup", "Loop 9");\r
+\r
+    /*\r
+     * At this point allocate all the strings\r
+     * the dictionary will grow in the process, reallocate more string tables\r
+     * and switch to the better key generator\r
+     */\r
+    for (index1 = 0;index1 < NB_STRINGS_MAX;index1++) {\r
+        if (test2[index1] != NULL)\r
+                       continue;\r
+               test2[index1] = xmlDictLookup(dict, strings2[index1], -1);\r
+               if (test2[index1] == NULL) {\r
+               DTS_FAIL("xmlDictQLookup", "xmlDictQLookup Failed");\r
+               }\r
+   }\r
+       DTS_PRINT("xmlDictQLookup", "Loop 10");\r
+\r
+    /*\r
+     * Now we can start to test things, first that all strings2 belongs to\r
+     * the dict, and that none of them was actually allocated in the parent\r
+     */\r
+    for (index1 = 0;index1 < NB_STRINGS_MAX;index1++) {\r
+       if(!xmlDictOwns(dict, test2[index1]))\r
+       {\r
+               DTS_FAIL("xmlDictQLookup", "xmlDictQLookup Failed");\r
+       }\r
+       if(xmlDictOwns(parent, test2[index1]))\r
+       {\r
+               DTS_FAIL("xmlDictQLookup", "xmlDictQLookup Failed");\r
+       }\r
+    }\r
+       DTS_PRINT("xmlDictQLookup", "Loop 11");\r
+#if 0\r
+    /*\r
+     * Also verify that all strings from the parent are seen from the subdict\r
+     */\r
+    for (index1 = 0; index1 < NB_STRINGS_MAX; index1++) {\r
+               if(!xmlDictOwns(dict, test1[index1])){\r
+                       DTS_FAIL("xmlDictQLookup", "xmlDictQLookup Failed");\r
+               }\r
+    }\r
+#endif\r
+       DTS_PRINT("xmlDictQLookup", "Loop 12");\r
+    /*\r
+     * Then that another lookup to the string in sub will return the same\r
+     */\r
+    for (index1 = 0; index1 < NB_STRINGS_MAX; index1++) {\r
+               pTmp = xmlDictLookup(dict, strings2[index1], -1);\r
+               resultVal = xmlStrcmp(pTmp, test2[index1]);\r
+               if(resultVal != 0){\r
+                       DTS_FAIL("xmlDictQLookup", "xmlStrcmp Failed");\r
+               }\r
+       }\r
+       DTS_PRINT("xmlDictQLookup", "Loop 13");\r
+#if 0\r
+       /*\r
+     * But also that any lookup for a string in the parent will be provided\r
+     * as in the parent\r
+     */\r
+    for (index1 = 0; index1 < NB_STRINGS_MAX; index1++) {\r
+               pTmp = xmlDictLookup(dict, strings1[index1], -1);\r
+               resultVal = xmlStrcmp(pTmp, test1[index1]);\r
+               if(resultVal != 0){\r
+                       DTS_FAIL("xmlDictQLookup", "xmlStrcmp Failed");\r
+               }\r
+    }\r
+       DTS_PRINT("xmlDictQLookup", "Loop 14");\r
+#endif\r
+    /*\r
+     * check the QName lookups\r
+     */\r
+    for (index1 = NB_STRINGS_MAX - NB_STRINGS_NS; index1 < NB_STRINGS_MAX; index1++) {\r
+        pCur = strings2[index1];\r
+               pRef = &prefix[0];\r
+               while (*pCur != ':') {\r
+                       *pRef++ = *pCur++;\r
+               }\r
+               pCur++;\r
+               *pRef = 0;\r
+               pTmp = xmlDictQLookup(dict, &prefix[0], pCur);\r
+               resultVal = xmlStrcmp(pTmp, test2[index1]);\r
+               if(resultVal != 0){\r
+                       DTS_FAIL("xmlDictQLookup", "xmlStrcmp Failed");\r
+               }\r
+    }\r
+       DTS_PRINT("xmlDictQLookup", "Loop 15");\r
+#if 0\r
+    /*\r
+     * check the QName lookups for strings from the parent\r
+     */\r
+    for (index1 = NB_STRINGS_MAX - NB_STRINGS_NS;index1 < NB_STRINGS_MAX; index1++) {\r
+        pCur = strings1[index1];\r
+               pRef = &prefix[0];\r
+               while (*pCur != ':') {\r
+                       *pRef++ = *pCur++;\r
+               }\r
+               pCur++;\r
+               *pRef = 0;\r
+               pTmp = xmlDictQLookup(dict, &prefix[0], pCur);\r
+               resultVal = xmlStrcmp(pTmp, test1[index1]);\r
+               if(resultVal != 0){\r
+                       DTS_FAIL("xmlDictQLookup", "xmlStrcmp Failed");\r
+               }\r
+    }\r
+#endif\r
+       DTS_ASSERT_MESSAGE("xmlDictQLookup", ((xmlDictReference(dict)) != 0), "xmlDictQLookup Failed");\r
+    DTS_PRINT("xmlDictQLookup", "Loop 16");\r
+    DTS_PASS("xmlDictQLookup", "xmlDictQLookup passed");\r
+\r
+       xmlDictFree(dict);\r
+       xmlDictFree(parent);\r
+       xmlDictFree(dict);\r
+\r
+       //xmlDictFree(parent);\r
+\r
+    cleanStrings();\r
+\r
+}\r
+static void startup( void);\r
+static void cleanup( void);\r
+\r
+void (*tet_startup)( void) = startup;\r
+void (*tet_cleanup)( void) = cleanup;\r
+\r
+static void startup( void)\r
+{\r
+        /* start of TC */\r
+        tet_printf("TC starts.");\r
+}\r
+\r
+static void cleanup( void)\r
+{\r
+        /* end of TC */\r
+        tet_printf("TC ends.");\r
+}\r
+\r
+struct tet_testlist tet_testlist[] = {\r
+       // Handling of out of context errors\r
+       {UTcxmlDictP01,1},\r
+       {UTcxmlDictP02,2},\r
+       { NULL, 0 },\r
+       \r
+};\r
diff --git a/TC/testcase/utc_libxml_XmlEncoding.c b/TC/testcase/utc_libxml_XmlEncoding.c
new file mode 100755 (executable)
index 0000000..85a1843
--- /dev/null
@@ -0,0 +1,344 @@
+/*\r
+*  libxml test suite\r
+*\r
+* Copyright (c) 2012 Samsung Electronics Co., Ltd. All rights reserved.\r
+*\r
+* Contact: {Maintainer Name} <{Maintainer Email}>\r
+* \r
+* Licensed under the Apache License, Version 2.0 (the "License");\r
+* you may not use this file except in compliance with the License.\r
+* You may obtain a copy of the License at\r
+*\r
+* http://www.apache.org/licenses/LICENSE-2.0\r
+*\r
+* Unless required by applicable law or agreed to in writing, software\r
+* distributed under the License is distributed on an "AS IS" BASIS,\r
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+* See the License for the specific language governing permissions and\r
+* limitations under the License.\r
+*\r
+*/ \r
+\r
+#include "utc_libxml_include.h"\r
+\r
+\r
+#define MAX_SIZE                       100\r
+#define MAX_ENCODE_METHODS 28\r
+\r
+static const char *encodingMethods[MAX_ENCODE_METHODS]={"",\r
+                                                                "UTF-8",\r
+                                                                "UTF8",\r
+                                                                "UTF-16",\r
+                                                                "UTF16",\r
+                                                                "ISO-10646-UCS-2",\r
+                                                                "UCS-2",\r
+                                                                "UCS2",\r
+                                                                "ISO-10646-UCS-4",\r
+                                                                "UCS-4",\r
+                                                                "UCS4",\r
+                                                                "ISO-8859-1",\r
+                                                                "ISO-LATIN-1",\r
+                                                                "ISO LATIN 1",\r
+                                                                "ISO-8859-2",\r
+                                                                "ISO-LATIN-2",\r
+                                                                "ISO LATIN 2",\r
+                                                                "ISO-8859-3",\r
+                                                                "ISO-8859-4",\r
+                                                                "ISO-8859-5",\r
+                                                                "ISO-8859-6",\r
+                                                                "ISO-8859-7",\r
+                                                                "ISO-8859-8",\r
+                                                                "ISO-8859-9",\r
+                                                                "ISO-2022-JP",\r
+                                                                "SHIFT_JIS",\r
+                                                                "EUC-JP",\r
+                                                                "invalid"\r
+                                       };\r
+\r
+static  const char *encodingNames[MAX_ENCODE_METHODS]={"",\r
+                                                                                          "UTF-8",\r
+                                                                                          "UTF-8",\r
+                                                                                          "UTF-16",\r
+                                                                                          "UTF-16",\r
+                                                                                          "ISO-10646-UCS-2",\r
+                                                                                          "ISO-10646-UCS-2",\r
+                                                                                          "ISO-10646-UCS-2",\r
+                                                                                          "ISO-10646-UCS-4",\r
+                                                                                          "ISO-10646-UCS-4",\r
+                                                                                          "ISO-10646-UCS-4",\r
+                                                                                          "ISO-8859-1",\r
+                                                                                          "ISO-8859-1",\r
+                                                                                          "ISO-8859-1",\r
+                                                                                          "ISO-8859-2",\r
+                                                                                          "ISO-8859-2",\r
+                                                                                          "ISO-8859-2",\r
+                                                                                          "ISO-8859-3",\r
+                                                                                          "ISO-8859-4",\r
+                                                                                          "ISO-8859-5",\r
+                                                                                          "ISO-8859-6",\r
+                                                                                          "ISO-8859-7",\r
+                                                                                          "ISO-8859-8",\r
+                                                                                          "ISO-8859-9",\r
+                                                                                          "ISO-2022-JP",\r
+                                                                                          "Shift-JIS",\r
+                                                                                          "EUC-JP"\r
+                                                                                  };\r
+\r
+\r
+\r
+\r
+/**    \r
+       * @test                 UTcxmlEncodingP01\r
+       * @brief                int xmlAddEncodingAlias (const char * name, const char * alias)\r
+                                       int     xmlDelEncodingAlias     (const char * alias)\r
+                                       const char * xmlGetEncodingAlias (const char * alias)\r
+       * @desc                 Positive Test for Registering an alias @alias for an encoding named @name\r
+                                       Positive Test for Unregistering an encoding alias @alias\r
+                                       Positive Test for Lookuping an encoding name for the given alias.\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {const char *(name)} => { N/A | 0 or -1 } @n\r
+                                       input2: [N/A, N/A] @n\r
+       *                       {const char *(alias))} => {N/A | 0 or -1 } @n\r
+                                       input3: [N/A, N/A] @n\r
+       *                       {const char *(alias)} => {N/A | NULL or original name } @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+\r
+static void\r
+UTcxmlEncodingP01()\r
+{\r
+       const char *pName =  "<foo/>";\r
+       const char *pAlias =  "foo";\r
+\r
+       int resultVal = xmlAddEncodingAlias(pName, pAlias);\r
+       DTS_CHECK_EQ_MESSAGE("xmlGetEncodingAlias", (void *)resultVal, (void *)0, "xmlAddEncodingAlias 1 Failed");\r
+\r
+       const char *pResultName = xmlGetEncodingAlias(pAlias);\r
+       DTS_CHECK_EQ_MESSAGE("xmlGetEncodingAlias", (void *)(strcmp(pResultName, pName)), (void *)0, "xmlGetEncodingAlias 2 Failed");\r
+\r
+       resultVal = xmlDelEncodingAlias(pAlias);\r
+       DTS_CHECK_EQ_MESSAGE("xmlGetEncodingAlias", (void *)resultVal, (void *)-1, "xmlDelEncodingAlias 3 Failed");\r
+\r
+       xmlCleanupEncodingAliases();\r
+       const char *pInvalidName = xmlGetEncodingAlias(pAlias);\r
+       DTS_CHECK_EQ_MESSAGE("xmlGetEncodingAlias", (void *)pInvalidName, (void *)NULL, "xmlCleanupEncodingAliases 4 Failed");  \r
+}\r
+/**    \r
+       * @test                 UTcxmlEncodingP02\r
+       * @brief                const char *    xmlGetCharEncodingName  (xmlCharEncoding enc)\r
+       * @desc                 Positive Test for XML encoding\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Parse and Get encoding name, N/A] @n\r
+       *                       {xmlCharEncoding(enc)} => {N/A | canonical name for the given encoding} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcxmlEncodingP02()\r
+{\r
+       int                             count = 0;\r
+       const char              *pEncodeName = NULL;\r
+       xmlCharEncoding encode;\r
+\r
+       encode = xmlParseCharEncoding(encodingMethods[0]);\r
+       pEncodeName = xmlGetCharEncodingName(encode);\r
+       DTS_CHECK_EQ_MESSAGE("xmlGetCharEncodingName", (void *)pEncodeName, (void *)NULL, "xmlGetCharEncodingName Failed");     \r
+\r
+       encode = xmlParseCharEncoding(encodingMethods[MAX_ENCODE_METHODS - 1]);\r
+       pEncodeName = xmlGetCharEncodingName(encode);\r
+       DTS_CHECK_EQ_MESSAGE("xmlGetCharEncodingName", (void *)pEncodeName, (void *)NULL, "xmlGetCharEncodingName Failed");     \r
+\r
+       for(count = 1; count <= (MAX_ENCODE_METHODS - 2); count++){\r
+               xmlCharEncoding encode = xmlParseCharEncoding(encodingMethods[count]);\r
+               pEncodeName = xmlGetCharEncodingName(encode);\r
+               DTS_CHECK_EQ_MESSAGE("xmlGetEncodingAlias", (void *)(strcmp(pEncodeName, encodingNames[count])), (void *)0, "xmlGetEncodingAlias Failed");      \r
+       }\r
+}\r
+/**    \r
+       * @test                 UTcxmlEncodingP03\r
+       * @brief                int xmlCharEncInFunc (xmlCharEncodingHandler * handler, xmlBufferPtr out, xmlBufferPtr in)\r
+                                       int     xmlCharEncCloseFunc             (xmlCharEncodingHandler * handler)\r
+       * @desc                 Positive Test for xmlCharEncInFunc\r
+                                       Positive Test for xmlCharEncCloseFunc\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [get buffer char, free buffer pointer] @n\r
+       *                       {xmlCharEncodingHandler*(handler), xmlBufferPtr(out), xmlBufferPtr(in)} => {N/A | Number of bytes written} @n\r
+                                       input2: [get buffer char, free buffer pointer] @n\r
+       *                       {xmlCharEncodingHandler*(handler)} => {0 or -1 |N/A} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcxmlEncodingP03()\r
+{\r
+       //xmlErrorPtr pError;\r
+\r
+       xmlInitCharEncodingHandlers();\r
+       //pError = xmlGetLastError();\r
+       //MT_ASSERT_MESSAGE("checking the result for xmlCleanupCharEncodingHandlers", pError == NULL);\r
+       xmlRegisterCharEncodingHandler(NULL);\r
+       //xmlResetLastError();\r
+       //xmlCleanupCharEncodingHandlers();\r
+\r
+       xmlBufferPtr pBuffer = xmlBufferCreateSize(MAX_SIZE);\r
+       xmlBufferPtr pOut = xmlBufferCreateSize(MAX_SIZE);\r
+       xmlBufferAdd(pBuffer, (const xmlChar *)"0041", 4);\r
+\r
+       xmlCharEncodingHandlerPtr pHandler = xmlGetCharEncodingHandler(XML_CHAR_ENCODING_UTF16LE);\r
+\r
+       //xmlRegisterCharEncodingHandler(pHandler);\r
+       xmlCharEncodingHandlerPtr pCharhandler = xmlFindCharEncodingHandler("UTF16");\r
+       DTS_CHECK_NE_MESSAGE("xmlFindCharEncodingHandler", (void *)pCharhandler, (void *)NULL, "xmlFindCharEncodingHandler Failed");\r
+\r
+       int resultVal = xmlCharEncInFunc(pCharhandler, pOut, pBuffer);\r
+       DTS_CHECK_GT_MESSAGE("xmlFindCharEncodingHandler", (void *)resultVal, (void *)0, "xmlFindCharEncodingHandler Failed");\r
+\r
+       resultVal = xmlCharEncCloseFunc(pCharhandler);\r
+       DTS_CHECK_EQ_MESSAGE("xmlFindCharEncodingHandler", (void *)resultVal, (void *)0, "xmlFindCharEncodingHandler Failed");\r
+\r
+       resultVal = xmlCharEncCloseFunc(pHandler);\r
+       DTS_CHECK_EQ_MESSAGE("xmlFindCharEncodingHandler", (void *)resultVal, (void *)0, "xmlFindCharEncodingHandler Failed");\r
+       //xmlResetLastError();\r
+\r
+       xmlBufferFree(pBuffer);\r
+       xmlBufferFree(pOut);\r
+       //xmlCleanupCharEncodingHandlers();\r
+       //pError = xmlGetLastError();\r
+       //MT_CHECK_MESSAGE("checking the result for xmlCleanupCharEncodingHandlers", pError == NULL);\r
+}\r
+\r
+/**    \r
+       * @test                 UTcxmlEncodingP04\r
+       * @brief                int xmlCharEncOutFunc (xmlCharEncodingHandler * handler, xmlBufferPtr out, xmlBufferPtr in)\r
+                                       int xmlCharEncFirstLine (xmlCharEncodingHandler * handler, xmlBufferPtr out, xmlBufferPtr in)\r
+                                       int     xmlCharEncCloseFunc     (xmlCharEncodingHandler * handler)\r
+       * @desc                 Positive Test for xmlCharEncOutFunc\r
+                                       Positive test for checking Front-end for the encoding handler input function, but handle only the very first line\r
+                                       Positive test for checking Generic front-end for encoding handler close function\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [get buffer, free buffer] @n\r
+       *                       {xmlCharEncodingHandler*(handler), xmlBufferPtr(out), xmlBufferPtr(in)} => {N/A | Number of byte written} @n\r
+                                       input2: [get buffer, free buffer] @n\r
+       *                       {xmlCharEncodingHandler*(handler), xmlBufferPtr(out), xmlBufferPtr(in)} => {N/A | Number of byte written} @n\r
+                                       input3: [get buffer, free buffer] @n\r
+       *                       {xmlCharEncodingHandler*(handler)} => {0 or -1 | N/A} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcxmlEncodingP04()\r
+{\r
+       xmlInitCharEncodingHandlers();\r
+       xmlBufferPtr pBuffer = xmlBufferCreateSize(MAX_SIZE);\r
+       xmlBufferPtr pOut = xmlBufferCreateSize(MAX_SIZE);\r
+       xmlBufferPtr pOutBuffer = xmlBufferCreateSize(MAX_SIZE);\r
+       xmlBufferAdd(pBuffer, (const xmlChar *)"41", 2);\r
+\r
+       xmlCharEncodingHandlerPtr pHandler = xmlGetCharEncodingHandler(XML_CHAR_ENCODING_UTF16LE);\r
+       //xmlRegisterCharEncodingHandler(pHandler);\r
+       xmlCharEncodingHandlerPtr pCharhandler = xmlFindCharEncodingHandler("UTF16");\r
+       DTS_CHECK_NE_MESSAGE("xmlFindCharEncodingHandler", (void *)pCharhandler, (void *)NULL, "xmlFindCharEncodingHandler1 Failed");\r
+       \r
+       int resultVal = xmlCharEncOutFunc(pCharhandler, pOut, pBuffer);\r
+       DTS_CHECK_GTE_MESSAGE("xmlFindCharEncodingHandler", (void *)resultVal, (void *)0, "xmlFindCharEncodingHandler2 Failed");\r
+\r
+       xmlBufferFree(pBuffer);\r
+       pBuffer = xmlBufferCreateSize(MAX_SIZE);\r
+       xmlBufferAdd(pBuffer, (const xmlChar *)"0041", 4);\r
+       resultVal = xmlCharEncFirstLine(pCharhandler, pOutBuffer, pBuffer);\r
+       DTS_CHECK_GTE_MESSAGE("xmlFindCharEncodingHandler", (void *)resultVal, (void *)0, "xmlFindCharEncodingHandler3 Failed");\r
+\r
+       resultVal = xmlCharEncCloseFunc(pHandler);\r
+       DTS_CHECK_EQ_MESSAGE("xmlFindCharEncodingHandler", (void *)resultVal, (void *)0, "xmlFindCharEncodingHandler4 Failed");\r
+\r
+       xmlBufferFree(pBuffer);\r
+       xmlBufferFree(pOut);\r
+       xmlBufferFree(pOutBuffer);\r
+       //xmlCleanupCharEncodingHandlers();\r
+}\r
+/**    \r
+       * @test                 UTcxmlEncodingP05\r
+       * @brief                int isolat1ToUTF8 (unsigned char * out, int * outlen, const unsigned char * in,int * inlen)\r
+                                       int UTF8Toisolat1 (unsigned char * out, int * outlen,  const unsigned char * in,int * inlen)\r
+       * @desc                 Positive Test for convert a block of ISO Latin 1 chars to an UTF-8 block of chars out\r
+                                       Positive Test for convert a block of  UTF-8 block chars to an ISO Latin 1of chars out\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {char *(out), int*(outlen), unsigned char* (in), int*(inlen)} => {N/A | number of bytes written} @n\r
+                                       input2: [N/A, N/A] @n\r
+       *                       {char *(out), int*(outlen), unsigned char* (in), int*(inlen)} => {N/A | number of bytes written} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcxmlEncodingP05()\r
+{\r
+       unsigned char                   *pOut = NULL;\r
+       char                                    *pIn = "abcd";\r
+       char                                    *pInUTF8 = "0041";\r
+       int                                             outSize = MAX_SIZE;\r
+       int                                             *pOutSize = &outSize;\r
+       int                                             inSize = 4;\r
+       int                                             *pInSize = &inSize;\r
+\r
+\r
+       pOut = (unsigned char *) malloc(MAX_SIZE);\r
+       int resultVal = isolat1ToUTF8(pOut, pOutSize, (const unsigned char*)pIn, pInSize);\r
+       DTS_CHECK_EQ_MESSAGE("isolat1ToUTF8", (void *)resultVal, (void *)inSize, "isolat1ToUTF8 1 Failed");     \r
+\r
+       free(pOut);\r
+       pOut = NULL;\r
+\r
+       pOut = (unsigned char *) malloc(MAX_SIZE);\r
+       resultVal = UTF8Toisolat1(pOut, pOutSize, (const unsigned char*)pInUTF8, pInSize);\r
+       DTS_CHECK_EQ_MESSAGE("isolat1ToUTF8", (void *)resultVal, (void *)inSize, "isolat1ToUTF8 2 Failed");     \r
+       \r
+       free(pOut);\r
+       pOut = NULL;\r
+}\r
+\r
+static void startup( void);\r
+static void cleanup( void);\r
+\r
+void (*tet_startup)( void) = startup;\r
+void (*tet_cleanup)( void) = cleanup;\r
+\r
+static void startup( void)\r
+{\r
+        /* start of TC */\r
+        tet_printf("TC starts.");\r
+}\r
+\r
+static void cleanup( void)\r
+{\r
+        /* end of TC */\r
+        tet_printf("TC ends.");\r
+}\r
+\r
+struct tet_testlist tet_testlist[] = {\r
+       // Handling of out of context errors\r
+       {UTcxmlEncodingP01,1},\r
+       {UTcxmlEncodingP02,2},\r
+       {UTcxmlEncodingP03,3},\r
+       {UTcxmlEncodingP04,5},\r
+       {UTcxmlEncodingP05,6},\r
+       { NULL, 0 },\r
+       \r
+};\r
diff --git a/TC/testcase/utc_libxml_XmlEntity.c b/TC/testcase/utc_libxml_XmlEntity.c
new file mode 100755 (executable)
index 0000000..466ebf8
--- /dev/null
@@ -0,0 +1,542 @@
+/*\r
+*  libxml test suite\r
+*\r
+* Copyright (c) 2012 Samsung Electronics Co., Ltd. All rights reserved.\r
+*\r
+* Contact: {Maintainer Name} <{Maintainer Email}>\r
+* \r
+* Licensed under the Apache License, Version 2.0 (the "License");\r
+* you may not use this file except in compliance with the License.\r
+* You may obtain a copy of the License at\r
+*\r
+* http://www.apache.org/licenses/LICENSE-2.0\r
+*\r
+* Unless required by applicable law or agreed to in writing, software\r
+* distributed under the License is distributed on an "AS IS" BASIS,\r
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+* See the License for the specific language governing permissions and\r
+* limitations under the License.\r
+*\r
+*/ \r
+\r
+#include "utc_libxml_include.h"\r
+\r
+\r
+\r
+/**    \r
+       * @test                 UTcxmlGetPredefinedEntityP01\r
+       * @brief                xmlEntityPtr    xmlGetPredefinedEntity  (const xmlChar * name)\r
+       * @desc                 Positive Test for Setting up the predefined entities\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                               { const xmlChar * "lt" } => { N/A | xmlEntityPtr pointer } @n\r
+                                       input2: [N/A, N/A] @n\r
+       *                               { const xmlChar * "gt" } => { N/A | xmlEntityPtr pointer } @n\r
+                                       input3: [N/A, N/A] @n\r
+       *                               { const xmlChar * "amp" } => { N/A | xmlEntityPtr pointer } @n\r
+                                       input4: [N/A, N/A] @n\r
+       *                               { const xmlChar * "apos" } => { N/A | xmlEntityPtr pointer } @n\r
+                                       input5: [N/A, N/A] @n\r
+       *                               { const xmlChar * "quot" } => { N/A | xmlEntityPtr pointer } @n\r
+                                       input6: [N/A, N/A] @n\r
+       *                               { const xmlChar * "invalid" } => { N/A | NULL } @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+\r
+static void\r
+UTcxmlGetPredefinedEntityP01()\r
+{\r
+       char *pName1 = "lt";\r
+       char *pName2 = "gt";\r
+       char *pName3 = "amp";\r
+       char *pName4 = "apos";\r
+       char *pName5 = "quot";\r
+       char *pName6 = "invalid";\r
+\r
+       /**\r
+       * @remarks   input1: [N/A, N/A] @n\r
+       *            { "lt" } => { N/A | xmlEntityPtr pointer } @n\r
+       */\r
+       xmlEntityPtr pEntity = xmlGetPredefinedEntity((const xmlChar *)pName1);\r
+       DTS_CHECK_NE_MESSAGE("xmlGetPredefinedEntity", (void *)pEntity, (void *)NULL, "xmlGetPredefinedEntity Failed");\r
+\r
+       /**\r
+       * @remarks   input2: [N/A, N/A] @n\r
+       *            { "gt" } => { N/A | xmlEntityPtr pointer } @n\r
+       */\r
+       pEntity = xmlGetPredefinedEntity((const xmlChar *)pName2);\r
+       DTS_CHECK_NE_MESSAGE("xmlGetPredefinedEntity", (void *)pEntity, (void *)NULL, "xmlGetPredefinedEntity Failed");\r
+\r
+       /**\r
+       * @remarks   input3: [N/A, N/A] @n\r
+       *            { "amp" } => { N/A | xmlEntityPtr pointer } @n\r
+       */\r
+       pEntity = xmlGetPredefinedEntity((const xmlChar *)pName3);\r
+       DTS_CHECK_NE_MESSAGE("xmlGetPredefinedEntity", (void *)pEntity, (void *)NULL, "xmlGetPredefinedEntity Failed");\r
+\r
+       /**\r
+       * @remarks   input4: [N/A, N/A] @n\r
+       *            { "apos" } => { N/A | xmlEntityPtr pointer } @n\r
+       */\r
+       pEntity = xmlGetPredefinedEntity((const xmlChar *)pName4);\r
+       DTS_CHECK_NE_MESSAGE("xmlGetPredefinedEntity", (void *)pEntity, (void *)NULL, "xmlGetPredefinedEntity Failed");\r
+\r
+       /**\r
+       * @remarks   input5: [N/A, N/A] @n\r
+       *            { "quot" } => { N/A | xmlEntityPtr pointer } @n\r
+       */\r
+       pEntity = xmlGetPredefinedEntity((const xmlChar *)pName5);\r
+       DTS_CHECK_NE_MESSAGE("xmlGetPredefinedEntity", (void *)pEntity, (void *)NULL, "xmlGetPredefinedEntity Failed");\r
+\r
+       /**\r
+       * @remarks   input6: [N/A, N/A] @n\r
+       *            { "invalid" } => { N/A | NULL } @n\r
+       */\r
+       pEntity = xmlGetPredefinedEntity((const xmlChar *)pName6);\r
+       DTS_CHECK_EQ_MESSAGE("xmlGetPredefinedEntity", (void *)pEntity, (void *)NULL, "xmlGetPredefinedEntity Failed");\r
+       \r
+}\r
+\r
+/**    \r
+       * @test                 UTcxmlCreateEntitiesTableP01\r
+       * @brief                xmlEntitiesTablePtr     xmlCreateEntitiesTable  (void)\r
+       * @desc                 Positive Test for creating and initializing an empty entities hash table\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                               { void } => { N/A | xmlEntitiesTablePtr pointer } @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcxmlCreateEntitiesTableP01()\r
+{\r
+       /**\r
+       * @remarks   input1: [N/A, N/A] @n\r
+       *            { void } => { N/A | xmlEntitiesTablePtr pointer } @n\r
+       */\r
+       xmlEntitiesTablePtr pTable = xmlCreateEntitiesTable();\r
+       DTS_CHECK_NE_MESSAGE("UTcxmlCreateEntitiesTableP01", (void *)pTable, (void *)NULL, "xmlCreateEntitiesTable Failed");\r
+\r
+       xmlFreeEntitiesTable(pTable);\r
+}\r
+\r
+/**    \r
+       * @test                 UTcxmlFreeEntitiesTableP01\r
+       * @brief                void xmlFreeEntitiesTable (xmlEntitiesTablePtr table)\r
+       * @desc                 Positive Test for Deallocating the memory used by an entities hash table\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Create the entities table, N/A] @n\r
+       *                               { xmlEntitiesTablePtr(table) } => { N/A | N/A } @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcxmlFreeEntitiesTableP01()\r
+{\r
+       xmlErrorPtr pError;\r
+\r
+       xmlResetLastError();\r
+       xmlEntitiesTablePtr pTable = xmlCreateEntitiesTable();\r
+       DTS_CHECK_NE_MESSAGE("xmlCreateEntitiesTable", (void *)pTable, (void *)NULL, "xmlCreateEntitiesTable Failed");\r
+\r
+       /**\r
+       * @remarks   input1: [Create the entities table, N/A] @n\r
+       *            { xmlEntitiesTablePtr pointer } => { N/A | N/A } @n\r
+       */\r
+       xmlFreeEntitiesTable(pTable);\r
+       pError = xmlGetLastError();\r
+       DTS_CHECK_EQ_MESSAGE("xmlCreateEntitiesTable", (void *)pError, (void *)NULL, "xmlGetLastError Failed");\r
+}\r
+\r
+/**    \r
+       * @test                 UTcxmlCopyEntitiesTableP01\r
+       * @brief                xmlEntitiesTablePtr     xmlCopyEntitiesTable (xmlEntitiesTablePtr table)\r
+       * @desc                 Positive Test for Building a copy of an entity table.\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Create the entities table, N/A] @n\r
+       *                               { xmlEntitiesTablePtr(Table) } => { N/A | xmlEntitiesTablePtr pTable } @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcxmlCopyEntitiesTableP01()\r
+{\r
+\r
+       xmlEntitiesTablePtr pTable = xmlCreateEntitiesTable();\r
+       DTS_CHECK_NE_MESSAGE("xmlCreateEntitiesTable", (void *)pTable, (void *)NULL, "xmlCreateEntitiesTable Failed");\r
+\r
+       /**\r
+       * @remarks   input1: [Create the entities table, N/A] @n\r
+       *            { xmlEntitiesTablePtr pTable } => { N/A | xmlEntitiesTablePtr pTable } @n\r
+       */\r
+       xmlEntitiesTablePtr pTableNew = xmlCopyEntitiesTable(pTable);\r
+       DTS_CHECK_NE_MESSAGE("xmlCreateEntitiesTable", (void *)pTableNew , (void *)NULL, "xmlCreateEntitiesTable Failed");\r
+\r
+       xmlFreeEntitiesTable(pTable);\r
+       xmlFreeEntitiesTable(pTableNew);\r
+}\r
+\r
+/**    \r
+       * @test                 UTcxmlAddDocEntityP01\r
+       * @brief                xmlEntityPtr xmlAddDocEntity (xmlDocPtr doc, const xmlChar * name, int type, const xmlChar * ExternalID, const xmlChar * SystemID, const xmlChar * content)\r
+       * @desc                 Positive Test for Registering a new entity for this document.\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [xmlDocPtr is retrieved, N/A] @n\r
+       *                               { xmlDocPtr(doc), const xmlChar *  "amp", int(1), const xmlChar * "amp", const xmlChar * "amp", const xmlChar * "amp" } => { N/A | xmlEntityPtr pEntity } @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcxmlAddDocEntityP01()\r
+{\r
+\r
+       char            *pName = "amp";\r
+       xmlDocPtr       doc;\r
+\r
+       doc = xmlReadMemory("<!DOCTYPE foo []> <foo/>", 24, "test", NULL, 0);\r
+\r
+       /**\r
+       * @remarks   input1: [xmlDocPtr is retrieved, N/A] @n\r
+       *            { xmlDocPtr, "amp", 1, "amp", "amp", "amp" } => { N/A | xmlEntityPtr pEntity } @n\r
+       */\r
+       xmlEntityPtr pEntity = xmlAddDocEntity(doc, (const xmlChar *)pName, 1, (const xmlChar *)pName, (const xmlChar *)pName, (const xmlChar *)pName);\r
+       DTS_CHECK_NE_MESSAGE("xmlAddDocEntity", (void *)pEntity , (void *)NULL, "xmlAddDocEntity Failed");\r
+       \r
+       xmlFreeDoc(doc);\r
+       //xmlFree((void *)pEntity);\r
+}\r
+\r
+       /**    \r
+       * @test                 UTcxmlAddDocEntityN01\r
+       * @brief                xmlEntityPtr xmlAddDocEntity (xmlDocPtr doc, const xmlChar * name, int type, const xmlChar * ExternalID, const xmlChar * SystemID, const xmlChar * content)\r
+       * @desc                 Negative Test for Registering a new entity for this document.\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                               { NULL, const xmlChar * "amp", int(1), const xmlChar * "amp", const xmlChar * "amp", const xmlChar * "amp" } => { N/A | NULL } @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcxmlAddDocEntityN01()\r
+{\r
+\r
+       char            *pName = "amp";\r
+\r
+       /**\r
+       * @remarks   input1: [N/A, N/A] @n\r
+       *            { NULL, "amp", 1, "amp", "amp", "amp" } => { N/A | NULL } @n\r
+       */\r
+       xmlEntityPtr pEntity = xmlAddDocEntity(NULL, (const xmlChar *)pName, 1, (const xmlChar *)pName, (const xmlChar *)pName, (const xmlChar *)pName);\r
+       DTS_CHECK_EQ_MESSAGE("xmlAddDocEntity", (void *)pEntity , (void *)NULL, "xmlAddDocEntity Failed");\r
+}\r
+\r
+/**    \r
+       * @test                 UTcxmlGetDocEntityP01\r
+       * @brief                xmlEntityPtr xmlGetDocEntity (xmlDocPtr doc, const xmlChar * name)\r
+       * @desc                 Positive Test to do an entity lookup in the document entity hash table and\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [xmlDocPtr is retrieved, N/A] @n\r
+       *                               { xmlDocPtr(doc), const xmlChar * "amp" } => { N/A | xmlEntityPtr pEntity } @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcxmlGetDocEntityP01()\r
+{\r
+       char            *pName = "amp";\r
+       xmlDocPtr       doc;\r
+\r
+       doc = xmlReadMemory("<!DOCTYPE foo []> <foo/>", 24, "test", NULL, 0);\r
+       /**\r
+       * @remarks   input1: [xmlDocPtr is retrieved, N/A] @n\r
+       *            { xmlDocPtr, "amp" } => { N/A | xmlEntityPtr pEntity } @n\r
+       */\r
+       xmlEntityPtr pEntity = xmlGetDocEntity(doc, (const xmlChar *)pName);\r
+       DTS_CHECK_NE_MESSAGE("xmlGetDocEntity", (void *)pEntity , (void *)NULL, "xmlGetDocEntity Failed");\r
+       \r
+       xmlFreeDoc(doc);\r
+       //xmlFree((void *)pEntity);\r
+}\r
+\r
+/**    \r
+       * @test                 UTcxmlGetDocEntityP02\r
+       * @brief                xmlEntityPtr xmlGetDocEntity (xmlDocPtr doc, const xmlChar * name)\r
+       * @desc                 Positive Test to do an entity lookup in the document entity hash table and\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Register a new entity for the document, N/A] @n\r
+       *                               { xmlDocPtr(doc), const xmlChar * "amp" } => { N/A | xmlEntityPtr pEntity } @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+\r
+static void\r
+UTcxmlGetDocEntityP02()\r
+{\r
+       char            *pName = "amp";\r
+       xmlDocPtr       doc;\r
+\r
+       doc = xmlReadMemory("<!DOCTYPE foo []> <foo/>", 24, "test", NULL, 0);\r
+       xmlEntityPtr pEntity = xmlAddDocEntity(doc, (const xmlChar *)pName, 1, (const xmlChar *)pName, (const xmlChar *)pName, (const xmlChar *)pName);\r
+       DTS_CHECK_NE_MESSAGE("xmlGetDocEntity", (void *)pEntity , (void *)NULL, "xmlAddDocEntity Failed");\r
+\r
+       /**\r
+       * @remarks   input1: [Register a new entity for the document, N/A] @n\r
+       *            { xmlDocPtr, "amp" } => { N/A | xmlEntityPtr pEntity } @n\r
+       */\r
+       xmlEntityPtr pEntity1 = xmlGetDocEntity(doc, (const xmlChar *)pName);\r
+       DTS_CHECK_NE_MESSAGE("xmlGetDocEntity", (void *)pEntity1 , (void *)NULL, "xmlGetDocEntity Failed");\r
+\r
+       xmlFreeDoc(doc);\r
+//     xmlFree((void *)pEntity);\r
+}\r
+\r
+/**    \r
+       * @test                 UTcxmlGetDocEntityN01\r
+       * @brief                xmlEntityPtr xmlGetDocEntity (xmlDocPtr doc, const xmlChar * name)\r
+       * @desc                 Negative Test to do an entity lookup in the document entity hash table and\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                               { NULL, const xmlChar * "invalid" } => { N/A | NULL } @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcxmlGetDocEntityN01()\r
+{\r
+       char            *pName = "invalid";\r
+\r
+       /**\r
+       * @remarks   input1: [N/A, N/A] @n\r
+       *            { NULL, "invalid" } => { N/A | NULL } @n\r
+       */\r
+       xmlEntityPtr pEntity = xmlGetDocEntity(NULL, (const xmlChar *)pName);\r
+       DTS_CHECK_EQ_MESSAGE("xmlGetDocEntity", (void *)pEntity , (void *)NULL, "xmlGetDocEntity Failed");\r
+}\r
+\r
+/**    \r
+       * @test                 UTcxmlAddDtdEntityN01\r
+       * @brief                xmlEntityPtr xmlAddDtdEntity (xmlDocPtr doc, const xmlChar * name, int type, const xmlChar * ExternalID, const xmlChar * SystemID, const xmlChar * content)\r
+       * @desc                 Negative Test for registering a new entity for this document DTD external subset.\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [xmlAddDtdEntity document is without external subset, N/A] @n\r
+       *                               { xmlDocPtr(doc), const xmlChar * "amp", int(1), const xmlChar * "amp", const xmlChar * "amp", const xmlChar * "amp" } => { N/A | NULL } @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcxmlAddDtdEntityN01()\r
+{\r
+\r
+       char            *pName = "amp";\r
+       xmlDocPtr       doc;\r
+\r
+       doc = xmlReadMemory("<!DOCTYPE foo []> <foo/>", 24, "test", NULL, 0);\r
+\r
+       /**\r
+       * @remarks   input1: [xmlAddDtdEntity document is without external subset, N/A] @n\r
+       *            { xmlDocPtr, "amp", 1, "amp", "amp", "amp" } => { N/A | NULL } @n\r
+       */\r
+       xmlEntityPtr pEntity = xmlAddDtdEntity(doc, (const xmlChar *)pName, 1, (const xmlChar *)pName, (const xmlChar *)pName, (const xmlChar *)pName);\r
+       DTS_CHECK_EQ_MESSAGE("xmlAddDtdEntity", (void *)pEntity , (void *)NULL, "xmlAddDtdEntity Failed");\r
+\r
+       xmlFreeDoc(doc);\r
+}\r
+\r
+/**    \r
+       * @test                 UTcxmlAddDtdEntityN02\r
+       * @brief                xmlEntityPtr xmlAddDtdEntity (xmlDocPtr doc, const xmlChar * name, int type, const xmlChar * ExternalID, const xmlChar * SystemID, const xmlChar * content)\r
+       * @desc                 Negative Test for registering a new entity for this document DTD external subset.\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                               { NULL, const xmlChar * "amp", int(1), const xmlChar * "amp", const xmlChar * "amp", const xmlChar * "amp" } => { N/A | NULL } @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcxmlAddDtdEntityN02()\r
+{\r
+\r
+       char            *pName = "amp";\r
+\r
+       /**\r
+       * @remarks   input1: [N/A, N/A] @n\r
+       *            { NULL, "amp", 1, "amp", "amp", "amp" } => { N/A | NULL } @n\r
+       */\r
+       xmlEntityPtr pEntity = xmlAddDtdEntity(NULL, (const xmlChar *)pName, 1, (const xmlChar *)pName, (const xmlChar *)pName, (const xmlChar *)pName);\r
+       DTS_CHECK_EQ_MESSAGE("xmlAddDtdEntity", (void *)pEntity , (void *)NULL, "xmlAddDtdEntity Failed");\r
+}\r
+\r
+/**    \r
+       * @test                 UTcxmlEntityP01\r
+       * @brief                xmlEntityPtr xmlAddDtdEntity (xmlDocPtr doc, const xmlChar * name, int type, const xmlChar * ExternalID, const xmlChar * SystemID, const xmlChar * content)\r
+                                       xmlEntityPtr xmlGetDtdEntity    (xmlDocPtr doc, const xmlChar * name)\r
+       * @desc                 Positive Test for registering a new entity for this document DTD external subset.\r
+                                       Positive test to do an entity lookup in the DTD entity hash table\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlDocPtr(doc), xmlChar *(name), int(1), const xmlChar *(ExternalID), const xmlChar *(SystemID), const xmlChar *(content)} => {xmlEntityPtr or NULL | N/A} @n\r
+                                       input2: [N/A, N/A] @n\r
+       *                       {xmlDocPtr(doc), xmlChar *(name)} => {N/A | Returns the corresponding entity found} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcxmlEntityP01()\r
+{\r
+       char            *pName = "amp";\r
+       xmlDocPtr       doc = NULL;\r
+\r
+       doc = xmlReadMemory("<!DOCTYPE foo []> <foo/>", 24, "test", NULL, 0);\r
+       doc->extSubset = xmlNewDtd(NULL, (const xmlChar *)pName, (const xmlChar *)pName, (const xmlChar *)pName);\r
+\r
+       xmlEntityPtr pEntity = xmlAddDtdEntity(doc, (const xmlChar *)pName, 1, (const xmlChar *)pName, (const xmlChar *)pName, (const xmlChar *)pName);\r
+       DTS_CHECK_NE_MESSAGE("xmlAddDtdEntity", (void *)pEntity , (void *)NULL, "xmlAddDtdEntity Failed");\r
+       \r
+\r
+       xmlEntityPtr pEntity1 = xmlGetDtdEntity(doc, (const xmlChar *)pName);\r
+       DTS_CHECK_NE_MESSAGE("xmlAddDtdEntity", (void *)pEntity1 , (void *)NULL, "xmlAddDtdEntity Failed");\r
+       \r
+       xmlFreeDoc(doc);\r
+//     xmlFree((void *)pEntity);\r
+}\r
+\r
+/**    \r
+       * @test                 UTcxmlEntityP02\r
+       * @brief                void xmlDumpEntitiesTable (xmlBufferPtr buf, xmlEntitiesTablePtr table)\r
+                                       void xmlDumpEntityDecl (xmlBufferPtr buf, xmlEntityPtr ent)\r
+       * @desc                 Positive Test for dumping the content of the entity table as an XML DTD definition\r
+                                       Positive test for dumping the content of the entity table as an XML DTD definition\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlBufferPtr(buf), xmlEntitiesTablePtr(table)} => {N/A | N/A} @n\r
+                                       input2: [N/A, N/A] @n\r
+       *                       {xmlBufferPtr(buf), xmlEntityPtr(ent)} => {N/A | N/A} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcxmlEntityP02()\r
+{\r
+       xmlErrorPtr pError = NULL;\r
+       char            *pName1 = "amp";\r
+\r
+       xmlResetLastError();\r
+       xmlBufferPtr buf = xmlBufferCreate();\r
+       xmlEntitiesTablePtr pTable = xmlCreateEntitiesTable();\r
+       xmlDumpEntitiesTable(buf, pTable);\r
+       pError = xmlGetLastError();\r
+       DTS_CHECK_EQ_MESSAGE("UTcxmlEntityP02", (void *)pError , (void *)NULL, "xmlDumpEntityDecl 1 Failed");\r
+\r
+       xmlEntityPtr pEntity = xmlGetPredefinedEntity((const xmlChar *)pName1);\r
+       xmlDumpEntityDecl(buf, pEntity);\r
+       pError = xmlGetLastError();\r
+       DTS_CHECK_NE_MESSAGE("UTcxmlEntityP02", (void *)pError , (void *)NULL, "xmlDumpEntityDecl 2 Failed");\r
+       \r
+       xmlBufferFree(buf);\r
+       xmlFreeEntitiesTable(pTable);\r
+}\r
+\r
+/**    \r
+       * @test                 UTcxmlEntityP03\r
+       * @brief                xmlChar * xmlEncodeSpecialChars (xmlDocPtr doc, const xmlChar * input)\r
+       * @desc                 Positive Test to perform a global encoding of a string, replacing the predefined entities this routine is reentrant, and result must be deallocated\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlDocPtr(doc), const xmlChar *(input)} => {N/A | Newly allocated string} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcxmlEntityP03()\r
+{\r
+    xmlDocPtr          doc = NULL;\r
+\r
+       doc = xmlNewDoc(BAD_CAST "1.0");  \r
+       const xmlChar* pSpecial = xmlEncodeSpecialChars(doc, BAD_CAST "text con&tent and <tag>");  \r
+       DTS_CHECK_NE_MESSAGE("xmlEncodeSpecialChars", (void *)pSpecial , (void *)NULL, "xmlGetLastError Failed");\r
+       \r
+       xmlFreeDoc(doc);\r
+       //xmlFree((void *)pSpecial);\r
+       //delete pSpecial;\r
+       //pSpecial = NULL;\r
+       //xmlFree();\r
+}\r
+\r
+static void startup( void)\r
+{\r
+        /* start of TC */\r
+        tet_printf("TC starts.");\r
+}\r
+\r
+static void cleanup( void)\r
+{\r
+        /* end of TC */\r
+        tet_printf("TC ends.");\r
+}\r
+\r
+void (*tet_startup)( void) = startup;\r
+void (*tet_cleanup)( void) = cleanup;\r
+\r
+struct tet_testlist tet_testlist[] = {\r
+       // Handling of out of context errors\r
+          {UTcxmlGetPredefinedEntityP01,1},\r
+          {UTcxmlCreateEntitiesTableP01,2},\r
+          {UTcxmlFreeEntitiesTableP01,3},\r
+          {UTcxmlCopyEntitiesTableP01,4},\r
+          {UTcxmlAddDocEntityP01,5},\r
+          {UTcxmlAddDocEntityN01,6},\r
+          {UTcxmlGetDocEntityP01,7},\r
+          {UTcxmlGetDocEntityP02,8},\r
+          {UTcxmlGetDocEntityN01,9},\r
+          {UTcxmlAddDtdEntityN01,10},\r
+          \r
+          {UTcxmlAddDtdEntityN02,11},\r
+          {UTcxmlEntityP01,12},\r
+          {UTcxmlEntityP02,13},\r
+          {UTcxmlEntityP03,14},\r
+          { NULL, 0},\r
+       \r
+};\r
diff --git a/TC/testcase/utc_libxml_XmlInclude.c b/TC/testcase/utc_libxml_XmlInclude.c
new file mode 100755 (executable)
index 0000000..b701245
--- /dev/null
@@ -0,0 +1,361 @@
+/*\r
+*  libxml test suite\r
+*\r
+* Copyright (c) 2012 Samsung Electronics Co., Ltd. All rights reserved.\r
+*\r
+* Contact: {Maintainer Name} <{Maintainer Email}>\r
+* \r
+* Licensed under the Apache License, Version 2.0 (the "License");\r
+* you may not use this file except in compliance with the License.\r
+* You may obtain a copy of the License at\r
+*\r
+* http://www.apache.org/licenses/LICENSE-2.0\r
+*\r
+* Unless required by applicable law or agreed to in writing, software\r
+* distributed under the License is distributed on an "AS IS" BASIS,\r
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+* See the License for the specific language governing permissions and\r
+* limitations under the License.\r
+*\r
+*/ \r
+\r
+#include "utc_libxml_include.h"\r
+#include <libxml/xinclude.h>\r
+\r
+\r
+/***************************************************************************\r
+* SUTsXmlInclude\r
+***************************************************************************/\r
+#define MY_ENCODING "ISO-8859-1"\r
+\r
+                      //Target\r
+#define        OUTFILE1        UTSHOME"/writer1.res"\r
+#define        OUTFILE2        UTSHOME"/missing.xml"\r
+#define        OUTFILE3        UTSHOME"/test.out"\r
+\r
+static xmlDocPtr api_doc = NULL;\r
+static xmlDtdPtr api_dtd = NULL;\r
+static xmlNodePtr api_root = NULL;\r
+static xmlAttrPtr api_attr = NULL;\r
+static xmlNsPtr api_ns = NULL;\r
+\r
+static void\r
+free_api_doc(void) {\r
+    xmlFreeDoc(api_doc);\r
+    api_doc = NULL;\r
+    api_dtd = NULL;\r
+    api_root = NULL;\r
+    api_attr = NULL;\r
+    api_ns = NULL;\r
+}\r
+\r
+static xmlDocPtr\r
+get_api_doc(void) {\r
+    if (api_doc == NULL) {\r
+        api_doc = xmlReadMemory("<!DOCTYPE root [<!ELEMENT root EMPTY>]><root xmlns:h='http://example.com/' h:foo='bar'/>", 88, "root_test", NULL, 0);\r
+       api_root = NULL;\r
+       api_attr = NULL;\r
+    }\r
+    return(api_doc);\r
+}\r
+\r
+static xmlNodePtr\r
+get_api_root(void) {\r
+    if ((api_root == NULL) || (api_root->type != XML_ELEMENT_NODE)) {\r
+        get_api_doc();\r
+       if ((api_doc != NULL) && (api_doc->children != NULL) &&\r
+           (api_doc->children->next != NULL) &&\r
+           (api_doc->children->next->type == XML_ELEMENT_NODE))\r
+           api_root = api_doc->children->next;\r
+    }\r
+    return(api_root);\r
+}\r
+\r
+       /**    \r
+       * @test                 UTcXmlXIncludeNewContextP01\r
+       * @brief                xmlXIncludeCtxtPtr xmlXIncludeNewContext(xmlDocPtr doc)\r
+       * @desc                 Positive and Negative Test for xmlXIncludeNewContext\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Sathish Kumar (satish.k4@samsung.com)\r
+       * @return               xmlXIncludeCtxtPtr\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlDocPtr(!=NULL)} => {N/A | xmlXIncludeCtxtPtr(!=NULL)} @n\r
+\r
+                                       input2: [N/A, N/A] @n\r
+       *                       {xmlDocPtr(==NULL)} => {N/A | xmlXIncludeCtxtPtr(==NULL)} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+ static void UTcXmlXIncludeNewContextP01()\r
+{\r
+           xmlXIncludeCtxtPtr ret_val=NULL;  /* pointer of xmlXIncludeCtxtPtr */\r
+           xmlDocPtr in_Doc = get_api_doc();   /*Initialize in_Doc ptr*/\r
+\r
+               // @remarks   input1: [N/A, N/A] @n\r
+           //                    {xmlDocPtr(!=NULL)} => {N/A | xmlXIncludeCtxtPtr(!=NULL)} @n\r
+               if(in_Doc != NULL)\r
+               {\r
+                 ret_val = xmlXIncludeNewContext(in_Doc);\r
+                 DTS_CHECK_NE_MESSAGE("xmlXIncludeNewContext", (void *)ret_val, (void *)NULL, "xmlXIncludeNewContext Failed");\r
+               }\r
+\r
+\r
+               // @remarks   input2: [N/A, N/A] @n\r
+           //                  {xmlDocPtr(==NULL)} => {N/A | xmlXIncludeCtxtPtr(==NULL)} @n\r
+\r
+               in_Doc = NULL;\r
+               if(in_Doc == NULL)\r
+               {\r
+                       ret_val = xmlXIncludeNewContext(in_Doc);\r
+                       DTS_CHECK_EQ_MESSAGE("xmlXIncludeNewContext", (void *)ret_val, (void *)NULL, "xmlXIncludeNewContext Failed");\r
+               }\r
+\r
+        xmlXIncludeFreeContext(ret_val);\r
+        xmlFreeDoc(in_Doc);//Free up all the structures used by a document.\r
+ }\r
+       /**\r
+       * @test                 UTcXmlXIncludeProcessFlagsP01\r
+       * @brief                int xmlXIncludeProcessFlags(xmlDocPtr doc,int flags)\r
+       * @desc                 Positive and Negative Test for xmlXIncludeProcessFlags\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Sathish Kumar (satish.k4@samsung.com)\r
+       * @return               int\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlDocPtr(!=NULL),int(1)} => {N/A | int(0)} @n\r
+       *\r
+       *                       input2: [N/A, N/A] @n\r
+       *                       {xmlDocPtr(==NULL),int(1)} => {N/A | int(-1)} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+ static void UTcXmlXIncludeProcessFlagsP01()\r
+{\r
+    int ret_val;\r
+    xmlDocPtr in_Doc=NULL; /* an XML document */\r
+   in_Doc = get_api_doc(); /*Initialize in_Doc ptr*/\r
+\r
+    //@remarks         input1: [N/A, N/A] @n\r
+   //                          {xmlDocPtr(!=NULL),int(1)} => {N/A | int(0)} @n\r
+    if(in_Doc != NULL)\r
+    {\r
+      ret_val = xmlXIncludeProcessFlags(in_Doc,1);\r
+         DTS_CHECK_EQ_MESSAGE("xmlXIncludeProcessFlags", (void *)ret_val, (void *)0, "xmlXIncludeProcessFlags Failed");\r
+    }\r
+   // @remarks    input2: [N/A, N/A] @n\r
+   //             {xmlDocPtr(==NULL),int(1)} => {N/A | int(-1)} @n\r
+    in_Doc = NULL;\r
+    if(in_Doc == NULL)\r
+    {\r
+      ret_val = xmlXIncludeProcessFlags(in_Doc,1);\r
+         DTS_CHECK_EQ_MESSAGE("xmlXIncludeProcessFlags", (void *)ret_val, (void *)-1, "xmlXIncludeProcessFlags Failed");\r
+    }\r
+    xmlFreeDoc(in_Doc);//Free up all the structures used by a document.\r
+}\r
+\r
+       /**\r
+       * @test                 UTcXmlXIncludeProcessFlagsP01\r
+       * @brief                int xmlXIncludeProcessNode(xmlXIncludeCtxtPtr ctxt, xmlNodePtr node)\r
+       * @desc                 Positive and Negative Test for xmlXIncludeProcessNode\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Sathish Kumar (satish.k4@samsung.com)\r
+       * @return               int\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlXIncludeCtxtPtr(ctxt_ptr!=NULL),xmlNodePtr(node_ptr==NULL )} => {N/A | int(-1)} @n\r
+       *\r
+       *                       input2: [N/A, N/A] @n\r
+       *                       {xmlXIncludeCtxtPtr(ctxt_ptr!=NULL),xmlNodePtr(node_ptr!=NULL )} => {N/A | int(-1)} @n\r
+\r
+       *                               input3: [N/A, N/A] @n\r
+       *                       {xmlXIncludeCtxtPtr(ctxt_ptr!=NULL),xmlNodePtr(node_ptr!=NULL )} => {N/A | int(0)} @n\r
+\r
+                                       input4: [N/A, N/A] @n\r
+       *                       {xmlXIncludeCtxtPtr(ctxt_ptr==NULL),xmlNodePtr(node_ptr!=NULL )} => {N/A | int(-1)} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+ static void UTcXmlXIncludeProcessNodeP01()\r
+ {\r
+        xmlXIncludeCtxtPtr ctxt_ptr=NULL;\r
+        xmlDocPtr in_Doc=NULL; /* an XML document */\r
+        in_Doc = get_api_doc(); /*Initialize in_Doc ptr*/\r
+        ctxt_ptr = xmlXIncludeNewContext(in_Doc);\r
+\r
+        xmlNodePtr node_ptr = NULL; //Create node pointer\r
+        int out_value;\r
+\r
+       // @remarks     input1: [N/A, N/A] @n\r
+       // {xmlXIncludeCtxtPtr(ctxt_ptr!=NULL),xmlNodePtr(node_ptr==NULL)} => {N/A | int(-1)} @n\r
+\r
+    if(ctxt_ptr != NULL && node_ptr == NULL)\r
+    {\r
+       out_value = xmlXIncludeProcessNode(ctxt_ptr,node_ptr);\r
+                 DTS_CHECK_EQ_MESSAGE("xmlXIncludeProcessNode", (void *)out_value, (void *)-1, "xmlXIncludeProcessNode 1 Failed");\r
+    }\r
+    //@remarks input2: [N/A, N/A] @n\r
+       //      {xmlXIncludeCtxtPtr(ctxt_ptr!=NULL),xmlNodePtr(node!=NULL)} => {N/A | int(-1)} @n\r
+\r
+\r
+    node_ptr = get_api_root();\r
+\r
+    if(ctxt_ptr != NULL && node_ptr != NULL)\r
+    {\r
+          out_value = xmlXIncludeProcessNode(ctxt_ptr,node_ptr);\r
+          DTS_CHECK_EQ_MESSAGE("xmlXIncludeProcessNode", (void *)out_value, (void *)0, "xmlXIncludeProcessNode 2 Failed");\r
+    }\r
+    // input3: [N/A, N/A] @n\r
+    // {xmlXIncludeCtxtPtr(ctxt_ptr!=NULL),xmlNodePtr(node_ptr!=NULL)} => {N/A | int(0)} @n\r
+\r
+\r
+        if(ctxt_ptr != NULL && node_ptr != NULL)\r
+        {\r
+               out_value = xmlXIncludeProcessNode(ctxt_ptr,node_ptr);\r
+               DTS_CHECK_EQ_MESSAGE("xmlXIncludeProcessNode", (void *)out_value, (void *)0, "xmlXIncludeProcessNode 3 Failed");\r
+        }\r
+\r
+    //  @remarks input4: [N/A, N/A] @n\r
+    //  {xmlXIncludeCtxtPtr(ctxt_ptr==NULL),xmlNodePtr(node_ptr!=NULL)} => {N/A | int(-1)} @n\r
+\r
+               ctxt_ptr=NULL;\r
+               if(ctxt_ptr == NULL && node_ptr != NULL)\r
+               {\r
+                 out_value = xmlXIncludeProcessNode(ctxt_ptr,node_ptr);\r
+                 DTS_CHECK_EQ_MESSAGE("xmlXIncludeProcessNode", (void *)out_value, (void *)-1, "xmlXIncludeProcessNode 4 Failed");\r
+               }\r
+\r
+               xmlXIncludeFreeContext(ctxt_ptr);\r
+               //xmlFreeNode(node_ptr);\r
+\r
+ }\r
+\r
+       /**\r
+       * @test                 UTcXmlXIncludeProcessTreeFlagsP01\r
+       * @brief                int xmlXIncludeProcessTreeFlags(xmlNodePtr tree, int flags)\r
+       * @desc                 Positive and Negative Test for xmlXIncludeProcessTreeFlags\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Sathish Kumar (satish.k4@samsung.com)\r
+       * @return               int\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlNodePtr(node_ptr=NULL and N/A) ),int(1)} => {N/A | int(-1)} @n\r
+       *\r
+       *                       input2: [N/A, N/A] @n\r
+       *                       {xmlNodePtr(node_ptr!=NULL and node_ptr->doc==NULL),int(1)} => {N/A | int(-1)} @n\r
+\r
+       *                               input3: [N/A, N/A] @n\r
+       *                       {xmlNodePtr(node_ptr!=NULL and node_ptr->doc==NULL ),int(1)} => {N/A | int(0)} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+\r
+ static void UTcXmlXIncludeProcessTreeFlagsP01()\r
+ {\r
+        xmlNodePtr node_ptr=NULL;\r
+        int out_value;\r
+       // @remarks input1: [N/A, N/A] @n\r
+       //                        {xmlNodePtr(node_ptr=NULL and N/A) ),int(1)} => {N/A | int(-1)} @n\r
+\r
+    if(node_ptr == NULL)\r
+    {\r
+       out_value = xmlXIncludeProcessTreeFlags(node_ptr,1);\r
+        DTS_CHECK_EQ_MESSAGE("xmlXIncludeProcessTreeFlags", (void *)out_value, (void *)-1, "xmlXIncludeProcessTreeFlags Failed");\r
+    }\r
+\r
+   // input2: [N/A, N/A] @n\r
+   //  {xmlNodePtr(node_ptr!=NULL and node_ptr->doc==NULL),int(1)} => {N/A | int(-1)} @n\r
+\r
+       xmlDocPtr in_Doc=NULL; /* an XML document */\r
+       in_Doc = get_api_doc(); /*Initialize in_Doc ptr*/\r
+       node_ptr = xmlDocGetRootElement(in_Doc);\r
+       node_ptr->doc = NULL;\r
+       if(node_ptr!=NULL && node_ptr->doc == NULL)\r
+       {\r
+         out_value = xmlXIncludeProcessTreeFlags(node_ptr,1);\r
+          DTS_CHECK_EQ_MESSAGE("xmlXIncludeProcessTreeFlags", (void *)out_value, (void *)-1, "xmlXIncludeProcessTreeFlags Failed");\r
+       }\r
+   // input3: [N/A, N/A] @n\r
+   // {xmlNodePtr(node_ptr!=NULL and node_ptr->doc==NULL ),int(1)} => {N/A | int(0)} @n\r
+\r
+       node_ptr->doc = in_Doc;\r
+       if(node_ptr!=NULL && node_ptr->doc != NULL)\r
+       {\r
+         out_value = xmlXIncludeProcessTreeFlags(node_ptr,1);\r
+          DTS_CHECK_EQ_MESSAGE("xmlXIncludeProcessTreeFlags", (void *)out_value, (void *)0, "xmlXIncludeProcessTreeFlags Failed");\r
+       }\r
+\r
+       //xmlFreeNode(node_ptr);\r
+ }\r
+       /**\r
+       * * @test               UTcXmlXIncludeSetFlagsP01\r
+       * @brief                int xmlXIncludeSetFlags(xmlXIncludeCtxtPtr ctxt, int flags)\r
+       * @desc                 Positive and Negative Test for xmlXIncludeSetFlags\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Sathish Kumar (satish.k4@samsung.com)\r
+       * @return               int\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlXIncludeCtxtPtr(ctxt_ptr!=NULL),int(1)} => {N/A | int(0)} @n\r
+       *\r
+       *                       input2: [N/A, N/A] @n\r
+       *                       {xmlXIncludeCtxtPtr(ctxt_ptr!=NULL),int(1)} => {N/A | int(-1)} @n\r
+\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+ static void UTcXmlXIncludeSetFlagsP01()\r
+ {\r
+        int out_value;\r
+        xmlXIncludeCtxtPtr ctxt_ptr=NULL;\r
+        xmlDocPtr in_Doc=NULL; /* an XML document */\r
+        in_Doc = get_api_doc(); /*Initialize in_Doc ptr*/\r
+        ctxt_ptr = xmlXIncludeNewContext(in_Doc);\r
+       // * @remarks input1: [N/A, N/A] @n\r
+       //      *         {xmlXIncludeCtxtPtr(ctxt_ptr!=NULL),int(1)} => {N/A | int(0)} @n\r
+    if(ctxt_ptr!=NULL)\r
+    {\r
+       out_value = xmlXIncludeSetFlags(ctxt_ptr,1);\r
+               DTS_CHECK_EQ_MESSAGE("xmlXIncludeSetFlags", (void *)out_value, (void *)0, "xmlXIncludeSetFlags Failed");\r
+    }\r
+\r
+    // * @remarks input1: [N/A, N/A] @n\r
+    // *            {xmlXIncludeCtxtPtr(ctxt_ptr!=NULL),int(1)} => {N/A | int(0)} @n\r
+    ctxt_ptr = NULL;\r
+    if(ctxt_ptr==NULL)\r
+    {\r
+       out_value = xmlXIncludeSetFlags(ctxt_ptr,1);\r
+               DTS_CHECK_EQ_MESSAGE("xmlXIncludeSetFlags", (void *)out_value, (void *)-1, "xmlXIncludeSetFlags Failed");\r
+    }\r
+    xmlXIncludeFreeContext(ctxt_ptr);\r
+\r
+ }\r
+\r
+static void startup( void);\r
+static void cleanup( void);\r
+\r
+void (*tet_startup)( void) = startup;\r
+void (*tet_cleanup)( void) = cleanup;\r
+\r
+static void startup( void)\r
+{\r
+        /* start of TC */\r
+        tet_printf("TC starts.");\r
+}\r
+\r
+static void cleanup( void)\r
+{\r
+        /* end of TC */\r
+        tet_printf("TC ends.");\r
+}\r
+\r
+struct tet_testlist tet_testlist[] = {\r
+       // Handling of out of context errors\r
+       {UTcXmlXIncludeNewContextP01,1},\r
+       {UTcXmlXIncludeProcessFlagsP01,2},\r
+       {UTcXmlXIncludeProcessTreeFlagsP01,3},\r
+       {UTcXmlXIncludeSetFlagsP01,4},\r
+       {UTcXmlXIncludeProcessNodeP01,5},\r
+       {NULL, 0 },\r
+       \r
+};\r
diff --git a/TC/testcase/utc_libxml_XmlIo.c b/TC/testcase/utc_libxml_XmlIo.c
new file mode 100755 (executable)
index 0000000..4b2940d
--- /dev/null
@@ -0,0 +1,379 @@
+/*\r
+*  libxml test suite\r
+*\r
+* Copyright (c) 2012 Samsung Electronics Co., Ltd. All rights reserved.\r
+*\r
+* Contact: {Maintainer Name} <{Maintainer Email}>\r
+* \r
+* Licensed under the Apache License, Version 2.0 (the "License");\r
+* you may not use this file except in compliance with the License.\r
+* You may obtain a copy of the License at\r
+*\r
+* http://www.apache.org/licenses/LICENSE-2.0\r
+*\r
+* Unless required by applicable law or agreed to in writing, software\r
+* distributed under the License is distributed on an "AS IS" BASIS,\r
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+* See the License for the specific language governing permissions and\r
+* limitations under the License.\r
+*\r
+*/ \r
+\r
+#include "utc_libxml_include.h"\r
+\r
+\r
+#define INPUT_XML      LIBXML2TESTXML\r
+#define INPUT_TXT      IOTESTTXT\r
+#define INPUTIO_TXT IOTEST1TXT\r
+\r
+int \r
+writeFunction (void * context, const char * buffer, int len)\r
+{\r
+       //Dummy Callbacks for registration\r
+       return 0;\r
+}\r
+\r
+int \r
+closeFunction (void * context)\r
+{\r
+       //Dummy Callbacks for registration\r
+       return 0;\r
+}\r
+\r
+int \r
+readFunction (void * context, char * buffer, int len)\r
+{\r
+       //Dummy Callbacks for registration\r
+       return 0;\r
+}\r
+\r
+int \r
+matchFunction (char const *filename)\r
+{\r
+       //Dummy Callbacks for registration\r
+       return 0;\r
+}\r
+\r
+void *\r
+openFunction (char const *filename)\r
+{\r
+       //Dummy Callbacks for registration\r
+       return NULL;\r
+}\r
+\r
+// namespace\r
+//using namespace Osp::Base;\r
+\r
+#ifdef LIBXML_XINCLUDE_ENABLED\r
+/**    \r
+       * @test                 UTcxmlIOP01\r
+       * @brief                int     xmlXIncludeProcess      (xmlDocPtr doc)\r
+       * @desc                 Positive Test for implementing the XInclude substitution on the XML document @doc\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Read Xml File, Free Doc] @n\r
+       *                       {xmlDocPtr(doc)} => { N/A |0 or -1} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcxmlIOP01()\r
+{\r
+       xmlDocPtr doc;\r
+       int resultOp;\r
+\r
+       xmlRegisterDefaultInputCallbacks();\r
+       doc = xmlReadFile(INPUT_XML, NULL, 0);\r
+       DTS_CHECK_NE_MESSAGE("xmlReadFile", (void *)doc, (void *)NULL, "xmlReadFile Failed");\r
+       resultOp = xmlXIncludeProcess(doc);\r
+       DTS_CHECK_GTE_MESSAGE("xmlReadFile", (void *)resultOp, (void *)0, "xmlXIncludeProcess Failed");\r
+       xmlFreeDoc(doc);\r
+    xmlCleanupParser();\r
+    xmlMemoryDump();\r
+}\r
+#endif\r
+/**    \r
+       * @test                 UTcxmlIOP02\r
+       * @brief                int xmlSaveFile (const char * filename, xmlDocPtr cur)\r
+       * @desc                 Positive Test for Dumping an XML document to a file\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Read the file, Free the doc] @n\r
+       *                       {xmlDocPtr(cur), const char *(filename)} => {N/A | Number of bytes written} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcxmlIOP02()\r
+{\r
+    xmlDocPtr          doc = NULL;\r
+   \r
+    /*\r
+    * Create the document.\r
+    */\r
+       doc = xmlReadFile(INPUT_XML, NULL, 0);\r
+       DTS_CHECK_NE_MESSAGE("xmlReadFile", (void *)doc, (void *)NULL, "xmlReadFile Failed");\r
+       int data = xmlSaveFile(INPUT_TXT, doc);\r
+       DTS_CHECK_GT_MESSAGE("xmlReadFile", (void *)data, (void *)0, "xmlSaveFile Failed");\r
+   \r
+    /*\r
+    * Free associated memory.\r
+    */\r
+    xmlFreeDoc(doc);\r
+}\r
+/**    \r
+       * @test                 UTcxmlIOP03\r
+       * @brief                int xmlParserInputBufferRead (xmlParserInputBufferPtr in, int len)\r
+       * @desc                 Positive Test for refreshing the content of the input buffer, the old data are considered consumed This routine handle the I18N transcoding to internal UTF-8\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Create a buffer parser input, Free parser input buffer] @n\r
+       *                       {xmlParserInputBufferPtr(in), int(len)} => {N/A | Number of chars read or stored in the buffer} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcxmlIOP03()\r
+{\r
+    int                                                retval = 0;\r
+    xmlParserInputBufferPtr input; \r
+\r
+    input = xmlParserInputBufferCreateFilename(INPUT_XML, XML_CHAR_ENCODING_NONE);\r
+       DTS_CHECK_NE_MESSAGE("xmlParserInputBufferCreateFilename", (void *)input, (void *)0, "xmlParserInputBufferCreateFilename Failed");\r
+       \r
+       retval = xmlParserInputBufferRead(input, 1);\r
+       DTS_CHECK_GT_MESSAGE("xmlParserInputBufferRead", (void *)retval, (void *)0, "xmlParserInputBufferRead Failed");\r
+       \r
+\r
+       xmlFreeParserInputBuffer(input);\r
+}\r
+\r
+       /**    \r
+       * @test                 UTcxmlIOP04\r
+       * @brief                void xmlSetExternalEntityLoader (xmlExternalEntityLoader f)\r
+       * @desc                 Positive Test for Changing the defaultexternal entity resolver function for the application\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Get the entity loader, N/A] @n\r
+       *                       {xmlExternalEntityLoader(f)} => {N/A | N/A} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcxmlIOP04()\r
+{\r
+       xmlExternalEntityLoader defaultLoader = NULL;\r
+\r
+       defaultLoader = xmlGetExternalEntityLoader();\r
+       DTS_CHECK_NE_MESSAGE("xmlParserInputBufferRead", (void *)defaultLoader, (void *)NULL, "xmlParserInputBufferRead Failed");\r
+       xmlSetExternalEntityLoader(defaultLoader);\r
+}\r
+\r
+#ifdef STDIO_FILE\r
+static void\r
+UTcxmlIOP05()\r
+{\r
+       // Source fix needs to be done: other wise its crashes\r
+\r
+       FILE *          pFptr = NULL;\r
+\r
+       pFptr = fopen(INPUT_TXT, "w+");\r
+       DTS_CHECK_NE_MESSAGE("xmlParserInputBufferCreateFd", (void *)pFptr, (void *)NULL, "fopen Failed");\r
+       \r
+       xmlParserInputBufferPtr pBuffer = xmlParserInputBufferCreateFd((int)pFptr, XML_CHAR_ENCODING_UTF8);\r
+       DTS_CHECK_NE_MESSAGE("xmlParserInputBufferCreateFd", (void *)pBuffer, (void *)NULL, "xmlParserInputBufferCreateFd Failed");\r
+\r
+       xmlOutputBufferPtr pOutBuffer = xmlOutputBufferCreateFd((int)pFptr, NULL);\r
+       DTS_CHECK_NE_MESSAGE("xmlParserInputBufferCreateFd", (void *)pBuffer, (void *)NULL, "xmlParserInputBufferCreateFd Failed");\r
+       \r
+       int retval = xmlOutputBufferClose(pOutBuffer);\r
+\r
+       xmlFreeParserInputBuffer(pBuffer);\r
+\r
+       //File_close(pFptr, &e);\r
+}\r
+#endif\r
+/**    \r
+       * @test                 UTcxmlIOP06\r
+       * @brief                xmlCharEncodingHandlerPtr       xmlGetCharEncodingHandler       (xmlCharEncoding enc)\r
+                                       xmlOutputBufferPtr xmlOutputBufferCreateIO      (xmlOutputWriteCallback iowrite, xmlOutputCloseCallback ioclose, void * ioctx, xmlCharEncodingHandlerPtr encoder)\r
+                                       xmlParserInputBufferPtr xmlParserInputBufferCreateIO    (xmlInputReadCallback ioread, xmlInputCloseCallback ioclose, void * ioctx, xmlCharEncoding enc)\r
+       * @desc                 Positive Test for Searching in the registered set the handler able to read/write that encoding.\r
+                                       Positive test for Creating a buffered output for the progressive saving to an I/O handler\r
+                                       Positive test for Creating a buffered parser input for the progressive parsing for the input from an I/O handler\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Initialize and register encoding handlers, Free parser input buffer] @n\r
+       *                       {xmlCharEncoding(enc)} => {N/A | N/A} @n\r
+                                       input2: [Initialize and register encoding handlers, Free parser input buffer] @n\r
+       *                       {xmlOutputWriteCallback(iowrite), xmlOutputCloseCallback(ioclose), xmlCharEncodingHandlerPtr(encoder)} => {N/A | N/A} @n\r
+                                       input3: [Initialize and register encoding handlers, Free parser input buffer] @n\r
+       *                       {xmlInputReadCallback(ioread), xmlOutputCloseCallback(ioclose), XML_CHAR_ENCODING_UTF8(xmlCharEncoding (enc))} => {N/A | N/A} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcxmlIOP06()\r
+{\r
+       xmlOutputWriteCallback outwrite;\r
+       xmlOutputCloseCallback outclose;\r
+       xmlInputReadCallback   inread;\r
+\r
+       outwrite = writeFunction;\r
+       outclose = closeFunction;\r
+       inread = readFunction;\r
+       xmlInitCharEncodingHandlers();\r
+       xmlRegisterCharEncodingHandler(NULL);\r
+       xmlCharEncodingHandlerPtr pHandler = xmlGetCharEncodingHandler(XML_CHAR_ENCODING_UTF16LE);\r
+       DTS_CHECK_NE_MESSAGE("xmlParserInputBufferCreateIO", (void *)pHandler, (void *)NULL, "xmlGetCharEncodingHandler Failed");\r
+\r
+       xmlOutputBufferPtr pBuf = xmlOutputBufferCreateIO(outwrite, outclose, NULL, pHandler);\r
+       DTS_CHECK_NE_MESSAGE("xmlParserInputBufferCreateIO", (void *)pBuf, (void *)NULL, "xmlParserInputBufferCreateIO Failed");\r
+\r
+       xmlParserInputBufferPtr pInputBuf = xmlParserInputBufferCreateIO(inread, outclose, NULL, XML_CHAR_ENCODING_UTF8);\r
+       DTS_CHECK_NE_MESSAGE("xmlParserInputBufferCreateIO", (void *)pInputBuf, (void *)NULL, "xmlParserInputBufferCreateIO Failed");\r
+       \r
+       xmlFreeParserInputBuffer(pInputBuf);\r
+       int retval = xmlOutputBufferClose(pBuf);\r
+\r
+       //xmlCleanupCharEncodingHandlers();\r
+}\r
+/**    \r
+       * @test                 UTcxmlPopInputCallbacksP01\r
+       * @brief                int     xmlPopInputCallbacks (void)\r
+       * @desc                 Positive Test for Clearing the top input callback from the input stack\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Register one input callback, N/A] @n\r
+       *                               { void } => { N/A | 1 } @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcxmlPopInputCallbacksP01()\r
+{\r
+       xmlOutputCloseCallback  outclose;\r
+       xmlInputReadCallback    inread;\r
+       xmlInputMatchCallback   match;\r
+       xmlInputOpenCallback    inopen;\r
+\r
+       outclose = closeFunction;\r
+       inread = readFunction;\r
+       match = matchFunction;\r
+       inopen = openFunction;\r
+\r
+       xmlRegisterDefaultInputCallbacks();\r
+       int resultVal = xmlRegisterInputCallbacks(match, inopen, inread, outclose);\r
+       DTS_CHECK_GT_MESSAGE("xmlPopInputCallbacks", (void *)resultVal, (void *)0, "xmlRegisterInputCallbacks Failed");\r
+\r
+       /**\r
+       * @remarks   input1: [Register one input callback, N/A] @n\r
+       *            { void } => { N/A | 1 } @n\r
+       */\r
+       resultVal = xmlPopInputCallbacks();\r
+       DTS_CHECK_EQ_MESSAGE("xmlPopInputCallbacks", (void *)resultVal, (void *)4, "xmlPopInputCallbacks Failed");\r
+}\r
+/**    \r
+       * @test                 UTcxmlOutputBufferCreateFilenameP01\r
+       * @brief                xmlOutputBufferPtr xmlOutputBufferCreateFilename (const char * URI, xmlCharEncodingHandlerPtr encoder, int compression)\r
+       * @desc                 Positive Test for Creating a buffered output for the progressive saving of a file If filename is "-' then we use stdout as the output\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                               {const char *( UTSXMLHOME"/IoTest1.txt"), NULL, int(0) } => { N/A | xmlOutputBufferPtr pointer } @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcxmlOutputBufferCreateFilenameP01()\r
+{\r
+\r
+       /**\r
+       * @remarks   input1: [N/A, N/A] @n\r
+       *            { INPUTIO_TXT, NULL, 0 } => { N/A | xmlOutputBufferPtr pointer } @n\r
+       */\r
+       xmlOutputBufferPtr pBuffer =  xmlOutputBufferCreateFilename(INPUTIO_TXT, NULL, 0);\r
+       DTS_CHECK_NE_MESSAGE("xmlPopInputCallbacks", (void *)pBuffer, (void *)NULL, "xmlPopInputCallbacks Failed");\r
+       \r
+       int retval = xmlOutputBufferClose(pBuffer);\r
+       xmlResetLastError();\r
+}\r
+/**    \r
+       * @test                 UTcxmlParserInputBufferCreateStaticP01\r
+       * @brief                xmlParserInputBufferPtr xmlParserInputBufferCreateStatic (const char * mem, int size, xmlCharEncoding enc)\r
+       * @desc                 Positive Test for Creating a buffered parser input for the progressive parsing for the input from an immutable memory area\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                           { const char * ("name"), int(4), int(1) } => { N/A | xmlParserInputBufferPtr pointer } @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcxmlParserInputBufferCreateStaticP01()\r
+{\r
+       char *pName = "name";\r
+\r
+       /**\r
+       * @remarks   input1: [N/A, N/A] @n\r
+       *            { "name", 4, XML_CHAR_ENCODING_UTF8 } => { N/A | xmlParserInputBufferPtr pointer } @n\r
+       */\r
+       xmlParserInputBufferPtr pBuffer = xmlParserInputBufferCreateStatic(pName, sizeof(pName), XML_CHAR_ENCODING_UTF8);\r
+       DTS_CHECK_NE_MESSAGE("xmlParserInputBufferCreateStatic", (void *)pBuffer, (void *)NULL, "xmlParserInputBufferCreateStatic Failed");\r
+       \r
+       xmlFreeParserInputBuffer(pBuffer);\r
+\r
+}\r
+\r
+static void startup( void);\r
+static void cleanup( void);\r
+\r
+void (*tet_startup)( void) = startup;\r
+void (*tet_cleanup)( void) = cleanup;\r
+\r
+static void startup( void)\r
+{\r
+        /* start of TC */\r
+        tet_printf("TC starts.");\r
+}\r
+\r
+static void cleanup( void)\r
+{\r
+        /* end of TC */\r
+        tet_printf("TC ends.");\r
+}\r
+\r
+struct tet_testlist tet_testlist[] = {\r
+       // Handling of out of context errors\r
+       #ifdef LIBXML_XINCLUDE_ENABLED\r
+       {UTcxmlIOP01, 1},\r
+       #endif\r
+       {UTcxmlIOP02,2},\r
+       {UTcxmlIOP03,3},\r
+       {UTcxmlIOP04,4},\r
+       #ifdef STDIO_FILE\r
+       {UTcxmlIOP05,5},\r
+       #endif\r
+       {UTcxmlIOP06,6},\r
+       {UTcxmlPopInputCallbacksP01,7},\r
+       {UTcxmlOutputBufferCreateFilenameP01,8},\r
+       {UTcxmlParserInputBufferCreateStaticP01,9},\r
+       { NULL, 0 },\r
+       \r
+};\r
diff --git a/TC/testcase/utc_libxml_XmlList.c b/TC/testcase/utc_libxml_XmlList.c
new file mode 100755 (executable)
index 0000000..985ced8
--- /dev/null
@@ -0,0 +1,1311 @@
+/*\r
+*  libxml test suite\r
+*\r
+* Copyright (c) 2012 Samsung Electronics Co., Ltd. All rights reserved.\r
+*\r
+* Contact: {Maintainer Name} <{Maintainer Email}>\r
+* \r
+* Licensed under the Apache License, Version 2.0 (the "License");\r
+* you may not use this file except in compliance with the License.\r
+* You may obtain a copy of the License at\r
+*\r
+* http://www.apache.org/licenses/LICENSE-2.0\r
+*\r
+* Unless required by applicable law or agreed to in writing, software\r
+* distributed under the License is distributed on an "AS IS" BASIS,\r
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+* See the License for the specific language governing permissions and\r
+* limitations under the License.\r
+*\r
+*/ \r
+\r
+//includes\r
+\r
+#include "utc_libxml_include.h"\r
+\r
+\r
+\r
+\r
+\r
+static int\r
+Compare(const void *data0, const void *data1)\r
+{\r
+    if (strcmp((char*)data0,(char*)data1)>0)\r
+        return (-1);\r
+    else if (strcmp((char*)data0,(char*)data1)==0)\r
+       return (0);\r
+    return (1);\r
+}\r
+static int\r
+Compare1(const void *data0, const void *data1)\r
+{\r
+       if (strcmp((char*)data0,(char*)data1)>0)\r
+               return (1);\r
+       else if (strcmp((char*)data0,(char*)data1)==0)\r
+               return (0);\r
+       return (-1);\r
+}\r
+/***************************************************************************\r
+* SUTsXmlList\r
+***************************************************************************/\r
+       /**    \r
+       * @test                 UTcxmlListCreateP01\r
+       * @brief                xmlListPtr xmlListCreate (xmlListDeallocator deallocator, xmlListDataCompare compare)\r
+       * @desc                 Positive Test for creating a new list\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {NULL,xmlListDataCompare(Compare1)} => {N/A |xmlListPtr}        @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlListCreateP01() \r
+{      \r
+  /**\r
+   * @remarks   input1: [ N/A, N/A]    @n\r
+   *                                   {NULL,Compare1} => {N/A |xmlListPtr}    @n\r
+   */\r
+       xmlListPtr list = xmlListCreate(NULL,Compare1);\r
+       DTS_CHECK_NE_MESSAGE("xmlListCreate", (void *)list, (void *)NULL, "xmlListCreate Failed");\r
+       xmlListDelete(list);\r
+       \r
+       \r
+}\r
+/**    \r
+       * @test                 UTcxmlListSearchP01\r
+       * @brief                void *  xmlListSearch (xmlListPtr l, void * data)\r
+       * @desc                 Positive Test for s     earching the list for an existing value of @data\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [ List(list) is created having values "test" and "hello", N/A]  @n\r
+       *                       {xmlListPtr(list),"hello"} => {N/A |xmlListPtr} @n\r
+                                       input2: [N/A, N/A]      @n\r
+                                       {xmlListPtr (list),"noString"} => {N/A |NULL}   @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+       \r
+static void UTcxmlListSearchP01() \r
+{\r
+       xmlListPtr list = xmlListCreate(NULL,Compare1);\r
+       DTS_CHECK_NE_MESSAGE("xmlListSearch", (void *)list, (void *)NULL, "xmlListCreate Failed");\r
+       void* ch = (void*)("hello");\r
+       void* ch1 = (void*)("test");\r
+       void* ch2 = (void*)("noString");\r
+       \r
+       int ret_value = xmlListAppend(list,ch1);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListSearch", (void *)ret_value, (void *)0, "xmlListAppend Failed");\r
+\r
+       ret_value = xmlListAppend(list,ch);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListSearch", (void *)ret_value, (void *)0, "xmlListAppend Failed");\r
+\r
+       ret_value = xmlListAppend(list,ch1);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListSearch", (void *)ret_value, (void *)0, "xmlListAppend Failed");\r
+//list ----   test->hello->test\r
+  \r
+  /**\r
+   * @remarks   input1: [ List(list) is created having values "test" and "hello", N/A] @n\r
+   *                                   {list,"hello"} => {N/A |xmlListPtr}     @n\r
+   */\r
+       xmlListPtr val = (xmlListPtr)(xmlListSearch(list,ch));\r
+       DTS_CHECK_NE_MESSAGE("xmlListSearch", (void *)val, (void *)NULL, "xmlListAppend Failed");\r
+  /**\r
+   * @remarks   input2: [N/A, N/A]     @n\r
+   *                                   {list,"noString"} => {N/A |NULL}        @n\r
+   */\r
+       val = (xmlListPtr)(xmlListSearch(list,ch2));\r
+       DTS_CHECK_EQ_MESSAGE("xmlListSearch", (void *)val, (void *)NULL, "xmlListAppend Failed");\r
+       \r
+       xmlListDelete(list);\r
+\r
+}\r
+       /**    \r
+       * @test                 UTcxmlListReverseSearchP01\r
+       * @brief                void *  xmlListReverseSearch (xmlListPtr l, void * data)\r
+       * @desc                 Positive Test for searching the list in reverse order for an existing value of @data\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [ List(list) is created having values "test" and "hello", N/A]  @n\r
+                                       {xmlListPtr(list),"hello"} => {N/A |xmlListPtr} @n\r
+                                       input2: [N/A, N/A]      @n\r
+                                       {xmlListPtr(list),"noString"} => {N/A |NULL}    @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlListReverseSearchP01() \r
+{\r
+       xmlListPtr list = xmlListCreate(NULL,Compare1);\r
+       DTS_CHECK_NE_MESSAGE("xmlListReverseSearch", (void *)list, (void *)NULL, "xmlListCreate Failed");\r
+       \r
+       void* ch = (void*)("hello");\r
+       void* ch1 = (void*)("test");\r
+       void* ch2 = (void*)("noString");\r
+       \r
+       int ret_value = xmlListAppend(list,ch1);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListReverseSearch", (void *)ret_value, (void *)0, "xmlListAppend Failed");\r
+\r
+       ret_value = xmlListAppend(list,ch);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListReverseSearch", (void *)ret_value, (void *)0, "xmlListAppend Failed");\r
+\r
+       ret_value = xmlListAppend(list,ch1);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListReverseSearch", (void *)ret_value, (void *)0, "xmlListAppend Failed");\r
+       \r
+  /**\r
+   * @remarks   input1: [ List(list) is created having values "test" and "hello", N/A] @n\r
+   *                                   {list,"hello"} => {N/A |xmlListPtr}     @n\r
+   */\r
+       char* out = (char*)(xmlListReverseSearch(list,ch));\r
+       DTS_CHECK_EQ_MESSAGE("xmlListReverseSearch", (void *)(strcmp(out,"hello")), (void *)0, "xmlListReverseSearch Failed");\r
+  /**\r
+   * @remarks   input2: [N/A, N/A]     @n\r
+   *                                   {list,"noString"} => {N/A |NULL}        @n\r
+   */\r
+       out = (char*)(xmlListReverseSearch(list,ch2));\r
+       DTS_CHECK_EQ_MESSAGE("xmlListReverseSearch", (void *)out, (void *)NULL, "xmlListReverseSearch Failed");\r
+       \r
+       xmlListDelete(list);\r
+       \r
+}\r
+       /**    \r
+       * @test                 UTcxmlListInsertP01\r
+       * @brief                int xmlListInsert (xmlListPtr l, void * data)\r
+       * @desc                 Positive Test for Inserting data in the ordered list at the beginning for this value\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [ List(list) is created having values "5" ,"3","3", N/A]        @n\r
+                                       {xmlListPtr(list),"1"} => {N/A |0}      @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlListInsertP01() \r
+{\r
+       xmlListPtr list = xmlListCreate(NULL,Compare);\r
+       DTS_CHECK_NE_MESSAGE("xmlListInsert", (void *)list, (void *)NULL, "xmlListCreate Failed");\r
+       void* ch = (void*)("5");\r
+       void* ch1 = (void*)("3");\r
+       void* ch2 = (void*)("1");\r
+       \r
+       int ret_value = xmlListAppend(list,ch1);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListInsert", (void *)ret_value, (void *)0, "xmlListAppend Failed");\r
+\r
+       ret_value = xmlListAppend(list,ch);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListInsert", (void *)ret_value, (void *)0, "xmlListAppend Failed");\r
+\r
+       ret_value = xmlListAppend(list,ch1);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListInsert", (void *)ret_value, (void *)0, "xmlListAppend Failed");\r
+  \r
+  /**\r
+   * @remarks   input1: [ List(list) is created having values "5" ,"3","3", N/A]       @n\r
+   *                                   {list,"1"} => {N/A |0}  @n\r
+   */\r
+       ret_value = xmlListInsert(list,ch2);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListInsert", (void *)ret_value, (void *)0, "xmlListInsert Failed");\r
+       \r
+       xmlLinkPtr val = xmlListEnd(list);\r
+       char* ret = (char*)xmlLinkGetData(val);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListInsert", (void *)((strcmp(ret,"1"))), (void *)0, "xmlListEnd Failed");\r
+\r
+       \r
+       xmlListDelete(list);\r
+\r
+}\r
+       /**    \r
+       * @test                 UTcxmlListAppendP01\r
+       * @brief                int xmlListAppend (xmlListPtr l, void * data)\r
+       * @desc                 Positive Test for Inserting data in the ordered list at the end for this value\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks               input1: [ List(list) is created, N/A]  @n\r
+                                       {xmlListPtr(list),"hello"} => {N/A |1}  @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlListAppendP01() \r
+{\r
+       \r
+       xmlListPtr list = xmlListCreate(NULL,Compare1);\r
+       DTS_CHECK_NE_MESSAGE("xmlListAppend", (void *)list, (void *)NULL, "xmlListCreate Failed");\r
+       char* ch = "hello";\r
+  /**\r
+   * @remarks   input1: [ List(list) is created, N/A]  @n\r
+   *                                   {list,"hello"} => {N/A |1}      @n\r
+   */\r
+       int ret_value = xmlListAppend(list,(void*)(ch));\r
+       DTS_CHECK_EQ_MESSAGE("xmlListAppend", (void *)ret_value, (void *)0, "xmlListAppend Failed");\r
+       xmlListDelete(list);\r
+       \r
+}\r
+       /**    \r
+       * @test                 UTcxmlListDeleteP01\r
+       * @brief                void xmlListDelete (xmlListPtr l)\r
+       * @desc                 Positive Test for Deleting the list and its associated data\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [ List(list) is created having values "hello","test", N/A]      @n\r
+                                       {xmlListPtr(list)} => {N/A |N/A}        @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlListDeleteP01() \r
+{\r
+       xmlListPtr list = xmlListCreate(NULL,Compare1);\r
+       DTS_CHECK_NE_MESSAGE("xmlListAppend", (void *)list, (void *)NULL, "xmlListCreate Failed");\r
+       \r
+       void* ch = (void*)("hello");\r
+       void* ch1 = (void*)("test");\r
+       int ret_value = xmlListAppend(list,ch);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListAppend", (void *)ret_value, (void *)0, "xmlListAppend Failed");\r
+       \r
+       ret_value = xmlListAppend(list,ch1);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListAppend", (void *)ret_value, (void *)0, "xmlListAppend Failed");\r
+  /**\r
+   * @remarks   input1: [ List(list) is created having values "hello","test", N/A]     @n\r
+   *                                   {list} => {N/A |N/A}    @n\r
+   */\r
+       xmlListDelete(list);\r
+\r
+}\r
+       /**    \r
+       * @test                 UTcxmlListRemoveFirstP01\r
+       * @brief                int xmlListRemoveFirst (xmlListPtr l, void * data)\r
+       * @desc                 Positive Test for Removing the first instance associated to data in the list\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [ List(list) is created having values "test","hello","test", N/A]       @n\r
+                               {list,"test"} => {N/A |1}       @n\r
+                                       input2: [ N/A, N/A]     @n\r
+                               {xmlListPtr(list),"test"} => {N/A |1}   @n\r
+                                       input3: [ N/A, N/A]     @n\r
+                                       {xmlListPtr(list),"test"} => {N/A |0}   @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlListRemoveFirstP01() \r
+{\r
+       xmlListPtr list = xmlListCreate(NULL,Compare);\r
+       DTS_CHECK_NE_MESSAGE("xmlListRemoveFirst", (void *)list, (void *)NULL, "xmlListCreate Failed");\r
+       void* ch = (void*)("hello");\r
+       void* ch1 = (void*)("test");\r
+       \r
+       int ret_value = xmlListAppend(list,ch1);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListRemoveFirst", (void *)ret_value, (void *)0, "xmlListAppend Failed");\r
+\r
+       ret_value = xmlListAppend(list,ch);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListRemoveFirst", (void *)ret_value, (void *)0, "xmlListAppend Failed");\r
+\r
+       ret_value = xmlListAppend(list,ch1);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListRemoveFirst", (void *)ret_value, (void *)0, "xmlListAppend Failed");\r
+       \r
+//list ----   test->hello->test\r
+  \r
+  /**\r
+   * @remarks   input1: [ List(list) is created having values "test","hello","test", N/A]      @n\r
+   *                                   {list,"test"} => {N/A |1}       @n\r
+   */\r
+       ret_value = xmlListRemoveFirst(list,ch1);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListRemoveFirst", (void *)ret_value, (void *)1, "xmlListRemoveFirst Failed");\r
+       \r
+       xmlLinkPtr val = xmlListFront(list);\r
+       char* ret = (char*)xmlLinkGetData(val);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListRemoveFirst", (void *)(strcmp(ret,"test")), (void *)0, "xmlListFront Failed");\r
+  /**\r
+   * @remarks   input2: [ N/A, N/A]    @n\r
+   *                                   {list,"test"} => {N/A |1}       @n\r
+   */\r
+       ret_value = xmlListRemoveFirst(list,ch1);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListRemoveFirst", (void *)ret_value, (void *)1, "xmlListRemoveFirst Failed");\r
+\r
+  /**\r
+   * @remarks   input3: [ N/A, N/A]    @n\r
+   *                                   {list,"test"} => {N/A |0}       @n\r
+   */\r
+       ret_value = xmlListRemoveFirst(list,ch1);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListRemoveFirst", (void *)ret_value, (void *)0, "xmlListRemoveFirst Failed");\r
+\r
+       xmlListDelete(list);\r
+\r
+}\r
+       /**    \r
+       * @test                 UTcxmlListRemoveLastP01\r
+       * @brief                int xmlListRemoveLast (xmlListPtr l, void * data)\r
+       * @desc                 Positive Test for Removing the last instance associated to data in the list\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [ List(list) is created having values "2","1","2","1", N/A]     @n\r
+                               {xmlListPtr(list),"1"} => {N/A |1}      @n\r
+                                       input2: [ N/A, N/A]     @n\r
+                               {xmlListPtr(list),"1"} => {N/A |1}      @n\r
+                                       input3: [ N/A, N/A]     @n\r
+                               {xmlListPtr(list),"1"} => {N/A |0}      @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlListRemoveLastP01() \r
+{\r
+       void* ch = (void*)("2");\r
+       void* ch1 = (void*)("1");\r
+       xmlListPtr list = xmlListCreate(NULL,Compare);\r
+       DTS_CHECK_NE_MESSAGE("xmlListRemoveLast", (void *)list, (void *)NULL, "xmlListCreate Failed");\r
+\r
+       int ret_value = xmlListAppend(list,ch);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListRemoveLast", (void *)ret_value, (void *)0, "xmlListAppend Failed");\r
+       \r
+       ret_value = xmlListAppend(list,ch1);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListRemoveLast", (void *)ret_value, (void *)0, "xmlListAppend Failed");\r
+\r
+       ret_value = xmlListAppend(list,ch);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListRemoveLast", (void *)ret_value, (void *)0, "xmlListAppend Failed");\r
+       \r
+       ret_value = xmlListAppend(list,ch1);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListRemoveLast", (void *)ret_value, (void *)0, "xmlListAppend Failed");\r
+       \r
+  /**\r
+   * @remarks   input1: [ List(list) is created having values "2","1","2","1", N/A]    @n\r
+   *                                   {list,"1"} => {N/A |1}  @n\r
+   */\r
+       ret_value = xmlListRemoveLast(list,ch1);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListRemoveLast", (void *)ret_value, (void *)1, "xmlListRemoveLast Failed");\r
+       \r
+       //if last instance is removed then the last element is changed to "1"\r
+       xmlLinkPtr val = xmlListEnd(list);\r
+       char* ret = (char*)xmlLinkGetData(val);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListRemoveLast", (void *)(strcmp(ret,"1")), (void *)0, "xmlListEnd Failed");\r
+       \r
+  /**\r
+   * @remarks   input2: [ N/A, N/A]    @n\r
+   *                                   {list,"1"} => {N/A |1}  @n\r
+   */\r
+       ret_value = xmlListRemoveLast(list,ch1);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListRemoveLast", (void *)ret_value, (void *)1, "xmlListRemoveLast Failed");\r
+       \r
+       val = xmlListEnd(list); \r
+       ret = (char*)xmlLinkGetData(val);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListRemoveLast", (void *)(strcmp(ret,"2")), (void *)0, "xmlListEnd Failed");\r
+       \r
+  /**\r
+   * @remarks   input3: [ N/A, N/A]    @n\r
+   *                                   {list,"1"} => {N/A |0}  @n\r
+   */\r
+       ret_value = xmlListRemoveLast(list,ch1);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListRemoveLast", (void *)ret_value, (void *)0, "xmlListRemoveLast Failed");\r
+       \r
+       xmlListDelete(list);\r
+\r
+}\r
+       /**    \r
+       * @test                 UTcxmlListRemoveAllP01\r
+       * @brief                int xmlListRemoveAll (xmlListPtr l, void * data)\r
+       * @desc                 Positive Test for Removing the all instance associated to data in the list\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [ List(list) is created having values "test","hello","test", N/A]       @n\r
+                               {xmlListPtr(list),"test"} => {N/A |1}   @n\r
+                                       input2: [N/A , N/A]     @n\r
+                                       {xmlListPtr(list),"test"} => {N/A |0}   @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlListRemoveAllP01() \r
+{\r
+       void* ch = (void*)("hello");\r
+       void* ch1 = (void*)("test");\r
+       xmlListPtr list = xmlListCreate(NULL,Compare1);\r
+       DTS_CHECK_NE_MESSAGE("xmlListRemoveAll", (void *)list, (void *)NULL, "xmlListCreate Failed");\r
+       \r
+       int ret_value = xmlListAppend(list,ch1);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListRemoveAll", (void *)ret_value, (void *)0, "xmlListAppend Failed");\r
+       \r
+       ret_value = xmlListAppend(list,ch);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListRemoveAll", (void *)ret_value, (void *)0, "xmlListAppend Failed");\r
+       \r
+       ret_value = xmlListAppend(list,ch1);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListRemoveAll", (void *)ret_value, (void *)0, "xmlListAppend Failed");\r
+       \r
+\r
+  /**\r
+   * @remarks   input1: [ List(list) is created having values "test","hello","test", N/A]      @n\r
+   *                                   {list,"test"} => {N/A |1}       @n\r
+   */\r
+       ret_value = xmlListRemoveAll(list,ch1);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListRemoveAll", (void *)ret_value, (void *)2, "xmlListRemoveAll Failed");\r
+       \r
+       xmlLinkPtr val = xmlListEnd(list);\r
+       char* ret = (char*)xmlLinkGetData(val);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListRemoveAll", (void *)(strcmp(ret,"hello")), (void *)0, "xmlListEnd Failed");\r
+\r
+  /**\r
+   * @remarks   input2: [N/A , N/A]    @n\r
+   *                                   {list,"test"} => {N/A |0}       @n\r
+   */\r
+       ret_value = xmlListRemoveAll(list,ch1);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListRemoveAll", (void *)ret_value, (void *)0, "xmlListRemoveAll Failed");\r
+\r
+       xmlListDelete(list);\r
+       \r
+}\r
+       /**    \r
+       * @test                 UTcxmlListClearP01\r
+       * @brief                void xmlListClear (xmlListPtr l)\r
+       * @desc                 Positive Test for Removing the all data in the list\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [ List(list) is created having values "test","hello","test", N/A]       @n\r
+                                       {xmlListPtr(list)} => {N/A |N/A}        @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlListClearP01() \r
+{\r
+       void* ch = (void*)("hello");\r
+       void* ch1 = (void*)("test");\r
+       xmlListPtr list = xmlListCreate(NULL,Compare1);\r
+       DTS_CHECK_NE_MESSAGE("xmlListClear", (void *)list, (void *)NULL, "xmlListCreate Failed");\r
+\r
+       int ret_value = xmlListAppend(list,ch1);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListClear", (void *)ret_value, (void *)0, "xmlListAppend Failed");\r
+       \r
+       ret_value = xmlListAppend(list,ch);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListClear", (void *)ret_value, (void *)0, "xmlListAppend Failed");\r
+       \r
+       ret_value = xmlListAppend(list,ch1);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListClear", (void *)ret_value, (void *)0, "xmlListAppend Failed");\r
+       \r
+  /**\r
+   * @remarks   input1: [ List(list) is created having values "test","hello","test", N/A]      @n\r
+   *                                   {list} => {N/A |N/A}    @n\r
+   */\r
+       xmlListClear(list);\r
+       ret_value = xmlListEmpty(list);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListClear", (void *)ret_value, (void *)1, "xmlListEmpty Failed");\r
+\r
+       xmlListDelete(list);\r
+\r
+}\r
+       /**    \r
+       * @test                 UTcxmlListEmptyP01\r
+       * @brief                int     xmlListEmpty (xmlListPtr l)\r
+       * @desc                 Positive Test to check if the list is empty\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [ List(list) is created having values "test","hello","test", N/A]       @n\r
+                                       {xmlListPtr(list)} => {N/A |0}  @n\r
+                                       input2: [ List(list) is cleared, N/A]   @n\r
+                                       {xmlListPtr(list)} => {N/A |1}  @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+void UTcxmlListEmptyP01() \r
+{\r
+       void* ch = (void*)("hello");\r
+       void* ch1 = (void*)("test");\r
+       xmlListPtr list = xmlListCreate(NULL,Compare1);\r
+       DTS_CHECK_NE_MESSAGE("xmlListEmpty", (void *)list, (void *)NULL, "xmlListCreate Failed");\r
+\r
+       int ret_value = xmlListAppend(list,ch1);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListEmpty", (void *)ret_value, (void *)0, "xmlListAppend Failed");\r
+       \r
+       ret_value = xmlListAppend(list,ch);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListEmpty", (void *)ret_value, (void *)0, "xmlListAppend Failed");\r
+       \r
+       ret_value = xmlListAppend(list,ch1);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListEmpty", (void *)ret_value, (void *)0, "xmlListAppend Failed");\r
+       \r
+  /**\r
+   * @remarks   input1: [ List(list) is created having values "test","hello","test", N/A]      @n\r
+   *                                   {list} => {N/A |0}      @n\r
+   */\r
+       ret_value = xmlListEmpty(list);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListEmpty", (void *)ret_value, (void *)0, "xmlListEmpty Failed");\r
+\r
+       xmlListClear(list);\r
+  /**\r
+   * @remarks   input2: [ List(list) is cleared, N/A]  @n\r
+   *                                   {list} => {N/A |1}      @n\r
+   */\r
+       ret_value = xmlListEmpty(list);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListEmpty", (void *)ret_value, (void *)1, "xmlListEmpty Failed");\r
+\r
+       xmlListDelete(list);\r
+\r
+}\r
+       /**    \r
+       * @test                 UTcxmlListFrontP01\r
+       * @brief                xmlLinkPtr      xmlListFront (xmlListPtr l)\r
+       * @desc                 Positive Test for Getting the first element in the list\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [ List(list) is created having values "test","hello", N/A]      @n\r
+                                       {xmlListPtr(list)} => {N/A |xmlLinkPtr} @n\r
+                                       input2: [N/A, N/A]      @n\r
+                                       {xmlListPtr(list)} => {N/A |xmlLinkPtr} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlListFrontP01() \r
+{\r
+       void* ch = (void*)("hello");\r
+       void* ch1 = (void*)("test");\r
+       xmlListPtr list = xmlListCreate(NULL,Compare);\r
+       DTS_CHECK_NE_MESSAGE("xmlListFront", (void *)list, (void *)NULL, "xmlListCreate Failed");\r
+       \r
+       int ret_value = xmlListAppend(list,ch1);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListFront", (void *)ret_value, (void *)0, "xmlListAppend Failed");\r
+       ret_value = xmlListAppend(list,ch);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListFront", (void *)ret_value, (void *)0, "xmlListAppend Failed");\r
+\r
+  /**\r
+   * @remarks   input1: [ List(list) is created having values "test","hello", N/A]     @n\r
+   *                                   {list} => {N/A |xmlLinkPtr}     @n\r
+   */  \r
+       xmlLinkPtr val = xmlListFront(list);\r
+       char* ret = (char*)xmlLinkGetData(val);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListFront", (void *)(strcmp(ret,"test")), (void *)0, "xmlListFront Failed");\r
+\r
+       ret_value = xmlListRemoveAll(list,ch);\r
+  /**\r
+   * @remarks   input2: [N/A, N/A]     @n\r
+   *                                   {list} => {N/A |xmlLinkPtr}     @n\r
+   */  \r
+       val = xmlListFront(list);\r
+       char* ret1 = (char*)xmlLinkGetData(val);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListFront", (void *)(strcmp(ret1,"test")), (void *)0, "xmlListFront Failed");\r
+       \r
+       //clear list\r
+       xmlListClear(list);\r
+       ret_value = xmlListEmpty(list);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListFront", (void *)ret_value, (void *)1, "xmlListClear Failed");\r
+\r
+       xmlListDelete(list);\r
+\r
+}\r
+       /**    \r
+       * @test                 UTcxmlListEndP01\r
+       * @brief                xmlLinkPtr      xmlListEnd      (xmlListPtr l)\r
+       * @desc                 Positive Test for Getting the last element in the list\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [ List(list) is created having values "test","hello", N/A]      @n\r
+                                       {xmlListPtr(list)} => {N/A |xmlLinkPtr} @n\r
+                                       input2: [N/A, N/A]      @n\r
+                                       {xmlListPtr(list)} => {N/A |xmlLinkPtr} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlListEndP01() \r
+{\r
+       void* ch = (void*)("hello");\r
+       void* ch1 = (void*)("test");\r
+       xmlListPtr list = xmlListCreate(NULL,Compare);\r
+       DTS_CHECK_NE_MESSAGE("xmlListEnd", (void *)list, (void *)NULL, "xmlListCreate Failed");\r
+       \r
+       int ret_value = xmlListAppend(list,ch1);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListEnd", (void *)ret_value, (void *)0, "xmlListAppend Failed");\r
+       ret_value = xmlListAppend(list,ch);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListEnd", (void *)ret_value, (void *)0, "xmlListAppend Failed");\r
+       \r
+  /**\r
+   * @remarks   input1: [ List(list) is created having values "test","hello", N/A]     @n\r
+   *                                   {list} => {N/A |xmlLinkPtr}     @n\r
+   */          \r
+       xmlLinkPtr val = xmlListEnd(list);\r
+       char* ret = (char*)xmlLinkGetData(val);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListEnd", (void *)(strcmp(ret,"hello")), (void *)0, "xmlListEnd Failed");\r
+\r
+       ret_value = xmlListRemoveAll(list,ch1);\r
+  /**\r
+   * @remarks   input2: [N/A, N/A]     @n\r
+   *                                   {list} => {N/A |xmlLinkPtr}     @n\r
+   */  \r
+       val = xmlListEnd(list);\r
+       char* ret1 = (char*)xmlLinkGetData(val);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListEnd", (void *)(strcmp(ret1,"hello")), (void *)0, "xmlListEnd Failed");\r
+       \r
+       //clear list\r
+       xmlListClear(list);\r
+       ret_value = xmlListEmpty(list);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListEnd", (void *)ret_value, (void *)1, "xmlListClear Failed");\r
+       xmlListDelete(list);\r
+}\r
+       /**    \r
+       * @test                 UTcxmlListSizeP01\r
+       * @brief                int     xmlListSize     (xmlListPtr l)\r
+       * @desc                 Positive Test for Getting the number of elements in the list\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [ List(list) is created having values "test","hello", N/A]      @n\r
+                                       {xmlListPtr(list)} => {N/A |2}  @n\r
+                                       input2: [ List(list) is cleared, N/A]   @n\r
+                                       {xmlListPtr(list)} => {N/A |0}  @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlListSizeP01() \r
+{\r
+       void* ch = (void*)("hello");\r
+       void* ch1 = (void*)("test");\r
+       xmlListPtr list = xmlListCreate(NULL,Compare1);\r
+       DTS_CHECK_NE_MESSAGE("xmlListSize", (void *)list, (void *)NULL, "xmlListCreate Failed");\r
+       \r
+       int ret_value = xmlListAppend(list,ch1);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListSize", (void *)ret_value, (void *)0, "xmlListAppend Failed");\r
+       ret_value = xmlListAppend(list,ch);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListSize", (void *)ret_value, (void *)0, "xmlListAppend Failed");\r
+\r
+  /**\r
+   * @remarks   input1: [ List(list) is created having values "test","hello", N/A]     @n\r
+   *                                   {list} => {N/A |2}      @n\r
+   */          \r
+       ret_value = xmlListSize(list);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListSize", (void *)ret_value, (void *)2, "xmlListSize Failed");\r
+       \r
+       //clear list\r
+       xmlListClear(list);\r
+  /**\r
+   * @remarks   input2: [ List(list) is cleared, N/A]  @n\r
+   *                                   {list} => {N/A |0}      @n\r
+   */  \r
+       ret_value = xmlListSize(list);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListSize", (void *)ret_value, (void *)0, "xmlListSize Failed");\r
+\r
+       xmlListDelete(list);\r
+\r
+}\r
+       /**    \r
+       * @test                 UTcxmlListPopBackP01\r
+       * @brief                void xmlListPopBack (xmlListPtr l)\r
+       * @desc                 Positive Test for Removing the last element in the list\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [ List(list) is created having values "test","hello", N/A]      @n\r
+                               {xmlListPtr(list)} => {N/A |N/A}        @n\r
+                                       input2: [ List(list) is cleared , N/A]  @n\r
+                               {xmlListPtr(list)} => {N/A |N/A}        @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+\r
+static void UTcxmlListPopFrontP01() \r
+{\r
+       void* ch = (void*)("1");\r
+       void* ch1 = (void*)("2");\r
+       xmlListPtr list = xmlListCreate(NULL,Compare1);\r
+       DTS_CHECK_NE_MESSAGE("xmlListPopFront", (void *)list, (void *)NULL, "xmlListCreate Failed");\r
+       \r
+       int ret_value = xmlListAppend(list,ch1);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListPopFront", (void *)ret_value, (void *)0, "xmlListAppend Failed");\r
+       ret_value = xmlListAppend(list,ch);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListPopFront", (void *)ret_value, (void *)0, "xmlListAppend Failed");\r
+       \r
+//pop\r
+\r
+  /**\r
+   * @remarks   input1: [ List(list) is created having values "test","hello", N/A]     @n\r
+   *                                   {list} => {N/A |N/A}    @n\r
+   */  \r
+       xmlListPopFront(list);\r
+       \r
+       xmlLinkPtr val = xmlListFront(list);\r
+       char* ret = (char*)xmlLinkGetData(val);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListPopFront", (void *)(strcmp(ret,"2")), (void *)0, "xmlListAppend Failed");\r
+       \r
+       //clear list\r
+       xmlListClear(list);\r
+  /**\r
+   * @remarks   input2: [ List(list) is cleared , N/A] @n\r
+   *                                   {list} => {N/A |N/A}    @n\r
+   */  \r
+       xmlListPopFront(list);\r
+\r
+       xmlListDelete(list);\r
+}\r
+/**    \r
+       * @test                 UTcxmlListPopBackP01\r
+       * @brief                void xmlListPopBack (xmlListPtr l)\r
+       * @desc                 Positive Test for Removing the last element in the list\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [ List(list) is created having values "test","hello", N/A]      @n\r
+                               {xmlListPtr(list)} => {N/A |N/A}        @n\r
+                                       input2: [ List(list) is cleared , N/A]  @n\r
+                               {xmlListPtr(list)} => {N/A |N/A}        @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlListPopBackP01() \r
+{\r
+       void* ch = (void*)("1");\r
+       void* ch1 = (void*)("2");\r
+       xmlListPtr list = xmlListCreate(NULL,Compare1);\r
+       DTS_CHECK_NE_MESSAGE("xmlListPopFront", (void *)list, (void *)NULL, "xmlListCreate Failed");\r
+       \r
+       int ret_value = xmlListAppend(list,ch1);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListPopFront", (void *)ret_value, (void *)0, "xmlListAppend Failed");\r
+       ret_value = xmlListAppend(list,ch);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListPopFront", (void *)ret_value, (void *)0, "xmlListAppend Failed");\r
+       \r
+//pop\r
+  /**\r
+   * @remarks   input1: [ List(list) is created having values "test","hello", N/A]     @n\r
+   *                                   {list} => {N/A |N/A}    @n\r
+   */  \r
+       xmlListPopBack(list);\r
+       xmlLinkPtr val = xmlListEnd(list);\r
+       char* ret = (char*)xmlLinkGetData(val);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListPopFront", (void *)(strcmp(ret,"1")), (void *)0, "xmlListAppend Failed");\r
+\r
+//clear list\r
+       xmlListClear(list);\r
+  /**\r
+   * @remarks   input2: [ List(list) is cleared , N/A] @n\r
+   *                                   {list} => {N/A |N/A}    @n\r
+   */  \r
+       xmlListPopBack(list);\r
+\r
+       xmlListDelete(list);\r
+       \r
+}\r
+       /**    \r
+       * @test                 UTcxmlListPushFrontP01\r
+       * @brief                int xmlListPushFront (xmlListPtr l, void * data)\r
+       * @desc                 Positive Test for adding the new data at the beginning of the list\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [ List(list) is created having values "test","hello", N/A]      @n\r
+                                       {xmlListPtr(list),"first"} => {N/A |1}  @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlListPushFrontP01() \r
+{\r
+       void* ch = (void*)("hello");\r
+       void* ch1 = (void*)("test");\r
+       void* ch2 = (void*)("first");\r
+       xmlListPtr list = xmlListCreate(NULL,Compare1);\r
+       DTS_CHECK_NE_MESSAGE("xmlListPushFront", (void *)list, (void *)NULL, "xmlListCreate Failed");\r
+       \r
+       int ret_value = xmlListAppend(list,ch1);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListPushFront", (void *)ret_value, (void *)0, "xmlListAppend Failed");\r
+       ret_value = xmlListAppend(list,ch);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListPushFront", (void *)ret_value, (void *)0, "xmlListAppend Failed");\r
+\r
+  /**\r
+   * @remarks   input1: [ List(list) is created having values "test","hello", N/A]     @n\r
+   *                                   {list,"first"} => {N/A |1}      @n\r
+   */  \r
+       ret_value = xmlListPushFront(list,ch2);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListPushFront", (void *)ret_value, (void *)1, "xmlListAppend Failed");\r
+       \r
+       \r
+       xmlLinkPtr val = xmlListFront(list);\r
+       char* ret = (char*)xmlLinkGetData(val);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListPushFront", (void *)(strcmp(ret,"first")), (void *)0, "xmlListAppend Failed");\r
+\r
+       xmlListDelete(list);\r
+\r
+}\r
+       /**    \r
+       * @test                 UTcxmlListPushBackP01\r
+       * @brief                int xmlListPushBack (xmlListPtr l, void * data)\r
+       * @desc                 Positive Test for adding the new data at the end of the list\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [ List(list) is created having values "test","hello", N/A]      @n\r
+                                       {xmlListPtr(list),"last"} => {N/A |1}   @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlListPushBackP01() \r
+{\r
+       void* ch = (void*)("hello");\r
+       void* ch1 = (void*)("test");\r
+       void* ch2 = (void*)("last");\r
+       xmlListPtr list = xmlListCreate(NULL,Compare1);\r
+       DTS_CHECK_NE_MESSAGE("xmlListPushBack", (void *)list, (void *)NULL, "xmlListCreate Failed");\r
+       \r
+       int ret_value = xmlListAppend(list,ch1);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListPushBack", (void *)ret_value, (void *)0, "xmlListAppend Failed");\r
+       ret_value = xmlListAppend(list,ch);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListPushBack", (void *)ret_value, (void *)0, "xmlListAppend Failed");\r
+\r
+  /**\r
+   * @remarks   input1: [ List(list) is created having values "test","hello", N/A]     @n\r
+   *                                   {list,"last"} => {N/A |1}       @n\r
+   */  \r
+       ret_value = xmlListPushBack(list,ch2);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListPushBack", (void *)ret_value, (void *)1, "xmlListPushBack Failed");\r
+       \r
+       xmlLinkPtr val = xmlListEnd(list);\r
+       char* ret = (char*)xmlLinkGetData(val);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListPushBack", (void *)(strcmp(ret,"last")), (void *)0, "xmlListEnd Failed");\r
+\r
+       xmlListDelete(list);\r
+\r
+}\r
+       /**    \r
+       * @test                 UTcxmlLinkGetDataP01\r
+       * @brief                void *  xmlLinkGetData  (xmlLinkPtr lk)\r
+       * @desc                 Positive Test to see returns\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [ List(list) is created having value "hello", N/A]      @n\r
+                                       {xmlLinkPtr(lk)} => {N/A |"hello"}      @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlLinkGetDataP01() \r
+{\r
+       void* ch = (void*)("hello");\r
+       void* ch1 = (void*)("test");\r
+       xmlListPtr list = xmlListCreate(NULL,Compare1);\r
+       DTS_CHECK_NE_MESSAGE("xmlLinkGetData", (void *)list, (void *)NULL, "xmlListCreate Failed");\r
+       \r
+       int ret_value = xmlListAppend(list,ch);\r
+       DTS_CHECK_EQ_MESSAGE("xmlLinkGetData", (void *)ret_value, (void *)0, "xmlListAppend Failed");\r
+\r
+       xmlLinkPtr val = xmlListEnd(list);\r
+  /**\r
+   * @remarks   input1: [ List(list) is created having value "hello", N/A]     @n\r
+   *                                   {xmlLinkPtr of "hello"} => {N/A |"hello"}       @n\r
+   */  \r
+       char* ret = (char*)xmlLinkGetData(val);\r
+       DTS_CHECK_EQ_MESSAGE("xmlLinkGetData", (void *)(strcmp(ret,"hello")), (void *)0, "xmlLinkGetData Failed");\r
+       xmlListDelete(list);\r
+\r
+}\r
+       /**    \r
+       * @test                 UTcxmlListReverseP01\r
+       * @brief                void xmlListReverse (xmlListPtr l)\r
+       * @desc                 Positive Test for Reversing the order of the elements in the list\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [ List(list) is created having values "test","hello", N/A]      @n\r
+                                       {xmlListPtr(list)} => {N/A |N/A}        @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlListReverseP01() \r
+{\r
+       void* ch = (void*)("1");\r
+       void* ch1 = (void*)("2");\r
+\r
+       xmlListPtr list = xmlListCreate(NULL,Compare1);\r
+       DTS_CHECK_NE_MESSAGE("xmlListReverse", (void *)list, (void *)NULL, "xmlListCreate Failed");\r
+       \r
+       int ret_value = xmlListAppend(list,ch1);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListReverse", (void *)ret_value, (void *)0, "xmlListAppend Failed");\r
+       ret_value = xmlListAppend(list,ch);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListReverse", (void *)ret_value, (void *)0, "xmlListAppend Failed");\r
+       \r
+  /**\r
+   * @remarks   input1: [ List(list) is created having values "test","hello", N/A]     @n\r
+   *                                   {list} => {N/A |N/A}    @n\r
+   */  \r
+       xmlListReverse(list);\r
+       xmlLinkPtr val = xmlListEnd(list);\r
+       char* ret = (char*)xmlLinkGetData(val);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListReverse", (void *)(strcmp(ret,"1")), (void *)0, "xmlListReverse Failed");\r
+       \r
+       val = xmlListFront(list);\r
+       ret = (char*)xmlLinkGetData(val);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListReverse", (void *)(strcmp(ret,"2")), (void *)0, "xmlListFront Failed");\r
+\r
+       xmlListDelete(list);\r
+\r
+\r
+\r
+\r
+\r
+}\r
+       /**    \r
+       * @test                 UTcxmlListSortP01\r
+       * @brief                void xmlListSort        (xmlListPtr l)\r
+       * @desc                 Positive Test for Sorting all the elements in the list\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [ List(list) is created having values "3","2","4","1", N/A]     @n\r
+                                       {xmlListPtr(list)} => {N/A |N/A}        @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlListSortP01() \r
+{\r
+       void* ch = (void*)("1");\r
+       void* ch1 = (void*)("2");\r
+       void* ch2 = (void*)("3");\r
+       void* ch3 = (void*)("4");\r
+\r
+       xmlListPtr list = xmlListCreate(NULL,Compare1);\r
+       DTS_CHECK_NE_MESSAGE("xmlListSort", (void *)list, (void *)NULL, "xmlListCreate Failed");\r
+\r
+       int ret_value = xmlListAppend(list,ch2);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListSort", (void *)ret_value, (void *)0, "xmlListAppend Failed");\r
+\r
+       ret_value = xmlListAppend(list,ch1);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListSort", (void *)ret_value, (void *)0, "xmlListAppend Failed");\r
+\r
+       ret_value = xmlListAppend(list,ch3);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListSort", (void *)ret_value, (void *)0, "xmlListAppend Failed");\r
+\r
+       ret_value = xmlListAppend(list,ch);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListSort", (void *)ret_value, (void *)0, "xmlListAppend Failed");\r
+       \r
+  /**\r
+   * @remarks   input1: [ List(list) is created having values "3","2","4","1", N/A]    @n\r
+   *                                   {list} => {N/A |N/A}    @n\r
+   */  \r
+       xmlListSort(list);\r
+       \r
+       xmlLinkPtr val = xmlListEnd(list);\r
+       char* ret = (char*)xmlLinkGetData(val);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListSort", (void *)(strcmp(ret,"4")), (void *)0, "xmlListSort Failed");\r
+       \r
+       xmlListDelete(list);\r
+\r
+}\r
+\r
+static int count = 0;\r
+int copy (const void *data, const void *user){\r
+\r
+       count++;\r
+       return count;\r
+}\r
+       /**    \r
+       * @test                 UTcxmlListWalkP01\r
+       * @brief                void xmlListWalk (xmlListPtr l, xmlListWalker walker, const void * user)\r
+       * @desc                 Positive Test to Walk all the element of the first from first to last and apply the walker function to it\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [ List(list) is created having values "3","2","4","1" \n Function copy that counts the number of elements, N/A] @n\r
+                                       {xmlListPtr(list),xmlListWalker(walker),const void *(user)} => {N/A |N/A}       @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlListWalkP01() \r
+{\r
+       void* ch = (void*)("1");\r
+       void* ch1 = (void*)("2");       \r
+       void* ch2 = (void*)("3");\r
+       void* ch3 = (void*)("4");\r
+\r
+       xmlListPtr list = xmlListCreate(NULL,Compare1);\r
+       DTS_CHECK_NE_MESSAGE("xmlListWalk", (void *)list, (void *)NULL, "xmlListCreate Failed");\r
+\r
+       int ret_value = xmlListAppend(list,ch);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListWalk", (void *)ret_value, (void *)0, "xmlListAppend Failed");\r
+\r
+       ret_value = xmlListAppend(list,ch1);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListWalk", (void *)ret_value, (void *)0, "xmlListAppend Failed");\r
+\r
+       xmlListPtr dupList = xmlListCreate(NULL,Compare1);\r
+       DTS_CHECK_NE_MESSAGE("xmlListWalk", (void *)dupList, (void *)NULL, "xmlListAppend Failed");\r
+  /**\r
+   * @remarks   input1: [ List(list) is created having values "3","2","4","1" \n Function copy that counts the number of elements, N/A]        @n\r
+   *                                   {list,copy,dupList} => {N/A |N/A}       @n\r
+   */  \r
+    //reset count\r
+       count = 0;\r
+\r
+       xmlListWalk(list,copy,(void*)dupList);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListWalk", (void *)count, (void *)2, "xmlListAppend Failed");\r
+       \r
+       xmlListDelete(list);\r
+       xmlListDelete(dupList);\r
+       \r
+}\r
+       /**    \r
+       * @test                 UTcxmlListReverseWalkP01\r
+       * @brief                void xmlListReverseWalk (xmlListPtr l,xmlListWalker walker, const void * user)\r
+       * @desc                 Positive Test to Walk all the element of the list in reverse order and apply the walker function to it\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [ List(list) is created having values "3","2","4","1" \n Function copy that counts the number of elements, N/A] @n\r
+                                       {xmlListPtr(list),xmlListWalker(walker),const void * (user)} => {N/A |N/A}      @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlListReverseWalkP01() \r
+{\r
+       void* ch = (void*)("1");\r
+       void* ch1 = (void*)("2");       \r
+       void* ch2 = (void*)("3");\r
+       void* ch3 = (void*)("4");\r
+\r
+       xmlListPtr list = xmlListCreate(NULL,Compare1);\r
+       DTS_CHECK_NE_MESSAGE("xmlListReverseWalk", (void *)list, (void *)NULL, "xmlListCreate Failed");\r
+\r
+       int ret_value = xmlListAppend(list,ch);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListReverseWalk", (void *)ret_value, (void *)0, "xmlListAppend Failed");\r
+       \r
+       ret_value = xmlListAppend(list,ch1);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListReverseWalk", (void *)ret_value, (void *)0, "xmlListAppend Failed");\r
+\r
+       ret_value = xmlListAppend(list,ch1);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListReverseWalk", (void *)ret_value, (void *)0, "xmlListAppend Failed");\r
+\r
+\r
+       //set count to 0\r
+       count = 0;\r
+       xmlListPtr dupList = xmlListCreate(NULL,Compare1);\r
+       DTS_CHECK_NE_MESSAGE("xmlListReverseWalk", (void *)dupList, (void *)NULL, "xmlListCreate Failed");\r
+       \r
+  /**\r
+   * @remarks   input1: [ List(list) is created having values "3","2","4","1" \n Function copy that counts the number of elements, N/A]        @n\r
+   *                                   {list,copy,dupList} => {N/A |N/A}       @n\r
+   */  \r
+       xmlListReverseWalk(list,copy,(void*)dupList);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListReverseWalk", (void *)count, (void *)3, "xmlListReverseWalk Failed");\r
+       \r
+\r
+       xmlListDelete(list);\r
+       xmlListDelete(dupList);\r
+               \r
+}\r
+       /**    \r
+       * @test                 UTcxmlListMergeP01\r
+       * @brief                void xmlListMerge (xmlListPtr l1, xmlListPtr l2)\r
+       * @desc                 Positive Test for including all the elements of the second list in the first one and clear the second list\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [ List(list) is created having values "1","2" \n \r
+                                       List(list2) is created having values "3","4" , N/A]     @n\r
+                                       {xmlListPtr(list),xmlListPtr(list2)} => {N/A |N/A}      @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlListMergeP01() \r
+{\r
+       void* ch = (void*)("1");\r
+       void* ch1 = (void*)("2");       \r
+       void* ch2 = (void*)("3");\r
+       void* ch3 = (void*)("4");\r
+\r
+       xmlListPtr list = xmlListCreate(NULL,Compare1);\r
+       DTS_CHECK_NE_MESSAGE("xmlListMerge", (void *)list, (void *)NULL, "xmlListCreate Failed");\r
+       \r
+       int ret_value = xmlListAppend(list,ch);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListMerge", (void *)ret_value, (void *)0, "xmlListAppend Failed");\r
+       \r
+       ret_value = xmlListAppend(list,ch1);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListMerge", (void *)ret_value, (void *)0, "xmlListAppend Failed");\r
+       \r
+       xmlListPtr list2 = xmlListCreate(NULL,Compare1);\r
+       DTS_CHECK_NE_MESSAGE("xmlListMerge", (void *)list2, (void *)NULL, "xmlListCreate Failed");\r
+       \r
+       ret_value = xmlListAppend(list2,ch2);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListMerge", (void *)ret_value, (void *)0, "xmlListAppend Failed");\r
+       \r
+       ret_value = xmlListAppend(list2,ch3);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListMerge", (void *)ret_value, (void *)0, "xmlListAppend Failed");\r
+       \r
+ /**\r
+   * @remarks   input1: [ List(list) is created having values "1","2" \n \r
+   *                                     List(list2) is created having values "3","4" , N/A]   @n\r
+   *                                   {list,list2} => {N/A |N/A}      @n\r
+   */  \r
+       xmlListMerge(list,list2);\r
+       ret_value = xmlListSize(list);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListMerge", (void *)ret_value, (void *)4, "xmlListAppend Failed");\r
+       \r
+       ret_value = xmlListSize(list2);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListMerge", (void *)ret_value, (void *)0, "xmlListAppend Failed");\r
+\r
+       xmlListDelete(list);\r
+       xmlListDelete(list2);\r
+\r
+\r
+}\r
+       /**    \r
+       * @test                 UTcxmlListDupP01\r
+       * @brief                xmlListPtr      xmlListDup (const xmlListPtr old)>\r
+       * @desc                 Positive Test for duplicating the list\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [ List(list) is created having values "1","2", N/A]     @n\r
+                                       {xmlListPtr(list)} => {N/A |xmlListPtr} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlListDupP01() \r
+{\r
+       void* ch = (void*)("1");\r
+       void* ch1 = (void*)("2");       \r
+       xmlListPtr list = xmlListCreate(NULL,Compare1);\r
+       DTS_CHECK_NE_MESSAGE("xmlListDup", (void *)list, (void *)NULL, "xmlListCreate Failed");\r
+       \r
+       int ret_value = xmlListAppend(list,ch);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListDup", (void *)ret_value, (void *)0, "xmlListAppend Failed");\r
+       \r
+       ret_value = xmlListAppend(list,ch1);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListDup", (void *)ret_value, (void *)0, "xmlListAppend Failed");\r
+       \r
+  /**\r
+   * @remarks   input1: [ List(list) is created having values "1","2", N/A]    @n\r
+   *                                   {list} => {N/A |xmlListPtr}     @n\r
+   */  \r
+       xmlListPtr dupList = xmlListDup(list);\r
+       ret_value = xmlListSize(list);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListDup", (void *)ret_value, (void *)2, "xmlListAppend Failed");\r
+       \r
+       xmlLinkPtr val = xmlListEnd(dupList);\r
+       char* ret = (char*)xmlLinkGetData(val);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListDup", (void *)(strcmp(ret,"2")), (void *)0, "xmlListAppend Failed");\r
+\r
+       val = xmlListFront(dupList);\r
+       ret = (char*)xmlLinkGetData(val);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListDup", (void *)(strcmp(ret,"1")), (void *)0, "xmlListAppend Failed");\r
+\r
+       xmlListDelete(dupList);\r
+       xmlListDelete(list);\r
+\r
+}\r
+       /**    \r
+       * @test                 UTcxmlListCopyP01\r
+       * @brief                int xmlListCopy (xmlListPtr cur, const xmlListPtr old)\r
+       * @desc                 Positive Test for Moving all the element from the old list in the new list\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [ List(list) is created having values "1","2"\n\r
+                                       List(list2)is created with NULL value , N/A]    @n\r
+                                       {xmlListPtr(list2),xmlListPtr(list)} => {N/A |N/A}      @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlListCopyP01() \r
+{\r
+       void* ch = (void*)("1");\r
+       void* ch1 = (void*)("2");       \r
+       xmlListPtr list = xmlListCreate(NULL,Compare1);\r
+       DTS_CHECK_NE_MESSAGE("xmlListCopy", (void *)list, (void *)NULL, "xmlListCreate Failed");\r
+       \r
+       int ret_value = xmlListAppend(list,ch);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListCopy", (void *)ret_value, (void *)0, "xmlListAppend Failed");\r
+       \r
+       ret_value = xmlListAppend(list,ch1);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListCopy", (void *)ret_value, (void *)0, "xmlListAppend Failed");\r
+\r
+       xmlListPtr list2 = xmlListCreate(NULL,Compare1);\r
+       DTS_CHECK_NE_MESSAGE("xmlListCopy", (void *)list2, (void *)NULL, "xmlListCreate Failed");\r
+  /**\r
+   * @remarks   input1: [ List(list) is created having values "1","2"\n\r
+   *                                     List(list2)is created with NULL value , N/A]  @n\r
+   *                                   {list2,list} => {N/A |N/A}      @n\r
+   */  \r
+       ret_value = xmlListCopy(list2,list);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListCopy", (void *)ret_value, (void *)0, "xmlListAppend Failed");\r
+       \r
+       xmlLinkPtr val = xmlListEnd(list2);\r
+       char* ret = (char*)xmlLinkGetData(val);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListCopy", (void *)(strcmp(ret,"2")), (void *)0, "xmlListAppend Failed");\r
+\r
+       val = xmlListFront(list2);\r
+       ret = (char*)xmlLinkGetData(val);\r
+       DTS_CHECK_EQ_MESSAGE("xmlListCopy", (void *)(strcmp(ret,"1")), (void *)0, "xmlListAppend Failed");\r
+\r
+       xmlListDelete(list2);\r
+       xmlListDelete(list);\r
+       \r
+}\r
+\r
+static void startup( void);\r
+static void cleanup( void);\r
+\r
+void (*tet_startup)( void) = startup;\r
+void (*tet_cleanup)( void) = cleanup;\r
+\r
+static void startup( void)\r
+{\r
+        /* start of TC */\r
+        tet_printf("TC starts.");\r
+}\r
+\r
+static void cleanup( void)\r
+{\r
+        /* end of TC */\r
+        tet_printf("TC ends.");\r
+}\r
+\r
+struct tet_testlist tet_testlist[] = {\r
+       // Handling of out of context errors\r
+       {UTcxmlListCreateP01,1},\r
+       {UTcxmlListSearchP01,2},\r
+       {UTcxmlListReverseSearchP01,3},\r
+       {UTcxmlListInsertP01,4},\r
+       {UTcxmlListAppendP01,5},\r
+       {UTcxmlListDeleteP01,6},\r
+       {UTcxmlListRemoveFirstP01,7},\r
+       {UTcxmlListRemoveLastP01,8},\r
+       {UTcxmlListRemoveAllP01,9},\r
+       {UTcxmlListClearP01,10},\r
+       \r
+       {UTcxmlListEmptyP01,11},\r
+       {UTcxmlListFrontP01,12},\r
+       {UTcxmlListEndP01,13},\r
+       {UTcxmlListSizeP01,14},\r
+       {UTcxmlListPopFrontP01,15},\r
+       {UTcxmlListPopBackP01,16},\r
+       {UTcxmlListPushFrontP01,17},\r
+       {UTcxmlListPushBackP01,18},\r
+       {UTcxmlLinkGetDataP01,19},\r
+       {UTcxmlListReverseP01,20},\r
+       \r
+       {UTcxmlListSortP01,21},\r
+       {UTcxmlListWalkP01,22},\r
+       {UTcxmlListReverseWalkP01,23},\r
+       {UTcxmlListMergeP01,24},\r
+       {UTcxmlListDupP01,25},\r
+       {UTcxmlListCopyP01,26},\r
+       { NULL, 0 },\r
+       \r
+};\r
diff --git a/TC/testcase/utc_libxml_XmlParser.c b/TC/testcase/utc_libxml_XmlParser.c
new file mode 100755 (executable)
index 0000000..68edbe8
--- /dev/null
@@ -0,0 +1,2921 @@
+/*\r
+*  libxml test suite\r
+*\r
+* Copyright (c) 2012 Samsung Electronics Co., Ltd. All rights reserved.\r
+*\r
+* Contact: {Maintainer Name} <{Maintainer Email}>\r
+* \r
+* Licensed under the Apache License, Version 2.0 (the "License");\r
+* you may not use this file except in compliance with the License.\r
+* You may obtain a copy of the License at\r
+*\r
+* http://www.apache.org/licenses/LICENSE-2.0\r
+*\r
+* Unless required by applicable law or agreed to in writing, software\r
+* distributed under the License is distributed on an "AS IS" BASIS,\r
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+* See the License for the specific language governing permissions and\r
+* limitations under the License.\r
+*\r
+*/ \r
+#include "utc_libxml_include.h"\r
+\r
+#define gen_nb_xmlChar_ptr 2\r
+#define gen_nb_const_xmlChar_ptr 5\r
+#define gen_nb_xmlParserInputPtr 1\r
+#define gen_nb_xmlNodePtr 3\r
+#define gen_nb_int 4\r
+#define gen_nb_parseroptions 5\r
+#define gen_nb_long 5\r
+#define gen_nb_xmlChar 4\r
+#define gen_nb_unsigned_int 3\r
+#define gen_nb_unsigned_long 4\r
+#define gen_nb_xmlChar_ptr_ptr 1\r
+#define gen_nb_const_char_ptr 4\r
+#define gen_nb_xmlSAXHandlerPtr 2\r
+#define gen_nb_userdata 3\r
+#define gen_nb_fileoutput 6\r
+#define gen_nb_xmlNodePtr_ptr 1\r
+#define gen_nb_xmlDocPtr 4\r
+#define gen_nb_xmlSAXHandlerPtr 2\r
+#define gen_nb_filepath 8\r
+\r
+static xmlChar chartab[1024];\r
+static int inttab[1024];\r
+static unsigned long longtab[1024];\r
+\r
+static xmlDocPtr api_doc = NULL;\r
+static xmlDtdPtr api_dtd = NULL;\r
+static xmlNodePtr api_root = NULL;\r
+static xmlAttrPtr api_attr = NULL;\r
+static xmlNsPtr api_ns = NULL;\r
+static int call_tests = 0;\r
+\r
+\r
+static int\r
+closeFunction (void * context)\r
+{\r
+       //Dummy Callbacks for registration\r
+       return 0;\r
+}\r
+\r
+static int\r
+readFunction (void * context, char * buffer, int len)\r
+{\r
+       //Dummy Callbacks for registration\r
+       return 0;\r
+}\r
+\r
+static void ParseFSMstartElementNs( void * ctx,\r
+                               const xmlChar * localname,\r
+                               const xmlChar * prefix,\r
+                               const xmlChar * URI,\r
+                               int nb_namespaces,\r
+                               const xmlChar ** namespaces,\r
+                               int nb_attributes,\r
+                               int nb_defaulted,\r
+                               const xmlChar ** attributes )\r
+   {\r
+int indexNamespace =0;\r
+ int indexAttribute = 0;\r
+       #ifdef DISABLE_PRINTF\r
+      printf( "startElementNs: name = '%s' prefix = '%s' uri = (%p)'%s'\n", localname, prefix, URI, URI );\r
+       #endif\r
+      for ( indexNamespace = 0; indexNamespace < nb_namespaces; ++indexNamespace )\r
+      {\r
+         const xmlChar *prefix = namespaces[indexNamespace*2];\r
+         const xmlChar *nsURI = namespaces[indexNamespace*2+1];\r
+       #ifdef DISABLE_PRINTF\r
+         printf( "  namespace: name='%s' uri=(%p)'%s'\n", prefix, nsURI, nsURI );\r
+       #endif\r
+      }\r
+\r
+      unsigned int index = 0;\r
+      for ( indexAttribute = 0;\r
+            indexAttribute < nb_attributes;\r
+            ++indexAttribute, index += 5 )\r
+      {\r
+         const xmlChar *localname = attributes[index];\r
+         const xmlChar *prefix = attributes[index+1];\r
+         const xmlChar *nsURI = attributes[index+2];\r
+         const xmlChar *valueBegin = attributes[index+3];\r
+         const xmlChar *valueEnd = attributes[index+4];\r
+\r
+      }\r
+   }\r
+\r
+   static void ParseFSMendElementNs( void * ctx,\r
+                             const xmlChar * localname,\r
+                             const xmlChar * prefix,\r
+                             const xmlChar * URI )\r
+   {\r
+      printf( "endElementNs: name = '%s' prefix = '%s' uri = '%s'\n", localname, prefix, URI );\r
+   }\r
+\r
+   /** Display and format an error messages, callback.\r
+      ctx:  an XML parser context\r
+      msg:  the message to display/transmit\r
+      ...:  extra parameters for the message display\r
+      */\r
+   static void ParseFSMerror( void * ctx,\r
+                      const char * msg,\r
+                      ... )\r
+   {\r
+      va_list args;\r
+      va_start(args, msg);\r
+      vprintf( msg, args );\r
+      va_end(args);\r
+   }\r
+\r
+   /** Display and format a warning messages, callback.\r
+      ctx:  an XML parser context\r
+      msg:  the message to display/transmit\r
+      ...:  extra parameters for the message display\r
+      */\r
+   static void ParseFSMwarning( void * ctx,\r
+                        const char * msg,\r
+                        ... )\r
+   {\r
+      va_list args;\r
+      va_start(args, msg);\r
+      vprintf( msg, args );\r
+      va_end(args);\r
+   }\r
+\r
+\r
+static void\r
+free_api_doc(void) {\r
+    xmlFreeDoc(api_doc);\r
+    api_doc = NULL;\r
+    api_dtd = NULL;\r
+    api_root = NULL;\r
+    api_attr = NULL;\r
+    api_ns = NULL;\r
+}\r
+static xmlDocPtr\r
+get_api_doc(void) {\r
+    if (api_doc == NULL) {\r
+        api_doc = xmlReadMemory("<!DOCTYPE root [<!ELEMENT root EMPTY>]><root xmlns:h='http://example.com/' h:foo='bar'/>", 88, "root_test", NULL, 0);\r
+       api_root = NULL;\r
+       api_attr = NULL;\r
+    }\r
+    return(api_doc);\r
+}\r
+static xmlNodePtr\r
+get_api_root(void) {\r
+    if ((api_root == NULL) || (api_root->type != XML_ELEMENT_NODE)) {\r
+        get_api_doc();\r
+       if ((api_doc != NULL) && (api_doc->children != NULL) &&\r
+           (api_doc->children->next != NULL) &&\r
+           (api_doc->children->next->type == XML_ELEMENT_NODE))\r
+           api_root = api_doc->children->next;\r
+    }\r
+    return(api_root);\r
+}\r
+\r
+static xmlChar *gen_const_xmlChar_ptr(int no, int nr ATTRIBUTE_UNUSED) {\r
+    if (no == 0) return((xmlChar *) "foo");\r
+    if (no == 1) return((xmlChar *) "<foo/>");\r
+    if (no == 2) return((xmlChar *) "none");\r
+    if (no == 3) return((xmlChar *) " 2ab ");\r
+    return(NULL);\r
+}\r
+static void des_const_xmlChar_ptr(int no ATTRIBUTE_UNUSED, const xmlChar *val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+}\r
+static void desret_int(int val ATTRIBUTE_UNUSED) {\r
+}\r
+static void des_xmlParserCtxtPtr(int no ATTRIBUTE_UNUSED, xmlParserCtxtPtr val, int nr ATTRIBUTE_UNUSED) {\r
+    if (val != NULL)\r
+        xmlFreeParserCtxt(val);\r
+}\r
+static void des_xmlParserInputPtr(int no ATTRIBUTE_UNUSED, xmlParserInputPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+}\r
+static xmlParserCtxtPtr gen_xmlParserCtxtPtr(int no, int nr ATTRIBUTE_UNUSED) {\r
+    if (no == 0) return(xmlNewParserCtxt());\r
+    if (no == 1) return(xmlCreateMemoryParserCtxt("<doc/>", 6));\r
+    return(NULL);\r
+}\r
+static xmlParserInputPtr gen_xmlParserInputPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+    return(NULL);\r
+}\r
+static void desret_xmlParserInputPtr(xmlParserInputPtr val) {\r
+       if(val != NULL)\r
+                xmlFreeInputStream(val);\r
+}\r
+static xmlNodePtr gen_xmlNodePtr(int no, int nr ATTRIBUTE_UNUSED) {\r
+    if (no == 0) return(xmlNewPI(BAD_CAST "test", NULL));\r
+    if (no == 1) return(get_api_root());\r
+    return(NULL);\r
+/*     if (no == 2) return((xmlNodePtr) get_api_doc()); */\r
+}\r
+static void des_xmlNodePtr(int no, xmlNodePtr val, int nr ATTRIBUTE_UNUSED) {\r
+    if (no == 1) {\r
+        free_api_doc();\r
+    } else if (val != NULL) {\r
+        xmlUnlinkNode(val);\r
+        xmlFreeNode(val);\r
+    }\r
+}\r
+\r
+static void desret_xmlNodePtr(xmlNodePtr val) {\r
+    if ((val != NULL) && (val != api_root) && (val != (xmlNodePtr) api_doc)) {\r
+       xmlUnlinkNode(val);\r
+       xmlFreeNode(val);\r
+    }\r
+}\r
+//static void des_xmlParserCtxtPtr(int no ATTRIBUTE_UNUSED, xmlParserCtxtPtr val, int nr ATTRIBUTE_UNUSED) {\r
+//    if (val != NULL)\r
+//        xmlFreeParserCtxt(val);\r
+//}\r
+static void desret_const_xmlChar_ptr(const xmlChar *val ATTRIBUTE_UNUSED) {\r
+}\r
+static void desret_xmlChar(xmlChar val ATTRIBUTE_UNUSED) {\r
+}\r
+static xmlChar *gen_xmlChar_ptr(int no, int nr ATTRIBUTE_UNUSED) {\r
+    if (no == 0) return(&chartab[0]);\r
+    return(NULL);\r
+}\r
+static xmlChar gen_xmlChar(int no, int nr ATTRIBUTE_UNUSED) {\r
+    if (no == 0) return('a');\r
+    if (no == 1) return(' ');\r
+    if (no == 2) return(' ');\r
+    return(0);\r
+}\r
+\r
+static int gen_int(int no, int nr ATTRIBUTE_UNUSED) {\r
+    if (no == 0) return(0);\r
+    if (no == 1) return(1);\r
+    if (no == 2) return(-1);\r
+    if (no == 3) return(122);\r
+    return(-1);\r
+}\r
+\r
+static void desret_xmlChar_ptr(xmlChar *val) {\r
+    if (val != NULL)\r
+       xmlFree(val);\r
+}\r
+static void des_int(int no ATTRIBUTE_UNUSED, int val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+}\r
+static void des_xmlChar(int no ATTRIBUTE_UNUSED, xmlChar val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+}\r
+static xmlChar ** gen_xmlChar_ptr_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+    return(NULL);\r
+}\r
+static void des_xmlChar_ptr_ptr(int no ATTRIBUTE_UNUSED, xmlChar ** val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+}\r
+static char *gen_const_char_ptr(int no, int nr ATTRIBUTE_UNUSED) {\r
+    if (no == 0) return((char *) "foo");\r
+    if (no == 1) return((char *) "<foo/>");\r
+    if (no == 2) return((char *) "test/ent2");\r
+    return(NULL);\r
+}\r
+static void des_const_char_ptr(int no ATTRIBUTE_UNUSED, const char *val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+}\r
+static xmlSAXHandlerPtr gen_xmlSAXHandlerPtr(int no, int nr ATTRIBUTE_UNUSED) {\r
+#ifdef LIBXML_SAX1_ENABLED\r
+    if (no == 0) return((xmlSAXHandlerPtr) &xmlDefaultSAXHandler);\r
+#endif\r
+    return(NULL);\r
+}\r
+static void *gen_userdata(int no, int nr ATTRIBUTE_UNUSED) {\r
+    if (no == 0) return((void *) &call_tests);\r
+    if (no == 1) return((void *) -1);\r
+    return(NULL);\r
+}\r
+static void des_userdata(int no ATTRIBUTE_UNUSED, void *val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+}\r
+static void des_fileoutput(int no ATTRIBUTE_UNUSED, const char *val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+}\r
+static void des_xmlSAXHandlerPtr(int no ATTRIBUTE_UNUSED, xmlSAXHandlerPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+}\r
+static void desret_xmlParserCtxtPtr(xmlParserCtxtPtr val) {\r
+    xmlFreeParserCtxt(val);\r
+}\r
+static xmlNodePtr * gen_xmlNodePtr_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+    return(NULL);\r
+}\r
+static void des_xmlNodePtr_ptr(int no ATTRIBUTE_UNUSED, xmlNodePtr * val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+}\r
+static xmlDocPtr gen_xmlDocPtr(int no, int nr ATTRIBUTE_UNUSED) {\r
+    if (no == 0) return(xmlNewDoc(BAD_CAST "1.0"));\r
+    if (no == 1) return(xmlReadMemory("<foo/>", 6, "test", NULL, 0));\r
+    if (no == 2) return(xmlReadMemory("<!DOCTYPE foo []> <foo/>", 24, "test", NULL, 0));\r
+    return(NULL);\r
+}\r
+static void des_xmlDocPtr(int no ATTRIBUTE_UNUSED, xmlDocPtr val, int nr ATTRIBUTE_UNUSED) {\r
+    if ((val != NULL) && (val != api_doc) && (val->doc != api_doc))\r
+        xmlFreeDoc(val);\r
+}\r
+static const char *gen_filepath(int no, int nr ATTRIBUTE_UNUSED) {\r
+    if (no == 0) return(MISSINGXML);\r
+    if (no == 1) return("<foo/>");\r
+    if (no == 2) return("test/ent2");\r
+    if (no == 3) return(TESTRECxml19980210);\r
+    if (no == 4) return(TESTXHTML1STRICTDTD);\r
+    if (no == 5) return(REMOTE1GOOD);\r
+    if (no == 6) return(REMOTE1BAD);\r
+    return(NULL);\r
+}\r
+static void desret_xmlDocPtr(xmlDocPtr val) {\r
+    if (val != NULL)\r
+               xmlFreeDoc(val);\r
+}\r
+static void des_filepath(int no ATTRIBUTE_UNUSED, const char *val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+}\r
+static void des_xmlChar_ptr(int no ATTRIBUTE_UNUSED, xmlChar *val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+}\r
+static int gen_parseroptions(int no, int nr ATTRIBUTE_UNUSED) {\r
+    if (no == 0) return(XML_PARSE_NOBLANKS | XML_PARSE_RECOVER);\r
+    if (no == 1) return(XML_PARSE_NOENT | XML_PARSE_DTDLOAD | XML_PARSE_DTDATTR | XML_PARSE_DTDVALID | XML_PARSE_NOCDATA);\r
+    if (no == 2) return(XML_PARSE_XINCLUDE | XML_PARSE_NSCLEAN);\r
+    if (no == 3) return(XML_PARSE_XINCLUDE | XML_PARSE_NODICT);\r
+    return(XML_PARSE_SAX1);\r
+}\r
+static void des_parseroptions(int no ATTRIBUTE_UNUSED, int val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+}\r
+static const char *pDocument = "<root>TestCase</root>";\r
+static const int length = 21; // length of string pDocument\r
+\r
+static void\r
+UTcXmlCheckLanguageIDP01(void) {\r
+    int ret_val;\r
+    xmlChar * lang; /* pointer to the string value */\r
+       lang = (xmlChar*)"en-GB";\r
+  /**\r
+   * @remarks   input 1: [N/A, N/A] @n\r
+   *            {"en-GB"} => {N/A | 1} @n\r
+   */\r
+    ret_val = xmlCheckLanguageID((const xmlChar *) (lang));\r
+       DTS_CHECK_EQ_MESSAGE("xmlCheckLanguageID", (void *)ret_val, (void *)1, "xmlCheckLanguageID Failed");\r
+       lang = (xmlChar*)"en-US";\r
+\r
+  /**\r
+   * @remarks   input 2: [N/A, N/A] @n\r
+   *            {"en-US"} => {N/A | 1} @n\r
+   */ret_val = xmlCheckLanguageID((const xmlChar *) (lang));\r
+       DTS_CHECK_EQ_MESSAGE("xmlCheckLanguageID", (void *)ret_val, (void *)1, "xmlCheckLanguageID Failed");\r
+       lang = (xmlChar*)"foo";\r
+\r
+  /**\r
+   * @remarks   input 3: [N/A, N/A] @n\r
+   *            {"foo"} => {N/A | 0} @n\r
+   */\r
+    ret_val = xmlCheckLanguageID((const xmlChar *) (lang));\r
+       DTS_CHECK_EQ_MESSAGE("xmlCheckLanguageID", (void *)ret_val, (void *)1, "xmlCheckLanguageID Failed");\r
+}\r
+\r
+       /**    \r
+       * @test                 UTcInputPushP01\r
+       * @brief                int inputPush(xmlParserCtxtPtr ctxt, xmlParserInputPtr value)\r
+       * @desc                 Positive Test for inputPush()\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlParserCtxtPtr(ctxt), xmlParserInputPtr(0)} => {N/A | int(0)} @n\r
+                                       input2: [N/A, N/A] @n\r
+       *                       {xmlParserCtxtPtr(ctxt), xmlParserInputPtr(value)} => {N/A | int(1)} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcInputPushP01(void) {\r
+    int ret_val;\r
+    xmlParserCtxtPtr ctxt; /* an XML parser context */\r
+    int n_ctxt;\r
+    xmlParserInputPtr value; /* the parser input */\r
+    int n_value;\r
+\r
+    for (n_ctxt = 0;n_ctxt < 2;n_ctxt++) {\r
+    for (n_value = 0;n_value < gen_nb_xmlParserInputPtr;n_value++) {\r
+        ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);\r
+        //value = xmlNewInputStream(ctxt);\r
+                if(n_ctxt == 0)\r
+               {\r
+                 /**\r
+                  * @remarks   input 1: [N/A, N/A] @n\r
+                  *            {ctxt, NULL} => {N/A | 0} @n\r
+                  */\r
+                       ret_val = inputPush(ctxt, NULL);\r
+                       DTS_CHECK_EQ_MESSAGE("inputPush", (void *)ret_val, (void *)-1, "inputPush 1 Failed");\r
+               }\r
+               else\r
+               { /**\r
+                  * @remarks   input 2: [N/A, N/A] @n\r
+                  *            {ctxt, NULL} => {N/A | 1} @n\r
+                  */\r
+                       value = xmlNewInputStream(ctxt);\r
+                       ret_val = inputPush(ctxt, value);\r
+                       DTS_CHECK_NE_MESSAGE("inputPush", (void *)ret_val, (void *)-1, "inputPush 2 Failed");\r
+               }\r
+         des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);\r
+         //desret_xmlParserInputPtr(value);\r
+    }\r
+    }\r
+}\r
+       /**    \r
+       * @test                 UTcInputPopP01\r
+       * @brief                xmlParserInputPtr inputPop(xmlParserCtxtPtr ctxt)\r
+       * @desc                 Positive Test for inputPop()\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Create XML parser context, Free XML parser context] @n\r
+       *                       {xmlParserCtxtPtr(ctxt)} => {N/A | NULL} @n\r
+                                       input2: [N/A, N/A] @n\r
+       *                       {xmlParserCtxtPtr(ctxt)} => {N/A | NULL} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcInputPopP01(void) {\r
+\r
+    xmlParserInputPtr ret_val;\r
+    xmlParserCtxtPtr ctxt; /* an XML parser context */\r
+    int n_ctxt;\r
+\r
+    for (n_ctxt = 0;n_ctxt < 2;n_ctxt++) {\r
+        ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);\r
+        if(n_ctxt == 0)\r
+               {/**\r
+                  * @remarks   input 1: [N/A, N/A] @n\r
+                  *            {ctxt} => {N/A | 1} @n\r
+                  */\r
+                       ret_val = inputPop(ctxt);\r
+                       DTS_CHECK_EQ_MESSAGE("inputPop", (void *)ret_val, (void *)NULL, "inputPop Failed");                     \r
+               }\r
+               else\r
+               {/**\r
+                  * @remarks   input 2: [N/A, N/A] @n\r
+                  *            {ctxt} => {N/A | 1} @n\r
+                  */\r
+                       ret_val = inputPop(ctxt);\r
+                       DTS_CHECK_NE_MESSAGE("inputPop", (void *)ret_val, (void *)NULL, "inputPop Failed");\r
+               }\r
+        desret_xmlParserInputPtr(ret_val);\r
+        des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);\r
+    }\r
+\r
+}\r
+       /**    \r
+       * @test                 UTcNodePushP01\r
+       * @brief                int nodePush(xmlParserCtxtPtr ctxt, xmlNodePtr value)\r
+       * @desc                 Positive Test for nodePush()\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Create an instance of xmlParserCtxtPtr (ctxt)@n Create an instance of xmlNodePtr (value) , Free xmlParserCtxtPtr and XML node pointers] @n\r
+       *                       {xmlParserCtxtPtr(ctxt), xmlNodePtr(value)} => {N/A | int(1)} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcNodePushP01(void) {\r
+\r
+    int ret_val;\r
+    xmlParserCtxtPtr ctxt; /* an XML parser context */\r
+    int n_ctxt;\r
+    xmlNodePtr value; /* the element node */\r
+    int n_value;\r
+\r
+    for (n_ctxt = 1;n_ctxt < 2;n_ctxt++) {\r
+    for (n_value = 0;n_value < gen_nb_xmlNodePtr-1;n_value++) {\r
+        ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);\r
+        value = gen_xmlNodePtr(n_value, 1);\r
+               ctxt->nodeNr = 1;\r
+               /**\r
+                * @remarks   input 1: [Create an instance of xmlParserCtxtPtr (ctxt)@n\r
+                *                                              Create an instance of xmlNodePtr (value), N/A] @n\r
+                *            {ctxt, xmlNodePtr} => {N/A | 1} @n\r
+                */\r
+        ret_val = nodePush(ctxt, value);\r
+       DTS_CHECK_NE_MESSAGE("nodePush", (void *)ret_val, (void *)NULL, "nodePush Failed");                     \r
+        des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);\r
+        des_xmlNodePtr(n_value, value, 1);\r
+    }\r
+    }\r
+\r
+}\r
+       /**    \r
+       * @test                 UTcNodePopP01\r
+       * @brief                xmlNodePtr nodePop(xmlParserCtxtPtr ctxt)\r
+       * @desc                 Positive Test for nodePop()\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [[Create an instance of xmlParserCtxtPtr (ctxt), Free xmlParserCtxtPtr and XML node pointers] @n\r
+       *                       {xmlParserCtxtPtr(ctxt)} => {N/A | NULL} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcNodePopP01(void) {\r
+\r
+    xmlNodePtr ret_val;\r
+    xmlParserCtxtPtr ctxt; /* an XML parser context */\r
+    int n_ctxt;\r
+       int ret_val_push;\r
+\r
+\r
+    for (n_ctxt = 1;n_ctxt < 2;n_ctxt++) {\r
+        ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);\r
+               ctxt->nodeNr = 1;\r
+               ret_val_push = nodePush(ctxt, gen_xmlNodePtr(0, 1));\r
+               DTS_CHECK_NE_MESSAGE("nodePush", (void *)ret_val_push, (void *)0, "nodePush Failed");\r
+               /**\r
+                * @remarks   input 1: [Create an instance of xmlParserCtxtPtr (ctxt), N/A] @n\r
+                *            {ctxt} => {N/A | 1} @n\r
+                */\r
+       ret_val = nodePop(ctxt);\r
+          DTS_CHECK_NE_MESSAGE("nodePush", (void *)ret_val, (void *)NULL, "nodePush Failed");\r
+       des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);\r
+          xmlFreeNode(ret_val);\r
+    }\r
+}\r
+       /**    \r
+       * @test                 UTcNamePushP01\r
+       * @brief                int namePush(xmlParserCtxtPtr ctxt, const xmlChar * value)\r
+       * @desc                 Positive Test for namePush()\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Create an instance of xmlParserCtxtPtr (ctxt). Create an instance of xmlChar (value), Free xmlParserCtxtPtr and const_xmlChar_ptr pointers] @n\r
+       *                       {xmlParserCtxtPtr(ctxt), xmlChar(value)} => {N/A | int(-1)} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcNamePushP01(void) {\r
+    int ret_val;\r
+    xmlParserCtxtPtr ctxt; /* an XML parser context */\r
+    int n_ctxt;\r
+    xmlChar * value; /* the element name */\r
+    int n_value;\r
+\r
+    for (n_ctxt = 0;n_ctxt < 2;n_ctxt++) {\r
+    for (n_value = 0;n_value < gen_nb_const_xmlChar_ptr;n_value++) {\r
+        ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);\r
+        value = gen_const_xmlChar_ptr(n_value, 1);\r
+               /**\r
+                * @remarks   input 1: [Create an instance of xmlParserCtxtPtr (ctxt)@n\r
+                *                                              Create an instance of xmlChar (value), N/A] @n\r
+                *            {ctxt, value} => {N/A |any integer value which is not equal to -1} @n\r
+                */\r
+        ret_val = namePush(ctxt, (const xmlChar *)value);\r
+        desret_int(ret_val);\r
+       DTS_CHECK_NE_MESSAGE("namePush", (void *)ret_val, (void *)-1, "namePush Failed");\r
+               des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);\r
+        des_const_xmlChar_ptr(n_value, (const xmlChar *)value, 1);\r
+//             xmlFree(value);\r
+        xmlResetLastError();\r
+    }\r
+    }\r
+}\r
+       /**    \r
+       * @test                 UTcNamePopP01\r
+       * @brief                const xmlChar * namePop(xmlParserCtxtPtr ctxt)\r
+       * @desc                 Positive Test for namePop()\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Create an instance of xmlParserCtxtPtr (ctxt), Free const_xmlChar_ptr and xmlParserCtxtPtr pointers] @n\r
+       *                       {xmlParserCtxtPtr(ctxt)} => {N/A | non-NULL xmlChar} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcNamePopP01(void) {\r
+    const xmlChar * ret_val;\r
+    xmlParserCtxtPtr ctxt; /* an XML parser context */\r
+    int n_ctxt;\r
+       int ret_val_namepush;\r
+       xmlChar * value; /* the element name */\r
+\r
+    for (n_ctxt = 1;n_ctxt < 2;n_ctxt++) {\r
+        ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);\r
+               ctxt->nameNr = 2;\r
+\r
+               value = gen_const_xmlChar_ptr(0, 1);\r
+               ret_val_namepush = namePush(ctxt, (const xmlChar *)value);\r
+               /**\r
+                * @remarks   input 1: [Create an instance of xmlParserCtxtPtr (ctxt), N/A] @n\r
+                *            {ctxt } => {N/A | non-NULL xmlChar} @n\r
+                */\r
+        ret_val = namePop(ctxt);\r
+       DTS_CHECK_NE_MESSAGE("namePop", (void *)ret_val, (void *)NULL, "namePop Failed");\r
+        desret_const_xmlChar_ptr(ret_val);\r
+        des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);\r
+    }\r
+}\r
+       /**    \r
+       * @test                 UtcXmlPopInputP01\r
+       * @brief                xmlChar xmlPopInput(xmlParserCtxtPtr ctxt)\r
+       * @desc                 Positive Test for xmlPopInput()\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Create an instance of xmlParserCtxtPtr (ctxt), Free xmlParserCtxtPtr pointer] @n\r
+       *                       {xmlParserCtxtPtr(ctxt)} => {N/A | xmlChar(between 0 and 255)} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UtcXmlPopInputP01(void) {        //crashing\r
+\r
+    xmlChar ret_val;\r
+    xmlParserCtxtPtr ctxt; /* an XML parser context */\r
+    int n_ctxt;\r
+\r
+    for (n_ctxt = 1;n_ctxt < 2;n_ctxt++) {\r
+        ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);\r
+               /**\r
+                * @remarks   input 1: [Create an instance of xmlParserCtxtPtr (ctxt), N/A] @n\r
+                *            {ctxt } => {N/A | between 0 and 255} @n\r
+                */\r
+        ret_val = xmlPopInput(ctxt);\r
+       DTS_CHECK_EQ_MESSAGE("xmlPopInput", (void *)(ret_val>=0 && ret_val<= 255), (void *)1, "xmlPopInput Failed");\r
+        desret_xmlChar(ret_val);\r
+        des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);\r
+    }\r
+}\r
+       /**    \r
+       * @test                 UtcXmlPushInputP01\r
+       * @brief                void xmlPushInput(xmlParserCtxtPtr ctxt, xmlParserInputPtr input)\r
+       * @desc                 Positive Test for xmlPushInput()\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Create an instance of xmlParserCtxtPtr (ctxt). Create an instance of xmlParserInputPtr (input), Free xmlParserCtxtPtr pointer] @n\r
+       *                       {xmlParserCtxtPtr(ctxt), xmlParserInputPtr(input)} => {N/A | xmlChar(between 0 and 255)} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UtcXmlPushInputP01(void) {\r
+\r
+    xmlChar ret_val;\r
+    xmlParserCtxtPtr ctxt; /* an XML parser context */\r
+    int n_ctxt;\r
+    xmlParserInputPtr input; /* an XML parser input fragment (entity, XML fragment ...). */\r
+    int n_input;\r
+\r
+    for (n_ctxt = 1;n_ctxt < 2;n_ctxt++) {\r
+    for (n_input = 0;n_input < gen_nb_xmlParserInputPtr;n_input++) {\r
+        ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);\r
+        input = gen_xmlParserInputPtr(n_input, 1);\r
+               /**\r
+                * @remarks   input 1: [Create an instance of xmlParserCtxtPtr (ctxt)@n\r
+                *                                              Create an instance of xmlParserInputPtr (input), N/A] @n\r
+                *            {ctxt, input } => {N/A | between 0 and 255} @n\r
+                */\r
+        xmlPushInput(ctxt, input);\r
+               ret_val = xmlPopInput(ctxt);\r
+       DTS_CHECK_EQ_MESSAGE("xmlPopInput", (void *)(ret_val>=0 && ret_val<= 255), (void *)1, "xmlPopInput Failed");\r
+               \r
+        des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);\r
+        des_xmlParserInputPtr(n_input, input, 1);\r
+    }\r
+    }\r
+}\r
+       /**    \r
+       * @test                 UtcXmlStringLenDecodeEntitiesP01\r
+       * @brief                xmlChar * xmlStringLenDecodeEntities(xmlParserCtxtPtr ctxt, const xmlChar *str, int len, int what, xmlChar end, xmlChar  end2, xmlChar end3)\r
+       * @desc                 Positive Test for xmlStringLenDecodeEntities()\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Create an instance of xmlParserCtxtPtr (ctxt), Free xmlParserCtxtPtr ponter] @n\r
+       *                       {xmlParserCtxtPtr(ctxt), xmlChar(xmlChar), int(len), int(what), xmlChar(end), xmlChar(end2), xmlChar(end3)} => {N/A | xmlChar(NULL)} @n\r
+                                       input2: [Create an instance of xmlParserCtxtPtr (ctxt), N/A] @n\r
+       *                       {xmlParserCtxtPtr(ctxt), xmlChar(xmlChar), int(len), int(what), xmlChar(end), xmlChar(end2), xmlChar(end3)} => {N/A | non-NULL XmlChar} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UtcXmlStringLenDecodeEntitiesP01(void) {\r
+    int test_ret = 0;\r
+\r
+    xmlChar * ret_val;\r
+    xmlParserCtxtPtr ctxt; /* the parser context */\r
+    int n_ctxt = 0;\r
+    xmlChar * str; /* the input string */\r
+    int n_str = 0;\r
+    int len; /* the string length */\r
+    int n_len = 0;\r
+    int what; /* combination of XML_SUBSTITUTE_REF and XML_SUBSTITUTE_PEREF */\r
+    int n_what = 0;\r
+    xmlChar end; /* an end marker xmlChar, 0 if none */\r
+    int n_end = 0;\r
+    xmlChar end2; /* an end marker xmlChar, 0 if none */\r
+    int n_end2 = 0;\r
+    xmlChar end3; /* an end marker xmlChar, 0 if none */\r
+    int n_end3 = 0;\r
+\r
+    //for (n_ctxt = 0;n_ctxt < 2;n_ctxt++) {\r
+    //for (n_str = 0;n_str < gen_nb_const_xmlChar_ptr-1;n_str++) {\r
+    //for (n_len = 0;n_len < gen_nb_int-1;n_len++) {\r
+    //for (n_what = 0;n_what < gen_nb_int-1;n_what++) {\r
+    //for (n_end = 0;n_end < gen_nb_xmlChar-1;n_end++) {\r
+    //for (n_end2 = 0;n_end2 < gen_nb_xmlChar-1;n_end2++) {\r
+    //for (n_end3 = 0;n_end3 < gen_nb_xmlChar-1;n_end3++) {\r
+        ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);\r
+        str = gen_const_xmlChar_ptr(n_str, 1);\r
+        len = gen_int(n_len, 2);\r
+        what = gen_int(n_what, 3);\r
+        end = gen_xmlChar(n_end, 4);\r
+        end2 = gen_xmlChar(n_end2, 5);\r
+        end3 = gen_xmlChar(n_end3, 6);\r
+               //if(n_len == 2) {\r
+               /**\r
+                * @remarks   input 1: [Create an instance of xmlParserCtxtPtr (ctxt) , N/A] @n\r
+                *            {ctxt, ("foo","<foo/>","none", " 2ab "), -1, (0, 1, -1, 122), ('a',' ',''), ('a',' ',''), ('a',' ','')  } => {N/A | non-NULL XmlChar*} @n\r
+                */\r
+        //ret_val = xmlStringLenDecodeEntities(ctxt, (const xmlChar *)str, len, what, end, end2, end3);\r
+        //MT_CHECK_MESSAGE2((ret_val == NULL), "Invalid ret_val " );\r
+               //}else {\r
+               /**\r
+                * @remarks   input 2: [N/A , N/A] @n\r
+                *            {ctxt, ("foo","<foo/>","none", " 2ab "), (0, 1,122), (0, 1, -1, 122), ('a',' ',''), ('a',' ',''), ('a',' ','')  } => {N/A | non-NULL XmlChar*} @n\r
+                */\r
+        ret_val = xmlStringLenDecodeEntities(ctxt, (const xmlChar *)str, len, what, end, end2, end3);\r
+       DTS_CHECK_NE_MESSAGE("xmlStringLenDecodeEntities", (void *)ret_val, (void *)NULL, "xmlStringLenDecodeEntities Failed");\r
+               \r
+               //}\r
+               desret_xmlChar_ptr(ret_val);\r
+        des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);\r
+        des_const_xmlChar_ptr(n_str, (const xmlChar *)str, 1);\r
+        des_int(n_len, len, 2);\r
+        des_int(n_what, what, 3);\r
+        des_xmlChar(n_end, end, 4);\r
+        des_xmlChar(n_end2, end2, 5);\r
+        des_xmlChar(n_end3, end3, 6);\r
+\r
+    //}\r
+    //}\r
+    //}\r
+    //}\r
+    //}\r
+    //}\r
+    //}\r
+}\r
+       /**    \r
+       * @test                 UtcXmlStringDecodeEntitiesP01\r
+       * @brief                xmlChar * xmlStringDecodeEntities(xmlParserCtxtPtr ctxt, const xmlChar *str, int what, xmlChar end, xmlChar  end2, xmlChar end3)\r
+       * @desc                 Positive Test for xmlStringDecodeEntities()\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Create an instance of xmlParserCtxtPtr (ctxt), Free xmlParserCtxtPtr pointer] @n\r
+       *                       {xmlParserCtxtPtr(ctxt), xmlChar(xmlChar), int(what), xmlChar(end), xmlChar(end2), xmlChar(end3)} => {N/A | non-NULL XmlChar} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UtcXmlStringDecodeEntitiesP01(void) {\r
+\r
+    xmlChar * ret_val;\r
+    xmlParserCtxtPtr ctxt; /* the parser context */\r
+    int n_ctxt;\r
+    xmlChar * str; /* the input string */\r
+    int n_str;\r
+    int what; /* combination of XML_SUBSTITUTE_REF and XML_SUBSTITUTE_PEREF */\r
+    int n_what;\r
+    xmlChar end; /* an end marker xmlChar, 0 if none */\r
+    int n_end;\r
+    xmlChar end2; /* an end marker xmlChar, 0 if none */\r
+    int n_end2;\r
+    xmlChar end3; /* an end marker xmlChar, 0 if none */\r
+    int n_end3;\r
+\r
+    for (n_ctxt = 1;n_ctxt < 2;n_ctxt++) {\r
+    for (n_str = 0;n_str < gen_nb_const_xmlChar_ptr-2;n_str++) {\r
+    for (n_what = 0;n_what < gen_nb_int-1;n_what++) {\r
+    for (n_end = 0;n_end < gen_nb_xmlChar-1;n_end++) {\r
+    for (n_end2 = 0;n_end2 < gen_nb_xmlChar-1;n_end2++) {\r
+    for (n_end3 = 0;n_end3 < gen_nb_xmlChar-1;n_end3++) {\r
+        ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);\r
+        str = gen_const_xmlChar_ptr(n_str, 1);\r
+        what = gen_int(n_what, 2);\r
+        end = gen_xmlChar(n_end, 3);\r
+        end2 = gen_xmlChar(n_end2, 4);\r
+        end3 = gen_xmlChar(n_end3, 5);\r
+               /**\r
+                * @remarks   input 1: [Create an instance of xmlParserCtxtPtr (ctxt) , N/A] @n\r
+                *            {ctxt, ("foo","<foo/>","none", " 2ab "),  (0, 1, -1, 122), ('a',' ',''), ('a',' ',''), ('a',' ','')  } => {N/A | non-NULL XmlChar*} @n\r
+                */\r
+        ret_val = xmlStringDecodeEntities(ctxt, (const xmlChar *)str, what, end, end2, end3);\r
+       DTS_CHECK_NE_MESSAGE("xmlStringDecodeEntities", (void *)ret_val, (void *)NULL, "xmlStringDecodeEntities Failed");\r
+               \r
+        desret_xmlChar_ptr(ret_val);\r
+        des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);\r
+        des_const_xmlChar_ptr(n_str, (const xmlChar *)str, 1);\r
+        des_int(n_what, what, 2);\r
+        des_xmlChar(n_end, end, 3);\r
+        des_xmlChar(n_end2, end2, 4);\r
+        des_xmlChar(n_end3, end3, 5);\r
+    }\r
+    }\r
+    }\r
+    }\r
+    }\r
+    }\r
+\r
+}\r
+       /**    \r
+       * @test                 UtcXmlSplitQNameP01\r
+       * @brief                xmlChar * xmlSplitQName(xmlParserCtxtPtr ctxt, const xmlChar *name, xmlChar **prefix)\r
+       * @desc                 Positive Test for xmlSplitQName()\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Create an instance of xmlParserCtxtPtr (ctxt), Free xmlParserCtxtPtr pointer] @n\r
+       *                       {xmlParserCtxtPtr(ctxt), xmlChar(name), xmlChar(prefix)} => {N/A | non-NULL XmlChar} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UtcXmlSplitQNameP01(void) {\r
+\r
+    xmlChar * ret_val;\r
+    xmlParserCtxtPtr ctxt; /* an XML parser context */\r
+    int n_ctxt;\r
+    xmlChar * name; /* an XML parser context */\r
+    int n_name;\r
+    xmlChar ** prefix; /* a xmlChar ** */\r
+       xmlChar *name1 = (xmlChar*)"name";\r
+       prefix = &name1;\r
+    int n_prefix;\r
+\r
+    for (n_ctxt = 1;n_ctxt < 2;n_ctxt++) {\r
+    for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr-2;n_name++) {\r
+    for (n_prefix = 0;n_prefix < gen_nb_xmlChar_ptr_ptr;n_prefix++) {\r
+        ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);\r
+        name = gen_const_xmlChar_ptr(n_name, 1);\r
+        //prefix = gen_xmlChar_ptr_ptr(n_prefix, 2);\r
+               /**\r
+                * @remarks   input 1: [Create an instance of xmlParserCtxtPtr (ctxt), N/A] @n\r
+                *            {ctxt, name, prefix} => {N/A |  non-NULL XmlChar*} @n\r
+                */\r
+        ret_val = xmlSplitQName(ctxt, (const xmlChar *)name, prefix);\r
+       DTS_CHECK_NE_MESSAGE("xmlSplitQName", (void *)ret_val, (void *)NULL, "xmlSplitQName Failed");\r
+        desret_xmlChar_ptr(ret_val);\r
+        des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);\r
+        des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);\r
+        des_xmlChar_ptr_ptr(n_prefix, prefix, 2);\r
+    }\r
+    }\r
+    }\r
+}\r
+       /**    \r
+       * @test                 UtcXmlParseDocumentP01\r
+       * @brief                int xmlParseDocument(xmlParserCtxtPtr ctxt)\r
+       * @desc                 Positive Test for xmlParseDocument()\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Create an instance of xmlParserCtxtPtr (ctxt), Free xmlParserCtxtPtr pointer] @n\r
+       *                       {xmlParserCtxtPtr(ctxt)} => {N/A | int(0)} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UtcXmlParseDocumentP01(void) {\r
+\r
+    int ret_val;\r
+    xmlParserCtxtPtr ctxt; /* an XML parser context */\r
+    int n_ctxt;\r
+\r
+    for (n_ctxt = 1;n_ctxt < 2;n_ctxt++) {\r
+        ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);\r
+               /**\r
+                * @remarks   input 1: [Create an instance of xmlParserCtxtPtr (ctxt), N/A] @n\r
+                *            {ctxt } => {N/A |  0} @n\r
+                */\r
+        ret_val = xmlParseDocument(ctxt);\r
+               DTS_CHECK_EQ_MESSAGE("xmlParseDocument", (void *)ret_val, (void *)0, "xmlParseDocument Failed");\r
+        if (ctxt != NULL) {xmlFreeDoc(ctxt->myDoc); ctxt->myDoc = NULL;}\r
+        desret_int(ret_val);\r
+        des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);\r
+    }\r
+}\r
+       /**    \r
+       * @test                 UtcXmlParseExtParsedEntP01\r
+       * @brief                int xmlParseExtParsedEnt(xmlParserCtxtPtr ctxt)\r
+       * @desc                 Positive Test for xmlParseExtParsedEnt()\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Create an instance of xmlParserCtxtPtr (ctxt), Free xmlParserCtxtPtr pointer] @n\r
+       *                       {xmlParserCtxtPtr(ctxt)} => {N/A | int(0)} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UtcXmlParseExtParsedEntP01(void) {\r
+\r
+    int ret_val;\r
+    xmlParserCtxtPtr ctxt; /* an XML parser context */\r
+    int n_ctxt;\r
+\r
+    for (n_ctxt = 1;n_ctxt < 2;n_ctxt++) {\r
+        ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);\r
+               /**\r
+                * @remarks   input 1: [Create an instance of xmlParserCtxtPtr (ctxt), N/A] @n\r
+                *            {ctxt } => {N/A |  0} @n\r
+                */\r
+        ret_val = xmlParseExtParsedEnt(ctxt);\r
+       DTS_CHECK_EQ_MESSAGE("xmlParseExtParsedEnt", (void *)ret_val, (void *)0, "xmlParseExtParsedEnt Failed");\r
+        if (ctxt != NULL) {xmlFreeDoc(ctxt->myDoc); ctxt->myDoc = NULL;}\r
+        desret_int(ret_val);\r
+        des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);\r
+      }\r
+}\r
+       /**    \r
+       * @test                 UtcXmlParseChunkP01\r
+       * @brief                int xmlParseChunk(xmlParserCtxtPtr ctxt, const char *chunk, int size, int terminate)\r
+       * @desc                 Positive Test for xmlParseChunk()\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Create an instance of xmlParserCtxtPtr (ctxt), Free xmlParserCtxtPtr pointer] @n\r
+       *                       {xmlParserCtxtPtr(), char(chunk), int(size), int(terminate)} => {N/A | int(0)} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UtcXmlParseChunkP01(void) {\r
+\r
+#if defined(LIBXML_PUSH_ENABLED)\r
+    int ret_val;\r
+    xmlParserCtxtPtr ctxt; /* an XML parser context */\r
+    int n_ctxt;\r
+    char * chunk; /* an char array */\r
+    int n_chunk;\r
+    int size; /* the size in byte of the chunk */\r
+    int n_size;\r
+    int terminate; /* last chunk indicator */\r
+    int n_terminate;\r
+\r
+    for (n_ctxt = 1;n_ctxt < 2;n_ctxt++) {\r
+    for (n_chunk = 0;n_chunk < gen_nb_const_char_ptr-2;n_chunk++) {\r
+    for (n_size = 0;n_size < gen_nb_int-1;n_size++) {\r
+    for (n_terminate = 0;n_terminate < n_size-1;n_terminate++) {\r
+        ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);\r
+               DTS_CHECK_NE_MESSAGE("xmlParseChunk", (void *)ctxt, (void *)NULL, "gen_xmlParserCtxtPtr Failed");\r
+        chunk = gen_const_char_ptr(n_chunk, 1);\r
+               DTS_CHECK_NE_MESSAGE("xmlParseChunk", (void *)chunk, (void *)NULL, "gen_const_char_ptr Failed");\r
+        size = gen_int(n_size, 2);\r
+        terminate = gen_int(n_terminate, 3);\r
+               /**\r
+                * @remarks   input 1: [Create an instance of xmlParserCtxtPtr (ctxt), N/A] @n\r
+                *            {ctxt, ("foo", "<foo/>", "test/ent2"),(0, 1, -1, 122),(0, 1, -1, 122) } => {N/A |  0} @n\r
+                */\r
+        ret_val = xmlParseChunk(ctxt, (const char *)chunk, size, terminate);\r
+               DTS_CHECK_EQ_MESSAGE("xmlParseChunk", (void *)ret_val, (void *)0, "xmlParseChunk Failed");\r
+        if (ctxt != NULL) {xmlFreeDoc(ctxt->myDoc); ctxt->myDoc = NULL;}\r
+        desret_int(ret_val);\r
+        des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);\r
+        des_const_char_ptr(n_chunk, (const char *)chunk, 1);\r
+        des_int(n_size, size, 2);\r
+        des_int(n_terminate, terminate, 3);\r
+    }\r
+    }\r
+    }\r
+    }\r
+#endif\r
+}\r
+       /**    \r
+       * @test                 UtcXmlStopParserP01\r
+       * @brief                void xmlStopParser(xmlParserCtxtPtr ctxt)\r
+       * @desc                 Positive Test for xmlStopParser()\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Create an instance of xmlParserCtxtPtr (ctxt), Free xmlParserCtxtPtr pointer] @n\r
+       *                       {xmlParserCtxtPtr(ctxt)} => {void} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UtcXmlStopParserP01(void) {\r
+\r
+#ifdef LIBXML_PUSH_ENABLED\r
+    xmlParserCtxtPtr ctxt; /* an XML parser context */\r
+    int n_ctxt;\r
+\r
+    for (n_ctxt = 0;n_ctxt < 2;n_ctxt++) {\r
+        ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);\r
+               /**\r
+                * @remarks   input 1: [Create an instance of xmlParserCtxtPtr (ctxt), N/A] @n\r
+                *            {ctxt} => {N/A |void} @n\r
+                */\r
+        xmlStopParser(ctxt);\r
+               DTS_CHECK_NE_MESSAGE("xmlStopParser", (void *)ctxt, (void *)NULL, "xmlStopParser Failed");\r
+        des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);\r
+    }\r
+#endif\r
+\r
+}\r
+       /**    \r
+       * @test                 UtcXmlCreatePushParserCtxtP01\r
+       * @brief                xmlParserCtxtPtr xmlCreatePushParserCtxt(xmlSAXHandlerPtr sax, void *user_data, const char *chunk, int size, const char *filename)\r
+       * @desc                 Positive Test for xmlCreatePushParserCtxt()\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Create an instance of xmlSAXHandlerPtr (sax), Free xmlSAXHandlerPtr pointer] @n\r
+       *                       {xmlSAXHandlerPtr(sax), user_data(user_data), char((const char *)chunk), int(size), char(LIBXML2TESTXML)} => {N/A | non-NULL xmlParserCtxtPtr} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UtcXmlCreatePushParserCtxtP01(void) {\r
+\r
+#if defined(LIBXML_PUSH_ENABLED)\r
+    xmlParserCtxtPtr ret_val;\r
+    xmlSAXHandlerPtr sax; /* a SAX handler */\r
+    int n_sax;\r
+    void * user_data; /* The user data returned on SAX callbacks */\r
+    int n_user_data;\r
+    char * chunk; /* a pointer to an array of chars */\r
+    int n_chunk;\r
+    int size; /* number of chars in the array */\r
+    int n_size;\r
+    const char * filename; /* an optional file name or URI */\r
+    int n_filename;\r
+\r
+    for (n_sax = 0;n_sax < gen_nb_xmlSAXHandlerPtr-1;n_sax++) {\r
+    for (n_user_data = 0;n_user_data < gen_nb_userdata-1;n_user_data++) {\r
+    for (n_chunk = 0;n_chunk < gen_nb_const_char_ptr-1;n_chunk++) {\r
+    for (n_size = 0;n_size < gen_nb_int-1;n_size++) {\r
+    for (n_filename = 0;n_filename < gen_nb_fileoutput-1;n_filename++) {\r
+        sax = gen_xmlSAXHandlerPtr(n_sax, 0);\r
+        user_data = gen_userdata(n_user_data, 1);\r
+        chunk = gen_const_char_ptr(n_chunk, 2);\r
+        size = gen_int(n_size, 3);\r
+        filename = gen_fileoutput(n_filename, 4);\r
+               /**\r
+                *@remarks  input 1: [Create an instance of xmlSAXHandlerPtr (sax), N/A] @n\r
+                *            {sax, user_data,("foo", "<foo/>", "test/ent2"),(0, 1, -1, 122),LIBXML2TESTXML } => {N/A |non-NULL xmlParserCtxtPtr} @n\r
+                */\r
+        ret_val = xmlCreatePushParserCtxt(sax, user_data, (const char *)chunk, size, LIBXML2TESTXML);\r
+               DTS_CHECK_NE_MESSAGE("xmlCreatePushParserCtxt", (void *)ret_val, (void *)NULL, "xmlStopParser Failed");\r
+               desret_xmlParserCtxtPtr(ret_val);\r
+        des_xmlSAXHandlerPtr(n_sax, sax, 0);\r
+        des_userdata(n_user_data, user_data, 1);\r
+        des_const_char_ptr(n_chunk, (const char *)chunk, 2);\r
+        des_int(n_size, size, 3);\r
+        des_fileoutput(n_filename, filename, 4);\r
+    }\r
+    }\r
+    }\r
+    }\r
+    }\r
+#endif\r
+\r
+}\r
+       /**    \r
+       * @test                 UtcXmlParseCtxtExternalEntityP01\r
+       * @brief                int xmlParseCtxtExternalEntity(xmlParserCtxtPtr ctx, const xmlChar *URL, const xmlChar *ID, xmlNodePtr *lst)\r
+       * @desc                 Positive Test for xmlParseCtxtExternalEntity()\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Create an instance of xmlParserCtxtPtr (ctxt), Free xmlParserCtxtPtr pointer] @n\r
+       *                       {xmlParserCtxtPtr(ctx), xmlChar("foo","<foo/>","none", " 2ab "), xmlChar("foo","<foo/>","none", " 2ab "), xmlNodePtr(NULL)} => {N/A | int(0)} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UtcXmlParseCtxtExternalEntityP01(void) {\r
+    int test_ret = 0;\r
+\r
+    int ret_val;\r
+    xmlParserCtxtPtr ctx; /* the existing parsing context */\r
+    int n_ctx;\r
+    xmlChar * URL; /* the URL for the entity to load */\r
+    int n_URL;\r
+    xmlChar * ID; /* the System ID for the entity to load */\r
+    int n_ID;\r
+    xmlNodePtr * lst; /* the return value for the set of parsed nodes */\r
+    int n_lst;\r
+\r
+    for (n_ctx = 0;n_ctx < 2;n_ctx++) {\r
+    for (n_URL = 0;n_URL < gen_nb_const_xmlChar_ptr;n_URL++) {\r
+    for (n_ID = 0;n_ID < gen_nb_const_xmlChar_ptr;n_ID++) {\r
+    for (n_lst = 0;n_lst < gen_nb_xmlNodePtr_ptr;n_lst++) {\r
+        ctx = gen_xmlParserCtxtPtr(n_ctx, 0);\r
+        URL = gen_const_xmlChar_ptr(n_URL, 1);\r
+        ID = gen_const_xmlChar_ptr(n_ID, 2);\r
+        lst = gen_xmlNodePtr_ptr(n_lst, 3);\r
+               /**\r
+                * @remarks  input 1: [Create an instance of xmlParserCtxtPtr (ctxt), N/A] @n\r
+                *            {ctxt, ("foo","<foo/>","none", " 2ab "), ("foo","<foo/>","none", " 2ab "), NULL} => {N/A |0} @n\r
+                */\r
+        ret_val = xmlParseCtxtExternalEntity(ctx, (const xmlChar *)URL, (const xmlChar *)ID, lst);\r
+        DTS_CHECK_EQ_MESSAGE("xmlParseCtxtExternalEntity", (void *)ret_val, (void *)-1, "xmlParseCtxtExternalEntity Failed");\r
+               call_tests++;\r
+        des_xmlParserCtxtPtr(n_ctx, ctx, 0);\r
+        des_const_xmlChar_ptr(n_URL, (const xmlChar *)URL, 1);\r
+        des_const_xmlChar_ptr(n_ID, (const xmlChar *)ID, 2);\r
+        des_xmlNodePtr_ptr(n_lst, lst, 3);\r
+    }\r
+    }\r
+    }\r
+    }\r
+}\r
+       /**    \r
+       * @test                 UtcXmlParseExternalEntityP01\r
+       * @brief                int xmlParseExternalEntity(xmlDocPtr doc, xmlSAXHandlerPtr sax, void *user_data, int depth, const xmlChar *URL, const xmlChar *ID, xmlNodePtr *lst)\r
+       * @desc                 Positive Test for xmlParseExternalEntity()\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Create an instance of xmlSAXHandlerPtr (sax), Free xmlSAXHandlerPtr pointer] @n\r
+       *                       {xmlDocPtr(doc), xmlSAXHandlerPtr(sax), user_data(user_data), int(0, 1, -1, 122), xmlChar(LIBXML2TESTXML), xmlChar((const xmlChar *)ID), xmlNodePtr(NULL)} => {N/A | int(0)} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UtcXmlParseExternalEntityP01(void) {\r
+#if 0\r
+#if defined(LIBXML_SAX1_ENABLED)\r
+#ifdef LIBXML_SAX1_ENABLED\r
+    int ret_val;\r
+    xmlDocPtr doc; /* the document the chunk pertains to */\r
+    int n_doc;\r
+    xmlSAXHandlerPtr sax; /* the SAX handler bloc (possibly NULL) */\r
+    int n_sax;\r
+    void * user_data; /* The user data returned on SAX callbacks (possibly NULL) */\r
+    int n_user_data;\r
+    int depth; /* Used for loop detection, use 0 */\r
+    int n_depth;\r
+    xmlChar * URL; /* the URL for the entity to load */\r
+    int n_URL;\r
+    xmlChar * ID; /* the System ID for the entity to load */\r
+    int n_ID;\r
+    xmlNodePtr * lst; /* the return value for the set of parsed nodes */\r
+    int n_lst;\r
+\r
+    for (n_doc = 0;n_doc < gen_nb_xmlDocPtr-1;n_doc++) {\r
+    for (n_sax = 0;n_sax < gen_nb_xmlSAXHandlerPtr;n_sax++) {\r
+    for (n_user_data = 0;n_user_data < gen_nb_userdata-1;n_user_data++) {\r
+    for (n_depth = 0;n_depth < gen_nb_int-1;n_depth++) {\r
+    for (n_URL = 0;n_URL < gen_nb_const_xmlChar_ptr-2;n_URL++) {\r
+    for (n_ID = 0;n_ID < gen_nb_const_xmlChar_ptr-2;n_ID++) {\r
+    for (n_lst = 0;n_lst < gen_nb_xmlNodePtr_ptr;n_lst++) {\r
+        doc = gen_xmlDocPtr(n_doc, 0);\r
+        sax = gen_xmlSAXHandlerPtr(n_sax, 1);\r
+        user_data = gen_userdata(n_user_data, 2);\r
+        depth = gen_int(n_depth, 3);\r
+        URL = gen_const_xmlChar_ptr(n_URL, 4);\r
+        ID = gen_const_xmlChar_ptr(n_ID, 5);\r
+        lst = gen_xmlNodePtr_ptr(n_lst, 6);\r
+               /**\r
+                * @remarks   input 1: [Create an instance of xmlSAXHandlerPtr (sax), N/A] @n\r
+                *            {doc, sax, user_data , (0, 1, -1, 122), LIBXML2TESTXML, NULL} => {N/A |0} @n\r
+                */\r
+        ret_val = xmlParseExternalEntity(doc, sax, user_data, depth, (const xmlChar *)LIBXML2TESTXML, (const xmlChar *)ID, lst);\r
+        DTS_CHECK_NE_MESSAGE("xmlParseExternalEntity", (void *)ret_val, (void *)-1, "xmlParseExternalEntity Failed");\r
+        DTS_CHECK_EQ_MESSAGE("xmlParseExternalEntity", (void *)ret_val, (void *)0, "xmlParseExternalEntity Failed");\r
+        //MT_CHECK_MESSAGE2((ret_val == XML_WAR_UNDECLARED_ENTITY), "  ret_val = %d", ret_val);\r
+        desret_int(ret_val);\r
+        //ret_val = xmlParseExternalEntity(doc, sax, user_data, depth, NULL, NULL, lst);\r
+        //MT_CHECK_MESSAGE2((ret_val == -1), "Invalid ret_val " );\r
+        //desret_int(ret_val);\r
+        des_xmlDocPtr(n_doc, doc, 0);\r
+        des_xmlSAXHandlerPtr(n_sax, sax, 1);\r
+        des_userdata(n_user_data, user_data, 2);\r
+        des_int(n_depth, depth, 3);\r
+        des_const_xmlChar_ptr(n_URL, (const xmlChar *)URL, 4);\r
+        des_const_xmlChar_ptr(n_ID, (const xmlChar *)ID, 5);\r
+        des_xmlNodePtr_ptr(n_lst, lst, 6);\r
+\r
+    }\r
+    }\r
+    }\r
+    }\r
+    }\r
+    }\r
+    }\r
+\r
+#endif\r
+#endif\r
+#endif\r
+}\r
+\r
+       /**    \r
+       * @test                 UtcXmlParseBalancedChunkMemoryP01\r
+       * @brief                int xmlParseBalancedChunkMemory(xmlDocPtr doc, xmlSAXHandlerPtr sax, void *user_data, int depth, const xmlChar *string, xmlNodePtr *lst)\r
+       * @desc                 Positive Test for xmlParseBalancedChunkMemory()\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Create an instance of xmlSAXHandlerPtr (sax), Free xmlSAXHandlerPtr pointer] @n\r
+       *                       {xmlDocPtr((BAD_CAST "1.0"), ("<foo/>", 6, "test", NULL, 0), ("<!DOCTYPE foo []> <foo/>", 24, "test", NULL, 0)), xmlSAXHandlerPtr(NULL), user_data(NULL), int((0, 1, -1, 122)), xmlChar(("foo","<foo/>","none", " 2ab ")), xmlNodePtr(NULL)} => {N/A | int(0)} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UtcXmlParseBalancedChunkMemoryP01(void) {\r
+\r
+#if defined(LIBXML_SAX1_ENABLED)\r
+#ifdef LIBXML_SAX1_ENABLED\r
+    int ret_val;\r
+    xmlDocPtr doc; /* the document the chunk pertains to */\r
+    int n_doc;\r
+    xmlSAXHandlerPtr sax; /* the SAX handler bloc (possibly NULL) */\r
+    int n_sax;\r
+    void * user_data; /* The user data returned on SAX callbacks (possibly NULL) */\r
+    int n_user_data;\r
+    int depth; /* Used for loop detection, use 0 */\r
+    int n_depth;\r
+    xmlChar * string; /* the input string in UTF8 or ISO-Latin (zero terminated) */\r
+    int n_string;\r
+    xmlNodePtr * lst; /* the return value for the set of parsed nodes */\r
+    int n_lst;\r
+\r
+    for (n_doc = 0;n_doc < gen_nb_xmlDocPtr-1;n_doc++) {\r
+    for (n_sax = 0;n_sax < gen_nb_xmlSAXHandlerPtr-1;n_sax++) {\r
+    for (n_user_data = 0;n_user_data < gen_nb_userdata-1;n_user_data++) {\r
+    for (n_depth = 0;n_depth < gen_nb_int-1;n_depth++) {\r
+    for (n_string = 0;n_string < gen_nb_const_xmlChar_ptr-1;n_string++) {\r
+    for (n_lst = 0;n_lst < gen_nb_xmlNodePtr_ptr;n_lst++) {\r
+        doc = gen_xmlDocPtr(n_doc, 0);\r
+        sax = gen_xmlSAXHandlerPtr(n_sax, 1);\r
+        user_data = gen_userdata(n_user_data, 2);\r
+        depth = gen_int(n_depth, 3);\r
+        string = gen_const_xmlChar_ptr(n_string, 4);\r
+        lst = gen_xmlNodePtr_ptr(n_lst, 5);\r
+\r
+#ifdef LIBXML_SAX1_ENABLED\r
+        if (sax == (xmlSAXHandlerPtr)&xmlDefaultSAXHandler) user_data = NULL;\r
+#endif\r
+               /**\r
+                * @remarks   input 1: [Create an instance of xmlSAXHandlerPtr (sax), N/A] @n\r
+                *            {doc, sax, user_data , (0, 1, -1, 122),("foo","<foo/>","none", " 2ab "), NULL} => {N/A |0} @n\r
+                */\r
+        ret_val = xmlParseBalancedChunkMemory(doc, sax, user_data, depth, (const xmlChar *)string, lst);\r
+               DTS_CHECK_NE_MESSAGE("xmlParseBalancedChunkMemory", (void *)ret_val, (void *)-1, "xmlParseBalancedChunkMemory Failed");\r
+               DTS_CHECK_EQ_MESSAGE("xmlParseBalancedChunkMemory", (void *)ret_val, (void *)0, "xmlParseBalancedChunkMemory Failed");\r
+        desret_int(ret_val);\r
+        des_xmlDocPtr(n_doc, doc, 0);\r
+        des_xmlSAXHandlerPtr(n_sax, sax, 1);\r
+        des_userdata(n_user_data, user_data, 2);\r
+        des_int(n_depth, depth, 3);\r
+        des_const_xmlChar_ptr(n_string, (const xmlChar *)string, 4);\r
+        des_xmlNodePtr_ptr(n_lst, lst, 5);\r
+        xmlResetLastError();\r
+\r
+    }\r
+    }\r
+    }\r
+    }\r
+    }\r
+    }\r
+#endif\r
+#endif\r
+}\r
+       /**    \r
+       * @test                 UtcXmlParseBalancedChunkMemoryRecoverP01\r
+       * @brief                int xmlParseBalancedChunkMemoryRecover(xmlDocPtr doc, xmlSAXHandlerPtr sax, void *user_data, int depth, const xmlChar *string, xmlNodePtr *lst, int recover)\r
+       * @desc                 Positive Test for xmlParseBalancedChunkMemoryRecover()\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Create an instance of xmlSAXHandlerPtr (sax), Free xmlSAXHandlerPtr pointer] @n\r
+       *                       {xmlDocPtr(doc), xmlSAXHandlerPtr(sax), user_data(user_data), int(0, 1, -1, 122), xmlChar(("foo","<foo/>","none", " 2ab ")), xmlNodePtr(NULL), int(0, 1, -1, 122)} => {N/A | int(-1)} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UtcXmlParseBalancedChunkMemoryRecoverP01(void) {\r
+\r
+#if defined(LIBXML_SAX1_ENABLED)\r
+#ifdef LIBXML_SAX1_ENABLED\r
+    int ret_val;\r
+    xmlDocPtr doc; /* the document the chunk pertains to */\r
+    int n_doc = 0;\r
+    xmlSAXHandlerPtr sax; /* the SAX handler bloc (possibly NULL) */\r
+    int n_sax = 0;\r
+    void * user_data; /* The user data returned on SAX callbacks (possibly NULL) */\r
+    int n_user_data = 0;\r
+    int depth; /* Used for loop detection, use 0 */\r
+    int n_depth = 0;\r
+    xmlChar * string; /* the input string in UTF8 or ISO-Latin (zero terminated) */\r
+    int n_string = 0;\r
+    xmlNodePtr * lst; /* the return value for the set of parsed nodes */\r
+    int n_lst = 0;\r
+    int recover; /* return nodes even if the data is broken (use 0) */\r
+    int n_recover = 0;\r
+\r
+    //for (n_doc = 0;n_doc < gen_nb_xmlDocPtr-1;n_doc++) {\r
+    //for (n_sax = 0;n_sax < gen_nb_xmlSAXHandlerPtr;n_sax++) {\r
+    //for (n_user_data = 0;n_user_data < gen_nb_userdata-1;n_user_data++) {\r
+    //for (n_depth = 0;n_depth < gen_nb_int-1;n_depth++) {\r
+    //for (n_string = 0;n_string < gen_nb_const_xmlChar_ptr-2;n_string++) {\r
+    //for (n_lst = 0;n_lst < gen_nb_xmlNodePtr_ptr;n_lst++) {\r
+    //for (n_recover = 0;n_recover < gen_nb_int-1;n_recover++) {\r
+        doc = gen_xmlDocPtr(n_doc, 0);\r
+        sax = gen_xmlSAXHandlerPtr(n_sax, 1);\r
+        user_data = gen_userdata(n_user_data, 2);\r
+        depth = gen_int(n_depth, 3);\r
+        string = gen_const_xmlChar_ptr(n_string, 4);\r
+        lst = gen_xmlNodePtr_ptr(n_lst, 5);\r
+        recover = gen_int(n_recover, 6);\r
+\r
+#ifdef LIBXML_SAX1_ENABLED\r
+        if (sax == (xmlSAXHandlerPtr)&xmlDefaultSAXHandler) user_data = NULL;\r
+#endif\r
+               /**\r
+                * @remarks   input 1: [Create an instance of xmlSAXHandlerPtr (sax), N/A] @n\r
+                *            {doc, sax, user_data , (0, 1, -1, 122),("foo","<foo/>","none", " 2ab "), lst,(0, 1, -1, 122) } => {N/A |any integer value which is not equal to -1} @n\r
+                */\r
+        ret_val = xmlParseBalancedChunkMemoryRecover(doc, sax, user_data, depth, (const xmlChar *)string, lst, recover);\r
+               DTS_CHECK_NE_MESSAGE("xmlParseBalancedChunkMemoryRecover", (void *)ret_val, (void *)-1, "xmlParseBalancedChunkMemoryRecover Failed");\r
+               \r
+        desret_int(ret_val);\r
+               des_xmlDocPtr(n_doc, doc, 0);\r
+        des_xmlSAXHandlerPtr(n_sax, sax, 1);\r
+        des_userdata(n_user_data, user_data, 2);\r
+        des_int(n_depth, depth, 3);\r
+        des_const_xmlChar_ptr(n_string, (const xmlChar *)string, 4);\r
+        des_xmlNodePtr_ptr(n_lst, lst, 5);\r
+        des_int(n_recover, recover, 6);\r
+    //}\r
+    //}\r
+    //}\r
+    //}\r
+    //}\r
+    //}\r
+    //}\r
+#endif\r
+#endif\r
+}\r
+       /**    \r
+       * @test                 UtcXmlSAXParseEntityP01\r
+       * @brief                xmlDocPtr xmlSAXParseEntity(xmlSAXHandlerPtr sax, const char *filename)\r
+       * @desc                 Positive Test for xmlSAXParseEntity()\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlSAXHandlerPtr(NULL), char("UTSXMLHOME"/test.xml")} => {N/A | non-NULL xmlDocPtr} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UtcXmlSAXParseEntityP01(void) {\r
+\r
+#if defined(LIBXML_SAX1_ENABLED)\r
+#ifdef LIBXML_SAX1_ENABLED\r
+\r
+     xmlDocPtr ret_val;\r
+       /**\r
+         * @remarks   input 1: [N/A, N/A] @n\r
+         *            {NULL, "/Home/SUTsXml/test.xml"} => {N/A |non-NULL xmlDocPtr} @n\r
+         */\r
+     ret_val = xmlSAXParseEntity(NULL, TESTXML1);\r
+       DTS_CHECK_NE_MESSAGE("xmlSAXParseEntity", (void *)ret_val, (void *)NULL, "xmlSAXParseEntity Failed");\r
+        \r
+     desret_xmlDocPtr(ret_val);\r
+#endif\r
+#endif\r
+\r
+}\r
+       /**    \r
+       * @test                 UtcXmlParseEntityP01\r
+       * @brief                xmlDocPtr xmlParseEntity(const char *filename)\r
+       * @desc                 Positive Test for xmlParseEntity()\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {char(UTSXMLHOME"/test.xml")} => {N/A | non-NULL xmlDocPtr} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UtcXmlParseEntityP01(void) {\r
+\r
+#if defined(LIBXML_SAX1_ENABLED)\r
+#ifdef LIBXML_SAX1_ENABLED\r
+    xmlDocPtr ret_val;\r
+       /**\r
+        * @remarks   input 1: [N/A, N/A] @n\r
+        *            {"/Home/SUTsXml/test.xml"} => {N/A |non-NULL xmlDocPtr} @n\r
+        */\r
+    ret_val = xmlParseEntity(TESTXML1);\r
+       DTS_CHECK_NE_MESSAGE("xmlParseEntity", (void *)ret_val, (void *)NULL, "xmlParseEntity Failed");\r
+    desret_xmlDocPtr(ret_val);\r
+#endif\r
+#endif\r
+}\r
+       /**    \r
+       * @test                 UtcXmlCreateEntityParserCtxtP01\r
+       * @brief                xmlParserCtxtPtr xmlCreateEntityParserCtxt(const xmlChar *URL, const xmlChar *ID, const xmlChar *base)\r
+       * @desc                 Positive Test for xmlCreateEntityParserCtxt()\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlChar(LIBXML2TESTXML), xmlChar("boo"), xmlChar("doo")} => {N/A | non-NULL xmlParserCtxtPtr} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UtcXmlCreateEntityParserCtxtP01(void) {\r
+\r
+    xmlParserCtxtPtr ret_val;\r
+\r
+       /**\r
+        * @remarks   input 1: [N/A, N/A] @n\r
+        *            {LIBXML2TESTXML, "boo", "doo"} => {N/A |non-NULL xmlParserCtxtPtr} @n\r
+        */\r
+        ret_val = xmlCreateEntityParserCtxt((const xmlChar *)LIBXML2TESTXML, (const xmlChar *)"boo", (const xmlChar *)"doo");\r
+               DTS_CHECK_NE_MESSAGE("xmlCreateEntityParserCtxt", (void *)ret_val, (void *)NULL, "xmlCreateEntityParserCtxt Failed");\r
+        desret_xmlParserCtxtPtr(ret_val);\r
+}\r
+       /**    \r
+       * @test                 UtcXmlCreateURLParserCtxtP01\r
+       * @brief                xmlParserCtxtPtr xmlCreateURLParserCtxt(const char *filename, int options)\r
+       * @desc                 Positive Test for xmlCreateURLParserCtxt()\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {char(LIBXML2TESTXML), int(0, 1, -1, 122)} => {N/A | non-NULL xmlParserCtxtPtr} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UtcXmlCreateURLParserCtxtP01(void) {\r
+\r
+    xmlParserCtxtPtr ret_val;\r
+    const char * filename; /* the filename or URL */\r
+    int n_filename;\r
+    int options; /* a combination of xmlParserOption */\r
+    int n_options;\r
+\r
+    for (n_filename = 0;n_filename < gen_nb_fileoutput;n_filename++) {\r
+    for (n_options = 0;n_options < gen_nb_int;n_options++) {\r
+        filename = gen_fileoutput(n_filename, 0);\r
+        options = gen_int(n_options, 1);\r
+               /**\r
+            * @remarks   input 1: [N/A, N/A] @n\r
+            *            {LIBXML2TESTXML, (0, 1, -1, 122) } => {N/A |non-NULL xmlParserCtxtPtr} @n\r
+            */\r
+        ret_val = xmlCreateURLParserCtxt(LIBXML2TESTXML, options);\r
+               DTS_CHECK_NE_MESSAGE("xmlCreateURLParserCtxt", (void *)ret_val, (void *)NULL, "xmlCreateURLParserCtxt Failed");\r
+        desret_xmlParserCtxtPtr(ret_val);\r
+        call_tests++;\r
+        des_fileoutput(n_filename, filename, 0);\r
+        des_int(n_options, options, 1);\r
+    }\r
+    }\r
+}\r
+       /**    \r
+       * @test                 UtcXmlCreateFileParserCtxtP01\r
+       * @brief                xmlParserCtxtPtr xmlCreateFileParserCtxt(const char *filename)\r
+       * @desc                 Positive Test for xmlCreateFileParserCtxt()\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {char(LIBXML2TESTXML)} => {N/A | non-NULL xmlParserCtxtPtr} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UtcXmlCreateFileParserCtxtP01(void) {\r
+    xmlParserCtxtPtr ret_val;\r
+               /**\r
+            * @remarks   input 1: [N/A, N/A] @n\r
+            *            {LIBXML2TESTXML} => {N/A |non-NULL xmlParserCtxtPtr} @n\r
+            */\r
+        ret_val = xmlCreateFileParserCtxt(LIBXML2TESTXML);\r
+               DTS_CHECK_NE_MESSAGE("xmlCreateFileParserCtxt", (void *)ret_val, (void *)NULL, "xmlCreateFileParserCtxt Failed");\r
+        desret_xmlParserCtxtPtr(ret_val);\r
+}\r
+       /**    \r
+       * @test                 UtcXmlSAXParseFileWithData\r
+       * @brief                xmlDocPtr xmlSAXParseFileWithData(xmlSAXHandlerPtr sax, const char *filename, int recovery, void *data)\r
+       * @desc                 Positive & Negative Test for xmlSAXParseFileWithData()\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Create an instance of xmlSAXHandlerPtr (sax), N/A] @n\r
+       *                       {xmlSAXHandlerPtr(sax), char(LIBXML2TESTXML), int(0, 1, -1, 122), void(call_tests, -1)} => {N/A | non-NULL xmlDocPtr} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UtcXmlSAXParseFileWithData(void) {\r
+\r
+#if defined(LIBXML_SAX1_ENABLED)\r
+#ifdef LIBXML_SAX1_ENABLED\r
+    xmlDocPtr ret_val;\r
+    xmlSAXHandlerPtr sax; /* the SAX handler block */\r
+    int n_sax;\r
+    const char * filename; /* the filename */\r
+    int n_filename;\r
+    int recovery; /* work in recovery mode, i.e. tries to read no Well Formed documents */\r
+    int n_recovery;\r
+    void * data; /* the userdata */\r
+    int n_data;\r
+\r
+    for (n_sax = 0;n_sax < gen_nb_xmlSAXHandlerPtr-1;n_sax++) {\r
+    for (n_filename = 0;n_filename < gen_nb_filepath-2;n_filename++) {\r
+    for (n_recovery = 0;n_recovery < gen_nb_int-1;n_recovery++) {\r
+    for (n_data = 0;n_data < gen_nb_userdata-1;n_data++) {\r
+        sax = gen_xmlSAXHandlerPtr(n_sax, 0);\r
+        filename = gen_filepath(n_filename, 1);\r
+        recovery = gen_int(n_recovery, 2);\r
+        data = gen_userdata(n_data, 3);\r
+               /**\r
+            * @remarks   input 1: [Create an instance of xmlSAXHandlerPtr (sax), N/A] @n\r
+            *            {sax, LIBXML2TESTXML,(0, 1, -1, 122), (call_tests, -1)} => {N/A |non-NULL xmlDocPtr} @n\r
+            */\r
+        ret_val = xmlSAXParseFileWithData(sax, LIBXML2TESTXML, recovery, data);\r
+               DTS_CHECK_NE_MESSAGE("xmlSAXParseFileWithData", (void *)ret_val, (void *)NULL, "xmlSAXParseFileWithData Failed");\r
+        desret_xmlDocPtr(ret_val);\r
+        call_tests++;\r
+        des_xmlSAXHandlerPtr(n_sax, sax, 0);\r
+        des_filepath(n_filename, filename, 1);\r
+        des_int(n_recovery, recovery, 2);\r
+        des_userdata(n_data, data, 3);\r
+    }\r
+    }\r
+    }\r
+    }\r
+#endif\r
+#endif\r
+}\r
+       /**    \r
+       * @test                 UtcXmlSAXParseFileP01\r
+       * @brief                xmlDocPtr xmlSAXParseFile(xmlSAXHandlerPtr sax, const char *filename, int recovery)\r
+       * @desc                 Positive Test for xmlSAXParseFile()\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Create an instance of xmlSAXHandlerPtr (sax), Free xmlSAXHandlerPtr pointer] @n\r
+       *                       {xmlSAXHandlerPtr(sax), char(LIBXML2TESTXML), int(0, 1, -1, 122)} => {N/A | non-NULL xmlDocPtr} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UtcXmlSAXParseFileP01(void) {\r
+\r
+#if defined(LIBXML_SAX1_ENABLED)\r
+#ifdef LIBXML_SAX1_ENABLED\r
+    xmlDocPtr ret_val;\r
+    xmlSAXHandlerPtr sax; /* the SAX handler block */\r
+    int n_sax;\r
+    const char * filename; /* the filename */\r
+    int n_filename;\r
+    int recovery; /* work in recovery mode, i.e. tries to read no Well Formed documents */\r
+    int n_recovery;\r
+\r
+    for (n_sax = 0;n_sax < gen_nb_xmlSAXHandlerPtr;n_sax++) {\r
+    for (n_filename = 0;n_filename < gen_nb_filepath-2;n_filename++) {\r
+    for (n_recovery = 0;n_recovery < gen_nb_int-1;n_recovery++) {\r
+        sax = gen_xmlSAXHandlerPtr(n_sax, 0);\r
+        filename = gen_filepath(n_filename, 1);\r
+        recovery = gen_int(n_recovery, 2);\r
+               /**\r
+            * @remarks   input 1: [Create an instance of xmlSAXHandlerPtr (sax), N/A] @n\r
+            *            {sax, LIBXML2TESTXML,(0, 1, -1, 122) } => {N/A |non-NULL xmlDocPtr} @n\r
+            */\r
+        ret_val = xmlSAXParseFile(sax, LIBXML2TESTXML, recovery);\r
+               DTS_CHECK_NE_MESSAGE("xmlSAXParseFile", (void *)ret_val, (void *)NULL, "xmlSAXParseFile Failed");\r
+        desret_xmlDocPtr(ret_val);\r
+        des_xmlSAXHandlerPtr(n_sax, sax, 0);\r
+        des_filepath(n_filename, filename, 1);\r
+        des_int(n_recovery, recovery, 2);\r
+    }\r
+    }\r
+    }\r
+#endif\r
+#endif\r
+}\r
+       /**    \r
+       * @test                 UtcXmlRecoverDocP01\r
+       * @brief                xmlDocPtr xmlRecoverDoc(xmlChar *cur)\r
+       * @desc                 Positive Test for xmlRecoverDoc()\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Create instance of xmlChar_ptr pointer, Free xmlChar_ptr pointer] @n\r
+       *                       {xmlChar("foo","<foo/>")} => {N/A | non-NULL xmlDocPtr} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UtcXmlRecoverDocP01(void) {\r
+\r
+#if defined(LIBXML_SAX1_ENABLED)\r
+#ifdef LIBXML_SAX1_ENABLED\r
+    xmlDocPtr ret_val;\r
+    xmlChar * cur; /* a pointer to an array of xmlChar */\r
+    int n_cur;\r
+\r
+    for (n_cur = 0;n_cur < gen_nb_xmlChar_ptr-1;n_cur++) {\r
+        cur = gen_const_xmlChar_ptr(n_cur, 1);\r
+               /**\r
+            * @remarks   input 1: [N/A, N/A] @n\r
+            *            {("foo","<foo/>","none", " 2ab ")} => {N/A |non-NULL xmlDocPtr} @n\r
+            */\r
+        ret_val = xmlRecoverDoc(cur);\r
+       DTS_CHECK_NE_MESSAGE("xmlRecoverDoc", (void *)ret_val, (void *)NULL, "xmlRecoverDoc Failed");\r
+               \r
+        desret_xmlDocPtr(ret_val);\r
+        des_xmlChar_ptr(n_cur, cur, 0);\r
+               //xmlFree(cur);\r
+    }\r
+#endif\r
+#endif\r
+\r
+}\r
+       /**    \r
+       * @test                 UtcXmlParseFileP01\r
+       * @brief                xmlDocPtr xmlParseFile(const char *filename)\r
+       * @desc                 Positive Test for xmlParseFile()\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {char(LIBXML2TESTXML)} => {N/A | non-NULL xmlDocPtr} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UtcXmlParseFileP01(void) {\r
+\r
+#if defined(LIBXML_SAX1_ENABLED)\r
+#ifdef LIBXML_SAX1_ENABLED\r
+\r
+    xmlDocPtr ret_val;\r
+       /**\r
+        * @remarks   input 1: [N/A, N/A] @n\r
+        *            {LIBXML2TESTXML} => {N/A |non-NULL xmlDocPtr} @n\r
+        */\r
+    ret_val = xmlParseFile(LIBXML2TESTXML);\r
+       DTS_CHECK_NE_MESSAGE("xmlParseFile", (void *)ret_val, (void *)NULL, "xmlParseFile Failed");\r
+   desret_xmlDocPtr(ret_val);\r
+#endif\r
+#endif\r
+}\r
+       /**    \r
+       * @test                 UtcXmlRecoverFileP01\r
+       * @brief                xmlDocPtr xmlRecoverFile(const char *filename)\r
+       * @desc                 Positive Test for xmlRecoverFile()\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {char(LIBXML2TESTXML)} => {N/A | non-NULL xmlDocPtr} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UtcXmlRecoverFileP01(void) {\r
+\r
+#if defined(LIBXML_SAX1_ENABLED)\r
+#ifdef LIBXML_SAX1_ENABLED\r
+    xmlDocPtr ret_val;\r
+               /**\r
+                * @remarks   input 1: [N/A, N/A] @n\r
+                *            {LIBXML2TESTXML} => {N/A |non-NULL xmlDocPtr} @n\r
+                */\r
+        ret_val = xmlRecoverFile(LIBXML2TESTXML);\r
+       DTS_CHECK_NE_MESSAGE("xmlRecoverFile", (void *)ret_val, (void *)NULL, "xmlRecoverFile Failed");         \r
+        desret_xmlDocPtr(ret_val);\r
+ #endif\r
+#endif\r
+\r
+}\r
+       /**    \r
+       * @test                 UtcXmlSetupParserForBufferP01\r
+       * @brief                void xmlSetupParserForBuffer(xmlParserCtxtPtr ctxt, const xmlChar* buffer, const char* filename)\r
+       * @desc                 Positive Test for xmlSetupParserForBuffer()\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Create an instance of xmlParserCtxtPtr (ctxt), Free xmlParserCtxtPtr pointer] @n\r
+       *                       {xmlParserCtxtPtr(ctxt), xmlChar("foo","<foo/>","none", " 2ab "), char(LIBXML2TESTXML)} => {void} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UtcXmlSetupParserForBufferP01(void)\r
+{ /////////TBD//////////////////\r
+#if defined(LIBXML_SAX1_ENABLED)\r
+#ifdef LIBXML_SAX1_ENABLED\r
+    xmlParserCtxtPtr ctxt; /* an XML parser context */\r
+    int n_ctxt;\r
+    xmlChar * buffer; /* a xmlChar * buffer */\r
+    int n_buffer;\r
+\r
+\r
+    for (n_ctxt = 1;n_ctxt < 2;n_ctxt++) {\r
+    for (n_buffer = 0;n_buffer < gen_nb_const_xmlChar_ptr;n_buffer++) {\r
+        ctxt = xmlNewParserCtxt();\r
+        buffer = gen_const_xmlChar_ptr(n_buffer, 1);\r
+       /**\r
+                * @remarks   input 1: [Create an instance of xmlParserCtxtPtr (ctxt), N/A] @n\r
+                *            {ctxt, ("foo","<foo/>","none", " 2ab "), LIBXML2TESTXML} => {N/A |void} @n\r
+                */\r
+        xmlSetupParserForBuffer(ctxt, (const xmlChar *)buffer, LIBXML2TESTXML);\r
+       DTS_CHECK_NE_MESSAGE("xmlSetupParserForBuffer", (void *)ctxt, (void *)NULL, "xmlSetupParserForBuffer Failed");          \r
+               //des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);\r
+               xmlFreeParserCtxt(ctxt);\r
+        des_const_xmlChar_ptr(n_buffer, (const xmlChar *)buffer, 1);\r
+       //      xmlFree(buffer);\r
+\r
+    }\r
+    }\r
+#endif\r
+#endif\r
+}\r
+       /**    \r
+       * @test                 UtcXmlSAXUserParseFileP01\r
+       * @brief                int xmlSAXUserParseFile(xmlSAXHandlerPtr sax, void *user_data, const char *filename)\r
+       * @desc                 Positive Test for xmlSAXUserParseFile()\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Create an instance of xmlSAXHandlerPtr (sax), Free xmlSAXHandlerPtr pointer] @n\r
+       *                       {xmlSAXHandlerPtr(sax), user_data(call_tests, -1), char(LIBXML2TESTXML)} => {N/A | int(0)} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UtcXmlSAXUserParseFileP01(void) {\r
+\r
+#if defined(LIBXML_SAX1_ENABLED)\r
+#ifdef LIBXML_SAX1_ENABLED\r
+    int ret_val;\r
+    xmlSAXHandlerPtr sax; /* a SAX handler */\r
+    int n_sax;\r
+    void * user_data; /* The user data returned on SAX callbacks */\r
+    int n_user_data;\r
+    const char * filename; /* a file name */\r
+    int n_filename;\r
+\r
+    for (n_sax = 0;n_sax < gen_nb_xmlSAXHandlerPtr-1;n_sax++) {\r
+    for (n_user_data = 0;n_user_data < gen_nb_userdata-1;n_user_data++) {\r
+    for (n_filename = 0;n_filename < gen_nb_filepath-1;n_filename++) {\r
+        sax = gen_xmlSAXHandlerPtr(n_sax, 0);\r
+        user_data = gen_userdata(n_user_data, 1);\r
+        filename = gen_filepath(n_filename, 2);\r
+\r
+#ifdef LIBXML_SAX1_ENABLED\r
+        if (sax == (xmlSAXHandlerPtr)&xmlDefaultSAXHandler) user_data = NULL;\r
+#endif\r
+               /**\r
+                * @remarks   input 1: [Create an instance of xmlSAXHandlerPtr (sax), N/A] @n\r
+                *            {sax, (call_tests, -1),, LIBXML2TESTXML} => {N/A |0} @n\r
+                */\r
+        ret_val = xmlSAXUserParseFile(sax, user_data, LIBXML2TESTXML);\r
+       DTS_CHECK_EQ_MESSAGE("xmlSAXUserParseFile", (void *)ret_val, (void *)0, "xmlSAXUserParseFile Failed");          \r
+               \r
+        desret_int(ret_val);\r
+        call_tests++;\r
+        des_xmlSAXHandlerPtr(n_sax, sax, 0);\r
+        des_userdata(n_user_data, user_data, 1);\r
+        des_filepath(n_filename, filename, 2);\r
+\r
+    }\r
+    }\r
+    }\r
+#endif\r
+#endif\r
+\r
+}\r
+       /**    \r
+       * @test                 UtcXmlCreateMemoryParserCtxtP01\r
+       * @brief                xmlParserCtxtPtr xmlCreateMemoryParserCtxt(const char *buffer, int size)\r
+       * @desc                 Positive Test for xmlCreateMemoryParserCtxt()\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Create an instance of char_ptr, Free char_ptr pointer] @n\r
+       *                       {char("foo", "<foo/>", "test/ent2"), int(0, -1)} => {N/A | NULL} @n\r
+                                       input2: [N/A, N/A] @n\r
+       *                       {char("foo", "<foo/>", "test/ent2"), int(1, 122)} => {N/A | non-NULL xmlParserCtxtPtr} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UtcXmlCreateMemoryParserCtxtP01(void) {\r
+\r
+    xmlParserCtxtPtr ret_val;\r
+    char * buffer; /* a pointer to a char array */\r
+    int n_buffer;\r
+    int size; /* the size of the array */\r
+    int n_size;\r
+\r
+    for (n_buffer = 0;n_buffer < gen_nb_const_char_ptr-1;n_buffer++) {\r
+    for (n_size = 0;n_size < gen_nb_int-1;n_size++) {\r
+\r
+        buffer = gen_const_char_ptr(n_buffer, 0);\r
+        size = gen_int(n_size, 1);\r
+               if (size <=0){\r
+               /**\r
+                * @remarks   input 1: [N/A, N/A] @n\r
+                *            {("foo", "<foo/>", "test/ent2"), (0, -1)} => {N/A | NULL } @n\r
+                */\r
+        ret_val = xmlCreateMemoryParserCtxt((const char *)buffer, size);\r
+       DTS_CHECK_EQ_MESSAGE("xmlCreateMemoryParserCtxt", (void *)ret_val, (void *)0, "xmlCreateMemoryParserCtxt Failed");              \r
+               \r
+               }\r
+               else {\r
+               /**\r
+                * @remarks   input 2: [N/A, N/A] @n\r
+                *            {("foo", "<foo/>", "test/ent2"), (1, 122)} => {N/A |non-NULL xmlParserCtxtPtr} @n\r
+                */\r
+               ret_val = xmlCreateMemoryParserCtxt((const char *)buffer, size);\r
+               DTS_CHECK_NE_MESSAGE("xmlCreateMemoryParserCtxt", (void *)ret_val, (void *)NULL, "xmlCreateMemoryParserCtxt Failed");           \r
+               \r
+               }\r
+               desret_xmlParserCtxtPtr(ret_val);\r
+        des_const_char_ptr(n_buffer, (const char *)buffer, 0);\r
+        des_int(n_size, size, 1);\r
+    }\r
+    }\r
+\r
+}\r
+       /**    \r
+       * @test                 UtcXmlSAXParseMemoryWithDataP01\r
+       * @brief                xmlDocPtr xmlSAXParseMemoryWithData(xmlSAXHandlerPtr sax, const char *buffer, int size, int recovery, void *data)\r
+       * @desc                 Positive Test for xmlSAXParseMemoryWithData()\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Create an instance of xmlSAXHandlerPtr pointer, Free xmlSAXHandlerPtr pointer] @n\r
+       *                       {xmlSAXHandlerPtr(sax), char("foo", "<foo/>", "test/ent2"), int(0, 1, -1, 122), int(0, 1, -1, 122), void(call_tests, -1)} => {N/A | non-NULL xmlDocPtr} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UtcXmlSAXParseMemoryWithDataP01(void) {\r
+\r
+#if defined(LIBXML_SAX1_ENABLED)\r
+#ifdef LIBXML_SAX1_ENABLED\r
+    xmlDocPtr ret_val;\r
+    xmlSAXHandlerPtr sax; /* the SAX handler block */\r
+    int n_sax;\r
+    char * buffer; /* an pointer to a char array */\r
+    int n_buffer;\r
+    int size; /* the size of the array */\r
+    int n_size;\r
+    int recovery; /* work in recovery mode, i.e. tries to read no Well Formed documents */\r
+    int n_recovery;\r
+    void * data; /* the userdata */\r
+    int n_data;\r
+\r
+    for (n_sax = 0;n_sax < gen_nb_xmlSAXHandlerPtr;n_sax++) {\r
+    for (n_buffer = 0;n_buffer < gen_nb_const_char_ptr;n_buffer++) {\r
+    for (n_size = 0;n_size < gen_nb_int;n_size++) {\r
+    for (n_recovery = 0;n_recovery < gen_nb_int;n_recovery++) {\r
+    for (n_data = 0;n_data < gen_nb_userdata;n_data++) {\r
+        sax = gen_xmlSAXHandlerPtr(n_sax, 0);\r
+        buffer = gen_const_char_ptr(n_buffer, 1);\r
+        size = gen_int(n_size, 2);\r
+        recovery = gen_int(n_recovery, 3);\r
+        data = gen_userdata(n_data, 4);\r
+               /**\r
+                * @remarks   input 1: [N/A, N/A] @n\r
+                *            {sax, "<?xml version='1.0'?>\n<html>\n</html>",  strlen("<?xml version='1.0'?>\n<html>\n</html>"), (0, 1, -1, 122), (call_tests, -1)} => {N/A |non-NULL xmlDocPtr} @n\r
+                */\r
+        ret_val = xmlSAXParseMemoryWithData(sax, (const char *)"<?xml version='1.0'?>\n<html>\n</html>", (int)strlen("<?xml version='1.0'?>\n<html>\n</html>"), recovery, data);\r
+       DTS_CHECK_NE_MESSAGE("xmlSAXParseMemoryWithData", (void *)ret_val, (void *)NULL, "xmlSAXParseMemoryWithData Failed");           \r
+               \r
+        desret_xmlDocPtr(ret_val);\r
+        call_tests++;\r
+        des_xmlSAXHandlerPtr(n_sax, sax, 0);\r
+        des_const_char_ptr(n_buffer, (const char *)buffer, 1);\r
+        des_int(n_size, size, 2);\r
+        des_int(n_recovery, recovery, 3);\r
+        des_userdata(n_data, data, 4);\r
+    }\r
+    }\r
+    }\r
+    }\r
+    }\r
+#endif\r
+#endif\r
+}\r
+       /**    \r
+       * @test                 UtcXmlSAXParseMemoryP01\r
+       * @brief                xmlDocPtr xmlSAXParseMemory(xmlSAXHandlerPtr sax, const char *buffer, int size, int recovery)\r
+       * @desc                 Positive Test for xmlSAXParseMemory()\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Create an instance of xmlSAXHandlerPtr pointer, Free xmlSAXHandlerPtr pointer] @n\r
+       *                       {xmlSAXHandlerPtr(sax), char(("<?xml version='1.0'?>\n<html>\n</html>")), int(strlen("<?xml version='1.0'?>\n<html>\n</html>")), int(0, 1, -1, 122)} => {N/A | non-NULL xmlDocPtr} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UtcXmlSAXParseMemoryP01(void) {\r
+\r
+#if defined(LIBXML_SAX1_ENABLED)\r
+#ifdef LIBXML_SAX1_ENABLED\r
+    xmlDocPtr ret_val;\r
+    xmlSAXHandlerPtr sax; /* the SAX handler block */\r
+    int n_sax;\r
+    char * buffer; /* an pointer to a char array */\r
+    int n_buffer;\r
+    int size; /* the size of the array */\r
+    int n_size;\r
+    int recovery; /* work in recovery mode, i.e. tries to read not Well Formed documents */\r
+    int n_recovery;\r
+\r
+    for (n_sax = 0;n_sax < gen_nb_xmlSAXHandlerPtr;n_sax++) {\r
+    for (n_buffer = 0;n_buffer < gen_nb_const_char_ptr;n_buffer++) {\r
+    for (n_size = 0;n_size < gen_nb_int;n_size++) {\r
+    for (n_recovery = 0;n_recovery < gen_nb_int;n_recovery++) {\r
+        sax = gen_xmlSAXHandlerPtr(n_sax, 0);\r
+        buffer = gen_const_char_ptr(n_buffer, 1);\r
+        size = gen_int(n_size, 2);\r
+        recovery = gen_int(n_recovery, 3);\r
+               /**\r
+                * @remarks   input 1: [Create an instance of xmlSAXHandlerPtr (sax) , N/A] @n\r
+                *            {sax, "<?xml version='1.0'?>\n<html>\n</html>",  strlen("<?xml version='1.0'?>\n<html>\n</html>"), (0, 1, -1, 122), (call_tests, -1)} => {N/A |non-NULL xmlDocPtr} @n\r
+                */\r
+        ret_val = xmlSAXParseMemory(sax, (const char *)("<?xml version='1.0'?>\n<html>\n</html>"),(int) strlen("<?xml version='1.0'?>\n<html>\n</html>"), recovery);\r
+       DTS_CHECK_NE_MESSAGE("xmlSAXParseMemory", (void *)ret_val, (void *)NULL, "xmlSAXParseMemory Failed");           \r
+       desret_xmlDocPtr(ret_val);\r
+        des_xmlSAXHandlerPtr(n_sax, sax, 0);\r
+        des_const_char_ptr(n_buffer, (const char *)buffer, 1);\r
+        des_int(n_size, size, 2);\r
+        des_int(n_recovery, recovery, 3);\r
+    }\r
+    }\r
+    }\r
+    }\r
+#endif\r
+#endif\r
+}\r
+       /**    \r
+       * @test                 UtcXmlParseMemoryP01\r
+       * @brief                xmlDocPtr xmlParseMemory(const char *buffer, int size) \r
+       * @desc                 Positive Test for xmlParseMemory()\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Create an instance of char_ptr pointer, Free char_ptr pointer] @n\r
+       *                       {char("foo", "<foo/>", "test/ent2"), int(0, 1, -1)} => {N/A | NULL} @n\r
+                                       input2: [N/A, N/A] @n\r
+       *                       {char("foo", "<foo/>", "test/ent2"), int(0, 1, -1)} => {N/A | non-NULL xmlDocPtr} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UtcXmlParseMemoryP01(void) {\r
+\r
+#if defined(LIBXML_SAX1_ENABLED)\r
+#ifdef LIBXML_SAX1_ENABLED\r
+    xmlDocPtr ret_val;\r
+    char * buffer; /* an pointer to a char array */\r
+    int n_buffer;\r
+    int size; /* the size of the array */\r
+    int n_size;\r
+\r
+    for (n_buffer = 0;n_buffer < gen_nb_const_char_ptr-1;n_buffer++) {\r
+    for (n_size = 0;n_size < gen_nb_int-1;n_size++) {\r
+        buffer = gen_const_char_ptr(n_buffer, 0);\r
+        size = gen_int(n_size, 1);\r
+               if ( size <= 0) {\r
+               /**\r
+                * @remarks   input 1: [N/A , N/A] @n\r
+                *            {("foo", "<foo/>", "test/ent2"), (0, -1)} => {N/A |NULL} @n\r
+                */\r
+                       ret_val = xmlParseMemory((const char *)buffer, size);\r
+                       DTS_CHECK_EQ_MESSAGE("xmlParseMemory", (void *)ret_val, (void *)NULL, "xmlParseMemory Failed");         \r
+                       \r
+               }\r
+               else {\r
+               /**\r
+                * @remarks   input 2: [N/A , N/A] @n\r
+                *            {sax, "<?xml version='1.0'?>\n<html>\n</html>",  strlen("<?xml version='1.0'?>\n<html>\n</html>") } => {N/A |non-NULL xmlDocPtr} @n\r
+                */\r
+        ret_val = xmlParseMemory((const char *)"<?xml version='1.0'?>\n<html>\n</html>", (int)(strlen("<?xml version='1.0'?>\n<html>\n</html>")));\r
+               DTS_CHECK_NE_MESSAGE("xmlParseMemory", (void *)ret_val, (void *)NULL, "xmlParseMemory Failed");\r
+               }\r
+        desret_xmlDocPtr(ret_val);\r
+        des_const_char_ptr(n_buffer, (const char *)buffer, 0);\r
+        des_int(n_size, size, 1);\r
+    }\r
+    }\r
+#endif\r
+#endif\r
+\r
+}\r
+       /**    \r
+       * @test                 UtcXmlRecoverMemoryP01\r
+       * @brief                xmlDocPtr xmlRecoverMemory(const char *buffer, int size)\r
+       * @desc                 Positive Test for xmlRecoverMemory()\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Create an instance of char_ptr, Free char_ptr pointer] @n\r
+       *                       {char("foo", "<foo/>", "test/ent2"), int(0, 1, -1, 122)} => {N/A | non-NULL xmlDocPtr} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UtcXmlRecoverMemoryP01(void) {\r
+\r
+#if defined(LIBXML_SAX1_ENABLED)\r
+#ifdef LIBXML_SAX1_ENABLED\r
+    xmlDocPtr ret_val;\r
+    char * buffer; /* an pointer to a char array */\r
+    int n_buffer;\r
+    int size; /* the size of the array */\r
+    int n_size;\r
+\r
+    for (n_buffer = 0;n_buffer < gen_nb_const_char_ptr-1;n_buffer++) {\r
+    for (n_size = 0;n_size < gen_nb_int;n_size++) {\r
+        buffer = gen_const_char_ptr(n_buffer, 0);\r
+        size = gen_int(n_size, 1);\r
+               /**\r
+                * @remarks   input 1: [N/A , N/A] @n\r
+                *            {("foo", "<foo/>", "test/ent2"), strlen(buffer)} => {N/A |non-NULL xmlDocPtr} @n\r
+                */\r
+        ret_val = xmlRecoverMemory((const char *)buffer, (int)(strlen(buffer)));\r
+       DTS_CHECK_NE_MESSAGE("xmlRecoverMemory", (void *)ret_val, (void *)NULL, "xmlRecoverMemory Failed");\r
+        desret_xmlDocPtr(ret_val);\r
+        des_const_char_ptr(n_buffer, (const char *)buffer, 0);\r
+        des_int(n_size, size, 1);\r
+    }\r
+    }\r
+#endif\r
+#endif\r
+\r
+}\r
+       /**    \r
+       * @test                 UtcXmlSAXUserParseMemoryP01\r
+       * @brief                int xmlSAXUserParseMemory(xmlSAXHandlerPtr sax, void *user_data, const char *buffer, int size)\r
+       * @desc                 Positive Test for xmlSAXUserParseMemory()\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Create an instance of xmlSAXHandlerPtr (sax), Free xmlSAXHandlerPtr pointer] @n\r
+       *                       {xmlSAXHandlerPtr(sax), void(user_data), char("<?xml version='1.0'?>\n<html>\n</html>"), int(strlen("<?xml version='1.0'?>\n<html>\n</html>"))} => {N/A | int(0)} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UtcXmlSAXUserParseMemoryP01(void) {\r
+\r
+#if defined(LIBXML_SAX1_ENABLED)\r
+#ifdef LIBXML_SAX1_ENABLED\r
+    int ret_val;\r
+    xmlSAXHandlerPtr sax; /* a SAX handler */\r
+    int n_sax =0;\r
+    void * user_data; /* The user data returned on SAX callbacks */\r
+    int n_user_data = 0;\r
+    char * buffer; /* an in-memory XML document input */\r
+    int n_buffer = 0;\r
+    int size; /* the length of the XML document in bytes */\r
+    int n_size = 0;\r
+\r
+    //for (n_sax = 0;n_sax < gen_nb_xmlSAXHandlerPtr-1;n_sax++) {\r
+    //for (n_user_data = 0;n_user_data < gen_nb_userdata-1;n_user_data++) {\r
+    //for (n_buffer = 0;n_buffer < gen_nb_const_char_ptr-1;n_buffer++) {\r
+    //for (n_size = 0;n_size < gen_nb_int-1;n_size++) {\r
+        sax = gen_xmlSAXHandlerPtr(n_sax, 0);\r
+        user_data = gen_userdata(n_user_data, 1);\r
+        buffer = gen_const_char_ptr(n_buffer, 2);\r
+        size = gen_int(n_size, 3);\r
+\r
+#ifdef LIBXML_SAX1_ENABLED\r
+        if (sax == (xmlSAXHandlerPtr)&xmlDefaultSAXHandler) user_data = NULL;\r
+#endif\r
+               /**\r
+                * @remarks   input 1: [Create an instance of xmlSAXHandlerPtr (sax), N/A] @n\r
+                *            {(sax, user_data, "<?xml version='1.0'?>\n<html>\n</html>", strlen("<?xml version='1.0'?>\n<html>\n</html>"} => {N/A |0} @n\r
+                */\r
+        ret_val = xmlSAXUserParseMemory(sax, user_data, (const char *)"<?xml version='1.0'?>\n<html>\n</html>", (int)strlen("<?xml version='1.0'?>\n<html>\n</html>"));\r
+               DTS_CHECK_EQ_MESSAGE("xmlSAXUserParseMemory", (void *)ret_val, (void *)0, "xmlSAXUserParseMemory Failed");\r
+\r
+        desret_int(ret_val);\r
+        des_xmlSAXHandlerPtr(n_sax, sax, 0);\r
+               //xmlFree(sax);\r
+        des_userdata(n_user_data, user_data, 1);\r
+//             xmlFree(user_data);\r
+        des_const_char_ptr(n_buffer, (const char *)buffer, 2);\r
+               //xmlFree(buffer);\r
+        des_int(n_size, size, 3);\r
+\r
+    //}\r
+    //}\r
+    //}\r
+    //}\r
+#endif\r
+#endif\r
+\r
+}\r
+       /**    \r
+       * @test                 UtcXmlCreateDocParserCtxtP01\r
+       * @brief                xmlParserCtxtPtr xmlCreateDocParserCtxt(const xmlChar *cur)\r
+       * @desc                 Positive Test for xmlCreateDocParserCtxt()\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Create an instance of char pointer, Free char pointer] @n\r
+       *                       {xmlChar()} => {N/A | N/A} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UtcXmlCreateDocParserCtxtP01(void) {\r
+    xmlParserCtxtPtr ret_val;\r
+    xmlChar * cur; /* a pointer to an array of xmlChar */\r
+    int n_cur;\r
+\r
+    for (n_cur = 0;n_cur < gen_nb_const_xmlChar_ptr-1;n_cur++) {\r
+        cur = gen_const_xmlChar_ptr(n_cur, 0);\r
+               /**\r
+                * @remarks   input 1: [N/A, N/A] @n\r
+                *            {("foo", "<foo/>", "test/ent2")} => {N/A |non-NULL xmlParserCtxtPtr} @n\r
+                */\r
+        ret_val = xmlCreateDocParserCtxt((const xmlChar *)cur);\r
+       DTS_CHECK_NE_MESSAGE("xmlCreateDocParserCtxt", (void *)ret_val, (void *)NULL, "xmlCreateDocParserCtxt Failed");\r
+               \r
+        desret_xmlParserCtxtPtr(ret_val);\r
+        des_const_xmlChar_ptr(n_cur, (const xmlChar *)cur, 0);\r
+    }\r
+}\r
+       /**    \r
+       * @test                 UtcXmlSAXParseDocP01\r
+       * @brief                xmlDocPtr xmlSAXParseDoc(xmlSAXHandlerPtr sax, xmlChar *cur, int recovery)\r
+       * @desc                 Positive Test for xmlSAXParseDoc()\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Create an instance of xmlSAXHandlerPtr (sax), Free xmlSAXHandlerPtr pointer] @n\r
+       *                       {xmlSAXHandlerPtr(NULL), xmlChar("foo", "<foo/>", "test/ent2"), int(0, 1, -1, 122)} => {N/A | non-NULL xmlDocPtr} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UtcXmlSAXParseDocP01(void) {\r
+\r
+#if defined(LIBXML_SAX1_ENABLED)\r
+#ifdef LIBXML_SAX1_ENABLED\r
+    xmlDocPtr ret_val;\r
+    xmlSAXHandlerPtr sax; /* the SAX handler block */\r
+    int n_sax;\r
+    xmlChar * cur; /* a pointer to an array of xmlChar */\r
+    int n_cur;\r
+    int recovery; /* work in recovery mode, i.e. tries to read no Well Formed documents */\r
+    int n_recovery;\r
+\r
+    for (n_sax = 0;n_sax < gen_nb_xmlSAXHandlerPtr-1;n_sax++) {\r
+    for (n_cur = 0;n_cur < gen_nb_const_xmlChar_ptr-2;n_cur++) {\r
+    for (n_recovery = 1;n_recovery < gen_nb_int-1;n_recovery++) {\r
+        sax = gen_xmlSAXHandlerPtr(n_sax, 0);\r
+        cur = gen_const_xmlChar_ptr(n_cur, 1);\r
+        recovery = gen_int(n_recovery, 2);\r
+               /**\r
+                * @remarks   input 1: [Create an instance of xmlSAXHandlerPtr (sax), N/A] @n\r
+                *            {NULL, ("foo", "<foo/>", "test/ent2"), (0, 1, -1, 122)} => {N/A |non-NULL xmlDocPtr} @n\r
+                */\r
+        ret_val = xmlSAXParseDoc(NULL, (xmlChar *)cur, recovery);\r
+       DTS_CHECK_NE_MESSAGE("xmlSAXParseDoc", (void *)ret_val, (void *)NULL, "xmlSAXParseDoc Failed");\r
+               \r
+        desret_xmlDocPtr(ret_val);\r
+        des_xmlSAXHandlerPtr(n_sax, sax, 0);\r
+        des_const_xmlChar_ptr(n_cur, (const xmlChar *)cur, 1);\r
+        des_int(n_recovery, recovery, 2);\r
+    }\r
+    }\r
+       }\r
+#endif\r
+#endif\r
+\r
+}\r
+       /**    \r
+       * @test                 UtcXmlParseDocP01\r
+       * @brief                xmlDocPtr xmlParseDoc(xmlChar *cur)\r
+       * @desc                 Positive Test for xmlParseDoc()\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlChar("foo", "<foo/>", "none")} => {N/A | non-NULL xmlDocPtr} @n\r
+                                       input2: [N/A, N/A] @n\r
+       *                       {xmlChar("foo", "<foo/>", "none")} => {N/A | NULL} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UtcXmlParseDocP01(void) {\r
+\r
+#if defined(LIBXML_SAX1_ENABLED)\r
+#ifdef LIBXML_SAX1_ENABLED\r
+    xmlDocPtr ret_val;\r
+    xmlChar * cur; /* a pointer to an array of xmlChar */\r
+    int n_cur;\r
+\r
+    for (n_cur = 0;n_cur < gen_nb_const_xmlChar_ptr-2;n_cur++) {\r
+        cur = gen_const_xmlChar_ptr(n_cur, 0);\r
+               if(n_cur == 1) {\r
+               /**\r
+                * @remarks   input 1: [ N/A, N/A] @n\r
+                *            { "<foo/>" } => {N/A |non-NULL xmlDocPtr} @n\r
+                */\r
+               ret_val = xmlParseDoc((xmlChar *)cur);\r
+               DTS_CHECK_NE_MESSAGE("xmlParseDoc", (void *)ret_val, (void *)NULL, "xmlParseDoc Failed");\r
+               }\r
+               else {\r
+               /**\r
+                * @remarks   input 2: [ N/A, N/A] @n\r
+                *            { ("foo", "none", " 2ab ") } => {N/A | NULL} @n\r
+                */\r
+               ret_val = xmlParseDoc((xmlChar *)cur);\r
+               DTS_CHECK_EQ_MESSAGE("xmlParseDoc", (void *)ret_val, (void *)NULL, "xmlParseDoc Failed");\r
+               }\r
+        desret_xmlDocPtr(ret_val);\r
+        call_tests++;\r
+        des_const_xmlChar_ptr(n_cur, (const xmlChar *)cur, 0);\r
+\r
+    }\r
+#endif\r
+#endif\r
+\r
+}\r
+       /**    \r
+       * @test                 UtcXmlInitParserP01\r
+       * @brief                void xmlInitParser(void)\r
+       * @desc                 Positive Test for xmlInitParser()\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {void} => {void} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UtcXmlInitParserP01(void) {\r
+\r
+               /**\r
+                * @remarks   input 1: [ N/A, N/A] @n\r
+                *            { void } => {N/A | void} @n\r
+                */\r
+        xmlInitParser();\r
+        DTS_CHECK_EQ_MESSAGE("UtcXmlInitParserP01", (void *)1, (void *)1, "UtcXmlInitParserP01 Failed");\r
+}\r
+       /**    \r
+       * @test                 UtcXmlCtxtResetP01\r
+       * @brief                void xmlCtxtReset(xmlParserCtxtPtr ctxt)\r
+       * @desc                 Positive Test for xmlCtxtReset()\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Create an instance of xmlParserCtxtPtr (ctxt), Free xmlParserCtxtPtr pointer] @n\r
+       *                       {xmlParserCtxtPtr(ctxt)} => {void} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UtcXmlCtxtResetP01(void) {//////TBD///////////////////////\r
+\r
+    xmlParserCtxtPtr ctxt; /* an XML parser context */\r
+    int n_ctxt;\r
+\r
+    for (n_ctxt = 0;n_ctxt < 2;n_ctxt++) {\r
+        ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);\r
+               /**\r
+                * @remarks   input 1: [Create an instance of xmlParserCtxtPtr (ctxt), N/A] @n\r
+                *            { ctxt } => {N/A | void} @n\r
+                */\r
+        xmlCtxtReset(ctxt);\r
+               DTS_CHECK_EQ_MESSAGE("xmlCtxtReset", (void *)ctxt->input, (void *)NULL, "xmlCtxtReset Failed");\r
+               DTS_CHECK_EQ_MESSAGE("xmlCtxtReset", (void *)ctxt->inputNr, (void *)0, "xmlCtxtReset Failed");\r
+               DTS_CHECK_EQ_MESSAGE("xmlCtxtReset", (void *)ctxt->spaceNr, (void *)0, "xmlCtxtReset Failed");\r
+               DTS_CHECK_EQ_MESSAGE("xmlCtxtReset", (void *)ctxt->spaceTab[0], (void *)-1, "xmlCtxtReset Failed");\r
+        des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);\r
+\r
+    }\r
+\r
+}\r
+       /**    \r
+       * @test                 UtcXmlCtxtResetPushP01\r
+       * @brief                int xmlCtxtResetPush(xmlParserCtxtPtr ctxt, const char *chunk, int size, const char *filename, const char *encoding)\r
+       * @desc                 Positive Test for xmlCtxtResetPush()\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Create an instance of xmlParserCtxtPtr (ctxt), Free xmlParserCtxtPtr pointer] @n\r
+       *                       {xmlParserCtxtPtr(ctxt), char("foo", "<foo/>", "test/ent2", int(0, 1, -1, 122), char("missing.xml", "<foo/>", "test/ent2"), char("foo", "<foo/>", "test/ent2")} => {N/A | int(0)} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UtcXmlCtxtResetPushP01(void) {\r
+\r
+    int ret_val;\r
+    xmlParserCtxtPtr ctxt; /* an XML parser context */\r
+    int n_ctxt = 0;\r
+    char * chunk; /* a pointer to an array of chars */\r
+    int n_chunk = 0;\r
+    int size; /* number of chars in the array */\r
+    int n_size = 0;\r
+    const char * filename; /* an optional file name or URI */\r
+    int n_filename = 0;\r
+    char * encoding; /* the document encoding, or NULL */\r
+    int n_encoding = 0;\r
+\r
+    //for (n_ctxt = 0;n_ctxt < 2;n_ctxt++) {\r
+   // for (n_chunk = 0;n_chunk < gen_nb_const_char_ptr;n_chunk++) {\r
+    //for (n_size = 0;n_size < gen_nb_int;n_size++) {\r
+    //for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {\r
+    //for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {\r
+        ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);\r
+        chunk = gen_const_char_ptr(n_chunk, 1);\r
+        size = gen_int(n_size, 2);\r
+        filename = gen_filepath(n_filename, 3);\r
+        encoding = gen_const_char_ptr(n_encoding, 4);\r
+               /**\r
+                * @remarks   input 1: [ Create an instance of xmlParserCtxtPtr (ctxt), N/A] @n\r
+                *            { ctxt, ("foo", "<foo/>", "test/ent2"), (0, 1, -1, 122), ("missing.xml", "<foo/>", "test/ent2") , ("foo", "<foo/>", "test/ent2") } => {N/A | 0} @n\r
+                */\r
+        ret_val = xmlCtxtResetPush(ctxt, (const char *)chunk, size, filename, (const char *)encoding);\r
+               DTS_CHECK_NE_MESSAGE("xmlCtxtResetPush", (void *)ret_val, (void *)1, "xmlCtxtReset Failed");\r
+               DTS_CHECK_EQ_MESSAGE("xmlCtxtResetPush", (void *)ret_val, (void *)0, "xmlCtxtReset Failed");\r
+        desret_int(ret_val);\r
+        des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);\r
+        des_const_char_ptr(n_chunk, (const char *)chunk, 1);\r
+               //xmlFree(chunk);\r
+        des_int(n_size, size, 2);\r
+        des_filepath(n_filename, filename, 3);\r
+       //      xmlFree(filename);\r
+        des_const_char_ptr(n_encoding, (const char *)encoding, 4);\r
+               //xmlFree(encoding);\r
+\r
+    //}\r
+    //}\r
+    //}\r
+    //}\r
+    //}\r
+}\r
+\r
+       /**    \r
+       * @test                 UtcXmlCtxtUseOptionsP01\r
+       * @brief                int xmlCtxtUseOptions(xmlParserCtxtPtr ctxt, int options)\r
+       * @desc                 Positive Test for xmlCtxtUseOptions()\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Create an instance of xmlParserCtxtPtr (ctxt), Free xmlParserCtxtPtr pointer] @n\r
+       *                       {xmlParserCtxtPtr(ctxt), int(XML_PARSE_NOBLANKS | XML_PARSE_RECOVER )} => {N/A | int(0)} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UtcXmlCtxtUseOptionsP01(void) {\r
+    int ret_val;\r
+    xmlParserCtxtPtr ctxt; /* an XML parser context */\r
+    int n_ctxt;\r
+    int options; /* a combination of xmlParserOption */\r
+    int n_options;\r
+\r
+    for (n_ctxt = 1;n_ctxt < 2;n_ctxt++) {\r
+    for (n_options = 0;n_options < gen_nb_parseroptions-1;n_options++) {\r
+        ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);\r
+        options = XML_PARSE_NOBLANKS | XML_PARSE_RECOVER ;\r
+               /**\r
+                * @remarks   input 1: [ Create an instance of xmlParserCtxtPtr (ctxt), N/A] @n\r
+                *            { ctxt, XML_PARSE_NOBLANKS | XML_PARSE_RECOVER } => {N/A | 0} @n\r
+                */\r
+        ret_val = xmlCtxtUseOptions(ctxt, options);\r
+               DTS_CHECK_EQ_MESSAGE("xmlCtxtUseOptions", (void *)ret_val, (void *)0, "xmlCtxtReset Failed");           \r
+        desret_int(ret_val);\r
+        call_tests++;\r
+        des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);\r
+        des_parseroptions(n_options, options, 1);\r
+\r
+    }\r
+    }\r
+}\r
+       /**    \r
+       * @test                 UtcXmlReadDocP01\r
+       * @brief                xmlDocPtr xmlReadDoc(const xmlChar * cur, const char *URL, const char *encoding, int options)\r
+       * @desc                 Positive Test for xmlReadDoc()\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlChar("foo","<foo/>","none", " 2ab "), char(LIBXML2TESTXML), char("foo", "<foo/>", "test/ent2"), int(XML_PARSE_NOBLANKS | XML_PARSE_RECOVER)} => {N/A | non-NULL xmlDocPtr} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UtcXmlReadDocP01(void) {\r
+    xmlDocPtr ret_val;\r
+    xmlChar * cur; /* a pointer to a zero terminated string */\r
+    int n_cur = 0;\r
+    const char * URL; /* the base URL to use for the document */\r
+    int n_URL = 0;\r
+    char * encoding; /* the document encoding, or NULL */\r
+    int n_encoding = 0;\r
+    int options; /* a combination of xmlParserOption */\r
+    int n_options = 0;\r
+\r
+    //for (n_cur = 0;n_cur < gen_nb_const_xmlChar_ptr-1;n_cur++) {\r
+    //for (n_URL = 0;n_URL < gen_nb_filepath;n_URL++) {\r
+    //for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {\r
+    //for (n_options = 0;n_options < gen_nb_parseroptions;n_options++) {\r
+        cur = gen_const_xmlChar_ptr(n_cur, 0);\r
+        URL = gen_filepath(n_URL, 1);\r
+        encoding = gen_const_char_ptr(n_encoding, 2);\r
+        options = XML_PARSE_NOBLANKS | XML_PARSE_RECOVER ;\r
+               /**\r
+                * @remarks   input 1: [ N/A, N/A] @n\r
+                *            { ("foo","<foo/>","none", " 2ab "), LIBXML2TESTXML,("foo", "<foo/>", "test/ent2"),  XML_PARSE_NOBLANKS | XML_PARSE_RECOVER } => {N/A | non-NULL xmlDocPtr} @n\r
+                */\r
+        ret_val = xmlReadDoc((const xmlChar *)cur, LIBXML2TESTXML, (const char *)encoding, options);\r
+       DTS_CHECK_NE_MESSAGE("xmlReadDoc", (void *)ret_val, (void *)NULL, "xmlCtxtReset Failed");\r
+        desret_xmlDocPtr(ret_val);\r
+        call_tests++;\r
+        des_const_xmlChar_ptr(n_cur, (const xmlChar *)cur, 0);\r
+               //xmlFree(cur);\r
+        des_filepath(n_URL, URL, 1);\r
+       //      xmlFree(URL);\r
+        des_const_char_ptr(n_encoding, (const char *)encoding, 2);\r
+               //xmlFree(encoding);\r
+        des_parseroptions(n_options, options, 3);\r
+\r
+    //}\r
+    //}\r
+    //}\r
+    //}\r
+}\r
+       /**    \r
+       * @test                 UtcXmlReadFileP01\r
+       * @brief                xmlDocPtr xmlReadFile(const char *filename, const char *encoding, int options)\r
+       * @desc                 Positive Test for xmlReadFile()\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {char(LIBXML2TESTXML), char("foo", "<foo/>", "test/ent2"), int(XML_PARSE_NOBLANKS | XML_PARSE_RECOVER)} => {N/A | non-NULL xmlDocPtr} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UtcXmlReadFileP01(void) {\r
+\r
+    xmlDocPtr ret_val;\r
+    const char * filename; /* a file or URL */\r
+    int n_filename = 0;\r
+    char * encoding; /* the document encoding, or NULL */\r
+    int n_encoding = 0;\r
+    int options; /* a combination of xmlParserOption */\r
+    int n_options = 0;\r
+\r
+    //for (n_filename = 0;n_filename < gen_nb_filepath-1;n_filename++) {\r
+    //for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr-1;n_encoding++) {\r
+    //for (n_options = 0;n_options < gen_nb_parseroptions-1;n_options++) {\r
+        filename = gen_filepath(n_filename, 0);\r
+        encoding = gen_const_char_ptr(n_encoding, 1);\r
+        options = gen_parseroptions(n_options, 2);\r
+               /**\r
+                * @remarks   input 1: [ N/A, N/A] @n\r
+                *            { LIBXML2TESTXML,("foo", "<foo/>", "test/ent2"),  (XML_PARSE_NOBLANKS | XML_PARSE_RECOVER) } => {N/A | non-NULL xmlDocPtr} @n\r
+                */\r
+        ret_val = xmlReadFile(LIBXML2TESTXML, (const char *)encoding, options);\r
+       DTS_CHECK_NE_MESSAGE("xmlReadFile", (void *)ret_val, (void *)NULL, "xmlReadFile Failed");\r
+        desret_xmlDocPtr(ret_val);\r
+        des_filepath(n_filename, filename, 0);\r
+        des_const_char_ptr(n_encoding, (const char *)encoding, 1);\r
+        des_parseroptions(n_options, options, 2);\r
+    //}\r
+    //}\r
+    //}\r
+\r
+}\r
+       /**    \r
+       * @test                 UtcXmlReadMemoryP01\r
+       * @brief                xmlDocPtr xmlReadMemory(const char *buffer, int size, const char *URL, const char *encoding, int options)\r
+       * @desc                 Positive Test for xmlReadMemory()\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {char("foo", "<foo/>", "test/ent2"), int(buffer), char(LIBXML2TESTXML), char("foo", "<foo/>", "test/ent2"), int(XML_PARSE_RECOVER)} => {N/A | non-NULL xmlDocPtr} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UtcXmlReadMemoryP01(void) {\r
+    xmlDocPtr ret_val;\r
+    char * buffer; /* a pointer to a char array */\r
+    int n_buffer = 0;\r
+    int size = 0; /* the size of the array */\r
+    int n_size = 0;\r
+    const char * URL; /* the base URL to use for the document */\r
+    int n_URL = 0;\r
+    char * encoding; /* the document encoding, or NULL */\r
+    int n_encoding = 0;\r
+    int options; /* a combination of xmlParserOption */\r
+    int n_options = 0;\r
+\r
+    //for (n_buffer = 0;n_buffer < gen_nb_const_char_ptr-1;n_buffer++) {\r
+    //for (n_size = 0;n_size < gen_nb_int-1;n_size++) {\r
+    //for (n_URL = 0;n_URL < gen_nb_filepath-1;n_URL++) {\r
+    //for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr-1;n_encoding++) {\r
+    //for (n_options = 0;n_options < gen_nb_parseroptions-1;n_options++) {\r
+        buffer = gen_const_char_ptr(n_buffer, 0);\r
+        size = gen_int(n_size, 1);\r
+        URL = gen_filepath(n_URL, 2);\r
+        encoding = gen_const_char_ptr(n_encoding, 3);\r
+        options = gen_parseroptions(n_options, 4);\r
+               /**\r
+                * @remarks   input 1: [ N/A, N/A] @n\r
+                *            { ("foo", "<foo/>", "test/ent2"), strlen(buffer), LIBXML2TESTXML,("foo", "<foo/>", "test/ent2"),    XML_PARSE_RECOVER } => {N/A | non-NULL xmlDocPtr} @n\r
+                */\r
+        ret_val = xmlReadMemory((const char *)buffer, (int)(strlen(buffer)), LIBXML2TESTXML, (const char *)encoding, XML_PARSE_RECOVER);\r
+               DTS_CHECK_NE_MESSAGE("xmlReadMemory", (void *)ret_val, (void *)NULL, "xmlReadMemory Failed");\r
+        desret_xmlDocPtr(ret_val);\r
+        des_const_char_ptr(n_buffer, (const char *)buffer, 0);\r
+        des_int(n_size, size, 1);\r
+        des_filepath(n_URL, URL, 2);\r
+        des_const_char_ptr(n_encoding, (const char *)encoding, 3);\r
+        des_parseroptions(n_options, options, 4);\r
+    //}\r
+    //}\r
+    //}\r
+    //}\r
+    //}\r
+}\r
+       /**    \r
+       * @test                 UtcXmlCtxtReadDocP01\r
+       * @brief                xmlDocPtr xmlCtxtReadDoc(xmlParserCtxtPtr ctxt, const xmlChar * cur, const char *URL, const char *encoding, int options)\r
+       * @desc                 Positive Test for xmlCtxtReadDoc()\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Create an instance of xmlParserCtxtPtr (ctxt), Free xmlParserCtxtPtr pointer] @n\r
+       *                       {xmlParserCtxtPtr(ctxt), xmlChar("foo", "<foo/>", "test/ent2"), char(LIBXML2TESTXML), char("foo", "<foo/>", "test/ent2"), int(XML_PARSE_NOBLANKS | XML_PARSE_RECOVER)} => {N/A | non-NULL xmlDocPtr} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UtcXmlCtxtReadDocP01(void) {\r
+\r
+    xmlDocPtr ret_val;\r
+    xmlParserCtxtPtr ctxt; /* an XML parser context */\r
+    int n_ctxt = 0;\r
+    xmlChar * cur; /* a pointer to a zero terminated string */\r
+    int n_cur = 0;\r
+    const char * URL; /* the base URL to use for the document */\r
+    int n_URL = 0;\r
+    char * encoding; /* the document encoding, or NULL */\r
+    int n_encoding = 0;\r
+    int options; /* a combination of xmlParserOption */\r
+    int n_options = 0;\r
+\r
+    //for (n_ctxt = 1;n_ctxt < 2;n_ctxt++) {\r
+    //for (n_cur = 0;n_cur < gen_nb_const_xmlChar_ptr-1;n_cur++) {\r
+    //for (n_URL = 0;n_URL < gen_nb_filepath-1;n_URL++) {\r
+    //for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr-1;n_encoding++) {\r
+    //for (n_options = 0;n_options < gen_nb_parseroptions-1;n_options++) {\r
+        ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);\r
+        cur = gen_const_xmlChar_ptr(n_cur, 1);\r
+        URL = gen_filepath(n_URL, 2);\r
+        encoding = gen_const_char_ptr(n_encoding, 3);\r
+         options = XML_PARSE_NOBLANKS | XML_PARSE_RECOVER ;\r
+               /**\r
+                * @remarks   input 1: [Create an instance of xmlParserCtxtPtr (ctxt), N/A] @n\r
+                *            { ctxt, ("foo", "<foo/>", "test/ent2"), LIBXML2TESTXML,("foo", "<foo/>", "test/ent2"),    XML_PARSE_NOBLANKS | XML_PARSE_RECOVER } => {N/A | non-NULL xmlDocPtr} @n\r
+                */\r
+        ret_val = xmlCtxtReadDoc(ctxt, (const xmlChar *)cur, LIBXML2TESTXML, (const char *)encoding, options);\r
+       DTS_CHECK_NE_MESSAGE("xmlCtxtReadDoc", (void *)ret_val, (void *)NULL, "xmlCtxtReadDoc Failed");\r
+               \r
+        desret_xmlDocPtr(ret_val);\r
+        des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);\r
+        des_const_xmlChar_ptr(n_cur, (const xmlChar *)cur, 1);\r
+        des_filepath(n_URL, URL, 2);\r
+        des_const_char_ptr(n_encoding, (const char *)encoding, 3);\r
+        des_parseroptions(n_options, options, 4);\r
+    //}\r
+    //}\r
+    //}\r
+    //}\r
+    //}\r
+\r
+}\r
+       /**    \r
+       * @test                 UtcXmlCtxtReadFileP01\r
+       * @brief                xmlDocPtr xmlCtxtReadFile(xmlParserCtxtPtr ctxt, const char *filename, const char *encoding, int options)\r
+       * @desc                 Positive Test for xmlCtxtReadFile()\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Create an instance of xmlParserCtxtPtr (ctxt), Free xmlParserCtxtPtr pointer] @n\r
+       *                       {xmlParserCtxtPtr(ctxt), char(LIBXML2TESTXML), char("foo", "<foo/>", "test/ent2"), int(XML_PARSE_NOBLANKS | XML_PARSE_RECOVER)} => {N/A | non-NULL xmlDocPtr} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UtcXmlCtxtReadFileP01(void) {\r
+    xmlDocPtr ret_val;\r
+    xmlParserCtxtPtr ctxt; /* an XML parser context */\r
+    int n_ctxt = 0;\r
+    const char * filename; /* a file or URL */\r
+    int n_filename = 0;\r
+    char * encoding; /* the document encoding, or NULL */\r
+    int n_encoding = 0;\r
+    int options; /* a combination of xmlParserOption */\r
+    int n_options = 0;\r
+\r
+    //for (n_ctxt = 1;n_ctxt < 2;n_ctxt++) {\r
+    //for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {\r
+    //for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {\r
+    //for (n_options = 0;n_options < gen_nb_parseroptions;n_options++) {\r
+        ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);\r
+        filename = gen_filepath(n_filename, 1);\r
+        encoding = gen_const_char_ptr(n_encoding, 2);\r
+        options = gen_parseroptions(n_options, 3);\r
+               /**\r
+                * @remarks   input 1: [Create an instance of xmlParserCtxtPtr (ctxt), N/A] @n\r
+                *            { ctxt,  LIBXML2TESTXML,("foo", "<foo/>", "test/ent2"), XML_PARSE_NOBLANKS | XML_PARSE_RECOVER } => {N/A | non-NULL xmlDocPtr} @n\r
+                */\r
+        ret_val = xmlCtxtReadFile(ctxt, LIBXML2TESTXML, (const char *)encoding, options);\r
+       DTS_CHECK_NE_MESSAGE("xmlCtxtReadFile", (void *)ret_val, (void *)NULL, "xmlCtxtReadFile Failed");\r
+        desret_xmlDocPtr(ret_val);\r
+        des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);\r
+        des_filepath(n_filename, filename, 1);\r
+        des_const_char_ptr(n_encoding, (const char *)encoding, 2);\r
+        des_parseroptions(n_options, options, 3);\r
+    //}\r
+    //}\r
+    //}\r
+    //}\r
+\r
+}\r
+       /**    \r
+       * @test                 UtcXmlCtxtReadMemoryP01\r
+       * @brief                xmlDocPtr xmlCtxtReadMemory(xmlParserCtxtPtr ctxt, const char *buffer, int size, const char *URL, const char *encoding, int options)\r
+       * @desc                 Positive Test for xmlCtxtReadMemory()\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Create an instance of xmlParserCtxtPtr (ctxt), Free xmlParserCtxtPtr pointer] @n\r
+       *                       {xmlParserCtxtPtr(ctxt), char("foo", "<foo/>", "test/ent2"), int(0, 1, -1, 122), char(LIBXML2TESTXML), char("foo", "<foo/>", "test/ent2"), int(XML_PARSE_NOBLANKS | XML_PARSE_RECOVER)} => {N/A | non-NULL xmlDocPtr} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UtcXmlCtxtReadMemoryP01(void) {\r
+\r
+    xmlDocPtr ret_val;\r
+    xmlParserCtxtPtr ctxt; /* an XML parser context */\r
+    int n_ctxt = 0;\r
+    char * buffer; /* a pointer to a char array */\r
+    int n_buffer = 0;\r
+    int size; /* the size of the array */\r
+    int n_size = 0;\r
+    const char * URL; /* the base URL to use for the document */\r
+    int n_URL = 0;\r
+    char * encoding; /* the document encoding, or NULL */\r
+    int n_encoding = 0;\r
+    int options; /* a combination of xmlParserOption */\r
+    int n_options = 0;\r
+\r
+    //for (n_ctxt = 1;n_ctxt < 2;n_ctxt++) {\r
+    //for (n_buffer = 0;n_buffer < gen_nb_const_char_ptr-1;n_buffer++) {\r
+    //for (n_size = 0;n_size < gen_nb_int-1;n_size++) {\r
+    //for (n_URL = 0;n_URL < gen_nb_filepath-1;n_URL++) {\r
+    //for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr-1;n_encoding++) {\r
+    //for (n_options = 0;n_options < gen_nb_parseroptions-1;n_options++) {\r
+        ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);\r
+        buffer = gen_const_char_ptr(n_buffer, 1);\r
+        size = gen_int(n_size, 2);\r
+        URL = gen_filepath(n_URL, 3);\r
+        encoding = gen_const_char_ptr(n_encoding, 4);\r
+        options = XML_PARSE_NOBLANKS | XML_PARSE_RECOVER;\r
+               /**\r
+                * @remarks   input 1: [ Create an instance of xmlParserCtxtPtr (ctxt), N/A] @n\r
+                *            { ctxt,  ("foo", "<foo/>", "test/ent2"),(0, 1, -1, 122), ("foo", "<foo/>", "test/ent2"), XML_PARSE_NOBLANKS | XML_PARSE_RECOVER } => {N/A | non-NULL xmlDocPtr} @n\r
+                */\r
+        ret_val = xmlCtxtReadMemory(ctxt, (const char *)buffer, (int)(strlen(buffer)), LIBXML2TESTXML, (const char *)encoding, options);\r
+       DTS_CHECK_NE_MESSAGE("xmlCtxtReadMemory", (void *)ret_val, (void *)NULL, "xmlCtxtReadMemory Failed");\r
+        desret_xmlDocPtr(ret_val);\r
+        des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);\r
+        des_const_char_ptr(n_buffer, (const char *)buffer, 1);\r
+        des_int(n_size, size, 2);\r
+        des_filepath(n_URL, URL, 3);\r
+        des_const_char_ptr(n_encoding, (const char *)encoding, 4);\r
+        des_parseroptions(n_options, options, 5);\r
+\r
+    //}\r
+    //}\r
+    //}\r
+    //}\r
+    //}\r
+    //}\r
+}\r
+\r
+       /**    \r
+       * @test                 UTcParserP01\r
+       * @brief                void xmlParseExternalSubset(xmlParserCtxtPtr ctxt, const xmlChar *ExternalID, const xmlChar *SystemID)\r
+       * @desc                 Positive Test for xmlParseExternalSubset()\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Create xmlSAXHandlerPtr with SAX2 related callbacks, Free xmlSAXHandlerPtr pointer] @n\r
+       *                       {xmlParserCtxtPtr(pParse), xmlChar("test"), xmlChar("test")} => {void} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcParserP01(void)\r
+{\r
+       xmlInputReadCallback    inread;\r
+       xmlInputCloseCallback   inclose;\r
+       char                                    xmlIn[] =\r
+      "<test:Plan xmlns:test='http://test.org/schema'>"\r
+      "<test:Case name='test1' emptyAttribute='' test:ns_id='auio'>"\r
+      "</test:Case>"\r
+      "</test:Plan>";\r
+\r
+       //LIBXML_TEST_VERSION\r
+       /*\r
+       * Create xmlSAXHandlerPtr with SAX2 related callbacks\r
+       */\r
+       xmlSAXHandler saxHandler; // See http://xmlsoft.org/html/libxml-tree.html#xmlSAXHandler\r
+       memset( &saxHandler, 0, sizeof(saxHandler) );\r
+       saxHandler.initialized = XML_SAX2_MAGIC;  // so we do this to force parsing as SAX2.\r
+       saxHandler.startElementNs = &ParseFSMstartElementNs;\r
+       saxHandler.endElementNs = &ParseFSMendElementNs;\r
+       saxHandler.warning = &ParseFSMwarning;\r
+       saxHandler.error = &ParseFSMerror;\r
+\r
+\r
+       xmlSAXHandlerPtr saxHandlerPtr = &saxHandler;\r
+       int resultVal = xmlSAXUserParseMemory( saxHandlerPtr, NULL,xmlIn, strlen(xmlIn));\r
+       DTS_CHECK_EQ_MESSAGE("xmlSAXUserParseMemory", (void *)resultVal, (void *)0, "xmlSAXUserParseMemory Failed");\r
+       \r
+       inread = readFunction;\r
+       inclose = closeFunction;\r
+       xmlParserCtxtPtr pParse = xmlCreateIOParserCtxt(saxHandlerPtr, NULL, inread, inclose, NULL, XML_CHAR_ENCODING_UTF8);\r
+       DTS_CHECK_NE_MESSAGE("xmlCreateIOParserCtxt", (void *)pParse, (void *)NULL, "xmlCreateIOParserCtxt Failed");\r
+\r
+       xmlParseExternalSubset(pParse, (const xmlChar*)"test", (const xmlChar*)"test");\r
+#if 0\r
+       xmlFree(saxHandlerPtr);\r
+       if(pParse != NULL)\r
+       {\r
+               if (NULL != pParse->myDoc)\r
+               {\r
+                       xmlFreeDoc(pParse->myDoc);\r
+               }\r
+               xmlFreeParserCtxt(pParse);\r
+       }\r
+       #endif\r
+}\r
+\r
+\r
+static void startup( void);\r
+static void cleanup( void);\r
+\r
+void (*tet_startup)( void) = startup;\r
+void (*tet_cleanup)( void) = cleanup;\r
+\r
+static void startup( void)\r
+{\r
+        /* start of TC */\r
+        tet_printf("TC starts.");\r
+}\r
+\r
+static void cleanup( void)\r
+{\r
+        /* end of TC */\r
+        tet_printf("TC ends.");\r
+}\r
+\r
+struct tet_testlist tet_testlist[] = {\r
+       // Handling of out of context errors\r
+       {UTcXmlCheckLanguageIDP01,1},\r
+       {UTcInputPushP01,2},\r
+       {UTcInputPopP01,3},\r
+       {UTcNodePushP01,4},\r
+       {UTcNodePopP01,5},\r
+       {UTcNamePushP01,6},\r
+       {UTcNamePopP01,7},\r
+       {UtcXmlPopInputP01,8},\r
+       {UtcXmlPushInputP01,9},\r
+       {UtcXmlStringLenDecodeEntitiesP01,10},\r
+       \r
+       {UtcXmlStringDecodeEntitiesP01,11},\r
+       {UtcXmlSplitQNameP01,12},\r
+       {UtcXmlParseDocumentP01,13},\r
+       {UtcXmlParseExtParsedEntP01,14},\r
+       {UtcXmlParseChunkP01,15},\r
+       {UtcXmlStopParserP01,16},\r
+       {UtcXmlCreatePushParserCtxtP01,17},\r
+       {UtcXmlParseBalancedChunkMemoryP01,18},\r
+       {UtcXmlParseBalancedChunkMemoryRecoverP01,19},\r
+       {UtcXmlSAXParseEntityP01,20},\r
+       \r
+       {UtcXmlParseEntityP01,21},\r
+       {UtcXmlCreateEntityParserCtxtP01,22},\r
+       {UtcXmlCreateURLParserCtxtP01,23},\r
+       {UtcXmlCreateFileParserCtxtP01,24},\r
+       {UtcXmlSAXParseFileWithData,25},\r
+       {UtcXmlSAXParseFileP01,26},\r
+       {UtcXmlRecoverDocP01,27},\r
+       {UtcXmlParseFileP01,28},\r
+       {UtcXmlSetupParserForBufferP01,29},\r
+       {UtcXmlSAXUserParseFileP01,30},\r
+       \r
+       {UtcXmlCreateMemoryParserCtxtP01,31},\r
+       {UtcXmlSAXParseMemoryWithDataP01,32},\r
+       {UtcXmlSAXParseMemoryP01,33},\r
+       {UtcXmlParseMemoryP01,34},\r
+       {UtcXmlRecoverMemoryP01,35},\r
+       {UTcParserP01,36},\r
+       {UtcXmlSAXUserParseMemoryP01,37},\r
+       {UtcXmlCreateDocParserCtxtP01,38},\r
+       {UtcXmlSAXParseDocP01,39},      \r
+       {UtcXmlParseDocP01,40},\r
+       \r
+       {UtcXmlInitParserP01,41},\r
+       {UtcXmlCtxtResetP01,42},\r
+       {UtcXmlCtxtResetPushP01,43},\r
+       {UtcXmlCtxtUseOptionsP01,44},\r
+       {UtcXmlReadDocP01,45},\r
+       {UtcXmlReadFileP01,46},\r
+       {UtcXmlReadMemoryP01,47},\r
+       {UtcXmlCtxtReadDocP01,48},\r
+       {UtcXmlCtxtReadFileP01,49},\r
+       {UtcXmlCtxtReadMemoryP01,50},\r
+       \r
+       {UtcXmlRecoverFileP01,51},\r
+       {UtcXmlParseCtxtExternalEntityP01,52},\r
+       \r
+       //{UtcXmlParseExternalEntityP01, 53},\r
+\r
+       { NULL, 0 },\r
+       \r
+};\r
diff --git a/TC/testcase/utc_libxml_XmlPattern.c b/TC/testcase/utc_libxml_XmlPattern.c
new file mode 100755 (executable)
index 0000000..e1caff5
--- /dev/null
@@ -0,0 +1,174 @@
+/*\r
+*  libxml test suite\r
+*\r
+* Copyright (c) 2012 Samsung Electronics Co., Ltd. All rights reserved.\r
+*\r
+* Contact: {Maintainer Name} <{Maintainer Email}>\r
+* \r
+* Licensed under the Apache License, Version 2.0 (the "License");\r
+* you may not use this file except in compliance with the License.\r
+* You may obtain a copy of the License at\r
+*\r
+* http://www.apache.org/licenses/LICENSE-2.0\r
+*\r
+* Unless required by applicable law or agreed to in writing, software\r
+* distributed under the License is distributed on an "AS IS" BASIS,\r
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+* See the License for the specific language governing permissions and\r
+* limitations under the License.\r
+*\r
+*/ \r
+#include "utc_libxml_include.h"\r
+#include <libxml/pattern.h>\r
+\r
+\r
+\r
+static xmlDocPtr api_doc = NULL;\r
+static xmlDtdPtr api_dtd = NULL;\r
+static xmlNodePtr api_root = NULL;\r
+static xmlAttrPtr api_attr = NULL;\r
+static xmlNsPtr api_ns = NULL;\r
+\r
+static xmlDocPtr\r
+get_api_doc(void) {\r
+    if (api_doc == NULL) {\r
+        api_doc = xmlReadMemory("<!DOCTYPE root [<!ELEMENT root EMPTY>]><root xmlns:h='http://example.com/' h:foo='bar'/>", 88, "root_test", NULL, 0);\r
+      api_root = NULL;\r
+      api_attr = NULL;\r
+    }\r
+    return(api_doc);\r
+}\r
+\r
+static xmlNodePtr\r
+get_api_root(void) {\r
+    if ((api_root == NULL) || (api_root->type != XML_ELEMENT_NODE)) {\r
+        get_api_doc();\r
+      if ((api_doc != NULL) && (api_doc->children != NULL) &&\r
+          (api_doc->children->next != NULL) &&\r
+          (api_doc->children->next->type == XML_ELEMENT_NODE))\r
+          api_root = api_doc->children->next;\r
+    }\r
+    return(api_root);\r
+}\r
+\r
+static void\r
+free_api_doc(void) {\r
+    xmlFreeDoc(api_doc);\r
+    api_doc = NULL;\r
+    api_dtd = NULL;\r
+    api_root = NULL;\r
+    api_attr = NULL;\r
+    api_ns = NULL;\r
+}\r
+\r
+#define gen_nb_xmlPatternPtr 1\r
+static xmlPatternPtr gen_xmlPatternPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+ //   return(NULL);\r
+    return (xmlPatterncompile((const xmlChar*)"1.0", NULL, 0, NULL));\r
+}\r
+\r
+static void des_xmlPatternPtr(int no ATTRIBUTE_UNUSED, xmlPatternPtr val , int nr ATTRIBUTE_UNUSED) {\r
+       if (val)\r
+               xmlFreePattern(val);\r
+}\r
+\r
+#define gen_nb_xmlNodePtr 2\r
+static xmlNodePtr gen_xmlNodePtr(int no, int nr ATTRIBUTE_UNUSED) {\r
+    if (no == 0) return(xmlNewPI(BAD_CAST "test", NULL));\r
+    if (no == 1) return(get_api_root());\r
+    return(NULL);\r
+/*     if (no == 2) return((xmlNodePtr) get_api_doc()); */\r
+}\r
+static void des_xmlNodePtr(int no, xmlNodePtr val, int nr ATTRIBUTE_UNUSED) {\r
+    if (no == 1) {\r
+        free_api_doc();\r
+    } else if (val != NULL) {\r
+        xmlUnlinkNode(val);\r
+        xmlFreeNode(val);\r
+    }\r
+}\r
+\r
+static void desret_int(int val ATTRIBUTE_UNUSED) {\r
+}\r
+\r
+static void UTcxmlFreePatternP01()\r
+{\r
+       xmlPatternPtr comp; /* the precompiled pattern */\r
+    int n_comp;\r
+       for (n_comp = 0;n_comp < gen_nb_xmlPatternPtr;n_comp++) {\r
+               comp = gen_xmlPatternPtr(n_comp, 0);\r
+               xmlFreePattern(comp);\r
+               DTS_CHECK_EQ_MESSAGE("xmlFreePattern", (void *)comp, (void *)NULL, "xmlFreePattern Failed");\r
+               }\r
+}\r
+\r
+static void UTcxmlFreePatternListP01()\r
+{\r
+       xmlPatternPtr comp; /* the precompiled pattern */\r
+    int n_comp;\r
+       for (n_comp = 0;n_comp < gen_nb_xmlPatternPtr;n_comp++) {\r
+               comp = gen_xmlPatternPtr(n_comp, 0);\r
+               xmlFreePatternList(comp);\r
+               DTS_CHECK_EQ_MESSAGE("xmlFreePatternList", (void *)comp, (void *)NULL, "xmlFreePatternList Failed");\r
+               }\r
+\r
+}\r
+\r
+static void UTcxmlPatterncompileP01()\r
+{\r
+       xmlPatternPtr comp;\r
+       comp = xmlPatterncompile((const xmlChar*)"1.0", NULL, 0, NULL);\r
+       DTS_CHECK_EQ_MESSAGE("xmlPatterncompile", (void *)comp, (void *)NULL, "xmlPatterncompile Failed");\r
+}\r
+\r
+static void UTcxmlPatternMatchP01()\r
+{\r
+       int ret_val;\r
+    xmlPatternPtr comp; /* the precompiled pattern */\r
+    int n_comp;\r
+    xmlNodePtr node; /* a node */\r
+    int n_node;\r
+\r
+    for (n_comp = 0;n_comp < gen_nb_xmlPatternPtr;n_comp++) {\r
+    for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {\r
+        comp = gen_xmlPatternPtr(n_comp, 0);\r
+        node = gen_xmlNodePtr(n_node, 1);\r
+\r
+        ret_val = xmlPatternMatch(comp, node);\r
+       DTS_CHECK_EQ_MESSAGE("xmlPatternMatch", (void *)ret_val, (void *)-1, "xmlPatternMatch Failed");\r
+        desret_int(ret_val);\r
+        des_xmlPatternPtr(n_comp, comp, 0);\r
+        des_xmlNodePtr(n_node, node, 1);\r
+        xmlResetLastError();\r
+               }\r
+       }\r
+}\r
+\r
+static void startup( void);\r
+static void cleanup( void);\r
+\r
+void (*tet_startup)( void) = startup;\r
+void (*tet_cleanup)( void) = cleanup;\r
+\r
+static void startup( void)\r
+{\r
+        /* start of TC */\r
+        tet_printf("TC starts.");\r
+}\r
+\r
+static void cleanup( void)\r
+{\r
+        /* end of TC */\r
+        tet_printf("TC ends.");\r
+}\r
+\r
+struct tet_testlist tet_testlist[] = {\r
+       // Handling of out of context errors\r
+       {UTcxmlFreePatternP01,1},\r
+       {UTcxmlFreePatternListP01,2},\r
+       {UTcxmlPatterncompileP01,3},\r
+       {UTcxmlPatternMatchP01,4},\r
+       { NULL, 0 },\r
+       \r
+};\r
+\r
diff --git a/TC/testcase/utc_libxml_XmlReader.c b/TC/testcase/utc_libxml_XmlReader.c
new file mode 100755 (executable)
index 0000000..a0be378
--- /dev/null
@@ -0,0 +1,2470 @@
+/*\r
+*  libxml test suite\r
+*\r
+* Copyright (c) 2012 Samsung Electronics Co., Ltd. All rights reserved.\r
+*\r
+* Contact: {Maintainer Name} <{Maintainer Email}>\r
+* \r
+* Licensed under the Apache License, Version 2.0 (the "License");\r
+* you may not use this file except in compliance with the License.\r
+* You may obtain a copy of the License at\r
+*\r
+* http://www.apache.org/licenses/LICENSE-2.0\r
+*\r
+* Unless required by applicable law or agreed to in writing, software\r
+* distributed under the License is distributed on an "AS IS" BASIS,\r
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+* See the License for the specific language governing permissions and\r
+* limitations under the License.\r
+*\r
+*/ \r
+\r
+#include "utc_libxml_include.h"\r
+#include <libxml/xmlwriter.h>\r
+#include <libxml/xmlreader.h>\r
+\r
+\r
+\r
+\r
+/***************************************************************************\r
+* SUTsXmlReader\r
+***************************************************************************/\r
+#define MY_ENCODING "ISO-8859-1"\r
+\r
+#define        OUTFILE1        "/Home/writer1.res"\r
+#define        OUTFILE2        "/Home/missing.xml"\r
+#define        OUTFILE3        "/Home/test.out"\r
+\r
+#define gen_nb_xmlTextReaderLocatorPtr 1\r
+static xmlDocPtr api_doc = NULL;\r
+static xmlDtdPtr api_dtd = NULL;\r
+static xmlNodePtr api_root = NULL;\r
+static xmlAttrPtr api_attr = NULL;\r
+static xmlNsPtr api_ns = NULL;\r
+\r
+static void\r
+free_api_doc(void) {\r
+    xmlFreeDoc(api_doc);\r
+    api_doc = NULL;\r
+    api_dtd = NULL;\r
+    api_root = NULL;\r
+    api_attr = NULL;\r
+    api_ns = NULL;\r
+}\r
+\r
+static xmlDocPtr\r
+get_api_doc(void) {\r
+    if (api_doc == NULL) {\r
+        api_doc = xmlReadMemory("<!DOCTYPE root [<!ELEMENT root EMPTY>]><root xmlns:h='http://example.com/' h:foo='bar'/>", 88, "root_test", NULL, 0);\r
+       api_root = NULL;\r
+       api_attr = NULL;\r
+    }\r
+    return(api_doc);\r
+}\r
+\r
+static xmlNodePtr\r
+get_api_root(void) {\r
+    if ((api_root == NULL) || (api_root->type != XML_ELEMENT_NODE)) {\r
+        get_api_doc();\r
+       if ((api_doc != NULL) && (api_doc->children != NULL) &&\r
+           (api_doc->children->next != NULL) &&\r
+           (api_doc->children->next->type == XML_ELEMENT_NODE))\r
+           api_root = api_doc->children->next;\r
+    }\r
+    return(api_root);\r
+}\r
+//#if 0\r
+static xmlNodePtr\r
+get_api_root_1(void) {\r
+    if ((api_root == NULL) || (api_root->type != XML_ELEMENT_NODE)) {\r
+        get_api_doc();\r
+       if ((api_doc != NULL) && (api_doc->children != NULL) &&\r
+           (api_doc->children->next != NULL) &&\r
+           (api_doc->children->next->type == XML_ELEMENT_NODE))\r
+           api_root = api_doc->children->next;\r
+    }\r
+    api_root->type = XML_NAMESPACE_DECL;\r
+    return(api_root);\r
+}\r
+//#endif\r
+\r
+#define gen_nb_xmlOutputBufferPtr 1\r
+static xmlOutputBufferPtr gen_xmlOutputBufferPtr(int no, int nr ATTRIBUTE_UNUSED) {\r
+    if (no == 0) return(xmlOutputBufferCreateFilename(OUTFILE3, NULL, 0));\r
+    return(NULL);\r
+}\r
+static void des_xmlOutputBufferPtr(int no ATTRIBUTE_UNUSED, xmlOutputBufferPtr val, int nr ATTRIBUTE_UNUSED) {\r
+    if (val != NULL) {\r
+        xmlOutputBufferClose(val);\r
+    }\r
+}\r
+\r
+#define gen_nb_fileoutput 1\r
+\r
+static void des_fileoutput(int no ATTRIBUTE_UNUSED, const char *val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+}\r
+\r
+#define gen_nb_int 1\r
+\r
+static int gen_int(int no, int nr ATTRIBUTE_UNUSED) {\r
+    if (no == 0) return(0);\r
+    if (no == 1) return(1);\r
+    if (no == 2) return(-1);\r
+    if (no == 3) return(122);\r
+    return(-1);\r
+}\r
+\r
+static int gen_int_ReaderForMemory(int no, int nr ATTRIBUTE_UNUSED) {\r
+    if (no == 0) return(5);\r
+    if (no == 1) return(1);\r
+    if (no == 2) return(-1);\r
+    if (no == 3) return(122);\r
+    return(-1);\r
+}\r
+\r
+static void des_int(int no ATTRIBUTE_UNUSED, int val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+}\r
+\r
+#define gen_nb_xmlBufferPtr 1\r
+static const char *static_buf_content = "a static buffer";\r
+static xmlBufferPtr gen_xmlBufferPtr(int no, int nr ATTRIBUTE_UNUSED) {\r
+    if (no == 0) return(xmlBufferCreate());\r
+    if (no == 1) return(xmlBufferCreateStatic((void *)static_buf_content, 13));\r
+    return(NULL);\r
+}\r
+static void des_xmlBufferPtr(int no ATTRIBUTE_UNUSED, xmlBufferPtr val, int nr ATTRIBUTE_UNUSED) {\r
+    if (val != NULL) {\r
+        xmlBufferFree(val);\r
+    }\r
+}\r
+\r
+#define gen_nb_xmlParserCtxtPtr 1\r
+static xmlParserCtxtPtr gen_xmlParserCtxtPtr(int no, int nr ATTRIBUTE_UNUSED) {\r
+    if (no == 0) return(xmlNewParserCtxt());\r
+    //if (no == 1) return(xmlCreateMemoryParserCtxt("<doc/>", 6));\r
+    return(NULL);\r
+}\r
+static void des_xmlParserCtxtPtr(int no ATTRIBUTE_UNUSED, xmlParserCtxtPtr val, int nr ATTRIBUTE_UNUSED) {\r
+    if (val != NULL)\r
+        xmlFreeParserCtxt(val);\r
+}\r
+\r
+#define gen_nb_const_char_ptr 2\r
+\r
+static char *gen_const_char_ptr(int no, int nr ATTRIBUTE_UNUSED) {\r
+    if (no == 0) return((char *) "foo");\r
+    if (no == 1) return((char *) "<foo/>");\r
+    if (no == 2) return((char *) ENT2);\r
+    return(NULL);\r
+}\r
+static void des_const_char_ptr(int no ATTRIBUTE_UNUSED, const char *val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+}\r
+\r
+static void desret_xmlParserCtxtPtr(xmlParserCtxtPtr val) {\r
+    xmlFreeParserCtxt(val);\r
+}\r
+\r
+#define gen_nb_xmlNodePtr 2\r
+static xmlNodePtr gen_xmlNodePtr(int no, int nr ATTRIBUTE_UNUSED) {\r
+    if (no == 0) return(xmlNewPI(BAD_CAST UTSXMLHOME"/valid", NULL));\r
+    if (no == 1) return(get_api_root());\r
+    return(NULL);\r
+}\r
+\r
+static void des_xmlNodePtr(int no, xmlNodePtr val, int nr ATTRIBUTE_UNUSED) {\r
+    if (no == 1) {\r
+        free_api_doc();\r
+    } else if (val != NULL) {\r
+        xmlUnlinkNode(val);\r
+        xmlFreeNode(val);\r
+    }\r
+}\r
+\r
+#define gen_nb_xmlDocPtr 1\r
+static xmlDocPtr gen_xmlDocPtr(int no, int nr ATTRIBUTE_UNUSED) {\r
+    if (no == 0) return(xmlNewDoc(BAD_CAST "1.0"));\r
+    if (no == 1) return(xmlReadMemory("<foo/>", 6, "test", NULL, 0));\r
+    if (no == 2) return(xmlReadMemory("<!DOCTYPE foo []> <foo/>", 24, "test", NULL, 0));\r
+    return(NULL);\r
+}\r
+static void des_xmlDocPtr(int no ATTRIBUTE_UNUSED, xmlDocPtr val, int nr ATTRIBUTE_UNUSED) {\r
+    if ((val != NULL) && (val != api_doc) && (val->doc != api_doc))\r
+        xmlFreeDoc(val);\r
+}\r
+#define gen_nb_xmlTextWriterPtr 1\r
+static xmlTextWriterPtr gen_xmlTextWriterPtr(int no, int nr ATTRIBUTE_UNUSED) {\r
+    if (no == 0) return(xmlNewTextWriterFilename(OUTFILE3, 0));\r
+    return(NULL);\r
+}\r
+static void des_xmlTextWriterPtr(int no ATTRIBUTE_UNUSED, xmlTextWriterPtr val, int nr ATTRIBUTE_UNUSED) {\r
+    if (val != NULL) xmlFreeTextWriter(val);\r
+}\r
+\r
+static void desret_int(int val ATTRIBUTE_UNUSED) {\r
+}\r
+\r
+#define gen_nb_const_xmlChar_ptr_ptr 1\r
+static xmlChar ** gen_const_xmlChar_ptr_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+    return(NULL);\r
+}\r
+static void des_const_xmlChar_ptr_ptr(int no ATTRIBUTE_UNUSED, const xmlChar ** val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+}\r
+\r
+#define gen_nb_const_xmlChar_ptr 1\r
+\r
+static xmlChar *gen_const_xmlChar_ptr(int no, int nr ATTRIBUTE_UNUSED) {\r
+    if (no == 0) return((xmlChar *) "foo");\r
+    if (no == 1) return((xmlChar *) "<foo/>");\r
+    if (no == 2) return((xmlChar *) "n?e");\r
+    if (no == 3) return((xmlChar *) " 2ab ");\r
+    return(NULL);\r
+}\r
+static void des_const_xmlChar_ptr(int no ATTRIBUTE_UNUSED, const xmlChar *val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+}\r
+\r
+/***************************************************************************/\r
+/***************************************************************************/\r
+#define gen_nb_filepath 8\r
+#define gen_nb_parseroptions 5\r
+#define gen_nb_xmlTextReaderPtr 4\r
+/**************************************************************************/\r
+/**************************************************************************/\r
+static const char *gen_filepath(int no, int nr ATTRIBUTE_UNUSED) {\r
+    if (no == 0) return(MISSINGXML);\r
+    if (no == 1) return("<foo/>");\r
+    if (no == 2) return(ENT2);\r
+    if (no == 3) return(RECxml19980210);\r
+    if (no == 4) return(XHTML1STRICTDTD);\r
+    if (no == 5) return(REMOTE1GOOD);\r
+    if (no == 6) return(REMOTE1BAD);\r
+    return(NULL);\r
+}\r
+\r
+static void des_filepath(int no ATTRIBUTE_UNUSED, const char *val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+}\r
+static void desret_xmlTextReaderPtr(xmlTextReaderPtr val) {\r
+    xmlFreeTextReader(val);\r
+}\r
+\r
+\r
+static int gen_parseroptions(int no, int nr ATTRIBUTE_UNUSED) {\r
+    if (no == 0) return(XML_PARSE_NOBLANKS | XML_PARSE_RECOVER);\r
+    if (no == 1) return(XML_PARSE_NOENT | XML_PARSE_DTDLOAD | XML_PARSE_DTDATTR | XML_PARSE_DTDVALID | XML_PARSE_NOCDATA);\r
+    if (no == 2) return(XML_PARSE_XINCLUDE | XML_PARSE_NSCLEAN);\r
+    if (no == 3) return(XML_PARSE_XINCLUDE | XML_PARSE_NODICT);\r
+    return(XML_PARSE_SAX1);\r
+}\r
+\r
+static void des_parseroptions(int no ATTRIBUTE_UNUSED, int val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+}\r
+\r
+\r
+static xmlTextReaderPtr gen_xmlTextReaderPtr(int no, int nr ATTRIBUTE_UNUSED) {\r
+    if (no == 0) return(xmlNewTextReaderFilename(ENT2));\r
+    if (no == 1) return(xmlNewTextReaderFilename(RECxml19980210));\r
+    if (no == 2) return(xmlNewTextReaderFilename(XHTML1STRICTDTD));\r
+    return(NULL);\r
+}\r
+\r
+static xmlTextReaderPtr gen_xmlTextReaderPtr_TextReaderBase(int no, int nr ATTRIBUTE_UNUSED) {\r
+    if (no == 0) return(xmlNewTextReaderFilename(ENT2));\r
+    if (no == 1) return(xmlNewTextReaderFilename(RECxml19980210));\r
+    if(no == 2)\r
+    {\r
+       xmlTextReaderPtr txtredptr;\r
+\r
+       txtredptr = xmlNewTextReaderFilename(RECxml19980210);\r
+       xmlTextReaderRead(txtredptr);\r
+       return(txtredptr);\r
+     }\r
+    return(NULL);\r
+}\r
+\r
+static xmlTextReaderPtr gen_xmlTextReaderPtr_1(int no, int nr ATTRIBUTE_UNUSED) {\r
+    if (no == 0) return(xmlNewTextReaderFilename(ENT2));\r
+    if (no == 1) return(xmlNewTextReaderFilename(RECxml19980210));\r
+    if(no == 2)\r
+    {\r
+       xmlTextReaderPtr txtredptr;\r
+       xmlNodePtr xmlnodeptr;\r
+       txtredptr = xmlNewTextReaderFilename(TESTXML);\r
+       xmlnodeptr = get_api_root_1();\r
+       return(txtredptr);\r
+     }\r
+    return(NULL);\r
+}\r
+static void des_xmlTextReaderPtr(int no ATTRIBUTE_UNUSED, xmlTextReaderPtr val, int nr ATTRIBUTE_UNUSED) {\r
+    if (val != NULL) xmlFreeTextReader(val);\r
+}\r
+\r
+static void desret_xmlChar_ptr(xmlChar *val) {\r
+    if (val != NULL)\r
+      xmlFree(val);\r
+}\r
+\r
+static void desret_const_xmlChar_ptr(const xmlChar *val ATTRIBUTE_UNUSED) {\r
+}\r
+\r
+static void desret_xmlDocPtr(xmlDocPtr val) {\r
+    if (val != api_doc)\r
+      xmlFreeDoc(val);\r
+}\r
+/***************************************************************************/\r
+/***************************************************************************/\r
+\r
+       /**    \r
+       * @test                 UTcXmlNewTextReaderFilenameP01\r
+       * @brief                xmlTextReaderPtr xmlNewTextReaderFilename(const char *URI)\r
+       * @desc                 Positive Test for xmlNewTextReaderFilename\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {const char*(URI)} => {N/A | xmlTextReaderPtr(!=NULL)} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcXmlNewTextReaderFilenameP01()\r
+{\r
+       xmlTextReaderPtr ret_val;\r
+       const char * URI; /* the URI of the resource to process */\r
+       int n_URI;\r
+\r
+       for (n_URI = 0;n_URI < gen_nb_filepath;n_URI++) {\r
+               URI = gen_filepath(n_URI, 0);\r
+\r
+               ret_val = xmlNewTextReaderFilename(URI);\r
+               if(ret_val == NULL && URI == NULL)\r
+               {\r
+                       //Negative test\r
+                       DTS_CHECK_EQ_MESSAGE("xmlNewTextReaderFilename", (void *)ret_val, (void *)NULL, "xmlNewTextReaderFilename Failed");\r
+\r
+               }\r
+               if(ret_val != NULL && URI != NULL)\r
+               {\r
+                       //Positive test\r
+                       DTS_CHECK_NE_MESSAGE("xmlNewTextReaderFilename", (void *)ret_val, (void *)NULL, "xmlNewTextReaderFilename Failed");\r
+               }\r
+               desret_xmlTextReaderPtr(ret_val);\r
+               des_filepath(n_URI, URI, 0);\r
+               xmlResetLastError();\r
+       }\r
+}\r
+\r
+       /**\r
+       * @test                 UTcXmlReaderForDocP01\r
+       * @brief                xmlTextReaderPtr xmlReaderForDoc(const xmlChar * cur, const char *URL,\r
+       *                   const char *encoding, int options)\r
+       * @desc                 Positive Test for xmlReaderForDoc\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {const xmlChar* (cur), const char *(URL),const char*(encoding), int(options)} => {N/A | xmlTextReaderPtr(!=NULL)} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcXmlReaderForDocP01()\r
+{\r
+       xmlTextReaderPtr ret_val;\r
+       xmlChar * cur; /* a pointer to a zero terminated string */\r
+       int n_cur;\r
+       const char * URL; /* the base URL to use for the document */\r
+       int n_URL;\r
+       char * encoding; /* the document encoding, or NULL */\r
+       int n_encoding;\r
+       int options; /* a combination of xmlParserOption */\r
+       int n_options;\r
+\r
+       for (n_cur = 0;n_cur < gen_nb_const_xmlChar_ptr;n_cur++) {\r
+       for (n_URL = 0;n_URL < gen_nb_filepath;n_URL++) {\r
+       for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {\r
+       for (n_options = 0;n_options < gen_nb_parseroptions;n_options++) {\r
+               cur = gen_const_xmlChar_ptr(n_cur, 0);\r
+               URL = gen_filepath(n_URL, 1);\r
+               encoding = gen_const_char_ptr(n_encoding, 2);\r
+               options = gen_parseroptions(n_options, 3);\r
+\r
+               /* @remarks             input1: [N/A, N/A] @n\r
+               *                       {const xmlChar* (cur), const char *(URL),const char*(encoding), int(options)} => {N/A | xmlTextReaderPtr(!=NULL)} @n\r
+               */\r
+               ret_val = xmlReaderForDoc((const xmlChar *)cur, URL, (const char *)encoding, options);\r
+\r
+               if(ret_val != NULL && cur != NULL)\r
+               {\r
+                       //Positive test\r
+                       DTS_CHECK_NE_MESSAGE("xmlReaderForDoc", (void *)ret_val, (void *)NULL, "xmlReaderForDoc Failed");\r
+\r
+                       if(cur != NULL)\r
+                       {\r
+                               cur = NULL;\r
+                               ret_val = xmlReaderForDoc((const xmlChar *)cur, URL, (const char *)encoding, options);\r
+                       //Negative test\r
+                               DTS_CHECK_EQ_MESSAGE("xmlReaderForDoc", (void *)ret_val, (void *)NULL, "xmlReaderForDoc Failed");\r
+                       }\r
+               }\r
+               desret_xmlTextReaderPtr(ret_val);\r
+               des_const_xmlChar_ptr(n_cur, (const xmlChar *)cur, 0);\r
+               des_filepath(n_URL, URL, 1);\r
+               des_const_char_ptr(n_encoding, (const char *)encoding, 2);\r
+               des_parseroptions(n_options, options, 3);\r
+               xmlResetLastError();\r
+       }\r
+       }\r
+       }\r
+       }\r
+}\r
+       /**\r
+       * @test                 UTcXmlReaderForFileP01\r
+       * @brief                xmlTextReaderPtr xmlReaderForFile(const char *filename, const char *encoding, int options)\r
+       * @desc                 Positive Test for xmlReaderForFile\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {const char *(filename), const char *(encoding), int (options)} => {N/A | xmlTextReaderPtr(!=NULL)} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcXmlReaderForFileP01()\r
+{\r
+       xmlTextReaderPtr ret_val;\r
+       const char * filename; /* a file or URL */\r
+       int n_filename;\r
+       char * encoding; /* the document encoding, or NULL */\r
+       int n_encoding;\r
+       int options; /* a combination of xmlParserOption */\r
+       int n_options;\r
+\r
+       for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {\r
+       for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {\r
+       for (n_options = 0;n_options < gen_nb_parseroptions;n_options++) {\r
+               filename = gen_filepath(n_filename, 0);\r
+               encoding = gen_const_char_ptr(n_encoding, 1);\r
+               options = gen_parseroptions(n_options, 2);\r
+\r
+   /* @remarks input1: [N/A, N/A] @n\r
+       *               {const char *(filename), const char *(encoding), int (options)} => {N/A | xmlTextReaderPtr(!=NULL)} @n\r
+  */\r
+        ret_val = xmlReaderForFile(filename, (const char *)encoding, options);\r
+         if(ret_val == NULL && filename == NULL)\r
+         {\r
+                 //Negative test\r
+                 DTS_CHECK_EQ_MESSAGE("xmlReaderForFile", (void *)ret_val, (void *)NULL, "xmlReaderForFile Failed");\r
+         }\r
+\r
+         if(ret_val != NULL && filename != NULL)\r
+         {\r
+                 //Positive test\r
+                 DTS_CHECK_NE_MESSAGE("xmlReaderForFile", (void *)ret_val, (void *)NULL, "xmlReaderForFile Failed");\r
+         }\r
+\r
+               desret_xmlTextReaderPtr(ret_val);\r
+               des_filepath(n_filename, filename, 0);\r
+               des_const_char_ptr(n_encoding, (const char *)encoding, 1);\r
+               des_parseroptions(n_options, options, 2);\r
+               xmlResetLastError();\r
+       }\r
+       }\r
+       }\r
+}\r
+       /**\r
+       * @test                 UTcXmlReaderForMemoryP01\r
+       * @brief                xmlTextReaderPtr xmlReaderForMemory(const char *buffer, int size, const char *URL,\r
+                   const char *encoding, int options)\r
+       * @desc                 Positive Test for xmlReaderForMemory\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {const char *(buffer), int (size), const char *(URL),const char *(encoding), int (options)} => {N/A | xmlTextReaderPtr(!=NULL)} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcXmlReaderForMemoryP01()\r
+{\r
+       xmlTextReaderPtr ret_val;\r
+       char * buffer; /* a pointer to a char array */\r
+       int n_buffer;\r
+       int size; /* the size of the array */\r
+       int n_size;\r
+       const char * URL; /* the base URL to use for the document */\r
+       int n_URL;\r
+       char * encoding; /* the document encoding, or NULL */\r
+       int n_encoding;\r
+       int options; /* a combination of xmlParserOption */\r
+       int n_options;\r
+\r
+       for (n_buffer = 0;n_buffer < gen_nb_const_char_ptr;n_buffer++) {\r
+       for (n_size = 0;n_size < gen_nb_int;n_size++) {\r
+       for (n_URL = 0;n_URL < gen_nb_filepath;n_URL++) {\r
+       for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {\r
+       for (n_options = 0;n_options < gen_nb_parseroptions;n_options++) {\r
+               buffer = gen_const_char_ptr(n_buffer, 0);\r
+               size = gen_int(n_size, 1);\r
+               URL = gen_filepath(n_URL, 2);\r
+               encoding = gen_const_char_ptr(n_encoding, 3);\r
+               options = gen_parseroptions(n_options, 4);\r
+\r
+               /* @remarks             input1: [N/A, N/A] @n\r
+               *                       {const char *(buffer), int (size), const char *(URL),const char *(encoding), int (options)} => {N/A | xmlTextReaderPtr(!=NULL)} @n\r
+               */\r
+               ret_val = xmlReaderForMemory((const char *)buffer, size, URL, (const char *)encoding, options);\r
+               if(ret_val == NULL && size == 0)\r
+               {\r
+                       //Negative test\r
+                       DTS_CHECK_EQ_MESSAGE("xmlReaderForMemory", (void *)ret_val, (void *)NULL, "xmlReaderForMemory Failed");\r
+\r
+                       size = gen_int_ReaderForMemory(n_size, 1);\r
+\r
+                       ret_val = xmlReaderForMemory((const char *)buffer, size, URL, (const char *)encoding, options);\r
+                       if(ret_val != NULL && size > 0)\r
+                       {\r
+                          //Positive test\r
+                          DTS_CHECK_NE_MESSAGE("xmlReaderForMemory", (void *)ret_val, (void *)NULL, "xmlReaderForMemory Failed");\r
+                       }\r
+               }\r
+\r
+\r
+               desret_xmlTextReaderPtr(ret_val);\r
+               des_const_char_ptr(n_buffer, (const char *)buffer, 0);\r
+               des_int(n_size, size, 1);\r
+               des_filepath(n_URL, URL, 2);\r
+               des_const_char_ptr(n_encoding, (const char *)encoding, 3);\r
+               des_parseroptions(n_options, options, 4);\r
+               xmlResetLastError();\r
+       }\r
+       }\r
+       }\r
+       }\r
+       }\r
+}\r
+       /**\r
+       * @test                 UTcXmlReaderNewDocP01\r
+       * @brief                int xmlReaderNewDoc(xmlTextReaderPtr reader, const xmlChar * cur,\r
+                       const char *URL, const char *encoding, int options)\r
+       * @desc                 Positive Test for xmlReaderNewDoc\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlTextReaderPtr(reader), const xmlChar*(cur),const char*(URL), const char*(encoding), int(options)} => {N/A | int(0)} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcXmlReaderNewDocP01()\r
+{\r
+    int ret_val;\r
+    xmlTextReaderPtr reader; /* an XML reader */\r
+    int n_reader;\r
+    xmlChar * cur; /* a pointer to a zero terminated string */\r
+    int n_cur;\r
+    const char * URL; /* the base URL to use for the document */\r
+    int n_URL;\r
+    char * encoding; /* the document encoding, or NULL */\r
+    int n_encoding;\r
+    int options; /* a combination of xmlParserOption */\r
+    int n_options;\r
+\r
+    for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {\r
+    for (n_cur = 0;n_cur < gen_nb_const_xmlChar_ptr;n_cur++) {\r
+    for (n_URL = 0;n_URL < gen_nb_filepath;n_URL++) {\r
+    for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {\r
+    for (n_options = 0;n_options < gen_nb_parseroptions;n_options++) {\r
+     //   mem_base = xmlMemBlocks();\r
+        reader = gen_xmlTextReaderPtr(n_reader, 0);\r
+        cur = gen_const_xmlChar_ptr(n_cur, 1);\r
+        URL = gen_filepath(n_URL, 2);\r
+        encoding = gen_const_char_ptr(n_encoding, 3);\r
+        options = gen_parseroptions(n_options, 4);\r
+        /* @remarks            input1: [N/A, N/A] @n\r
+        *      {xmlTextReaderPtr(reader), const xmlChar*(cur),const char*(URL), const char*(encoding), int(options)} => {N/A | int(!=NULL)} @n\r
+        */\r
+        ret_val = xmlReaderNewDoc(reader, (const xmlChar *)cur, URL, (const char *)encoding, options);\r
+        if(ret_val == 0 && n_reader < 3 && cur != NULL)\r
+        {\r
+               //Positive test\r
+                DTS_CHECK_EQ_MESSAGE("xmlReaderNewDoc", (void *)ret_val, (void *)NULL, "xmlReaderNewDoc Failed");\r
+        }\r
+\r
+        if(ret_val == -1 && n_reader == 3)\r
+        {\r
+               //Positive test\r
+               DTS_CHECK_EQ_MESSAGE("xmlReaderNewDoc", (void *)ret_val, (void *)-1, "xmlReaderNewDoc Failed");\r
+        }\r
+        desret_int(ret_val);\r
+        des_xmlTextReaderPtr(n_reader, reader, 0);\r
+        des_const_xmlChar_ptr(n_cur, (const xmlChar *)cur, 1);\r
+        des_filepath(n_URL, URL, 2);\r
+        des_const_char_ptr(n_encoding, (const char *)encoding, 3);\r
+        des_parseroptions(n_options, options, 4);\r
+        xmlResetLastError();\r
+    }\r
+    }\r
+    }\r
+    }\r
+    }\r
+}\r
+       /**\r
+       * @test                 UTcXmlReaderNewFileP01\r
+       * @brief                int xmlReaderNewFile(xmlTextReaderPtr reader, const char *filename,\r
+                                            const char *encoding, int options)\r
+       * @desc                 Positive Test for xmlReaderNewFile\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlTextReaderPtr(reader), const char*(filename),const char*(encoding), int(options)} => {N/A | int(0)} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcXmlReaderNewFileP01()\r
+{\r
+    int ret_val;\r
+    xmlTextReaderPtr reader; /* an XML reader */\r
+    int n_reader;\r
+    const char * filename; /* a file or URL */\r
+    int n_filename;\r
+    char * encoding; /* the document encoding, or NULL */\r
+    int n_encoding;\r
+    int options; /* a combination of xmlParserOption */\r
+    int n_options;\r
+\r
+    for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {\r
+    for (n_filename = 0;n_filename < gen_nb_filepath;n_filename++) {\r
+    for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {\r
+    for (n_options = 0;n_options < gen_nb_parseroptions;n_options++) {\r
+        reader = gen_xmlTextReaderPtr(n_reader, 0);\r
+        filename = gen_filepath(n_filename, 1);\r
+        encoding = gen_const_char_ptr(n_encoding, 2);\r
+        options = gen_parseroptions(n_options, 3);\r
+\r
+       /* @remarks             input1: [N/A, N/A] @n\r
+       *                       {xmlTextReaderPtr(reader), const char*(filename),const char*(encoding), int(options)} => {N/A | int(0)} @n\r
+       */\r
+        ret_val = xmlReaderNewFile(reader, filename, (const char *)encoding, options);\r
+       if(ret_val == 0 && n_reader < 3)\r
+       {\r
+          //Positive Test\r
+                  DTS_CHECK_EQ_MESSAGE("xmlReaderNewFile", (void *)ret_val, (void *)0, "xmlReaderNewFile Failed");\r
+       }\r
+\r
+       if(ret_val == -1 && n_reader == 3)\r
+       {\r
+          //Negative test\r
+                  DTS_CHECK_EQ_MESSAGE("xmlReaderNewFile", (void *)ret_val, (void *)-1, "xmlReaderNewFile Failed");\r
+       }\r
+        desret_int(ret_val);\r
+        des_xmlTextReaderPtr(n_reader, reader, 0);\r
+        des_filepath(n_filename, filename, 1);\r
+        des_const_char_ptr(n_encoding, (const char *)encoding, 2);\r
+        des_parseroptions(n_options, options, 3);\r
+        xmlResetLastError();\r
+    }\r
+    }\r
+    }\r
+    }\r
+}\r
+       /**\r
+       * @test                 UTcXmlReaderNewMemoryP01\r
+       * @brief                int xmlReaderNewMemory(xmlTextReaderPtr reader, const char *buffer, int size,\r
+                   const char *URL, const char *encoding, int options)\r
+       * @desc                 Positive Test for xmlReaderNewMemory\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlTextReaderPtr(reader),const char*(buffer), int(size),const char*(URL), const char*(encoding), int(options)} => {N/A | int(0)} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcXmlReaderNewMemoryP01()\r
+{\r
+       int ret_val;\r
+       xmlTextReaderPtr reader; /* an XML reader */\r
+       int n_reader;\r
+       char * buffer; /* a pointer to a char array */\r
+       int n_buffer;\r
+       int size; /* the size of the array */\r
+       int n_size;\r
+       const char * URL; /* the base URL to use for the document */\r
+       int n_URL;\r
+       char * encoding; /* the document encoding, or NULL */\r
+       int n_encoding;\r
+       int options; /* a combination of xmlParserOption */\r
+       int n_options;\r
+\r
+       for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {\r
+       for (n_buffer = 0;n_buffer < gen_nb_const_char_ptr;n_buffer++) {\r
+       for (n_size = 0;n_size < gen_nb_int;n_size++) {\r
+       for (n_URL = 0;n_URL < gen_nb_filepath;n_URL++) {\r
+       for (n_encoding = 0;n_encoding < gen_nb_const_char_ptr;n_encoding++) {\r
+       for (n_options = 0;n_options < gen_nb_parseroptions;n_options++) {\r
+               reader = gen_xmlTextReaderPtr(n_reader, 0);\r
+               buffer = gen_const_char_ptr(n_buffer, 1);\r
+               size = gen_int(n_size, 2);\r
+               URL = gen_filepath(n_URL, 3);\r
+               encoding = gen_const_char_ptr(n_encoding, 4);\r
+               options = gen_parseroptions(n_options, 5);\r
+\r
+       /* @remarks     input1: [N/A, N/A] @n\r
+        *              {xmlTextReaderPtr(reader),const char*(buffer), int(size),const char*(URL), const char*(encoding), int(options)} => {N/A | int(0)} @n\r
+       */\r
+               ret_val = xmlReaderNewMemory(reader, (const char *)buffer, size, URL, (const char *)encoding, options);\r
+\r
+               if(ret_val == -1 && size == 0)\r
+               {\r
+                       //Negative test\r
+                       DTS_CHECK_EQ_MESSAGE("xmlReaderNewMemory", (void *)ret_val, (void *)-1, "xmlReaderNewMemory Failed");\r
+                       if(size == 0)\r
+                       {\r
+                               size = gen_int_ReaderForMemory(n_size, 2);\r
+                               ret_val = xmlReaderNewMemory(reader, (const char *)buffer, size, URL, (const char *)encoding, options);\r
+                               if(size != 0 && ret_val == 0)\r
+                               {\r
+                                       //Positive test\r
+                                       DTS_CHECK_EQ_MESSAGE("xmlReaderNewMemory", (void *)ret_val, (void *)0, "xmlReaderNewMemory Failed");\r
+                               }\r
+                       }\r
+               }\r
+               desret_int(ret_val);\r
+               des_xmlTextReaderPtr(n_reader, reader, 0);\r
+               des_const_char_ptr(n_buffer, (const char *)buffer, 1);\r
+               des_int(n_size, size, 2);\r
+               des_filepath(n_URL, URL, 3);\r
+               des_const_char_ptr(n_encoding, (const char *)encoding, 4);\r
+               des_parseroptions(n_options, options, 5);\r
+               xmlResetLastError();\r
+       }\r
+       }\r
+       }\r
+       }\r
+       }\r
+       }\r
+}\r
+       /**\r
+       * @test                 UTcXmlReaderNewWalkerP01\r
+       * @brief                int xmlReaderNewWalker(xmlTextReaderPtr reader, xmlDocPtr doc)\r
+       * @desc                 Positive Test for xmlReaderNewWalker\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlTextReaderPtr(reader), xmlDocPtr(doc)} => {N/A | int(0)} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcXmlReaderNewWalkerP01()\r
+{\r
+       int ret_val;\r
+       xmlTextReaderPtr reader; /* an XML reader */\r
+       int n_reader;\r
+       xmlDocPtr doc; /* a preparsed document */\r
+       int n_doc;\r
+\r
+       for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {\r
+       for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {\r
+               reader = gen_xmlTextReaderPtr(n_reader, 0);\r
+               doc = gen_xmlDocPtr(n_doc, 1);\r
+\r
+               ret_val = xmlReaderNewWalker(reader, doc);\r
+               if(ret_val == 0 && n_reader < 3)\r
+               {\r
+                       //Positive test\r
+                       DTS_CHECK_EQ_MESSAGE("xmlReaderNewWalker", (void *)ret_val, (void *)0, "xmlReaderNewWalker Failed");\r
+               }\r
+\r
+               if(ret_val == -1 && n_reader ==3)\r
+               {\r
+                       //Negative test\r
+                       DTS_CHECK_EQ_MESSAGE("xmlReaderNewWalker", (void *)ret_val, (void *)-1, "xmlReaderNewWalker Failed");\r
+               }\r
+               desret_int(ret_val);\r
+               des_xmlTextReaderPtr(n_reader, reader, 0);\r
+               des_xmlDocPtr(n_doc, doc, 1);\r
+               xmlResetLastError();\r
+       }\r
+       }\r
+}\r
+       /**\r
+       * @test                 UTcXmlReaderWalkerP01\r
+       * @brief                xmlTextReaderPtr xmlReaderWalker(xmlDocPtr doc)\r
+       * @desc                 Positive Test for xmlReaderWalker\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlDocPtr (doc)} => {N/A | xmlTextReaderPtr(ret_val)} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcXmlReaderWalkerP01()\r
+{\r
+    xmlTextReaderPtr ret_val;\r
+    xmlDocPtr doc; /* a preparsed document */\r
+    int n_doc;\r
+\r
+    for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {\r
+        doc = gen_xmlDocPtr(n_doc, 0);\r
+\r
+    /* @remarks                input1: [N/A, N/A] @n\r
+     *                         {xmlDocPtr (doc!=NULL)} => {N/A | xmlTextReaderPtr(!=NULL)} @n\r
+     */\r
+        ret_val = xmlReaderWalker(doc);\r
+\r
+        if(ret_val != NULL && doc != NULL)\r
+        {\r
+               //Positive test\r
+               DTS_CHECK_NE_MESSAGE("xmlReaderWalker", (void *)ret_val, (void *)NULL, "xmlReaderWalker Failed");\r
+            if(doc != NULL)\r
+            {\r
+               //Negative test\r
+               /* @remarks     input1: [N/A, N/A] @n\r
+                *              {xmlDocPtr (doc=NULL)} => {N/A | xmlTextReaderPtr(!=NULL)} @n\r
+               */\r
+               doc = NULL;\r
+               ret_val = xmlReaderWalker(doc);\r
+               DTS_CHECK_EQ_MESSAGE("xmlReaderWalker", (void *)ret_val, (void *)NULL, "xmlReaderWalker Failed");\r
+            }\r
+        }\r
+\r
+        desret_xmlTextReaderPtr(ret_val);\r
+        des_xmlDocPtr(n_doc, doc, 0);\r
+        xmlResetLastError();\r
+    }\r
+}\r
+\r
+       /**\r
+       * @test                 UTcXmlTextReaderAttributeCountP01\r
+       * @brief                int xmlTextReaderAttributeCount(xmlTextReaderPtr reader)\r
+       * @desc                 Positive Test for xmlTextReaderAttributeCount\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlTextReaderPtr(reader)} => {N/A | int(0)} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcXmlTextReaderAttributeCountP01()\r
+{\r
+    int ret_val;\r
+    xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */\r
+    int n_reader;\r
+\r
+    for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {\r
+        reader = gen_xmlTextReaderPtr(n_reader, 0);\r
+\r
+        ret_val = xmlTextReaderAttributeCount(reader);\r
+      if(ret_val == 0 && n_reader < 3)\r
+      {\r
+         //Positive test\r
+                 DTS_CHECK_EQ_MESSAGE("xmlTextReaderAttributeCount", (void *)ret_val, (void *)0, "xmlTextReaderAttributeCount Failed");\r
+      }\r
+      if(ret_val == -1 && n_reader == 3)\r
+      {\r
+         //Negative test\r
+                 DTS_CHECK_EQ_MESSAGE("xmlTextReaderAttributeCount", (void *)ret_val, (void *)-1, "xmlTextReaderAttributeCount Failed");\r
+      }\r
+        desret_int(ret_val);\r
+        des_xmlTextReaderPtr(n_reader, reader, 0);\r
+        xmlResetLastError();\r
+    }\r
+}\r
+       /**\r
+       * @test                 UTcXmlTextReaderBaseUriP01\r
+       * @brief                xmlChar *xmlTextReaderBaseUri(xmlTextReaderPtr reader)\r
+       * @desc                 Positive Test for xmlTextReaderBaseUri\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlTextReaderPtr (reader)} => {N/A | xmlChar *(ret_val)} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcXmlTextReaderBaseUriP01()\r
+{\r
+       xmlChar * ret_val;\r
+       xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */\r
+       int n_reader;\r
+       for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {\r
+               reader = gen_xmlTextReaderPtr_TextReaderBase(n_reader, 0);\r
+\r
+       /* * @remarks\r
+        *                      Negative Test Case:\r
+        *                      input1: [Get the reader by reading the file "/Home/SUTstest/valid/ent2" using xmlNewTextReaderFilename() and n_reader == 0,\r
+        *                                              Call "desret_const_xmlChar_ptr()" to free xmlChar pointer(ret_val) and Call "des_xmlTextReaderPtr()" to free reader pointer(reader) ] @n\r
+        *              {xmlTextReaderPtr (reader)} => {N/A | const xmlChar(==NULL)} @n\r
+        *\r
+        *                      Negative Test Case:\r
+        *              input2: [Get the reader by reading the file ""/Home/SUTstest/valid/REC-xml-19980210.xml" using xmlNewTextReaderFilename() and n_reader == 1,\r
+        *                                      Call "desret_const_xmlChar_ptr()" to free xmlChar pointer(ret_val) and Call "des_xmlTextReaderPtr()" to free reader pointer(reader)] @n\r
+        *              {xmlTextReaderPtr (reader)} => {N/A | const xmlChar(==NULL)} @n\r
+        *\r
+        *                      Positive Test Case:\r
+        *              input3: [Get the reader pointer txtredptr by reading the file "/Home/SUTstest/valid/REC-xml-19980210.xml" using xmlNewTextReaderFilename() and n_reader == 2,\r
+        *                                      Call xmlTextReaderRead(txtredptr) to return reader, Call "desret_const_xmlChar_ptr()" to free xmlChar pointer(ret_val) and Call "des_xmlTextReaderPtr()" to free reader pointer(reader)] @n\r
+        *              {xmlTextReaderPtr (reader)} => {N/A | const xmlChar(!=NULL)} @n\r
+        *\r
+        *                      Negative Test Case:\r
+        *              input4: [Get reader pointer as NULL for n_reader > 2, Call "desret_const_xmlChar_ptr()" to free xmlChar pointer(ret_val) and Call "des_xmlTextReaderPtr()" to free reader pointer(reader)] @n\r
+        *              {xmlTextReaderPtr (reader)} => {N/A | const xmlChar(==NULL)} @n\r
+\r
+       */\r
+               ret_val = xmlTextReaderBaseUri(reader);\r
+\r
+               if(ret_val != NULL && n_reader == 2)\r
+               {\r
+                       //Positive test\r
+                       DTS_CHECK_NE_MESSAGE("xmlTextReaderBaseUri", (void *)ret_val, (void *)NULL, "xmlTextReaderBaseUri Failed");\r
+               }\r
+               if(ret_val == NULL && n_reader != 2)\r
+               {\r
+                       //Negative test\r
+                       DTS_CHECK_EQ_MESSAGE("xmlTextReaderBaseUri", (void *)ret_val, (void *)0, "xmlTextReaderBaseUri Failed");\r
+               }\r
+               desret_xmlChar_ptr(ret_val);\r
+               des_xmlTextReaderPtr(n_reader, reader, 0);\r
+               xmlResetLastError();\r
+       }\r
+}\r
+\r
+       /**\r
+       * @test                 UTcXmlTextReaderCloseP01\r
+       * @brief                int xmlTextReaderClose(xmlTextReaderPtr reader)\r
+       * @desc                 Positive Test for xmlTextReaderClose\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlTextReaderPtr (reader)} => {N/A | int(0)} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcXmlTextReaderCloseP01()\r
+{\r
+    int ret_val;\r
+    xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */\r
+    int n_reader;\r
+\r
+    for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {\r
+        reader = gen_xmlTextReaderPtr(n_reader, 0);\r
+\r
+        ret_val = xmlTextReaderClose(reader);\r
+\r
+       /* @remarks             input1: [N/A, N/A] @n\r
+       *                       {xmlTextReaderPtr (reader)} => {N/A | int(0)} @n\r
+        */\r
+        if(ret_val == 0 && n_reader < 3)\r
+        {\r
+               //Positive Test\r
+               DTS_CHECK_EQ_MESSAGE("xmlTextReaderClose", (void *)ret_val, (void *)0, "xmlTextReaderClose Failed");\r
+        }\r
+\r
+        if(ret_val == -1 && n_reader == 3)\r
+        {\r
+               //Negative Test\r
+               DTS_CHECK_EQ_MESSAGE("xmlTextReaderClose", (void *)ret_val, (void *)-1, "xmlTextReaderClose Failed");\r
+        }\r
+        desret_int(ret_val);\r
+        des_xmlTextReaderPtr(n_reader, reader, 0);\r
+        xmlResetLastError();\r
+    }\r
+}\r
+       /**\r
+       * @test                 UTcXmlTextReaderConstBaseUriP01\r
+       * @brief                const xmlChar *xmlTextReaderConstBaseUri(xmlTextReaderPtr reader)\r
+       * @desc                 Positive Test for xmlTextReaderConstBaseUri\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlTextReaderPtr (reader)} => {N/A | const xmlChar(!=NULL)} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcXmlTextReaderConstBaseUriP01()\r
+{\r
+    const xmlChar * ret_val;\r
+    xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */\r
+    int n_reader;\r
+\r
+    for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {\r
+        reader = gen_xmlTextReaderPtr_TextReaderBase(n_reader, 0);\r
+\r
+        /* * @remarks\r
+        *                                      Negative Test Case:\r
+        *                                      input1: [Get the reader by reading the file "/Home/SUTstest/valid/ent2" using xmlNewTextReaderFilename() and n_reader == 0,\r
+        *                                                              Call "desret_const_xmlChar_ptr()" to free xmlChar pointer(ret_val) and Call "des_xmlTextReaderPtr()" to free reader pointer(reader) ] @n\r
+        *                              {xmlTextReaderPtr (reader)} => {N/A | const xmlChar(==NULL)} @n\r
+        *\r
+        *                                      Negative Test Case:\r
+        *                              input2: [Get the reader by reading the file ""/Home/SUTstest/valid/REC-xml-19980210.xml" using xmlNewTextReaderFilename() and n_reader == 1,\r
+        *                                                      Call "desret_const_xmlChar_ptr()" to free xmlChar pointer(ret_val) and Call "des_xmlTextReaderPtr()" to free reader pointer(reader)] @n\r
+        *                              {xmlTextReaderPtr (reader)} => {N/A | const xmlChar(==NULL)} @n\r
+        *\r
+        *                                      Positive Test Case:\r
+        *                              input3: [Get the reader pointer txtredptr by reading the file "/Home/SUTstest/valid/REC-xml-19980210.xml" using xmlNewTextReaderFilename() and n_reader == 2,\r
+        *                                               Call xmlTextReaderRead(txtredptr) to return reader, Call "desret_const_xmlChar_ptr()" to free xmlChar pointer(ret_val) and Call "des_xmlTextReaderPtr()" to free reader pointer(reader)] @n\r
+        *                              {xmlTextReaderPtr (reader)} => {N/A | const xmlChar(!=NULL)} @n\r
+        *\r
+        *                                      Negative Test Case:\r
+        *                              input4: [Get reader pointer as NULL for n_reader > 2, Call "desret_const_xmlChar_ptr()" to free xmlChar pointer(ret_val) and Call "des_xmlTextReaderPtr()" to free reader pointer(reader)] @n\r
+        *                              {xmlTextReaderPtr (reader)} => {N/A | const xmlChar(==NULL)} @n\r
+\r
+        */\r
+        ret_val = xmlTextReaderConstBaseUri(reader);\r
+\r
+        if(ret_val != NULL && n_reader == 2)\r
+        {\r
+               //Positive test\r
+               DTS_CHECK_NE_MESSAGE("xmlTextReaderConstBaseUri", (void *)ret_val, (void *)NULL, "xmlTextReaderConstBaseUri Failed");\r
+        }\r
+\r
+        if(ret_val == NULL && n_reader != 2)\r
+        {\r
+               //Negative test\r
+               DTS_CHECK_EQ_MESSAGE("xmlTextReaderConstBaseUri", (void *)ret_val, (void *)NULL, "xmlTextReaderConstBaseUri Failed");\r
+        }\r
+        desret_const_xmlChar_ptr(ret_val);\r
+        des_xmlTextReaderPtr(n_reader, reader, 0);\r
+        xmlResetLastError();\r
+    }\r
+}\r
+\r
+       /**\r
+       * @test                 UTcXmlTextReaderConstLocalNameP01\r
+       * @brief                const xmlChar *xmlTextReaderConstLocalName(xmlTextReaderPtr reader)\r
+       * @desc                 Positive Test for xmlTextReaderConstLocalName\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+    * @remarks\r
+          *            Negative Test Case:\r
+          *            input1: [Get the reader by reading the file "/Home/SUTstest/valid/ent2" using xmlNewTextReaderFilename() and n_reader == 0,\r
+          *                                    Call "desret_const_xmlChar_ptr()" to free xmlChar pointer(ret_val) and Call "des_xmlTextReaderPtr()" to free reader pointer(reader) ] @n\r
+          *    {xmlTextReaderPtr (reader)} => {N/A | const xmlChar(==NULL)} @n\r
+          *\r
+          *            Negative Test Case:\r
+          *    input2: [Get the reader by reading the file ""/Home/SUTstest/valid/REC-xml-19980210.xml" using xmlNewTextReaderFilename() and n_reader == 1,\r
+          *                                    Call "desret_const_xmlChar_ptr()" to free xmlChar pointer(ret_val) and Call "des_xmlTextReaderPtr()" to free reader pointer(reader)] @n\r
+          *                    {xmlTextReaderPtr (reader)} => {N/A | const xmlChar(==NULL)} @n\r
+          *\r
+          *            Positive Test Case:\r
+          *    input3: [Get the reader pointer txtredptr by reading the file "/Home/SUTstest/valid/REC-xml-19980210.xml" using xmlNewTextReaderFilename() and n_reader == 2,\r
+          *                                    Call xmlTextReaderRead(txtredptr) to return reader, Call "desret_const_xmlChar_ptr()" to free xmlChar pointer(ret_val) and Call "des_xmlTextReaderPtr()" to free reader pointer(reader)] @n\r
+          *                    {xmlTextReaderPtr (reader)} => {N/A | const xmlChar(!=NULL)} @n\r
+          *\r
+          *            Negative Test Case:\r
+          *    input4: [Get reader pointer as NULL for n_reader > 2, Call "desret_const_xmlChar_ptr()" to free xmlChar pointer(ret_val) and Call "des_xmlTextReaderPtr()" to free reader pointer(reader)] @n\r
+          *    {xmlTextReaderPtr (reader)} => {N/A | const xmlChar(==NULL)} @n\r
+\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcXmlTextReaderConstLocalNameP01()\r
+{\r
+    const xmlChar * ret_val;\r
+    xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */\r
+    int n_reader;\r
+\r
+    for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {\r
+        reader = gen_xmlTextReaderPtr_TextReaderBase(n_reader, 0);\r
+      //  MT_CHECK_MESSAGE2(1 == 1, "reader=: %d", reader);\r
+        /* * @remarks\r
+         *             Negative Test Case:\r
+         *             input1: [Get the reader by reading the file "/Home/SUTstest/valid/ent2" using xmlNewTextReaderFilename() and n_reader == 0,\r
+         *                                     Call "desret_const_xmlChar_ptr()" to free xmlChar pointer(ret_val) and Call "des_xmlTextReaderPtr()" to free reader pointer(reader) ] @n\r
+         *     {xmlTextReaderPtr (reader)} => {N/A | const xmlChar(==NULL)} @n\r
+         *\r
+         *             Negative Test Case:\r
+         *     input2: [Get the reader by reading the file ""/Home/SUTstest/valid/REC-xml-19980210.xml" using xmlNewTextReaderFilename() and n_reader == 1,\r
+         *                                     Call "desret_const_xmlChar_ptr()" to free xmlChar pointer(ret_val) and Call "des_xmlTextReaderPtr()" to free reader pointer(reader)] @n\r
+         *                     {xmlTextReaderPtr (reader)} => {N/A | const xmlChar(==NULL)} @n\r
+         *\r
+         *             Positive Test Case:\r
+         *     input3: [Get the reader pointer txtredptr by reading the file "/Home/SUTstest/valid/REC-xml-19980210.xml" using xmlNewTextReaderFilename() and n_reader == 2,\r
+         *                                     Call xmlTextReaderRead(txtredptr) to return reader, Call "desret_const_xmlChar_ptr()" to free xmlChar pointer(ret_val) and Call "des_xmlTextReaderPtr()" to free reader pointer(reader)] @n\r
+         *                     {xmlTextReaderPtr (reader)} => {N/A | const xmlChar(!=NULL)} @n\r
+         *\r
+         *             Negative Test Case:\r
+         *     input4: [Get reader pointer as NULL for n_reader > 2, Call "desret_const_xmlChar_ptr()" to free xmlChar pointer(ret_val) and Call "des_xmlTextReaderPtr()" to free reader pointer(reader)] @n\r
+         *     {xmlTextReaderPtr (reader)} => {N/A | const xmlChar(==NULL)} @n\r
+\r
+         */\r
+\r
+        ret_val = xmlTextReaderConstLocalName(reader);\r
+        if(ret_val != NULL && n_reader == 2)\r
+        {\r
+               //Positive Test\r
+               DTS_CHECK_NE_MESSAGE("xmlTextReaderConstLocalName", (void *)ret_val, (void *)NULL, "xmlTextReaderConstLocalName Failed");\r
+        }\r
+        if(ret_val == NULL && n_reader != 2)\r
+        {\r
+               //Negative Test\r
+               DTS_CHECK_EQ_MESSAGE("xmlTextReaderConstLocalName", (void *)ret_val, (void *)NULL, "xmlTextReaderConstLocalName Failed");\r
+        }\r
+        desret_const_xmlChar_ptr(ret_val);\r
+        des_xmlTextReaderPtr(n_reader, reader, 0);\r
+        xmlResetLastError();\r
+    }\r
+}\r
+       /**\r
+       * @test                 UTcXmlTextReaderConstNameP01\r
+       * @brief                const xmlChar *xmlTextReaderConstName(xmlTextReaderPtr reader)\r
+       * @desc                 Positive Test for xmlTextReaderConstName\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks\r
+       *               Negative Test Case:\r
+       *               input1: [Get the reader by reading the file "/Home/SUTstest/valid/ent2" using xmlNewTextReaderFilename() and n_reader == 0,\r
+       *                                       Call "desret_const_xmlChar_ptr()" to free xmlChar pointer(ret_val) and Call "des_xmlTextReaderPtr()" to free reader pointer(reader) ] @n\r
+       *       {xmlTextReaderPtr (reader)} => {N/A | const xmlChar(==NULL)} @n\r
+       *\r
+       *               Negative Test Case:\r
+       *       input2: [Get the reader by reading the file ""/Home/SUTstest/valid/REC-xml-19980210.xml" using xmlNewTextReaderFilename() and n_reader == 1,\r
+       *                                       Call "desret_const_xmlChar_ptr()" to free xmlChar pointer(ret_val) and Call "des_xmlTextReaderPtr()" to free reader pointer(reader)] @n\r
+       *                       {xmlTextReaderPtr (reader)} => {N/A | const xmlChar(==NULL)} @n\r
+       *\r
+       *               Positive Test Case:\r
+       *       input3: [Get the reader pointer txtredptr by reading the file "/Home/SUTstest/valid/REC-xml-19980210.xml" using xmlNewTextReaderFilename() and n_reader == 2,\r
+       *                                       Call xmlTextReaderRead(txtredptr) to return reader, Call "desret_const_xmlChar_ptr()" to free xmlChar pointer(ret_val) and Call "des_xmlTextReaderPtr()" to free reader pointer(reader)] @n\r
+       *                       {xmlTextReaderPtr (reader)} => {N/A | const xmlChar(!=NULL)} @n\r
+       *\r
+       *               Negative Test Case:\r
+       *       input4: [Get reader pointer as NULL for n_reader > 2, Call "desret_const_xmlChar_ptr()" to free xmlChar pointer(ret_val) and Call "des_xmlTextReaderPtr()" to free reader pointer(reader)] @n\r
+       *       {xmlTextReaderPtr (reader)} => {N/A | const xmlChar(==NULL)} @n\r
+\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+\r
+static void UTcXmlTextReaderConstNameP01()\r
+{\r
+       const xmlChar * ret_val;\r
+       xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */\r
+       int n_reader;\r
+\r
+       for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {\r
+\r
+               reader = gen_xmlTextReaderPtr_TextReaderBase(n_reader, 0);\r
+\r
+               ret_val = xmlTextReaderConstName(reader);\r
+               if(ret_val != NULL && n_reader == 2)\r
+               {\r
+                 //Positive Test\r
+                 DTS_CHECK_NE_MESSAGE("xmlTextReaderConstName", (void *)ret_val, (void *)NULL, "xmlTextReaderConstName Failed");\r
+               }\r
+\r
+               if(ret_val == NULL && n_reader != 2)\r
+               {\r
+                 //Negative test\r
+                 DTS_CHECK_EQ_MESSAGE("xmlTextReaderConstName", (void *)ret_val, (void *)NULL, "xmlTextReaderConstName Failed");\r
+               }\r
+               desret_const_xmlChar_ptr(ret_val);\r
+               des_xmlTextReaderPtr(n_reader, reader, 0);\r
+               xmlResetLastError();\r
+       }\r
+}\r
+\r
+       /**\r
+       * @test                 UTcXmlTextReaderConstNamespaceUriP01\r
+       * @brief                const xmlChar *xmlTextReaderConstNamespaceUri(xmlTextReaderPtr reader)\r
+       * @desc                 Positive Test for xmlTextReaderConstNamespaceUri\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks\r
+     *         Negative Test Case:\r
+    *  input1: [Get the reader by reading the file "/Home/SUTstest/valid/ent2" using xmlNewTextReaderFilename() and n_reader == 0,\r
+    *                          Call "desret_const_xmlChar_ptr()" to free xmlChar pointer(ret_val) and Call "des_xmlTextReaderPtr()" to free reader pointer(reader) ] @n\r
+    *                  {xmlTextReaderPtr (reader)} => {N/A | const xmlChar(==NULL)} @n\r
+    *\r
+    *  Negative Test Case:\r
+    *   input2: [Get the reader by reading the file ""/Home/SUTstest/valid/REC-xml-19980210.xml" using xmlNewTextReaderFilename() and n_reader == 1,\r
+    *                          Call "desret_const_xmlChar_ptr()" to free xmlChar pointer(ret_val) and Call "des_xmlTextReaderPtr()" to free reader pointer(reader)] @n\r
+    *                          {xmlTextReaderPtr (reader)} => {N/A | const xmlChar(==NULL)} @n\r
+    *\r
+    *  Positive Test Case:\r
+    *   input3: [Get the reader pointer txtredptr by reading the file "/Home/SUTstest/valid/REC-xml-19980210.xml" using xmlNewTextReaderFilename() and n_reader == 2,\r
+    *                          Call xmlTextReaderRead(txtredptr) to return reader, Call "desret_const_xmlChar_ptr()" to free xmlChar pointer(ret_val) and Call "des_xmlTextReaderPtr()" to free reader pointer(reader)] @n\r
+    *                          {xmlTextReaderPtr (reader)} => {N/A | const xmlChar(!=NULL)} @n\r
+    *\r
+    *  Negative Test Case:\r
+    *          input4: [Get reader pointer as NULL for n_reader > 2, Call "desret_const_xmlChar_ptr()" to free xmlChar pointer(ret_val) and Call "des_xmlTextReaderPtr()" to free reader pointer(reader)] @n\r
+    *          {xmlTextReaderPtr (reader)} => {N/A | const xmlChar(==NULL)} @n\r
+\r
+\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcXmlTextReaderConstNamespaceUriP01()\r
+{\r
+    const xmlChar * ret_val;\r
+    xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */\r
+    int n_reader;\r
+\r
+    for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {\r
+       reader = gen_xmlTextReaderPtr_1(n_reader, 0);\r
+\r
+        ret_val = xmlTextReaderConstNamespaceUri(reader);\r
+\r
+        if(ret_val != NULL)\r
+        {\r
+               //Positive Test\r
+               DTS_CHECK_NE_MESSAGE("xmlTextReaderConstNamespaceUri", (void *)ret_val, (void *)NULL, "xmlTextReaderConstNamespaceUri Failed");\r
+        }\r
+\r
+        if(ret_val == NULL)\r
+        {\r
+               //Negative Test\r
+               DTS_CHECK_EQ_MESSAGE("xmlTextReaderConstNamespaceUri", (void *)ret_val, (void *)NULL, "xmlTextReaderConstNamespaceUri Failed");\r
+        }\r
+        desret_const_xmlChar_ptr(ret_val);\r
+        des_xmlTextReaderPtr(n_reader, reader, 0);\r
+        xmlResetLastError();\r
+    }\r
+}\r
+\r
+       /**\r
+       * @test                 UTcXmlTextReaderConstPrefixP01\r
+       * @brief                const xmlChar * xmlTextReaderConstPrefix(xmlTextReaderPtr reader)\r
+       * @desc                 Positive Test for xmlTextReaderConstPrefix\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks\r
+       *       Negative Test Case:\r
+       *       input1: [Get the reader by reading the file "/Home/SUTstest/valid/ent2" using xmlNewTextReaderFilename() and n_reader == 0,\r
+       *                               Call "desret_const_xmlChar_ptr()" to free xmlChar pointer(ret_val) and Call "des_xmlTextReaderPtr()" to free reader pointer(reader) ] @n\r
+       *               {xmlTextReaderPtr (reader)} => {N/A | const xmlChar(==NULL)} @n\r
+       *\r
+       *       Negative Test Case:\r
+       *   input2: [Get the reader by reading the file ""/Home/SUTstest/valid/REC-xml-19980210.xml" using xmlNewTextReaderFilename() and n_reader == 1,\r
+       *                       Call "desret_const_xmlChar_ptr()" to free xmlChar pointer(ret_val) and Call "des_xmlTextReaderPtr()" to free reader pointer(reader)] @n\r
+       *                       {xmlTextReaderPtr (reader)} => {N/A | const xmlChar(==NULL)} @n\r
+       *\r
+       *       Positive Test Case:\r
+       *   input3: [Get the reader pointer txtredptr by reading the file "/Home/SUTstest/valid/REC-xml-19980210.xml" using xmlNewTextReaderFilename() and n_reader == 2,\r
+       *                       Call xmlTextReaderRead(txtredptr) to return reader, Call "desret_const_xmlChar_ptr()" to free xmlChar pointer(ret_val) and Call "des_xmlTextReaderPtr()" to free reader pointer(reader)] @n\r
+       *                       {xmlTextReaderPtr (reader)} => {N/A | const xmlChar(!=NULL)} @n\r
+       *\r
+       *       Negative Test Case:\r
+       *       input4: [Get reader pointer as NULL for n_reader > 2, Call "desret_const_xmlChar_ptr()" to free xmlChar pointer(ret_val) and Call "des_xmlTextReaderPtr()" to free reader pointer(reader)] @n\r
+       *       {xmlTextReaderPtr (reader)} => {N/A | const xmlChar(==NULL)} @n\r
+\r
+\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcXmlTextReaderConstPrefixP01()\r
+{\r
+       const xmlChar * ret_val;\r
+    xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */\r
+    int n_reader;\r
+\r
+    for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {\r
+       reader = gen_xmlTextReaderPtr_TextReaderBase(n_reader, 0);\r
+       ret_val = xmlTextReaderConstPrefix(reader);\r
+        if(ret_val == NULL)\r
+        {\r
+               //Negative test\r
+               DTS_CHECK_EQ_MESSAGE("xmlTextReaderConstPrefix", (void *)ret_val, (void *)NULL, "xmlTextReaderConstPrefix Failed");\r
+        }\r
+\r
+        if(ret_val != NULL)\r
+        {\r
+               //Positive test\r
+               DTS_CHECK_NE_MESSAGE("xmlTextReaderConstPrefix", (void *)ret_val, (void *)NULL, "xmlTextReaderConstPrefix Failed");\r
+        }\r
+        desret_const_xmlChar_ptr(ret_val);\r
+        des_xmlTextReaderPtr(n_reader, reader, 0);\r
+        xmlResetLastError();\r
+    }\r
+}\r
+       /**\r
+       * @test                 UTcXmlTextReaderConstStringP01\r
+       * @brief                const xmlChar *xmlTextReaderConstString(xmlTextReaderPtr reader, const xmlChar *str)\r
+       * @desc                 Positive Test for xmlTextReaderConstString\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks\r
+       *       positive Test Case:\r
+       *       input1: [Get the reader by reading the file "/Home/SUTstest/valid/ent2" using xmlNewTextReaderFilename() and n_reader == 0,\r
+       *                               Call "desret_const_xmlChar_ptr()" to free xmlChar pointer(ret_val), Call "des_xmlTextReaderPtr()" to free reader pointer(reader) and Call "des_const_xmlChar_ptr" to free xmlchar pointer  ] @n\r
+       *               {xmlTextReaderPtr (reader),const xmlChar*(str) } => {N/A | const xmlChar(==NULL)} @n\r
+       *\r
+       *       positive Test Case:\r
+       *       input1: [Get the reader by reading the file ""/Home/SUTstest/valid/REC-xml-19980210.xml" using xmlNewTextReaderFilename() and n_reader == 0,\r
+       *                               Call "desret_const_xmlChar_ptr()" to free xmlChar pointer(ret_val), Call "des_xmlTextReaderPtr()" to free reader pointer(reader) and Call "des_const_xmlChar_ptr" to free xmlchar pointer  ] @n\r
+       *               {xmlTextReaderPtr (reader),const xmlChar*(str) } => {N/A | const xmlChar(==NULL)} @n\r
+       *\r
+       *       positive Test Case:\r
+       *       input1: [Get the reader by reading the file "/Home/SUTstest/valid/xhtml1-strict.dtd" using xmlNewTextReaderFilename() and n_reader == 0,\r
+       *                               Call "desret_const_xmlChar_ptr()" to free xmlChar pointer(ret_val), Call "des_xmlTextReaderPtr()" to free reader pointer(reader) and Call "des_const_xmlChar_ptr" to free xmlchar pointer  ] @n\r
+       *               {xmlTextReaderPtr (reader),const xmlChar*(str) } => {N/A | const xmlChar(==NULL)} @n\r
+       *\r
+       *       Negative Test Case:\r
+       *       input1: [Get the reader as NULL.using xmlNewTextReaderFilename() and n_reader == 3,\r
+       *                               Call "desret_const_xmlChar_ptr()" to free xmlChar pointer(ret_val), Call "des_xmlTextReaderPtr()" to free reader pointer(reader) and Call "des_const_xmlChar_ptr" to free xmlchar pointer  ] @n\r
+       *               {xmlTextReaderPtr (reader),const xmlChar*(str) } => {N/A | const xmlChar(==NULL)} @n\r
+\r
+\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+\r
+static void UTcXmlTextReaderConstStringP01()\r
+{\r
+       const xmlChar * ret_val;\r
+       xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */\r
+       int n_reader;\r
+       xmlChar * str; /* the string to intern. */\r
+       int n_str;\r
+\r
+       for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {\r
+       for (n_str = 0;n_str < gen_nb_const_xmlChar_ptr;n_str++) {\r
+               reader = gen_xmlTextReaderPtr(n_reader, 0);\r
+               str = gen_const_xmlChar_ptr(n_str, 1);\r
+               ret_val = xmlTextReaderConstString(reader, (const xmlChar *)str);\r
+          if(ret_val != NULL && n_reader < 3)\r
+          {\r
+                  //Positive test\r
+                  DTS_CHECK_NE_MESSAGE("xmlTextReaderConstString", (void *)ret_val, (void *)NULL, "xmlTextReaderConstString Failed");\r
+          }\r
+\r
+          if(ret_val == NULL && n_reader == 3)\r
+          {\r
+                  //Negative test\r
+                 DTS_CHECK_EQ_MESSAGE("xmlTextReaderConstString", (void *)ret_val, (void *)NULL, "xmlTextReaderConstString Failed");\r
+          }\r
+               desret_const_xmlChar_ptr(ret_val);\r
+               des_xmlTextReaderPtr(n_reader, reader, 0);\r
+               des_const_xmlChar_ptr(n_str, (const xmlChar *)str, 1);\r
+               xmlResetLastError();\r
+       }\r
+       }\r
+}\r
+       /**\r
+       * @test                 UTcXmlTextReaderConstValueP01\r
+       * @brief                const xmlChar * xmlTextReaderConstValue(xmlTextReaderPtr reader)\r
+       * @desc                 Positive Test for xmlTextReaderConstValue\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks\r
+       *       positive Test Case:\r
+       *       input1: [Get the reader by reading the file "/Home/SUTstest/valid/ent2" using xmlNewTextReaderFilename() and n_reader == 0,\r
+       *                               Call "desret_const_xmlChar_ptr()" to free xmlChar pointer(ret_val), Call "des_xmlTextReaderPtr()" to free reader pointer(reader) and Call "des_const_xmlChar_ptr" to free xmlchar pointer  ] @n\r
+       *               {xmlTextReaderPtr (reader),const xmlChar*(str) } => {N/A | const xmlChar(==NULL)} @n\r
+       *\r
+       *       positive Test Case:\r
+       *       input1: [Get the reader by reading the file ""/Home/SUTstest/valid/REC-xml-19980210.xml" using xmlNewTextReaderFilename() and n_reader == 0,\r
+       *                               Call "desret_const_xmlChar_ptr()" to free xmlChar pointer(ret_val), Call "des_xmlTextReaderPtr()" to free reader pointer(reader) and Call "des_const_xmlChar_ptr" to free xmlchar pointer  ] @n\r
+       *               {xmlTextReaderPtr (reader),const xmlChar*(str) } => {N/A | const xmlChar(==NULL)} @n\r
+       *\r
+       *       positive Test Case:\r
+       *       input1: [Get the reader by reading the file "/Home/SUTstest/valid/xhtml1-strict.dtd" using xmlNewTextReaderFilename() and n_reader == 0,\r
+       *                               Call "desret_const_xmlChar_ptr()" to free xmlChar pointer(ret_val), Call "des_xmlTextReaderPtr()" to free reader pointer(reader) and Call "des_const_xmlChar_ptr" to free xmlchar pointer  ] @n\r
+       *               {xmlTextReaderPtr (reader),const xmlChar*(str) } => {N/A | const xmlChar(==NULL)} @n\r
+       *\r
+       *       Negative Test Case:\r
+       *       input1: [Get the reader as NULL.using xmlNewTextReaderFilename() and n_reader == 3,\r
+       *                               Call "desret_const_xmlChar_ptr()" to free xmlChar pointer(ret_val), Call "des_xmlTextReaderPtr()" to free reader pointer(reader) and Call "des_const_xmlChar_ptr" to free xmlchar pointer  ] @n\r
+       *               {xmlTextReaderPtr (reader),const xmlChar*(str) } => {N/A | const xmlChar(==NULL)} @n\r
+\r
+\r
+       * @b priority   Middle\r
+       * @ etc         none\r
+       */\r
+void UTcXmlTextReaderConstValueP01()\r
+{\r
+       const xmlChar * ret_val;\r
+       xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */\r
+       int n_reader;\r
+\r
+       for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {\r
+               reader = gen_xmlTextReaderPtr(n_reader, 0);\r
+               ret_val = xmlTextReaderConstValue(reader);\r
+\r
+               if(ret_val != NULL)\r
+               {\r
+                       //Positive Test\r
+                       DTS_CHECK_NE_MESSAGE("xmlTextReaderConstValue", (void *)ret_val, (void *)NULL, "xmlTextReaderConstValue Failed");\r
+               }\r
+\r
+               if(ret_val == NULL)\r
+               {\r
+                       //Negative test\r
+                       DTS_CHECK_EQ_MESSAGE("xmlTextReaderConstValue", (void *)ret_val, (void *)NULL, "xmlTextReaderConstValue Failed");\r
+               }\r
+               desret_const_xmlChar_ptr(ret_val);\r
+               des_xmlTextReaderPtr(n_reader, reader, 0);\r
+               xmlResetLastError();\r
+       }\r
+}\r
+       /**\r
+                       * @test                 UTcXmlTextReaderConstXmlLangP01\r
+                       * @brief                const xmlChar *xmlTextReaderConstXmlLang(xmlTextReaderPtr reader)\r
+                       * @desc                 Positive Test for xmlTextReaderConstXmlLang\r
+                       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+                       * @b tester             Michel Anthony (michelj@samsung.com)\r
+                       * @return               void\r
+                       * @see                  none\r
+                       * @remarks\r
+                       *       positive Test Case:\r
+                       *       input1: [Get the reader by reading the file "/Home/SUTstest/valid/ent2" using xmlNewTextReaderFilename() and n_reader == 0,\r
+                       *                               Call "desret_const_xmlChar_ptr()" to free xmlChar pointer(ret_val), Call "des_xmlTextReaderPtr()" to free reader pointer(reader) and Call "des_const_xmlChar_ptr" to free xmlchar pointer  ] @n\r
+                       *               {xmlTextReaderPtr (reader),const xmlChar*(str) } => {N/A | const xmlChar(==NULL)} @n\r
+                       *\r
+                       *       positive Test Case:\r
+                       *       input1: [Get the reader by reading the file ""/Home/SUTstest/valid/REC-xml-19980210.xml" using xmlNewTextReaderFilename() and n_reader == 0,\r
+                       *                               Call "desret_const_xmlChar_ptr()" to free xmlChar pointer(ret_val), Call "des_xmlTextReaderPtr()" to free reader pointer(reader) and Call "des_const_xmlChar_ptr" to free xmlchar pointer  ] @n\r
+                       *               {xmlTextReaderPtr (reader),const xmlChar*(str) } => {N/A | const xmlChar(==NULL)} @n\r
+                       *\r
+                       *       positive Test Case:\r
+                       *       input1: [Get the reader by reading the file "/Home/SUTstest/valid/xhtml1-strict.dtd" using xmlNewTextReaderFilename() and n_reader == 0,\r
+                       *                               Call "desret_const_xmlChar_ptr()" to free xmlChar pointer(ret_val), Call "des_xmlTextReaderPtr()" to free reader pointer(reader) and Call "des_const_xmlChar_ptr" to free xmlchar pointer  ] @n\r
+                       *               {xmlTextReaderPtr (reader),const xmlChar*(str) } => {N/A | const xmlChar(==NULL)} @n\r
+                       *\r
+                       *       Negative Test Case:\r
+                       *       input1: [Get the reader as NULL.using xmlNewTextReaderFilename() and n_reader == 3,\r
+                       *                               Call "desret_const_xmlChar_ptr()" to free xmlChar pointer(ret_val), Call "des_xmlTextReaderPtr()" to free reader pointer(reader) and Call "des_const_xmlChar_ptr" to free xmlchar pointer  ] @n\r
+                       *               {xmlTextReaderPtr (reader),const xmlChar*(str) } => {N/A | const xmlChar(==NULL)} @n\r
+\r
+\r
+                       * @b priority   Middle\r
+                       * @ etc         none\r
+                       */\r
+static void UTcXmlTextReaderConstXmlLangP01()\r
+{\r
+       const xmlChar * ret_val;\r
+       xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */\r
+       int n_reader;\r
+\r
+       for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {\r
+               reader = gen_xmlTextReaderPtr_TextReaderBase(n_reader, 0);\r
+\r
+               ret_val = xmlTextReaderConstXmlLang(reader);\r
+\r
+               if(ret_val != NULL)\r
+               {\r
+                       //Positive Test\r
+                       DTS_CHECK_NE_MESSAGE("xmlTextReaderConstXmlLang", (void *)ret_val, (void *)NULL, "xmlTextReaderConstXmlLang Failed");\r
+               }\r
+\r
+               if(ret_val == NULL)\r
+               {\r
+                       //negative Test\r
+                       DTS_CHECK_EQ_MESSAGE("xmlTextReaderConstXmlLang", (void *)ret_val, (void *)NULL, "xmlTextReaderConstXmlLang Failed");\r
+               }\r
+\r
+               desret_const_xmlChar_ptr(ret_val);\r
+               des_xmlTextReaderPtr(n_reader, reader, 0);\r
+               xmlResetLastError();\r
+       }\r
+}\r
+       /**\r
+       * @test                 UTcXmlTextReaderCurrentDocP01\r
+       * @brief                xmlDocPtr xmlTextReaderCurrentDoc(xmlTextReaderPtr reader)\r
+       * @desc                 Positive Test for xmlTextReaderCurrentDoc\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks\r
+       *       Negative Test Case:\r
+       *       input1: [Get the reader by reading the file "/Home/SUTstest/valid/ent2" using xmlNewTextReaderFilename() and n_reader == 0,\r
+       *                               Call "desret_xmlDocPtr()" to free  xmlDocPtr pointer, Call "des_xmlTextReaderPtr()" to free reader pointer(reader)] @n\r
+       *               {xmlTextReaderPtr (reader) } => {N/A | xmlDocPtr(==NULL)} @n\r
+       *\r
+       *       negative Test Case:\r
+       *       input1: [Get the reader by reading the file ""/Home/SUTstest/valid/REC-xml-19980210.xml" using xmlNewTextReaderFilename() and n_reader == 1,\r
+       *                               Call "desret_xmlDocPtr()" to free  xmlDocPtr pointer, Call "des_xmlTextReaderPtr()" to free reader pointer(reader)] @n\r
+       *               {xmlTextReaderPtr (reader) } => {N/A | xmlDocPtr(==NULL)} @n\r
+       *\r
+       *       positive Test Case:\r
+       *       input1: [Get the reader by reading the file "/Home/SUTstest/valid/xhtml1-strict.dtd" using xmlNewTextReaderFilename() and n_reader == 2,\r
+       *                               Call "desret_xmlDocPtr()" to free  xmlDocPtr pointer, Call "des_xmlTextReaderPtr()" to free reader pointer(reader)] @n\r
+       *               {xmlTextReaderPtr (reader) } => {N/A | xmlDocPtr(!=NULL)} @n\r
+       *\r
+       *       Negative Test Case:\r
+       *       input1: [Get the reader as NULL.using xmlNewTextReaderFilename() and n_reader == 3,\r
+       *                               Call "desret_xmlDocPtr()" to free  xmlDocPtr pointer, Call "des_xmlTextReaderPtr()" to free reader pointer(reader)] @n\r
+       *               {xmlTextReaderPtr (reader)} => {N/A | xmlDocPtr(==NULL)} @n\r
+\r
+\r
+       * @b priority   Middle\r
+       * @ etc         none\r
+       */\r
+static void UTcXmlTextReaderCurrentDocP01()\r
+{\r
+    xmlDocPtr ret_val;\r
+    xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */\r
+    int n_reader;\r
+\r
+    for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {\r
+\r
+        reader = gen_xmlTextReaderPtr_TextReaderBase(n_reader, 0);\r
+        ret_val = xmlTextReaderCurrentDoc(reader);\r
+\r
+        if(ret_val != NULL && n_reader == 2)\r
+        {\r
+               //Positive test\r
+               DTS_CHECK_NE_MESSAGE("xmlTextReaderCurrentDoc", (void *)ret_val, (void *)NULL, "xmlTextReaderCurrentDoc positive Failed");\r
+        }\r
+\r
+        if(ret_val == NULL && (n_reader == 0 || n_reader == 1 || n_reader == 3))\r
+        {\r
+               //Negative test\r
+               DTS_CHECK_EQ_MESSAGE("xmlTextReaderCurrentDoc", (void *)ret_val, (void *)NULL, "xmlTextReaderCurrentDoc negative Failed");\r
+        }\r
+        desret_xmlDocPtr(ret_val);\r
+        des_xmlTextReaderPtr(n_reader, reader, 0);\r
+        xmlResetLastError();\r
+    }\r
+}\r
+       /**    \r
+       * @test                 UTcxmlTextReaderIsDefault01\r
+       * @brief                int xmlTextReaderIsDefault(xmlTextReaderPtr reader)\r
+       * @desc         +ve and _ve TCs for xmlTextReaderIsDefault\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Sathish Kumar (satish.k4@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks\r
+       *\r
+       * @b priority\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlTextReaderIsDefault01()\r
+{\r
+#if defined(LIBXML_READER_ENABLED)\r
+       int ret_val;\r
+       xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */\r
+       int n_reader;\r
+\r
+       for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {\r
+               reader = gen_xmlTextReaderPtr(n_reader, 0);\r
+\r
+               ret_val = xmlTextReaderIsDefault(reader);\r
+               if(reader)\r
+                       {\r
+                               DTS_CHECK_NE_MESSAGE("xmlTextReaderIsDefault", (void *)ret_val, (void *)-1, "xmlTextReaderIsDefault Failed");\r
+                       }\r
+               else\r
+                       {\r
+                               DTS_CHECK_EQ_MESSAGE("xmlTextReaderIsDefault", (void *)ret_val, (void *)-1, "xmlTextReaderIsDefault Failed");\r
+                       }\r
+               //AppLog("UTcxmlTextReaderIsDefaultP01 reader [%u] ret_val [%d]",reader,ret_val);\r
+               desret_int(ret_val);\r
+               des_xmlTextReaderPtr(n_reader, reader, 0);\r
+               xmlResetLastError();\r
+       }\r
+#endif\r
+}\r
+       /**\r
+       * @test                 UTcxmlTextReaderIsEmptyElement01\r
+       * @brief                int xmlTextReaderIsEmptyElement(xmlTextReaderPtr reader)\r
+       * @desc         +ve and _ve TCs for xmlTextReaderIsEmptyElement\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Sathish Kumar (satish.k4@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks\r
+       *\r
+       * @b priority\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlTextReaderIsEmptyElement01()\r
+{\r
\r
+\r
+#if defined(LIBXML_READER_ENABLED)\r
+       int ret_val;\r
+       xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */\r
+       int n_reader;\r
+       int ret = 0;\r
+       for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {\r
+               reader = gen_xmlTextReaderPtr(n_reader, 0);\r
+               ret = xmlTextReaderRead(reader);\r
+               while (ret == 1)\r
+               {\r
+                       ret_val = xmlTextReaderIsEmptyElement(reader);\r
+                       ret = xmlTextReaderRead(reader);\r
+               }\r
+\r
+               DTS_CHECK_NE_MESSAGE("xmlTextReaderRead", (void *)ret_val, (void *)-1, "xmlTextReaderRead Failed");\r
+               desret_int(ret_val);\r
+               des_xmlTextReaderPtr(n_reader, reader, 0);\r
+               xmlResetLastError();\r
+               }\r
+#endif\r
+}\r
+       /**\r
+       * @test                 UTcxmlTextReaderIsValid01\r
+       * @brief                int xmlTextReaderIsValid(xmlTextReaderPtr reader)\r
+       * @desc         +ve and _ve TCs for xmlTextReaderIsValid\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Sathish Kumar (satish.k4@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks\r
+       *\r
+       * @b priority\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlTextReaderIsValid01()\r
+{\r
+#if defined(LIBXML_READER_ENABLED)\r
+       int ret_val;\r
+       xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */\r
+       int n_reader;\r
+       int ret = 0;\r
+       for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {\r
+               reader = gen_xmlTextReaderPtr(n_reader, 0);\r
+               ret = xmlTextReaderRead(reader);\r
+               while (ret == 1)\r
+               {\r
+                       ret_val = xmlTextReaderIsValid(reader);\r
+                       ret = xmlTextReaderRead(reader);\r
+               }\r
+\r
+               DTS_CHECK_NE_MESSAGE("xmlTextReaderRead", (void *)ret_val, (void *)-1, "xmlTextReaderRead Failed");\r
+               desret_int(ret_val);\r
+               des_xmlTextReaderPtr(n_reader, reader, 0);\r
+               xmlResetLastError();\r
+       }\r
+#endif\r
+}\r
+       /**\r
+       * @test                 UTcxmlTextReaderLocalName01\r
+       * @brief                xmlChar *xmlTextReaderLocalName(xmlTextReaderPtr reader)\r
+       * @desc         +ve and _ve TCs for xmlTextReaderLocalName\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Sathish Kumar (satish.k4@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks\r
+       *\r
+       * @b priority\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlTextReaderLocalName01()\r
+{\r
+#if defined(LIBXML_READER_ENABLED)\r
+       xmlChar * ret_val;\r
+       xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */\r
+       int n_reader;\r
+       int ret = 0;\r
+       for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {\r
+               reader = gen_xmlTextReaderPtr(n_reader, 0);\r
+               ret = xmlTextReaderRead(reader);\r
+               while (ret == 1)\r
+               {\r
+                       ret_val = xmlTextReaderLocalName(reader);\r
+                       ret = xmlTextReaderRead(reader);\r
+               }\r
+\r
+               DTS_CHECK_NE_MESSAGE("xmlTextReaderRead", (void *)ret_val, (void *)-1, "xmlTextReaderRead Failed");\r
+               //desret_xmlChar_ptr(ret_val);\r
+//             des_xmlTextReaderPtr(n_reader, reader, 0);\r
+               xmlResetLastError();\r
+       }\r
+#endif\r
+}\r
+\r
+static void des_xmlTextReaderLocatorPtr(int no ATTRIBUTE_UNUSED, xmlTextReaderLocatorPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED)\r
+{\r
+\r
+}\r
+\r
+static xmlTextReaderLocatorPtr gen_xmlTextReaderLocatorPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED)\r
+{\r
+    return(NULL);\r
+}\r
+       /**\r
+       * @test                 UTcxmlTextReaderLocatorBaseURI01\r
+       * @brief                xmlChar *xmlTextReaderLocatorBaseURI(xmlTextReaderLocatorPtr locator)\r
+       * @desc         +ve and _ve TCs for xmlTextReaderLocatorBaseURI\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Sathish Kumar (satish.k4@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks      input1: [N/A, N/A] @n\r
+                           {xmlTextReaderLocatorPtr(NULL)} => {N/A | int(NULL)} @n\r
+       * @b priority\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlTextReaderLocatorBaseURI01()\r
+{\r
+#if defined(LIBXML_READER_ENABLED)\r
+       xmlChar * ret_val;\r
+       xmlTextReaderLocatorPtr locator; /* the xmlTextReaderLocatorPtr used */\r
+       int n_locator;\r
+\r
+       for (n_locator = 0;n_locator < gen_nb_xmlTextReaderLocatorPtr;n_locator++) {\r
+               locator = gen_xmlTextReaderLocatorPtr(n_locator, 0);\r
+               ret_val = xmlTextReaderLocatorBaseURI(locator);\r
+               if( locator )\r
+                       {\r
+                       DTS_CHECK_NE_MESSAGE("xmlTextReaderLocatorBaseURI", (void *)ret_val, (void *)NULL, "xmlTextReaderLocatorBaseURI Failed");\r
+                       }\r
+               else\r
+                       {\r
+                               DTS_CHECK_EQ_MESSAGE("xmlTextReaderLocatorBaseURI", (void *)ret_val, (void *)NULL, "xmlTextReaderLocatorBaseURI Failed");\r
+                       }\r
+               desret_xmlChar_ptr(ret_val);\r
+               des_xmlTextReaderLocatorPtr(n_locator, locator, 0);\r
+               xmlResetLastError();\r
+       }   \r
+#endif\r
+}\r
+       /**\r
+       * @test                 UTcxmlTextReaderLocatorLineNumber01\r
+       * @brief                int xmlTextReaderLocatorLineNumber(xmlTextReaderLocatorPtr locator)\r
+       * @desc         +ve and _ve TCs for xmlTextReaderLocatorLineNumber\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Sathish Kumar (satish.k4@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks      input1: [N/A, N/A] @n\r
+                           {xmlTextReaderLocatorPtr(NULL)} => {N/A | int(-1)} @n\r
+       * @b priority\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlTextReaderLocatorLineNumber01()\r
+{\r
\r
+\r
+#if defined(LIBXML_READER_ENABLED)\r
+    \r
+    int ret_val;\r
+    xmlTextReaderLocatorPtr locator; /* the xmlTextReaderLocatorPtr used */\r
+    int n_locator;\r
+\r
+    for (n_locator = 0;n_locator < gen_nb_xmlTextReaderLocatorPtr;n_locator++) {\r
+        \r
+        locator = gen_xmlTextReaderLocatorPtr(n_locator, 0);\r
+\r
+               // @remarks   input1: [N/A, N/A] @n\r
+           //                    {xmlTextReaderLocatorPtr(NULL)} => {N/A | int(-1)} @n\r
+        ret_val = xmlTextReaderLocatorLineNumber(NULL);//-ve\r
+       DTS_CHECK_EQ_MESSAGE("xmlTextReaderLocatorLineNumber", (void *)ret_val, (void *)-1, "xmlTextReaderLocatorLineNumber Failed");\r
+\r
+        desret_int(ret_val);\r
+        des_xmlTextReaderLocatorPtr(n_locator, locator, 0);\r
+        xmlResetLastError();\r
+    }\r
+    \r
+#endif\r
+}\r
+       /**\r
+       * @test                 UTcxmlTextReaderLookupNamespace01\r
+       * @brief                xmlChar *xmlTextReaderLookupNamespace(xmlTextReaderPtr reader, const xmlChar *prefix)\r
+       * @desc         +ve and _ve TCs for xmlTextReaderLookupNamespace\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Sathish Kumar (satish.k4@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks      input1: [N/A, N/A] @n\r
+                       {xmlTextReaderPtr(valid ptr), xmlChar(valid ptr)} => {N/A | xmlChar(xmlChar)} @n\r
+                       input2: [N/A, N/A] @n\r
+                           {xmlTextReaderPtr(NULL), xmlChar(valid ptr)} => {N/A | N/A} @n\r
+       * @b priority\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlTextReaderLookupNamespace01()\r
+{\r
\r
+\r
+#if defined(LIBXML_READER_ENABLED)\r
+       xmlChar * ret_val;\r
+       xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */\r
+       int n_reader;\r
+       xmlChar * prefix; /* the prefix whose namespace URI is to be resolved. To return the default namespace, specify NULL */\r
+       int n_prefix;\r
+       int ret = 0;\r
+       for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {\r
+               for (n_prefix = 0;n_prefix < gen_nb_const_xmlChar_ptr;n_prefix++) {\r
+                       reader = gen_xmlTextReaderPtr(0, 0);\r
+                       prefix = gen_const_xmlChar_ptr(n_prefix, 1);\r
+\r
+                       ret = xmlTextReaderRead(reader);\r
+                       while (ret == 1)\r
+                       {\r
+                               ret_val = xmlTextReaderLookupNamespace(reader, (const xmlChar *)prefix);\r
+                               ret = xmlTextReaderRead(reader);\r
+                       }\r
+\r
+                       DTS_CHECK_NE_MESSAGE("xmlTextReaderRead", (void *)ret_val, (void *)NULL, "xmlTextReaderRead Failed");\r
+                       desret_xmlChar_ptr(ret_val);\r
+                       des_xmlTextReaderPtr(n_reader, reader, 0);\r
+                       des_const_xmlChar_ptr(n_prefix, (const xmlChar *)prefix, 1);\r
+                       xmlResetLastError();\r
+               }\r
+       }   \r
+#endif\r
+}\r
+       /**\r
+       * @test                 UTcxmlTextReaderMoveToAttributeNo01\r
+       * @brief                int xmlTextReaderMoveToAttributeNo(xmlTextReaderPtr reader, int no)\r
+       * @desc         +ve and _ve TCs for xmlTextReaderMoveToAttributeNo\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Sathish Kumar (satish.k4@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks      input1: [N/A, N/A] @n\r
+                       {xmlTextReaderPtr(NULL), int(valid)} => {N/A | N/A} @n\r
+                       input2: [N/A, N/A] @n\r
+                           {xmlTextReaderPtr(reader), int(valid)} => {N/A | N/A} @n\r
+       *\r
+       * @b priority\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlTextReaderMoveToAttributeNo01()\r
+{\r
\r
+\r
+#if defined(LIBXML_READER_ENABLED)\r
+    \r
+    int ret_val;\r
+    xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */\r
+    int n_reader;\r
+    int no; /* the zero-based index of the attribute relative to the containing element. */\r
+    int n_no;\r
+\r
+    for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {\r
+    for (n_no = 0;n_no < gen_nb_int;n_no++) {\r
+        \r
+        reader = gen_xmlTextReaderPtr(n_reader, 0);\r
+        no = gen_int(n_no, 1);\r
+\r
+       // @remarks   input1: [N/A, N/A] @n\r
+        //               {xmlTextReaderPtr(NULL), int(valid)} => {N/A | N/A} @n\r
+        ret_val = xmlTextReaderMoveToAttributeNo(NULL, no);\r
+       DTS_CHECK_EQ_MESSAGE("xmlTextReaderMoveToAttributeNo", (void *)ret_val, (void *)-1, "xmlTextReaderMoveToAttributeNo Failed");\r
+               \r
+\r
+       // @remarks   input2: [N/A, N/A] @n\r
+        //               {xmlTextReaderPtr(reader), int(valid)} => {N/A | N/A} @n\r
+        if(n_reader)\r
+        {\r
+                       ret_val = xmlTextReaderMoveToAttributeNo(reader, no);\r
+                       DTS_CHECK_NE_MESSAGE("xmlTextReaderMoveToAttributeNo", (void *)ret_val, (void *)NULL, "xmlTextReaderMoveToAttributeNo Failed");\r
+                       \r
+        }\r
+\r
+        desret_int(ret_val);\r
+        des_xmlTextReaderPtr(n_reader, reader, 0);\r
+        des_int(n_no, no, 1);\r
+        xmlResetLastError();\r
+    }\r
+    }\r
+    \r
+#endif\r
+}\r
+       /**\r
+       * @test                 UTcxmlTextReaderMoveToAttributeNs01\r
+       * @brief                int xmlTextReaderMoveToAttributeNs(xmlTextReaderPtr reader,\r
+                                                          const xmlChar *localName,\r
+                                                          const xmlChar *namespaceURI)\r
+       * @desc         +ve and _ve TCs for xmlTextReaderMoveToAttributeNs\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Sathish Kumar (satish.k4@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks      input1: [N/A, N/A] @n\r
+                           {xmlTextReaderPtr(reader), xmlChar(localName), xmlChar(namespaceURI)} => {N/A | ret_val(valid ptr)} @n\r
+                           input2: [N/A, N/A] @n\r
+                           {xmlTextReaderPtr(NULL), xmlChar(localName), xmlChar(namespaceURI)} => {N/A | ret_val(NULL)} @n\r
+                           input3: [N/A, N/A] @n\r
+                       {xmlTextReaderPtr(reader), xmlChar(NULL), xmlChar(namespaceURI)} => {N/A | ret_val(NULL)} @n\r
+                       input4: [N/A, N/A] @n\r
+                       {xmlTextReaderPtr(reader), xmlChar(localName), xmlChar(NULL)} => {N/A | ret_val(NULL)} @n\r
+       *\r
+       * @b priority\r
+       * @b etc                none\r
+       */\r
+\r
+static void UTcxmlTextReaderMoveToAttributeNs01()\r
+{\r
\r
+\r
+#if defined(LIBXML_READER_ENABLED)\r
+    \r
+    int ret_val;\r
+    xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */\r
+    int n_reader;\r
+    xmlChar * localName; /* the local name of the attribute. */\r
+    int n_localName;\r
+    xmlChar * namespaceURI; /* the namespace URI of the attribute. */\r
+    int n_namespaceURI;\r
+\r
+    for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {\r
+    for (n_localName = 0;n_localName < gen_nb_const_xmlChar_ptr;n_localName++) {\r
+    for (n_namespaceURI = 0;n_namespaceURI < gen_nb_const_xmlChar_ptr;n_namespaceURI++) {\r
+        \r
+        reader = gen_xmlTextReaderPtr(n_reader, 0);\r
+        localName = gen_const_xmlChar_ptr(n_localName, 1);\r
+        namespaceURI = gen_const_xmlChar_ptr(n_namespaceURI, 2);\r
+\r
+       // @remarks   input1: [N/A, N/A] @n\r
+        //               {xmlTextReaderPtr(reader), xmlChar(localName), xmlChar(namespaceURI)} => {N/A | ret_val(valid ptr)} @n\r
+\r
+        ret_val = xmlTextReaderMoveToAttributeNs(reader, (const xmlChar *)localName, (const xmlChar *)namespaceURI);\r
+               DTS_CHECK_NE_MESSAGE("xmlTextReaderMoveToAttributeNs", (void *)ret_val, (void *)NULL, "xmlTextReaderMoveToAttributeNs Failed");\r
+\r
+       // @remarks   input2: [N/A, N/A] @n\r
+        //               {xmlTextReaderPtr(NULL), xmlChar(localName), xmlChar(namespaceURI)} => {N/A | ret_val(NULL)} @n\r
+               ret_val = xmlTextReaderMoveToAttributeNs(NULL, (const xmlChar *)localName, (const xmlChar *)namespaceURI);\r
+               DTS_CHECK_EQ_MESSAGE("xmlTextReaderMoveToAttributeNs", (void *)ret_val, (void *)-1, "xmlTextReaderMoveToAttributeNs Failed");\r
+\r
+       // @remarks   input3: [N/A, N/A] @n\r
+        //               {xmlTextReaderPtr(reader), xmlChar(NULL), xmlChar(namespaceURI)} => {N/A | ret_val(NULL)} @n\r
+               ret_val = xmlTextReaderMoveToAttributeNs(reader, NULL, (const xmlChar *)namespaceURI);\r
+               DTS_CHECK_EQ_MESSAGE("xmlTextReaderMoveToAttributeNs", (void *)ret_val, (void *)-1, "xmlTextReaderMoveToAttributeNs Failed");\r
+\r
+       // @remarks   input4: [N/A, N/A] @n\r
+        //               {xmlTextReaderPtr(reader), xmlChar(localName), xmlChar(NULL)} => {N/A | ret_val(NULL)} @n\r
+               ret_val = xmlTextReaderMoveToAttributeNs(reader, (const xmlChar *)localName, NULL);\r
+               DTS_CHECK_EQ_MESSAGE("xmlTextReaderMoveToAttributeNs", (void *)ret_val, (void *)-1, "xmlTextReaderMoveToAttributeNs Failed");\r
+\r
+        desret_int(ret_val);\r
+        des_xmlTextReaderPtr(n_reader, reader, 0);\r
+        des_const_xmlChar_ptr(n_localName, (const xmlChar *)localName, 1);\r
+        des_const_xmlChar_ptr(n_namespaceURI, (const xmlChar *)namespaceURI, 2);\r
+        xmlResetLastError();\r
+    }\r
+    }\r
+    }\r
+    \r
+#endif\r
+}\r
+       /**\r
+       * @test                 UTcxmlTextReaderMoveToElement01\r
+       * @brief                int xmlTextReaderMoveToElement(xmlTextReaderPtr reader)\r
+       * @desc         +ve and _ve TCs for xmlTextReaderMoveToElement\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Sathish Kumar (satish.k4@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks      input1: [N/A, N/A] @n\r
+                       {xmlTextReaderPtr(reader)} => {N/A | int(0)} @n\r
+       *\r
+       * @b priority\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlTextReaderMoveToElement01()\r
+{\r
+#if defined(LIBXML_READER_ENABLED)\r
+       int ret_val;\r
+       xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */\r
+       int n_reader;\r
+       int ret = 0;\r
+       for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {\r
+               //reader = gen_xmlTextReaderPtr(n_reader, 0);\r
+               reader = gen_xmlTextReaderPtr(0, 0);\r
+               ret = xmlTextReaderRead(reader);\r
+               while (ret == 1)\r
+               {\r
+                       ret_val = xmlTextReaderMoveToElement(reader);\r
+                       ret = xmlTextReaderRead(reader);\r
+               }\r
+\r
+               DTS_CHECK_EQ_MESSAGE("xmlTextReaderMoveToElement", (void *)ret_val, (void *)0, "xmlTextReaderMoveToElement Failed");\r
+               desret_int(ret_val);\r
+               des_xmlTextReaderPtr(n_reader, reader, 0);\r
+               xmlResetLastError();\r
+               }\r
+#endif\r
+}\r
+       /**\r
+       * @test                 UTcxmlTextReaderMoveToNextAttribute01\r
+       * @brief                int xmlTextReaderMoveToNextAttribute(xmlTextReaderPtr reader)\r
+       * @desc         +ve and _ve TCs for xmlTextReaderMoveToNextAttribute\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Sathish Kumar (satish.k4@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks      input1: [N/A, N/A] @n\r
+                       {xmlTextReaderPtr(reader)} => {N/A | int(0)} @n\r
+       *\r
+       * @b priority\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlTextReaderMoveToNextAttribute01()\r
+{\r
+#if defined(LIBXML_READER_ENABLED)\r
+       int ret_val;\r
+       xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */\r
+       int n_reader;\r
+       int ret = 0;\r
+\r
+       for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {\r
+               //reader = gen_xmlTextReaderPtr(n_reader, 0);\r
+               reader = gen_xmlTextReaderPtr(0, 0);\r
+               ret = xmlTextReaderRead(reader);\r
+               while (ret == 1)\r
+               {\r
+                       ret_val = xmlTextReaderMoveToNextAttribute(reader);\r
+                       ret = xmlTextReaderRead(reader);\r
+               }\r
+\r
+               DTS_CHECK_NE_MESSAGE("xmlTextReaderMoveToNextAttribute", (void *)ret_val, (void *)-1, "xmlTextReaderMoveToNextAttribute Failed");\r
+               desret_int(ret_val);\r
+               des_xmlTextReaderPtr(n_reader, reader, 0);\r
+               xmlResetLastError();\r
+       }\r
+#endif\r
+}\r
+       /**\r
+       * @test                 UTcxmlTextReaderName01\r
+       * @brief                xmlChar *xmlTextReaderName(xmlTextReaderPtr reader)\r
+       * @desc         +ve and _ve TCs for xmlTextReaderName\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Sathish Kumar (satish.k4@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks      input1: [N/A, N/A] @n\r
+                           {xmlTextReaderPtr(reader)} => {N/A | int(0)} @n\r
+       *\r
+       * @b priority\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlTextReaderName01()\r
+{\r
+#if defined(LIBXML_READER_ENABLED)\r
+       xmlChar * ret_val;\r
+       xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */\r
+       int n_reader;\r
+       int ret = 0;\r
+       for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {\r
+               //reader = gen_xmlTextReaderPtr(n_reader, 0);\r
+               reader = gen_xmlTextReaderPtr(0, 0);\r
+               ret = xmlTextReaderRead(reader);\r
+               while (ret == 1)\r
+               {\r
+                       ret_val = xmlTextReaderName(reader);\r
+                       ret = xmlTextReaderRead(reader);\r
+               }\r
+\r
+               DTS_CHECK_NE_MESSAGE("xmlTextReaderName", (void *)ret_val, (void *)NULL, "xmlTextReaderName Failed");\r
+               desret_xmlChar_ptr(ret_val);\r
+               des_xmlTextReaderPtr(n_reader, reader, 0);\r
+               xmlResetLastError();\r
+       }\r
+#endif\r
+}\r
+       /**\r
+       * @test                 UTcxmlTextReaderNamespaceUri01\r
+       * @brief                xmlChar *xmlTextReaderNamespaceUri(xmlTextReaderPtr reader)\r
+       * @desc         +ve and _ve TCs for xmlTextReaderNamespaceUri\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Sathish Kumar (satish.k4@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks      input1: [N/A, N/A] @n\r
+                           {xmlTextReaderPtr(reader)} => {N/A | int(0)} @n\r
+\r
+       *\r
+       * @b priority\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlTextReaderNamespaceUri01()\r
+{\r
+#if defined(LIBXML_READER_ENABLED)\r
+       xmlChar * ret_val;\r
+       xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */\r
+       int n_reader;\r
+       int ret = 0;\r
+       for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {\r
+               //reader = gen_xmlTextReaderPtr(n_reader, 0);\r
+               reader = gen_xmlTextReaderPtr(0, 0);\r
+               ret = xmlTextReaderRead(reader);\r
+               while (ret == 1)\r
+               {\r
+                       ret_val = xmlTextReaderNamespaceUri(reader);\r
+                       ret = xmlTextReaderRead(reader);\r
+               }\r
+\r
+               DTS_CHECK_NE_MESSAGE("xmlTextReaderNamespaceUri", (void *)ret_val, (void *)NULL, "xmlTextReaderNamespaceUri Failed");\r
+               desret_xmlChar_ptr(ret_val);\r
+               des_xmlTextReaderPtr(n_reader, reader, 0);\r
+               xmlResetLastError();\r
+       }\r
+#endif\r
+}\r
+       /**\r
+       * @test                 UTcxmlTextReaderNextSibling01\r
+       * @brief                int xmlTextReaderNextSibling(xmlTextReaderPtr reader)\r
+       * @desc         +ve and _ve TCs for xmlTextReaderNextSibling\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Sathish Kumar (satish.k4@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks      input1: [N/A, N/A] @n\r
+                       {xmlTextReaderPtr(reader)} => {N/A | int(0)} @n\r
+       *\r
+       * @b priority\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlTextReaderNextSibling01()\r
+{\r
+#if defined(LIBXML_READER_ENABLED)\r
+       int ret_val;\r
+       xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */\r
+       int n_reader;\r
+       int ret = 0;\r
+       for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {\r
+               //reader = gen_xmlTextReaderPtr(n_reader, 0);\r
+               reader = gen_xmlTextReaderPtr(0, 0);\r
+               ret = xmlTextReaderRead(reader);\r
+               while (ret == 1)\r
+               {\r
+                       ret_val = xmlTextReaderNextSibling(reader);\r
+                       ret = xmlTextReaderRead(reader);\r
+               }\r
+\r
+               DTS_CHECK_EQ_MESSAGE("xmlTextReaderNextSibling", (void *)ret_val, (void *)-1, "xmlTextReaderNextSibling Failed");\r
+               desret_int(ret_val);\r
+               des_xmlTextReaderPtr(n_reader, reader, 0);\r
+               xmlResetLastError();\r
+       }\r
+#endif\r
+}\r
+       /**\r
+       * @test                 UTcxmlTextReaderNodeType01\r
+       * @brief                int xmlTextReaderNodeType(xmlTextReaderPtr reader)\r
+       * @desc         +ve and _ve TCs for xmlTextReaderNodeType\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Sathish Kumar (satish.k4@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks      input1: [N/A, N/A] @n\r
+                       {xmlTextReaderPtr(reader)} => {N/A | int(0)} @n\r
+       *\r
+       * @b priority\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlTextReaderNodeType01()\r
+{\r
+#if defined(LIBXML_READER_ENABLED)\r
+       int ret_val;\r
+       xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */\r
+       int n_reader;\r
+\r
+       for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {\r
+               reader = gen_xmlTextReaderPtr(n_reader, 0);\r
+\r
+               ret_val = xmlTextReaderNodeType(reader);\r
+               if( reader )\r
+               {\r
+                       DTS_CHECK_NE_MESSAGE("xmlTextReaderNodeType", (void *)ret_val, (void *)-1, "xmlTextReaderNodeType Failed");\r
+               }\r
+               else\r
+               {\r
+                       DTS_CHECK_EQ_MESSAGE("xmlTextReaderNodeType", (void *)ret_val, (void *)-1, "xmlTextReaderNodeType Failed");\r
+               }\r
+\r
+               desret_int(ret_val);\r
+               des_xmlTextReaderPtr(n_reader, reader, 0);\r
+               xmlResetLastError();\r
+       }\r
+#endif\r
+}\r
+       /**\r
+       * @test                 UTcxmlTextReaderNormalization01\r
+       * @brief                int xmlTextReaderNormalization(xmlTextReaderPtr reader)\r
+       * @desc         +ve and _ve TCs for xmlTextReaderNormalization\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Sathish Kumar (satish.k4@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks      input1: [N/A, N/A] @n\r
+                           {xmlTextReaderPtr(reader)} => {N/A | int(-1)} @n\r
+                           input2: [N/A, N/A] @n\r
+                               {xmlTextReaderPtr(reader)} => {N/A | int(1)} @n\r
+       *\r
+       * @b priority\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlTextReaderNormalization01()\r
+{\r
\r
+\r
+#if defined(LIBXML_READER_ENABLED)\r
+       int ret_val;\r
+       xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */\r
+       int n_reader;\r
+\r
+       for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {\r
+               reader = gen_xmlTextReaderPtr(n_reader, 0);\r
+\r
+               ret_val = xmlTextReaderNormalization(reader);\r
+               if( reader )\r
+               {\r
+                       DTS_CHECK_NE_MESSAGE("xmlTextReaderNormalization", (void *)ret_val, (void *)-1, "xmlTextReaderNormalization Failed");\r
+               }\r
+               else\r
+               {\r
+                       DTS_CHECK_EQ_MESSAGE("xmlTextReaderNormalization", (void *)ret_val, (void *)-1, "xmlTextReaderNormalization Failed");\r
+               }                       \r
+               desret_int(ret_val);\r
+               des_xmlTextReaderPtr(n_reader, reader, 0);\r
+               xmlResetLastError();\r
+       }   \r
+#endif\r
+}\r
+       /**\r
+       * @test                 UTcxmlTextReaderPrefix01\r
+       * @brief                xmlChar *xmlTextReaderPrefix(xmlTextReaderPtr reader)\r
+       * @desc         +ve and _ve TCs for xmlTextReaderPrefix\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Sathish Kumar (satish.k4@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks      input1: [N/A, N/A] @n\r
+                           {xmlTextReaderPtr(NULL)} => {N/A | int(NULL)} @n\r
+                           input2: [N/A, N/A] @n\r
+                               {xmlTextReaderPtr(reader)} => {N/A | int(NULL)} @n\r
+       *\r
+       * @b priority\r
+       * @b etc                none\r
+       */\r
+\r
+static void UTcxmlTextReaderPrefix01()\r
+{\r
+#if defined(LIBXML_READER_ENABLED)\r
+       xmlChar * ret_val;\r
+       xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */\r
+       int n_reader;\r
+       int ret = 0;\r
+\r
+       for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {\r
+               //reader = gen_xmlTextReaderPtr(n_reader, 0);\r
+               reader = gen_xmlTextReaderPtr(0, 0);\r
+               ret = xmlTextReaderRead(reader);\r
+               while (ret == 1)\r
+               {\r
+                       ret_val = xmlTextReaderPrefix(reader);\r
+                       ret = xmlTextReaderRead(reader);\r
+               }\r
+               DTS_CHECK_NE_MESSAGE("xmlTextReaderPrefix", (void *)ret_val, (void *)NULL, "xmlTextReaderPrefix Failed");               \r
+               desret_xmlChar_ptr(ret_val);\r
+               des_xmlTextReaderPtr(n_reader, reader, 0);\r
+               xmlResetLastError();\r
+       }\r
+#endif\r
+}\r
+\r
+static void desret_xmlNodePtr(xmlNodePtr val)\r
+{\r
+    if ((val != NULL) && (val != api_root) && (val != (xmlNodePtr) api_doc))\r
+    {\r
+      xmlUnlinkNode(val);\r
+      xmlFreeNode(val);\r
+    }\r
+}\r
+       /**\r
+       * @test                 UTcxmlTextReaderPreserve01\r
+       * @brief                xmlNodePtr xmlTextReaderPreserve(xmlTextReaderPtr reader)\r
+       * @desc         +ve and _ve TCs for xmlTextReaderPreserve\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Sathish Kumar (satish.k4@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks      input1: [N/A, N/A] @n\r
+                               {xmlTextReaderPtr(reader)} => {N/A | int(NULL)} @n\r
+       *\r
+       * @b priority\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlTextReaderPreserve01()\r
+{\r
\r
+\r
+#if defined(LIBXML_READER_ENABLED)\r
+    \r
+    xmlNodePtr ret_val;\r
+    xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */\r
+    int n_reader;\r
+\r
+    for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {\r
+        \r
+        reader = gen_xmlTextReaderPtr(n_reader, 0);\r
+\r
+\r
+        if(n_reader == 0)\r
+        {\r
+               // @remarks   input1: [N/A, N/A] @n\r
+               //                {xmlTextReaderPtr(reader)} => {N/A | int(NULL)} @n\r
+               ret_val = xmlTextReaderPreserve(NULL);\r
+               DTS_CHECK_EQ_MESSAGE("xmlTextReaderPreserve", (void *)ret_val, (void *)NULL, "xmlTextReaderPreserve Failed");           \r
+        }\r
+\r
+        desret_xmlNodePtr(ret_val);\r
+        des_xmlTextReaderPtr(n_reader, reader, 0);\r
+        xmlResetLastError();\r
+    }\r
+    \r
+#endif\r
+}\r
+       /**\r
+       * @test                 UTcxmlTextReaderPreservePattern01\r
+       * @brief                int xmlTextReaderPreservePattern(xmlTextReaderPtr reader,\r
+       *                                                const xmlChar *pattern,\r
+                                                     const xmlChar **namespaces)\r
+       * @desc         +ve and _ve TCs for xmlTextReaderPreservePattern\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Sathish Kumar (satish.k4@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks      input1: [N/A, N/A] @n\r
+                           {xmlTextReaderPtr(NULL), const xmlChar *(pattern), const xmlChar **(namespaces)} => {N/A | N/A} @n\r
+                           input2: [N/A, N/A] @n\r
+                           {xmlTextReaderPtr(reader), const xmlChar *(NULL), const xmlChar **(namespaces)} => {N/A | N/A} @n\r
+       *\r
+       * @b priority\r
+       * @b etc                none\r
+       */\r
+       \r
+static void UTcxmlTextReaderPreservePattern01()\r
+{\r
\r
+\r
+#if defined(LIBXML_READER_ENABLED) && defined(LIBXML_PATTERN_ENABLED)\r
+#ifdef LIBXML_PATTERN_ENABLED\r
+    \r
+    int ret_val;\r
+    xmlTextReaderPtr reader; /* the xmlTextReaderPtr used */\r
+    int n_reader;\r
+    xmlChar * pattern; /* an XPath subset pattern */\r
+    int n_pattern;\r
+    xmlChar ** namespaces; /* the prefix definitions, array of [URI, prefix] or NULL */\r
+    int n_namespaces;\r
+\r
+    for (n_reader = 0;n_reader < gen_nb_xmlTextReaderPtr;n_reader++) {\r
+    for (n_pattern = 0;n_pattern < gen_nb_const_xmlChar_ptr;n_pattern++) {\r
+    for (n_namespaces = 0;n_namespaces < gen_nb_const_xmlChar_ptr_ptr;n_namespaces++) {\r
+        \r
+        reader = gen_xmlTextReaderPtr(n_reader, 0);\r
+        pattern = gen_const_xmlChar_ptr(n_pattern, 1);\r
+        namespaces = gen_const_xmlChar_ptr_ptr(n_namespaces, 2);\r
+\r
+       // @remarks   input1: [N/A, N/A] @n\r
+       //                {xmlTextReaderPtr(NULL), const xmlChar *(pattern), const xmlChar **(namespaces)} => {N/A | N/A} @n\r
+        ret_val = xmlTextReaderPreservePattern(NULL, (const xmlChar *)pattern, (const xmlChar **)namespaces);\r
+       DTS_CHECK_EQ_MESSAGE("xmlTextReaderPreservePattern", (void *)ret_val, (void *)-1, "xmlTextReaderPreservePattern Failed");               \r
+\r
+       // @remarks   input2: [N/A, N/A] @n\r
+       //                {xmlTextReaderPtr(reader), const xmlChar *(NULL), const xmlChar **(namespaces)} => {N/A | N/A} @n\r
+        {\r
+               xmlTextReaderPtr reader = gen_xmlTextReaderPtr(3, 0);\r
+               ret_val = xmlTextReaderPreservePattern(reader, NULL, (const xmlChar **)namespaces);\r
+               DTS_CHECK_EQ_MESSAGE("xmlTextReaderPreservePattern", (void *)ret_val, (void *)-1, "xmlTextReaderPreservePattern Failed");                       \r
+        }\r
+\r
+        desret_int(ret_val);\r
+        des_xmlTextReaderPtr(n_reader, reader, 0);\r
+        des_const_xmlChar_ptr(n_pattern, (const xmlChar *)pattern, 1);\r
+        des_const_xmlChar_ptr_ptr(n_namespaces, (const xmlChar **)namespaces, 2);\r
+        xmlResetLastError();\r
+    }\r
+    }\r
+    }\r
+    \r
+#endif\r
+#endif\r
+}\r
+\r
+static void startup( void);\r
+static void cleanup( void);\r
+\r
+void (*tet_startup)( void) = startup;\r
+void (*tet_cleanup)( void) = cleanup;\r
+\r
+static void startup( void)\r
+{\r
+        /* start of TC */\r
+        tet_printf("TC starts.");\r
+}\r
+\r
+static void cleanup( void)\r
+{\r
+        /* end of TC */\r
+        tet_printf("TC ends.");\r
+}\r
+\r
+struct tet_testlist tet_testlist[] = {\r
+       // Handling of out of context errors\r
+       {UTcXmlNewTextReaderFilenameP01,1},\r
+       {UTcXmlReaderForDocP01,2},\r
+       {UTcXmlReaderForFileP01,3},\r
+       {UTcXmlReaderForMemoryP01,4},\r
+       {UTcXmlReaderNewDocP01,5},\r
+       {UTcXmlReaderNewFileP01,6},\r
+       {UTcXmlReaderNewMemoryP01,7},\r
+       {UTcXmlReaderNewWalkerP01,8},\r
+       {UTcXmlReaderWalkerP01,9},\r
+       {UTcXmlTextReaderAttributeCountP01,10},\r
+\r
+       {UTcXmlTextReaderBaseUriP01,11},\r
+       {UTcXmlTextReaderCloseP01,12},\r
+       {UTcXmlTextReaderConstBaseUriP01,13},\r
+       {UTcXmlTextReaderConstLocalNameP01,14},\r
+       {UTcXmlTextReaderConstNameP01,15},\r
+       {UTcXmlTextReaderConstNamespaceUriP01,16},\r
+       {UTcXmlTextReaderConstPrefixP01,17},\r
+       {UTcXmlTextReaderConstStringP01,18},\r
+       {UTcXmlTextReaderConstValueP01,19},\r
+       {UTcXmlTextReaderConstXmlLangP01,20},\r
+\r
+       {UTcXmlTextReaderCurrentDocP01,21},\r
+       {UTcxmlTextReaderIsDefault01,22},\r
+       {UTcxmlTextReaderIsEmptyElement01,23},\r
+       {UTcxmlTextReaderIsValid01,24},\r
+       {UTcxmlTextReaderLocalName01,25},\r
+       {UTcxmlTextReaderLocatorBaseURI01,26},\r
+       {UTcxmlTextReaderLocatorLineNumber01,27},\r
+       {UTcxmlTextReaderLookupNamespace01,28},\r
+       {UTcxmlTextReaderMoveToAttributeNo01,29},\r
+       {UTcxmlTextReaderMoveToAttributeNs01,30},\r
+\r
+       {UTcxmlTextReaderMoveToElement01,31},\r
+       {UTcxmlTextReaderMoveToNextAttribute01,32},\r
+       {UTcxmlTextReaderName01,33},\r
+       {UTcxmlTextReaderNamespaceUri01,34},\r
+       {UTcxmlTextReaderNextSibling01,35},\r
+       {UTcxmlTextReaderNodeType01,36},\r
+       {UTcxmlTextReaderNormalization01,37},\r
+       {UTcxmlTextReaderPrefix01,38},\r
+       {UTcxmlTextReaderPreserve01,39},\r
+       {UTcxmlTextReaderPreservePattern01,40},\r
+       { NULL, 0 },\r
+       \r
+};\r
+\r
+\r
diff --git a/TC/testcase/utc_libxml_XmlSave.c b/TC/testcase/utc_libxml_XmlSave.c
new file mode 100755 (executable)
index 0000000..5fcc29d
--- /dev/null
@@ -0,0 +1,976 @@
+/*\r
+*  libxml test suite\r
+*\r
+* Copyright (c) 2012 Samsung Electronics Co., Ltd. All rights reserved.\r
+*\r
+* Contact: {Maintainer Name} <{Maintainer Email}>\r
+* \r
+* Licensed under the Apache License, Version 2.0 (the "License");\r
+* you may not use this file except in compliance with the License.\r
+* You may obtain a copy of the License at\r
+*\r
+* http://www.apache.org/licenses/LICENSE-2.0\r
+*\r
+* Unless required by applicable law or agreed to in writing, software\r
+* distributed under the License is distributed on an "AS IS" BASIS,\r
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+* See the License for the specific language governing permissions and\r
+* limitations under the License.\r
+*\r
+*/ \r
+\r
+#include "utc_libxml_include.h"\r
+#include "libxml/xmlsave.h"\r
+\r
+\r
+\r
+\r
+#ifdef DEBUG_MEM_LEAK\r
+extern "C" {\r
+       extern void MemStartSaveCallStack(void);\r
+       extern void MemEndSaveCallStack(void);\r
+       extern void MemPrintCurrentIndex(void);\r
+       extern void MemTraceAllocMemInfo(void);\r
+}\r
+#endif\r
+\r
+\r
+\r
+\r
+static void\r
+__Cleanup(xmlDocPtr doc)\r
+{\r
+       /* free up the resulting document */\r
+       xmlFreeDoc(doc);\r
+}\r
+\r
+\r
+\r
+static int\r
+__Escape(unsigned char * out, int * outlen, const unsigned char * in, int * inlen)\r
+{\r
+       //As of now do nothing, added for coverage\r
+       //Callback, would be called when saving element/attribute fails for some reason\r
+       return 0;\r
+}\r
+\r
+\r
+\r
+static int\r
+__IOwrite(void * context, const char * buffer, int len)\r
+{\r
+       int length = 0;\r
+       int result = -1;\r
+       length = fwrite( buffer, 1, len  ,(FILE *)context);\r
+       if(length == len)\r
+               return 1;\r
+       else \r
+               return -1;\r
+}\r
+\r
+\r
+\r
+static int\r
+__IOclose(void * context)\r
+{\r
+       return fclose( (FILE *) context);\r
+}\r
+\r
+\r
+       /**    \r
+       * @test                 UTcXmlSaveFileP01\r
+       * @brief                int xmlSaveFile (const char * filename, xmlDocPtr cur)\r
+       * @desc                 Positive Test for dump an XML document to a file.\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {const char *(UTSXMLHOME"/OP_XmlSaveFile.txt"), XmlDocPtr(cur)} => {N/A | Number of bytes written to file} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcXmlSaveFileP01()\r
+{\r
+       const char *pFilename = LIBXML2TESTXML;\r
+       const char *pOpfilename = UTSHOME"/OP_XmlSaveFile.txt";\r
+       xmlDocPtr doc; /* the resulting document tree used as Input */\r
+       int result = -1;\r
+\r
+       /*\r
+       * this initialize the library and check potential ABI mismatches\r
+       * between the version it was compiled for and the actual shared\r
+       * library used.\r
+       */\r
+       //LIBXML_TEST_VERSION\r
+\r
+       doc = xmlReadFile(pFilename, NULL, 0);\r
+       DTS_CHECK_NE_MESSAGE("xmlReadFile", (void *)doc, (void *)NULL, "xmlReadFile Failed");\r
+\r
+       /**\r
+       * @remarks   input1: [N/A, N/A] @n\r
+       * {"/Home/SUTsXml/OP_XmlSaveFile.txt", XmlDocPtr} => {N/A | Number of bytes written to file} @n\r
+       */      \r
+       result = xmlSaveFile(pOpfilename, doc);\r
+       DTS_CHECK_NE_MESSAGE("xmlReadFile", (void *)result, (void *)-1, "xmlReadFile Failed");\r
+\r
+       __Cleanup(doc);\r
+\r
+       //delete pFilename;\r
+       //delete pOpfilename;\r
+}\r
+       /**    \r
+       * @test                 UTcXmlSaveFileToP01\r
+       * @brief                int xmlSaveFileTo (xmlOutputBufferPtr buf, xmlDocPtr cur, const char * encoding)\r
+       * @desc                 Positive Test for dump an XML document to an I/O buffer\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlOutputBufferPtr(buf), XmlDocPtr(cur), const char *("UTF-8")} => {N/A | Number of bytes written to buffer}   @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcXmlSaveFileToP01()\r
+{\r
+       const char *pFilename = LIBXML2TESTXML;\r
+       const char *pEncoding = "UTF-8";\r
+       int result = -1;\r
+\r
+       xmlOutputBufferPtr opBuf; /*The Output buffer to be used*/\r
+       xmlDocPtr doc; /* the resulting document tree used as i/p*/\r
+\r
+\r
+\r
+       /*\r
+       * this initialize the library and check potential ABI mismatches\r
+       * between the version it was compiled for and the actual shared\r
+       * library used.\r
+       */\r
+       LIBXML_TEST_VERSION\r
+\r
+       doc = xmlReadFile(pFilename, NULL, 0);\r
+       DTS_CHECK_NE_MESSAGE("xmlSaveFileTo", (void *)doc, (void *)NULL, "xmlReadFile Failed");\r
+       \r
+\r
+       opBuf = xmlOutputBufferCreateFilename(UTSHOME"/XmlSaveFileTo.txt", NULL, 0);\r
+       DTS_CHECK_NE_MESSAGE("xmlSaveFileTo", (void *)opBuf, (void *)NULL, "xmlOutputBufferCreateFilename Failed");\r
+       \r
+\r
+       /**\r
+       * @remarks   input1: [N/A, N/A] @n\r
+       * {XML Output buffer, XmlDocPtr, "UTF-8"} => {N/A | Number of bytes written to buffer}  @n\r
+       */      \r
+       result = xmlSaveFileTo(opBuf, doc, pEncoding);\r
+       DTS_CHECK_NE_MESSAGE("xmlSaveFileTo", (void *)result, (void *)-1, "xmlSaveFileTo Failed");\r
+       \r
+\r
+       __Cleanup(doc);\r
+       //delete pFilename;     \r
+}\r
+       /**    \r
+       * @test                 UTcXmlSaveFormatFileP01\r
+       * @brief                int xmlSaveFormatFile (const char * filename, xmlDocPtr cur, int format)\r
+       * @desc                 Positive Test for dumping an XML document to a file\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {const char *(UTSXMLHOME"/OP_XmlSaveFormatFile.txt"), XmlDocPtr(cur), int(1)} => {N/A | Number of bytes written to file}        @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcXmlSaveFormatFileP01()\r
+{\r
+       const char *pFilename = LIBXML2TESTXML;\r
+       const char *pEncoding = NULL;\r
+       const char *pOpfilename = UTSHOME"/OP_XmlSaveFormatFile.txt";\r
+       xmlDocPtr doc; /* the resulting document tree used as i/p*/\r
+       int result = -1;\r
+       /*\r
+       * this initialize the library and check potential ABI mismatches\r
+       * between the version it was compiled for and the actual shared\r
+       * library used.\r
+       */\r
+       LIBXML_TEST_VERSION\r
+\r
+\r
+       doc = xmlReadFile(pFilename, NULL, 0);\r
+       DTS_CHECK_NE_MESSAGE("xmlSaveFormatFile", (void *)doc, (void *)NULL, "xmlReadFile Failed");\r
+       \r
+       xmlKeepBlanksDefault(0);\r
+\r
+       /**\r
+       * @remarks   input1: [N/A, N/A] @n\r
+       * {"/Home/SUTsXml/OP_XmlSaveFormatFile.txt", XmlDocPtr, 1} => {N/A | Number of bytes written to file}   @n\r
+       */      \r
+       result = xmlSaveFormatFile(pOpfilename, doc, 1);        \r
+       DTS_CHECK_NE_MESSAGE("xmlSaveFormatFile", (void *)result, (void *)-1, "xmlSaveFormatFile Failed");\r
+       \r
+       __Cleanup(doc);\r
+       //delete pFilename;     \r
+       //delete pOpfilename;\r
+}\r
+       /**    \r
+       * @test                 UTcXmlSaveFormatFileToP01\r
+       * @brief                int xmlSaveFormatFileTo (xmlOutputBufferPtr buf, xmlDocPtr cur, const char * encoding, int format)\r
+       * @desc                 Positive Test for dumping an XML document to an I/O buffer\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlOutputBufferPtr(cur), XmlDocPtr(cur), NULL, int(1)} => {N/A | Number of bytes written to buffer}    @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcXmlSaveFormatFileToP01()\r
+{\r
+       const char *pFilename = LIBXML2TESTXML;\r
+       const char *pEncoding = NULL;\r
+       int result = -1;\r
+\r
+       xmlDocPtr doc; /* the document tree used as input */\r
+       xmlOutputBufferPtr opBuf; /*The Output buffer to be used*/\r
+\r
+       /*\r
+       * this initialize the library and check potential ABI mismatches\r
+       * between the version it was compiled for and the actual shared\r
+       * library used.\r
+       */\r
+       LIBXML_TEST_VERSION\r
+\r
+\r
+       doc = xmlReadFile(pFilename, NULL, 0);\r
+       DTS_CHECK_NE_MESSAGE("xmlSaveFormatFileTo", (void *)doc, (void *)NULL, "xmlReadFile Failed");\r
+\r
+       opBuf = xmlOutputBufferCreateFilename(UTSHOME"/XmlSaveFormatFileTo.txt", NULL, 0);\r
+       DTS_CHECK_NE_MESSAGE("xmlSaveFormatFileTo", (void *)opBuf, (void *)NULL, "xmlReadFile Failed");\r
+\r
+       xmlKeepBlanksDefault(0);\r
+       /**\r
+       * @remarks   input1: [N/A, N/A] @n\r
+       * {XML O/P buffer, XmlDocPtr, NULL, 1} => {N/A | Number of bytes written to buffer}     @n\r
+       */      \r
+       result = xmlSaveFormatFileTo(opBuf, doc, pEncoding, 1); \r
+       DTS_CHECK_NE_MESSAGE("xmlSaveFormatFileTo", (void *)result, (void *)-1, "xmlSaveFormatFileTo Failed");\r
+\r
+       __Cleanup(doc);\r
+       //delete pFilename;     \r
+}\r
+       /**    \r
+       * @test                 UTcXmlSaveFileEncP01\r
+       * @brief                int xmlSaveFileEnc (const char * filename, xmlDocPtr cur, const char * encoding)\r
+       * @desc                 Positive Test for dumping an XML document, converting it to the given encoding\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {const char *(UTSXMLHOME"/OP_XmlSaveFileEnc.txt)", xmlDocPtr(cur), NULL} => {N/A | Number of bytes written to file}     @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcXmlSaveFileEncP01()\r
+{\r
+       const char *pFilename = LIBXML2TESTXML;\r
+       const char *pOpfilename = UTSHOME"/OP_XmlSaveFileEnc.txt";\r
+       const char *pEncoding = NULL;\r
+       xmlDocPtr doc; /* the resulting document tree used as i/p*/\r
+       int result = -1;\r
+\r
+       /*\r
+       * this initialize the library and check potential ABI mismatches\r
+       * between the version it was compiled for and the actual shared\r
+       * library used.\r
+       */\r
+       LIBXML_TEST_VERSION\r
+\r
+\r
+\r
+\r
+       doc = xmlReadFile(pFilename, NULL, 0);\r
+       DTS_CHECK_NE_MESSAGE("xmlSaveFileEnc", (void *)doc, (void *)NULL, "xmlReadFile Failed");\r
+\r
+       /**\r
+       * @remarks   input1: [N/A, N/A] @n\r
+       * {"/Home/SUTsXml/OP_XmlSaveFileEnc.txt", xmlDocPtr, NULL} => {N/A | Number of bytes written to file}   @n\r
+       */      \r
+       result = xmlSaveFileEnc(pOpfilename, doc, pEncoding);\r
+       DTS_CHECK_NE_MESSAGE("xmlSaveFileEnc", (void *)result, (void *)-1, "xmlSaveFileEnc Failed");\r
+       \r
+       __Cleanup(doc);\r
+       //delete pFilename;\r
+       //delete pOpfilename;\r
+}\r
+\r
+\r
+       /**    \r
+       * @test                 UTcXmlSaveTreeP01\r
+       * @brief                long xmlSaveTree (xmlSaveCtxtPtr ctxt, xmlNodePtr node)\r
+       * @desc                 Positive Test for creating a document saving context serializing to a file descriptor with the encoding and the options given\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlSaveCtxtPtr(ctxt), Pointer to node of XML tree(xmlNodePtr(node)} => {N/A | Number of bytes written} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcXmlSaveTreeP01()\r
+{\r
+       const char *pOpfilename = UTSHOME"/OP_XmlSaveTree.txt";\r
+       const char *pFilename = LIBXML2TESTXML;\r
+       const char *pEncoding = NULL;\r
+       int result = -1;\r
+       xmlSaveCtxtPtr ctxtPtr;\r
+       xmlNodePtr nodePtr;\r
+       xmlDocPtr doc; /* the resulting document tree used as i/p*/\r
+\r
+\r
+       /*\r
+       * this initialize the library and check potential ABI mismatches\r
+       * between the version it was compiled for and the actual shared\r
+       * library used.\r
+       */\r
+       LIBXML_TEST_VERSION\r
+\r
+       ctxtPtr = xmlSaveToFilename(pOpfilename, pEncoding, 1);\r
+       DTS_CHECK_NE_MESSAGE("xmlSaveTree", (void *)ctxtPtr, (void *)NULL, "xmlSaveToFilename Failed");\r
+\r
+       doc = xmlReadFile(pFilename, NULL, 0);\r
+       DTS_CHECK_NE_MESSAGE("xmlSaveTree", (void *)doc, (void *)NULL, "xmlReadFile Failed");\r
+\r
+       nodePtr = xmlDocGetRootElement(doc);\r
+       DTS_CHECK_NE_MESSAGE("xmlSaveTree", (void *)nodePtr, (void *)NULL, "xmlDocGetRootElement Failed");\r
+\r
+       nodePtr = nodePtr->xmlChildrenNode;\r
+       while (nodePtr != NULL) {\r
+               if (0 == (xmlStrcmp(nodePtr->name, (const xmlChar *)"TO"))) {\r
+                       break;\r
+               }\r
+               else {\r
+                       nodePtr = nodePtr->next;\r
+               }\r
+       }\r
+\r
+       /**\r
+       * @remarks   input1: [N/A, N/A] @n\r
+       * {xmlSaveCtxtPtr, Pointer to node of XML tree} => {N/A | Number of bytes written}      @n\r
+       */      \r
+       result = xmlSaveTree(ctxtPtr, nodePtr);\r
+       DTS_CHECK_NE_MESSAGE("xmlSaveTree", (void *)result, (void *)-1, "xmlSaveTree Failed");\r
+\r
+\r
+       result = xmlSaveClose(ctxtPtr);\r
+       DTS_CHECK_NE_MESSAGE("xmlSaveTree", (void *)result, (void *)-1, "xmlSaveClose Failed");\r
+\r
+       __Cleanup(doc);\r
+       //delete pOpfilename;\r
+       //delete pFilename;\r
+}\r
+       /**    \r
+       * @test                 UTcXmlSaveDocP01\r
+       * @brief                long xmlSaveDoc (xmlSaveCtxtPtr ctxt, xmlDocPtr doc)\r
+       * @desc                 Positive Test for saving a full document to a saving context TODO: The function is not fully implemented yet as it does not return the byte count but 0 instead\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlSaveCtxtPtr(ctxt), xmlDocPtr(doc)} => {N/A | Number of bytes written}       @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcXmlSaveDocP01()\r
+{\r
+       const char *pOpfilename = UTSHOME"/OP_XmlSaveDoc.txt";\r
+       const char *pEncoding = NULL;\r
+       const char *pFilename = LIBXML2TESTXML;\r
+       int result = -1;\r
+       xmlDocPtr doc; /* the resulting document tree used as i/p*/\r
+       xmlSaveCtxtPtr ctxtPtr;\r
+\r
+       /*\r
+       * this initialize the library and check potential ABI mismatches\r
+       * between the version it was compiled for and the actual shared\r
+       * library used.\r
+       */\r
+       LIBXML_TEST_VERSION\r
+\r
+       ctxtPtr = xmlSaveToFilename(pOpfilename, pEncoding, 1);\r
+       DTS_CHECK_NE_MESSAGE("xmlSaveDoc", (void *)ctxtPtr, (void *)NULL, "xmlSaveToFilename Failed");\r
+\r
+\r
+\r
+       doc = xmlReadFile(pFilename, NULL, 0);\r
+       DTS_CHECK_NE_MESSAGE("xmlSaveDoc", (void *)doc, (void *)NULL, "xmlReadFile Failed");\r
+\r
+       /**\r
+       * @remarks   input1: [N/A, N/A] @n\r
+       *                                       {xmlSaveCtxtPtr, xmlDocPtr} => {N/A | Number of bytes written}  @n\r
+       */      \r
+       result = xmlSaveDoc(ctxtPtr, doc);\r
+       DTS_CHECK_NE_MESSAGE("xmlSaveDoc", (void *)result, (void *)-1, "xmlSaveDoc Failed");\r
+\r
+       result = xmlSaveClose(ctxtPtr);\r
+       DTS_CHECK_NE_MESSAGE("xmlSaveDoc", (void *)result, (void *)-1, "xmlSaveClose Failed");\r
+\r
+       __Cleanup(doc);\r
+       //delete pOpfilename;\r
+       //delete pFilename;\r
+}\r
+\r
+       /**    \r
+       * @test                 UTcXmlNodeDumpP01\r
+       * @brief                int xmlNodeDump (xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur,int level,int format)\r
+       * @desc                 Positive Test for dumping an XML node, recursive behaviour,children are printed too\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlBufferPtr(buf), xmlDocPtr(doc), xmlNodePtr(cur), int(level), int(format)} => {N/A | Number of bytes written}        @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcXmlNodeDumpP01()\r
+{\r
+\r
+       const char *pFilename = LIBXML2TESTXML;\r
+       const char *pEncoding = NULL;\r
+       int result = -1;\r
+       xmlNodePtr nodePtr;\r
+       xmlNodePtr tempNodePtr; // For memory leak fixes (MemLeakFix)\r
+       xmlDocPtr doc; /* the document tree used as input */\r
+       xmlBufferPtr buf;\r
+       xmlOutputBufferPtr opBuf; /*The Output buffer to be used*/\r
+       /*\r
+       * this initialize the library and check potential ABI mismatches\r
+       * between the version it was compiled for and the actual shared\r
+       * library used.\r
+       */\r
+       LIBXML_TEST_VERSION\r
+\r
+\r
+       doc = xmlReadFile(pFilename, NULL, 0);\r
+       DTS_CHECK_NE_MESSAGE("xmlNodeDump", (void *)doc, (void *)NULL, "xmlReadFile Failed");\r
+\r
+       nodePtr = xmlDocGetRootElement(doc);\r
+       DTS_CHECK_NE_MESSAGE("xmlNodeDump", (void *)nodePtr, (void *)NULL, "xmlDocGetRootElement Failed");\r
+       tempNodePtr = nodePtr; \r
+\r
+       nodePtr = nodePtr->xmlChildrenNode;  \r
+       \r
+       while (nodePtr != NULL) {\r
+               if (0 == (xmlStrcmp(nodePtr->name, (const xmlChar *)"BODY"))) {\r
+                       break;\r
+               }\r
+               else {\r
+                       nodePtr = nodePtr->next;\r
+               }\r
+       }\r
+\r
+       xmlKeepBlanksDefault(0);\r
+\r
+       buf = xmlBufferCreate();\r
+       DTS_CHECK_NE_MESSAGE("xmlNodeDump", (void *)buf, (void *)NULL, "xmlBufferCreate Failed");\r
+\r
+       opBuf = xmlOutputBufferCreateFilename(UTSHOME"/XmlNodeDumpOutput.txt", NULL, 0);\r
+       DTS_CHECK_NE_MESSAGE("xmlNodeDump", (void *)opBuf, (void *)NULL, "xmlOutputBufferCreateFilename Failed");\r
+\r
+       // xmlNodeDump\r
+       result = xmlNodeDump(buf, doc, nodePtr, 2, 1);\r
+       DTS_CHECK_NE_MESSAGE("xmlNodeDump", (void *)result, (void *)-1, "xmlNodeDump Failed");\r
+\r
+       // xmlNodeDumpOutput\r
+       xmlNodeDumpOutput(opBuf, doc, nodePtr, 2, 1, pEncoding);\r
+\r
+\r
+       xmlBufferFree(buf); //MemLeakFix\r
+//     xmlFreeNodeList(tempNodePtr); //MemLeakFix\r
+       result = xmlOutputBufferClose(opBuf); //MemLeakFix\r
+       DTS_CHECK_NE_MESSAGE("xmlNodeDump", (void *)result, (void *)-1, "xmlOutputBufferClose Failed");\r
+       \r
+       __Cleanup(doc);\r
+       //delete pFilename;     \r
+\r
+}\r
+       /**    \r
+       * @test                 UTcXmlDocDumpMemoryP01\r
+       * @brief                void xmlDocDumpMemory (xmlDocPtr cur, xmlChar ** mem, int * size)\r
+                                       void xmlDocDumpMemoryEnc (xmlDocPtr out_doc, xmlChar ** doc_txt_ptr, int * doc_txt_len, const char * txt_encoding)\r
+                                       void    xmlDocDumpFormatMemory  (xmlDocPtr cur, xmlChar ** mem, int * size, int format)\r
+                                       void    xmlDocDumpFormatMemoryEnc (xmlDocPtr out_doc, xmlChar ** doc_txt_ptr, int * doc_txt_len, const char * txt_encoding, int format)\r
+       * @desc                 Positive Test for dumping an XML document in memory and return the #xmlChar * and it's size in bytes\r
+                                       Positive Test for Dumping the current DOM tree into memory using the character encoding specified by the caller\r
+                                       Positive Test for Dumping an XML document in memory and return the #xmlChar * and it's size\r
+                                       Positive Test for Dumping the current DOM tree into memory using the character encoding specified by the caller\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlChar *(mem), xmlDocPtr(doc), int(size)} => {N/A | Number of bytes written}  @n\r
+                                       input2: [N/A, N/A] @n\r
+       *                       {xmlChar *(mem), xmlDocPtr(out_doc), const char * (txt_encoding), int *(doc_txt_len)} => {N/A | Number of bytes written}        @n\r
+                                       input3: [N/A, N/A] @n\r
+       *                       {xmlChar *(mem), xmlDocPtr(cur), int(size), int(format)} => {N/A | Number of bytes written}     @n\r
+                                       input4: [N/A, N/A] @n\r
+       *                       {xmlChar *(mem), xmlDocPtr(out_doc), const char *(doc_txt_ptr), int(doc_txt_len), const char * txt_encoding, int(format)} => {N/A | Number of bytes written}    @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcXmlDocDumpMemoryP01()\r
+{\r
+       const char *pFilename = LIBXML2TESTXML;\r
+       const char *pEncoding = NULL;\r
+       int result = -1;\r
+       xmlDocPtr doc; /* the document tree used as input */\r
+       xmlChar* pXmlArray = NULL;\r
+\r
+\r
+       /*\r
+       * this initialize the library and check potential ABI mismatches\r
+       * between the version it was compiled for and the actual shared\r
+       * library used.\r
+       */\r
+       LIBXML_TEST_VERSION\r
+\r
+\r
+       doc = xmlReadFile(pFilename, NULL, 0);\r
+       DTS_CHECK_NE_MESSAGE("xmlDocDumpMemory", (void *)doc, (void *)NULL, "xmlReadFile Failed");\r
+\r
+\r
+       // xmlDocDumpMemory\r
+       xmlDocDumpMemory(doc, &pXmlArray, &result);\r
+       DTS_CHECK_NE_MESSAGE("xmlDocDumpMemory", (void *)result, (void *)-1, "xmlDocDumpMemory Failed");\r
+       xmlFree(pXmlArray);\r
+\r
+       // xmlDocDumpMemoryEnc\r
+       result = -1;\r
+       xmlDocDumpMemoryEnc(doc, &pXmlArray, &result, pEncoding);\r
+       DTS_CHECK_NE_MESSAGE("xmlDocDumpMemory", (void *)result, (void *)-1, "xmlDocDumpMemoryEnc Failed");\r
+       xmlFree(pXmlArray);\r
+\r
+\r
+\r
+       // xmlDocDumpFormatMemory\r
+       result = -1;\r
+       xmlDocDumpFormatMemory(doc, &pXmlArray, &result, 1);\r
+       DTS_CHECK_NE_MESSAGE("xmlDocDumpMemory", (void *)result, (void *)-1, "xmlDocDumpFormatMemory Failed");\r
+       xmlFree(pXmlArray);\r
+\r
+\r
+       // xmlDocDumpFormatMemoryEnc\r
+       result = -1;\r
+       xmlDocDumpFormatMemoryEnc(doc, &pXmlArray, &result, pEncoding, 1);\r
+       DTS_CHECK_NE_MESSAGE("xmlDocDumpMemory", (void *)result, (void *)-1, "xmlDocDumpFormatMemoryEnc Failed");\r
+       xmlFree(pXmlArray);\r
+       __Cleanup(doc);\r
+       //delete pFilename;     \r
+}\r
+\r
+/**    \r
+* @test                        UTcXmlDocDumpP01\r
+* @brief               int xmlDocDump (FILE * f, xmlDocPtr cur)\r
+* @desc                        Positive Test for Dumping an XML document to an open FILE.\r
+* @b developer kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+* @b tester            Michel Anthony (michelj@samsung.com)\r
+* @return              void\r
+* @see                 none\r
+* @remarks             input1: [N/A, N/A]      @n\r
+*                              {FILE* (f), xmlDocPtr(cur)} => {N/A | Number of bytes written}  @n\r
+* @b priority  Middle\r
+* @b etc               none\r
+*/\r
+static void\r
+UTcXmlDocDumpP01()\r
+{\r
+       FILE* fPtr = NULL;\r
+       int result = -1;\r
+       xmlDocPtr doc; /* the document tree used as input */\r
+       const char *pFilename = LIBXML2TESTXML;\r
+\r
+       fPtr = fopen(UTSXMLHOME"/XmlDocDump.txt", "w+");\r
+       DTS_CHECK_NE_MESSAGE("xmlDocDump", (void *)fPtr, (void *)NULL, "fopen Failed"); \r
+\r
+       doc = xmlReadFile(pFilename, NULL, 0);\r
+       DTS_CHECK_NE_MESSAGE("xmlDocDump", (void *)doc, (void *)NULL, "xmlReadFile Failed");    \r
+\r
+       /**\r
+       * @remarks   input1: [N/A, N/A] @n\r
+       * {FILE*, xmlDocPtr} => {N/A | Number of bytes written} @n\r
+       */      \r
+       result = xmlDocDump(fPtr, doc);\r
+       DTS_CHECK_NE_MESSAGE("xmlDocDump", (void *)result, (void *)-1, "xmlDocDump Failed");\r
+       __Cleanup(doc);\r
+       result = fclose(fPtr);\r
+       DTS_CHECK_EQ_MESSAGE("xmlDocDump", (void *)result, (void *)0, "fclose Failed");\r
+       \r
+}\r
+/**    \r
+* @test                        UTcXmlElemDumpP01\r
+* @brief               void xmlElemDump (FILE * f, xmlDocPtr doc, xmlNodePtr cur)\r
+* @desc                        Positive Test for Dumping an XML/HTML node, recursive behaviour, children are printed too\r
+* @b developer kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+* @b tester            Michel Anthony (michelj@samsung.com)\r
+* @return              void\r
+* @see                 none\r
+* @remarks             input1: [N/A, N/A]      @n\r
+*                              {FILE*(f), xmlDocPtr(doc), Pointer to node of XML tree(xmlNodePtr(cur)} => {N/A | N/A}  @n\r
+* @b priority  Middle\r
+* @b etc               none\r
+*/\r
+static void\r
+UTcXmlElemDumpP01()\r
+{\r
+       FILE* fPtr = NULL;\r
+       int result = -1;\r
+       xmlDocPtr doc; /* the document tree used as input */\r
+       xmlNodePtr nodePtr;\r
+\r
+       const char *pFilename = LIBXML2TESTXML;\r
+\r
+       fPtr = fopen(UTSXMLHOME"/XmlDocDump.txt", "w+");\r
+       DTS_CHECK_NE_MESSAGE("xmlDocDump", (void *)fPtr, (void *)NULL, "fopen Failed");\r
+\r
+       doc = xmlReadFile(pFilename, NULL, 0);\r
+       DTS_CHECK_NE_MESSAGE("xmlElemDump", (void *)doc, (void *)NULL, "xmlReadFile Failed");\r
+\r
+       nodePtr = xmlDocGetRootElement(doc);\r
+       DTS_CHECK_NE_MESSAGE("xmlElemDump", (void *)nodePtr, (void *)NULL, "xmlDocGetRootElement Failed");\r
+\r
+       nodePtr = nodePtr->xmlChildrenNode;\r
+       while (nodePtr != NULL) {\r
+               if (0 == (xmlStrcmp(nodePtr->name, (const xmlChar *)"SIGN"))) {\r
+                       break;\r
+               }\r
+               else {\r
+                       nodePtr = nodePtr->next;\r
+               }\r
+       }\r
+       /**\r
+       * @remarks   input1: [N/A, N/A] @n\r
+       * {FILE*, xmlDocPtr, Pointer to node of XML tree} => {N/A | N/A}        @n\r
+       */      \r
+       xmlElemDump(fPtr, doc, nodePtr);\r
+\r
+\r
+       __Cleanup(doc);\r
+       result = fclose(fPtr);\r
+       DTS_CHECK_EQ_MESSAGE("xmlDocDump", (void *)result, (void *)0, "fclose Failed");\r
+}\r
+       /**    \r
+       * @test                 UTcXmlSaveSetEscapeP01\r
+       * @brief                int xmlSaveSetEscape (xmlSaveCtxtPtr ctxt, CharEncodingOutputFunc escape)\r
+                                       int xmlSaveSetAttrEscape (xmlSaveCtxtPtr ctxt, xmlCharEncodingOutputFunc escape)\r
+                                       long xmlSaveTree (xmlSaveCtxtPtr ctxt, xmlNodePtr node)\r
+                                       int     xmlSaveClose                    (xmlSaveCtxtPtr ctxt)\r
+       * @desc                 Positive Test for Setting a custom escaping function to be used for text in element content\r
+                                       Positive Test for Setting a custom escaping function to be used for text in attribute content\r
+                                       Positive test for Saving a subtree starting at the node parameter to a saving context TODO\r
+                                       Positive test for closing a document saving context\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlSaveCtxtPtr(ctxt), escaping function(CharEncodingOutputFunc(escape)} => {0 or -1 | N/A} @n\r
+                                       input2: [N/A, N/A] @n\r
+       *                       {xmlSaveCtxtPtr(ctxt), escaping function(xmlCharEncodingOutputFunc(escape)} => {0 or -1 | N/A} @n\r
+                                       input3: [N/A, N/A] @n\r
+                                       {xmlSaveCtxtPtr(ctxt), Pointer to node of XML tree(xmlNodePtr(node)} => {N/A | Number of bytes written} @n\r
+                                       input4: [N/A, N/A] @n\r
+       *                       {xmlSaveCtxtPtr(ctxt)} => {N/A | 0 or -1} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcXmlSaveSetEscapeP01()\r
+{\r
+       const char *pOpfilename = UTSHOME"/OP_XmlSaveSetEscape.txt";\r
+       const char *pFilename = LIBXML2TESTXML;\r
+       const char *pEncoding = NULL;\r
+       int result = -1;\r
+       xmlSaveCtxtPtr ctxtPtr;\r
+       xmlNodePtr nodePtr;\r
+       xmlNodePtr tempNodePtr;\r
+       xmlDocPtr doc; /* the resulting document tree used as i/p*/\r
+\r
+\r
+       /*\r
+       * this initialize the library and check potential ABI mismatches\r
+       * between the version it was compiled for and the actual shared\r
+       * library used.\r
+       */\r
+       LIBXML_TEST_VERSION\r
+\r
+       ctxtPtr = xmlSaveToFilename(pOpfilename, pEncoding, 1);\r
+       DTS_CHECK_NE_MESSAGE("xmlSaveSetEscape", (void *)ctxtPtr, (void *)NULL, "xmlSaveToFilename Failed");\r
+       \r
+\r
+       result = xmlSaveSetEscape(ctxtPtr, __Escape);\r
+       DTS_CHECK_EQ_MESSAGE("xmlSaveSetEscape", (void *)result, (void *)0, "xmlSaveSetEscape Failed");\r
+\r
+       result = xmlSaveSetAttrEscape(ctxtPtr, __Escape);\r
+       DTS_CHECK_EQ_MESSAGE("xmlSaveSetEscape", (void *)result, (void *)0, "xmlSaveSetAttrEscape Failed");\r
+\r
+       doc = xmlReadFile(pFilename, NULL, 0);\r
+       DTS_CHECK_NE_MESSAGE("xmlSaveSetEscape", (void *)doc, (void *)NULL, "xmlReadFile Failed");\r
+\r
+       nodePtr = xmlDocGetRootElement(doc);\r
+       tempNodePtr = nodePtr;\r
+       DTS_CHECK_NE_MESSAGE("xmlSaveSetEscape", (void *)nodePtr, (void *)NULL, "xmlDocGetRootElement Failed");\r
+\r
+       nodePtr = nodePtr->xmlChildrenNode;\r
+       while (nodePtr != NULL) {\r
+               if (0 == (xmlStrcmp(nodePtr->name, (const xmlChar *)"TO"))) {\r
+                       break;\r
+               }\r
+               else {\r
+                       nodePtr = nodePtr->next;\r
+               }\r
+       }\r
+\r
+       result = xmlSaveTree(ctxtPtr, nodePtr);\r
+       DTS_CHECK_NE_MESSAGE("xmlSaveSetEscape", (void *)result, (void *)-1, "xmlSaveTree Failed");\r
+\r
+       result = xmlSaveClose(ctxtPtr);\r
+       DTS_CHECK_NE_MESSAGE("xmlSaveSetEscape", (void *)result, (void *)-1, "xmlSaveClose Failed");\r
+\r
+\r
+       //xmlFreeNodeList(tempNodePtr);\r
+       __Cleanup(doc);\r
+       //delete pOpfilename;\r
+       //delete pFilename;\r
+}\r
+       /**    \r
+       * @test                 UTcXmlSaveToIOP01\r
+       * @brief                xmlSaveCtxtPtr  xmlSaveToIO (xmlOutputWriteCallback iowrite, xmlOutputCloseCallback ioclose, void * ioctx, const char * encoding, int options)\r
+       * @desc                 Positive Test for Creating a document saving context serializing to a file descriptor with the encoding and the options given\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlOutputWriteCallback(iowrite) , xmlOutputCloseCallback(ioclose), File Pointer, NULL, int(1) } => {N/A | xmlSaveCtxtPtr pointer}      @n      \r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcXmlSaveToIOP01()\r
+{\r
+       const char *pOpfilename = UTSXMLHOME"/OP_XmlSaveTree.txt";\r
+       const char *pFilename = LIBXML2TESTXML;\r
+       const char *pEncoding = NULL;\r
+\r
+       FILE * fPtr = NULL;\r
+       int ret = -1;\r
+       xmlSaveCtxtPtr ctxtPtr;\r
+       xmlNodePtr nodePtr;\r
+       xmlDocPtr doc; /* the resulting document tree used as i/p*/\r
+\r
+       /*\r
+       * this initialize the library and check potential ABI mismatches\r
+       * between the version it was compiled for and the actual shared\r
+       * library used.\r
+       */\r
+       //LIBXML_TEST_VERSION\r
+\r
+\r
+       //fPtr = File_open("/Home/SUTsXml/XmlSaveToIO.txt", "w+", &e);\r
+       xmlRegisterDefaultOutputCallbacks();\r
+\r
+       //fPtr = (FILE *)xmlFileOpen("/Home/SUTsXml/XmlSaveToIO.txt");\r
+\r
+       fPtr = fopen(UTSHOME"/XmlSaveToIO.txt", "w+");\r
+       if(fPtr == NULL) {\r
+               DTS_FAIL("xmlSaveToIO", "No memory");           \r
+               return;\r
+       }\r
+       /**\r
+       * @remarks   input1: [N/A, N/A] @n\r
+       * {xmlOutputWriteCallback , xmlOutputCloseCallback, File Pointer, NULL, 1 } => {N/A | xmlSaveCtxtPtr pointer}   @n\r
+       */      \r
+       ctxtPtr = xmlSaveToIO(__IOwrite, __IOclose, fPtr, pEncoding, 1);\r
+       DTS_CHECK_NE_MESSAGE("xmlSaveToIO", (void *)ctxtPtr, (void *)NULL, "xmlSaveToIO Failed");       \r
+\r
+       doc = xmlReadFile(pFilename, NULL, 0);\r
+       DTS_CHECK_NE_MESSAGE("xmlSaveToIO", (void *)doc, (void *)NULL, "xmlReadFile Failed");   \r
+\r
+       nodePtr = xmlDocGetRootElement(doc);\r
+       DTS_CHECK_NE_MESSAGE("xmlSaveToIO", (void *)nodePtr, (void *)NULL, "xmlDocGetRootElement Failed");\r
+\r
+       nodePtr = nodePtr->xmlChildrenNode;\r
+       while (nodePtr != NULL) {\r
+               if (0 == (xmlStrcmp(nodePtr->name, (const xmlChar *)"TO"))) {\r
+                       break;\r
+               }\r
+               else {\r
+                       nodePtr = nodePtr->next;\r
+               }\r
+       }\r
+\r
+       ret = xmlSaveTree(ctxtPtr, nodePtr);\r
+       DTS_CHECK_NE_MESSAGE("xmlSaveToIO", (void *)ret, (void *)-1, "xmlSaveTree Failed");\r
+\r
+\r
+       //result = xmlSaveFlush(ctxtPtr);\r
+       //MT_CHECK_MESSAGE2(-1 != result,"A non-negative number is expected, actual = %d", result);\r
+\r
+       if (NULL != ctxtPtr)\r
+       {\r
+               xmlSaveClose(ctxtPtr);\r
+       }\r
+\r
+       __Cleanup(doc);\r
+}\r
+\r
+\r
+static void\r
+UTcXmlNsListDumpOutputP01()\r
+{\r
+       const char *pOpfilename = UTSXMLHOME"/OP_XmlSaveTree.txt";\r
+       const char *pFilename = UTSXMLHOME"/libXml2Test_NS.xml";\r
+       int result = -1;\r
+       xmlOutputBufferPtr opBuf; /*The Output buffer to be used*/\r
+       xmlNodePtr nodePtr;\r
+       xmlDocPtr doc; /* the resulting document tree used as i/p*/\r
+       xmlNsPtr* pNsPtr;\r
+\r
+\r
+       /*\r
+       * this initialize the library and check potential ABI mismatches\r
+       * between the version it was compiled for and the actual shared\r
+       * library used.\r
+       */\r
+       LIBXML_TEST_VERSION\r
+\r
+       opBuf = xmlOutputBufferCreateFilename(UTSXMLHOME"/XmlNsListDumpOutput.txt", NULL, 0);\r
+       DTS_CHECK_NE_MESSAGE("xmlNsListDumpOutput", (void *)opBuf, (void *)NULL, "xmlOutputBufferCreateFilename Failed");\r
+\r
+       doc = xmlReadFile(pFilename, NULL, 0);\r
+       DTS_CHECK_NE_MESSAGE("xmlNsListDumpOutput", (void *)doc, (void *)NULL, "xmlReadFile Failed");\r
+\r
+       nodePtr = xmlDocGetRootElement(doc);\r
+       DTS_CHECK_NE_MESSAGE("xmlNsListDumpOutput", (void *)nodePtr, (void *)NULL, "xmlDocGetRootElement Failed");\r
+\r
+       nodePtr = nodePtr->xmlChildrenNode;\r
+       while (nodePtr != NULL) {\r
+               if (0 == (xmlStrcmp(nodePtr->name, (const xmlChar *)"TO"))) {\r
+                       pNsPtr = xmlGetNsList(doc, nodePtr);\r
+                       break;\r
+               }\r
+               else {\r
+                       nodePtr = nodePtr->next;\r
+               }\r
+       }\r
+\r
+       xmlNsListDumpOutput(opBuf, pNsPtr[0]);\r
+\r
+       __Cleanup(doc);\r
+}\r
+\r
+static void\r
+UTcXmlSaveTreeP02()\r
+{\r
+       const char *pFilename = LIBXML2TESTXML;\r
+       const char *pEncoding = NULL;\r
+       FILE* fPtr = NULL;\r
+       int result = -1;\r
+       xmlSaveCtxtPtr ctxtPtr;\r
+       xmlNodePtr nodePtr;\r
+       xmlDocPtr doc; /* the resulting document tree used as ip*/\r
+\r
+       fPtr = fopen(UTSXMLHOME"/XmlDocDump.txt", "w+");\r
+       DTS_CHECK_NE_MESSAGE("xmlSaveTree", (void *)fPtr, (void *)NULL, "fopen Failed");\r
+\r
+       /*\r
+       * this initialize the library and check potential ABI mismatches\r
+       * between the version it was compiled for and the actual shared\r
+       * library used.\r
+       */\r
+       LIBXML_TEST_VERSION\r
+\r
+       ctxtPtr = xmlSaveToFd(fPtr, pEncoding, 1);\r
+       DTS_CHECK_NE_MESSAGE("xmlSaveTree", (void *)ctxtPtr, (void *)NULL, "xmlSaveToFd Failed");\r
+\r
+       doc = xmlReadFile(pFilename, NULL, 0);\r
+       DTS_CHECK_NE_MESSAGE("xmlSaveTree", (void *)doc, (void *)NULL, "xmlReadFile Failed");\r
+\r
+       nodePtr = xmlDocGetRootElement(doc);\r
+       DTS_CHECK_NE_MESSAGE("xmlSaveTree", (void *)nodePtr, (void *)NULL, "xmlDocGetRootElement Failed");\r
+\r
+       nodePtr = nodePtr->xmlChildrenNode;\r
+       while (nodePtr != NULL) {\r
+               if (0 == (xmlStrcmp(nodePtr->name, (const xmlChar *)"TO"))) {\r
+                       break;\r
+               }\r
+               else {\r
+                       nodePtr = nodePtr->next;\r
+               }\r
+       }\r
+\r
+       result = xmlSaveTree(ctxtPtr, nodePtr);\r
+       DTS_CHECK_NE_MESSAGE("xmlSaveTree", (void *)result, (void *)-1, "xmlSaveTree Failed");\r
+\r
+\r
+       result = xmlSaveFlush(ctxtPtr);\r
+       DTS_CHECK_NE_MESSAGE("xmlSaveTree", (void *)result, (void *)-1, "xmlSaveFlush Failed");\r
+\r
+       __Cleanup(doc);\r
+\r
+       result = fclose(fPtr);\r
+       DTS_CHECK_EQ_MESSAGE("xmlSaveTree", (void *)result, (void *)0, "fclose Failed");\r
+\r
+       \r
+}\r
+\r
+static void startup( void);\r
+static void cleanup( void);\r
+\r
+void (*tet_startup)( void) = startup;\r
+void (*tet_cleanup)( void) = cleanup;\r
+\r
+static void startup( void)\r
+{\r
+        /* start of TC */\r
+        tet_printf("TC starts.");\r
+}\r
+\r
+static void cleanup( void)\r
+{\r
+        /* end of TC */\r
+        tet_printf("TC ends.");\r
+}\r
+\r
+struct tet_testlist tet_testlist[] = {\r
+       // Handling of out of context errors\r
+       {UTcXmlSaveFileP01,1},\r
+       {UTcXmlSaveFileToP01,2},\r
+       {UTcXmlSaveFormatFileP01,3},\r
+       {UTcXmlSaveFormatFileToP01,4},\r
+       {UTcXmlSaveFileEncP01,5},\r
+       {UTcXmlSaveTreeP01,6},\r
+       {UTcXmlSaveDocP01,7},\r
+       {UTcXmlNodeDumpP01,8},\r
+       {UTcXmlDocDumpMemoryP01,9},\r
+       {UTcXmlSaveSetEscapeP01,10},\r
+       {UTcXmlSaveToIOP01,11},\r
+       { NULL, 0 },\r
+       \r
+};\r
+\r
diff --git a/TC/testcase/utc_libxml_XmlSchemas.c b/TC/testcase/utc_libxml_XmlSchemas.c
new file mode 100755 (executable)
index 0000000..99072a4
--- /dev/null
@@ -0,0 +1,436 @@
+/*\r
+*  libxml test suite\r
+*\r
+* Copyright (c) 2012 Samsung Electronics Co., Ltd. All rights reserved.\r
+*\r
+* Contact: {Maintainer Name} <{Maintainer Email}>\r
+* \r
+* Licensed under the Apache License, Version 2.0 (the "License");\r
+* you may not use this file except in compliance with the License.\r
+* You may obtain a copy of the License at\r
+*\r
+* http://www.apache.org/licenses/LICENSE-2.0\r
+*\r
+* Unless required by applicable law or agreed to in writing, software\r
+* distributed under the License is distributed on an "AS IS" BASIS,\r
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+* See the License for the specific language governing permissions and\r
+* limitations under the License.\r
+*\r
+*/ \r
+\r
+#include "utc_libxml_include.h"\r
+#include "libxml/xmlschemas.h"\r
+\r
+\r
+\r
+static int call_tests = 0;\r
+static xmlDocPtr api_doc = NULL;\r
+\r
+//#define gen_nb_const_char_ptr 4\r
+#define gen_nb_const_char_ptr 3\r
+\r
+static char *gen_const_char_ptr(int no, int nr ATTRIBUTE_UNUSED) {\r
+#if 0\r
+    if (no == 0) return((char *) "foo");\r
+    if (no == 1) return((char *) "<foo/>");\r
+    if (no == 2) return((char *) HOMEENT2);\r
+#endif\r
+       return((char *) HOMESCHEMA);\r
+    return(NULL);\r
+}\r
+static void des_const_char_ptr(int no ATTRIBUTE_UNUSED, const char *val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+}\r
+\r
+//#define gen_nb_int 4\r
+#define gen_nb_int 2\r
+\r
+static int gen_int(int no, int nr ATTRIBUTE_UNUSED) {\r
+  //  if (no == 0) return(0);\r
+    if (no == 0) return(1);\r
+ //   if (no == 2) return(-1);\r
+    if (no == 1) return(122);\r
+    return(-1);\r
+}\r
+static void desret_int(int val ATTRIBUTE_UNUSED) {\r
+}\r
+static void des_int(int no ATTRIBUTE_UNUSED, int val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+}\r
+\r
+//#define gen_nb_xmlDocPtr 4\r
+#define gen_nb_xmlDocPtr 2\r
+static xmlDocPtr gen_xmlDocPtr(int no, int nr ATTRIBUTE_UNUSED) {\r
+\r
+       if (no == 0) return(xmlNewDoc(BAD_CAST "1.0"));\r
+    if (no == 1) return(xmlReadMemory("<foo/>", 6, "test", NULL, 0));\r
+//  if (no == 2) return(xmlReadMemory("<!DOCTYPE foo []> <foo/>", 24, "test", NULL, 0));\r
+    return(NULL);\r
+       //return (xmlParseFile(HOMESCHEMAXML) );\r
+}\r
+static void des_xmlDocPtr(int no ATTRIBUTE_UNUSED, xmlDocPtr val, int nr ATTRIBUTE_UNUSED) {\r
+    if ((val != NULL) && (val != api_doc) && (val->doc != api_doc))\r
+        xmlFreeDoc(val);\r
+}\r
+\r
+#define gen_nb_xmlSchemaValidCtxtPtr 1\r
+static xmlSchemaValidCtxtPtr gen_xmlSchemaValidCtxtPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+    char * URL;\r
+    xmlSchemaParserCtxtPtr ctxt;\r
+    xmlSchemaPtr sch;\r
+    xmlSchemaValidCtxtPtr ret_val;\r
+       URL = gen_const_char_ptr(0, 0);\r
+       ctxt = xmlSchemaNewParserCtxt((const char *)URL);\r
+       if (ctxt == NULL)\r
+               return(NULL);\r
+       sch = xmlSchemaParse(ctxt);\r
+       if (sch == NULL)\r
+               return(NULL);\r
+       ret_val = xmlSchemaNewValidCtxt(sch);\r
+               return (ret_val);\r
+       return(NULL);\r
+}\r
+static void des_xmlSchemaValidCtxtPtr(int no ATTRIBUTE_UNUSED, xmlSchemaValidCtxtPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+}\r
+\r
+//#define gen_nb_xmlParserInputBufferPtr 8\r
+#define gen_nb_xmlParserInputBufferPtr 3\r
+\r
+static xmlParserInputBufferPtr gen_xmlParserInputBufferPtr(int no, int nr ATTRIBUTE_UNUSED) {\r
+    if (no == 0) return(xmlParserInputBufferCreateFilename(HOMEENT2, XML_CHAR_ENCODING_NONE));\r
+    if (no == 1) return(xmlParserInputBufferCreateFilename(HOMERECxml19980210, XML_CHAR_ENCODING_NONE));\r
+    if (no == 2) return(xmlParserInputBufferCreateFilename(HOMEXHTML1STRICTDTD, XML_CHAR_ENCODING_NONE));\r
+    return(NULL);\r
+\r
+}\r
+static void des_xmlParserInputBufferPtr(int no ATTRIBUTE_UNUSED, xmlParserInputBufferPtr val, int nr ATTRIBUTE_UNUSED) {\r
+    xmlFreeParserInputBuffer(val);\r
+}\r
+\r
+\r
+//#define gen_nb_xmlCharEncoding 4\r
+#define gen_nb_xmlCharEncoding 1\r
+static xmlCharEncoding gen_xmlCharEncoding(int no, int nr ATTRIBUTE_UNUSED) {\r
+    if (no == 0) return(XML_CHAR_ENCODING_UTF8);\r
+    if (no == 1) return(XML_CHAR_ENCODING_NONE);\r
+    if (no == 2) return(XML_CHAR_ENCODING_8859_1);\r
+    return(XML_CHAR_ENCODING_ERROR);\r
+}\r
+static void des_xmlCharEncoding(int no ATTRIBUTE_UNUSED, xmlCharEncoding val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+}\r
+\r
+\r
+//#define gen_nb_xmlSAXHandlerPtr 2\r
+#define gen_nb_xmlSAXHandlerPtr 1\r
+static xmlSAXHandlerPtr gen_xmlSAXHandlerPtr(int no, int nr ATTRIBUTE_UNUSED) {\r
+#ifdef LIBXML_SAX1_ENABLED\r
+    if (no == 0) return((xmlSAXHandlerPtr) &xmlDefaultSAXHandler);\r
+#endif\r
+    return(NULL);\r
+}\r
+\r
+static void des_xmlSAXHandlerPtr(int no ATTRIBUTE_UNUSED, xmlSAXHandlerPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+}\r
+\r
+//#define gen_nb_userdata 3\r
+#define gen_nb_userdata 1\r
+\r
+static void *gen_userdata(int no, int nr ATTRIBUTE_UNUSED) {\r
+    if (no == 0) return((void *) &call_tests);\r
+  //  if (no == 1) return((void *) -1);\r
+    return(NULL);\r
+}\r
+\r
+static void des_userdata(int no ATTRIBUTE_UNUSED, void *val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+}\r
+\r
+static void desret_xmlSchemaParserCtxtPtr(xmlSchemaParserCtxtPtr val) {\r
+    xmlSchemaFreeParserCtxt(val);\r
+}\r
+\r
+static void UTcxmlSchemaNewParserCtxtP01()\r
+{\r
+       xmlSchemaParserCtxtPtr ret_val;\r
+       char * URL; /* the location of the schema */\r
+       int n_URL;\r
+\r
+       for (n_URL = 0;n_URL < gen_nb_const_char_ptr;n_URL++) {\r
+               URL = gen_const_char_ptr(n_URL, 0);\r
+\r
+               ret_val = xmlSchemaNewParserCtxt((const char *)URL);\r
+               DTS_CHECK_NE_MESSAGE("xmlSchemaNewParserCtxt", (void *)ret_val, (void *)NULL, "xmlSchemaNewParserCtxt Failed");\r
+               \r
+               desret_xmlSchemaParserCtxtPtr(ret_val);\r
+               des_const_char_ptr(n_URL, (const char *)URL, 0);\r
+               xmlResetLastError();\r
+       }\r
+}\r
+\r
+static void UTcxmlSchemaNewMemParserCtxtP01()\r
+{\r
+       xmlSchemaParserCtxtPtr ret_val;\r
+       char * buffer; /* a pointer to a char array containing the schemas */\r
+       int n_buffer;\r
+       int size; /* the size of the array */\r
+       int n_size;\r
+\r
+       for (n_buffer = 0;n_buffer < gen_nb_const_char_ptr;n_buffer++) {\r
+       for (n_size = 0;n_size < gen_nb_int;n_size++) {\r
+               buffer = gen_const_char_ptr(n_buffer, 0);\r
+               size = gen_int(n_size, 1);\r
+\r
+               ret_val = xmlSchemaNewMemParserCtxt((const char *)buffer, size);\r
+               DTS_CHECK_NE_MESSAGE("xmlSchemaNewMemParserCtxt", (void *)ret_val, (void *)NULL, "xmlSchemaNewMemParserCtxt Failed");\r
+               desret_xmlSchemaParserCtxtPtr(ret_val);\r
+               des_const_char_ptr(n_buffer, (const char *)buffer, 0);\r
+               des_int(n_size, size, 1);\r
+               xmlResetLastError();\r
+               }\r
+       }\r
+}\r
+\r
+static void UTcxmlSchemaNewDocParserCtxtP01()\r
+{\r
+       xmlSchemaParserCtxtPtr ret_val;\r
+       xmlDocPtr doc; /* a preparsed document tree */\r
+       int n_doc;\r
+\r
+       for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {\r
+               doc = gen_xmlDocPtr(n_doc, 0);\r
+\r
+               ret_val = xmlSchemaNewDocParserCtxt(doc);\r
+               DTS_CHECK_NE_MESSAGE("xmlSchemaNewDocParserCtxt", (void *)ret_val, (void *)NULL, "xmlSchemaNewDocParserCtxt Failed");\r
+               desret_xmlSchemaParserCtxtPtr(ret_val);\r
+               des_xmlDocPtr(n_doc, doc, 0);\r
+               xmlResetLastError();\r
+       }\r
+}\r
+\r
+static void UTcxmlSchemaFreeParserCtxtP01()\r
+{\r
+       xmlSchemaParserCtxtPtr ret_val;\r
+       xmlDocPtr doc; /* a preparsed document tree */\r
+       int n_doc;\r
+\r
+       for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {\r
+               doc = gen_xmlDocPtr(n_doc, 0);\r
+\r
+               ret_val = xmlSchemaNewDocParserCtxt(doc);\r
+               DTS_CHECK_NE_MESSAGE("xmlSchemaFreeParserCtxt", (void *)ret_val, (void *)NULL, "xmlSchemaNewDocParserCtxt Failed");\r
+               xmlSchemaFreeParserCtxt(ret_val);\r
+               DTS_CHECK_NE_MESSAGE("xmlSchemaFreeParserCtxt", (void *)ret_val, (void *)NULL, "xmlSchemaFreeParserCtxt Failed");\r
+       }\r
+}      \r
+\r
+static void UTcxmlSchemaSetParserErrorsP01()\r
+{\r
+       DTS_CHECK_EQ_MESSAGE("UTcxmlSchemaSetParserErrorsP01", (void *)1, (void *)1, "UTcxmlSchemaSetParserErrorsP01 Failed");\r
+}\r
+\r
+static void UTcxmlSchemaSetValidErrorsP01()\r
+{\r
+       DTS_CHECK_EQ_MESSAGE("UTcxmlSchemaSetValidErrorsP01", (void *)1, (void *)1, "UTcxmlSchemaSetValidErrorsP01 Failed");\r
+}\r
+\r
+static void UTcxmlSchemaParseP01()\r
+{\r
+       xmlSchemaParserCtxtPtr ctxt;\r
+       xmlSchemaPtr ret_val;\r
+       char * URL; /* the location of the schema */\r
+       int n_URL;\r
+\r
+       for (n_URL = 0;n_URL < gen_nb_const_char_ptr;n_URL++) {\r
+               URL = gen_const_char_ptr(n_URL, 0);\r
+               ctxt = xmlSchemaNewParserCtxt((const char *)URL);\r
+               DTS_CHECK_NE_MESSAGE("xmlSchemaParse", (void *)ctxt, (void *)NULL, "xmlSchemaNewParserCtxt Failed");\r
+               ret_val = xmlSchemaParse(ctxt);\r
+               DTS_CHECK_NE_MESSAGE("xmlSchemaParse", (void *)ret_val, (void *)NULL, "xmlSchemaParse Failed");\r
+               xmlSchemaFree(ret_val);\r
+               desret_xmlSchemaParserCtxtPtr(ctxt);\r
+               des_const_char_ptr(n_URL, (const char *)URL, 0);\r
+               xmlResetLastError();\r
+       }\r
+}\r
+\r
+static void UTcxmlSchemaFreeP01()\r
+{\r
+       xmlSchemaParserCtxtPtr ctxt;\r
+       xmlSchemaPtr ret_val;\r
+       char * URL; /* the location of the schema */\r
+       int n_URL;\r
+\r
+       for (n_URL = 0;n_URL < gen_nb_const_char_ptr;n_URL++) {\r
+               URL = gen_const_char_ptr(n_URL, 0);\r
+               ctxt = xmlSchemaNewParserCtxt((const char *)URL);\r
+               DTS_CHECK_NE_MESSAGE("xmlSchemaFree", (void *)ctxt, (void *)NULL, "xmlSchemaNewParserCtxt Failed");\r
+               ret_val = xmlSchemaParse(ctxt);\r
+               xmlSchemaFree(ret_val);\r
+               DTS_CHECK_NE_MESSAGE("xmlSchemaFree", (void *)ret_val, (void *)NULL, "xmlSchemaFree Failed");\r
+               desret_xmlSchemaParserCtxtPtr(ctxt);\r
+               des_const_char_ptr(n_URL, (const char *)URL, 0);\r
+               xmlResetLastError();\r
+       }\r
+}\r
+\r
+static void UTcxmlSchemaNewValidCtxtP01()\r
+{\r
+       xmlSchemaParserCtxtPtr ctxt;\r
+       xmlSchemaPtr sch;\r
+       xmlSchemaValidCtxtPtr ret_val;\r
+       char * URL; /* the location of the schema */\r
+       int n_URL;\r
+\r
+       for (n_URL = 0;n_URL < gen_nb_const_char_ptr;n_URL++) {\r
+               URL = gen_const_char_ptr(n_URL, 0);\r
+               ctxt = xmlSchemaNewParserCtxt((const char *)URL);\r
+               DTS_CHECK_NE_MESSAGE("xmlSchemaNewValidCtxt", (void *)ctxt, (void *)NULL, "xmlSchemaNewParserCtxt Failed");\r
+               \r
+               sch = xmlSchemaParse(ctxt);\r
+               DTS_CHECK_NE_MESSAGE("xmlSchemaNewValidCtxt", (void *)sch, (void *)NULL, "xmlSchemaParse Failed");\r
+               \r
+               ret_val = xmlSchemaNewValidCtxt(sch);\r
+               DTS_CHECK_NE_MESSAGE("xmlSchemaNewValidCtxt", (void *)ret_val, (void *)NULL, "xmlSchemaNewValidCtxt Failed");\r
+               \r
+               xmlSchemaFreeValidCtxt(ret_val);\r
+               xmlSchemaFree(sch);\r
+               desret_xmlSchemaParserCtxtPtr(ctxt);\r
+               des_const_char_ptr(n_URL, (const char *)URL, 0);\r
+               xmlResetLastError();\r
+       }\r
+}\r
+\r
+static void UTcxmlSchemaFreeValidCtxtP01()\r
+{\r
+       xmlSchemaParserCtxtPtr ctxt;\r
+       xmlSchemaPtr sch;\r
+       xmlSchemaValidCtxtPtr ret_val;\r
+       char * URL; /* the location of the schema */\r
+       int n_URL;\r
+\r
+       for (n_URL = 0;n_URL < gen_nb_const_char_ptr;n_URL++) {\r
+               URL = gen_const_char_ptr(n_URL, 0);\r
+               ctxt = xmlSchemaNewParserCtxt((const char *)URL);\r
+               DTS_CHECK_NE_MESSAGE("xmlSchemaFreeValidCtxt", (void *)ctxt, (void *)NULL, "xmlSchemaNewValidCtxt Failed");\r
+               \r
+               sch = xmlSchemaParse(ctxt);\r
+               DTS_CHECK_NE_MESSAGE("xmlSchemaFreeValidCtxt", (void *)sch, (void *)NULL, "xmlSchemaParse Failed");\r
+               \r
+               ret_val = xmlSchemaNewValidCtxt(sch);\r
+               xmlSchemaFreeValidCtxt(ret_val);\r
+               DTS_CHECK_NE_MESSAGE("xmlSchemaFreeValidCtxt", (void *)ret_val, (void *)NULL, "xmlSchemaFreeValidCtxt Failed");\r
+               \r
+               xmlSchemaFree(sch);\r
+               desret_xmlSchemaParserCtxtPtr(ctxt);\r
+               des_const_char_ptr(n_URL, (const char *)URL, 0);\r
+               xmlResetLastError();\r
+       }\r
+}\r
+\r
+static void UTcxmlSchemaValidateDocP01()\r
+{\r
+       int ret_val;\r
+       xmlSchemaValidCtxtPtr ctxt; /* a schema validation context */\r
+       int n_ctxt;\r
+       xmlDocPtr doc; /* a parsed document tree */\r
+       int n_doc;\r
+\r
+       for (n_ctxt = 0;n_ctxt < gen_nb_xmlSchemaValidCtxtPtr;n_ctxt++) {\r
+       for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {\r
+               ctxt = gen_xmlSchemaValidCtxtPtr(n_ctxt, 0);\r
+               //doc = gen_xmlDocPtr(n_doc, 1);\r
+               doc = xmlParseFile(HOMESCHEMAXML);\r
+               ret_val = xmlSchemaValidateDoc(ctxt, doc);\r
+               DTS_CHECK_EQ_MESSAGE("xmlSchemaValidateDoc", (void *)ret_val, (void *)0, "xmlSchemaValidateDoc Failed");\r
+               desret_int(ret_val);\r
+               des_xmlSchemaValidCtxtPtr(n_ctxt, ctxt, 0);\r
+               des_xmlDocPtr(n_doc, doc, 1);\r
+               xmlResetLastError();\r
+               }\r
+       }\r
+}\r
+\r
+static void UTcxmlSchemaValidateStreamP01()\r
+{\r
+       int ret_val;\r
+       xmlSchemaValidCtxtPtr ctxt; /* a schema validation context */\r
+       int n_ctxt;\r
+       xmlParserInputBufferPtr input; /* the input to use for reading the data */\r
+       int n_input;\r
+       xmlCharEncoding enc; /* an optional encoding information */\r
+       int n_enc;\r
+       xmlSAXHandlerPtr sax; /* a SAX handler for the resulting events */\r
+       int n_sax;\r
+       void * user_data; /* the context to provide to the SAX handler. */\r
+       int n_user_data;\r
+\r
+       for (n_ctxt = 0;n_ctxt < gen_nb_xmlSchemaValidCtxtPtr;n_ctxt++) {\r
+       for (n_input = 0;n_input < gen_nb_xmlParserInputBufferPtr;n_input++) {\r
+       for (n_enc = 0;n_enc < gen_nb_xmlCharEncoding;n_enc++) {\r
+       for (n_sax = 0;n_sax < gen_nb_xmlSAXHandlerPtr;n_sax++) {\r
+       for (n_user_data = 0;n_user_data < gen_nb_userdata;n_user_data++) {\r
+               ctxt = gen_xmlSchemaValidCtxtPtr(n_ctxt, 0);\r
+               //input = gen_xmlParserInputBufferPtr(n_input, 1);\r
+               DTS_CHECK_NE_MESSAGE("xmlSchemaValidateStream", (void *)ctxt, (void *)0, "gen_xmlSchemaValidCtxtPtr Failed");\r
+               input = xmlParserInputBufferCreateFilename(HOMESCHEMAXML, XML_CHAR_ENCODING_NONE);\r
+               DTS_CHECK_NE_MESSAGE("xmlSchemaValidateStream", (void *)input, (void *)0, "xmlParserInputBufferCreateFilename Failed");\r
+               enc = gen_xmlCharEncoding(n_enc, 2);\r
+               DTS_CHECK_NE_MESSAGE("xmlSchemaValidateStream", (void *)enc, (void *)0, "gen_xmlCharEncoding Failed");\r
+               sax = gen_xmlSAXHandlerPtr(n_sax, 3);\r
+               DTS_CHECK_NE_MESSAGE("xmlSchemaValidateStream", (void *)sax , (void *)0, "gen_xmlSAXHandlerPtr Failed");\r
+               user_data = gen_userdata(n_user_data, 4);\r
+               DTS_CHECK_NE_MESSAGE("xmlSchemaValidateStream", (void *)user_data , (void *)0, "gen_userdata Failed");\r
+               DTS_PRINT("xmlSchemaValidateStream", "Loop");\r
+               ret_val = xmlSchemaValidateStream(ctxt, input, enc, sax, user_data);\r
+               DTS_CHECK_NE_MESSAGE("xmlSchemaValidateStream", (void *)ret_val, (void *)-1, "xmlSchemaValidateStream Failed");\r
+               desret_int(ret_val);\r
+               #if 0\r
+               des_xmlSchemaValidCtxtPtr(n_ctxt, ctxt, 0);\r
+               des_xmlParserInputBufferPtr(n_input, input, 1);\r
+               des_xmlCharEncoding(n_enc, enc, 2);\r
+               des_xmlSAXHandlerPtr(n_sax, sax, 3);\r
+               des_userdata(n_user_data, user_data, 4);\r
+               #endif\r
+               xmlResetLastError();\r
+                       }\r
+                 }\r
+               }\r
+         }\r
+       }\r
+}\r
+\r
+static void startup( void);\r
+static void cleanup( void);\r
+\r
+void (*tet_startup)( void) = startup;\r
+void (*tet_cleanup)( void) = cleanup;\r
+\r
+static void startup( void)\r
+{\r
+        /* start of TC */\r
+        tet_printf("TC starts.");\r
+}\r
+\r
+static void cleanup( void)\r
+{\r
+        /* end of TC */\r
+        tet_printf("TC ends.");\r
+}\r
+\r
+struct tet_testlist tet_testlist[] = {\r
+       // Handling of out of context errors\r
+       {UTcxmlSchemaNewParserCtxtP01,1},\r
+       {UTcxmlSchemaNewMemParserCtxtP01,2},\r
+       {UTcxmlSchemaNewDocParserCtxtP01,3},\r
+       {UTcxmlSchemaFreeParserCtxtP01,4},\r
+       {UTcxmlSchemaParseP01,5},\r
+       {UTcxmlSchemaFreeP01,6},\r
+       {UTcxmlSchemaNewValidCtxtP01,7},\r
+       {UTcxmlSchemaFreeValidCtxtP01,8},\r
+       {UTcxmlSchemaValidateDocP01,9},\r
+       //{UTcxmlSchemaValidateStreamP01,10},\r
+       {UTcxmlSchemaSetParserErrorsP01,11},\r
+       {UTcxmlSchemaSetValidErrorsP01,12},\r
+       { NULL, 0 },\r
+       \r
+};\r
+\r
+\r
diff --git a/TC/testcase/utc_libxml_XmlString.c b/TC/testcase/utc_libxml_XmlString.c
new file mode 100755 (executable)
index 0000000..808426c
--- /dev/null
@@ -0,0 +1,886 @@
+/*\r
+*  libxml test suite\r
+*\r
+* Copyright (c) 2012 Samsung Electronics Co., Ltd. All rights reserved.\r
+*\r
+* Contact: {Maintainer Name} <{Maintainer Email}>\r
+* \r
+* Licensed under the Apache License, Version 2.0 (the "License");\r
+* you may not use this file except in compliance with the License.\r
+* You may obtain a copy of the License at\r
+*\r
+* http://www.apache.org/licenses/LICENSE-2.0\r
+*\r
+* Unless required by applicable law or agreed to in writing, software\r
+* distributed under the License is distributed on an "AS IS" BASIS,\r
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+* See the License for the specific language governing permissions and\r
+* limitations under the License.\r
+*\r
+*/ \r
+#include "utc_libxml_include.h"\r
+\r
+\r
+\r
+#ifdef DEBUG_MEM_LEAK\r
+\r
+extern "C"\r
+{\r
+       extern void MemStartSaveCallStack(void);\r
+       extern void MemEndSaveCallStack(void);\r
+       extern void MemPrintCurrentIndex(void);\r
+       extern void MemTraceAllocMemInfo(void);\r
+}\r
+#endif\r
+#define gen_nb_const_char_ptr 4\r
+\r
+/***************************************************************************\r
+ * SUTsSax\r
+ ***************************************************************************/\r
+\r
+static int inttab[20];\r
+static xmlChar chartab[20];\r
+\r
+static char *gen_const_char_ptr(int no, int nr ATTRIBUTE_UNUSED)\r
+{\r
+       if (no == 0) return((char *) "foo");\r
+       if (no == 1) return((char *) "<foo/>");\r
+       if (no == 2) return((char *) "test/ent2");\r
+       if (no == 3) return((char *) "test/end");\r
+       return(NULL);\r
+}\r
+\r
+static void desret_xmlChar_ptr(xmlChar *val)\r
+{\r
+       if (val != NULL)\r
+               xmlFree(val);\r
+}\r
+static void des_const_char_ptr(int no ATTRIBUTE_UNUSED, const char *val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED)\r
+{\r
+}\r
+#define gen_nb_int 3\r
+\r
+static int gen_int(int no, int nr ATTRIBUTE_UNUSED)\r
+{\r
+       if (no == 0) return(0);\r
+       if (no == 1) return(1);\r
+       if (no == 2) return(2);\r
+       if (no == 3) return(122);\r
+       return(-1);\r
+}\r
+\r
+#define gen_nb_const_unsigned_char_ptr 1\r
+static unsigned char * gen_const_unsigned_char_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED)\r
+{\r
+       return((unsigned char *) "test");\r
+}\r
+\r
+#define gen_nb_int_ptr 2\r
+\r
+static int *gen_int_ptr(int no, int nr)\r
+{\r
+       memset(inttab, 0, sizeof(inttab));\r
+       inttab[0] = 10;\r
+       if (no == 0) return(&inttab[nr]);\r
+       return(NULL);\r
+}\r
+#define gen_nb_const_xmlChar_ptr 4\r
+\r
+static xmlChar *gen_const_xmlChar_ptr(int no, int nr ATTRIBUTE_UNUSED)\r
+{\r
+       if (no == 0) return((xmlChar *) "afoo");\r
+       if (no == 1) return((xmlChar *) "<afoo/>");\r
+       if (no == 2) return((xmlChar *) "nonea");\r
+       if (no == 3) return((xmlChar *) " 2ab ");\r
+       return(NULL);\r
+}\r
+#define gen_nb_xmlChar_ptr 2\r
+\r
+static xmlChar *gen_xmlChar_ptr(int no, int nr ATTRIBUTE_UNUSED)\r
+{\r
+       if (no == 0) return(&chartab[0]);\r
+       return(NULL);\r
+}\r
+\r
+#define gen_nb_xmlChar 4\r
+\r
+static xmlChar gen_xmlChar(int no, int nr ATTRIBUTE_UNUSED)\r
+{\r
+       if (no == 0) return('a');\r
+       if (no == 1) return(' ');\r
+       if (no == 2) return((xmlChar) ' ');\r
+       return(0);\r
+}\r
+       /**    \r
+       * @test                 UTcxmlCharStrdupP01\r
+       * @brief                        xmlChar *       xmlCharStrdup (const char * cur)\r
+       * @desc                 Positive Test for converting char to XmlChar\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A]      @n\r
+       *                               {const char *(cur)) => {N/A |xmlChar pointer}   @n\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcxmlCharStrdupP01()\r
+{\r
+       xmlChar * ret_val;\r
+       char * cur;\r
+       int n_cur;\r
+\r
+       for (n_cur = 0;n_cur < gen_nb_const_char_ptr;n_cur++) {\r
+\r
+               cur = gen_const_char_ptr(n_cur, 0);\r
+               /**\r
+                * @remarks   input1: [N/A, N/A]        @n\r
+                *                                      {char pointer} => {N/A |xmlChar pointer}        @n\r
+                */\r
+               ret_val = xmlCharStrdup((const char *)cur);\r
+               DTS_CHECK_NE_MESSAGE("xmlCharStrdup", (void *)ret_val, (void *)NULL, "xmlCharStrdup Failed");\r
+               /**\r
+                    * @post delete xmlChar pointer\r
+                    */\r
+               desret_xmlChar_ptr(ret_val);\r
+               des_const_char_ptr(n_cur, (const char *)cur, 0);\r
+               xmlResetLastError();\r
+       }\r
+}\r
+       /**    \r
+       * @test                 UTcxmlCharStrndupP01\r
+       * @brief                        xmlChar *       xmlCharStrndup(const char * cur,         int len)\r
+       * @desc                 Positive Test for converting n number of char to XmlChar \r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A]      @n\r
+       *                               {const char *(cur),int(len)} => {N/A |xmlChar pointer}  @n\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcxmlCharStrndupP01()\r
+{\r
+       xmlChar * ret_val;\r
+       char * cur; /* the input char * */\r
+       int n_cur;\r
+       int len; /* the len of @cur */\r
+       int n_len;\r
+       int result;\r
+\r
+       for (n_cur = 0;n_cur < gen_nb_const_char_ptr;n_cur++) {\r
+               for (n_len = 0;n_len < gen_nb_int;n_len++) {\r
+\r
+                       cur = gen_const_char_ptr(n_cur, 0);\r
+                       len = gen_int(n_len, 1);\r
+                       /**\r
+                        * @remarks   input1: [N/A, N/A]        @n\r
+                        *                                      {const char pointer,len} => {N/A |xmlChar pointer}      @n\r
+                        */\r
+                       ret_val = xmlCharStrndup((const char *)cur, len);\r
+                       DTS_CHECK_NE_MESSAGE("xmlCharStrndup", (void *)ret_val, (void *)NULL, "xmlCharStrndup Failed");\r
+                       /**\r
+                       * @post delete xmlChar pointer\r
+                       */\r
+                       desret_xmlChar_ptr(ret_val);\r
+                       des_const_char_ptr(n_cur, (const char *)cur, 0);\r
+                       //xmlFree(cur);\r
+                       xmlResetLastError();\r
+               }\r
+       }\r
+       cur = gen_const_char_ptr(0, 0);\r
+       len = gen_int(0, 1);\r
+\r
+       ret_val = xmlCharStrndup((const char *)cur, len);\r
+       DTS_CHECK_NE_MESSAGE("xmlCharStrndup", (void *)ret_val, (void *)NULL, "xmlCharStrndup Failed");\r
+\r
+       result = xmlStrPrintf(ret_val,len,ret_val,"");\r
+       DTS_CHECK_NE_MESSAGE("xmlCharStrndup", (void *)ret_val, (void *)0, "xmlStrPrintf Failed");\r
+\r
+       //result = xmlStrVPrintf(ret_val,len,ret_val,"xmlStrVPrintf");\r
+       //MT_CHECK_MESSAGE2(result == 0, "xmlStrVPrintf failed\n");\r
+\r
+       //xmlFree(ret_val);\r
+\r
+       ret_val = xmlCharStrndup((const char *)cur, -1);\r
+       DTS_CHECK_EQ_MESSAGE("xmlCharStrndup", (void *)ret_val, (void *)NULL, "xmlCharStrndup Failed");\r
+       \r
+       result = xmlStrPrintf(ret_val,len,ret_val,"");\r
+       DTS_CHECK_EQ_MESSAGE("xmlCharStrndup", (void *)ret_val, (void *)NULL, "xmlStrPrintf Failed");\r
+       \r
+       //result = xmlStrVPrintf(ret_val,len,ret_val,"xmlStrVPrintf");\r
+       // MT_CHECK_MESSAGE2(result == -1, "xmlStrVPrintf failed\n");\r
+       cur = NULL;\r
+       /**\r
+        * @remarks   input2: [N/A, N/A]        @n\r
+        *                                      {const char pointer,-1} => {N/A |NULL}  @n\r
+        */\r
+       ret_val = xmlCharStrndup((const char *)cur, -1);\r
+       DTS_CHECK_EQ_MESSAGE("xmlCharStrndup", (void *)ret_val, (void *)NULL, "xmlCharStrndup Failed");\r
+       \r
+}\r
+       /**    \r
+       * @test                 UTcxmlCheckUTF8P01\r
+       * @brief                        int     xmlCheckUTF8  (const unsigned char * utf)\r
+       * @desc                 Positive Test for checking @utf for being valid UTF-8\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A]      @n\r
+       *                               {const unsigned char *(utf)} => {N/A | true}    @n\r
+       * @b priority   Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcxmlCheckUTF8P01()\r
+{\r
+       xmlChar * utf; /* the input UTF8 * */\r
+       int ret_val;\r
+\r
+       utf = gen_const_xmlChar_ptr(0, 0);\r
+       /**\r
+            * @remarks   input1: [N/A, N/A]    @n\r
+            *                                  {const xmlChar pointer} => {N/A | true} @n\r
+            */\r
+       ret_val = xmlCheckUTF8((const xmlChar *)utf);\r
+       DTS_CHECK_EQ_MESSAGE("xmlCheckUTF8", (void *)ret_val, (void *)1, "xmlCheckUTF8 Failed");\r
+}\r
+       /**    \r
+       * @test                 UTcxmlGetUTF8CharP01\r
+       * @brief                        int     xmlGetUTF8Char (const unsigned char * utf, int * len)\r
+       * @desc                 Positive Test for reading the first UTF8 character from @utf\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Get Sequence of UTF-8 encoded bytes, N/A]      @n\r
+       *                               {unsigned char pointer(utf),int(len)} => {N/A | non zero}       @n\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r\r
+UTcxmlGetUTF8CharP01()\r
+{\r
+       int ret_val;\r
+       unsigned char * utf; /* a sequence of UTF-8 encoded bytes */\r
+       int * len; /* a pointer to the minimum number of bytes present in the sequence.  This is used to assure the next character is completely contained within the sequence. */\r
+\r
+       utf = gen_const_unsigned_char_ptr(0, 0);\r
+       len = gen_int_ptr(0,0);\r
+\r
+       /**\r
+        * @remarks   input1: [N/A, N/A]        @n\r
+        *                                      {unsigned char pointer,len} => {N/A | non zero} @n\r
+        */\r
+       ret_val = xmlGetUTF8Char(utf,len);\r
+       DTS_CHECK_GT_MESSAGE("xmlGetUTF8Char", (void *)ret_val, (void *)0, "xmlGetUTF8Char Failed");\r
+}\r
+       /**    \r
+       * @test                 UTcxmlStrEqualP01\r
+       * @brief                        int xmlStrEqual (const xmlChar * str1,  const xmlChar * str2)\r
+       * @desc                 Positive Test for checking if both strings are equal of have same content.\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [ger first and second XML strings, N/A] @n\r
+       *                               {const xmlChar pointer (str1),const xmlChar pointer(str2} => {N/A | 1}  @n\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcxmlStrEqualP01()\r
+{\r
+       int ret_val;\r
+       xmlChar * str1; /* the first xmlChar * */\r
+       int n_str1;\r
+       xmlChar * str2; /* the second xmlChar * */\r
+\r
+       for (n_str1 = 0;n_str1 < gen_nb_const_xmlChar_ptr;n_str1++) {\r
+               str1 = gen_const_xmlChar_ptr(n_str1, 0);\r
+               str2 = gen_const_xmlChar_ptr(n_str1, 0);\r
+               /**\r
+                * @remarks   input1: [N/A, N/A]        @n\r
+                *                                      {const xmlChar pointer,const xmlChar pointer} => {N/A | 1}      @n\r
+                */\r
+               ret_val = xmlStrEqual((const xmlChar *)str1, (const xmlChar *)str2);\r
+               DTS_CHECK_EQ_MESSAGE("xmlStrEqual", (void *)ret_val, (void *)1, "xmlStrEqual Failed");\r
+\r
+       }\r
+}\r
+       /**    \r
+       * @test                 UTcxmlStrcasecmpP01\r
+       * @brief                        int xmlStrcasecmp       (const xmlChar * str1, const xmlChar * str2)\r
+       * @desc                 Positive Test for strcasecmp for xmlChar's\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [get 2 XmlChar strings, N/A]    @n\r
+       *                               {const xmlChar pointer(str1),const xmlChar pointer(str2)} => {N/A | 0}  @n\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcxmlStrcasecmpP01()\r
+{\r
+       int ret_val;\r
+       xmlChar * str1; /* the first xmlChar * */\r
+       int n_str1;\r
+       xmlChar * str2; /* the second xmlChar * */\r
+\r
+       for (n_str1 = 0;n_str1 < gen_nb_const_xmlChar_ptr;n_str1++) {\r
+               str1 = gen_const_xmlChar_ptr(n_str1, 0);\r
+               str2 = gen_const_xmlChar_ptr(n_str1, 1);\r
+               /**\r
+                * @remarks   input1: [N/A, N/A]        @n\r
+                *                                      {const xmlChar pointer,const xmlChar pointer} => {N/A | 0}      @n\r
+                */\r
+               ret_val = xmlStrcasecmp((const xmlChar *)str1, (const xmlChar *)str2);\r
+               DTS_CHECK_EQ_MESSAGE("xmlStrcasecmp", (void *)ret_val, (void *)0, "xmlStrcasecmp Failed");\r
+       }\r
+}\r
+       /**    \r
+       * @test                 UTcxmlStrcasestrP01\r
+       * @brief                        const xmlChar * xmlStrcasestr   (const xmlChar * str,const xmlChar * val)\r
+       * @desc                 Positive Test for case-ignoring strstr for xmlChar's\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [get an Xml array of characters, N/A]   @n\r
+       *                               {const xmlChar pointer(str),const xmlChar *(val)} => {N/A | xmlChar pointer}    @n\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcxmlStrcasestrP01()\r
+{\r
+       const xmlChar * ret_val;\r
+       xmlChar * str; /* the xmlChar * array (haystack) */\r
+       int n_str;\r
+       xmlChar * val; /* the xmlChar to search (needle) */\r
+\r
+       for (n_str = 0;n_str < gen_nb_const_xmlChar_ptr;n_str++) {\r
+               str = gen_const_xmlChar_ptr(n_str, 0);\r
+               val = gen_xmlChar_ptr(0, 1);\r
+               /**\r
+                * @remarks   input1: [N/A, N/A]        @n\r
+                *                                      {const xmlChar pointer,xmlChar pointer} => {N/A | xmlChar pointer}      @n\r
+                */\r
+               ret_val = xmlStrcasestr((const xmlChar *)str, val);\r
+               DTS_CHECK_NE_MESSAGE("xmlStrcasestr", (void *)ret_val, (void *)NULL, "xmlStrcasestr Failed");\r
+               //if (ret_val != NULL)\r
+               //      delete ret_val;\r
+       }\r
+}\r
+       /**    \r
+       * @test                 UTcxmlStrchrP01\r
+       * @brief                        const xmlChar *xmlStrchr (const xmlChar * str,  xmlChar val)\r
+       * @desc                 Positive Test for strchr operation for xmlChar's\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Xml character array and string to search, N/A] @n\r
+       *                               {const xmlChar pointer(str),xmlChar (val)} => {N/A |const xmlChar pointer}      @n\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcxmlStrchrP01()\r
+{\r
+       const xmlChar * ret_val;\r
+       xmlChar * str; /* the xmlChar * array */\r
+       int n_str;\r
+       xmlChar val; /* the xmlChar to search */\r
+       int n_val=0;\r
+\r
+       for (n_str = 0;n_str < gen_nb_const_xmlChar_ptr;n_str++) {\r
+\r
+               str = gen_const_xmlChar_ptr(n_str, 0);\r
+               val = 'a';\r
+               /**\r
+                * @remarks   input1: [N/A, N/A]        @n\r
+                *                                      {const xmlChar pointer,xmlChar pointer} => {N/A |const xmlChar pointer} @n\r
+                */\r
+               ret_val = xmlStrchr((const xmlChar *)str, val);\r
+               DTS_CHECK_NE_MESSAGE("xmlStrchr", (void *)ret_val, (void *)NULL, "xmlStrchr Failed");\r
+       }\r
+}\r
+       /**    \r
+       * @test                 UTcxmlStrcmpP01\r
+       * @brief                        int     xmlStrcmp (const xmlChar * str1, const xmlChar * str2)\r
+       * @desc                 Positive Test for strcmp operation for xmlChar's\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [two xml strings, N/A]  @n\r
+       *                               {const xmlChar pointer(str1),xmlChar pointer(str2)} => {N/A |0} @n\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcxmlStrcmpP01()\r
+{\r
+       int ret_val;\r
+       xmlChar * str1; /* the first xmlChar * */\r
+       int n_str1;\r
+       xmlChar * str2; /* the second xmlChar * */\r
+\r
+       for (n_str1 = 0;n_str1 < gen_nb_const_xmlChar_ptr;n_str1++) {\r
+\r
+               str1 = gen_const_xmlChar_ptr(n_str1, 0);\r
+               str2 = gen_const_xmlChar_ptr(n_str1, 1);\r
+               /**\r
+                * @remarks   input1: [N/A, N/A]        @n\r
+                *                                      {const xmlChar pointer,xmlChar pointer} => {N/A |0}     @n\r
+                */\r
+               ret_val = xmlStrcmp((const xmlChar *)str1, (const xmlChar *)str2);\r
+               DTS_CHECK_EQ_MESSAGE("xmlStrcmp", (void *)ret_val, (void *)0, "xmlStrcmp Failed");\r
+       }\r
+}\r
+       /**    \r
+       * @test                 UTcxmlStrdupP01\r
+       * @brief                        xmlChar *xmlStrdup (const xmlChar * cur)\r
+       * @desc                 Positive Test for strdup operation for array of xmlChar's\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Xml string, N/A]       @n\r
+       *                               {const xmlChar pointer(cur)} => {N/A | xmlChar pointer} @n\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcxmlStrdupP01()\r
+{\r
+       xmlChar * ret_val;\r
+       xmlChar * cur; /* the input xmlChar * */\r
+       int n_cur;\r
+\r
+       for (n_cur = 0;n_cur < gen_nb_const_xmlChar_ptr;n_cur++) {\r
+               cur = gen_const_xmlChar_ptr(n_cur, 0);\r
+               /**\r
+                * @remarks   input1: [N/A, N/A]        @n\r
+                *                                      {const xmlChar pointer} => {N/A | xmlChar pointer}      @n\r
+                */\r
+               ret_val = xmlStrdup((const xmlChar *)cur);\r
+               DTS_CHECK_NE_MESSAGE("xmlStrdup", (void *)ret_val, (void *)NULL, "xmlStrdup Failed");\r
+\r
+               desret_xmlChar_ptr(ret_val);\r
+       }\r
+}\r
+       /**    \r
+       * @test                 UTcxmlStrstrP01\r
+       * @brief                        const xmlChar * xmlStrstr       (const xmlChar * str, const xmlChar * val)\r
+       * @desc                 Positive Test for strstr operation for xmlChar's\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [main string and sub string, N/A]       @n\r
+       *                               {const xmlChar pointer(str) , const xmlChar pointer(val)} => {N/A |const xmlChar pointer}       @n\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcxmlStrstrP01()\r
+{\r
+       const xmlChar * ret_val;\r
+       xmlChar * str; /* the xmlChar * array (haystack) */\r
+       int n_str;\r
+       xmlChar * val; /* the xmlChar to search (needle) */\r
+       int n_val=0;\r
+\r
+       for (n_str = 0;n_str < gen_nb_const_xmlChar_ptr;n_str++) {\r
+               str = gen_const_xmlChar_ptr(n_str, 0);\r
+               val = gen_const_xmlChar_ptr(n_str, 1);\r
+               /**\r
+                * @remarks   input1: [N/A, N/A]        @n\r
+                *                                      {const xmlChar pointer , const xmlChar pointer} => {N/A |const xmlChar pointer} @n\r
+                */\r
+               ret_val = xmlStrstr((const xmlChar *)str, (const xmlChar *)val);\r
+               DTS_CHECK_NE_MESSAGE("xmlStrstr", (void *)ret_val, (void *)NULL, "xmlStrstr Failed");\r
+       }\r
+}\r
+       /**    \r
+       * @test                 UTcxmlStrsubP01\r
+       * @brief                        xmlChar * xmlStrsub (const xmlChar * str, int start, int len )\r
+       * @desc                 Positive Test for extraction of a substring of a given string\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Xml String with index and length, N/A] @n\r
+       *                               {const xmlChar pointer(str) ,int(start),int(len) }=> {N/A | xmlChar pointer}    @n\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcxmlStrsubP01()\r
+{\r
+       xmlChar * ret_val;\r
+       xmlChar * str; /* the xmlChar * array (haystack) */\r
+       int n_str;\r
+       int start; /* the index of the first char (zero based) */\r
+       int n_start;\r
+       int len; /* the length of the substring */\r
+       int n_len = 0;\r
+\r
+       for (n_str = 0;n_str < gen_nb_const_xmlChar_ptr;n_str++) {\r
+               for (n_start = 0;n_start < gen_nb_int;n_start++) {\r
+\r
+                       str = gen_const_xmlChar_ptr(n_str, 0);\r
+                       start = gen_int(n_start, 1);\r
+                       len = gen_int(n_len, 2);\r
+                       /**\r
+                        * @remarks   input1: [N/A, N/A]        @n\r
+                        *                                      {const xmlChar pointer ,start,len }=> {N/A | xmlChar pointer}   @n\r
+                        */\r
+                       ret_val = xmlStrsub((const xmlChar *)str, start, len);\r
+                       DTS_CHECK_NE_MESSAGE("xmlStrsub", (void *)ret_val, (void *)NULL, "xmlStrsub Failed");\r
+                       desret_xmlChar_ptr(ret_val);\r
+               }\r
+       }\r
+}\r
+       /**    \r
+       * @test                 UTcxmlStrncatNewP01\r
+       * @brief                        xmlChar *       xmlStrncatNew (const xmlChar * str1, const xmlChar * str2, int len)\r
+       * @desc                 Positive Test for xmlStrncat operation on xml strings\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A]      @n\r
+       *                               {const xmlChar pointer(str1) ,const xmlChar pointer(str2),int(len) }=> {N/A | xmlChar pointer}  @n\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcxmlStrncatNewP01()\r
+{\r
+       xmlChar * ret_val;\r
+\r
+       /**\r
+        * @remarks   input1: [N/A, N/A]        @n\r
+        *                                      {const xmlChar pointer ,const xmlChar pointer,len }=> {N/A | xmlChar pointer}   @n\r
+        */\r
+       ret_val = xmlStrncatNew((const xmlChar *)"<test>", (const xmlChar *)"</test>", 7);\r
+       DTS_CHECK_NE_MESSAGE("xmlStrncatNew", (void *)ret_val, (void *)NULL, "xmlStrncatNewFailed");\r
+       desret_xmlChar_ptr(ret_val);\r
+}\r
+       /**    \r
+       * @test                 UTcxmlStrncatP01\r
+       * @brief                        xmlChar *xmlStrncat (xmlChar * cur, const xmlChar * add, int len)\r
+       * @desc                 Positive Test for strncat for array of xmlChar's\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                               {xmlChar pointer(cur) ,const xmlChar pointer(add),int(len) }=> {N/A | xmlChar pointer}  @n\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcxmlStrncatP01()\r
+{\r
+       xmlChar* pRet = NULL;\r
+       xmlChar* pSrc = xmlCharStrdup("Hello");\r
+\r
+       pRet = xmlStrncat(pSrc, (const xmlChar *)" world", sizeof(" world"));\r
+       DTS_CHECK_EQ_MESSAGE("xmlStrncat", (void *)(pRet != NULL && xmlStrcmp(pRet, (const xmlChar*)"Hello world")), (void *)0, "xmlStrncat Failed");\r
+\r
+       desret_xmlChar_ptr(pRet);\r
+}\r
+       /**    \r
+       * @test                 UTcxmlUTF8CharcmpP01\r
+       * @brief                        int     xmlUTF8Charcmp (const xmlChar * utf1, const xmlChar * utf2)\r
+       * @desc                 Positive Test to compare the two UCS4 values\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [two UTF strings, N/A]  @n\r
+       *                               {const xmlChar pointer(utf1) ,const xmlChar pointer(utf2) }=> {N/A |0}  @n\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcxmlUTF8CharcmpP01()\r
+{\r
+\r
+       int ret_val;\r
+       xmlChar * utf1; /* pointer to first UTF8 char */\r
+       int n_utf1;\r
+       xmlChar * utf2; /* pointer to second UTF8 char */\r
+\r
+       for (n_utf1 = 0;n_utf1 < gen_nb_const_xmlChar_ptr;n_utf1++) {\r
+\r
+               utf1 = gen_const_xmlChar_ptr(n_utf1, 0);\r
+               utf2 = gen_const_xmlChar_ptr(n_utf1, 1);\r
+               /**\r
+                * @remarks   input1: [N/A, N/A]        @n\r
+                *                                      {const xmlChar pointer ,const xmlChar pointer }=> {N/A |0}      @n\r
+                */\r
+               ret_val = xmlUTF8Charcmp((const xmlChar *)utf1, (const xmlChar *)utf2);\r
+               DTS_CHECK_EQ_MESSAGE("xmlUTF8Charcmp", (void *)ret_val, (void *)0, "xmlUTF8Charcmp Failed");\r
+       }\r
+\r
+}\r
+\r
+       /**    \r
+       * @test                 UTcxmlUTF8SizeP01\r
+       * @brief                        int     xmlUTF8Size (const xmlChar * utf)\r
+       * @desc                 Positive Test for calculating the internal size of a UTF8 character\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A]      @n\r
+       *                               {const xmlChar pointer(utf) }=> {N/A |non zero} @n\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcxmlUTF8SizeP01()\r
+{\r
+\r
+       int ret_val;\r
+       xmlChar * utf; /* pointer to the UTF8 character */\r
+       int n_utf;\r
+\r
+       for (n_utf = 0;n_utf < gen_nb_const_xmlChar_ptr;n_utf++) {\r
+\r
+               utf = gen_const_xmlChar_ptr(n_utf, 0);\r
+               /**\r
+                * @remarks   input1: [N/A, N/A]        @n\r
+                *                                      {const xmlChar pointer }=> {N/A |non zero}      @n\r
+                */\r
+               ret_val = xmlUTF8Size((const xmlChar *)utf);\r
+               //(ret_val > 0, "xmlUTF8Charcmp failed\n");\r
+               DTS_CHECK_GT_MESSAGE("xmlUTF8Size", (void *)ret_val, (void *)0, "xmlUTF8Size Failed");\r
+       }\r
+}\r
+       /**    \r
+       * @test                 UTcxmlUTF8StrlenP01\r
+       * @brief                        int     xmlUTF8Strlen    (const xmlChar * utf)\r
+       * @desc                 Positive Test for computing the length of an UTF8 string, it doesn't do a full UTF8 checking of the content of the string.\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [sequence of UTF encoded bytes, N/A]    @n\r
+       *                               {const xmlChar pointer(utf)} => {N/A |non zero} @n\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcxmlUTF8StrlenP01()\r
+{\r
+       int ret_val;\r
+       xmlChar * utf; /* a sequence of UTF-8 encoded bytes */\r
+       int n_utf;\r
+\r
+       for (n_utf = 0;n_utf < gen_nb_const_xmlChar_ptr;n_utf++) {\r
+\r
+               utf = gen_const_xmlChar_ptr(n_utf, 0);\r
+               /**\r
+                * @remarks   input1: [N/A, N/A]        @n\r
+                *                                      {const xmlChar pointer} => {N/A |non zero}      @n\r
+                */\r
+               ret_val = xmlUTF8Strlen((const xmlChar *)utf);\r
+               DTS_CHECK_GT_MESSAGE("xmlUTF8Strlen", (void *)ret_val, (void *)0, "xmlUTF8Strlen Failed");\r
+       }\r
+\r
+}\r
+       /**    \r
+       * @test                 UTcxmlUTF8StrlocP01\r
+       * @brief                        int     xmlUTF8Strloc    (const xmlChar * utf, const xmlChar * utfchar)\r
+       * @desc                 Positive Test to provide the relative location of a UTF8 char\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [UTF8 and character to be found, N/A]   @n\r
+       *                               {const xmlChar pointer(utf) ,const xmlChar pointer(utfchar)}=> {N/A |non zero}  @n\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcxmlUTF8StrlocP01()\r
+{\r
+       int ret_val;\r
+       xmlChar * utf; /* the input UTF8 * */\r
+       xmlChar * utfchar; /* the UTF8 character to be found */\r
+\r
+       utf = gen_const_xmlChar_ptr(1, 0);\r
+       utfchar = gen_const_xmlChar_ptr(0, 1);\r
+       /**\r
+        * @remarks   input1: [N/A, N/A]        @n\r
+        *                                      {const xmlChar pointer ,const xmlChar pointer}=> {N/A |non zero}        @n\r
+        */\r
+       ret_val = xmlUTF8Strloc((const xmlChar *)utf, (const xmlChar *)utfchar);\r
+       DTS_CHECK_GT_MESSAGE("xmlUTF8Strloc", (void *)ret_val, (void *)0, "xmlUTF8Strloc Failed");\r
+\r
+}\r
+       /**    \r
+       * @test                 UTcxmlUTF8StrndupP01\r
+       * @brief                        xmlChar * xmlUTF8Strndup (const xmlChar * utf, int len)\r
+       * @desc                 Positive Test for strndup operatin for array of UTF8's\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A]      @n\r
+       *                               {const xmlChar pointer(utf) ,int(len)} => {N/A |xmlChar pointer}        @n\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcxmlUTF8StrndupP01()\r
+{\r
+\r
+       xmlChar * ret_val;\r
+       xmlChar * utf; /* the input UTF8 * */\r
+       int n_utf;\r
+       int len; /* the len of @utf (in chars) */\r
+       int n_len;\r
+\r
+       for (n_utf = 0;n_utf < gen_nb_const_xmlChar_ptr;n_utf++) {\r
+               for (n_len = 0;n_len < gen_nb_int;n_len++) {\r
+\r
+                       utf = gen_const_xmlChar_ptr(n_utf, 0);\r
+                       len = gen_int(n_len, 1);\r
+                       /**\r
+                        * @remarks   input1: [N/A, N/A]        @n\r
+                        *                                      {const xmlChar pointer ,len} => {N/A |xmlChar pointer}  @n\r
+                        */\r
+                       ret_val = xmlUTF8Strndup((const xmlChar *)utf, len);\r
+                       DTS_CHECK_NE_MESSAGE("xmlUTF8Strndup", (void *)ret_val, (void *)NULL, "xmlUTF8Strndup Failed");\r
+\r
+                       desret_xmlChar_ptr(ret_val);\r
+               }\r
+       }\r
+\r
+}\r
+       /**    \r
+       * @test                 UTcxmlUTF8StrposP01\r
+       * @brief                        const xmlChar * xmlUTF8Strpos (const xmlChar * utf, int pos)\r
+       * @desc                 Positive Test to provide the equivalent of fetching a character from a string array\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A]      @n\r
+       *                               {const xmlChar pointer(utf) ,int(pos)} => {N/A |xmlChar pointer}        @n\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcxmlUTF8StrposP01()\r
+{\r
+\r
+       const xmlChar * ret_val;\r
+       xmlChar * utf; /* the input UTF8 * */\r
+       int n_utf;\r
+       int pos; /* the position of the desired UTF8 char (in chars) */\r
+       int n_pos;\r
+\r
+       for (n_utf = 0;n_utf < gen_nb_const_xmlChar_ptr;n_utf++) {\r
+               for (n_pos = 0;n_pos < 3;n_pos++) {\r
+\r
+                       utf = gen_const_xmlChar_ptr(n_utf, 0);\r
+                       pos = gen_int(n_pos, 1);\r
+                       /**\r
+                        * @remarks   input1: [N/A, N/A]        @n\r
+                        *                                      {const xmlChar pointer ,pos} => {N/A |xmlChar pointer}  @n\r
+                        */\r
+                       ret_val = xmlUTF8Strpos((const xmlChar *)utf, pos);\r
+                       DTS_CHECK_NE_MESSAGE("xmlUTF8Strpos", (void *)ret_val, (void *)NULL, "xmlUTF8Strpos Failed");\r
+\r
+\r
+               }\r
+       }\r
+}\r
+       /**    \r
+       * @test                 UTcxmlUTF8StrsubP01\r
+       * @brief                        xmlChar *xmlUTF8Strsub (const xmlChar * utf, int start, int len)\r
+       * @desc                 Positive Test to create a substring from a given UTF-8 string\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A]      @n\r
+       *                               {const xmlChar pointer(utf) , int(start), int(len)} => {N/A |xmlChar pointer}   @n\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcxmlUTF8StrsubP01()\r
+{\r
+\r
+       xmlChar * ret_val;\r
+\r
+       /**\r
+        * @remarks   input1: [N/A, N/A]        @n\r
+        *                                      {const xmlChar pointer , start, len} => {N/A |xmlChar pointer}  @n\r
+        */\r
+       ret_val = xmlUTF8Strsub((const xmlChar *)"<test/>", 1, 5);\r
+       DTS_CHECK_NE_MESSAGE("xmlUTF8Strsub", (void *)ret_val, (void *)NULL, "xmlUTF8Strsub Failed");\r
+\r
+       desret_xmlChar_ptr(ret_val);\r
+}\r
+static void startup( void);\r
+static void cleanup( void);\r
+\r
+void (*tet_startup)( void) = startup;\r
+void (*tet_cleanup)( void) = cleanup;\r
+\r
+static void startup( void)\r
+{\r
+        /* start of TC */\r
+        tet_printf("TC starts.");\r
+}\r
+\r
+static void cleanup( void)\r
+{\r
+        /* end of TC */\r
+        tet_printf("TC ends.");\r
+}\r
+\r
+struct tet_testlist tet_testlist[] = {\r
+       // Handling of out of context errors\r
+       {UTcxmlCharStrdupP01,1},\r
+       {UTcxmlCharStrndupP01,2},\r
+       {UTcxmlCheckUTF8P01,3},\r
+       {UTcxmlGetUTF8CharP01,4},\r
+       {UTcxmlStrEqualP01,5},\r
+       {UTcxmlStrcasecmpP01,6},\r
+       {UTcxmlStrcasestrP01,7},\r
+       {UTcxmlStrchrP01,8},\r
+       {UTcxmlStrcmpP01,9},\r
+       {UTcxmlStrdupP01,10},\r
+       \r
+       {UTcxmlStrstrP01,11},\r
+       {UTcxmlStrsubP01,12},\r
+       {UTcxmlStrncatNewP01,13},\r
+       {UTcxmlStrncatP01,14},\r
+       {UTcxmlUTF8CharcmpP01,15},\r
+       {UTcxmlUTF8SizeP01,16},\r
+       {UTcxmlUTF8StrlenP01,17},\r
+       {UTcxmlUTF8StrlocP01,18},\r
+       {UTcxmlUTF8StrndupP01,19},\r
+       {UTcxmlUTF8StrposP01,20},\r
+       \r
+       {UTcxmlUTF8StrsubP01,21},\r
+       { NULL, 0 },\r
+       \r
+};\r
diff --git a/TC/testcase/utc_libxml_XmlTree.c b/TC/testcase/utc_libxml_XmlTree.c
new file mode 100755 (executable)
index 0000000..32cdd84
--- /dev/null
@@ -0,0 +1,3525 @@
+//\r
+// Open Service Platform\r
+// Copyright (c) 2004 Software Center, Samsung Electronics, Inc.\r
+// All right reserved.\r
+//\r
+// This software is the confidential and proprietary information\r
+// of Samsung Electronics, Inc. (¡°Confidential Information¡±). You\r
+// shall not disclose such Confidential Information and shall use\r
+// it only in accordance with the terms of the license agreement\r
+// you entered into with Samsung Electronics.\r
+//\r
+/**\r
+ * @file               SUTsXmlTree.cpp\r
+ * @brief              This is the implementation for SUTsXmlTree class.\r
+ * @author      Sunil G Rayana (s.rayana@partner.samsung.com)\r
+ * @version            0.1\r
+ *\r
+ * This file contains LibXml Tree Operations.\r
+ *\r
+ */\r
+\r
+#include "utc_libxml_include.h"\r
+\r
+\r
+\r
+\r
+#define INPUT_XML LIBXML2TESTXML\r
+\r
+\r
+\r
+#define gen_nb_const_xmlChar_ptr 5\r
+#define gen_nb_xmlBufferPtr 3\r
+#define gen_nb_xmlBufferAllocationScheme 4\r
+\r
+static xmlDocPtr api_doc = NULL;\r
+static xmlDtdPtr api_dtd = NULL;\r
+static xmlNodePtr api_root = NULL;\r
+static xmlAttrPtr api_attr = NULL;\r
+static xmlNsPtr api_ns = NULL;\r
+\r
+static xmlDocPtr       pXmlDocPtr = NULL;\r
+static xmlNodePtr      pXmlNodePtr_1 = NULL;\r
+static xmlNodePtr      pXmlNodePtr_2 = NULL;\r
+static xmlNsPtr                pXmlNsPtr = NULL;\r
+static xmlAttrPtr      pXmlAttrPtr = NULL;\r
+static const xmlChar* pConstXmlChar = (xmlChar*) "//SUBJECT";\r
+\r
+static xmlChar chartab[1024];\r
+\r
+static const char *static_buf_content = "a static buffer";\r
+\r
+static xmlDocPtr\r
+get_api_doc(void) {\r
+    if (api_doc == NULL) {\r
+        api_doc = xmlReadMemory("<!DOCTYPE root [<!ELEMENT root EMPTY>]><root xmlns:h='http://example.com/' h:foo='bar'/>", 88, "root_test", NULL, 0);\r
+       api_root = NULL;\r
+       api_attr = NULL;\r
+    }\r
+    return(api_doc);\r
+}\r
+\r
+static void\r
+free_api_doc(void) {\r
+    xmlFreeDoc(api_doc);\r
+    api_doc = NULL;\r
+    api_dtd = NULL;\r
+    api_root = NULL;\r
+    api_attr = NULL;\r
+    api_ns = NULL;\r
+}\r
+\r
+static xmlNodePtr\r
+get_api_root(void) {\r
+    if ((api_root == NULL) || (api_root->type != XML_ELEMENT_NODE)) {\r
+        get_api_doc();\r
+       if ((api_doc != NULL) && (api_doc->children != NULL) &&\r
+           (api_doc->children->next != NULL) &&\r
+           (api_doc->children->next->type == XML_ELEMENT_NODE))\r
+           api_root = api_doc->children->next;\r
+    }\r
+    return(api_root);\r
+}\r
+\r
+static xmlDtdPtr\r
+get_api_dtd(void) {\r
+    if ((api_dtd == NULL) || (api_dtd->type != XML_DTD_NODE)) {\r
+        get_api_doc();\r
+       if ((api_doc != NULL) && (api_doc->children != NULL) &&\r
+           (api_doc->children->type == XML_DTD_NODE))\r
+           api_dtd = (xmlDtdPtr) api_doc->children;\r
+    }\r
+    return(api_dtd);\r
+}\r
+\r
+static xmlDocPtr getdoc(char *docname)\r
+{\r
+       xmlDocPtr doc;\r
+       doc = xmlParseFile(docname);\r
+       if (doc == NULL ) {\r
+               DTS_PRINT("xmlParseFile", "Document not parsed successfully");\r
+               return NULL;\r
+       }\r
+       return doc;\r
+}\r
+static xmlDocPtr gen_xmlDocPtr(int no, int nr ATTRIBUTE_UNUSED) {\r
+       char *docname = INPUT_XML;\r
+       xmlDocPtr doc;\r
+       doc = getdoc(docname);\r
+       return(doc);\r
+}\r
+static xmlNodePtr\r
+__get_api_root(void) {\r
+    if ((api_root == NULL) || (api_root->type != XML_ELEMENT_NODE)) {\r
+               api_doc = gen_xmlDocPtr(1,1);\r
+       if ((api_doc != NULL) && (api_doc->children != NULL) &&\r
+           (api_doc->children->next != NULL) &&\r
+           (api_doc->children->next->type == XML_ELEMENT_NODE))\r
+           api_root = api_doc->children->next;\r
+    }\r
+    return(api_root);\r
+}\r
+\r
+static xmlChar *__gen_const_xmlChar_ptr(int no, int nr ATTRIBUTE_UNUSED) {\r
+    if (no == 0) return((xmlChar *) "foo");\r
+    if (no == 1) return((xmlChar *) "<foo/>");\r
+    if (no == 2) return((xmlChar *) "none");\r
+    if (no == 3) return((xmlChar *) " 2ab ");\r
+    return(NULL);\r
+}\r
+static int gen_int(int no, int nr ATTRIBUTE_UNUSED) {\r
+    if (no == 0) return(0);\r
+    if (no == 1) return(1);\r
+    if (no == 2) return(-1);\r
+    if (no == 3) return(122);\r
+    return(-1);\r
+}\r
+\r
+static void desret_xmlNodePtr(xmlNodePtr val) {\r
+    if ((val != NULL) && (val != api_root) && (val != (xmlNodePtr) api_doc)) {\r
+       xmlUnlinkNode(val);\r
+       xmlFreeNode(val);\r
+    }\r
+}\r
+\r
+static void des_xmlDocPtr(int no ATTRIBUTE_UNUSED, xmlDocPtr val, int nr ATTRIBUTE_UNUSED) {\r
+    if ((val != NULL) && (val != api_doc) && (val->doc != api_doc))\r
+        xmlFreeDoc(val);\r
+}\r
+\r
+static xmlNodePtr gen_xmlNodePtr(int no, int nr ATTRIBUTE_UNUSED) {\r
+    if (no == 0) return(xmlNewPI(BAD_CAST "test", NULL));\r
+    if (no == 1) return(get_api_root());\r
+    return(NULL);\r
+/*     if (no == 2) return((xmlNodePtr) get_api_doc()); */\r
+}\r
+static xmlNodePtr __gen_xmlNodePtr(int no, int nr ATTRIBUTE_UNUSED) {\r
+    if (no == 0) return(xmlNewPI(BAD_CAST "test", NULL));\r
+    if (no == 1) return(__get_api_root());\r
+    return(NULL);\r
+/*     if (no == 2) return((xmlNodePtr) get_api_doc()); */\r
+}\r
+\r
+\r
+static void desret_xmlChar_ptr(xmlChar *val) {\r
+    if (val != NULL)\r
+       xmlFree(val);\r
+}\r
+\r
+static void des_xmlNodePtr(int no, xmlNodePtr val, int nr ATTRIBUTE_UNUSED) {\r
+    if (no == 1) {\r
+        free_api_doc();\r
+    } else if (val != NULL) {\r
+        xmlUnlinkNode(val);\r
+        xmlFreeNode(val);\r
+    }\r
+}\r
+\r
+static void desret_xmlNsPtr(xmlNsPtr val ATTRIBUTE_UNUSED) {\r
+       if (val != NULL) {\r
+        xmlFreeNs(val);\r
+    }\r
+}\r
+\r
+static xmlBufferPtr gen_xmlBufferPtr(int no, int nr ATTRIBUTE_UNUSED) {\r
+    if (no == 0) return(xmlBufferCreate());\r
+    if (no == 1) return(xmlBufferCreateStatic((void *)static_buf_content, 13));\r
+    return(NULL);\r
+}\r
+\r
+static void des_xmlBufferPtr(int no ATTRIBUTE_UNUSED, xmlBufferPtr val, int nr ATTRIBUTE_UNUSED) {\r
+    if (val != NULL) {\r
+        xmlBufferFree(val);\r
+    }\r
+}\r
+\r
+static xmlAttrPtr\r
+get_api_attr(void) {\r
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_HTML_ENABLED)\r
+    static int nr = 0;\r
+    xmlChar name[20];\r
+#endif\r
+\r
+    if ((api_root == NULL) || (api_root->type != XML_ELEMENT_NODE)) {\r
+        get_api_root();\r
+    }\r
+    if (api_root == NULL) \r
+        return(NULL);\r
+    if (api_root->properties != NULL) {\r
+        api_attr = api_root->properties;\r
+        return(api_root->properties);\r
+    }\r
+    api_attr = NULL;\r
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_HTML_ENABLED)\r
+    api_attr = xmlSetProp(api_root, name, (const xmlChar *) "bar");\r
+#endif\r
+    return(api_attr);\r
+}\r
+\r
+static void desret_xmlAttrPtr(xmlAttrPtr val) {\r
+    if (val != NULL) {\r
+       xmlUnlinkNode((xmlNodePtr) val);\r
+       xmlFreeNode((xmlNodePtr) val);\r
+    }\r
+}\r
+\r
+static xmlNodePtr gen_xmlNodePtr_in(int no, int nr ATTRIBUTE_UNUSED) {\r
+    if (no == 0) return(xmlNewPI(BAD_CAST "test", NULL));\r
+    if (no == 1) return(xmlNewText(BAD_CAST "text"));\r
+    return(NULL);\r
+}\r
+\r
+static xmlDtdPtr gen_xmlDtdPtr(int no, int nr ATTRIBUTE_UNUSED) {\r
+    if (no == 0) \r
+        return(xmlNewDtd(NULL, BAD_CAST "dtd", BAD_CAST"foo", BAD_CAST"bar"));\r
+    if (no == 1) return(get_api_dtd());\r
+    return(NULL);\r
+}\r
+static void des_xmlDtdPtr(int no, xmlDtdPtr val, int nr ATTRIBUTE_UNUSED) {\r
+    if (no == 1) free_api_doc();\r
+    else if (val != NULL) {\r
+        xmlUnlinkNode((xmlNodePtr) val);\r
+        xmlFreeNode((xmlNodePtr) val);\r
+    }\r
+}\r
+\r
+static void desret_xmlDtdPtr(xmlDtdPtr val) {\r
+    desret_xmlNodePtr((xmlNodePtr)val);\r
+}\r
+\r
+static xmlNsPtr\r
+get_api_ns(void) {\r
+    get_api_root();\r
+    if (api_root != NULL)\r
+        api_ns = api_root->nsDef;\r
+    return(api_ns);\r
+}\r
+\r
+static void desret_xmlDocPtr(xmlDocPtr val) {\r
+    if (val != api_doc)\r
+       xmlFreeDoc(val);\r
+}\r
+\r
+static unsigned int gen_unsigned_int(int no, int nr ATTRIBUTE_UNUSED) {\r
+    if (no == 0) return(0);\r
+    if (no == 1) return(1);\r
+    if (no == 2) return(122);\r
+    return((unsigned int) -1);\r
+}\r
+\r
+static xmlChar *gen_xmlChar_ptr(int no, int nr ATTRIBUTE_UNUSED) {\r
+    if (no == 0) return(&chartab[0]);\r
+    return(NULL);\r
+}\r
+\r
+static xmlBufferAllocationScheme gen_xmlBufferAllocationScheme(int no, int nr ATTRIBUTE_UNUSED) {\r
+    if (no == 1) return(XML_BUFFER_ALLOC_DOUBLEIT);\r
+    if (no == 2) return(XML_BUFFER_ALLOC_EXACT);\r
+    if (no == 3) return(XML_BUFFER_ALLOC_IMMUTABLE);\r
+    return(XML_BUFFER_ALLOC_DOUBLEIT);\r
+}\r
+\r
+static xmlBufferPtr gen_const_xmlBufferPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+    xmlBufferPtr buffer = xmlBufferCreate();\r
+       return(buffer);\r
+}\r
+\r
+static char *gen_const_char_ptr(int no, int nr ATTRIBUTE_UNUSED) {\r
+    if (no == 0) return((char *) "foo");\r
+    if (no == 1) return((char *) "<foo/>");\r
+    if (no == 2) return((char *) "test/ent2");\r
+    return(NULL);\r
+}\r
+\r
+/***************************************************************************\r
+ * SUTsXmlTree\r
+ ***************************************************************************/\r
+\r
+void getReference (xmlDocPtr doc, xmlNodePtr cur) \r
+{\r
+        xmlChar *key;\r
+        cur = cur->xmlChildrenNode;\r
+        while (cur != NULL) {\r
+                if ((!xmlStrcmp(cur->name, (const xmlChar *)"TO"))) {\r
+                        key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);\r
+                       DTS_CHECK_EQ_MESSAGE("xmlNodeListGetString", (void *)(xmlStrcmp(key,(const xmlChar *)"Tutorial Takers")), (void *)0, "xmlNodeListGetString Failed");\r
+                        \r
+                        xmlFree(key);\r
+                }\r
+                if ((!xmlStrcmp(cur->name, (const xmlChar *)"FROM"))) {\r
+                        key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);\r
+                        DTS_CHECK_EQ_MESSAGE("xmlNodeListGetString", (void *)(xmlStrcmp(key,(const xmlChar *)"Tutorial Writer")), (void *)0, "xmlNodeListGetString Failed");\r
+                        xmlFree(key);\r
+                }\r
+                if ((!xmlStrcmp(cur->name, (const xmlChar *)"SUBJECT"))) {\r
+                        key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);\r
+                        DTS_CHECK_EQ_MESSAGE("xmlNodeListGetString", (void *)(xmlStrcmp(key,(const xmlChar *)"Your impressions")), (void *)0, "xmlNodeListGetString Failed");\r
+                        xmlFree(key);\r
+                }\r
+                cur = cur->next;\r
+        }\r
+        return;\r
+ }\r
+\r
+\r
+/**\r
+ * parseStart:\r
+ * @filename: a filename or an URL\r
+ *\r
+ * Parse the resource and free the resulting tree\r
+ */\r
+\r
+static void\r
+parseStart(const char *filename) \r
+{\r
+       xmlDocPtr doc; /* the resulting document tree */\r
+       xmlNodePtr cur;\r
+       \r
+       doc = xmlReadFile(filename, NULL, 0);\r
+       DTS_CHECK_NE_MESSAGE("parseStart", (void *)doc, (void *)NULL, "xmlReadFile Failed");\r
+\r
+       cur = xmlDocGetRootElement(doc);\r
+       if (cur == NULL) {\r
+               xmlFreeDoc(doc);\r
+       }\r
+       DTS_CHECK_NE_MESSAGE("parseStart", (void *)cur, (void *)NULL, "xmlDocGetRootElement Failed");\r
+\r
+       if (xmlStrcmp(cur->name, (const xmlChar *) "MEMO")) \r
+       {\r
+               xmlFreeDoc(doc);\r
+               DTS_FAIL("parseStart", "xmlReadFile Failed");\r
+       }\r
+       \r
+       getReference (doc, cur);\r
+       xmlFreeDoc(doc);\r
+\r
+}\r
+       /**    \r
+       * @test                 UTcTreeP01\r
+       * @brief                xmlChar *       xmlNodeListGetString    (xmlDocPtr doc, xmlNodePtr list, int inLine)\r
+       * @desc                 Positive Test to get the root element of the document LIBXML2TESTXML\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1.[Check if the (xmlNodePtr*)cur->name is "TO", N/A]\r
+                                       {xmlDocPtr(doc), xmlNodePtr(list), int } ==> { N/A, xmlChar*("Tutorial Takers") }\r
+                                       input1.[Check if the (xmlNodePtr*)cur->name is "FROM", N/A]\r
+                                       {xmlDocPtr(doc), xmlNodePtr(list), int } ==> { N/A, xmlChar*("Tutorial Writer") }\r
+                                       input1.[Check if the (xmlNodePtr*)cur->name is "SUBJECT", N/A]\r
+                                       {xmlDocPtr(doc), xmlNodePtr(list), int } ==> { N/A, xmlChar*("Your impressions") }\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcTreeP01()\r
+{\r
+    /*\r
+     * this initialize the library and check potential API mismatches\r
+     * between the version it was compiled for and the actual shared\r
+     * library used.\r
+     */\r
+    LIBXML_TEST_VERSION\r
+                        //Target\r
+       const char *filename = LIBXML2TESTXML;\r
+       parseStart(filename);\r
+}\r
+       /**    \r
+       * @test                 UTcTreeP02\r
+       * @brief                int     xmlSaveFormatFileEnc (const char * filename,xmlDocPtr cur,const char * encoding, int format)\r
+       * @desc                 Positive Test for creating node and dump the contents to stdio file.\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Create a new child, N/A] @n\r
+       *                       {char(UTSXMLHOME"/libXml2Out.xml"),xmlDocPtr(cur), char*(UTF-8), int(1)} => {true | N/A} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcTreeP02()\r
+{\r
+    xmlDocPtr  doc = NULL;       /* document pointer */\r
+    xmlNodePtr root_node = NULL;       /* node pointers */\r
+       xmlNodePtr      node = NULL;\r
+       xmlNodePtr      node1 = NULL; \r
+    xmlDtdPtr  dtd = NULL;       /* DTD pointer */\r
+    char               buff[256];\r
+    int                        i = 0;\r
+       int                     j = 0;\r
+       \r
+       const char *filename = UTSHOME"/libXml2Out.xml";\r
+\r
+\r
+    LIBXML_TEST_VERSION;\r
+\r
+    /* \r
+     * Creates a new document, a node and set it as a root node\r
+     */\r
+    doc = xmlNewDoc(BAD_CAST "1.0");\r
+       DTS_CHECK_NE_MESSAGE("UTcTreeP02", (void *)doc, (void *)NULL, "xmlNewDoc Failed");\r
+       \r
+\r
+    root_node = xmlNewNode(NULL, BAD_CAST "root");\r
+       DTS_CHECK_NE_MESSAGE("UTcTreeP02", (void *)root_node, (void *)NULL, "xmlNewNode Failed");\r
+\r
+    xmlDocSetRootElement(doc, root_node);\r
+\r
+    /*\r
+     * Creates a DTD declaration. Isn't mandatory. \r
+     */\r
+    dtd = xmlCreateIntSubset(doc, BAD_CAST "root", NULL, BAD_CAST "tree2.dtd");\r
+       DTS_CHECK_NE_MESSAGE("UTcTreeP02", (void *)dtd, (void *)NULL, "xmlCreateIntSubset Failed");\r
+\r
+    /* \r
+     * xmlNewChild() creates a new node, which is "attached" as child node\r
+     * of root_node node. \r
+     */\r
+    xmlNodePtr newChild = xmlNewChild(root_node, NULL, BAD_CAST "node1", BAD_CAST "content of node 1");\r
+       DTS_CHECK_NE_MESSAGE("UTcTreeP02", (void *)newChild, (void *)NULL, "xmlNewChild Failed");\r
+\r
+    /* \r
+     * The same as above, but the new child node doesn't have a content \r
+     */\r
+    newChild = xmlNewChild(root_node, NULL, BAD_CAST "node2", NULL);\r
+       DTS_CHECK_NE_MESSAGE("UTcTreeP02", (void *)newChild, (void *)NULL, "xmlNewChild Failed");\r
+\r
+    /* \r
+     * xmlNewProp() creates attributes, which is "attached" to a node.\r
+     * It returns xmlAttrPtr, which isn't used here.\r
+     */\r
+    node = xmlNewChild(root_node, NULL, BAD_CAST "node3", BAD_CAST "this node has attributes");\r
+       DTS_CHECK_NE_MESSAGE("UTcTreeP02", (void *)node, (void *)NULL, "xmlNewChild Failed");\r
+       \r
+    xmlAttrPtr attPtr = xmlNewProp(node, BAD_CAST "attribute", BAD_CAST "yes");\r
+       DTS_CHECK_NE_MESSAGE("UTcTreeP02", (void *)attPtr, (void *)NULL, "xmlNewChild Failed");\r
+\r
+    attPtr = xmlNewProp(node, BAD_CAST "foo", BAD_CAST "bar");\r
+       DTS_CHECK_NE_MESSAGE("UTcTreeP02", (void *)attPtr, (void *)NULL, "xmlNewChild Failed");\r
+\r
+    /*\r
+     * Here goes another way to create nodes. xmlNewNode() and xmlNewText\r
+     * creates a node and a text node separately. They are "attached"\r
+     * by xmlAddChild() \r
+     */\r
+    node = xmlNewNode(NULL, BAD_CAST "node4");\r
+       DTS_CHECK_NE_MESSAGE("UTcTreeP02", (void *)node, (void *)NULL, "xmlNewNode Failed");\r
+\r
+    node1 = xmlNewText(BAD_CAST "other way to create content (which is also a node)");\r
+       DTS_CHECK_NE_MESSAGE("UTcTreeP02", (void *)node1, (void *)NULL, "xmlNewNode Failed");\r
+\r
+    xmlAddChild(node, node1);\r
+    xmlAddChild(root_node, node);\r
+\r
+    /* \r
+     * A simple loop that "automates" nodes creation \r
+     */\r
+    for (i = 5; i < 7; i++) {\r
+        sprintf(buff, "node%d", i);\r
+        node = xmlNewChild(root_node, NULL, BAD_CAST buff, NULL);\r
+               DTS_CHECK_NE_MESSAGE("UTcTreeP02", (void *)node, (void *)NULL, "xmlNewChild Failed");\r
+\r
+        for (j = 1; j < 4; j++) {\r
+            sprintf(buff, "node%d%d", i, j);\r
+            node1 = xmlNewChild(node, NULL, BAD_CAST buff, NULL);\r
+                       DTS_CHECK_NE_MESSAGE("UTcTreeP02", (void *)node1, (void *)NULL, "xmlNewChild Failed");\r
+\r
+            attPtr = xmlNewProp(node1, BAD_CAST "odd", BAD_CAST((j % 2) ? "no" : "yes"));\r
+                       DTS_CHECK_NE_MESSAGE("UTcTreeP02", (void *)attPtr, (void *)NULL, "xmlNewProp Failed");\r
+       \r
+        }\r
+    }\r
+\r
+    /* \r
+     * Dumping document to stdio or file\r
+     */\r
+    int r = xmlSaveFormatFileEnc(filename, doc, "UTF-8", 1);   \r
+       DTS_CHECK_NE_MESSAGE("UTcTreeP02", (void *)r, (void *)-1, "xmlSaveFormatFileEnc Failed");\r
+\r
+    /*free the document */\r
+    xmlFreeDoc(doc);\r
+\r
+}\r
+       /**    \r
+       * @test                 UTcxmlStringLenGetNodeListP01\r
+       * @brief                        xmlNodePtr      xmlStringLenGetNodeList (xmlDocPtr doc, const xmlChar * value,int len)\r
+       * @desc                 Positive Test for parsing the value string and build the node list associated\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Generate xmlDocPtr, Destroy xmlNodePtr and xmlDocPtr] @n\r
+       *                       {xmlDocPtr(doc), const xmlChar*(value), int(length of the string) } => { N/A | Valid xmlNodePtr } @n\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcxmlStringLenGetNodeListP01()\r
+{\r
+       xmlNodePtr      ret_val = NULL;\r
+    int                        len; /* the length of the string value */\r
+    int                        n_len = 0;\r
+\r
+       /**\r
+        * @remarks   input1: [Generate xmlDocPtr, Destroy xmlNodePtr and xmlDocPtr] @n\r
+        *            { Valid xmlDocPtr, Valid string, the length of the string } => { N/A | Valid xmlNodePtr } @n\r
+        */\r
+\r
+       for (n_len = 0;n_len < 3;n_len++) {\r
+               len = gen_int(n_len, 2);\r
+               ret_val = xmlStringLenGetNodeList(pXmlDocPtr, pConstXmlChar, len);\r
+               DTS_CHECK_NE_MESSAGE("xmlStringLenGetNodeList", (void *)ret_val, (void *)NULL, "xmlStringLenGetNodeList Failed");\r
+               \r
+               desret_xmlNodePtr(ret_val);\r
+               xmlResetLastError();\r
+       }\r
+}\r
+       /**    \r
+       * @test                 UTcxmlValidateQNameP01\r
+       * @brief                int     xmlValidateQName        (const xmlChar * value, int space)\r
+       * @desc                 Positive Test for checking that a value conforms to the lexical space of QName\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks      input1: [N/A, N/A] @n\r
+       *               { xmlChar * (Valid QName), int(0) } => { N/A | int } @n\r
+       *                               input2: [N/A, N/A] @n\r
+       *               { xmlChar * (Valid QName), int(1) } => { N/A | int } @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcxmlValidateQNameP01()\r
+{\r
+       \r
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)\r
+#ifdef LIBXML_TREE_ENABLED\r
+    \r
+        int            ret_val;\r
+\r
+       /**\r
+        * @remarks   input1: [N/A, N/A] @n\r
+        *            { Valid QName, 0 } => { N/A | int } @n\r
+        */\r
+       \r
+       ret_val = xmlValidateQName(pConstXmlChar, 0);\r
+       DTS_CHECK_NE_MESSAGE("xmlValidateQName", (void *)ret_val, (void *)0, "xmlValidateQName Failed");\r
+\r
+       xmlResetLastError();\r
+       \r
+       /**\r
+        * @remarks   input2: [N/A, N/A] @n\r
+        *            { Valid QName, 1 } => { N/A | int } @n\r
+        */\r
+       \r
+       ret_val = xmlValidateQName(pConstXmlChar, 1);\r
+       DTS_CHECK_NE_MESSAGE("xmlValidateQName", (void *)ret_val, (void *)0, "xmlValidateQName Failed");\r
+\r
+       xmlResetLastError();  \r
+\r
+#endif\r
+#endif\r
+}\r
+       /**    \r
+       * @test                 UTcxmlGetNodePathP01\r
+       * @brief                        xmlChar *xmlGetNodePath(xmlNodePtr node)\r
+       * @desc                 Positive Test for building a structure based Path for the given node\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks      input1: [Generate valid xmlNodePtr, Destroy xmlNodePtr and xmlChar*] @n\r
+       *               {xmlNodePtr(node)} => { N/A | Valid node path } @n\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcxmlGetNodePathP01()\r
+{      \r
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_DEBUG_ENABLED)\r
+    \r
+       xmlChar*        ret_val = NULL;\r
+\r
+       /**\r
+        * @remarks   input1: [Generate valid xmlNodePtr, Destroy xmlNodePtr and xmlChar*] @n\r
+        *            { Valid xmlNodePtr} => { N/A | Valid node path } @n\r
+        */\r
+\r
+//     ret_val = xmlGetNodePath(pXmlNodePtr_2);\r
+       ret_val = xmlGetNodePath(NULL);\r
+       DTS_CHECK_EQ_MESSAGE("xmlGetNodePath", (void *)ret_val, (void *)NULL, "xmlGetNodePath Failed");\r
+\r
+       desret_xmlChar_ptr(ret_val);\r
+       xmlResetLastError();\r
+#endif\r
+}\r
+       /**    \r
+       * @test                 UTcxmlValidateNMTokenP01\r
+       * @brief                        int     xmlValidateNMToken(const xmlChar * value, int space)\r
+       * @desc                 Positive Test for checking that a value conforms to the lexical space of NMToken\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks      input1: [N/A, N/A] @n\r
+       *                               { xmlChar * (Valid NMToken name), int(0)} => { N/A | 0 } @n\r
+       *                               input2: [N/A, N/A] @n\r
+       *                               { xmlChar * (Valid NMToken name), int(1)} => { N/A | 0 } @n\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcxmlValidateNMTokenP01()\r
+{\r
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)\r
+#ifdef LIBXML_TREE_ENABLED\r
+    \r
+       int     ret_val;\r
+  \r
+       /**\r
+        * @remarks   input1: [N/A, N/A] @n\r
+        *            { Valid NMToken name, 0} => { N/A | 0 } @n\r
+        */\r
+\r
+       ret_val = xmlValidateNMToken(pConstXmlChar, 0);\r
+       DTS_CHECK_NE_MESSAGE("xmlValidateNMToken", (void *)ret_val, (void *)-1, "xmlValidateNMToken Failed");\r
+\r
+       xmlResetLastError();\r
+       \r
+       /**\r
+        * @remarks   input2: [N/A, N/A] @n\r
+        *            { Valid NMToken name, 1} => { N/A | 0 } @n\r
+        */\r
+\r
+       ret_val = xmlValidateNMToken(pConstXmlChar, 1);\r
+       DTS_CHECK_NE_MESSAGE("xmlValidateNMToken", (void *)ret_val, (void *)-1, "xmlValidateNMToken Failed");\r
+       \r
+       xmlResetLastError();\r
+\r
+#endif\r
+#endif   \r
+}\r
+       /**    \r
+       * @test                 UTcxmlValidateNameP01\r
+       * @brief                int     xmlValidateName(const xmlChar * value, int space)\r
+       * @desc                 Positive Test to check that a value conforms to the lexical space of Name\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                               { xmlChar *(Valid Name space), int(0)} => { N/A | 0 } @n\r
+       *                               input2: [N/A, N/A] @n\r
+        *                      { xmlChar * (Valid Name space), int(1)} => { N/A | 0 } @n\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcxmlValidateNameP01()\r
+{\r
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)\r
+#ifdef LIBXML_TREE_ENABLED\r
+    int        ret_val;\r
+    \r
+       /**\r
+        * @remarks   input1: [N/A, N/A] @n\r
+        *            { Valid Name space, 0} => { N/A | 0 } @n\r
+        */\r
+\r
+    ret_val = xmlValidateName(pConstXmlChar, 0);\r
+       DTS_CHECK_NE_MESSAGE("xmlValidateName", (void *)ret_val, (void *)-1, "xmlValidateName Failed");\r
+       \r
+       xmlResetLastError();\r
+       \r
+       /**\r
+        * @remarks   input2: [N/A, N/A] @n\r
+        *            { Valid Name space, 1} => { N/A | 0 } @n\r
+        */\r
+\r
+    ret_val = xmlValidateName(pConstXmlChar, 1);\r
+       DTS_CHECK_NE_MESSAGE("xmlValidateName", (void *)ret_val, (void *)-1, "xmlValidateName Failed");\r
+       \r
+       xmlResetLastError();\r
+\r
+\r
+#endif\r
+#endif\r
+}\r
+       /**    \r
+       * @test                 UTcxmlReconciliateNsP01\r
+       * @brief                        int     xmlReconciliateNs(xmlDocPtr doc, xmlNodePtr tree)\r
+       * @desc                 Positive Test for checking that all the namespaces declared within the given tree are properly declared\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks      input1: [Generate valid xmlDocPtr and xmlNodePtr, Destroy xmlDocPtr and xmlNodePtr] @n\r
+       *               {xmlDocPtr(doc),xmlNodePtr(tree)} => { N/A | number of namespace declarations created } @n\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcxmlReconciliateNsP01()\r
+{\r
+#if defined(LIBXML_TREE_ENABLED)\r
+#ifdef LIBXML_TREE_ENABLED\r
+    \r
+       int             ret_val = 0;\r
+\r
+       /**\r
+        * @remarks   input1: [Generate valid xmlDocPtr and xmlNodePtr, Destroy xmlDocPtr and xmlNodePtr] @n\r
+        *            { Valid xmlDocPtr, Valid xmlNodePtr} => { N/A | number of namespace declarations created } @n\r
+        */\r
+       \r
+       ret_val = xmlReconciliateNs(pXmlDocPtr, pXmlNodePtr_2);\r
+//     DTS_CHECK_NE_MESSAGE("xmlReconciliateNs", (void *)ret_val, (void *)-1, "xmlReconciliateNs Failed");\r
+       DTS_CHECK_EQ_MESSAGE("xmlReconciliateNs", (void *)ret_val, (void *)-1, "xmlReconciliateNs Failed");\r
+       \r
+       xmlResetLastError();\r
+#endif\r
+#endif\r
+}\r
+       /**    \r
+       * @test                 UTcxmlSearchNsP01\r
+       * @brief                        xmlNsPtr        xmlSearchNs(xmlDocPtr doc, xmlNodePtr node, const xmlChar * nameSpace)\r
+       * @desc                 Positive Test for searching a Ns registered under a given name space for a document\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Generate valid xmlDocPtr and xmlNodePtr, Destroy xmlDocPtr, xmlNodePtr and xmlNsPtr] @n\r
+        *                      {xmlNodePtr(doc),xmlNodePtr(node), const xmlChar *("xml") } => { N/A | Valid xmlNsPtr } @n\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcxmlSearchNsP01()\r
+{\r
+       xmlNsPtr        ret_val = NULL;\r
+       xmlChar*        pNameSpace      = (xmlChar*) "xml";\r
+\r
+       /**\r
+        * @remarks   input1: [Generate valid xmlDocPtr and xmlNodePtr, Destroy xmlDocPtr, xmlNodePtr and xmlNsPtr] @n\r
+        *            { Valid xmlNodePtr, Valid xmlNodePtr, "xml" } => { N/A | Valid xmlNsPtr } @n\r
+        */\r
+\r
+       ret_val = xmlSearchNs(pXmlDocPtr, pXmlNodePtr_2, (const xmlChar *)pNameSpace);\r
+//     DTS_CHECK_NE_MESSAGE("xmlSearchNs", (void *)ret_val, (void *)NULL, "xmlSearchNs Failed");\r
+       DTS_CHECK_EQ_MESSAGE("xmlSearchNs", (void *)ret_val, (void *)NULL, "xmlSearchNs Failed");\r
+\r
+       //if(ret_val != NULL)\r
+       //      desret_xmlNsPtr(ret_val);\r
+       //xmlFree(pNameSpace);\r
+       xmlResetLastError();\r
+}\r
+       /**    \r
+       * @test                 UTcxmlValidateNCNameP01\r
+       * @brief                        int     xmlValidateNCName(const xmlChar * value, int space)\r
+       * @desc                 Positive Test to check that a value conforms to the lexical space of NCName\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                               { const xmlChar *(Valid NCName), int(0)} => { N/A | 0 } @n\r
+       *                               input2: [N/A, N/A] @n\r
+       *                               { const xmlChar *(Valid NCName), int(1)} => { N/A | 0 } @n\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcxmlValidateNCNameP01()\r
+{\r
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_DEBUG_ENABLED) || defined (LIBXML_HTML_ENABLED) || defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED)\r
+#ifdef LIBXML_TREE_ENABLED\r
+    int        ret_val;\r
+    \r
+       /**\r
+        * @remarks   input1: [N/A, N/A] @n\r
+        *            { Valid NCName, 0} => { N/A | 0 } @n\r
+        */\r
+\r
+    ret_val = xmlValidateNCName(pConstXmlChar, 0);\r
+       DTS_CHECK_NE_MESSAGE("xmlValidateNCName", (void *)ret_val, (void *)-1, "xmlValidateNCName Failed");\r
+       \r
+       xmlResetLastError();\r
+       \r
+       /**\r
+        * @remarks   input2: [N/A, N/A] @n\r
+        *            { Valid NCName, 1} => { N/A | 0 } @n\r
+        */\r
+\r
+    ret_val = xmlValidateNCName(pConstXmlChar, 1);\r
+       DTS_CHECK_NE_MESSAGE("xmlValidateNCName", (void *)ret_val, (void *)-1, "xmlValidateNCName Failed");\r
+       \r
+       xmlResetLastError();\r
+\r
+#endif\r
+#endif\r
+}\r
+       /**    \r
+       * @test                 UTcxmlSearchNsByHrefP01\r
+       * @brief                xmlNsPtr        xmlSearchNsByHref(xmlDocPtr doc, xmlNodePtr node, const xmlChar * href)\r
+       * @desc                 Positive Test to Search a Ns aliasing a given URI\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks      input1: [Generate xmlDocPtr and xmlNodePtr, Destroy xmlDocPtr, xmlNodePtr and xmlNsPtr] @n\r
+       *               {xmlDocPtr(doc), xmlNodePtr(node), const xmlChar * ("xml")} => { N/A | Valid xmlNsPtr } @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcxmlSearchNsByHrefP01()\r
+{\r
+       xmlNsPtr        ret_val = NULL;\r
+    xmlChar    *pHref  = (xmlChar*) "xml";\r
+\r
+       /**\r
+        * @remarks   input1: [Generate xmlDocPtr and xmlNodePtr, Destroy xmlDocPtr, xmlNodePtr and xmlNsPtr] @n\r
+        *            { Valid xmlDocPtr, Valid xmlNodePtr, "xml"} => { N/A | Valid xmlNsPtr } @n\r
+        */\r
+\r
+    ret_val = xmlSearchNsByHref(pXmlDocPtr, pXmlNodePtr_2, (const xmlChar *)pHref);\r
+       DTS_CHECK_EQ_MESSAGE("xmlSearchNsByHref", (void *)ret_val, (void *)NULL, "xmlSearchNsByHref Failed");\r
+       \r
+       desret_xmlNsPtr(ret_val);\r
+       xmlResetLastError();\r
+}\r
+       /**    \r
+       * @test                 UTcxmlNodeBufGetContentP01\r
+       * @brief                        int     xmlNodeBufGetContent    (xmlBufferPtr buffer, xmlNodePtr cur)\r
+       * @desc                 Positive Test for reading the value of a node @current node pointer\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Generate xmlDocPtr and xmlNodePtr, Destroy xmlDocPtr, xmlNodePtr and xmlNsPtr] @n\r
+       *                               {xmlBufferPtr(buffer), xmlNodePtr(cur)} => { N/A | Valid xmlNsPtr } @n\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcxmlNodeBufGetContentP01()\r
+{\r
+       int                             ret_val;\r
+    xmlBufferPtr       buffer = NULL; /* a buffer */\r
+    int                                n_buffer = 0;\r
+    \r
+       /**\r
+        * @remarks   input1: [Generate valid xmlBufferPtr and xmlNodePtr, Destroy xmlBufferPtr and xmlNodePtr] @n\r
+        *            { Valid xmlBufferPtr, Valid xmlNodePtr} => { N/A | 0 } @n\r
+        */\r
+\r
+    for (n_buffer = 0;n_buffer < gen_nb_xmlBufferPtr-1;n_buffer++) {\r
+               buffer = gen_xmlBufferPtr(n_buffer, 0);\r
+               \r
+               ret_val = xmlNodeBufGetContent(buffer, pXmlNodePtr_2);\r
+               //DTS_CHECK_EQ_MESSAGE("xmlNodeBufGetContent", (void *)ret_val, (void *)0, "xmlNodeBufGetContent Failed");\r
+               DTS_CHECK_EQ_MESSAGE("xmlNodeBufGetContent", (void *)ret_val, (void *)-1, "xmlNodeBufGetContent Failed");\r
+               \r
+               des_xmlBufferPtr(n_buffer, buffer, 0);          \r
+               xmlResetLastError();\r
+       }\r
+}\r
+       /**    \r
+       * @test                 UTcxmlNodeGetBaseP01\r
+       * @brief                        xmlChar * xmlNodeGetBase(xmlDocPtr doc, xmlNodePtr cur)\r
+       * @desc                 Positive Test to search for the BASE URL pointed by doc->URL\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks      input1: [Generate valid xmlDocPtr and xmlNodePtr, Destroy xmlDocPtr, xmlNodePtr and xmlChar*] @n\r
+       *               {xmlDocPtr(doc), Valid xmlNodePtr(cur)} => { N/A | Valid pointer to the base URL } @n\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcxmlNodeGetBaseP01()\r
+{\r
+       xmlChar*        ret_val = NULL;\r
+    \r
+       /**\r
+        * @remarks   input1: [Generate valid xmlDocPtr and xmlNodePtr, Destroy xmlDocPtr, xmlNodePtr and xmlChar*] @n\r
+        *            { Valid xmlDocPtr, Valid xmlNodePtr} => { N/A | Valid pointer to the base URL } @n\r
+        */\r
+\r
+    ret_val = xmlNodeGetBase(pXmlDocPtr, pXmlNodePtr_2);\r
+       DTS_CHECK_NE_MESSAGE("xmlNodeGetBase", (void *)ret_val, (void *)NULL, "xmlNodeGetBase Failed");\r
+       \r
+       desret_xmlChar_ptr(ret_val);\r
+       xmlResetLastError();\r
+}\r
+       /**    \r
+       * @test                 UTcxmlCopyPropP01\r
+       * @brief                xmlAttrPtr      xmlCopyProp     (xmlNodePtr target, xmlAttrPtr cur)\r
+       * @desc                 Positive Test to do a copy of the attribute.\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks      input1: [Generate valid xmlNodePtr and xmlAttrPtr, Destroy xmlNodePtr and xmlAttrPtr] @n\r
+       *               { Valid xmlNodePtr(target), Valid xmlAttrPtr(cur)} => { N/A | Valid xmlAttrPtr } @n\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcxmlCopyPropP01()\r
+{\r
+       xmlAttrPtr              ret_val = NULL;\r
+    \r
+       /**\r
+        * @remarks   input1: [Generate valid xmlNodePtr and xmlAttrPtr, Destroy xmlNodePtr and xmlAttrPtr] @n\r
+        *            { Valid xmlNodePtr, Valid xmlAttrPtr} => { N/A | Valid xmlAttrPtr } @n\r
+        */\r
+       ret_val = xmlCopyProp(pXmlNodePtr_2, pXmlAttrPtr);\r
+       //DTS_CHECK_NE_MESSAGE("xmlCopyProp", (void *)ret_val, (void *)NULL, "xmlCopyProp Failed");\r
+       DTS_CHECK_EQ_MESSAGE("xmlCopyProp", (void *)ret_val, (void *)NULL, "xmlCopyProp Failed");\r
+       \r
+       desret_xmlAttrPtr(ret_val);\r
+       xmlResetLastError();\r
+}\r
+               /**    \r
+       * @test                 UTcxmlNodeAddContentLenP01\r
+       * @brief                        void    xmlNodeAddContentLen    (xmlNodePtr cur, const xmlChar * content, int len)\r
+       * @desc                 Positive Test to append the extra substring to the node content.\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Generate valid xmlNodePtr, Destroy xmlNodePtr] @n\r
+       *                               { Valid xmlNodePtr, extra content to add, the size of content i.e 15} => { N/A | N/A } @n\r
+       *                               input2: [Generate valid xmlNodePtr, Destroy xmlNodePtr] @n\r
+       *                               { Valid xmlNodePtr(cur), extra content to add, the size of content i.e. int(10)} => { N/A | N/A } @n\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcxmlNodeAddContentLenP01()\r
+{\r
+       //xmlNodePtr pNodePtr_1 = gen_xmlNodePtr(0, 0);\r
+       //xmlNodePtr pNodePtr_2 = gen_xmlNodePtr(1, 0);\r
+       //static  xmlChar* pXmlChar = (xmlChar*) "//SUBJECT";\r
+\r
+       /**\r
+        * @remarks   input1: [Generate valid xmlNodePtr, Destroy xmlNodePtr] @n\r
+        *            { Valid xmlNodePtr, extra content to add, the size of content} => { N/A | N/A } @n\r
+        */\r
+\r
+    xmlNodeAddContentLen(pXmlNodePtr_1, pConstXmlChar, 15);\r
+    DTS_CHECK_EQ_MESSAGE("xmlNodeAddContentLen", (void *)1, (void *)1, "xmlNodeAddContentLen Failed");\r
+       \r
+       /**\r
+        * @remarks   input1: [Generate valid xmlNodePtr, Destroy xmlNodePtr] @n\r
+        *            { Valid xmlNodePtr, extra content to add, the size of content} => { N/A | N/A } @n\r
+        */\r
+\r
+    xmlNodeAddContentLen(pXmlNodePtr_2, pConstXmlChar, 10);\r
+    DTS_CHECK_EQ_MESSAGE("xmlNodeAddContentLen", (void *)1, (void *)1, "xmlNodeAddContentLen Failed");\r
+       \r
+       xmlResetLastError();\r
+}\r
+       /**    \r
+       * @test                 UTcxmlHasNsPropP01\r
+       * @brief                        xmlAttrPtr      xmlHasNsProp    (xmlNodePtr node, const xmlChar * name, const xmlChar * nameSpace)\r
+       * @desc                 Positive Test to search for an attribute associated to a node\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Generate valid xmlNodePtr, Destroy xmlNodePtr and xmlAttrPtr] @n\r
+       *                               { Valid xmlNodePtr(node), the attribute name, xmlChar *("xml")} => { N/A | valid xmlAttrPtr } @n\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcxmlHasNsPropP01()\r
+{\r
+       xmlAttrPtr      ret_val = NULL;\r
+    xmlChar*   nameSpace       = (xmlChar*) "xml";/* the URI of the namespace */\r
+\r
+       /**\r
+        * @remarks   input1: [Generate valid xmlNodePtr, Destroy xmlNodePtr and xmlAttrPtr] @n\r
+        *            { Valid xmlNodePtr, the attribute name, "xml"} => { N/A | valid xmlAttrPtr } @n\r
+        */\r
+       \r
+       ret_val = xmlHasNsProp(pXmlNodePtr_2, pConstXmlChar, (const xmlChar *)nameSpace);\r
+       //TODO: Sunil --> required to add valid check\r
+       DTS_CHECK_EQ_MESSAGE("xmlHasNsProp", (void *)ret_val, (void *)NULL, "xmlHasNsProp Failed");\r
+       \r
+       desret_xmlAttrPtr(ret_val);\r
+       xmlResetLastError();\r
+}\r
+       /**    \r
+       * @test                 UTcxmlGetNsPropP01\r
+       * @brief                        xmlChar *       xmlGetNsProp    (xmlNodePtr node, const xmlChar * name, const xmlChar * nameSpace)\r
+       * @desc                 Positive Test to search and get the value of an attribute associated to a node\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks      input1: [Generate valid xmlNodePtr, Destroy xmlNodePtr and xmlChar*] @n\r
+       *               { Valid xmlNodePtr(node), the attribute name, xmlChar * ("xml")} => { N/A | the attribute value of the given node} @n\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcxmlGetNsPropP01()\r
+{\r
+       xmlChar*        ret_val = NULL;\r
+    xmlChar*   nameSpace       = (xmlChar*) "xml";/* the URI of the namespace */\r
+\r
+       /**\r
+        * @remarks   input1: [Generate valid xmlNodePtr, Destroy xmlNodePtr and xmlChar*] @n\r
+        *            { Valid xmlNodePtr, the attribute name, "xml"} => { N/A | the attribute value of the given node} @n\r
+        */\r
+       ret_val = xmlGetNsProp(pXmlNodePtr_2, pConstXmlChar, (const xmlChar *)nameSpace);\r
+       //TODO: Sunil --> required to add valid check\r
+       DTS_CHECK_EQ_MESSAGE("xmlGetNsProp", (void *)ret_val, (void *)NULL, "xmlGetNsProp Failed");\r
+       \r
+       desret_xmlChar_ptr(ret_val);\r
+       xmlResetLastError();\r
+}\r
+       /**    \r
+       * @test                 UTcxmlNewNsP01\r
+       * @brief                        xmlNsPtr        xmlNewNs (xmlNodePtr node, const xmlChar * href, const xmlChar * prefix)\r
+       * @desc                 Positive Test to create a new Namespace.\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Generate valid xmlNodePtr, Destroy xmlNodePtr and xmlNsPtr] @n\r
+       *                               { Valid xmlNodePtr(node), Valid URI associated, Valid prefix for the namespace} => { N/A | Valid new namespace pointer } @n\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcxmlNewNsP01()\r
+{\r
+       xmlNsPtr        ret_val = NULL;\r
+     \r
+       /**\r
+        * @remarks   input1: [Generate valid xmlNodePtr, Destroy xmlNodePtr and xmlNsPtr] @n\r
+        *            { Valid xmlNodePtr, Valid URI associated, Valid prefix for the namespace} => { N/A | Valid new namespace pointer } @n\r
+        */\r
+       \r
+       ret_val = xmlNewNs(pXmlNodePtr_2, pConstXmlChar, pConstXmlChar);\r
+       DTS_CHECK_NE_MESSAGE("xmlNewNs", (void *)ret_val, (void *)NULL, "xmlNewNs Failed");\r
+       \r
+       if ((pXmlNodePtr_2 == NULL) && (ret_val != NULL)) xmlFreeNs(ret_val);\r
+       \r
+       //desret_xmlNsPtr(ret_val);\r
+       xmlResetLastError();\r
+}\r
+       /**    \r
+       * @test                 UTcxmlAddPrevSiblingP01\r
+       * @brief                        xmlNodePtr      xmlAddPrevSibling       (xmlNodePtr cur, xmlNodePtr elem)\r
+       * @desc                 Positive Test for adding a new node @elem as the previous sibling of @cur merging adjacent TEXT node\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Generate valid xmlNodePtr, Destroy xmlNodePtr] @n\r
+       *                               { Valid child node,  Valid new node} => { N/A | Valid xmlNodePtr } @n\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcxmlAddPrevSiblingP01()\r
+{\r
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)\r
+\r
+    xmlNodePtr ret_val = NULL;\r
+    xmlNodePtr elem = NULL;\r
+\r
+       elem = gen_xmlNodePtr_in(0, 1);\r
+    \r
+       /**\r
+        * @remarks   input1: [Generate valid xmlNodePtr, Destroy xmlNodePtr] @n\r
+        *            { Valid child node,  Valid new node} => { N/A | Valid xmlNodePtr } @n\r
+        */\r
+       ret_val = xmlAddPrevSibling(pXmlNodePtr_1, elem);\r
+       DTS_CHECK_EQ_MESSAGE("xmlAddPrevSibling", (void *)ret_val, (void *)NULL, "xmlAddPrevSibling Failed");\r
+       \r
+       if (ret_val == NULL) { xmlFreeNode(elem) ; elem = NULL ; }\r
+       \r
+       desret_xmlNodePtr(ret_val);\r
+       xmlResetLastError();\r
+#endif\r
+}\r
+       /**    \r
+       * @test                 UTcxmlAddPrevSiblingP01\r
+       * @brief                        xmlNodePtr      xmlAddPrevSibling       (xmlNodePtr cur, xmlNodePtr elem)\r
+       * @desc                 Positive Test for adding a new node @elem as the previous sibling of @cur merging adjacent TEXT node\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Generate valid xmlNodePtr, Destroy xmlNodePtr] @n\r
+       *                               { Valid child node,  Valid new node} => { N/A | Valid xmlNodePtr } @n\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcxmlAddNextSiblingP01()\r
+{\r
+       xmlNodePtr      ret_val = NULL;\r
+    xmlNodePtr elem = NULL; /* the new node */\r
+\r
+       elem = gen_xmlNodePtr_in(0, 1);\r
+\r
+       /**\r
+        * @remarks   input1: [Generate valid xmlNodePtr, Destroy xmlNodePtr] @n\r
+        *            { Valid child node, Valid new node} => { N/A | Valid xmlNodePtr } @n\r
+        */\r
+       ret_val = xmlAddNextSibling(pXmlNodePtr_1, elem);\r
+       DTS_CHECK_EQ_MESSAGE("xmlAddNextSibling", (void *)ret_val, (void *)NULL, "xmlAddNextSibling Failed");\r
+       \r
+       if (ret_val == NULL) { xmlFreeNode(elem) ; elem = NULL ; }\r
+       \r
+       desret_xmlNodePtr(ret_val);\r
+       xmlResetLastError();\r
+}\r
+       /**    \r
+       * @test                 UTcxmlNodeGetContentP01\r
+       * @brief                        xmlChar         *xmlNodeGetContent(xmlNodePtr cur)\r
+       * @desc                 Positive Test to read the value of a node, this can be either the text carried directly by this node if it's a \r
+       *                               TEXT node or the aggregate string of the values carried by this node child's\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Generate valid xmlNodePtr, Destroy xmlNodePtr and xmlChar*] @n\r
+       *                               { Valid xmlNodePtr(cur) being read } => { N/A | the value of node } @n\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcxmlNodeGetContentP01()\r
+{\r
+       xmlChar*        ret_val = NULL;\r
+    \r
+       /**\r
+        * @remarks   input1: [Generate valid xmlNodePtr, Destroy xmlNodePtr and xmlChar*] @n\r
+        *            { Valid xmlNodePtr being read } => { N/A | the value of node } @n\r
+        */\r
+       \r
+       \r
+       ret_val = xmlNodeGetContent(pXmlNodePtr_2);\r
+       DTS_CHECK_EQ_MESSAGE("xmlNodeGetContent", (void *)ret_val, (void *)NULL, "xmlNodeGetContent Failed");\r
+       \r
+       desret_xmlChar_ptr(ret_val);\r
+       xmlResetLastError();\r
+}\r
+       /**    \r
+       * @test                 UTcxmlCopyDtdP01\r
+       * @brief                        xmlDtdPtr       xmlCopyDtd(xmlDtdPtr dtd)\r
+       * @desc                 Positive Test to do a copy of the dtd.\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Generate valid xmlDtdPtr, Destroy xmlDtdPtr] @n\r
+       *                               { Valid xmlDtdPtr(dtd)} => { N/A | Valid xmlDtdPtr } @n\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcxmlCopyDtdP01()\r
+{\r
+#if defined(LIBXML_TREE_ENABLED)   \r
+    xmlDtdPtr  ret_val = NULL;\r
+    xmlDtdPtr  dtd = NULL; /* the dtd */\r
+\r
+       dtd = gen_xmlDtdPtr(0, 0);\r
+\r
+       /**\r
+        * @remarks   input1: [Generate valid xmlDtdPtr, Destroy xmlDtdPtr] @n\r
+        *            { Valid xmlDtdPtr} => { N/A | Valid xmlDtdPtr } @n\r
+        */\r
+       \r
+       ret_val = xmlCopyDtd(dtd);\r
+       DTS_CHECK_NE_MESSAGE("xmlCopyDtd", (void *)ret_val, (void *)NULL, "xmlCopyDtd Failed");\r
+\r
+       desret_xmlDtdPtr(ret_val);\r
+       des_xmlDtdPtr(0, dtd, 0);\r
+       xmlResetLastError();\r
+#endif\r
+}\r
+       /**    \r
+       * @test                 UTcxmlGetNoNsPropP01\r
+       * @brief                        xmlChar         *xmlGetNoNsProp(xmlNodePtr node, const xmlChar * name)\r
+       * @desc                 Positive Test to search and get the value of an attribute associated to a node\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Generate valid xmlNodePtr, Destroy xmlNodePtr and xmlChar*] @n\r
+       *                               { Valid xmlNodePtr(node), const xmlChar * (name) the attribute name} => { N/A | value of an attribute associated to the given node } @n\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcxmlGetNoNsPropP01()\r
+{\r
+       xmlChar* ret_val = NULL;\r
+    \r
+       /**\r
+        * @remarks   input1: [Generate valid xmlNodePtr, Destroy xmlNodePtr and xmlChar*] @n\r
+        *            { Valid xmlNodePtr, the attribute name} => { N/A | value of an attribute associated to the given node } @n\r
+        */\r
+       \r
+       ret_val = xmlGetNoNsProp(pXmlNodePtr_2, pConstXmlChar);\r
+       //TODO: Sunil --> required to add valid check\r
+       DTS_CHECK_EQ_MESSAGE("xmlGetNoNsProp", (void *)ret_val, (void *)NULL, "xmlGetNoNsProp Failed");\r
+       \r
+       desret_xmlChar_ptr(ret_val);\r
+       xmlResetLastError();\r
+}\r
+       /**    \r
+       * @test                 UTcxmlReplaceNodeP01\r
+       * @brief                xmlNodePtr      xmlReplaceNode (xmlNodePtr old, xmlNodePtr cur)\r
+       * @desc                 Positive Test to unlink the old node from its current context, prune the new one at the same place\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks      input1: [Generate valid xmlNodePtr, Destroy xmlNodePtr] @n\r
+       *               { Valid old node(xmlNodePtr(old), Valid new node to replace(xmlNodePtr(cur)} => { N/A | Valid xmlNodePtr } @n\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcxmlReplaceNodeP01()\r
+{\r
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED)\r
+    \r
+    xmlNodePtr ret_val = NULL;\r
+    //xmlNodePtr       cur = NULL; /* the node */\r
+\r
+       xmlNodePtr      node = NULL;\r
+       xmlNodePtr      node1 = NULL; \r
+       node = xmlNewNode(NULL, BAD_CAST "node4");\r
+       DTS_CHECK_NE_MESSAGE("xmlReplaceNode", (void *)node, (void *)NULL, "xmlNewNode Failed");\r
+\r
+       node1 = xmlNewText(BAD_CAST "other way to create content (which is also a node)");\r
+       DTS_CHECK_NE_MESSAGE("xmlReplaceNode", (void *)node1, (void *)NULL, "xmlNewText Failed");\r
+\r
+       //cur = gen_xmlNodePtr_in(1, 1);\r
+\r
+       /**\r
+        * @remarks   input1: [Generate valid xmlNodePtr, Destroy xmlNodePtr] @n\r
+        *            { Valid old node, Valid new node to replace} => { N/A | Valid xmlNodePtr } @n\r
+        */\r
+       \r
+       ret_val = xmlReplaceNode(node, node1);\r
+       DTS_CHECK_EQ_MESSAGE("xmlReplaceNode", (void *)ret_val, (void *)NULL, "xmlReplaceNode Failed");\r
+       \r
+       if (node != NULL) \r
+       {\r
+               xmlFreeNode(node) ;\r
+       }\r
+       if (node1 != NULL) \r
+       {\r
+               xmlFreeNode(node1) ;\r
+       }\r
+       xmlResetLastError();\r
+#endif\r
+}\r
+       /**    \r
+       * @test                 UTcxmlNodeSetContentLenP01\r
+       * @brief                void    xmlNodeSetContentLen    (xmlNodePtr cur, const xmlChar * content, int len)\r
+       * @desc                 Positive Test to Replace the content of a node. \r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {void} => {N/A | N/A} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcxmlNodeSetContentLenP01()\r
+{\r
+#if defined(LIBXML_TREE_ENABLED)\r
+    \r
+       /**\r
+        * @remarks   input1: [Generate valid xmlNodePtr, Destroy xmlNodePtr] @n\r
+        *            { Valid node being modified, the new value of the content, the size of content} => { N/A | N/A } @n\r
+        */\r
+       \r
+       xmlNodeSetContentLen(pXmlNodePtr_2, pConstXmlChar, 10);\r
+       DTS_CHECK_EQ_MESSAGE("xmlNodeSetContentLen", (void *)1, (void *)1, "xmlNodeSetContentLen Failed");\r
+       xmlResetLastError();\r
+#endif\r
+}\r
+       /**    \r
+       * @test                 UTcxmlGetPropP01\r
+       * @brief                        xmlChar *       xmlGetProp(xmlNodePtr node, const xmlChar * name)\r
+       * @desc                 Positive Test to search and get the value of an attribute associated to a node This does the entity substitution\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks      input1: [Generate valid xmlNodePtr, Destroy xmlNodePtr] @n\r
+       *               { Valid node being modified(xmlNodePtr(node), const xmlChar *(name)} => { N/A | N/A } @n\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcxmlGetPropP01()\r
+{\r
+       xmlChar*        ret_val = NULL;\r
+    xmlChar*   name = NULL; /* the attribute name */\r
+\r
+       name = __gen_const_xmlChar_ptr(0, 1);\r
+\r
+       /**\r
+        * @remarks   input1: [Generate valid xmlNodePtr, Destroy xmlNodePtr and xmlChar*] @n\r
+        *            { Valid xmlNodePtr, the attribute name} => { N/A | the attribute value } @n\r
+        */\r
+       \r
+       ret_val = xmlGetProp(pXmlNodePtr_2, (const xmlChar *)name);\r
+       DTS_CHECK_EQ_MESSAGE("xmlGetProp", (void *)ret_val, (void *)NULL, "xmlGetProp Failed");\r
+       \r
+       desret_xmlChar_ptr(ret_val);\r
+       xmlResetLastError();\r
+}\r
+       /**    \r
+       * @test                 UTcxmlNodeSetBaseP01\r
+       * @brief                        void            xmlNodeSetBase(xmlNodePtr cur, const xmlChar * uri)\r
+       * @desc                 Positive Test to Set (or reset) the base URI of a node, i.e. the value of the xml:base attribute.\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Generate valid xmlNodePtr, Destroy xmlNodePtr] @n\r
+       *                               { Valid node being changed(xmlNodePtr(cur)), const xmlChar * (the new base URI)} => { N/A | N/A } @n\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcxmlNodeSetBaseP01()\r
+{\r
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED)\r
+        \r
+       /**\r
+        * @remarks   input1: [Generate valid xmlNodePtr, Destroy xmlNodePtr] @n\r
+        *            { Valid node being changed, the new base URI} => { N/A | N/A } @n\r
+        */\r
+       \r
+       //xmlChar* pXmlChar = (xmlChar*) "//SUBJECT";\r
+       xmlNodeSetBase(pXmlNodePtr_2, pConstXmlChar);\r
+       DTS_CHECK_EQ_MESSAGE("xmlNodeSetBase", (void *)1, (void *)1, "xmlNodeSetBase Failed");\r
+\r
+       xmlResetLastError();\r
+       \r
+#endif\r
+       \r
+}\r
+       /**    \r
+       * @test                 UTcxmlNodeSetSpacePreserveP01\r
+       * @brief                        oid     xmlNodeSetSpacePreserve (xmlNodePtr cur, int val)\r
+       * @desc                 Positive Test to set (or reset) the space preserving behaviour of a node, i.e. the value of the xml:space attribute.\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Generate valid xmlNodePtr, Destroy xmlNodePtr] @n\r
+       *                               { Valid node being changed(xmlNodePtr(cur)), int(0)} => { N/A | N/A } @n\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcxmlNodeSetSpacePreserveP01()\r
+{\r
+#if defined(LIBXML_TREE_ENABLED)\r
+   \r
+       /**\r
+        * @remarks   input1: [Generate valid xmlNodePtr, Destroy xmlNodePtr] @n\r
+        *            { Valid node being changed, 0} => { N/A | N/A } @n\r
+        */\r
+\r
+       xmlNodeSetSpacePreserve(pXmlNodePtr_1, 0);\r
+       DTS_CHECK_EQ_MESSAGE("xmlNodeSetSpacePreserve", (void *)1, (void *)1, "xmlNodeSetSpacePreserve Failed");\r
+       xmlResetLastError();\r
+\r
+       /**\r
+        * @remarks   input2: [Generate valid xmlNodePtr, Destroy xmlNodePtr] @n\r
+        *            { Valid node being changed, 1} => { N/A | N/A } @n\r
+        */\r
+\r
+       //xmlNodeSetSpacePreserve(pXmlNodePtr_2, 1);\r
+\r
+       //xmlResetLastError();\r
+\r
+#endif\r
+}\r
+       /**    \r
+       * @test                 UTcxmlSetNsPropP01\r
+       * @brief                        xmlAttrPtr      xmlSetNsProp (xmlNodePtr node, xmlNsPtr ns, const xmlChar * name, const xmlChar * value)\r
+       * @desc                 Positive Test to set (or reset) an attribute carried by a node. The ns structure must be in scope, this is not checked\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks      input1: [Generate valid xmlNodePtr and xmlNsPtr, Destroy xmlNodePtr, xmlNsPtr and xmlAttrPtr] @n\r
+       *               { Valid xmlNodePtr(node),  Valid xmlNsPtr(ns), const xmlChar * the attribute name, const xmlChar * the attribute value} => { N/A | Valid xmlAttrPtr } @n\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcxmlSetNsPropP01()\r
+{\r
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_HTML_ENABLED)\r
+   \r
+    xmlAttrPtr ret_val = NULL;\r
+    \r
+       /**\r
+        * @remarks   input1: [Generate valid xmlNodePtr and xmlNsPtr, Destroy xmlNodePtr, xmlNsPtr and xmlAttrPtr] @n\r
+        *            { Valid xmlNodePtr,  Valid xmlNsPtr, the attribute name, the attribute value} => { N/A | Valid xmlAttrPtr } @n\r
+        */    \r
+       \r
+       ret_val = xmlSetNsProp(pXmlNodePtr_1, pXmlNsPtr, pConstXmlChar, pConstXmlChar);\r
+       DTS_CHECK_NE_MESSAGE("xmlSetNsProp", (void *)ret_val, (void *)NULL, "xmlSetNsProp Failed");\r
+       \r
+       desret_xmlAttrPtr(ret_val);\r
+       xmlResetLastError();\r
+#endif\r
+}\r
+       /**    \r
+       * @test                 UTcxmlAddChildListP01\r
+       * @brief                        xmlNodePtr      xmlAddChildList(xmlNodePtr parent, xmlNodePtr cur)\r
+       * @desc                 Positive Test to add a list of node at the end of the child list of the parent merging adjacent TEXT nodes (@cur may be freed)\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Generate valid xmlNodePtr, Destroy xmlNodePtr] @n\r
+       *                               { Valid parent node(xmlNodePtr(parent)), Valid first node in the list(xmlNodePtr(cur)} => { N/A | valid last child node} @n\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcxmlAddChildListP01()\r
+{\r
+       xmlNodePtr      ret_val = NULL;\r
+    xmlNodePtr cur = NULL; /* the first node in the list */\r
+\r
+       cur = gen_xmlNodePtr_in(0, 1);\r
+\r
+       /**\r
+        * @remarks   input1: [Generate valid xmlNodePtr, Destroy xmlNodePtr] @n\r
+        *            { Valid parent node, Valid first node in the list} => { N/A | valid last child node} @n\r
+        */\r
+       \r
+       ret_val = xmlAddChildList(pXmlNodePtr_1, cur);\r
+       DTS_CHECK_EQ_MESSAGE("xmlAddChildList", (void *)ret_val, (void *)NULL, "xmlAddChildList Failed");\r
+       \r
+       if (ret_val == NULL) { xmlFreeNodeList(cur) ; cur = NULL ; }\r
+       \r
+       desret_xmlNodePtr(ret_val);  \r
+       xmlResetLastError();\r
+}\r
+       /**    \r
+       * @test                 UTcxmlHasPropP01\r
+       * @brief                        xmlAttrPtr      xmlHasProp(xmlNodePtr node, const xmlChar * name)\r
+       * @desc                 Positive Test for searching an attribute associated to a node \r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Generate valid xmlNodePtr, Destroy xmlNodePtr and xmlAttrPtr] @n\r
+       *                               { Valid xmlNodePtr(node), const xmlChar * the attribute name} => { N/A | Valid xmlAttrPtr } @n\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcxmlHasPropP01()\r
+{\r
+       xmlAttrPtr      ret_val = NULL;\r
+    xmlChar*   name; /* the attribute name */\r
+\r
+       name = __gen_const_xmlChar_ptr(0, 1);\r
+\r
+       /**\r
+        * @remarks   input1: [Generate valid xmlNodePtr, Destroy xmlNodePtr and xmlAttrPtr] @n\r
+        *            { Valid xmlNodePtr, the attribute name} => { N/A | Valid xmlAttrPtr } @n\r
+        */\r
+       \r
+       ret_val = xmlHasProp(pXmlNodePtr_2, (const xmlChar *)name);\r
+       DTS_CHECK_EQ_MESSAGE("xmlHasProp", (void *)ret_val, (void *)NULL, "xmlHasProp Failed");\r
+       \r
+       //desret_xmlAttrPtr(ret_val);\r
+       //xmlFree(name);\r
+       xmlResetLastError();\r
+}\r
+\r
+       /**    \r
+       * @test                 UTcxmlNodeSetNameP01\r
+       * @brief                        void    xmlNodeSetName (xmlNodePtr cur, const xmlChar * name)\r
+       * @desc                 Positive Test to set (or reset) the name of a node.\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Generate valid xmlNodePtr, Destroy xmlNodePtr] @n\r
+       *                               { Valid node being changed(xmlNodePtr(cur), xmlChar *(the new tag name)} => { N/A | N/A } @n\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcxmlNodeSetNameP01()\r
+{\r
+#if defined(LIBXML_TREE_ENABLED)\r
+       xmlNodePtr      node = NULL;\r
+    xmlChar*   pCompStr        = (xmlChar*) "//SUBJECT";\r
+    node = xmlNewNode(NULL,BAD_CAST "temp");\r
+       /**\r
+        * @remarks   input1: [Generate valid xmlNodePtr, Destroy xmlNodePtr] @n\r
+        *            { Valid node being changed, the new tag name} => { N/A | N/A } @n\r
+        */\r
+    if(node)\r
+    {\r
+               xmlNodeSetName(node, pCompStr);\r
+\r
+               if(node->name == NULL)\r
+               {\r
+                       DTS_FAIL("xmlNodeSetName", "Failed");\r
+               }\r
+               //DTS_ASSERT_MESSAGE("xmlNodeSetName", (node->name == NULL), "xmlNodeSetName Failed");\r
+               DTS_CHECK_EQ_MESSAGE("xmlNodeSetName", (void *)(xmlStrcmp(node->name, pCompStr)), (void *)0, "xmlNodeSetName Failed");\r
+    }\r
+       xmlResetLastError(); \r
+#endif\r
+}\r
+       /**    \r
+       * @test                 UTcxmlNodeSetLangP01\r
+       * @brief                        void            xmlNodeSetLang(xmlNodePtr cur, const xmlChar * lang)\r
+       * @desc                 Positive Test for to set the language of a node, i.e. the values of the xml:lang attribute.\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Generate valid xmlNodePtr, Destroy xmlNodePtr] @n\r
+       *                               { Valid node being changed(xmlNodePtr(cur)), the language description(const xmlChar *(lang)} => { N/A | N/A } @n\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcxmlNodeSetLangP01()\r
+{\r
+#if defined(LIBXML_TREE_ENABLED)  \r
+    \r
+       /**\r
+        * @remarks   input1: [Generate valid xmlNodePtr, Destroy xmlNodePtr] @n\r
+        *            { Valid node being changed, the language description} => { N/A | N/A } @n\r
+        */\r
+       \r
+       xmlNodeSetLang(pXmlNodePtr_2, pConstXmlChar);\r
+       DTS_CHECK_EQ_MESSAGE("xmlNodeSetLang", (void *)1, (void *)1, "xmlNodeSetLang Failed");\r
+       xmlResetLastError(); \r
+#endif\r
+}\r
+       /**    \r
+       * @test                 UTcxmlSetPropP01\r
+       * @brief                        xmlAttrPtr      xmlSetProp(xmlNodePtr node, const xmlChar * name, const xmlChar * value)\r
+       * @desc                 Positive Test to set (or reset) an attribute carried by a node.\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Generate valid xmlNodePtr, Destroy xmlNodePtr and xmlAttrPtr] @n\r
+       *                               { Valid xmlNodePtr(node), const xmlChar * the attribute name, const xmlChar * the attribute value } => { N/A | Valid xmlAttrPtr } @n\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcxmlSetPropP01()\r
+{\r
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_HTML_ENABLED)\r
+    xmlAttrPtr ret_val = NULL;\r
+    xmlChar*   name = NULL; /* the attribute name (a QName) */\r
+    int                        n_name = 0;\r
+    xmlChar*   value = NULL; /* the attribute value */\r
+\r
+       /**\r
+        * @remarks   input1: [Generate valid xmlNodePtr, Destroy xmlNodePtr and xmlAttrPtr] @n\r
+        *            { Valid xmlNodePtr, the attribute name, the attribute value } => { N/A | Valid xmlAttrPtr } @n\r
+        */\r
+\r
+    for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr-2;n_name++) {\r
+               name = __gen_const_xmlChar_ptr(n_name, 1);\r
+               value = __gen_const_xmlChar_ptr(n_name, 2);\r
+               \r
+               ret_val = xmlSetProp(pXmlNodePtr_2, (const xmlChar *)name, (const xmlChar *)value);\r
+               DTS_CHECK_EQ_MESSAGE("xmlSetProp", (void *)ret_val, (void *)NULL, "xmlSetProp Failed");\r
+               \r
+               desret_xmlAttrPtr(ret_val);             \r
+               xmlResetLastError(); \r
+       }\r
+#endif \r
+}\r
+       /**    \r
+       * @test                 UTcxmlNodeListGetRawStringP01\r
+       * @brief                        xmlChar *       xmlNodeListGetRawString (xmlDocPtr doc, xmlNodePtr list, int inLine)\r
+       * @desc                 Positive Test to builds the string equivalent to the text contained in the Node \r
+       *                               list made of TEXTs and ENTITY_REFs, contrary to xmlNodeListGetString()\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Generate valid xmlDocPtr and xmlNodePtr, Destroy xmlDocPtr, xmlNodePtr and xmlChar*] @n\r
+       *                               { Valid xmlDocPtr, Valid Node list, 1} => { N/A | a pointer to the string copy } @n\r
+       *                               input2: [Generate valid xmlDocPtr and xmlNodePtr, Destroy xmlDocPtr, xmlNodePtr and xmlChar*] @n\r
+       *                               { Valid xmlDocPtr(doc), Valid Node list(xmlNodePtr(list), int(0)} => { N/A | a pointer to the string copy } @n\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcxmlNodeListGetRawStringP01()\r
+{\r
+#if defined(LIBXML_TREE_ENABLED)\r
+    xmlChar*   ret_val = NULL;\r
+    \r
+       /**\r
+        * @remarks   input1: [Generate valid xmlDocPtr and xmlNodePtr, Destroy xmlDocPtr, xmlNodePtr and xmlChar*] @n\r
+        *            { Valid xmlDocPtr, Valid Node list, 1} => { N/A | a pointer to the string copy } @n\r
+        */\r
+       \r
+       ret_val = xmlNodeListGetRawString(pXmlDocPtr, pXmlNodePtr_1, 1);\r
+       //Passed inputs are not proper: TODO---SUNIL\r
+       DTS_CHECK_EQ_MESSAGE("xmlNodeListGetRawString", (void *)ret_val, (void *)NULL, "xmlNodeListGetRawString Failed");\r
+       \r
+       desret_xmlChar_ptr(ret_val);\r
+       xmlResetLastError();\r
+\r
+       /**\r
+        * @remarks   input2: [Generate valid xmlDocPtr and xmlNodePtr, Destroy xmlDocPtr, xmlNodePtr and xmlChar*] @n\r
+        *            { Valid xmlDocPtr, Valid Node list, 0} => { N/A | a pointer to the string copy } @n\r
+        */\r
+       \r
+       ret_val = xmlNodeListGetRawString(pXmlDocPtr, pXmlNodePtr_1, 0);\r
+       //Passed inputs are not proper: TODO---SUNIL\r
+       DTS_CHECK_EQ_MESSAGE("xmlNodeListGetRawString", (void *)ret_val, (void *)NULL, "xmlNodeListGetRawString Failed");\r
+       \r
+       desret_xmlChar_ptr(ret_val);\r
+       xmlResetLastError();\r
+\r
+#endif\r
+}\r
+       /**    \r
+       * @test                 UTcxmlUnsetNsPropP01\r
+       * @brief                        int     xmlUnsetNsProp (xmlNodePtr node, xmlNsPtr ns, const xmlChar * name)\r
+       * @desc                 Positive Test to remove an attribute carried by a node.\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Generate valid xmlNodePtr and xmlNsPtr, Destroy xmlNodePtr and xmlNsPtr] @n\r
+       *                               { Valid xmlNodePtr(node), Valid namespace definition(xmlNsPtr(ns)),const xmlChar * the attribute name} => { N/A | 0 } @n\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcxmlUnsetNsPropP01()\r
+{\r
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)\r
+    int                        ret_val = 0;\r
+    \r
+       /**\r
+        * @remarks   input1: [Generate valid xmlNodePtr and xmlNsPtr, Destroy xmlNodePtr and xmlNsPtr] @n\r
+        *            { Valid xmlNodePtr, Valid namespace definition, the attribute name} => { N/A | 0 } @n\r
+        */\r
+\r
+       ret_val = xmlUnsetNsProp(pXmlNodePtr_1, pXmlNsPtr, pConstXmlChar);\r
+       //Passed inputs are not proper: TODO---SUNIL\r
+       DTS_CHECK_NE_MESSAGE("xmlUnsetNsProp", (void *)ret_val, (void *)0, "xmlUnsetNsProp Failed");\r
+       \r
+       xmlResetLastError();\r
+#endif\r
+}\r
+       /**    \r
+       * @test                 UTcxmlCopyDocP01\r
+       * @brief                        xmlDocPtr       xmlCopyDoc(xmlDocPtr doc, int recursive)\r
+       * @desc                 Positive Test to do a copy of the document info.\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Generate valid xmlDocPtr, Destroy xmlDocPtr] @n\r
+       *                               { Valid xmlDocPtr(doc), int(0)} => { N/A | Valid xmlDocPtr } @n\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcxmlCopyDocP01()\r
+{\r
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)\r
+    xmlDocPtr ret_val = NULL;\r
+\r
+       /**\r
+        * @remarks   input1: [Generate valid xmlDocPtr, Destroy xmlDocPtr] @n\r
+        *            { Valid xmlDocPtr, 0} => { N/A | Valid xmlDocPtr } @n\r
+        */\r
+       ret_val = xmlCopyDoc(pXmlDocPtr, 0);\r
+       DTS_CHECK_NE_MESSAGE("xmlCopyDoc", (void *)ret_val, (void *)NULL, "xmlCopyDoc Failed");\r
+       \r
+       desret_xmlDocPtr(ret_val);\r
+       xmlResetLastError();\r
+#endif\r
+}\r
+       /**    \r
+       * @test                 UTcxmlGetLineNoP01\r
+       * @brief                        long            xmlGetLineNo    (xmlNodePtr node)\r
+       * @desc                 Positive Test to get line number of @node.\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Generate valid xmlNodePtr, Destroy xmlNodePtr] @n\r
+       *                               { Valid xmlNodePtr(node)} => { N/A | line number of node } @n\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcxmlGetLineNoP01()\r
+{\r
+       long            ret_val = 0;\r
+    \r
+       /**\r
+        * @remarks   input1: [Generate valid xmlNodePtr, Destroy xmlNodePtr] @n\r
+        *            { Valid xmlNodePtr} => { N/A | line number of node } @n\r
+        */\r
+   \r
+   ret_val = xmlGetLineNo(pXmlNodePtr_2);\r
+       DTS_CHECK_EQ_MESSAGE("xmlGetLineNo", (void *)ret_val, (void *)-1, "xmlGetLineNo Failed");\r
+   \r
+   xmlResetLastError();\r
+\r
+}\r
+       /**    \r
+       * @test                 UTcxmlBufferResizeP01\r
+       * @brief                        int     xmlBufferResize (xmlBufferPtr buf, unsigned int size)\r
+       * @desc                 Positive Test to resize a buffer to accommodate minimum size of @size.\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Generate valid xmlBufferPtr, Destroy xmlBufferPtr] @n\r
+       *                               { Valid buffer to resize(xmlBufferPtr(buf), the desired size(unsigned int(size)} => { N/A | 1 } @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcxmlBufferResizeP01()\r
+{\r
+       int                             ret_val = 0;\r
+    xmlBufferPtr       buf = NULL; /* the buffer to resize */\r
+\r
+       /**\r
+        * @remarks   input1: [Generate valid xmlBufferPtr, Destroy xmlBufferPtr] @n\r
+        *            { Valid buffer to resize, the desired size} => { N/A | 1 } @n\r
+        */\r
+\r
+    buf = gen_xmlBufferPtr(0, 0);\r
+       \r
+       ret_val = xmlBufferResize(buf, 10);\r
+       DTS_CHECK_EQ_MESSAGE("xmlBufferResize", (void *)ret_val, (void *)1, "xmlBufferResize Failed");\r
+       \r
+       des_xmlBufferPtr(0, buf, 0);\r
+       xmlResetLastError();\r
+}\r
+       /**    \r
+       * @test                 UTcxmlTextConcatP01\r
+       * @brief                        int     xmlTextConcat (xmlNodePtr node, const xmlChar * content, int len)\r
+       * @desc                 Positive Test to concat the given string at the end of the existing node content\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Generate valid xmlNodePtr, Destroy xmlNodePtr] @n\r
+       *                               { Valid xmlNodePtr(node), const xmlChar * the content, int(content length)} => { N/A | 0 } @n\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcxmlTextConcatP01()\r
+{\r
+       int                     ret_val = 0;\r
+    \r
+       /**\r
+        * @remarks   input1: [Generate valid xmlNodePtr, Destroy xmlNodePtr] @n\r
+        *            { Valid xmlNodePtr, the content, content length} => { N/A | 0 } @n\r
+        */\r
+       \r
+       ret_val = xmlTextConcat(pXmlNodePtr_2, pConstXmlChar, 10);\r
+       //Passed inputs are not proper: TODO---SUNIL\r
+       DTS_CHECK_NE_MESSAGE("xmlTextConcat", (void *)ret_val, (void *)0, "xmlTextConcat Failed");\r
+       \r
+       xmlResetLastError();\r
+}\r
+       /**    \r
+       * @test                 UTcxmlBufferAddHeadP01\r
+       * @brief                        int     xmlBufferAddHead        (xmlBufferPtr buf, const xmlChar * str, int len)\r
+       * @desc                 Positive Test to add a string range to the beginning of an XML buffer.\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Generate valid xmlBufferPtr, Destroy xmlBufferPtr] @n\r
+       *                               { Valid xmlBufferPtr(buf), Valid xmlChar * (str), int(the number of xmlChar to add)} => { N/A | N/A } @n\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcxmlBufferAddHeadP01()\r
+{\r
+       xmlBufferPtr buf = NULL; /* the buffer */\r
+       \r
+       buf = gen_xmlBufferPtr(0, 0);    \r
+\r
+       /**\r
+        * @remarks   input1: [Generate valid xmlBufferPtr, Destroy xmlBufferPtr] @n\r
+        *            { Valid xmlBufferPtr, Valid xmlChar string, the number of xmlChar to add} => { N/A | N/A } @n\r
+        */\r
+       \r
+       xmlBufferAddHead(buf, pConstXmlChar, 10);\r
+       DTS_CHECK_EQ_MESSAGE("xmlBufferAddHead", (void *)1, (void *)1, "xmlBufferAddHead Failed");\r
+       des_xmlBufferPtr(0, buf, 0);\r
+       xmlResetLastError();\r
+}\r
+       /**    \r
+       * @test                 UTcxmlNewDocPropP01\r
+       * @brief                        xmlAttrPtr      xmlNewDocProp (xmlDocPtr doc, const xmlChar * name, const xmlChar * value)\r
+       * @desc                 Positive Test to create a new property carried by a document.\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Generate valid xmlDocPtr, Destroy xmlDocPtr and xmlAttrPtr] @n\r
+       *                               { Valid xmlDocPtr(doc), const xmlChar * the name of the attribute, const xmlChar * the value of the attribute} => { N/A | Valid xmlAttrPtr } @n\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */      \r
+static void\r
+UTcxmlNewDocPropP01()\r
+{\r
+       xmlAttrPtr ret_val = NULL;\r
+   \r
+       /**\r
+        * @remarks   input1: [Generate valid xmlDocPtr, Destroy xmlDocPtr and xmlAttrPtr] @n\r
+        *            { Valid xmlDocPtr, the name of the attribute, the value of the attribute} => { N/A | Valid xmlAttrPtr } @n\r
+        */\r
+\r
+    ret_val = xmlNewDocProp(pXmlDocPtr, pConstXmlChar, pConstXmlChar);\r
+       DTS_CHECK_NE_MESSAGE("xmlNewDocProp", (void *)ret_val, (void *)NULL, "xmlNewDocProp Failed");\r
+       \r
+       desret_xmlAttrPtr(ret_val);\r
+       xmlResetLastError();\r
+}\r
+       /**    \r
+       * @test                 UTcxmlUnsetPropP01\r
+       * @brief                        int     xmlUnsetProp    (xmlNodePtr node,  const xmlChar * name)\r
+       * @desc                 Positive Test to remove an attribute carried by a node.\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Generate valid xmlNodePtr, Destroy xmlNodePtr] @n\r
+       *                               { Valid xmlNodePtr(node), const xmlChar *(the attribute name)} => { N/A | 0 } @n\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcxmlUnsetPropP01()\r
+{\r
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)\r
+    int                        ret_val = 0;\r
+    \r
+       /**\r
+        * @remarks   input1: [Generate valid xmlNodePtr, Destroy xmlNodePtr] @n\r
+        *            { Valid xmlNodePtr, the attribute name} => { N/A | 0 } @n\r
+        */\r
+       \r
+       ret_val = xmlUnsetProp(pXmlNodePtr_2, pConstXmlChar);\r
+       //Passed inputs are not proper: TODO---SUNIL\r
+       DTS_CHECK_NE_MESSAGE("xmlUnsetProp", (void *)ret_val, (void *)NULL, "xmlUnsetProp Failed");\r
+       \r
+       xmlResetLastError();\r
+#endif\r
+}\r
+       /**    \r
+       * @test                 UTcxmlIsBlankNodeP01\r
+       * @brief                        int             xmlIsBlankNode(xmlNodePtr node)\r
+       * @desc                 Positive Test to checks whether this node is an empty or whitespace only (and possibly ignorable) text-node.\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Generate valid xmlNodePtr, Destroy xmlNodePtr] @n\r
+       *                               { Valid xmlNodePtr(node)} => { N/A | 0 } @n\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcxmlIsBlankNodeP01()\r
+{\r
+       int                     ret_val = 0;\r
+    \r
+       /**\r
+        * @remarks   input1: [Generate valid xmlNodePtr, Destroy xmlNodePtr] @n\r
+        *            { Valid xmlNodePtr} => { N/A | 0 } @n\r
+        */\r
+       \r
+       ret_val = xmlIsBlankNode(pXmlNodePtr_2);        \r
+       DTS_CHECK_EQ_MESSAGE("xmlIsBlankNode", (void *)ret_val, (void *)0, "xmlIsBlankNode Failed");\r
+       \r
+       xmlResetLastError();\r
+}\r
+       /**    \r
+       * @test                 UTcxmlNewReferenceP01\r
+       * @brief                        xmlNodePtr      xmlNewReference (xmlDocPtr doc, const xmlChar * name)\r
+       * @desc                 Positive Test to create of a new reference node.\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Generate valid xmlDocPtr, Destroy xmlDocPtr and xmlNodePtr] @n\r
+       *                               { Valid xmlDocPtr(doc), const xmlChar * the reference name} => { N/A | Valid xmlNodePtr } @n\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcxmlNewReferenceP01()\r
+{\r
+       xmlNodePtr      ret_val = NULL;\r
+    \r
+       /**\r
+        * @remarks   input1: [Generate valid xmlDocPtr, Destroy xmlDocPtr and xmlNodePtr] @n\r
+        *            { Valid xmlDocPtr, the reference name} => { N/A | Valid xmlNodePtr } @n\r
+        */\r
+\r
+    ret_val = xmlNewReference(pXmlDocPtr, pConstXmlChar);\r
+       DTS_CHECK_NE_MESSAGE("xmlNewReference", (void *)ret_val, (void *)NULL, "xmlNewReference Failed");\r
+       \r
+       desret_xmlNodePtr(ret_val);\r
+       xmlResetLastError();\r
+\r
+}\r
+       /**    \r
+       * @test                 UTcxmlRemovePropP01\r
+       * @brief                        int     xmlRemoveProp (xmlAttrPtr cur)\r
+       * @desc                 Positive Test to unlink and free one attribute, all the content is freed too\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Generate valid xmlAttrPtr, Destroy xmlAttrPtr] @n\r
+       *                               { Valid xmlAttrPtr(cur)} => { N/A | 0 } @n\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcxmlRemovePropP01()\r
+{\r
+       int             ret_val = 0;\r
+       xmlAttrPtr      ret_val_attr = NULL;\r
+\r
+       xmlChar name[20];\r
+       xmlDocPtr doc = NULL;\r
+       xmlNodePtr doc_root = NULL;\r
+\r
+\r
+       if (doc == NULL) {\r
+               doc = xmlReadMemory("<!DOCTYPE root [<!ELEMENT root EMPTY>]><root xmlns:h='http://example.com/' h:foo='bar'/>", 88, "root_test", NULL, 0);\r
+       }\r
+       if ((doc != NULL) && (doc->children != NULL) &&\r
+               (doc->children->next != NULL) &&\r
+               (doc->children->next->type == XML_ELEMENT_NODE))\r
+               doc_root = doc->children->next;\r
+\r
+       if (doc_root == NULL)\r
+       {\r
+               ret_val_attr = NULL;\r
+\r
+       }\r
+       else if (doc_root->properties != NULL) {\r
+               ret_val_attr = doc_root->properties;\r
+       }\r
+       else\r
+       {\r
+               ret_val_attr = xmlSetProp(api_root, name, (const xmlChar *) "bar");\r
+       }\r
+       /**\r
+        * @remarks   input1: [Generate valid xmlAttrPtr, Destroy xmlAttrPtr] @n\r
+        *            { Valid xmlAttrPtr} => { N/A | 0 } @n\r
+        */\r
+\r
+       ret_val = xmlRemoveProp(ret_val_attr);\r
+       DTS_CHECK_EQ_MESSAGE("xmlRemoveProp", (void *)ret_val, (void *)0, "xmlRemoveProp Failed");\r
+\r
+       //desret_xmlAttrPtr(ret_val_attr);\r
+       //xmlFreeNode(ret_val_attr);\r
+       xmlFreeDoc(doc);\r
+       \r
+       xmlResetLastError();\r
+}\r
+       /**    \r
+       * @test                 UTcxmlBuildQNameP01\r
+       * @brief                        xmlChar *       xmlBuildQName(const xmlChar * ncname, const xmlChar * prefix, xmlChar * memory, int len)\r
+       * @desc                 Positive Test to builds the QName @prefix:@ncname in \r
+       *                               @memory if there is enough space and prefix is not NULL nor empty\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, Destroy xmlChar*] @n\r
+       *                               { const xmlChar *(Valid QName), const xmlChar * (prefix), xmlChar *(memory), int(len)} => { N/A | new string } @n\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcxmlBuildQNameP01()\r
+{\r
+       xmlChar*        ret_val = NULL;\r
+    xmlChar*   memory = NULL; /* preallocated memory */\r
+\r
+       memory = gen_xmlChar_ptr(0, 2);\r
+    \r
+       /**\r
+        * @remarks   input1: [N/A, Destroy xmlChar*] @n\r
+        *            { Valid QName, the prefix, preallocated memory, preallocated memory length} => { N/A | new string } @n\r
+        */\r
+       \r
+       ret_val = xmlBuildQName(pConstXmlChar, pConstXmlChar, memory, 10);\r
+       DTS_CHECK_NE_MESSAGE("xmlBuildQName", (void *)ret_val, (void *)NULL, "xmlBuildQName Failed");\r
+       \r
+       if ((ret_val != NULL) && (ret_val != pConstXmlChar)&& (ret_val != memory))\r
+               xmlFree(ret_val);\r
+       \r
+       ret_val = NULL;\r
+       desret_xmlChar_ptr(ret_val);\r
+       xmlResetLastError();\r
+}\r
+       /**    \r
+       * @test                 UTcxmlNewCharRefP01\r
+       * @brief                        xmlNodePtr      xmlNewCharRef (xmlDocPtr doc, const xmlChar * name)\r
+       * @desc                 Positive Test for creation of a new character reference node.\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Generate valid xmlDocPtr, Destroy xmlDocPtr and xmlNodePtr] @n\r
+       *                               { Valid xmlDocPtr(doc), const xmlChar *(name) } => { N/A | Valid xmlNodePtr } @n\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcxmlNewCharRefP01()\r
+{\r
+       xmlNodePtr      ret_val = NULL;\r
+    \r
+       /**\r
+        * @remarks   input1: [Generate valid xmlDocPtr, Destroy xmlDocPtr and xmlNodePtr] @n\r
+        *            { Valid xmlDocPtr, the char ref string starting with #} => { N/A | Valid xmlNodePtr } @n\r
+        */\r
+       ret_val = xmlNewCharRef(pXmlDocPtr, pConstXmlChar);\r
+       DTS_CHECK_NE_MESSAGE("xmlNewCharRef", (void *)ret_val, (void *)NULL, "xmlNewCharRef Failed");\r
+\r
+       desret_xmlNodePtr(ret_val);     \r
+       xmlResetLastError();\r
+}\r
+       /**    \r
+       * @test                 UTcxmlNewPIP01\r
+       * @brief                        xmlNodePtr      xmlNewPI(const xmlChar * name, const xmlChar * content)\r
+       * @desc                 Positive Test to creation of a processing instruction element.\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, Destroy xmlNodePtr] @n\r
+       *                               {xmlChar * (processing instruction name), const xmlChar *(content)} => { N/A | Valid xmlNodePtr } @n\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcxmlNewPIP01()\r
+{\r
+       xmlNodePtr      ret_val = NULL;\r
+    \r
+       /**\r
+        * @remarks   input1: [N/A, Destroy xmlNodePtr] @n\r
+        *            { the processing instruction name, the PI content} => { N/A | Valid xmlNodePtr } @n\r
+        */\r
+       \r
+       ret_val = xmlNewPI(pConstXmlChar, pConstXmlChar);\r
+       DTS_CHECK_NE_MESSAGE("xmlNewPI", (void *)ret_val, (void *)NULL, "xmlNewPI Failed");\r
+       \r
+       desret_xmlNodePtr(ret_val);     \r
+       xmlResetLastError();\r
+}\r
+       /**    \r
+       * @test                 UTcxmlTextMergeP01\r
+       * @brief                        xmlNodePtr      xmlTextMerge    (xmlNodePtr first, xmlNodePtr second)\r
+       * @desc                 Positive Test to merge two text nodes into one\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Generate valid xmlNodePtr, Destroy xmlNodePtr] @n\r
+       *                               { xmlNodePtr(Valid first text node), xmlNodePtr(Valid second text node being merged)} => { N/A | Valid xmlNodePtr } @n\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcxmlTextMergeP01()\r
+{\r
+       xmlNodePtr      ret_val = NULL;\r
+    xmlNodePtr first = NULL; /* the first text node */\r
+    xmlNodePtr second = NULL; /* the second text node being merged */\r
+\r
+       first = gen_xmlNodePtr_in(0, 0);\r
+       second = gen_xmlNodePtr_in(0, 1);\r
+\r
+       /**\r
+        * @remarks   input1: [Generate valid xmlNodePtr, Destroy xmlNodePtr] @n\r
+        *            { Valid first text node, Valid second text node being merged} => { N/A | Valid xmlNodePtr } @n\r
+        */\r
+\r
+    ret_val = xmlTextMerge(first, second);\r
+       DTS_CHECK_NE_MESSAGE("xmlTextMerge", (void *)ret_val, (void *)NULL, "xmlTextMerge Failed");\r
+       \r
+       if ((first != NULL) && (first->type != XML_TEXT_NODE)) {\r
+               xmlUnlinkNode(second);\r
+               xmlFreeNode(second) ; second = NULL ; \r
+       }\r
+       \r
+       desret_xmlNodePtr(ret_val);\r
+       xmlResetLastError();\r
+}\r
+       /**    \r
+       * @test                 UTcxmlNewCDataBlockP01\r
+       * @brief                        xmlNodePtr      xmlNewCDataBlock (xmlDocPtr doc, const xmlChar * content,int len)\r
+       * @desc                 Positive Test to create a new node containing a CDATA block.\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Generate valid xmlDocPtr, Destroy xmlDocPtr and xmlNodePtr] @n\r
+       *                               { Valid xmlDocPtr(doc), const xmlChar * the CDATA block content, int(length of the block)} => { N/A | Valid xmlNodePtr } @n\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcxmlNewCDataBlockP01()\r
+{\r
+       xmlNodePtr      ret_val = NULL;\r
+\r
+       /**\r
+        * @remarks   input1: [Generate valid xmlDocPtr, Destroy xmlDocPtr and xmlNodePtr] @n\r
+        *            { Valid xmlDocPtr, the CDATA block content, the length of the block} => { N/A | Valid xmlNodePtr } @n\r
+        */\r
+       \r
+       ret_val = xmlNewCDataBlock(pXmlDocPtr, pConstXmlChar, 10);\r
+       DTS_CHECK_NE_MESSAGE("xmlNewCDataBlock", (void *)ret_val, (void *)NULL, "xmlNewCDataBlock Failed");\r
+       \r
+       desret_xmlNodePtr(ret_val);\r
+       xmlResetLastError();\r
+}\r
+       /**    \r
+       * @test                 UTcxmlNewCommentP01\r
+       * @brief                        xmlNodePtr      xmlNewComment (const xmlChar * content)\r
+       * @desc                 Positive Test to Create of a new node containing a comment.\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, Destroy xmlNodePtr] @n\r
+       *                               {const xmlChar *(content)} => { N/A | Valid xmlNodePtr } @n\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcxmlNewCommentP01()\r
+{\r
+       xmlNodePtr      ret_val = NULL;\r
+\r
+       /**\r
+        * @remarks   input1: [N/A, Destroy xmlNodePtr] @n\r
+        *            {the comment content} => { N/A | Valid xmlNodePtr } @n\r
+        */\r
+       \r
+       ret_val = xmlNewComment(pConstXmlChar);\r
+       DTS_CHECK_NE_MESSAGE("xmlNewComment", (void *)ret_val, (void *)NULL, "xmlNewComment Failed");\r
+       \r
+       desret_xmlNodePtr(ret_val);\r
+       xmlResetLastError();\r
+}\r
+       /**    \r
+       * @test                 UTcxmlNodeGetSpacePreserveP01\r
+       * @brief                        int     xmlNodeGetSpacePreserve (xmlNodePtr cur)\r
+       * @desc                 Positive Test to search the space preserving behaviour of a node\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Generate valid xmlNodePtr, Destroy xmlNodePtr] @n\r
+       *                               { xmlNodePtr(cur)} => { N/A | space preserving behaviour of a node (-1, 0 or 1) } @n\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcxmlNodeGetSpacePreserveP01()\r
+{\r
+       int                     ret_val = 0;\r
+    \r
+       /**\r
+        * @remarks   input1: [Generate valid xmlNodePtr, Destroy xmlNodePtr] @n\r
+        *            { Valid node being checked} => { N/A | space preserving behaviour of a node (-1, 0 or 1) } @n\r
+        */\r
+       \r
+       ret_val = xmlNodeGetSpacePreserve(pXmlNodePtr_2);\r
+       DTS_CHECK_NE_MESSAGE("xmlNodeGetSpacePreserve", (void *)ret_val, (void *)0, "xmlNodeGetSpacePreserve Failed");\r
+       \r
+       xmlResetLastError();\r
+}\r
+       /**    \r
+       * @test                 UTcxmlNewDocFragmentP01\r
+       * @brief                        xmlNodePtr      xmlNewDocFragment (xmlDocPtr doc)\r
+       * @desc                 Positive Test to create of a new Fragment node.\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Generate valid xmlDocPtr, Destroy xmlDocPtr and xmlNodePtr] @n\r
+       *                               { Valid document owning the fragment(xmlDocPtr(doc)} => { N/A | Valid xmlNodePtr } @n\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcxmlNewDocFragmentP01()\r
+{\r
+#if defined(LIBXML_TREE_ENABLED)\r
+    xmlNodePtr ret_val = NULL;\r
+\r
+       /**\r
+        * @remarks   input1: [Generate valid xmlDocPtr, Destroy xmlDocPtr and xmlNodePtr] @n\r
+        *            { Valid document owning the fragment} => { N/A | Valid xmlNodePtr } @n\r
+        */\r
+\r
+    ret_val = xmlNewDocFragment(pXmlDocPtr);\r
+       DTS_CHECK_NE_MESSAGE("xmlNewDocFragment", (void *)ret_val, (void *)NULL, "xmlNewDocFragment Failed");\r
+       \r
+       desret_xmlNodePtr(ret_val);\r
+       xmlResetLastError();\r
+#endif\r
+}\r
+       /**    \r
+       * @test                 UTcxmlBufferGrowP01\r
+       * @brief                        int     xmlBufferGrow (xmlBufferPtr buf, unsigned int len)\r
+       * @desc                 Positive Test for Growing the available space of an XML buffer.\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Generate valid xmlBufferPtr, Destroy xmlBufferPtr] @n\r
+       *                               { Valid xmlBufferPtr(buf), the minimum free size to allocate(unsigned int(len)} => { N/A | new available space } @n\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcxmlBufferGrowP01()\r
+{\r
+       int                             ret_val = 0;\r
+    xmlBufferPtr       buf = NULL; /* the buffer */\r
+    int                                n_buf = 0;\r
+\r
+       /**\r
+        * @remarks   input1: [Generate valid xmlBufferPtr, Destroy xmlBufferPtr] @n\r
+        *            { Valid xmlBufferPtr, the minimum free size to allocate} => { N/A | new available space } @n\r
+        */\r
+\r
+    for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr-1;n_buf++) {\r
+               buf = gen_xmlBufferPtr(n_buf, 0);\r
+               \r
+               ret_val = xmlBufferGrow(buf, 10);\r
+               DTS_CHECK_NE_MESSAGE("xmlBufferGrow", (void *)ret_val, (void *)-1, "xmlBufferGrow Failed");\r
+               \r
+               des_xmlBufferPtr(n_buf, buf, 0);\r
+               xmlResetLastError();\r
+       }\r
+}\r
+       /**    \r
+       * @test                 UTcxmlSetDocCompressModeP01\r
+       * @brief                        void    xmlSetDocCompressMode(xmlDocPtr doc, int mode)\r
+       * @desc                 Positive Test to set the compression ratio for a document, ZLIB based Correct values: \r
+       *                               0 (uncompressed) to 9 (max compression)\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Generate valid xmlDocPtr, N/A] @n\r
+       *                               { Valid xmlDocPtr, 0} => { N/A | N/A } @n\r
+       *                               input2: [N/A, N/A] @n\r
+       *                               { Valid xmlDocPtr(doc), int(1)} => { N/A | N/A } @n\r
+       *                               input3: [N/A, N/A] @n\r
+       *                               { Valid xmlDocPtr(doc), int(9)} => { N/A | N/A } @n\r
+       *                               input4: [N/A, N/A] @n\r
+       *                               { Valid xmlDocPtr(doc), int(-1)} => { N/A | N/A } @n\r
+       *                               input5: [N/A, N/A] @n\r
+       *                               { Valid xmlDocPtr(doc), int(10)} => { N/A | N/A } @n\r
+       *                               input6: [N/A, N/A] @n\r
+       *                               {NULL, 1} => { N/A | N/A } @n\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcxmlSetDocCompressModeP01()\r
+{\r
+       \r
+       /**\r
+        * @remarks   input1: [Generate valid xmlDocPtr, N/A] @n\r
+        *            { Valid xmlDocPtr, 0} => { N/A | N/A } @n\r
+        */\r
+\r
+   xmlSetDocCompressMode(pXmlDocPtr, 0);\r
+       int ret = xmlGetDocCompressMode(pXmlDocPtr);\r
+   DTS_CHECK_EQ_MESSAGE("xmlGetDocCompressMode", (void *)ret, (void *)0, "xmlGetDocCompressMode 1 Failed");\r
+   \r
+   xmlResetLastError();\r
+   \r
+       /**\r
+        * @remarks   input2: [N/A, N/A] @n\r
+        *            { Valid xmlDocPtr, 1} => { N/A | N/A } @n\r
+        */\r
+\r
+   xmlSetDocCompressMode(pXmlDocPtr, 1);\r
+   ret = xmlGetDocCompressMode(pXmlDocPtr);\r
+   DTS_CHECK_EQ_MESSAGE("xmlGetDocCompressMode", (void *)ret, (void *)1, "xmlGetDocCompressMode 2  Failed");\r
+\r
+   xmlResetLastError();\r
+\r
+   \r
+       /**\r
+        * @remarks   input3: [N/A, N/A] @n\r
+        *            { Valid xmlDocPtr, 9} => { N/A | N/A } @n\r
+        */\r
+\r
+   xmlSetDocCompressMode(pXmlDocPtr, 9);\r
+   ret = xmlGetDocCompressMode(pXmlDocPtr);\r
+   DTS_CHECK_EQ_MESSAGE("xmlGetDocCompressMode", (void *)ret, (void *)9, "xmlGetDocCompressMode 3 Failed");\r
+   \r
+   xmlResetLastError();\r
+\r
+   \r
+       /**\r
+        * @remarks   input4: [N/A, N/A] @n\r
+        *            { Valid xmlDocPtr, -1} => { N/A | N/A } @n\r
+        */\r
+\r
+   xmlSetDocCompressMode(pXmlDocPtr, -1);\r
+   ret = xmlGetDocCompressMode(pXmlDocPtr);\r
+   DTS_CHECK_EQ_MESSAGE("xmlGetDocCompressMode", (void *)ret, (void *)0, "xmlGetDocCompressMode 4 Failed");\r
+   \r
+   xmlResetLastError();\r
+   \r
+       /**\r
+        * @remarks   input5: [N/A, N/A] @n\r
+        *            { Valid xmlDocPtr, 10} => { N/A | N/A } @n\r
+        */\r
+\r
+   xmlSetDocCompressMode(pXmlDocPtr, 10);\r
+   ret = xmlGetDocCompressMode(pXmlDocPtr);\r
+   DTS_CHECK_EQ_MESSAGE("xmlGetDocCompressMode", (void *)ret, (void *)9, "xmlGetDocCompressMode 5 Failed");\r
+   \r
+   xmlResetLastError();\r
+\r
+   \r
+       /**\r
+        * @remarks   input6: [N/A, N/A] @n\r
+        *            {NULL, 1} => { N/A | N/A } @n\r
+        */\r
+\r
+   xmlSetDocCompressMode(NULL, 1);   \r
+   xmlResetLastError();\r
+\r
+}\r
+       /**    \r
+       * @test                 UTcxmlBufferEmptyP01\r
+       * @brief                        void      xmlBufferEmpty (xmlBufferPtr buf)\r
+       * @desc                 Positive Test to empty a buffer\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Generate valid xmlBufferPtr, Destroy xmlBufferPtr] @n\r
+       *                               { Valid xmlBufferPtr(buf)} => { N/A | N/A } @n\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcxmlBufferEmptyP01()\r
+{\r
+       xmlBufferPtr    buf = NULL; /* the buffer */\r
+    int                                n_buf = 0;\r
+\r
+       /**\r
+        * @remarks   input1: [Generate valid xmlBufferPtr, Destroy xmlBufferPtr] @n\r
+        *            { Valid xmlBufferPtr} => { N/A | N/A } @n\r
+        */\r
+\r
+    for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr-1;n_buf++) {\r
+               buf = gen_xmlBufferPtr(n_buf, 0);\r
+               \r
+               xmlBufferEmpty(buf);\r
+                DTS_CHECK_EQ_MESSAGE("xmlBufferEmpty", (void *)1, (void *)1, "xmlBufferEmpty Failed");\r
+               des_xmlBufferPtr(n_buf, buf, 0);\r
+               xmlResetLastError();\r
+       }\r
+}\r
+       /**    \r
+       * @test                 UTcxmlBufferSetAllocationSchemeP01\r
+       * @brief                        void    xmlBufferSetAllocationScheme(xmlBufferPtr buf, xmlBufferAllocationScheme scheme)\r
+       * @desc                 Positive Test for Setting the allocation scheme for this buffer\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Generate valid xmlBufferPtr, Destroy xmlBufferPtr] @n\r
+       *                               { Valid xmlBufferPtr(buf), Valid xmlBufferAllocationScheme(scheme)} => { N/A | N/A } @n\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcxmlBufferSetAllocationSchemeP01()\r
+{\r
+       xmlBufferPtr                            buf = NULL; /* the buffer to tune */\r
+    int                                                        n_buf = 0;\r
+    xmlBufferAllocationScheme  scheme = XML_BUFFER_ALLOC_DOUBLEIT; /* allocation scheme to use */\r
+    xmlBufferAllocationScheme  newscheme; /* allocation scheme to use */\r
+       \r
+    int                                                        n_scheme = 0;\r
+\r
+       /**\r
+        * @remarks   input1: [Generate valid xmlBufferPtr, Destroy xmlBufferPtr] @n\r
+        *            { Valid xmlBufferPtr, Valid xmlBufferAllocationScheme} => { N/A | N/A } @n\r
+        */\r
+\r
+    for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr-1;n_buf++) {\r
+               for (n_scheme = 2;n_scheme < gen_nb_xmlBufferAllocationScheme-1;n_scheme++) {\r
+                       buf = gen_xmlBufferPtr(n_buf, 0);\r
+                       scheme = gen_xmlBufferAllocationScheme(n_scheme, 1);\r
+                       \r
+                       xmlBufferSetAllocationScheme(buf, scheme);\r
+                       newscheme = xmlGetBufferAllocationScheme();\r
+                       DTS_CHECK_EQ_MESSAGE("xmlGetBufferAllocationScheme", (void *)newscheme, (void *)scheme, "xmlGetBufferAllocationScheme Failed");\r
+                       \r
+                       if ((buf != NULL) && (scheme == XML_BUFFER_ALLOC_IMMUTABLE) && (buf->content != NULL)/* && (buf->content != static_buf_content) */) { \r
+                               xmlFree(buf->content); \r
+                               buf->content = NULL;\r
+                       }\r
+                       des_xmlBufferPtr(n_buf, buf, 0);\r
+                       xmlResetLastError();\r
+               }\r
+       }\r
+}\r
+       /**    \r
+       * @test                 UTcxmlCopyNamespaceP01\r
+       * @brief                        xmlNsPtr        xmlCopyNamespace (xmlNsPtr cur)\r
+       * @desc                 Positive Test to do a copy of the namespace.\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Generate valid xmlNsPtr, Destroy xmlNsPtr] @n\r
+        *                      { Valid xmlNsPtr(cur)} => { N/A | Valid xmlNsPtr } @n\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcxmlCopyNamespaceP01()\r
+{\r
+       xmlNsPtr        ret_val = NULL;\r
+    \r
+       /**\r
+        * @remarks   input1: [Generate valid xmlNsPtr, Destroy xmlNsPtr] @n\r
+        *            { Valid xmlNsPtr} => { N/A | Valid xmlNsPtr } @n\r
+        */\r
+       \r
+       ret_val = xmlCopyNamespace(pXmlNsPtr);\r
+       DTS_CHECK_EQ_MESSAGE("xmlCopyNamespace", (void *)ret_val, (void *)NULL, "xmlCopyNamespace Failed");\r
+       \r
+       if (ret_val != NULL) \r
+       desret_xmlNsPtr(ret_val);\r
+       xmlResetLastError();\r
+}\r
+       /**    \r
+       * @test                 UTcxmlCopyNamespaceListP01\r
+       * @brief                        xmlNsPtr        xmlCopyNamespaceList    (xmlNsPtr cur)\r
+       * @desc                 Positive Test to do a copy of an namespace list.\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Generate valid xmlNsPtr, Destroy xmlNsPtr] @n\r
+        *                      { Valid xmlNsPtr(cur)} => { N/A | Valid xmlNsPtr } @n\r
+        @b priority            Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcxmlCopyNamespaceListP01()\r
+{\r
+       xmlNsPtr        ret_val = NULL;\r
+       xmlNodePtr api_nodeptr;\r
+    xmlDocPtr doc;\r
+       /**\r
+        * @remarks   input1: [Generate valid xmlNsPtr, Destroy xmlNsPtr] @n\r
+        *            { Valid xmlNsPtr} => { N/A | Valid xmlNsPtr } @n\r
+        */\r
+       doc = xmlReadMemory("<!DOCTYPE root [<!ELEMENT root EMPTY>]><root xmlns:h='http://example.com/' h:foo='bar'/>", 88, "root_test", NULL, 0);\r
+       if ((doc != NULL) && (doc->children != NULL) &&\r
+               (doc->children->next != NULL) &&\r
+               (doc->children->next->type == XML_ELEMENT_NODE))\r
+       {\r
+               api_nodeptr = doc->children->next;\r
+               ret_val = xmlCopyNamespaceList(api_nodeptr->nsDef);\r
+       }\r
+       DTS_CHECK_NE_MESSAGE("xmlCopyNamespaceList", (void *)ret_val, (void *)NULL, "xmlCopyNamespaceList Failed");\r
+       \r
+       if (ret_val != NULL)    \r
+       desret_xmlNsPtr(ret_val);\r
+       xmlFreeDoc(doc);\r
+       xmlResetLastError();\r
+}\r
+               /**    \r
+       * @test                 UTcxmlCopyPropListP01\r
+       * @brief                        xmlAttrPtr      xmlCopyPropList (xmlNodePtr target, xmlAttrPtr cur)\r
+       * @desc                 Positive Test to do a copy of an attribute list.\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Generate valid xmlNodePtr and xmlAttrPtr, Destroy xmlNodePtr and xmlAttrPtr] @n\r
+       *                               { Valid node where the attributes will be grafted(xmlNodePtr(target), the first attribute(xmlAttrPtr(cur)} => { N/A | Valid xmlAttrPtr } @n\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcxmlCopyPropListP01()\r
+{\r
+       xmlAttrPtr      ret_val = NULL;\r
+       xmlAttrPtr      ret_val_attr = NULL;\r
+\r
+       xmlChar name[20];\r
+       xmlDocPtr doc = NULL;\r
+       xmlNodePtr doc_root = NULL;\r
+\r
+\r
+       if (doc == NULL) {\r
+               doc = xmlReadMemory("<!DOCTYPE root [<!ELEMENT root EMPTY>]><root xmlns:h='http://example.com/' h:foo='bar'/>", 88, "root_test", NULL, 0);\r
+       }\r
+       if ((doc != NULL) && (doc->children != NULL) &&\r
+               (doc->children->next != NULL) &&\r
+               (doc->children->next->type == XML_ELEMENT_NODE))\r
+               doc_root = doc->children->next;\r
+\r
+       if (doc_root == NULL)\r
+       {\r
+               ret_val_attr = NULL;\r
+\r
+       }\r
+       else if (doc_root->properties != NULL) {\r
+               ret_val_attr = doc_root->properties;\r
+       }\r
+       else\r
+       {\r
+               ret_val_attr = xmlSetProp(api_root, name, (const xmlChar *) "bar");\r
+       }\r
+    \r
+       /**\r
+        * @remarks   input1: [Generate valid xmlNodePtr and xmlAttrPtr, Destroy xmlNodePtr and xmlAttrPtr] @n\r
+        *            { Valid node where the attributes will be grafted, the first attribute} => { N/A | Valid xmlAttrPtr } @n\r
+        */\r
+       \r
+       ret_val = xmlCopyPropList(pXmlNodePtr_2, ret_val_attr);\r
+       DTS_CHECK_NE_MESSAGE("xmlCopyPropList", (void *)ret_val, (void *)NULL, "xmlCopyPropList Failed");\r
+       \r
+       desret_xmlAttrPtr(ret_val_attr);\r
+       desret_xmlAttrPtr(ret_val);\r
+       xmlFreeDoc(doc);\r
+       xmlResetLastError();\r
+}\r
+               /**    \r
+       * @test                 UTcxmlNodeAddContentP01\r
+       * @brief                        void    xmlNodeAddContent (xmlNodePtr cur, const xmlChar * content)\r
+       * @desc                 Positive Test to Append the extra substring to the node content.\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Generate valid xmlNodePtr, Destroy xmlNodePtr] @n\r
+       *                               { Valid node being modified(xmlNodePtr(cur), extra content(const xmlChar *(content)} => { N/A | N/A } @n\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcxmlNodeAddContentP01()\r
+{\r
+       \r
+       /**\r
+        * @remarks   input1: [Generate valid xmlNodePtr, Destroy xmlNodePtr] @n\r
+        *            { Valid node being modified, extra content} => { N/A | N/A } @n\r
+        */\r
+       \r
+       xmlNodeAddContent(pXmlNodePtr_2, pConstXmlChar);\r
+       DTS_CHECK_EQ_MESSAGE("xmlNodeAddContent", (void *)1, (void *)1, "xmlNodeAddContent Failed");\r
+       xmlResetLastError();\r
+}\r
+       /**    \r
+       * @test                 UTcxmlNodeGetLangP01\r
+       * @brief                        xmlChar *       xmlNodeGetLang (xmlNodePtr cur)\r
+       * @desc                 Positive Test to search the language of a node,\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Generate valid xmlNodePtr, Destroy xmlNodePtr and xmlChar*] @n\r
+       *                               { Valid node being checked(xmlNodePtr(cur)} => { N/A | a pointer to the language value } @n\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcxmlNodeGetLangP01()\r
+{\r
+       xmlChar*        ret_val = NULL;\r
+    \r
+       /**\r
+        * @remarks   input1: [Generate valid xmlNodePtr, Destroy xmlNodePtr and xmlChar*] @n\r
+        *            { Valid node being checked} => { N/A | a pointer to the language value } @n\r
+        */\r
+       \r
+       ret_val = xmlNodeGetLang(pXmlNodePtr_1);\r
+       //Passed inputs are not proper: TODO---SUNIL\r
+       DTS_CHECK_EQ_MESSAGE("xmlNodeGetLang", (void *)ret_val, (void *)NULL, "xmlNodeGetLang Failed");\r
+       \r
+       desret_xmlChar_ptr(ret_val);\r
+       xmlResetLastError();\r
+\r
+}\r
+       /**    \r
+       * @test                 UTcxmlNodeIsTextP01\r
+       * @brief                        int     xmlNodeIsText (xmlNodePtr node)\r
+       * @desc                 Positive Test to check whether  this node is a Text node ?\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Generate valid xmlNodePtr, Destroy xmlNodePtr] @n\r
+       *                               { Valid node which is not a text node(xmlNodePtr(node) } => { N/A | 0 } @n\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcxmlNodeIsTextP01()\r
+{\r
+       int                     ret_val = 0;\r
+    \r
+       /**\r
+        * @remarks   input1: [Generate valid xmlNodePtr, Destroy xmlNodePtr] @n\r
+        *            { Valid node which is not a text node } => { N/A | 0 } @n\r
+        */\r
+       \r
+       ret_val = xmlNodeIsText(pXmlNodePtr_2);\r
+       DTS_CHECK_EQ_MESSAGE("xmlNodeIsText", (void *)ret_val, (void *)0, "xmlNodeIsText Failed");\r
+       \r
+       xmlResetLastError();\r
+}\r
+       /**    \r
+       * @test                 UTcxmlSetCompressModeP01\r
+       * @brief                        void    xmlSetCompressMode (int mode)\r
+       * @desc                 Positive Test for setting the default compression mode used, \r
+       *                               ZLIB based Correct values: 0 (uncompressed) to 9 (max compression)\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                               { the compression ratio int(0-9)} => { N/A | N/A } @n\r
+       *                               input2: [N/A, N/A] @n\r
+       *                               {int(-1)} => { N/A | N/A } @n\r
+       *                               input3: [N/A, N/A] @n\r
+       *                               {int(10)} => { N/A | N/A } @n\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcxmlSetCompressModeP01()\r
+{\r
+       int     mode = 0; /* the compression ratio */\r
+       int newmode = 0;\r
+   \r
+       /**\r
+        * @remarks   input1: [N/A, N/A] @n\r
+        *            { the compression ratio (0-9)} => { N/A | N/A } @n\r
+        */\r
+\r
+    for (mode = 0; mode < 10; mode++) {\r
+\r
+               xmlSetCompressMode(mode);\r
+               newmode = xmlGetCompressMode();\r
+               DTS_CHECK_EQ_MESSAGE("xmlSetCompressMode", (void *)mode, (void *)newmode, "xmlSetCompressMode Failed");\r
+               \r
+               xmlResetLastError();\r
+       }\r
+\r
+       /**\r
+        * @remarks   input2: [N/A, N/A] @n\r
+        *            {-1} => { N/A | N/A } @n\r
+        */\r
+\r
+       xmlSetCompressMode(-1);\r
+       newmode = xmlGetCompressMode();\r
+       \r
+       DTS_CHECK_EQ_MESSAGE("xmlSetCompressMode", (void *)newmode, (void *)0, "xmlSetCompressMode Failed");\r
+\r
+       xmlResetLastError();\r
+\r
+       /**\r
+        * @remarks   input3: [N/A, N/A] @n\r
+        *            {10} => { N/A | N/A } @n\r
+        */\r
+\r
+       xmlSetCompressMode(10);\r
+       newmode = xmlGetCompressMode();\r
+\r
+       DTS_CHECK_EQ_MESSAGE("xmlSetCompressMode", (void *)newmode, (void *)9, "xmlSetCompressMode Failed");\r
+\r
+\r
+}\r
+       /**    \r
+       * @test                 UTcxmlBufferContentP01\r
+       * @brief                        const xmlChar * xmlBufferContent        (const xmlBufferPtr buf)\r
+       * @desc                 Positive Test to extract the content of a buffer\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Generate valid xmlBufferPtr, Destroy xmlBufferPtr and xmlChar*] @n\r
+       *                               { Valid xmlBufferPtr(buf)} => { N/A | internal content } @n\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcxmlBufferContentP01()\r
+{\r
+       const xmlChar*  ret_val = NULL;\r
+    xmlBufferPtr       buf = NULL; /* the buffer */\r
+\r
+       buf = gen_const_xmlBufferPtr(0, 0);\r
+\r
+       /**\r
+        * @remarks   input1: [Generate valid xmlBufferPtr, Destroy xmlBufferPtr and xmlChar*] @n\r
+        *            { Valid xmlBufferPtr} => { N/A | internal content } @n\r
+        */\r
+       \r
+       ret_val = xmlBufferContent((const xmlBufferPtr)buf);\r
+       DTS_CHECK_NE_MESSAGE("xmlBufferContent", (void *)ret_val, (void *)NULL, "xmlBufferContent Failed");\r
+\r
+       if (buf != NULL) {\r
+               xmlBufferFree(buf);\r
+       }\r
+       \r
+       xmlResetLastError();\r
+}\r
+       /**    \r
+       * @test                 UTcxmlBufferLengthP01\r
+       * @brief                        int     xmlBufferLength (const xmlBufferPtr buf)\r
+       * @desc                 Positive Test to get the length of a buffer\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Generate valid xmlBufferPtr, Destroy xmlBufferPtr] @n\r
+       *                               { Valid xmlBufferPtr(buf)} => { N/A | the length of data in the internal content } @n\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcxmlBufferLengthP01()\r
+{\r
+       int                             ret_val = 0;\r
+    xmlBufferPtr       buf = NULL; /* the buffer */\r
+\r
+       buf = gen_const_xmlBufferPtr(0, 0);\r
+\r
+       /**\r
+        * @remarks   input1: [Generate valid xmlBufferPtr, Destroy xmlBufferPtr] @n\r
+        *            { Valid xmlBufferPtr} => { N/A | the length of data in the internal content } @n\r
+        */\r
+       \r
+       ret_val = xmlBufferLength((const xmlBufferPtr)buf);\r
+       DTS_CHECK_EQ_MESSAGE("xmlBufferContent", (void *)ret_val, (void *)0, "xmlBufferContent Failed");\r
+\r
+       if (buf != NULL) {\r
+               xmlBufferFree(buf);\r
+       }\r
+       \r
+       xmlResetLastError();\r
+}\r
+       /**    \r
+       * @test                 UTcxmlGetLastChildP01\r
+       * @brief                        xmlNodePtr      xmlGetLastChild(xmlNodePtr parent)\r
+       * @desc                 Positive Test to Search the last child of a node.\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Generate valid xmlNodePtr, Destroy xmlNodePtr] @n\r
+       *                               { Valid parent node(xmlNodePtr(parent)} => { N/A | the last child node  } @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcxmlGetLastChildP01()\r
+{\r
+       xmlNodePtr              ret_val = NULL;\r
+       xmlNodePtr      node = NULL;\r
+       xmlNodePtr      node1 = NULL; \r
+       node = xmlNewNode(NULL, BAD_CAST "node4");\r
+       DTS_CHECK_NE_MESSAGE("xmlGetLastChild", (void *)node, (void *)NULL, "xmlNewNode 1 Failed");\r
+\r
+       node1 = xmlNewText(BAD_CAST "other way to create content (which is also a node)");\r
+       DTS_CHECK_NE_MESSAGE("xmlGetLastChild", (void *)node1, (void *)NULL, "xmlNewNode 2 Failed");\r
+\r
+       xmlAddChild(node, node1);\r
+       /**\r
+        * @remarks   input1: [Generate valid xmlNodePtr, Destroy xmlNodePtr] @n\r
+        *            { Valid parent node} => { N/A | the last child node  } @n\r
+        */\r
+       \r
+       ret_val = xmlGetLastChild(node);\r
+       DTS_CHECK_NE_MESSAGE("xmlGetLastChild", (void *)ret_val, (void *)NULL, "xmlGetLastChild Failed");\r
+       \r
+       //desret_xmlNodePtr(ret_val);\r
+       if (NULL != node)\r
+       {\r
+               xmlFreeNode(node);\r
+       }\r
+       xmlResetLastError();\r
+}\r
+       \r
+       /**    \r
+       * @test                 UTcxmlNewDocCommentP01\r
+       * @brief                        xmlNodePtr      xmlNewDocComment        (xmlDocPtr doc, const xmlChar * content)\r
+       * @desc                 Positive Test for Creation of a new node containing a comment within a document.\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Generate valid xmlDocPtr, Destroy xmlDocPtr and xmlNodePtr] @n\r
+       *                               { Valid xmlDocPtr(doc), the comment content(const xmlChar *(content)} => { N/A | Valid xmlNodePtr } @n\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcxmlNewDocCommentP01()\r
+{\r
+       xmlNodePtr              ret_val = NULL;\r
+\r
+       /**\r
+        * @remarks   input1: [Generate valid xmlDocPtr, Destroy xmlDocPtr and xmlNodePtr] @n\r
+        *            { Valid xmlDocPtr, the comment content} => { N/A | Valid xmlNodePtr } @n\r
+        */\r
+\r
+   ret_val = xmlNewDocComment(pXmlDocPtr, pConstXmlChar);\r
+       DTS_CHECK_NE_MESSAGE("xmlNewDocComment", (void *)ret_val, (void *)NULL, "xmlNewDocComment Failed");\r
+   \r
+   desret_xmlNodePtr(ret_val);\r
+   xmlResetLastError();\r
+}\r
+       /**    \r
+       * @test                 UTcxmlSetNsP01\r
+       * @brief                        void    xmlSetNs         (xmlNodePtr node, xmlNsPtr ns)\r
+       * @desc                 Positive Test for Associating a namespace to a node, a posteriori.\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Generate valid xmlNodePtr and xmlNsPtr, Destroy xmlNodePtr and xmlNsPtr] @n\r
+       *                               { Valid node in the document(xmlNodePtr(node), Valid namespace pointer(xmlNsPtr(ns)} => { N/A | N/A } @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcxmlSetNsP01()\r
+{\r
+       \r
+       /**\r
+        * @remarks   input1: [Generate valid xmlNodePtr and xmlNsPtr, Destroy xmlNodePtr and xmlNsPtr] @n\r
+        *            { Valid node in the document, Valid namespace pointer} => { N/A | N/A } @n\r
+        */\r
+       \r
+       xmlSetNs(pXmlNodePtr_1, pXmlNsPtr);\r
+       DTS_CHECK_EQ_MESSAGE("xmlSetNs", (void *)1, (void *)1, "xmlSetNs Failed");\r
+       xmlResetLastError();\r
+}\r
+       /**    \r
+       * @test                 UTcxmlCopyNodeP01\r
+       * @brief                        xmlNodePtr      xmlCopyNode     (const xmlNodePtr node, int extended)\r
+       * @desc                 Positive Test  to Do a copy of the node.\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Generate valid xmlNodePtr, Destroy xmlNodePtr] @n\r
+       *                               { Valid xmlNodePtr(node), int(1)} => { N/A | Valid xmlNodePtr } @n\r
+       *                               input2: [Generate valid xmlNodePtr, Destroy xmlNodePtr] @n\r
+       *                               { Valid xmlNodePtr(node), int(2)} => { N/A | Valid xmlNodePtr } @n\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcxmlCopyNodeP01()\r
+{\r
+       xmlNodePtr      ret_val = NULL;\r
+    xmlNodePtr node = NULL; /* the node */\r
+\r
+       node = xmlNewDocText(pXmlDocPtr, pConstXmlChar);\r
+\r
+       /**\r
+        * @remarks   input1: [Generate valid xmlNodePtr, Destroy xmlNodePtr] @n\r
+        *            { Valid xmlNodePtr, 1} => { N/A | Valid xmlNodePtr } @n\r
+        */  \r
+       \r
+       ret_val = xmlCopyNode((const xmlNodePtr)node, 1);\r
+       DTS_CHECK_NE_MESSAGE("xmlCopyNode", (void *)ret_val, (void *)NULL, "xmlCopyNode Failed");\r
+       \r
+       desret_xmlNodePtr(ret_val);\r
+       xmlResetLastError();\r
+\r
+       /**\r
+        * @remarks   input2: [Generate valid xmlNodePtr, Destroy xmlNodePtr] @n\r
+        *            { Valid xmlNodePtr, 2} => { N/A | Valid xmlNodePtr } @n\r
+        */  \r
+       \r
+       ret_val = xmlCopyNode((const xmlNodePtr)node, 2);\r
+       DTS_CHECK_NE_MESSAGE("xmlCopyNode", (void *)ret_val, (void *)NULL, "xmlCopyNode Failed");\r
+       \r
+       desret_xmlNodePtr(node);\r
+       desret_xmlNodePtr(ret_val);\r
+       xmlResetLastError();\r
+\r
+}\r
+       /**    \r
+       * @test                 UTcxmlCopyNodeListP01\r
+       * @brief                        xmlNodePtr      xmlCopyNodeList (const xmlNodePtr node)\r
+       * @desc                 Positive Test to Do a recursive copy of the node list. \r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Generate valid xmlNodePtr, Destroy xmlNodePtr] @n\r
+       *                               { Valid first node in the list(const xmlNodePtr(node)} => { N/A | Valid xmlNodePtr } @n\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcxmlCopyNodeListP01()\r
+{\r
+       xmlNodePtr      ret_val = NULL;\r
+    xmlNodePtr node = NULL; /* the first node in the list. */\r
+\r
+       node = xmlNewDocText(pXmlDocPtr, pConstXmlChar);\r
+\r
+       /**\r
+        * @remarks   input1: [Generate valid xmlNodePtr, Destroy xmlNodePtr] @n\r
+        *            { Valid first node in the list} => { N/A | Valid xmlNodePtr } @n\r
+        */\r
+\r
+    ret_val = xmlCopyNodeList((const xmlNodePtr)node);\r
+       DTS_CHECK_NE_MESSAGE("xmlCopyNodeList", (void *)ret_val, (void *)NULL, "xmlCopyNodeList Failed");\r
+       \r
+       desret_xmlNodePtr(node);\r
+       desret_xmlNodePtr(ret_val);\r
+       xmlResetLastError();\r
+}\r
+       /**    \r
+       * @test                 UTcxmlDocCopyNodeP01\r
+       * @brief                        xmlNodePtr      xmlDocCopyNode(const xmlNodePtr node, xmlDocPtr doc, int extended)\r
+       * @desc                 Positive Test to Do a copy of the node to a given document.\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Generate valid xmlNodePtr and xmlDocPtr, Destroy xmlNodePtr and xmlDocPtr] @n\r
+       *                               { Valid xmlNodePtr(node), Valid xmlDocPtr(doc), int(1)} => { N/A | Valid xmlNodePtr } @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcxmlDocCopyNodeP01()\r
+{\r
+       xmlNodePtr      ret_val = NULL;\r
+    xmlNodePtr node = NULL; /* the node */\r
+\r
+       node = xmlNewDocText(pXmlDocPtr, pConstXmlChar);\r
+       \r
+       /**\r
+        * @remarks   input1: [Generate valid xmlNodePtr and xmlDocPtr, Destroy xmlNodePtr and xmlDocPtr] @n\r
+        *            { Valid xmlNodePtr, Valid xmlDocPtr, 1} => { N/A | Valid xmlNodePtr } @n\r
+        */\r
+\r
+    ret_val = xmlDocCopyNode((const xmlNodePtr)node, pXmlDocPtr, 1);\r
+       DTS_CHECK_NE_MESSAGE("xmlDocCopyNode", (void *)ret_val, (void *)NULL, "xmlDocCopyNode Failed");\r
+       \r
+       desret_xmlNodePtr(node);\r
+       desret_xmlNodePtr(ret_val);\r
+       xmlResetLastError();\r
+}\r
+       /**    \r
+       * @test                 UTcxmlGetBufferAllocationSchemeP01\r
+       * @brief                        xmlBufferAllocationScheme       xmlGetBufferAllocationScheme(void)\r
+       * @desc                 Positive Test to get the buffer allocation scheme\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Set BufferAllocationScheme as XML_BUFFER_ALLOC_EXACT, N/A] @n\r
+       *                               { void } => { N/A | XML_BUFFER_ALLOC_EXACT } @n\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcxmlGetBufferAllocationSchemeP01()\r
+{\r
+       xmlBufferAllocationScheme ret_val = XML_BUFFER_ALLOC_DOUBLEIT;\r
+\r
+       xmlSetBufferAllocationScheme(XML_BUFFER_ALLOC_EXACT);\r
+\r
+       /**\r
+        * @remarks   input1: [Set BufferAllocationScheme as XML_BUFFER_ALLOC_EXACT, N/A] @n\r
+        *            { void } => { N/A | XML_BUFFER_ALLOC_EXACT } @n\r
+        */\r
+       \r
+       ret_val = xmlGetBufferAllocationScheme();\r
+       DTS_CHECK_EQ_MESSAGE("xmlGetBufferAllocationScheme", (void *)ret_val, (void *)XML_BUFFER_ALLOC_EXACT, "xmlGetBufferAllocationScheme Failed");\r
+       \r
+       xmlResetLastError();        \r
+}\r
+       /**    \r
+       * @test                 UTcxmlGetCompressModeP01\r
+       * @brief                        int     xmlGetCompressMode (void)\r
+       * @desc                 Positive Test to get the default compression mode used, ZLIB based.\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Set CompressMode as 2, N/A] @n\r
+       *                               { void } => { N/A | 2 } @n\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcxmlGetCompressModeP01()\r
+{\r
+       int     ret_val = 0;\r
+\r
+       xmlSetCompressMode(2);\r
+\r
+       /**\r
+        * @remarks   input1: [Set CompressMode as 2, N/A] @n\r
+        *            { void } => { N/A | 2 } @n\r
+        */\r
+       \r
+       ret_val = xmlGetCompressMode();\r
+       DTS_CHECK_EQ_MESSAGE("xmlGetCompressMode", (void *)ret_val, (void *)2, "xmlGetCompressMode Failed");\r
+\r
+       xmlResetLastError();\r
+}\r
+       /**    \r
+       * @test                 UTcxmlSetBufferAllocationSchemeP01\r
+       * @brief                        void    xmlSetBufferAllocationScheme(xmlBufferAllocationScheme scheme)\r
+       * @desc                 Positive Test to set the buffer allocation method\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                               { Valid xmlBufferAllocationScheme(scheme) } => { N/A | N/A } @n\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcxmlSetBufferAllocationSchemeP01()\r
+{\r
+       xmlBufferAllocationScheme       scheme = XML_BUFFER_ALLOC_DOUBLEIT; /* allocation method to use */\r
+       xmlBufferAllocationScheme       newscheme; /* allocation method to use */\r
+       int                                                     n_scheme = 0;\r
+\r
+       /**\r
+        * @remarks   input1: [N/A, N/A] @n\r
+        *            { Valid xmlBufferAllocationScheme } => { N/A | N/A } @n\r
+        */\r
+\r
+    for (n_scheme = 0;n_scheme < gen_nb_xmlBufferAllocationScheme-1;n_scheme++) {\r
+               scheme = gen_xmlBufferAllocationScheme(n_scheme, 0);\r
+               \r
+               xmlSetBufferAllocationScheme(scheme);\r
+               newscheme = xmlGetBufferAllocationScheme();\r
+               DTS_CHECK_EQ_MESSAGE("xmlSetBufferAllocationScheme", (void *)scheme, (void *)newscheme, "xmlSetBufferAllocationScheme Failed");\r
+               \r
+               xmlResetLastError();\r
+       }\r
+}\r
+               /**    \r
+       * @test                 UTcxmlBufferWriteCharP01\r
+       * @brief                        void    xmlBufferWriteChar (xmlBufferPtr buf, const char * string)\r
+       * @desc                 Positive Test for routine which manages and grows an output buffer.\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Generate valid xmlBufferPtr, Destroy xmlBufferPtr] @n\r
+       *                               { Valid XML output buffer(xmlBufferPtr(buf), the string to add(const char *(string)} => { N/A | xmlBufferPtr with added input string at the end } @n\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcxmlBufferWriteCHARP01()\r
+{\r
+       xmlBufferPtr    buf = NULL; /* the XML buffer */\r
+    int                                n_buf = 0;\r
+\r
+       /**\r
+        * @remarks   input1: [Generate valid xmlBufferPtr, Destroy xmlBufferPtr] @n\r
+        *            { Valid XML output buffer, the string to add} => { N/A | xmlBufferPtr with added input string at the end} @n\r
+        */\r
+       xmlSetBufferAllocationScheme(XML_BUFFER_ALLOC_EXACT);\r
+    for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr-1;n_buf++) {\r
+               buf = gen_xmlBufferPtr(n_buf, 0);\r
+\r
+               xmlBufferWriteCHAR(buf, pConstXmlChar);\r
+               DTS_CHECK_EQ_MESSAGE("xmlBufferWriteCHAR", (void *)1, (void *)1, "xmlBufferWriteCHAR Failed");\r
+               des_xmlBufferPtr(n_buf, buf, 0);\r
+               xmlResetLastError();\r
+       }\r
+}\r
+       /**    \r
+       * @test                 UTcxmlBufferWriteCharP01\r
+       * @brief                        void    xmlBufferWriteChar (xmlBufferPtr buf, const char * string)\r
+       * @desc                 Positive Test for routine which manages and grows an output buffer.\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Generate valid xmlBufferPtr, Destroy xmlBufferPtr] @n\r
+       *                               { Valid XML output buffer(xmlBufferPtr(buf), the string to add(const char *(string)} => { N/A | xmlBufferPtr with added input string at the end } @n\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcxmlBufferWriteCharP01()\r
+{\r
+       xmlBufferPtr    buf = NULL; /* the XML buffer output */\r
+    int                                n_buf = 0;\r
+\r
+       /**\r
+        * @remarks   input1: [Generate valid xmlBufferPtr, Destroy xmlBufferPtr] @n\r
+        *            { Valid XML output buffer, the string to add} => { N/A | xmlBufferPtr with added input string at the end } @n\r
+        */\r
+       xmlSetBufferAllocationScheme(XML_BUFFER_ALLOC_EXACT);\r
+    for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr-1;n_buf++) {\r
+               buf = gen_xmlBufferPtr(n_buf, 0);\r
+               xmlBufferWriteChar(buf, "Test String");\r
+               DTS_CHECK_EQ_MESSAGE("xmlBufferWriteChar", (void *)1, (void *)1, "xmlBufferWriteChar Failed");\r
+               des_xmlBufferPtr(n_buf, buf, 0);\r
+       }\r
+}\r
+       /**    \r
+       * @test                 UTcxmlNewDocRawNodeP01\r
+       * @brief                        xmlNodePtr      xmlNewDocRawNode(xmlDocPtr doc, xmlNsPtr ns, const xmlChar * name, const xmlChar * content)\r
+       * @desc                 Positive Test to Create of a new node element within a document. @ns and @content are optional (NULL).\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Generate valid xmlDocPtr and xmlNsPtr, Destroy xmlNodePtr and xmlNsPtr] @n\r
+       *                               { Valid xmlDocPtr(doc), Valid namespace(xmlNsPtr(ns)), const xmlChar * the node name, const xmlChar * the text content} => { N/A | Valid xmlNodePtr } @n\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcxmlNewDocRawNodeP01()\r
+{\r
+#if defined(LIBXML_TREE_ENABLED)\r
+#ifdef LIBXML_TREE_ENABLED\r
+    xmlNodePtr ret_val = NULL;\r
+    \r
+       /**\r
+        * @remarks   input1: [Generate valid xmlDocPtr and xmlNsPtr, Destroy xmlNodePtr and xmlNsPtr] @n\r
+        *            { Valid xmlDocPtr, Valid namespace, the node name, the text content} => { N/A | Valid xmlNodePtr } @n\r
+        */\r
+       \r
+       ret_val = xmlNewDocRawNode(pXmlDocPtr, pXmlNsPtr, pConstXmlChar, pConstXmlChar);\r
+       DTS_CHECK_NE_MESSAGE("xmlNewDocRawNode", (void *)ret_val, (void *)NULL, "xmlNewDocRawNode Failed");\r
+       \r
+       desret_xmlNodePtr(ret_val);\r
+       xmlResetLastError();\r
+#endif\r
+#endif\r
+}\r
+               /**    \r
+       * @test                 UTcxmlNewDocTextP01\r
+       * @brief                        xmlNodePtr      xmlNewDocText(xmlDocPtr doc, const xmlChar * content)\r
+       * @desc                 Positive Test for Creation of a new text node within a document.\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Generate valid xmlDocPtr, Destroy xmlDocPtr and xmlNodePtr] @n\r
+       *                               { Valid xmlDocPtr(doc), const xmlChar * the text content} => { N/A | Valid xmlNodePtr } @n\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcxmlNewDocTextP01()\r
+{\r
+       xmlNodePtr      ret_val = NULL;\r
+\r
+       /**\r
+        * @remarks   input1: [Generate valid xmlDocPtr, Destroy xmlDocPtr and xmlNodePtr] @n\r
+        *            { Valid xmlDocPtr, the text content} => { N/A | Valid xmlNodePtr } @n\r
+        */\r
+\r
+  ret_val = xmlNewDocText(pXmlDocPtr, pConstXmlChar);\r
+  DTS_CHECK_NE_MESSAGE("xmlNewDocText", (void *)ret_val, (void *)NULL, "xmlNewDocText Failed");\r
+\r
+  desret_xmlNodePtr(ret_val);\r
+  xmlResetLastError();\r
+}\r
+       /**    \r
+       * @test                 UTcxmlNewTextChildP01\r
+       * @brief                        xmlNodePtr      xmlNewTextChild (xmlNodePtr parent, xmlNsPtr ns, const xmlChar * name, const xmlChar * content)\r
+       * @desc                 Positive Test for Creation of a new child element, added at the end of @parent children list.\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Generate valid xmlNodePtr and xmlNsPtr, Destroy xmlNodePtr and xmlNsPtr] @n\r
+       *                               { Valid parent node(xmlNodePtr(parent), xmlNsPtr(namespace), const xmlChar *(name) the name of the child, const xmlChar * (content) the text content of the child} => { N/A | Valid xmlNodePtr } @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcxmlNewTextChildP01()\r
+{\r
+#if defined(LIBXML_TREE_ENABLED)\r
+#ifdef LIBXML_TREE_ENABLED\r
+    xmlNodePtr ret_val = NULL;\r
+    xmlChar*   name = NULL; /* the name of the child */\r
+    xmlChar*   content = NULL; /* the text content of the child if any. */\r
+\r
+       name = __gen_const_xmlChar_ptr(0, 2);\r
+       content = __gen_const_xmlChar_ptr(2, 3);\r
+\r
+       /**\r
+        * @remarks   input1: [Generate valid xmlNodePtr and xmlNsPtr, Destroy xmlNodePtr and xmlNsPtr] @n\r
+        *            { Valid parent node, Valid namespace, the name of the child, the text content of the child} => { N/A | Valid xmlNodePtr } @n\r
+        */\r
+       \r
+       ret_val = xmlNewTextChild(pXmlNodePtr_2, pXmlNsPtr, (const xmlChar *)name, (const xmlChar *)content);\r
+       DTS_CHECK_EQ_MESSAGE("xmlNewTextChild", (void *)ret_val, (void *)NULL, "xmlNewTextChild Failed");\r
+       \r
+       desret_xmlNodePtr(ret_val);\r
+       xmlResetLastError();\r
+#endif\r
+#endif\r
+}\r
+       /**    \r
+       * @test                 UTcxmlNodeSetContentP01\r
+       * @brief                        xmlNodePtr      xmlNewTextChild(xmlNodePtr parent, xmlNsPtr ns, const xmlChar * name,const xmlChar * content)\r
+       * @desc                 Positive Test for Creation of a new child element, added at the end of @parent children list. \r
+       *                               @ns and @content parameters are optional (NULL).\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Generate valid xmlNodePtr and xmlNsPtr, Destroy xmlNodePtr and xmlNsPtr] @n\r
+       *                               { Valid parent node xmlNodePtr(parent), Valid namespace xmlNsPtr(ns), the name of the child(const xmlChar *(name)), the text content of the child, const xmlChar *(content)} => { N/A | Valid xmlNodePtr } @n\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcxmlNodeSetContentP01()\r
+{\r
+       \r
+       /**\r
+        * @remarks   input1: [Generate valid xmlNodePtr, Destroy xmlNodePtr] @n\r
+        *            { Valid node being modified, the new value of the content} => { N/A | N/A } @n\r
+        */\r
+       \r
+       xmlNodeSetContent(pXmlNodePtr_1, pConstXmlChar);\r
+       DTS_CHECK_EQ_MESSAGE("xmlNodeSetContent", (void *)1, (void *)1, "xmlNodeSetContent Failed");\r
+       xmlResetLastError();\r
+\r
+}\r
+       /**    \r
+       * @test                 UTcxmlNewDtdP01\r
+       * @brief                        xmlDtdPtr       xmlNewDtd(xmlDocPtr doc,  const xmlChar * name,  const xmlChar * ExternalID, const xmlChar * SystemID)\r
+       * @desc                 Positive Test for Creation of a new DTD for the external subset.\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Generate valid xmlDocPtr, Destroy xmlDocPtr and xmlDtdPtr] @n\r
+       *                               { Valid xmlDocPtr(doc), const xmlChar * (name), const xmlChar *(external ID), const xmlChar *(system ID)} => { N/A | Valid xmlDtdPtr } @n\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcxmlNewDtdP01()\r
+{\r
+       xmlDtdPtr       ret_val = NULL;\r
+       \r
+       /**\r
+       * @remarks   input1: [Generate valid xmlDocPtr, Destroy xmlDocPtr and xmlDtdPtr] @n\r
+       *            { Valid xmlDocPtr, the DTD name, the external ID, the system ID} => { N/A | Valid xmlDtdPtr } @n\r
+       */\r
+\r
+       ret_val = xmlNewDtd(pXmlDocPtr, pConstXmlChar, pConstXmlChar, pConstXmlChar);\r
+       DTS_CHECK_NE_MESSAGE("xmlNewDtd", (void *)ret_val, (void *)NULL, "xmlNewDtd Failed");\r
+\r
+\r
+       desret_xmlDtdPtr(ret_val);\r
+       xmlResetLastError();\r
+}\r
+\r
+#ifdef STDIO_FILE\r
+       /**    \r
+       * @test                 UTcxmlBufferDumpP01\r
+       * @brief                        int     xmlBufferDump(FILE * file, xmlBufferPtr buf)\r
+       * @desc                 Positive Test for Dumps an XML buffer to a FILE.\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Generate valid xmlBufferPtr and create a file, Destroy xmlBufferPtr] @n\r
+       *                               { Valid FILE pointer(FILE *(file)), Valid XML buffer(xmlBufferPtr(buf))} => { N/A | number of characters written } @n\r
+       * @b priority           Middle\r
+       * @b etc                        none\r
+       */\r
+static void\r
+UTcxmlBufferDumpP01()\r
+{\r
+       int                             ret_val;\r
+       xmlBufferPtr    pBuf = NULL;\r
+       FILE*                   file;\r
+       Exception               e = 0;\r
+\r
+       file = fopen(UTSXMLHOME"/UTcxmlBufferDumpP01.xml", "w");\r
+       \r
+\r
+       xmlSetBufferAllocationScheme(XML_BUFFER_ALLOC_EXACT);\r
+       pBuf = xmlBufferCreateSize(64);\r
+       xmlBufferAdd(pBuf, (const xmlChar*) "UTcxmlBufferDumpP01", 20);\r
+\r
+       /**\r
+        * @remarks   input1: [Generate valid xmlBufferPtr and create a file, Destroy xmlBufferPtr] @n\r
+        *            { Valid FILE pointer, Valid XML buffer} => { N/A | number of characters written } @n\r
+        */\r
+\r
+       ret_val = xmlBufferDump( file, pBuf);\r
+       DTS_CHECK_GT_MESSAGE("xmlBufferDump", (void *)ret_val, (void *)0, "xmlBufferDump Failed");\r
+\r
+       fclose(file);\r
+       if (pBuf) {\r
+               xmlBufferFree(pBuf);\r
+       }\r
+}\r
+#endif\r
+\r
+static void startup( void);\r
+static void cleanup( void);\r
+\r
+void (*tet_startup)( void) = startup;\r
+void (*tet_cleanup)( void) = cleanup;\r
+\r
+static void startup( void)\r
+{\r
+        /* start of TC */\r
+        tet_printf("TC starts.");\r
+       pXmlDocPtr = gen_xmlDocPtr(0,0);\r
+}\r
+\r
+static void cleanup( void)\r
+{\r
+        /* end of TC */\r
+        tet_printf("TC ends.");\r
+}\r
+\r
+struct tet_testlist tet_testlist[] = {\r
+       // Handling of out of context errors\r
+       {UTcTreeP01,1},\r
+       {UTcTreeP02,2},\r
+       {UTcxmlStringLenGetNodeListP01,3},\r
+       {UTcxmlValidateQNameP01,4},\r
+       {UTcxmlGetNodePathP01,5},\r
+       {UTcxmlValidateNMTokenP01,6},\r
+       {UTcxmlValidateNameP01,7},\r
+       {UTcxmlReconciliateNsP01,8},\r
+       {UTcxmlSearchNsP01,9},\r
+       {UTcxmlValidateNCNameP01,10},\r
+       \r
+       {UTcxmlSearchNsByHrefP01,11},\r
+       {UTcxmlNodeBufGetContentP01,12},\r
+       {UTcxmlNodeGetBaseP01,13},\r
+       {UTcxmlCopyPropP01,14},\r
+       {UTcxmlNodeAddContentLenP01,15},\r
+       {UTcxmlHasNsPropP01,16},\r
+       {UTcxmlGetNsPropP01,17},\r
+       {UTcxmlNewNsP01,18},\r
+       {UTcxmlAddPrevSiblingP01,19},\r
+       {UTcxmlAddNextSiblingP01,20},\r
+       \r
+       {UTcxmlNodeGetContentP01,21},\r
+       {UTcxmlCopyDtdP01,22},\r
+       {UTcxmlGetNoNsPropP01,23},\r
+       {UTcxmlReplaceNodeP01,24},\r
+       {UTcxmlNodeSetContentLenP01,25},\r
+       {UTcxmlGetPropP01,26},\r
+       {UTcxmlNodeSetBaseP01,27},\r
+       {UTcxmlNodeSetSpacePreserveP01,28},\r
+       {UTcxmlSetNsPropP01,29},\r
+       {UTcxmlAddChildListP01,30},\r
+       \r
+       {UTcxmlHasPropP01,31},\r
+       {UTcxmlNodeSetNameP01,32},\r
+       {UTcxmlNodeSetLangP01,33},\r
+       {UTcxmlSetPropP01,35},\r
+       {UTcxmlNodeListGetRawStringP01,36},\r
+       {UTcxmlUnsetNsPropP01,37},\r
+       {UTcxmlCopyDocP01,38},\r
+       {UTcxmlGetLineNoP01,39},\r
+       {UTcxmlBufferResizeP01,40},\r
+       \r
+       {UTcxmlTextConcatP01,41},\r
+       {UTcxmlBufferAddHeadP01,42},\r
+       {UTcxmlNewDocPropP01,43},\r
+       {UTcxmlUnsetPropP01,44},\r
+       {UTcxmlIsBlankNodeP01,45},\r
+       {UTcxmlNewReferenceP01,46},\r
+       {UTcxmlRemovePropP01,47},\r
+       {UTcxmlBuildQNameP01,48},\r
+       {UTcxmlNewDtdP01,49},\r
+       {UTcxmlNewCharRefP01,50},\r
+       \r
+       {UTcxmlNewPIP01,51},\r
+       {UTcxmlTextMergeP01,52},\r
+       {UTcxmlNewCDataBlockP01,53},\r
+       {UTcxmlNewCommentP01,54},\r
+       {UTcxmlNodeGetSpacePreserveP01,55},\r
+       {UTcxmlNewDocFragmentP01,56},\r
+       {UTcxmlBufferGrowP01,57},\r
+       {UTcxmlSetDocCompressModeP01,58},\r
+       {UTcxmlBufferEmptyP01,59},\r
+       {UTcxmlBufferSetAllocationSchemeP01,60},\r
+       \r
+       {UTcxmlCopyNamespaceListP01,61},\r
+       {UTcxmlCopyNamespaceP01,62},\r
+       {UTcxmlCopyPropListP01,63},\r
+       {UTcxmlNodeAddContentP01,64},\r
+       {UTcxmlNodeGetLangP01,65},\r
+       {UTcxmlNodeIsTextP01,66},\r
+       {UTcxmlSetCompressModeP01,67},\r
+       {UTcxmlBufferContentP01,68},\r
+       {UTcxmlBufferLengthP01,69},\r
+       {UTcxmlGetLastChildP01,70},\r
+       \r
+       {UTcxmlNewDocCommentP01,71},\r
+       {UTcxmlSetNsP01,72},\r
+       {UTcxmlCopyNodeP01,73},\r
+       {UTcxmlCopyNodeListP01,74},\r
+       {UTcxmlDocCopyNodeP01,75},\r
+       {UTcxmlGetBufferAllocationSchemeP01,76},\r
+       {UTcxmlGetCompressModeP01,77},\r
+       {UTcxmlSetBufferAllocationSchemeP01,78},\r
+       {UTcxmlBufferWriteCHARP01,79},\r
+       {UTcxmlBufferWriteCharP01,80},\r
+       \r
+       {UTcxmlNewDocRawNodeP01,81},\r
+       {UTcxmlNewDocTextP01,82},\r
+       {UTcxmlNewTextChildP01,83},\r
+       {UTcxmlNodeSetContentP01,84},\r
+#ifdef STDIO_FILE\r
+       {UTcxmlBufferDumpP01, 85},\r
+#endif\r
+\r
+       { NULL, 0 },\r
+       \r
+};\r
diff --git a/TC/testcase/utc_libxml_XmlUnicode.c b/TC/testcase/utc_libxml_XmlUnicode.c
new file mode 100755 (executable)
index 0000000..098d0fc
--- /dev/null
@@ -0,0 +1,1003 @@
+/*\r
+*  libxml test suite\r
+*\r
+* Copyright (c) 2012 Samsung Electronics Co., Ltd. All rights reserved.\r
+*\r
+* Contact: {Maintainer Name} <{Maintainer Email}>\r
+* \r
+* Licensed under the Apache License, Version 2.0 (the "License");\r
+* you may not use this file except in compliance with the License.\r
+* You may obtain a copy of the License at\r
+*\r
+* http://www.apache.org/licenses/LICENSE-2.0\r
+*\r
+* Unless required by applicable law or agreed to in writing, software\r
+* distributed under the License is distributed on an "AS IS" BASIS,\r
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+* See the License for the specific language governing permissions and\r
+* limitations under the License.\r
+*\r
+*/ \r
+\r
+#include "utc_libxml_include.h"\r
+\r
+\r
+\r
+\r
+#ifdef OSP_MEM_ALLOC_INFO\r
+#include "matrix.h"\r
+#endif\r
+#include <libxml/xmlmemory.h>\r
+#include <libxml/uri.h>\r
+#include <libxml/globals.h>\r
+#include <libxml/xmlunicode.h>\r
+\r
+\r
+#define gen_nb_int 1\r
+static int gen_int(int no, int x) {\r
+       if (no == 0) return(0);\r
+       if (no == 1) return(1);\r
+       if (no == 2) return(-1);\r
+       if (no == 3) return(122);\r
+       return(-1);\r
+}\r
+/***************************************************************************\r
+* SUTsXmlUnicode\r
+***************************************************************************/\r
+       /**    \r
+       * @test                 UTcxmlUCSP01\r
+       * @brief                int     xmlUCSIsAegeanNumbers (int code)\r
+                                       int     xmlUCSIsAlphabeticPresentationForms     (int code)\r
+                                       int     xmlUCSIsArabic  (int code)\r
+                                       int     xmlUCSIsArabicPresentationFormsA (int code)\r
+                                       int     xmlUCSIsArabicPresentationFormsB (int code)\r
+                                       int     xmlUCSIsArmenian (int code)\r
+                                       int     xmlUCSIsArrows (int code)\r
+                                       int     xmlUCSIsBasicLatin (int code)\r
+                                       int     xmlUCSIsBengali (int code)\r
+                                       int     xmlUCSIsBlockElements (int code))\r
+                                       int     xmlUCSIsBopomofo (int code)\r
+                                       int     xmlUCSIsBopomofoExtended (int code)\r
+                                       int     xmlUCSIsBoxDrawing (int code)\r
+                                       int     xmlUCSIsBraillePatterns (int code)\r
+                                       int     xmlUCSIsBuhid (int code)\r
+                                       int     xmlUCSIsByzantineMusicalSymbols (int code)\r
+                                       int     xmlUCSIsCJKCompatibility (int code)\r
+                                       int     xmlUCSIsCJKCompatibilityForms (int code)\r
+                                       int     xmlUCSIsCJKCompatibilityIdeographs (int code)\r
+    * @desc                    Positive Test for checking if the character is a part of various UAS block\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input: [get integer, N/A] @n\r
+       *                       {int(UCS code point)} => { N/A |0,1 } @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcxmlUCSP01() \r
+{\r
+       int ret_val;\r
+       int code; /* UCS code point */\r
+       int n_code;\r
+       //char * block; /* UCS block name */\r
+       //int n_block;\r
+\r
+       for (n_code = 0;n_code < gen_nb_int;n_code++)\r
+       {\r
+               code = gen_int(n_code, 0);\r
+               ret_val = xmlUCSIsAegeanNumbers(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP01", (void *)ret_val, (void *)0, "xmlUCSIsAegeanNumbers Failed");\r
+               \r
+               ret_val = xmlUCSIsAlphabeticPresentationForms(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP01", (void *)ret_val, (void *)0, "xmlUCSIsAlphabeticPresentationForms Failed");\r
+\r
+               ret_val = xmlUCSIsArabic(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP01", (void *)ret_val, (void *)0, "xmlUCSIsArabic Failed");\r
+\r
+               ret_val = xmlUCSIsArabicPresentationFormsA(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP01", (void *)ret_val, (void *)0, "xmlUCSIsArabicPresentationFormsA Failed");\r
+\r
+               ret_val = xmlUCSIsArabicPresentationFormsB(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP01", (void *)ret_val, (void *)0, "xmlUCSIsArabicPresentationFormsB Failed");\r
+\r
+               ret_val = xmlUCSIsArmenian(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP01", (void *)ret_val, (void *)0, "xmlUCSIsArmenian Failed");\r
+\r
+               ret_val = xmlUCSIsArrows(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP01", (void *)ret_val, (void *)0, "xmlUCSIsArrows Failed");\r
+\r
+               ret_val = xmlUCSIsBasicLatin(code);\r
+               //May be My check is not proper\r
+               //DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP01", (void *)ret_val, (void *)0, "xmlUCSIsBasicLatin Failed");\r
+\r
+               ret_val = xmlUCSIsBengali(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP01", (void *)ret_val, (void *)0, "xmlUCSIsBengali Failed");\r
+\r
+               //for (n_block = 0;n_block < gen_nb_const_char_ptr;n_block++) \r
+               //      {\r
+               //              block = gen_const_char_ptr(n_block, 1);\r
+               //              ret_val = xmlUCSIsBlock(code, (const char *)block);\r
+               //              MT_CHECK_MESSAGE2(0 == ret_val, "xmlUCSIsBlock API return value: %d", ret_val);\r
+               //      }\r
+               \r
+               ret_val = xmlUCSIsBlockElements(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP01", (void *)ret_val, (void *)0, "xmlUCSIsBlockElements Failed");\r
+\r
+               ret_val = xmlUCSIsBopomofo(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP01", (void *)ret_val, (void *)0, "xmlUCSIsBopomofo Failed");\r
+\r
+               ret_val = xmlUCSIsBopomofoExtended(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP01", (void *)ret_val, (void *)0, "xmlUCSIsBopomofoExtended Failed");\r
+\r
+               ret_val = xmlUCSIsBoxDrawing(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP01", (void *)ret_val, (void *)0, "xmlUCSIsBoxDrawing Failed");\r
+\r
+               ret_val = xmlUCSIsBraillePatterns(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP01", (void *)ret_val, (void *)0, "xmlUCSIsBraillePatterns Failed");\r
+\r
+               ret_val = xmlUCSIsBuhid(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP01", (void *)ret_val, (void *)0, "xmlUCSIsBuhid Failed");\r
+\r
+               ret_val = xmlUCSIsByzantineMusicalSymbols(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP01", (void *)ret_val, (void *)0, "xmlUCSIsByzantineMusicalSymbols Failed");\r
+\r
+               ret_val = xmlUCSIsCJKCompatibility(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP01", (void *)ret_val, (void *)0, "xmlUCSIsCJKCompatibility Failed");\r
+\r
+               ret_val = xmlUCSIsCJKCompatibilityForms(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP01", (void *)ret_val, (void *)0, "xmlUCSIsCJKCompatibilityForms Failed");\r
+\r
+               ret_val = xmlUCSIsCJKCompatibilityIdeographs(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP01", (void *)ret_val, (void *)0, "xmlUCSIsCJKCompatibilityIdeographs Failed");\r
+       }\r
+}\r
+       /**    \r
+       * @test                 UTcxmlUCSP02\r
+       * @brief                int     xmlUCSIsCJKCompatibilityIdeographsSupplement (int code)\r
+                                       int     xmlUCSIsCJKRadicalsSupplement (int code)\r
+                                       int     xmlUCSIsCJKSymbolsandPunctuation (int code)\r
+                                       int     xmlUCSIsCJKUnifiedIdeographs (int code)\r
+                                       int     xmlUCSIsCJKUnifiedIdeographsExtensionA (int code)\r
+                                       int     xmlUCSIsCJKUnifiedIdeographsExtensionB (int code)\r
+                                       int     xmlUCSIsCat     (int code,  const char * cat)\r
+                                       int     xmlUCSIsCatC (int code)\r
+                                       int     xmlUCSIsCatCc (int code)\r
+                                       int     xmlUCSIsCatCf (int code)\r
+                                       int     xmlUCSIsCatCo (int code)\r
+                                       int     xmlUCSIsCatCs (int code)\r
+                                       int     xmlUCSIsCatL (int code)\r
+                                       int     xmlUCSIsCatLl (int code)\r
+                                       int     xmlUCSIsCatLm (int code)\r
+                                       int     xmlUCSIsCatLo (int code)\r
+                                       int     xmlUCSIsCatLt (int code)\r
+                                       int     xmlUCSIsCatLu (int code)\r
+                                       int     xmlUCSIsCatM (int code)\r
+                                       int     xmlUCSIsCatMc (int code)\r
+                                       int     xmlUCSIsCatMe (int code)\r
+                                       int     xmlUCSIsCatMn (int code)\r
+                                       int     xmlUCSIsCatN (int code)\r
+                                       int     xmlUCSIsCatNd (int code)\r
+                                       int     xmlUCSIsCatNl (int code)\r
+                                       int     xmlUCSIsCatNo (int code)\r
+                                       int     xmlUCSIsCatP (int code)\r
+                                       int     xmlUCSIsCatPc (int code)\r
+                                       int     xmlUCSIsCatPd (int code)\r
+                                       int     xmlUCSIsCatPe (int code)\r
+                                       int     xmlUCSIsCatPf (int code)\r
+                                       int     xmlUCSIsCatPi (int code)\r
+                                       int     xmlUCSIsCatPo (int code)\r
+                                       int     xmlUCSIsCatPs (int code)\r
+                                       int     xmlUCSIsCatS (int code)\r
+                                       int     xmlUCSIsCatSc (int code)\r
+       * @desc                 Positive Test for checking if the character is a part of different UCS Category.\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input: [get integer, N/A] @n\r
+       *                       {UCS code point-int} => {N/A | 0,1 } @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcxmlUCSP02() \r
+{\r
+       int ret_val;\r
+       int code; /* UCS code point */\r
+       int n_code;\r
+\r
+       for (n_code = 0;n_code < gen_nb_int;n_code++)\r
+       {\r
+               code = gen_int(n_code, 0);\r
+\r
+               ret_val = xmlUCSIsCJKCompatibilityIdeographsSupplement(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP02", (void *)ret_val, (void *)0, "xmlUCSIsCJKCompatibilityIdeographsSupplement Failed");\r
+\r
+               ret_val = xmlUCSIsCJKRadicalsSupplement(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP02", (void *)ret_val, (void *)0, "xmlUCSIsCJKRadicalsSupplement Failed");\r
+               \r
+               ret_val = xmlUCSIsCJKSymbolsandPunctuation(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP02", (void *)ret_val, (void *)0, "xmlUCSIsCJKSymbolsandPunctuation Failed");\r
+\r
+               ret_val = xmlUCSIsCJKUnifiedIdeographs(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP02", (void *)ret_val, (void *)0, "xmlUCSIsCJKUnifiedIdeographs Failed");\r
+\r
+               ret_val = xmlUCSIsCJKUnifiedIdeographsExtensionA(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP02", (void *)ret_val, (void *)0, "xmlUCSIsCJKUnifiedIdeographsExtensionA Failed");\r
+\r
+               ret_val = xmlUCSIsCJKUnifiedIdeographsExtensionB(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP02", (void *)ret_val, (void *)0, "xmlUCSIsCJKUnifiedIdeographsExtensionB Failed");\r
\r
+//             ret_val = xmlUCSIsCat(code);\r
+               //DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP02", (void *)ret_val, (void *)0, "xmlUCSIsCat Failed");\r
+\r
+               ret_val = xmlUCSIsCatC(code);\r
+               //May be My check is not proper\r
+               //DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP02", (void *)ret_val, (void *)0, "xmlUCSIsCatC Failed");\r
+\r
+               ret_val = xmlUCSIsCatCc(code);\r
+               //May be My check is not proper\r
+               //DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP02", (void *)ret_val, (void *)0, "xmlUCSIsCatCc Failed");\r
+\r
+               ret_val = xmlUCSIsCatCf(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP02", (void *)ret_val, (void *)0, "xmlUCSIsCatCf Failed");\r
+\r
+               ret_val = xmlUCSIsCatCo(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP02", (void *)ret_val, (void *)0, "xmlUCSIsCatCo Failed");\r
+\r
+               ret_val = xmlUCSIsCatCs(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP02", (void *)ret_val, (void *)0, "xmlUCSIsCatCs Failed");\r
+\r
+               ret_val = xmlUCSIsCatL(code);\r
+               //DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP02", (void *)ret_val, (void *)0, "xmlUCSIsCatL Failed");\r
+\r
+               ret_val = xmlUCSIsCatLl(code);\r
+               //DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP02", (void *)ret_val, (void *)0, "xmlUCSIsCatLl Failed");\r
+\r
+               ret_val = xmlUCSIsCatLm(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP02", (void *)ret_val, (void *)0, "xmlUCSIsCatLm Failed");\r
+\r
+               ret_val = xmlUCSIsCatLo(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP02", (void *)ret_val, (void *)0, "xmlUCSIsCatLo Failed");\r
+\r
+               ret_val = xmlUCSIsCatLt(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP02", (void *)ret_val, (void *)0, "xmlUCSIsCatLt Failed");\r
+\r
+               ret_val = xmlUCSIsCatLu(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP02", (void *)ret_val, (void *)0, "xmlUCSIsCatLu Failed");\r
+\r
+               ret_val = xmlUCSIsCatM(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP02", (void *)ret_val, (void *)0, "xmlUCSIsCatM Failed");\r
+\r
+               ret_val = xmlUCSIsCatMc(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP02", (void *)ret_val, (void *)0, "xmlUCSIsCatMc Failed");\r
+\r
+               ret_val = xmlUCSIsCatMe(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP02", (void *)ret_val, (void *)0, "xmlUCSIsCatMe Failed");\r
+\r
+               ret_val = xmlUCSIsCatMn(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP02", (void *)ret_val, (void *)0, "xmlUCSIsCatMn Failed");\r
+\r
+               ret_val = xmlUCSIsCatN(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP02", (void *)ret_val, (void *)0, "xmlUCSIsCatN Failed");\r
+\r
+               ret_val = xmlUCSIsCatNd(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP02", (void *)ret_val, (void *)0, "xmlUCSIsCatNd Failed");\r
+\r
+               ret_val = xmlUCSIsCatNl(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP02", (void *)ret_val, (void *)0, "xmlUCSIsCatNl Failed");\r
+\r
+               ret_val = xmlUCSIsCatNo(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP02", (void *)ret_val, (void *)0, "xmlUCSIsCatNo Failed");\r
+\r
+               ret_val = xmlUCSIsCatP(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP02", (void *)ret_val, (void *)0, "xmlUCSIsCatP Failed");\r
+\r
+               ret_val = xmlUCSIsCatPc(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP02", (void *)ret_val, (void *)0, "xmlUCSIsCatPc Failed");\r
+\r
+               ret_val = xmlUCSIsCatPd(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP02", (void *)ret_val, (void *)0, "xmlUCSIsCatPd Failed");\r
+\r
+               ret_val = xmlUCSIsCatPe(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP02", (void *)ret_val, (void *)0, "xmlUCSIsCatPe Failed");\r
+\r
+               ret_val = xmlUCSIsCatPf(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP02", (void *)ret_val, (void *)0, "xmlUCSIsCatPf Failed");\r
+\r
+               ret_val = xmlUCSIsCatPi(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP02", (void *)ret_val, (void *)0, "xmlUCSIsCatPi Failed");\r
+\r
+               ret_val = xmlUCSIsCatPo(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP02", (void *)ret_val, (void *)0, "xmlUCSIsCatPo Failed");\r
+\r
+               ret_val = xmlUCSIsCatPs(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP02", (void *)ret_val, (void *)0, "xmlUCSIsCatPs Failed");\r
+\r
+               ret_val = xmlUCSIsCatS(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP02", (void *)ret_val, (void *)0, "xmlUCSIsCatS Failed");\r
+\r
+               ret_val = xmlUCSIsCatSc(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP02", (void *)ret_val, (void *)0, "xmlUCSIsCatSc Failed");\r
+               \r
+       }\r
+}\r
+       /**    \r
+       * @test                 UTcxmlUCSP03\r
+       * @brief                int     xmlUCSIsCatSk (int code)\r
+                                       int     xmlUCSIsCatSm (int code)\r
+                                       int     xmlUCSIsCatSo (int code)\r
+                                       int     xmlUCSIsCatZ (int code)\r
+                                       int     xmlUCSIsCatZl (int code)\r
+                                       int     xmlUCSIsCatZp (int code)\r
+                                       int     xmlUCSIsCatZs (int code)\r
+                                       int     xmlUCSIsCherokee (int code)\r
+                                       int     xmlUCSIsCombiningDiacriticalMarks (int code)\r
+                                       int     xmlUCSIsCombiningDiacriticalMarksforSymbols     (int code)\r
+                                       int     xmlUCSIsCombiningHalfMarks      (int code)\r
+                                       int     xmlUCSIsCombiningMarksforSymbols (int code)\r
+                                       int     xmlUCSIsControlPictures (int code)\r
+                                       int     xmlUCSIsCurrencySymbols (int code)\r
+                                       int     xmlUCSIsCypriotSyllabary (int code)\r
+                                       int     xmlUCSIsCyrillic (int code)\r
+                                       int     xmlUCSIsCyrillicSupplement (int code)\r
+                                       int     xmlUCSIsDeseret (int code)\r
+                                       int     xmlUCSIsDevanagari      (int code)\r
+       * @desc                 Positive Test for checking if the character is a part of different UCS Category.\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input: [get integer, N/A] @n\r
+       *                       {int(UCS code point)} => {N/A |0,1 } @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcxmlUCSP03() \r
+{\r
+       int ret_val;\r
+       int code; /* UCS code point */\r
+       int n_code;\r
+\r
+       for (n_code = 0;n_code < gen_nb_int;n_code++)\r
+       {\r
+               code = gen_int(n_code, 0);\r
+\r
+               ret_val = xmlUCSIsCatSk(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP03", (void *)ret_val, (void *)0, "xmlUCSIsCatSk Failed");\r
+\r
+               ret_val = xmlUCSIsCatSm(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP03", (void *)ret_val, (void *)0, "xmlUCSIsCatSm Failed");\r
+\r
+               ret_val = xmlUCSIsCatSo(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP03", (void *)ret_val, (void *)0, "xmlUCSIsCatSo Failed");\r
+\r
+               ret_val = xmlUCSIsCatZ(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP03", (void *)ret_val, (void *)0, "xmlUCSIsCatZ Failed");\r
+\r
+               ret_val = xmlUCSIsCatZl(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP03", (void *)ret_val, (void *)0, "xmlUCSIsCatZl Failed");\r
+\r
+               ret_val = xmlUCSIsCatZp(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP03", (void *)ret_val, (void *)0, "xmlUCSIsCatZp Failed");\r
+\r
+               ret_val = xmlUCSIsCatZs(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP03", (void *)ret_val, (void *)0, "xmlUCSIsCatZs Failed");\r
+\r
+               ret_val = xmlUCSIsCherokee(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP03", (void *)ret_val, (void *)0, "xmlUCSIsCherokee Failed");\r
+\r
+               ret_val = xmlUCSIsCombiningDiacriticalMarks(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP03", (void *)ret_val, (void *)0, "xmlUCSIsCombiningDiacriticalMarks Failed");\r
+\r
+               ret_val = xmlUCSIsCombiningDiacriticalMarksforSymbols(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP03", (void *)ret_val, (void *)0, "xmlUCSIsCombiningDiacriticalMarksforSymbols Failed");\r
+               \r
+               ret_val = xmlUCSIsCombiningHalfMarks(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP03", (void *)ret_val, (void *)0, "xmlUCSIsCombiningHalfMarks Failed");\r
+\r
+               ret_val = xmlUCSIsCombiningMarksforSymbols(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP03", (void *)ret_val, (void *)0, "xmlUCSIsCombiningMarksforSymbols Failed");\r
+\r
+               ret_val = xmlUCSIsControlPictures(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP03", (void *)ret_val, (void *)0, "xmlUCSIsControlPictures Failed");\r
+\r
+               ret_val = xmlUCSIsCurrencySymbols(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP03", (void *)ret_val, (void *)0, "xmlUCSIsCurrencySymbols Failed");\r
+\r
+               ret_val = xmlUCSIsCypriotSyllabary(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP03", (void *)ret_val, (void *)0, "xmlUCSIsCypriotSyllabary Failed");\r
+\r
+               ret_val = xmlUCSIsCyrillic(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP03", (void *)ret_val, (void *)0, "xmlUCSIsCyrillic Failed");\r
+\r
+               ret_val = xmlUCSIsCyrillicSupplement(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP03", (void *)ret_val, (void *)0, "xmlUCSIsCyrillicSupplement Failed");\r
+\r
+               ret_val = xmlUCSIsDeseret(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP03", (void *)ret_val, (void *)0, "xmlUCSIsDeseret Failed");\r
+\r
+               ret_val = xmlUCSIsDevanagari(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP03", (void *)ret_val, (void *)0, "xmlUCSIsDevanagari Failed");\r
+               \r
+       }\r
+}\r
+               /**    \r
+       * @test                 UTcxmlUCSP04\r
+       * @brief                int     xmlUCSIsDingbats (int code)\r
+                                       int     xmlUCSIsEnclosedAlphanumerics (int code)\r
+                                       int     xmlUCSIsEnclosedCJKLettersandMonths     (int code)\r
+                                       int     xmlUCSIsEthiopic (int code)\r
+                                       int     xmlUCSIsGeneralPunctuation      (int code)\r
+                                       int     xmlUCSIsGeometricShapes (int code)\r
+                                       int     xmlUCSIsGeorgian (int code)\r
+                                       int     xmlUCSIsGothic (int code)\r
+                                       int     xmlUCSIsGreek (int code)\r
+                                       int     xmlUCSIsGreekExtended (int code)\r
+                                       int     xmlUCSIsGreekandCoptic (int code)\r
+                                       int     xmlUCSIsGujarati (int code)\r
+                                       int     xmlUCSIsGurmukhi (int code)\r
+                                       int     xmlUCSIsHalfwidthandFullwidthForms      (int code)\r
+                                       int     xmlUCSIsHangulCompatibilityJamo (int code)\r
+                                       int     xmlUCSIsHangulJamo      (int code)\r
+                                       int     xmlUCSIsHangulSyllables (int code)\r
+                                       int     xmlUCSIsHanunoo (int code)\r
+                                       int     xmlUCSIsHebrew  (int code)\r
+       * @desc                 Positive Test for checking if the character is a part of different UCS Block\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input: [get integer, N/A] @n\r
+       *                       {int(UCS code point)} => {N/A |0,1 } @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcxmlUCSP04() \r
+{\r
+       int ret_val;\r
+       int code; /* UCS code point */\r
+       int n_code;\r
+\r
+       for (n_code = 0;n_code < gen_nb_int;n_code++)\r
+       {\r
+               code = gen_int(n_code, 0);\r
+\r
+               ret_val = xmlUCSIsDingbats(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP04", (void *)ret_val, (void *)0, "xmlUCSIsDingbats Failed");\r
+\r
+               ret_val = xmlUCSIsEnclosedAlphanumerics(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP04", (void *)ret_val, (void *)0, "xmlUCSIsEnclosedAlphanumerics Failed");\r
+\r
+               ret_val = xmlUCSIsEnclosedCJKLettersandMonths(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP04", (void *)ret_val, (void *)0, "xmlUCSIsEnclosedCJKLettersandMonths Failed");\r
+\r
+               ret_val = xmlUCSIsEthiopic(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP04", (void *)ret_val, (void *)0, "xmlUCSIsEthiopic Failed");\r
+\r
+               ret_val = xmlUCSIsGeneralPunctuation(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP04", (void *)ret_val, (void *)0, "xmlUCSIsGeneralPunctuation Failed");\r
+\r
+               ret_val = xmlUCSIsGeometricShapes(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP04", (void *)ret_val, (void *)0, "xmlUCSIsGeometricShapes Failed");\r
+\r
+               ret_val = xmlUCSIsGeorgian(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP04", (void *)ret_val, (void *)0, "xmlUCSIsGeorgian Failed");\r
+\r
+               ret_val = xmlUCSIsGothic(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP04", (void *)ret_val, (void *)0, "xmlUCSIsGothic Failed");\r
+\r
+               ret_val = xmlUCSIsGreek(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP04", (void *)ret_val, (void *)0, "xmlUCSIsGreek Failed");\r
+\r
+               ret_val = xmlUCSIsGreekExtended(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP04", (void *)ret_val, (void *)0, "xmlUCSIsGreekExtended Failed");\r
+\r
+               ret_val = xmlUCSIsGreekandCoptic(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP04", (void *)ret_val, (void *)0, "xmlUCSIsGreekandCoptic Failed");\r
+\r
+               ret_val = xmlUCSIsGujarati(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP04", (void *)ret_val, (void *)0, "xmlUCSIsGujarati Failed");\r
+\r
+               ret_val = xmlUCSIsGurmukhi(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP04", (void *)ret_val, (void *)0, "xmlUCSIsGurmukhi Failed");\r
+\r
+               ret_val = xmlUCSIsHalfwidthandFullwidthForms(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP04", (void *)ret_val, (void *)0, "xmlUCSIsHalfwidthandFullwidthForms Failed");\r
+\r
+               ret_val = xmlUCSIsHangulCompatibilityJamo(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP04", (void *)ret_val, (void *)0, "xmlUCSIsHangulCompatibilityJamo Failed");\r
+\r
+               ret_val = xmlUCSIsHangulJamo(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP04", (void *)ret_val, (void *)0, "xmlUCSIsHangulJamo Failed");\r
+\r
+               ret_val = xmlUCSIsHangulSyllables(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP04", (void *)ret_val, (void *)0, "xmlUCSIsHangulSyllables Failed");\r
+\r
+               ret_val = xmlUCSIsHanunoo(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP04", (void *)ret_val, (void *)0, "xmlUCSIsHanunoo Failed");\r
+\r
+               ret_val = xmlUCSIsHebrew(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP04", (void *)ret_val, (void *)0, "xmlUCSIsHebrew Failed");\r\r
+                       \r
+       }\r
+}\r
+       /**    \r
+       * @test                 UTcxmlUCSP05\r
+       * @brief                int     xmlUCSIsHighPrivateUseSurrogates        (int code)\r
+                                       int     xmlUCSIsHighSurrogates  (int code)\r
+                                       int     xmlUCSIsHiragana (int code)\r
+                                       int     xmlUCSIsIPAExtensions (int code)\r
+                                       int     xmlUCSIsIdeographicDescriptionCharacters (int code)\r
+                                       int     xmlUCSIsKanbun  (int code)\r
+                                       int     xmlUCSIsKangxiRadicals  (int code)\r
+                                       int     xmlUCSIsKannada (int code)\r
+                                       int     xmlUCSIsKatakana (int code)\r
+                                       int     xmlUCSIsKatakanaPhoneticExtensions      (int code)\r
+                                       int     xmlUCSIsKhmer (int code)\r
+                                       int     xmlUCSIsKhmerSymbols (int code)\r
+                                       int     xmlUCSIsLao     (int code)\r
+                                       int     xmlUCSIsLatin1Supplement (int code)\r
+                                       int     xmlUCSIsLatinExtendedA  (int code)\r
+                                       int     xmlUCSIsLatinExtendedAdditional (int code)\r
+                                       int     xmlUCSIsLatinExtendedB  (int code)\r
+                                       int     xmlUCSIsLetterlikeSymbols       (int code)\r
+                                       int     xmlUCSIsLimbu (int code)\r
+       * @desc                 Positive Test for checking if the character is a part of different UCS Block\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input: [get integer, N/A] @n\r
+       *                       {int(UCS code point)} => {N/A |0,1} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcxmlUCSP05() \r
+{\r
+       int ret_val;\r
+       int code; /* UCS code point */\r
+       int n_code;\r
+\r
+       for (n_code = 0;n_code < gen_nb_int;n_code++)\r
+       {\r
+               code = gen_int(n_code, 0);\r
+\r
+               ret_val = xmlUCSIsHighPrivateUseSurrogates(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP05", (void *)ret_val, (void *)0, "xmlUCSIsHighPrivateUseSurrogates Failed");\r\r
+\r
+               ret_val = xmlUCSIsHighSurrogates(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP05", (void *)ret_val, (void *)0, "xmlUCSIsHighSurrogates Failed");\r\r
+\r
+               ret_val = xmlUCSIsHiragana(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP05", (void *)ret_val, (void *)0, "xmlUCSIsHiragana Failed");\r\r
+\r
+               ret_val = xmlUCSIsIPAExtensions(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP05", (void *)ret_val, (void *)0, "xmlUCSIsIPAExtensions Failed");\r\r
+\r
+               ret_val = xmlUCSIsIdeographicDescriptionCharacters(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP05", (void *)ret_val, (void *)0, "xmlUCSIsIdeographicDescriptionCharacters Failed");\r\r
+\r
+               ret_val = xmlUCSIsKanbun(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP05", (void *)ret_val, (void *)0, "xmlUCSIsKanbun Failed");\r\r
+\r
+               ret_val = xmlUCSIsKangxiRadicals(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP05", (void *)ret_val, (void *)0, "xmlUCSIsKangxiRadicals Failed");\r\r
+\r
+               ret_val = xmlUCSIsKannada(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP05", (void *)ret_val, (void *)0, "xmlUCSIsKannada Failed");\r\r
+\r
+               ret_val = xmlUCSIsKatakana(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP05", (void *)ret_val, (void *)0, "xmlUCSIsKatakana Failed");\r\r
+\r
+               ret_val = xmlUCSIsKatakanaPhoneticExtensions(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP05", (void *)ret_val, (void *)0, "xmlUCSIsKatakanaPhoneticExtensions Failed");\r\r
+\r
+               ret_val = xmlUCSIsKhmer(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP05", (void *)ret_val, (void *)0, "xmlUCSIsKatakanaPhoneticExtensions Failed");\r\r
+\r
+               ret_val = xmlUCSIsKhmerSymbols(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP05", (void *)ret_val, (void *)0, "xmlUCSIsKhmerSymbols Failed");\r\r
+\r
+               ret_val = xmlUCSIsLao(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP05", (void *)ret_val, (void *)0, "xmlUCSIsLao Failed");\r\r
+\r
+               ret_val = xmlUCSIsLatin1Supplement(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP05", (void *)ret_val, (void *)0, "xmlUCSIsLatin1Supplement Failed");\r\r
+\r
+               ret_val = xmlUCSIsLatinExtendedA(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP05", (void *)ret_val, (void *)0, "xmlUCSIsLatinExtendedA Failed");\r\r
+\r
+               ret_val = xmlUCSIsLatinExtendedAdditional(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP05", (void *)ret_val, (void *)0, "xmlUCSIsLatinExtendedAdditional Failed");\r\r
+\r
+               ret_val = xmlUCSIsLatinExtendedB(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP05", (void *)ret_val, (void *)0, "xmlUCSIsLatinExtendedB Failed");\r\r
+\r
+               ret_val = xmlUCSIsLetterlikeSymbols(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP05", (void *)ret_val, (void *)0, "xmlUCSIsLetterlikeSymbols Failed");\r\r
+\r
+               ret_val = xmlUCSIsLimbu(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP05", (void *)ret_val, (void *)0, "xmlUCSIsLimbu Failed");\r\r
+               \r
+       }\r
+}\r
+       /**    \r
+       * @test                 UTcxmlUCSP06\r
+       * @brief                int     xmlUCSIsLinearBIdeograms (int code)\r
+                                       int     xmlUCSIsLinearBSyllabary (int code)\r
+                                       int     xmlUCSIsLowSurrogates (int code)\r
+                                       int     xmlUCSIsMalayalam (int code)\r
+                                       int     xmlUCSIsMathematicalAlphanumericSymbols (int code)\r
+                                       int     xmlUCSIsMathematicalOperators   (int code)\r
+                                       int     xmlUCSIsMiscellaneousMathematicalSymbolsA       (int code)\r
+                                       int     xmlUCSIsMiscellaneousMathematicalSymbolsB       (int code)\r
+                                       int     xmlUCSIsMiscellaneousSymbols    (int code)\r
+                                       int     xmlUCSIsMiscellaneousSymbolsandArrows   (int code)\r
+                                       int     xmlUCSIsMiscellaneousTechnical  (int code)\r
+                                       int     xmlUCSIsMongolian       (int code)\r
+                                       int     xmlUCSIsMusicalSymbols  (int code)\r
+                                       int     xmlUCSIsMyanmar (int code)\r
+                                       int     xmlUCSIsNumberForms     (int code)\r
+                                       int     xmlUCSIsOgham   (int code)\r
+                                       int     xmlUCSIsOldItalic (int code)\r
+                                       int     xmlUCSIsOpticalCharacterRecognition     (int code)\r
+                                       int     xmlUCSIsOriya (int code)\r
+       * @desc                 Positive Test for checking if the character is a part of different UCS Block\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input: [get integer, N/A] @n\r
+       *                       {int(UCS code point)} => {N/A |0,1 } @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcxmlUCSP06() \r
+{\r
+       int ret_val;\r
+       int code; /* UCS code point */\r
+       int n_code;\r
+\r
+       for (n_code = 0;n_code < gen_nb_int;n_code++)\r
+       {\r
+               code = gen_int(n_code, 0);\r
+\r
+               ret_val = xmlUCSIsLinearBIdeograms(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP06", (void *)ret_val, (void *)0, "xmlUCSIsLinearBIdeograms Failed");\r\r
+\r
+               ret_val = xmlUCSIsLinearBSyllabary(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP06", (void *)ret_val, (void *)0, "xmlUCSIsLinearBSyllabary Failed");\r\r
+\r
+               ret_val = xmlUCSIsLowSurrogates(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP06", (void *)ret_val, (void *)0, "xmlUCSIsLowSurrogates Failed");\r\r
+\r
+               ret_val = xmlUCSIsMalayalam(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP06", (void *)ret_val, (void *)0, "xmlUCSIsMalayalam Failed");\r\r
+\r
+               ret_val = xmlUCSIsMathematicalAlphanumericSymbols(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP06", (void *)ret_val, (void *)0, "xmlUCSIsMathematicalAlphanumericSymbols Failed");\r\r
+\r
+               ret_val = xmlUCSIsMathematicalOperators(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP06", (void *)ret_val, (void *)0, "xmlUCSIsMathematicalOperators Failed");\r\r
+\r
+               ret_val = xmlUCSIsMiscellaneousMathematicalSymbolsA(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP06", (void *)ret_val, (void *)0, "xmlUCSIsMiscellaneousMathematicalSymbolsA Failed");\r\r
+\r
+               ret_val = xmlUCSIsMiscellaneousMathematicalSymbolsB(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP06", (void *)ret_val, (void *)0, "xmlUCSIsMiscellaneousMathematicalSymbolsB Failed");\r\r
+\r
+               ret_val = xmlUCSIsMiscellaneousSymbols(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP06", (void *)ret_val, (void *)0, "xmlUCSIsMiscellaneousSymbols Failed");\r\r
+\r
+               ret_val = xmlUCSIsMiscellaneousSymbolsandArrows(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP06", (void *)ret_val, (void *)0, "xmlUCSIsMiscellaneousSymbolsandArrows Failed");\r\r
+\r
+               ret_val = xmlUCSIsMiscellaneousTechnical(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP06", (void *)ret_val, (void *)0, "xmlUCSIsMiscellaneousTechnical Failed");\r\r
+\r
+               ret_val = xmlUCSIsMongolian(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP06", (void *)ret_val, (void *)0, "xmlUCSIsMongolian Failed");\r\r
+\r
+               ret_val = xmlUCSIsMusicalSymbols(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP06", (void *)ret_val, (void *)0, "xmlUCSIsMusicalSymbols Failed");\r\r
+\r
+               ret_val = xmlUCSIsMyanmar(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP06", (void *)ret_val, (void *)0, "xmlUCSIsMyanmar Failed");\r\r
+\r
+               ret_val = xmlUCSIsNumberForms(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP06", (void *)ret_val, (void *)0, "xmlUCSIsNumberForms Failed");\r\r
+\r
+               ret_val = xmlUCSIsOgham(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP06", (void *)ret_val, (void *)0, "xmlUCSIsOgham Failed");\r\r
+\r
+               ret_val = xmlUCSIsOldItalic(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP06", (void *)ret_val, (void *)0, "xmlUCSIsOldItalic Failed");\r\r
+\r
+               ret_val = xmlUCSIsOpticalCharacterRecognition(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP06", (void *)ret_val, (void *)0, "xmlUCSIsOpticalCharacterRecognition Failed");\r\r
+\r
+               ret_val = xmlUCSIsOriya(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP06", (void *)ret_val, (void *)0, "xmlUCSIsOriya Failed");\r\r
+                       \r
+       }\r
+}\r
+       /**    \r
+       * @test                 UTcxmlUCSP07\r
+       * @brief                int     xmlUCSIsOsmanya (int code)\r
+                                       int     xmlUCSIsPhoneticExtensions      (int code)\r
+                                       int     xmlUCSIsPrivateUse      (int code)\r
+                                       int     xmlUCSIsPrivateUseArea  (int code)\r
+                                       int     xmlUCSIsRunic (int code)\r
+                                       int     xmlUCSIsShavian (int code)\r
+                                       int     xmlUCSIsSinhala (int code)\r
+                                       int     xmlUCSIsSmallFormVariants (int code)\r
+                                       int     xmlUCSIsSpacingModifierLetters  (int code)\r
+       * @desc                 Positive Test for checking if the character is a part of different UCS Block\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input: [get integer, N/A] @n\r
+       *                       {int(UCS code point)} => {N/A |0,1 } @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcxmlUCSP07() \r
+{\r
+       int ret_val;\r
+       int code; /* UCS code point */\r
+       int n_code;\r
+\r
+       for (n_code = 0;n_code < gen_nb_int;n_code++)\r
+       {\r
+               code = gen_int(n_code, 0);\r
+\r
+               ret_val = xmlUCSIsOsmanya(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP07", (void *)ret_val, (void *)0, "xmlUCSIsOsmanya Failed");\r\r
+\r
+               ret_val = xmlUCSIsPhoneticExtensions(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP07", (void *)ret_val, (void *)0, "xmlUCSIsPhoneticExtensions Failed");\r\r
+\r
+               ret_val = xmlUCSIsPrivateUse(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP07", (void *)ret_val, (void *)0, "xmlUCSIsPrivateUse Failed");\r\r
+\r
+               ret_val = xmlUCSIsPrivateUseArea(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP07", (void *)ret_val, (void *)0, "xmlUCSIsPrivateUseArea Failed");\r\r
+\r
+               ret_val = xmlUCSIsRunic(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP07", (void *)ret_val, (void *)0, "xmlUCSIsRunic Failed");\r\r
+\r
+               ret_val = xmlUCSIsShavian(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP07", (void *)ret_val, (void *)0, "xmlUCSIsShavian Failed");\r\r
+\r
+               ret_val = xmlUCSIsSinhala(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP07", (void *)ret_val, (void *)0, "xmlUCSIsSinhala Failed");\r\r
+\r
+               ret_val = xmlUCSIsSmallFormVariants(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP07", (void *)ret_val, (void *)0, "xmlUCSIsSmallFormVariants Failed");\r\r
+\r
+               ret_val = xmlUCSIsSpacingModifierLetters(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP07", (void *)ret_val, (void *)0, "xmlUCSIsSpacingModifierLetters Failed");\r\r
+                       \r
+       }\r
+}\r
+       /**    \r
+       * @test                 UTcxmlUCSP08\r
+       * @brief                int     xmlUCSIsSpecials (int code)\r
+                                       int     xmlUCSIsSuperscriptsandSubscripts (int code)\r
+                                       int     xmlUCSIsSupplementalArrowsA     (int code)\r
+       * @desc                 Positive Test for checking if the character is a part of different UCS Block\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input: [get integer, N/A] @n\r
+       *                       {int(UCS code point)} => {N/A |0,1 } @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcxmlUCSP08() \r
+{\r
+       int ret_val;\r
+       int code; /* UCS code point */\r
+       int n_code;\r
+\r
+       for (n_code = 0;n_code < gen_nb_int;n_code++)\r
+       {\r
+               code = gen_int(n_code, 0);\r
+\r
+               ret_val = xmlUCSIsSpecials(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP08", (void *)ret_val, (void *)0, "xmlUCSIsSpecials Failed");\r\r
+\r
+               ret_val = xmlUCSIsSuperscriptsandSubscripts(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP08", (void *)ret_val, (void *)0, "xmlUCSIsSuperscriptsandSubscripts Failed");\r\r
+\r
+               ret_val = xmlUCSIsSupplementalArrowsA(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP08", (void *)ret_val, (void *)0, "xmlUCSIsSupplementalArrowsA Failed");\r\r
+\r
+       }\r
+}\r
+       /**    \r
+       * @test                 UTcxmlUCSP09\r
+       * @brief                int     xmlUCSIsSupplementalArrowsB     (int code)\r
+                                       int     xmlUCSIsSupplementalMathematicalOperators       (int code)\r
+                                       int     xmlUCSIsSupplementaryPrivateUseAreaA (int code)\r
+                                       int     xmlUCSIsSupplementaryPrivateUseAreaB (int code)\r
+                                       int     xmlUCSIsSyriac  (int code)\r
+                                       int     xmlUCSIsTagalog (int code)\r
+                                       int     xmlUCSIsTagbanwa (int code)\r
+       * @desc                 Positive Test for checking if the character is a part of different UCS Block\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input: [get integer, N/A] @n\r
+       *                       {int(UCS code point)} => {N/A |0,1 } @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcxmlUCSP09() \r
+{\r
+       int ret_val;\r
+       int code; /* UCS code point */\r
+       int n_code;\r
+\r
+       for (n_code = 0;n_code < gen_nb_int;n_code++)\r
+       {\r
+               code = gen_int(n_code, 0);\r
+\r
+               ret_val = xmlUCSIsSupplementalArrowsB(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP09", (void *)ret_val, (void *)0, "xmlUCSIsSupplementalArrowsB Failed");\r\r
+\r
+               ret_val = xmlUCSIsSupplementalMathematicalOperators(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP09", (void *)ret_val, (void *)0, "xmlUCSIsSupplementalMathematicalOperators Failed");\r\r
+\r
+               ret_val = xmlUCSIsSupplementaryPrivateUseAreaA(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP09", (void *)ret_val, (void *)0, "xmlUCSIsSupplementaryPrivateUseAreaA Failed");\r\r
+\r
+               ret_val = xmlUCSIsSupplementaryPrivateUseAreaB(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP09", (void *)ret_val, (void *)0, "xmlUCSIsSupplementaryPrivateUseAreaB Failed");\r\r
+\r
+               ret_val = xmlUCSIsSyriac(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP09", (void *)ret_val, (void *)0, "xmlUCSIsSyriac Failed");\r\r
+\r
+               ret_val = xmlUCSIsTagalog(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP09", (void *)ret_val, (void *)0, "xmlUCSIsTagalog Failed");\r\r
+\r
+               ret_val = xmlUCSIsTagbanwa(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP09", (void *)ret_val, (void *)0, "xmlUCSIsTagbanwa Failed");\r\r
+               \r
+       }\r
+}\r
+       /**    \r
+       * @test                 UTcxmlUCSP10\r
+       * @brief                int     xmlUCSIsTags (int code)\r
+                                       int     xmlUCSIsTaiLe (int code)\r
+                                       int     xmlUCSIsTaiXuanJingSymbols      (int code)\r
+                                       int     xmlUCSIsTamil (int code)\r
+                                       int     xmlUCSIsTelugu (int code)\r
+                                       int     xmlUCSIsThaana  (int code)\r
+                                       int     xmlUCSIsThai (int code)\r
+                                       int     xmlUCSIsTibetan (int code)\r
+                                       int     xmlUCSIsUgaritic (int code)\r
+                                       int     xmlUCSIsUnifiedCanadianAboriginalSyllabics      (int code)\r
+                                       int     xmlUCSIsVariationSelectors      (int code)\r
+                                       int     xmlUCSIsVariationSelectorsSupplement (int code)\r
+                                       int     xmlUCSIsYiRadicals      (int code)\r
+                                       int     xmlUCSIsYiSyllables      (int code)\r
+                                       int     xmlUCSIsYijingHexagramSymbols (int code)\r
+       * @desc                 Positive Test for checking if the character is a part of different UCS Block\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input: [get integer, N/A] @n\r
+       *                       {int(UCS code point)} => {N/A |0,1 } @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void\r
+UTcxmlUCSP10() \r
+{\r
+       int ret_val;\r
+       int code; /* UCS code point */\r
+       int n_code;\r
+\r
+       for (n_code = 0;n_code < gen_nb_int;n_code++)\r
+       {\r
+               code = gen_int(n_code, 0);\r
+\r
+               ret_val = xmlUCSIsTags(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP10", (void *)ret_val, (void *)0, "xmlUCSIsTags Failed");\r\r
+\r
+               ret_val = xmlUCSIsTaiLe(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP10", (void *)ret_val, (void *)0, "xmlUCSIsTaiLe Failed");\r\r
+\r
+               ret_val = xmlUCSIsTaiXuanJingSymbols(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP10", (void *)ret_val, (void *)0, "xmlUCSIsTaiXuanJingSymbols Failed");\r\r
+\r
+               ret_val = xmlUCSIsTamil(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP10", (void *)ret_val, (void *)0, "xmlUCSIsTamil Failed");\r\r
+\r
+               ret_val = xmlUCSIsTelugu(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP10", (void *)ret_val, (void *)0, "xmlUCSIsTelugu Failed");\r\r
+\r
+               ret_val = xmlUCSIsThaana(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP10", (void *)ret_val, (void *)0, "xmlUCSIsThaana Failed");\r\r
+\r
+               ret_val = xmlUCSIsThai(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP10", (void *)ret_val, (void *)0, "xmlUCSIsThai Failed");\r\r
+\r
+               ret_val = xmlUCSIsTibetan(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP10", (void *)ret_val, (void *)0, "xmlUCSIsTibetan Failed");\r\r
+\r
+               ret_val = xmlUCSIsUgaritic(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP10", (void *)ret_val, (void *)0, "xmlUCSIsUgaritic Failed");\r\r
+\r
+               ret_val = xmlUCSIsUnifiedCanadianAboriginalSyllabics(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP10", (void *)ret_val, (void *)0, "xmlUCSIsUnifiedCanadianAboriginalSyllabics Failed");\r\r
+\r
+               ret_val = xmlUCSIsVariationSelectors(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP10", (void *)ret_val, (void *)0, "xmlUCSIsVariationSelectors Failed");\r\r
+\r
+               ret_val = xmlUCSIsVariationSelectors(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP10", (void *)ret_val, (void *)0, "xmlUCSIsVariationSelectors Failed");\r\r
+\r
+               ret_val = xmlUCSIsVariationSelectorsSupplement(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP10", (void *)ret_val, (void *)0, "xmlUCSIsVariationSelectorsSupplement Failed");\r\r
+\r
+               ret_val = xmlUCSIsYiRadicals(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP10", (void *)ret_val, (void *)0, "xmlUCSIsYiRadicals Failed");\r\r
+\r
+               ret_val = xmlUCSIsYiSyllables(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP10", (void *)ret_val, (void *)0, "xmlUCSIsYiSyllables Failed");\r\r
+\r
+               ret_val = xmlUCSIsYijingHexagramSymbols(code);\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlUCSP10", (void *)ret_val, (void *)0, "xmlUCSIsYijingHexagramSymbols Failed");\r\r
+                       \r
+       }\r
+}\r
+\r
+static void startup( void);\r
+static void cleanup( void);\r
+\r
+void (*tet_startup)( void) = startup;\r
+void (*tet_cleanup)( void) = cleanup;\r
+\r
+static void startup( void)\r
+{\r
+        /* start of TC */\r
+        tet_printf("TC starts.");\r
+}\r
+\r
+static void cleanup( void)\r
+{\r
+        /* end of TC */\r
+        tet_printf("TC ends.");\r
+}\r
+\r
+struct tet_testlist tet_testlist[] = {\r
+       // Handling of out of context errors\r
+       {UTcxmlUCSP01,1},\r
+       {UTcxmlUCSP02,2},\r
+       {UTcxmlUCSP03,3},\r
+       {UTcxmlUCSP04,4},\r
+       {UTcxmlUCSP05,5},\r
+       {UTcxmlUCSP06,6},\r
+       {UTcxmlUCSP07,7},\r
+       {UTcxmlUCSP08,8},\r
+       {UTcxmlUCSP09,9},\r
+       {UTcxmlUCSP10,10},\r
+       { NULL, 0 },\r
+       \r
+};\r
diff --git a/TC/testcase/utc_libxml_XmlUri.c b/TC/testcase/utc_libxml_XmlUri.c
new file mode 100755 (executable)
index 0000000..0e19bd1
--- /dev/null
@@ -0,0 +1,271 @@
+/*\r
+*  libxml test suite\r
+*\r
+* Copyright (c) 2012 Samsung Electronics Co., Ltd. All rights reserved.\r
+*\r
+* Contact: {Maintainer Name} <{Maintainer Email}>\r
+* \r
+* Licensed under the Apache License, Version 2.0 (the "License");\r
+* you may not use this file except in compliance with the License.\r
+* You may obtain a copy of the License at\r
+*\r
+* http://www.apache.org/licenses/LICENSE-2.0\r
+*\r
+* Unless required by applicable law or agreed to in writing, software\r
+* distributed under the License is distributed on an "AS IS" BASIS,\r
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+* See the License for the specific language governing permissions and\r
+* limitations under the License.\r
+*\r
+*/ \r
+\r
+\r
+#include "utc_libxml_include.h"\r
+#include <libxml/xmlmemory.h>\r
+#include <libxml/uri.h>\r
+#include <libxml/globals.h>\r
+#include <libxml/xmlunicode.h>\r
+\r
+\r
+\r
+\r
+/***************************************************************************\r
+* SUTsXmlUri\r
+***************************************************************************/\r
+\r
+void __HandleURI1(const char *str)\r
+{\r
+       xmlChar *res    = NULL;\r
+       xmlChar *parsed = NULL;\r
+       xmlURIPtr uri;\r
+       int ret = 0;\r
+\r
+       uri = xmlCreateURI();\r
+       DTS_CHECK_NE_MESSAGE("__HandleURI1", (void *)uri, (void *)NULL, "xmlCreateURI Failed");\r\r
+\r
+       ret = xmlParseURIReference(uri, str);\r
+       DTS_CHECK_EQ_MESSAGE("__HandleURI1", (void *)ret, (void *)0, "xmlParseURIReference Failed");\r\r
+               \r
+       if (ret != 0)\r
+       {\r
+               //Do nothing\r
+       }\r
+       else\r
+       {\r
+               if (uri->scheme)\r
+               {\r
+                       DTS_CHECK_EQ_MESSAGE("__HandleURI1", (void *)(strcmp((uri->scheme),("http"))), (void *)0, "xmlParseURIReference scheme Failed");\r\r
+               }\r
+               #if 0\r
+               if (uri->opaque)\r
+               {\r
+                       DTS_CHECK_EQ_MESSAGE("__HandleURI1", (void *)uri->opaque, (void *)NULL, "xmlParseURIReference opaque Failed");\r\r
+               }\r
+               //if (uri->authority)\r
+               {\r
+                       DTS_CHECK_EQ_MESSAGE("__HandleURI1", (void *)uri->authority, (void *)NULL, "xmlParseURIReference authority Failed");\r\r
+               }\r
+               #endif\r
+               if (uri->server)\r
+               {\r
+                       DTS_CHECK_EQ_MESSAGE("__HandleURI1", (void *)(strcmp((uri->server),("elsewhere.com"))), (void *)0, "xmlParseURIReference server Failed");\r\r
+               }\r
+               #if 0\r
+               if (uri->user)\r
+               {\r
+                       DTS_CHECK_EQ_MESSAGE("__HandleURI1", (void *)uri->user, (void *)NULL, "xmlParseURIReference user Failed");\r\r
+               }\r
+               #endif\r
+               if (uri->port != 0)\r
+               {\r
+                       DTS_CHECK_EQ_MESSAGE("__HandleURI1", (void *)uri->port, (void *)2880, "xmlParseURIReference port Failed");\r\r
+               }\r
+               if (uri->path)\r
+               {\r
+                       DTS_CHECK_EQ_MESSAGE("__HandleURI1", (void *)(strcmp((uri->path),("/index.html"))), (void *)0, "xmlParseURIReference path Failed");\r\r
+               }\r
+               if (uri->query)\r
+               {\r
+                       DTS_CHECK_EQ_MESSAGE("__HandleURI1", (void *)(strcmp((uri->query),("deep"))), (void *)0, "xmlParseURIReference query Failed");\r\r
+               }\r
+               if (uri->fragment)\r
+               {\r
+                       DTS_CHECK_EQ_MESSAGE("__HandleURI1", (void *)(strcmp((uri->fragment),("deep2"))), (void *)0, "xmlParseURIReference fragment Failed");\r\r
+               }\r
+\r
+               int normalizeretval = xmlNormalizeURIPath(uri->path);\r
+               DTS_CHECK_EQ_MESSAGE("__HandleURI1", (void *)normalizeretval, (void *)0, "xmlNormalizeURIPath Failed");\r\r
+\r
+               parsed = xmlSaveUri(uri);\r
+               DTS_CHECK_NE_MESSAGE("__HandleURI1", (void *)parsed, (void *)NULL, "xmlSaveUri Failed");\r\r
+                       \r
+               res = xmlURIEscape(parsed);\r
+               DTS_CHECK_NE_MESSAGE("__HandleURI1", (void *)res, (void *)NULL, "xmlURIEscape Failed");\r\r
+                       \r
+       }\r
+       if (res != NULL)\r
+               xmlFree(res);\r
+       if (parsed != NULL)\r
+               xmlFree(parsed);\r
+       xmlFreeURI(uri);\r
+}\r
+void __HandleURI2(const char *str)\r
+{\r
+       xmlChar *res    = NULL;\r
+       xmlChar *parsed = NULL;\r
+       xmlURIPtr uri;\r
+       int ret = 0;\r
+\r
+       uri = xmlCreateURI();\r
+       DTS_CHECK_NE_MESSAGE("__HandleURI2", (void *)uri, (void *)NULL, "xmlCreateURI Failed");\r\r
+\r
+       ret = xmlParseURIReference(uri, str);\r
+       DTS_CHECK_EQ_MESSAGE("__HandleURI2", (void *)ret, (void *)0, "xmlParseURIReference Failed");\r\r
+               \r
+       if (ret != 0)\r
+       {\r
+               //Do nothing\r
+       }\r
+       else\r
+       {\r
+               if (uri->scheme)\r
+               {\r
+                       DTS_CHECK_EQ_MESSAGE("__HandleURI1", (void *)(strcmp((uri->scheme),("mailto"))), (void *)0, "xmlParseURIReference scheme Failed");\r\r
+               }\r
+               if (uri->opaque)\r
+               {\r
+                       DTS_CHECK_EQ_MESSAGE("__HandleURI1", (void *)(strcmp((uri->opaque),("java-net@java.sun.com"))), (void *)NULL, "xmlParseURIReference opaque Failed");\r\r
+               }\r
+               #if 0\r
+               //if (uri->authority)\r
+               {\r
+                       DTS_CHECK_EQ_MESSAGE("__HandleURI1", (void *)uri->authority, (void *)NULL, "xmlParseURIReference authority Failed");\r\r
+               }\r
+               if (uri->server)\r
+               {\r
+                       DTS_CHECK_EQ_MESSAGE("__HandleURI1", (void *)(strcmp((uri->server),("elsewhere.com"))), (void *)0, "xmlParseURIReference server Failed");\r\r
+               }\r
+               if (uri->user)\r
+               {\r
+                       DTS_CHECK_EQ_MESSAGE("__HandleURI1", (void *)uri->user, (void *)NULL, "xmlParseURIReference user Failed");\r\r
+               }\r
+               if (uri->port != 0)\r
+               {\r
+                       DTS_CHECK_EQ_MESSAGE("__HandleURI1", (void *)uri->port, (void *)2880, "xmlParseURIReference port Failed");\r\r
+               }\r
+               if (uri->path)\r
+               {\r
+                       DTS_CHECK_EQ_MESSAGE("__HandleURI1", (void *)(strcmp((uri->path),("elsewhere.com"))), (void *)0, "xmlParseURIReference path Failed");\r\r
+               }\r
+               if (uri->query)\r
+               {\r
+                       DTS_CHECK_EQ_MESSAGE("__HandleURI1", (void *)(strcmp((uri->query),("deep"))), (void *)0, "xmlParseURIReference query Failed");\r\r
+               }\r
+               #endif\r
+               if (uri->fragment)\r
+               {\r
+                       DTS_CHECK_EQ_MESSAGE("__HandleURI1", (void *)(strcmp((uri->fragment),("deep2"))), (void *)0, "xmlParseURIReference fragment Failed");\r\r
+               }\r
+\r
+               parsed = xmlSaveUri(uri);\r
+               DTS_CHECK_NE_MESSAGE("__HandleURI1", (void *)parsed, (void *)NULL, "xmlSaveUri Failed");\r\r
+                       \r
+               res = xmlURIEscape(parsed);\r
+               DTS_CHECK_NE_MESSAGE("__HandleURI1", (void *)res, (void *)NULL, "xmlURIEscape Failed");\r\r
+                       \r
+       }\r
+       \r
+       if (res != NULL)\r
+               xmlFree(res);\r
+       if (parsed != NULL)\r
+               xmlFree(parsed);\r
+       xmlFreeURI(uri);\r
+}      \r
+\r
+       /**    \r
+       * @test                 UTcUriP01\r
+       * @brief                int     xmlNormalizeURIPath     (char * path)\r
+                                       xmlChar *       xmlSaveUri (xmlURIPtr uri)\r
+                                       xmlChar *       xmlURIEscape (const xmlChar * str)\r
+       * @desc                 3 APIs tested - Positive Test for Appling the 5 normalization steps to a path string, Saving the URI as an escaped string, escaping routine\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [create an empty xmlURI and Parse an URI, Free up the xmlURI struct] @n\r
+       *                       {char(uri->path)} => { N/A | 0 or error } @n\r
+                                       input2: [creates an empty xmlURI and Parse an URI, Free up the xmlURI struct] @n\r
+       *                       {xmlURIPtr(uri)} => {N/A | new string} @n\r
+                                       input3: [create an empty xmlURI and Parse an URI, Free up the xmlURI struct] @n\r
+       *                       {parser} => {N/A  | copy of a string} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcUriP01()\r
+{\r
+       char inputstr[1024] = "http://elsewhere.com:2880/index.html?deep#deep2";\r
+       int len =  (int)strlen(inputstr);\r
+       while ((len > 0) &&\r
+               ((inputstr[len - 1] == '\n') || (inputstr[len - 1] == '\r') ||\r
+               (inputstr[len - 1] == ' ') || (inputstr[len - 1] == '\t')))\r
+       {\r
+                       len--;\r
+                       inputstr[len] = 0;\r
+       }\r
+       __HandleURI1(inputstr);\r
+}\r
+       /**    \r
+       * @test                 UTcUriP02\r
+       * @brief                xmlChar *       xmlSaveUri              (xmlURIPtr uri)\r
+                                       xmlChar *       xmlURIEscape            (const xmlChar * str)\r
+       * @desc                 2 APIs Tested - Positive Test for Saving the URI as an escaped string, escaping routine\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [creates an empty xmlURI and Parse an URI, Free up the xmlURI struct] @n\r
+       *                       {xmlURIPtr(uri)} => {N/A| NULL } @n\r
+                                       input2: [creates an empty xmlURI and Parse an URI, Free up the xmlURI struct] @n\r
+       *                       {parser} => {N/A| NULL} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcUriP02()\r
+{\r
+       char inputstr[1024] = "mailto:java-net@java.sun.com#deep2  ";\r
+       int len =  (int)strlen(inputstr);\r
+       while ((len > 0) &&\r
+               ((inputstr[len - 1] == '\n') || (inputstr[len - 1] == '\r') ||\r
+               (inputstr[len - 1] == ' ') || (inputstr[len - 1] == '\t')))\r
+       {\r
+               len--;\r
+               inputstr[len] = 0;\r
+       }\r
+       __HandleURI2(inputstr);\r
+}\r
+\r
+static void startup( void);\r
+static void cleanup( void);\r
+\r
+void (*tet_startup)( void) = startup;\r
+void (*tet_cleanup)( void) = cleanup;\r
+\r
+static void startup( void)\r
+{\r
+        /* start of TC */\r
+        tet_printf("TC starts.");\r
+}\r
+\r
+static void cleanup( void)\r
+{\r
+        /* end of TC */\r
+        tet_printf("TC ends.");\r
+}\r
+\r
+struct tet_testlist tet_testlist[] = {\r
+       // Handling of out of context errors\r
+       {UTcUriP01,1},\r
+       {UTcUriP02,2},\r
+       { NULL, 0 },\r
+       \r
+};\r
diff --git a/TC/testcase/utc_libxml_XmlWriter.c b/TC/testcase/utc_libxml_XmlWriter.c
new file mode 100755 (executable)
index 0000000..f1dfd4c
--- /dev/null
@@ -0,0 +1,2989 @@
+// Open Service Platform\r
+// Copyright (c) 2004 Software Center, Samsung Electronics, Inc.\r
+// All right reserved.\r
+//\r
+// This software is the confidential and proprietary information\r
+// of Samsung Electronics, Inc. (¡°Confidential Information¡±). You\r
+// shall not disclose such Confidential Information and shall use\r
+// it only in accordance with the terms of the license agreement\r
+// you entered into with Samsung Electronics.\r
+//\r
+/**\r
+* @file                        SUTsXmlWriter.cpp\r
+* @brief               This is the implementation for SUTsXmlModule class.\r
+* @author              Brijesh Singh Mawari(brijesh.sm@partner.samsung.com)\r
+* @version             0.1\r
+*\r
+* This file contains LibXml Tree Operations.\r
+*\r
+*/\r
+\r
+/***************************************************************************\r
+* SUTsXmlWriter\r
+***************************************************************************/\r
+\r
+#include "utc_libxml_include.h"\r
+#include <libxml/xmlwriter.h>\r
+#include <libxml/xmlreader.h>\r
+\r
+\r
+#define MY_ENCODING "ISO-8859-1"\r
+\r
+//Target\r
+\r
+#define        OUTFILE1        UTSHOME"/writer1.res"\r
+#define        OUTFILE2        UTSHOME"/missing.xml"\r
+#define        OUTFILE3        UTSHOME"/test.out"\r
+\r
+\r
+\r
+static xmlDocPtr api_doc = NULL;\r
+static xmlDtdPtr api_dtd = NULL;\r
+static xmlNodePtr api_root = NULL;\r
+static xmlAttrPtr api_attr = NULL;\r
+static xmlNsPtr api_ns = NULL;\r
+\r
+static void\r
+free_api_doc(void) {\r
+    xmlFreeDoc(api_doc);\r
+    api_doc = NULL;\r
+    api_dtd = NULL;\r
+    api_root = NULL;\r
+    api_attr = NULL;\r
+    api_ns = NULL;\r
+}\r
+\r
+static xmlDocPtr\r
+get_api_doc(void) {\r
+    if (api_doc == NULL) {\r
+        api_doc = xmlReadMemory("<!DOCTYPE root [<!ELEMENT root EMPTY>]><root xmlns:h='http://example.com/' h:foo='bar'/>", 88, "root_test", NULL, 0);\r
+       api_root = NULL;\r
+       api_attr = NULL;\r
+    }\r
+    return(api_doc);\r
+}\r
+\r
+static xmlNodePtr\r
+get_api_root(void) {\r
+    if ((api_root == NULL) || (api_root->type != XML_ELEMENT_NODE)) {\r
+        get_api_doc();\r
+       if ((api_doc != NULL) && (api_doc->children != NULL) &&\r
+           (api_doc->children->next != NULL) &&\r
+           (api_doc->children->next->type == XML_ELEMENT_NODE))\r
+           api_root = api_doc->children->next;\r
+    }\r
+    return(api_root);\r
+}\r
+#define gen_nb_xmlOutputBufferPtr 1\r
+static xmlOutputBufferPtr gen_xmlOutputBufferPtr(int no, int nr ATTRIBUTE_UNUSED) {\r
+    if (no == 0) return(xmlOutputBufferCreateFilename(OUTFILE3, NULL, 0));\r
+    return(NULL);\r
+}\r
+static void des_xmlOutputBufferPtr(int no ATTRIBUTE_UNUSED, xmlOutputBufferPtr val, int nr ATTRIBUTE_UNUSED) {\r
+    if (val != NULL) {\r
+        xmlOutputBufferClose(val);\r
+    }\r
+}\r
+static void desret_xmlTextWriterPtr(xmlTextWriterPtr val) {\r
+    xmlFreeTextWriter(val);\r
+}\r
+\r
+#define gen_nb_fileoutput 1\r
+\r
+static void des_fileoutput(int no ATTRIBUTE_UNUSED, const char *val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+}\r
+\r
+#define gen_nb_int 1\r
+\r
+static int gen_int(int no, int nr ATTRIBUTE_UNUSED) {\r
+    if (no == 0) return(0);\r
+    if (no == 1) return(1);\r
+    if (no == 2) return(-1);\r
+    if (no == 3) return(122);\r
+    return(-1);\r
+}\r
+\r
+static void des_int(int no ATTRIBUTE_UNUSED, int val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+}\r
+\r
+#define gen_nb_xmlBufferPtr 1\r
+static const char *static_buf_content = "a static buffer";\r
+static xmlBufferPtr gen_xmlBufferPtr(int no, int nr ATTRIBUTE_UNUSED) {\r
+    if (no == 0) return(xmlBufferCreate());\r
+    if (no == 1) return(xmlBufferCreateStatic((void *)static_buf_content, 13));\r
+    return(NULL);\r
+}\r
+static void des_xmlBufferPtr(int no ATTRIBUTE_UNUSED, xmlBufferPtr val, int nr ATTRIBUTE_UNUSED) {\r
+    if (val != NULL) {\r
+        xmlBufferFree(val);\r
+    }\r
+}\r
+\r
+#define gen_nb_xmlParserCtxtPtr 1\r
+static xmlParserCtxtPtr gen_xmlParserCtxtPtr(int no, int nr ATTRIBUTE_UNUSED) {\r
+    if (no == 0) return(xmlNewParserCtxt());\r
+    //if (no == 1) return(xmlCreateMemoryParserCtxt("<doc/>", 6));\r
+    return(NULL);\r
+}\r
+static void des_xmlParserCtxtPtr(int no ATTRIBUTE_UNUSED, xmlParserCtxtPtr val, int nr ATTRIBUTE_UNUSED) {\r
+    if (val != NULL)\r
+        xmlFreeParserCtxt(val);\r
+}\r
+\r
+#define gen_nb_const_char_ptr 2\r
+\r
+static char *gen_const_char_ptr(int no, int nr ATTRIBUTE_UNUSED) {\r
+    if (no == 0) return((char *) "foo");\r
+    if (no == 1) return((char *) "<foo/>");\r
+    if (no == 2) return((char *) "test/ent2");\r
+    return(NULL);\r
+}\r
+static void des_const_char_ptr(int no ATTRIBUTE_UNUSED, const char *val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+}\r
+#if 0\r
+static void desret_xmlParserCtxtPtr(xmlParserCtxtPtr val) {\r
+    xmlFreeParserCtxt(val);\r
+}\r
+#endif\r
+#define gen_nb_xmlNodePtr 2\r
+static xmlNodePtr gen_xmlNodePtr(int no, int nr ATTRIBUTE_UNUSED) {\r
+    if (no == 0) return(xmlNewPI(BAD_CAST "test", NULL));\r
+    if (no == 1) return(get_api_root());\r
+    return(NULL);\r
+/*     if (no == 2) return((xmlNodePtr) get_api_doc()); */\r
+}\r
+\r
+static void des_xmlNodePtr(int no, xmlNodePtr val, int nr ATTRIBUTE_UNUSED) {\r
+    if (no == 1) {\r
+        free_api_doc();\r
+    } else if (val != NULL) {\r
+        xmlUnlinkNode(val);\r
+        xmlFreeNode(val);\r
+    }\r
+}\r
+\r
+#define gen_nb_xmlDocPtr 1\r
+static xmlDocPtr gen_xmlDocPtr(int no, int nr ATTRIBUTE_UNUSED) {\r
+    if (no == 0) return(xmlNewDoc(BAD_CAST "1.0"));\r
+    if (no == 1) return(xmlReadMemory("<foo/>", 6, "test", NULL, 0));\r
+    if (no == 2) return(xmlReadMemory("<!DOCTYPE foo []> <foo/>", 24, "test", NULL, 0));\r
+    return(NULL);\r
+}\r
+static void des_xmlDocPtr(int no ATTRIBUTE_UNUSED, xmlDocPtr val, int nr ATTRIBUTE_UNUSED) {\r
+    if ((val != NULL) && (val != api_doc) && (val->doc != api_doc))\r
+        xmlFreeDoc(val);\r
+}\r
+#define gen_nb_xmlTextWriterPtr 1\r
+static xmlTextWriterPtr gen_xmlTextWriterPtr(int no, int nr ATTRIBUTE_UNUSED) {\r
+    if (no == 0) return(xmlNewTextWriterFilename(OUTFILE3, 0));\r
+    return(NULL);\r
+}\r
+static void des_xmlTextWriterPtr(int no ATTRIBUTE_UNUSED, xmlTextWriterPtr val, int nr ATTRIBUTE_UNUSED) {\r
+    if (val != NULL) xmlFreeTextWriter(val);\r
+}\r
+\r
+static void desret_int(int val ATTRIBUTE_UNUSED) {\r
+}\r
+\r
+#if 0\r
+#define gen_nb_const_xmlChar_ptr_ptr 1\r
+static xmlChar ** gen_const_xmlChar_ptr_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+    return(NULL);\r
+}\r
+static void des_const_xmlChar_ptr_ptr(int no ATTRIBUTE_UNUSED, const xmlChar ** val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+}\r
+#endif\r
+#define gen_nb_const_xmlChar_ptr 1\r
+\r
+static xmlChar *gen_const_xmlChar_ptr(int no, int nr ATTRIBUTE_UNUSED) {\r
+    if (no == 0) return((xmlChar *) "foo");\r
+    if (no == 1) return((xmlChar *) "<foo/>");\r
+    if (no == 2) return((xmlChar *) "n?e");\r
+    if (no == 3) return((xmlChar *) " 2ab ");\r
+    return(NULL);\r
+}\r
+static void des_const_xmlChar_ptr(int no ATTRIBUTE_UNUSED, const xmlChar *val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+}\r
+\r
+xmlChar *\r
+ConvertInput(const char *in, const char *encoding)\r
+{\r
+char Buff[128] = {0,};\r
+    xmlChar *out;\r
+    int ret;\r
+    int size;\r
+    int out_size;\r
+    int temp;\r
+    xmlCharEncodingHandlerPtr handler;\r
+\r
+    if (in == 0)\r
+        return NULL;\r
+\r
+    handler = xmlFindCharEncodingHandler(encoding);\r
+\r
+    if (!handler) {\r
+       snprintf(Buff, 127, "ConvertInput: no encoding handler found for '%s'\n", encoding ? encoding : "");\r
+//        DTS_PRINT("ConvertInput", Buff );\r
+       return NULL;\r
+    }\r
+\r
+    size = (int) strlen(in) + 1;\r
+    out_size = size * 2 - 1;\r
+    out = (unsigned char *) xmlMalloc((size_t) out_size);\r
+\r
+    if (out != 0) {\r
+        temp = size - 1;\r
+        ret = handler->input(out, &out_size, (const xmlChar *) in, &temp);\r
+        if ((ret < 0) || (temp - size + 1)) {\r
+            if (ret < 0) {\r
+                       DTS_PRINT("ConvertInput", "ConvertInput: conversion wasn't successful.\n" );\r
+            } else {\r
+                       snprintf(Buff, 127, "ConvertInput: conversion wasn't successful. converted: %i octets.\n", temp);\r
+                       //DTS_PRINT("ConvertInput", Buff );                             \r
+            }\r
+\r
+            xmlFree(out);\r
+            out = 0;\r
+        } else {\r
+            out = (unsigned char *) xmlRealloc(out, out_size + 1);\r
+            out[out_size] = 0;  /*NULL terminating out */\r
+        }\r
+    } else {\r
+       DTS_PRINT("ConvertInput", "ConvertInput: no mem\n" );                           \r
+   }\r
+\r
+    return out;\r
+}\r
+\r
+\r
+\r
+\r
+\r
+static void UTcXmlNewTextWriterP01()\r
+{\r
+       xmlTextWriterPtr ret_val;\r
+       xmlOutputBufferPtr out; /* an xmlOutputBufferPtr */\r
+       int n_out;\r
+\r
+       for (n_out = 0;n_out < gen_nb_xmlOutputBufferPtr;n_out++) {\r
+               out = gen_xmlOutputBufferPtr(n_out, 0);\r
+               DTS_CHECK_NE_MESSAGE("xmlNewTextWriter", (void *)out, (void *)NULL, "gen_xmlOutputBufferPtr Failed");\r
+               /**\r
+               * @remarks   input1: [N/A, N/A] @n\r
+               *            {xmlOutputBufferPtr} => { N/A | xmlTextWriterPtr pointer } @n\r
+               */\r
+               ret_val = xmlNewTextWriter(out);\r
+               DTS_CHECK_NE_MESSAGE("xmlNewTextWriter", (void *)ret_val, (void *)NULL, "xmlNewTextWriter Failed");\r
+               if (ret_val != NULL)\r
+                       out = NULL;\r
+               desret_xmlTextWriterPtr(ret_val);\r
+               des_xmlOutputBufferPtr(n_out, out, 0);\r
+               xmlResetLastError();\r
+       }\r
+}\r
+\r
+static void\r
+UTcXmlNewTextWriterFilenameP01()\r
+{\r
+       xmlTextWriterPtr ret_val;\r
+       const char * uri; /* the URI of the resource for the output */\r
+       int n_uri;\r
+       int compression; /* compress the output? */\r
+       int n_compression;\r
+\r
+       for (n_uri = 0;n_uri < gen_nb_fileoutput;n_uri++) {\r
+               for (n_compression = 0;n_compression < gen_nb_int;n_compression++) {\r
+                       uri = gen_fileoutput(n_uri, 0);\r
+                       DTS_CHECK_NE_MESSAGE("xmlNewTextWriterFilename", (void *)uri, (void *)NULL, "gen_fileoutput Failed");\r
+                       compression = gen_int(n_compression, 1);\r
+                       //MT_CHECK_MESSAGE2(0 != compression, "gen_int returned NULL");\r
+                       /**\r
+                       * @remarks   input1: [N/A, N/A] @n\r
+                       *            {(http://localhost/,http:http://http,ftp://localhost/foo) , (0,1,-1,122)}\r
+                       *            => { N/A | xmlTextWriterPtr pointer } @n\r
+                       */\r
+                       ret_val = xmlNewTextWriterFilename(uri, compression);\r
+                       DTS_CHECK_NE_MESSAGE("xmlNewTextWriterFilename", (void *)ret_val, (void *)NULL, "xmlNewTextWriterFilename Failed");\r
+                       desret_xmlTextWriterPtr(ret_val);\r
+                       des_fileoutput(n_uri, uri, 0);\r
+                       des_int(n_compression, compression, 1);\r
+                       xmlResetLastError();\r
+               }\r
+       }\r
+}\r
+\r
+\r
+static void\r
+UTcXmlNewTextWriterMemoryP01()\r
+{\r
+       xmlTextWriterPtr ret_val;\r
+       xmlBufferPtr buf; /* xmlBufferPtr */\r
+       int n_buf;\r
+       int compression; /* compress the output? */\r
+       int n_compression;\r
+\r
+       for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {\r
+               for (n_compression = 0;n_compression < gen_nb_int;n_compression++) {\r
+                       buf = gen_xmlBufferPtr(n_buf, 0);\r
+                       DTS_CHECK_NE_MESSAGE("xmlNewTextWriterMemory", (void *)buf, (void *)NULL, "gen_xmlBufferPtr Failed");\r
+                       compression = gen_int(n_compression, 1);\r
+                       //MT_CHECK_MESSAGE2(0 != compression, "gen_int returned NULL");\r
+                       /**\r
+                       * @remarks   input1: [N/A, N/A] @n\r
+                       *            {xmlBufferPtr pointer , (0,1,-1,122)} => { N/A | xmlTextWriterPtr pointer} @n\r
+                       */\r
+                       ret_val = xmlNewTextWriterMemory(buf, compression);\r
+                       DTS_CHECK_NE_MESSAGE("xmlNewTextWriterMemory", (void *)ret_val, (void *)NULL, "xmlNewTextWriterMemory Failed");\r
+                       desret_xmlTextWriterPtr(ret_val);\r
+                       des_xmlBufferPtr(n_buf, buf, 0);\r
+                       des_int(n_compression, compression, 1);\r
+                       xmlResetLastError();\r
+               }\r
+       }\r
+}\r
+static void\r
+UTcXmlNewTextWriterPushParserP01()\r
+{\r
+       xmlTextWriterPtr ret_val;\r
+       xmlParserCtxtPtr ctxt; /* xmlParserCtxtPtr to hold the new XML document tree */\r
+       int n_ctxt;\r
+       int compression; /* compress the output? */\r
+       int n_compression;\r
+\r
+       for (n_ctxt = 0;n_ctxt < gen_nb_xmlParserCtxtPtr;n_ctxt++) {\r
+               for (n_compression = 0;n_compression < gen_nb_int;n_compression++) {\r
+                       ctxt = gen_xmlParserCtxtPtr(n_ctxt, 0);\r
+                       DTS_CHECK_NE_MESSAGE("xmlNewTextWriterPushParser", (void *)ctxt, (void *)NULL, "gen_xmlParserCtxtPtr Failed");\r
+                       compression = gen_int(n_compression, 1);\r
+                       //MT_CHECK_MESSAGE2(0 != compression, "gen_int returned NULL");\r
+                       /**\r
+                       * @remarks   input1: [N/A, N/A] @n\r
+                       *            {xmlParserCtxtPtr pointer , (0,1,-1,122)} => { N/A | xmlTextWriterPtr pointer} @n\r
+                       */\r
+                       ret_val = xmlNewTextWriterPushParser(ctxt, compression);\r
+                       DTS_CHECK_NE_MESSAGE("xmlNewTextWriterPushParser", (void *)ret_val, (void *)NULL, "xmlNewTextWriterPushParser Failed");\r
+                       if (ctxt != NULL) {\r
+                               xmlFreeDoc(ctxt->myDoc);\r
+                               ctxt->myDoc = NULL;\r
+                       }\r
+                       if (ret_val != NULL)\r
+                               ctxt = NULL;\r
+                       //desret_xmlTextWriterPtr(ret_val);\r
+                       des_xmlParserCtxtPtr(n_ctxt, ctxt, 0);\r
+                       des_int(n_compression, compression, 1);\r
+                       xmlResetLastError();\r
+               }\r
+       }\r
+}\r
+static void\r
+UTcXmlNewTextWriterDocP01()\r
+{\r
+       xmlTextWriterPtr ret_val;\r
+       xmlDocPtr doc;\r
+\r
+       /* Create a new XmlWriter for DOM, with no compression. */\r
+       ret_val = xmlNewTextWriterDoc(&doc, 0);\r
+       DTS_CHECK_NE_MESSAGE("xmlNewTextWriterDoc", (void *)ret_val, (void *)NULL, "xmlNewTextWriterDoc Failed");\r
+\r
+       /* Create a new XmlWriter for DOM, with no compression. */\r
+       ret_val = xmlNewTextWriterDoc(&doc, 3);\r
+       DTS_CHECK_NE_MESSAGE("xmlNewTextWriterDoc", (void *)ret_val, (void *)NULL, "xmlNewTextWriterDoc Failed");\r
+\r
+       //desret_xmlTextWriterPtr(ret_val);\r
+       xmlFreeTextWriter(ret_val);\r
+       if (doc != NULL)\r
+               xmlFreeDoc(doc);\r
+       xmlResetLastError();\r
+}\r
+\r
+\r
+static void\r
+UTcXmlNewTextWriterTreeP01()\r
+{\r
+       xmlTextWriterPtr ret_val;\r
+       xmlDocPtr doc; /* xmlDocPtr */\r
+       int n_doc;\r
+       xmlNodePtr node; /* xmlNodePtr or NULL for doc->children */\r
+       int n_node;\r
+       int compression; /* compress the output? */\r
+       int n_compression;\r
+\r
+       for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {\r
+               for (n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++) {\r
+                       for (n_compression = 0;n_compression < gen_nb_int;n_compression++) {\r
+                               doc = gen_xmlDocPtr(n_doc, 0);\r
+                               DTS_CHECK_NE_MESSAGE("xmlNewTextWriterTree", (void *)doc, (void *)NULL, "gen_xmlDocPtr Failed");\r
+\r
+                               node = gen_xmlNodePtr(n_node, 1);\r
+                               DTS_CHECK_NE_MESSAGE("xmlNewTextWriterTree", (void *)node, (void *)NULL, "gen_xmlNodePtr Failed");\r
+\r
+                               compression = gen_int(n_compression, 2);\r
+                               //MT_CHECK_MESSAGE2(0 != compression, "gen_int returned NULL");\r
+                               /**\r
+                               * @remarks   input1: [N/A, N/A] @n\r
+                               *            { xmlDocPtr pointer ,xmlNodePtr pointer , (0,1,-1,122)} =>\r
+                               *            { N/A | xmlTextWriterPtr pointer} @n\r
+                               */\r
+                               ret_val = xmlNewTextWriterTree(doc, node, compression);\r
+                               DTS_CHECK_NE_MESSAGE("xmlNewTextWriterTree", (void *)ret_val, (void *)NULL, "xmlNewTextWriterTree Failed");\r
+                               \r
+                               desret_xmlTextWriterPtr(ret_val);\r
+                               des_xmlDocPtr(n_doc, doc, 0);\r
+                               des_xmlNodePtr(n_node, node, 1);\r
+                               des_int(n_compression, compression, 2);\r
+                               xmlResetLastError();\r
+                       }\r
+               }\r
+       }\r
+}\r
+\r
+static void\r
+UTcXmlFreeTextWriterP01()\r
+{\r
+       xmlTextWriterPtr ret_val;\r
+       xmlOutputBufferPtr out; /* an xmlOutputBufferPtr */\r
+       int n_out;\r
+\r
+       for (n_out = 0;n_out < gen_nb_xmlOutputBufferPtr;n_out++) {\r
+               out = gen_xmlOutputBufferPtr(n_out, 0);\r
+               DTS_CHECK_NE_MESSAGE("xmlNewTextWriter", (void *)out, (void *)NULL, "gen_xmlOutputBufferPtr Failed");\r
+                       \r
+               ret_val = xmlNewTextWriter(out);\r
+               DTS_CHECK_NE_MESSAGE("xmlNewTextWriter", (void *)ret_val, (void *)NULL, "xmlNewTextWriter Failed");\r
+               \r
+               if (ret_val != NULL)\r
+                       out = NULL;\r
+\r
+               /**\r
+               * @remarks   input1: [N/A, N/A] @n\r
+               *            {xmlTextWriterPtr pointer} => { N/A | void } @n\r
+               */\r
+               xmlFreeTextWriter(ret_val);\r
+               //desret_xmlTextWriterPtr(ret_val);\r
+               des_xmlOutputBufferPtr(n_out, out, 0);\r
+               xmlResetLastError();\r
+       }\r
+}\r
+\r
+\r
+\r
+static void UTcXmlTextWriterStartDocumentP01()\r
+{\r
+       int ret_val;\r
+       xmlTextWriterPtr writer; /* the xmlTextWriterPtr */\r
+       int n_writer;\r
+       char * version; /* the xml version ("1.0") or NULL for default ("1.0") */\r
+       int n_version;\r
+       char * standalone; /* "yes" or "no" or NULL for default */\r
+       int n_standalone;\r
+\r
+       for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {\r
+               for (n_version = 0;n_version < gen_nb_const_char_ptr;n_version++) {\r
+                       for (n_standalone = 0;n_standalone < gen_nb_const_char_ptr;n_standalone++) {\r
+                       writer = gen_xmlTextWriterPtr(n_writer, 0);\r
+                       DTS_CHECK_NE_MESSAGE("xmlTextWriterStartDocument", (void *)writer, (void *)NULL, "gen_xmlTextWriterPtr Failed");\r
+               \r
+                       version = gen_const_char_ptr(n_version, 1);\r
+                       DTS_CHECK_NE_MESSAGE("xmlTextWriterStartDocument", (void *)version, (void *)NULL, "gen_const_char_ptr Failed");\r
+                       \r
+                       standalone = gen_const_char_ptr(n_standalone, 3);\r
+                       DTS_CHECK_NE_MESSAGE("xmlTextWriterStartDocument", (void *)standalone, (void *)NULL, "gen_const_char_ptr Failed");\r
+                       \r
+                       /**\r
+                       * @remarks   input1: [N/A, N/A] @n\r
+                       *            { xmlTextWriterPtr pointer ,("foo",<foo/>","test/ent2"), ISO-8859-1 ,("foo",<foo/>","test/ent2")} =>\r
+                       *            { N/A | int } @n\r
+                       */\r
+                       ret_val = xmlTextWriterStartDocument(writer, (const char *)version, MY_ENCODING, (const char *)standalone);\r
+                       DTS_CHECK_EQ_MESSAGE("xmlTextWriterStartDocument", (void *)ret_val, (void *)0, "xmlTextWriterStartDocument Failed");\r
+                       \r
+                       desret_int(ret_val);\r
+                       des_xmlTextWriterPtr(n_writer, writer, 0);\r
+                       des_const_char_ptr(n_version, (const char *)version, 1);\r
+                       des_const_char_ptr(n_standalone, (const char *)standalone, 3);\r
+                       xmlResetLastError();\r
+                       }\r
+               }\r
+       }\r
+}\r
+\r
+static void\r
+UTcXmlTextWriterEndDocumentP01()\r
+{\r
+       int ret_val;\r
+       xmlTextWriterPtr writer; /* the xmlTextWriterPtr */\r
+       int n_writer;\r
+\r
+       for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {\r
+               writer = gen_xmlTextWriterPtr(n_writer, 0);\r
+               DTS_CHECK_NE_MESSAGE("xmlTextWriterEndDocument", (void *)writer, (void *)NULL, "gen_xmlTextWriterPtr Failed");\r
+               \r
+               /**\r
+               * @remarks   input1: [N/A, N/A] @n\r
+               *            { xmlTextWriterPtr pointer} => { N/A | int } @n\r
+               */\r
+               ret_val = xmlTextWriterEndDocument(writer);\r
+               DTS_CHECK_NE_MESSAGE("xmlTextWriterEndDocument", (void *)ret_val, (void *)-1, "xmlTextWriterEndDocument Failed");\r
+               \r
+               desret_int(ret_val);\r
+               des_xmlTextWriterPtr(n_writer, writer, 0);\r
+               xmlResetLastError();\r
+       }\r
+}\r
+\r
+static void\r
+UTcXmlTextWriterStartElementP01()\r
+{\r
+    int ret_val;\r
+    xmlTextWriterPtr writer; /* the xmlTextWriterPtr */\r
+    int n_writer;\r
+    xmlChar * name; /* element name */\r
+    int n_name;\r
+\r
+    for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {\r
+               for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {\r
+                       writer = gen_xmlTextWriterPtr(n_writer, 0);\r
+                       DTS_CHECK_NE_MESSAGE("xmlTextWriterStartElement", (void *)writer, (void *)NULL, "gen_xmlTextWriterPtr Failed");\r
+                       \r
+                       name = gen_const_xmlChar_ptr(n_name, 1);\r
+                       DTS_CHECK_NE_MESSAGE("xmlTextWriterStartElement", (void *)name, (void *)NULL, "gen_const_xmlChar_ptr Failed");\r
+                       \r
+                       /**\r
+                       * @remarks   input1: [N/A, N/A] @n\r
+                       *            { xmlTextWriterPtr pointer} =>\r
+                       *            { N/A | int } @n\r
+                       */\r
+                       ret_val = xmlTextWriterStartElement(writer, (const xmlChar *)name);\r
+                       DTS_CHECK_EQ_MESSAGE("xmlTextWriterStartElement", (void *)ret_val, (void *)0, "xmlTextWriterStartElement Failed");\r
+                       \r
+                       desret_int(ret_val);\r
+                       des_xmlTextWriterPtr(n_writer, writer, 0);\r
+                       des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);\r
+                       xmlResetLastError();\r
+               }\r
+    }\r
+}\r
+\r
+static void\r
+UTcXmlTextWriterStartElementNSP01()\r
+{\r
+       int ret_val;\r
+       xmlTextWriterPtr writer; /* the xmlTextWriterPtr */\r
+       int n_writer;\r
+       xmlChar * prefix; /* namespace prefix or NULL */\r
+       int n_prefix;\r
+       xmlChar * name; /* element local name */\r
+       int n_name;\r
+       xmlChar * namespaceURI; /* namespace URI or NULL */\r
+       int n_namespaceURI;\r
+\r
+       for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {\r
+               for (n_prefix = 0;n_prefix < gen_nb_const_xmlChar_ptr;n_prefix++) {\r
+                       for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {\r
+                               for (n_namespaceURI = 0;n_namespaceURI < gen_nb_const_xmlChar_ptr;n_namespaceURI++) {\r
+                               writer = gen_xmlTextWriterPtr(n_writer, 0);\r
+                               DTS_CHECK_NE_MESSAGE("xmlTextWriterStartElementNS", (void *)writer, (void *)NULL, "gen_xmlTextWriterPtr Failed");\r
+\r
+                               prefix = gen_const_xmlChar_ptr(n_prefix, 1);\r
+                               DTS_CHECK_NE_MESSAGE("xmlTextWriterStartElementNS", (void *)prefix, (void *)NULL, "gen_const_xmlChar_ptr Failed");\r
+\r
+                               name = gen_const_xmlChar_ptr(n_name, 2);\r
+                               DTS_CHECK_NE_MESSAGE("xmlTextWriterStartElementNS", (void *)name, (void *)NULL, "gen_const_xmlChar_ptr Failed");\r
+                               \r
+                               namespaceURI = gen_const_xmlChar_ptr(n_namespaceURI, 3);\r
+                               DTS_CHECK_NE_MESSAGE("xmlTextWriterStartElementNS", (void *)namespaceURI, (void *)NULL, "gen_const_xmlChar_ptr Failed");\r
+                               \r
+                               /**\r
+                               * @remarks   input1: [N/A, N/A] @n\r
+                               *            { xmlTextWriterPtr pointer, xmlChar pointer, xmlChar pointer, xmlChar pointer} =>\r
+                               *            { N/A | int } @n\r
+                               */\r
+                               ret_val = xmlTextWriterStartElementNS(writer, (const xmlChar *)prefix, (const xmlChar *)name, (const xmlChar *)namespaceURI);\r
+                               DTS_CHECK_EQ_MESSAGE("xmlTextWriterStartElementNS", (void *)ret_val, (void *)0, "xmlTextWriterStartElementNS Failed");\r
+                               \r
+                               desret_int(ret_val);\r
+                               des_xmlTextWriterPtr(n_writer, writer, 0);\r
+                               des_const_xmlChar_ptr(n_prefix, (const xmlChar *)prefix, 1);\r
+                               des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 2);\r
+                               des_const_xmlChar_ptr(n_namespaceURI, (const xmlChar *)namespaceURI, 3);\r
+                               xmlResetLastError();\r
+                               }\r
+                       }\r
+               }\r
+       }\r
+}\r
+\r
+static void\r
+UTcXmlTextWriterEndElementP01()\r
+{\r
+       int ret_val;\r
+       xmlTextWriterPtr writer; /* the xmlTextWriterPtr */\r
+       int n_writer;\r
+\r
+       for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {\r
+               writer = gen_xmlTextWriterPtr(n_writer, 0);\r
+               DTS_CHECK_NE_MESSAGE("xmlTextWriterEndElement", (void *)writer, (void *)NULL, "gen_xmlTextWriterPtr Failed");\r
+\r
+               /**\r
+               * @remarks   input1: [N/A, N/A] @n\r
+               *            { xmlTextWriterPtr pointer} => { N/A | int } @n\r
+               */\r
+               ret_val = xmlTextWriterEndElement(writer);\r
+               DTS_CHECK_EQ_MESSAGE("xmlTextWriterEndElement", (void *)ret_val, (void *)-1, "xmlTextWriterEndElement Failed");\r
+\r
+               desret_int(ret_val);\r
+               des_xmlTextWriterPtr(n_writer, writer, 0);\r
+               xmlResetLastError();\r
+       }\r
+}\r
+\r
+static void\r
+UTcXmlTextWriterFullEndElementP01()\r
+{\r
+       int ret_val;\r
+       xmlTextWriterPtr writer; /* the xmlTextWriterPtr*/\r
+       xmlChar *tmp;\r
+\r
+       /**\r
+        * @pre         1) Create a new xmlNewTextWriter.\n\r
+        *                      2) Start a Document.\n\r
+        *                      3) Write a Element and Attribute. \n\r
+        */\r
+\r
+       writer = xmlNewTextWriterFilename(OUTFILE1, 0);\r
+       DTS_CHECK_NE_MESSAGE("xmlTextWriterFullEndElement", (void *)writer, (void *)NULL, "xmlNewTextWriterFilename Failed");\r
+\r
+       ret_val = xmlTextWriterStartDocument(writer, NULL, MY_ENCODING, NULL);\r
+       DTS_CHECK_EQ_MESSAGE("xmlTextWriterFullEndElement", (void *)ret_val, (void *)0, "xmlTextWriterStartDocument Failed");\r
+\r
+       ret_val = xmlTextWriterStartElement(writer, BAD_CAST "EXAMPLE");\r
+       DTS_CHECK_EQ_MESSAGE("xmlTextWriterFullEndElement", (void *)ret_val, (void *)0, "xmlTextWriterStartElement Failed");\r
+\r
+       tmp = ConvertInput("This is a comment with special chars: <äö?",MY_ENCODING);\r
+       ret_val = xmlTextWriterWriteComment(writer, tmp);\r
+       DTS_CHECK_EQ_MESSAGE("xmlTextWriterFullEndElement", (void *)ret_val, (void *)0, "xmlTextWriterWriteComment Failed");\r
+       \r
+       if (tmp != NULL) \r
+               xmlFree(tmp);\r
+\r
+       ret_val = xmlTextWriterStartElement(writer, BAD_CAST "ORDER");\r
+       DTS_CHECK_EQ_MESSAGE("xmlTextWriterFullEndElement", (void *)ret_val, (void *)0, "xmlTextWriterStartElement Failed");\r
+\r\r
+       ret_val = xmlTextWriterStartAttribute(writer ,BAD_CAST "X_ORDER_ID");\r
+       DTS_CHECK_EQ_MESSAGE("xmlTextWriterFullEndElement", (void *)ret_val, (void *)0, "xmlTextWriterStartAttribute Failed");\r
+\r
+       ret_val = xmlTextWriterEndAttribute(writer);\r
+       DTS_CHECK_EQ_MESSAGE("xmlTextWriterFullEndElement", (void *)ret_val, (void *)0, "xmlTextWriterEndAttribute Failed");\r
+\r
+       ret_val = xmlTextWriterEndElement(writer);\r
+       DTS_CHECK_EQ_MESSAGE("xmlTextWriterFullEndElement", (void *)ret_val, (void *)0, "xmlTextWriterEndElement Failed");\r
+\r
+       /**\r
+       * @remarks   input1: [N/A, N/A] @n\r
+       *            { xmlTextWriterPtr pointer} => { N/A | int } @n\r
+       */\r
+       ret_val = xmlTextWriterFullEndElement(writer);\r
+       DTS_CHECK_EQ_MESSAGE("xmlTextWriterFullEndElement", (void *)ret_val, (void *)0, "xmlTextWriterFullEndElement Failed");\r
+       \r
+       if (writer != NULL)\r
+               xmlFreeTextWriter(writer);\r
+       /**\r
+        * @post        Free xmlNewTextWriter pointer\r
+        */\r
+       xmlResetLastError();\r
+}\r
+\r
+static void\r
+UTcXmlTextWriterStartCommentP01()\r
+{\r
+       int ret_val;\r
+       xmlTextWriterPtr writer; /* the xmlTextWriterPtr */\r
+       int n_writer;\r
+\r
+       for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {\r
+               writer = gen_xmlTextWriterPtr(n_writer, 0);\r
+               DTS_CHECK_NE_MESSAGE("xmlTextWriterStartComment", (void *)writer, (void *)NULL, "gen_xmlTextWriterPtr Failed");\r
+               /**\r
+               * @remarks   input1: [N/A, N/A] @n\r
+               *            { xmlTextWriterPtr pointer} => { N/A | int } @n\r
+               */\r
+               ret_val = xmlTextWriterStartComment(writer);\r
+               DTS_CHECK_EQ_MESSAGE("xmlTextWriterStartComment", (void *)ret_val, (void *)NULL, "xmlTextWriterStartComment Failed");\r
+               \r
+               desret_int(ret_val);\r
+               des_xmlTextWriterPtr(n_writer, writer, 0);\r
+               xmlResetLastError();\r
+       }\r
+}\r
+\r
+static void\r
+UTcXmlTextWriterEndCommentP01()\r
+{\r
+       int ret_val;\r
+       xmlTextWriterPtr writer; /* the xmlTextWriterPtr */\r
+       xmlDocPtr doc;\r
+       /**\r
+        * @pre         1) Create a new Document.\n\r
+        *                      2) Start a Document.\n\r
+        *                      3) Write a Comment. \n\r
+        */\r
+       writer = xmlNewTextWriterDoc(&doc, 0);\r
+       DTS_CHECK_NE_MESSAGE("xmlTextWriterEndComment", (void *)writer, (void *)NULL, "xmlNewTextWriterDoc Failed");\r
+\r
+       ret_val = xmlTextWriterStartDocument(writer, NULL, NULL, NULL);\r
+       DTS_CHECK_EQ_MESSAGE("xmlTextWriterEndComment", (void *)ret_val, (void *)0, "xmlTextWriterStartDocument Failed");\r
+\r
+       ret_val = xmlTextWriterStartComment(writer);\r
+       DTS_CHECK_EQ_MESSAGE("xmlTextWriterEndComment", (void *)ret_val, (void *)0, "xmlTextWriterStartComment Failed");\r
+\r
+       /**\r
+       * @remarks   input1: [N/A, N/A] @n\r
+       *            { xmlTextWriterPtr pointer} => { N/A | int } @n\r
+       */\r
+       ret_val = xmlTextWriterEndComment(writer);\r
+       DTS_CHECK_EQ_MESSAGE("xmlTextWriterEndComment", (void *)ret_val, (void *)0, "xmlTextWriterEndComment Failed");\r
+\r
+       xmlTextWriterEndDocument(writer);\r
+       xmlFreeTextWriter(writer);\r
+       /**\r
+        * @post        1) Close the Document. \n\r
+        *                      2) Free xmlNewTextWriter pointer. \n\r
+        */\r
+       xmlResetLastError();\r
+}\r
+\r
+\r
+static void\r
+UTcXmlTextWriterWriteVFormatCommentP01()\r
+{\r
+       //TC have to be written\r
+       DTS_CHECK_EQ_MESSAGE("UTcXmlTextWriterWriteVFormatCommentP01", (void *)1, (void *)1, "UTcXmlTextWriterWriteVFormatCommentP01 Failed");\r
+}\r
+\r
+static void\r
+UTcXmlTextWriterWriteCommentP01()\r
+{\r
+       int ret_val;\r
+       xmlTextWriterPtr writer; /* the xmlTextWriterPtr */\r
+       int n_writer;\r
+       xmlChar * content; /* comment string */\r
+       int n_content;\r
+\r
+       for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {\r
+               for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {\r
+                       writer = gen_xmlTextWriterPtr(n_writer, 0);\r
+                       DTS_CHECK_NE_MESSAGE("xmlTextWriterWriteComment", (void *)writer, (void *)NULL, "gen_xmlTextWriterPtr Failed");\r
+                       \r
+                       content = gen_const_xmlChar_ptr(n_content, 1);\r
+                       DTS_CHECK_NE_MESSAGE("xmlTextWriterWriteComment", (void *)content, (void *)NULL, "gen_const_xmlChar_ptr Failed");\r
+                       \r
+                       /**\r
+                       * @remarks   input1: [N/A, N/A] @n\r
+                       *            { xmlTextWriterPtr pointer , xmlChar pointer} => { N/A | int } @n\r
+                       */\r
+                       ret_val = xmlTextWriterWriteComment(writer, (const xmlChar *)content);\r
+                       DTS_CHECK_EQ_MESSAGE("xmlTextWriterWriteComment", (void *)ret_val, (void *)0, "xmlTextWriterWriteComment Failed");\r
+                       \r
+                       desret_int(ret_val);\r
+                       des_xmlTextWriterPtr(n_writer, writer, 0);\r
+                       des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 1);\r
+                       xmlResetLastError();\r
+               }\r
+       }\r
+}\r
+\r
+static void\r
+UTcXmlTextWriterStartAttributeP01()\r
+{\r
+       int ret_val;\r
+       xmlTextWriterPtr writer; /* the xmlTextWriterPtr*/\r
+//     int n_writer;\r
+       /**\r
+        * @pre         1) Create a new Document.\n\r
+        *                      2) Write a Element. \n\r
+        */\r
+       writer = xmlNewTextWriterFilename(OUTFILE1, 0);\r
+       DTS_CHECK_NE_MESSAGE("xmlTextWriterStartAttribute", (void *)writer, (void *)NULL, "xmlNewTextWriterFilename Failed");\r
+\r
+       ret_val = xmlTextWriterStartElement(writer, BAD_CAST "ORDER");\r
+       DTS_CHECK_EQ_MESSAGE("xmlTextWriterStartAttribute", (void *)ret_val, (void *)0, "xmlTextWriterStartElement Failed");\r
+       \r
+       /**\r
+       * @remarks   input1: [N/A, N/A] @n\r
+       *            { xmlTextWriterPtr pointer ,BAD_CAST "X_ORDER_ID"} => { N/A | int } @n\r
+       */\r
+       ret_val = xmlTextWriterStartAttribute(writer ,BAD_CAST "X_ORDER_ID");\r
+       DTS_CHECK_EQ_MESSAGE("xmlTextWriterStartAttribute", (void *)ret_val, (void *)0, "xmlTextWriterStartAttribute Failed");\r
+\r
+       ret_val = xmlTextWriterEndElement(writer);\r
+       DTS_CHECK_EQ_MESSAGE("xmlTextWriterStartAttribute", (void *)ret_val, (void *)0, "xmlTextWriterEndElement Failed");\r
+\r
+       if (writer != NULL)\r
+       xmlFreeTextWriter(writer);\r
+       /**\r
+        * @post        1) Free xmlNewTextWriter pointer. \n\r
+        */\r
+       xmlResetLastError();\r
+}\r
+\r
+static void\r
+UTcXmlTextWriterStartAttributeNSP01()\r
+{\r
+       int ret_val;\r
+       xmlTextWriterPtr writer; /* the xmlTextWriterPtr */\r
+       xmlChar *tmp;\r
+       /**\r
+        * @pre         1) Create a new Document.\n\r
+        *                      2) Start a Document.\n\r
+        *                      3) Write a Element. \n\r
+        */\r
+       writer = xmlNewTextWriterFilename(OUTFILE1, 0);\r
+       DTS_CHECK_NE_MESSAGE("xmlTextWriterStartAttributeNS", (void *)writer, (void *)NULL, "xmlNewTextWriterFilename Failed");\r
+\r
+       ret_val = xmlTextWriterStartDocument(writer, NULL, MY_ENCODING, NULL);\r
+       DTS_CHECK_EQ_MESSAGE("xmlTextWriterStartAttributeNS", (void *)ret_val, (void *)0, "xmlTextWriterStartDocument Failed");\r
+\r
+       ret_val = xmlTextWriterStartElement(writer, BAD_CAST "EXAMPLE");\r
+       DTS_CHECK_EQ_MESSAGE("xmlTextWriterStartAttributeNS", (void *)ret_val, (void *)0, "xmlTextWriterStartElement Failed");\r
+\r
+       tmp = ConvertInput("This is a comment with special chars: <äö?",MY_ENCODING);\r
+       ret_val = xmlTextWriterWriteComment(writer, tmp);\r
+       DTS_CHECK_EQ_MESSAGE("xmlTextWriterStartAttributeNS", (void *)ret_val, (void *)0, "xmlTextWriterWriteComment Failed");\r
+       \r
+       if (tmp != NULL) xmlFree(tmp);\r
+\r
+       ret_val = xmlTextWriterStartElement(writer, BAD_CAST "ORDER");\r
+       DTS_CHECK_EQ_MESSAGE("xmlTextWriterStartAttributeNS", (void *)ret_val, (void *)0, "xmlTextWriterStartElement Failed");\r
+\r
+       /**\r
+       * @remarks   input1: [N/A, N/A] @n\r
+       *            { xmlTextWriterPtr pointer ,BAD_CAST "X_ORDER_ID", xmlChar pointer } => { N/A | int } @n\r
+       */\r
+       ret_val = xmlTextWriterStartAttributeNS(writer, NULL, BAD_CAST "version",NULL);\r
+       DTS_CHECK_EQ_MESSAGE("xmlTextWriterStartAttributeNS", (void *)ret_val, (void *)0, "xmlTextWriterStartAttributeNS Failed");\r
+\r
+       ret_val = xmlTextWriterEndElement(writer);\r
+       DTS_CHECK_EQ_MESSAGE("xmlTextWriterStartAttributeNS", (void *)ret_val, (void *)0, "xmlTextWriterEndElement Failed");\r
+\r
+       ret_val = xmlTextWriterEndDocument(writer);\r
+       DTS_CHECK_NE_MESSAGE("xmlTextWriterStartAttributeNS", (void *)ret_val, (void *)-1, "xmlTextWriterEndDocument Failed");\r
+\r
+       xmlFreeTextWriter(writer);\r
+       /**\r
+        * @post        1) Close the Document. \n\r
+        *                      2) Free xmlNewTextWriter pointer. \n\r
+        */\r
+       xmlResetLastError();\r
+}\r
+\r
+static void\r
+UTcXmlTextWriterEndAttributeP01()\r
+{\r
+       int ret_val;\r
+       xmlTextWriterPtr writer; /* the xmlTextWriterPtr*/\r
+       xmlChar *tmp;\r
+       /**\r
+        * @pre         1) Create a new File.\n\r
+        *                      2) Start a Document.\n\r
+        *                      3) Write a Element and Attribute. \n\r
+        */\r
+       writer = xmlNewTextWriterFilename(OUTFILE1, 0);\r
+       DTS_CHECK_NE_MESSAGE("xmlTextWriterEndAttribute", (void *)writer, (void *)NULL, "xmlNewTextWriterFilename Failed");\r
+\r
+       ret_val = xmlTextWriterStartDocument(writer, NULL, MY_ENCODING, NULL);\r
+       DTS_CHECK_EQ_MESSAGE("xmlTextWriterEndAttribute", (void *)ret_val, (void *)0, "xmlTextWriterStartDocument Failed");\r
+\r
+       ret_val = xmlTextWriterStartElement(writer, BAD_CAST "EXAMPLE");\r
+       DTS_CHECK_EQ_MESSAGE("xmlTextWriterEndAttribute", (void *)ret_val, (void *)0, "xmlTextWriterStartElement Failed");\r
+\r
+       tmp = ConvertInput("This is a comment with special chars: <äö?",MY_ENCODING);\r
+       ret_val = xmlTextWriterWriteComment(writer, tmp);\r
+       DTS_CHECK_EQ_MESSAGE("xmlTextWriterEndAttribute", (void *)ret_val, (void *)0, "xmlTextWriterWriteComment Failed");\r
+       \r
+       if (tmp != NULL) \r
+               xmlFree(tmp);\r
+\r
+       ret_val = xmlTextWriterStartElement(writer, BAD_CAST "ORDER");\r
+       DTS_CHECK_EQ_MESSAGE("xmlTextWriterEndAttribute", (void *)ret_val, (void *)0, "xmlTextWriterStartElement Failed");\r
+\r
+       ret_val = xmlTextWriterStartAttribute(writer ,BAD_CAST "X_ORDER_ID");\r
+       DTS_CHECK_EQ_MESSAGE("xmlTextWriterEndAttribute", (void *)ret_val, (void *)0, "xmlTextWriterStartAttribute Failed");\r
+\r
+       /**\r
+        * @remarks   input1: [N/A, N/A] @n\r
+        *            { xmlTextWriterPtr pointer}\r
+        *             => { N/A | int } @n\r
+        */\r
+       ret_val = xmlTextWriterEndAttribute(writer);\r
+       DTS_CHECK_EQ_MESSAGE("xmlTextWriterEndAttribute", (void *)ret_val, (void *)0, "xmlTextWriterEndAttribute Failed");\r
+\r
+       ret_val = xmlTextWriterEndElement(writer);\r
+       DTS_CHECK_EQ_MESSAGE("xmlTextWriterEndAttribute", (void *)ret_val, (void *)0, "xmlTextWriterEndElement Failed");\r
+\r
+       xmlFreeTextWriter(writer);\r
+       /**\r
+        * @post        1) Free xmlNewTextWriter pointer. \n\r
+        */\r
+       xmlResetLastError();\r
+}\r
+static void\r
+UTcXmlTextWriterStartPIP01()\r
+{\r
+        int ret_val;\r
+        xmlTextWriterPtr writer; /* the xmlTextWriterPtr */\r
+        int n_writer;\r
+        xmlChar * target; /* PI target */\r
+        int n_target;\r
+\r
+        for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {\r
+                for (n_target = 0;n_target < gen_nb_const_xmlChar_ptr;n_target++) {\r
+                        writer = gen_xmlTextWriterPtr(n_writer, 0);\r
+                       DTS_CHECK_NE_MESSAGE("xmlTextWriterStartPI", (void *)writer, (void *)NULL, "gen_xmlTextWriterPtr Failed");\r
+\r
+                        target = gen_const_xmlChar_ptr(n_target, 1);\r
+                       DTS_CHECK_NE_MESSAGE("xmlTextWriterStartPI", (void *)target, (void *)NULL, "gen_const_xmlChar_ptr Failed");\r
+                       \r
+                        /**\r
+                        * @remarks   input1: [N/A, N/A] @n\r
+                        *            { xmlTextWriterPtr pointer ,xmlChar pointer} => { N/A | int } @n\r
+                        */\r
+                        ret_val = xmlTextWriterStartPI(writer, (const xmlChar *)target);\r
+                       DTS_CHECK_EQ_MESSAGE("xmlTextWriterStartPI", (void *)ret_val, (void *)0, "xmlTextWriterStartPI Failed");\r
+                       \r
+                        desret_int(ret_val);\r
+                        des_xmlTextWriterPtr(n_writer, writer, 0);\r
+                        des_const_xmlChar_ptr(n_target, (const xmlChar *)target, 1);\r
+                        xmlResetLastError();\r
+                }\r
+        }\r
+}\r
+\r
+static void\r
+UTcXmlTextWriterEndPIP01()\r
+{\r
+       int ret_val;\r
+       xmlTextWriterPtr writer; /* the xmlTextWriterPtr */\r
+       int n_writer;\r
+\r
+       for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {\r
+               writer = gen_xmlTextWriterPtr(n_writer, 0);\r
+               DTS_CHECK_NE_MESSAGE("xmlTextWriterEndPI", (void *)writer, (void *)NULL, "gen_xmlTextWriterPtr Failed");\r
+               /**\r
+                * @remarks   input1: [N/A, N/A] @n\r
+                *            { xmlTextWriterPtr pointer} => { N/A | int } @n\r
+                */\r
+               ret_val = xmlTextWriterEndPI(writer);\r
+               DTS_CHECK_EQ_MESSAGE("xmlTextWriterEndPI", (void *)ret_val, (void *)0, "xmlTextWriterEndPI Failed");\r
+               \r
+               desret_int(ret_val);\r
+               des_xmlTextWriterPtr(n_writer, writer, 0);\r
+               xmlResetLastError();\r
+       }\r
+}\r
+\r
+static void\r
+UTcXmlTextWriterStartCDATAP01()\r
+{\r
+       int ret_val;\r
+       xmlTextWriterPtr writer; /* the xmlTextWriterPtr */\r
+       int n_writer;\r
+\r
+       for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {\r
+               writer = gen_xmlTextWriterPtr(n_writer, 0);\r
+               DTS_CHECK_NE_MESSAGE("xmlTextWriterStartCDATA", (void *)writer, (void *)NULL, "gen_xmlTextWriterPtr Failed");\r
+               /**\r
+                * @remarks   input1: [N/A, N/A] @n\r
+                *            { xmlTextWriterPtr pointer} => { N/A | int } @n\r
+                */\r
+               ret_val = xmlTextWriterStartCDATA(writer);\r
+               DTS_CHECK_EQ_MESSAGE("xmlTextWriterStartCDATA", (void *)ret_val, (void *)0, "xmlTextWriterStartCDATA Failed");\r
+               \r
+               desret_int(ret_val);\r
+               des_xmlTextWriterPtr(n_writer, writer, 0);\r
+               xmlResetLastError();\r
+       }\r
+}\r
+\r
+static void\r
+UTcXmlTextWriterEndCDATAP01()\r
+{\r
+       int ret_val;\r
+       xmlTextWriterPtr writer; /* the xmlTextWriterPtr */\r
+       xmlDocPtr doc;\r
+       /**\r
+        * @pre         1) Create a new Document.\n\r
+        *                      2) Start a Document.\n\r
+        *                      3) Write CDATA. \n\r
+        */\r
+       writer = xmlNewTextWriterDoc(&doc, 0);\r
+       DTS_CHECK_NE_MESSAGE("xmlTextWriterEndCDATA", (void *)writer, (void *)NULL, "xmlNewTextWriterDoc Failed");\r
+\r
+       ret_val = xmlTextWriterStartDocument(writer, NULL, NULL, NULL);\r
+       DTS_CHECK_EQ_MESSAGE("xmlTextWriterEndCDATA", (void *)ret_val, (void *)0, "xmlTextWriterStartDocument Failed");\r
+\r
+       ret_val = xmlTextWriterStartCDATA(writer);\r
+       DTS_CHECK_EQ_MESSAGE("xmlTextWriterEndCDATA", (void *)ret_val, (void *)0, "xmlTextWriterStartCDATA Failed");\r
+       /**\r
+        * @remarks   input1: [N/A, N/A] @n\r
+        *            { xmlTextWriterPtr pointer} => { N/A | int } @n\r
+        */\r
+       ret_val = xmlTextWriterEndCDATA(writer);\r
+       DTS_CHECK_EQ_MESSAGE("xmlTextWriterEndCDATA", (void *)ret_val, (void *)0, "xmlTextWriterStartDocument Failed");\r
+\r
+       /**\r
+        * @post        1) Close the Document. \n\r
+        *                      2) Free xmlNewTextWriter pointer. \n\r
+        */\r
+       xmlTextWriterEndDocument(writer);\r
+       xmlFreeTextWriter(writer);\r
+       xmlResetLastError();\r
+}\r
+\r
+\r
+static void\r
+UTcXmlTextWriterStartDTDP01()\r
+{\r
+       int ret_val;\r
+       xmlTextWriterPtr writer; /* the xmlTextWriterPtr */\r
+       int n_writer;\r
+       xmlChar * name; /* the name of the DTD */\r
+       int n_name;\r
+       xmlChar * pubid; /* the public identifier, which is an alternative to the system identifier */\r
+       int n_pubid;\r
+       xmlChar * sysid; /* the system identifier, which is the URI of the DTD */\r
+       int n_sysid;\r
+\r
+       for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {\r
+               for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {\r
+                       for (n_pubid = 0;n_pubid < gen_nb_const_xmlChar_ptr;n_pubid++) {\r
+                               for (n_sysid = 0;n_sysid < gen_nb_const_xmlChar_ptr;n_sysid++) {\r
+                                       writer = gen_xmlTextWriterPtr(n_writer, 0);\r
+                                       DTS_CHECK_NE_MESSAGE("xmlTextWriterStartDTD", (void *)writer, (void *)NULL, "gen_xmlTextWriterPtr Failed");\r
+                                       \r
+                                       name = gen_const_xmlChar_ptr(n_name, 1);\r
+                                       DTS_CHECK_NE_MESSAGE("xmlTextWriterStartDTD", (void *)name, (void *)NULL, "gen_const_xmlChar_ptr Failed");\r
+                                       \r
+                                       pubid = gen_const_xmlChar_ptr(n_pubid, 2);\r
+                                       DTS_CHECK_NE_MESSAGE("xmlTextWriterStartDTD", (void *)pubid, (void *)NULL, "gen_const_xmlChar_ptr Failed");\r
+                                       \r
+                                       sysid = gen_const_xmlChar_ptr(n_sysid, 3);\r
+                                       DTS_CHECK_NE_MESSAGE("xmlTextWriterStartDTD", (void *)sysid, (void *)NULL, "gen_const_xmlChar_ptr Failed");\r
+                                       \r
+                                       /**\r
+                                        * @remarks   input1: [N/A, N/A] @n\r
+                                        *            { xmlTextWriterPtr pointer ,xmlChar pointer ,xmlChar pointer ,xmlChar pointer}\r
+                                        *             => { N/A | int } @n\r
+                                        */\r
+                                       ret_val = xmlTextWriterStartDTD(writer, (const xmlChar *)name, (const xmlChar *)pubid, (const xmlChar *)sysid);\r
+                                       DTS_CHECK_EQ_MESSAGE("xmlTextWriterStartDTD", (void *)ret_val, (void *)0, "xmlTextWriterStartDTD Failed");\r
+                                       \r
+                                       desret_int(ret_val);\r
+                                       des_xmlTextWriterPtr(n_writer, writer, 0);\r
+                                       des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);\r
+                                       des_const_xmlChar_ptr(n_pubid, (const xmlChar *)pubid, 2);\r
+                                       des_const_xmlChar_ptr(n_sysid, (const xmlChar *)sysid, 3);\r
+                                       xmlResetLastError();\r
+                               }\r
+                       }\r
+               }\r
+       }\r
+}\r
+\r
+static void\r
+UTcXmlTextWriterEndDTDP01()\r
+{\r
+       int ret_val;\r
+       xmlTextWriterPtr writer; /* the xmlTextWriterPtr */\r
+       int n_writer;\r
+\r
+       for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {\r
+               writer = gen_xmlTextWriterPtr(n_writer, 0);\r
+               DTS_CHECK_NE_MESSAGE("xmlTextWriterEndDTD", (void *)writer, (void *)NULL, "gen_xmlTextWriterPtr Failed");\r
+                                       \r
+               /**\r
+                * @remarks   input1: [N/A, N/A] @n\r
+                *            { xmlTextWriterPtr pointer ,xmlChar pointer ,xmlChar pointer ,xmlChar pointer}\r
+                *             => { N/A | int } @n\r
+                */\r
+               ret_val = xmlTextWriterEndDTD(writer);\r
+               DTS_CHECK_EQ_MESSAGE("xmlTextWriterEndDTD", (void *)ret_val, (void *)NULL, "xmlTextWriterEndDTD Failed");\r
+               \r
+               desret_int(ret_val);\r
+               des_xmlTextWriterPtr(n_writer, writer, 0);\r
+               xmlResetLastError();\r
+       }\r
+}\r
+\r
+static void\r
+UTcXmlTextWriterStartDTDElementP01()\r
+{\r
+       int ret_val;\r
+       xmlTextWriterPtr writer; /* the xmlTextWriterPtr */\r
+       int n_writer;\r
+       xmlChar * name; /* the name of the DTD element */\r
+       int n_name;\r
+\r
+       for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {\r
+               for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {\r
+                       writer = gen_xmlTextWriterPtr(n_writer, 0);\r
+                       DTS_CHECK_NE_MESSAGE("xmlTextWriterStartDTDElement", (void *)writer, (void *)NULL, "gen_xmlTextWriterPtr Failed");\r
+\r
+                       name = gen_const_xmlChar_ptr(n_name, 1);\r
+                       DTS_CHECK_NE_MESSAGE("xmlTextWriterStartDTDElement", (void *)name, (void *)NULL, "gen_const_xmlChar_ptr Failed");\r
+                       /**\r
+                        * @remarks   input1: [N/A, N/A] @n\r
+                        *            { xmlTextWriterPtr pointer ,xmlChar pointer}\r
+                        *             => { N/A | int } @n\r
+                        */\r
+                       ret_val = xmlTextWriterStartDTDElement(writer, (const xmlChar *)name);\r
+                       DTS_CHECK_EQ_MESSAGE("xmlTextWriterStartDTDElement", (void *)ret_val, (void *)0, "xmlTextWriterStartDTDElement Failed");\r
+                       \r
+                       desret_int(ret_val);\r
+                       des_xmlTextWriterPtr(n_writer, writer, 0);\r
+                       des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);\r
+                       xmlResetLastError();\r
+               }\r
+       }\r
+}\r
+\r
+static void\r
+UTcXmlTextWriterEndDTDElementP01()\r
+{\r
+       int ret_val;\r
+       xmlTextWriterPtr writer; /* the xmlTextWriterPtr */\r
+       xmlDocPtr doc;\r
+       /**\r
+        * @pre         1) Create a new Document.\n\r
+        *                      2) Start a Document.\n\r
+        *                      3) Write DTD Element. \n\r
+        */\r
+       writer = xmlNewTextWriterDoc(&doc, 0);\r
+       DTS_CHECK_NE_MESSAGE("xmlTextWriterEndDTDElement", (void *)writer, (void *)NULL, "xmlNewTextWriterDoc Failed");\r
+\r
+       ret_val = xmlTextWriterStartDocument(writer, NULL, NULL, NULL);\r
+       DTS_CHECK_EQ_MESSAGE("xmlTextWriterEndDTDElement", (void *)ret_val, (void *)0, "xmlTextWriterStartDocument Failed");\r
+\r
+       ret_val = xmlTextWriterWriteDTD(writer, (xmlChar *)"fieldconf", NULL,(xmlChar *)UTSXMLHOME"/mfield.dtd", NULL);\r
+       DTS_CHECK_EQ_MESSAGE("xmlTextWriterEndDTDElement", (void *)ret_val, (void *)0, "xmlTextWriterWriteDTD Failed");\r
+\r
+       ret_val = xmlTextWriterStartDTDElement(writer, BAD_CAST "version");\r
+       DTS_CHECK_EQ_MESSAGE("xmlTextWriterEndDTDElement", (void *)ret_val, (void *)0, "xmlTextWriterStartDTDElement Failed");\r
+\r
+       /**\r
+        * @remarks   input1: [N/A, N/A] @n\r
+        *            { xmlTextWriterPtr pointer ,xmlChar pointer}\r
+        *             => { N/A | int } @n\r
+        */\r
+       ret_val = xmlTextWriterEndDTDElement(writer);\r
+       DTS_CHECK_EQ_MESSAGE("xmlTextWriterEndDTDElement", (void *)ret_val, (void *)0, "xmlTextWriterEndDTDElement Failed");\r
+\r
+       /**\r
+        * @post        1) Close the Document. \n\r
+        *                      2) Free xmlNewTextWriter pointer. \n\r
+        */\r
+       xmlTextWriterEndDocument(writer);\r
+       xmlFreeTextWriter(writer);\r
+       xmlResetLastError();\r
+}\r
+\r
+\r
+static void\r
+UTcXmlTextWriterStartDTDAttlistP01()\r
+{\r
+       int ret_val;\r
+       xmlTextWriterPtr writer; /* the xmlTextWriterPtr */\r
+       int n_writer;\r
+       xmlChar * name; /* the name of the DTD ATTLIST */\r
+       int n_name;\r
+\r
+       for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {\r
+               for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {\r
+                       writer = gen_xmlTextWriterPtr(n_writer, 0);\r
+                       DTS_CHECK_NE_MESSAGE("xmlTextWriterStartDTDAttlist", (void *)writer, (void *)NULL, "gen_xmlTextWriterPtr Failed");\r
+\r
+                       name = gen_const_xmlChar_ptr(n_name, 1);\r
+                       DTS_CHECK_NE_MESSAGE("xmlTextWriterStartDTDAttlist", (void *)name, (void *)NULL, "gen_const_xmlChar_ptr Failed");\r
+\r
+                       /**\r
+                        * @remarks   input1: [N/A, N/A] @n\r
+                        *            { xmlTextWriterPtr pointer ,xmlChar pointer}\r
+                        *             => { N/A | int } @n\r
+                        */\r
+                       ret_val = xmlTextWriterStartDTDAttlist(writer, (const xmlChar *)name);\r
+                       DTS_CHECK_EQ_MESSAGE("xmlTextWriterStartDTDAttlist", (void *)ret_val, (void *)0, "xmlTextWriterStartDTDAttlist Failed");\r
+                       \r
+                       desret_int(ret_val);\r
+                       des_xmlTextWriterPtr(n_writer, writer, 0);\r
+                       des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);\r
+                       xmlResetLastError();\r
+               }\r
+       }\r
+}\r
+\r
+static void\r
+UTcXmlTextWriterEndDTDAttlistP01()\r
+{\r
+       int ret_val;\r
+       xmlTextWriterPtr writer; /* the xmlTextWriterPtr */\r
+       xmlDocPtr doc;\r
+       /**\r
+        * @pre         1) Create a new Document.\n\r
+        *                      2) Start a Document.\n\r
+        *                      3) Write DTD Attlist. \n\r
+        */\r
+       writer = xmlNewTextWriterDoc(&doc, 0);\r
+       DTS_CHECK_NE_MESSAGE("xmlTextWriterEndDTDAttlist", (void *)writer, (void *)NULL, "xmlNewTextWriterDoc Failed");\r
+\r
+       ret_val = xmlTextWriterStartDocument(writer, NULL, NULL, NULL);\r
+       DTS_CHECK_EQ_MESSAGE("xmlTextWriterEndDTDAttlist", (void *)ret_val, (void *)0, "xmlTextWriterStartDocument Failed");\r
+\r
+       ret_val = xmlTextWriterStartDTDAttlist(writer ,BAD_CAST "version");\r
+       DTS_CHECK_EQ_MESSAGE("xmlTextWriterEndDTDAttlist", (void *)ret_val, (void *)NULL, "xmlTextWriterStartDTDAttlist Failed");\r
+       \r
+       /**\r
+        * @remarks   input1: [N/A, N/A] @n\r
+        *            { xmlTextWriterPtr pointer}\r
+        *             => { N/A | int } @n\r
+        */\r
+       ret_val = xmlTextWriterEndDTDAttlist(writer);\r
+       DTS_CHECK_EQ_MESSAGE("xmlTextWriterEndDTDAttlist", (void *)ret_val, (void *)0, "xmlTextWriterEndDTDAttlist Failed");\r
+\r
+       /**\r
+        * @post        1) Close the Document. \n\r
+        *                      2) Free xmlNewTextWriter pointer. \n\r
+        */\r
+       xmlTextWriterEndDocument(writer);\r
+       xmlFreeTextWriter(writer);\r
+       xmlResetLastError();\r
+\r
+}\r
+\r
+static void\r
+UTcXmlTextWriterStartDTDEntityP01()\r
+{\r
+       int ret_val;\r
+       xmlTextWriterPtr writer; /* the xmlTextWriterPtr */\r
+       int n_writer;\r
+       int pe; /* TRUE if this is a parameter entity, FALSE if not */\r
+       int n_pe;\r
+       xmlChar * name; /* the name of the DTD ATTLIST */\r
+       int n_name;\r
+\r
+       for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {\r
+               for (n_pe = 0;n_pe < gen_nb_int;n_pe++) {\r
+                       for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {\r
+                               writer = gen_xmlTextWriterPtr(n_writer, 0);\r
+                               DTS_CHECK_NE_MESSAGE("xmlTextWriterStartDTDEntity", (void *)writer, (void *)NULL, "gen_xmlTextWriterPtr Failed");\r
+                               \r
+                               pe = gen_int(n_pe, 1);\r
+                               //MT_CHECK_MESSAGE2(0 != pe, "gen_int returned NULL");\r
+                               name = gen_const_xmlChar_ptr(n_name, 2);\r
+                               DTS_CHECK_NE_MESSAGE("xmlTextWriterStartDTDEntity", (void *)name, (void *)NULL, "gen_const_xmlChar_ptr Failed");\r
+                               \r
+                               /**\r
+                                * @remarks   input1: [N/A, N/A] @n\r
+                                *            { xmlTextWriterPtr pointer ,(0,1,-1,122) ,xmlChar pointer}\r
+                                *             => { N/A | int } @n\r
+                                */\r
+                               ret_val = xmlTextWriterStartDTDEntity(writer, pe, (const xmlChar *)name);\r
+                               DTS_CHECK_EQ_MESSAGE("xmlTextWriterStartDTDEntity", (void *)ret_val, (void *)0, "xmlTextWriterStartDTDEntity Failed");\r
+                               \r
+                               desret_int(ret_val);\r
+                               des_xmlTextWriterPtr(n_writer, writer, 0);\r
+                               des_int(n_pe, pe, 1);\r
+                               des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 2);\r
+                               xmlResetLastError();\r
+                       }\r
+               }\r
+       }\r
+}\r
+\r
+static void\r
+UTcXmlTextWriterEndDTDEntityP01()\r
+{\r
+       int ret_val;\r
+       xmlTextWriterPtr writer; /* the xmlTextWriterPtr*/\r
+//     xmlChar *tmp;\r
+       xmlDocPtr doc;\r
+       /**\r
+        * @pre         1) Create a new Document.\n\r
+        *                      2) Start a Document.\n\r
+        *                      3) Write DTD Entity. \n\r
+        */\r
+       writer = xmlNewTextWriterDoc(&doc, 0);\r
+       DTS_CHECK_NE_MESSAGE("xmlTextWriterEndDTDEntity", (void *)writer, (void *)NULL, "xmlNewTextWriterDoc Failed");\r
+\r
+       ret_val = xmlTextWriterStartDocument(writer, NULL, NULL, NULL);\r
+       DTS_CHECK_EQ_MESSAGE("xmlTextWriterEndDTDEntity", (void *)ret_val, (void *)0, "xmlTextWriterStartDocument Failed");\r
+\r
+       ret_val = xmlTextWriterWriteDTD(writer, (xmlChar *)"fieldconf", NULL,(xmlChar *)UTSXMLHOME"/mfield.dtd", NULL);\r
+       DTS_CHECK_EQ_MESSAGE("xmlTextWriterEndDTDEntity", (void *)ret_val, (void *)0, "xmlTextWriterWriteDTD Failed");\r
+\r
+       ret_val = xmlTextWriterStartDTDEntity(writer, 1, BAD_CAST "version");\r
+       DTS_CHECK_EQ_MESSAGE("xmlTextWriterEndDTDEntity", (void *)ret_val, (void *)0, "xmlTextWriterStartDTDEntity Failed");\r
+\r
+       /**\r
+        * @remarks   input1: [N/A, N/A] @n\r
+        *            { xmlTextWriterPtr pointer"}\r
+        *             => { N/A | int } @n\r
+        */\r
+       ret_val = xmlTextWriterEndDTDEntity(writer);\r
+       DTS_CHECK_EQ_MESSAGE("xmlTextWriterEndDTDEntity", (void *)ret_val, (void *)0, "xmlTextWriterEndDTDEntity Failed");\r
+\r
+       /**\r
+        * @post        1) Close the Document. \n\r
+        *                      2) Free xmlNewTextWriter pointer. \n\r
+        */\r
+       xmlTextWriterEndDocument(writer);\r
+       xmlFreeTextWriter(writer);\r
+       xmlResetLastError();\r
+}\r
+static void\r
+UTcXmlTextWriterWriteDTDNotationP01()\r
+{\r
+       int ret_val;\r
+       xmlTextWriterPtr writer; /* the xmlTextWriterPtr */\r
+       int n_writer;\r
+       xmlChar * name; /* the name of the xml notation */\r
+       int n_name;\r
+       xmlChar * pubid; /* the public identifier, which is an alternative to the system identifier */\r
+       int n_pubid;\r
+       xmlChar * sysid; /* the system identifier, which is the URI of the DTD */\r
+       int n_sysid;\r
+\r
+       for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {\r
+               for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {\r
+                       for (n_pubid = 0;n_pubid < gen_nb_const_xmlChar_ptr;n_pubid++) {\r
+                               for (n_sysid = 0;n_sysid < gen_nb_const_xmlChar_ptr;n_sysid++) {\r
+                                       writer = gen_xmlTextWriterPtr(n_writer, 0);\r
+                                       DTS_CHECK_NE_MESSAGE("xmlTextWriterWriteDTDNotation", (void *)writer, (void *)NULL, "gen_xmlTextWriterPtr Failed");\r
+                                       \r
+                                       name = gen_const_xmlChar_ptr(n_name, 1);\r
+                                       DTS_CHECK_NE_MESSAGE("xmlTextWriterWriteDTDNotation", (void *)name, (void *)NULL, "gen_const_xmlChar_ptr Failed");\r
+                                       \r
+                                       pubid = gen_const_xmlChar_ptr(n_pubid, 2);\r
+                                       DTS_CHECK_NE_MESSAGE("xmlTextWriterWriteDTDNotation", (void *)pubid, (void *)NULL, "gen_const_xmlChar_ptr Failed");\r
+                                       \r
+                                       sysid = gen_const_xmlChar_ptr(n_sysid, 3);\r
+                                       DTS_CHECK_NE_MESSAGE("xmlTextWriterWriteDTDNotation", (void *)sysid, (void *)NULL, "gen_const_xmlChar_ptr Failed");\r
+                                       \r
+                                       /**\r
+                                        * @remarks   input1: [N/A, N/A] @n\r
+                                        *            { xmlTextWriterPtr pointer ,xmlChar pointer ,xmlChar pointer ,xmlChar pointer}\r
+                                        *             => { N/A | int } @n\r
+                                        */\r
+                                       ret_val = xmlTextWriterWriteDTDNotation(writer, (const xmlChar *)name, (const xmlChar *)pubid, (const xmlChar *)sysid);\r
+                                       DTS_CHECK_EQ_MESSAGE("xmlTextWriterWriteDTDNotation", (void *)ret_val, (void *)0, "xmlTextWriterWriteDTDNotation Failed");\r
+                                       \r
+                                       desret_int(ret_val);\r
+                                       des_xmlTextWriterPtr(n_writer, writer, 0);\r
+                                       des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);\r
+                                       des_const_xmlChar_ptr(n_pubid, (const xmlChar *)pubid, 2);\r
+                                       des_const_xmlChar_ptr(n_sysid, (const xmlChar *)sysid, 3);\r
+                                       xmlResetLastError();\r
+                               }\r
+                       }\r
+               }\r
+       }\r
+}\r
+\r
+static void\r
+UTcXmlTextWriterSetIndentP01()\r
+{\r
+       int ret_val;\r
+       xmlTextWriterPtr writer; /* the xmlTextWriterPtr */\r
+       int n_writer;\r
+       int indent; /* do indentation? */\r
+       int n_indent;\r
+\r
+       for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {\r
+               for (n_indent = 0;n_indent < gen_nb_int;n_indent++) {\r
+                       writer = gen_xmlTextWriterPtr(n_writer, 0);\r
+                       DTS_CHECK_NE_MESSAGE("xmlTextWriterSetIndent", (void *)writer, (void *)NULL, "gen_xmlTextWriterPtr Failed");\r
+                       \r
+                       indent = gen_int(n_indent, 1);\r
+                       /**\r
+                        * @remarks   input1: [N/A, N/A] @n\r
+                        *            { xmlTextWriterPtr pointer ,(0,1,-1,122)} => { N/A | int } @n\r
+                        */\r
+                       ret_val = xmlTextWriterSetIndent(writer, indent);\r
+                       DTS_CHECK_EQ_MESSAGE("xmlTextWriterSetIndent", (void *)ret_val, (void *)0, "xmlTextWriterSetIndent Failed");\r
+                       \r
+                       desret_int(ret_val);\r
+                       des_xmlTextWriterPtr(n_writer, writer, 0);\r
+                       des_int(n_indent, indent, 1);\r
+                       xmlResetLastError();\r
+               }\r
+       }\r
+}\r
+\r
+static void\r
+UTcXmlTextWriterSetIndentStringP01()\r
+{\r
+       int ret_val;\r
+       xmlTextWriterPtr writer; /* the xmlTextWriterPtr */\r
+       int n_writer;\r
+       xmlChar * str; /* the xmlChar string */\r
+       int n_str;\r
+\r
+       for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {\r
+               for (n_str = 0;n_str < gen_nb_const_xmlChar_ptr;n_str++) {\r
+                       writer = gen_xmlTextWriterPtr(n_writer, 0);\r
+                       DTS_CHECK_NE_MESSAGE("xmlTextWriterSetIndentString", (void *)writer, (void *)NULL, "gen_xmlTextWriterPtr Failed");\r
+                       \r
+                       str = gen_const_xmlChar_ptr(n_str, 1);\r
+                       DTS_CHECK_NE_MESSAGE("xmlTextWriterSetIndentString", (void *)str, (void *)NULL, "gen_const_xmlChar_ptr Failed");\r
+                       \r
+                       /**\r
+                        * @remarks   input1: [N/A, N/A] @n\r
+                        *            { xmlTextWriterPtr pointer ,xmlChar pointer} => { N/A | int } @n\r
+                        */\r
+                       ret_val = xmlTextWriterSetIndentString(writer, (const xmlChar *)str);\r
+                       DTS_CHECK_EQ_MESSAGE("xmlTextWriterSetIndentString", (void *)ret_val, (void *)0, "xmlTextWriterSetIndentString Failed");\r
+                       \r
+                       desret_int(ret_val);\r
+                       des_xmlTextWriterPtr(n_writer, writer, 0);\r
+                       des_const_xmlChar_ptr(n_str, (const xmlChar *)str, 1);\r
+                       xmlResetLastError();\r
+               }\r
+       }\r
+}\r
+\r
+static void\r
+UTcXmlTextWriterFlushP01()\r
+{\r
+       int ret_val;\r
+       xmlTextWriterPtr writer; /* the xmlTextWriterPtr */\r
+       int n_writer;\r
+\r
+       for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {\r
+               writer = gen_xmlTextWriterPtr(n_writer, 0);\r
+               DTS_CHECK_NE_MESSAGE("xmlTextWriterFlush", (void *)writer, (void *)NULL, "gen_xmlTextWriterPtr Failed");\r
+                       \r
+               /**\r
+                * @remarks   input1: [N/A, N/A] @n\r
+                *            { xmlTextWriterPtr pointer} => { N/A | int } @n\r
+                */\r
+               ret_val = xmlTextWriterFlush(writer);\r
+               DTS_CHECK_EQ_MESSAGE("xmlTextWriterFlush", (void *)ret_val, (void *)0, "xmlTextWriterFlush Failed");\r
+               \r
+               desret_int(ret_val);\r
+               des_xmlTextWriterPtr(n_writer, writer, 0);\r
+               xmlResetLastError();\r
+       }\r
+}\r
+\r
+static void\r
+UTcXmlTextWriterWriteElementP01()\r
+{\r
+       int ret_val;\r
+       xmlTextWriterPtr writer; /* the xmlTextWriterPtr */\r
+       int n_writer;\r
+       xmlChar * name; /* element name */\r
+       int n_name;\r
+       xmlChar * content; /* element content */\r
+       int n_content;\r
+\r
+       for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {\r
+               for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {\r
+                       for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {\r
+                               writer = gen_xmlTextWriterPtr(n_writer, 0);\r
+                               DTS_CHECK_NE_MESSAGE("xmlTextWriterWriteElement", (void *)writer, (void *)NULL, "gen_xmlTextWriterPtr Failed");\r
+\r
+                               name = gen_const_xmlChar_ptr(n_name, 1);\r
+                               DTS_CHECK_NE_MESSAGE("xmlTextWriterWriteElement", (void *)name, (void *)NULL, "gen_const_xmlChar_ptr Failed");\r
+                               \r
+                               content = gen_const_xmlChar_ptr(n_content, 2);\r
+                               DTS_CHECK_NE_MESSAGE("xmlTextWriterWriteElement", (void *)content, (void *)NULL, "gen_const_xmlChar_ptr Failed");\r
+                               \r
+                               /**\r
+                                * @remarks   input1: [N/A, N/A] @n\r
+                                *            { xmlTextWriterPtr pointer ,xmlChar pointer ,xmlChar pointer}\r
+                                *             => { N/A | int } @n\r
+                                */\r
+                               ret_val = xmlTextWriterWriteElement(writer, (const xmlChar *)name, (const xmlChar *)content);\r
+                               DTS_CHECK_EQ_MESSAGE("xmlTextWriterWriteElement", (void *)ret_val, (void *)0, "xmlTextWriterWriteElement Failed");\r
+                               \r
+                               desret_int(ret_val);\r
+                               des_xmlTextWriterPtr(n_writer, writer, 0);\r
+                               des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);\r
+                               des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 2);\r
+                               xmlResetLastError();\r
+                       }\r
+               }\r
+       }\r
+}\r
+\r
+static void\r
+UTcXmlTextWriterWriteElementNSP01()\r
+{\r
+       int ret_val;\r
+       xmlTextWriterPtr writer; /* the xmlTextWriterPtr */\r
+       int n_writer;\r
+       xmlChar * prefix; /* namespace prefix */\r
+       int n_prefix;\r
+       xmlChar * name; /* element local name */\r
+       int n_name;\r
+       xmlChar * namespaceURI; /* namespace URI */\r
+       int n_namespaceURI;\r
+       xmlChar * content; /* element content */\r
+       int n_content;\r
+\r
+       for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {\r
+               for (n_prefix = 0;n_prefix < gen_nb_const_xmlChar_ptr;n_prefix++) {\r
+                       for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {\r
+                               for (n_namespaceURI = 0;n_namespaceURI < gen_nb_const_xmlChar_ptr;n_namespaceURI++) {\r
+                                       for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {\r
+                                               writer = gen_xmlTextWriterPtr(n_writer, 0);\r
+                                               DTS_CHECK_NE_MESSAGE("xmlTextWriterWriteElementNS", (void *)writer, (void *)NULL, "gen_xmlTextWriterPtr Failed");\r
+                               \r
+                                               prefix = gen_const_xmlChar_ptr(n_prefix, 1);\r
+                                               DTS_CHECK_NE_MESSAGE("xmlTextWriterWriteElementNS", (void *)prefix, (void *)NULL, "gen_const_xmlChar_ptr Failed");\r
+                                               \r
+                                               name = gen_const_xmlChar_ptr(n_name, 2);\r
+                                               DTS_CHECK_NE_MESSAGE("xmlTextWriterWriteElementNS", (void *)name, (void *)NULL, "gen_const_xmlChar_ptr Failed");\r
+                                               \r
+                                               namespaceURI = gen_const_xmlChar_ptr(n_namespaceURI, 3);\r
+                                               DTS_CHECK_NE_MESSAGE("xmlTextWriterWriteElementNS", (void *)namespaceURI, (void *)NULL, "gen_const_xmlChar_ptr Failed");\r
+                                               \r
+                                               content = gen_const_xmlChar_ptr(n_content, 4);\r
+                                               DTS_CHECK_NE_MESSAGE("xmlTextWriterWriteElementNS", (void *)content, (void *)NULL, "gen_const_xmlChar_ptr Failed");\r
+                                               \r
+                                               /**\r
+                                                * @remarks   input1: [N/A, N/A] @n\r
+                                                *            { xmlTextWriterPtr pointer ,xmlChar pointer ,xmlChar pointer ,xmlChar pointer ,xmlChar pointer}\r
+                                                *             => { N/A | int } @n\r
+                                                */\r
+                                               ret_val = xmlTextWriterWriteElementNS(writer, (const xmlChar *)prefix, (const xmlChar *)name, (const xmlChar *)namespaceURI, (const xmlChar *)content);\r
+                                               DTS_CHECK_EQ_MESSAGE("xmlTextWriterWriteElementNS", (void *)ret_val, (void *)0, "xmlTextWriterWriteElementNS Failed");\r
+                                               \r
+                                               desret_int(ret_val);\r
+                                               des_xmlTextWriterPtr(n_writer, writer, 0);\r
+                                               des_const_xmlChar_ptr(n_prefix, (const xmlChar *)prefix, 1);\r
+                                               des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 2);\r
+                                               des_const_xmlChar_ptr(n_namespaceURI, (const xmlChar *)namespaceURI, 3);\r
+                                               des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 4);\r
+                                               xmlResetLastError();\r
+                                       }\r
+                               }\r
+                       }\r
+               }\r
+       }\r
+}\r
+\r
+static void\r
+UTcXmlTextWriterWriteRawLenP01()\r
+{\r
+       int ret_val;\r
+       xmlTextWriterPtr writer; /* the xmlTextWriterPtr */\r
+       int n_writer;\r
+       xmlChar * content; /* text string */\r
+       int n_content;\r
+       int len; /* length of the text string */\r
+       int n_len;\r
+\r
+       for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {\r
+               for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {\r
+                       for (n_len = 0;n_len < gen_nb_int;n_len++) {\r
+                               writer = gen_xmlTextWriterPtr(n_writer, 0);\r
+                               DTS_CHECK_NE_MESSAGE("xmlTextWriterWriteRawLen", (void *)writer, (void *)NULL, "gen_xmlTextWriterPtr Failed");\r
+                                               \r
+                               content = gen_const_xmlChar_ptr(n_content, 1);\r
+                               DTS_CHECK_NE_MESSAGE("xmlTextWriterWriteRawLen", (void *)content, (void *)NULL, "gen_const_xmlChar_ptr Failed");\r
+                               \r
+                               len = gen_int(n_len, 2);\r
+                               //MT_CHECK_MESSAGE2(0 != len, "gen_int returned NULL");\r
+                               /**\r
+                                * @remarks   input1: [N/A, N/A] @n\r
+                                *            { xmlTextWriterPtr pointer ,xmlChar pointer ,(0,1,-1,122)}\r
+                                *            => { N/A | int } @n\r
+                                */\r
+                               ret_val = xmlTextWriterWriteRawLen(writer, (const xmlChar *)content, len);\r
+                               DTS_CHECK_EQ_MESSAGE("xmlTextWriterWriteRawLen", (void *)ret_val, (void *)0, "xmlTextWriterWriteRawLen Failed");\r
+                               \r
+                               desret_int(ret_val);\r
+                               des_xmlTextWriterPtr(n_writer, writer, 0);\r
+                               des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 1);\r
+                               des_int(n_len, len, 2);\r
+                               xmlResetLastError();\r
+                       }\r
+               }\r
+       }\r
+}\r
+\r
+static void\r
+UTcXmlTextWriterWriteRawP01()\r
+{\r
+       int ret_val;\r
+       xmlTextWriterPtr writer; /* the xmlTextWriterPtr */\r
+       int n_writer;\r
+       xmlChar * content; /* text string */\r
+       int n_content;\r
+\r
+       for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {\r
+               for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {\r
+                       writer = gen_xmlTextWriterPtr(n_writer, 0);\r
+                       DTS_CHECK_NE_MESSAGE("xmlTextWriterWriteRaw", (void *)writer, (void *)NULL, "gen_xmlTextWriterPtr Failed");\r
+                               \r
+                       content = gen_const_xmlChar_ptr(n_content, 1);\r
+                       DTS_CHECK_NE_MESSAGE("xmlTextWriterWriteRaw", (void *)content, (void *)NULL, "gen_const_xmlChar_ptr Failed");\r
+                       \r
+                       /**\r
+                        * @remarks   input1: [N/A, N/A] @n\r
+                        *            { xmlTextWriterPtr pointer ,xmlChar pointer}\r
+                        *            => { N/A | int } @n\r
+                        */\r
+                       ret_val = xmlTextWriterWriteRaw(writer, (const xmlChar *)content);\r
+                       DTS_CHECK_EQ_MESSAGE("xmlTextWriterWriteRaw", (void *)ret_val, (void *)0, "xmlTextWriterWriteRaw Failed");\r
+                       \r
+                       desret_int(ret_val);\r
+                       des_xmlTextWriterPtr(n_writer, writer, 0);\r
+                       des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 1);\r
+                       xmlResetLastError();\r
+               }\r
+       }\r
+}\r
+\r
+\r
+static void\r
+UTcXmlTextWriterWriteStringP01()\r
+{\r
+       int ret_val;\r
+       xmlTextWriterPtr writer; /* the xmlTextWriterPtr */\r
+       int n_writer;\r
+       xmlChar * content; /* text string */\r
+       int n_content;\r
+\r
+       for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {\r
+               for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {\r
+                       writer = gen_xmlTextWriterPtr(n_writer, 0);\r
+                       DTS_CHECK_NE_MESSAGE("xmlTextWriterWriteString", (void *)writer, (void *)NULL, "gen_xmlTextWriterPtr Failed");\r
+                       \r
+                       content = gen_const_xmlChar_ptr(n_content, 1);\r
+                       DTS_CHECK_NE_MESSAGE("xmlTextWriterWriteString", (void *)content, (void *)NULL, "gen_const_xmlChar_ptr Failed");\r
+                       \r
+                       /**\r
+                        * @remarks   input1: [N/A, N/A] @n\r
+                        *            { xmlTextWriterPtr pointer ,xmlChar pointer}\r
+                        *            => { N/A | int } @n\r
+                        */\r
+                       ret_val = xmlTextWriterWriteString(writer, (const xmlChar *)content);\r
+                       DTS_CHECK_EQ_MESSAGE("xmlTextWriterWriteString", (void *)ret_val, (void *)NULL, "xmlTextWriterWriteString Failed");\r
+                       \r
+                       desret_int(ret_val);\r
+                       des_xmlTextWriterPtr(n_writer, writer, 0);\r
+                       des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 1);\r
+                       xmlResetLastError();\r
+               }\r
+       }\r
+}\r
+\r
+static void\r
+UTcXmlTextWriterWriteBase64P01()\r
+{\r
+       int ret_val;\r
+       xmlTextWriterPtr writer; /* the xmlTextWriterPtr */\r
+       int n_writer;\r
+       char * data; /* binary data */\r
+       int n_data;\r
+       int start; /* the position within the data of the first byte to encode */\r
+       int n_start;\r
+       int len; /* the number of bytes to encode */\r
+       int n_len;\r
+\r
+       for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {\r
+               for (n_data = 0;n_data < gen_nb_const_char_ptr;n_data++) {\r
+                       for (n_start = 0;n_start < gen_nb_int;n_start++) {\r
+                               for (n_len = 0;n_len < gen_nb_int;n_len++) {\r
+                                       writer = gen_xmlTextWriterPtr(n_writer, 0);\r
+                                       DTS_CHECK_NE_MESSAGE("xmlTextWriterWriteBase64", (void *)writer, (void *)NULL, "gen_xmlTextWriterPtr Failed");\r
+                       \r
+                                       data = gen_const_char_ptr(n_data, 1);\r
+                                       DTS_CHECK_NE_MESSAGE("xmlTextWriterWriteBase64", (void *)data, (void *)NULL, "gen_const_char_ptr Failed");\r
+                       \r
+                                       start = gen_int(n_start, 2);\r
+                                       //MT_CHECK_MESSAGE2(0 != start, "gen_int returned NULL");\r
+                                       len = gen_int(n_len, 3);\r
+                                       //MT_CHECK_MESSAGE2(0 != len, "gen_int returned NULL");\r
+                                       /**\r
+                                        * @remarks   input1: [N/A, N/A] @n\r
+                                        *            { xmlTextWriterPtr pointer ,("foo",<foo/>","test/ent2") ,(0,1,-1,122) ,(0,1,-1,122)}\r
+                                        *             => { N/A | int } @n\r
+                                        */\r
+                                       ret_val = xmlTextWriterWriteBase64(writer, (const char *)data, start, len);\r
+                                       DTS_CHECK_EQ_MESSAGE("xmlTextWriterWriteBase64", (void *)ret_val, (void *)0, "xmlTextWriterWriteBase64 Failed");\r
+                                       \r
+                                       desret_int(ret_val);\r
+                                       des_xmlTextWriterPtr(n_writer, writer, 0);\r
+                                       des_const_char_ptr(n_data, (const char *)data, 1);\r
+                                       des_int(n_start, start, 2);\r
+                                       des_int(n_len, len, 3);\r
+                                       xmlResetLastError();\r
+                               }\r
+                       }\r
+               }\r
+       }\r
+}\r
+\r
+static void\r
+UTcXmlTextWriterWriteBinHexP01()\r
+{\r
+       int ret_val;\r
+       xmlTextWriterPtr writer; /* the xmlTextWriterPtr */\r
+       int n_writer;\r
+       char * data; /* binary data */\r
+       int n_data;\r
+       int start; /* the position within the data of the first byte to encode */\r
+       int n_start;\r
+       int len; /* the number of bytes to encode */\r
+       int n_len;\r
+\r
+       for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {\r
+               for (n_data = 0;n_data < gen_nb_const_char_ptr;n_data++) {\r
+                       for (n_start = 0;n_start < gen_nb_int;n_start++) {\r
+                               for (n_len = 0;n_len < gen_nb_int;n_len++) {\r
+                                       writer = gen_xmlTextWriterPtr(n_writer, 0);\r
+                                       DTS_CHECK_NE_MESSAGE("xmlTextWriterWriteBinHex", (void *)writer, (void *)NULL, "gen_xmlTextWriterPtr Failed");\r
+                                       \r
+                                       data = gen_const_char_ptr(n_data, 1);\r
+                                       DTS_CHECK_NE_MESSAGE("xmlTextWriterWriteBinHex", (void *)data, (void *)NULL, "gen_const_char_ptr Failed");\r
+                                       \r
+                                       start = gen_int(n_start, 2);\r
+                                       //MT_CHECK_MESSAGE2(0 != start, "gen_int returned NULL");\r
+                                       len = gen_int(n_len, 3);\r
+                                       //MT_CHECK_MESSAGE2(0 != len, "gen_int returned NULL");\r
+                                       /**\r
+                                        * @remarks   input1: [N/A, N/A] @n\r
+                                        *            { xmlTextWriterPtr pointer ,("foo",<foo/>","test/ent2") ,(0,1,-1,122) ,(0,1,-1,122)}\r
+                                        *             => { N/A | int } @n\r
+                                        */\r
+                                       ret_val = xmlTextWriterWriteBinHex(writer, (const char *)data, start, len);\r
+                                       DTS_CHECK_EQ_MESSAGE("xmlTextWriterWriteBinHex", (void *)ret_val, (void *)0, "xmlTextWriterWriteBinHex Failed");\r
+                                       \r
+                                       desret_int(ret_val);\r
+                                       des_xmlTextWriterPtr(n_writer, writer, 0);\r
+                                       des_const_char_ptr(n_data, (const char *)data, 1);\r
+                                       des_int(n_start, start, 2);\r
+                                       des_int(n_len, len, 3);\r
+                                       xmlResetLastError();\r
+                               }\r
+                       }\r
+               }\r
+       }\r
+}\r
+\r
+static void\r
+UTcXmlTextWriterWriteAttributeP01()\r
+{\r
+       int ret_val;\r
+       xmlTextWriterPtr writer; /* the xmlTextWriterPtr */\r
+       xmlChar *tmp;\r
+       /**\r
+        * @pre         1) Create a new Document.\n\r
+        *                      2) Start a Document.\n\r
+        *                      3) Write Element. \n\r
+        */\r
+       writer = xmlNewTextWriterFilename(OUTFILE1, 0);\r
+       DTS_CHECK_NE_MESSAGE("xmlTextWriterWriteAttribute", (void *)writer, (void *)NULL, "xmlNewTextWriterFilename Failed");\r
+\r
+       ret_val = xmlTextWriterStartDocument(writer, NULL, MY_ENCODING, NULL);\r
+       DTS_CHECK_EQ_MESSAGE("xmlTextWriterWriteAttribute", (void *)ret_val, (void *)0, "xmlTextWriterStartDocument Failed");\r
+\r
+       ret_val = xmlTextWriterStartElement(writer, BAD_CAST "EXAMPLE");\r
+       DTS_CHECK_EQ_MESSAGE("xmlTextWriterWriteAttribute", (void *)ret_val, (void *)0, "xmlTextWriterStartElement Failed");\r
+\r
+       tmp = ConvertInput("This is a comment with special chars: <äö?",MY_ENCODING);\r
+       ret_val = xmlTextWriterWriteComment(writer, tmp);\r
+       DTS_CHECK_EQ_MESSAGE("xmlTextWriterWriteAttribute", (void *)ret_val, (void *)0, "xmlTextWriterWriteComment Failed");\r
+       \r
+       if (tmp != NULL) xmlFree(tmp);\r
+\r
+       ret_val = xmlTextWriterStartElement(writer, BAD_CAST "ORDER");\r
+       DTS_CHECK_EQ_MESSAGE("xmlTextWriterWriteAttribute", (void *)ret_val, (void *)0, "xmlTextWriterStartElement Failed");\r
+\r
+       /**\r
+       * @remarks   input1: [N/A, N/A] @n\r
+       *            { xmlTextWriterPtr pointer ,BAD_CAST "X_ORDER_ID", xmlChar pointer } => { N/A | int } @n\r
+       */\r
+       ret_val = xmlTextWriterWriteAttribute(writer, BAD_CAST "version",BAD_CAST "1.0");\r
+       DTS_CHECK_EQ_MESSAGE("xmlTextWriterWriteAttribute", (void *)ret_val, (void *)0, "xmlTextWriterWriteAttribute Failed");\r
+\r
+       ret_val = xmlTextWriterEndElement(writer);\r
+       DTS_CHECK_EQ_MESSAGE("xmlTextWriterWriteAttribute", (void *)ret_val, (void *)0, "xmlTextWriterEndElement Failed");\r
+\r
+       ret_val = xmlTextWriterEndDocument(writer);\r
+       DTS_CHECK_NE_MESSAGE("xmlTextWriterWriteAttribute", (void *)ret_val, (void *)-1, "xmlTextWriterEndDocument Failed");\r
+       /**\r
+        * @post 1) Close the Document. \n\r
+        *       2) Free  xmlTextWriter pointer. \n\r
+        */\r
+       xmlFreeTextWriter(writer);\r
+       xmlResetLastError();\r
+}\r
+\r
+static void\r
+UTcXmlTextWriterWriteAttributeNSP01()\r
+{\r
+       int ret_val;\r
+       xmlTextWriterPtr writer; /* the xmlTextWriterPtr*/\r
+       xmlChar *tmp;\r
+       /**\r
+        * @pre         1) Create a new Document.\n\r
+        *                      2) Start a Document.\n\r
+        *                      3) Write Element. \n\r
+        */\r
+\r
+       writer = xmlNewTextWriterFilename(OUTFILE1, 0);\r
+       DTS_CHECK_NE_MESSAGE("xmlTextWriterWriteAttributeNS", (void *)writer, (void *)NULL, "xmlNewTextWriterFilename Failed");\r
+\r
+       ret_val = xmlTextWriterStartDocument(writer, NULL, MY_ENCODING, NULL);\r
+       DTS_CHECK_EQ_MESSAGE("xmlTextWriterWriteAttributeNS", (void *)ret_val, (void *)0, "xmlTextWriterStartDocument Failed");\r
+\r
+       ret_val = xmlTextWriterStartElement(writer, BAD_CAST "EXAMPLE");\r
+       DTS_CHECK_EQ_MESSAGE("xmlTextWriterWriteAttributeNS", (void *)ret_val, (void *)0, "xmlTextWriterStartElement Failed");\r
+\r
+       tmp = ConvertInput("This is a comment with special chars: <äö?",MY_ENCODING);\r
+       ret_val = xmlTextWriterWriteComment(writer, tmp);\r
+       DTS_CHECK_EQ_MESSAGE("xmlTextWriterWriteAttributeNS", (void *)ret_val, (void *)0, "xmlTextWriterWriteComment Failed");\r
+       \r
+       if (tmp != NULL) \r
+               xmlFree(tmp);\r
+\r
+       ret_val = xmlTextWriterStartElement(writer, BAD_CAST "ORDER");\r
+       DTS_CHECK_EQ_MESSAGE("xmlTextWriterWriteAttributeNS", (void *)ret_val, (void *)0, "xmlTextWriterStartElement Failed");\r
+\r
+       ret_val = xmlTextWriterWriteAttributeNS(writer, NULL, BAD_CAST "version", NULL , BAD_CAST "1.0");\r
+       DTS_CHECK_EQ_MESSAGE("xmlTextWriterWriteAttributeNS", (void *)ret_val, (void *)0, "xmlTextWriterWriteAttributeNS Failed");\r
+\r
+       ret_val = xmlTextWriterEndElement(writer);\r
+       DTS_CHECK_EQ_MESSAGE("xmlTextWriterWriteAttributeNS", (void *)ret_val, (void *)0, "xmlTextWriterEndElement Failed");\r
+\r
+       ret_val = xmlTextWriterEndDocument(writer);\r
+       DTS_CHECK_NE_MESSAGE("xmlTextWriterWriteAttributeNS", (void *)ret_val, (void *)-1, "xmlTextWriterEndDocument Failed");\r
+\r
+       /**\r
+        * @post 1) Close the Document. \n\r
+        *       2) Free  xmlTextWriter pointer. \n\r
+        */\r
+       xmlFreeTextWriter(writer);\r
+       xmlResetLastError();\r
+}\r
+\r
+static void\r
+UTcXmlTextWriterWritePIP01()\r
+{\r
+    int ret_val;\r
+    xmlTextWriterPtr writer; /* the xmlTextWriterPtr */\r
+    int n_writer;\r
+    xmlChar * target; /* PI target */\r
+    int n_target;\r
+    xmlChar * content; /* PI content */\r
+    int n_content;\r
+\r
+    for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {\r
+               for (n_target = 0;n_target < gen_nb_const_xmlChar_ptr;n_target++) {\r
+                       for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {\r
+                               writer = gen_xmlTextWriterPtr(n_writer, 0);\r
+                               DTS_CHECK_NE_MESSAGE("xmlTextWriterWritePI", (void *)writer, (void *)NULL, "gen_xmlTextWriterPtr Failed");\r
+       \r
+                               target = gen_const_xmlChar_ptr(n_target, 1);\r
+                               DTS_CHECK_NE_MESSAGE("xmlTextWriterWritePI", (void *)target, (void *)NULL, "gen_const_xmlChar_ptr Failed");\r
+                               \r
+                               content = gen_const_xmlChar_ptr(n_content, 2);\r
+                               DTS_CHECK_NE_MESSAGE("xmlTextWriterWritePI", (void *)content, (void *)NULL, "gen_const_xmlChar_ptr Failed");\r
+                               \r
+                               /**\r
+                                * @remarks   input1: [N/A, N/A] @n\r
+                                *            { xmlTextWriterPtr pointer ,xmlChar pointer ,xmlChar pointer}\r
+                                *             => { N/A | int } @n\r
+                                */\r
+                               ret_val = xmlTextWriterWritePI(writer, (const xmlChar *)target, (const xmlChar *)content);\r
+                               DTS_CHECK_EQ_MESSAGE("xmlTextWriterWritePI", (void *)ret_val, (void *)0, "xmlTextWriterWritePI Failed");\r
+                               \r
+                               desret_int(ret_val);\r
+                               des_xmlTextWriterPtr(n_writer, writer, 0);\r
+                               des_const_xmlChar_ptr(n_target, (const xmlChar *)target, 1);\r
+                               des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 2);\r
+                               xmlResetLastError();\r
+                       }\r
+               }\r
+    }\r
+}\r
+\r
+static void\r
+UTcXmlTextWriterWriteCDATAP01()\r
+{\r
+    int ret_val;\r
+    xmlTextWriterPtr writer; /* the xmlTextWriterPtr */\r
+    int n_writer;\r
+    xmlChar * content; /* CDATA content */\r
+    int n_content;\r
+\r
+    for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {\r
+               for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {\r
+                       writer = gen_xmlTextWriterPtr(n_writer, 0);\r
+                       DTS_CHECK_NE_MESSAGE("xmlTextWriterWriteCDATA", (void *)writer, (void *)NULL, "gen_xmlTextWriterPtr Failed");\r
+                       \r
+                       content = gen_const_xmlChar_ptr(n_content, 1);\r
+                       DTS_CHECK_NE_MESSAGE("xmlTextWriterWritePI", (void *)content, (void *)NULL, "gen_const_xmlChar_ptr Failed");\r
+                               \r
+                       /**\r
+                        * @remarks   input1: [N/A, N/A] @n\r
+                        *            { xmlTextWriterPtr pointer ,xmlChar pointer}\r
+                        *             => { N/A | int } @n\r
+                        */\r
+                       ret_val = xmlTextWriterWriteCDATA(writer, (const xmlChar *)content);\r
+                       DTS_CHECK_EQ_MESSAGE("xmlTextWriterWritePI", (void *)ret_val, (void *)0, "xmlTextWriterWriteCDATA Failed");\r
+                       \r
+                       desret_int(ret_val);\r
+                       des_xmlTextWriterPtr(n_writer, writer, 0);\r
+                       des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 1);\r
+                       xmlResetLastError();\r
+               }\r
+    }\r
+}\r
+\r
+static void\r
+UTcXmlTextWriterWriteDTDP01()\r
+{\r
+    int ret_val;\r
+    xmlTextWriterPtr writer; /* the xmlTextWriterPtr */\r
+    int n_writer;\r
+    xmlChar * name; /* the name of the DTD */\r
+    int n_name;\r
+    xmlChar * pubid; /* the public identifier, which is an alternative to the system identifier */\r
+    int n_pubid;\r
+    xmlChar * sysid; /* the system identifier, which is the URI of the DTD */\r
+    int n_sysid;\r
+    xmlChar * subset; /* string content of the DTD */\r
+    int n_subset;\r
+\r
+    for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {\r
+               for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {\r
+                       for (n_pubid = 0;n_pubid < gen_nb_const_xmlChar_ptr;n_pubid++) {\r
+                               for (n_sysid = 0;n_sysid < gen_nb_const_xmlChar_ptr;n_sysid++) {\r
+                                       for (n_subset = 0;n_subset < gen_nb_const_xmlChar_ptr;n_subset++) {\r
+                                               writer = gen_xmlTextWriterPtr(n_writer, 0);\r
+                                               DTS_CHECK_NE_MESSAGE("xmlTextWriterWriteDTD", (void *)writer, (void *)NULL, "gen_xmlTextWriterPtr Failed");\r
+                                               \r
+                                               name = gen_const_xmlChar_ptr(n_name, 1);\r
+                                               DTS_CHECK_NE_MESSAGE("xmlTextWriterWriteDTD", (void *)writer, (void *)NULL, "gen_const_xmlChar_ptr Failed");\r
+                                               \r
+                                               pubid = gen_const_xmlChar_ptr(n_pubid, 2);\r
+                                               DTS_CHECK_NE_MESSAGE("xmlTextWriterWriteDTD", (void *)pubid, (void *)NULL, "gen_const_xmlChar_ptr Failed");\r
+                                               \r
+                                               sysid = gen_const_xmlChar_ptr(n_sysid, 3);\r
+                                               DTS_CHECK_NE_MESSAGE("xmlTextWriterWriteDTD", (void *)sysid, (void *)NULL, "gen_const_xmlChar_ptr Failed");\r
+                                               \r
+                                               subset = gen_const_xmlChar_ptr(n_subset, 4);\r
+                                               DTS_CHECK_NE_MESSAGE("xmlTextWriterWriteDTD", (void *)subset, (void *)NULL, "gen_const_xmlChar_ptr Failed");\r
+                                               \r
+                                               /**\r
+                                                * @remarks   input1: [N/A, N/A] @n\r
+                                                *            { xmlTextWriterPtr pointer ,xmlChar pointer ,xmlChar pointer ,xmlChar pointer ,xmlChar pointer}\r
+                                                *             => { N/A | int } @n\r
+                                                */\r
+                                               ret_val = xmlTextWriterWriteDTD(writer, (const xmlChar *)name, (const xmlChar *)pubid, (const xmlChar *)sysid, (const xmlChar *)subset);\r
+                                               DTS_CHECK_EQ_MESSAGE("xmlTextWriterWriteDTD", (void *)ret_val, (void *)0, "xmlTextWriterWriteDTD Failed");\r
+                                               \r
+                                               desret_int(ret_val);\r
+                                               des_xmlTextWriterPtr(n_writer, writer, 0);\r
+                                               des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);\r
+                                               des_const_xmlChar_ptr(n_pubid, (const xmlChar *)pubid, 2);\r
+                                               des_const_xmlChar_ptr(n_sysid, (const xmlChar *)sysid, 3);\r
+                                               des_const_xmlChar_ptr(n_subset, (const xmlChar *)subset, 4);\r
+                                               xmlResetLastError();\r
+                                       }\r
+                               }\r
+                       }\r
+               }\r
+    }\r
+}\r
+\r
+\r
+static void\r
+UTcXmlTextWriterWriteDTDElementP01()\r
+{\r
+    int ret_val;\r
+    xmlTextWriterPtr writer; /* the xmlTextWriterPtr */\r
+    int n_writer;\r
+    xmlChar * name; /* the name of the DTD element */\r
+    int n_name;\r
+    xmlChar * content; /* content of the element */\r
+    int n_content;\r
+\r
+    for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {\r
+               for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {\r
+                       for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {\r
+                               writer = gen_xmlTextWriterPtr(n_writer, 0);\r
+                               DTS_CHECK_NE_MESSAGE("xmlTextWriterWriteDTDElement", (void *)writer, (void *)NULL, "gen_xmlTextWriterPtr Failed");\r
+                                               \r
+                               name = gen_const_xmlChar_ptr(n_name, 1);\r
+                               DTS_CHECK_NE_MESSAGE("xmlTextWriterWriteDTDElement", (void *)name, (void *)NULL, "gen_const_xmlChar_ptr Failed");\r
+                               \r
+                               content = gen_const_xmlChar_ptr(n_content, 2);\r
+                               DTS_CHECK_NE_MESSAGE("xmlTextWriterWriteDTDElement", (void *)content, (void *)NULL, "gen_const_xmlChar_ptr Failed");\r
+                               \r
+                               /**\r
+                                * @remarks   input1: [N/A, N/A] @n\r
+                                *            { xmlTextWriterPtr pointer ,xmlChar pointer ,xmlChar pointer}\r
+                                *             => { N/A | int } @n\r
+                                */\r
+                               ret_val = xmlTextWriterWriteDTDElement(writer, (const xmlChar *)name, (const xmlChar *)content);\r
+                               DTS_CHECK_EQ_MESSAGE("xmlTextWriterWriteDTDElement", (void *)ret_val, (void *)0, "xmlTextWriterWriteDTDElement Failed");\r
+                               \r
+                               desret_int(ret_val);\r
+                               des_xmlTextWriterPtr(n_writer, writer, 0);\r
+                               des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);\r
+                               des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 2);\r
+                               xmlResetLastError();\r
+                       }\r
+               }\r
+    }\r
+}\r
+\r
+static void\r
+UTcXmlTextWriterWriteDTDAttlistP01()\r
+{\r
+    int ret_val;\r
+    xmlTextWriterPtr writer; /* the xmlTextWriterPtr */\r
+    int n_writer;\r
+    xmlChar * name; /* the name of the DTD ATTLIST */\r
+    int n_name;\r
+    xmlChar * content; /* content of the ATTLIST */\r
+    int n_content;\r
+\r
+    for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {\r
+               for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {\r
+                       for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {\r
+                               writer = gen_xmlTextWriterPtr(n_writer, 0);\r
+                               DTS_CHECK_NE_MESSAGE("xmlTextWriterWriteDTDAttlist", (void *)writer, (void *)NULL, "gen_xmlTextWriterPtr Failed");\r
+                               \r
+                               name = gen_const_xmlChar_ptr(n_name, 1);\r
+                               DTS_CHECK_NE_MESSAGE("xmlTextWriterWriteDTDAttlist", (void *)name, (void *)NULL, "gen_const_xmlChar_ptr Failed");\r
+                               \r
+                               content = gen_const_xmlChar_ptr(n_content, 2);\r
+                               DTS_CHECK_NE_MESSAGE("xmlTextWriterWriteDTDAttlist", (void *)content, (void *)NULL, "gen_const_xmlChar_ptr Failed");\r
+                               \r
+                               /**\r
+                                * @remarks   input1: [N/A, N/A] @n\r
+                                *            { xmlTextWriterPtr pointer ,xmlChar pointer ,xmlChar pointer}\r
+                                *             => { N/A | int } @n\r
+                                */\r
+                               ret_val = xmlTextWriterWriteDTDAttlist(writer, (const xmlChar *)name, (const xmlChar *)content);\r
+                               DTS_CHECK_EQ_MESSAGE("xmlTextWriterWriteDTDAttlist", (void *)ret_val, (void *)0, "xmlTextWriterWriteDTDAttlist Failed");\r
+                               \r
+                               desret_int(ret_val);\r
+                               des_xmlTextWriterPtr(n_writer, writer, 0);\r
+                               des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);\r
+                               des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 2);\r
+                               xmlResetLastError();\r
+                       }\r
+               }\r
+    }\r
+}\r
+\r
+static void\r
+UTcXmlTextWriterWriteDTDInternalEntityP01()\r
+{\r
+    int ret_val;\r
+    xmlTextWriterPtr writer; /* the xmlTextWriterPtr */\r
+    int n_writer;\r
+    int pe; /* TRUE if this is a parameter entity, FALSE if not */\r
+    int n_pe;\r
+    xmlChar * name; /* the name of the DTD entity */\r
+    int n_name;\r
+    xmlChar * content; /* content of the entity */\r
+    int n_content;\r
+\r
+    for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {\r
+               for (n_pe = 0;n_pe < gen_nb_int;n_pe++) {\r
+                       for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {\r
+                               for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {\r
+                                       writer = gen_xmlTextWriterPtr(n_writer, 0);\r
+                                       DTS_CHECK_NE_MESSAGE("xmlTextWriterWriteDTDInternalEntity", (void *)writer, (void *)NULL, "gen_xmlTextWriterPtr Failed");\r
+                               \r
+                                       pe = gen_int(n_pe, 1);\r
+                                       name = gen_const_xmlChar_ptr(n_name, 2);\r
+                                       DTS_CHECK_NE_MESSAGE("xmlTextWriterWriteDTDInternalEntity", (void *)name, (void *)NULL, "gen_const_xmlChar_ptr Failed");\r
+                                       \r
+                                       content = gen_const_xmlChar_ptr(n_content, 3);\r
+                                       DTS_CHECK_NE_MESSAGE("xmlTextWriterWriteDTDInternalEntity", (void *)content, (void *)NULL, "gen_const_xmlChar_ptr Failed");\r
+                                       \r
+                                       /**\r
+                                        * @remarks   input1: [N/A, N/A] @n\r
+                                        *            { xmlTextWriterPtr pointer ,(0,1,-1,122) ,xmlChar pointer ,xmlChar pointer}\r
+                                        *             => { N/A | int } @n\r
+                                        */\r
+                                       ret_val = xmlTextWriterWriteDTDInternalEntity(writer, pe, (const xmlChar *)name, (const xmlChar *)content);\r
+                                       DTS_CHECK_EQ_MESSAGE("xmlTextWriterWriteDTDInternalEntity", (void *)ret_val, (void *)0, "xmlTextWriterWriteDTDInternalEntity Failed");\r
+                                       \r
+                                       desret_int(ret_val);\r
+                                       des_xmlTextWriterPtr(n_writer, writer, 0);\r
+                                       des_int(n_pe, pe, 1);\r
+                                       des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 2);\r
+                                       des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 3);\r
+                                       xmlResetLastError();\r
+                               }\r
+                       }\r
+               }\r
+    }\r
+}\r
+\r
+static void\r
+UTcXmlTextWriterWriteDTDExternalEntityP01()\r
+{\r
+    int ret_val;\r
+    xmlTextWriterPtr writer; /* the xmlTextWriterPtr */\r
+    int n_writer;\r
+    int pe; /* TRUE if this is a parameter entity, FALSE if not */\r
+    int n_pe;\r
+    xmlChar * name; /* the name of the DTD entity */\r
+    int n_name;\r
+    xmlChar * pubid; /* the public identifier, which is an alternative to the system identifier */\r
+    int n_pubid;\r
+    xmlChar * sysid; /* the system identifier, which is the URI of the DTD */\r
+    int n_sysid;\r
+    xmlChar * ndataid; /* the xml notation name. */\r
+    int n_ndataid;\r
+\r
+    for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {\r
+               for (n_pe = 0;n_pe < gen_nb_int;n_pe++) {\r
+                       for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {\r
+                               for (n_pubid = 0;n_pubid < gen_nb_const_xmlChar_ptr;n_pubid++) {\r
+                                       for (n_sysid = 0;n_sysid < gen_nb_const_xmlChar_ptr;n_sysid++) {\r
+                                               for (n_ndataid = 0;n_ndataid < gen_nb_const_xmlChar_ptr;n_ndataid++) {\r
+                                                       writer = gen_xmlTextWriterPtr(n_writer, 0);\r
+                                                       DTS_CHECK_NE_MESSAGE("xmlTextWriterWriteDTDExternalEntity", (void *)writer, (void *)NULL, "gen_xmlTextWriterPtr Failed");\r
+                                                       \r
+                                                       pe = gen_int(n_pe, 1);\r
+                                                       //MT_CHECK_MESSAGE2(0 != pe, "gen_int returned NULL");\r
+                                                       name = gen_const_xmlChar_ptr(n_name, 2);\r
+                                                       DTS_CHECK_NE_MESSAGE("xmlTextWriterWriteDTDExternalEntity", (void *)name, (void *)NULL, "gen_const_xmlChar_ptr 1 Failed");\r
+                                                       \r
+                                                       pubid = gen_const_xmlChar_ptr(n_pubid, 3);\r
+                                                       DTS_CHECK_NE_MESSAGE("xmlTextWriterWriteDTDExternalEntity", (void *)pubid, (void *)NULL, "gen_const_xmlChar_ptr 2 Failed");\r
+                                                       \r
+                                                       sysid = gen_const_xmlChar_ptr(n_sysid, 4);\r
+                                                       DTS_CHECK_NE_MESSAGE("xmlTextWriterWriteDTDExternalEntity", (void *)sysid, (void *)NULL, "gen_const_xmlChar_ptr 3 Failed");\r
+                                                       \r
+                                                       ndataid = gen_const_xmlChar_ptr(n_ndataid, 5);\r
+                                                       DTS_CHECK_NE_MESSAGE("xmlTextWriterWriteDTDExternalEntity", (void *)ndataid, (void *)NULL, "gen_const_xmlChar_ptr 4 Failed");\r
+                                                       \r
+                                                       /**\r
+                                                        * @remarks   input1: [N/A, N/A] @n\r
+                                                        *            { xmlTextWriterPtr pointer ,(0,1,-1,122) ,xmlChar pointer ,xmlChar pointer ,xmlChar pointer ,xmlChar pointer}\r
+                                                        *             => { N/A | int } @n\r
+                                                        */\r
+                                                       ret_val = xmlTextWriterWriteDTDExternalEntity(writer, pe, (const xmlChar *)name, (const xmlChar *)pubid, (const xmlChar *)sysid, (const xmlChar *)ndataid);\r
+                                                       DTS_CHECK_EQ_MESSAGE("xmlTextWriterWriteDTDExternalEntity", (void *)ret_val, (void *)0, "xmlTextWriterWriteDTDExternalEntity Failed");\r
+                                                       \r
+                                                       desret_int(ret_val);\r
+                                                       des_xmlTextWriterPtr(n_writer, writer, 0);\r
+                                                       des_int(n_pe, pe, 1);\r
+                                                       des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 2);\r
+                                                       des_const_xmlChar_ptr(n_pubid, (const xmlChar *)pubid, 3);\r
+                                                       des_const_xmlChar_ptr(n_sysid, (const xmlChar *)sysid, 4);\r
+                                                       des_const_xmlChar_ptr(n_ndataid, (const xmlChar *)ndataid, 5);\r
+                                                       xmlResetLastError();\r
+                                               }\r
+                                       }\r
+                               }\r
+                       }\r
+               }\r
+    }\r
+}\r
+\r
+static void\r
+UTcXmlTextWriterWriteDTDExternalEntityContentsP01()\r
+{\r
+       int ret_val;\r
+       xmlTextWriterPtr writer; /* the xmlTextWriterPtr*/\r
+//     xmlChar *tmp;\r
+       xmlDocPtr doc;\r
+       //xmlChar * pid;\r
+       /**\r
+        * @pre         1) Create a new Document.\n\r
+        *                      2) Start a Document.\n\r
+        *                      3) Write DTD Entity. \n\r
+        */\r
+       writer = xmlNewTextWriterDoc(&doc, 0);\r
+       DTS_CHECK_NE_MESSAGE("xmlTextWriterWriteDTDExternalEntityContents", (void *)writer, (void *)NULL, "xmlNewTextWriterDoc Failed");\r
+\r
+       ret_val = xmlTextWriterStartDocument(writer, NULL, NULL, NULL);\r
+       DTS_CHECK_EQ_MESSAGE("xmlTextWriterWriteDTDExternalEntityContents", (void *)ret_val, (void *)0, "xmlTextWriterStartDocument Failed");\r
+\r
+       ret_val = xmlTextWriterWriteDTD(writer, (xmlChar *)"fieldconf", NULL,(xmlChar *)UTSXMLHOME"/mfield.dtd", NULL);\r
+       DTS_CHECK_EQ_MESSAGE("xmlTextWriterWriteDTDExternalEntityContents", (void *)ret_val, (void *)0, "xmlTextWriterWriteDTD Failed");\r
+\r
+       ret_val = xmlTextWriterStartDTDEntity(writer, 1, BAD_CAST "version");\r
+       DTS_CHECK_EQ_MESSAGE("xmlTextWriterWriteDTDExternalEntityContents", (void *)ret_val, (void *)0, "xmlTextWriterStartDTDEntity Failed");\r
+\r
+       /**\r
+        * @remarks   input1: [N/A, N/A] @n\r
+        *            { xmlTextWriterPtr pointer ,xmlChar pointer ,xmlChar pointer ,xmlChar pointer}\r
+        *             => { N/A | int } @n\r
+        */\r
+       ret_val = xmlTextWriterWriteDTDExternalEntityContents(writer, NULL , (xmlChar *)"http://www.xml101.com/entities/entities.dtd" , NULL);\r
+       DTS_CHECK_EQ_MESSAGE("xmlTextWriterWriteDTDExternalEntityContents", (void *)ret_val, (void *)0, "xmlTextWriterWriteDTDExternalEntityContents Failed");\r
+\r
+       ret_val = xmlTextWriterEndDTDEntity(writer);\r
+       DTS_CHECK_EQ_MESSAGE("xmlTextWriterWriteDTDExternalEntityContents", (void *)ret_val, (void *)0, "xmlTextWriterEndDTDEntity Failed");\r
+\r
+       ret_val = xmlTextWriterEndDocument(writer);\r
+       DTS_CHECK_EQ_MESSAGE("xmlTextWriterWriteDTDExternalEntityContents", (void *)ret_val, (void *)-1, "xmlTextWriterEndDocument Failed");\r
+       \r
+       /**\r
+        * @post 1) Close the Document. \n\r
+        *       2) Free  xmlTextWriter pointer. \n\r
+        */\r
+       xmlFreeTextWriter(writer);\r
+       xmlResetLastError();\r
+}\r
+\r
+static void\r
+UTcXmlTextWriterWriteDTDEntityP01()\r
+{\r
+    int ret_val;\r
+    xmlTextWriterPtr writer; /* the xmlTextWriterPtr */\r
+    int n_writer;\r
+    int pe; /* TRUE if this is a parameter entity, FALSE if not */\r
+    int n_pe;\r
+    xmlChar * name; /* the name of the DTD entity */\r
+    int n_name;\r
+    xmlChar * pubid; /* the public identifier, which is an alternative to the system identifier */\r
+    int n_pubid;\r
+    xmlChar * sysid; /* the system identifier, which is the URI of the DTD */\r
+    int n_sysid;\r
+    xmlChar * ndataid; /* the xml notation name. */\r
+    int n_ndataid;\r
+    xmlChar * content; /* content of the entity */\r
+    int n_content;\r
+\r
+    for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {\r
+               for (n_pe = 0;n_pe < gen_nb_int;n_pe++) {\r
+                       for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {\r
+                               for (n_pubid = 0;n_pubid < gen_nb_const_xmlChar_ptr;n_pubid++) {\r
+                                       for (n_sysid = 0;n_sysid < gen_nb_const_xmlChar_ptr;n_sysid++) {\r
+                                               for (n_ndataid = 0;n_ndataid < gen_nb_const_xmlChar_ptr;n_ndataid++) {\r
+                                                       for (n_content = 0;n_content < gen_nb_const_xmlChar_ptr;n_content++) {\r
+                                                               writer = gen_xmlTextWriterPtr(n_writer, 0);\r
+                                                               DTS_CHECK_NE_MESSAGE("xmlTextWriterWriteDTDEntity", (void *)writer, (void *)NULL, "gen_xmlTextWriterPtr Failed");\r
+                                                               \r
+                                                               pe = gen_int(n_pe, 1);\r
+                                                               //MT_CHECK_MESSAGE2(0 != pe, "gen_int returned NULL");\r
+                                                               name = gen_const_xmlChar_ptr(n_name, 2);\r
+                                                               DTS_CHECK_NE_MESSAGE("xmlTextWriterWriteDTDEntity", (void *)name, (void *)NULL, "gen_const_xmlChar_ptr Failed");\r
+                                                               \r
+                                                               pubid = gen_const_xmlChar_ptr(n_pubid, 3);\r
+                                                               DTS_CHECK_NE_MESSAGE("xmlTextWriterWriteDTDEntity", (void *)pubid, (void *)NULL, "gen_const_xmlChar_ptr Failed");\r
+                                                               \r
+                                                               sysid = gen_const_xmlChar_ptr(n_sysid, 4);\r
+                                                               DTS_CHECK_NE_MESSAGE("xmlTextWriterWriteDTDEntity", (void *)sysid, (void *)NULL, "gen_const_xmlChar_ptr Failed");\r
+                                                               \r
+                                                               ndataid = gen_const_xmlChar_ptr(n_ndataid, 5);\r
+                                                               DTS_CHECK_NE_MESSAGE("xmlTextWriterWriteDTDEntity", (void *)ndataid, (void *)NULL, "gen_const_xmlChar_ptr Failed");\r
+                                                               \r
+                                                               content = gen_const_xmlChar_ptr(n_content, 6);\r
+                                                               DTS_CHECK_NE_MESSAGE("xmlTextWriterWriteDTDEntity", (void *)content, (void *)NULL, "gen_const_xmlChar_ptr Failed");\r
+                                                               \r
+                                                               /**\r
+                                                                * @remarks   input1: [N/A, N/A] @n\r
+                                                                *            { xmlTextWriterPtr pointer ,(0,1,-1,122) ,xmlChar pointer ,xmlChar pointer ,xmlChar pointer ,xmlChar pointer ,xmlChar pointer}\r
+                                                                *             => { N/A | int } @n\r
+                                                                */\r
+                                                               ret_val = xmlTextWriterWriteDTDEntity(writer, pe, (const xmlChar *)name, (const xmlChar *)pubid, (const xmlChar *)sysid, (const xmlChar *)ndataid, (const xmlChar *)content);\r
+                                                               DTS_CHECK_EQ_MESSAGE("xmlTextWriterWriteDTDEntity", (void *)ret_val, (void *)0, "xmlTextWriterWriteDTDEntity Failed");\r
+                                                               \r
+                                                               desret_int(ret_val);\r
+                                                               des_xmlTextWriterPtr(n_writer, writer, 0);\r
+                                                               des_int(n_pe, pe, 1);\r
+                                                               des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 2);\r
+                                                               des_const_xmlChar_ptr(n_pubid, (const xmlChar *)pubid, 3);\r
+                                                               des_const_xmlChar_ptr(n_sysid, (const xmlChar *)sysid, 4);\r
+                                                               des_const_xmlChar_ptr(n_ndataid, (const xmlChar *)ndataid, 5);\r
+                                                               des_const_xmlChar_ptr(n_content, (const xmlChar *)content, 6);\r
+                                                               xmlResetLastError();\r
+                                                       }\r
+                                               }\r
+                                       }\r
+                               }\r
+                       }\r
+               }\r
+    }\r
+}\r
+\r
+static void\r
+UTcXmlTextWriterWriteFormatElementP01()\r
+{\r
+       int ret_val;\r
+       xmlTextWriterPtr writer; /* the xmlTextWriterPtr */\r
+       int n_writer;\r
+\r
+       for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {\r
+               writer = gen_xmlTextWriterPtr(n_writer, 0);\r
+               DTS_CHECK_NE_MESSAGE("xmlTextWriterWriteFormatElement", (void *)writer, (void *)NULL, "gen_xmlTextWriterPtr Failed");\r
+\r
+               /**\r
+               * @remarks   input1: [N/A, N/A] @n\r
+               *            { xmlTextWriterPtr pointer ,BAD_CAST "X_ORDER_ID" ,"%010d", 53535L } => { N/A | int } @n\r
+               */\r
+               ret_val = xmlTextWriterWriteFormatElement(writer, BAD_CAST "X_ORDER_ID", "%010d", 53535L);\r
+               DTS_CHECK_EQ_MESSAGE("xmlTextWriterWriteFormatElement", (void *)ret_val, (void *)0, "xmlTextWriterWriteFormatElement Failed");\r
+               \r
+               desret_int(ret_val);\r
+               des_xmlTextWriterPtr(n_writer, writer, 0);\r
+               xmlResetLastError();\r
+       }\r
+}\r
+\r
+static void\r
+UTcXmlTextWriterWriteFormatDTDAttlistP01()\r
+{\r
+       int ret_val;\r
+       xmlTextWriterPtr writer; /* the xmlTextWriterPtr */\r
+       int n_writer;\r
+\r
+       for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {\r
+               writer = gen_xmlTextWriterPtr(n_writer, 0);\r
+               DTS_CHECK_NE_MESSAGE("xmlTextWriterWriteFormatDTDAttlist", (void *)writer, (void *)NULL, "gen_xmlTextWriterPtr Failed");\r
+\r
+               /**\r
+               * @remarks   input1: [N/A, N/A] @n\r
+               *            { xmlTextWriterPtr pointer ,BAD_CAST "X_ORDER_ID" ,"%010d", 53535L } => { N/A | int } @n\r
+               */\r
+               ret_val = xmlTextWriterWriteFormatDTDAttlist(writer, BAD_CAST "X_ORDER_ID", "%010d", 53535L);\r
+               DTS_CHECK_EQ_MESSAGE("xmlTextWriterWriteFormatDTDAttlist", (void *)ret_val, (void *)0, "xmlTextWriterWriteFormatDTDAttlist Failed");\r
+               \r
+               desret_int(ret_val);\r
+               des_xmlTextWriterPtr(n_writer, writer, 0);\r
+               xmlResetLastError();\r
+       }\r
+}\r
+\r
+static void\r
+UTcXmlTextWriterWriteFormatDTDElementP01()\r
+{\r
+       int ret_val;\r
+       xmlTextWriterPtr writer; /* the xmlTextWriterPtr */\r
+       int n_writer;\r
+\r
+       for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {\r
+               writer = gen_xmlTextWriterPtr(n_writer, 0);\r
+               DTS_CHECK_NE_MESSAGE("xmlTextWriterWriteFormatDTDElement", (void *)writer, (void *)NULL, "gen_xmlTextWriterPtr Failed");\r
+\r
+               /**\r
+               * @remarks   input1: [N/A, N/A] @n\r
+               *            { xmlTextWriterPtr pointer ,BAD_CAST "X_ORDER_ID", "%010d", 53535L } => { N/A | int } @n\r
+               */\r
+               ret_val = xmlTextWriterWriteFormatDTDElement(writer, BAD_CAST "X_ORDER_ID", "%010d", 53535L);\r
+               DTS_CHECK_EQ_MESSAGE("xmlTextWriterWriteFormatDTDElement", (void *)ret_val, (void *)NULL, "xmlTextWriterWriteFormatDTDElement Failed");\r
+               \r
+               desret_int(ret_val);\r
+               des_xmlTextWriterPtr(n_writer, writer, 0);\r
+               xmlResetLastError();\r
+       }\r
+}\r
+\r
+static void\r
+UTcXmlTextWriterWriteFormatCDATAP01()\r
+{\r
+       int ret_val;\r
+       xmlTextWriterPtr writer; /* the xmlTextWriterPtr */\r
+       int n_writer;\r
+\r
+       for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {\r
+               writer = gen_xmlTextWriterPtr(n_writer, 0);\r
+               DTS_CHECK_NE_MESSAGE("xmlTextWriterWriteFormatCDATA", (void *)writer, (void *)NULL, "gen_xmlTextWriterPtr Failed");\r
+\r
+               /**\r
+               * @remarks   input1: [N/A, N/A] @n\r
+               *            { xmlTextWriterPtr pointer , "%010d", 53535L } => { N/A | int } @n\r
+               */\r
+               ret_val = xmlTextWriterWriteFormatCDATA(writer, "%010d", 53535L);\r
+               DTS_CHECK_EQ_MESSAGE("xmlTextWriterWriteFormatCDATA", (void *)ret_val, (void *)NULL, "xmlTextWriterWriteFormatCDATA Failed");\r
+               \r
+               desret_int(ret_val);\r
+               des_xmlTextWriterPtr(n_writer, writer, 0);\r
+               xmlResetLastError();\r
+       }\r
+}\r
+\r
+static void\r
+UTcXmlTextWriterWriteFormatDTDInternalEntityP01()\r
+{\r
+       int ret_val;\r
+       xmlTextWriterPtr writer; /* the xmlTextWriterPtr */\r
+       int n_writer;\r
+       int pe; /* TRUE if this is a parameter entity, FALSE if not */\r
+       int n_pe;\r
+\r
+       for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {\r
+               for (n_pe = 0;n_pe < gen_nb_int;n_pe++) {\r
+                       writer = gen_xmlTextWriterPtr(n_writer, 0);\r
+                       DTS_CHECK_NE_MESSAGE("xmlTextWriterWriteFormatDTDInternalEntity", (void *)writer, (void *)NULL, "gen_xmlTextWriterPtr Failed");\r
+               \r
+                       pe = gen_int(n_pe, 1);\r
+                       /**\r
+                       * @remarks   input1: [N/A, N/A] @n\r
+                       *            { xmlTextWriterPtr pointer ,(0,1,-1,122) ,BAD_CAST "X_ORDER_ID" ,"%010d", 53535L } => { N/A | int } @n\r
+                       */\r
+                       ret_val = xmlTextWriterWriteFormatDTDInternalEntity(writer ,pe ,BAD_CAST "X_ORDER_ID", "%010d", 53535L);\r
+                       DTS_CHECK_EQ_MESSAGE("xmlTextWriterWriteFormatDTDInternalEntity", (void *)ret_val, (void *)NULL, "xmlTextWriterWriteFormatDTDInternalEntity Failed");\r
+               \r
+                       desret_int(ret_val);\r
+                       des_xmlTextWriterPtr(n_writer, writer, 0);\r
+                       xmlResetLastError();\r
+               }\r
+       }\r
+}\r
+\r
+static void\r
+UTcXmlTextWriterWriteFormatDTDP01()\r
+{\r
+    int ret_val;\r
+    xmlTextWriterPtr writer; /* the xmlTextWriterPtr */\r
+    int n_writer;\r
+//    xmlChar * name; /* the name of the DTD */\r
+//    int n_name;\r
+    xmlChar * pubid; /* the public identifier, which is an alternative to the system identifier */\r
+    int n_pubid;\r
+    xmlChar * sysid; /* the system identifier, which is the URI of the DTD */\r
+    int n_sysid;\r
+ //   xmlChar * subset; /* string content of the DTD */\r
+//    int n_subset;\r
+\r
+    for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {\r
+               for (n_pubid = 0;n_pubid < gen_nb_const_xmlChar_ptr;n_pubid++) {\r
+                       for (n_sysid = 0;n_sysid < gen_nb_const_xmlChar_ptr;n_sysid++) {\r
+                               writer = gen_xmlTextWriterPtr(n_writer, 0);\r
+                               DTS_CHECK_NE_MESSAGE("xmlTextWriterWriteFormatDTD", (void *)writer, (void *)NULL, "gen_xmlTextWriterPtr Failed");\r
+                               \r
+                               pubid = gen_const_xmlChar_ptr(n_pubid, 2);\r
+                               DTS_CHECK_NE_MESSAGE("xmlTextWriterWriteFormatDTD", (void *)pubid, (void *)NULL, "gen_const_xmlChar_ptr Failed");\r
+                       \r
+                               sysid = gen_const_xmlChar_ptr(n_sysid, 3);\r
+                               DTS_CHECK_NE_MESSAGE("xmlTextWriterWriteFormatDTD", (void *)sysid, (void *)NULL, "gen_const_xmlChar_ptr Failed");\r
+                               \r
+                               /**\r
+                                * @remarks   input1: [N/A, N/A] @n\r
+                                *            { xmlTextWriterPtr pointer ,xmlChar pointer ,xmlChar pointer ,xmlChar pointer ,"%010d", 53535L }\r
+                                *             => { N/A | int } @n\r
+                                */\r
+                               ret_val = xmlTextWriterWriteFormatDTD(writer, BAD_CAST "X_ORDER_ID", (const xmlChar *)pubid, (const xmlChar *)sysid, "%010d", 53535L );\r
+                               DTS_CHECK_EQ_MESSAGE("xmlTextWriterWriteFormatDTD", (void *)ret_val, (void *)0, "xmlTextWriterWriteFormatDTD Failed");\r
+                               \r
+                               desret_int(ret_val);\r
+                               des_xmlTextWriterPtr(n_writer, writer, 0);\r
+                               des_const_xmlChar_ptr(n_pubid, (const xmlChar *)pubid, 2);\r
+                               des_const_xmlChar_ptr(n_sysid, (const xmlChar *)sysid, 3);\r
+                               xmlResetLastError();\r
+                       }\r
+               }\r
+    }\r
+}\r
+\r
+static void\r
+UTcXmlTextWriterWriteFormatPIP01()\r
+{\r
+    int ret_val;\r
+    xmlTextWriterPtr writer; /* the xmlTextWriterPtr */\r
+    int n_writer;\r
+    xmlChar * target; /* PI target */\r
+    int n_target;\r
+\r
+    for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {\r
+               for (n_target = 0;n_target < gen_nb_const_xmlChar_ptr;n_target++) {\r
+                       writer = gen_xmlTextWriterPtr(n_writer, 0);\r
+                       DTS_CHECK_NE_MESSAGE("xmlTextWriterWriteFormatPI", (void *)writer, (void *)NULL, "gen_xmlTextWriterPtr Failed");\r
+                               \r
+                       target = gen_const_xmlChar_ptr(n_target, 1);\r
+                       DTS_CHECK_NE_MESSAGE("xmlTextWriterWriteFormatPI", (void *)target, (void *)NULL, "gen_const_xmlChar_ptr Failed");\r
+                               \r
+                       /**\r
+                        * @remarks   input1: [N/A, N/A] @n\r
+                        *            { xmlTextWriterPtr pointer ,xmlChar pointer ,"%010d", 53535L }\r
+                        *             => { N/A | int } @n\r
+                        */\r
+                       ret_val = xmlTextWriterWriteFormatPI(writer, (const xmlChar *)target, "%010d", 53535L );\r
+                       DTS_CHECK_EQ_MESSAGE("xmlTextWriterWriteFormatPI", (void *)ret_val, (void *)0, "xmlTextWriterWriteFormatPI Failed");\r
+                       \r
+                       desret_int(ret_val);\r
+                       des_xmlTextWriterPtr(n_writer, writer, 0);\r
+                       des_const_xmlChar_ptr(n_target, (const xmlChar *)target, 1);\r
+                       xmlResetLastError();\r
+               }\r
+    }\r
+}\r
+\r
+static void\r
+UTcXmlTextWriterWriteFormatAttributeP01()\r
+{\r
+       int ret_val;\r
+       xmlTextWriterPtr writer; /* the xmlTextWriterPtr*/\r
+       xmlChar *tmp;\r
+       /**\r
+        * @pre         1) Create a new Document.\n\r
+        *                      2) Start a Document.\n\r
+        *                      3) Write Element. \n\r
+        */\r
+       writer = xmlNewTextWriterFilename(OUTFILE1, 0);\r
+       DTS_CHECK_NE_MESSAGE("xmlTextWriterWriteFormatAttribute", (void *)writer, (void *)NULL, "xmlNewTextWriterFilename Failed");\r
+\r
+       ret_val = xmlTextWriterStartDocument(writer, NULL, MY_ENCODING, NULL);\r
+       DTS_CHECK_EQ_MESSAGE("xmlTextWriterWriteFormatAttribute", (void *)ret_val, (void *)NULL, "xmlTextWriterStartDocument Failed");\r
+\r
+       //ret_val = xmlTextWriterStartElement(writer, BAD_CAST "EXAMPLE");\r
+       //MT_CHECK_MESSAGE2(0 == ret_val, "API return value: %d", ret_val);\r
+\r
+       tmp = ConvertInput("This is a comment with special chars: <äö?",MY_ENCODING);\r
+       ret_val = xmlTextWriterWriteComment(writer, tmp);\r
+       DTS_CHECK_EQ_MESSAGE("xmlTextWriterWriteFormatAttribute", (void *)ret_val, (void *)0, "xmlTextWriterWriteComment Failed");\r
+       \r
+       if (tmp != NULL) \r
+               xmlFree(tmp);\r
+\r
+       ret_val = xmlTextWriterStartElement(writer, BAD_CAST "ORDER");\r
+       DTS_CHECK_EQ_MESSAGE("xmlTextWriterWriteFormatAttribute", (void *)ret_val, (void *)0, "xmlTextWriterStartElement Failed");\r
+       \r
+       /**\r
+        * @remarks   input1: [N/A, N/A] @n\r
+        *            { xmlTextWriterPtr pointer ,BAD_CAST "version" , "%010d", 53535L }\r
+        *             => { N/A | int } @n\r
+        */\r
+       ret_val = xmlTextWriterWriteFormatAttribute(writer, BAD_CAST "version", "%010d", 53535L );\r
+       DTS_CHECK_EQ_MESSAGE("xmlTextWriterWriteFormatAttribute", (void *)ret_val, (void *)0, "xmlTextWriterWriteFormatAttribute Failed");\r
+\r
+       ret_val = xmlTextWriterEndElement(writer);\r
+       DTS_CHECK_EQ_MESSAGE("xmlTextWriterWriteFormatAttribute", (void *)ret_val, (void *)0, "xmlTextWriterEndElement Failed");\r
+\r
+       ret_val = xmlTextWriterEndDocument(writer);\r
+       DTS_CHECK_NE_MESSAGE("xmlTextWriterWriteFormatAttribute", (void *)ret_val, (void *)-1, "xmlTextWriterEndDocument Failed");\r
+       \r
+       /**\r
+        * @post 1) Close the Document. \n\r
+        *       2) Free  xmlTextWriter pointer. \n\r
+        */\r
+       xmlFreeTextWriter(writer);\r
+       xmlResetLastError();\r
+\r
+}\r
+static void\r
+UTcXmlTextWriterWriteFormatRawP01()\r
+{\r
+       int ret_val;\r
+       xmlTextWriterPtr writer; /* the xmlTextWriterPtr */\r
+       int n_writer;\r
+\r
+       for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {\r
+               writer = gen_xmlTextWriterPtr(n_writer, 0);\r
+               DTS_CHECK_NE_MESSAGE("xmlTextWriterWriteFormatRaw", (void *)writer, (void *)NULL, "gen_xmlTextWriterPtr Failed");\r
+\r
+               /**\r
+               * @remarks   input1: [N/A, N/A] @n\r
+               *            { xmlTextWriterPtr pointer , "%010d", 53535L } => { N/A | int } @n\r
+               */\r
+               ret_val = xmlTextWriterWriteFormatRaw(writer, "%010d", 53535L);\r
+               DTS_CHECK_EQ_MESSAGE("xmlTextWriterWriteFormatRaw", (void *)ret_val, (void *)NULL, "xmlTextWriterWriteFormatRaw Failed");\r
+\r
+               desret_int(ret_val);\r
+               des_xmlTextWriterPtr(n_writer, writer, 0);\r
+               xmlResetLastError();\r
+       }\r
+}\r
+\r
+static void\r
+UTcXmlTextWriterWriteFormatElementNSP01()\r
+{\r
+       int ret_val;\r
+       xmlTextWriterPtr writer; /* the xmlTextWriterPtr */\r
+       int n_writer;\r
+       xmlChar * prefix; /* namespace prefix */\r
+       int n_prefix;\r
+       xmlChar * name; /* element local name */\r
+       int n_name;\r
+       xmlChar * namespaceURI; /* namespace URI */\r
+       int n_namespaceURI;\r
+\r
+       for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {\r
+               for (n_prefix = 0;n_prefix < gen_nb_const_xmlChar_ptr;n_prefix++) {\r
+                       for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {\r
+                               for (n_namespaceURI = 0;n_namespaceURI < gen_nb_const_xmlChar_ptr;n_namespaceURI++) {\r
+                                       writer = gen_xmlTextWriterPtr(n_writer, 0);\r
+                                       DTS_CHECK_NE_MESSAGE("xmlTextWriterWriteFormatElementNS", (void *)writer, (void *)NULL, "gen_xmlTextWriterPtr Failed");\r
+               \r
+                                       prefix = gen_const_xmlChar_ptr(n_prefix, 1);\r
+                                       DTS_CHECK_NE_MESSAGE("xmlTextWriterWriteFormatElementNS", (void *)prefix, (void *)NULL, "gen_const_xmlChar_ptr Failed");\r
+                                       \r
+                                       name = gen_const_xmlChar_ptr(n_name, 2);\r
+                                       DTS_CHECK_NE_MESSAGE("xmlTextWriterWriteFormatElementNS", (void *)name, (void *)NULL, "gen_const_xmlChar_ptr Failed");\r
+                                       \r
+                                       namespaceURI = gen_const_xmlChar_ptr(n_namespaceURI, 3);\r
+                                       DTS_CHECK_NE_MESSAGE("xmlTextWriterWriteFormatElementNS", (void *)namespaceURI, (void *)NULL, "gen_const_xmlChar_ptr Failed");\r
+\r
+                                       /**\r
+                                        * @remarks   input1: [N/A, N/A] @n\r
+                                        *            { xmlTextWriterPtr pointer ,xmlChar pointer ,xmlChar pointer ,xmlChar pointer ,"%010d", 53535L}\r
+                                        *             => { N/A | int } @n\r
+                                        */\r
+                                       ret_val = xmlTextWriterWriteFormatElementNS(writer, (const xmlChar *)prefix, (const xmlChar *)name, (const xmlChar *)namespaceURI, "%010d", 53535L);\r
+                                       DTS_CHECK_EQ_MESSAGE("xmlTextWriterWriteFormatElementNS", (void *)ret_val, (void *)0, "xmlTextWriterWriteFormatElementNS Failed");\r
+                                       \r
+                                       desret_int(ret_val);\r
+                                       des_xmlTextWriterPtr(n_writer, writer, 0);\r
+                                       des_const_xmlChar_ptr(n_prefix, (const xmlChar *)prefix, 1);\r
+                                       des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 2);\r
+                                       des_const_xmlChar_ptr(n_namespaceURI, (const xmlChar *)namespaceURI, 3);\r
+                                       xmlResetLastError();\r
+                               }\r
+                       }\r
+               }\r
+       }\r
+}\r
\r
+static void\r
+UTcXmlTextWriterWriteElementP02()\r
+{\r
+    int ret_val=-1;\r
+    xmlTextWriterPtr writer;\r
+    xmlChar *tmp;\r
+\r
+    /* Create a new XmlWriter for uri, with no compression. */\r
+    writer = xmlNewTextWriterFilename(OUTFILE2, 0);\r
+    DTS_CHECK_NE_MESSAGE("xmlTextWriterWriteComment", (void *)writer, (void *)NULL, "xmlNewTextWriterFilename Failed");\r
+\r
+    /* Start the document with the xml default for the version,\r
+     * encoding ISO 8859-1 and the default for the standalone\r
+     * declaration. */\r
+    ret_val = xmlTextWriterStartDocument(writer, NULL, MY_ENCODING, NULL);\r
+    DTS_CHECK_EQ_MESSAGE("xmlTextWriterWriteComment", (void *)ret_val, (void *)0, "xmlTextWriterStartDocument Failed");\r
+\r
+    /* Start an element named "EXAMPLE". Since thist is the first\r
+     * element, this will be the root element of the document. */\r
+    ret_val = xmlTextWriterStartElement(writer, BAD_CAST "EXAMPLE");\r
+    DTS_CHECK_EQ_MESSAGE("xmlTextWriterWriteComment", (void *)ret_val, (void *)0, "xmlTextWriterStartElement Failed");\r
+\r
+    /* Write a comment as child of EXAMPLE.\r
+     * Please observe, that the input to the xmlTextWriter functions\r
+     * HAS to be in UTF-8, even if the output XML is encoded\r
+     * in iso-8859-1 */\r
+    tmp = ConvertInput("This is a comment with special chars: <äö?",MY_ENCODING);\r
+    ret_val = xmlTextWriterWriteComment(writer, tmp);\r
+    DTS_CHECK_EQ_MESSAGE("xmlTextWriterWriteComment", (void *)ret_val, (void *)0, "xmlTextWriterWriteComment Failed");\r
+\r
+    if (tmp != NULL) \r
+               xmlFree(tmp);\r
+\r
+    /* Start an element named "ORDER" as child of EXAMPLE. */\r
+    ret_val = xmlTextWriterStartElement(writer, BAD_CAST "ORDER");\r
+    DTS_CHECK_EQ_MESSAGE("xmlTextWriterWriteComment", (void *)ret_val, (void *)0, "xmlTextWriterStartElement Failed");\r
+\r
+    /* Add an attribute with name "version" and value "1.0" to ORDER. */\r
+    ret_val = xmlTextWriterWriteAttribute(writer, BAD_CAST "version",BAD_CAST "1.0");\r
+    DTS_CHECK_EQ_MESSAGE("xmlTextWriterWriteComment", (void *)ret_val, (void *)0, "xmlTextWriterWriteAttribute Failed");\r
+\r
+    /* Add an attribute with name "xml:lang" and value "de" to ORDER. */\r
+    ret_val = xmlTextWriterWriteAttribute(writer, BAD_CAST "xml:lang",BAD_CAST "de");\r
+    DTS_CHECK_EQ_MESSAGE("xmlTextWriterWriteComment", (void *)ret_val, (void *)0, "xmlTextWriterWriteAttribute Failed");\r
+\r
+    /* Write a comment as child of ORDER */\r
+    tmp = ConvertInput("<äö?", MY_ENCODING);\r
+    ret_val = xmlTextWriterWriteFormatComment(writer,\r
+                    "This is another comment with special chars: %s",\r
+                    tmp);\r
+    DTS_CHECK_EQ_MESSAGE("xmlTextWriterWriteComment", (void *)ret_val, (void *)0, "xmlTextWriterWriteFormatComment Failed");\r
+\r
+    if (tmp != NULL) xmlFree(tmp);\r
+\r
+    /* Start an element named "HEADER" as child of ORDER. */\r
+    ret_val = xmlTextWriterStartElement(writer, BAD_CAST "HEADER");\r
+    DTS_CHECK_EQ_MESSAGE("xmlTextWriterWriteComment", (void *)ret_val, (void *)0, "xmlTextWriterStartElement Failed");\r
+\r
+    /* Write an element named "X_ORDER_ID" as child of HEADER. */\r
+    ret_val = xmlTextWriterWriteFormatElement(writer, BAD_CAST "X_ORDER_ID", "%010d", 53535L);\r
+    DTS_CHECK_EQ_MESSAGE("xmlTextWriterWriteComment", (void *)ret_val, (void *)0, "xmlTextWriterWriteFormatElement Failed");\r
+\r
+    /* Write an element named "CUSTOMER_ID" as child of HEADER. */\r
+    ret_val = xmlTextWriterWriteFormatElement(writer, BAD_CAST "CUSTOMER_ID", "%d", 1010);\r
+    DTS_CHECK_EQ_MESSAGE("xmlTextWriterWriteComment", (void *)ret_val, (void *)0, "xmlTextWriterWriteFormatElement Failed");\r
+\r
+    /* Write an element named "NAME_1" as child of HEADER. */\r
+    tmp = ConvertInput("M?ler", MY_ENCODING);\r
+    ret_val = xmlTextWriterWriteElement(writer, BAD_CAST "NAME_1", tmp);\r
+    DTS_CHECK_EQ_MESSAGE("xmlTextWriterWriteComment", (void *)ret_val, (void *)0, "xmlTextWriterWriteElement Failed");\r
+\r
+    if (tmp != NULL) xmlFree(tmp);\r
+\r
+    /* Write an element named "NAME_2" as child of HEADER. */\r
+    tmp = ConvertInput("J?g", MY_ENCODING);\r
+    ret_val = xmlTextWriterWriteElement(writer, BAD_CAST "NAME_2", tmp);\r
+    DTS_CHECK_EQ_MESSAGE("xmlTextWriterWriteComment", (void *)ret_val, (void *)0, "xmlTextWriterWriteElement Failed");\r
+\r
+    if (tmp != NULL) xmlFree(tmp);\r
+\r
+    /* Close the element named HEADER. */\r
+    ret_val = xmlTextWriterEndElement(writer);\r
+    DTS_CHECK_EQ_MESSAGE("xmlTextWriterWriteComment", (void *)ret_val, (void *)0, "xmlTextWriterEndElement Failed");\r
+\r
+    /* Start an element named "ENTRIES" as child of ORDER. */\r
+    ret_val = xmlTextWriterStartElement(writer, BAD_CAST "ENTRIES");\r
+    DTS_CHECK_EQ_MESSAGE("xmlTextWriterWriteComment", (void *)ret_val, (void *)0, "xmlTextWriterStartElement Failed");\r
+\r
+    /* Start an element named "ENTRY" as child of ENTRIES. */\r
+    ret_val = xmlTextWriterStartElement(writer, BAD_CAST "ENTRY");\r
+    DTS_CHECK_EQ_MESSAGE("xmlTextWriterWriteComment", (void *)ret_val, (void *)0, "xmlTextWriterStartElement Failed");\r
+\r
+    /* Write an element named "ARTICLE" as child of ENTRY. */\r
+    ret_val = xmlTextWriterWriteElement(writer, BAD_CAST "ARTICLE",BAD_CAST "<Test>");\r
+    DTS_CHECK_EQ_MESSAGE("xmlTextWriterWriteComment", (void *)ret_val, (void *)0, "xmlTextWriterWriteElement Failed");\r
+\r
+    /* Write an element named "ENTRY_NO" as child of ENTRY. */\r
+    ret_val = xmlTextWriterWriteFormatElement(writer, BAD_CAST "ENTRY_NO", "%d",10);\r
+    DTS_CHECK_EQ_MESSAGE("xmlTextWriterWriteComment", (void *)ret_val, (void *)0, "xmlTextWriterWriteFormatElement Failed");\r
+\r
+    /* Close the element named ENTRY. */\r
+    ret_val = xmlTextWriterEndElement(writer);\r
+    DTS_CHECK_EQ_MESSAGE("xmlTextWriterWriteComment", (void *)ret_val, (void *)0, "xmlTextWriterEndElement Failed");\r
+\r
+    /* Start an element named "ENTRY" as child of ENTRIES. */\r
+    ret_val = xmlTextWriterStartElement(writer, BAD_CAST "ENTRY");\r
+    DTS_CHECK_EQ_MESSAGE("xmlTextWriterWriteComment", (void *)ret_val, (void *)0, "xmlTextWriterStartElement Failed");\r
+\r
+    /* Write an element named "ARTICLE" as child of ENTRY. */\r
+    ret_val = xmlTextWriterWriteElement(writer, BAD_CAST "ARTICLE",BAD_CAST "<Test 2>");\r
+    DTS_CHECK_EQ_MESSAGE("xmlTextWriterWriteComment", (void *)ret_val, (void *)0, "xmlTextWriterWriteElement Failed");\r
+\r
+    /* Write an element named "ENTRY_NO" as child of ENTRY. */\r
+    ret_val = xmlTextWriterWriteFormatElement(writer, BAD_CAST "ENTRY_NO", "%d",20);\r
+    DTS_CHECK_EQ_MESSAGE("xmlTextWriterWriteComment", (void *)ret_val, (void *)0, "xmlTextWriterWriteFormatElement Failed");\r
+\r
+    /* Close the element named ENTRY. */\r
+    ret_val = xmlTextWriterEndElement(writer);\r
+    DTS_CHECK_EQ_MESSAGE("xmlTextWriterWriteComment", (void *)ret_val, (void *)0, "xmlTextWriterEndElement Failed");\r
+\r
+    /* Close the element named ENTRIES. */\r
+    ret_val = xmlTextWriterEndElement(writer);\r
+    DTS_CHECK_EQ_MESSAGE("xmlTextWriterWriteComment", (void *)ret_val, (void *)0, "xmlTextWriterEndElement Failed");\r
+\r
+    /* Start an element named "FOOTER" as child of ORDER. */\r
+    ret_val = xmlTextWriterStartElement(writer, BAD_CAST "FOOTER");\r
+    DTS_CHECK_EQ_MESSAGE("xmlTextWriterWriteComment", (void *)ret_val, (void *)0, "xmlTextWriterStartElement Failed");\r
+\r
+    /* Write an element named "TEXT" as child of FOOTER. */\r
+    ret_val = xmlTextWriterWriteElement(writer, BAD_CAST "TEXT",BAD_CAST "This is a text.");\r
+    DTS_CHECK_EQ_MESSAGE("xmlTextWriterWriteComment", (void *)ret_val, (void *)0, "xmlTextWriterWriteElement Failed");\r
+\r
+    /* Close the element named FOOTER. */\r
+    ret_val = xmlTextWriterEndElement(writer);\r
+    DTS_CHECK_EQ_MESSAGE("xmlTextWriterWriteComment", (void *)ret_val, (void *)0, "xmlTextWriterEndElement Failed");\r
+\r
+    /* Here we could close the elements ORDER and EXAMPLE using the\r
+     * function xmlTextWriterEndElement, but since we do not want to\r
+     * write any other elements, we simply call xmlTextWriterEndDocument,\r
+     * which will do all the work. */\r
+    ret_val = xmlTextWriterEndDocument(writer);\r
+    DTS_CHECK_NE_MESSAGE("xmlTextWriterWriteComment", (void *)ret_val, (void *)-1, "xmlTextWriterEndDocument Failed");\r
+\r
+    xmlFreeTextWriter(writer);\r
+}\r
+\r
+static void\r
+UTcXmlTextWriterWriteFormatAttributeNSP01()\r
+{\r
+       int ret_val;\r
+       xmlTextWriterPtr writer; /* the xmlTextWriterPtr*/\r
+       xmlChar *tmp;\r
+       /**\r
+        * @pre         1) Create a new Document.\n\r
+        *                      2) Start a Document.\n\r
+        *                      3) Write Element. \n\r
+        */\r
+       writer = xmlNewTextWriterFilename(OUTFILE1, 0);\r
+       DTS_CHECK_NE_MESSAGE("xmlTextWriterWriteFormatAttributeNS", (void *)writer, (void *)NULL, "xmlNewTextWriterFilename Failed");\r
+\r
+       ret_val = xmlTextWriterStartDocument(writer, NULL, MY_ENCODING, NULL);\r
+       DTS_CHECK_EQ_MESSAGE("xmlTextWriterWriteFormatAttributeNS", (void *)ret_val, (void *)0, "xmlTextWriterStartDocument Failed");\r
+\r
+       //ret_val = xmlTextWriterStartElement(writer, BAD_CAST "EXAMPLE");\r
+       //MT_CHECK_MESSAGE2(0 == ret_val, "API return value: %d", ret_val);\r
+\r
+       tmp = ConvertInput("This is a comment with special chars: <äö?",MY_ENCODING);\r
+       ret_val = xmlTextWriterWriteComment(writer, tmp);\r
+       DTS_CHECK_EQ_MESSAGE("xmlTextWriterWriteFormatAttributeNS", (void *)ret_val, (void *)0, "xmlTextWriterWriteComment Failed");\r
+       \r
+       if (tmp != NULL) \r
+               xmlFree(tmp);\r
+\r
+       ret_val = xmlTextWriterStartElement(writer, BAD_CAST "ORDER");\r
+       DTS_CHECK_EQ_MESSAGE("xmlTextWriterWriteFormatAttributeNS", (void *)ret_val, (void *)0, "xmlTextWriterStartElement Failed");\r
+       \r
+       /**\r
+        * @remarks   input1: [N/A, N/A] @n\r
+        *            { xmlTextWriterPtr pointer ,xmlChar pointer ,BAD_CAST "X_ORDER_ID" ,xmlChar pointer , "%010d", 53535L }\r
+        *             => { N/A | int } @n\r
+        */\r
+       ret_val = xmlTextWriterWriteFormatAttributeNS(writer, NULL, BAD_CAST "version", NULL , "%010d", 53535L );\r
+       DTS_CHECK_EQ_MESSAGE("xmlTextWriterWriteFormatAttributeNS", (void *)ret_val, (void *)0, "xmlTextWriterWriteFormatAttributeNS Failed");\r
+\r
+       ret_val = xmlTextWriterEndElement(writer);\r
+       DTS_CHECK_EQ_MESSAGE("xmlTextWriterWriteFormatAttributeNS", (void *)ret_val, (void *)0, "xmlTextWriterEndElement Failed");\r
+\r
+       ret_val = xmlTextWriterEndDocument(writer);\r
+       DTS_CHECK_NE_MESSAGE("xmlTextWriterWriteFormatAttributeNS", (void *)ret_val, (void *)-1, "xmlTextWriterEndDocument Failed");\r
+       \r
+       /**\r
+        * @post 1) Close the Document. \n\r
+        *       2) Free  xmlTextWriter pointer. \n\r
+        */\r
+       xmlFreeTextWriter(writer);\r
+       xmlResetLastError();\r
+\r
+}\r
+\r
+static void\r
+UTcXmlTextWriterWriteFormatStringP01()\r
+{\r
+       int ret_val;\r
+       xmlTextWriterPtr writer; /* the xmlTextWriterPtr */\r
+       int n_writer;\r
+\r
+       for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {\r
+               writer = gen_xmlTextWriterPtr(n_writer, 0);\r
+               DTS_CHECK_NE_MESSAGE("xmlTextWriterWriteFormatString", (void *)writer, (void *)NULL, "gen_xmlTextWriterPtr Failed");\r
+\r
+               /**\r
+               * @remarks   input1: [N/A, N/A] @n\r
+               *            { xmlTextWriterPtr pointer , "%010d", 53535L } => { N/A | int } @n\r
+               */\r
+               ret_val = xmlTextWriterWriteFormatString(writer, "%010d", 53535L);\r
+               DTS_CHECK_EQ_MESSAGE("xmlTextWriterWriteFormatString", (void *)ret_val, (void *)NULL, "xmlTextWriterWriteFormatString Failed");\r
+               \r
+               desret_int(ret_val);\r
+               des_xmlTextWriterPtr(n_writer, writer, 0);\r
+               xmlResetLastError();\r
+       }\r
+}\r
+\r
+static void\r
+UTcXmlTextWriterWriteFormatCommentP01()\r
+{\r
+       int ret_val;\r
+       xmlTextWriterPtr writer; /* the xmlTextWriterPtr */\r
+       int n_writer;\r
+\r
+       for (n_writer = 0;n_writer < gen_nb_xmlTextWriterPtr;n_writer++) {\r
+               writer = gen_xmlTextWriterPtr(n_writer, 0);\r
+               DTS_CHECK_NE_MESSAGE("xmlTextWriterWriteFormatComment", (void *)writer, (void *)NULL, "gen_xmlTextWriterPtr Failed");\r
+\r
+               /**\r
+               * @remarks   input1: [N/A, N/A] @n\r
+               *            { xmlTextWriterPtr pointer , "%010d", 53535L } => { N/A | int } @n\r
+               */\r
+               ret_val = xmlTextWriterWriteFormatComment(writer, "%010d", 53535L);\r
+               DTS_CHECK_EQ_MESSAGE("xmlTextWriterWriteFormatComment", (void *)ret_val, (void *)NULL, "xmlTextWriterWriteFormatComment Failed");\r
+               \r
+               desret_int(ret_val);\r
+               des_xmlTextWriterPtr(n_writer, writer, 0);\r
+               xmlResetLastError();\r
+       }\r
+}\r
+\r
+\r
+static void startup( void);\r
+static void cleanup( void);\r
+\r
+void (*tet_startup)( void) = startup;\r
+void (*tet_cleanup)( void) = cleanup;\r
+\r
+static void startup( void)\r
+{\r
+        /* start of TC */\r
+        tet_printf("TC starts.");\r
+}\r
+\r
+static void cleanup( void)\r
+{\r
+        /* end of TC */\r
+        tet_printf("TC ends.");\r
+}\r
+\r
+struct tet_testlist tet_testlist[] = {\r
+       // Handling of out of context errors\r
+       {UTcXmlTextWriterWriteFormatDTDElementP01,1},\r
+       {UTcXmlTextWriterWriteFormatPIP01,2},\r
+       {UTcXmlTextWriterWriteFormatAttributeP01,3},\r
+       {UTcXmlTextWriterWriteFormatAttributeNSP01,4},\r
+       {UTcXmlTextWriterWriteFormatRawP01,5},\r
+       {UTcXmlTextWriterWriteFormatElementNSP01,6},\r
+       {UTcXmlTextWriterWriteFormatStringP01,7},\r
+       {UTcXmlNewTextWriterP01,8},\r
+       {UTcXmlNewTextWriterFilenameP01,9},\r
+       {UTcXmlNewTextWriterMemoryP01,10},\r
+       \r
+       {UTcXmlNewTextWriterPushParserP01,11},\r
+       {UTcXmlNewTextWriterDocP01,12},\r
+       {UTcXmlNewTextWriterTreeP01,13},\r
+       {UTcXmlFreeTextWriterP01,14},\r
+       {UTcXmlTextWriterStartDocumentP01,15},\r
+       {UTcXmlTextWriterEndDocumentP01,16},\r
+       {UTcXmlTextWriterStartElementP01,17},\r
+       {UTcXmlTextWriterStartElementNSP01,18},\r
+       {UTcXmlTextWriterFullEndElementP01,19},\r
+       {UTcXmlTextWriterStartCommentP01,20},\r
+\r
+       {UTcXmlTextWriterEndCommentP01,21},\r
+       {UTcXmlTextWriterWriteFormatCommentP01,22},\r
+       {UTcXmlTextWriterWriteVFormatCommentP01,23},\r
+       {UTcXmlTextWriterWriteCommentP01,24},\r
+       {UTcXmlTextWriterStartAttributeP01,25},\r
+       {UTcXmlTextWriterStartAttributeNSP01,26},\r
+       {UTcXmlTextWriterEndAttributeP01,27},\r
+       {UTcXmlTextWriterStartPIP01,28},\r
+       {UTcXmlTextWriterEndPIP01,29},\r
+       {UTcXmlTextWriterStartCDATAP01,30},\r
+       \r
+       {UTcXmlTextWriterEndCDATAP01,31},\r
+       {UTcXmlTextWriterStartDTDP01,32},\r
+       {UTcXmlTextWriterEndDTDP01,33},\r
+       {UTcXmlTextWriterStartDTDElementP01,34},\r
+       {UTcXmlTextWriterEndDTDElementP01,35},\r
+       {UTcXmlTextWriterStartDTDAttlistP01,36},\r
+       {UTcXmlTextWriterEndDTDAttlistP01,37},\r
+       {UTcXmlTextWriterStartDTDEntityP01,38},\r
+       {UTcXmlTextWriterEndDTDEntityP01,39},\r
+       {UTcXmlTextWriterWriteDTDNotationP01,40},\r
+       \r
+       {UTcXmlTextWriterSetIndentP01,41},\r
+       {UTcXmlTextWriterSetIndentStringP01,42},\r
+       {UTcXmlTextWriterFlushP01,43},\r
+       {UTcXmlTextWriterWriteElementP01,44},\r
+       {UTcXmlTextWriterWriteElementNSP01,45},\r
+       {UTcXmlTextWriterWriteStringP01,46},\r
+       {UTcXmlTextWriterWriteBase64P01,47},\r
+       {UTcXmlTextWriterWriteBinHexP01,48},\r
+       {UTcXmlTextWriterWriteAttributeP01,49},\r
+       {UTcXmlTextWriterWriteAttributeNSP01,50},\r
+       \r
+       {UTcXmlTextWriterWritePIP01,51},\r
+       {UTcXmlTextWriterWriteCDATAP01,52},\r
+       {UTcXmlTextWriterWriteDTDP01,53},\r
+       {UTcXmlTextWriterWriteDTDAttlistP01,54},\r
+       {UTcXmlTextWriterWriteDTDElementP01,55},\r
+       {UTcXmlTextWriterWriteDTDInternalEntityP01,56},\r
+       {UTcXmlTextWriterWriteDTDExternalEntityP01,57},\r
+       {UTcXmlTextWriterWriteDTDEntityP01,58},\r
+       {UTcXmlTextWriterWriteFormatElementP01,59},\r
+       {UTcXmlTextWriterWriteFormatDTDInternalEntityP01,60},\r
+       \r
+       {UTcXmlTextWriterWriteFormatDTDAttlistP01,61},\r
+       {UTcXmlTextWriterWriteFormatDTDP01,62},\r
+       {UTcXmlTextWriterWriteFormatCDATAP01,63},\r
+       {UTcXmlTextWriterWriteElementP02,64},\r
+       {UTcXmlTextWriterEndElementP01,65},\r
+       {UTcXmlTextWriterWriteRawLenP01,66},\r
+       {UTcXmlTextWriterWriteRawP01,67},\r
+       {UTcXmlTextWriterWriteDTDExternalEntityContentsP01,68},\r
+       \r
+       { NULL, 0 },\r
+       \r
+};\r
diff --git a/TC/testcase/utc_libxml_XmlXPath.c b/TC/testcase/utc_libxml_XmlXPath.c
new file mode 100755 (executable)
index 0000000..98d7866
--- /dev/null
@@ -0,0 +1,2835 @@
+/*\r
+*  libxml test suite\r
+*\r
+* Copyright (c) 2012 Samsung Electronics Co., Ltd. All rights reserved.\r
+*\r
+* Contact: {Maintainer Name} <{Maintainer Email}>\r
+* \r
+* Licensed under the Apache License, Version 2.0 (the "License");\r
+* you may not use this file except in compliance with the License.\r
+* You may obtain a copy of the License at\r
+*\r
+* http://www.apache.org/licenses/LICENSE-2.0\r
+*\r
+* Unless required by applicable law or agreed to in writing, software\r
+* distributed under the License is distributed on an "AS IS" BASIS,\r
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+* See the License for the specific language governing permissions and\r
+* limitations under the License.\r
+*\r
+*/ \r
+\r
+#include "utc_libxml_include.h"\r
+#include <libxml/xpath.h>\r
+#include <libxml/xpathInternals.h>\r
+\r
+\r
+#ifdef DEBUG_MEM_LEAK\r
+extern "C" {\r
+       extern void MemStartSaveCallStack(void);\r
+       extern void MemEndSaveCallStack(void);\r
+       extern void MemPrintCurrentIndex(void);\r
+       extern void MemTraceAllocMemInfo(void);\r
+}\r
+#endif\r
+\r
+\r
+#define INPUT_XML LIBXML2TESTXML\r
+\r
+\r
+\r
+static xmlDocPtr api_doc = NULL;\r
+static xmlDtdPtr api_dtd = NULL;\r
+static xmlNodePtr api_root = NULL;\r
+static xmlAttrPtr api_attr = NULL;\r
+static xmlNsPtr api_ns = NULL;\r
+\r
+static  xmlDocPtr DocInitPtr;\r
+static  xmlXPathContextPtr xpathCtxInitPtr;\r
+static  xmlXPathObjectPtr xpathObjInitPtr;\r
+static  xmlXPathParserContextPtr pctxtInitPtr;\r
+\r
+static xmlDocPtr doc_gen_xmlNodeSetPtr;\r
+static xmlXPathContextPtr xpathCtx_gen_xmlNodeSetPtr;\r
+static xmlXPathObjectPtr xpathObj_gen_xmlNodeSetPtr;\r
+static xmlDocPtr doc_get_api_root = NULL;\r
+\r
+xmlDocPtr getdoc (char *docname)\r
+{\r
+       return xmlParseFile(docname);\r
+}\r
+static void desret_xmlXPathObjectPtr(xmlXPathObjectPtr val) {\r
+       xmlXPathFreeObject(val);\r
+}\r
+#define gen_nb_xmlDocPtr 4\r
+static xmlDocPtr gen_xmlDocPtr(int no, int nr ATTRIBUTE_UNUSED) {\r
+       if (no == 0) return(xmlNewDoc(BAD_CAST "1.0"));\r
+       if (no == 1) return(xmlReadMemory("<foo/>", 6, "test", NULL, 0));\r
+       if (no == 2) return(xmlReadMemory("<!DOCTYPE foo []> <foo/>", 24, "test", NULL, 0));\r
+       return(NULL);\r
+}\r
+static void des_xmlDocPtr(int no ATTRIBUTE_UNUSED, xmlDocPtr val, int nr ATTRIBUTE_UNUSED) {\r
+       if ((val != NULL) && (val != api_doc) && (val->doc != api_doc))\r
+               xmlFreeDoc(val);\r
+}\r
+static void\r
+free_api_doc(void) {\r
+       xmlFreeDoc(api_doc);\r
+       api_doc = NULL;\r
+       api_dtd = NULL;\r
+       api_root = NULL;\r
+       api_attr = NULL;\r
+       api_ns = NULL;\r
+}\r
+static void\r
+__free_api_doc(void) {\r
+       if (NULL != api_doc)\r
+       {\r
+               xmlFreeDoc(api_doc);\r
+               api_doc = NULL;\r
+       }\r
+       api_dtd = NULL;\r
+       api_root = NULL;\r
+       api_attr = NULL;\r
+       api_ns = NULL;\r
+}\r
+static void des_xmlXPathObjectPtr(int no ATTRIBUTE_UNUSED, xmlXPathObjectPtr val, int nr ATTRIBUTE_UNUSED) {\r
+       if (val != NULL) {\r
+               xmlXPathFreeObject(val);\r
+       }\r
+}\r
+#define gen_nb_xmlXPathContextPtr 1\r
+static xmlXPathContextPtr gen_xmlXPathContextPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+       char *docname = INPUT_XML;\r
+       //xmlDocPtr doc;\r
+       doc_get_api_root = getdoc(docname);\r
+       xmlXPathContextPtr context;\r
+       context = xmlXPathNewContext(doc_get_api_root);\r
+       return(context);\r
+}\r
+#define gen_nb_xmlXPathCompExprPtr 1\r
+static xmlXPathCompExprPtr gen_xmlXPathCompExprPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+       xmlXPathContextPtr ctxt = gen_xmlXPathContextPtr(0, 1);\r
+       const xmlChar   *str            = (const xmlChar*)  "SISO";\r
+       xmlXPathCompExprPtr pctxt =\r
+       xmlXPathCtxtCompile(ctxt, str) ;\r
+       return(pctxt);\r
+}\r
+\r
+#define gen_nb_xmlXPathObjectPtr 5\r
+static xmlXPathObjectPtr gen_xmlXPathObjectPtr(int no, int nr ATTRIBUTE_UNUSED) {\r
+       if (no == 0) return(xmlXPathNewString(BAD_CAST "string object"));\r
+       if (no == 1) return(xmlXPathNewFloat(1.1));\r
+       if (no == 2) return(xmlXPathNewBoolean(1));\r
+       if (no == 3) return(xmlXPathNewNodeSet(NULL));\r
+       return(NULL);\r
+}\r
+#ifdef LIBXML_XPATH_ENABLED\r
+\r
+#define gen_nb_xmlXPathParserContextPtr 1\r
+static xmlXPathParserContextPtr gen_xmlXPathParserContextPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+    return(NULL);\r
+}\r
+static void des_xmlXPathParserContextPtr(int no ATTRIBUTE_UNUSED, xmlXPathParserContextPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+}\r
+#endif\r
+\r
+\r
+\r
+static void desret_xmlNodePtr(xmlNodePtr val) {\r
+    if ((val != NULL) && (val != api_root) && (val != (xmlNodePtr) api_doc)) {\r
+       xmlUnlinkNode(val);\r
+       xmlFreeNode(val);\r
+    }\r
+}\r
+\r
+#define gen_nb_const_xmlChar_ptr 5\r
+\r
+static xmlChar *gen_const_xmlChar_ptr(int no, int nr ATTRIBUTE_UNUSED) {\r
+       xmlChar *xpathExpr      = (xmlChar*) "//SUBJECT";\r
+       return(xpathExpr);\r
+}\r
+\r
+#define gen_nb_double 4\r
+\r
+static double gen_double(int no, int nr ATTRIBUTE_UNUSED) {\r
+       if (no == 0) return(0);\r
+       if (no == 1) return(-1.1);\r
+#if defined(LIBXML_XPATH_ENABLED)\r
+       if (no == 2) return(xmlXPathNAN);\r
+#endif\r
+       return(-1);\r
+}\r
+\r
+#define gen_nb_int 4\r
+\r
+static int gen_int(int no, int nr ATTRIBUTE_UNUSED) {\r
+       if (no == 0) return(0);\r
+       if (no == 1) return(1);\r
+       if (no == 2) return(-1);\r
+       if (no == 3) return(122);\r
+       return(-1);\r
+}\r
+#define gen_nb_xmlNodeSetPtr 1\r
+static xmlNodeSetPtr gen_xmlNodeSetPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+       const char              *filename       = INPUT_XML;\r
+       const xmlChar   *xpathExpr      = (xmlChar*) "//SUBJECT";\r
+\r
+       /* Init libxml */\r
+       //xmlInitParser();\r
+       //LIBXML_TEST_VERSION\r
+\r
+\r
+       /* Load XML document */\r
+       doc_gen_xmlNodeSetPtr = xmlParseFile(filename);\r
+       if (doc_gen_xmlNodeSetPtr == NULL)\r
+       {\r
+               //MT_FAIL("Error: unable to parse file ");\r
+               return(NULL);\r
+       }\r
+       /* Create xpath evaluation context */\r
+       xpathCtx_gen_xmlNodeSetPtr = xmlXPathNewContext(doc_gen_xmlNodeSetPtr);\r
+       if(xpathCtx_gen_xmlNodeSetPtr == NULL)\r
+       {\r
+               xmlFreeDoc(doc_gen_xmlNodeSetPtr);\r
+               //MT_FAIL("Error: unable to create new XPath context");\r
+               return(NULL);\r
+       }\r
+       /* Evaluate xpath expression */\r
+       xpathObj_gen_xmlNodeSetPtr = xmlXPathEvalExpression(xpathExpr, xpathCtx_gen_xmlNodeSetPtr);\r
+       if(xpathObj_gen_xmlNodeSetPtr == NULL)\r
+       {\r
+               xmlXPathFreeContext(xpathCtx_gen_xmlNodeSetPtr);\r
+               xmlFreeDoc(doc_gen_xmlNodeSetPtr);\r
+               //MT_FAIL("Error: unable to evaluate xpath expression ");\r
+               return(NULL);\r
+       }\r
+       return(xpathObj_gen_xmlNodeSetPtr->nodesetval);\r
+}\r
+static void __DeletexmlNodeSetPtr()\r
+{\r
+       xmlXPathFreeObject(xpathObj_gen_xmlNodeSetPtr);\r
+       xmlXPathFreeContext(xpathCtx_gen_xmlNodeSetPtr);\r
+       xmlFreeDoc(doc_gen_xmlNodeSetPtr);\r
+       //xmlCleanupParser();\r
+}\r
+static xmlDocPtr\r
+get_api_doc(void) {\r
+       if (api_doc == NULL) {\r
+               api_doc = xmlReadMemory("<!DOCTYPE root [<!ELEMENT root EMPTY>]><root xmlns:h='http://example.com/' h:foo='bar'/>", 88, "root_test", NULL, 0);\r
+               api_root = NULL;\r
+               api_attr = NULL;\r
+       }\r
+       return(api_doc);\r
+}\r
+static xmlDocPtr\r
+__get_api_doc(void) {\r
+       if (api_doc == NULL) {\r
+               char *docname = INPUT_XML;\r
+               api_doc = xmlParseFile(docname);\r
+               api_root = NULL;\r
+               api_attr = NULL;\r
+       }\r
+       return(api_doc);\r
+}\r
+static xmlNodePtr\r
+get_api_root(void) {\r
+       if ((api_root == NULL) || (api_root->type != XML_ELEMENT_NODE)) {\r
+               get_api_doc();\r
+               if ((api_doc != NULL) && (api_doc->children != NULL) &&\r
+                       (api_doc->children->next != NULL) &&\r
+                       (api_doc->children->next->type == XML_ELEMENT_NODE))\r
+                       api_root = api_doc->children->next;\r
+       }\r
+       return(api_root);\r
+}\r
+static xmlNodePtr\r
+__get_api_root(void) {\r
+       if ((api_root == NULL) || (api_root->type != XML_ELEMENT_NODE)) {\r
+               __get_api_doc();\r
+               if ((api_doc != NULL) && (api_doc->children != NULL) &&\r
+                       (api_doc->children->next != NULL) &&\r
+                       (api_doc->children->next->type == XML_ELEMENT_NODE))\r
+                       api_root = api_doc->children->next;\r
+       }\r
+       return(api_root);\r
+}\r
+#define gen_nb_xmlNodePtr 3\r
+static xmlNodePtr gen_xmlNodePtr(int no, int nr ATTRIBUTE_UNUSED) {\r
+       if (no == 0) return(xmlNewPI(BAD_CAST "test", NULL));\r
+       if (no == 1) \r
+               return(__get_api_root());\r
+       return(NULL);\r
+       /*     if (no == 2) return((xmlNodePtr) get_api_doc()); */\r
+}\r
+\r
+static void des_xmlNodePtr(int no, xmlNodePtr val, int nr ATTRIBUTE_UNUSED) {\r
+    if (no == 1) {\r
+        free_api_doc();\r
+    } else if (val != NULL) {\r
+        xmlUnlinkNode(val);\r
+        xmlFreeNode(val);\r
+    }\r
+}\r
+\r
+/***************************************************************************\r
+ * SUTsXmlXPath\r
+ ***************************************************************************/\r
+  /*\r
+ * update_xpath_nodes:\r
+ * @nodes:             the nodes set.\r
+ * @value:             the new value for the node(s)\r
+ *\r
+ * Prints the @nodes content to @output.\r
+ */\r
+ void\r
+ __update_xpath_nodes(xmlDocPtr doc,xmlNodeSetPtr nodes, const xmlChar* value)\r
+ {\r
+        int size;\r
+        int i;\r
+        int count;\r
+        xmlChar *keyword;\r
+\r
+        if(!value)\r
+        {\r
+                DTS_FAIL("__update_xpath_nodes","value is NULL");\r
+        }\r
+        size = (nodes) ? nodes->nodeNr : 0;\r
+\r
+        /*\r
+        * NOTE: the nodes are processed in reverse order, i.e. reverse document\r
+        *       order because xmlNodeSetContent can actually free up descendant\r
+        *       of the node and such nodes may have been selected too ! Handling\r
+        *       in reverse order ensure that descendant are accessed first, before\r
+        *       they get removed. Mixing XPath and modifications on a tree must be\r
+        *       done carefully !\r
+        */\r
+        for(i = size - 1; i >= 0; i--)\r
+        {\r
+                if(!(nodes->nodeTab[i]))\r
+                {\r
+                        DTS_FAIL("__update_xpath_nodes", "nodes->nodeTab is NULL");\r
+                }\r
+                xmlNodeSetContent(nodes->nodeTab[i], value);\r
+\r
+                for (count=0; count < nodes->nodeNr; count++) {\r
+                        keyword = xmlNodeListGetString(doc, nodes->nodeTab[count]->xmlChildrenNode,1);\r
+                       DTS_CHECK_EQ_MESSAGE("__update_xpath_nodes", (void *)(xmlStrcmp(keyword,(const xmlChar *)"SISO")), (void *)0, "xmlNodeListGetString Failed");\r
+                        xmlFree(keyword);\r
+                }\r
+\r
+                /*\r
+                * All the elements returned by an XPath query are pointers to\r
+                * elements from the tree *except* namespace nodes where the XPath\r
+                * semantic is different from the implementation in libxml2 tree.\r
+                * As a result when a returned node set is freed when\r
+                * xmlXPathFreeObject() is called, that routine must check the\r
+                * element type. But node from the returned set may have been removed\r
+                * by xmlNodeSetContent() resulting in access to freed data.\r
+                * This can be exercised by running\r
+                *       valgrind xpath2 test3.xml '//discarded' discarded\r
+                * There is 2 ways around it:\r
+                *   - make a copy of the pointers to the nodes from the result set\r
+                *     then call xmlXPathFreeObject() and then modify the nodes\r
+                * or\r
+                *   - remove the reference to the modified nodes from the node set\r
+                *     as they are processed, if they are not namespace nodes.\r
+                */\r
+                if (nodes->nodeTab[i]->type != XML_NAMESPACE_DECL)\r
+                        nodes->nodeTab[i] = NULL;\r
+        }\r
+ }\r
+ void __XPathCommonInitFunc()\r
+ {\r
+        const char                                     *filename       = INPUT_XML;\r
+        const xmlChar                          *xpathExpr      = (xmlChar*) "//SUBJECT";\r
+       // const xmlChar                                *value          = (const xmlChar*)  "SISO";\r
+\r
+        /* Init libxml */\r
+        //xmlInitParser();\r
+       // LIBXML_TEST_VERSION\r
+\r
+                /* Load XML document */\r
+                DocInitPtr = xmlParseFile(filename);\r
+        if (DocInitPtr == NULL)\r
+        {\r
+                DTS_FAIL("__XPathCommonInitFunc","Error: unable to parse file ");\r
+        }\r
+        /* Create xpath evaluation context */\r
+        xpathCtxInitPtr = xmlXPathNewContext(DocInitPtr);\r
+        if(xpathCtxInitPtr == NULL)\r
+        {\r
+                xmlFreeDoc(DocInitPtr);\r
+                DTS_FAIL("__XPathCommonInitFunc","Error: unable to create new XPath context");\r
+        }\r
+        xpathObjInitPtr = xmlXPathEvalExpression(xpathExpr, xpathCtxInitPtr);\r
+        if(xpathObjInitPtr == NULL)\r
+        {\r
+                xmlXPathFreeContext(xpathCtxInitPtr);\r
+                xmlFreeDoc(DocInitPtr);\r
+                DTS_FAIL("__XPathCommonInitFunc","Error: unable to evaluate xpath expression ");\r
+        }\r
+#if 0\r
+       // __update_xpath_nodes(DocInitPtr,xpathObjInitPtr->nodesetval, value);\r
+\r
+        int size = (xpathObjInitPtr->nodesetval) ? xpathObjInitPtr->nodesetval->nodeNr : 0;\r
+        /*\r
+        * NOTE: the nodes are processed in reverse order, i.e. reverse document\r
+        *       order because xmlNodeSetContent can actually free up descendant\r
+        *       of the node and such nodes may have been selected too ! Handling\r
+        *       in reverse order ensure that descendant are accessed first, before\r
+        *       they get removed. Mixing XPath and modifications on a tree must be\r
+        *       done carefully !\r
+        */\r
+        for(int i = size - 1; i >= 0; i--)\r
+        {\r
+                if(!(xpathObjInitPtr->nodesetval->nodeTab[i]))\r
+                {\r
+                        DTS_FAIL("__XPathCommonInitFunc","nodes->nodeTab is NULL");\r
+                }\r
+                xmlNodeAddContent(xpathObjInitPtr->nodesetval->nodeTab[i], value);\r
+        }\r
+        xpathObjInitPtr->stringval = (xmlChar*) "SISO";\r
+        xpathObjInitPtr->floatval  = 1.0;\r
+#endif\r
+        pctxtInitPtr = xmlXPathNewParserContext(xpathExpr, xpathCtxInitPtr);\r
+        if(pctxtInitPtr == NULL)\r
+        {\r
+                xmlXPathFreeContext(xpathCtxInitPtr);\r
+                xmlFreeDoc(DocInitPtr);\r
+                xmlXPathFreeContext(xpathCtxInitPtr);\r
+                DTS_FAIL("__XPathCommonInitFunc","Error: unable to create xmlXPathNewParserContext ");\r
+        }\r
+       DTS_CHECK_NE_MESSAGE("__XPathCommonInitFunc", (void *)(pctxtInitPtr), (void *)NULL, "xmlXPathNewParserContext API return value");\r
+\r
+ }\r
+ void __XPathCommonDeleteFunc()\r
+ {\r
+        if (NULL != DocInitPtr)\r
+        {\r
+                xmlFreeDoc(DocInitPtr);\r
+        }\r
+        if (NULL != xpathObjInitPtr)\r
+        {\r
+                xmlXPathFreeObject(xpathObjInitPtr);\r
+        }\r
+        if (NULL != xpathCtxInitPtr)\r
+        {\r
+                xmlXPathFreeContext(xpathCtxInitPtr);\r
+        }\r
+        if (NULL != pctxtInitPtr)\r
+        {\r
+                xmlXPathFreeParserContext(pctxtInitPtr);\r
+        }\r
+\r
+ }\r
+xmlXPathObjectPtr getnodeset (xmlDocPtr doc, xmlChar *xpath)\r
+{\r
+       xmlXPathContextPtr context;\r
+       xmlXPathObjectPtr result;\r
+       context = xmlXPathNewContext(doc);\r
+       if (context == NULL) {\r
+               DTS_PRINT("getnodeset", "Error in xmlXPathNewContext\n");\r
+               return NULL;\r
+       }\r
+       result = xmlXPathEvalExpression(xpath, context);\r
+       xmlXPathFreeContext(context);\r
+       if (result == NULL) {\r
+               DTS_PRINT("getnodeset", "Error in xmlXPathEvalExpression\n");\r
+               return NULL;\r
+       }\r
+       if(xmlXPathNodeSetIsEmpty(result->nodesetval)){\r
+               xmlXPathFreeObject(result);\r
+               DTS_PRINT("getnodeset", "No Result\n");\r
+               return NULL;\r
+       }\r
+       return result;\r
+}\r
+       /**    \r
+       * @test                 UTcXPathP01\r
+       * @brief                xmlChar * xmlNodeListGetString  (xmlDocPtr doc, xmlNodePtr list, int inLine)\r
+       * @desc                 Positive Test for building the string equivalent to the text contained in the Node list made of TEXTs and ENTITY_REFs\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Get the Document pointer and the node set, Free the document pointer and the node set, Deallocate memories] @n\r
+                                       {xmlNodePtr *, xmlDocPtr *, inline:1} => {"Your impressions" | N/A} @n\r
+                                       input1: [Get the Document pointer and the node set, Free the document pointer and the node set, Deallocate memories] @n\r
+                                       {xmlNodePtr *, xmlDocPtr *, inline:1} => {"Tutorial Writer" | N/A} @n\r
+                                       input1: [Get the Document pointer and the node set, Free the document pointer and the node set, Deallocate memories] @n\r
+                                       {xmlDocPtr(doc) , xmlNodePtr(list), int} => {"Tutorial Takers" | N/A} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcXPathP01()\r
+{\r
+       char *docname = INPUT_XML;\r
+       xmlDocPtr doc;\r
+       xmlChar *xpath = (xmlChar*) "//SUBJECT";\r
+\r
+       xmlNodeSetPtr nodeset;\r
+       xmlXPathObjectPtr result;\r
+       int i;\r
+       xmlChar *keyword;\r
+\r
+       doc = xmlParseFile(docname);\r
+\r
+       result = getnodeset (doc, xpath);\r
+       if (result) {\r
+               nodeset = result->nodesetval;\r
+               for (i=0; i < nodeset->nodeNr; i++) {\r
+                       keyword = xmlNodeListGetString(doc, nodeset->nodeTab[i]->xmlChildrenNode,1);\r
+                       DTS_CHECK_EQ_MESSAGE("UTcXPathP01", (void *)(xmlStrcmp(keyword,(const xmlChar *)"Your impressions")), (void *)0, "xmlNodeListGetString Failed");\r
+\r
+                       xmlFree(keyword);\r
+               }\r
+       }\r
+       xmlXPathFreeObject (result);\r
+       xpath = (xmlChar*) "//FROM";\r
+       result = getnodeset (doc, xpath);\r
+       if (result) {\r
+               nodeset = result->nodesetval;\r
+               for (i=0; i < nodeset->nodeNr; i++) {\r
+                       keyword = xmlNodeListGetString(doc, nodeset->nodeTab[i]->xmlChildrenNode,1);\r
+                       DTS_CHECK_EQ_MESSAGE("UTcXPathP01", (void *)(xmlStrcmp(keyword,(const xmlChar *)"Tutorial Writer")), (void *)0, "xmlNodeListGetString Failed");\r
+                       xmlFree(keyword);\r
+               }\r
+       }\r
+       xmlXPathFreeObject (result);\r
+       xpath = (xmlChar*) "//TO";\r
+       result = getnodeset (doc, xpath);\r
+       if (result) {\r
+               nodeset = result->nodesetval;\r
+               for (i=0; i < nodeset->nodeNr; i++) {\r
+                       keyword = xmlNodeListGetString(doc, nodeset->nodeTab[i]->xmlChildrenNode,1);\r
+                       DTS_CHECK_EQ_MESSAGE("UTcXPathP01", (void *)(xmlStrcmp(keyword,(const xmlChar *)"Tutorial Takers")), (void *)0, "xmlNodeListGetString Failed");\r
+                       \r
+                       xmlFree(keyword);\r
+               }\r
+       }\r
+\r
+       xmlXPathFreeObject (result);\r
+       xmlFreeDoc(doc);\r
+}\r
+\r
+/*\r
+* UTcXPathP02:\r
+* @filename                    :the input XML filename.\r
+* @xpathExpr           :the xpath expression for evaluation.\r
+* @value                       :the new node content.\r
+*\r
+* Parses input XML file, evaluates XPath expression and update the nodes\r
+* then print the result.\r
+*\r
+*/\r
+/**    \r
+       * @test                 UTcXPathP02\r
+       * @brief                void    xmlXPathFreeContext             (xmlXPathContextPtr ctxt)\r
+       * @desc                 Positive Test for Freeing up an xmlXPathContext\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Load the document, Free the document] @n\r
+       *                       {xmlXPathContextPtr} => {N/A | N/A} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcXPathP02()\r
+{\r
+       const char              *filename       = INPUT_XML;\r
+       const xmlChar   *xpathExpr      = (xmlChar*) "//SUBJECT";\r
+       const xmlChar   *value          = (const xmlChar*)  "SISO";\r
+\r
+       /* Init libxml */\r
+       //xmlInitParser();\r
+       //LIBXML_TEST_VERSION\r
+\r
+       xmlDocPtr doc;\r
+       xmlXPathContextPtr xpathCtx;\r
+       xmlXPathObjectPtr xpathObj;\r
+\r
+       /* Load XML document */\r
+       doc = xmlParseFile(filename);\r
+       if (doc == NULL)\r
+       {\r
+               DTS_FAIL("UTcXPathP02", "Error: unable to parse file ");\r
+       }\r
+\r
+       /* Create xpath evaluation context */\r
+       xpathCtx = xmlXPathNewContext(doc);\r
+       if(xpathCtx == NULL)\r
+       {\r
+               xmlFreeDoc(doc);\r
+               DTS_FAIL("UTcXPathP02", "Error: unable to create new XPath context");\r
+       }\r
+\r
+       /* Evaluate xpath expression */\r
+       xpathObj = xmlXPathEvalExpression(xpathExpr, xpathCtx);\r
+       if(xpathObj == NULL)\r
+       {\r
+               xmlXPathFreeContext(xpathCtx);\r
+               xmlFreeDoc(doc);\r
+               DTS_FAIL("UTcXPathP02", "Error: unable to evaluate xpath expression ");\r
+       }\r
+\r
+       /* update selected nodes */\r
+       __update_xpath_nodes(doc,xpathObj->nodesetval, value);\r
+\r
+       /* Cleanup of XPath data */\r
+       xmlXPathFreeObject(xpathObj);\r
+       xmlXPathFreeContext(xpathCtx);\r
+\r
+       /* dump the resulting document */\r
+       //xmlDocDump(stdout, doc);\r
+\r
+       /* free the document */\r
+       xmlFreeDoc(doc);\r
+\r
+}\r
+       /**    \r
+       * @test                 UTcxmlXPathCastBooleanToNumberP01\r
+       * @brief                double  xmlXPathCastBooleanToNumber     (int val)\r
+       * @desc                 Positive Test for converting a boolean to its number value\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {int(0 to 4)} => { N/A | (1.0 or 0.0) } @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlXPathCastBooleanToNumberP01() {\r
+       double ret_val;\r
+       int val; /* a boolean */\r
+       int n_val;\r
+       char Buff[64] = {0,};\r
+       \r
+       for (n_val = 0;n_val < gen_nb_int;n_val++)\r
+       {\r
+               val = gen_int(n_val, 0);\r
+               /**\r
+               * @remarks   input1: [N/A, N/A] @n\r
+               *            {0 to 4} => { N/A | (1.0 or 0.0) } @n\r
+               */\r
+               ret_val = xmlXPathCastBooleanToNumber(val);\r
+               memset(Buff, 0, 8);\r
+               snprintf(Buff, 7, "%f", ret_val);\r
+               DTS_PASS("xmlXPathCastBooleanToNumber", "1" );\r
+       }\r
+\r
+}\r
+       /**    \r
+       * @test                 UTcxmlXPathCastBooleanToStringP01\r
+       * @brief                xmlChar *       xmlXPathCastBooleanToString     (int val)\r
+       * @desc                 Positive Test for converting a boolean to its string value.\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {int(0 to 4)} => { N/A | not NULL } @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlXPathCastBooleanToStringP01()\r
+{\r
+       xmlChar * ret_val;\r
+       int val; /* a boolean */\r
+       int n_val;\r
+       for (n_val = 0;n_val < gen_nb_int;n_val++)\r
+       {\r
+               val = gen_int(n_val, 0);\r
+               /**\r
+               * @remarks   input1: [N/A, N/A] @n\r
+               *            {0 to 4} => { N/A | not NULL } @n\r
+               */\r
+               ret_val = xmlXPathCastBooleanToString(val);\r
+               DTS_CHECK_NE_MESSAGE("xmlXPathCastBooleanToString", (void *)ret_val, (void *)(NULL), "xmlXPathCastBooleanToString Failed");\r
+               \r
+               if (ret_val != NULL)\r
+               {\r
+                       xmlFree(ret_val);\r
+               }\r
+       }\r
+}\r
+       /**    \r
+       * @test                 UTcxmlXPathCastNodeSetToBooleanP01\r
+       * @brief                int     xmlXPathCastNodeSetToBoolean (xmlNodeSetPtr ns)\r
+       * @desc                 Positive Test for converting a node-set to its boolean value\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlNodeSetPtr(ns)} => { N/A | 0 } @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlXPathCastNodeSetToBooleanP01()\r
+{\r
+       int ret_val;\r
+       xmlNodeSetPtr ns; /* a node-set */\r
+       int n_ns;\r
+\r
+       for (n_ns = 0;n_ns < gen_nb_xmlNodeSetPtr;n_ns++)\r
+       {\r
+               ns = gen_xmlNodeSetPtr(n_ns, 0);\r
+               /**\r
+               * @remarks   input1: [N/A, N/A] @n\r
+               *            {xmlNodeSetPtr} => { N/A | 0 } @n\r
+               */\r
+               ret_val = xmlXPathCastNodeSetToBoolean(ns);\r
+               DTS_CHECK_EQ_MESSAGE("xmlXPathCastNodeSetToBoolean", (void *)ret_val, (void *)(1), "xmlXPathCastNodeSetToBoolean Failed");\r
+\r
+               xmlXPathFreeNodeSet(ns);\r
+               //__DeletexmlNodeSetPtr();\r
+               /* Shutdown libxml */\r
+               ////xmlCleanupParser();\r
+       }\r
+}\r
+       /**    \r
+       * @test                 UTcxmlXPathCastNodeSetToNumberP01\r
+       * @brief                double  xmlXPathCastNodeSetToNumber     (xmlNodeSetPtr ns)\r
+       * @desc                 Positive Test for converting a node-set to its number value\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlNodeSetPtr(ns)} => { N/A | a non zero number } @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlXPathCastNodeSetToNumberP01()\r
+{\r
+       double ret_val;\r
+       xmlNodeSetPtr ns; /* a node-set */\r
+       int n_ns;\r
+\r
+       for (n_ns = 0;n_ns < gen_nb_xmlNodeSetPtr;n_ns++)\r
+       {\r
+               ns = gen_xmlNodeSetPtr(n_ns, 0);\r
+               DTS_CHECK_NE_MESSAGE("xmlXPathCastNodeSetToNumber", (void *)ns, (void *)NULL, "gen_xmlNodeSetPtr Failed");\r
+               \r
+               /**\r
+               * @remarks   input1: [N/A, N/A] @n\r
+               *            {xmlNodeSetPtr} => { N/A | a non zero number } @n\r
+               */\r
+               ret_val = xmlXPathCastNodeSetToNumber(ns);\r
+               DTS_CHECK_EQ_MESSAGE("xmlXPathCastNodeSetToNumber", (void *)(xmlXPathIsNaN(ret_val)), (void *)(1), "xmlXPathCastNodeSetToNumber Failed");\r
+\r
+               __DeletexmlNodeSetPtr();\r
+               /* Shutdown libxml */\r
+               ////xmlCleanupParser();\r
+       }\r
+}\r
+       /**    \r
+       * @test                 UTcxmlXPathCastNodeSetToStringP01\r
+       * @brief                xmlChar *       xmlXPathCastNodeSetToString     (xmlNodeSetPtr ns)\r
+       * @desc                 Positive Test for converting a node-set to its string value.\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlNodeSetPtr(ns)} => { N/A | xmlChar * } @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlXPathCastNodeSetToStringP01()\r
+{\r
+       xmlChar * ret_val;\r
+       xmlNodeSetPtr ns; /* a node-set */\r
+       int n_ns;\r
+\r
+       for (n_ns = 0;n_ns < gen_nb_xmlNodeSetPtr;n_ns++)\r
+       {\r
+               ns = gen_xmlNodeSetPtr(n_ns, 0);\r
+               /**\r
+               * @remarks   input1: [N/A, N/A] @n\r
+               *            {xmlNodeSetPtr} => { N/A | xmlChar * } @n\r
+               */\r
+               ret_val = xmlXPathCastNodeSetToString(ns);\r
+               DTS_CHECK_NE_MESSAGE("xmlXPathCastNodeSetToString", (void *)ret_val, (void *)(NULL), "xmlXPathCastNodeSetToString Failed");\r
+               \r
+               //xmlXPathFreeNodeSet(ns);\r
+               __DeletexmlNodeSetPtr();\r
+               if (ret_val != NULL)\r
+               {\r
+                       xmlFree(ret_val);\r
+               }\r
+               /* Shutdown libxml */\r
+               ////xmlCleanupParser();\r
+\r
+       }\r
+\r
+}\r
+       /**    \r
+       * @test                 UTcxmlXPathCastNodeToNumberP01\r
+       * @brief                double  xmlXPathCastNodeToNumber        (xmlNodePtr node)\r
+       * @desc                 Positive Test for converting a node to its number value\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlNodePtr(node)} => { N/A | double } @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlXPathCastNodeToNumberP01()\r
+{\r
+       double ret_val;\r
+       xmlNodePtr node; /* a node */\r
+       int n_node;\r
+\r
+       for (n_node = 0;n_node < gen_nb_xmlNodePtr-2;n_node++)\r
+       {\r
+               node = gen_xmlNodePtr(n_node, 0);\r
+               DTS_CHECK_NE_MESSAGE("xmlXPathCastNodeToNumber", (void *)node, (void *)NULL, "xmlXPathCastNodeToNumber Failed");\r
+               /**\r
+               * @remarks   input1: [N/A, N/A] @n\r
+               *            {xmlNodePtr} => { N/A | double } @n\r
+               */\r
+               ret_val = xmlXPathCastNodeToNumber(node);\r
+               DTS_CHECK_EQ_MESSAGE("xmlXPathCastNodeToNumber", (void *)(xmlXPathIsNaN(ret_val)), (void *)(1), "xmlXPathCastNodeToNumber Failed");\r
+               \r
+               __free_api_doc();\r
+               if (node != NULL)\r
+               {\r
+                       xmlFreeNode(node);\r
+               }\r
+               /* Shutdown libxml */\r
+               ////xmlCleanupParser();\r
+       }\r
+\r
+}\r
+       /**    \r
+       * @test                 UTcxmlXPathCastNodeToStringP01\r
+       * @brief                xmlChar *       xmlXPathCastNodeToString        (xmlNodePtr node)\r
+       * @desc                 Positive Test for converting a node to its string value.\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlNodePtr} => { N/A | xmlChar * } @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlXPathCastNodeToStringP01()\r
+{\r
+       xmlChar * ret_val;\r
+       xmlNodePtr node; /* a node */\r
+       int n_node;\r
+\r
+       for(n_node = 0;n_node < gen_nb_xmlNodePtr;n_node++)\r
+       {\r
+               node = gen_xmlNodePtr(1, 0);\r
+               /**\r
+               * @remarks   input1: [N/A, N/A] @n\r
+               *            {xmlNodePtr} => { N/A | xmlChar * } @n\r
+               */\r
+               ret_val = xmlXPathCastNodeToString(node);\r
+               DTS_CHECK_NE_MESSAGE("xmlXPathCastNodeToNumber", (void *)ret_val, (void *)(NULL), "xmlXPathCastNodeToNumber Failed");\r
+               \r
+               __free_api_doc();\r
+               if (ret_val != NULL)\r
+               {\r
+                       xmlFree(ret_val);\r
+               }\r
+               //if (node != NULL)\r
+               //{\r
+               //      xmlFreeNode(node);\r
+               //}\r
+               /* Shutdown libxml */\r
+               //xmlCleanupParser();\r
+       }\r
+}\r
+       /**    \r
+       * @test                 UTcxmlXPathCastNumberToBooleanP01\r
+       * @brief                int     xmlXPathCastNumberToBoolean     (double val)\r
+       * @desc                 Positive Test for converting a number to its boolean value\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                        {double(val)} => { N/A | 1 } @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlXPathCastNumberToBooleanP01()\r
+{\r
+       int ret_val;\r
+       double val; /* a number */\r
+       int n_val;\r
+\r
+       for (n_val = 0;n_val < 2;n_val++)\r
+       {\r
+               val = gen_double(n_val, 0);\r
+               /**\r
+               * @remarks   input1: [N/A, N/A] @n\r
+               *            {double} => { N/A | 1 } @n\r
+               */\r
+               ret_val = xmlXPathCastNumberToBoolean(val);\r
+               if (val)\r
+               {\r
+                       DTS_CHECK_EQ_MESSAGE("xmlXPathCastNumberToBoolean", (void *)ret_val, (void *)(1), "xmlXPathCastNumberToBoolean Failed");\r
+               }\r
+               else\r
+               {\r
+                       DTS_CHECK_EQ_MESSAGE("xmlXPathCastNumberToBoolean", (void *)ret_val, (void *)(0), "xmlXPathCastNumberToBoolean Failed");\r
+               }\r
+       }\r
+}\r
+       /**    \r
+       * @test                 UTcxmlXPathCastNumberToStringP01\r
+       * @brief                xmlChar *       xmlXPathCastNumberToString      (double val)\r
+       * @desc                 Positive Test for converting a number to its string value.\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {doubleval)} => { N/A | xmlChar * } @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlXPathCastNumberToStringP01()\r
+ {\r
+       xmlChar * ret_val;\r
+       double val; /* a number */\r
+       int n_val;\r
+\r
+       for (n_val = 0;n_val < gen_nb_double;n_val++)\r
+       {\r
+               val = gen_double(n_val, 0);\r
+               /**\r
+               * @remarks   input1: [N/A, N/A] @n\r
+               *            {double} => { N/A | xmlChar * } @n\r
+               */\r
+               ret_val = xmlXPathCastNumberToString(val);\r
+               DTS_CHECK_NE_MESSAGE("xmlXPathCastNumberToString", (void *)ret_val, (void *)(NULL), "xmlXPathCastNumberToString Failed");\r
+               if (ret_val != NULL)\r
+               {\r
+                       xmlFree(ret_val);\r
+               }\r
+       }\r
+\r
+}\r
+       /**    \r
+       * @test                 UTcxmlXPathCastStringToBooleanP01\r
+       * @brief                int     xmlXPathCastStringToBoolean     (const xmlChar * val)\r
+       * @desc                 Positive Test for converting a string to its boolean value\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {const xmlChar(val)} => { N/A | 1 } @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlXPathCastStringToBooleanP01()\r
+ {\r
+       int ret_val;\r
+       xmlChar * val; /* a string */\r
+       int n_val;\r
+\r
+       for (n_val = 0;n_val < gen_nb_const_xmlChar_ptr;n_val++)\r
+       {\r
+               val = gen_const_xmlChar_ptr(n_val, 0);\r
+               /**\r
+               * @remarks   input1: [N/A, N/A] @n\r
+               *            {(const xmlChar *)} => { N/A | 1 } @n\r
+               */\r
+               ret_val = xmlXPathCastStringToBoolean((const xmlChar *)val);\r
+               if (val)\r
+               {\r
+                       DTS_CHECK_EQ_MESSAGE("xmlXPathCastStringToBoolean", (void *)ret_val, (void *)(1), "xmlXPathCastStringToBoolean Failed");\r
+               }\r
+               else\r
+               {\r
+                       DTS_CHECK_EQ_MESSAGE("xmlXPathCastStringToBoolean", (void *)ret_val, (void *)(0), "xmlXPathCastStringToBoolean Failed");\r
+               }\r
+       }\r
+}\r
+       /**    \r
+       * @test                 UTcxmlXPathCastStringToNumberP01\r
+       * @brief                double  xmlXPathCastStringToNumber (const xmlChar * val)\r
+       * @desc                 Positive Test for converting a string to its number value\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {const xmlChar(val)} => { N/A | 1 } @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlXPathCastStringToNumberP01()\r
+{\r
+       double ret_val;\r
+       xmlChar * val; /* a string */\r
+       int n_val;\r
+\r
+       for (n_val = 0;n_val < gen_nb_const_xmlChar_ptr-1;n_val++)\r
+       {\r
+               val = gen_const_xmlChar_ptr(n_val, 0);\r
+               /**\r
+               * @remarks   input1: [N/A, N/A] @n\r
+               *            {(const xmlChar *)} => { N/A | 1 } @n\r
+               */\r
+               ret_val = xmlXPathCastStringToNumber((const xmlChar *)val);\r
+               DTS_CHECK_EQ_MESSAGE("xmlXPathCastStringToNumber", (void *)(xmlXPathIsNaN(ret_val)), (void *)(1), "xmlXPathCastStringToNumber Failed");\r
+       }\r
+}\r
+       /**    \r
+       * @test                 UTcxmlXPathCastToBooleanP01\r
+       * @brief                int     xmlXPathCastToBoolean (xmlXPathObjectPtr val)\r
+       * @desc                 Positive Test for converting an XPath object to its boolean value\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlXPathObjectPtr(val)} => { N/A | 1 } @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlXPathCastToBooleanP01()\r
+{\r
+       int ret_val;\r
+       xmlXPathObjectPtr val; /* an XPath object */\r
+       int n_val;\r
+\r
+       for (n_val = 0;n_val < gen_nb_xmlXPathObjectPtr-2;n_val++) {\r
+               val = gen_xmlXPathObjectPtr(n_val, 0);// Its definition compilation errors...SYAM\r
+\r
+               /**\r
+               * @remarks   input1: [N/A, N/A] @n\r
+               *            {xmlXPathObjectPtr pointer} => { N/A | 1 } @n\r
+               */\r
+               ret_val = xmlXPathCastToBoolean(val);\r
+\r
+               DTS_CHECK_EQ_MESSAGE("xmlXPathCastToBoolean", (void *)ret_val, (void *)(1), "xmlXPathCastToBoolean Failed");\r
+               \r
+               if (val != NULL)\r
+               {\r
+                       xmlXPathFreeObject(val);\r
+               }\r
+       }\r
+\r
+}\r
+       /**    \r
+       * @test                 UTcxmlXPathCastToNumberP01\r
+       * @brief                double  xmlXPathCastToNumber (xmlXPathObjectPtr val)\r
+       * @desc                 Positive Test for converting an XPath object to its number value\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlXPathObjectPtr(val)} => { N/A | 1 } @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlXPathCastToNumberP01()\r
+{\r
+       double ret_val;\r
+       xmlXPathObjectPtr val; /* an XPath object */\r
+       int n_val;\r
+\r
+       for (n_val = 0;n_val < gen_nb_xmlXPathObjectPtr;n_val++)\r
+       {\r
+               val = gen_xmlXPathObjectPtr(n_val, 0);\r
+               /**\r
+               * @remarks   input1: [N/A, N/A] @n\r
+               *            {xmlXPathObjectPtr pointer} => { N/A | 1 } @n\r
+               */\r
+               ret_val = xmlXPathCastToNumber(val);\r
+               if(n_val == 1 || n_val == 2)\r
+               {\r
+                       DTS_CHECK_EQ_MESSAGE("xmlXPathCastToNumber", (void *)(xmlXPathIsNaN(ret_val)), (void *)(0), "xmlXPathCastToNumber Failed");\r
+               }\r
+               else\r
+               {\r
+                       DTS_CHECK_EQ_MESSAGE("xmlXPathCastToNumber", (void *)(xmlXPathIsNaN(ret_val)), (void *)(1), "xmlXPathCastToNumber Failed");\r
+               }\r
+               if (val != NULL)\r
+               {\r
+                       xmlXPathFreeObject(val);\r
+               }\r
+       }\r
+\r
+}\r
+       /**    \r
+       * @test                 UTcxmlXPathCastToStringP01\r
+       * @brief                xmlChar *       xmlXPathCastToString (xmlXPathObjectPtr val)\r
+       * @desc                 Positive Test for converting an existing object to its string() equivalent\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlXPathObjectPtr(val)} => { N/A | xmlChar pointer } @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlXPathCastToStringP01()\r
+{\r
+       xmlChar * ret_val;\r
+       xmlXPathObjectPtr val; /* an XPath object */\r
+       int n_val;\r
+\r
+       for (n_val = 0;n_val < gen_nb_xmlXPathObjectPtr;n_val++) {\r
+               val = gen_xmlXPathObjectPtr(n_val, 0);\r
+               /**\r
+               * @remarks   input1: [N/A, N/A] @n\r
+               *            {xmlXPathObjectPtr pointer} => { N/A | xmlChar pointer } @n\r
+               */\r
+               ret_val = xmlXPathCastToString(val);\r
+               DTS_CHECK_NE_MESSAGE("xmlXPathCastToString", (void *)ret_val, (void *)(NULL), "xmlXPathCastToString Failed");\r
+               if (val != NULL)\r
+               {\r
+                       xmlXPathFreeObject(val);\r
+               }\r
+               if (ret_val != NULL)\r
+               {\r
+                       xmlFree(ret_val);\r
+               }\r
+       }\r
+\r
+}\r
+       /**    \r
+       * @test                 UTcxmlXPathCmpNodesP01\r
+       * @brief                int xmlXPathCmpNodes (xmlNodePtr node1, xmlNodePtr node2)\r
+       * @desc                 Positive Test for comparing two nodes w.r.t document order\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlNodePtr(node1),xmlNodePtr(node2)} => { N/A | 0 } @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlXPathCmpNodesP01()\r
+{\r
+       int ret_val;\r
+       xmlNodePtr node1; /* the first node */\r
+       int n_node1 = 0;\r
+       xmlNodePtr node2; /* the second node */\r
+       int n_node2 = 0;\r
+\r
+       //for (n_node1 = 0;n_node1 < gen_nb_xmlNodePtr;n_node1++) {\r
+               //for (n_node2 = 0;n_node2 < gen_nb_xmlNodePtr;n_node2++)\r
+               //{\r
+                       node1 = gen_xmlNodePtr(n_node1, 0);\r
+                       node2 = gen_xmlNodePtr(n_node2, 1);\r
+                       //if ((n_node1 != 1) && (n_node2!= 1))// FAIL:Problem may be with test code.so kept check using get_api_root in it\r
+                       //{\r
+                               /**\r
+                               * @remarks   input1: [N/A, N/A] @n\r
+                               *            {xmlNodePtr pointer,xmlNodePtr pointer} => { N/A | 0 } @n\r
+                               */\r
+                               ret_val = xmlXPathCmpNodes(node1, node2);\r
+                       //}\r
+                       DTS_CHECK_NE_MESSAGE("xmlXPathCmpNodes", (void *)ret_val, (void *)(-1), "xmlXPathCmpNodes Failed");\r
+                       \r
+                       __free_api_doc();\r
+\r
+                       if (node1 != NULL)\r
+                       {\r
+                               xmlFreeNode(node1);\r
+                       }\r
+                       if (node2 != NULL)\r
+                       {\r
+                               xmlFreeNode(node2);\r
+                       }\r
+               //}\r
+       //}\r
+\r
+}\r
+       /**    \r
+       * @test                 UTcxmlXPathCompiledEvalP01\r
+       * @brief                xmlXPathObjectPtr xmlXPathCompiledEval  (xmlXPathCompExprPtr comp, xmlXPathContextPtr ctx)\r
+       * @desc                 Positive Test for evaluating the Precompiled XPath expression in the given context.\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlXPathCompExprPtr(comp),xmlXPathContextPtr(ctx)} => { N/A | xmlXPathObjectPtr pointer } @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlXPathCompiledEvalP01()\r
+{\r
+       xmlXPathObjectPtr ret_val;\r
+       xmlXPathContextPtr ctxt = gen_xmlXPathContextPtr(0, 1);\r
+       const xmlChar   *str            = (const xmlChar*)  "SISO";\r
+       xmlXPathCompExprPtr ret_comp_val = xmlXPathCtxtCompile(ctxt, str) ;\r
+\r
+       /**\r
+       * @remarks   input1: [N/A, N/A] @n\r
+       *            {xmlXPathCompExprPtr pointer,xmlXPathContextPtr pointer} => { N/A | xmlXPathObjectPtr pointer } @n\r
+       */\r
+       ret_val = xmlXPathCompiledEval(ret_comp_val, ctxt);\r
+       DTS_CHECK_NE_MESSAGE("xmlXPathCompiledEval", (void *)ret_val, (void *)(NULL), "xmlXPathCompiledEval Failed");\r
+\r
+       xmlXPathFreeContext(ctxt);\r
+       xmlXPathFreeObject(ret_val);\r
+       xmlXPathFreeCompExpr(ret_comp_val);\r
+       if (doc_get_api_root != NULL)\r
+       {\r
+               xmlFreeDoc(doc_get_api_root);\r
+               doc_get_api_root = NULL;\r
+       }\r
+       \r
+       /* Shutdown libxml */\r
+       //xmlCleanupParser();\r
+\r
+}\r
+       /**    \r
+       * @test                 UTcxmlXPathConvertBooleanP01\r
+       * @brief                xmlXPathObjectPtr       xmlXPathConvertBoolean  (xmlXPathObjectPtr val)\r
+       * @desc                 Positive Test for converting an existing object to its boolean() equivalent\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlXPathObjectPtr(val)} => { N/A | xmlXPathObjectPtr pointer } @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlXPathConvertBooleanP01()\r
+{\r
+       xmlXPathObjectPtr ret_val;\r
+       xmlXPathObjectPtr val; /* an XPath object */\r
+       int n_val;\r
+\r
+       for (n_val = 0;n_val < gen_nb_xmlXPathObjectPtr;n_val++) {\r
+               val = gen_xmlXPathObjectPtr(n_val, 0);\r
+               /**\r
+               * @remarks   input1: [N/A, N/A] @n\r
+               *            {xmlXPathObjectPtr pointer} => { N/A | xmlXPathObjectPtr pointer } @n\r
+               */\r
+               ret_val = xmlXPathConvertBoolean(val);\r
+               DTS_CHECK_NE_MESSAGE("xmlXPathConvertBoolean", (void *)ret_val, (void *)(NULL), "xmlXPathConvertBoolean Failed");\r
+               desret_xmlXPathObjectPtr(ret_val);\r
+               if (val != NULL)\r
+               {\r
+                       //xmlXPathFreeObject(val);\r
+               }\r
+       }\r
+\r
+}\r
+       /**    \r
+       * @test                 UTcxmlXPathConvertNumberP01\r
+       * @brief                xmlXPathObjectPtr       xmlXPathConvertNumber   (xmlXPathObjectPtr val)\r
+       * @desc                 Positive Test for converting an existing object to its number() equivalent\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlXPathObjectPtr(val)} => { N/A | xmlXPathObjectPtr pointer } @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlXPathConvertNumberP01()\r
+{\r
+       xmlXPathObjectPtr ret_val;\r
+       xmlXPathObjectPtr val; /* an XPath object */\r
+       int n_val;\r
+\r
+       for (n_val = 0;n_val < gen_nb_xmlXPathObjectPtr;n_val++) {\r
+               val = gen_xmlXPathObjectPtr(n_val, 0);\r
+               if (val != NULL)\r
+               {\r
+                       /**\r
+                       * @remarks   input1: [N/A, N/A] @n\r
+                       *            {xmlXPathObjectPtr pointer} => { N/A | xmlXPathObjectPtr pointer } @n\r
+                       */\r
+                       ret_val = xmlXPathConvertNumber(val);\r
+                       DTS_CHECK_NE_MESSAGE("xmlXPathConvertNumber", (void *)ret_val, (void *)(NULL), "xmlXPathConvertNumber Failed");\r
+                       desret_xmlXPathObjectPtr(ret_val);\r
+                       //xmlXPathFreeObject(val);\r
+                       val = NULL;\r
+               }\r
+       }\r
+\r
+}\r
+       /**    \r
+       * @test                 UTcxmlXPathConvertStringP01\r
+       * @brief                xmlXPathObjectPtr       xmlXPathConvertString   (xmlXPathObjectPtr val)\r
+       * @desc                 Positive Test for converting an existing object to its string() equivalent\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlXPathObjectPtr (val)} => { N/A | xmlXPathObjectPtr pointer } @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlXPathConvertStringP01()\r
+{\r
+       xmlXPathObjectPtr ret_val;\r
+       xmlXPathObjectPtr val; /* an XPath object */\r
+       int n_val;\r
+\r
+       for (n_val = 0;n_val < gen_nb_xmlXPathObjectPtr;n_val++) {\r
+               val = gen_xmlXPathObjectPtr(n_val, 0);\r
+               if (val != NULL)\r
+               {\r
+               /**\r
+               * @remarks   input1: [N/A, N/A] @n\r
+               *            {xmlXPathObjectPtr pointer} => { N/A | xmlXPathObjectPtr pointer } @n\r
+               */\r
+               ret_val = xmlXPathConvertString(val);\r
+               DTS_CHECK_NE_MESSAGE("xmlXPathConvertString", (void *)ret_val, (void *)(NULL), "xmlXPathConvertString Failed");\r
+               desret_xmlXPathObjectPtr(ret_val);\r
+               //      xmlXPathFreeObject(val);\r
+               val = NULL;\r
+               }\r
+       }\r
+}\r
+       /**    \r
+       * @test                 UTcxmlXPathEvalP01\r
+       * @brief                xmlXPathObjectPtr xmlXPathEval  (const xmlChar * str, xmlXPathContextPtr ctx)\r
+       * @desc                 Positive Test for evaluating the XPath Location Path in the given context.\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       { (const xmlChar (str)), xmlXPathContextPtr(ctx)} => { N/A | xmlXPathObjectPtr pointer } @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlXPathEvalP01()\r
+ {\r
+       xmlXPathObjectPtr ret_val;\r
+       xmlChar * str; /* the XPath expression */\r
+       xmlXPathContextPtr ctx; /* the XPath context */\r
+\r
+       str = gen_const_xmlChar_ptr(1, 0);\r
+       ctx = gen_xmlXPathContextPtr(1, 1);\r
+       /**\r
+       * @remarks   input1: [N/A, N/A] @n\r
+       *            { (const xmlChar *), xmlXPathContextPtr pointer} => { N/A | xmlXPathObjectPtr pointer } @n\r
+       */\r
+       ret_val = xmlXPathEval((const xmlChar *)str , ctx);\r
+       DTS_CHECK_NE_MESSAGE("xmlXPathEval", (void *)ret_val, (void *)(NULL), "xmlXPathEval Failed");\r
+       desret_xmlXPathObjectPtr(ret_val);\r
+\r
+       if (NULL != ctx)\r
+       {\r
+               xmlXPathFreeContext(ctx);\r
+       }\r
+       if (doc_get_api_root != NULL)\r
+       {\r
+               xmlFreeDoc(doc_get_api_root);\r
+               doc_get_api_root = NULL;\r
+       }\r
+       /* Shutdown libxml */\r
+       //xmlCleanupParser();\r
+\r
+}\r
+       /**    \r
+       * @test                 UTcxmlXPathEvalPredicateP01\r
+       * @brief                int xmlXPathEvalPredicate (xmlXPathContextPtr ctxt, xmlXPathObjectPtr res)\r
+       * @desc                 Positive Test for evaluating a predicate result for the current node\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       { xmlNodePtr pointer} => { N/A | 0 } @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlXPathEvalPredicateP01()\r
+ {\r
+        xmlXPathObjectPtr ret_val;\r
+        xmlXPathContextPtr ctxt = gen_xmlXPathContextPtr(0, 1);\r
+        const xmlChar  *str            = (const xmlChar*)  "SISO";\r
+        xmlXPathCompExprPtr ret_comp_val = xmlXPathCtxtCompile(ctxt, str) ;\r
+        ret_val = xmlXPathCompiledEval(ret_comp_val, ctxt);\r
+\r
+       int retval;\r
+\r
+       /**\r
+       * @remarks   input1: [N/A, N/A] @n\r
+       *            { xmlNodePtr pointer} => { N/A | 0 } @n\r
+       */\r
+       //Have to pass proper inputs for prediction (1)\r
+       retval = xmlXPathEvalPredicate(ctxt, ret_val);\r
+       DTS_CHECK_NE_MESSAGE("xmlXPathEvalPredicate", (void *)ret_val, (void *)(0), "xmlXPathEvalPredicate Failed");\r
+\r
+       xmlXPathFreeContext(ctxt);\r
+       xmlXPathFreeObject(ret_val);\r
+       if (ret_comp_val != NULL)\r
+       {\r
+               xmlXPathFreeCompExpr(ret_comp_val);\r
+       }\r
+       if (doc_get_api_root != NULL)\r
+       {\r
+               xmlFreeDoc(doc_get_api_root);\r
+               doc_get_api_root = NULL;\r
+       }\r
+       /* Shutdown libxml */\r
+       //xmlCleanupParser();\r
+\r
+}\r
+       /**    \r
+       * @test                 UTcxmlXPathNodeSetCreateP01\r
+       * @brief                xmlNodeSetPtr xmlXPathNodeSetCreate (xmlNodePtr val)\r
+       * @desc                 Positive Test creating a new xmlNodeSetPtr of type double and of value @val\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       { xmlNodePtr(val)} => { N/A | xmlNodeSetPtr pointer } @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlXPathNodeSetCreateP01()\r
+{\r
+       xmlNodeSetPtr ret_val;\r
+       xmlNodePtr val; /* an initial xmlNodePtr, or NULL */\r
+       int n_val;\r
+\r
+       for (n_val = 0;n_val < gen_nb_xmlNodePtr-2;n_val++) {\r
+               val = gen_xmlNodePtr(n_val, 0);\r
+               /**\r
+               * @remarks   input1: [N/A, N/A] @n\r
+               *            { xmlNodePtr pointer} => { N/A | xmlNodeSetPtr pointer } @n\r
+               */\r
+               ret_val = xmlXPathNodeSetCreate(val);\r
+               DTS_CHECK_NE_MESSAGE("xmlXPathNodeSetCreate", (void *)ret_val, (void *)(NULL), "xmlXPathNodeSetCreate Failed");\r
+               des_xmlNodePtr(n_val, val, 0);\r
+               if (ret_val != NULL)\r
+               {\r
+                       xmlXPathFreeNodeSet(ret_val);\r
+               }\r
+\r
+               __free_api_doc();\r
+               /* Shutdown libxml */\r
+               ////xmlCleanupParser();\r
+       }\r
+}\r
+       /**    \r
+       * @test                 UTcxmlXPathObjectCopyP01\r
+       * @brief                xmlXPathObjectPtr       xmlXPathObjectCopy      (xmlXPathObjectPtr val)\r
+       * @desc                 Positive Test for allocating a new copy of a given object\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       { xmlXPathObjectPtr(val)} => { N/A | xmlXPathObjectPtr pointer } @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlXPathObjectCopyP01()\r
+{\r
+       xmlXPathObjectPtr ret_val;\r
+       xmlXPathObjectPtr val; /* the original object */\r
+       int n_val;\r
+\r
+       for (n_val = 0;n_val < gen_nb_xmlXPathObjectPtr -1;n_val++) {\r
+               val = gen_xmlXPathObjectPtr(n_val, 0);\r
+               /**\r
+               * @remarks   input1: [N/A, N/A] @n\r
+               *            { xmlXPathObjectPtr pointer} => { N/A | xmlXPathObjectPtr pointer } @n\r
+               */\r
+               ret_val = xmlXPathObjectCopy(val);\r
+               DTS_CHECK_NE_MESSAGE("xmlXPathObjectCopy", (void *)ret_val, (void *)(NULL), "xmlXPathObjectCopy Failed");\r
+               \r
+               des_xmlXPathObjectPtr(n_val, val, 0);\r
+               if (ret_val != NULL)\r
+               {\r
+                       xmlXPathFreeObject(ret_val);\r
+               }\r
+       }\r
+}\r
+       /**    \r
+       * @test                 UTcxmlXPathOrderDocElemsP01\r
+       * @brief                long xmlXPathOrderDocElems (xmlDocPtr doc)\r
+       * @desc                 Positive Test for speeding up XPath computation on static documents\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       { xmlDocPtr(doc)} => { N/A | long } @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlXPathOrderDocElemsP01()\r
+{\r
+       long ret_val;\r
+       xmlDocPtr doc; /* an input document */\r
+       int n_doc = 0;\r
+       //for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {\r
+               doc = gen_xmlDocPtr(n_doc, 0);\r
+               /**\r
+               * @remarks   input1: [N/A, N/A] @n\r
+               *            { xmlDocPtr pointer} => { N/A | long } @n\r
+               */\r
+               ret_val = xmlXPathOrderDocElems(doc);\r
+               //if (n_doc != 0)\r
+               //{\r
+                       DTS_CHECK_NE_MESSAGE("xmlXPathOrderDocElems", (void *)ret_val, (void *)(-1), "xmlXPathOrderDocElems Failed");\r
+               //}\r
+               //des_xmlDocPtr(n_doc, doc, 0);\r
+               if (doc != NULL)\r
+               {\r
+                       xmlFreeDoc(doc);\r
+               }\r
+       //}\r
+}\r
+xmlXPathObjectPtr  __DummyxmlXPathVariableLookupFunc(void *ctxt,const xmlChar *name,const xmlChar *ns_uri)\r
+{\r
+       return(NULL);\r
+\r
+}\r
+       /**    \r
+       * @test                 UTcxmlXPathPopStringP01\r
+       * @brief                xmlChar *       xmlXPathPopString       (xmlXPathParserContextPtr ctxt)\r
+       * @desc                 Positive Test for poping a string from the stack, handling conversion if needed. Check error with #xmlXPathCheckError\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlXPathParserContextPtr(ctxt)} => { N/A | xmlChar} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlXPathPopStringP01()\r
+{\r
+       __XPathCommonInitFunc();\r
+       /**\r
+       * @remarks   input1: [N/A, N/A] @n\r
+       *            {xmlXPathParserContextPtr} => { N/A | xmlChar} @n\r
+       */\r
+        \r
+       //pctxtInitPtr->value = xmlXPathNewString(BAD_CAST "string object");\r
+       xmlChar *pRetPathPopString = xmlXPathPopString (pctxtInitPtr);\r
+       //Need to check the failure ----SYAM.\r
+       //Hash pass proper inputs\r
+       //MT_CHECK_MESSAGE2(true != xmlXPathCheckError(pctxt), "xmlXPathPopString API return value");\r
+       //MT_CHECK_MESSAGE2(NULL != pRetPathPopString, "xmlXPathPopString API return value");\r
+       if(pRetPathPopString != NULL)\r
+               xmlFree(pRetPathPopString);\r
+       if (NULL != pctxtInitPtr->context->lastError.str1)\r
+       {\r
+               xmlFree(pctxtInitPtr->context->lastError.str1);\r
+               pctxtInitPtr->context->lastError.str1 = NULL;\r
+       }\r
+       //xmlResetLastError();\r
+       __XPathCommonDeleteFunc();\r
+\r
+}\r
+       /**    \r
+       * @test                 UTcxmlXPathPopNumberP01\r
+       * @brief                double  xmlXPathPopNumber (xmlXPathParserContextPtr ctxt)\r
+       * @desc                 Positive Test for poping a number from the stack, handling conversion if needed. Check error with #xmlXPathCheckError.\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlXPathParserContextPtr(ctxt)} => { N/A | any double number} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlXPathPopNumberP01()\r
+{\r
+       __XPathCommonInitFunc();\r
+       /**\r
+       * @remarks   input1: [N/A, N/A] @n\r
+       *            {xmlXPathParserContextPtr} => { N/A | any double number} @n\r
+       */\r
+       double dobPopNumber = xmlXPathPopNumber (pctxtInitPtr);\r
+       if (NULL != pctxtInitPtr->context->lastError.str1)\r
+       {\r
+               xmlFree(pctxtInitPtr->context->lastError.str1);\r
+               pctxtInitPtr->context->lastError.str1 = NULL;\r
+       }\r
+       //xmlResetLastError();\r
+       //Need to check the failure ----SYAM.\r
+       //Hash pass proper inputs\r
+       //DTS_CHECK_NE_MESSAGE("xmlXPathPopNumber", (void *)(xmlXPathCheckError(pctxtInitPtr)), (void *)(XML_FALSE), "xmlXPathPopNumber Failed");\r
+       __XPathCommonDeleteFunc();\r
+\r
+}\r
+       /**    \r
+       * @test                 UTcxmlXPathWrapCStringP01\r
+       * @brief                xmlXPathObjectPtr       xmlXPathWrapCString     (char * val)\r
+       * @desc                 Positive Test for wraping a string into an XPath object.\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                        {xmlXPathWrapCString("SomeThing")} => { N/A | xmlXPathObjectPtr object} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlXPathWrapCStringP01()\r
+{\r
+       __XPathCommonInitFunc();\r
+\r
+       char *pWrapString = "SomeThing";\r
+       /**\r
+       * @remarks   input1: [N/A, N/A] @n\r
+       *            {"SomeThing"} => { N/A | xmlXPathObjectPtr object} @n\r
+       */\r
+       xmlXPathObjectPtr retptr = xmlXPathWrapCString (pWrapString);\r
+       DTS_CHECK_NE_MESSAGE("xmlXPathWrapCString", (void *)retptr, (void *)(NULL), "xmlXPathWrapCString Failed");\r
+\r
+       __XPathCommonDeleteFunc();\r
+\r
+       if (NULL != retptr)\r
+       {\r
+               //xmlXPathFreeObject(retptr);\r
+       }\r
+\r
+}\r
+       /**    \r
+       * @test                 UTcxmlXPathWrapExternalP01\r
+       * @brief                xmlXPathObjectPtr xmlXPathWrapExternal (void * val)\r
+       * @desc                 Positive Test for wraping the @val data into an XPath object.\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlXPathWrapExternal "SomeThing"} => { N/A | xmlXPathObjectPtr object} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlXPathWrapExternalP01()\r
+{\r
+       __XPathCommonInitFunc();\r
+\r
+       char *pWrapString = "SomeThing";\r
+\r
+       /**\r
+       * @remarks   input1: [N/A, N/A] @n\r
+       *            {"SomeThing"} => { N/A | xmlXPathObjectPtr object} @n\r
+       */\r
+       xmlXPathObjectPtr retptr = xmlXPathWrapExternal (pWrapString);\r
+       DTS_CHECK_NE_MESSAGE("xmlXPathWrapExternal", (void *)retptr, (void *)(NULL), "xmlXPathWrapExternal Failed");\r
+\r
+       __XPathCommonDeleteFunc();\r
+\r
+       if (NULL != retptr)\r
+       {\r
+               xmlXPathFreeObject(retptr);\r
+       }\r
+}\r
+       /**    \r
+       * @test                 UTcxmlXPathRegisterVariableP01\r
+       * @brief                int xmlXPathRegisterVariable (xmlXPathContextPtr ctxt, const xmlChar * name, xmlXPathObjectPtr value)\r
+       * @desc                 Positive Test for registering a new variable value. If @value is NULL it unregisters the variable\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlXPathParserContextPtr,const xmlChar "SISO",xmlXPathObjectPtr} => { N/A | 0} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlXPathRegisterVariableP01()\r
+{\r
+       __XPathCommonInitFunc();\r
+\r
+       char *pWrapString = "SomeThing";\r
+       const xmlChar   *str            = (const xmlChar*)  "SISO";\r
+\r
+       xmlXPathObjectPtr retptr = xmlXPathWrapExternal (pWrapString);\r
+       DTS_CHECK_NE_MESSAGE("xmlXPathWrapExternal", (void *)retptr, (void *)(NULL), "xmlXPathWrapExternal Failed");\r
+\r
+       /**\r
+       * @remarks   input1: [N/A, N/A] @n\r
+       *            {xmlXPathParserContextPtr,"SISO",xmlXPathObjectPtr} => { N/A | 0} @n\r
+       */\r
+\r
+       int retres = xmlXPathRegisterVariable(xpathCtxInitPtr,str,retptr);\r
+       DTS_CHECK_NE_MESSAGE("xmlXPathRegisterVariable", (void *)retres, (void *)(-1), "xmlXPathRegisterVariable Failed");\r
+\r
+       __XPathCommonDeleteFunc();\r
+\r
+       if (NULL != retptr)\r
+       {\r
+               //xmlXPathFreeObject(retptr);\r
+       }\r
+}\r
+       /**    \r
+       * @test                 UTcxmlXPathTrailingSortedP01\r
+       * @brief                xmlNodeSetPtr   xmlXPathTrailingSorted  (xmlNodeSetPtr nodes1, xmlNodeSetPtr nodes2)\r
+       * @desc                 Positive Test for implementing the EXSLT - Sets trailing() function: node-set set:trailing (node-set, node-set)\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlNodeSetPtr(nodes), NULL} => { N/A | nodes} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlXPathTrailingSortedP01()\r
+{\r
+       xmlNodeSetPtr nodes = gen_xmlNodeSetPtr(1,1);\r
+       /**\r
+       * @remarks   input1: [N/A, N/A] @n\r
+       *            {nodes, NULL} => { N/A | nodes} @n\r
+       */\r
+       xmlNodeSetPtr retnode = xmlXPathTrailingSorted (nodes, NULL);\r
+       DTS_CHECK_NE_MESSAGE("xmlXPathTrailingSorted", (void *)retnode, (void *)(NULL), "xmlXPathTrailingSorted Failed");\r
+       \r
+       if (NULL != retnode)\r
+       {\r
+               DTS_CHECK_EQ_MESSAGE("xmlXPathTrailingSorted", (void *)retnode, (void *)nodes, "xmlXPathTrailingSorted Failed");\r
+       }\r
+       __DeletexmlNodeSetPtr();\r
+       /* Shutdown libxml */\r
+       ////xmlCleanupParser();\r
+}\r
+       /**    \r
+       * @test                 UTcxmlXPathLeadingSortedP01\r
+       * @brief                xmlNodeSetPtr xmlXPathLeadingSorted (xmlNodeSetPtr nodes1, xmlNodeSetPtr nodes2)\r
+       * @desc                 Positive Test for implementing the EXSLT - Sets leading() function: node-set set:leading (node-set, node-set)\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlNodeSetPtr(nodes), NULL} => { N/A | nodes} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlXPathLeadingSortedP01()\r
+{\r
+       xmlNodeSetPtr nodes = gen_xmlNodeSetPtr(1,1);\r
+       /**\r
+       * @remarks   input1: [N/A, N/A] @n\r
+       *            {nodes, NULL} => { N/A | nodes} @n\r
+       */\r
+       xmlNodeSetPtr retnode = xmlXPathLeadingSorted (nodes, NULL);\r
+       DTS_CHECK_NE_MESSAGE("xmlXPathLeadingSorted", (void *)retnode, (void *)(NULL), "xmlXPathLeadingSorted Failed");\r
+       \r
+       if (NULL != retnode)\r
+       {\r
+               DTS_CHECK_EQ_MESSAGE("xmlXPathLeadingSorted", (void *)retnode, (void *)nodes, "xmlXPathLeadingSorted Failed");\r
+       }\r
+       __DeletexmlNodeSetPtr();\r
+       /* Shutdown libxml */\r
+       ////xmlCleanupParser();\r
+}\r
+       /**    \r
+       * @test                 UTcxmlXPathTrailingP01\r
+       * @brief                xmlNodeSetPtr xmlXPathTrailing (xmlNodeSetPtr nodes1, xmlNodeSetPtr nodes2)\r
+       * @desc                 Positive Test for implementing the EXSLT - \r
+                                       Sets trailing() function: node-set set:trailing (node-set, node-set) @nodes1 and @nodes2 are sorted by document order, then #xmlXPathTrailingSorted is called.\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlNodeSetPtr(nodes), NULL} => { N/A | nodes} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlXPathTrailingP01()\r
+{\r
+       xmlNodeSetPtr nodes = gen_xmlNodeSetPtr(1,1);\r
+       /**\r
+       * @remarks   input1: [N/A, N/A] @n\r
+       *            {nodes, NULL} => { N/A | nodes} @n\r
+       */\r
+       xmlNodeSetPtr retnode = xmlXPathTrailing (nodes, NULL);\r
+       DTS_CHECK_NE_MESSAGE("xmlXPathTrailing", (void *)retnode, (void *)(NULL), "xmlXPathTrailing Failed");\r
+       \r
+       if (NULL != retnode)\r
+       {\r
+               DTS_CHECK_EQ_MESSAGE("xmlXPathTrailing", (void *)retnode, (void *)nodes, "xmlXPathTrailing Failed");\r
+       }\r
+       \r
+       __DeletexmlNodeSetPtr();\r
+       //if (NULL != retnode)\r
+       //{\r
+       //      xmlXPathFreeNodeSet(retnode);\r
+       //}\r
+       //if (NULL != nodes)\r
+       //{\r
+       //      xmlXPathFreeNodeSet(nodes);\r
+       //}\r
+       /* Shutdown libxml */\r
+       ////xmlCleanupParser();\r
+}\r
+       /**    \r
+       * @test                 UTcxmlXPathLeadingP01\r
+       * @brief                xmlNodeSetPtr xmlXPathLeading (xmlNodeSetPtr nodes1, xmlNodeSetPtr nodes2)\r
+       * @desc                 Positive Test for implementing the EXSLT - \r
+                                       Sets leading() function: node-set set:leading (node-set, node-set) @nodes1 and @nodes2 are sorted by document order, then #exslSetsLeadingSorted is called.\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlNodeSetPtr(nodes), NULL} => { N/A | nodes} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlXPathLeadingP01()\r
+{\r
+       xmlNodeSetPtr nodes = gen_xmlNodeSetPtr(1,1);\r
+\r
+       /**\r
+       * @remarks   input1: [N/A, N/A] @n\r
+       *            {nodes, NULL} => { N/A | nodes} @n\r
+       */\r
+       xmlNodeSetPtr retnode = xmlXPathLeading (nodes, NULL);\r
+       DTS_CHECK_NE_MESSAGE("xmlXPathLeading", (void *)retnode, (void *)(NULL), "xmlXPathLeading Failed");\r
+       \r
+       if (NULL != retnode)\r
+       {\r
+               DTS_CHECK_EQ_MESSAGE("xmlXPathLeading", (void *)retnode, (void *)nodes, "xmlXPathLeading Failed");\r
+       }\r
+       \r
+       __DeletexmlNodeSetPtr();\r
+       /* Shutdown libxml */\r
+       ////xmlCleanupParser();\r
+}\r
+       /**    \r
+       * @test                 UTcxmlXPathIntersectionP01\r
+       * @brief                xmlNodeSetPtr xmlXPathIntersection (xmlNodeSetPtr nodes1,xmlNodeSetPtr nodes2)\r
+       * @desc                 Positive Test for implementing the EXSLT - Sets intersection() function: node-set set:intersection (node-set, node-set)\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlNodeSetPtr(nodes), NULL} => { N/A | retnode} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlXPathIntersectionP01()\r
+{\r
+       xmlNodeSetPtr nodes = gen_xmlNodeSetPtr(1,1);\r
+\r
+       /**\r
+       * @remarks   input1: [N/A, N/A] @n\r
+       *            {nodes, NULL} => { N/A | retnode} @n\r
+       */\r
+       xmlNodeSetPtr retnode = xmlXPathIntersection (nodes, NULL);\r
+       DTS_CHECK_NE_MESSAGE("xmlXPathIntersection", (void *)retnode, (void *)(NULL), "xmlXPathIntersection Failed");\r
+\r
+       __DeletexmlNodeSetPtr();\r
+       if (retnode != NULL)\r
+       {\r
+               xmlXPathFreeNodeSet(retnode);\r
+       }\r
+       /* Shutdown libxml */\r
+       ////xmlCleanupParser();\r
+}\r
+       /**    \r
+       * @test                 UTcxmlXPathDifferenceP01\r
+       * @brief                xmlNodeSetPtr xmlXPathDifference (xmlNodeSetPtr nodes1, xmlNodeSetPtr nodes2)\r
+       * @desc                 Positive Test for implementing the EXSLT - Sets difference() function: node-set set:difference (node-set, node-set)\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlNodeSetPtr(nodes), NULL} => { N/A | nodes} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlXPathDifferenceP01()\r
+{\r
+       xmlNodeSetPtr nodes = gen_xmlNodeSetPtr(1,1);\r
+\r
+       /**\r
+       * @remarks   input1: [N/A, N/A] @n\r
+       *            {nodes, NULL} => { N/A | nodes} @n\r
+       */\r
+       xmlNodeSetPtr retnode = xmlXPathDifference (nodes, NULL);\r
+       DTS_CHECK_NE_MESSAGE("xmlXPathDifference", (void *)retnode, (void *)(NULL), "xmlXPathDifference Failed");\r
+       \r
+       if (NULL != retnode)\r
+       {\r
+               DTS_CHECK_EQ_MESSAGE("xmlXPathDifference", (void *)retnode, (void *)nodes, "xmlXPathDifference Failed");\r
+       }\r
+       __DeletexmlNodeSetPtr();\r
+       /* Shutdown libxml */\r
+       ////xmlCleanupParser();\r
+}\r
+       /**    \r
+       * @test                 UTcxmlXPathHasSameNodesP01\r
+       * @brief                int xmlXPathHasSameNodes (xmlNodeSetPtr nodes1, xmlNodeSetPtr nodes2)\r
+       * @desc                 Positive Test for implementing the EXSLT - Sets has-same-nodes function: boolean set:has-same-node(node-set, node-set)\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlNodeSetPtr(nodes), NULL} => { N/A | XML_FALSE} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlXPathHasSameNodesP01()\r
+{\r
+    int ret_val;\r
+\r
+       xmlNodeSetPtr nodes = gen_xmlNodeSetPtr(1,1);\r
+\r
+       /**\r
+       * @remarks   input1: [N/A, N/A] @n\r
+       *            {nodes, NULL} => { N/A | XML_FALSE} @n\r
+       */\r
+       ret_val = xmlXPathHasSameNodes(nodes, NULL);\r
+       DTS_CHECK_EQ_MESSAGE("xmlXPathHasSameNodes", (void *)ret_val, (void *)(0), "xmlXPathHasSameNodes Failed");\r
+       \r
+       __DeletexmlNodeSetPtr();\r
+       /* Shutdown libxml */\r
+       ////xmlCleanupParser();\r
+\r
+       \r
+}\r
+       /**    \r
+       * @test                 UTcxmlXPathDistinctP01\r
+       * @brief                xmlNodeSetPtr xmlXPathDistinct (xmlNodeSetPtr nodes)\r
+       * @desc                 Positive Test for implementing the EXSLT - \r
+                                       Sets distinct() function: node-set set:distinct (node-set) @nodes is sorted by document order, then #exslSetsDistinctSorted is called with the sorted node-set\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlNodeSetPtr(nodes)} => { N/A | retnode} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlXPathDistinctP01()\r
+{\r
+       xmlNodeSetPtr nodes = gen_xmlNodeSetPtr(1,1);\r
+\r
+       /**\r
+       * @remarks   input1: [N/A, N/A] @n\r
+       *            {nodes} => { N/A | retnode} @n\r
+       */\r
+       xmlNodeSetPtr retnode = xmlXPathDistinct (nodes);\r
+       DTS_CHECK_NE_MESSAGE("xmlXPathDistinct", (void *)(retnode), (void *)(NULL), "xmlXPathDistinct Failed");\r
+       \r
+       __DeletexmlNodeSetPtr();\r
+       if (retnode != NULL)\r
+       {\r
+               xmlXPathFreeNodeSet(retnode);\r
+       }\r
+       /* Shutdown libxml */\r
+       ////xmlCleanupParser();\r
+\r
+}\r
+       /**    \r
+       * @test                 UTcxmlXPathNextSelfP01\r
+       * @brief                xmlNodePtr xmlXPathNextSelf (xmlXPathParserContextPtr ctxt, xmlNodePtr cur)\r
+       * @desc                 Positive Test for traversing function for the "self" direction\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlXPathParserContextPtr,xmlNodePtr(cur)} => { N/A | xmlNodePtr} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlXPathNextSelfP01()\r
+{\r
+       __XPathCommonInitFunc();\r
+       //xmlNodePtr curnode = __get_api_root();\r
+       /**\r
+       * @remarks   input1: [N/A, N/A] @n\r
+       *            {xmlXPathParserContextPtr,xmlNodePtr} => { N/A | xmlNodePtr} @n\r
+       */\r
+       xmlNodePtr retnextnode = xmlXPathNextSelf(pctxtInitPtr, NULL);\r
+       //Need to check the failure ----SYAM.\r
+       DTS_CHECK_EQ_MESSAGE("xmlXPathNextSelf", (void *)(retnextnode), (void *)(NULL), "xmlXPathNextSelf Failed");\r
+       \r
+       __XPathCommonDeleteFunc();\r
+       __free_api_doc();\r
+\r
+\r
+}\r
+       /**    \r
+       * @test                 UTcxmlXPathNextAncestorOrSelfP01\r
+       * @brief                xmlNodePtr xmlXPathNextAncestorOrSelf (xmlXPathParserContextPtr ctxt, xmlNodePtr cur)\r
+       * @desc                 Positive Test for traversing function for the "ancestor-or-self" direction \r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlXPathParserContextPtr,xmlNodePtr(cur)} => { N/A | xmlNodePtr} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlXPathNextAncestorOrSelfP01()\r
+{\r
+       __XPathCommonInitFunc();\r
+       xmlNodePtr curnode = __get_api_root();\r
+\r
+       /**\r
+       * @remarks   input1: [N/A, N/A] @n\r
+       *            {xmlXPathParserContextPtr,xmlNodePtr} => { N/A | xmlNodePtr} @n\r
+       */\r
+       xmlNodePtr retnextnode = xmlXPathNextAncestorOrSelf(pctxtInitPtr, curnode);\r
+       DTS_CHECK_NE_MESSAGE("xmlXPathNextAncestorOrSelf", (void *)(retnextnode), (void *)(NULL), "xmlXPathNextAncestorOrSelf Failed");\r
+\r
+       __XPathCommonDeleteFunc();\r
+\r
+       __free_api_doc();\r
+       //if (NULL != retnextnode)\r
+       //{\r
+       //      xmlFreeNode(retnextnode);       \r
+       //}\r
+       \r
+       /* Shutdown libxml */\r
+       ////xmlCleanupParser();\r
+\r
+}\r
+       /**    \r
+       * @test                 UTcxmlXPathNewValueTreeP01\r
+       * @brief                xmlXPathObjectPtr xmlXPathNewValueTree (xmlNodePtr val)\r
+       * @desc                 Positive Test for creating a new xmlXPathObjectPtr of type Value Tree (XSLT) and initialize it with the tree root @val\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlNodePtr(val)} => { N/A | xmlXPathObjectPtr} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlXPathNewValueTreeP01()\r
+{\r
+       xmlNodePtr curnode = __get_api_root();\r
+\r
+       /**\r
+       * @remarks   input1: [N/A, N/A] @n\r
+       *            {xmlNodePtr} => { N/A | xmlXPathObjectPtr} @n\r
+       */\r
+       xmlXPathObjectPtr retNewValueTree = xmlXPathNewValueTree(curnode);\r
+       DTS_CHECK_NE_MESSAGE("xmlXPathNewValueTree", (void *)(retNewValueTree), (void *)(NULL), "xmlXPathNewValueTree Failed");\r
+\r
+       if (curnode != NULL)\r
+       {\r
+               xmlUnlinkNode(curnode);\r
+       }\r
+       //xmlFreeNode(curnode);\r
+       //__free_api_doc();\r
+\r
+       //xmlFreeNode(curnode);\r
+       if (NULL != retNewValueTree)\r
+       {\r
+               xmlXPathFreeObject(retNewValueTree);\r
+       }\r
+       __free_api_doc();\r
+       /* Shutdown libxml */\r
+       ////xmlCleanupParser();\r
+}\r
+       /**    \r
+       * @test                 UTcxmlXPathVariableLookupP01\r
+       * @brief                xmlXPathObjectPtr xmlXPathVariableLookup (xmlXPathContextPtr ctxt, const xmlChar * name)\r
+       * @desc                 Positive Test for searching in the Variable array of the context for the given variable value.\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlXPathParserContextPtr,const xmlChar "Now"} => { N/A | xmlXPathObjectPtr} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlXPathVariableLookupP01()\r
+{\r
+       __XPathCommonInitFunc();\r
+\r
+       /**\r
+       * @remarks   input1: [N/A, N/A] @n\r
+       *            {xmlXPathParserContextPtr,"Now"} => { N/A | xmlXPathObjectPtr} @n\r
+       */\r
+       xmlXPathObjectPtr retNewValueTree = xmlXPathVariableLookup(xpathCtxInitPtr, (const xmlChar*)"Now");\r
+       //Need to check the failure ----SYAM.\r
+       //Hash pass proper inputs\r
+       DTS_CHECK_EQ_MESSAGE("xmlXPathVariableLookup", (void *)(retNewValueTree), (void *)(NULL), "xmlXPathVariableLookup Failed");\r
+\r
+       __XPathCommonDeleteFunc();\r
+\r
+}\r
+       /**    \r
+       * @test                 UTcxmlXPathPopBooleanP01\r
+       * @brief                int xmlXPathPopBoolean  (xmlXPathParserContextPtr ctxt)\r
+       * @desc                 Positive Test which Pops a boolean from the stack, handling conversion if needed. Check error with #xmlXPathCheckError.\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlXPathParserContextPtr(ctxt} => { N/A | XML_FALSE} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlXPathPopBooleanP01()\r
+{\r
+       __XPathCommonInitFunc();\r
+\r
+       /**\r
+       * @remarks   input1: [N/A, N/A] @n\r
+       *            {xmlNodeSetPtr} => { N/A | XML_FALSE} @n\r
+       */\r
+       if (pctxtInitPtr != NULL)\r
+       {\r
+               int popboolean = xmlXPathPopBoolean(pctxtInitPtr);\r
+               DTS_CHECK_EQ_MESSAGE("xmlXPathPopBoolean", (void *)(popboolean), (void *)(XML_FALSE), "xmlXPathPopBoolean Failed");\r
+       }\r
+       if (NULL != pctxtInitPtr->context->lastError.str1)\r
+       {\r
+               xmlFree(pctxtInitPtr->context->lastError.str1);\r
+               pctxtInitPtr->context->lastError.str1 = NULL;\r
+       }\r
+       //xmlResetLastError();\r
+       __XPathCommonDeleteFunc();\r
+\r
+}\r
+       /**    \r
+       * @test                 UTcxmlXPathNewNodeSetListP01\r
+       * @brief                xmlXPathObjectPtr       xmlXPathNewNodeSetList  (xmlNodeSetPtr val)\r
+       * @desc                 Positive Test for creating a new xmlXPathObjectPtr of type NodeSet and initialize it with the Nodeset @val\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlNodeSetPtr(val)} => { N/A | xmlXPathObjectPtr} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlXPathNewNodeSetListP01()\r
+{\r
+       xmlNodeSetPtr nodes = gen_xmlNodeSetPtr(1,1);\r
+\r
+       /**\r
+       * @remarks   input1: [N/A, N/A] @n\r
+       *            {xmlNodeSetPtr} => { N/A | xmlXPathObjectPtr} @n\r
+       */\r
+       xmlXPathObjectPtr retNewNodeSetList = xmlXPathNewNodeSetList(nodes);\r
+       DTS_CHECK_NE_MESSAGE("xmlXPathNewNodeSetList", (void *)(retNewNodeSetList), (void *)(NULL), "xmlXPathNewNodeSetList Failed");\r
+\r
+       __DeletexmlNodeSetPtr();\r
+       if (retNewNodeSetList != NULL)\r
+       {\r
+               xmlXPathFreeNodeSet(retNewNodeSetList->nodesetval);//This memory was internally allocated\r
+               xmlXPathFreeNodeSetList(retNewNodeSetList);\r
+       }\r
+       /* Shutdown libxml */\r
+       ////xmlCleanupParser();\r
+}\r
+       /**    \r
+       * @test                 UTcxmlXPathFunctionLookupP01\r
+       * @brief                xmlXPathFunction xmlXPathFunctionLookup (xmlXPathContextPtr ctxt, const xmlChar * name)\r
+       * @desc                 Positive Test for searching in the Function array of the context for the given function.\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlXPathParserContextPtr(ctxt),const xmlChar "SISO"} => { N/A | xmlXPathFunction} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlXPathFunctionLookupP01()\r
+{\r
+       __XPathCommonInitFunc();\r
+\r
+       const xmlChar   *str            = (const xmlChar*)  "SISO";\r
+\r
+       /**\r
+       * @remarks   input1: [N/A, N/A] @n\r
+       *            {xmlXPathParserContextPtr,"SISO"} => { N/A | xmlXPathFunction} @n\r
+       */\r
+       xmlXPathFunction retFunctionLookup = xmlXPathFunctionLookup(xpathCtxInitPtr, str);\r
+       //Need to check the failure ----SYAM.\r
+       //Hash pass proper inputs\r
+       DTS_CHECK_EQ_MESSAGE("xmlXPathFunctionLookup", (void *)(retFunctionLookup), (void *)(NULL), "xmlXPathFunctionLookup Failed");\r
+\r
+       __XPathCommonDeleteFunc();\r
+\r
+}\r
+       /**    \r
+       * @test                 UTcxmlXPathNextAttributeP01\r
+       * @brief                xmlNodePtr xmlXPathNextAttribute (xmlXPathParserContextPtr ctxt, xmlNodePtr cur)\r
+       * @desc                 Positive Test for traversal function for the "attribute" direction TODO: support DTD inherited default attributes\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlXPathParserContextPtr(ctxt),xmlNodePtr(cur)} => { N/A | xmlNodePtr} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlXPathNextAttributeP01()\r
+{\r
+       __XPathCommonInitFunc();\r
+\r
+       xmlNodePtr curnode = __get_api_root();\r
+\r
+       /**\r
+       * @remarks   input1: [N/A, N/A] @n\r
+       *            {xmlXPathParserContextPtr,xmlNodePtr} => { N/A | xmlNodePtr} @n\r
+       */\r
+       xmlNodePtr retnextnode = xmlXPathNextAttribute(pctxtInitPtr, curnode);\r
+\r
+       DTS_CHECK_EQ_MESSAGE("xmlXPathNextAttribute", (void *)(retnextnode), (void *)(NULL), "xmlXPathNextAttribute Failed");\r
+\r
+       __XPathCommonDeleteFunc();\r
+\r
+       if (NULL != retnextnode)\r
+       {\r
+               xmlFreeNode(retnextnode);       \r
+       }\r
+       __free_api_doc();\r
+\r
+       /* Shutdown libxml */\r
+       ////xmlCleanupParser();\r
+\r
+}\r
+       /**    \r
+       * @test                 UTcxmlXPathPopNodeSetP01\r
+       * @brief                xmlNodeSetPtr   xmlXPathPopNodeSet      (xmlXPathParserContextPtr ctxt)\r
+       * @desc                 Positive Test for poping a node-set from the stack, handling conversion if needed. Check error with #xmlXPathCheckError\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlXPathParserContextPtr(ctxt)} => { N/A | xmlNodeSetPtr} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlXPathPopNodeSetP01()\r
+{\r
+       __XPathCommonInitFunc();\r
+\r
+       /**\r
+       * @remarks   input1: [N/A, N/A] @n\r
+       *            {xmlXPathParserContextPtr} => { N/A | xmlNodeSetPtr} @n\r
+       */\r
+       xmlNodeSetPtr retPopNodeSet = xmlXPathPopNodeSet(pctxtInitPtr);\r
+       //Need to check the failure ----SYAM.\r
+       //Hash pass proper inputs\r
+       DTS_CHECK_EQ_MESSAGE("xmlXPathPopNodeSet", (void *)(retPopNodeSet), (void *)(NULL), "xmlXPathPopNodeSet Failed");\r
+\r
+       if (NULL != retPopNodeSet)\r
+       { \r
+               xmlXPathFreeNodeSet(retPopNodeSet);\r
+       }\r
+       if (NULL != pctxtInitPtr->context->lastError.str1)\r
+       {\r
+               xmlFree(pctxtInitPtr->context->lastError.str1);\r
+               pctxtInitPtr->context->lastError.str1 = NULL;\r
+       }\r
+       //xmlResetLastError();\r
+       __XPathCommonDeleteFunc();\r
+\r
+}\r
+       /**    \r
+       * @test                 UTcxmlXPathNextFollowingSiblingP01\r
+       * @brief                xmlNodePtr xmlXPathNextFollowingSibling (xmlXPathParserContextPtr ctxt, xmlNodePtr cur)\r
+       * @desc                 Positive Test for traversal function for the "following-sibling" direction The following-sibling axis contains the following siblings of the context node in document order.\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlXPathParserContextPtr(ctxt),NULL } => { N/A | xmlNodePtr} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlXPathNextFollowingSiblingP01()\r
+{\r
+#if defined(LIBXML_XPATH_ENABLED)\r
+    xmlNodePtr ret_val;\r
+    xmlXPathParserContextPtr ctxt; /* the XPath Parser context */\r
+    int n_ctxt;\r
+    xmlNodePtr cur; /* the current node in the traversal */\r
+    int n_cur;\r
+\r
+    for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {\r
+    for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {\r
+        ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);\r
+        cur = gen_xmlNodePtr(n_cur, 1);\r
+\r
+        ret_val = xmlXPathNextFollowingSibling(ctxt, cur);\r
+        DTS_CHECK_EQ_MESSAGE("xmlXPathNextFollowingSibling", (void *)(ret_val), (void *)(NULL), "xmlXPathNextFollowingSibling Failed");\r
+        desret_xmlNodePtr(ret_val);\r
+        des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);\r
+        des_xmlNodePtr(n_cur, cur, 1);\r
+        xmlResetLastError();\r
+    }\r
+    }\r
+#endif\r
+\r
+}\r
+       /**    \r
+       * @test                 UTcxmlXPathNextPrecedingSiblingP01\r
+       * @brief                xmlNodePtr xmlXPathNextPrecedingSibling (xmlXPathParserContextPtr ctxt, xmlNodePtr cur)\r
+       * @desc                 Positive Test for Traversal function for the "preceding-sibling" direction \r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlXPathParserContextPtr(ctxt),NULL } => { N/A | xmlNodePtr} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlXPathNextPrecedingSiblingP01()\r
+{\r
+#if defined(LIBXML_XPATH_ENABLED)\r
+    xmlNodePtr ret_val;\r
+    xmlXPathParserContextPtr ctxt; /* the XPath Parser context */\r
+    int n_ctxt;\r
+    xmlNodePtr cur; /* the current node in the traversal */\r
+    int n_cur;\r
+\r
+    for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {\r
+    for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {\r
+        ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);\r
+        cur = gen_xmlNodePtr(n_cur, 1);\r
+\r
+        ret_val = xmlXPathNextPrecedingSibling(ctxt, cur);\r
+        DTS_CHECK_EQ_MESSAGE("xmlXPathNextFollowingSibling", (void *)(ret_val), (void *)(NULL), "xmlXPathNextFollowingSibling Failed");\r
+        desret_xmlNodePtr(ret_val);\r
+        des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);\r
+        des_xmlNodePtr(n_cur, cur, 1);\r
+        xmlResetLastError();\r
+    }\r
+    }\r
+#endif\r
+\r
+}      \r
+       /**    \r
+       * @test                 UTcxmlXPathRegisterNsP01\r
+       * @brief                int xmlXPathRegisterNs (xmlXPathContextPtr ctxt, const xmlChar * prefix, const xmlChar * ns_uri)\r
+       * @desc                 Positive Test for registering a new namespace.\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlXPathParserContextPtr(ctxt),"//SUBJECT"     ,"xml" } => { N/A | 0} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlXPathRegisterNsP01()\r
+{\r
+       xmlChar *xpathExpr      = (xmlChar*) "//SUBJECT";\r
+\r
+       __XPathCommonInitFunc();\r
+\r
+       /**\r
+       * @remarks   input1: [N/A, N/A] @n\r
+       *            {xmlXPathParserContextPtr,"//SUBJECT"      ,"xml" } => { N/A | 0} @n\r
+       */\r
+       DTS_CHECK_NE_MESSAGE("xmlXPathRegisterNs", (void *)(xmlXPathRegisterNs(xpathCtxInitPtr,xpathExpr,(const xmlChar*)"xml")), (void *)(-1), "xmlXPathRegisterNs Failed");\r
+\r
+       __XPathCommonDeleteFunc();\r
+\r
+}\r
+       /**    \r
+       * @test                 UTcxmlXPathIsNodeTypeP01\r
+       * @brief                int     xmlXPathIsNodeType (const xmlChar * name)\r
+       * @desc                 Positive Test for checking whether the name given a NodeType one.\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {const xmlChar "node" } => { N/A | 1} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlXPathIsNodeTypeP01()\r
+{\r
+       /**\r
+       * @remarks   input1: [N/A, N/A] @n\r
+       *            {"node" } => { N/A | 1} @n\r
+       */\r
+       DTS_CHECK_EQ_MESSAGE("xmlXPathIsNodeType", (void *)(xmlXPathIsNodeType((const xmlChar *)"node")), (void *)(1), "xmlXPathIsNodeType Failed");\r
+\r
+}\r
+       /**    \r
+       * @test                 UTcxmlXPathEvaluatePredicateResultP01\r
+       * @brief                int xmlXPathEvaluatePredicateResult (xmlXPathParserContextPtr ctxt, xmlXPathObjectPtr res)\r
+       * @desc                 Positive Test for evaluating a predicate result for the current node\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlXPathParserContextPtr(ctxt),xmlXPathObjectPtr(res) } => { N/A | 1} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlXPathEvaluatePredicateResultP01()\r
+{\r
+       __XPathCommonInitFunc();\r
+       /**\r
+       * @remarks   input1: [N/A, N/A] @n\r
+       *            {xmlXPathParserContextPtr,xmlXPathObjectPtr } => { N/A | 1} @n\r
+       */\r
+       DTS_CHECK_EQ_MESSAGE("xmlXPathEvaluatePredicateResult", (void *)(xmlXPathEvaluatePredicateResult(pctxtInitPtr,xpathObjInitPtr)), (void *)(1), "xmlXPathEvaluatePredicateResult Failed");\r
+       __XPathCommonDeleteFunc();\r
+}\r
+       /**    \r
+       * @test                 UTcxmlXPathNsLookupP01\r
+       * @brief                const xmlChar * xmlXPathNsLookup (xmlXPathContextPtr ctxt, const xmlChar * prefix)\r
+       * @desc                 Positive Test for searching in the namespace declaration array of the context for the given namespace name associated to the given prefix\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlXPathParserContextPtr(ctxt),const xmlChar "xml"} => { N/A | (const xmlChar *)} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlXPathNsLookupP01()\r
+{\r
+       __XPathCommonInitFunc();\r
+       /**\r
+       * @remarks   input1: [N/A, N/A] @n\r
+       *            {xmlXPathParserContextPtr,"xml"} => { N/A | (const xmlChar *)} @n\r
+       */\r
+       const xmlChar *pRetNsLookup = xmlXPathNsLookup(xpathCtxInitPtr,(const xmlChar *)"xml");\r
+       DTS_CHECK_NE_MESSAGE("xmlXPathNsLookup", (void *)(pRetNsLookup), (void *)(NULL), "xmlXPathNsLookup Failed");\r
+\r
+       __XPathCommonDeleteFunc();\r
+}\r
+       /**    \r
+       * @test                 UTcxmlXPathNextNamespaceP01\r
+       * @brief                xmlNodePtr xmlXPathNextNamespace (xmlXPathParserContextPtr ctxt, xmlNodePtr cur)\r
+       * @desc                 Positive Test for traversal function for the "namespace" direction the namespace axis contains the namespace nodes of the context node\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlXPathParserContextPtr(ctxt),xmlNodePtr(cur)} => { N/A | xmlNodePtr} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+       \r
+static void UTcxmlXPathNextNamespaceP01()\r
+{\r
+\r
+#if defined(LIBXML_XPATH_ENABLED)\r
+    xmlNodePtr ret_val;\r
+    xmlXPathParserContextPtr ctxt; /* the XPath Parser context */\r
+    int n_ctxt;\r
+    xmlNodePtr cur; /* the current attribute in the traversal */\r
+    int n_cur;\r
+\r
+    for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {\r
+    for (n_cur = 0;n_cur < gen_nb_xmlNodePtr;n_cur++) {\r
+        ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);\r
+        cur = gen_xmlNodePtr(n_cur, 1);\r
+\r
+        ret_val = xmlXPathNextNamespace(ctxt, cur);\r
+\r
+       DTS_CHECK_EQ_MESSAGE("xmlXPathNextNamespace", (void *)(ret_val), (void *)(NULL), "xmlXPathNextNamespace Failed");\r
+        desret_xmlNodePtr(ret_val);\r
+        des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);\r
+        des_xmlNodePtr(n_cur, cur, 1);\r
+        xmlResetLastError();\r
+    }\r
+    }\r
+#endif\r
+\r
+\r
+}\r
+       /**    \r
+       * @test                 UTcxmlXPathNextPrecedingP01\r
+       * @brief                xmlNodePtr xmlXPathNextPreceding (xmlXPathParserContextPtr ctxt, xmlNodePtr cur)\r
+       * @desc                 Positive Test for traversal function for the "preceding" direction the preceding axis contains all nodes in the same document \r
+                                       as the context node that are before the context node in document order, excluding any ancestors and excluding attribute nodes and namespace nodes\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlXPathParserContextPtr(ctxt),xmlNodePtr(cur)} => { N/A | xmlNodePtr} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlXPathNextPrecedingP01()\r
+{\r
+       xmlNodePtr curnode = __get_api_root();\r
+       __XPathCommonInitFunc();\r
+       /**\r
+       * @remarks   input1: [N/A, N/A] @n\r
+       *            {xmlXPathParserContextPtr,xmlNodePtr} => { N/A | xmlNodePtr} @n\r
+       */\r
+       xmlNodePtr retNodePtr = xmlXPathNextPreceding(pctxtInitPtr,curnode);\r
+       DTS_CHECK_NE_MESSAGE("xmlXPathNextPreceding", (void *)(retNodePtr), (void *)(NULL), "xmlXPathNextPreceding Failed");\r
+\r
+       __XPathCommonDeleteFunc();\r
+       __free_api_doc();\r
+\r
+}\r
+       /**    \r
+       * @test                 UTcxmlXPathNextFollowingP01\r
+       * @brief                xmlNodePtr xmlXPathNextFollowing (xmlXPathParserContextPtr ctxt, xmlNodePtr cur)\r
+       * @desc                 Positive Test for traversal function for the "following" direction The following axis contains all nodes in the same document \r
+                                       as the context node that are after the context node in document order, excluding any descendants and excluding attribute nodes and namespace nodes\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlXPathParserContextPtr(ctxt),xmlNodePtr(cur)} => { N/A | xmlNodePtr} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlXPathNextFollowingP01()\r
+{\r
+       xmlNodePtr curnode = __get_api_root();\r
+       __XPathCommonInitFunc();\r
+       /**\r
+       * @remarks   input1: [N/A, N/A] @n\r
+       *            {xmlXPathParserContextPtr,xmlNodePtr} => { N/A | xmlNodePtr} @n\r
+       */\r
+       xmlNodePtr retNodePtr = xmlXPathNextFollowing(pctxtInitPtr,curnode);\r
+       //Need to check the failure ----SYAM.\r
+       DTS_CHECK_NE_MESSAGE("xmlXPathNextFollowing", (void *)(retNodePtr), (void *)(NULL), "xmlXPathNextFollowing Failed");\r
+\r
+       __XPathCommonDeleteFunc();\r
+       __free_api_doc();\r
+\r
+}\r
+       /**    \r
+       * @test                 UTcxmlXPathNextParentP01\r
+       * @brief                xmlNodePtr xmlXPathNextParent (xmlXPathParserContextPtr ctxt, xmlNodePtr cur)\r
+       * @desc                 Positive Test for traversal function for the "parent" direction The parent axis contains the parent of the context node, if there is one.\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlXPathParserContextPtr(ctxt),xmlNodePtr(cur)} => { N/A | xmlNodePtr} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlXPathNextParentP01()\r
+{\r
+       xmlNodePtr curnode = __get_api_root();\r
+\r
+       __XPathCommonInitFunc();\r
+\r
+       /**\r
+       * @remarks   input1: [N/A, N/A] @n\r
+       *            {xmlXPathParserContextPtr,xmlNodePtr} => { N/A | xmlNodePtr} @n\r
+       */\r
+       xmlNodePtr retNodePtr = xmlXPathNextParent(pctxtInitPtr,curnode);\r
+       DTS_CHECK_EQ_MESSAGE("xmlXPathNextParent", (void *)(retNodePtr), (void *)(NULL), "xmlXPathNextParent Failed");\r
+\r
+       __XPathCommonDeleteFunc();\r
+       __free_api_doc();\r
+\r
+}\r
+       /**    \r
+       * @test                 UTcxmlXPathNotEqualValuesP01\r
+       * @brief                int     xmlXPathNotEqualValues  (xmlXPathParserContextPtr ctxt)\r
+       * @desc                 Positive Test for implementing the equal operation on XPath objects content: @arg1 == @arg2\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlXPathParserContextPtr(ctxt)} => { N/A | 0 } @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlXPathNotEqualValuesP01()\r
+{\r
+       __XPathCommonInitFunc();\r
+\r
+       /**\r
+       * @remarks   input1: [N/A, N/A] @n\r
+       *            {xmlXPathParserContextPtr} => { N/A | 0 } @n\r
+       */\r
+       int retNotEqualValues = xmlXPathNotEqualValues(pctxtInitPtr);\r
+       DTS_CHECK_EQ_MESSAGE("xmlXPathNotEqualValues", (void *)(retNotEqualValues), (void *)(0), "xmlXPathNotEqualValues Failed");\r
+\r
+       if (NULL != pctxtInitPtr->context->lastError.str1)\r
+       {\r
+               xmlFree(pctxtInitPtr->context->lastError.str1);\r
+               pctxtInitPtr->context->lastError.str1 = NULL;\r
+       }\r
+       //xmlResetLastError();\r
+       __XPathCommonDeleteFunc();\r
+}\r
+       /**    \r
+       * @test                 UTcxmlXPathEqualValuesP01\r
+       * @brief                int     xmlXPathEqualValues     (xmlXPathParserContextPtr ctxt)\r
+       * @desc                 Positive Test for implementing the equal operation on XPath objects content: @arg1 == @arg2\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlXPathParserContextPtr(ctxt)} => { N/A | 0 } @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlXPathEqualValuesP01()\r
+{\r
+       __XPathCommonInitFunc();\r
+\r
+       /**\r
+       * @remarks   input1: [N/A, N/A] @n\r
+       *            {xmlXPathParserContextPtr} => { N/A | 0 } @n\r
+       */\r
+       int retEqualValues = xmlXPathEqualValues(pctxtInitPtr);\r
+       DTS_CHECK_EQ_MESSAGE("xmlXPathEqualValues", (void *)(retEqualValues), (void *)(0), "xmlXPathEqualValues Failed");\r
+\r
+       if (NULL != pctxtInitPtr->context->lastError.str1)\r
+       {\r
+               xmlFree(pctxtInitPtr->context->lastError.str1);\r
+               pctxtInitPtr->context->lastError.str1 = NULL;\r
+       }\r
+       //xmlResetLastError();\r
+       __XPathCommonDeleteFunc();\r
+}\r
+       /**    \r
+       * @test                 UTcxmlXPathCompareValuesP01\r
+       * @brief                int xmlXPathCompareValues (xmlXPathParserContextPtr ctxt, int inf, int strict)\r
+       * @desc                 Positive Test for implementing the compare operation on XPath objects\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlXPathParserContextPtr(ctxt),int(0),int(1)} => { N/A | (0 or 1) } @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlXPathCompareValuesP01()\r
+{\r
+       __XPathCommonInitFunc();\r
+\r
+       /**\r
+       * @remarks   input1: [N/A, N/A] @n\r
+       *            {xmlXPathParserContextPtr,0,1} => { N/A | (0 or 1) } @n\r
+       */\r
+       int retcompvalues = xmlXPathCompareValues(pctxtInitPtr,0,1);\r
+       //check proper input values for returning 1.\r
+       //For comparision success 1 will be returned\r
+       //For comparision fail 0 will be returned\r
+       DTS_CHECK_EQ_MESSAGE("xmlXPathCompareValues", (void *)(retcompvalues), (void *)(0), "xmlXPathCompareValues Failed");\r
+\r
+       if (NULL != pctxtInitPtr->context->lastError.str1)\r
+       {\r
+               xmlFree(pctxtInitPtr->context->lastError.str1);\r
+               pctxtInitPtr->context->lastError.str1 = NULL;\r
+       }\r
+       //xmlResetLastError();\r
+       __XPathCommonDeleteFunc();\r
+}\r
+static void UTcxmlXPathCtxtCompileP01()\r
+{\r
+       xmlXPathContextPtr ctxt = gen_xmlXPathContextPtr(0, 1);\r
+       const xmlChar   *str            = (const xmlChar*)  "SISO";\r
+\r
+       xmlXPathCompExprPtr ret_val =\r
+               xmlXPathCtxtCompile(ctxt, str) ;\r
+\r
+       DTS_CHECK_NE_MESSAGE("xmlXPathCtxtCompile", (void *)(ret_val), (void *)(NULL), "xmlXPathCtxtCompile Failed");\r
+\r
+       xmlXPathFreeCompExpr(ret_val);\r
+       /**\r
+       * @remarks   input1: [N/A, N/A] @n\r
+       *            { const xmlChar "SISO"} => { N/A | xmlXPathCompExprPtr pointer } @n\r
+       */\r
+       xmlXPathCompExprPtr ret_val1 = xmlXPathCompile(str);\r
+\r
+       DTS_CHECK_NE_MESSAGE("xmlXPathCompile", (void *)(ret_val1), (void *)(NULL), "xmlXPathCompile Failed");\r
+       \r
+       xmlXPathFreeContext(ctxt);\r
+\r
+       xmlXPathFreeCompExpr(ret_val1);\r
+       if (doc_get_api_root != NULL)\r
+       {\r
+               xmlFreeDoc(doc_get_api_root);\r
+               doc_get_api_root = NULL;\r
+       }\r
+       /* Shutdown libxml */\r
+       //xmlCleanupParser();\r
+\r
+}\r
+\r
+static void UTcxmlXPathNodeTrailingP01()\r
+{\r
+       xmlNodeSetPtr nodes = gen_xmlNodeSetPtr(1,1);\r
+       xmlNodePtr node = __get_api_root();\r
+       /**\r
+       * @remarks   input1: [N/A, N/A] @n\r
+       *            { xmlNodeSetPtr pointer, xmlNodePtr pointer} => { N/A | xmlNodeSetPtr pointer } @n\r
+       */\r
+       xmlNodeSetPtr retsetptr = xmlXPathNodeTrailing (nodes, node);\r
+       DTS_CHECK_NE_MESSAGE("xmlXPathNodeTrailing", (void *)(retsetptr), (void *)(NULL), "xmlXPathNodeTrailing Failed");\r
+       \r
+       xmlXPathFreeObject(xpathObj_gen_xmlNodeSetPtr);\r
+       xmlXPathFreeContext(xpathCtx_gen_xmlNodeSetPtr);\r
+       xmlFreeDoc(doc_gen_xmlNodeSetPtr);\r
+       if (retsetptr != NULL)\r
+       {\r
+               xmlXPathFreeNodeSet(retsetptr);\r
+       }\r
+       __free_api_doc();\r
+\r
+       /* Shutdown libxml */\r
+       ////xmlCleanupParser();\r
+\r
+}\r
+static void UTcxmlXPathNodeLeadingP01()\r
+{\r
+       xmlNodeSetPtr nodes = gen_xmlNodeSetPtr(1,1);\r
+       xmlNodePtr node = __get_api_root();\r
+       /**\r
+       * @remarks   input1: [N/A, N/A] @n\r
+       *            { xmlNodeSetPtr pointer, xmlNodePtr pointer} => { N/A | xmlNodeSetPtr pointer } @n\r
+       */\r
+       xmlNodeSetPtr retsetptr = xmlXPathNodeLeading (nodes, node);\r
+       DTS_CHECK_NE_MESSAGE("xmlXPathNodeLeading", (void *)(retsetptr), (void *)(NULL), "xmlXPathNodeLeading Failed");\r
+       \r
+       xmlXPathFreeObject(xpathObj_gen_xmlNodeSetPtr);\r
+       xmlXPathFreeContext(xpathCtx_gen_xmlNodeSetPtr);\r
+       xmlFreeDoc(doc_gen_xmlNodeSetPtr);\r
+       if (retsetptr != NULL)\r
+       {\r
+               xmlXPathFreeNodeSet(retsetptr);\r
+       }\r
+       __free_api_doc();\r
+\r
+       /* Shutdown libxml */\r
+       ////xmlCleanupParser();\r
+}\r
+static void startup( void);\r
+static void cleanup( void);\r
+\r
+void (*tet_startup)( void) = startup;\r
+void (*tet_cleanup)( void) = cleanup;\r
+\r
+static void startup( void)\r
+{\r
+        /* start of TC */\r
+        tet_printf("TC starts.");\r
+}\r
+\r
+static void cleanup( void)\r
+{\r
+        /* end of TC */\r
+        tet_printf("TC ends.");\r
+}\r
+\r
+struct tet_testlist tet_testlist[] = {\r
+       // Handling of out of context errors\r
+       {UTcXPathP01,1},\r
+       {UTcXPathP02,2},\r
+       {UTcxmlXPathCastBooleanToNumberP01,3},\r
+       {UTcxmlXPathCastBooleanToStringP01,4},\r
+       {UTcxmlXPathCastNodeSetToNumberP01,5},\r
+       {UTcxmlXPathCastNodeSetToStringP01,6},\r
+       {UTcxmlXPathCastNodeToNumberP01,7},\r
+       {UTcxmlXPathCastNodeToStringP01,8},\r
+       {UTcxmlXPathCastNumberToBooleanP01,9},\r
+       {UTcxmlXPathCastNumberToStringP01,10},\r
+       {UTcxmlXPathCastStringToBooleanP01,11},\r
+       {UTcxmlXPathCastStringToNumberP01,12},\r
+       {UTcxmlXPathCastToBooleanP01,13},\r
+       {UTcxmlXPathCastToNumberP01,14},\r
+       {UTcxmlXPathCastToStringP01,15},\r
+       {UTcxmlXPathCmpNodesP01,16},\r
+       {UTcxmlXPathCompiledEvalP01,17},\r
+       {UTcxmlXPathConvertBooleanP01,18},\r
+       {UTcxmlXPathConvertNumberP01,19},\r
+       {UTcxmlXPathConvertStringP01,20},\r
+       {UTcxmlXPathEvalP01,21},\r
+       {UTcxmlXPathEvalPredicateP01,22},\r
+       {UTcxmlXPathNodeSetCreateP01,23},\r
+       {UTcxmlXPathObjectCopyP01,24},\r
+       {UTcxmlXPathOrderDocElemsP01,25},\r
+       {UTcxmlXPathCtxtCompileP01,26},\r
+       {UTcxmlXPathNodeTrailingP01,27},\r
+       {UTcxmlXPathNodeLeadingP01,28},\r
+       {UTcxmlXPathPopStringP01,29},\r
+       {UTcxmlXPathPopNumberP01,30},\r
+       {UTcxmlXPathWrapCStringP01,31},\r
+       {UTcxmlXPathWrapExternalP01,32},\r
+       {UTcxmlXPathRegisterVariableP01,33},\r
+       {UTcxmlXPathTrailingSortedP01,34},\r
+       {UTcxmlXPathLeadingSortedP01,36},\r
+       {UTcxmlXPathTrailingP01,37},\r
+       {UTcxmlXPathLeadingP01,38},\r
+       {UTcxmlXPathIntersectionP01,39},\r
+       {UTcxmlXPathDifferenceP01,40},\r
+       {UTcxmlXPathHasSameNodesP01,41},\r
+       {UTcxmlXPathDistinctP01,42},\r
+       {UTcxmlXPathNextSelfP01,43},\r
+       {UTcxmlXPathNextAncestorOrSelfP01,44},\r
+       {UTcxmlXPathNewValueTreeP01,45},\r
+       {UTcxmlXPathVariableLookupP01,46},\r
+       {UTcxmlXPathPopBooleanP01,47},\r
+       {UTcxmlXPathNewNodeSetListP01,48},\r
+       {UTcxmlXPathFunctionLookupP01,49},\r
+       {UTcxmlXPathNextAttributeP01,50},\r
+       {UTcxmlXPathPopNodeSetP01,51},\r
+       {UTcxmlXPathNextFollowingSiblingP01,52},\r
+       {UTcxmlXPathNextPrecedingSiblingP01,53},\r
+       {UTcxmlXPathRegisterNsP01,54},\r
+       {UTcxmlXPathIsNodeTypeP01,55},\r
+       {UTcxmlXPathEvaluatePredicateResultP01,56},\r
+       {UTcxmlXPathNsLookupP01,57},\r
+       {UTcxmlXPathNextNamespaceP01,58},\r
+       {UTcxmlXPathNextPrecedingP01,59},\r
+       {UTcxmlXPathNextFollowingP01,60},\r
+       {UTcxmlXPathNextParentP01,61},\r
+       {UTcxmlXPathNotEqualValuesP01,62},\r
+       {UTcxmlXPathEqualValuesP01,63},\r
+       {UTcxmlXPathCompareValuesP01,64},\r
+       {UTcxmlXPathCastNodeSetToBooleanP01,65},\r
+       { NULL, 0 },\r
+       \r
+};\r
+\r
+\r
+\r
+\r
+\r
diff --git a/TC/testcase/utc_libxml_XmlchValid.c b/TC/testcase/utc_libxml_XmlchValid.c
new file mode 100755 (executable)
index 0000000..0266483
--- /dev/null
@@ -0,0 +1,455 @@
+/*\r
+*  libxml test suite\r
+*\r
+* Copyright (c) 2012 Samsung Electronics Co., Ltd. All rights reserved.\r
+*\r
+* Contact: {Maintainer Name} <{Maintainer Email}>\r
+* \r
+* Licensed under the Apache License, Version 2.0 (the "License");\r
+* you may not use this file except in compliance with the License.\r
+* You may obtain a copy of the License at\r
+*\r
+* http://www.apache.org/licenses/LICENSE-2.0\r
+*\r
+* Unless required by applicable law or agreed to in writing, software\r
+* distributed under the License is distributed on an "AS IS" BASIS,\r
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+* See the License for the specific language governing permissions and\r
+* limitations under the License.\r
+*\r
+*/\r
+\r
+#include "libxml/chvalid.h"\r
+\r
+#include <libxml/xmlmemory.h>\r
+#include <libxml/uri.h>\r
+#include <libxml/globals.h>\r
+\r
+#include "utc_libxml_include.h"\r
+\r
+/***************************************************************************\r
+* SUTsXmlchValid\r
+***************************************************************************/\r
+\r
+\r
+/**    \r
+       * @test                 UTcxmlCharInRangeP01\r
+       * @brief                int xmlCharInRange (unsigned int val,const xmlChRangeGroup * rptr)\r
+       * @desc                 Positive Test for Doing a binary search of the range table to determine if char is valid\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [ xmlChRangeGroup is created with short range (1-10), N/A]      @n\r
+                                       {unsigned int(1,2,3...10),xmlChRangeGroup*(rptr)} => {N/A |1}   @n      \r
+                                       input2: [ N/A, N/A]     @n\r
+                                       {unsigned int(11,12,...19),xmlChRangeGroup*(rptr)} => {N/A |0}  @n\r
+                                       input3: [ xmlChRangeGroup long range is modiifed to (65536,65537,...65540), N/A]        @n\r
+                                       {unsigned int(65536,65537,...65540),xmlChRangeGroup*(rptr)} => {N/A |1} @n\r
+                                       input4: [ xmlChRangeGroup long range is modiifed to (65536,65537,...65540), N/A]        @n\r
+                                       {unsigned int(65540),xmlChRangeGroup*(rptr)} => {N/A |0}        @n\r
+\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+\r
+static void UTcxmlCharInRangeP01() \r
+{\r
+       int ret_val = 0;\r
+       int i = 0;\r
+       static xmlChSRange xmlIsExtender_srng[] = {1,2,3,4,5,6,7,8,9,10};\r
+       xmlChRangeGroup xmlIsExtenderGroup ={10, 0, xmlIsExtender_srng, (xmlChLRangePtr)0};\r
+  /**\r
+   * @remarks   input1: [ xmlChRangeGroup is created with short range (1-10), N/A]     @n\r
+   *                                   {(1,2,3...10),xmlChRangeGroup} => {N/A |1}      @n\r
+   */\r
+       for(i =1;i<11;i++){\r
+               ret_val = xmlCharInRange(i,&xmlIsExtenderGroup);\r
+               DTS_CHECK_EQ("xmlCharInRange", (void *)ret_val, (void *) 1);\r
+       }\r
+  /**\r
+   * @remarks   input2: [ N/A, N/A]    @n\r
+   *                                   {(11,12,...19),xmlChRangeGroup} => {N/A |0}     @n\r
+   */\r
+       for(i =11;i<20;i++){\r
+               ret_val = xmlCharInRange(i,&xmlIsExtenderGroup);\r
+               DTS_CHECK_EQ("xmlCharInRange", (void *)ret_val, (void *) 0);\r
+       }\r
+       \r
+       static xmlChLRange xmlIsExtender_Lngsrng[] = {65536,65537,65538,65539,65540};\r
+       xmlChRangeGroup xmlIsExtenderGroup2 ={10, 5, xmlIsExtender_srng, (xmlChLRangePtr)xmlIsExtender_Lngsrng};\r
+  /**\r
+   * @remarks   input3: [ xmlChRangeGroup long range is modiifed to (65536,65537,...65540), N/A]       @n\r
+   *                                   {(65536,65537,...65540),xmlChRangeGroup} => {N/A |1}    @n\r
+   */\r
+       for(i =65536;i<65540;i++){\r
+               ret_val = xmlCharInRange(i,&xmlIsExtenderGroup2);\r
+               DTS_CHECK_EQ("xmlCharInRange", (void *)ret_val, (void *) 1);\r
+       }\r
+\r
+       xmlChRangeGroup xmlIsExtenderGroup3 ={0, 0, 0, (xmlChLRangePtr)0};\r
+  /**\r
+   * @remarks   input3: [ xmlChRangeGroup long range is modiifed to (65536,65537,...65540), N/A]       @n\r
+   *                                   {(65540),xmlChRangeGroup} => {N/A |0}   @n\r
+   */\r
+       ret_val = xmlCharInRange(65540,&xmlIsExtenderGroup3);\r
+       DTS_CHECK_EQ("xmlCharInRange", (void *)ret_val, (void *) 0);\r
+       \r
+       ret_val = xmlCharInRange(0,&xmlIsExtenderGroup3);\r
+       DTS_CHECK_EQ("xmlCharInRange", (void *)ret_val, (void *) 0);\r
+       \r
+}      \r
+/**    \r
+       * @test                 UTcxmlIsBaseCharP01\r
+       * @brief                int     xmlIsBaseChar (unsigned int ch)\r
+       * @desc                 Positive Test for xmlIsBaseChar\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [ N/A, N/A]     @n\r
+                                       {unsigned int(65,66,..90)} => {N/A |1}  @n\r
+                                       input2: [ N/A, N/A]     @n\r
+                                       {unsigned int(97,98,..122)} => {N/A |1} @n\r
+                                       input3: [ N/A, N/A]     @n\r
+                                       {unsigned int(0,1,..65)} => {N/A |0}    @n                      \r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlIsBaseCharP01() \r
+{\r
+       int ret_val;\r
+       int i = 0;\r
+  /**\r
+   * @remarks   input1: [ N/A, N/A]    @n\r
+   *                                   {(65,66,..90)} => {N/A |1}      @n\r
+   */\r
+       for(i =65;i<91;i++){\r
+               ret_val = xmlIsBaseChar(i);\r
+               DTS_CHECK_EQ_MESSAGE("xmlIsBaseChar", (void *)ret_val, (void *)1, "xmlIsBaseChar Failed");\r
+       }\r
+  /**\r
+   * @remarks   input2: [ N/A, N/A]    @n\r
+   *                                   {(97,98,..122)} => {N/A |1}     @n\r
+   */\r
+       for(i =97;i<123;i++){\r
+               ret_val = xmlIsBaseChar(i);\r
+               DTS_CHECK_EQ_MESSAGE("xmlIsBaseChar", (void *)ret_val, (void *)1, "xmlIsBaseChar Failed");\r
+       }\r
+  /**\r
+   * @remarks   input3: [ N/A, N/A]    @n\r
+   *                                   {(0,1,..65)} => {N/A |0}        @n\r
+   */\r
+       for(i =0;i<65;i++){\r
+               ret_val = xmlIsBaseChar(i);\r
+               DTS_CHECK_EQ_MESSAGE("xmlIsBaseChar", (void *)ret_val, (void *)0, "xmlIsBaseChar Failed");\r
+       }\r
+}\r
+       /**    \r
+       * @test                 UTcxmlIsBlankP01\r
+       * @brief                int     xmlIsBlank      (unsigned int ch)\r
+       * @desc                 Positive Test for xmlIsBlank\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [ N/A, N/A]     @n\r
+                                       {unsigned int(' ')} => {N/A |1} @n\r
+                                       input2: [ N/A, N/A]     @n\r
+                                       {unsigned int(33,34..127)} => {N/A |0}  @n      \r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlIsBlankP01() \r
+{\r
+       int ret_val;\r
+       char val;\r
+       int i = 0;\r
+       val = ' ';\r
+  /**\r
+   * @remarks   input1: [ N/A, N/A]    @n\r
+   *                                   {' '} => {N/A |1}       @n\r
+   */\r
+       ret_val = xmlIsBlank(val);\r
+       DTS_CHECK_EQ("xmlIsBlank", (void *)ret_val, (void *) 1);\r
+  \r
+  /**\r
+   * @remarks   input2: [ N/A, N/A]    @n\r
+   *                                   {(33,34..127)} => {N/A |0}      @n\r
+   */\r
+       for(i =33;i<128;i++){\r
+               val = i;\r
+               ret_val = xmlIsBlank(val);\r
+               DTS_CHECK_EQ_MESSAGE("xmlIsBlank", (void *)ret_val, (void *)0, "xmlIsBlank Failed");\r
+       }\r
+}\r
+/**    \r
+       * @test                 UTcxmlIsCharP01\r
+       * @brief                int     xmlIsChar (unsigned int ch)\r
+       * @desc                 Positive Test for xmlIsChar\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {unsigned int(32,33,...127)} => {N/A |1}        @n\r
+                                       input2: [ N/A, N/A]     @n\r
+                                       {unsigned int('abc')} => {N/A |0}       @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlIsCharP01() \r
+{\r
+       int ret_val;\r
+       unsigned int i = 0;\r
+  /**\r
+   * @remarks   input1: [ N/A, N/A]    @n\r
+   *                                   {(32,33,...127)} => {N/A |1}    @n\r
+   */\r
+       for(i =32;i<128;i++){\r
+               ret_val = xmlIsChar(i);\r
+               DTS_CHECK_EQ_MESSAGE("xmlIsChar", (void *)ret_val, (void *)1, "xmlIsChar Failed");\r
+       }\r
+  /**\r
+   * @remarks   input2: [ N/A, N/A]    @n\r
+   *                                   {'abc'} => {N/A |0}     @n\r
+   */\r
+       ret_val = xmlIsChar('abc');\r
+       DTS_CHECK_EQ("xmlIsChar", (void *)ret_val, (void *) 0);\r
+\r
+\r
+}\r
+/**    \r
+       * @test                 UTcxmlIsCombiningP01\r
+       * @brief                int     xmlIsCombining (unsigned int ch)\r
+       * @desc                 Positive Test for xmlIsCombining\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {unsigned int(768,769,...799)} => {N/A |1}      @n\r
+                                       input2: [N/A, N/A] @n\r
+       *                       {unsigned int (0,1,...255)} => {N/A |0} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlIsCombiningP01() \r
+{\r
+\r
+    int ret_val;\r
+       unsigned int i = 0;\r
+       //Combining Diacritical Marks range(0300?36F)\r
+  /**\r
+   * @remarks   input1: [ N/A, N/A]    @n\r
+   *                                   {(768,769,...799)} => {N/A |1}  @n\r
+   */\r
+       for(i = 768;i<770;i++){\r
+               ret_val = xmlIsCombining(i);\r
+               DTS_CHECK_EQ_MESSAGE("xmlIsCombining", (void *)ret_val, (void *)1, "xmlIsCombining Failed");\r
+       }\r
+  /**\r
+   * @remarks   input2: [ N/A, N/A]    @n\r
+   *                                   {(0,1,...255)} => {N/A |0}      @n\r
+   */\r
+       for(i = 0;i<2;i++){\r
+               ret_val = xmlIsCombining(i);\r
+               DTS_CHECK_EQ("xmlIsCombining", (void *)ret_val, (void *)0 );\r
+       }\r
+}\r
+/**    \r
+       * @test                 UTcxmlIsDigitP01\r
+       * @brief                int     xmlIsDigit (unsigned int ch)\r
+       * @desc                 Positive Test for xmlIsDigit\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {unsigned int(48,49,...57)} => {N/A |1} @n\r
+                                       input2: [N/A, N/A] @n\r
+       *                       {unsigned int(59,60,...127)} => {N/A |0}        @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlIsDigitP01() \r
+{\r
+       int ret_val;\r
+       unsigned int i = 0;\r
+  /**\r
+   * @remarks   input1: [ N/A, N/A]    @n\r
+   *                                   {(48,49,...57)} => {N/A |1}     @n\r
+   */\r
+       for(i =48;i<58;i++){\r
+               ret_val = xmlIsDigit(i);\r
+               DTS_CHECK_EQ_MESSAGE("xmlIsDigit", (void *)ret_val, (void *)1, "xmlIsDigit Failed");\r
+       }\r
+       /**\r
+       * @remarks   input2: [ N/A, N/A]        @n\r
+       *                                       {(59,60,...127)} => {N/A |0}    @n\r
+       */\r
+       for(i =59;i<68;i++){\r
+               ret_val = xmlIsDigit(i);\r
+               DTS_CHECK_EQ_MESSAGE("xmlIsDigit", (void *)ret_val, (void *)0, "xmlIsDigit Failed");\r
+       }\r
+       \r
+}\r
+/**    \r
+       * @test                 UTcxmlIsExtenderP01\r
+       * @brief                int     xmlIsExtender (unsigned int ch)\r
+       * @desc                 Positive Test for xmlIsExtender\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {unsigned int(183)} => {N/A |1} @n\r
+                                       input2: [N/A, N/A] @n\r
+       *                       {unsigned int (0,1,...127)} => {N/A |0} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlIsExtenderP01() \r
+{\r
+       int ret_val;\r
+       unsigned int i = 0;\r
+  /**\r
+   * @remarks   input1: [ N/A, N/A]    @n\r
+   *                                   {183} => {N/A |1}       @n\r
+   */\r
+               ret_val = xmlIsExtender(183);//corresponds to'.'\r
+               DTS_CHECK_EQ_MESSAGE("xmlIsExtender", (void *)ret_val, (void *)1, "xmlIsExtender Failed");\r
+\r
+  /**\r
+   * @remarks   input2: [ N/A, N/A]    @n\r
+   *                                   {(0,1,...127)} => {N/A |0}      @n\r
+   */  \r
+       for(i =0;i<2;i++){\r
+               ret_val = xmlIsExtender(i);\r
+               DTS_CHECK_EQ_MESSAGE("xmlIsExtender", (void *)ret_val, (void *)0, "xmlIsExtender Failed");\r
+       }\r
+}\r
+/**    \r
+       * @test                 UTcxmlIsIdeographicP01\r
+       * @brief                int     xmlIsIdeographic (unsigned int ch)\r
+       * @desc                 Positive Test for xmlIsIdeographic\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {unsigned int(19968,19969...20223} => {N/A |1}  @n\r
+                                       input2: [N/A, N/A] @n\r
+       *                       {unsigned int(0,1...256} => {N/A |0}    @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlIsIdeographicP01() \r
+{\r
+       int ret_val;\r
+       unsigned int i = 0;\r
+  /**\r
+   * @remarks   input1: [ N/A, N/A]    @n\r
+   *                                   {19968,19969...20223} => {N/A |1}       @n\r
+   */\r
+       for(i =19968;i<19970;i++){\r
+               ret_val = xmlIsIdeographic(i);\r
+               DTS_CHECK_EQ_MESSAGE("xmlIsIdeographic", (void *)ret_val, (void *)1, "xmlIsIdeographic Failed");\r
+       }\r
+  /**\r
+   * @remarks   input2: [ N/A, N/A]    @n\r
+   *                                   {0,1...256} => {N/A |0} @n\r
+   */\r
+       for(i =0;i<2;i++){\r
+               ret_val = xmlIsIdeographic(i);\r
+               DTS_CHECK_EQ_MESSAGE("xmlIsIdeographic", (void *)ret_val, (void *)0, "xmlIsIdeographic Failed");\r
+       }\r
+}\r
+/**    \r
+       * @test                 UTcxmlIsPubidCharP01\r
+       * @brief                int     xmlIsPubidChar (unsigned int ch)\r
+       * @desc                 Positive Test for xmlIsPubidChar\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {unsigned int(65,66...90} => {N/A |1}   @n\r
+                                       input2: [N/A, N/A] @n\r
+       *                       {unsigned int(97,98...122} => {N/A |1}  @n\r
+                                       input3: [N/A, N/A] @n\r
+       *                       {unsigned int('-','=','()','+',',','.','/',':','=','?',';','!','*','#','@','$','_','%'} => {N/A |1}     @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlIsPubidCharP01() \r
+{\r
+       int ret_val;\r
+       unsigned int i = 0;\r
+       char chArray[] = {'-','=','+',',','.','/',':','=','?',';','!','*','#','@','$','_','%'};\r
+  /**\r
+   * @remarks   input1: [ N/A, N/A]    @n\r
+   *                                   {65,66...90} => {N/A |1}        @n\r
+   */\r
+       for(i =65;i<70;i++){\r
+               ret_val = xmlIsPubidChar(i);\r
+               DTS_CHECK_EQ_MESSAGE("xmlIsPubidChar", (void *)ret_val, (void *)1, "xmlIsPubidChar Failed");\r
+       }\r
+  /**\r
+   * @remarks   input2: [ N/A, N/A]    @n\r
+   *                                   {97,98...122} => {N/A |1}       @n\r
+   */\r
+       for(i =97;i<100;i++){\r
+               ret_val = xmlIsPubidChar(i);\r
+               DTS_CHECK_EQ_MESSAGE("xmlIsPubidChar", (void *)ret_val, (void *)1, "xmlIsPubidChar Failed");\r
+       }\r
+  /**\r
+   * @remarks   input3: [ N/A, N/A]    @n\r
+   * {'-','=','()','+',',','.','/',':','=','?',';','!','*','#','@','$','_','%'} => {N/A |1}    @n\r
+   */\r
+       for (i = 0;i<2;i++){\r
+               ret_val = xmlIsPubidChar(chArray[i]);\r
+               DTS_CHECK_EQ_MESSAGE("xmlIsPubidChar", (void *)ret_val, (void *)1, "xmlIsPubidChar Failed");\r
+       }\r
+\r
+       for(i =0;i<15;i++){\r
+               if (i == 13 || i == 10)\r
+                               continue;\r
+               ret_val = xmlIsPubidChar(i);\r
+               DTS_CHECK_EQ_MESSAGE("xmlIsPubidChar", (void *)ret_val, (void *)0, "xmlIsPubidChar Failed");\r
+                       \r
+       }\r
+}\r
+\r
+static void startup( void);\r
+static void cleanup( void);\r
+\r
+void (*tet_startup)( void) = startup;\r
+void (*tet_cleanup)( void) = cleanup;\r
+\r
+static void startup( void)\r
+{\r
+        /* start of TC */\r
+        tet_printf("TC starts.");\r
+}\r
+\r
+static void cleanup( void)\r
+{\r
+        /* end of TC */\r
+        tet_printf("TC ends.");\r
+}\r
+\r
+struct tet_testlist tet_testlist[] = {\r
+       // Handling of out of context errors\r
+       {UTcxmlCharInRangeP01,1},\r
+       {UTcxmlIsBaseCharP01,2},\r
+       {UTcxmlIsBlankP01,3},\r
+       {UTcxmlIsCharP01,4},\r
+       {UTcxmlIsCombiningP01,5},\r
+       {UTcxmlIsDigitP01,6},\r
+       {UTcxmlIsExtenderP01,7},\r
+       {UTcxmlIsIdeographicP01,8},\r
+       {UTcxmlIsPubidCharP01,9},\r
+       {NULL, 0},\r
+       \r
+};\r
diff --git a/TC/testcase/utc_libxml_Xmlvalid.c b/TC/testcase/utc_libxml_Xmlvalid.c
new file mode 100755 (executable)
index 0000000..f589255
--- /dev/null
@@ -0,0 +1,2513 @@
+/*\r
+*  libxml test suite\r
+*\r
+* Copyright (c) 2012 Samsung Electronics Co., Ltd. All rights reserved.\r
+*\r
+* Contact: {Maintainer Name} <{Maintainer Email}>\r
+* \r
+* Licensed under the Apache License, Version 2.0 (the "License");\r
+* you may not use this file except in compliance with the License.\r
+* You may obtain a copy of the License at\r
+*\r
+* http://www.apache.org/licenses/LICENSE-2.0\r
+*\r
+* Unless required by applicable law or agreed to in writing, software\r
+* distributed under the License is distributed on an "AS IS" BASIS,\r
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+* See the License for the specific language governing permissions and\r
+* limitations under the License.\r
+*\r
+*/ \r
+#include "utc_libxml_include.h"\r
+#include <libxml/xmlmemory.h>\r
+#include <libxml/uri.h>\r
+#include <libxml/globals.h>\r
+#include <libxml/xmlunicode.h>\r
+#include <libxml/tree.h>\r
+\r
+\r
+\r
+\r
+/***************************************************************************\r
+* SUTsXmlList\r
+***************************************************************************/\r
+\r
+\r
+/**************************************\r
+\r
+HELPERS\r
+\r
+****************************************/\r
+\r
+#define gen_nb_xmlBufferPtr 3\r
+#define gen_nb_xmlNotationPtr 1\r
+#define gen_nb_xmlNotationTablePtr 1\r
+static xmlDocPtr api_doc = NULL;\r
+static xmlDtdPtr api_dtd = NULL;\r
+static xmlNodePtr api_root = NULL;\r
+static xmlAttrPtr api_attr = NULL;\r
+static xmlNsPtr api_ns = NULL;\r
+static void\r
+free_api_doc(void) {\r
+       xmlFreeDoc(api_doc);\r
+       api_doc = NULL;\r
+       api_dtd = NULL;\r
+       api_root = NULL;\r
+       api_attr = NULL;\r
+       api_ns = NULL;\r
+}\r
+static xmlDocPtr\r
+get_api_doc(void) {\r
+       if (api_doc == NULL) {\r
+               api_doc = xmlReadMemory("<!DOCTYPE root [<!ELEMENT root EMPTY>]><root xmlns:h='http://example.com/' h:foo='bar'/>", 88, "root_test", NULL, 0);\r
+               api_root = NULL;\r
+               api_attr = NULL;\r
+       }\r
+       return(api_doc);\r
+}\r
+static xmlDtdPtr\r
+get_api_dtd(void) {\r
+       if ((api_dtd == NULL) || (api_dtd->type != XML_DTD_NODE)) {\r
+               get_api_doc();\r
+               if ((api_doc != NULL) && (api_doc->children != NULL) &&\r
+                       (api_doc->children->type == XML_DTD_NODE))\r
+                       api_dtd = (xmlDtdPtr) api_doc->children;\r
+       }\r
+       return(api_dtd);\r
+}\r
+static const char *static_buf_content = "a static buffer";\r
+static xmlBufferPtr gen_xmlBufferPtr(int no, int nr ATTRIBUTE_UNUSED) {\r
+       if (no == 0) return(xmlBufferCreate());\r
+       if (no == 1) return(xmlBufferCreateStatic((void *)static_buf_content, 13));\r
+       return(NULL);\r
+}\r
+\r
+static xmlNotationPtr gen_xmlNotationPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+       return(NULL);\r
+}\r
+static void des_xmlBufferPtr(int no ATTRIBUTE_UNUSED, xmlBufferPtr val, int nr ATTRIBUTE_UNUSED) {\r
+       if (val != NULL) {\r
+               xmlBufferFree(val);\r
+       }\r
+}\r
+\r
+static void des_xmlNotationPtr(int no ATTRIBUTE_UNUSED, xmlNotationPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+}\r
+\r
+static xmlNotationTablePtr gen_xmlNotationTablePtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+       return(NULL);\r
+}\r
+static void des_xmlNotationTablePtr(int no ATTRIBUTE_UNUSED, xmlNotationTablePtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+}\r
+\r
+#define gen_nb_const_xmlChar_ptr 5\r
+\r
+static xmlChar *gen_const_xmlChar_ptr(int no, int nr ATTRIBUTE_UNUSED) {\r
+       if (no == 0) return((xmlChar *) "foo");\r
+       if (no == 1) return((xmlChar *) "<foo/>");\r
+       if (no == 2) return((xmlChar *) "nøne");\r
+       if (no == 3) return((xmlChar *) " 2ab ");\r
+       return(NULL);\r
+}\r
+static void des_const_xmlChar_ptr(int no ATTRIBUTE_UNUSED, const xmlChar *val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+}\r
+\r
+\r
+#define gen_nb_xmlElementContentType 4\r
+static xmlElementContentType gen_xmlElementContentType(int no, int nr ATTRIBUTE_UNUSED) {\r
+       if (no == 1) return(XML_ELEMENT_CONTENT_ELEMENT);\r
+       if (no == 2) return(XML_ELEMENT_CONTENT_OR);\r
+       if (no == 3) return(XML_ELEMENT_CONTENT_PCDATA);\r
+       if (no == 4) return(XML_ELEMENT_CONTENT_SEQ);\r
+       return((xmlElementContentType)(0));\r
+}\r
+\r
+static void des_xmlElementContentType(int no ATTRIBUTE_UNUSED, xmlElementContentType val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+}\r
+\r
+static void desret_xmlElementContentPtr(xmlElementContentPtr val) {\r
+       if (val != NULL)\r
+               xmlFreeElementContent(val);\r
+}\r
+\r
+#define gen_nb_xmlElementContentPtr 1\r
+static xmlElementContentPtr gen_xmlElementContentPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+       return(NULL);\r
+}\r
+static void des_xmlElementContentPtr(int no ATTRIBUTE_UNUSED, xmlElementContentPtr val, int nr ATTRIBUTE_UNUSED) {\r
+       if (val != NULL)\r
+               xmlFreeElementContent(val);\r
+}\r
+\r
+#define gen_nb_char_ptr 1\r
+static char * gen_char_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+       return(NULL);\r
+}\r
+static void des_char_ptr(int no ATTRIBUTE_UNUSED, char * val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+}\r
+\r
+#define gen_nb_int 4\r
+\r
+static int gen_int(int no, int nr ATTRIBUTE_UNUSED) {\r
+       if (no == 0) return(0);\r
+       if (no == 1) return(1);\r
+       if (no == 2) return(-1);\r
+       if (no == 3) return(122);\r
+       return(-1);\r
+}\r
+static void des_int(int no ATTRIBUTE_UNUSED, int val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+}\r
+#define gen_nb_xmlDtdPtr 3\r
+static xmlDtdPtr gen_xmlDtdPtr(int no, int nr ATTRIBUTE_UNUSED) {\r
+       if (no == 0)\r
+               return(xmlNewDtd(NULL, BAD_CAST "dtd", BAD_CAST"foo", BAD_CAST"bar"));\r
+       if (no == 1) return(get_api_dtd());\r
+       return(NULL);\r
+}\r
+static void des_xmlDtdPtr(int no, xmlDtdPtr val, int nr ATTRIBUTE_UNUSED) {\r
+       if (no == 1) free_api_doc();\r
+       else if (val != NULL) {\r
+               xmlUnlinkNode((xmlNodePtr) val);\r
+               xmlFreeNode((xmlNodePtr) val);\r
+       }\r
+}\r
+#define gen_nb_xmlElementTypeVal 4\r
+static xmlElementTypeVal gen_xmlElementTypeVal(int no, int nr ATTRIBUTE_UNUSED) {\r
+       if (no == 1) return(XML_ELEMENT_TYPE_ANY);\r
+       if (no == 2) return(XML_ELEMENT_TYPE_ELEMENT);\r
+       if (no == 3) return(XML_ELEMENT_TYPE_EMPTY);\r
+       if (no == 4) return(XML_ELEMENT_TYPE_MIXED);\r
+       return((xmlElementTypeVal)(0));\r
+}\r
+\r
+static void des_xmlElementTypeVal(int no ATTRIBUTE_UNUSED, xmlElementTypeVal val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+}\r
+#define gen_nb_xmlValidCtxtPtr 2\r
+static xmlValidCtxtPtr gen_xmlValidCtxtPtr(int no, int nr ATTRIBUTE_UNUSED) {\r
+#ifdef LIBXML_VALID_ENABLED\r
+       if (no == 0) return(xmlNewValidCtxt());\r
+#endif\r
+       return(NULL);\r
+}\r
+static void des_xmlValidCtxtPtr(int no ATTRIBUTE_UNUSED, xmlValidCtxtPtr val, int nr ATTRIBUTE_UNUSED) {\r
+#ifdef LIBXML_VALID_ENABLED\r
+       if (val != NULL)\r
+               xmlFreeValidCtxt(val);\r
+#endif\r
+}\r
+static void desret_xmlElementPtr(xmlElementPtr val) {\r
+       if (val != NULL) {\r
+               xmlUnlinkNode((xmlNodePtr) val);\r
+       }\r
+}\r
+\r
+#define gen_nb_xmlAttributeDefault 4\r
+static xmlAttributeDefault gen_xmlAttributeDefault(int no, int nr ATTRIBUTE_UNUSED) {\r
+       if (no == 1) return(XML_ATTRIBUTE_FIXED);\r
+       if (no == 2) return(XML_ATTRIBUTE_IMPLIED);\r
+       if (no == 3) return(XML_ATTRIBUTE_NONE);\r
+       if (no == 4) return(XML_ATTRIBUTE_REQUIRED);\r
+       return((xmlAttributeDefault)(0));\r
+}\r
+\r
+static void des_xmlAttributeDefault(int no ATTRIBUTE_UNUSED, xmlAttributeDefault val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+}\r
+\r
+#define gen_nb_xmlAttributeType 4\r
+static xmlAttributeType gen_xmlAttributeType(int no, int nr ATTRIBUTE_UNUSED) {\r
+       if (no == 1) return(XML_ATTRIBUTE_CDATA);\r
+       if (no == 2) return(XML_ATTRIBUTE_ENTITIES);\r
+       if (no == 3) return(XML_ATTRIBUTE_ENTITY);\r
+       if (no == 4) return(XML_ATTRIBUTE_ENUMERATION);\r
+       return((xmlAttributeType)(0));\r
+}\r
+\r
+static void des_xmlAttributeType(int no ATTRIBUTE_UNUSED, xmlAttributeType val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+}\r
+\r
+#define gen_nb_xmlBufferAllocationScheme 4\r
+static xmlBufferAllocationScheme gen_xmlBufferAllocationScheme(int no, int nr ATTRIBUTE_UNUSED) {\r
+       if (no == 1) return(XML_BUFFER_ALLOC_DOUBLEIT);\r
+       if (no == 2) return(XML_BUFFER_ALLOC_EXACT);\r
+       if (no == 3) return(XML_BUFFER_ALLOC_IMMUTABLE);\r
+       return((xmlBufferAllocationScheme)(0));\r
+}\r
+\r
+static void des_xmlBufferAllocationScheme(int no ATTRIBUTE_UNUSED, xmlBufferAllocationScheme val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+}\r
+\r
+static void desret_xmlBufferAllocationScheme(xmlBufferAllocationScheme val ATTRIBUTE_UNUSED) {\r
+}\r
+\r
+\r
+#define gen_nb_xmlEnumerationPtr 1\r
+static xmlEnumerationPtr gen_xmlEnumerationPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+       return(NULL);\r
+}\r
+static void des_xmlEnumerationPtr(int no ATTRIBUTE_UNUSED, xmlEnumerationPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+}\r
+\r
+static void desret_xmlAttributePtr(xmlAttributePtr val) {\r
+       if (val != NULL) {\r
+               xmlUnlinkNode((xmlNodePtr) val);\r
+       }\r
+}\r
+#define gen_nb_xmlDocPtr 4\r
+static xmlDocPtr gen_xmlDocPtr(int no, int nr ATTRIBUTE_UNUSED) {\r
+       if (no == 0) return(xmlNewDoc(BAD_CAST "1.0"));\r
+       if (no == 1) return(xmlReadMemory("<foo/>", 6, "test", NULL, 0));\r
+       if (no == 2) return(xmlReadMemory("<!DOCTYPE foo []> <foo/>", 24, "test", NULL, 0));\r
+       return(NULL);\r
+}\r
+static void des_xmlDocPtr(int no ATTRIBUTE_UNUSED, xmlDocPtr val, int nr ATTRIBUTE_UNUSED) {\r
+       if ((val != NULL) && (val != api_doc) && (val->doc != api_doc))\r
+               xmlFreeDoc(val);\r
+}\r
+static xmlNodePtr\r
+get_api_root(void) {\r
+       if ((api_root == NULL) || (api_root->type != XML_ELEMENT_NODE)) {\r
+               get_api_doc();\r
+               if ((api_doc != NULL) && (api_doc->children != NULL) &&\r
+                       (api_doc->children->next != NULL) &&\r
+                       (api_doc->children->next->type == XML_ELEMENT_NODE))\r
+                       api_root = api_doc->children->next;\r
+       }\r
+       return(api_root);\r
+}\r
+\r
+static xmlAttrPtr\r
+get_api_attr(void) {\r
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_HTML_ENABLED)\r
+       static int nr = 0;\r
+       xmlChar name[20];\r
+#endif\r
+\r
+       if ((api_root == NULL) || (api_root->type != XML_ELEMENT_NODE)) {\r
+               get_api_root();\r
+       }\r
+       if (api_root == NULL)\r
+               return(NULL);\r
+       if (api_root->properties != NULL) {\r
+               api_attr = api_root->properties;\r
+               return(api_root->properties);\r
+       }\r
+       api_attr = NULL;\r
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_HTML_ENABLED)\r
+       //snprintf((char *) name, 20, "foo%d", nr++);\r
+       api_attr = xmlSetProp(api_root, name, (const xmlChar *) "bar");\r
+#endif\r
+       return(api_attr);\r
+}\r
+\r
+#define gen_nb_xmlAttrPtr 2\r
+static xmlAttrPtr gen_xmlAttrPtr(int no, int nr ATTRIBUTE_UNUSED) {\r
+       if (no == 0) return(get_api_attr());\r
+       return(NULL);\r
+}\r
+static void des_xmlAttrPtr(int no, xmlAttrPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+       if (no == 0) free_api_doc();\r
+}\r
+\r
+static void desret_xmlAttrPtr(xmlAttrPtr val) {\r
+       if (val != NULL) {\r
+               xmlUnlinkNode((xmlNodePtr) val);\r
+               xmlFreeNode((xmlNodePtr) val);\r
+       }\r
+}\r
+\r
+#define gen_nb_xmlNodePtr 3\r
+static xmlNodePtr gen_xmlNodePtr(int no, int nr ATTRIBUTE_UNUSED) {\r
+       if (no == 0) return(xmlNewPI(BAD_CAST "test", NULL));\r
+       if (no == 1) return(get_api_root());\r
+       return(NULL);\r
+       /*     if (no == 2) return((xmlNodePtr) get_api_doc()); */\r
+}\r
+static void des_xmlNodePtr(int no, xmlNodePtr val, int nr ATTRIBUTE_UNUSED) {\r
+       if (no == 1) {\r
+               free_api_doc();\r
+       } else if (val != NULL) {\r
+               xmlUnlinkNode(val);\r
+               xmlFreeNode(val);\r
+       }\r
+}\r
+\r
+static void desret_int(int val ATTRIBUTE_UNUSED) {\r
+}\r
+#define gen_nb_xmlElementPtr 1\r
+static xmlElementPtr gen_xmlElementPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+       return(NULL);\r
+}\r
+static void des_xmlElementPtr(int no ATTRIBUTE_UNUSED, xmlElementPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+\r
+}\r
+\r
+static void desret_xmlChar_ptr(xmlChar *val) {\r
+       if (val != NULL)\r
+               xmlFree(val);\r
+}\r
+\r
+\r
+#define gen_nb_xmlAttributePtr 1\r
+static xmlAttributePtr gen_xmlAttributePtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+       return(NULL);\r
+}\r
+static void des_xmlAttributePtr(int no ATTRIBUTE_UNUSED, xmlAttributePtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+}\r
+\r
+\r
+#define gen_nb_xmlElementTablePtr 1\r
+static xmlElementTablePtr gen_xmlElementTablePtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+       return(NULL);\r
+}\r
+static void des_xmlElementTablePtr(int no ATTRIBUTE_UNUSED, xmlElementTablePtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+}\r
+\r
+\r
+#define gen_nb_xmlAttributeTablePtr 1\r
+static xmlAttributeTablePtr gen_xmlAttributeTablePtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+       return(NULL);\r
+}\r
+static void des_xmlAttributeTablePtr(int no ATTRIBUTE_UNUSED, xmlAttributeTablePtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+}\r
+       /**    \r
+       * @test                 UTcxmlNewValidCtxtP01\r
+       * @brief                xmlValidCtxtPtr xmlNewValidCtxt (void)\r
+       * @desc                 Positive Test for allocating a validation context structure.\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A]      @n\r
+       *                       {xmlNewValidCtxt(void} => {N/A | xmlValidCtxtPtr}       @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void \r
+UTcxmlNewValidCtxtP01()\r
+{\r
+       /**\r
+       * @remarks   input1: [N/A, N/A] @n\r
+       *                                       {void} => {N/A | xmlValidCtxtPtr}       @n\r
+       */\r
+#ifdef  LIBXML_VALID_ENABLED\r
+       xmlValidCtxtPtr outValue = xmlNewValidCtxt();\r
+       DTS_CHECK_NE_MESSAGE("UTcxmlNewValidCtxtP01", (void *)outValue, (void *)NULL, "xmlNewValidCtxt Failed");\r\r
+       xmlFreeValidCtxt(outValue);\r
+#endif\r
+}\r
+       /**    \r
+       * @test                 UTcxmlFreeValidCtxtP01\r
+       * @brief                void xmlFreeValidCtxt (xmlValidCtxtPtr cur)\r
+       * @desc                 Positive Test for Freeing a validation context structure.\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [xmlValidCtxtPtr(outVal) is created ,N/A]       @n\r
+       *                       {xmlValidCtxtPtr(outVal)} => {N/A | N/A}        @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void \r
+UTcxmlFreeValidCtxtP01()\r
+{\r
+\r
+       /**\r
+       * @remarks   input1: [xmlValidCtxtPtr(outVal) is created ,N/A]  @n\r
+       *                                       {outVal} => {N/A | N/A} @n\r
+       */      \r
+#ifdef  LIBXML_VALID_ENABLED\r
+       xmlValidCtxtPtr outValue = xmlNewValidCtxt();\r
+       DTS_CHECK_NE_MESSAGE("UTcxmlFreeValidCtxtP01", (void *)outValue, (void *)NULL, "xmlNewValidCtxt Failed");\r\r
+       xmlFreeValidCtxt(outValue);\r
+#endif\r
+}\r
+       /**    \r
+       * @test                 UTcxmlAddNotationDeclP01\r
+       * @brief                xmlNotationPtr  xmlAddNotationDecl (xmlValidCtxtPtr ctxt,\r
+                                       xmlDtdPtr dtd,\r
+                                       const xmlChar * name,\r
+                                       const xmlChar * PublicID,\r
+                                   const xmlChar * SystemID)\r
+       * @desc                 Positive Test for registering a new notation declaration\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [xmlDtdPtr(dtd) is created , N/A]       @n\r
+       *                       {NULL,xmlDtdPtr(dtd),xmlChar(name),xmlChar(pId1),xmlChar(sId1)} => {N/A |xmlNotationPtr}        @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void \r
+UTcxmlAddNotationDeclP01()\r
+{\r
+\r
+       xmlDtdPtr dtd = xmlNewDtd(NULL, BAD_CAST "dtd", BAD_CAST"foo", BAD_CAST"bar");\r
+       //xmlElementPtr elem = xmlAddElementDecl(NULL, dtd, (const xmlChar *)"test", XML_ELEMENT_TYPE_EMPTY, NULL); /* An element table */\r
+\r
+       xmlElementTablePtr table = xmlHashCreate(0);\r
+       xmlHashAddEntry(table,(xmlChar*)"Id1",(void*)"element1");\r
+       /**\r
+       * @remarks   input1: [xmlDtdPtr(dtd) is created , N/A]  @n\r
+       *                                       {NULL,dtd,"name","pId1","sId1"} => {N/A |xmlNotationPtr}        @n\r
+       */      \r
+       xmlNotationPtr ret_val = xmlAddNotationDecl(NULL,dtd,(xmlChar *)"name",(xmlChar *)"pId1",(xmlChar *)"sId1");\r
+       DTS_CHECK_NE_MESSAGE("UTcxmlAddNotationDeclP01", (void *)ret_val, (void *)NULL, "xmlNewValidCtxt Failed");\r\r
+               \r
+       DTS_CHECK_EQ_MESSAGE("UTcxmlAddNotationDeclP01", (void *)(strcmp((char*)ret_val->name,"name")), (void *)0, "xmlNewValidCtxt Failed");\r\r
+       DTS_CHECK_EQ_MESSAGE("UTcxmlAddNotationDeclP01", (void *)(strcmp((char*)ret_val->SystemID,"sId1")), (void *)0, "xmlNewValidCtxt Failed");\r      \r
+       DTS_CHECK_EQ_MESSAGE("UTcxmlAddNotationDeclP01", (void *)(strcmp((char*)ret_val->PublicID,"pId1")), (void *)0, "xmlNewValidCtxt Failed");\r\r
+       \r
+\r
+       if (NULL != table)\r
+       {\r
+               //xmlHashRemoveEntry(table,(xmlChar*)"Id1",NULL);\r
+               xmlHashFree(table,NULL);\r
+       }\r
+       if (dtd != NULL)\r
+       {\r
+               xmlFreeDtd(dtd);\r
+       }\r
+}\r
+       /**    \r
+       * @test                 UTcxmlCopyNotationTableP01\r
+       * @brief                xmlNotationTablePtr     xmlCopyNotationTable (xmlNotationTablePtr table)\r
+       * @desc                 Positive Test for building a copy of a notation table\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [ N/A , N/A]    @n\r
+       *                       {NULL} => {N/A |xmlNotationTablePtr}    @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void \r
+UTcxmlCopyNotationTableP01()\r
+{\r
+       /**\r
+       * @remarks   input1: [ N/A , N/A]       @n\r
+       *                                       {NULL} => {N/A |xmlNotationTablePtr}    @n\r
+       */      \r
+       xmlNotationTablePtr table2 = xmlCopyNotationTable(NULL);\r
+       DTS_CHECK_EQ_MESSAGE("UTcxmlCopyNotationTableP01", (void *)table2, (void *)NULL, "xmlCopyNotationTable Failed");\r\r
+}\r
+       /**    \r
+       * @test                 UTcxmlFreeNotationTableP01\r
+       * @brief                int     xmlHashAddEntry3        (xmlHashTablePtr table,\r
+                                       const xmlChar * name, \r
+                                       const xmlChar * name2,\r
+                                       const xmlChar * name3, \r
+                                       void * userdata)\r
+       * @desc                 Positive Test for adding the userdata to the hash table\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [xmlElementTablePtr(table) is created with size 4 , N/A]        @n\r
+       *                       {xmlHashTablePtr(table)} => {N/A | N/A} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void \r
+UTcxmlFreeNotationTableP01()\r
+{\r
+       xmlElementTablePtr table = xmlHashCreate(4);\r
+       xmlHashAddEntry3(table,(xmlChar*)"Id1",(xmlChar*)"name2",(xmlChar*)"name3",NULL);\r
+       /**\r
+       * @remarks   input1: [xmlElementTablePtr(table) is created with size 4 , N/A]   @n\r
+       *                                       {table} => {N/A | N/A}  @n\r
+       */      \r
+       xmlFreeNotationTable(table);\r
+       DTS_CHECK_EQ_MESSAGE("xmlFreeNotationTable", (void *)1, (void *)1, "xmlFreeNotationTable Failed");\r
+}      \r
+\r
+       /**    \r
+       * @test                 UTcxmlDumpNotationDeclP01\r
+       * @brief                void    xmlDumpNotationDecl     (xmlBufferPtr buf,\r
+                                       xmlNotationPtr nota)\r
+       * @desc                 Positive Test for dumping the content the notation declaration as an XML DTD definition\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [xmlBufferPtr(buf) is created \n xmlNotationPtr(nota) is created with name ="hello" PrimaryId ="pId" SystemId ="sId" , N/A]     @n\r
+       *                       {xmlBufferPtr(buf),xmlNotationPtr(nota)} => {N/A | N/A} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void \r
+UTcxmlDumpNotationDeclP01()\r
+{\r
+//     int test_ret = 0;\r
+       xmlBufferPtr buf; /* the XML buffer output */\r
+       xmlNotationPtr nota = (xmlNotationPtr)malloc(sizeof(xmlNotation)); /* A notation declaration */\r
+       unsigned char* pname = (unsigned char*)"hello";\r
+       buf = xmlBufferCreate();\r
+       DTS_CHECK_NE_MESSAGE("UTcxmlFreeValidCtxtP01", (void *)buf, (void *)NULL, "xmlBufferCreate Failed");\r\r
+               \r
+       buf->alloc = XML_BUFFER_ALLOC_EXACT;\r
+       nota->name = pname;\r
+       nota->PublicID = NULL;\r
+       nota->SystemID = NULL;\r
+       /**\r
+       * @remarks   input1: [xmlBufferPtr(buf) is created \n xmlNotationPtr(nota) is created with name ="hello" PrimaryId ="pId" SystemId ="sId" , N/A]        @n\r
+       *                                       {buf,nota} => {N/A | N/A}       @n\r
+       */      \r
+       xmlDumpNotationDecl(buf, nota);\r
+       unsigned char* out = (unsigned char*)(buf->content);\r
+       int check = strcmp("<!NOTATION hello SYSTEM \"\" >\n",(const char*)out);\r
+       DTS_CHECK_EQ_MESSAGE("UTcxmlFreeValidCtxtP01", (void *)check, (void *)0, "xmlDumpNotationDecl Failed");\r\r
+               \r
+       xmlResetLastError();\r
+\r
+       free( nota);\r
+       if (buf != NULL)\r
+       {\r
+               xmlBufferFree(buf);\r
+       }\r
+}\r
+       /**    \r
+       * @test                 UTcxmlDumpNotationTableP01\r
+       * @brief                void    xmlDumpNotationTable    (xmlBufferPtr buf,      \r
+                                       xmlNotationTablePtr table)\r
+       * @desc                 Positive Test for dumping the content of the notation table as an XML DTD definition\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [xmlBufferPtr(buf) is created \n xmlNotationTablePtr(table) is created , N/A]   @n\r
+       *                       {xmlBufferPtr(buf),xmlNotationTablePtr(table)} => {N/A | N/A}   @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void \r
+UTcxmlDumpNotationTableP01()\r
+{\r
+       xmlBufferPtr buf; /* the XML buffer output */\r
+       int n_buf;\r
+       xmlNotationTablePtr table; /* A notation table */\r
+       int n_table;\r
+\r
+       /**\r
+       * @remarks   input1: [xmlBufferPtr(buf) is created \n xmlNotationTablePtr(table) is created , N/A]      @n\r
+       *                                       {buf,table} => {N/A | N/A}      @n\r
+       */\r
+       for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {\r
+               for (n_table = 0;n_table < gen_nb_xmlNotationTablePtr;n_table++) {\r
+                       buf = gen_xmlBufferPtr(n_buf, 0);\r
+                       table = gen_xmlNotationTablePtr(n_table, 1);\r
+\r
+                       xmlDumpNotationTable(buf, table);\r
+                       DTS_CHECK_EQ_MESSAGE("xmlDumpNotationTable", (void *)1, (void *)1, "xmlDumpNotationTable Failed");\r
+                       des_xmlBufferPtr(n_buf, buf, 0);\r
+                       des_xmlNotationTablePtr(n_table, table, 1);\r
+                       xmlResetLastError();\r
+\r
+               }\r
+       }\r
+\r
+}\r
+       /**    \r
+       * @test                 UTcxmlNewElementContentP01\r
+       * @brief                xmlElementContentPtr    xmlNewElementContent    (const xmlChar * name, xmlElementContentType type)\r
+       * @desc                 Positive Test for allocating an element content structure\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A]      @n\r
+       *                       {"foo",XML_ELEMENT_CONTENT_PCDATA} => {N/A | N/A}       @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void \r
+UTcxmlNewElementContentP01()\r
+{\r
+//     int test_ret = 0;\r
+\r
+       xmlElementContentPtr ret_val;\r
+       xmlChar * name; /* the subelement name or NULL */\r
+       name = (xmlChar *)("foo");\r
+       ret_val = xmlNewElementContent((const xmlChar *)name, XML_ELEMENT_CONTENT_ELEMENT);\r
+       DTS_CHECK_NE_MESSAGE("UTcxmlNewElementContentP01", (void *)ret_val, (void *)NULL, "xmlNewElementContent Failed");\r\r
+       \r
+       if (ret_val != NULL)\r
+       {\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlNewElementContentP01", (void *)ret_val->type, (void *)XML_ELEMENT_CONTENT_ELEMENT, "xmlNewElementContent 1 Failed");\r\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlNewElementContentP01", (void *)(strcmp((const char*)(ret_val->name),"foo")), (void *)0, "xmlNewElementContent 2 Failed");\r\r
+               xmlFreeElementContent(ret_val);\r
+       }\r
+       /**\r
+       * @remarks   input1: [N/A, N/A] @n\r
+       *                                       {"foo",XML_ELEMENT_CONTENT_PCDATA} => {N/A | N/A}       @n\r
+       */      \r
+       //ret_val = xmlNewElementContent((const xmlChar *)name, xmlElementContentType(0));\r
+       //MT_CHECK(ret_val == NULL);\r
+}\r
+       /**    \r
+       * @test                 UTcxmlCopyElementContentP01\r
+       * @brief                xmlElementContentPtr    xmlCopyElementContent   (xmlElementContentPtr cur)\r
+       * @desc                 Positive Test for building a copy of an element content description\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [xmlElementContentPtr(cur) is created with name "foo" and XML_ELEMENT_CONTENT_ELEMENT, N/A]     @n\r
+       *                       {cur} => {N/A |xmlElementContentPtr}    @n\r
+                                       input1: [N/A, N/A]      @n\r
+                                       {xmlElementContentPtr} => {N/A | Copy of xmlElementContentPtr}  @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void \r
+UTcxmlCopyElementContentP01()\r
+{\r
+       xmlChar * name;\r
+       name = (xmlChar *)("foo");\r
+\r
+       xmlElementContentPtr ret_val = NULL;\r
+       xmlElementContentPtr cur = xmlNewElementContent((const xmlChar *)name, XML_ELEMENT_CONTENT_ELEMENT); /* An element content pointer. */\r
+       /**\r
+       * @remarks   input1: [xmlElementContentPtr(cur) is created with name "foo" and XML_ELEMENT_CONTENT_ELEMENT, N/A]        @n\r
+       *                                       {cur} => {N/A |xmlElementContentPtr}    @n\r
+       */      \r
+       ret_val = xmlCopyElementContent(cur);\r
+       DTS_CHECK_NE_MESSAGE("UTcxmlCopyElementContentP01", (void *)ret_val, (void *)NULL, "xmlCopyElementContent Failed");\r\r
+       \r
+       if (ret_val != NULL)\r
+       {\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlCopyElementContentP01", (void *)ret_val->type, (void *)XML_ELEMENT_CONTENT_ELEMENT, "xmlCopyElementContent  1 Failed");\r\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlCopyElementContentP01", (void *)(strcmp((const char*)(ret_val->name),"foo")), (void *)0, "xmlCopyElementContent 2 Failed");\r\r
+               xmlFreeElementContent(ret_val);\r
+               ret_val = NULL;\r
+       }\r
+       if (cur != NULL)\r
+       {\r
+               xmlFreeElementContent(cur);\r
+               cur = NULL;\r
+       }\r
+\r
+       cur = xmlNewElementContent((const xmlChar *)"prefix:xml", XML_ELEMENT_CONTENT_ELEMENT); /* An element content pointer. */\r
+\r
+       /**\r
+       * @remarks   input1: [N/A, N/A] @n\r
+       *                                       {xmlElementContentPtr} => {N/A | Copy of xmlElementContentPtr}  @n\r
+       */      \r
+       ret_val = xmlCopyElementContent(cur);\r
+       DTS_CHECK_NE_MESSAGE("UTcxmlCopyElementContentP01", (void *)ret_val, (void *)NULL, "xmlCopyElementContent Failed");\r\r
+       \r
+       if (ret_val != NULL)\r
+       {\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlCopyElementContentP01", (void *)ret_val->type, (void *)XML_ELEMENT_CONTENT_ELEMENT, "xmlCopyElementContent  21 Failed");\r\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlCopyElementContentP01", (void *)(strcmp((const char*)(ret_val->name),"xml")), (void *)0, "xmlCopyElementContent 22 Failed");\r\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlCopyElementContentP01", (void *)(strcmp((const char*)(ret_val->prefix),"prefix")), (void *)0, "xmlCopyElementContent 23 Failed");\r\r
+               xmlFreeElementContent(ret_val);\r
+       }\r
+       \r
+       if (cur != NULL)\r
+       {\r
+               xmlFreeElementContent(cur);\r
+       }\r
+}\r
+       /**    \r
+       * @test                 UTcxmlErrValidP01\r
+       * @brief                xmlElementContentPtr    xmlNewElementContent    (const xmlChar * name, xmlElementContentType type)\r
+       * @desc                 Positive Test for allocating an element content structure.\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [Create New ElementContent with name = NULL, N/A]       @n\r
+       *                       {Input is set internally by API} => {N/A | N/A} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void \r
+UTcxmlErrValidP01()\r
+{\r
+       xmlChar * name;\r
+       name = (xmlChar *)("foo");\r
+\r
+       xmlElementContentPtr cur = xmlNewElementContent((const xmlChar *)name, XML_ELEMENT_CONTENT_ELEMENT); \r
+\r
+       //xmlElementContentPtr cur = xmlNewElementContent(NULL, XML_ELEMENT_CONTENT_ELEMENT); /* An element content pointer. */\r
+       DTS_CHECK_NE_MESSAGE("UTcxmlErrValidP01", (void *)cur, (void *)NULL, "xmlNewElementContent Failed");\r\r
+       \r
+       if (cur != NULL)\r
+       {\r
+               DTS_CHECK_NE_MESSAGE("UTcxmlErrValidP01", (void *)cur->name, (void *)NULL, "xmlNewElementContent  1 Failed");\r\r
+               xmlFreeElementContent(cur);\r
+       }\r
+}\r
+\r
+       /**    \r
+       * @test                 UTcxmlFreeElementContentP01\r
+       * @brief                void    xmlFreeElementContent   (xmlElementContentPtr cur)\r
+       * @desc                 Positive Test for freeing an element content structure\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [xmlElementContentPtr(cur) is created with name "foo" and XML_ELEMENT_CONTENT_ELEMENT, N/A]     @n\r
+       *                       {xmlElementContentPtr(cur)} => {N/A | N/A}      @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void \r
+UTcxmlFreeElementContentP01()\r
+{\r
+       xmlChar * name;\r
+       name = (xmlChar *)("foo");\r
+\r
+       xmlElementContentPtr cur = xmlNewElementContent((const xmlChar *)name, XML_ELEMENT_CONTENT_ELEMENT);\r
+       DTS_CHECK_NE_MESSAGE("xmlFreeElementContent", (void *)cur, (void *)NULL, "xmlNewElementContent Failed");\r
+       /**\r
+       * @remarks   input1: [xmlElementContentPtr(cur) is created with name "foo" and XML_ELEMENT_CONTENT_ELEMENT, N/A]        @n\r
+       *                                       {cur} => {N/A | N/A}    @n\r
+       */      \r
+       xmlFreeElementContent(cur);\r
+       DTS_CHECK_EQ_MESSAGE("xmlFreeElementContent", (void *)1, (void *)1, "xmlFreeElementContent Failed");\r
+}\r
+       /**    \r
+       * @test                 UTcxmlSnprintfElementContentP01\r
+       * @brief                void    xmlSnprintfElementContent (char * buf, size, xmlElementContentPtr content, int englob)\r
+       * @desc                 Positive Test for dumping the content of the element content definition Intended just for the debug routine\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [xmlElementContentPtr(content) is created with name "foo" and XML_ELEMENT_CONTENT_ELEMENT, N/A] @n\r
+       *                       {char(buf),int(4),xmlElementContentPtr(content),int(0)} => {N/A | N/A}  @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void \r
+UTcxmlSnprintfElementContentP01()\r
+{\r
+//     int test_ret = 0;\r
+\r
+       char* buf = (char *)malloc(4);\r
+       xmlElementContentPtr content = xmlNewElementContent((const xmlChar *)("foo"), XML_ELEMENT_CONTENT_ELEMENT);\r
+       /**\r
+       * @remarks   input1: [xmlElementContentPtr(content) is created with name "foo" and XML_ELEMENT_CONTENT_ELEMENT, N/A]    @n\r
+       *                                       {buf,4,content,0} => {N/A | N/A}        @n\r
+       */\r
+       xmlSnprintfElementContent(buf, 4, content, 0);\r
+       DTS_CHECK_NE_MESSAGE("UTcxmlSnprintfElementContentP01", (void *)buf, (void *)NULL, "xmlSnprintfElementContent Failed");\r\r
+       if (content != NULL)\r
+       {\r
+               xmlFreeElementContent(content);\r
+       }\r
+       free( buf);\r
+\r
+\r
+#if 0\r
+       int test_ret = 0;\r
+\r
+       char * buf; /* an output buffer */\r
+       int n_buf;\r
+       int size; /* the buffer size */\r
+       int n_size;\r
+       xmlElementContentPtr content; /* An element table */\r
+       int n_content;\r
+       int englob; /* 1 if one must print the englobing parenthesis, 0 otherwise */\r
+       int n_englob;\r
+\r
+       for (n_buf = 0;n_buf < gen_nb_char_ptr;n_buf++) {\r
+               for (n_size = 0;n_size < gen_nb_int;n_size++) {\r
+                       for (n_content = 0;n_content < gen_nb_xmlElementContentPtr;n_content++) {\r
+                               for (n_englob = 0;n_englob < gen_nb_int;n_englob++) {\r
+                                       buf = gen_char_ptr(n_buf, 0);\r
+                                       size = gen_int(n_size, 1);\r
+                                       content = gen_xmlElementContentPtr(n_content, 2);\r
+                                       englob = gen_int(n_englob, 3);\r
+                                       xmlSnprintfElementContent(buf, size, content, englob);\r
+                                       des_char_ptr(n_buf, buf, 0);\r
+                                       des_int(n_size, size, 1);\r
+                                       des_xmlElementContentPtr(n_content, content, 2);\r
+                                       des_int(n_englob, englob, 3);\r
+                                       xmlResetLastError();\r
+                               }\r
+                       }\r
+               }\r
+       }\r
+\r
+#endif\r
+\r
+}\r
+       /**    \r
+       * @test                 UTcxmlCopyElementTableP01\r
+       * @brief                xmlElementTablePtr      xmlCopyElementTable     (xmlElementTablePtr table)\r
+       * @desc                 Positive Test for building a copy of an element table.\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {NULL} => {N/A |NULL}   @n\r
+                                       input2: [N/A, N/A]      @n\r
+                                       {xmlElementTablePtr(table)} => {N/A | Copy of xmlElementTablePtr}       @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void \r
+UTcxmlCopyElementTableP01()\r
+{\r
+       int result = -1;\r
+       const char *pFilename = LIBXML2TESTXML;\r
+       xmlDocPtr doc; /* the resulting document tree used as i/p*/\r
+\r
+       /**\r
+       * @remarks   input1: [N/A, N/A] @n\r
+       *                                       {NULL} => {N/A |NULL}   @n\r
+       */\r
+       xmlElementTablePtr outValue = xmlCopyElementTable(NULL);\r
+       DTS_CHECK_NE_MESSAGE("UTcxmlCopyElementTableP01", (void *)outValue, (void *)NULL, "xmlCopyElementTable Failed");\r
+\r
+\r
+       if(outValue == NULL)\r
+       {\r
+               DTS_FAIL("UTcxmlCopyElementTableP01", "xmlCopyElementTable Failed");\r
+               return;\r
+       }\r
+       \r
+       xmlElementTablePtr inValue = xmlHashCreate(0);\r
+       DTS_CHECK_NE_MESSAGE("UTcxmlCopyElementTableP01", (void *)inValue, (void *)NULL, "xmlHashCreate Failed");\r\r
+\r
+       doc = xmlReadFile(pFilename, NULL, 0);\r
+       DTS_ASSERT_MESSAGE("UTcxmlCopyElementTableP01", (void *)(NULL == doc), "xmlReadFile Failed");\r
+\r
+       xmlDtdPtr dtdPtr = xmlGetIntSubset(doc);\r
+       xmlElementPtr elemPtr = xmlGetDtdElementDesc(dtdPtr, (const xmlChar *)"TO");\r
+       //DTS_CHECK_NE_MESSAGE("UTcxmlCopyElementTableP01", (void *)inValue, (void *)NULL, "xmlGetIntSubset Failed");\r\r
+\r
+       result = xmlHashAddEntry(inValue, (const xmlChar *)"King", (void *)elemPtr);\r
+       DTS_CHECK_NE_MESSAGE("UTcxmlCopyElementTableP01", (void *)result, (void *)-1, "xmlHashAddEntry Failed");\r\r
+\r
+       /**\r
+       * @remarks   input1: [N/A, N/A] @n\r
+       *                                       {xmlElementTablePtr} => {N/A | Copy of xmlElementTablePtr}      @n\r
+       */\r
+       outValue = xmlCopyElementTable(inValue);        \r
+       DTS_CHECK_NE_MESSAGE("UTcxmlCopyElementTableP01", (void *)outValue, (void *)NULL, "xmlCopyElementTable Failed");\r\r
+       if (elemPtr != NULL)\r
+       {\r
+               xmlFreeElementContent((xmlElementContentPtr )elemPtr);\r
+       }\r
+       if (NULL != inValue)\r
+       {\r
+               xmlHashFree(inValue,NULL);\r
+       }\r
+       if (NULL != outValue)\r
+       {\r
+               xmlHashFree(outValue,NULL);\r
+       }\r
+       //if (dtdPtr != NULL)\r
+       //{\r
+       //      xmlFreeDtd(dtdPtr);\r
+       //}\r
+       if (NULL != doc)\r
+       {\r
+               xmlFreeDoc(doc);\r
+       }\r
+       //xmlCleanupCharEncodingHandlers();\r
+}\r
+       /**    \r
+       * @test                 UTcxmlGetDtdNotationDescP01\r
+       * @brief                xmlNotationPtr  xmlGetDtdNotationDesc (xmlDtdPtr dtd, const xmlChar * name)\r
+       * @desc                 Positive Test for searching the DTD for the description of this notation\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [xmlDtdPtr(dtd) is created having notations as a hash table with name "test", N/A]      @n \r
+       *                       {xmlDtdPtr(dtd),const xmlChar("noString")} => {N/A |xmlNotationPtr}     @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void \r
+UTcxmlGetDtdNotationDescP01()\r
+{\r
+       xmlDtdPtr dtd = xmlNewDtd(NULL, BAD_CAST "test", NULL, NULL);\r
+       DTS_CHECK_NE_MESSAGE("UTcxmlGetDtdNotationDescP01", (void *)dtd, (void *)NULL, "xmlNewDtd Failed");\r\r
+               \r
+       xmlElementTablePtr table = xmlHashCreate(0);\r
+       xmlHashAddEntry(table,(xmlChar*)"test",NULL);\r
+       dtd->notations = table;\r
+       /**\r
+       * @remarks   input1: [xmlDtdPtr(dtd) is created having notations as a hash table with name "test", N/A] @n\r
+       *                                       {dtd,"noString"} => {N/A |xmlNotationPtr}       @n\r
+       */\r
+       xmlNotationPtr outValue = xmlGetDtdNotationDesc(dtd,(xmlChar*)"noString");\r
+       DTS_CHECK_EQ_MESSAGE("UTcxmlGetDtdNotationDescP01", (void *)outValue, (void *)NULL, "xmlGetDtdNotationDesc Failed");\r\r
+\r
+       dtd->notations = NULL;\r
+\r
+       if (NULL != table)\r
+       {\r
+               xmlHashFree(table,NULL);\r
+       }\r
+       if (dtd != NULL)\r
+       {\r
+               xmlFreeDtd(dtd);\r
+       }\r
+}\r
+       /**    \r
+       * @test                 UTcxmlSprintfElementContentP01\r
+       * @brief                void    xmlSprintfElementContent (char * buf, xmlElementContentPtr content, int englob)\r
+       * @desc                 Positive Test for Deprecated, unsafe, use xmlSnprintfElementContent\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [xmlElementContentPtr(content) is created, N/A] @n\r
+       *                       {char(buf),xmlElementContentPtr(content),int(0)} => {N/A |xmlNotationPtr}       @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void \r
+UTcxmlSprintfElementContentP01()\r
+{\r
+       char * buf = NULL; /* an output buffer */\r
+       xmlElementContentPtr content = xmlNewElementContent((const xmlChar *)("foo"), XML_ELEMENT_CONTENT_ELEMENT);\r
+       DTS_CHECK_NE_MESSAGE("UTcxmlSprintfElementContentP01", (void *)content, (void *)NULL, "xmlNewElementContent Failed");\r\r
+       /**\r
+       * @remarks   input1: [xmlElementContentPtr(content) is created, N/A]    @n\r
+       *                                       {buf,content,0} => {N/A |xmlNotationPtr}        @n\r
+       */\r
+       xmlSprintfElementContent(buf, content, 0);\r
+       if (content != NULL)\r
+       {\r
+               xmlFreeElementContent(content);\r
+       }\r
+\r
+\r
+#if 0\r
+       int n_buf;\r
+       xmlElementContentPtr content; /* An element table */\r
+       int n_content;\r
+       int englob; /* 1 if one must print the englobing parenthesis, 0 otherwise */\r
+       int n_englob;\r
+\r
+       for (n_buf = 0;n_buf < gen_nb_char_ptr;n_buf++) {\r
+               for (n_content = 0;n_content < gen_nb_xmlElementContentPtr;n_content++) {\r
+                       for (n_englob = 0;n_englob < gen_nb_int;n_englob++) {\r
+\r
+                               buf = gen_char_ptr(n_buf, 0);\r
+                               content = gen_xmlElementContentPtr(n_content, 1);\r
+                               englob = gen_int(n_englob, 2);\r
+\r
+                               xmlSprintfElementContent(buf, content, englob);\r
+                               des_char_ptr(n_buf, buf, 0);\r
+                               des_xmlElementContentPtr(n_content, content, 1);\r
+                               des_int(n_englob, englob, 2);\r
+                               xmlResetLastError();\r
+                       }\r
+               }\r
+       }\r
+#endif\r
+}\r
+/**    \r
+       * @test                 UTcxmlAddElementDeclP01\r
+       * @brief                xmlElementPtr   xmlAddElementDecl (xmlValidCtxtPtr ctxt, xmlDtdPtr dtd, const xmlChar * name, xmlElementTypeVal type, xmlElementContentPtr content)\r
+       * @desc                 Register a new element declaration\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [xmlDtdPtr(dtd) is created, N/A]        @n\r
+                                       {NULL,dtd,"test",XML_ELEMENT_TYPE_EMPTY,NULL} => {N/A |xmlElementPtr}   @n\r
+                                       input2: [N/A, N/A]      @n\r
+                                       {NULL,dtd,"test",XML_ELEMENT_TYPE_ANY,NULL} => {N/A |xmlElementPtr}     @n\r
+                                       input3: [N/A, N/A]      @n\r
+                                       {NULL,xmlDtdPtr(dtd),"test",XML_ELEMENT_TYPE_MIXED,NULL} => {N/A |NULL} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void \r
+UTcxmlAddElementDeclP01()\r
+{\r
+       xmlDtdPtr dtd;\r
+       xmlChar * name = (xmlChar *)"test";\r
+       xmlElementContentPtr content = xmlNewElementContent((const xmlChar *)("foo"), XML_ELEMENT_CONTENT_ELEMENT);\r
+       DTS_CHECK_NE_MESSAGE("UTcxmlAddElementDeclP01", (void *)content, (void *)NULL, "xmlNewElementContent Failed");\r\r
+               \r
+       xmlValidCtxtPtr ctxt = NULL;\r
+       dtd = xmlNewDtd(NULL, BAD_CAST "dtd", BAD_CAST"foo", BAD_CAST"bar");\r
+       /**\r
+       * @remarks   input1: [xmlDtdPtr(dtd) is created, N/A]   @n\r
+       *                                       {NULL,dtd,"test",XML_ELEMENT_TYPE_EMPTY,NULL} => {N/A |xmlElementPtr}   @n\r
+       */\r
+       xmlElementPtr ret_val = xmlAddElementDecl(ctxt, dtd, (const xmlChar *)name, XML_ELEMENT_TYPE_EMPTY, NULL);\r
+       DTS_CHECK_NE_MESSAGE("UTcxmlAddElementDeclP01", (void *)ret_val, (void *)NULL, "xmlAddElementDecl Failed");\r\r
+       if (ret_val != NULL)\r
+       {\r
+               xmlFreeElementContent((xmlElementContentPtr )ret_val);\r
+       }\r
+       /**\r
+       * @remarks   input2: [N/A, N/A] @n\r
+       *                                       {NULL,dtd,"test",XML_ELEMENT_TYPE_ANY,NULL} => {N/A |xmlElementPtr}     @n\r
+       */\r
+       ret_val = xmlAddElementDecl(ctxt, dtd, (const xmlChar *)name, XML_ELEMENT_TYPE_ANY, NULL);\r
+       DTS_CHECK_EQ_MESSAGE("UTcxmlAddElementDeclP01", (void *)ret_val, (void *)NULL, "xmlAddElementDecl Failed");\r\r
+       /**\r
+       * @remarks   input3: [N/A, N/A] @n\r
+       *                                       {NULL,dtd,"test",XML_ELEMENT_TYPE_MIXED,NULL} => {N/A |NULL}    @n\r
+       */\r
+       ret_val = xmlAddElementDecl(ctxt, dtd, (const xmlChar *)name, XML_ELEMENT_TYPE_MIXED, NULL);\r
+       DTS_CHECK_EQ_MESSAGE("UTcxmlAddElementDeclP01", (void *)ret_val, (void *)NULL, "xmlAddElementDecl Failed");\r\r
+       \r
+       if (dtd != NULL)\r
+       {\r
+               xmlFreeDtd(dtd);\r
+       }\r
+       if (content != NULL)\r
+       {\r
+               xmlFreeElementContent(content);\r
+       }\r
+       if (name != NULL)\r
+       {\r
+               //xmlFree(name);\r
+       }\r
+\r
+\r
+\r
+\r
+#if 0\r
+       int test_ret = 0;\r
+       xmlElementPtr ret_val;\r
+       xmlValidCtxtPtr ctxt; /* the validation context */\r
+       int n_ctxt;\r
+       xmlDtdPtr dtd; /* pointer to the DTD */\r
+       int n_dtd;\r
+       xmlChar * name; /* the entity name */\r
+       int n_name;\r
+       xmlElementTypeVal type; /* the element type */\r
+       int n_type;\r
+       xmlElementContentPtr content; /* the element content tree or NULL */\r
+       int n_content;\r
+       for (n_ctxt = 0;n_ctxt < gen_nb_xmlValidCtxtPtr;n_ctxt++) {\r
+               for (n_dtd = 0;n_dtd < gen_nb_xmlDtdPtr;n_dtd++) {\r
+                       for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {\r
+                               for (n_type = 0;n_type < gen_nb_xmlElementTypeVal;n_type++) {\r
+                                       for (n_content = 0;n_content < gen_nb_xmlElementContentPtr;n_content++) {\r
+                                               ctxt = gen_xmlValidCtxtPtr(n_ctxt, 0);\r
+                                               dtd = gen_xmlDtdPtr(n_dtd, 1);\r
+                                               name = gen_const_xmlChar_ptr(n_name, 2);\r
+                                               type = gen_xmlElementTypeVal(n_type, 3);\r
+                                               content = gen_xmlElementContentPtr(n_content, 4);\r
+\r
+                                               ret_val = xmlAddElementDecl(ctxt, dtd, (const xmlChar *)name, type, content);\r
+                                               desret_xmlElementPtr(ret_val);\r
+                                               des_xmlValidCtxtPtr(n_ctxt, ctxt, 0);\r
+                                               des_xmlDtdPtr(n_dtd, dtd, 1);\r
+                                               des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 2);\r
+                                               des_xmlElementTypeVal(n_type, type, 3);\r
+                                               des_xmlElementContentPtr(n_content, content, 4);\r
+                                               xmlResetLastError();\r
+                                       }\r
+                               }\r
+                       }\r
+               }\r
+       }\r
+#endif\r
+}\r
+       /**    \r
+       * @test                 UTcxmlCreateEnumerationP01\r
+       * @brief                xmlEnumerationPtr       xmlCreateEnumeration    (const xmlChar * name)\r
+       * @desc                 Positive Test for creating and initializing an enumeration attribute node\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A]      @n\r
+       *                       {xmlChar("Enumeration")} => {N/A |xmlEnumerationPtr}    @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void \r
+UTcxmlCreateEnumerationP01()\r
+{\r
+       /**\r
+       * @remarks   input1: [N/A, N/A] @n\r
+       *                                       {"Enumeration"} => {N/A |xmlEnumerationPtr}     @n\r
+       */\r
+       xmlEnumerationPtr outVal = xmlCreateEnumeration((xmlChar*)"Enumeration");\r
+       DTS_CHECK_NE_MESSAGE("UTcxmlCreateEnumerationP01", (void *)outVal, (void *)NULL, "xmlCreateEnumeration Failed");\r
+\r
+               \r
+       if (NULL != outVal)\r
+       {\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlCreateEnumerationP01", (void *)(strcmp((char*)outVal->name,"Enumeration")), (void *)0, "xmlAddElementDecl Failed");\r
+\r
+               xmlFreeEnumeration(outVal);\r
+       }\r
+}\r
+       /**    \r
+       * @test                 UTcxmlFreeEnumerationP01\r
+       * @brief                void    xmlFreeEnumeration      (xmlEnumerationPtr cur)\r
+       * @desc                 Positive Test for freeing an enumeration attribute node (recursive).\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [xmlEnumerationPtr(outVal) is created with string "Enumeration", N/A]   @n\r
+       *                       {outVal} => {N/A |xmlEnumerationPtr}    @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void \r
+UTcxmlFreeEnumerationP01()\r
+{\r
+       xmlEnumerationPtr outVal = xmlCreateEnumeration((xmlChar*)"Enumeration");\r
+       DTS_CHECK_NE_MESSAGE("UTcxmlFreeEnumerationP01", (void *)outVal, (void *)NULL, "xmlCreateEnumeration Failed");\r
+\r
+       \r
+       /**\r
+       * @remarks   input1: [xmlEnumerationPtr(outVal) is created with string "Enumeration", N/A]      @n\r
+       *                                       {outVal} => {N/A |xmlEnumerationPtr}    @n\r
+       */\r
+       xmlFreeEnumeration(outVal);\r
+\r
+}\r
+       /**    \r
+       * @test                 UTcxmlCopyEnumerationP01\r
+       * @brief                xmlEnumerationPtr       xmlCopyEnumeration      (xmlEnumerationPtr cur)\r
+       * @desc                 Positive Test for copying an enumeration attribute node (recursive).\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [xmlEnumerationPtr(outVal) is created with string "Enumeration", N/A]   @n\r
+       *                       {outVal} => {N/A |xmlEnumerationPtr}    @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void \r
+UTcxmlCopyEnumerationP01()\r
+{\r
+       xmlEnumerationPtr outVal = xmlCreateEnumeration((xmlChar*)"Enumeration");\r
+       DTS_CHECK_NE_MESSAGE("UTcxmlCopyEnumerationP01", (void *)outVal, (void *)NULL, "xmlCreateEnumeration Failed");\r
+\r
+       /**\r
+       * @remarks   input1: [xmlEnumerationPtr(outVal) is created with string "Enumeration", N/A]      @n\r
+       *                                       {outVal} => {N/A |xmlEnumerationPtr}    @n\r
+       */\r
+       xmlEnumerationPtr cpyVal = xmlCopyEnumeration(outVal);\r
+       \r
+       if (NULL != cpyVal)\r
+       {\r
+               DTS_CHECK_EQ_MESSAGE("UTcxmlCopyEnumerationP01", (void *)(strcmp((char*)cpyVal->name,"Enumeration")), (void *)0, "xmlCopyEnumeration Failed");\r
+\r
+               xmlFreeEnumeration(cpyVal);\r
+       }\r
+       if (NULL != outVal)\r
+       {\r
+               xmlFreeEnumeration(outVal);\r
+       }\r
+\r
+}\r
+       /**    \r
+       * @test                 UTcxmlAddAttributeDeclP01\r
+       * @brief                xmlAttributePtr xmlAddAttributeDecl (xmlValidCtxtPtr ctxt, xmlDtdPtr dtd, const xmlChar * elem, const xmlChar * name, \r
+                                       const xmlChar * ns, xmlAttributeType type, xmlAttributeDefault def, const xmlChar * defaultValue, xmlEnumerationPtr tree)\r
+       * @desc                 Positive Test for registering a new attribute declaration Note that tree becomes the ownership of the DTD\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [xmlDtdPtr(dtd) is created, N/A]        @n\r
+       *                       {NULL,dtd,"XmlElementName","XmlName","namespace",XML_ATTRIBUTE_FIXED,"Default",NULL} => {N/A |xmlAttributePtr}  @n\r
+                                       input2: [N/A, N/A]      @n\r
+                                       {NULL,xmlDtdPtr(dtd),const xmlChar("XmlElementName"),const xmlChar("XmlName"),"namespace",XML_ATTRIBUTE_FIXED,"Default",NULL} => {N/A |NULL}    @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void \r
+UTcxmlAddAttributeDeclP01()\r
+{\r
+#if 1\r
+       xmlChar * elem;\r
+       xmlAttributePtr ret_val;\r
+       xmlValidCtxtPtr ctxt;\r
+       xmlDtdPtr dtd;\r
+       xmlChar * ns;\r
+       xmlChar * name;\r
+       xmlAttributeDefault def;\r
+       xmlChar * defaultValue;\r
+       xmlEnumerationPtr tree;\r
+\r
+\r
+#ifdef LIBXML_VALID_ENABLED\r
+       ctxt = xmlNewValidCtxt();\r
+#else\r
+       ctxt = NULL;\r
+#endif\r
+\r
+       dtd = xmlNewDtd(NULL, BAD_CAST "dtd", BAD_CAST"foo", BAD_CAST"bar");\r
+       elem = (xmlChar *) "XmlElementName";\r
+       name =  (xmlChar *) "XmlName";\r
+       ns = (xmlChar *) "namespace";\r
+       def = XML_ATTRIBUTE_FIXED;\r
+       defaultValue = (xmlChar *) "Default";\r
+       tree =  NULL;\r
+       /**\r
+       * @remarks   input1: [xmlDtdPtr(dtd) is created, N/A]   @n\r
+       *                                       {NULL,dtd,"XmlElementName","XmlName","namespace",XML_ATTRIBUTE_FIXED,"Default",NULL} => {N/A |xmlAttributePtr}  @n\r
+       */\r
+       ret_val = xmlAddAttributeDecl(ctxt, dtd, (const xmlChar *)elem, (const xmlChar *)name, (const xmlChar *)ns, XML_ATTRIBUTE_CDATA, def, (const xmlChar *)defaultValue, tree);\r
+       DTS_CHECK_NE_MESSAGE("UTcxmlCopyEnumerationP01", (void *)ret_val, (void *)NULL, "xmlCopyEnumeration Failed");\r\r
+       /**\r
+       * @remarks   input2: [N/A, N/A] @n\r
+       *                                       {NULL,dtd,"XmlElementName","XmlName","namespace",XML_ATTRIBUTE_FIXED,"Default",NULL} => {N/A |NULL}     @n\r
+       */      \r
+       ret_val = xmlAddAttributeDecl(ctxt, dtd, (const xmlChar *)elem, (const xmlChar *)name, (const xmlChar *)ns, XML_ATTRIBUTE_CDATA, def, (const xmlChar *)defaultValue, tree);\r
+       DTS_CHECK_EQ_MESSAGE("UTcxmlCopyEnumerationP01", (void *)ret_val, (void *)NULL, "xmlCopyEnumeration Failed");\r\r
+\r
+       if (dtd != NULL)\r
+       {\r
+               xmlFreeDtd(dtd);\r
+       }\r
+#if 0\r
+       int test_ret = 0;\r
+       xmlAttributePtr ret_val;\r
+       xmlValidCtxtPtr ctxt; /* the validation context */\r
+       int n_ctxt;\r
+       xmlDtdPtr dtd; /* pointer to the DTD */\r
+       int n_dtd;\r
+       xmlChar * elem; /* the element name */\r
+       int n_elem;\r
+       xmlChar * name; /* the attribute name */\r
+       int n_name;\r
+       xmlChar * ns; /* the attribute namespace prefix */\r
+       int n_ns;\r
+       xmlAttributeType type; /* the attribute type */\r
+       int n_type;\r
+       xmlAttributeDefault def; /* the attribute default type */\r
+       int n_def;\r
+       xmlChar * defaultValue; /* the attribute default value */\r
+       int n_defaultValue;\r
+       xmlEnumerationPtr tree; /* if it's an enumeration, the associated list */\r
+       int n_tree;\r
+\r
+       for (n_ctxt = 0;n_ctxt < gen_nb_xmlValidCtxtPtr;n_ctxt++) {\r
+               for (n_dtd = 0;n_dtd < gen_nb_xmlDtdPtr;n_dtd++) {\r
+                       for (n_elem = 0;n_elem < gen_nb_const_xmlChar_ptr;n_elem++) {\r
+                               for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {\r
+                                       for (n_ns = 0;n_ns < gen_nb_const_xmlChar_ptr;n_ns++) {\r
+                                               for (n_type = 0;n_type < gen_nb_xmlAttributeType;n_type++) {\r
+                                                       for (n_def = 0;n_def < gen_nb_xmlAttributeDefault;n_def++) {\r
+                                                               for (n_defaultValue = 0;n_defaultValue < gen_nb_const_xmlChar_ptr;n_defaultValue++) {\r
+                                                                       for (n_tree = 0;n_tree < gen_nb_xmlEnumerationPtr;n_tree++) {\r
+                                                                               ctxt = gen_xmlValidCtxtPtr(n_ctxt, 0);\r
+                                                                               dtd = gen_xmlDtdPtr(n_dtd, 1);\r
+                                                                               elem = gen_const_xmlChar_ptr(n_elem, 2);\r
+                                                                               name = gen_const_xmlChar_ptr(n_name, 3);\r
+                                                                               ns = gen_const_xmlChar_ptr(n_ns, 4);\r
+                                                                               type = gen_xmlAttributeType(n_type, 5);\r
+                                                                               def = gen_xmlAttributeDefault(n_def, 6);\r
+                                                                               defaultValue = gen_const_xmlChar_ptr(n_defaultValue, 7);\r
+                                                                               tree = gen_xmlEnumerationPtr(n_tree, 8);\r
+\r
+                                                                               ret_val = xmlAddAttributeDecl(ctxt, dtd, (const xmlChar *)elem, (const xmlChar *)name, (const xmlChar *)ns, type, def, (const xmlChar *)defaultValue, tree);\r
+                                                                               desret_xmlAttributePtr(ret_val);\r
+                                                                               des_xmlValidCtxtPtr(n_ctxt, ctxt, 0);\r
+                                                                               des_xmlDtdPtr(n_dtd, dtd, 1);\r
+                                                                               des_const_xmlChar_ptr(n_elem, (const xmlChar *)elem, 2);\r
+                                                                               des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 3);\r
+                                                                               des_const_xmlChar_ptr(n_ns, (const xmlChar *)ns, 4);\r
+                                                                               des_xmlAttributeType(n_type, type, 5);\r
+                                                                               des_xmlAttributeDefault(n_def, def, 6);\r
+                                                                               des_const_xmlChar_ptr(n_defaultValue, (const xmlChar *)defaultValue, 7);\r
+                                                                               des_xmlEnumerationPtr(n_tree, tree, 8);\r
+                                                                               xmlResetLastError();\r
+\r
+                                                                       }\r
+                                                               }\r
+                                                       }\r
+                                               }\r
+                                       }\r
+                               }\r
+                       }\r
+               }\r
+       }\r
+#endif\r
+#endif\r
+}\r
+       /**    \r
+       * @test                 UTcxmlCopyAttributeTableP01\r
+       * @brief                xmlAttributeTablePtr    xmlCopyAttributeTable   (xmlAttributeTablePtr table)\r
+       * @desc                 Positive Test for building a copy of an attribute table.\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlAttributeTablePtr(table)} => {N/A |xmlAttributeTablePtr}    @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void \r
+UTcxmlCopyAttributeTableP01()\r
+{\r
+       int result = -1;\r
+       const char *pFilename = LIBXML2TESTXML;\r
+       xmlDocPtr doc; /* the resulting document tree used as i/p*/\r
+\r
+       xmlAttributeTablePtr inValue = xmlHashCreate(0);\r
+       DTS_CHECK_NE_MESSAGE("UTcxmlCopyAttributeTableP01", (void *)inValue, (void *)NULL, "xmlHashCreate Failed");\r\r
+\r
+\r
+       /**\r
+       * @remarks   input1: [N/A, N/A] @n\r
+       *                                       {NULL} => {N/A |xmlAttributeTablePtr}   @n\r
+       */\r
+       xmlAttributeTablePtr outValue = xmlCopyAttributeTable(NULL);\r
+       DTS_CHECK_EQ_MESSAGE("UTcxmlCopyAttributeTableP01", (void *)outValue, (void *)NULL, "xmlCopyAttributeTable Failed");\r\r
+\r
+\r
+       doc = xmlReadFile(pFilename, NULL, 0);\r
+       DTS_ASSERT_MESSAGE("UTcxmlCopyAttributeTableP01", (void *)(NULL == doc), "xmlReadFile Failed");\r\r
+               \r
+\r
+       xmlDtdPtr dtdPtr = xmlGetIntSubset(doc);\r
+       //xmlDtdPtr dtdPtr = xmlNewDtd(NULL, BAD_CAST "dtd", BAD_CAST"foo", BAD_CAST"bar");\r
+       xmlAttributePtr attrPtr = xmlGetDtdAttrDesc(dtdPtr, (const xmlChar *)"SIGN",(const xmlChar *)"email");\r
+\r
+       result = xmlHashAddEntry(inValue, (const xmlChar *)"King", (void *)attrPtr);\r
+       DTS_CHECK_NE_MESSAGE("UTcxmlCopyAttributeTableP01", (void *)result, (void *)-1, "xmlHashAddEntry Failed");\r\r
+\r
+       //xmlElementPtr elemPtr = xmlGetDtdElementDesc(dtdPtr, (const xmlChar *)"TO");\r
+\r
+       //result = xmlHashAddEntry(inValue, (const xmlChar *)"King", (void *)elemPtr);\r
+       //MT_CHECK(-1 != result);\r
+\r
+       outValue = xmlCopyAttributeTable(inValue);      \r
+       DTS_CHECK_NE_MESSAGE("UTcxmlCopyAttributeTableP01", (void *)outValue, (void *)NULL, "xmlCopyAttributeTable Failed");\r\r
+\r
+       //if (elemPtr != NULL)\r
+       //{\r
+       //      xmlFreeElementContent((xmlElementContentPtr )elemPtr);\r
+       //}\r
+       \r
+       if (NULL != inValue)\r
+       {\r
+               xmlHashFree(inValue,NULL);\r
+       }\r
+       if (NULL != outValue)\r
+       {\r
+               xmlHashFree(outValue,NULL);\r
+       }\r
+       //if (dtdPtr != NULL)\r
+       //{\r
+       //      xmlFreeDtd(dtdPtr);\r
+       //}\r
+       if (NULL != doc)\r
+       {\r
+               xmlFreeDoc(doc);\r
+       }\r
+       //xmlCleanupCharEncodingHandlers();\r
+\r
+}\r
+       /**    \r
+       * @test                 UTcxmlFreeAttributeTableP01\r
+       * @brief                void    xmlFreeAttributeTable (xmlAttributeTablePtr table)\r
+       * @desc                 Positive Test for deallocating the memory used by an entities hash table\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [xmlAttributeTablePtr(inValue) is created, N/A] @n\r
+       *                       {inValue} => {N/A | N/A}        @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void \r
+UTcxmlFreeAttributeTableP01()\r
+{\r
+       xmlAttributeTablePtr inValue = xmlHashCreate(0);\r
+       DTS_CHECK_NE_MESSAGE("UTcxmlFreeAttributeTableP01", (void *)inValue, (void *)NULL, "xmlHashCreate Failed");\r\r
+       xmlHashAddEntry3(inValue,(xmlChar*)"Id1",(xmlChar*)"name2",(xmlChar*)"name3",NULL);\r
+\r
+       /**\r
+       * @remarks   input1: [xmlAttributeTablePtr(inValue) is created, N/A]    @n\r
+       *                                       {inValue} => {N/A | N/A}        @n\r
+       */\r
+       xmlFreeAttributeTable(inValue);\r
+\r
+}\r
+       /**    \r
+       * @test                 UTcxmlAddIDP01\r
+       * @brief                xmlIDPtr xmlAddID (xmlValidCtxtPtr ctxt, xmlDocPtr doc, const xmlChar * value, xmlAttrPtr attr)\r
+       * @desc                 Positive Test for registering a new id declaration\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [xmlDocPtr(doc) and xmlAttrPtr(attr) are created, N/A]  @n\r
+       *                       {NULL,xmlDocPtr(doc),const xmlChar("input"),xmlAttrPtr(attr)} => {N/A | N/A}    @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void \r
+UTcxmlAddIDP01()\r
+{\r
+       xmlIDTablePtr inpVal = xmlHashCreate(0);\r
+       DTS_CHECK_NE_MESSAGE("UTcxmlAddIDP01", (void *)inpVal, (void *)NULL, "xmlHashCreate Failed");\r\r
+       xmlDocPtr doc = xmlNewDoc(BAD_CAST "1.0");\r
+       xmlAttrPtr attr = gen_xmlAttrPtr(0, 2);\r
+       /**\r
+       * @remarks   input1: [xmlDocPtr(doc) and xmlAttrPtr(attr) are created, N/A]     @n\r
+       *                                       {NULL,doc,"input",attr} => {N/A | N/A}  @n\r
+       */\r
+       xmlIDPtr outVal = xmlAddID(NULL,doc,(xmlChar*)"input",attr);\r
+       DTS_CHECK_EQ_MESSAGE("UTcxmlAddIDP01", (void *)(strcmp((char*)(outVal->value),"input")), (void *)0, "xmlHashCreate Failed");\r\r
+\r
+       if ((NULL != doc) && (NULL != attr))\r
+       {\r
+               xmlRemoveID(doc,attr);\r
+       }\r
+       if (NULL != inpVal)\r
+       {\r
+               xmlFreeIDTable(inpVal);\r
+       }\r
+       if (NULL != doc)\r
+       {\r
+               xmlFreeDoc(doc);\r
+       }\r
+       if (attr != NULL)\r
+       {\r
+               xmlRemoveProp(attr);\r
+       }\r
+       free_api_doc();\r
+}\r
+       /**    \r
+       * @test                 UTcxmlFreeIDTableP01\r
+       * @brief                void xmlFreeIDTable (xmlIDTablePtr table)\r
+       * @desc                 Positive Test for deallocating the memory used by an ID hash table\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [xmlIDTablePtr(inpVal) is created, N/A] @n\r
+       *                       {inpVal} => {N/A | N/A} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void \r
+UTcxmlFreeIDTableP01()\r
+{\r
+       xmlIDTablePtr inpVal = xmlHashCreate(0);\r
+       DTS_CHECK_NE_MESSAGE("UTcxmlFreeIDTableP01", (void *)inpVal, (void *)NULL, "xmlHashCreate Failed");\r\r
+       /**\r
+       * @remarks   input1: [xmlIDTablePtr(inpVal) is created, N/A]    @n\r
+       *                                       {inpVal} => {N/A | N/A} @n\r
+       */\r
+       xmlFreeIDTable(inpVal);\r
+}\r
+       /**    \r
+       * @test                 UTcxmlGetIDP01\r
+       * @brief                xmlAttrPtr xmlGetID (xmlDocPtr doc, const xmlChar * ID)\r
+       * @desc                 Positive Test for searching the attribute declaring the given ID\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [xmlDocPtr(doc) is created, N/A]        @n\r
+       *                       {xmlDocPtr(doc),const xmlCha("foo")} => {N/A | N/A}     @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void \r
+UTcxmlGetIDP01()\r
+{\r
+\r
+//     int test_ret = 0;\r
+       xmlAttrPtr ret_val;\r
+       xmlDocPtr doc; /* pointer to the document */\r
+       int n_doc = 0;\r
+       xmlChar * ID; /* the ID value */\r
+       int n_ID = 0;\r
+       /**\r
+       * @remarks   input1: [xmlDocPtr(doc) is created, N/A]   @n\r
+       *                                       {doc,"foo"} => {N/A | N/A}      @n\r
+       */\r
+       //for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {\r
+               //for (n_ID = 0;n_ID < gen_nb_const_xmlChar_ptr;n_ID++) {\r
+                       doc = gen_xmlDocPtr(n_doc, 0);\r
+                       ID = gen_const_xmlChar_ptr(n_ID, 1);\r
+\r
+                       ret_val = xmlGetID(doc, (const xmlChar *)ID);\r
+                       DTS_CHECK_EQ_MESSAGE("UTcxmlGetIDP01", (void *)ret_val, (void *)NULL, "xmlGetID Failed");\r\r
+                       desret_xmlAttrPtr(ret_val);\r
+                       des_xmlDocPtr(n_doc, doc, 0);\r
+                       //des_const_xmlChar_ptr(n_ID, (const xmlChar *)ID, 1);\r
+                       //xmlFree(ID);\r
+                       free_api_doc();\r
+\r
+               //}\r
+       //}\r
+\r
+}\r
+       /**    \r
+       * @test                 UTcxmlIsIDP01\r
+       * @brief                int xmlIsID (xmlDocPtr doc, xmlNodePtr elem, xmlAttrPtr attr)\r
+       * @desc                 Positive Test for determining whether an attribute is of type ID.\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [xmlDocPtr(doc), xmlNodePtr(elem) and xmlAttrPtr(attr) are created, N/A]        @n\r
+       *                       {xmlDocPtr(doc),xmlNodePtr(elem),xmlAttrPtr(attr-"foo"} => {N/A | N/A}  @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void \r
+UTcxmlIsIDP01()\r
+{\r
+\r
+       int ret_val;\r
+       xmlDocPtr doc; /* the document */\r
+       int n_doc = 0;\r
+       xmlNodePtr elem; /* the element carrying the attribute */\r
+       int n_elem = 0;\r
+       xmlAttrPtr attr; /* the attribute */\r
+       int n_attr = 0;\r
+       /**\r
+       * @remarks   input1: [xmlDocPtr(doc), xmlNodePtr(elem) and xmlAttrPtr(attr) are created, N/A]   @n\r
+       *                                       {doc,elem,attr"foo"} => {N/A | N/A}     @n\r
+       */\r
+       //for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {\r
+               //for (n_elem = 0;n_elem < gen_nb_xmlNodePtr;n_elem++) {\r
+                       //for (n_attr = 0;n_attr < gen_nb_xmlAttrPtr;n_attr++) {\r
+                               doc = gen_xmlDocPtr(n_doc, 0);\r
+                               elem = gen_xmlNodePtr(n_elem, 1);\r
+                               attr = gen_xmlAttrPtr(n_attr, 2);\r
+\r
+                               ret_val = xmlIsID(doc, elem, attr);\r
+                               DTS_CHECK_EQ_MESSAGE("UTcxmlIsIDP01", (void *)ret_val, (void *)NULL, "xmlIsID Failed");\r\r
+                               desret_int(ret_val);\r
+                               des_xmlDocPtr(n_doc, doc, 0);\r
+                               des_xmlNodePtr(n_elem, elem, 1);\r
+                               des_xmlAttrPtr(n_attr, attr, 2);\r
+                               free_api_doc();\r
+                       //}\r
+               //}\r
+       //}\r
+\r
+}\r
+       /**    \r
+       * @test                 UTcxmlRemoveIDP01\r
+       * @brief                int xmlRemoveID (xmlDocPtr doc, xmlAttrPtr attr)\r
+       * @desc                 Positive Test for removing the given attribute from the ID table maintained internally.\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [xmlDocPtr(doc) and xmlAttrPtr(attr) are created, N/A]  @n\r
+       *                       {xmlDocPtr(doc),xmlAttrPtr(attr)} => {N/A |-1}  @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void \r
+UTcxmlRemoveIDP01()\r
+{\r
+\r
+       int ret_val;\r
+       xmlDocPtr doc; /* the document */\r
+       int n_doc = 0;\r
+       xmlAttrPtr attr; /* the attribute */\r
+       int n_attr = 0;\r
+       /**\r
+       * @remarks   input1: [xmlDocPtr(doc) and xmlAttrPtr(attr) are created, N/A]     @n\r
+       *                                       {doc,attr} => {N/A |-1} @n\r
+       */\r
+       //for (n_doc = 0;n_doc < gen_nb_xmlDocPtr;n_doc++) {\r
+               //for (n_attr = 0;n_attr < gen_nb_xmlAttrPtr;n_attr++) {\r
+                       doc = gen_xmlDocPtr(n_doc, 0);\r
+                       attr = gen_xmlAttrPtr(n_attr, 1);\r
+\r
+                       ret_val = xmlRemoveID(doc, attr);\r
+                       DTS_CHECK_EQ_MESSAGE("UTcxmlRemoveIDP01", (void *)ret_val, (void *)-1, "xmlRemoveID Failed");\r\r
+                       desret_int(ret_val);\r
+                       des_xmlDocPtr(n_doc, doc, 0);\r
+                       des_xmlAttrPtr(n_attr, attr, 1);\r
+                       free_api_doc();\r
+               //}\r
+       //}\r
+}\r
+       /**    \r
+       * @test                 UTcxmlAddRefP01\r
+       * @brief                xmlRefPtr xmlAddRef (xmlValidCtxtPtr ctxt, xmlDocPtr doc, const xmlChar * value, xmlAttrPtr attr)\r
+       * @desc                 Positive Test for registering a new ref declaration\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [xmlDocPtr(doc) and xmlAttrPtr(attr) are created, N/A]  @n\r
+       *                       {NULL,xmlDocPtr(doc),const xmlChar("input"),xmlAttrPtr(attr)} => {N/A |-1}      @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void \r
+UTcxmlAddRefP01()\r
+{\r
+//     int result = -1;\r
+                     //Target\r
+//     const char *pFilename = LIBXML2TESTXML;\r
+       xmlRefTablePtr inpVal = xmlHashCreate(0);\r
+       DTS_CHECK_NE_MESSAGE("UTcxmlAddRefP01", (void *)inpVal, (void *)NULL, "xmlHashCreate Failed");\r\r
+       xmlDocPtr doc = xmlNewDoc(BAD_CAST "1.0");\r
+\r
+       xmlAttrPtr attr = gen_xmlAttrPtr(0, 2);\r
+       /**\r
+       * @remarks   input1: [xmlDocPtr(doc) and xmlAttrPtr(attr) are created, N/A]     @n\r
+       *                                       {NULL,doc,"input",attr} => {N/A |-1}    @n\r
+       */\r
+       xmlRefPtr outVal = xmlAddRef(NULL,doc,(xmlChar*)"input",attr);\r
+       DTS_CHECK_EQ_MESSAGE("UTcxmlAddRefP01", (void *)(strcmp((char*)(outVal->value),"input")), (void *)0, "xmlAddRef Failed");\r\r
+\r
+       if (NULL != inpVal)\r
+       {\r
+               xmlFreeRefTable(inpVal);\r
+       }\r
+       if (NULL != doc)\r
+       {\r
+               xmlFreeDoc(doc);\r
+       }\r
+       free_api_doc();\r
+       \r
+}\r
+\r
+       /**    \r
+       * @test                 UTcxmlFreeRefTableP01\r
+       * @brief                void xmlFreeRefTable    (xmlRefTablePtr table)\r
+       * @desc                 Positive Test for deallocating the memory used by an Ref hash table.\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [xmlRefTablePtr(inpVal)is created, N/A] @n\r
+       *                       {inpVal} => {N/A |-1}   @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void \r
+UTcxmlFreeRefTableP01()\r
+{\r
+       xmlRefTablePtr inpVal = xmlHashCreate(0);\r
+       DTS_CHECK_NE_MESSAGE("UTcxmlFreeRefTableP01", (void *)inpVal, (void *)NULL, "xmlHashCreate Failed");\r\r
+       /**\r
+       * @remarks   input1: [xmlRefTablePtr(inpVal)is created, N/A]    @n\r
+       *                                       {inpVal} => {N/A |-1}   @n\r
+       */\r
+       xmlFreeRefTable(inpVal);\r
+}\r
+       /**    \r
+       * @test                 UTcxmlIsRefP01\r
+       * @brief                int xmlIsRef (xmlDocPtr doc, xmlNodePtr elem, xmlAttrPtr attr)\r
+       * @desc                 Positive Test for determining whether an attribute is of type Ref.\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [xmlDocPtr(doc),xmlAttrPtr(attr) and xmlNodePtr(elem) are created, N/A] @n\r
+       *                       {xmlDocPtr(doc),xmlNodePtr(elem),xmlAttrPtr(attr)} => {N/A |0}  @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void \r
+UTcxmlIsRefP01()\r
+{\r
+       int ret_val;\r
+       xmlDocPtr doc; /* the document */\r
+       xmlNodePtr elem; /* the element carrying the attribute */\r
+       xmlAttrPtr attr; /* the attribute */\r
+       doc = gen_xmlDocPtr(0, 0);\r
+       DTS_CHECK_NE_MESSAGE("UTcxmlIsRefP01", (void *)doc, (void *)NULL, "gen_xmlDocPtr Failed");\r\r
+               \r
+       elem = gen_xmlNodePtr(0, 1);\r
+       DTS_CHECK_NE_MESSAGE("UTcxmlIsRefP01", (void *)elem, (void *)NULL, "gen_xmlNodePtr Failed");\r\r
+               \r
+       attr = gen_xmlAttrPtr(0, 2);\r
+       DTS_CHECK_NE_MESSAGE("UTcxmlIsRefP01", (void *)attr, (void *)NULL, "gen_xmlAttrPtr Failed");\r\r
+               \r
+       /**\r
+       * @remarks   input1: [xmlDocPtr(doc),xmlAttrPtr(attr) and xmlNodePtr(elem) are created, N/A]    @n\r
+       *                                       {doc,elem,attr} => {N/A |0}     @n\r
+       */\r
+       ret_val = xmlIsRef(doc, elem, attr);\r
+       DTS_CHECK_EQ_MESSAGE("UTcxmlIsRefP01", (void *)ret_val, (void *)0, "xmlIsRef Failed");\r\r
+       if (NULL != doc)\r
+       {\r
+               xmlFreeDoc(doc);\r
+       }\r
+       if (NULL != elem)\r
+       {\r
+               xmlFreeNode(elem);\r
+       }\r
+       //if (NULL != attr)\r
+       //{\r
+       //      xmlFreePropList(attr);\r
+       //}\r
+       free_api_doc();\r
+       \r
+\r
+}\r
+       /**    \r
+       * @test                 UTcxmlRemoveRefP01\r
+       * @brief                int xmlRemoveRef (xmlDocPtr doc, xmlAttrPtr attr)\r
+       * @desc                 Positive Test for removing the given attribute from the Ref table maintained internally.\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [xmlDocPtr(doc),xmlAttrPtr(attr) are created, N/A]      @n\r
+       *                       {xmlDocPtr(doc),xmlAttrPtr(attr)} => {N/A |-1}  @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void \r
+UTcxmlRemoveRefP01()\r
+{\r
+       int ret_val;\r
+       xmlDocPtr doc; /* the document */\r
+       xmlNodePtr elem; /* the element carrying the attribute */\r
+       xmlAttrPtr attr; /* the attribute */\r
+       doc = gen_xmlDocPtr(0, 0);\r
+       elem = gen_xmlNodePtr(0, 1);\r
+       attr = gen_xmlAttrPtr(0, 2);\r
+       /**\r
+       * @remarks   input1: [xmlDocPtr(doc),xmlAttrPtr(attr) are created, N/A] @n\r
+       *                                       {doc,elem,attr} => {N/A |-1}    @n\r
+       */\r
+       ret_val = xmlRemoveRef(doc,attr);\r
+       DTS_CHECK_EQ_MESSAGE("UTcxmlRemoveRefP01", (void *)ret_val, (void *)-1, "xmlRemoveRef Failed");\r\r
+\r
+       if (NULL != doc)\r
+       {\r
+               xmlFreeDoc(doc);\r
+       }\r
+       if (NULL != elem)\r
+       {\r
+               xmlFreeNode(elem);\r
+       }\r
+       free_api_doc();\r
+       //if (NULL != attr)\r
+       //{\r
+       //      xmlFreePropList(attr);\r
+       //}\r
+       \r
+}\r
+       /**    \r
+       * @test                 UTcxmlGetRefsP01\r
+       * @brief                xmlListPtr xmlGetRefs (xmlDocPtr doc, const xmlChar * ID)\r
+       * @desc                 Positive Test for finding the set of references for the supplied ID\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [xmlDocPtr(doc) is created, N/A]        @n\r
+       *                       {xmlDocPtr(doc),const xmlChar("test")} => {N/A |-1}     @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void \r
+UTcxmlGetRefsP01()\r
+{\r
+       xmlListPtr ret_val;\r
+       xmlDocPtr doc; /* the document */\r
+       doc = gen_xmlDocPtr(0, 0);\r
+       /**\r
+       * @remarks   input1: [xmlDocPtr(doc) is created, N/A]   @n\r
+       *                                       {doc,"test"} => {N/A |-1}       @n\r
+       */\r
+       ret_val = xmlGetRefs(doc,(const xmlChar*)"test");\r
+       DTS_CHECK_EQ_MESSAGE("UTcxmlGetRefsP01", (void *)ret_val, (void *)NULL, "xmlGetRefs Failed");\r\r
+       if (NULL != doc)\r
+       {\r
+               xmlFreeDoc(doc);\r
+       }\r
+}\r
+       /**    \r
+       * @test                 UTcxmlDumpElementTableP01\r
+       * @brief                void xmlDumpElementTable (xmlBufferPtr buf, xmlElementTablePtr table)\r
+       * @desc                 Positive Test for dumping the content of the element table as an XML DTD definition\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [xmlBufferPtr(buf) and xmlElementTablePtr(table) are created, N/A]      @n\r
+       *                       {xmlBufferPtr(buf),xmlElementTablePtr(table)} => {N/A | N/A}    @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void \r
+UTcxmlDumpElementTableP01()\r
+{\r
+\r
+       /**\r
+       * @remarks   input1: [xmlBufferPtr(buf) and xmlElementTablePtr(table) are created, N/A] @n\r
+       *                                       {buf,table} => {N/A | N/A}      @n\r
+       */\r
+#if defined(LIBXML_OUTPUT_ENABLED)\r
+       //xmlBufferPtr buf; /* the XML buffer output */\r
+       xmlBufferPtr buf2; /* the XML buffer output */\r
+       int result = -1;\r
+       xmlDocPtr doc; /* the resulting document tree used as i/p*/\r
+       const char *pFilename = LIBXML2TESTXML;\r
+       //int n_buf;\r
+       //xmlElementTablePtr table; /* An element table */\r
+       //int n_table;\r
+\r
+       //for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {\r
+       //      for (n_table = 0;n_table < gen_nb_xmlElementTablePtr;n_table++) {\r
+       //              buf = gen_xmlBufferPtr(n_buf, 0);\r
+       //              table = gen_xmlElementTablePtr(n_table, 1);\r
+\r
+       //              xmlDumpElementTable(buf, table);\r
+       //              des_xmlBufferPtr(n_buf, buf, 0);\r
+       //              des_xmlElementTablePtr(n_table, table, 1);\r
+       //      }\r
+       //}\r
+\r
+       xmlElementTablePtr inValue = xmlHashCreate(0);\r
+       DTS_CHECK_NE_MESSAGE("UTcxmlDumpElementTableP01", (void *)inValue, (void *)NULL, "xmlHashCreate Failed");\r\r
+\r
+       doc = xmlReadFile(pFilename, NULL, 0);\r
+       DTS_ASSERT_MESSAGE("UTcxmlDumpElementTableP01", (void *)(NULL == doc),  "xmlReadFile Failed");\r\r
+\r
+       xmlDtdPtr dtdPtr = xmlGetIntSubset(doc);\r
+       xmlElementPtr elemPtr = xmlGetDtdElementDesc(dtdPtr, (const xmlChar *)"TO");\r
+\r
+       result = xmlHashAddEntry(inValue, (const xmlChar *)"King", (void *)elemPtr);\r
+       DTS_CHECK_NE_MESSAGE("UTcxmlDumpElementTableP01", (void *)inValue, (void *)-1, "xmlHashAddEntry Failed");\r\r
+\r
+       buf2 = xmlBufferCreate();\r
+       DTS_ASSERT_MESSAGE("UTcxmlDumpElementTableP01", (void *)(NULL == buf2),  "xmlBufferCreate Failed");\r\r
+\r
+       xmlDumpElementTable(buf2, inValue);\r
+\r
+       //if (dtdPtr != NULL)\r
+       //{\r
+       //      xmlFreeDtd(dtdPtr);\r
+       //}\r
+       if (elemPtr != NULL)\r
+       {\r
+               xmlFreeElementContent((xmlElementContentPtr )elemPtr);\r
+       }\r
+       if (NULL != inValue)\r
+       {\r
+               xmlHashFree(inValue,NULL);\r
+       }\r
+       if (NULL != doc)\r
+       {\r
+               xmlFreeDoc(doc);\r
+       }\r
+       if (buf2 != NULL)\r
+       {\r
+               xmlBufferFree(buf2);\r
+       }\r
+\r
+#endif\r
+\r
+}\r
+/**    \r
+       * @test                 UTcxmlDumpAttributeTableP01\r
+       * @brief                void xmlDumpAttributeTable (xmlBufferPtr buf, xmlAttributeTablePtr table)\r
+       * @desc                 Positive Test for dumping the content of the attribute table as an XML DTD definition\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [xmlBufferPtr(buf) and xmlElementTablePtr(table) are created, N/A]      @n\r
+       *                       {xmlBufferPtr(buf),xmlAttributeTablePtr(table)} => {N/A | N/A}  @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void \r
+UTcxmlDumpAttributeTableP01()\r
+{\r
+       /**\r
+       * @remarks   input1: [xmlBufferPtr(buf) and xmlElementTablePtr(table) are created, N/A] @n\r
+       *                                       {buf,table} => {N/A | N/A}      @n\r
+       */\r
+#if defined(LIBXML_OUTPUT_ENABLED)\r
+//     xmlBufferPtr buf; /* the XML buffer output */\r
+       xmlBufferPtr buf2; /* the XML buffer output */\r
+       int result = -1;\r
+       const char *pFilename = LIBXML2TESTXML;\r
+\r
+\r
+       xmlDocPtr doc; /* the resulting document tree used as i/p*/\r
+\r
+       //int n_buf;\r
+       //xmlAttributeTablePtr table; /* An attribute table */\r
+       //int n_table;\r
+       xmlElementTablePtr table = xmlHashCreate(4);\r
+       xmlHashAddEntry3(table,(xmlChar*)"Id1",(xmlChar*)"name2",(xmlChar*)"name3",NULL);\r
+       //for (n_buf = 0;n_buf < gen_nb_xmlBufferPtr;n_buf++) {\r
+       //      for (n_table = 0;n_table < gen_nb_xmlAttributeTablePtr;n_table++) {\r
+       //              buf = gen_xmlBufferPtr(n_buf, 0);\r
+       //              //table = gen_xmlAttributeTablePtr(n_table, 1);\r
+\r
+       //              xmlDumpAttributeTable(buf, table);\r
+       //              des_xmlBufferPtr(n_buf, buf, 0);\r
+       //              des_xmlAttributeTablePtr(n_table, table, 1);\r
+       //              xmlResetLastError();\r
+       //      }\r
+       //}\r
+       if (NULL != table)\r
+       {\r
+               xmlHashFree(table,NULL);\r
+       }\r
+\r
+       xmlAttributeTablePtr inValue = xmlHashCreate(0);\r
+       DTS_CHECK_NE_MESSAGE("UTcxmlDumpAttributeTableP01", (void *)inValue, (void *)NULL, "xmlHashCreate Failed");\r\r
+\r
+       doc = xmlReadFile(pFilename, NULL, 0);\r
+       DTS_ASSERT_MESSAGE("UTcxmlDumpElementTableP01", (void *)(NULL == doc),  "xmlBufferCreate Failed");\r\r
+\r
+       xmlDtdPtr dtdPtr = xmlGetIntSubset(doc);\r
+       xmlAttributePtr attrPtr = xmlGetDtdAttrDesc(dtdPtr, (const xmlChar *)"SIGN",(const xmlChar *)"email");\r
+\r
+       result = xmlHashAddEntry(inValue, (const xmlChar *)"King", (void *)attrPtr);\r
+       DTS_CHECK_NE_MESSAGE("UTcxmlDumpAttributeTableP01", (void *)result, (void *)-1, "xmlHashAddEntry Failed");\r\r
+\r
+       buf2 = xmlBufferCreate();\r
+       DTS_ASSERT_MESSAGE("UTcxmlDumpElementTableP01", (void *)(NULL == buf2),  "xmlBufferCreate Failed");\r\r
+\r
+       xmlDumpAttributeTable(buf2, inValue);\r
+\r
+       //if (dtdPtr != NULL)\r
+       //{\r
+       //      xmlFreeDtd(dtdPtr);\r
+       //}\r
+       if (NULL != inValue)\r
+       {\r
+               xmlHashFree(inValue,NULL);\r
+       }\r
+       if (NULL != doc)\r
+       {\r
+               xmlFreeDoc(doc);\r
+       }\r
+       if (buf2 != NULL)\r
+       {\r
+               xmlBufferFree(buf2);\r
+       }\r
+#endif\r
+}\r
+       /**    \r
+       * @test                 UTcxmlGetDtdQElementDescP01\r
+       * @brief                xmlElementPtr   xmlGetDtdQElementDesc   (xmlDtdPtr dtd, const xmlChar * name, const xmlChar * prefix)\r
+       * @desc                 Positive Test for searching the DTD for the description of this element\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [xmlDtdPtr(dtd) having element 'Id1' is created, N/A]   @n\r
+       *                       {dtd,"Id1"} => {N/A |xmlElementPtr}     @n\r
+                                       input2: [N/A, N/A]      @n\r
+                                       {xmlDtdPtr(dtd),const xmlChar("Id2")} => {N/A |NULL}    @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void \r
+UTcxmlGetDtdQElementDescP01()\r
+{\r
+\r
+       xmlElementPtr ret_val;\r
+       xmlChar * name; /* the element name */\r
+       xmlDtdPtr dtd = xmlNewDtd(NULL, BAD_CAST "dtd", BAD_CAST"foo", BAD_CAST"bar");\r
+       DTS_CHECK_NE_MESSAGE("UTcxmlGetDtdQElementDescP01", (void *)dtd, (void *)NULL, "xmlNewDtd Failed");\r\r
+       //xmlElementPtr elem = xmlAddElementDecl(NULL, dtd, (const xmlChar *)"test", XML_ELEMENT_TYPE_EMPTY, NULL); /* An element table */\r
+       //\r
+       //if (NULL != dtd->elements)\r
+       //{\r
+       //      xmlHashFree((xmlHashTablePtr)dtd->elements,NULL);\r
+       //}\r
+       xmlElementTablePtr table = xmlHashCreate(0);\r
+       xmlHashAddEntry(table,(xmlChar*)"Id1",(void*)"element1");\r
+       name = (xmlChar*)"Id1";\r
+       dtd->elements = table;\r
+       /**\r
+       * @remarks   input1: [xmlDtdPtr(dtd) having element 'Id1' is created, N/A]      @n\r
+       *                                       {dtd,"Id1"} => {N/A |xmlElementPtr}     @n\r
+       */\r
+       ret_val = xmlGetDtdQElementDesc(dtd, (const xmlChar *)name, NULL);\r
+       DTS_CHECK_NE_MESSAGE("UTcxmlGetDtdQElementDescP01", (void *)ret_val, (void *)NULL, "xmlGetDtdQElementDesc Failed");\r\r
+       //if (ret_val != NULL)\r
+       //{\r
+       //      //xmlFreeElementContent((xmlElementContentPtr )ret_val);\r
+       //      xmlFreeElement(ret_val);\r
+       //}\r
+       \r
+       /**\r
+       * @remarks   input2: [N/A, N/A] @n\r
+       *                                       {dtd,"Id2"} => {N/A |NULL}      @n\r
+       */\r
+       ret_val = xmlGetDtdQElementDesc(dtd, (const xmlChar *)"Id2", NULL);\r
+       DTS_CHECK_EQ_MESSAGE("UTcxmlGetDtdQElementDescP01", (void *)ret_val, (void *)NULL, "xmlGetDtdQElementDesc Failed");\r\r
+\r
+       /*if (NULL != elem)\r
+       {\r
+               xmlFreeElementContent((xmlElementContentPtr )elem);\r
+       }*/\r
+\r
+\r
+       dtd->elements = NULL;\r
+\r
+       if (dtd != NULL)\r
+       {\r
+               xmlFreeDtd(dtd);\r
+       }\r
+       if (NULL != table)\r
+       {\r
+               xmlHashFree(table,NULL);\r
+       }\r
+\r
+       //if (elem != NULL)\r
+       //{\r
+       //      xmlFree(elem);\r
+       //}\r
+       //if (name != NULL)\r
+       //{\r
+       //      xmlFree(name);\r
+       //}\r
+\r
+#if 0\r
+       for (n_dtd = 0;n_dtd < gen_nb_xmlDtdPtr;n_dtd++) {\r
+               for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {\r
+                       for (n_prefix = 0;n_prefix < gen_nb_const_xmlChar_ptr;n_prefix++) {\r
+                               dtd = gen_xmlDtdPtr(n_dtd, 0);\r
+                               name = gen_const_xmlChar_ptr(n_name, 1);\r
+                               prefix = gen_const_xmlChar_ptr(n_prefix, 2);\r
+\r
+                               ret_val = xmlGetDtdQElementDesc(dtd, (const xmlChar *)name, (const xmlChar *)prefix);\r
+                               MT_CHECK(ret_val == NULL);\r
+                               desret_xmlElementPtr(ret_val);\r
+                               des_xmlDtdPtr(n_dtd, dtd, 0);\r
+                               des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 1);\r
+                               des_const_xmlChar_ptr(n_prefix, (const xmlChar *)prefix, 2);\r
+                       }\r
+               }\r
+       }\r
+#endif\r
+\r
+}\r
+       /**    \r
+       * @test                 UTcxmlGetDtdQAttrDescP01\r
+       * @brief                xmlAttributePtr xmlGetDtdQAttrDesc (xmlDtdPtr dtd, const xmlChar * elem, const xmlChar * name, const xmlChar * prefix)\r
+       * @desc                 Positive Test for searching the DTD for the description of this qualified attribute on this element.\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks               input1: [xmlDtdPtr(dtd) having attribute 'Id1' is created, N/A]        @n\r
+       *                       {dtd,NULL,"Id1",NULL} => {N/A |xmlAttributePtr} @n\r
+                                       input2: [N/A, N/A]      @n      \r
+                                       {xmlDtdPtr(dtd),NULL,const xmlChar("Id2"),NULL} => {N/A |NULL}  @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void \r
+UTcxmlGetDtdQAttrDescP01()\r
+{\r
+       xmlAttributePtr ret_val;\r
+       xmlChar * name; /* the attribute name */\r
+\r
+       xmlDtdPtr dtd = xmlNewDtd(NULL, BAD_CAST "dtd", BAD_CAST"foo", BAD_CAST"bar");\r
+       DTS_CHECK_NE_MESSAGE("UTcxmlGetDtdQAttrDescP01", (void *)dtd, (void *)NULL, "xmlNewDtd Failed");\r
+       xmlElementPtr elem = xmlAddElementDecl(NULL, dtd, (const xmlChar *)"test", XML_ELEMENT_TYPE_EMPTY, NULL); /* An element table */\r
+\r
+       xmlElementTablePtr table = xmlHashCreate(0);\r
+       xmlHashAddEntry(table,(xmlChar*)"Id1",(void*)"element1");\r
+\r
+       name = (xmlChar*)"Id1";\r
+       dtd->attributes = table;\r
+       /**\r
+       * @remarks   input1: [xmlDtdPtr(dtd) having attribute 'Id1' is created, N/A]    @n\r
+       *                                       {dtd,NULL,"Id1",NULL} => {N/A |xmlAttributePtr} @n\r
+       */\r
+       ret_val = xmlGetDtdQAttrDesc(dtd, NULL, (const xmlChar *)name, NULL);\r
+       DTS_CHECK_NE_MESSAGE("UTcxmlGetDtdQAttrDescP01", (void *)ret_val, (void *)NULL, "xmlGetDtdQAttrDesc 1 Failed");\r
+       /**\r
+       * @remarks   input1: [N/A, N/A] @n\r
+       *                                       {dtd,NULL,"Id2",NULL} => {N/A |NULL}    @n\r
+       */\r
+       ret_val = xmlGetDtdQAttrDesc(dtd, (const xmlChar *)elem, (const xmlChar *)"iD2", NULL);\r
+       DTS_CHECK_EQ_MESSAGE("UTcxmlGetDtdQAttrDescP01", (void *)ret_val, (void *)NULL, "xmlGetDtdQAttrDesc 2 Failed");\r
+\r
+       dtd->attributes = NULL;\r
+       if (NULL != table)\r
+       {\r
+               xmlHashFree(table,NULL);\r
+       }\r
+       //if (name != NULL)\r
+       //{\r
+       //      xmlFree(name);\r
+       //}\r
+       if (dtd != NULL)\r
+       {\r
+               xmlFreeDtd(dtd);\r
+       }\r
+\r
+\r
+#if 0\r
+\r
+       for (n_dtd = 0;n_dtd < gen_nb_xmlDtdPtr;n_dtd++) {\r
+               for (n_elem = 0;n_elem < gen_nb_const_xmlChar_ptr;n_elem++) {\r
+                       for (n_name = 0;n_name < gen_nb_const_xmlChar_ptr;n_name++) {\r
+                               for (n_prefix = 0;n_prefix < gen_nb_const_xmlChar_ptr;n_prefix++) {\r
+                                       dtd = gen_xmlDtdPtr(n_dtd, 0);\r
+                                       elem = gen_const_xmlChar_ptr(n_elem, 1);\r
+                                       name = gen_const_xmlChar_ptr(n_name, 2);\r
+                                       prefix = gen_const_xmlChar_ptr(n_prefix, 3);\r
+\r
+                                       ret_val = xmlGetDtdQAttrDesc(dtd, (const xmlChar *)elem, (const xmlChar *)name, (const xmlChar *)prefix);\r
+                                       desret_xmlAttributePtr(ret_val);\r
+                                       des_xmlDtdPtr(n_dtd, dtd, 0);\r
+                                       des_const_xmlChar_ptr(n_elem, (const xmlChar *)elem, 1);\r
+                                       des_const_xmlChar_ptr(n_name, (const xmlChar *)name, 2);\r
+                                       des_const_xmlChar_ptr(n_prefix, (const xmlChar *)prefix, 3);\r
+                                       xmlResetLastError();\r
+                               }\r
+                       }\r
+               }\r
+       }\r
+#endif\r
+\r
+}\r
+       /**    \r
+       * @test                 UTcxmlCopyElementP01\r
+       * @brief                xmlElementContentPtr    xmlCopyElementContent   (xmlElementContentPtr cur)\r
+       * @desc                 Positive Test for building a copy of an element content description\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [xmlElementContentPtr(cur) is created with name = "foo", N/A]   @n\r
+       *                       {xmlElementContentPtr(cur)} => {N/A |xmlAttributePtr}   @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void \r
+UTcxmlCopyElementP01()\r
+{\r
+       xmlElementContentPtr ret_val;\r
+       xmlElementContentPtr cur; /* An element content pointer. */\r
+       ret_val = xmlCopyElementContent(NULL);\r
+       DTS_CHECK_EQ_MESSAGE("UTcxmlCopyElementP01", (void *)ret_val, (void *)NULL, "xmlCopyElementContent Failed");\r
+\r
+       cur =  xmlNewElementContent((const xmlChar *)("foo"), XML_ELEMENT_CONTENT_ELEMENT);\r
+       \r
+       /**\r
+       * @remarks   input1: [xmlElementContentPtr(cur) is created with name = "foo", N/A]      @n\r
+       *                                       {cur} => {N/A |xmlAttributePtr} @n\r
+       */\r
+       ret_val = xmlCopyElementContent(cur);\r
+       DTS_CHECK_NE_MESSAGE("UTcxmlCopyElementP01", (void *)ret_val, (void *)NULL, "xmlGetDtdQAttrDesc Failed");\r
+       if (ret_val != NULL)\r
+       {\r
+               xmlFreeElementContent(ret_val);\r
+       }\r
+       if (cur != NULL)\r
+       {\r
+               xmlFreeElementContent(cur);\r
+       }\r
+}\r
+       /**    \r
+       * @test                 UTcxmlDumpElementDeclP01\r
+       * @brief                void xmlDumpElementDecl (xmlBufferPtr buf, xmlElementPtr elem)\r
+       * @desc                 Positive Test for dumping the content of the element declaration as an XML DTD definition\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [xmlBufferPtr(buf) is created \n xmlElementPtr(elem) is created with name = "test", N/A]        @n\r
+       *                       {xmlBufferPtr(buf),xmlElementPtr(elem)} => {N/A |xmlAttributePtr}       @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void \r
+UTcxmlDumpElementDeclP01()\r
+{\r
+       /**\r
+       * @remarks   input1: [xmlBufferPtr(buf) is created \n xmlElementPtr(elem) is created with name = "test", N/A]   @n\r
+       *                                       {buf,elem} => {N/A |xmlAttributePtr}    @n\r
+       */\r
+#if defined(LIBXML_OUTPUT_ENABLED)\r
+       xmlBufferPtr buf; /* the XML buffer output */\r
+       xmlValidCtxtPtr ctxt = NULL;\r
+       xmlDtdPtr dtd = xmlNewDtd(NULL, BAD_CAST "dtd", BAD_CAST"foo", BAD_CAST"bar");\r
+\r
+       xmlElementPtr elem = xmlAddElementDecl(ctxt, dtd, (const xmlChar *)"test", XML_ELEMENT_TYPE_EMPTY, NULL); /* An element table */\r
+       buf = xmlBufferCreate();\r
+       DTS_CHECK_NE_MESSAGE("UTcxmlCopyElementP01", (void *)buf, (void *)NULL, "xmlBufferCreate Failed");\r
+       \r
+       buf->alloc = XML_BUFFER_ALLOC_EXACT;\r
+       xmlDumpElementDecl(buf, elem);\r
+       DTS_CHECK_EQ_MESSAGE("UTcxmlCopyElementP01", (void *)(strcmp((char*)buf->content,"<!ELEMENT test EMPTY>\n")), (void *)0, "xmlDumpElementDecl Failed");\r
+\r
+       if (dtd != NULL)\r
+       {\r
+               xmlFreeDtd(dtd);\r
+       }\r
+       if (buf != NULL)\r
+       {\r
+               xmlBufferFree(buf);\r
+       }\r
+\r
+#endif\r
+}\r
+       /**    \r
+       * @test                 UTcxmlGetDtdElementDesclP01\r
+       * @brief                xmlElementPtr xmlGetDtdElementDesc (xmlDtdPtr dtd, const xmlChar * name)\r
+       * @desc                 Positive Test for searching the DTD for the description of this element\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [xmlDtdPtr(dtd) is created with element having name "Id1" \n, N/A]      @n\r
+       *                       {dtd,"Id1"} => {N/A |xmlElementPtr}     @n\r
+                                       input2: [N/A , N/A]     @n\r
+                                       {xmlDtdPtr(dtd),const xmlChar("noString")} => {N/A |NULL}       @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void \r
+UTcxmlGetDtdElementDesclP01()\r
+{\r
+       xmlElementPtr ret_val;\r
+       xmlDtdPtr dtd; /* a pointer to the DtD to search */\r
+       xmlChar * name; /* the element name */\r
+       xmlElementTablePtr table = xmlHashCreate(0);\r
+       xmlHashAddEntry(table,(xmlChar*)"Id1",(void*)"element1");\r
+       dtd = xmlNewDtd(NULL, BAD_CAST "dtd", BAD_CAST"foo", BAD_CAST"bar");\r
+       DTS_CHECK_NE_MESSAGE("UTcxmlGetDtdElementDesclP01", (void *)dtd, (void *)NULL, "xmlNewDtd Failed");\r
+       \r
+       name = (xmlChar*)"Id1";\r
+       dtd->elements = table;\r
+       /**\r
+       * @remarks   input1: [xmlDtdPtr(dtd) is created with element having name "Id1" \n, N/A] @n\r
+       *                                       {dtd,"Id1"} => {N/A |xmlElementPtr}     @n\r
+       */\r
+       ret_val = xmlGetDtdElementDesc(dtd, (const xmlChar *)name);\r
+       DTS_CHECK_NE_MESSAGE("UTcxmlGetDtdElementDesclP01", (void *)ret_val, (void *)NULL, "xmlGetDtdElementDesc Failed");\r
+       /**\r
+       * @remarks   input2: [N/A , N/A]        @n\r
+       *                                       {dtd,"noString"} => {N/A |NULL} @n\r
+       */\r
+       ret_val = xmlGetDtdElementDesc(dtd, (const xmlChar *)"noString");\r
+       DTS_CHECK_EQ_MESSAGE("UTcxmlGetDtdElementDesclP01", (void *)ret_val, (void *)NULL, "xmlGetDtdElementDesc Failed");\r
+\r
+       dtd->elements = NULL;\r
+\r
+       if (dtd != NULL)\r
+       {\r
+               xmlFreeDtd(dtd);\r
+       }\r
+       if (NULL != table)\r
+       {\r
+               xmlHashFree(table,NULL);\r
+       }\r
+       //if (name != NULL)\r
+       //{\r
+       //      xmlFree(name);\r
+       //}\r
+       \r
+}\r
+       /**    \r
+       * @test                 UTcxmlIsMixedElementP01\r
+       * @brief                int xmlIsMixedElement (xmlDocPtr doc, const xmlChar * name)\r
+       * @desc                 Positive Test for searching in the DtDs whether an element accept Mixed content (or ANY) basically if it is supposed to accept text childs\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [xmlDtdPtr(dtd) is created with element having name "Id1" and having type = XML_ELEMENT_TYPE_ELEMENT \n, N/A]   @n\r
+       *                       {dtd,"Id1"} => {N/A |1} @n\r
+                                       input2: [N/A, N/A]      @n\r
+                                       {xmlDocPtr(dtd),const xmlChar("hello")} => {N/A |-1}    @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void \r
+UTcxmlIsMixedElementP01()\r
+{\r
+       int ret_val;\r
+       xmlDocPtr doc; /* the document */\r
+       xmlChar * name; /* the element name */\r
+\r
+       xmlElementTablePtr table = xmlHashCreate(0);\r
+       xmlHashAddEntry(table,(xmlChar*)"Id1",NULL);\r
+       doc = xmlNewDoc(BAD_CAST "1.0");\r
+       DTS_CHECK_NE_MESSAGE("UTcxmlIsMixedElementP01", (void *)doc, (void *)NULL, "xmlNewDoc Failed");\r
+       \r
+       xmlDtdPtr dtd = xmlNewDtd(NULL, BAD_CAST "dtd", BAD_CAST"foo", BAD_CAST"bar");\r
+       DTS_CHECK_NE_MESSAGE("UTcxmlIsMixedElementP01", (void *)dtd, (void *)NULL, "xmlNewDtd Failed");\r
+       \r
+       doc->intSubset = dtd;\r
+       name = (xmlChar*)"Id1";\r
+       dtd->elements = table;\r
+       /**\r
+       * @remarks   input1: [xmlDtdPtr(dtd) is created with element having name "Id1" and having type = XML_ELEMENT_TYPE_ELEMENT \n, N/A]      @n\r
+       *                                       {dtd,"Id1"} => {N/A |1} @n\r
+       */\r
+       ret_val = xmlIsMixedElement(doc, (const xmlChar *)name);\r
+       DTS_CHECK_EQ_MESSAGE("UTcxmlIsMixedElementP01", (void *)ret_val, (void *)-1, "xmlIsMixedElement Failed");\r
+       /**\r
+       * @remarks   input2: [N/A, N/A] @n\r
+       *                                       {dtd,"hello"} => {N/A |-1}      @n\r
+       */\r
+       ret_val = xmlIsMixedElement(doc, (const xmlChar *)"hello");\r
+       DTS_CHECK_EQ_MESSAGE("UTcxmlIsMixedElementP01", (void *)ret_val, (void *)-1, "xmlIsMixedElement Failed");\r
+\r
+       dtd->elements = NULL;\r
+       doc->intSubset = NULL;\r
+       if (NULL != table)\r
+       {\r
+               xmlHashFree(table,NULL);\r
+       }\r
+       //if (name != NULL)\r
+       //{\r
+       //      xmlFree(name);\r
+       //}\r
+       if (dtd != NULL)\r
+       {\r
+               xmlFreeDtd(dtd);\r
+       }\r
+       if (doc != NULL)\r
+       {\r
+               xmlFreeDoc(doc);\r
+       }\r
+}\r
+       /**    \r
+       * @test                 UTcxmlDumpAttributeDeclP01\r
+       * @brief                void xmlDumpAttributeDecl (xmlBufferPtr buf, xmlAttributePtr attr)\r
+       * @desc                 Positive Test for dumping the content of the attribute declaration as an XML DTD definition\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Michel Anthony (michelj@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [xmlBufferPtr(buf) is creaetd \n xmlAttributePtr(ret_val) is created with type = XML_ATTRIBUTE_ID and name = "test", N/A]       @n\r
+       *                       {xmlBufferPtr(buf),ret_val} => {N/A | N/A}      @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void \r
+UTcxmlDumpAttributeDeclP01()\r
+{\r
+       /**\r
+       * @remarks   input1: [xmlBufferPtr(buf) is creaetd \n xmlAttributePtr(ret_val) is created with type = XML_ATTRIBUTE_ID and name = "test", N/A]  @n\r
+       *                                       {buf,ret_val} => {N/A | N/A}    @n\r
+       */\r
+#if defined(LIBXML_OUTPUT_ENABLED)\r
+       xmlBufferPtr buf; /* the XML buffer output */\r
+       xmlDtdPtr dtd = xmlNewDtd(NULL, BAD_CAST "dtd", BAD_CAST"foo", BAD_CAST"bar");\r
+       //xmlElementPtr elem = xmlAddElementDecl(NULL, dtd, (const xmlChar *)"test", XML_ELEMENT_TYPE_EMPTY, NULL); /* An element table */\r
+       buf = xmlBufferCreate();\r
+       DTS_CHECK_NE_MESSAGE("UTcxmlDumpAttributeDeclP01", (void *)buf, (void *)-1, "xmlBufferCreate Failed");\r
+\r
+       buf->alloc = XML_BUFFER_ALLOC_EXACT;\r
+       xmlAttributePtr ret_val = (xmlAttributePtr)malloc(sizeof( xmlAttribute));\r
+       DTS_CHECK_NE_MESSAGE("UTcxmlDumpAttributeDeclP01", (void *)ret_val, (void *)NULL, "xmlAttribute Failed");\r
+       \r
+       ret_val->name = (xmlChar *)"test";\r
+       ret_val->elem = NULL;\r
+       ret_val->prefix = NULL;\r
+       ret_val->atype = XML_ATTRIBUTE_ID;\r
+       ret_val->def = XML_ATTRIBUTE_NONE;\r
+       ret_val->defaultValue = NULL;\r
+\r
+       xmlDumpAttributeDecl(buf, ret_val);\r
+       DTS_CHECK_EQ_MESSAGE("UTcxmlDumpAttributeDeclP01", (void *)(strcmp("<!ATTLIST  test ID>\n",(char*)buf->content)), (void *)0, "xmlDumpAttributeDecl Failed");\r
+\r
+       if (dtd != NULL)\r
+       {\r
+               xmlFreeDtd(dtd);\r
+       }\r
+       if (buf != NULL)\r
+       {\r
+               xmlBufferFree(buf);\r
+       }\r
+       if (ret_val != NULL)\r
+       {\r
+               free( ret_val);\r
+       }\r
+       \r
+\r
+#endif\r
+\r
+}\r
+\r
+static void startup( void);\r
+static void cleanup( void);\r
+\r
+void (*tet_startup)( void) = startup;\r
+void (*tet_cleanup)( void) = cleanup;\r
+\r
+static void startup( void)\r
+{\r
+        /* start of TC */\r
+        tet_printf("TC starts.");\r
+}\r
+\r
+static void cleanup( void)\r
+{\r
+        /* end of TC */\r
+        tet_printf("TC ends.");\r
+}\r
+\r
+struct tet_testlist tet_testlist[] = {\r
+       // Handling of out of context errors\r
+       {UTcxmlNewValidCtxtP01,1},\r
+       {UTcxmlFreeValidCtxtP01,2},\r
+       {UTcxmlAddNotationDeclP01,3},\r
+       {UTcxmlCopyNotationTableP01,4},\r
+       {UTcxmlFreeNotationTableP01,5},\r
+       {UTcxmlDumpNotationDeclP01,6},\r
+       {UTcxmlDumpNotationTableP01,7},\r
+       {UTcxmlNewElementContentP01,8},\r
+       {UTcxmlCopyElementContentP01,9},\r
+       {UTcxmlFreeElementContentP01,10},\r
+       \r
+       {UTcxmlSnprintfElementContentP01,11},\r
+       {UTcxmlSprintfElementContentP01,12},\r
+       {UTcxmlAddElementDeclP01,13},\r
+       {UTcxmlCreateEnumerationP01,14},\r
+       {UTcxmlFreeEnumerationP01,15},\r
+       {UTcxmlCopyEnumerationP01,16},\r
+       {UTcxmlAddAttributeDeclP01,17},\r
+       {UTcxmlCopyAttributeTableP01,18},\r
+       {UTcxmlFreeAttributeTableP01,19},\r
+       {UTcxmlAddIDP01,20},\r
+       \r
+       {UTcxmlFreeIDTableP01,21},\r
+       {UTcxmlGetIDP01,22},\r
+       {UTcxmlIsIDP01,23},\r
+       {UTcxmlRemoveIDP01,24},\r
+       {UTcxmlAddRefP01,25},\r
+       {UTcxmlFreeRefTableP01,26},\r
+       {UTcxmlIsRefP01,27},\r
+       {UTcxmlRemoveRefP01,28},\r
+       {UTcxmlGetRefsP01,29},\r
+       {UTcxmlDumpElementTableP01,30},\r
+       \r
+       {UTcxmlDumpAttributeTableP01,31},\r
+       {UTcxmlGetDtdQElementDescP01,32},\r
+       {UTcxmlCopyElementP01,33},\r
+       {UTcxmlDumpElementDeclP01,34},\r
+       {UTcxmlGetDtdElementDesclP01,35},\r
+       {UTcxmlGetDtdQAttrDescP01,36},\r
+       {UTcxmlIsMixedElementP01,37},\r
+       {UTcxmlDumpAttributeDeclP01,38},\r
+       {UTcxmlGetDtdNotationDescP01,39},\r
+       {UTcxmlErrValidP01,40},\r
+\r
+       //{UTcxmlCopyElementTableP01,41},       \r
+       { NULL, 0 },\r
+       \r
+};\r
diff --git a/TC/testcase/utc_libxml_include.h b/TC/testcase/utc_libxml_include.h
new file mode 100755 (executable)
index 0000000..11dc8ee
--- /dev/null
@@ -0,0 +1,320 @@
+\r
+/*\r
+*  libxml test suite\r
+*\r
+* Copyright (c) 2012 Samsung Electronics Co., Ltd. All rights reserved.\r
+*\r
+* Contact: {Maintainer Name} <{Maintainer Email}>\r
+* \r
+* Licensed under the Apache License, Version 2.0 (the "License");\r
+* you may not use this file except in compliance with the License.\r
+* You may obtain a copy of the License at\r
+*\r
+* http://www.apache.org/licenses/LICENSE-2.0\r
+*\r
+* Unless required by applicable law or agreed to in writing, software\r
+* distributed under the License is distributed on an "AS IS" BASIS,\r
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+* See the License for the specific language governing permissions and\r
+* limitations under the License.\r
+*\r
+*/\r
+\r
+#ifndef __UTC_LIBXML_INCLUDE_H__\r
+#define __UTC_LIBXML_INCLUDE_H__\r
+\r
+#include <tet_api.h>\r
+#include <libxml/hash.h>\r
+#include <libxml/HTMLtree.h>\r
+#include <libxml/tree.h>\r
+#include <libxml/encoding.h>\r
+#include <libxml/xmlmemory.h>\r
+\r
+#include <stdlib.h>\r
+#include <string.h>\r
+#include <stdio.h>\r
+#include <stdarg.h>\r
+#include <unistd.h>\r
+#include <errno.h>\r
+#include <assert.h>\r
+\r
+#if 0\r
+void printmsg(char * pFmt, ...)\r
+{\r
+       char in_str[64];\r
+       va_list   ap;\r
+       va_start(ap, pFmt); \r
+       vsnprintf(in_str,64, pFmt, ap);\r
+       tet_printf("%s:%s\n","[TETware]",in_str);\\r
+       \r
+}\r
+\r
+int dts_check_ne(char* apiName, void *actual, void *expected )\r
+{\r
+       if(actual != expected){\r
+               tet_result(TET_PASS);\r
+               return 1;\r
+       }else{\r
+               tet_printf("Testing API %s actual %0x expected %0x " ,apiName, actual, expected);\r
+               tet_result(TET_FAIL);\r
+               return -1;      \r
+       }\r
+}\r
+\r
+int dts_check_ne_message(char* apiName, void *actual, void *expected, char *message )\r
+{\r
+\r
+       if(actual != expected)\r
+       {\r
+               tet_result(TET_PASS);\r
+               return 1;\r
+       }\r
+       else\r
+       {\r
+               tet_printf("Testing API %s actual %0x expected %0x " ,apiName, actual, expected);\r
+               tet_printf("%s: %s" ,apiName, message);\r
+               tet_result(TET_FAIL);\r
+               return -1;\r
+       }\r
+}\r
+\r
+int dts_check_eq(char* apiName, void *actual, void *expected )\r
+{\r
+\r
+       if(actual == expected){\r
+               tet_result(TET_PASS);\r
+               return 1;\r
+       }else{\r
+               tet_printf("Testing API %s actual %0x expected %0x " ,apiName, actual, expected);\r
+               tet_result(TET_FAIL);\r
+               return -1;      \r
+       }\r
+}\r
+\r
+int dts_check_eq_message(char* apiName, void *actual, void *expected, char *message )\r
+{\r
+\r
+       if((int)actual == (int)expected)\r
+       {\r
+               tet_result(TET_PASS);\r
+               return 1;\r
+       }\r
+       else\r
+       {\r
+               tet_printf("Testing API %s actual %0x expected %0x " ,apiName, actual, expected);\r
+               tet_printf("%s: %s" ,apiName, message);\r
+               tet_result(TET_FAIL);\r
+               return -1;\r
+       }\r
+}\r
+\r
+\r
+int dts_check_gt_message(char* apiName, void *actual, void *expected, char *message )\r
+{\r
+\r
+       if((int)actual > (int)expected)\r
+       {\r
+               tet_result(TET_PASS);\r
+               return 1;\r
+       }\r
+       else\r
+       {\r
+               tet_printf("Testing API %s actual %0x expected %0x " ,apiName, actual, expected);\r
+               tet_printf("%s: %s" ,apiName, message);\r
+               tet_result(TET_FAIL);\r
+               return -1;\r
+       }\r
+}\r
+\r
+int dts_check_gte_message(char* apiName, void *actual, void *expected, char *message )\r
+{\r
+\r
+       if((int)actual >= (int)expected)\r
+       {\r
+               tet_result(TET_PASS);\r
+               return 1;\r
+       }\r
+       else\r
+       {\r
+               tet_printf("Testing API %s actual %0x expected %0x " ,apiName, actual, expected);\r
+               tet_printf("%s: %s" ,apiName, message);\r
+               tet_result(TET_FAIL);\r
+               return -1;\r
+       }\r
+}\r
+\r
+int dts_check_lt_message(char* apiName, void *actual, void *expected, char *message )\r
+{\r
+\r
+       if((int)actual < (int)expected)\r
+       {\r
+               tet_result(TET_PASS);\r
+               return 1;\r
+       }\r
+       else\r
+       {\r
+               tet_printf("Testing API %s actual %0x expected %0x " ,apiName, actual, expected);\r
+               tet_printf("%s: %s" ,apiName, message);\r
+               tet_result(TET_FAIL);\r
+               return -1;\r
+       }\r
+}\r
+\r
+int dts_check_lte_message(char* apiName, void *actual, void *expected, char *message )\r
+{\r
+\r
+       if((int)actual <= (int)expected)\r
+       {\r
+               tet_result(TET_PASS);\r
+               return 1;\r
+       }\r
+       else\r
+       {\r
+               tet_printf("Testing API %s actual %0x expected %0x " ,apiName, actual, expected);\r
+               tet_printf("%s: %s" ,apiName, message);\r
+               tet_result(TET_FAIL);\r
+               return -1;\r
+       }\r
+}\r
+\r
+\r
+void dts_assert_message(char* apiName, void *expression, char *message )\r
+{\r
+\r
+       if((int)expression)\r
+       {\r
+               tet_printf("Testing API asserted %s %s" ,apiName, message);\r
+               assert((int)expression);\r
+       }\r
+}\r
+\r
+void dts_message(char* apiName, char *message )\r
+{\r
+       tet_printf("%s: %s" ,apiName, message);\r
+}\r
+\r
+void dts_fail(char* apiName, char *message )\r
+{\r
+       tet_printf("%s: %s" ,apiName, message);\r
+       tet_result(TET_FAIL);\r
+       tet_exit(-1);\r
+}\r
+\r
+void dts_pass(char* apiName, char *message )\r
+{\r
+       tet_printf("%s: %s" ,apiName, message);\r
+       tet_result(TET_PASS);\r
+}\r
+\r
+#define DTS_CHECK_NE(apiname, actual, expected) dts_check_ne(apiname, actual, expected)\r
+\r
+#define DTS_CHECK_NE_MESSAGE(apiname, actual, expected, message) dts_check_ne_message(apiname, actual, expected, message)\r
+\r
+#define DTS_CHECK_EQ(apiname, actual, expected) dts_check_eq(apiname, actual, expected)\r
+\r
+#define DTS_CHECK_EQ_MESSAGE(apiname, actual, expected, message) dts_check_eq_message(apiname, actual, expected, message)\r
+\r
+#define DTS_CHECK_GT_MESSAGE(apiname, actual, expected, message) dts_check_gt_message(apiname, actual, expected, message)\r
+\r
+#define DTS_CHECK_LT_MESSAGE(apiname, actual, expected, message) dts_check_lt_message(apiname, actual, expected, message)\r
+\r
+#define DTS_CHECK_GTE_MESSAGE(apiname, actual, expected, message) dts_check_gte_message(apiname, actual, expected, message)\r
+\r
+#define DTS_CHECK_LTE_MESSAGE(apiname, actual, expected, message) dts_check_lte_message(apiname, actual, expected, message)\r
+\r
+#define DTS_ASSERT_MESSAGE(apiname, expression, message) dts_assert_message(apiname, expression, message)\r
+\r
+\r
+#define DTS_PRINT(apiname, message) dts_message(apiname, message)\r
+\r
+#define DTS_FAIL(apiname, message) dts_fail(apiname, message)\r
+\r
+#define DTS_PASS(apiname, message) dts_pass(apiname, message)\r
+\r
+#else\r
+#define DTS_CHECK_NE(apiname, actual, expected) dts_check_ne(apiname, actual, expected)\r
+#define DTS_CHECK_NE_MESSAGE(apiname, actual, expected, message) dts_check_ne(apiname, actual, expected, message)\r
+\r
+#define DTS_CHECK_EQ(apiname, actual, expected) dts_check_eq(apiname, actual, expected)\r
+\r
+#define DTS_CHECK_EQ_MESSAGE(apiname, actual, expected, message) dts_check_eq(apiname, actual, expected, message)\r
+\r
+#define DTS_CHECK_GT_MESSAGE(apiname, actual, expected, message) dts_check_gt(apiname, actual, expected, message)\r
+\r
+#define DTS_CHECK_LT_MESSAGE(apiname, actual, expected, message) dts_check_lt(apiname, actual, expected, message)\r
+\r
+#define DTS_CHECK_GTE_MESSAGE(apiname, actual, expected, message) dts_check_ge_(apiname, actual, expected, message)\r
+\r
+#define DTS_CHECK_LTE_MESSAGE(apiname, actual, expected, message) dts_check_le(apiname, actual, expected, message)\r
+\r
+#define DTS_ASSERT_MESSAGE(apiname, expression, message) { if(expression) dts_fail(apiname,message);   }\r
+\r
+\r
+#define DTS_PRINT(apiname, message) dts_message(apiname, message)\r
+\r
+#define DTS_FAIL(apiname, message) dts_fail(apiname, message)\r
+\r
+#define DTS_PASS(apiname, message) dts_pass(apiname, message)\r
+\r
+#endif\r
+\r
+#define XML_TRUE 1\r
+#define XML_FALSE 0\r
+\r
+//#define UTSHOME "/HomeExt"\r
+//#define UTSHOME "/home/gopal/git/tet-root-i386/contrib/libxml/res"\r
+#define UTSHOME "./res"\r
+\r
+#define UTSXMLHOME UTSHOME"/UTsXml"\r
+\r
+#define HOMESCHEMA UTSXMLHOME"/valid/schema.xsd"\r
+#define HOMESCHEMAXML UTSXMLHOME"/valid/schema.xml"\r
+\r
+\r
+#define RECxml19980210 UTSXMLHOME"/valid/REC-xml-19980210.xml"\r
+#define TESTRECxml19980210 UTSXMLHOME"/test/valid/REC-xml-19980210.xml"\r
+//#define  HOMERECxml19980210 UTSHOME"/REC-xml-19980210.xml"\r
+#define  HOMERECxml19980210 RECxml19980210\r
+\r
+\r
+#define ENT2 UTSXMLHOME"/valid/ent2"\r
+#define HOMEENT2 UTSHOME"/ent2"\r
+//#define HOMEENT2 ENT2\r
+\r
+\r
+#define TESTXML UTSXMLHOME"/valid/test.xml"\r
+#define TESTXML1 UTSXMLHOME"/test.xml"\r
+\r
+//#define XHTML1STRICTDTD UTSXMLHOME"/valid/xhtml1-strict.dtd"\r
+#define XHTML1STRICTDTD UTSXMLHOME"/test/valid/dtds/xhtml1-strict.dtd"\r
+#define TESTXHTML1STRICTDTD UTSXMLHOME"/test/valid/dtds/xhtml1-strict.dtd"\r
+\r
+//#define HOMEXHTML1STRICTDTD UTSHOME"/xhtml1-strict.dtd"\r
+#define HOMEXHTML1STRICTDTD XHTML1STRICTDTD\r
+\r
+\r
+#define MISSINGXML "missing.xml"\r
+\r
+#define LIBXML2TESTXML UTSXMLHOME"/libXml2Test.xml"\r
+\r
+#define IOTESTTXT      UTSHOME"/IoTest.txt"\r
+#define IOTEST1TXT     UTSHOME"/IoTest1.txt"\r
+\r
+#define        REMOTE1GOOD     "http://localhost/"\r
+#define        REMOTE1BAD      "http:http://http"\r
+#define        REMOTE2GOOD     "ftp://localhost/foo"\r
+\r
+\r
+\r
+const char *gen_fileoutput(int no, int nr ATTRIBUTE_UNUSED) {\r
+    if (no == 0) return(MISSINGXML);\r
+    if (no == 1) return("<foo/>");\r
+    if (no == 2) return(REMOTE2GOOD);\r
+    if (no == 3) return(REMOTE1GOOD);\r
+    if (no == 4) return(REMOTE1BAD);\r
+    return(NULL);\r
+}\r
+\r
+\r
+#endif\r
+\r
diff --git a/TC/testcase/utc_libxml_xpointer.c b/TC/testcase/utc_libxml_xpointer.c
new file mode 100755 (executable)
index 0000000..42bd5f0
--- /dev/null
@@ -0,0 +1,1262 @@
+/*\r
+*  libxml test suite\r
+*\r
+* Copyright (c) 2012 Samsung Electronics Co., Ltd. All rights reserved.\r
+*\r
+* Contact: {Maintainer Name} <{Maintainer Email}>\r
+* \r
+* Licensed under the Apache License, Version 2.0 (the "License");\r
+* you may not use this file except in compliance with the License.\r
+* You may obtain a copy of the License at\r
+*\r
+* http://www.apache.org/licenses/LICENSE-2.0\r
+*\r
+* Unless required by applicable law or agreed to in writing, software\r
+* distributed under the License is distributed on an "AS IS" BASIS,\r
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+* See the License for the specific language governing permissions and\r
+* limitations under the License.\r
+*\r
+*/ \r
+#include "utc_libxml_include.h"\r
+\r
+#include <libxml/xmlmemory.h>\r
+#include <libxml/xpointer.h>\r
+#include <libxml/xpath.h>\r
+#include <libxml/xmlwriter.h>\r
+#include <libxml/xmlreader.h>\r
+#include <libxml/xpathInternals.h>\r
+\r
+\r
+\r
+/***************************************************************************\r
+* SUTsXmlWriter\r
+***************************************************************************/\r
+#define MY_ENCODING "ISO-8859-1"\r
+\r
+#define        OUTFILE1        UTSHOME"/writer1.res"\r
+#define        OUTFILE2        UTSHOME"/missing.xml"\r
+#define        OUTFILE3        UTSHOME"/test.out"\r
+\r
+\r
+\r
+static xmlDocPtr api_doc = NULL;\r
+static xmlDtdPtr api_dtd = NULL;\r
+static xmlNodePtr api_root = NULL;\r
+static xmlAttrPtr api_attr = NULL;\r
+static xmlNsPtr api_ns = NULL;\r
+\r
+static void\r
+free_api_doc(void) {\r
+    xmlFreeDoc(api_doc);\r
+    api_doc = NULL;\r
+    api_dtd = NULL;\r
+    api_root = NULL;\r
+    api_attr = NULL;\r
+    api_ns = NULL;\r
+}\r
+\r
+static xmlDocPtr\r
+get_api_doc(void) {\r
+    if (api_doc == NULL) {\r
+        api_doc = xmlReadMemory("<!DOCTYPE root [<!ELEMENT root EMPTY>]><root xmlns:h='http://example.com/' h:foo='bar'/>", 88, "root_test", NULL, 0);\r
+       api_root = NULL;\r
+       api_attr = NULL;\r
+    }\r
+    return(api_doc);\r
+}\r
+\r
+static xmlNodePtr\r
+get_api_root(void) {\r
+    if ((api_root == NULL) || (api_root->type != XML_ELEMENT_NODE)) {\r
+        get_api_doc();\r
+       if ((api_doc != NULL) && (api_doc->children != NULL) &&\r
+           (api_doc->children->next != NULL) &&\r
+           (api_doc->children->next->type == XML_ELEMENT_NODE))\r
+           api_root = api_doc->children->next;\r
+    }\r
+    return(api_root);\r
+}\r
+#if 0\r
+#define gen_nb_xmlOutputBufferPtr 1\r
+static xmlOutputBufferPtr gen_xmlOutputBufferPtr(int no, int nr ATTRIBUTE_UNUSED) {\r
+    if (no == 0) return(xmlOutputBufferCreateFilename(OUTFILE3, NULL, 0));\r
+    return(NULL);\r
+}\r
+static void des_xmlOutputBufferPtr(int no ATTRIBUTE_UNUSED, xmlOutputBufferPtr val, int nr ATTRIBUTE_UNUSED) {\r
+    if (val != NULL) {\r
+        xmlOutputBufferClose(val);\r
+    }\r
+}\r
+static void desret_xmlTextWriterPtr(xmlTextWriterPtr val) {\r
+    xmlFreeTextWriter(val);\r
+}\r
+#endif\r
+\r
+#define gen_nb_int 1\r
+\r
+static int gen_int(int no, int nr ATTRIBUTE_UNUSED) {\r
+    if (no == 0) return(0);\r
+    if (no == 1) return(1);\r
+    if (no == 2) return(-1);\r
+    if (no == 3) return(122);\r
+    return(-1);\r
+}\r
+\r
+static void des_int(int no ATTRIBUTE_UNUSED, int val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+}\r
+#if 0\r
+#define gen_nb_xmlBufferPtr 1\r
+\r
+static const char *static_buf_content = "a static buffer";\r
+static xmlBufferPtr gen_xmlBufferPtr(int no, int nr ATTRIBUTE_UNUSED) {\r
+    if (no == 0) return(xmlBufferCreate());\r
+    if (no == 1) return(xmlBufferCreateStatic((void *)static_buf_content, 13));\r
+    return(NULL);\r
+}\r
+static void des_xmlBufferPtr(int no ATTRIBUTE_UNUSED, xmlBufferPtr val, int nr ATTRIBUTE_UNUSED) {\r
+    if (val != NULL) {\r
+        xmlBufferFree(val);\r
+    }\r
+}\r
+#define gen_nb_xmlParserCtxtPtr 1\r
+static xmlParserCtxtPtr gen_xmlParserCtxtPtr(int no, int nr ATTRIBUTE_UNUSED) {\r
+    if (no == 0) return(xmlNewParserCtxt());\r
+    //if (no == 1) return(xmlCreateMemoryParserCtxt("<doc/>", 6));\r
+    return(NULL);\r
+}\r
+static void des_xmlParserCtxtPtr(int no ATTRIBUTE_UNUSED, xmlParserCtxtPtr val, int nr ATTRIBUTE_UNUSED) {\r
+    if (val != NULL)\r
+        xmlFreeParserCtxt(val);\r
+}\r
+#define gen_nb_const_char_ptr 2\r
+static char *gen_const_char_ptr(int no, int nr ATTRIBUTE_UNUSED) {\r
+    if (no == 0) return((char *) "foo");\r
+    if (no == 1) return((char *) "<foo/>");\r
+    if (no == 2) return((char *) "test/ent2");\r
+    return(NULL);\r
+}\r
+static void des_const_char_ptr(int no ATTRIBUTE_UNUSED, const char *val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+}\r
+\r
+static void desret_xmlParserCtxtPtr(xmlParserCtxtPtr val) {\r
+    xmlFreeParserCtxt(val);\r
+}\r
+#endif\r
+\r
+#define gen_nb_xmlNodePtr 2\r
+static xmlNodePtr gen_xmlNodePtr(int no, int nr ATTRIBUTE_UNUSED) {\r
+    if (no == 0) return(xmlNewPI(BAD_CAST "test", NULL));\r
+    if (no == 1) return(get_api_root());\r
+    return(NULL);\r
+/*     if (no == 2) return((xmlNodePtr) get_api_doc()); */\r
+}\r
+\r
+static void des_xmlNodePtr(int no, xmlNodePtr val, int nr ATTRIBUTE_UNUSED) {\r
+    if (no == 1) {\r
+        free_api_doc();\r
+    } else if (val != NULL) {\r
+        xmlUnlinkNode(val);\r
+        xmlFreeNode(val);\r
+    }\r
+}\r
+\r
+#define gen_nb_xmlDocPtr 1\r
+static xmlDocPtr gen_xmlDocPtr(int no, int nr ATTRIBUTE_UNUSED) {\r
+    if (no == 0) return(xmlNewDoc(BAD_CAST "1.0"));\r
+    if (no == 1) return(xmlReadMemory("<foo/>", 6, "test", NULL, 0));\r
+    if (no == 2) return(xmlReadMemory("<!DOCTYPE foo []> <foo/>", 24, "test", NULL, 0));\r
+    return(NULL);\r
+}\r
+#if 0\r
+static void des_xmlDocPtr(int no ATTRIBUTE_UNUSED, xmlDocPtr val, int nr ATTRIBUTE_UNUSED) {\r
+    if ((val != NULL) && (val != api_doc) && (val->doc != api_doc))\r
+        xmlFreeDoc(val);\r
+}\r
+#define gen_nb_xmlTextWriterPtr 1\r
+static xmlTextWriterPtr gen_xmlTextWriterPtr(int no, int nr ATTRIBUTE_UNUSED) {\r
+    if (no == 0) return(xmlNewTextWriterFilename(OUTFILE3, 0));\r
+    return(NULL);\r
+}\r
+static void des_xmlTextWriterPtr(int no ATTRIBUTE_UNUSED, xmlTextWriterPtr val, int nr ATTRIBUTE_UNUSED) {\r
+    if (val != NULL) xmlFreeTextWriter(val);\r
+}\r
+\r
+static void desret_int(int val ATTRIBUTE_UNUSED) {\r
+}\r
+#endif\r
+#define gen_nb_const_xmlChar_ptr_ptr 1\r
+#define gen_nb_xmlLocationSetPtr 1\r
+#if 0\r
+static xmlChar ** gen_const_xmlChar_ptr_ptr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+    return(NULL);\r
+}\r
+static void des_const_xmlChar_ptr_ptr(int no ATTRIBUTE_UNUSED, const xmlChar ** val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+}\r
+\r
+#define gen_nb_const_xmlChar_ptr 1\r
+\r
+static xmlChar *gen_const_xmlChar_ptr(int no, int nr ATTRIBUTE_UNUSED) {\r
+    if (no == 0) return((xmlChar *) "foo");\r
+    if (no == 1) return((xmlChar *) "<foo/>");\r
+    if (no == 2) return((xmlChar *) "n?e");\r
+    if (no == 3) return((xmlChar *) " 2ab ");\r
+    return(NULL);\r
+}\r
+static void des_const_xmlChar_ptr(int no ATTRIBUTE_UNUSED, const xmlChar *val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED) {\r
+}\r
+#endif\r
+static int call_tests = 0;\r
+static int function_tests = 0;\r
+#define gen_nb_xmlXPathObjectPtr 5\r
+#define gen_nb_xmlXPathParserContextPtr 1\r
+\r
+static void des_xmlXPathObjectPtr(int no ATTRIBUTE_UNUSED, xmlXPathObjectPtr val, int nr ATTRIBUTE_UNUSED)\r
+{\r
+    if (val != NULL)\r
+    {\r
+        xmlXPathFreeObject(val);\r
+    }\r
+}\r
+\r
+static void desret_xmlNodePtr(xmlNodePtr val)\r
+{\r
+    if ((val != NULL) && (val != api_root) && (val != (xmlNodePtr) api_doc))\r
+    {\r
+      xmlUnlinkNode(val);\r
+      xmlFreeNode(val);\r
+    }\r
+}\r
+\r
+static xmlXPathObjectPtr gen_xmlXPathObjectPtr(int no, int nr ATTRIBUTE_UNUSED)\r
+{\r
+    if (no == 0) return(xmlXPathNewString(BAD_CAST "string object"));\r
+    if (no == 1) return(xmlXPathNewFloat(1.1));\r
+    if (no == 2) return(xmlXPathNewBoolean(1));\r
+    if (no == 3) return(xmlXPathNewNodeSet(NULL));\r
+    if (no == 4)\r
+    {\r
+       xmlDocPtr doc = gen_xmlDocPtr(1, 1);\r
+\r
+       return(xmlXPathNewNodeSet(xmlDocGetRootElement(doc)));\r
+    }\r
+    return(NULL);\r
+}\r
+\r
+static xmlXPathParserContextPtr gen_xmlXPathParserContextPtr(int no , int nr ATTRIBUTE_UNUSED)\r
+{\r
+       const xmlChar *str = (const xmlChar *)"checked";//ATTRIBUTE_UNUSED\r
+       xmlDocPtr doc = gen_xmlDocPtr(1, 1);\r
+       xmlNodePtr here = gen_xmlNodePtr(1, 2);\r
+       xmlNodePtr origin = gen_xmlNodePtr(1, 3);\r
+\r
+       if(no == 0)\r
+               return(NULL);\r
+       else if(no == 1)\r
+               return(xmlXPathNewParserContext(str, xmlXPtrNewContext(doc, here, origin)));\r
+\r
+       return(NULL);\r
+\r
+}\r
+\r
+static void des_xmlXPathParserContextPtr(int no ATTRIBUTE_UNUSED, xmlXPathParserContextPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED)\r
+{\r
+\r
+}\r
+       /**    \r
+       * @test                 UTcxmlXPtrBuildNodeListP01\r
+       * @brief                xmlNodePtr xmlXPtrBuildNodeList(xmlXPathObjectPtr obj)\r
+       * @desc                 Positive and negetive Test for xmlXPtrBuildNodeList\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Sathish Kumar (satish.k4@samsung.com)\r
+       * @return               xmlNodePtr\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlXPathObjectPtr(obj)} => {N/A | xmlXPathObjectPtr(!=NULL)} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlXPtrBuildNodeListP01()\r
+{\r
+#if defined(LIBXML_XPTR_ENABLED)\r
+    xmlNodePtr ret_val;\r
+    xmlXPathObjectPtr obj; /* the XPointer result from the evaluation. */\r
+    int n_obj;\r
+\r
+    for (n_obj = 0;n_obj < gen_nb_xmlXPathObjectPtr;n_obj++) {\r
+        obj = gen_xmlXPathObjectPtr(n_obj, 0);\r
+\r
+        if(n_obj <= 3)// -ve case\r
+        {\r
+               ret_val = xmlXPtrBuildNodeList(obj);\r
+               DTS_CHECK_EQ_MESSAGE("xmlXPtrBuildNodeList", (void *)ret_val, (void *)(NULL), "xmlXPtrBuildNodeList Failed");\r
+        }\r
+        else if(n_obj > 3)// +ve case\r
+        {\r
+               ret_val = xmlXPtrBuildNodeList(obj);\r
+               DTS_CHECK_NE_MESSAGE("xmlXPtrBuildNodeList", (void *)ret_val, (void *)(NULL), "xmlXPtrBuildNodeList Failed");\r
+        }\r
+\r
+        desret_xmlNodePtr(ret_val);\r
+        call_tests++;\r
+        des_xmlXPathObjectPtr(n_obj, obj, 0);\r
+        xmlResetLastError();\r
+    }\r
+#endif\r
+}\r
+       /**\r
+       * @test                 UTcxmlXPtrEvalRangePredicateP01\r
+       * @brief                void xmlXPtrEvalRangePredicate(xmlXPathParserContextPtr ctxt)\r
+       * @desc                 Positive and negetive Test for xmlXPtrEvalRangePredicate\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Sathish Kumar (satish.k4@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlXPathParserContextPtr(ctxt)} => {N/A | xmlXPathParserContextPtr(!=NULL)} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlXPtrEvalRangePredicateP01()\r
+{\r
+#if defined(LIBXML_XPTR_ENABLED)\r
+    xmlXPathParserContextPtr ctxt; /* the XPointer Parser context */\r
+    int n_ctxt;\r
+\r
+    for (n_ctxt = 0;n_ctxt < (gen_nb_xmlXPathParserContextPtr + 1);n_ctxt++) {\r
+        ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);\r
+\r
+        xmlXPtrEvalRangePredicate(ctxt);\r
+        if(ctxt == NULL)// -ve case\r
+        {\r
+               DTS_CHECK_EQ_MESSAGE("xmlXPtrEvalRangePredicate", (void *)ctxt, (void *)(NULL), "xmlXPtrEvalRangePredicate Failed");\r
+\r
+        }\r
+        else if(ctxt != NULL)// +ve case\r
+        {\r
+               DTS_CHECK_NE_MESSAGE("xmlXPtrEvalRangePredicate", (void *)ctxt, (void *)(NULL), "xmlXPtrEvalRangePredicate Failed");\r
+        }\r
+\r
+        call_tests++;\r
+        des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);\r
+        xmlResetLastError();\r
+    }\r
+    function_tests++;\r
+#endif\r
+}\r
+\r
+static void des_xmlLocationSetPtr(int no ATTRIBUTE_UNUSED, xmlLocationSetPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED)\r
+{\r
+\r
+}\r
+\r
+static xmlLocationSetPtr gen_xmlLocationSetPtr(int no, int nr ATTRIBUTE_UNUSED)\r
+{\r
+       if(no == 1)\r
+               return(xmlXPtrLocationSetCreate(gen_xmlXPathObjectPtr(4, 1)));\r
+       else\r
+               return(NULL);\r
+}\r
+       /**\r
+       * @test                 UTcxmlXPtrLocationSetAddP01\r
+       * @brief                void xmlXPtrLocationSetAdd(xmlLocationSetPtr cur, xmlXPathObjectPtr val)\r
+       * @desc                 Positive and neg Test for xmlXPtrLocationSetAdd\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Sathish Kumar (satish.k4@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlLocationSetPtr(cur), xmlXPathObjectPtr(val)} => {N/A | xmlLocationSetPtr(!=NULL), xmlXPathObjectPtr(!=NULL)} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlXPtrLocationSetAddP01()\r
+{\r
+#if defined(LIBXML_XPTR_ENABLED)\r
+    xmlLocationSetPtr cur; /* the initial range set */\r
+    int n_cur;\r
+    xmlXPathObjectPtr val; /* a new xmlXPathObjectPtr */\r
+    int n_val;\r
+\r
+    for (n_cur = 0;n_cur < (gen_nb_xmlLocationSetPtr + 1);n_cur++) {\r
+    for (n_val = 0;n_val < gen_nb_xmlXPathObjectPtr;n_val++) {\r
+        cur = gen_xmlLocationSetPtr(n_cur, 0);\r
+        val = gen_xmlXPathObjectPtr(n_val, 1);\r
+        xmlXPtrLocationSetAdd(cur, val);\r
+\r
+        if((n_val == 4) && (n_cur == 1))//+ve case\r
+        {\r
+               DTS_CHECK_NE_MESSAGE("xmlXPtrLocationSetAdd", (void *)cur, (void *)(NULL), "xmlXPtrLocationSetAdd Failed");\r
+               DTS_CHECK_NE_MESSAGE("xmlXPtrLocationSetAdd", (void *)val, (void *)(NULL), "xmlXPtrLocationSetAdd Failed");\r
+        }\r
+        if(n_cur != 1)//-ve case\r
+        {\r
+               DTS_CHECK_EQ_MESSAGE("xmlXPtrLocationSetAdd", (void *)cur, (void *)(NULL), "xmlXPtrLocationSetAdd Failed");\r
+        }\r
+        if(n_val != 4)//-ve case\r
+        {\r
+               DTS_CHECK_NE_MESSAGE("xmlXPtrLocationSetAdd", (void *)val, (void *)(NULL), "xmlXPtrLocationSetAdd Failed");\r
+        }\r
+\r
+        call_tests++;\r
+        des_xmlLocationSetPtr(n_cur, cur, 0);\r
+        des_xmlXPathObjectPtr(n_val, val, 1);\r
+        xmlResetLastError();\r
+    }\r
+    }\r
+       val = NULL;\r
+       xmlXPtrLocationSetAdd(cur, val);\r
+       if(val == NULL)//-ve case\r
+       {\r
+               DTS_CHECK_EQ_MESSAGE("xmlXPtrLocationSetAdd", (void *)val, (void *)(NULL), "xmlXPtrLocationSetAdd Failed");\r
+       }\r
+\r
+    function_tests++;\r
+#endif\r
+}\r
+       /**\r
+       * @test                 UTcxmlXPtrLocationSetCreateP01\r
+       * @brief                xmlLocationSetPtr xmlXPtrLocationSetCreate(xmlXPathObjectPtr val)\r
+       * @desc                 Positive and neg Test for xmlXPtrLocationSetCreate\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Sathish Kumar (satish.k4@samsung.com)\r
+       * @return               xmlLocationSetPtr\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlXPathObjectPtr(val)} => {N/A | xmlXPathObjectPtr(!=NULL)} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlXPtrLocationSetCreateP01()\r
+{\r
+    xmlXPathObjectPtr list;\r
+    xmlLocationSetPtr ret_val;\r
+    int n_list = 1;\r
+\r
+       list = gen_xmlXPathObjectPtr(n_list, 0);\r
+\r
+       ret_val = xmlXPtrLocationSetCreate(list);\r
+       if(ret_val != NULL)//+ve case\r
+        {\r
+               DTS_CHECK_NE_MESSAGE("xmlXPtrLocationSetCreate", (void *)ret_val, (void *)(NULL), "xmlXPtrLocationSetCreate Failed");\r
+        }\r
+       else//-ve case\r
+        {\r
+               DTS_CHECK_EQ_MESSAGE("xmlXPtrLocationSetCreate", (void *)ret_val, (void *)(NULL), "xmlXPtrLocationSetCreate Failed");\r
+        }\r
+}\r
+       /**\r
+       * @test                 UTcxmlXPtrLocationSetDelP01\r
+       * @brief        void xmlXPtrLocationSetDel(xmlLocationSetPtr cur, xmlXPathObjectPtr val)\r
+       * @desc                 Positive and neg Test for xmlXPtrLocationSetDel\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Sathish Kumar (satish.k4@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlLocationSetPtr(cur), xmlXPathObjectPtr(val)} => {N/A | xmlLocationSetPtr(!=NULL), xmlXPathObjectPtr(!=NULL)} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlXPtrLocationSetDelP01()\r
+{\r
+#if defined(LIBXML_XPTR_ENABLED)\r
+    xmlLocationSetPtr cur; /* the initial range set */\r
+    int n_cur;\r
+    xmlXPathObjectPtr val; /* an xmlXPathObjectPtr */\r
+    int n_val;\r
+\r
+    for (n_cur = 0;n_cur < (gen_nb_xmlLocationSetPtr + 1);n_cur++) {\r
+    for (n_val = 0;n_val < gen_nb_xmlXPathObjectPtr;n_val++) {\r
+        cur = gen_xmlLocationSetPtr(n_cur, 0);//n_cur\r
+        val = gen_xmlXPathObjectPtr(n_val, 1);\r
+\r
+        xmlXPtrLocationSetDel(cur, val);\r
+        if(n_cur == 1)//+ve case\r
+        {\r
+               int ret = ((NULL != cur) && (NULL != val));\r
+               DTS_CHECK_EQ_MESSAGE("xmlXPtrLocationSetDel", (void *)ret, (void *)(1), "xmlXPtrLocationSetDel 1 Failed");\r
+        }\r
+\r
+        call_tests++;\r
+        des_xmlLocationSetPtr(n_cur, cur, 0);\r
+        des_xmlXPathObjectPtr(n_val, val, 1);\r
+        xmlResetLastError();\r
+    }\r
+    }\r
+    cur = NULL;\r
+    xmlXPtrLocationSetDel(cur, val);\r
+    if(cur == NULL)//-ve case\r
+        {\r
+               DTS_CHECK_EQ_MESSAGE("xmlXPtrLocationSetDel", (void *)cur, (void *)(NULL), "xmlXPtrLocationSetDel 2 Failed");\r
+        }\r
+\r
+    val = NULL;\r
+    xmlXPtrLocationSetDel(cur, val);\r
+    if(val == NULL)//-ve case\r
+        {\r
+               DTS_CHECK_EQ_MESSAGE("xmlXPtrLocationSetDel", (void *)val, (void *)(NULL), "xmlXPtrLocationSetDel 3 Failed");\r
+        }\r
+\r
+    function_tests++;\r
+#endif\r
+}\r
+       /**\r
+       * @test                 UTcxmlXPtrLocationSetMergeP01\r
+       * @brief                xmlLocationSetPtr xmlXPtrLocationSetMerge(xmlLocationSetPtr val1, xmlLocationSetPtr val2)\r
+       * @desc                 Positive and neg Test for xmlXPtrLocationSetMerge\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Sathish Kumar (satish.k4@samsung.com)\r
+       * @return               xmlLocationSetPtr\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlLocationSetPtr(val1), xmlLocationSetPtr(val2)} => {N/A | xmlLocationSetPtr(!=NULL), xmlLocationSetPtr(!=NULL)} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlXPtrLocationSetMergeP01()\r
+{\r
+       xmlLocationSetPtr val1, val2;\r
+       xmlLocationSetPtr ret_val;\r
+       int n_cur1 = 1;\r
+       int n_cur2 = 2;\r
+\r
+       val1 = gen_xmlLocationSetPtr(n_cur1, 0);\r
+       val2 = gen_xmlLocationSetPtr(n_cur2, 1);\r
+\r
+       ret_val = xmlXPtrLocationSetMerge(val1, val2);\r
+       if(ret_val == val1)//+ve case\r
+        {\r
+               DTS_CHECK_EQ_MESSAGE("xmlXPtrLocationSetMerge", (void *)ret_val, (void *)(val1), "xmlXPtrLocationSetMerge Failed");\r
+        }\r
+       else//-ve case\r
+        {\r
+               DTS_CHECK_NE_MESSAGE("xmlXPtrLocationSetMerge", (void *)ret_val, (void *)(val1), "xmlXPtrLocationSetMerge Failed");\r
+        }\r
+\r
+       ret_val = xmlXPtrLocationSetMerge(NULL, val2);\r
+       if(ret_val == NULL)//-ve case\r
+        {\r
+               DTS_CHECK_EQ_MESSAGE("xmlXPtrLocationSetMerge", (void *)ret_val, (void *)(NULL), "xmlXPtrLocationSetMerge Failed");\r
+        }\r
+\r
+       ret_val = xmlXPtrLocationSetMerge(val1, NULL);\r
+       if(ret_val == val1)//-ve case\r
+        {\r
+               DTS_CHECK_EQ_MESSAGE("xmlXPtrLocationSetMerge", (void *)ret_val, (void *)(val1), "xmlXPtrLocationSetMerge Failed");\r
+        }\r
+}\r
+       /**\r
+       * @test                 UTcxmlXPtrLocationSetRemoveP01\r
+       * @brief                void xmlXPtrLocationSetRemove(xmlLocationSetPtr cur, int val)\r
+       * @desc                 Positive Test for xmlNewTextWriter\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Sathish Kumar (satish.k4@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlLocationSetPtr(cur), int(val)} => {N/A | xmlLocationSetPtr(!=NULL), val(valid)} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlXPtrLocationSetRemoveP01()\r
+{\r
+#if defined(LIBXML_XPTR_ENABLED)\r
+    xmlLocationSetPtr cur; /* the initial range set */\r
+    int n_cur;\r
+    int val; /* the index to remove */\r
+    int n_val;\r
+\r
+    for (n_cur = 0;n_cur < gen_nb_xmlLocationSetPtr;n_cur++) {\r
+    for (n_val = 0;n_val < gen_nb_int;n_val++) {\r
+        cur = gen_xmlLocationSetPtr(n_cur, 0);\r
+        val = gen_int(n_val, 1);\r
+\r
+        xmlXPtrLocationSetRemove(cur, val);\r
+        if(cur != NULL)\r
+        {\r
+               DTS_CHECK_NE_MESSAGE("xmlXPtrLocationSetRemove", (void *)cur, (void *)(NULL), "xmlXPtrLocationSetRemove Failed");\r
+        }\r
+        else if(cur == NULL)\r
+        {\r
+               DTS_CHECK_EQ_MESSAGE("xmlXPtrLocationSetRemove", (void *)cur, (void *)(NULL), "xmlXPtrLocationSetRemove Failed");\r
+        }\r
+\r
+        call_tests++;\r
+        des_xmlLocationSetPtr(n_cur, cur, 0);\r
+        des_int(n_val, val, 1);\r
+        xmlResetLastError();\r
+    }\r
+    }\r
+    function_tests++;\r
+#endif\r
+}\r
+\r
+static void desret_xmlXPathObjectPtr(xmlXPathObjectPtr val)\r
+{\r
+    xmlXPathFreeObject(val);\r
+}\r
+       /**\r
+       * @test                 UTcxmlXPtrNewCollapsedRangeP01\r
+       * @brief                xmlXPathObjectPtr xmlXPtrNewCollapsedRange(xmlNodePtr start)\r
+       * @desc                 Positive Test for xmlNewTextWriter\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Sathish Kumar (satish.k4@samsung.com)\r
+       * @return               xmlXPathObjectPtr\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlNodePtr(start)} => {N/A | xmlNodePtr(!=NULL)} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlXPtrNewCollapsedRangeP01()\r
+{\r
+#if defined(LIBXML_XPTR_ENABLED)\r
+    xmlXPathObjectPtr ret_val;\r
+    xmlNodePtr start; /* the starting and ending node */\r
+    int n_start;\r
+\r
+    for (n_start = 0;n_start < gen_nb_xmlNodePtr;n_start++) {\r
+        start = gen_xmlNodePtr(n_start, 0);\r
+\r
+        ret_val = xmlXPtrNewCollapsedRange(start);\r
+\r
+        if(ret_val == NULL)\r
+        {\r
+               DTS_CHECK_EQ_MESSAGE("xmlXPtrNewCollapsedRange", (void *)ret_val, (void *)(NULL), "xmlXPtrNewCollapsedRange Failed");\r
+        }\r
+        else\r
+        {\r
+               DTS_CHECK_NE_MESSAGE("xmlXPtrNewCollapsedRange", (void *)ret_val, (void *)(NULL), "xmlXPtrNewCollapsedRange Failed");\r
+        }\r
+\r
+        ret_val = xmlXPtrNewCollapsedRange(NULL);\r
+\r
+        desret_xmlXPathObjectPtr(ret_val);\r
+        call_tests++;\r
+        des_xmlNodePtr(n_start, start, 0);\r
+        xmlResetLastError();\r
+    }\r
+    ret_val = xmlXPtrNewCollapsedRange(NULL);\r
+    if(ret_val == NULL)\r
+        {\r
+               DTS_CHECK_EQ_MESSAGE("xmlXPtrNewCollapsedRange", (void *)ret_val, (void *)(NULL), "xmlXPtrNewCollapsedRange Failed");\r
+        }\r
+    function_tests++;\r
+#endif\r
+}\r
+       /**\r
+       * @test                 UTcxmlXPtrNewContextP01\r
+       * @brief                xmlXPathContextPtr xmlXPtrNewContext(xmlDocPtr doc, xmlNodePtr here, xmlNodePtr origin)\r
+       * @desc                 Positive and neg Test for xmlXPtrNewContext\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Sathish Kumar (satish.k4@samsung.com)\r
+       * @return               xmlXPathContextPtr\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlDocPtr(doc), xmlNodePtr(here), xmlNodePtr(origin)} => {N/A | xmlDocPtr(!=NULL), xmlNodePtr(!=NULL), xmlNodePtr(!=NULL)} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlXPtrNewContextP01()\r
+{\r
+       xmlXPathContextPtr ret_val;\r
+       xmlDocPtr doc;\r
+       xmlNodePtr here;\r
+       xmlNodePtr origin;\r
+       int n_cur = 1;\r
+\r
+       doc = gen_xmlDocPtr(n_cur, 1);\r
+       here = gen_xmlNodePtr(n_cur, 2);\r
+       origin = gen_xmlNodePtr(n_cur, 3);\r
+\r
+       ret_val = xmlXPtrNewContext(doc, here, origin);\r
+       if(ret_val != NULL)\r
+        {\r
+               DTS_CHECK_NE_MESSAGE("xmlXPtrNewCollapsedRange", (void *)ret_val, (void *)(NULL), "xmlXPtrNewCollapsedRange Failed");\r
+        }\r
+}\r
+\r
+static void des_xmlNodeSetPtr(int no ATTRIBUTE_UNUSED, xmlNodeSetPtr val ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED)\r
+{\r
+\r
+}\r
+\r
+#define gen_nb_xmlNodeSetPtr 1\r
+\r
+static xmlNodeSetPtr gen_xmlNodeSetPtr(int no ATTRIBUTE_UNUSED, int nr ATTRIBUTE_UNUSED)\r
+{\r
+    return(NULL);\r
+}\r
+       /**\r
+       * @test                 UTcxmlXPtrNewLocationSetNodeSetP01\r
+       * @brief                xmlXPathObjectPtr xmlXPtrNewLocationSetNodeSet(xmlNodeSetPtr set)\r
+       * @desc                 Positive and neg Test for xmlXPtrNewLocationSetNodeSet\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Sathish Kumar (satish.k4@samsung.com)\r
+       * @return               xmlXPathObjectPtr\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlNodeSetPtr(set)} => {N/A | xmlNodeSetPtr(!=NULL)} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlXPtrNewLocationSetNodeSetP01()\r
+{\r
+#if defined(LIBXML_XPTR_ENABLED)\r
+    xmlXPathObjectPtr ret_val;\r
+    xmlNodeSetPtr set; /* a node set */\r
+    int n_set;\r
+\r
+    for (n_set = 0;n_set < gen_nb_xmlNodeSetPtr;n_set++) {\r
+        set = gen_xmlNodeSetPtr(n_set, 0);\r
+\r
+        ret_val = xmlXPtrNewLocationSetNodeSet(set);\r
+\r
+        if(ret_val != NULL)\r
+        {\r
+               DTS_CHECK_NE_MESSAGE("xmlXPtrNewLocationSetNodeSet", (void *)ret_val, (void *)(NULL), "xmlXPtrNewLocationSetNodeSet Failed");\r
+        }\r
+        else\r
+        {\r
+               DTS_CHECK_EQ_MESSAGE("xmlXPtrNewLocationSetNodeSet", (void *)ret_val, (void *)(NULL), "xmlXPtrNewLocationSetNodeSet Failed");\r
+        }\r
+\r
+        desret_xmlXPathObjectPtr(ret_val);\r
+        call_tests++;\r
+        des_xmlNodeSetPtr(n_set, set, 0);\r
+        xmlResetLastError();\r
+    }\r
+    function_tests++;\r
+#endif\r
+}\r
+       /**\r
+       * @test                 UTcxmlXPtrNewLocationSetNodesP01\r
+       * @brief                xmlXPathObjectPtr xmlXPtrNewLocationSetNodes(xmlNodePtr start, xmlNodePtr end)\r
+       * @desc                 Positive and neg Test for xmlXPtrNewLocationSetNodes\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Sathish Kumar (satish.k4@samsung.com)\r
+       * @return               xmlXPathObjectPtr\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlNodePtr(start), xmlNodePtr(end)} => {N/A | xmlNodePtr(!=NULL), xmlNodePtr(!=NULL)} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlXPtrNewLocationSetNodesP01()\r
+{\r
+#if defined(LIBXML_XPTR_ENABLED)\r
+    xmlXPathObjectPtr ret_val;\r
+    xmlNodeSetPtr set; /* a node set */\r
+    int n_set;\r
+\r
+    for (n_set = 0;n_set < gen_nb_xmlNodeSetPtr;n_set++) {\r
+        set = gen_xmlNodeSetPtr(n_set, 0);\r
+\r
+        ret_val = xmlXPtrNewLocationSetNodeSet(set);\r
+        if(ret_val == NULL)\r
+        {\r
+               DTS_CHECK_EQ_MESSAGE("xmlXPtrNewLocationSetNodeSet", (void *)ret_val, (void *)(NULL), "xmlXPtrNewLocationSetNodeSet Failed");\r
+        }\r
+        else\r
+        {\r
+               DTS_CHECK_NE_MESSAGE("xmlXPtrNewLocationSetNodeSet", (void *)ret_val, (void *)(NULL), "xmlXPtrNewLocationSetNodeSet Failed");\r
+        }\r
+\r
+        desret_xmlXPathObjectPtr(ret_val);\r
+        call_tests++;\r
+        des_xmlNodeSetPtr(n_set, set, 0);\r
+        xmlResetLastError();\r
+    }\r
+    function_tests++;\r
+#endif\r
+}\r
+       /**\r
+       * @test                 UTcxmlXPtrNewRangeP01\r
+       * @brief                xmlXPathObjectPtr xmlXPtrNewRange(xmlNodePtr start, int startindex,\r
+                       xmlNodePtr end, int endindex)\r
+       * @desc                 Positive and neg Test for xmlXPtrNewRange\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Sathish Kumar (satish.k4@samsung.com)\r
+       * @return               xmlXPathObjectPtr\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlNodePtr(start), int(startindex), xmlNodePtr(end), int(endindex)} => {N/A | xmlNodePtr(!=NULL), xmlNodePtr(!=NULL)} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlXPtrNewRangeP01()\r
+{\r
+#if defined(LIBXML_XPTR_ENABLED)\r
+    xmlXPathObjectPtr ret_val;\r
+    xmlNodePtr start; /* the starting node */\r
+    int n_start;\r
+    int startindex; /* the start index */\r
+    int n_startindex;\r
+    xmlNodePtr end; /* the ending point */\r
+    int n_end;\r
+    int endindex; /* the ending index */\r
+    int n_endindex;\r
+\r
+    for (n_start = 0;n_start < gen_nb_xmlNodePtr;n_start++) {\r
+    for (n_startindex = 0;n_startindex < gen_nb_int;n_startindex++) {\r
+    for (n_end = 0;n_end < gen_nb_xmlNodePtr;n_end++) {\r
+    for (n_endindex = 0;n_endindex < gen_nb_int;n_endindex++) {\r
+        start = gen_xmlNodePtr(n_start, 0);\r
+        startindex = gen_int(n_startindex, 1);\r
+        end = gen_xmlNodePtr(n_end, 2);\r
+        endindex = gen_int(n_endindex, 3);\r
+\r
+        ret_val = xmlXPtrNewRange(start, startindex, end, endindex);\r
+        if(ret_val != NULL)\r
+        {\r
+               DTS_CHECK_NE_MESSAGE("xmlXPtrNewRange", (void *)ret_val, (void *)(NULL), "xmlXPtrNewRange Failed");\r
+        }\r
+        else\r
+        {\r
+               DTS_CHECK_EQ_MESSAGE("xmlXPtrNewRange", (void *)ret_val, (void *)(NULL), "xmlXPtrNewRange Failed");\r
+        }\r
+\r
+        desret_xmlXPathObjectPtr(ret_val);\r
+        call_tests++;\r
+        des_xmlNodePtr(n_start, start, 0);\r
+        des_int(n_startindex, startindex, 1);\r
+        des_xmlNodePtr(n_end, end, 2);\r
+        des_int(n_endindex, endindex, 3);\r
+        xmlResetLastError();\r
+    }\r
+    }\r
+    }\r
+    }\r
+    ret_val = xmlXPtrNewRange(NULL, startindex, end, endindex);\r
+    DTS_CHECK_EQ_MESSAGE("xmlXPtrNewRange", (void *)ret_val, (void *)(NULL), "xmlXPtrNewRange Failed");\r
+\r
+    ret_val = xmlXPtrNewRange(start, startindex, NULL, endindex);\r
+    DTS_CHECK_EQ_MESSAGE("xmlXPtrNewRange", (void *)ret_val, (void *)(NULL), "xmlXPtrNewRange Failed");\r
+\r
+    ret_val = xmlXPtrNewRange(start, -1, end, endindex);\r
+    DTS_CHECK_EQ_MESSAGE("xmlXPtrNewRange", (void *)ret_val, (void *)(NULL), "xmlXPtrNewRange Failed");\r
+\r
+    ret_val = xmlXPtrNewRange(start, startindex, end, -1);\r
+    DTS_CHECK_EQ_MESSAGE("xmlXPtrNewRange", (void *)ret_val, (void *)(NULL), "xmlXPtrNewRange Failed");\r
+\r
+    function_tests++;\r
+#endif\r
+}\r
+       /**\r
+       * @test                 UTcxmlXPtrNewRangeNodeObjectP01\r
+       * @brief                xmlXPathObjectPtr       xmlXPtrNewRangeNodeObject(xmlNodePtr start, xmlXPathObjectPtr end)\r
+       * @desc                 Positive and neg Test for xmlXPtrNewRangeNodeObject\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Sathish Kumar (satish.k4@samsung.com)\r
+       * @return               xmlXPathObjectPtr\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlNodePtr(start), xmlXPathObjectPtr(end)} => {N/A | xmlNodePtr(!=NULL), xmlXPathObjectPtr(!=NULL)} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */      \r
+static void UTcxmlXPtrNewRangeNodeObjectP01()\r
+{\r
+#if defined(LIBXML_XPTR_ENABLED)\r
+    xmlXPathObjectPtr ret_val;\r
+    xmlNodePtr start; /* the starting node */\r
+    int n_start;\r
+    xmlXPathObjectPtr end; /* the ending object */\r
+    int n_end;\r
+\r
+    for (n_start = 0;n_start < gen_nb_xmlNodePtr;n_start++) {\r
+    for (n_end = 0;n_end < gen_nb_xmlXPathObjectPtr;n_end++) {\r
+        start = gen_xmlNodePtr(n_start, 0);\r
+        end = gen_xmlXPathObjectPtr(n_end, 1);\r
+\r
+        ret_val = xmlXPtrNewRangeNodeObject(start, end);\r
+        if(ret_val != NULL)\r
+        {\r
+               DTS_CHECK_NE_MESSAGE("xmlXPtrNewRangeNodeObject", (void *)ret_val, (void *)(NULL), "xmlXPtrNewRangeNodeObject Failed");\r
+        }\r
+        else\r
+        {\r
+               DTS_CHECK_EQ_MESSAGE("xmlXPtrNewRangeNodeObject", (void *)ret_val, (void *)(NULL), "xmlXPtrNewRangeNodeObject Failed");\r
+        }\r
+               \r
+        desret_xmlXPathObjectPtr(ret_val);\r
+        call_tests++;\r
+        des_xmlNodePtr(n_start, start, 0);\r
+        des_xmlXPathObjectPtr(n_end, end, 1);\r
+        xmlResetLastError();\r
+    }\r
+    }\r
+    ret_val = xmlXPtrNewRangeNodeObject(NULL, end);\r
+    DTS_CHECK_EQ_MESSAGE("xmlXPtrNewRangeNodeObject", (void *)ret_val, (void *)(NULL), "xmlXPtrNewRangeNodeObject Failed");\r
+\r
+    ret_val = xmlXPtrNewRangeNodeObject(start, NULL);\r
+    DTS_CHECK_EQ_MESSAGE("xmlXPtrNewRangeNodeObject", (void *)ret_val, (void *)(NULL), "xmlXPtrNewRangeNodeObject Failed");\r
+\r
+    ret_val = xmlXPtrNewRangeNodeObject(NULL, NULL);\r
+    DTS_CHECK_EQ_MESSAGE("xmlXPtrNewRangeNodeObject", (void *)ret_val, (void *)(NULL), "xmlXPtrNewRangeNodeObject Failed");\r
+\r
+    function_tests++;\r
+#endif\r
+}\r
+       /**\r
+       * @test                 UTcxmlXPtrNewRangeNodePointP01\r
+       * @brief                xmlXPathObjectPtr xmlXPtrNewRangeNodePoint(xmlNodePtr start, xmlXPathObjectPtr end)\r
+       * @desc                 Positive and neg Test for xmlXPtrNewRangeNodePoint\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Sathish Kumar (satish.k4@samsung.com)\r
+       * @return               xmlXPathObjectPtr\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlNodePtr(start), xmlXPathObjectPtr(end)} => {N/A | xmlNodePtr(!=NULL), xmlXPathObjectPtr(!=NULL)} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlXPtrNewRangeNodePointP01()\r
+{\r
+#if defined(LIBXML_XPTR_ENABLED)\r
+    xmlXPathObjectPtr ret_val;\r
+    xmlNodePtr start; /* the starting node */\r
+    int n_start;\r
+    xmlXPathObjectPtr end; /* the ending point */\r
+    int n_end;\r
+\r
+    for (n_start = 0;n_start < gen_nb_xmlNodePtr;n_start++) {\r
+    for (n_end = 0;n_end < gen_nb_xmlXPathObjectPtr;n_end++) {\r
+        start = gen_xmlNodePtr(n_start, 0);\r
+        end = gen_xmlXPathObjectPtr(n_end, 1);\r
+\r
+        ret_val = xmlXPtrNewRangeNodePoint(start, end);\r
+        if(ret_val != NULL)\r
+        {\r
+               DTS_CHECK_NE_MESSAGE("xmlXPtrNewRangeNodePoint", (void *)ret_val, (void *)(NULL), "xmlXPtrNewRangeNodePoint Failed");\r
+        }\r
+        else\r
+        {\r
+               DTS_CHECK_EQ_MESSAGE("xmlXPtrNewRangeNodePoint", (void *)ret_val, (void *)(NULL), "xmlXPtrNewRangeNodePoint Failed");\r
+        }\r
+\r
+        desret_xmlXPathObjectPtr(ret_val);\r
+        call_tests++;\r
+        des_xmlNodePtr(n_start, start, 0);\r
+        des_xmlXPathObjectPtr(n_end, end, 1);\r
+        xmlResetLastError();\r
+    }\r
+    }\r
+    ret_val = xmlXPtrNewRangeNodePoint(NULL, end);\r
+    DTS_CHECK_EQ_MESSAGE("xmlXPtrNewRangeNodePoint", (void *)ret_val, (void *)(NULL), "xmlXPtrNewRangeNodePoint Failed");\r
+\r
+    ret_val = xmlXPtrNewRangeNodePoint(start, NULL);\r
+    DTS_CHECK_EQ_MESSAGE("xmlXPtrNewRangeNodePoint", (void *)ret_val, (void *)(NULL), "xmlXPtrNewRangeNodePoint Failed");\r
+\r
+    ret_val = xmlXPtrNewRangeNodePoint(NULL, NULL);\r
+    DTS_CHECK_EQ_MESSAGE("xmlXPtrNewRangeNodePoint", (void *)ret_val, (void *)(NULL), "xmlXPtrNewRangeNodePoint Failed");\r
+\r
+    function_tests++;\r
+#endif\r
+}\r
+       /**\r
+       * @test                 UTcxmlXPtrNewRangeNodesP01\r
+       * @brief                xmlXPathObjectPtr xmlXPtrNewRangeNodes(xmlNodePtr start, xmlNodePtr end)\r
+       * @desc                 Positive and neg Test for xmlXPtrNewRangeNodes\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Sathish Kumar (satish.k4@samsung.com)\r
+       * @return               xmlXPathObjectPtr\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlNodePtr(start), xmlNodePtr(end)} => {N/A | xmlNodePtr(!=NULL), xmlNodePtr(!=NULL)} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlXPtrNewRangeNodesP01()\r
+{\r
+#if defined(LIBXML_XPTR_ENABLED)\r
+    xmlXPathObjectPtr ret_val;\r
+    xmlNodePtr start; /* the starting node */\r
+    int n_start;\r
+    xmlNodePtr end; /* the ending node */\r
+    int n_end;\r
+\r
+    for (n_start = 0;n_start < gen_nb_xmlNodePtr;n_start++) {\r
+    for (n_end = 0;n_end < gen_nb_xmlNodePtr;n_end++) {\r
+        start = gen_xmlNodePtr(n_start, 0);\r
+        end = gen_xmlNodePtr(n_end, 1);\r
+\r
+        ret_val = xmlXPtrNewRangeNodes(start, end);\r
+        if(ret_val != NULL)\r
+        {\r
+               DTS_CHECK_NE_MESSAGE("xmlXPtrNewRangeNodes", (void *)ret_val, (void *)(NULL), "xmlXPtrNewRangeNodes Failed");\r
+        }\r
+        else\r
+        {\r
+               DTS_CHECK_EQ_MESSAGE("xmlXPtrNewRangeNodes", (void *)ret_val, (void *)(NULL), "xmlXPtrNewRangeNodes Failed");\r
+        }\r
+\r
+        desret_xmlXPathObjectPtr(ret_val);\r
+        call_tests++;\r
+        des_xmlNodePtr(n_start, start, 0);\r
+        des_xmlNodePtr(n_end, end, 1);\r
+        xmlResetLastError();\r
+    }\r
+    }\r
+    ret_val = xmlXPtrNewRangeNodes(NULL, end);\r
+    DTS_CHECK_EQ_MESSAGE("xmlXPtrNewRangeNodePoint", (void *)ret_val, (void *)(NULL), "xmlXPtrNewRangeNodePoint Failed");\r
+\r
+    ret_val = xmlXPtrNewRangeNodes(start, NULL);\r
+    DTS_CHECK_EQ_MESSAGE("xmlXPtrNewRangeNodePoint", (void *)ret_val, (void *)(NULL), "xmlXPtrNewRangeNodePoint Failed");\r
+\r
+    ret_val = xmlXPtrNewRangeNodes(NULL, NULL);\r
+    DTS_CHECK_EQ_MESSAGE("xmlXPtrNewRangeNodePoint", (void *)ret_val, (void *)(NULL), "xmlXPtrNewRangeNodePoint Failed");\r
+\r
+    function_tests++;\r
+#endif\r
+}\r
+       /**\r
+       * @test                 UTcxmlXPtrNewRangePointNodeP01\r
+       * @brief                xmlXPathObjectPtr xmlXPtrNewRangePointNode(xmlXPathObjectPtr start, xmlNodePtr end)\r
+       * @desc                 Positive and neg Test for xmlXPtrNewRangePointNode\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Sathish Kumar (satish.k4@samsung.com)\r
+       * @return               xmlXPathObjectPtr\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlXPathObjectPtr(start), xmlNodePtr(end)} => {N/A | xmlXPathObjectPtr(!=NULL), xmlNodePtr(!=NULL)} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlXPtrNewRangePointNodeP01()\r
+{\r
+#if defined(LIBXML_XPTR_ENABLED)\r
+    xmlXPathObjectPtr ret_val;\r
+    xmlXPathObjectPtr start; /* the starting point */\r
+    int n_start;\r
+    xmlNodePtr end; /* the ending node */\r
+    int n_end;\r
+\r
+    for (n_start = 0;n_start < gen_nb_xmlXPathObjectPtr;n_start++) {\r
+    for (n_end = 0;n_end < gen_nb_xmlNodePtr;n_end++) {\r
+        start = gen_xmlXPathObjectPtr(n_start, 0);\r
+        end = gen_xmlNodePtr(n_end, 1);\r
+\r
+        ret_val = xmlXPtrNewRangePointNode(start, end);\r
+        if(ret_val != NULL)\r
+        {\r
+               DTS_CHECK_NE_MESSAGE("xmlXPtrNewRangePointNode", (void *)ret_val, (void *)(NULL), "xmlXPtrNewRangePointNode Failed");\r
+        }\r
+        else\r
+        {\r
+               DTS_CHECK_EQ_MESSAGE("xmlXPtrNewRangePointNode", (void *)ret_val, (void *)(NULL), "xmlXPtrNewRangePointNode Failed");\r
+        }\r
+\r
+        desret_xmlXPathObjectPtr(ret_val);\r
+        call_tests++;\r
+        des_xmlXPathObjectPtr(n_start, start, 0);\r
+        des_xmlNodePtr(n_end, end, 1);\r
+        xmlResetLastError();\r
+    }\r
+    }\r
+    ret_val = xmlXPtrNewRangePointNode(NULL, end);\r
+    DTS_CHECK_EQ_MESSAGE("xmlXPtrNewRangePointNode", (void *)ret_val, (void *)(NULL), "xmlXPtrNewRangePointNode Failed");\r
+\r
+    ret_val = xmlXPtrNewRangePointNode(start, NULL);\r
+    DTS_CHECK_EQ_MESSAGE("xmlXPtrNewRangePointNode", (void *)ret_val, (void *)(NULL), "xmlXPtrNewRangePointNode Failed");\r
+\r
+    ret_val = xmlXPtrNewRangePointNode(NULL, NULL);\r
+    DTS_CHECK_EQ_MESSAGE("xmlXPtrNewRangePointNode", (void *)ret_val, (void *)(NULL), "xmlXPtrNewRangePointNode Failed");\r
+\r
+    function_tests++;\r
+#endif\r
+}\r
+       /**\r
+       * @test                 UTcxmlXPtrNewRangePointsP01\r
+       * @brief                xmlXPathObjectPtr xmlXPtrNewRangePoints(xmlXPathObjectPtr start, xmlXPathObjectPtr end)\r
+       * @desc                 Positive and neg Test for xmlXPtrNewRangePoints\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Sathish Kumar (satish.k4@samsung.com)\r
+       * @return               xmlXPathObjectPtr\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlXPathObjectPtr(start), xmlXPathObjectPtr(end)} => {N/A | xmlXPathObjectPtr(!=NULL), xmlXPathObjectPtr(!=NULL)} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlXPtrNewRangePointsP01()\r
+{\r
+#if defined(LIBXML_XPTR_ENABLED)\r
+    xmlXPathObjectPtr ret_val;\r
+    xmlXPathObjectPtr start; /* the starting point */\r
+    int n_start;\r
+    xmlXPathObjectPtr end; /* the ending point */\r
+    int n_end;\r
+\r
+    for (n_start = 0;n_start < gen_nb_xmlXPathObjectPtr;n_start++) {\r
+    for (n_end = 0;n_end < gen_nb_xmlXPathObjectPtr;n_end++) {\r
+        start = gen_xmlXPathObjectPtr(n_start, 0);\r
+        end = gen_xmlXPathObjectPtr(n_end, 1);\r
+\r
+        ret_val = xmlXPtrNewRangePoints(start, end);\r
+        if(ret_val != NULL)\r
+        {\r
+               DTS_CHECK_NE_MESSAGE("xmlXPtrNewRangePoints", (void *)ret_val, (void *)(NULL), "xmlXPtrNewRangePoints Failed");\r
+        }\r
+        else\r
+        {\r
+               DTS_CHECK_EQ_MESSAGE("xmlXPtrNewRangePoints", (void *)ret_val, (void *)(NULL), "xmlXPtrNewRangePoints Failed");\r
+        }\r
+\r
+        desret_xmlXPathObjectPtr(ret_val);\r
+        call_tests++;\r
+        des_xmlXPathObjectPtr(n_start, start, 0);\r
+        des_xmlXPathObjectPtr(n_end, end, 1);\r
+        xmlResetLastError();\r
+    }\r
+    }\r
+    ret_val = xmlXPtrNewRangePoints(NULL, end);\r
+    DTS_CHECK_EQ_MESSAGE("xmlXPtrNewRangePoints", (void *)ret_val, (void *)(NULL), "xmlXPtrNewRangePoints Failed");\r
+\r
+    ret_val = xmlXPtrNewRangePoints(start, NULL);\r
+    DTS_CHECK_EQ_MESSAGE("xmlXPtrNewRangePoints", (void *)ret_val, (void *)(NULL), "xmlXPtrNewRangePoints Failed");\r
+\r
+    ret_val = xmlXPtrNewRangePoints(NULL, NULL);\r
+    DTS_CHECK_EQ_MESSAGE("xmlXPtrNewRangePoints", (void *)ret_val, (void *)(NULL), "xmlXPtrNewRangePoints Failed");\r
+\r
+    function_tests++;\r
+#endif\r
+}\r
+       /**\r
+       * @test                 UTcxmlXPtrRangeToFunctionP01\r
+       * @brief                void xmlXPtrRangeToFunction(xmlXPathParserContextPtr ctxt, int nargs)\r
+       * @desc                 Positive and neg Test for xmlXPtrRangeToFunction\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Sathish Kumar (satish.k4@samsung.com)\r
+       * @return               void\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlXPathParserContextPtr(ctxt), int(nargs)} => {N/A | xmlXPathParserContextPtr(!=NULL)} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+static void UTcxmlXPtrRangeToFunctionP01()\r
+{\r
+#if defined(LIBXML_XPTR_ENABLED)\r
+    xmlXPathParserContextPtr ctxt; /* the XPointer Parser context */\r
+    int n_ctxt;\r
+    int nargs; /* the number of args */\r
+    int n_nargs;\r
+\r
+    for (n_ctxt = 0;n_ctxt < gen_nb_xmlXPathParserContextPtr;n_ctxt++) {\r
+    for (n_nargs = 0;n_nargs < gen_nb_int;n_nargs++) {\r
+        ctxt = gen_xmlXPathParserContextPtr(n_ctxt, 0);\r
+        nargs = gen_int(n_nargs, 1);\r
+\r
+        if(ctxt == NULL)\r
+        {\r
+               DTS_CHECK_EQ_MESSAGE("xmlXPtrRangeToFunction", (void *)ctxt, (void *)(NULL), "gen_xmlXPathParserContextPtr Failed");\r
+        }\r
+\r
+        xmlXPtrRangeToFunction(ctxt, nargs);\r
+        if(ctxt == NULL)\r
+        {\r
+               DTS_CHECK_EQ_MESSAGE("xmlXPtrRangeToFunction", (void *)ctxt, (void *)(NULL), "xmlXPtrRangeToFunction Failed");\r
+        }\r
+        else\r
+        {\r
+               DTS_CHECK_NE_MESSAGE("xmlXPtrRangeToFunction", (void *)ctxt, (void *)(NULL), "xmlXPtrRangeToFunction Failed");\r
+        }\r
+\r
+        call_tests++;\r
+        des_xmlXPathParserContextPtr(n_ctxt, ctxt, 0);\r
+        des_int(n_nargs, nargs, 1);\r
+        xmlResetLastError();\r
+    }\r
+    }\r
+    function_tests++;\r
+#endif\r
+}\r
+       /**\r
+       * @test                 UTcxmlXPtrWrapLocationSetP01\r
+       * @brief                xmlXPathObjectPtr xmlXPtrWrapLocationSet(xmlLocationSetPtr val)\r
+       * @desc                 Positive and neg Test for xmlXPtrWrapLocationSet\r
+       * @b developer  kyung-eun park(kyung-eun.park@samsung.com), Seong-Yeol Park(seongyeol.park@samsung.com)\r
+       * @b tester             Sathish Kumar (satish.k4@samsung.com)\r
+       * @return               xmlXPathObjectPtr\r
+       * @see                  none\r
+       * @remarks              input1: [N/A, N/A] @n\r
+       *                       {xmlLocationSetPtr(val)} => {N/A | xmlLocationSetPtr(!=NULL)} @n\r
+       * @b priority   Middle\r
+       * @b etc                none\r
+       */\r
+\r
+static void UTcxmlXPtrWrapLocationSetP01()\r
+{\r
+#if defined(LIBXML_XPTR_ENABLED)\r
+    xmlXPathObjectPtr ret_val;\r
+    xmlLocationSetPtr val; /* the LocationSet value */\r
+    int n_val;\r
+\r
+    for (n_val = 0;n_val < (gen_nb_xmlLocationSetPtr + 1) ;n_val++) {\r
+        val = gen_xmlLocationSetPtr(n_val, 0);\r
+\r
+        if(n_val != 0)\r
+        {\r
+               ret_val = xmlXPtrWrapLocationSet(val);\r
+               if(ret_val != NULL)\r
+               {\r
+                       DTS_CHECK_NE_MESSAGE("xmlXPtrRangeToFunction", (void *)ret_val, (void *)(NULL), "xmlXPtrRangeToFunction Failed");\r
+               }\r
+               else\r
+               {\r
+                       DTS_CHECK_EQ_MESSAGE("xmlXPtrRangeToFunction", (void *)ret_val, (void *)(NULL), "xmlXPtrRangeToFunction Failed");\r
+               }\r
+        }\r
+        desret_xmlXPathObjectPtr(ret_val);\r
+        call_tests++;\r
+        des_xmlLocationSetPtr(n_val, val, 0);\r
+        xmlResetLastError();\r
+    }\r
+    function_tests++;\r
+#endif\r
+}\r
+\r
+static void startup( void);\r
+static void cleanup( void);\r
+\r
+void (*tet_startup)( void) = startup;\r
+void (*tet_cleanup)( void) = cleanup;\r
+\r
+static void startup( void)\r
+{\r
+        /* start of TC */\r
+        tet_printf("TC starts.");\r
+}\r
+\r
+static void cleanup( void)\r
+{\r
+        /* end of TC */\r
+        tet_printf("TC ends.");\r
+}\r
+\r
+struct tet_testlist tet_testlist[] = {\r
+       // Handling of out of context errors\r
+       {UTcxmlXPtrBuildNodeListP01,1},\r
+       {UTcxmlXPtrEvalRangePredicateP01,2},\r
+       {UTcxmlXPtrLocationSetAddP01,3},\r
+       {UTcxmlXPtrLocationSetCreateP01,4},\r
+       {UTcxmlXPtrLocationSetDelP01,5},\r
+       {UTcxmlXPtrLocationSetMergeP01,6},\r
+       {UTcxmlXPtrLocationSetRemoveP01,7},\r
+       {UTcxmlXPtrNewCollapsedRangeP01,8},\r
+       {UTcxmlXPtrNewContextP01,9},\r
+       {UTcxmlXPtrNewLocationSetNodeSetP01,10},\r
+       {UTcxmlXPtrNewLocationSetNodesP01,11},\r
+       {UTcxmlXPtrNewRangeP01,12},\r
+       {UTcxmlXPtrNewRangeNodeObjectP01,13},\r
+       {UTcxmlXPtrNewRangeNodePointP01,14},\r
+       {UTcxmlXPtrNewRangeNodesP01,15},\r
+       {UTcxmlXPtrNewRangePointNodeP01,16},\r
+       {UTcxmlXPtrNewRangePointsP01,17},\r
+       {UTcxmlXPtrRangeToFunctionP01,18},\r
+       {UTcxmlXPtrWrapLocationSetP01,19},\r
+       { NULL, 0 },\r
+       \r
+};\r
diff --git a/TC/tet_scen b/TC/tet_scen
new file mode 100755 (executable)
index 0000000..03f029a
--- /dev/null
@@ -0,0 +1,7 @@
+all
+       ^TEST
+##### Scenarios for TEST #####
+
+# Test scenario
+TEST
+       :include:/testcase/tslist
diff --git a/TC/tetbuild.cfg b/TC/tetbuild.cfg
new file mode 100755 (executable)
index 0000000..f7eda55
--- /dev/null
@@ -0,0 +1,5 @@
+TET_OUTPUT_CAPTURE=True # capture option for build operation checking
+TET_BUILD_TOOL=make # build with using make command
+TET_BUILD_FILE=-f Makefile # execution file (Makefile) for build
+TET_API_COMPLIANT=True # use TET API in Test Case ?
+TET_PASS_TC_NAME=True # report passed TC name in Journal file?
diff --git a/TC/tetclean.cfg b/TC/tetclean.cfg
new file mode 100755 (executable)
index 0000000..02d7030
--- /dev/null
@@ -0,0 +1,5 @@
+TET_OUTPUT_CAPTURE=True # capture option
+TET_CLEAN_TOOL= make clean # clean tool
+TET_CLEAN_FILE= Makefile # file for clean
+TET_API_COMPLIANT=True # TET API useage 
+TET_PASS_TC_NAME=True # showing name , passed TC
diff --git a/TC/tetexec.cfg b/TC/tetexec.cfg
new file mode 100755 (executable)
index 0000000..ef3e452
--- /dev/null
@@ -0,0 +1,5 @@
+TET_OUTPUT_CAPTURE=True # capturing execution or not
+TET_EXEC_TOOL=  # ex) exec : execution tool set up/ Optional
+TET_EXEC_FILE=   # ex) exectool : execution file/ Optional
+TET_API_COMPLIANT=True # Test case or Tool usesTET API?
+TET_PASS_TC_NAME=True # showing Passed TC name ?