<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!--Rendered using the Haskell Html Library v0.2--> <HTML ><HEAD ><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8" ><TITLE >Text.XML.HXT.Parser.DTDProcessing</TITLE ><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css" ><SCRIPT SRC="haddock.js" TYPE="text/javascript" ></SCRIPT ></HEAD ><BODY ><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0" ><TR ><TD CLASS="topbar" ><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0" ><TR ><TD ><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" " ></TD ><TD CLASS="title" >hxt-7.1: </TD ><TD CLASS="topbut" ><A HREF="index.html" >Contents</A ></TD ><TD CLASS="topbut" ><A HREF="doc-index.html" >Index</A ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="modulebar" ><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0" ><TR ><TD ><FONT SIZE="6" >Text.XML.HXT.Parser.DTDProcessing</FONT ></TD ><TD ALIGN="right" ><TABLE CLASS="narrow" CELLSPACING="0" CELLPADDING="0" ><TR ><TD CLASS="infohead" >Portability</TD ><TD CLASS="infoval" >portable</TD ></TR ><TR ><TD CLASS="infohead" >Stability</TD ><TD CLASS="infoval" >experimental</TD ></TR ><TR ><TD CLASS="infohead" >Maintainer</TD ><TD CLASS="infoval" >Uwe Schmidt (uwe\@fh-wedel.de)</TD ></TR ></TABLE ></TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="section1" >Description</TD ></TR ><TR ><TD CLASS="doc" ><P >Version : $Id: DTDProcessing.hs,v 1.15 2006<EM >11</EM >12 14:53:00 hxml Exp $ </P ><P >DTD processing function for including external parts of a DTD parameter entity substitution and general entity substitution </P ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="section1" >Synopsis</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="body" ><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0" ><TR ><TD CLASS="decl" ><A HREF="#v%3AgetWellformedDoc" >getWellformedDoc</A > :: <A HREF="Text-XML-HXT-DOM-XmlState.html#t%3AXmlStateFilter" >XmlStateFilter</A > state</TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AcheckWellformedDoc" >checkWellformedDoc</A > :: <A HREF="Text-XML-HXT-DOM-XmlState.html#t%3AXmlStateFilter" >XmlStateFilter</A > state</TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AprocessDTD" >processDTD</A > :: <A HREF="Text-XML-HXT-DOM-XmlState.html#t%3AXmlStateFilter" >XmlStateFilter</A > a</TD ></TR ><TR ><TD CLASS="s8" ></TD ></TR ><TR ><TD CLASS="decl" ><A HREF="#v%3AprocessGeneralEntities" >processGeneralEntities</A > :: <A HREF="Text-XML-HXT-DOM-XmlState.html#t%3AXmlStateFilter" >XmlStateFilter</A > a</TD ></TR ></TABLE ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="section1" >Documentation</TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v%3AgetWellformedDoc" ></A ><B >getWellformedDoc</B > :: <A HREF="Text-XML-HXT-DOM-XmlState.html#t%3AXmlStateFilter" >XmlStateFilter</A > state</TD ></TR ><TR ><TD CLASS="doc" ><P >monadic filter for reading, parsing and checking a wellformed document. the input tree must consist of a root node with a source attribute in its attribute list. </P ><P >All attributes from the document root are copied into the system state, and may be queried by the monadic filters, e.g. trace options. </P ><P >Result is the single element list containing the well-formed document tree or, in case of errors, the document root with an empty list as children and attributes <TT ><A HREF="Text-XML-HXT-DOM-XmlKeywords.html#v%3Aa_status" >a_status</A ></TT > and <TT ><A HREF="Text-XML-HXT-DOM-XmlKeywords.html#v%3Aa_module" >a_module</A ></TT > for error level and the module, where the error occured. </P ><P >this is a shortcut for <TT ><A HREF="Text-XML-HXT-Parser-XmlInput.html#v%3AgetXmlContents" >getXmlContents</A ></TT > .>> <TT ><A HREF="Text-XML-HXT-Parser-DTDProcessing.html#v%3AcheckWellformedDoc" >checkWellformedDoc</A ></TT > </P ><P >example for a main program: </P ><PRE > main = run' $ do res <- getWellformedDoc $ newDocument "myfile.xml" ... </PRE ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v%3AcheckWellformedDoc" ></A ><B >checkWellformedDoc</B > :: <A HREF="Text-XML-HXT-DOM-XmlState.html#t%3AXmlStateFilter" >XmlStateFilter</A > state</TD ></TR ><TR ><TD CLASS="doc" >parses a text node with <TT ><A HREF="Text-XML-HXT-Parser-XmlParser.html#v%3AparseXmlDoc" >parseXmlDoc</A ></TT >, processes the DTD and general entities and transforms all char references into characters </TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v%3AprocessDTD" ></A ><B >processDTD</B > :: <A HREF="Text-XML-HXT-DOM-XmlState.html#t%3AXmlStateFilter" >XmlStateFilter</A > a</TD ></TR ><TR ><TD CLASS="doc" ><P >a filter for DTD processing </P ><P >inclusion of external parts of DTD, parameter entity substitution conditional section evaluation </P ><P >input tree must represent a complete document including root node </P ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="decl" ><A NAME="v%3AprocessGeneralEntities" ></A ><B >processGeneralEntities</B > :: <A HREF="Text-XML-HXT-DOM-XmlState.html#t%3AXmlStateFilter" >XmlStateFilter</A > a</TD ></TR ><TR ><TD CLASS="doc" ><P >substitution of general entities </P ><P >input: a complete document tree including root node </P ></TD ></TR ><TR ><TD CLASS="s15" ></TD ></TR ><TR ><TD CLASS="botbar" >Produced by <A HREF="http://www.haskell.org/haddock/" >Haddock</A > version 0.8</TD ></TR ></TABLE ></BODY ></HTML >