<?xml version="1.0"?>

<!DOCTYPE ebook
[
<!ELEMENT ebook (page+)>
<!ELEMENT page (topic, text, page+)>
<!ATTLIST page
          key    CDATA "auto">
<!ELEMENT topic (#PCDATA)>
<!ELEMENT text (#PCDATA)>
]>

<ebook>
	<page key="index.html">
		<topic>
			About eXML
		</topic>
		<text>
			<![CDATA[
				<P><i>eXML</i> is a <A
				HREF="http://www.w3.org/TR/1998/REC-xml-19980210">XML 1.0</A> parser
				for Eiffel based on <A href ="http://www.jclark.com/xml/expat.html"><i>expat</i></A>. 
				Please see the <A href ="http://www.jclark.com/xml/expat.html"><i>expat</i>-hompage</a> 
				for details on the parser.</P>
			
				<P>The current <i>eXML</i> version is <b>0.1.6</b>. It is using <i>expat</i>
				version <b>1.0.2</b></P>
				
				<P>Copyright (c) 1999 <A HREF="mailto:andreas.leitner@teleweb.at">Andreas Leitner</A>.  eXML is subject to the <A
				HREF="forum.txt">Eiffel Forum Freeware License</A>.</P>
			]]>			
		</text>
		</page>	
	<page>
		<topic>
			About Eiffel
		</topic>
		<text>
			<![CDATA[
				Under construction... <br>
				In the meanwhile if you want to learn more about Eiffel, have a look at this excelent site:
				<A HREF="http://www.elj.com/eiffel/getting-started/">Eiffel Liberty</a>
			]]>			
		</text>
	</page>
	<page>
		<topic>
			News
		</topic>
		<text>
			<![CDATA[
				<b>04/13/1999 </b><br>
				This website is now automatically generated with eBook. eBook is included as example 
				application for the tree based XML parser. For more information on eBook please have
				a look at the <A HREF="ebook.html">eBook Documentation</A>.
			<p>
				<b>04/13/1999 - Version 0.1.6</b><br>
				Added eBook sample (Details on it later). The tree based parser now generated attributes
				of elements. Some bug fixes.
			<p>
				<b>04/08/1999 - Version 0.1.5</b><br>
				Basic implementation of a tree based parser and bugfixes.
			<p>
				<b>04/01/1999</b><br>
				Redesigned web site. Still in work (: Works fine with IE5. Netscape 4.5 on Windows has
				some problems. Others have not been tested yet. Please send in any comments.
			<p>
				<b>Version 0.1.4:</b><br>
						Linux is now officially supported. Easier installing of <i>eXML</i>.
			<p>
				<b>Version 0.1.3:</b><br>
						<i>eXML</i> now also compiles under SmallEiffel. Redesing of internal classes.
			<p>
				<b>Version 0.1.2:</b><br>
						<i>eXML</i> Redesing of internal classes to enable easier port.
			<p>
				<b>Version 0.1.1:</b><br>
					Many more hooks are supported. Most of the expat API has been
					encapsulated, but some still need some work to make the features accessible easily.
			]]>			
		</text>
	</page>
	<page>
		<topic>
			Download
		</topic>
		<text>
			<![CDATA[
				<i>eXML</i> can be downloaded from 
				<A HREF="http://wex.ml.org/bin/exml_0_1_6.zip">exml_0_1_6.zip</A>.
			]]>			
		</text>
	</page>
	<page>
		<topic>
			Compatibility
		</topic>
		<text>
			<![CDATA[
				<b>
					Eiffel Compiler
				</b>
				<ul>
					<li>
						<a href="http://www.eiffel.com">ISE Eiffel</a> 4.2 (or better) on Windows (tested with Visual C++ 6 as
						backend C-compiler). If you succeed in compiling eXML on Unix/Linux please mail me. I would be happy
						to inlcude the Linux ACE file in the next release then.
					</li>
					<li>
						<a href="http://smalleiffel.loria.fr">	SmallEiffel</a> -0.78 Beta #3 (or better) on Windows and Linux 
						(tested with Visual C++ 6 resp. gcc (don't ask me which version :) as backend C-compiler)
					</li>
				</ul>
				<P>
					<b>
						Libraries
					</b>
				<ul>
					<li>
						<A HREF="http://www.gobo.demon.co.uk/eiffel/gobo/">GOBO</A>
					</li>
				</ul>				
				<P>
				<b>
					Note on SmallEiffel
				</b><br>
					Since the SmallEiffel (version -0.78 Beta #3) garbage collectior does not support finalizaion yet, objects of the
					type XML_PARSER will not free all their memory when beeing collected. I hope that this feature will soon be
					included, though.
			
				<P>
				<b>
					Note on GOBO
				</b><br>
					There is a bug in the SE version of GOBO (1.3). Replace 'a_buffer' with 'Result' in file
					"/kernel/spec/se/kl_input_stream_routines.e" in feature 'read_string'. This bug will be corrected
					in the next release of GOBO.
			]]>			
		</text>
	</page>
	<page>
		<topic>
			Installation
		</topic>
		<text>
			<![CDATA[
				<P>To install the <i>eXML</i> Library unpack it in a directory of your choice and
				set the enviroment variable EXML to this directory. Now depending on your platform you need to do the following:
			
				<P>
				<b>Windows (all):</b><br>
					All the needed libraries come precompiled. The DLL's are stored in the directory %EXML%\expat\bin. Be sure they
					are in your DLL-loadpath. It's a good idea to put the DLL's in your system directory.
			
				<P>
				<b>Windows (ISE Eiffel):</b><br>
					There is an extra C-library needed. Please go to the directory %EXML%\compiler_specific\ise\clib and run
					"nmake makefile.win.msc"
			
				<P>
				<b>Linux (all):</b><br>
					Go to the directory $(EXML)/expat and run "make". This will generate the needed expat object files, that are
					needed when compiling an eXML application.

			]]>			
		</text>
	</page>
	<page>
		<topic>
			Documentation
		</topic>
		<text>
			<![CDATA[
				<p>
					eXML provides two different type of parsers: an event based parser and a tree based parser.
					Have a look at 
					<a href="http://www.megginson.com/SAX/event.html">http://www.megginson.com/SAX/event.html</a> for a
					comparsion between <i>event based</i> and <i>tree based</i> XML parsers. The tree based parser (XML_TREE_PARSER) 
					is implemented	as a descentant of the event based parser (XML_PARSER).
			]]>			

		</text>
		<page>
			<topic>
				The Tree Based Parser
			</topic>
			<text>
				<![CDATA[
					<p>
						For the user of the library in most cases the tree based parser will be the better choice. For this reason I will
						limit the documentation on this topic for now. Objects of the type XML_TREE_PARSER can be feed with a XML document
						split up in one or more strings. The following example parsers a XML document that is stored completly 
						in a string object of the name `buffer'.
					</p>
	
	<pre class="EiffelSource">
	.
	.
	.
	local
		parser: XML_TREE_PARSER
	.
	.
	.
			-- somewhere the parser must be created (:
		!! parser.make
	.
	.
	.
			-- parse the XML-document
	parser.parse_string (buffer)
			-- and tell the parser that the end of the document has been reached
	parser.set_end_of_file	
	
	if
		not parser.is_correct
	then
			-- whoops! there was an error in the docment.
			-- print out some information about that error
		print ("%N")
		print (parser.last_error_string)
		print (" at ln: ")
		print (parser.last_line_number)
		print (", cl: ")
		print (parser.last_column_number)
		print ("%N")
	else
			-- the document was parsed successfully.
			-- print out the structure of the document
		print (parser.out)
	end
	
	</pre>
			
	
					<p>
						The parser stores the information contained in the XML-document as a tree consisting of XML_NODES. The following
						is a inheritance graph of all nodes currently implemented.
					</p>
					<p>
						<img src="/imgs/nodes.jpg" alt="nodes">
					</p>
				
					<p>
						The parser inheritance graph itself is presented in the next picture. You see that the tree 
						parser not only inherits from the event based parser, but also from XML_DOCUMENT. Objects of the
						type XML_DOCUMENT represent a whole XML-document. They have a `root_element' of the type XML_ELEMENT
						and (in the future will) hold additional information given in the XML-document (i.e. the encoding)
					</p>
				
					<p>
						<img src="/imgs/parser.jpg" alt="parser">
					</p>
				]]>			
			</text>
		</page>
		<page key="ebook.html">
			<topic>
				eBook
			</topic>
			<text>
				<![CDATA[
					eBook is an example of an eXML tree based parser application. It is included in the eXML package. 
					But eBook is more than a plain example, it is pretty much an application of its own. For example
					this whole web site is generated using eBook. The text and structure of this web site is
					stored in a XML-document. eBook takes this XML-document and some additional layout files and
					generates HTML pages as output.
					<p>
					There are several reasons why this can be usefull. I.e. eBook automatically generates the menu 
					you can see at the right. If I want the site to have a new design, I only need to change the
					layout files and rerun eBook to generate the new HTML pages. eBook helps you to seperate 
					the actual information from the layout of HTML sites. It makes it even possible to create 
					different layout-files for different browsers, so you do not need to fidle with compatibility
					problems.
					<p>
					Currently there is not much documentation available about eBook. Have a look at the test data
					in the directory "/examples/test_data/ebook/input" to see how eBook works.
					<p>
					Watch this space for more information about eBook...
					<p>
					One last note: If you try eBook and worry about it beeing slow, try compiling it with assertion 
					checking turned off !!!
				]]>			
			</text>
		</page>

	</page>
	<page>
		<topic>
			Future
		</topic>
		<text>
			<![CDATA[
					Well, who knows? (: Since <i>eXML</i> is Open Source, it's not only on me to determine.
				<P>
					But now to more (or less) concrete things (:
					<ul>
						<li>
							Improve the variety of input-types XML_PARSER is able to process. Currently only 
							objects of type STRING are supported.
						</li>
						<li>
							The use of UNICODE is suggested by the W3C, but I have no idea how to realize that
							at the moment.
						</li>
						<li>
							To automate the parsing of external enities a compiler and platform independent network library
							would be needed. Parsing local files can be implemented without and this is likely to be 
							implemented first.
						</li>
						<li>
							Various character encodings should be handled.
						</li>
						<li>
							Introducing further abstractions to allow different XML-parsers to be hooked in (also a pure Eiffel 
							implementation would be possible).
						</li>
						<li>
							Improving the tree bases parser. (Generating objects for start tag parameters, adding features
							for making the enhance the ease of use)
						</li>
					</ul>
					<p>
					Finnally as said above this library is Open Source. If you make any improvements or found/fixed a bug
					I would be happy to hear from you. If you use this library, please let me know what you think of it.
					Thank you in advance.			
			]]>			
		</text>
	</page>
	<page>
		<topic>
			Known Bugs
		</topic>
		<text>
			<![CDATA[
				<TABLE border=1>
						<TH>
							Date
						</TH>
						<TH>
							Description
						</TH>
						<TH>
							Status
						</TH>
					<TR>
						<TD>
							04/08/1999
						</TD>
						<TD>
							There are strange XML-errors reported when compiling with ISE.
						</TD>
						<TD>
							Fixed since version 0.1.6.
						</TD>
					</TR>
					<TR>
						<TD>
							04/14/1999
						</TD>
						<TD>
							Compiling eBook with SmallEiffel and option "-boost" will result in C-error messages.
							Seems to be a bug in SmallEiffel.
						</TD>
						<TD>
							Not fixed.
						</TD>
					</TR>
				</TABLE>
			]]>			
		</text>
	</page>
	<page>
		<topic>
			Notes
		</topic>
		<text>
			<![CDATA[
				<P>The files in the directory <i>expar</i> are (unmodified) taken from 
				<A href ="http://www.jclark.com/xml/expat.html"><i>expat</i></a> and therefore are subject to the <A
				HREF="mpl-1_0.html">Mozilla Public License Version 1.0</A>.
			
			<p>
				There is now a mailing list for <i>eXML</i> at <a href="http://www.egroups.com/">www.egroups.com</a>.
				<center>
				<form method=GET action="http://www.eGroups.com/subscribe">
			     <input type=hidden name="listname" value="exml">
			     <input type=hidden name="SubmitAction" value="Subscribe">
			     <table width=300 cellspacing=0 cellpadding=3 border=0>
			     <tr>
			      <td colspan=2 align=center>
			        <large><b><z111a>Subscribe to</z> eXML discussion list</b></large>
			      </td>
			     </tr><tr>
			      <td colspan=2>
			        <z110>Enter your e-mail address:</z>
			      </td>
			     </tr><tr>
			      <td>
			        <input type=text name="emailaddr" value="your e-mail" size=21>
			      </td><td>
			        <input type=image border=0 alt="Click here to join exml"
			        name="Click here to join exml" SRC=/imgs/bevel.gif>
			      </td>
			     </tr><tr>
			      <td colspan=2>
			        <a href="http://www.eGroups.com/list/exml/">exml
			        archive</a>
			      </td>
			     </tr>
			     </TABLE>
			     </form>
					</center>
		
				Thanks in no specific order to:
				<ul>
					<li>
						<A HREF="mailto:jjc@jclark.com">James Clark</A> for writing <i>expat</i> and to 
						<A HREF="mailto:loryn@acm.org">Loryn Jenkins</A> for telling me about <i>expat</i> (:
					</li>
					<li>
						the authors of <a href="http://www.cs.utah.edu/~beazley/SWIG/swig.html">SWIG</a> and
						<a href="mailto:cozzi@neurop2.ruhr-uni-bochum.de>Alex Cozzi</a> for 
						<a href="http://www.neurop2.ruhr-uni-bochum.de/~cozzi/swigeiffel/">SWIGEIFFEL</a>. It helped me a lot
						when porting eXML to <a href="http://SmallEiffel.loria.fr">SmallEiffel</a>.
					</li>
					<li>
						<a href="mailto:ericb@gobo.demon.co.uk">Eric Bezault</a> for providing the great
						<a href="http://www.gobo.demon.co.uk/eiffel/gobo/index.html">GOBO library</a>
					</li>
					<li>
						<a href="http://www.eiffel.com">ISE Eiffel</a>
					</li>
					<li>
						the <a href="http://SmallEiffel.loria.fr">SmallEiffel</a> team
					</li>
					<li>
						lot of other people, that helped in the one or the other way in making this project possible.
					</li>
			]]>			
		</text>
	</page>
</ebook>