packages feed

HaXml 1.19.7 → 1.25.14

raw patch · 224 files changed

Files

− Build.bat
@@ -1,89 +0,0 @@-REM -- Build HaXml package using GHC
-REM
-REM    Usage: (case-sensitive)
-REM      Build         compile and install the HaXml library GHC package
-REM      Build Remove  remove the HaXml GHC library package
-REM      Build Tools   compile the tools shipped with HaXml
-
-rem -- Change the following variables (upto and including SRC)
-rem -- to suit the local system environment --
-
-rem    GHC version
-set GHCVER=6.4.2
-
-rem    GHC installation directory:
-set GHCDIR=C:\DEV\ghc\ghc-%GHCVER%
-
-rem    Programs needed to build HaXml:
-rem
-rem    NOTE: install MinGW linked from <http://www.mingw.org/>
-rem    for a copy of 'ar.exe'
-rem
-set GHC=C:\DEV\ghc\ghc-%GHCVER%\bin\ghc.exe
-set GHCPKG=C:\DEV\ghc\ghc-%GHCVER%\bin\ghc-pkg.exe
-set AR=C:\DEV\MinGW\bin\ar.exe
-set LD=C:\DEV\ghc\ghc-%GHCVER%\gcc-lib\ld.exe
-
-rem    Source directory for HaXml:
-set SRC=C:\DEV\Haskell\lib\HaXml-1.19.1\src
-
-rem    Two very long lines (500-600 chars) follow here.  
-rem    They should not need changing.
-set SRCS=Text/XML/HaXml.hs Text/XML/HaXml/Combinators.hs Text/XML/HaXml/Posn.hs Text/XML/HaXml/Lex.hs  Text/XML/HaXml/Parse.hs Text/XML/HaXml/Pretty.hs Text/XML/HaXml/Types.hs Text/XML/HaXml/Validate.hs Text/XML/HaXml/Wrappers.hs Text/XML/HaXml/OneOfN.hs Text/XML/HaXml/XmlContent.hs Text/XML/HaXml/TypeMapping.hs Text/XML/HaXml/Verbatim.hs Text/XML/HaXml/Escape.hs Text/XML/HaXml/SAX.hs Text/XML/HaXml/Html/Generate.hs Text/XML/HaXml/Html/Parse.hs Text/XML/HaXml/Html/Pretty.hs Text/XML/HaXml/Xtract/Combinators.hs Text/XML/HaXml/Xtract/Lex.hs Text/XML/HaXml/Xtract/Parse.hs Text/ParserCombinators/Poly.hs Text/ParserCombinators/PolyState.hs Text/ParserCombinators/TextParser.hs Text/ParserCombinators/PolyLazy.hs Text/ParserCombinators/PolyStateLazy.hs Text/XML/HaXml/ParseLazy.hs Text/XML/HaXml/Html/ParseLazy.hs
-set OBJS=Text/XML/HaXml.o Text/XML/HaXml/Combinators.o Text/XML/HaXml/Posn.o Text/XML/HaXml/Lex.o  Text/XML/HaXml/Parse.o Text/XML/HaXml/Pretty.o Text/XML/HaXml/Types.o Text/XML/HaXml/Validate.o Text/XML/HaXml/Wrappers.o Text/XML/HaXml/OneOfN.o Text/XML/HaXml/XmlContent.o Text/XML/HaXml/TypeMapping.o Text/XML/HaXml/Verbatim.o Text/XML/HaXml/Escape.o Text/XML/HaXml/SAX.o Text/XML/HaXml/Html/Generate.o Text/XML/HaXml/Html/Parse.o Text/XML/HaXml/Html/Pretty.o Text/XML/HaXml/Xtract/Combinators.o Text/XML/HaXml/Xtract/Lex.o Text/XML/HaXml/Xtract/Parse.o Text/ParserCombinators/Poly.o Text/ParserCombinators/PolyState.o Text/ParserCombinators/TextParser.o Text/ParserCombinators/PolyLazy.o Text/ParserCombinators/PolyStateLazy.o Text/XML/HaXml/ParseLazy.o Text/XML/HaXml/Html/ParseLazy.o
-
-
-rem -- Get on with the real work --
-
-if "%1"=="Remove" goto Remove
-if "%1"=="Tools" goto Tools
-
-rem -- Compile sources and create library archive
-if "%GHCVER%"=="6.4" COPY HaXml.cabal %SRC%\pkg.conf
-cd %SRC%
-%GHC% --make -cpp -i. -package-name HaXml %SRCS%
-%AR% r libHSHaXml.a %OBJS%
-
-rem -- Create library file for GHCi
-%LD% -r --whole-archive -o HSHaXml.o libHSHaXml.a
-
-rem -- Install the library archive(s) where GHC can find them
-COPY libHSHaXml.a %GHCDIR%
-COPY HSHaXml.o    %GHCDIR%
-
-rem -- Install the interface files where GHC can find them
-rem    /L - list only, /Y - overrite without confirmation
-rem    /S - copy subdirectories, /T - create directories only
-rem    /F - display full filenames while copying
-XCOPY /S /F *.hi %GHCDIR%\imports
-
-rem -- Finally, register the package with GHC
-if "%GHCVER%"=="6.2.2" %GHCPKG% --add-package -i pkg.conf
-if "%GHCVER%"=="6.4.2"   ECHO import-dirs:   %GHCDIR%\imports >>pkg.conf
-if "%GHCVER%"=="6.4.2"   ECHO library-dirs:  %GHCDIR% >>pkg.conf
-if "%GHCVER%"=="6.4.2"   ECHO depends:       base, haskell98, polyparse >>pkg.conf
-if "%GHCVER%"=="6.4.2"   ECHO hs-libraries:  HSHaXml >>pkg.conf
-if "%GHCVER%"=="6.4.2"   %GHCPKG% register pkg.conf
-
-goto Exit
-
-
-rem -- Remove GHC package for HaXml --
-:Remove
-%GHCPKG% --remove-package HaXml
-
-goto Exit
-
-
-rem -- Build tools that come with HaXml --
-:Tools
-cd %SRC%\tools
-for %%F in (Canonicalise  DtdToHaskell  MkOneOf  Validate  Xtract  CanonicaliseLazy  XtractLazy) DO %GHC% --make -cpp -i.. %%F -o %%F.exe
-cd ..
-
-goto Exit
-
-
-rem -- All done --
-
-:Exit
@@ -1,10 +1,6 @@ The HaXml library and tools were written by and are copyright to-    (c) copyright 1998-2006    Malcolm Wallace and Colin Runciman--The library incorporates the module Text.ParserCombinators.HuttonMeijerWallace-    (c) copyright 1996         Graham Hutton and Erik Meijer-with modifications-    (c) copyright 1998-2000    Malcolm Wallace+    (c) copyright 1998-1999    Malcolm Wallace and Colin Runciman+    (c) copyright 2000-2013    Malcolm Wallace  The HaXml library is licensed under the terms of the GNU Lesser General Public Licence (LGPL), which can be found in the file called@@ -20,9 +16,9 @@ complied with. ---- -The HaXml tools Xtract, Validate, DtdToHaskell, and MkOneOf, are-licensed under the terms of the GNU General Public Licence (GPL),-which can be found in the file called LICENCE-GPL.+The HaXml tools Xtract, Validate, DtdToHaskell, XsdToHaskell, and+MkOneOf, are licensed under the terms of the GNU General Public Licence+(GPL), which can be found in the file called LICENCE-GPL.  This library and toolset is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty@@ -31,4 +27,4 @@  If these licensing terms are not acceptable to you, please contact me for negotiation.  :-)-    Malcolm.Wallace@cs.york.ac.uk+    Malcolm.Wallace@me.com
+ Changelog.md view
@@ -0,0 +1,50 @@+## 1.25.14 (2024-12-12)+- fix inaccuracies in haskell generation code (#17 from @SiriusCourses):+  - Fix mkNamespace for case when QName is recognized at root element+  - Fix QName parser to recognize names with namespaces+  - Prevent multiple declarations after type lifting hoist+  - Inject groups from reference at topElementDecl+  - Fix bug unexcaped module name in generated haskell code+  - Add to Environment deriving for Show and Eq for simpler debug+  - Fix name with dashes for simpleType+- PrettyH*: Add missing pattern match to ppComment (#24 from @e-rk)+- Allow base-4.20 and filepath-1.5; bump CI to GHC 9.8 (#21, @andreasabel)+- allow base-4.22 for ghc-9.12 (#23, @juhp)++## 1.25.13 (2023-07-13)+- correct zero time duration P0S to PT0S (@dten, #16)+- allow ghc-9.6 base (@andreasabel, #15)+- allow bytestring-0.12 (@andreasabel, #18)++## 1.25.12 (2022-10-18)+- Allow parsing empty strings, avoiding space leak #13 (Teo Camarasu)++## 1.25.11 (2022-09-13)+- revert "allow empty text content #10" to avoid haxr memory leak++## 1.25.10 (2022-09-12)+- better pretty printer formatting #8 (Alexander Vieth)+- allow building with GHC 9.4 #9 (Andreas Abel)+- allow empty text content #10 (Teo Camarasu)++## 1.25.9 (2022-04-10)+- fix 1.25.7 regression in Xtract.Parse (#7 by Isaac van Bakel)+- comment typo fixes (#6 by Eric Lindblad)+- include README file++## 1.25.8 (2021-11-22)+- version the License tag in HaXml.cabal as LGPL-2.1 (#3)+- allow building with ghc 9.2 (#4)++## 1.25.7 (2021-10-15)+- many hlint fixes+- fix the rendering of time durations (#1)++## 1.25.6 (2021-09-26)++- GHC 8.8, 8.10, and 9.0 compatibility++## 1.25.5 (2018-10-30)++- GHC-8.4 and GHC-8.6 compatibility+  - Monoids have Semigroup instances
HaXml.cabal view
@@ -1,23 +1,39 @@-name:		HaXml-version:	1.19.7-license:	LGPL-license-file:	COPYRIGHT-author:		Malcolm Wallace <Malcolm.Wallace@cs.york.ac.uk>-maintainer:	author-homepage:	http://www.cs.york.ac.uk/fp/HaXml/-category:	Text, XML-synopsis:	Utilities for manipulating XML documents+cabal-version:  1.18+name:           HaXml+version:        1.25.14++license:        LGPL-2.1+license-files:  COPYRIGHT, LICENCE-GPL, LICENCE-LGPL+author:         Malcolm Wallace <Malcolm.Wallace@me.com>+maintainer:     Jens Petersen <juhpetersen@gmail.com>+homepage:       https://github.com/HaXml/HaXml+bug-reports:    https://github.com/HaXml/HaXml/issues+category:       Text, XML+synopsis:       Utilities for manipulating XML documents description:-	Haskell utilities for parsing, filtering, transforming and-	generating XML documents.+        Haskell utilities for parsing, filtering, transforming and+        generating XML documents. build-type:     Simple-cabal-version:  >=1.2+extra-doc-files: Changelog.md README -flag splitBase-  default: True-flag bytestringInBase-  default: False+tested-with:+  GHC ==9.8.2+   || ==9.6.6+   || ==9.4.8+   || ==9.2.8+   || ==9.0.2+   || ==8.10.7+   || ==8.8.4+   || ==8.6.5+   || ==8.4.4+   || ==8.2.2+   || ==8.0.2+   || ==7.10.3 +source-repository head+  type:      git+  location:  https://github.com/HaXml/HaXml.git+ library   exposed-modules:         Text.XML.HaXml,@@ -32,18 +48,29 @@         Text.XML.HaXml.Html.ParseLazy,         Text.XML.HaXml.Html.Pretty,         Text.XML.HaXml.Lex,+        Text.XML.HaXml.Namespaces,         Text.XML.HaXml.OneOfN,         Text.XML.HaXml.Parse,         Text.XML.HaXml.ParseLazy,         Text.XML.HaXml.Posn,         Text.XML.HaXml.Pretty,         Text.XML.HaXml.SAX,+        Text.XML.HaXml.Schema.Parse,+        Text.XML.HaXml.Schema.XSDTypeModel,+        Text.XML.HaXml.Schema.HaskellTypeModel,+        Text.XML.HaXml.Schema.NameConversion,+        Text.XML.HaXml.Schema.TypeConversion,+        Text.XML.HaXml.Schema.PrettyHaskell,+        Text.XML.HaXml.Schema.PrettyHsBoot,+        Text.XML.HaXml.Schema.PrimitiveTypes,+        Text.XML.HaXml.Schema.Environment,         Text.XML.HaXml.ShowXmlLazy,         Text.XML.HaXml.Types,         Text.XML.HaXml.TypeMapping,         Text.XML.HaXml.Util,         Text.XML.HaXml.Validate,         Text.XML.HaXml.Verbatim,+        Text.XML.HaXml.Version         Text.XML.HaXml.Wrappers,         Text.XML.HaXml.XmlContent,         Text.XML.HaXml.XmlContent.Parser,@@ -51,58 +78,87 @@         Text.XML.HaXml.Xtract.Combinators,         Text.XML.HaXml.Xtract.Lex,         Text.XML.HaXml.Xtract.Parse+  if impl(ghc)+    exposed-modules:+        Text.XML.HaXml.Schema.Schema   hs-source-dirs: src-  build-depends: base, haskell98, polyparse==1.2, filepath-  if flag(splitBase)-    build-depends: base >= 3, pretty, random, containers-  else-    build-depends: base < 3-  if flag(bytestringInBase)-    build-depends: base >= 2 && < 3-  else-    build-depends: base < 2 || >= 3, bytestring-  extensions: CPP, ExistentialQuantification-  cpp-options: -DVERSION=1.19.7+  build-depends:+    base       >= 4.3.1.0  && < 4.22,+    bytestring >= 0.9.1.10 && < 0.13,+    containers >= 0.4.0.0  && <0.8,+    filepath   >= 1.2.0.0  && <1.6,+    pretty     >= 1.0.1.2  && <1.2,+    random     >= 1.0      && <1.3,+    polyparse  >= 1.12.1   && <1.14+  if !impl(ghc >= 8.0)+    build-depends:+      semigroups >= 0.18.5  && < 0.19+  default-language: Haskell98+  default-extensions: CPP, ExistentialQuantification   nhc98-options: -K10M+  if impl(ghc >= 8.2)+    ghc-options:       -fhide-source-paths  Executable Canonicalise   GHC-Options: -Wall-  Extensions:  CPP-  Hs-Source-Dirs: src/tools, src+  Default-Language: Haskell98+  Default-Extensions:  CPP+  Hs-Source-Dirs: src/tools   Main-Is: Canonicalise.hs+  build-depends: base, HaXml, pretty  Executable CanonicaliseLazy   GHC-Options: -Wall-  Extensions:  CPP-  Hs-Source-Dirs: src/tools, src+  Default-Language: Haskell98+  Default-Extensions:  CPP+  Hs-Source-Dirs: src/tools   Main-Is: CanonicaliseLazy.hs+  build-depends: base, HaXml, pretty  Executable Xtract   GHC-Options: -Wall-  Extensions:  CPP-  Hs-Source-Dirs: src/tools, src+  Default-Language: Haskell98+  Default-Extensions:  CPP+  Hs-Source-Dirs: src/tools   Main-Is: Xtract.hs--Executable XtractLazy-  GHC-Options: -Wall-  Extensions:  CPP-  Hs-Source-Dirs: src/tools, src-  Main-Is: XtractLazy.hs+  build-depends: base, HaXml, pretty  Executable Validate   GHC-Options: -Wall-  Extensions:  CPP-  Hs-Source-Dirs: src/tools, src+  Default-Language: Haskell98+  Default-Extensions:  CPP+  Hs-Source-Dirs: src/tools   Main-Is: Validate.hs+  build-depends: base, HaXml  Executable MkOneOf   GHC-Options: -Wall-  Extensions:  CPP-  Hs-Source-Dirs: src/tools, src+  Default-Language: Haskell98+  Default-Extensions:  CPP+  Hs-Source-Dirs: src/tools   Main-Is: MkOneOf.hs+  build-depends: base, HaXml  Executable DtdToHaskell   GHC-Options: -Wall-  Extensions:  CPP-  Hs-Source-Dirs: src/tools, src+  Default-Language: Haskell98+  Default-Extensions:  CPP+  Hs-Source-Dirs: src/tools   Main-Is: DtdToHaskell.hs+  build-depends: base, HaXml, pretty++Executable XsdToHaskell+  GHC-Options: -Wall+  Default-Language: Haskell98+  Default-Extensions:  CPP+  Hs-Source-Dirs: src/tools+  Main-Is: XsdToHaskell.hs+  build-depends: base, HaXml, pretty, polyparse, directory++Executable FpMLToHaskell+  GHC-Options: -Wall+  Default-Language: Haskell98+  Default-Extensions:  CPP+  Hs-Source-Dirs: src/tools+  Main-Is: FpMLToHaskell.hs+  build-depends: base, HaXml, pretty, polyparse, directory
LICENCE-GPL view
@@ -2,7 +2,8 @@ 		       Version 2, June 1991   Copyright (C) 1989, 1991 Free Software Foundation, Inc.-     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA+     51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA+  Everyone is permitted to copy and distribute verbatim copies  of this license document, but changing it is not allowed. 
LICENCE-LGPL view
@@ -2,7 +2,8 @@                        Version 2.1, February 1999   Copyright (C) 1991, 1999 Free Software Foundation, Inc.-     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA+     51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA+  Everyone is permitted to copy and distribute verbatim copies  of this license document, but changing it is not allowed. 
− Makefile
@@ -1,127 +0,0 @@-SOFTWARE = HaXml-VERSION  = 1.19.7--#CPP      = cpp -traditional-CPP     = cpphs --text --noline	# useful e.g. on MacOS X--DIRS = Text Text/XML Text/XML/HaXml Text/XML/HaXml/Html \-	Text/XML/HaXml/Xtract Text/XML/HaXml/DtdToHaskell \-	Text/XML/HaXml/XmlContent--SRCS = \-	src/Text/XML/HaXml.hs src/Text/XML/HaXml/Combinators.hs \-	src/Text/XML/HaXml/Posn.hs src/Text/XML/HaXml/Lex.hs \-	src/Text/XML/HaXml/Parse.hs src/Text/XML/HaXml/Pretty.hs \-	src/Text/XML/HaXml/Types.hs src/Text/XML/HaXml/Validate.hs \-	src/Text/XML/HaXml/Wrappers.hs \-	src/Text/XML/HaXml/Verbatim.hs src/Text/XML/HaXml/Escape.hs \-	src/Text/XML/HaXml/OneOfN.hs \-	src/Text/XML/HaXml/ParseLazy.hs \-	src/Text/XML/HaXml/ByteStringPP.hs \-	src/Text/XML/HaXml/TypeMapping.hs \-	src/Text/XML/HaXml/XmlContent.hs \-	src/Text/XML/HaXml/XmlContent/Parser.hs \-	src/Text/XML/HaXml/XmlContent/Haskell.hs \-	src/Text/XML/HaXml/SAX.hs \-	src/Text/XML/HaXml/ShowXmlLazy.hs \-	src/Text/XML/HaXml/Util.hs \-	src/Text/XML/HaXml/Html/Generate.hs src/Text/XML/HaXml/Html/Parse.hs \-	src/Text/XML/HaXml/Html/Pretty.hs \-	src/Text/XML/HaXml/Html/ParseLazy.hs \-	src/Text/XML/HaXml/Xtract/Combinators.hs \-	src/Text/XML/HaXml/Xtract/Lex.hs \-	src/Text/XML/HaXml/Xtract/Parse.hs \-	src/Text/XML/HaXml/DtdToHaskell/TypeDef.hs \-	src/Text/XML/HaXml/DtdToHaskell/Convert.hs \-	src/Text/XML/HaXml/DtdToHaskell/Instance.hs \--TOOLSRCS = \-	src/tools/DtdToHaskell.hs src/tools/Xtract.hs src/tools/Validate.hs \-	src/tools/Canonicalise.hs src/tools/MkOneOf.hs \-	src/tools/CanonicaliseLazy.hs src/tools/XtractLazy.hs \--AUX =	configure Makefile src/Makefile src/pkg.conf docs/* examples/* \-	README LICENCE* COPYRIGHT script/echo.c rpm.spec Build.bat \-	HaXml.cabal Setup.hs-ALLFILES = $(SRCS) $(TOOLSRCS) $(AUX)-# These files in CVS are NOT included in the src distribution.-NOT =	Makefile.inc Makefile.nhc98 src/Makefile.inc src/Makefile.nhc98--.PHONY: all libs tools haddock install register--COMPILERS = $(shell cat obj/compilers)-LIBS  = $(patsubst %, libs-%, $(COMPILERS))-TOOLS = $(patsubst %, tools-%, $(COMPILERS))-INSTALL = $(patsubst %, install-%, $(COMPILERS))-FILESONLY = $(patsubst %, install-filesonly-%, $(COMPILERS))--all: $(LIBS) $(TOOLS)-libs: $(LIBS)-tools: $(TOOLS)-install: $(INSTALL)-install-filesonly: $(FILESONLY)-libs-ghc:-	cd obj/ghc; $(MAKE) HC=$(shell cat obj/ghccmd) libs-libs-nhc98:-	cd obj/nhc98; $(MAKE) HC=nhc98 libs-libs-hugs:-	@echo "No building required for Hugs version of HaXml libs."-tools-ghc:-	cd obj/ghc; $(MAKE) HC=$(shell cat obj/ghccmd) toolset-tools-nhc98:-	cd obj/nhc98; $(MAKE) HC=nhc98 toolset-tools-hugs:-	@echo "No building required for Hugs version of HaXml tools."-install-ghc:-	cd obj/ghc; $(MAKE) HC=$(shell cat obj/ghccmd) install-ghc-install-nhc98:-	cd obj/nhc98; $(MAKE) HC=nhc98 install-nhc98-install-hugs:-	hugs-package src-	cd obj/hugs; $(MAKE) install-tools-hugs-install-filesonly-ghc:-	cd obj/ghc; $(MAKE) HC=$(shell cat obj/ghccmd) install-filesonly-ghc-install-filesonly-nhc98:-	cd obj/nhc98; $(MAKE) HC=nhc98 install-filesonly-nhc98-install-filesonly-hugs: install-hugs-haddock:-	mkdir -p docs/HaXml-	for dir in $(DIRS); \-		do mkdir -p docs/HaXml/src/$$dir; \-		done-	for file in $(SRCS); \-		do $(CPP) -D__NHC__ $$file >$$file.uncpp; \-		   HsColour -anchor -html $$file >docs/HaXml/`dirname $$file`/`basename $$file .hs`.html; \-		done-	haddock --html --title=HaXml --odir=docs/HaXml --package=HaXml \-		--source-module="src/%{MODULE/.//}.html" \-		--source-entity="src/%{MODULE/.//}.html#%{NAME}" \-		$(patsubst %, %.uncpp, $(SRCS))-	rm -f $(patsubst %, %.uncpp, $(SRCS))--# packaging a distribution--srcDist: $(ALLFILES) haddock-	rm -f $(SOFTWARE)-$(VERSION).tar $(SOFTWARE)-$(VERSION).tar.gz-	mkdir $(SOFTWARE)-$(VERSION)-	tar cf - $(ALLFILES) | ( cd $(SOFTWARE)-$(VERSION); tar xf - )-	tar cf $(SOFTWARE)-$(VERSION).tar $(SOFTWARE)-$(VERSION)-	rm -rf $(SOFTWARE)-$(VERSION)-	gzip $(SOFTWARE)-$(VERSION).tar--zipDist: $(ALLFILES) haddock-	rm -f $(SOFTWARE)-$(VERSION).zip-	mkdir $(SOFTWARE)-$(VERSION)-	tar cf - $(ALLFILES) | ( cd $(SOFTWARE)-$(VERSION); tar xf - )-	zip -r $(SOFTWARE)-$(VERSION).zip $(SOFTWARE)-$(VERSION)-	rm -rf $(SOFTWARE)-$(VERSION)---# clear up rubbish-clean:-	rm -rf obj/ghc obj/nhc98 obj/hugs-	cd examples;    rm -f *.hi *.o-realclean: clean-	rm -f DtdToHaskell Xtract Validate Canonicalise MkOneOf-	rm -f XtractLazy CanonicaliseLazy-
README view
@@ -12,6 +12,10 @@  For newer compilers, use Cabal to build and install: +    cabal install++or +     runhaskell Setup.hs configure     runhaskell Setup.hs build     runhaskell Setup.hs install@@ -27,7 +31,7 @@     --prefix=...     e.g. /usr/local/bin, installation location for HaXml tools  Complaints to:  :-)-    Malcolm.Wallace@cs.york.ac.uk+    Malcolm.Wallace@me.com  P.S.     For those building on Windows /without/ Cygwin, you can avoid the need@@ -68,6 +72,18 @@ 	Pretty.hs	An HTML-specific pretty-printer. 	Generate.hs	Some useful combinators for generating HTML content. +  src/Text/XML/HaXml/Schema	Extra support modules for processing Schema.+	XSDTypeModel.hs		A representation of the datatype model of+				Xml Schema in terms of XSD concepts.+	HaskellTypeModel.hs	A representation of the datatype model of+				Xml Schema in terms of Haskell datatypes.+	Parse.hs		Parser from an XSD document to the XSD+				type model above.+	TypeConversion.hs	Translate from the XSD model to the Haskell+				model.+	PrettyHaskell.hs	Generate Haskell sourcecode from the Haskell+				type model.+   src/tools/		Standalone tools based on the library above. 	DtdToHaskell	Translates an XML doc containing a DTD into a Haskell 			module containing data/newtype definitions.@@ -82,6 +98,9 @@ 			its required instance of XmlContent.  Sometimes types 			larger than OneOf20 are required in code generated by 			DtdToHaskell.+	XsdToHaskell	Translates an XSD schema into a Haskell module.+	FpMLToHaskell	Translates the set of XSD schemas defining the FpML+			language into a set of Haskell modules.    src/Text/XML/HaXml/Xtract	Internal APIs of the Xtract tool. 	Parse.hs	Parse an XPath query to produce a filter.
− Setup.hs
@@ -1,2 +0,0 @@-import Distribution.Simple-main = defaultMain
− configure
@@ -1,316 +0,0 @@-#!/bin/sh-#       configure -- prepare to compile/install the HaXml package-#       author:   Malcolm.Wallace@cs.york.ac.uk, August 2002--VERSION="1.19.6"--if [ -f obj/prefix ]-then INSTALLDIR=`cat obj/prefix`-else INSTALLDIR=/usr/local/bin-fi--# We need a working `echo' command: at least Solaris2.6 may not have it.-CCC=${CC-gcc}-case `echo -n hello | wc -c | ( read n ; echo $n )` in-    5) ;;-    *) echo "The builtin 'echo' command doesn't do '-n' - emulating it."-       $CCC -o script/echo script/echo.c-       echo () { $PWD/script/echo "$@"; } ;;-esac--# We need a working `which' command: CYGWIN at least doesn't have it,-#  and some installed 'which's behave badly, e.g. Solaris, OSF/1.-which () {-  ( for path in `echo \"$PATH\" | sed -e 's/:/\" \"/g'`-    do-      thefile=`echo $path | tr -d "\""`/$1-      if [ -f "$thefile" -a -x "$thefile" ]-      then echo $thefile-           exit 0-      fi-    done; exit 1 )-}--DARWIN=false-CYGWIN=false-MINGW=false-SUNOS=false-case `uname -s` in-  CYGWIN*) CYGWIN=true;;-  MINGW*)  MINGW=true ;;-  Darwin*) DARWIN=true ;;-  SunOS*)  SUNOS=true ;;-esac--# Process command-line arguments-while [ "$1" != "" ]-do-  case $1 in-    --buildwith=*)  BUILDWITH=`echo "$1" | cut -c13-` ;;-    --buildopts=*)  BUILDOPTS=$BUILDOPTS" "`echo "$1" | cut -c13-` ;;-    --prefix=*)     INSTALLDIR=`echo "$1" | cut -c10-` ;;-    --help|-h)-  echo "`basename $0` options:     [default in brackets]"-  echo "  --buildwith=(ghc|hugs|nhc98) Build HaXml for the given compiler [detected]"-  echo "  --buildopts=flags    Give extra flags needed by your build compiler [none]"-  echo "  --prefix=bindir      Installed executables go in bindir [/usr/local/bin]"-            exit 0 ;;-    --version|-v) echo "HaXml:     $VERSION"-                  exit 0 ;;-    *) echo "`basename $0`: unrecognised option $1"-       echo '    (use --help for option information)'-       exit 1 ;;-  esac-  shift-done--echo "Looking for Haskell compilers:"-# Assume that we start out with a blank config.-HMAKEKNOWN=-GHCKNOWN=-NHCKNOWN=-HUGSKNOWN=-HMAKENUM=0-GHCNUM=0-NHCNUM=0-HUGSNUM=0--echo -n "  Looking for hmake... "-if which hmake >/dev/null 2>&1-then-  HMAKEKNOWN=`which hmake`-  HMAKEVERSION=`${HMAKEKNOWN} --version | head -1 | cut -d' ' -f2`-  HMAKENUM=`echo $HMAKEVERSION | tr "v." "  " | ( read x y z; echo $x$y )`-fi-if [ "$HMAKEKNOWN" != "" ]-then echo "found ${HMAKEVERSION}"-else echo "(not found)"-fi--echo -n "  Looking for ghc...   "-if which ghc >/dev/null 2>&1-then-  GHCKNOWN=`which ghc`-  GHCVERSION=`${GHCKNOWN} --version 2>&1 | sed 's/^.*version[ ]*\([0-9.]*\).*/\1/'`-  GHCNUM=`echo $GHCVERSION | tr "v." "  " | ( read x y z; echo $x$y; )`-  if [ "$GHCNUM" -lt "100" ]-  then GHCNUM=${GHCNUM}0-  fi-fi-if [ "$GHCKNOWN" = "" ]-then echo "(not found)"-else echo "found ${GHCVERSION}"-     if [ "$GHCNUM" -lt "602" ]-     then  echo "    Warning: HaXml needs ghc-6.2 or later.  Ignoring ghc."-           GHCKNOWN=-     else  GHCLIBDIR=`${GHCKNOWN} -v 2>&1 | grep ' package config file: ' | head -1 | sed 's/.* package config file: //'`-           if $CYGWIN; then GHCLIBDIR=`cygpath -u $GHCLIBDIR`; fi-           if $MINGW; then GHCLIBDIR=`echo $GHCLIBDIR | tr '\\\\' '/'`; fi-           GHCLIBDIR=`dirname $GHCLIBDIR`-           GHCINCDIR=$GHCLIBDIR/imports-     fi-fi--# There may be another version of ghc to look for.-if [ -n "$BUILDWITH" ]-then-if [ "`basename $BUILDWITH | cut -c1-3`" = "ghc" ]-then-  VER=`basename $BUILDWITH | cut -c5-`-  if [ -n "$VER" -a "$VER" != "$GHCVERSION" ]-  then-    echo -n "  Looking for $BUILDWITH...   "-    if which $BUILDWITH >/dev/null 2>&1-    then-      GHC2KNOWN=`which $BUILDWITH`-      GHC2VERSION=`${GHC2KNOWN} --version 2>&1 | sed 's/^.*version[ ]*\([0-9.]*\).*/\1/'`-      GHC2NUM=`echo $GHC2VERSION | tr "." " " | ( read x y z; echo $x$y; )`-      if [ "$GHC2NUM" -lt "100" ]-      then GHC2NUM=${GHC2NUM}0-      fi-    fi-    if [ "$GHC2KNOWN" = "" ]-    then  echo "(not found)"-    else  echo "found ${GHC2VERSION}"-          if [ "$GHC2NUM" -lt "602" ]-          then echo "    Warning: HaXml needs ghc-6.2 or later.  Ignoring."-               GHC2KNOWN=-          else GHCKNOWN="$GHC2KNOWN"-               GHCVERSION="$GHC2VERSION"-               GHCNUM="$GHC2NUM"-               GHCLIBDIR=`${GHCKNOWN} -v 2>&1 | grep ' package config file: ' | head -1 | sed 's/.* package config file: //'`-               if $CYGWIN; then GHCLIBDIR=`cygpath -u $GHCLIBDIR`; fi-               if $MINGW; then GHCLIBDIR=`echo $GHCLIBDIR | tr '\\\\' '/'`; fi-               GHCLIBDIR=`dirname $GHCLIBDIR`-               GHCINCDIR=$GHCLIBDIR/imports-          fi-    fi-  fi-fi-fi--echo -n "  Looking for nhc98... "-if which nhc98 >/dev/null 2>&1-then-  NHCKNOWN=`which nhc98`-  NHCVERSION=`${NHCKNOWN} --version | head -1 | cut -d' ' -f2`-  NHCNUM=`echo $NHCVERSION | tr "v." "  " | ( read x y z; echo $x$y )`-fi-if [ "$NHCKNOWN" = "" ]-then  echo "(not found)"-else  echo "found ${NHCVERSION}"-     if [ "$HMAKENUM" -lt "306" ]-     then echo "    Warning: building with nhc98 needs hmake-3.06 or later."-          echo "    Available from:   http://www.haskell.org/hmake/"-     fi-     if [ "$NHCNUM" -lt "116" ]-     then  echo "    Warning: HaXml needs nhc98-1.16 or later.  Ignoring nhc98."-           NHCKNOWN=-     else  NHCLIBDIR=`grep '^NHC98LIBDIR' $NHCKNOWN | cut -c27- | cut -d'}' -f1 | head -1`-           NHCINCDIR=`grep '^NHC98INCDIR' $NHCKNOWN | cut -c27- | cut -d'}' -f1 | head -1`-     fi-fi--month() {-  read mon yr;-  case $mon in-    Jan*) echo 01;;-    Feb*) echo 02;;-    Mar*) echo 03;;-    Apr*) echo 04;;-    May)  echo 05;;-    Jun*) echo 06;;-    Jul*) echo 07;;-    Aug*) echo 08;;-    Sep*) echo 09;;-    Oct*) echo 10;;-    Nov*) echo 11;;-    Dec*) echo 12;;-    *)    echo 00;;-  esac;-}--echo -n "  Looking for hugs...  "-if which hugs >/dev/null 2>&1-then-  HUGSKNOWN=`which hugs`-  HUGSVERSION=`echo :q | $HUGSKNOWN 2>/dev/null | grep Version | cut -c18-32`-  HUGSNUM=`echo $HUGSVERSION | cut -d' ' -f2`-  HUGSNUM=$HUGSNUM`echo $HUGSVERSION | month`-fi-if [ "$HUGSKNOWN" = "" ]-then  echo "(not found)"-else  echo "found ${HUGSVERSION}"-  if [ "$HUGSNUM" -lt "200309" ]-  then  echo "    Warning: HaXml configuration only supports Hugs >= Sept 2003."-        HUGSKNOWN=-  fi-fi--if [ ! -z "$BUILDWITH" ]-then-  echo "  You want to build for only...  $BUILDWITH"-  if [ "`echo $BUILDWITH | cut -c1-3`" = "ghc" ]-  then-    if [ -z "$GHCKNOWN" ]-    then echo '   *** Did not find ghc - cannot continue.'-         exit 1-    else NHCKNOWN=-         HUGSKNOWN=-    fi-  else if [ "$BUILDWITH" = "nhc98" ]-  then-    if [ -z "$NHCKNOWN" ]-    then echo '   *** Did not find nhc98 - cannot continue.'-         exit 1-    else GHCKNOWN=-         HUGSKNOWN=-    fi-  else if [ "`echo $BUILDWITH | cut -c1-4`" = "hugs" ]-  then-    if [ -z "$HUGSKNOWN" ]-    then echo '   *** Did not find hugs - cannot continue.'-         exit 1-    else GHCKNOWN=-         NHCKNOWN=-    fi-  else echo '   *** I do not recognise this compiler:' $BUILDWITH-       exit 1-  fi;fi;fi;-fi--echo "  Executables install into... $INSTALLDIR"-echo "    (note: no extra /bin will be added to the end of that location)"-echo "    (      re-run ./configure --prefix=... if this wasn't your intention)"--# Prepare to build.-if [ ! -d obj ]-then mkdir obj-fi-if [ -f obj/compilers ]-then rm obj/compilers-fi-if [ "$HUGSKNOWN" != "" ]-then-  echo hugs >>obj/compilers-  if [ ! -d obj/hugs ]-  then mkdir obj/hugs-  fi-  cp -Rp src/tools src/Makefile obj/hugs-fi-if [ "$GHCKNOWN" != "" ]-then-  echo ghc >>obj/compilers-  if [ ! -d obj/ghc ]-  then mkdir obj/ghc-  fi-  echo $GHCLIBDIR >obj/ghc/ghclibdir-  echo $GHCINCDIR >obj/ghc/ghcincdir-  if $CYGWIN || $MINGW-    then cygpath -w ${GHCLIBDIR} >obj/ghc/ghclibdirraw-         cygpath -w ${GHCINCDIR}/ >obj/ghc/ghcincdirraw-    else echo ${GHCLIBDIR} >obj/ghc/ghclibdirraw-         echo ${GHCINCDIR}/ >obj/ghc/ghcincdirraw-  fi-  if ghc-pkg-$GHCVERSION -l >/dev/null-    then echo ghc-pkg-$GHCVERSION >obj/ghc/ghcpkgcmd-    else echo ghc-pkg >obj/ghc/ghcpkgcmd-  fi-  echo ${BUILDWITH-ghc} >obj/ghccmd-  cp -Rp src/Text src/tools src/Makefile src/pkg.conf obj/ghc-  if [ "$GHCNUM" -ge "504" ]-  then echo "-package base -package polyparse" >obj/ghc/ghcpkgs-  else echo "-package lang -package data -package polyparse" >obj/ghc/ghcpkgs-  fi-fi-if [ "$NHCKNOWN" != "" ]-then-  echo nhc98 >>obj/compilers-  if [ ! -d obj/nhc98 ]-  then mkdir obj/nhc98-  fi-  echo $NHCLIBDIR >obj/nhc98/nhc98libdir-  echo $NHCINCDIR >obj/nhc98/nhc98incdir-  cp -Rp src/Text src/tools src/Makefile obj/nhc98-  if [ "$NHCNUM" -ge "116" ]-  then rm -rf obj/ghc/Text/PrettyPrint-       echo "-package base -package polyparse -package fps" >obj/nhc98/nhc98pkgs-  else echo "" >obj/nhc98/nhc98pkgs-  fi-fi--echo $INSTALLDIR >obj/prefix-if $CYGWIN || $MINGW ; then echo .exe >obj/exe; else touch obj/exe; fi-if $CYGWIN || $MINGW ;-  then echo mv main.exe >obj/out;-  else if [ "$GHCNUM" -lt "606" ]-       then echo mv a.out   >obj/out-       else echo echo Built >obj/out-       fi-fi-if $DARWIN ; then echo "-all_load -x"; else echo --whole-archive; fi >obj/ldopt-if $SUNOS ; then echo "-z allextract" >obj/ldopt; fi---echo "Ready to build.  Type 'make' then (as root) 'make install'."-exit 0
− docs/Combinators.html
@@ -1,42 +0,0 @@-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">-<html>-<head>-<title>-  HaXml: Haskell and XML-</title>-</head>--<body bgcolor='#ffffff'>--<center>-<h2>Combinators</h2>-</center>-<hr>--<p>-<b>Text.XML.HaXml.Combinators</b> is a combinator library for-generating, editing, and transforming XML documents in a generic-setting.--<p>-<b>Text.XML.HaXml.Html.Generate</b> is a small library of functions-specifically for generating HTML from XML.--<p>-<b>Text.XML.HaXml.Wrappers</b> contains the wrapper-<b>processXmlWith</b>, in which input files are parsed as HTML if the-filename ends in .html or .htm - otherwise they are parsed as XML.--<p>-<b>Usage:</b> <tt>import Text.XML.HaXml.Combinators</tt><br>--<p>-<b>Limitations</b><br>-Note that the combinator library defines the functions <tt>elm</tt> and-<tt>txt</tt> rather than the expected (<tt>elem</tt>-and <tt>text</tt>), to avoid a nasty name clash with a Prelude function.--<hr>--</body>-</html>
− docs/HaXml/Text-XML-HaXml-ByteStringPP.html
@@ -1,441 +0,0 @@-<!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.HaXml.ByteStringPP</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"->HaXml</TD-><TD CLASS="topbut"-><A HREF="src/Text/XML/HaXml/ByteStringPP.html"->Source code</A-></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.HaXml.ByteStringPP</FONT-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="section4"-><B->Contents</B-></TD-></TR-><TR-><TD-><DL-><DT-><A HREF="#1"->Pretty-print a whole document-</A-></DT-><DD-><DL-><DT-><A HREF="#2"->Just one content-</A-></DT-><DT-><A HREF="#3"->Just one tagged element-</A-></DT-></DL-></DD-><DT-><A HREF="#4"->Pretty-print just a DTD-</A-></DT-><DD-><DL-><DT-><A HREF="#5"->The prolog-</A-></DT-><DT-><A HREF="#6"->A content particle description-</A-></DT-></DL-></DD-></DL-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section1"->Description</TD-></TR-><TR-><TD CLASS="doc"->This is a fast non-pretty-printer for turning the internal representation-   of generic structured XML documents into Lazy ByteStrings.-   Like in Text.Xml.HaXml.Pretty, there is one pp function for each type in-   Text.Xml.HaXml.Types, so you can pretty-print as much or as little-   of the document as you wish.-</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%3Adocument"->document</A-> :: <A HREF="Text-XML-HaXml-Types.html#t%3ADocument"->Document</A-> i -&gt; ByteString</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Acontent"->content</A-> :: <A HREF="Text-XML-HaXml-Types.html#t%3AContent"->Content</A-> i -&gt; ByteString</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Aelement"->element</A-> :: <A HREF="Text-XML-HaXml-Types.html#t%3AElement"->Element</A-> i -&gt; ByteString</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Adoctypedecl"->doctypedecl</A-> :: <A HREF="Text-XML-HaXml-Types.html#t%3ADocTypeDecl"->DocTypeDecl</A-> -&gt; ByteString</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Aprolog"->prolog</A-> :: <A HREF="Text-XML-HaXml-Types.html#t%3AProlog"->Prolog</A-> -&gt; ByteString</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Acp"->cp</A-> :: <A HREF="Text-XML-HaXml-Types.html#t%3ACP"->CP</A-> -&gt; ByteString</TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section1"-><A NAME="1"->Pretty-print a whole document-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Adocument"-></A-><B->document</B-> :: <A HREF="Text-XML-HaXml-Types.html#t%3ADocument"->Document</A-> i -&gt; ByteString</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/ByteStringPP.html#document"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section2"-><A NAME="2"->Just one content-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Acontent"-></A-><B->content</B-> :: <A HREF="Text-XML-HaXml-Types.html#t%3AContent"->Content</A-> i -&gt; ByteString</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/ByteStringPP.html#content"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section2"-><A NAME="3"->Just one tagged element-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Aelement"-></A-><B->element</B-> :: <A HREF="Text-XML-HaXml-Types.html#t%3AElement"->Element</A-> i -&gt; ByteString</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/ByteStringPP.html#element"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section1"-><A NAME="4"->Pretty-print just a DTD-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Adoctypedecl"-></A-><B->doctypedecl</B-> :: <A HREF="Text-XML-HaXml-Types.html#t%3ADocTypeDecl"->DocTypeDecl</A-> -&gt; ByteString</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/ByteStringPP.html#doctypedecl"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section2"-><A NAME="5"->The prolog-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Aprolog"-></A-><B->prolog</B-> :: <A HREF="Text-XML-HaXml-Types.html#t%3AProlog"->Prolog</A-> -&gt; ByteString</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/ByteStringPP.html#prolog"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section2"-><A NAME="6"->A content particle description-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Acp"-></A-><B->cp</B-> :: <A HREF="Text-XML-HaXml-Types.html#t%3ACP"->CP</A-> -&gt; ByteString</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/ByteStringPP.html#cp"->Source</A-></TD-></TR-></TABLE-></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->
− docs/HaXml/Text-XML-HaXml-Combinators.html
@@ -1,2777 +0,0 @@-<!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.HaXml.Combinators</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"->HaXml</TD-><TD CLASS="topbut"-><A HREF="src/Text/XML/HaXml/Combinators.html"->Source code</A-></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.HaXml.Combinators</FONT-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="section4"-><B->Contents</B-></TD-></TR-><TR-><TD-><DL-><DT-><A HREF="#1"->The content filter type.-</A-></DT-><DT-><A HREF="#2"->Simple filters.-</A-></DT-><DD-><DL-><DT-><A HREF="#3"->Selection filters.-</A-></DT-><DT-><A HREF="#4"->Predicate filters.-</A-></DT-><DT-><A HREF="#5"->Search filters.-</A-></DT-></DL-></DD-><DT-><A HREF="#6"->Filter combinators-</A-></DT-><DD-><DL-><DT-><A HREF="#7"->Basic combinators.-</A-></DT-><DT-><A HREF="#8"->Recursive search.-</A-></DT-><DT-><A HREF="#9"->Interior editing.-</A-></DT-><DT-><A HREF="#10"->Constructive filters.-</A-></DT-></DL-></DD-><DT-><A HREF="#11"->C-like conditionals.-</A-></DT-><DT-><A HREF="#12"->Filters with labelled results.-</A-></DT-><DD-><DL-><DT-><A HREF="#13"->Using and combining labelled filters.-</A-></DT-><DT-><A HREF="#14"->Some label-generating filters.-</A-></DT-></DL-></DD-></DL-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section1"->Description</TD-></TR-><TR-><TD CLASS="doc"-><P->This module defines the notion of filters and filter combinators-   for processing XML documents.-</P-><P->These XML transformation combinators are described in the paper-   ``Haskell and XML: Generic Combinators or Type-Based Translation?''-   Malcolm Wallace and Colin Runciman, Proceedings ICFP'99.-</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"-><SPAN CLASS="keyword"->type</SPAN-> <A HREF="#t%3ACFilter"->CFilter</A-> i = <A HREF="Text-XML-HaXml-Types.html#t%3AContent"->Content</A-> i -&gt; [<A HREF="Text-XML-HaXml-Types.html#t%3AContent"->Content</A-> i]</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Akeep"->keep</A-> :: a -&gt; [a]</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Anone"->none</A-> :: a -&gt; [b]</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Achildren"->children</A-> :: <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Aposition"->position</A-> :: Int -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Aelm"->elm</A-> :: <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Atxt"->txt</A-> :: <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Atag"->tag</A-> :: String -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Aattr"->attr</A-> :: <A HREF="Text-XML-HaXml-Types.html#t%3AName"->Name</A-> -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Aattrval"->attrval</A-> :: <A HREF="Text-XML-HaXml-Types.html#t%3AAttribute"->Attribute</A-> -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AtagWith"->tagWith</A-> :: (String -&gt; Bool) -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Afind"->find</A-> :: String -&gt; (String -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i) -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Aiffind"->iffind</A-> :: String -&gt; (String -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i) -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AifTxt"->ifTxt</A-> :: (String -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i) -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Ao"->o</A-> :: <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Aunion"->union</A-> :: (a -&gt; [b]) -&gt; (a -&gt; [b]) -&gt; a -&gt; [b]</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Acat"->cat</A-> :: [a -&gt; [b]] -&gt; a -&gt; [b]</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AandThen"->andThen</A-> :: (a -&gt; c) -&gt; (c -&gt; a -&gt; b) -&gt; a -&gt; b</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3A%7C%3E%7C"->(|&gt;|)</A-> :: (a -&gt; [b]) -&gt; (a -&gt; [b]) -&gt; a -&gt; [b]</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Awith"->with</A-> :: <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Awithout"->without</A-> :: <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3A%2F%3E"->(/&gt;)</A-> :: <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3A%3C%2F"->(&lt;/)</A-> :: <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Aet"->et</A-> :: (String -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i) -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Apath"->path</A-> :: [<A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i] -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Adeep"->deep</A-> :: <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Adeepest"->deepest</A-> :: <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Amulti"->multi</A-> :: <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Awhen"->when</A-> :: <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Aguards"->guards</A-> :: <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Achip"->chip</A-> :: <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Ainplace"->inplace</A-> :: <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AfoldXml"->foldXml</A-> :: <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AmkElem"->mkElem</A-> :: String -&gt; [<A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i] -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AmkElemAttr"->mkElemAttr</A-> :: String -&gt; [(String, <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i)] -&gt; [<A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i] -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Aliteral"->literal</A-> :: String -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Acdata"->cdata</A-> :: String -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AreplaceTag"->replaceTag</A-> :: String -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AreplaceAttrs"->replaceAttrs</A-> :: [(String, String)] -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->data</SPAN-> <A HREF="#t%3AThenElse"->ThenElse</A-> a = <A HREF="#v%3A%3A%3E"->(:&gt;)</A-> a a</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3A%3F%3E"->(?&gt;)</A-> :: (a -&gt; [b]) -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3AThenElse"->ThenElse</A-> (a -&gt; [b]) -&gt; a -&gt; [b]</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->type</SPAN-> <A HREF="#t%3ALabelFilter"->LabelFilter</A-> i a = <A HREF="Text-XML-HaXml-Types.html#t%3AContent"->Content</A-> i -&gt; [(a, <A HREF="Text-XML-HaXml-Types.html#t%3AContent"->Content</A-> i)]</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Aoo"->oo</A-> :: (a -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i) -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ALabelFilter"->LabelFilter</A-> i a -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Ax"->x</A-> :: (<A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ALabelFilter"->LabelFilter</A-> i a) -&gt; (<A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ALabelFilter"->LabelFilter</A-> i b) -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ALabelFilter"->LabelFilter</A-> i (a, b)</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Anumbered"->numbered</A-> :: <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ALabelFilter"->LabelFilter</A-> i Int</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Ainterspersed"->interspersed</A-> :: String -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i -&gt; String -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ALabelFilter"->LabelFilter</A-> i String</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Atagged"->tagged</A-> :: <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ALabelFilter"->LabelFilter</A-> i String</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Aattributed"->attributed</A-> :: String -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ALabelFilter"->LabelFilter</A-> i String</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Atextlabelled"->textlabelled</A-> :: <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ALabelFilter"->LabelFilter</A-> i (Maybe String)</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Aextracted"->extracted</A-> :: (<A HREF="Text-XML-HaXml-Types.html#t%3AContent"->Content</A-> i -&gt; a) -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ALabelFilter"->LabelFilter</A-> i a</TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section1"-><A NAME="1"->The content filter type.-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->type</SPAN-> <A NAME="t%3ACFilter"-></A-><B->CFilter</B-> i = <A HREF="Text-XML-HaXml-Types.html#t%3AContent"->Content</A-> i -&gt; [<A HREF="Text-XML-HaXml-Types.html#t%3AContent"->Content</A-> i]</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Combinators.html#CFilter"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->All document transformations are <EM->content filters</EM->.-   A filter takes a single XML <TT-><A HREF="Text-XML-HaXml-Types.html#t%3AContent"->Content</A-></TT-> value and returns a sequence-   of <TT-><A HREF="Text-XML-HaXml-Types.html#t%3AContent"->Content</A-></TT-> values, possibly empty.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section1"-><A NAME="2"->Simple filters.-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section2"-><A NAME="3"->Selection filters.-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="doc"->In the algebra of combinators, <TT->none</TT-> is the zero, and <TT->keep</TT-> the identity.- (They have a more general type than just CFilter.)-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Akeep"-></A-><B->keep</B-> :: a -&gt; [a]</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Combinators.html#keep"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Anone"-></A-><B->none</B-> :: a -&gt; [b]</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Combinators.html#none"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Achildren"-></A-><B->children</B-> :: <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Combinators.html#children"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Throw away current node, keep just the (unprocessed) children.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Aposition"-></A-><B->position</B-> :: Int -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Combinators.html#position"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Select the <TT->n</TT->'th positional result of a filter.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section2"-><A NAME="4"->Predicate filters.-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="doc"->These filters either keep or throw away some content based on- a simple test.  For instance, <TT->elm</TT-> keeps only a tagged element,- <TT->txt</TT-> keeps only non-element text, <TT->tag</TT-> keeps only an element- with the named tag, <TT->attr</TT-> keeps only an element with the named- attribute, <TT->attrval</TT-> keeps only an element with the given- attribute value, <TT->tagWith</TT-> keeps only an element whose tag name- satisfies the given predicate.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Aelm"-></A-><B->elm</B-> :: <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Combinators.html#elm"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Atxt"-></A-><B->txt</B-> :: <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Combinators.html#txt"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Atag"-></A-><B->tag</B-> :: String -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Combinators.html#tag"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Aattr"-></A-><B->attr</B-> :: <A HREF="Text-XML-HaXml-Types.html#t%3AName"->Name</A-> -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Combinators.html#attr"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Aattrval"-></A-><B->attrval</B-> :: <A HREF="Text-XML-HaXml-Types.html#t%3AAttribute"->Attribute</A-> -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Combinators.html#attrval"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AtagWith"-></A-><B->tagWith</B-> :: (String -&gt; Bool) -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Combinators.html#tagWith"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section2"-><A NAME="5"->Search filters.-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Afind"-></A-><B->find</B-> :: String -&gt; (String -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i) -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Combinators.html#find"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->For a mandatory attribute field, <TT->find key cont</TT-> looks up the value of-   the attribute name <TT->key</TT->, and applies the continuation <TT->cont</TT-> to-   the value.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Aiffind"-></A-><B->iffind</B-> :: String -&gt; (String -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i) -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Combinators.html#iffind"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->When an attribute field may be absent, use <TT->iffind key yes no</TT-> to lookup-   its value.  If the attribute is absent, it acts as the <TT->no</TT-> filter,-   otherwise it applies the <TT->yes</TT-> filter.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AifTxt"-></A-><B->ifTxt</B-> :: (String -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i) -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Combinators.html#ifTxt"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"-><TT->ifTxt yes no</TT-> processes any textual content with the <TT->yes</TT-> filter,-   but otherwise is the same as the <TT->no</TT-> filter.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section1"-><A NAME="6"->Filter combinators-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section2"-><A NAME="7"->Basic combinators.-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Ao"-></A-><B->o</B-> :: <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Combinators.html#o"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Sequential (<EM->Irish</EM->,<EM->backwards</EM->) composition-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Aunion"-></A-><B->union</B-> :: (a -&gt; [b]) -&gt; (a -&gt; [b]) -&gt; a -&gt; [b]</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Combinators.html#union"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Binary parallel composition.  Each filter uses a copy of the input,- rather than one filter using the result of the other.-   (Has a more general type than just CFilter.)-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Acat"-></A-><B->cat</B-> :: [a -&gt; [b]] -&gt; a -&gt; [b]</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Combinators.html#cat"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Glue a list of filters together.  (A list version of union;-   also has a more general type than just CFilter.)-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AandThen"-></A-><B->andThen</B-> :: (a -&gt; c) -&gt; (c -&gt; a -&gt; b) -&gt; a -&gt; b</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Combinators.html#andThen"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->A special form of filter composition where the second filter-   works over the same data as the first, but also uses the-   first's result.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3A%7C%3E%7C"-></A-><B->(|&gt;|)</B-> :: (a -&gt; [b]) -&gt; (a -&gt; [b]) -&gt; a -&gt; [b]</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Combinators.html#%7C%3E%7C"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Directional choice:-   in <TT->f |&gt;| g</TT-> give g-productions only if no f-productions-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Awith"-></A-><B->with</B-> :: <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Combinators.html#with"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Pruning: in <TT->f <TT-><A HREF="Text-XML-HaXml-Combinators.html#v%3Awith"->with</A-></TT-> g</TT->,-   keep only those f-productions which have at least one g-production-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Awithout"-></A-><B->without</B-> :: <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Combinators.html#without"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Pruning: in <TT->f <TT-><A HREF="Text-XML-HaXml-Combinators.html#v%3Awithout"->without</A-></TT-> g</TT->,-   keep only those f-productions which have no g-productions-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3A%2F%3E"-></A-><B->(/&gt;)</B-> :: <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Combinators.html#%2F%3E"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Pronounced <EM->slash</EM->, <TT->f /&gt; g</TT-> means g inside f-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3A%3C%2F"-></A-><B->(&lt;/)</B-> :: <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Combinators.html#%3C%2F"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Pronounced <EM->outside</EM->, <TT->f &lt;/ g</TT-> means f containing g-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Aet"-></A-><B->et</B-> :: (String -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i) -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Combinators.html#et"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Join an element-matching filter with a text-only filter-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Apath"-></A-><B->path</B-> :: [<A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i] -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Combinators.html#path"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Express a list of filters like an XPath query, e.g.-   <TT->path [children, tag &quot;name1&quot;, attr &quot;attr1&quot;, children, tag &quot;name2&quot;]</TT->-   is like the XPath query <TT->/name1[@attr1]/name2</TT->.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section2"-><A NAME="8"->Recursive search.-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="doc"->Recursive search has three variants: <TT->deep</TT-> does a breadth-first- search of the tree, <TT->deepest</TT-> does a depth-first search, <TT->multi</TT-> returns- content at all tree-levels, even those strictly contained within results- that have already been returned.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Adeep"-></A-><B->deep</B-> :: <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Combinators.html#deep"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Adeepest"-></A-><B->deepest</B-> :: <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Combinators.html#deepest"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Amulti"-></A-><B->multi</B-> :: <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Combinators.html#multi"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section2"-><A NAME="9"->Interior editing.-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Awhen"-></A-><B->when</B-> :: <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Combinators.html#when"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Interior editing:-   <TT->f <TT-><A HREF="Text-XML-HaXml-Combinators.html#v%3Awhen"->when</A-></TT-> g</TT-> applies <TT->f</TT-> only when the predicate <TT->g</TT-> succeeds,-   otherwise the content is unchanged.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Aguards"-></A-><B->guards</B-> :: <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Combinators.html#guards"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Interior editing:-   <TT->g <TT-><A HREF="Text-XML-HaXml-Combinators.html#v%3Aguards"->guards</A-></TT-> f</TT-> applies <TT->f</TT-> only when the predicate <TT->g</TT-> succeeds,-   otherwise the content is discarded.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Achip"-></A-><B->chip</B-> :: <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Combinators.html#chip"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Process CHildren In Place.  The filter is applied to any children-   of an element content, and the element rebuilt around the results.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Ainplace"-></A-><B->inplace</B-> :: <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Combinators.html#inplace"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Process an element In Place.  The filter is applied to the element-   itself, and then the original element rebuilt around the results.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AfoldXml"-></A-><B->foldXml</B-> :: <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Combinators.html#foldXml"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Recursive application of filters: a fold-like operator.  Defined-   as <TT->f <TT-><A HREF="Text-XML-HaXml-Combinators.html#v%3Ao"->o</A-></TT-> chip (foldXml f)</TT->.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section2"-><A NAME="10"->Constructive filters.-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AmkElem"-></A-><B->mkElem</B-> :: String -&gt; [<A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i] -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Combinators.html#mkElem"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Build an element with the given tag name - its content is the results-   of the given list of filters.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AmkElemAttr"-></A-><B->mkElemAttr</B-> :: String -&gt; [(String, <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i)] -&gt; [<A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i] -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Combinators.html#mkElemAttr"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Build an element with the given name, attributes, and content.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Aliteral"-></A-><B->literal</B-> :: String -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Combinators.html#literal"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Build some textual content.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Acdata"-></A-><B->cdata</B-> :: String -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Combinators.html#cdata"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Build some CDATA content.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AreplaceTag"-></A-><B->replaceTag</B-> :: String -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Combinators.html#replaceTag"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Rename an element tag (leaving attributes in place).-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AreplaceAttrs"-></A-><B->replaceAttrs</B-> :: [(String, String)] -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Combinators.html#replaceAttrs"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Replace the attributes of an element (leaving tag the same).-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section1"-><A NAME="11"->C-like conditionals.-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="doc"-><P->These definitions provide C-like conditionals, lifted to the filter level.-</P-><P->The <TT->(cond ? yes : no)</TT-> style in C becomes <TT->(cond ?&gt; yes :&gt; no)</TT-> in Haskell.-</P-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3AThenElse"-></A-><B->ThenElse</B-> a</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Combinators.html#ThenElse"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="ndoc"->Conjoin the two branches of a conditional.-</TD-></TR-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3A%3A%3E"-></A-><B->(:&gt;)</B-> a a</TD-><TD CLASS="rdoc"-></TD-></TR-></TABLE-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3A%3F%3E"-></A-><B->(?&gt;)</B-> :: (a -&gt; [b]) -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3AThenElse"->ThenElse</A-> (a -&gt; [b]) -&gt; a -&gt; [b]</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Combinators.html#%3F%3E"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Select between the two branches of a joined conditional.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section1"-><A NAME="12"->Filters with labelled results.-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->type</SPAN-> <A NAME="t%3ALabelFilter"-></A-><B->LabelFilter</B-> i a = <A HREF="Text-XML-HaXml-Types.html#t%3AContent"->Content</A-> i -&gt; [(a, <A HREF="Text-XML-HaXml-Types.html#t%3AContent"->Content</A-> i)]</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Combinators.html#LabelFilter"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->A LabelFilter is like a CFilter except that it pairs up a polymorphic-   value (label) with each of its results.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section2"-><A NAME="13"->Using and combining labelled filters.-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Aoo"-></A-><B->oo</B-> :: (a -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i) -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ALabelFilter"->LabelFilter</A-> i a -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Combinators.html#oo"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Compose a label-processing filter with a label-generating filter.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Ax"-></A-><B->x</B-> :: (<A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ALabelFilter"->LabelFilter</A-> i a) -&gt; (<A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ALabelFilter"->LabelFilter</A-> i b) -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ALabelFilter"->LabelFilter</A-> i (a, b)</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Combinators.html#x"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Combine labels.  Think of this as a pair-wise zip on labels.-   e.g. <TT->(numbered <TT-><A HREF="Text-XML-HaXml-Combinators.html#v%3Ax"->x</A-></TT-> tagged)</TT->-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section2"-><A NAME="14"->Some label-generating filters.-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Anumbered"-></A-><B->numbered</B-> :: <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ALabelFilter"->LabelFilter</A-> i Int</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Combinators.html#numbered"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Number the results from 1 upwards.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Ainterspersed"-></A-><B->interspersed</B-> :: String -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i -&gt; String -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ALabelFilter"->LabelFilter</A-> i String</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Combinators.html#interspersed"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->In <TT->interspersed a f b</TT->, label each result of <TT->f</TT-> with the string <TT->a</TT->,-   except for the last one which is labelled with the string <TT->b</TT->.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Atagged"-></A-><B->tagged</B-> :: <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ALabelFilter"->LabelFilter</A-> i String</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Combinators.html#tagged"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Label each element in the result with its tag name.  Non-element-   results get an empty string label.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Aattributed"-></A-><B->attributed</B-> :: String -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ALabelFilter"->LabelFilter</A-> i String</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Combinators.html#attributed"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Label each element in the result with the value of the named attribute.-   Elements without the attribute, and non-element results, get an-   empty string label.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Atextlabelled"-></A-><B->textlabelled</B-> :: <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ALabelFilter"->LabelFilter</A-> i (Maybe String)</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Combinators.html#textlabelled"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Label each textual part of the result with its text.  Element-   results get an empty string label.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Aextracted"-></A-><B->extracted</B-> :: (<A HREF="Text-XML-HaXml-Types.html#t%3AContent"->Content</A-> i -&gt; a) -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ALabelFilter"->LabelFilter</A-> i a</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Combinators.html#extracted"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Label each content with some information extracted from itself.-</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->
− docs/HaXml/Text-XML-HaXml-DtdToHaskell-Convert.html
@@ -1,126 +0,0 @@-<!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.HaXml.DtdToHaskell.Convert</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"->HaXml</TD-><TD CLASS="topbut"-><A HREF="src/Text/XML/HaXml/DtdToHaskell/Convert.html"->Source code</A-></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.HaXml.DtdToHaskell.Convert</FONT-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section1"->Description</TD-></TR-><TR-><TD CLASS="doc"->This module performs the translation of a parsed XML DTD into the-   internal representation of corresponding Haskell data/newtypes.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section1"->Documentation</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Adtd2TypeDef"-></A-><B->dtd2TypeDef</B-> :: [<A HREF="Text-XML-HaXml-Types.html#t%3AMarkupDecl"->MarkupDecl</A->] -&gt; [<A HREF="Text-XML-HaXml-DtdToHaskell-TypeDef.html#t%3ATypeDef"->TypeDef</A->]</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/DtdToHaskell/Convert.html#dtd2TypeDef"->Source</A-></TD-></TR-></TABLE-></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->
− docs/HaXml/Text-XML-HaXml-DtdToHaskell-Instance.html
@@ -1,148 +0,0 @@-<!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.HaXml.DtdToHaskell.Instance</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"->HaXml</TD-><TD CLASS="topbut"-><A HREF="src/Text/XML/HaXml/DtdToHaskell/Instance.html"->Source code</A-></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.HaXml.DtdToHaskell.Instance</FONT-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></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%3AmkInstance"->mkInstance</A-> :: <A HREF="Text-XML-HaXml-DtdToHaskell-TypeDef.html#t%3ATypeDef"->TypeDef</A-> -&gt; Doc</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="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AmkInstance"-></A-><B->mkInstance</B-> :: <A HREF="Text-XML-HaXml-DtdToHaskell-TypeDef.html#t%3ATypeDef"->TypeDef</A-> -&gt; Doc</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/DtdToHaskell/Instance.html#mkInstance"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Convert typedef to appropriate instance declaration, either <TT->XmlContent</TT->,-   <TT->XmlAttributes</TT->, or <TT->XmlAttrType</TT->.-</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->
− docs/HaXml/Text-XML-HaXml-DtdToHaskell-TypeDef.html
@@ -1,1227 +0,0 @@-<!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.HaXml.DtdToHaskell.TypeDef</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"->HaXml</TD-><TD CLASS="topbut"-><A HREF="src/Text/XML/HaXml/DtdToHaskell/TypeDef.html"->Source code</A-></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.HaXml.DtdToHaskell.TypeDef</FONT-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="section4"-><B->Contents</B-></TD-></TR-><TR-><TD-><DL-><DT-><A HREF="#1"->Internal representation of types-</A-></DT-><DT-><A HREF="#2"->Pretty-print a TypeDef-</A-></DT-><DT-><A HREF="#3"->Name mangling-</A-></DT-></DL-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section1"->Description</TD-></TR-><TR-><TD CLASS="doc"->Defines an internal representation of Haskell data/newtype definitions-   that correspond to the XML DTD types, and provides pretty-printers to-   convert these types into the Doc type of <A HREF="Text-PrettyPrint-HughesPJ.html"->Text.PrettyPrint.HughesPJ</A->.-</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"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->data</SPAN-> <A HREF="#t%3ATypeDef"->TypeDef</A-> </TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="decl"->= <A HREF="#v%3ADataDef"->DataDef</A-> Bool <A HREF="Text-XML-HaXml-DtdToHaskell-TypeDef.html#t%3AName"->Name</A-> <A HREF="Text-XML-HaXml-DtdToHaskell-TypeDef.html#t%3AAttrFields"->AttrFields</A-> <A HREF="Text-XML-HaXml-DtdToHaskell-TypeDef.html#t%3AConstructors"->Constructors</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3AEnumDef"->EnumDef</A-> <A HREF="Text-XML-HaXml-DtdToHaskell-TypeDef.html#t%3AName"->Name</A-> [<A HREF="Text-XML-HaXml-DtdToHaskell-TypeDef.html#t%3AName"->Name</A->]</TD-></TR-></TABLE-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->type</SPAN-> <A HREF="#t%3AConstructors"->Constructors</A-> = [(<A HREF="Text-XML-HaXml-DtdToHaskell-TypeDef.html#t%3AName"->Name</A->, [<A HREF="Text-XML-HaXml-DtdToHaskell-TypeDef.html#t%3AStructType"->StructType</A->])]</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->type</SPAN-> <A HREF="#t%3AAttrFields"->AttrFields</A-> = [(<A HREF="Text-XML-HaXml-DtdToHaskell-TypeDef.html#t%3AName"->Name</A->, <A HREF="Text-XML-HaXml-DtdToHaskell-TypeDef.html#t%3AStructType"->StructType</A->)]</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->data</SPAN-> <A HREF="#t%3AStructType"->StructType</A-> </TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="decl"->= <A HREF="#v%3AMaybe"->Maybe</A-> <A HREF="Text-XML-HaXml-DtdToHaskell-TypeDef.html#t%3AStructType"->StructType</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ADefaultable"->Defaultable</A-> <A HREF="Text-XML-HaXml-DtdToHaskell-TypeDef.html#t%3AStructType"->StructType</A-> String</TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3AList"->List</A-> <A HREF="Text-XML-HaXml-DtdToHaskell-TypeDef.html#t%3AStructType"->StructType</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3AList1"->List1</A-> <A HREF="Text-XML-HaXml-DtdToHaskell-TypeDef.html#t%3AStructType"->StructType</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ATuple"->Tuple</A-> [<A HREF="Text-XML-HaXml-DtdToHaskell-TypeDef.html#t%3AStructType"->StructType</A->]</TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3AOneOf"->OneOf</A-> [<A HREF="Text-XML-HaXml-DtdToHaskell-TypeDef.html#t%3AStructType"->StructType</A->]</TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3AAny"->Any</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3AString"->String</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ADefined"->Defined</A-> <A HREF="Text-XML-HaXml-DtdToHaskell-TypeDef.html#t%3AName"->Name</A-></TD-></TR-></TABLE-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AppTypeDef"->ppTypeDef</A-> :: <A HREF="Text-XML-HaXml-DtdToHaskell-TypeDef.html#t%3ATypeDef"->TypeDef</A-> -&gt; Doc</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AppHName"->ppHName</A-> :: <A HREF="Text-XML-HaXml-DtdToHaskell-TypeDef.html#t%3AName"->Name</A-> -&gt; Doc</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AppXName"->ppXName</A-> :: <A HREF="Text-XML-HaXml-DtdToHaskell-TypeDef.html#t%3AName"->Name</A-> -&gt; Doc</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AppAName"->ppAName</A-> :: <A HREF="Text-XML-HaXml-DtdToHaskell-TypeDef.html#t%3AName"->Name</A-> -&gt; Doc</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->data</SPAN-> <A HREF="#t%3AName"->Name</A->  = <A HREF="#v%3AName"->Name</A-> {<TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="recfield"-><A HREF="#v%3AxName"->xName</A-> :: String</TD-></TR-><TR-><TD CLASS="recfield"-><A HREF="#v%3AhName"->hName</A-> :: String</TD-></TR-></TABLE->}</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Aname"->name</A-> :: String -&gt; <A HREF="Text-XML-HaXml-DtdToHaskell-TypeDef.html#t%3AName"->Name</A-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Aname_"->name_</A-> :: String -&gt; <A HREF="Text-XML-HaXml-DtdToHaskell-TypeDef.html#t%3AName"->Name</A-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Aname_a"->name_a</A-> :: String -&gt; String -&gt; <A HREF="Text-XML-HaXml-DtdToHaskell-TypeDef.html#t%3AName"->Name</A-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Aname_ac"->name_ac</A-> :: String -&gt; String -&gt; String -&gt; <A HREF="Text-XML-HaXml-DtdToHaskell-TypeDef.html#t%3AName"->Name</A-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Aname_f"->name_f</A-> :: String -&gt; String -&gt; <A HREF="Text-XML-HaXml-DtdToHaskell-TypeDef.html#t%3AName"->Name</A-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Amangle"->mangle</A-> :: String -&gt; String</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Amanglef"->manglef</A-> :: String -&gt; String</TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section1"-><A NAME="1"->Internal representation of types-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3ATypeDef"-></A-><B->TypeDef</B-> </TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/DtdToHaskell/TypeDef.html#TypeDef"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3ADataDef"-></A-><B->DataDef</B-> Bool <A HREF="Text-XML-HaXml-DtdToHaskell-TypeDef.html#t%3AName"->Name</A-> <A HREF="Text-XML-HaXml-DtdToHaskell-TypeDef.html#t%3AAttrFields"->AttrFields</A-> <A HREF="Text-XML-HaXml-DtdToHaskell-TypeDef.html#t%3AConstructors"->Constructors</A-></TD-><TD CLASS="rdoc"->Bool for main/aux.-</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AEnumDef"-></A-><B->EnumDef</B-> <A HREF="Text-XML-HaXml-DtdToHaskell-TypeDef.html#t%3AName"->Name</A-> [<A HREF="Text-XML-HaXml-DtdToHaskell-TypeDef.html#t%3AName"->Name</A->]</TD-><TD CLASS="rdoc"-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:TypeDef')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:TypeDef" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"->Eq <A HREF="Text-XML-HaXml-DtdToHaskell-TypeDef.html#t%3ATypeDef"->TypeDef</A-></TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->type</SPAN-> <A NAME="t%3AConstructors"-></A-><B->Constructors</B-> = [(<A HREF="Text-XML-HaXml-DtdToHaskell-TypeDef.html#t%3AName"->Name</A->, [<A HREF="Text-XML-HaXml-DtdToHaskell-TypeDef.html#t%3AStructType"->StructType</A->])]</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/DtdToHaskell/TypeDef.html#Constructors"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->type</SPAN-> <A NAME="t%3AAttrFields"-></A-><B->AttrFields</B-> = [(<A HREF="Text-XML-HaXml-DtdToHaskell-TypeDef.html#t%3AName"->Name</A->, <A HREF="Text-XML-HaXml-DtdToHaskell-TypeDef.html#t%3AStructType"->StructType</A->)]</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/DtdToHaskell/TypeDef.html#AttrFields"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3AStructType"-></A-><B->StructType</B-> </TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/DtdToHaskell/TypeDef.html#StructType"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3AMaybe"-></A-><B->Maybe</B-> <A HREF="Text-XML-HaXml-DtdToHaskell-TypeDef.html#t%3AStructType"->StructType</A-></TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ADefaultable"-></A-><B->Defaultable</B-> <A HREF="Text-XML-HaXml-DtdToHaskell-TypeDef.html#t%3AStructType"->StructType</A-> String</TD-><TD CLASS="rdoc"->String holds default value.-</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AList"-></A-><B->List</B-> <A HREF="Text-XML-HaXml-DtdToHaskell-TypeDef.html#t%3AStructType"->StructType</A-></TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AList1"-></A-><B->List1</B-> <A HREF="Text-XML-HaXml-DtdToHaskell-TypeDef.html#t%3AStructType"->StructType</A-></TD-><TD CLASS="rdoc"->Non-empty lists.-</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ATuple"-></A-><B->Tuple</B-> [<A HREF="Text-XML-HaXml-DtdToHaskell-TypeDef.html#t%3AStructType"->StructType</A->]</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AOneOf"-></A-><B->OneOf</B-> [<A HREF="Text-XML-HaXml-DtdToHaskell-TypeDef.html#t%3AStructType"->StructType</A->]</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AAny"-></A-><B->Any</B-></TD-><TD CLASS="rdoc"->XML's contentspec allows ANY-</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AString"-></A-><B->String</B-></TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ADefined"-></A-><B->Defined</B-> <A HREF="Text-XML-HaXml-DtdToHaskell-TypeDef.html#t%3AName"->Name</A-></TD-><TD CLASS="rdoc"-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:StructType')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:StructType" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"->Eq <A HREF="Text-XML-HaXml-DtdToHaskell-TypeDef.html#t%3AStructType"->StructType</A-></TD-></TR-><TR-><TD CLASS="decl"->Show <A HREF="Text-XML-HaXml-DtdToHaskell-TypeDef.html#t%3AStructType"->StructType</A-></TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section1"-><A NAME="2"->Pretty-print a TypeDef-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AppTypeDef"-></A-><B->ppTypeDef</B-> :: <A HREF="Text-XML-HaXml-DtdToHaskell-TypeDef.html#t%3ATypeDef"->TypeDef</A-> -&gt; Doc</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/DtdToHaskell/TypeDef.html#ppTypeDef"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AppHName"-></A-><B->ppHName</B-> :: <A HREF="Text-XML-HaXml-DtdToHaskell-TypeDef.html#t%3AName"->Name</A-> -&gt; Doc</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/DtdToHaskell/TypeDef.html#ppHName"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Pretty print Haskell name.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AppXName"-></A-><B->ppXName</B-> :: <A HREF="Text-XML-HaXml-DtdToHaskell-TypeDef.html#t%3AName"->Name</A-> -&gt; Doc</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/DtdToHaskell/TypeDef.html#ppXName"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Pretty print XML name.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AppAName"-></A-><B->ppAName</B-> :: <A HREF="Text-XML-HaXml-DtdToHaskell-TypeDef.html#t%3AName"->Name</A-> -&gt; Doc</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/DtdToHaskell/TypeDef.html#ppAName"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Pretty print Haskell attributes name.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section1"-><A NAME="3"->Name mangling-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3AName"-></A-><B->Name</B-> </TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/DtdToHaskell/TypeDef.html#Name"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="ndoc"->Need to keep both the XML and Haskell versions of a name.-</TD-></TR-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="5" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3AName"-></A-><B->Name</B-></TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="body" COLSPAN="2"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3AxName"-></A-><B->xName</B-> :: String</TD-><TD CLASS="rdoc"->original XML name-</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AhName"-></A-><B->hName</B-> :: String</TD-><TD CLASS="rdoc"->mangled Haskell name-</TD-></TR-></TABLE-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:Name')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:Name" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"->Eq <A HREF="Text-XML-HaXml-DtdToHaskell-TypeDef.html#t%3AName"->Name</A-></TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Aname"-></A-><B->name</B-> :: String -&gt; <A HREF="Text-XML-HaXml-DtdToHaskell-TypeDef.html#t%3AName"->Name</A-></TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/DtdToHaskell/TypeDef.html#name"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Make a type name valid in both XML and Haskell.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Aname_"-></A-><B->name_</B-> :: String -&gt; <A HREF="Text-XML-HaXml-DtdToHaskell-TypeDef.html#t%3AName"->Name</A-></TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/DtdToHaskell/TypeDef.html#name_"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Append an underscore to the Haskell version of the name.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Aname_a"-></A-><B->name_a</B-> :: String -&gt; String -&gt; <A HREF="Text-XML-HaXml-DtdToHaskell-TypeDef.html#t%3AName"->Name</A-></TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/DtdToHaskell/TypeDef.html#name_a"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Prefix an attribute enumeration type name with its containing element-   name.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Aname_ac"-></A-><B->name_ac</B-> :: String -&gt; String -&gt; String -&gt; <A HREF="Text-XML-HaXml-DtdToHaskell-TypeDef.html#t%3AName"->Name</A-></TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/DtdToHaskell/TypeDef.html#name_ac"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Prefix an attribute enumeration constructor with its element-tag name,-   and its enumeration type name.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Aname_f"-></A-><B->name_f</B-> :: String -&gt; String -&gt; <A HREF="Text-XML-HaXml-DtdToHaskell-TypeDef.html#t%3AName"->Name</A-></TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/DtdToHaskell/TypeDef.html#name_f"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Prefix a field name with its enclosing element name.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Amangle"-></A-><B->mangle</B-> :: String -&gt; String</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/DtdToHaskell/TypeDef.html#mangle"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Convert an XML name to a Haskell conid.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Amanglef"-></A-><B->manglef</B-> :: String -&gt; String</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/DtdToHaskell/TypeDef.html#manglef"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Convert an XML name to a Haskell varid.-</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->
− docs/HaXml/Text-XML-HaXml-Escape.html
@@ -1,280 +0,0 @@-<!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.HaXml.Escape</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"->HaXml</TD-><TD CLASS="topbut"-><A HREF="src/Text/XML/HaXml/Escape.html"->Source code</A-></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.HaXml.Escape</FONT-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section1"->Documentation</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AxmlEscape"-></A-><B->xmlEscape</B-> :: <A HREF="Text-XML-HaXml-Escape.html#t%3AXmlEscaper"->XmlEscaper</A-> -&gt; <A HREF="Text-XML-HaXml-Types.html#t%3AElement"->Element</A-> i -&gt; <A HREF="Text-XML-HaXml-Types.html#t%3AElement"->Element</A-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Escape.html#xmlEscape"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AxmlUnEscape"-></A-><B->xmlUnEscape</B-> :: <A HREF="Text-XML-HaXml-Escape.html#t%3AXmlEscaper"->XmlEscaper</A-> -&gt; <A HREF="Text-XML-HaXml-Types.html#t%3AElement"->Element</A-> i -&gt; <A HREF="Text-XML-HaXml-Types.html#t%3AElement"->Element</A-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Escape.html#xmlUnEscape"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AxmlEscapeContent"-></A-><B->xmlEscapeContent</B-> :: <A HREF="Text-XML-HaXml-Escape.html#t%3AXmlEscaper"->XmlEscaper</A-> -&gt; [<A HREF="Text-XML-HaXml-Types.html#t%3AContent"->Content</A-> i] -&gt; [<A HREF="Text-XML-HaXml-Types.html#t%3AContent"->Content</A-> i]</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Escape.html#xmlEscapeContent"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AxmlUnEscapeContent"-></A-><B->xmlUnEscapeContent</B-> :: <A HREF="Text-XML-HaXml-Escape.html#t%3AXmlEscaper"->XmlEscaper</A-> -&gt; [<A HREF="Text-XML-HaXml-Types.html#t%3AContent"->Content</A-> i] -&gt; [<A HREF="Text-XML-HaXml-Types.html#t%3AContent"->Content</A-> i]</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Escape.html#xmlUnEscapeContent"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3AXmlEscaper"-></A-><B->XmlEscaper</B-> </TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Escape.html#XmlEscaper"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AstdXmlEscaper"-></A-><B->stdXmlEscaper</B-> :: <A HREF="Text-XML-HaXml-Escape.html#t%3AXmlEscaper"->XmlEscaper</A-></TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Escape.html#stdXmlEscaper"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AmkXmlEscaper"-></A-><B->mkXmlEscaper</B-> :: [(Char, String)] -&gt; (Char -&gt; Bool) -&gt; <A HREF="Text-XML-HaXml-Escape.html#t%3AXmlEscaper"->XmlEscaper</A-></TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Escape.html#mkXmlEscaper"->Source</A-></TD-></TR-></TABLE-></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->
− docs/HaXml/Text-XML-HaXml-Html-Generate.html
@@ -1,1481 +0,0 @@-<!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.HaXml.Html.Generate</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"->HaXml</TD-><TD CLASS="topbut"-><A HREF="src/Text/XML/HaXml/Html/Generate.html"->Source code</A-></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.HaXml.Html.Generate</FONT-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="section4"-><B->Contents</B-></TD-></TR-><TR-><TD-><DL-><DT-><A HREF="#1"->HTML construction filters-</A-></DT-><DD-><DL-><DT-><A HREF="#2"->Containers-</A-></DT-><DT-><A HREF="#3"->Anchors-</A-></DT-><DT-><A HREF="#4"->Text style-</A-></DT-><DT-><A HREF="#5"->Tables-</A-></DT-><DT-><A HREF="#6"->Breaks, lines-</A-></DT-><DT-><A HREF="#7"->Attributes-</A-></DT-></DL-></DD-><DT-><A HREF="#8"->A simple HTML pretty-printer-</A-></DT-></DL-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section1"->Description</TD-></TR-><TR-><TD CLASS="doc"->These are just some common abbreviations for generating HTML-   content within the XML transformation framework defined-   by <A HREF="Text-Xml-HaXml-Combinators.html"->Text.Xml.HaXml.Combinators</A->.-</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%3Ahtml"->html</A-> :: [<A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i] -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Ahhead"->hhead</A-> :: [<A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i] -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Ahtitle"->htitle</A-> :: [<A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i] -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Ahbody"->hbody</A-> :: [<A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i] -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Ah1"->h1</A-> :: [<A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i] -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Ah2"->h2</A-> :: [<A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i] -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Ah3"->h3</A-> :: [<A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i] -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Ah4"->h4</A-> :: [<A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i] -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Ahpara"->hpara</A-> :: [<A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i] -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Ahdiv"->hdiv</A-> :: [<A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i] -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Ahspan"->hspan</A-> :: [<A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i] -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Amargin"->margin</A-> :: [<A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i] -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Aanchor"->anchor</A-> :: [(String, <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i)] -&gt; [<A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i] -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Amakehref"->makehref</A-> :: <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i -&gt; [<A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i] -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Aanchorname"->anchorname</A-> :: <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i -&gt; [<A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i] -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Ahpre"->hpre</A-> :: [<A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i] -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Ahcentre"->hcentre</A-> :: [<A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i] -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Ahem"->hem</A-> :: [<A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i] -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Ahtt"->htt</A-> :: [<A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i] -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Ahbold"->hbold</A-> :: [<A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i] -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Aparens"->parens</A-> :: <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Abullet"->bullet</A-> :: [<A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i] -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Ahtable"->htable</A-> :: [<A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i] -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Ahrow"->hrow</A-> :: [<A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i] -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Ahcol"->hcol</A-> :: [<A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i] -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Ahbr"->hbr</A-> :: <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Ahhr"->hhr</A-> :: <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Ashowattr"->showattr</A-> :: String -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3A%21"->(!)</A-> :: String -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3A%3F"->(?)</A-> :: String -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Ahtmlprint"->htmlprint</A-> :: [<A HREF="Text-XML-HaXml-Types.html#t%3AContent"->Content</A-> i] -&gt; Doc</TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section1"-><A NAME="1"->HTML construction filters-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section2"-><A NAME="2"->Containers-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Ahtml"-></A-><B->html</B-> :: [<A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i] -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Html/Generate.html#html"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Ahhead"-></A-><B->hhead</B-> :: [<A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i] -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Html/Generate.html#hhead"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Ahtitle"-></A-><B->htitle</B-> :: [<A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i] -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Html/Generate.html#htitle"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Ahbody"-></A-><B->hbody</B-> :: [<A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i] -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Html/Generate.html#hbody"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Ah1"-></A-><B->h1</B-> :: [<A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i] -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Html/Generate.html#h1"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Ah2"-></A-><B->h2</B-> :: [<A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i] -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Html/Generate.html#h2"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Ah3"-></A-><B->h3</B-> :: [<A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i] -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Html/Generate.html#h3"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Ah4"-></A-><B->h4</B-> :: [<A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i] -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Html/Generate.html#h4"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Ahpara"-></A-><B->hpara</B-> :: [<A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i] -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Html/Generate.html#hpara"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Ahdiv"-></A-><B->hdiv</B-> :: [<A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i] -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Html/Generate.html#hdiv"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Ahspan"-></A-><B->hspan</B-> :: [<A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i] -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Html/Generate.html#hspan"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Amargin"-></A-><B->margin</B-> :: [<A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i] -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Html/Generate.html#margin"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section2"-><A NAME="3"->Anchors-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Aanchor"-></A-><B->anchor</B-> :: [(String, <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i)] -&gt; [<A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i] -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Html/Generate.html#anchor"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Amakehref"-></A-><B->makehref</B-> :: <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i -&gt; [<A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i] -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Html/Generate.html#makehref"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Aanchorname"-></A-><B->anchorname</B-> :: <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i -&gt; [<A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i] -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Html/Generate.html#anchorname"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section2"-><A NAME="4"->Text style-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Ahpre"-></A-><B->hpre</B-> :: [<A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i] -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Html/Generate.html#hpre"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Ahcentre"-></A-><B->hcentre</B-> :: [<A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i] -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Html/Generate.html#hcentre"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Ahem"-></A-><B->hem</B-> :: [<A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i] -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Html/Generate.html#hem"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Ahtt"-></A-><B->htt</B-> :: [<A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i] -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Html/Generate.html#htt"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Ahbold"-></A-><B->hbold</B-> :: [<A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i] -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Html/Generate.html#hbold"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Aparens"-></A-><B->parens</B-> :: <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Html/Generate.html#parens"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Abullet"-></A-><B->bullet</B-> :: [<A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i] -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Html/Generate.html#bullet"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section2"-><A NAME="5"->Tables-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Ahtable"-></A-><B->htable</B-> :: [<A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i] -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Html/Generate.html#htable"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Ahrow"-></A-><B->hrow</B-> :: [<A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i] -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Html/Generate.html#hrow"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Ahcol"-></A-><B->hcol</B-> :: [<A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i] -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Html/Generate.html#hcol"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section2"-><A NAME="6"->Breaks, lines-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Ahbr"-></A-><B->hbr</B-> :: <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Html/Generate.html#hbr"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Ahhr"-></A-><B->hhr</B-> :: <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Html/Generate.html#hhr"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section2"-><A NAME="7"->Attributes-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Ashowattr"-></A-><B->showattr</B-> :: String -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Html/Generate.html#showattr"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3A%21"-></A-><B->(!)</B-> :: String -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Html/Generate.html#%21"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3A%3F"-></A-><B->(?)</B-> :: String -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Html/Generate.html#%3F"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section1"-><A NAME="8"->A simple HTML pretty-printer-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Ahtmlprint"-></A-><B->htmlprint</B-> :: [<A HREF="Text-XML-HaXml-Types.html#t%3AContent"->Content</A-> i] -&gt; Doc</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Html/Generate.html#htmlprint"->Source</A-></TD-></TR-></TABLE-></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->
− docs/HaXml/Text-XML-HaXml-Html-Parse.html
@@ -1,160 +0,0 @@-<!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.HaXml.Html.Parse</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"->HaXml</TD-><TD CLASS="topbut"-><A HREF="src/Text/XML/HaXml/Html/Parse.html"->Source code</A-></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.HaXml.Html.Parse</FONT-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section1"->Description</TD-></TR-><TR-><TD CLASS="doc"->This is a parser for HTML documents.  Unlike for XML documents, it-   must include a certain amount of error-correction to account for-   HTML features like self-terminating tags, unterminated tags, and-   incorrect nesting.  The input is tokenised by the-   XML lexer (a separate lexer is not required for HTML).-</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%3AhtmlParse"->htmlParse</A-> :: String -&gt; String -&gt; <A HREF="Text-XML-HaXml-Types.html#t%3ADocument"->Document</A-> <A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</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="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AhtmlParse"-></A-><B->htmlParse</B-> :: String -&gt; String -&gt; <A HREF="Text-XML-HaXml-Types.html#t%3ADocument"->Document</A-> <A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A-></TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Html/Parse.html#htmlParse"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->The first argument is the name of the file, the second is the string-   contents of the file.  The result is the generic representation of-   an XML document.  Any errors cause program failure with message to stderr.-</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->
− docs/HaXml/Text-XML-HaXml-Html-ParseLazy.html
@@ -1,160 +0,0 @@-<!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.HaXml.Html.ParseLazy</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"->HaXml</TD-><TD CLASS="topbut"-><A HREF="src/Text/XML/HaXml/Html/ParseLazy.html"->Source code</A-></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.HaXml.Html.ParseLazy</FONT-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section1"->Description</TD-></TR-><TR-><TD CLASS="doc"->This is a parser for HTML documents.  Unlike for XML documents, it-   must include a certain amount of error-correction to account for-   HTML features like self-terminating tags, unterminated tags, and-   incorrect nesting.  The input is tokenised by the-   XML lexer (a separate lexer is not required for HTML).-</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%3AhtmlParse"->htmlParse</A-> :: String -&gt; String -&gt; <A HREF="Text-XML-HaXml-Types.html#t%3ADocument"->Document</A-> <A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</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="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AhtmlParse"-></A-><B->htmlParse</B-> :: String -&gt; String -&gt; <A HREF="Text-XML-HaXml-Types.html#t%3ADocument"->Document</A-> <A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A-></TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Html/ParseLazy.html#htmlParse"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->The first argument is the name of the file, the second is the string-   contents of the file.  The result is the generic representation of-   an XML document.  Any errors cause program failure with message to stderr.-</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->
− docs/HaXml/Text-XML-HaXml-Html-Pretty.html
@@ -1,196 +0,0 @@-<!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.HaXml.Html.Pretty</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"->HaXml</TD-><TD CLASS="topbut"-><A HREF="src/Text/XML/HaXml/Html/Pretty.html"->Source code</A-></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.HaXml.Html.Pretty</FONT-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section1"->Description</TD-></TR-><TR-><TD CLASS="doc"->This is a separate pretty-printer for HTML documents, recognising-   some of the differences between HTML and true XML.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section1"->Documentation</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Adocument"-></A-><B->document</B-> :: <A HREF="Text-XML-HaXml-Types.html#t%3ADocument"->Document</A-> i -&gt; Doc</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Html/Pretty.html#document"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Aelement"-></A-><B->element</B-> :: <A HREF="Text-XML-HaXml-Types.html#t%3AElement"->Element</A-> i -&gt; Doc</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Html/Pretty.html#element"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Aattribute"-></A-><B->attribute</B-> :: <A HREF="Text-XML-HaXml-Types.html#t%3AAttribute"->Attribute</A-> -&gt; Doc</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Html/Pretty.html#attribute"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Acontent"-></A-><B->content</B-> :: <A HREF="Text-XML-HaXml-Types.html#t%3AContent"->Content</A-> i -&gt; Doc</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Html/Pretty.html#content"->Source</A-></TD-></TR-></TABLE-></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->
− docs/HaXml/Text-XML-HaXml-Lex.html
@@ -1,1334 +0,0 @@-<!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.HaXml.Lex</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"->HaXml</TD-><TD CLASS="topbut"-><A HREF="src/Text/XML/HaXml/Lex.html"->Source code</A-></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.HaXml.Lex</FONT-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="section4"-><B->Contents</B-></TD-></TR-><TR-><TD-><DL-><DT-><A HREF="#1"->Entry points to the lexer-</A-></DT-><DT-><A HREF="#2"->Token types-</A-></DT-></DL-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section1"->Description</TD-></TR-><TR-><TD CLASS="doc"-><P->You don't normally need to use this Lex module directly - it is-   called automatically by the parser.  (This interface is only exposed-   for debugging purposes.)-</P-><P->This is a hand-written lexer for tokenising the text of an XML- document so that it is ready for parsing.  It attaches position- information in (line,column) format to every token.  The main- entry point is <TT-><A HREF="Text-XML-HaXml-Lex.html#v%3AxmlLex"->xmlLex</A-></TT->.  A secondary entry point, <TT-><A HREF="Text-XML-HaXml-Lex.html#v%3AxmlReLex"->xmlReLex</A-></TT->, is- provided for when the parser needs to stuff a string back onto- the front of the text and re-tokenise it (typically when expanding- macros).-</P-><P->As one would expect, the lexer is essentially a small finite- state machine.-</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%3AxmlLex"->xmlLex</A-> :: String -&gt; String -&gt; [<A HREF="Text-XML-HaXml-Lex.html#t%3AToken"->Token</A->]</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AxmlReLex"->xmlReLex</A-> :: <A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A-> -&gt; String -&gt; [<A HREF="Text-XML-HaXml-Lex.html#t%3AToken"->Token</A->]</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AreLexEntityValue"->reLexEntityValue</A-> :: (String -&gt; Maybe String) -&gt; <A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A-> -&gt; String -&gt; [<A HREF="Text-XML-HaXml-Lex.html#t%3AToken"->Token</A->]</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->type</SPAN-> <A HREF="#t%3AToken"->Token</A-> = (<A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A->, <A HREF="Text-XML-HaXml-Lex.html#t%3ATokenT"->TokenT</A->)</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->data</SPAN-> <A HREF="#t%3ATokenT"->TokenT</A-> </TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="decl"->= <A HREF="#v%3ATokCommentOpen"->TokCommentOpen</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ATokCommentClose"->TokCommentClose</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ATokPIOpen"->TokPIOpen</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ATokPIClose"->TokPIClose</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ATokSectionOpen"->TokSectionOpen</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ATokSectionClose"->TokSectionClose</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ATokSection"->TokSection</A-> <A HREF="Text-XML-HaXml-Lex.html#t%3ASection"->Section</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ATokSpecialOpen"->TokSpecialOpen</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ATokSpecial"->TokSpecial</A-> <A HREF="Text-XML-HaXml-Lex.html#t%3ASpecial"->Special</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ATokEndOpen"->TokEndOpen</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ATokEndClose"->TokEndClose</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ATokAnyOpen"->TokAnyOpen</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ATokAnyClose"->TokAnyClose</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ATokSqOpen"->TokSqOpen</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ATokSqClose"->TokSqClose</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ATokEqual"->TokEqual</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ATokQuery"->TokQuery</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ATokStar"->TokStar</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ATokPlus"->TokPlus</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ATokAmp"->TokAmp</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ATokSemi"->TokSemi</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ATokHash"->TokHash</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ATokBraOpen"->TokBraOpen</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ATokBraClose"->TokBraClose</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ATokPipe"->TokPipe</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ATokPercent"->TokPercent</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ATokComma"->TokComma</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ATokQuote"->TokQuote</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ATokName"->TokName</A-> String</TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ATokFreeText"->TokFreeText</A-> String</TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ATokNull"->TokNull</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ATokError"->TokError</A-> String</TD-></TR-></TABLE-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->data</SPAN-> <A HREF="#t%3ASpecial"->Special</A-> </TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="decl"->= <A HREF="#v%3ADOCTYPEx"->DOCTYPEx</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3AELEMENTx"->ELEMENTx</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3AATTLISTx"->ATTLISTx</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3AENTITYx"->ENTITYx</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ANOTATIONx"->NOTATIONx</A-></TD-></TR-></TABLE-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->data</SPAN-> <A HREF="#t%3ASection"->Section</A-> </TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="decl"->= <A HREF="#v%3ACDATAx"->CDATAx</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3AINCLUDEx"->INCLUDEx</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3AIGNOREx"->IGNOREx</A-></TD-></TR-></TABLE-></TD-></TR-></TABLE-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section1"-><A NAME="1"->Entry points to the lexer-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AxmlLex"-></A-><B->xmlLex</B-> :: String -&gt; String -&gt; [<A HREF="Text-XML-HaXml-Lex.html#t%3AToken"->Token</A->]</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Lex.html#xmlLex"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->The first argument to <TT-><A HREF="Text-XML-HaXml-Lex.html#v%3AxmlLex"->xmlLex</A-></TT-> is the filename (used for source positions,-   especially in error messages), and the second is the string content of-   the XML file.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AxmlReLex"-></A-><B->xmlReLex</B-> :: <A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A-> -&gt; String -&gt; [<A HREF="Text-XML-HaXml-Lex.html#t%3AToken"->Token</A->]</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Lex.html#xmlReLex"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"-><TT-><A HREF="Text-XML-HaXml-Lex.html#v%3AxmlReLex"->xmlReLex</A-></TT-> is used when the parser expands a macro (PE reference).-    The expansion of the macro must be re-lexed as if for the first time.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AreLexEntityValue"-></A-><B->reLexEntityValue</B-> :: (String -&gt; Maybe String) -&gt; <A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A-> -&gt; String -&gt; [<A HREF="Text-XML-HaXml-Lex.html#t%3AToken"->Token</A->]</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Lex.html#reLexEntityValue"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"-><TT-><A HREF="Text-XML-HaXml-Lex.html#v%3AreLexEntityValue"->reLexEntityValue</A-></TT-> is used solely within parsing an entityvalue.-   Normally, a PERef is logically separated from its surroundings by-   whitespace.  But in an entityvalue, a PERef can be juxtaposed to-   an identifier, so the expansion forms a new identifier.-   Thus the need to rescan the whole text for possible PERefs.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section1"-><A NAME="2"->Token types-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->type</SPAN-> <A NAME="t%3AToken"-></A-><B->Token</B-> = (<A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A->, <A HREF="Text-XML-HaXml-Lex.html#t%3ATokenT"->TokenT</A->)</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Lex.html#Token"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->All tokens are paired up with a source position.-   Lexical errors are passed back as a special <TT->TokenT</TT-> value.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3ATokenT"-></A-><B->TokenT</B-> </TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Lex.html#TokenT"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="ndoc"->The basic token type.-</TD-></TR-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3ATokCommentOpen"-></A-><B->TokCommentOpen</B-></TD-><TD CLASS="rdoc"->&lt;!---</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ATokCommentClose"-></A-><B->TokCommentClose</B-></TD-><TD CLASS="rdoc"-><UL-><LI->-&gt;-</LI-></UL-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ATokPIOpen"-></A-><B->TokPIOpen</B-></TD-><TD CLASS="rdoc"->&lt;?-</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ATokPIClose"-></A-><B->TokPIClose</B-></TD-><TD CLASS="rdoc"->?&gt;-</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ATokSectionOpen"-></A-><B->TokSectionOpen</B-></TD-><TD CLASS="rdoc"->&lt;![-</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ATokSectionClose"-></A-><B->TokSectionClose</B-></TD-><TD CLASS="rdoc"->]]&gt;-</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ATokSection"-></A-><B->TokSection</B-> <A HREF="Text-XML-HaXml-Lex.html#t%3ASection"->Section</A-></TD-><TD CLASS="rdoc"->CDATA INCLUDE IGNORE etc-</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ATokSpecialOpen"-></A-><B->TokSpecialOpen</B-></TD-><TD CLASS="rdoc"->&lt;!-</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ATokSpecial"-></A-><B->TokSpecial</B-> <A HREF="Text-XML-HaXml-Lex.html#t%3ASpecial"->Special</A-></TD-><TD CLASS="rdoc"->DOCTYPE ELEMENT ATTLIST etc-</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ATokEndOpen"-></A-><B->TokEndOpen</B-></TD-><TD CLASS="rdoc"->&lt;/-</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ATokEndClose"-></A-><B->TokEndClose</B-></TD-><TD CLASS="rdoc"->/&gt;-</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ATokAnyOpen"-></A-><B->TokAnyOpen</B-></TD-><TD CLASS="rdoc"->&lt;-</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ATokAnyClose"-></A-><B->TokAnyClose</B-></TD-><TD CLASS="rdoc"-><PRE->-</PRE-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ATokSqOpen"-></A-><B->TokSqOpen</B-></TD-><TD CLASS="rdoc"->[-</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ATokSqClose"-></A-><B->TokSqClose</B-></TD-><TD CLASS="rdoc"->]-</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ATokEqual"-></A-><B->TokEqual</B-></TD-><TD CLASS="rdoc"->=-</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ATokQuery"-></A-><B->TokQuery</B-></TD-><TD CLASS="rdoc"->?-</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ATokStar"-></A-><B->TokStar</B-></TD-><TD CLASS="rdoc"->*-</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ATokPlus"-></A-><B->TokPlus</B-></TD-><TD CLASS="rdoc"->+-</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ATokAmp"-></A-><B->TokAmp</B-></TD-><TD CLASS="rdoc"->&amp;-</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ATokSemi"-></A-><B->TokSemi</B-></TD-><TD CLASS="rdoc"->;-</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ATokHash"-></A-><B->TokHash</B-></TD-><TD CLASS="rdoc"->#-</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ATokBraOpen"-></A-><B->TokBraOpen</B-></TD-><TD CLASS="rdoc"->(-</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ATokBraClose"-></A-><B->TokBraClose</B-></TD-><TD CLASS="rdoc"->)-</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ATokPipe"-></A-><B->TokPipe</B-></TD-><TD CLASS="rdoc"->|-</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ATokPercent"-></A-><B->TokPercent</B-></TD-><TD CLASS="rdoc"->%-</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ATokComma"-></A-><B->TokComma</B-></TD-><TD CLASS="rdoc"->,-</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ATokQuote"-></A-><B->TokQuote</B-></TD-><TD CLASS="rdoc"->'' or &quot;&quot;-</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ATokName"-></A-><B->TokName</B-> String</TD-><TD CLASS="rdoc"->begins with letter, no spaces-</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ATokFreeText"-></A-><B->TokFreeText</B-> String</TD-><TD CLASS="rdoc"->any character data-</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ATokNull"-></A-><B->TokNull</B-></TD-><TD CLASS="rdoc"->fake token-</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ATokError"-></A-><B->TokError</B-> String</TD-><TD CLASS="rdoc"->lexical error-</TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:TokenT')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:TokenT" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"->Eq <A HREF="Text-XML-HaXml-Lex.html#t%3ATokenT"->TokenT</A-></TD-></TR-><TR-><TD CLASS="decl"->Show <A HREF="Text-XML-HaXml-Lex.html#t%3ATokenT"->TokenT</A-></TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3ASpecial"-></A-><B->Special</B-> </TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Lex.html#Special"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3ADOCTYPEx"-></A-><B->DOCTYPEx</B-></TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AELEMENTx"-></A-><B->ELEMENTx</B-></TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AATTLISTx"-></A-><B->ATTLISTx</B-></TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AENTITYx"-></A-><B->ENTITYx</B-></TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ANOTATIONx"-></A-><B->NOTATIONx</B-></TD-><TD CLASS="rdoc"-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:Special')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:Special" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"->Eq <A HREF="Text-XML-HaXml-Lex.html#t%3ASpecial"->Special</A-></TD-></TR-><TR-><TD CLASS="decl"->Show <A HREF="Text-XML-HaXml-Lex.html#t%3ASpecial"->Special</A-></TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3ASection"-></A-><B->Section</B-> </TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Lex.html#Section"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3ACDATAx"-></A-><B->CDATAx</B-></TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AINCLUDEx"-></A-><B->INCLUDEx</B-></TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AIGNOREx"-></A-><B->IGNOREx</B-></TD-><TD CLASS="rdoc"-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:Section')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:Section" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"->Eq <A HREF="Text-XML-HaXml-Lex.html#t%3ASection"->Section</A-></TD-></TR-><TR-><TD CLASS="decl"->Show <A HREF="Text-XML-HaXml-Lex.html#t%3ASection"->Section</A-></TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></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->
− docs/HaXml/Text-XML-HaXml-OneOfN.html
@@ -1,4555 +0,0 @@-<!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.HaXml.OneOfN</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"->HaXml</TD-><TD CLASS="topbut"-><A HREF="src/Text/XML/HaXml/OneOfN.html"->Source code</A-></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.HaXml.OneOfN</FONT-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section1"->Documentation</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3AOneOf2"-></A-><B->OneOf2</B-> a b</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/OneOfN.html#OneOf2"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3AOneOf2"-></A-><B->OneOf2</B-> a</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ATwoOf2"-></A-><B->TwoOf2</B-> b</TD-><TD CLASS="rdoc"-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:OneOf2')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:OneOf2" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"->(Eq a, Eq b) =&gt; Eq (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf2"->OneOf2</A-> a b)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> a, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> b) =&gt; <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf2"->OneOf2</A-> a b)</TD-></TR-><TR-><TD CLASS="decl"->(Show a, Show b) =&gt; Show (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf2"->OneOf2</A-> a b)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> b) =&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf2"->OneOf2</A-> a b)</TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3AOneOf3"-></A-><B->OneOf3</B-> a b c</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/OneOfN.html#OneOf3"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3AOneOf3"-></A-><B->OneOf3</B-> a</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ATwoOf3"-></A-><B->TwoOf3</B-> b</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AThreeOf3"-></A-><B->ThreeOf3</B-> c</TD-><TD CLASS="rdoc"-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:OneOf3')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:OneOf3" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"->(Eq a, Eq b, Eq c) =&gt; Eq (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf3"->OneOf3</A-> a b c)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> a, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> b, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> c) =&gt; <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf3"->OneOf3</A-> a b c)</TD-></TR-><TR-><TD CLASS="decl"->(Show a, Show b, Show c) =&gt; Show (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf3"->OneOf3</A-> a b c)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> b, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> c) =&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf3"->OneOf3</A-> a b c)</TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3AOneOf4"-></A-><B->OneOf4</B-> a b c d</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/OneOfN.html#OneOf4"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3AOneOf4"-></A-><B->OneOf4</B-> a</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ATwoOf4"-></A-><B->TwoOf4</B-> b</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AThreeOf4"-></A-><B->ThreeOf4</B-> c</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AFourOf4"-></A-><B->FourOf4</B-> d</TD-><TD CLASS="rdoc"-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:OneOf4')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:OneOf4" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"->(Eq a, Eq b, Eq c, Eq d) =&gt; Eq (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf4"->OneOf4</A-> a b c d)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> a, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> b, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> c, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> d) =&gt; <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf4"->OneOf4</A-> a b c d)</TD-></TR-><TR-><TD CLASS="decl"->(Show a, Show b, Show c, Show d) =&gt; Show (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf4"->OneOf4</A-> a b c d)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> b, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> c, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> d) =&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf4"->OneOf4</A-> a b c d)</TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3AOneOf5"-></A-><B->OneOf5</B-> a b c d e</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/OneOfN.html#OneOf5"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3AOneOf5"-></A-><B->OneOf5</B-> a</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ATwoOf5"-></A-><B->TwoOf5</B-> b</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AThreeOf5"-></A-><B->ThreeOf5</B-> c</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AFourOf5"-></A-><B->FourOf5</B-> d</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AFiveOf5"-></A-><B->FiveOf5</B-> e</TD-><TD CLASS="rdoc"-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:OneOf5')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:OneOf5" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"->(Eq a, Eq b, Eq c, Eq d, Eq e) =&gt; Eq (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf5"->OneOf5</A-> a b c d e)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> a, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> b, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> c, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> d, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> e) =&gt; <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf5"->OneOf5</A-> a b c d e)</TD-></TR-><TR-><TD CLASS="decl"->(Show a, Show b, Show c, Show d, Show e) =&gt; Show (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf5"->OneOf5</A-> a b c d e)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> b, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> c, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> d, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> e) =&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf5"->OneOf5</A-> a b c d e)</TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3AOneOf6"-></A-><B->OneOf6</B-> a b c d e f</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/OneOfN.html#OneOf6"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3AOneOf6"-></A-><B->OneOf6</B-> a</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ATwoOf6"-></A-><B->TwoOf6</B-> b</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AThreeOf6"-></A-><B->ThreeOf6</B-> c</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AFourOf6"-></A-><B->FourOf6</B-> d</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AFiveOf6"-></A-><B->FiveOf6</B-> e</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASixOf6"-></A-><B->SixOf6</B-> f</TD-><TD CLASS="rdoc"-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:OneOf6')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:OneOf6" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"->(Eq a, Eq b, Eq c, Eq d, Eq e, Eq f) =&gt; Eq (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf6"->OneOf6</A-> a b c d e f)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> a, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> b, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> c, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> d, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> e, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> f) =&gt; <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf6"->OneOf6</A-> a b c d e f)</TD-></TR-><TR-><TD CLASS="decl"->(Show a, Show b, Show c, Show d, Show e, Show f) =&gt; Show (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf6"->OneOf6</A-> a b c d e f)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> b, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> c, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> d, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> e, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> f) =&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf6"->OneOf6</A-> a b c d e f)</TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3AOneOf7"-></A-><B->OneOf7</B-> a b c d e f g</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/OneOfN.html#OneOf7"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3AOneOf7"-></A-><B->OneOf7</B-> a</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ATwoOf7"-></A-><B->TwoOf7</B-> b</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AThreeOf7"-></A-><B->ThreeOf7</B-> c</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AFourOf7"-></A-><B->FourOf7</B-> d</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AFiveOf7"-></A-><B->FiveOf7</B-> e</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASixOf7"-></A-><B->SixOf7</B-> f</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASevenOf7"-></A-><B->SevenOf7</B-> g</TD-><TD CLASS="rdoc"-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:OneOf7')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:OneOf7" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"->(Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g) =&gt; Eq (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf7"->OneOf7</A-> a b c d e f g)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> a, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> b, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> c, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> d, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> e, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> f, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> g) =&gt; <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf7"->OneOf7</A-> a b c d e f g)</TD-></TR-><TR-><TD CLASS="decl"->(Show a, Show b, Show c, Show d, Show e, Show f, Show g) =&gt; Show (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf7"->OneOf7</A-> a b c d e f g)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> b, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> c, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> d, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> e, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> f, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> g) =&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf7"->OneOf7</A-> a b c d e f g)</TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3AOneOf8"-></A-><B->OneOf8</B-> a b c d e f g h</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/OneOfN.html#OneOf8"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3AOneOf8"-></A-><B->OneOf8</B-> a</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ATwoOf8"-></A-><B->TwoOf8</B-> b</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AThreeOf8"-></A-><B->ThreeOf8</B-> c</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AFourOf8"-></A-><B->FourOf8</B-> d</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AFiveOf8"-></A-><B->FiveOf8</B-> e</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASixOf8"-></A-><B->SixOf8</B-> f</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASevenOf8"-></A-><B->SevenOf8</B-> g</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AEightOf8"-></A-><B->EightOf8</B-> h</TD-><TD CLASS="rdoc"-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:OneOf8')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:OneOf8" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"->(Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h) =&gt; Eq (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf8"->OneOf8</A-> a b c d e f g h)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> a, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> b, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> c, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> d, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> e, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> f, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> g, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> h) =&gt; <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf8"->OneOf8</A-> a b c d e f g h)</TD-></TR-><TR-><TD CLASS="decl"->(Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h) =&gt; Show (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf8"->OneOf8</A-> a b c d e f g h)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> b, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> c, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> d, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> e, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> f, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> g, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> h) =&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf8"->OneOf8</A-> a b c d e f g h)</TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3AOneOf9"-></A-><B->OneOf9</B-> a b c d e f g h i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/OneOfN.html#OneOf9"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3AOneOf9"-></A-><B->OneOf9</B-> a</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ATwoOf9"-></A-><B->TwoOf9</B-> b</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AThreeOf9"-></A-><B->ThreeOf9</B-> c</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AFourOf9"-></A-><B->FourOf9</B-> d</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AFiveOf9"-></A-><B->FiveOf9</B-> e</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASixOf9"-></A-><B->SixOf9</B-> f</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASevenOf9"-></A-><B->SevenOf9</B-> g</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AEightOf9"-></A-><B->EightOf9</B-> h</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ANineOf9"-></A-><B->NineOf9</B-> i</TD-><TD CLASS="rdoc"-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:OneOf9')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:OneOf9" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"->(Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h, Eq i) =&gt; Eq (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf9"->OneOf9</A-> a b c d e f g h i)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> a, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> b, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> c, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> d, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> e, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> f, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> g, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> h, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> i) =&gt; <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf9"->OneOf9</A-> a b c d e f g h i)</TD-></TR-><TR-><TD CLASS="decl"->(Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i) =&gt; Show (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf9"->OneOf9</A-> a b c d e f g h i)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> b, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> c, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> d, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> e, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> f, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> g, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> h, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> i) =&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf9"->OneOf9</A-> a b c d e f g h i)</TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3AOneOf10"-></A-><B->OneOf10</B-> a b c d e f g h i j</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/OneOfN.html#OneOf10"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3AOneOf10"-></A-><B->OneOf10</B-> a</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ATwoOf10"-></A-><B->TwoOf10</B-> b</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AThreeOf10"-></A-><B->ThreeOf10</B-> c</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AFourOf10"-></A-><B->FourOf10</B-> d</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AFiveOf10"-></A-><B->FiveOf10</B-> e</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASixOf10"-></A-><B->SixOf10</B-> f</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASevenOf10"-></A-><B->SevenOf10</B-> g</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AEightOf10"-></A-><B->EightOf10</B-> h</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ANineOf10"-></A-><B->NineOf10</B-> i</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ATenOf10"-></A-><B->TenOf10</B-> j</TD-><TD CLASS="rdoc"-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:OneOf10')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:OneOf10" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"->(Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h, Eq i, Eq j) =&gt; Eq (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf10"->OneOf10</A-> a b c d e f g h i j)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> a, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> b, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> c, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> d, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> e, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> f, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> g, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> h, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> i, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> j) =&gt; <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf10"->OneOf10</A-> a b c d e f g h i j)</TD-></TR-><TR-><TD CLASS="decl"->(Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j) =&gt; Show (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf10"->OneOf10</A-> a b c d e f g h i j)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> b, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> c, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> d, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> e, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> f, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> g, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> h, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> i, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> j) =&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf10"->OneOf10</A-> a b c d e f g h i j)</TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3AOneOf11"-></A-><B->OneOf11</B-> a b c d e f g h i j k</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/OneOfN.html#OneOf11"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3AOneOf11"-></A-><B->OneOf11</B-> a</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ATwoOf11"-></A-><B->TwoOf11</B-> b</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AThreeOf11"-></A-><B->ThreeOf11</B-> c</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AFourOf11"-></A-><B->FourOf11</B-> d</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AFiveOf11"-></A-><B->FiveOf11</B-> e</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASixOf11"-></A-><B->SixOf11</B-> f</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASevenOf11"-></A-><B->SevenOf11</B-> g</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AEightOf11"-></A-><B->EightOf11</B-> h</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ANineOf11"-></A-><B->NineOf11</B-> i</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ATenOf11"-></A-><B->TenOf11</B-> j</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AElevenOf11"-></A-><B->ElevenOf11</B-> k</TD-><TD CLASS="rdoc"-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:OneOf11')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:OneOf11" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"->(Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h, Eq i, Eq j, Eq k) =&gt; Eq (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf11"->OneOf11</A-> a b c d e f g h i j k)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> a, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> b, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> c, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> d, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> e, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> f, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> g, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> h, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> i, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> j, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> k) =&gt; <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf11"->OneOf11</A-> a b c d e f g h i j k)</TD-></TR-><TR-><TD CLASS="decl"->(Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j, Show k) =&gt; Show (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf11"->OneOf11</A-> a b c d e f g h i j k)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> b, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> c, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> d, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> e, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> f, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> g, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> h, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> i, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> j, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> k) =&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf11"->OneOf11</A-> a b c d e f g h i j k)</TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3AOneOf12"-></A-><B->OneOf12</B-> a b c d e f g h i j k l</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/OneOfN.html#OneOf12"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3AOneOf12"-></A-><B->OneOf12</B-> a</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ATwoOf12"-></A-><B->TwoOf12</B-> b</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AThreeOf12"-></A-><B->ThreeOf12</B-> c</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AFourOf12"-></A-><B->FourOf12</B-> d</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AFiveOf12"-></A-><B->FiveOf12</B-> e</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASixOf12"-></A-><B->SixOf12</B-> f</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASevenOf12"-></A-><B->SevenOf12</B-> g</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AEightOf12"-></A-><B->EightOf12</B-> h</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ANineOf12"-></A-><B->NineOf12</B-> i</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ATenOf12"-></A-><B->TenOf12</B-> j</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AElevenOf12"-></A-><B->ElevenOf12</B-> k</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ATwelveOf12"-></A-><B->TwelveOf12</B-> l</TD-><TD CLASS="rdoc"-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:OneOf12')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:OneOf12" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"->(Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h, Eq i, Eq j, Eq k, Eq l) =&gt; Eq (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf12"->OneOf12</A-> a b c d e f g h i j k l)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> a, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> b, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> c, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> d, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> e, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> f, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> g, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> h, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> i, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> j, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> k, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> l) =&gt; <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf12"->OneOf12</A-> a b c d e f g h i j k l)</TD-></TR-><TR-><TD CLASS="decl"->(Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j, Show k, Show l) =&gt; Show (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf12"->OneOf12</A-> a b c d e f g h i j k l)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> b, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> c, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> d, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> e, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> f, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> g, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> h, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> i, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> j, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> k, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> l) =&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf12"->OneOf12</A-> a b c d e f g h i j k l)</TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3AOneOf13"-></A-><B->OneOf13</B-> a b c d e f g h i j k l m</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/OneOfN.html#OneOf13"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3AOneOf13"-></A-><B->OneOf13</B-> a</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ATwoOf13"-></A-><B->TwoOf13</B-> b</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AThreeOf13"-></A-><B->ThreeOf13</B-> c</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AFourOf13"-></A-><B->FourOf13</B-> d</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AFiveOf13"-></A-><B->FiveOf13</B-> e</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASixOf13"-></A-><B->SixOf13</B-> f</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASevenOf13"-></A-><B->SevenOf13</B-> g</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AEightOf13"-></A-><B->EightOf13</B-> h</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ANineOf13"-></A-><B->NineOf13</B-> i</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ATenOf13"-></A-><B->TenOf13</B-> j</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AElevenOf13"-></A-><B->ElevenOf13</B-> k</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ATwelveOf13"-></A-><B->TwelveOf13</B-> l</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AThirteenOf13"-></A-><B->ThirteenOf13</B-> m</TD-><TD CLASS="rdoc"-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:OneOf13')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:OneOf13" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"->(Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h, Eq i, Eq j, Eq k, Eq l, Eq m) =&gt; Eq (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf13"->OneOf13</A-> a b c d e f g h i j k l m)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> a, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> b, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> c, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> d, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> e, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> f, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> g, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> h, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> i, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> j, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> k, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> l, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> m) =&gt; <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf13"->OneOf13</A-> a b c d e f g h i j k l m)</TD-></TR-><TR-><TD CLASS="decl"->(Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j, Show k, Show l, Show m) =&gt; Show (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf13"->OneOf13</A-> a b c d e f g h i j k l m)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> b, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> c, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> d, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> e, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> f, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> g, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> h, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> i, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> j, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> k, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> l, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> m) =&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf13"->OneOf13</A-> a b c d e f g h i j k l m)</TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3AOneOf14"-></A-><B->OneOf14</B-> a b c d e f g h i j k l m n</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/OneOfN.html#OneOf14"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3AOneOf14"-></A-><B->OneOf14</B-> a</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ATwoOf14"-></A-><B->TwoOf14</B-> b</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AThreeOf14"-></A-><B->ThreeOf14</B-> c</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AFourOf14"-></A-><B->FourOf14</B-> d</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AFiveOf14"-></A-><B->FiveOf14</B-> e</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASixOf14"-></A-><B->SixOf14</B-> f</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASevenOf14"-></A-><B->SevenOf14</B-> g</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AEightOf14"-></A-><B->EightOf14</B-> h</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ANineOf14"-></A-><B->NineOf14</B-> i</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ATenOf14"-></A-><B->TenOf14</B-> j</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AElevenOf14"-></A-><B->ElevenOf14</B-> k</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ATwelveOf14"-></A-><B->TwelveOf14</B-> l</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AThirteenOf14"-></A-><B->ThirteenOf14</B-> m</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AFourteenOf14"-></A-><B->FourteenOf14</B-> n</TD-><TD CLASS="rdoc"-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:OneOf14')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:OneOf14" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"->(Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h, Eq i, Eq j, Eq k, Eq l, Eq m, Eq n) =&gt; Eq (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf14"->OneOf14</A-> a b c d e f g h i j k l m n)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> a, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> b, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> c, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> d, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> e, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> f, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> g, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> h, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> i, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> j, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> k, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> l, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> m, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> n) =&gt; <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf14"->OneOf14</A-> a b c d e f g h i j k l m n)</TD-></TR-><TR-><TD CLASS="decl"->(Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j, Show k, Show l, Show m, Show n) =&gt; Show (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf14"->OneOf14</A-> a b c d e f g h i j k l m n)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> b, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> c, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> d, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> e, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> f, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> g, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> h, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> i, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> j, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> k, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> l, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> m, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> n) =&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf14"->OneOf14</A-> a b c d e f g h i j k l m n)</TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3AOneOf15"-></A-><B->OneOf15</B-> a b c d e f g h i j k l m n o</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/OneOfN.html#OneOf15"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3AOneOf15"-></A-><B->OneOf15</B-> a</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ATwoOf15"-></A-><B->TwoOf15</B-> b</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AThreeOf15"-></A-><B->ThreeOf15</B-> c</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AFourOf15"-></A-><B->FourOf15</B-> d</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AFiveOf15"-></A-><B->FiveOf15</B-> e</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASixOf15"-></A-><B->SixOf15</B-> f</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASevenOf15"-></A-><B->SevenOf15</B-> g</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AEightOf15"-></A-><B->EightOf15</B-> h</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ANineOf15"-></A-><B->NineOf15</B-> i</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ATenOf15"-></A-><B->TenOf15</B-> j</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AElevenOf15"-></A-><B->ElevenOf15</B-> k</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ATwelveOf15"-></A-><B->TwelveOf15</B-> l</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AThirteenOf15"-></A-><B->ThirteenOf15</B-> m</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AFourteenOf15"-></A-><B->FourteenOf15</B-> n</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AFifteenOf15"-></A-><B->FifteenOf15</B-> o</TD-><TD CLASS="rdoc"-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:OneOf15')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:OneOf15" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"->(Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h, Eq i, Eq j, Eq k, Eq l, Eq m, Eq n, Eq o) =&gt; Eq (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf15"->OneOf15</A-> a b c d e f g h i j k l m n o)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> a, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> b, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> c, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> d, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> e, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> f, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> g, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> h, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> i, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> j, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> k, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> l, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> m, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> n, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> o) =&gt; <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf15"->OneOf15</A-> a b c d e f g h i j k l m n o)</TD-></TR-><TR-><TD CLASS="decl"->(Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j, Show k, Show l, Show m, Show n, Show o) =&gt; Show (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf15"->OneOf15</A-> a b c d e f g h i j k l m n o)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> b, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> c, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> d, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> e, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> f, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> g, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> h, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> i, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> j, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> k, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> l, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> m, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> n, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> o) =&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf15"->OneOf15</A-> a b c d e f g h i j k l m n o)</TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3AOneOf16"-></A-><B->OneOf16</B-> a b c d e f g h i j k l m n o p</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/OneOfN.html#OneOf16"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3AOneOf16"-></A-><B->OneOf16</B-> a</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ATwoOf16"-></A-><B->TwoOf16</B-> b</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AThreeOf16"-></A-><B->ThreeOf16</B-> c</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AFourOf16"-></A-><B->FourOf16</B-> d</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AFiveOf16"-></A-><B->FiveOf16</B-> e</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASixOf16"-></A-><B->SixOf16</B-> f</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASevenOf16"-></A-><B->SevenOf16</B-> g</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AEightOf16"-></A-><B->EightOf16</B-> h</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ANineOf16"-></A-><B->NineOf16</B-> i</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ATenOf16"-></A-><B->TenOf16</B-> j</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AElevenOf16"-></A-><B->ElevenOf16</B-> k</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ATwelveOf16"-></A-><B->TwelveOf16</B-> l</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AThirteenOf16"-></A-><B->ThirteenOf16</B-> m</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AFourteenOf16"-></A-><B->FourteenOf16</B-> n</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AFifteenOf16"-></A-><B->FifteenOf16</B-> o</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASixteenOf16"-></A-><B->SixteenOf16</B-> p</TD-><TD CLASS="rdoc"-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:OneOf16')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:OneOf16" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"->(Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h, Eq i, Eq j, Eq k, Eq l, Eq m, Eq n, Eq o, Eq p) =&gt; Eq (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf16"->OneOf16</A-> a b c d e f g h i j k l m n o p)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> a, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> b, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> c, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> d, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> e, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> f, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> g, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> h, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> i, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> j, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> k, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> l, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> m, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> n, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> o, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> p) =&gt; <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf16"->OneOf16</A-> a b c d e f g h i j k l m n o p)</TD-></TR-><TR-><TD CLASS="decl"->(Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j, Show k, Show l, Show m, Show n, Show o, Show p) =&gt; Show (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf16"->OneOf16</A-> a b c d e f g h i j k l m n o p)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> b, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> c, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> d, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> e, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> f, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> g, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> h, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> i, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> j, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> k, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> l, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> m, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> n, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> o, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> p) =&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf16"->OneOf16</A-> a b c d e f g h i j k l m n o p)</TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3AOneOf17"-></A-><B->OneOf17</B-> a b c d e f g h i j k l m n o p q</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/OneOfN.html#OneOf17"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3AOneOf17"-></A-><B->OneOf17</B-> a</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ATwoOf17"-></A-><B->TwoOf17</B-> b</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AThreeOf17"-></A-><B->ThreeOf17</B-> c</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AFourOf17"-></A-><B->FourOf17</B-> d</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AFiveOf17"-></A-><B->FiveOf17</B-> e</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASixOf17"-></A-><B->SixOf17</B-> f</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASevenOf17"-></A-><B->SevenOf17</B-> g</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AEightOf17"-></A-><B->EightOf17</B-> h</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ANineOf17"-></A-><B->NineOf17</B-> i</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ATenOf17"-></A-><B->TenOf17</B-> j</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AElevenOf17"-></A-><B->ElevenOf17</B-> k</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ATwelveOf17"-></A-><B->TwelveOf17</B-> l</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AThirteenOf17"-></A-><B->ThirteenOf17</B-> m</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AFourteenOf17"-></A-><B->FourteenOf17</B-> n</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AFifteenOf17"-></A-><B->FifteenOf17</B-> o</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASixteenOf17"-></A-><B->SixteenOf17</B-> p</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASeventeenOf17"-></A-><B->SeventeenOf17</B-> q</TD-><TD CLASS="rdoc"-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:OneOf17')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:OneOf17" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"->(Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h, Eq i, Eq j, Eq k, Eq l, Eq m, Eq n, Eq o, Eq p, Eq q) =&gt; Eq (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf17"->OneOf17</A-> a b c d e f g h i j k l m n o p q)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> a, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> b, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> c, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> d, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> e, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> f, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> g, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> h, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> i, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> j, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> k, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> l, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> m, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> n, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> o, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> p, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> q) =&gt; <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf17"->OneOf17</A-> a b c d e f g h i j k l m n o p q)</TD-></TR-><TR-><TD CLASS="decl"->(Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j, Show k, Show l, Show m, Show n, Show o, Show p, Show q) =&gt; Show (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf17"->OneOf17</A-> a b c d e f g h i j k l m n o p q)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> b, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> c, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> d, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> e, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> f, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> g, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> h, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> i, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> j, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> k, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> l, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> m, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> n, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> o, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> p, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> q) =&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf17"->OneOf17</A-> a b c d e f g h i j k l m n o p q)</TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3AOneOf18"-></A-><B->OneOf18</B-> a b c d e f g h i j k l m n o p q r</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/OneOfN.html#OneOf18"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3AOneOf18"-></A-><B->OneOf18</B-> a</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ATwoOf18"-></A-><B->TwoOf18</B-> b</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AThreeOf18"-></A-><B->ThreeOf18</B-> c</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AFourOf18"-></A-><B->FourOf18</B-> d</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AFiveOf18"-></A-><B->FiveOf18</B-> e</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASixOf18"-></A-><B->SixOf18</B-> f</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASevenOf18"-></A-><B->SevenOf18</B-> g</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AEightOf18"-></A-><B->EightOf18</B-> h</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ANineOf18"-></A-><B->NineOf18</B-> i</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ATenOf18"-></A-><B->TenOf18</B-> j</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AElevenOf18"-></A-><B->ElevenOf18</B-> k</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ATwelveOf18"-></A-><B->TwelveOf18</B-> l</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AThirteenOf18"-></A-><B->ThirteenOf18</B-> m</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AFourteenOf18"-></A-><B->FourteenOf18</B-> n</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AFifteenOf18"-></A-><B->FifteenOf18</B-> o</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASixteenOf18"-></A-><B->SixteenOf18</B-> p</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASeventeenOf18"-></A-><B->SeventeenOf18</B-> q</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AEighteenOf18"-></A-><B->EighteenOf18</B-> r</TD-><TD CLASS="rdoc"-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:OneOf18')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:OneOf18" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"->(Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h, Eq i, Eq j, Eq k, Eq l, Eq m, Eq n, Eq o, Eq p, Eq q, Eq r) =&gt; Eq (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf18"->OneOf18</A-> a b c d e f g h i j k l m n o p q r)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> a, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> b, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> c, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> d, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> e, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> f, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> g, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> h, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> i, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> j, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> k, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> l, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> m, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> n, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> o, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> p, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> q, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> r) =&gt; <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf18"->OneOf18</A-> a b c d e f g h i j k l m n o p q r)</TD-></TR-><TR-><TD CLASS="decl"->(Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j, Show k, Show l, Show m, Show n, Show o, Show p, Show q, Show r) =&gt; Show (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf18"->OneOf18</A-> a b c d e f g h i j k l m n o p q r)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> b, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> c, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> d, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> e, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> f, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> g, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> h, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> i, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> j, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> k, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> l, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> m, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> n, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> o, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> p, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> q, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> r) =&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf18"->OneOf18</A-> a b c d e f g h i j k l m n o p q r)</TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3AOneOf19"-></A-><B->OneOf19</B-> a b c d e f g h i j k l m n o p q r s</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/OneOfN.html#OneOf19"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3AOneOf19"-></A-><B->OneOf19</B-> a</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ATwoOf19"-></A-><B->TwoOf19</B-> b</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AThreeOf19"-></A-><B->ThreeOf19</B-> c</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AFourOf19"-></A-><B->FourOf19</B-> d</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AFiveOf19"-></A-><B->FiveOf19</B-> e</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASixOf19"-></A-><B->SixOf19</B-> f</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASevenOf19"-></A-><B->SevenOf19</B-> g</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AEightOf19"-></A-><B->EightOf19</B-> h</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ANineOf19"-></A-><B->NineOf19</B-> i</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ATenOf19"-></A-><B->TenOf19</B-> j</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AElevenOf19"-></A-><B->ElevenOf19</B-> k</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ATwelveOf19"-></A-><B->TwelveOf19</B-> l</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AThirteenOf19"-></A-><B->ThirteenOf19</B-> m</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AFourteenOf19"-></A-><B->FourteenOf19</B-> n</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AFifteenOf19"-></A-><B->FifteenOf19</B-> o</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASixteenOf19"-></A-><B->SixteenOf19</B-> p</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASeventeenOf19"-></A-><B->SeventeenOf19</B-> q</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AEighteenOf19"-></A-><B->EighteenOf19</B-> r</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ANineteenOf19"-></A-><B->NineteenOf19</B-> s</TD-><TD CLASS="rdoc"-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:OneOf19')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:OneOf19" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"->(Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h, Eq i, Eq j, Eq k, Eq l, Eq m, Eq n, Eq o, Eq p, Eq q, Eq r, Eq s) =&gt; Eq (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf19"->OneOf19</A-> a b c d e f g h i j k l m n o p q r s)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> a, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> b, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> c, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> d, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> e, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> f, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> g, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> h, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> i, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> j, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> k, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> l, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> m, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> n, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> o, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> p, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> q, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> r, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> s) =&gt; <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf19"->OneOf19</A-> a b c d e f g h i j k l m n o p q r s)</TD-></TR-><TR-><TD CLASS="decl"->(Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j, Show k, Show l, Show m, Show n, Show o, Show p, Show q, Show r, Show s) =&gt; Show (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf19"->OneOf19</A-> a b c d e f g h i j k l m n o p q r s)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> b, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> c, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> d, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> e, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> f, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> g, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> h, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> i, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> j, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> k, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> l, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> m, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> n, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> o, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> p, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> q, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> r, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> s) =&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf19"->OneOf19</A-> a b c d e f g h i j k l m n o p q r s)</TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3AOneOf20"-></A-><B->OneOf20</B-> a b c d e f g h i j k l m n o p q r s t</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/OneOfN.html#OneOf20"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3AOneOf20"-></A-><B->OneOf20</B-> a</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ATwoOf20"-></A-><B->TwoOf20</B-> b</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AThreeOf20"-></A-><B->ThreeOf20</B-> c</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AFourOf20"-></A-><B->FourOf20</B-> d</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AFiveOf20"-></A-><B->FiveOf20</B-> e</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASixOf20"-></A-><B->SixOf20</B-> f</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASevenOf20"-></A-><B->SevenOf20</B-> g</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AEightOf20"-></A-><B->EightOf20</B-> h</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ANineOf20"-></A-><B->NineOf20</B-> i</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ATenOf20"-></A-><B->TenOf20</B-> j</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AElevenOf20"-></A-><B->ElevenOf20</B-> k</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ATwelveOf20"-></A-><B->TwelveOf20</B-> l</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AThirteenOf20"-></A-><B->ThirteenOf20</B-> m</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AFourteenOf20"-></A-><B->FourteenOf20</B-> n</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AFifteenOf20"-></A-><B->FifteenOf20</B-> o</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASixteenOf20"-></A-><B->SixteenOf20</B-> p</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASeventeenOf20"-></A-><B->SeventeenOf20</B-> q</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AEighteenOf20"-></A-><B->EighteenOf20</B-> r</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ANineteenOf20"-></A-><B->NineteenOf20</B-> s</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ATwentyOf20"-></A-><B->TwentyOf20</B-> t</TD-><TD CLASS="rdoc"-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:OneOf20')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:OneOf20" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"->(Eq a, Eq b, Eq c, Eq d, Eq e, Eq f, Eq g, Eq h, Eq i, Eq j, Eq k, Eq l, Eq m, Eq n, Eq o, Eq p, Eq q, Eq r, Eq s, Eq t) =&gt; Eq (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf20"->OneOf20</A-> a b c d e f g h i j k l m n o p q r s t)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> a, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> b, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> c, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> d, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> e, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> f, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> g, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> h, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> i, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> j, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> k, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> l, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> m, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> n, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> o, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> p, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> q, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> r, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> s, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> t) =&gt; <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf20"->OneOf20</A-> a b c d e f g h i j k l m n o p q r s t)</TD-></TR-><TR-><TD CLASS="decl"->(Show a, Show b, Show c, Show d, Show e, Show f, Show g, Show h, Show i, Show j, Show k, Show l, Show m, Show n, Show o, Show p, Show q, Show r, Show s, Show t) =&gt; Show (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf20"->OneOf20</A-> a b c d e f g h i j k l m n o p q r s t)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> b, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> c, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> d, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> e, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> f, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> g, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> h, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> i, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> j, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> k, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> l, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> m, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> n, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> o, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> p, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> q, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> r, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> s, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> t) =&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf20"->OneOf20</A-> a b c d e f g h i j k l m n o p q r s t)</TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></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->
− docs/HaXml/Text-XML-HaXml-Parse.html
@@ -1,1288 +0,0 @@-<!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.HaXml.Parse</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"->HaXml</TD-><TD CLASS="topbut"-><A HREF="src/Text/XML/HaXml/Parse.html"->Source code</A-></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.HaXml.Parse</FONT-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="section4"-><B->Contents</B-></TD-></TR-><TR-><TD-><DL-><DT-><A HREF="#1"->Parse a whole document-</A-></DT-><DT-><A HREF="#2"->Parse just a DTD-</A-></DT-><DT-><A HREF="#3"->Parse a partial document-</A-></DT-><DT-><A HREF="#4"->Individual parsers for use with <EM->xmlParseWith</EM-> and module SAX-</A-></DT-><DT-><A HREF="#5"->These general utility functions don't belong here-</A-></DT-></DL-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section1"->Description</TD-></TR-><TR-><TD CLASS="doc"->A non-validating XML parser.  For the input grammar, see-   <A HREF="http://www.w3.org/TR/REC-xml"->http://www.w3.org/TR/REC-xml</A->.-</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%3AxmlParse"->xmlParse</A-> :: String -&gt; String -&gt; <A HREF="Text-XML-HaXml-Types.html#t%3ADocument"->Document</A-> <A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AxmlParse%27"->xmlParse'</A-> :: String -&gt; String -&gt; Either String (<A HREF="Text-XML-HaXml-Types.html#t%3ADocument"->Document</A-> <A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A->)</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AdtdParse"->dtdParse</A-> :: String -&gt; String -&gt; Maybe <A HREF="Text-XML-HaXml-Types.html#t%3ADocTypeDecl"->DocTypeDecl</A-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AdtdParse%27"->dtdParse'</A-> :: String -&gt; String -&gt; Either String (Maybe <A HREF="Text-XML-HaXml-Types.html#t%3ADocTypeDecl"->DocTypeDecl</A->)</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AxmlParseWith"->xmlParseWith</A-> :: <A HREF="Text-XML-HaXml-Parse.html#t%3AXParser"->XParser</A-> a -&gt; [(<A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A->, <A HREF="Text-XML-HaXml-Lex.html#t%3ATokenT"->TokenT</A->)] -&gt; (Either String a, [(<A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A->, <A HREF="Text-XML-HaXml-Lex.html#t%3ATokenT"->TokenT</A->)])</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Adocument"->document</A-> :: <A HREF="Text-XML-HaXml-Parse.html#t%3AXParser"->XParser</A-> (<A HREF="Text-XML-HaXml-Types.html#t%3ADocument"->Document</A-> <A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A->)</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Aelement"->element</A-> :: <A HREF="Text-XML-HaXml-Parse.html#t%3AXParser"->XParser</A-> (<A HREF="Text-XML-HaXml-Types.html#t%3AElement"->Element</A-> <A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A->)</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Acontent"->content</A-> :: <A HREF="Text-XML-HaXml-Parse.html#t%3AXParser"->XParser</A-> (<A HREF="Text-XML-HaXml-Types.html#t%3AContent"->Content</A-> <A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A->)</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Acomment"->comment</A-> :: <A HREF="Text-XML-HaXml-Parse.html#t%3AXParser"->XParser</A-> <A HREF="Text-XML-HaXml-Types.html#t%3AComment"->Comment</A-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Acdsect"->cdsect</A-> :: <A HREF="Text-XML-HaXml-Parse.html#t%3AXParser"->XParser</A-> <A HREF="Text-XML-HaXml-Types.html#t%3ACDSect"->CDSect</A-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Achardata"->chardata</A-> :: <A HREF="Text-XML-HaXml-Parse.html#t%3AXParser"->XParser</A-> <A HREF="Text-XML-HaXml-Types.html#t%3ACharData"->CharData</A-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Areference"->reference</A-> :: <A HREF="Text-XML-HaXml-Parse.html#t%3AXParser"->XParser</A-> <A HREF="Text-XML-HaXml-Types.html#t%3AReference"->Reference</A-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Adoctypedecl"->doctypedecl</A-> :: <A HREF="Text-XML-HaXml-Parse.html#t%3AXParser"->XParser</A-> <A HREF="Text-XML-HaXml-Types.html#t%3ADocTypeDecl"->DocTypeDecl</A-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Aprocessinginstruction"->processinginstruction</A-> :: <A HREF="Text-XML-HaXml-Parse.html#t%3AXParser"->XParser</A-> <A HREF="Text-XML-HaXml-Types.html#t%3AProcessingInstruction"->ProcessingInstruction</A-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Aelemtag"->elemtag</A-> :: <A HREF="Text-XML-HaXml-Parse.html#t%3AXParser"->XParser</A-> <A HREF="Text-XML-HaXml-Types.html#t%3AElemTag"->ElemTag</A-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Aname"->name</A-> :: <A HREF="Text-XML-HaXml-Parse.html#t%3AXParser"->XParser</A-> <A HREF="Text-XML-HaXml-Types.html#t%3AName"->Name</A-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Atok"->tok</A-> :: <A HREF="Text-XML-HaXml-Lex.html#t%3ATokenT"->TokenT</A-> -&gt; <A HREF="Text-XML-HaXml-Parse.html#t%3AXParser"->XParser</A-> <A HREF="Text-XML-HaXml-Lex.html#t%3ATokenT"->TokenT</A-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AelemOpenTag"->elemOpenTag</A-> :: <A HREF="Text-XML-HaXml-Parse.html#t%3AXParser"->XParser</A-> <A HREF="Text-XML-HaXml-Types.html#t%3AElemTag"->ElemTag</A-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AelemCloseTag"->elemCloseTag</A-> :: <A HREF="Text-XML-HaXml-Types.html#t%3AName"->Name</A-> -&gt; <A HREF="Text-XML-HaXml-Parse.html#t%3AXParser"->XParser</A-> ()</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AemptySTs"->emptySTs</A-> :: SymTabs</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->type</SPAN-> <A HREF="#t%3AXParser"->XParser</A-> a = Parser SymTabs (<A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A->, <A HREF="Text-XML-HaXml-Lex.html#t%3ATokenT"->TokenT</A->) a</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Afst3"->fst3</A-> :: (a, b, c) -&gt; a</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Asnd3"->snd3</A-> :: (a, b, c) -&gt; b</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Athd3"->thd3</A-> :: (a, b, c) -&gt; c</TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section1"-><A NAME="1"->Parse a whole document-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AxmlParse"-></A-><B->xmlParse</B-> :: String -&gt; String -&gt; <A HREF="Text-XML-HaXml-Types.html#t%3ADocument"->Document</A-> <A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A-></TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Parse.html#xmlParse"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->To parse a whole document, <TT->xmlParse file content</TT-> takes a filename-   (for generating error reports) and the string content of that file.-   A parse error causes program failure, with message to stderr.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AxmlParse%27"-></A-><B->xmlParse'</B-> :: String -&gt; String -&gt; Either String (<A HREF="Text-XML-HaXml-Types.html#t%3ADocument"->Document</A-> <A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A->)</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Parse.html#xmlParse%27"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->To parse a whole document, <TT->xmlParse' file content</TT-> takes a filename-   (for generating error reports) and the string content of that file.-   Any parse error message is passed back to the caller through the-   <TT->Either</TT-> type.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section1"-><A NAME="2"->Parse just a DTD-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AdtdParse"-></A-><B->dtdParse</B-> :: String -&gt; String -&gt; Maybe <A HREF="Text-XML-HaXml-Types.html#t%3ADocTypeDecl"->DocTypeDecl</A-></TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Parse.html#dtdParse"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->To parse just a DTD, <TT->dtdParse file content</TT-> takes a filename-   (for generating error reports) and the string content of that-   file.  If no DTD was found, you get <TT->Nothing</TT-> rather than an error.-   However, if a DTD is found but contains errors, the program crashes.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AdtdParse%27"-></A-><B->dtdParse'</B-> :: String -&gt; String -&gt; Either String (Maybe <A HREF="Text-XML-HaXml-Types.html#t%3ADocTypeDecl"->DocTypeDecl</A->)</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Parse.html#dtdParse%27"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->To parse just a DTD, <TT->dtdParse' file content</TT-> takes a filename-   (for generating error reports) and the string content of that-   file.  If no DTD was found, you get <TT->Right Nothing</TT->.-   If a DTD was found but contains errors, you get a <TT->Left message</TT->.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section1"-><A NAME="3"->Parse a partial document-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AxmlParseWith"-></A-><B->xmlParseWith</B-> :: <A HREF="Text-XML-HaXml-Parse.html#t%3AXParser"->XParser</A-> a -&gt; [(<A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A->, <A HREF="Text-XML-HaXml-Lex.html#t%3ATokenT"->TokenT</A->)] -&gt; (Either String a, [(<A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A->, <A HREF="Text-XML-HaXml-Lex.html#t%3ATokenT"->TokenT</A->)])</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Parse.html#xmlParseWith"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->To parse a partial document, e.g. from an XML-based stream protocol,-   where you may later want to get more document elements from the same-   stream.  Arguments are: a parser for the item you want, and the-   already-lexed input to parse from.  Returns the item you wanted-   (or an error message), plus the remainder of the input.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section1"-><A NAME="4"->Individual parsers for use with <EM->xmlParseWith</EM-> and module SAX-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Adocument"-></A-><B->document</B-> :: <A HREF="Text-XML-HaXml-Parse.html#t%3AXParser"->XParser</A-> (<A HREF="Text-XML-HaXml-Types.html#t%3ADocument"->Document</A-> <A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A->)</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Parse.html#document"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Return an entire XML document including prolog and trailing junk.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Aelement"-></A-><B->element</B-> :: <A HREF="Text-XML-HaXml-Parse.html#t%3AXParser"->XParser</A-> (<A HREF="Text-XML-HaXml-Types.html#t%3AElement"->Element</A-> <A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A->)</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Parse.html#element"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Return a complete element including all its inner content.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Acontent"-></A-><B->content</B-> :: <A HREF="Text-XML-HaXml-Parse.html#t%3AXParser"->XParser</A-> (<A HREF="Text-XML-HaXml-Types.html#t%3AContent"->Content</A-> <A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A->)</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Parse.html#content"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Return a content particle, e.g. text, element, reference, etc-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Acomment"-></A-><B->comment</B-> :: <A HREF="Text-XML-HaXml-Parse.html#t%3AXParser"->XParser</A-> <A HREF="Text-XML-HaXml-Types.html#t%3AComment"->Comment</A-></TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Parse.html#comment"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Return an XML comment.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Acdsect"-></A-><B->cdsect</B-> :: <A HREF="Text-XML-HaXml-Parse.html#t%3AXParser"->XParser</A-> <A HREF="Text-XML-HaXml-Types.html#t%3ACDSect"->CDSect</A-></TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Parse.html#cdsect"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Achardata"-></A-><B->chardata</B-> :: <A HREF="Text-XML-HaXml-Parse.html#t%3AXParser"->XParser</A-> <A HREF="Text-XML-HaXml-Types.html#t%3ACharData"->CharData</A-></TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Parse.html#chardata"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Return parsed freetext (i.e. until the next markup)-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Areference"-></A-><B->reference</B-> :: <A HREF="Text-XML-HaXml-Parse.html#t%3AXParser"->XParser</A-> <A HREF="Text-XML-HaXml-Types.html#t%3AReference"->Reference</A-></TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Parse.html#reference"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Return either a general entity reference, or a character reference.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Adoctypedecl"-></A-><B->doctypedecl</B-> :: <A HREF="Text-XML-HaXml-Parse.html#t%3AXParser"->XParser</A-> <A HREF="Text-XML-HaXml-Types.html#t%3ADocTypeDecl"->DocTypeDecl</A-></TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Parse.html#doctypedecl"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Return a DOCTYPE decl, indicating a DTD.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Aprocessinginstruction"-></A-><B->processinginstruction</B-> :: <A HREF="Text-XML-HaXml-Parse.html#t%3AXParser"->XParser</A-> <A HREF="Text-XML-HaXml-Types.html#t%3AProcessingInstruction"->ProcessingInstruction</A-></TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Parse.html#processinginstruction"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Parse a processing instruction.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Aelemtag"-></A-><B->elemtag</B-> :: <A HREF="Text-XML-HaXml-Parse.html#t%3AXParser"->XParser</A-> <A HREF="Text-XML-HaXml-Types.html#t%3AElemTag"->ElemTag</A-></TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Parse.html#elemtag"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Parse only the parts between angle brackets in an element tag.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Aname"-></A-><B->name</B-> :: <A HREF="Text-XML-HaXml-Parse.html#t%3AXParser"->XParser</A-> <A HREF="Text-XML-HaXml-Types.html#t%3AName"->Name</A-></TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Parse.html#name"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Return just a name, e.g. element name, attribute name.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Atok"-></A-><B->tok</B-> :: <A HREF="Text-XML-HaXml-Lex.html#t%3ATokenT"->TokenT</A-> -&gt; <A HREF="Text-XML-HaXml-Parse.html#t%3AXParser"->XParser</A-> <A HREF="Text-XML-HaXml-Lex.html#t%3ATokenT"->TokenT</A-></TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Parse.html#tok"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Return the next token from the input only if it matches the given token.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AelemOpenTag"-></A-><B->elemOpenTag</B-> :: <A HREF="Text-XML-HaXml-Parse.html#t%3AXParser"->XParser</A-> <A HREF="Text-XML-HaXml-Types.html#t%3AElemTag"->ElemTag</A-></TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Parse.html#elemOpenTag"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->For use with stream parsers - returns the complete opening element tag.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AelemCloseTag"-></A-><B->elemCloseTag</B-> :: <A HREF="Text-XML-HaXml-Types.html#t%3AName"->Name</A-> -&gt; <A HREF="Text-XML-HaXml-Parse.html#t%3AXParser"->XParser</A-> ()</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Parse.html#elemCloseTag"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->For use with stream parsers - accepts a closing tag, provided it-   matches the given element name.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AemptySTs"-></A-><B->emptySTs</B-> :: SymTabs</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Parse.html#emptySTs"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Some empty symbol tables for GE and PE references.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->type</SPAN-> <A NAME="t%3AXParser"-></A-><B->XParser</B-> a = Parser SymTabs (<A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A->, <A HREF="Text-XML-HaXml-Lex.html#t%3ATokenT"->TokenT</A->) a</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Parse.html#XParser"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->XParser is just a specialisation of the PolyState parser.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section1"-><A NAME="5"->These general utility functions don't belong here-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Afst3"-></A-><B->fst3</B-> :: (a, b, c) -&gt; a</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Parse.html#fst3"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Asnd3"-></A-><B->snd3</B-> :: (a, b, c) -&gt; b</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Parse.html#snd3"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Athd3"-></A-><B->thd3</B-> :: (a, b, c) -&gt; c</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Parse.html#thd3"->Source</A-></TD-></TR-></TABLE-></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->
− docs/HaXml/Text-XML-HaXml-ParseLazy.html
@@ -1,1098 +0,0 @@-<!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.HaXml.ParseLazy</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"->HaXml</TD-><TD CLASS="topbut"-><A HREF="src/Text/XML/HaXml/ParseLazy.html"->Source code</A-></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.HaXml.ParseLazy</FONT-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="section4"-><B->Contents</B-></TD-></TR-><TR-><TD-><DL-><DT-><A HREF="#1"->Parse a whole document-</A-></DT-><DT-><A HREF="#2"->Parse just a DTD-</A-></DT-><DT-><A HREF="#3"->Parse a partial document-</A-></DT-><DT-><A HREF="#4"->Individual parsers for use with <EM->xmlParseWith</EM-> and module SAX-</A-></DT-><DT-><A HREF="#5"->These general utility functions don't belong here-</A-></DT-></DL-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section1"->Description</TD-></TR-><TR-><TD CLASS="doc"->A non-validating XML parser.  For the input grammar, see-   <A HREF="http://www.w3.org/TR/REC-xml"->http://www.w3.org/TR/REC-xml</A->.-</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%3AxmlParse"->xmlParse</A-> :: String -&gt; String -&gt; <A HREF="Text-XML-HaXml-Types.html#t%3ADocument"->Document</A-> <A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AxmlParseWith"->xmlParseWith</A-> :: <A HREF="Text-XML-HaXml-ParseLazy.html#t%3AXParser"->XParser</A-> a -&gt; [(<A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A->, <A HREF="Text-XML-HaXml-Lex.html#t%3ATokenT"->TokenT</A->)] -&gt; (Either String a, [(<A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A->, <A HREF="Text-XML-HaXml-Lex.html#t%3ATokenT"->TokenT</A->)])</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Adocument"->document</A-> :: <A HREF="Text-XML-HaXml-ParseLazy.html#t%3AXParser"->XParser</A-> (<A HREF="Text-XML-HaXml-Types.html#t%3ADocument"->Document</A-> <A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A->)</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Aelement"->element</A-> :: <A HREF="Text-XML-HaXml-ParseLazy.html#t%3AXParser"->XParser</A-> (<A HREF="Text-XML-HaXml-Types.html#t%3AElement"->Element</A-> <A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A->)</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Acontent"->content</A-> :: <A HREF="Text-XML-HaXml-ParseLazy.html#t%3AXParser"->XParser</A-> (<A HREF="Text-XML-HaXml-Types.html#t%3AContent"->Content</A-> <A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A->)</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Acomment"->comment</A-> :: <A HREF="Text-XML-HaXml-ParseLazy.html#t%3AXParser"->XParser</A-> <A HREF="Text-XML-HaXml-Types.html#t%3AComment"->Comment</A-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Achardata"->chardata</A-> :: <A HREF="Text-XML-HaXml-ParseLazy.html#t%3AXParser"->XParser</A-> <A HREF="Text-XML-HaXml-Types.html#t%3ACharData"->CharData</A-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Areference"->reference</A-> :: <A HREF="Text-XML-HaXml-ParseLazy.html#t%3AXParser"->XParser</A-> <A HREF="Text-XML-HaXml-Types.html#t%3AReference"->Reference</A-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Adoctypedecl"->doctypedecl</A-> :: <A HREF="Text-XML-HaXml-ParseLazy.html#t%3AXParser"->XParser</A-> <A HREF="Text-XML-HaXml-Types.html#t%3ADocTypeDecl"->DocTypeDecl</A-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Aprocessinginstruction"->processinginstruction</A-> :: <A HREF="Text-XML-HaXml-ParseLazy.html#t%3AXParser"->XParser</A-> <A HREF="Text-XML-HaXml-Types.html#t%3AProcessingInstruction"->ProcessingInstruction</A-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Aelemtag"->elemtag</A-> :: <A HREF="Text-XML-HaXml-ParseLazy.html#t%3AXParser"->XParser</A-> <A HREF="Text-XML-HaXml-Types.html#t%3AElemTag"->ElemTag</A-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Aname"->name</A-> :: <A HREF="Text-XML-HaXml-ParseLazy.html#t%3AXParser"->XParser</A-> <A HREF="Text-XML-HaXml-Types.html#t%3AName"->Name</A-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Atok"->tok</A-> :: <A HREF="Text-XML-HaXml-Lex.html#t%3ATokenT"->TokenT</A-> -&gt; <A HREF="Text-XML-HaXml-ParseLazy.html#t%3AXParser"->XParser</A-> <A HREF="Text-XML-HaXml-Lex.html#t%3ATokenT"->TokenT</A-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AelemOpenTag"->elemOpenTag</A-> :: <A HREF="Text-XML-HaXml-ParseLazy.html#t%3AXParser"->XParser</A-> <A HREF="Text-XML-HaXml-Types.html#t%3AElemTag"->ElemTag</A-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AelemCloseTag"->elemCloseTag</A-> :: <A HREF="Text-XML-HaXml-Types.html#t%3AName"->Name</A-> -&gt; <A HREF="Text-XML-HaXml-ParseLazy.html#t%3AXParser"->XParser</A-> ()</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AemptySTs"->emptySTs</A-> :: SymTabs</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->type</SPAN-> <A HREF="#t%3AXParser"->XParser</A-> a = Parser SymTabs (<A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A->, <A HREF="Text-XML-HaXml-Lex.html#t%3ATokenT"->TokenT</A->) a</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Afst3"->fst3</A-> :: (a, b, c) -&gt; a</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Asnd3"->snd3</A-> :: (a, b, c) -&gt; b</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Athd3"->thd3</A-> :: (a, b, c) -&gt; c</TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section1"-><A NAME="1"->Parse a whole document-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AxmlParse"-></A-><B->xmlParse</B-> :: String -&gt; String -&gt; <A HREF="Text-XML-HaXml-Types.html#t%3ADocument"->Document</A-> <A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A-></TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/ParseLazy.html#xmlParse"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->To parse a whole document, <TT->xmlParse file content</TT-> takes a filename-   (for generating error reports) and the string content of that file.-   A parse error causes program failure, with message to stderr.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section1"-><A NAME="2"->Parse just a DTD-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section1"-><A NAME="3"->Parse a partial document-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AxmlParseWith"-></A-><B->xmlParseWith</B-> :: <A HREF="Text-XML-HaXml-ParseLazy.html#t%3AXParser"->XParser</A-> a -&gt; [(<A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A->, <A HREF="Text-XML-HaXml-Lex.html#t%3ATokenT"->TokenT</A->)] -&gt; (Either String a, [(<A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A->, <A HREF="Text-XML-HaXml-Lex.html#t%3ATokenT"->TokenT</A->)])</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/ParseLazy.html#xmlParseWith"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->To parse a partial document, e.g. from an XML-based stream protocol,-   where you may later want to get more document elements from the same-   stream.  Arguments are: a parser for the item you want, and the-   already-lexed input to parse from.  Returns the item you wanted-   (or an error message), plus the remainder of the input.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section1"-><A NAME="4"->Individual parsers for use with <EM->xmlParseWith</EM-> and module SAX-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Adocument"-></A-><B->document</B-> :: <A HREF="Text-XML-HaXml-ParseLazy.html#t%3AXParser"->XParser</A-> (<A HREF="Text-XML-HaXml-Types.html#t%3ADocument"->Document</A-> <A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A->)</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/ParseLazy.html#document"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Return an entire XML document including prolog and trailing junk.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Aelement"-></A-><B->element</B-> :: <A HREF="Text-XML-HaXml-ParseLazy.html#t%3AXParser"->XParser</A-> (<A HREF="Text-XML-HaXml-Types.html#t%3AElement"->Element</A-> <A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A->)</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/ParseLazy.html#element"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Return a complete element including all its inner content.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Acontent"-></A-><B->content</B-> :: <A HREF="Text-XML-HaXml-ParseLazy.html#t%3AXParser"->XParser</A-> (<A HREF="Text-XML-HaXml-Types.html#t%3AContent"->Content</A-> <A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A->)</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/ParseLazy.html#content"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Return a content particle, e.g. text, element, reference, etc-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Acomment"-></A-><B->comment</B-> :: <A HREF="Text-XML-HaXml-ParseLazy.html#t%3AXParser"->XParser</A-> <A HREF="Text-XML-HaXml-Types.html#t%3AComment"->Comment</A-></TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/ParseLazy.html#comment"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Return an XML comment.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Achardata"-></A-><B->chardata</B-> :: <A HREF="Text-XML-HaXml-ParseLazy.html#t%3AXParser"->XParser</A-> <A HREF="Text-XML-HaXml-Types.html#t%3ACharData"->CharData</A-></TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/ParseLazy.html#chardata"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Return parsed freetext (i.e. until the next markup)-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Areference"-></A-><B->reference</B-> :: <A HREF="Text-XML-HaXml-ParseLazy.html#t%3AXParser"->XParser</A-> <A HREF="Text-XML-HaXml-Types.html#t%3AReference"->Reference</A-></TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/ParseLazy.html#reference"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Return either a general entity reference, or a character reference.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Adoctypedecl"-></A-><B->doctypedecl</B-> :: <A HREF="Text-XML-HaXml-ParseLazy.html#t%3AXParser"->XParser</A-> <A HREF="Text-XML-HaXml-Types.html#t%3ADocTypeDecl"->DocTypeDecl</A-></TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/ParseLazy.html#doctypedecl"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Return a DOCTYPE decl, indicating a DTD.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Aprocessinginstruction"-></A-><B->processinginstruction</B-> :: <A HREF="Text-XML-HaXml-ParseLazy.html#t%3AXParser"->XParser</A-> <A HREF="Text-XML-HaXml-Types.html#t%3AProcessingInstruction"->ProcessingInstruction</A-></TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/ParseLazy.html#processinginstruction"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Parse a processing instruction.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Aelemtag"-></A-><B->elemtag</B-> :: <A HREF="Text-XML-HaXml-ParseLazy.html#t%3AXParser"->XParser</A-> <A HREF="Text-XML-HaXml-Types.html#t%3AElemTag"->ElemTag</A-></TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/ParseLazy.html#elemtag"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Parse only the parts between angle brackets in an element tag.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Aname"-></A-><B->name</B-> :: <A HREF="Text-XML-HaXml-ParseLazy.html#t%3AXParser"->XParser</A-> <A HREF="Text-XML-HaXml-Types.html#t%3AName"->Name</A-></TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/ParseLazy.html#name"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Return just a name, e.g. element name, attribute name.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Atok"-></A-><B->tok</B-> :: <A HREF="Text-XML-HaXml-Lex.html#t%3ATokenT"->TokenT</A-> -&gt; <A HREF="Text-XML-HaXml-ParseLazy.html#t%3AXParser"->XParser</A-> <A HREF="Text-XML-HaXml-Lex.html#t%3ATokenT"->TokenT</A-></TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/ParseLazy.html#tok"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Return the next token from the input only if it matches the given token.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AelemOpenTag"-></A-><B->elemOpenTag</B-> :: <A HREF="Text-XML-HaXml-ParseLazy.html#t%3AXParser"->XParser</A-> <A HREF="Text-XML-HaXml-Types.html#t%3AElemTag"->ElemTag</A-></TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/ParseLazy.html#elemOpenTag"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->For use with stream parsers - returns the complete opening element tag.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AelemCloseTag"-></A-><B->elemCloseTag</B-> :: <A HREF="Text-XML-HaXml-Types.html#t%3AName"->Name</A-> -&gt; <A HREF="Text-XML-HaXml-ParseLazy.html#t%3AXParser"->XParser</A-> ()</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/ParseLazy.html#elemCloseTag"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->For use with stream parsers - accepts a closing tag, provided it-   matches the given element name.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AemptySTs"-></A-><B->emptySTs</B-> :: SymTabs</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/ParseLazy.html#emptySTs"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Some empty symbol tables for GE and PE references.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->type</SPAN-> <A NAME="t%3AXParser"-></A-><B->XParser</B-> a = Parser SymTabs (<A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A->, <A HREF="Text-XML-HaXml-Lex.html#t%3ATokenT"->TokenT</A->) a</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/ParseLazy.html#XParser"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->XParser is just a specialisation of the PolyStateLazy parser.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section1"-><A NAME="5"->These general utility functions don't belong here-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Afst3"-></A-><B->fst3</B-> :: (a, b, c) -&gt; a</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/ParseLazy.html#fst3"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Asnd3"-></A-><B->snd3</B-> :: (a, b, c) -&gt; b</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/ParseLazy.html#snd3"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Athd3"-></A-><B->thd3</B-> :: (a, b, c) -&gt; c</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/ParseLazy.html#thd3"->Source</A-></TD-></TR-></TABLE-></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->
− docs/HaXml/Text-XML-HaXml-Posn.html
@@ -1,699 +0,0 @@-<!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.HaXml.Posn</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"->HaXml</TD-><TD CLASS="topbut"-><A HREF="src/Text/XML/HaXml/Posn.html"->Source code</A-></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.HaXml.Posn</FONT-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="section4"-><B->Contents</B-></TD-></TR-><TR-><TD-><DL-><DT-><A HREF="#1"->Position type-</A-></DT-><DD-><DL-><DT-><A HREF="#2"->Constructors of a new position-</A-></DT-><DT-><A HREF="#3"->Strictifier-</A-></DT-><DT-><A HREF="#4"->Modifiers-</A-></DT-><DT-><A HREF="#5"->Accessors-</A-></DT-></DL-></DD-></DL-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section1"->Description</TD-></TR-><TR-><TD CLASS="doc"->Define a position datatype for giving locations in error messages.-</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"-><SPAN CLASS="keyword"->data</SPAN-> <A HREF="#t%3APosn"->Posn</A-> </TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AposInNewCxt"->posInNewCxt</A-> :: String -&gt; Maybe <A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A-> -&gt; <A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AnoPos"->noPos</A-> :: <A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Aforcep"->forcep</A-> :: <A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A-> -&gt; Int</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Aaddcol"->addcol</A-> :: Int -&gt; <A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A-> -&gt; <A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Anewline"->newline</A-> :: <A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A-> -&gt; <A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Atab"->tab</A-> :: <A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A-> -&gt; <A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Awhite"->white</A-> :: Char -&gt; <A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A-> -&gt; <A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AposnFilename"->posnFilename</A-> :: <A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A-> -&gt; FilePath</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AposnLine"->posnLine</A-> :: <A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A-> -&gt; Int</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AposnColumn"->posnColumn</A-> :: <A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A-> -&gt; Int</TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section1"-><A NAME="1"->Position type-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3APosn"-></A-><B->Posn</B-> </TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Posn.html#Posn"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="ndoc"->Source positions contain a filename, line, column, and an-   inclusion point, which is itself another source position,-   recursively.-</TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:Posn')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:Posn" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"->Eq <A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A-></TD-></TR-><TR-><TD CLASS="decl"->Show <A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A-></TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section2"-><A NAME="2"->Constructors of a new position-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AposInNewCxt"-></A-><B->posInNewCxt</B-> :: String -&gt; Maybe <A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A-> -&gt; <A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A-></TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Posn.html#posInNewCxt"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"-><TT->posInNewCxt name pos</TT-> creates a new source position from an old one.-   It is used when opening a new file (e.g. a DTD inclusion), to denote-   the start of the file <TT->name</TT->, but retain the stacked information that-   it was included from the old <TT->pos</TT->.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AnoPos"-></A-><B->noPos</B-> :: <A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A-></TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Posn.html#noPos"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Dummy value for generated data, where a true source position does-   not exist.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section2"-><A NAME="3"->Strictifier-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Aforcep"-></A-><B->forcep</B-> :: <A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A-> -&gt; Int</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Posn.html#forcep"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Just used to strictify the internal values of a position, to avoid-   space leaks.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section2"-><A NAME="4"->Modifiers-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Aaddcol"-></A-><B->addcol</B-> :: Int -&gt; <A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A-> -&gt; <A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A-></TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Posn.html#addcol"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Add n character positions to the given position.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Anewline"-></A-><B->newline</B-> :: <A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A-> -&gt; <A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A-></TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Posn.html#newline"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Add a newline or tab to the given position.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Atab"-></A-><B->tab</B-> :: <A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A-> -&gt; <A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A-></TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Posn.html#tab"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Awhite"-></A-><B->white</B-> :: Char -&gt; <A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A-> -&gt; <A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A-></TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Posn.html#white"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Add the given whitespace char to the given position.-   Precondition: <TT->white c | isSpace c = True</TT->-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section2"-><A NAME="5"->Accessors-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AposnFilename"-></A-><B->posnFilename</B-> :: <A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A-> -&gt; FilePath</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Posn.html#posnFilename"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AposnLine"-></A-><B->posnLine</B-> :: <A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A-> -&gt; Int</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Posn.html#posnLine"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AposnColumn"-></A-><B->posnColumn</B-> :: <A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A-> -&gt; Int</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Posn.html#posnColumn"->Source</A-></TD-></TR-></TABLE-></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->
− docs/HaXml/Text-XML-HaXml-Pretty.html
@@ -1,442 +0,0 @@-<!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.HaXml.Pretty</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"->HaXml</TD-><TD CLASS="topbut"-><A HREF="src/Text/XML/HaXml/Pretty.html"->Source code</A-></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.HaXml.Pretty</FONT-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="section4"-><B->Contents</B-></TD-></TR-><TR-><TD-><DL-><DT-><A HREF="#1"->Pretty-print a whole document-</A-></DT-><DD-><DL-><DT-><A HREF="#2"->Just one content-</A-></DT-><DT-><A HREF="#3"->Just one tagged element-</A-></DT-></DL-></DD-><DT-><A HREF="#4"->Pretty-print just a DTD-</A-></DT-><DD-><DL-><DT-><A HREF="#5"->The prolog-</A-></DT-><DT-><A HREF="#6"->A content particle description-</A-></DT-></DL-></DD-></DL-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section1"->Description</TD-></TR-><TR-><TD CLASS="doc"->This is a pretty-printer for turning the internal representation-   of generic structured XML documents into the Doc type (which can-   later be rendered using Text.PrettyPrint.HughesPJ.render).-   Essentially there is one pp function for each type in-   Text.Xml.HaXml.Types, so you can pretty-print as much or as little-   of the document as you wish.-</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%3Adocument"->document</A-> :: <A HREF="Text-XML-HaXml-Types.html#t%3ADocument"->Document</A-> i -&gt; Doc</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Acontent"->content</A-> :: <A HREF="Text-XML-HaXml-Types.html#t%3AContent"->Content</A-> i -&gt; Doc</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Aelement"->element</A-> :: <A HREF="Text-XML-HaXml-Types.html#t%3AElement"->Element</A-> i -&gt; Doc</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Adoctypedecl"->doctypedecl</A-> :: <A HREF="Text-XML-HaXml-Types.html#t%3ADocTypeDecl"->DocTypeDecl</A-> -&gt; Doc</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Aprolog"->prolog</A-> :: <A HREF="Text-XML-HaXml-Types.html#t%3AProlog"->Prolog</A-> -&gt; Doc</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Acp"->cp</A-> :: <A HREF="Text-XML-HaXml-Types.html#t%3ACP"->CP</A-> -&gt; Doc</TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section1"-><A NAME="1"->Pretty-print a whole document-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Adocument"-></A-><B->document</B-> :: <A HREF="Text-XML-HaXml-Types.html#t%3ADocument"->Document</A-> i -&gt; Doc</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Pretty.html#document"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section2"-><A NAME="2"->Just one content-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Acontent"-></A-><B->content</B-> :: <A HREF="Text-XML-HaXml-Types.html#t%3AContent"->Content</A-> i -&gt; Doc</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Pretty.html#content"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section2"-><A NAME="3"->Just one tagged element-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Aelement"-></A-><B->element</B-> :: <A HREF="Text-XML-HaXml-Types.html#t%3AElement"->Element</A-> i -&gt; Doc</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Pretty.html#element"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section1"-><A NAME="4"->Pretty-print just a DTD-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Adoctypedecl"-></A-><B->doctypedecl</B-> :: <A HREF="Text-XML-HaXml-Types.html#t%3ADocTypeDecl"->DocTypeDecl</A-> -&gt; Doc</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Pretty.html#doctypedecl"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section2"-><A NAME="5"->The prolog-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Aprolog"-></A-><B->prolog</B-> :: <A HREF="Text-XML-HaXml-Types.html#t%3AProlog"->Prolog</A-> -&gt; Doc</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Pretty.html#prolog"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section2"-><A NAME="6"->A content particle description-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Acp"-></A-><B->cp</B-> :: <A HREF="Text-XML-HaXml-Types.html#t%3ACP"->CP</A-> -&gt; Doc</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Pretty.html#cp"->Source</A-></TD-></TR-></TABLE-></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->
− docs/HaXml/Text-XML-HaXml-SAX.html
@@ -1,432 +0,0 @@-<!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.HaXml.SAX</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"->HaXml</TD-><TD CLASS="topbut"-><A HREF="src/Text/XML/HaXml/SAX.html"->Source code</A-></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.HaXml.SAX</FONT-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section1"->Description</TD-></TR-><TR-><TD CLASS="doc"->A streaming XML parser, using a method known as SAX. SAX isn't really a-   standard, but an implementation, so it's just an &quot;SAX-like&quot; parser.-   This module allows you parse an XML document without having to evaluate-   it as a whole. This is needed for protocols like jabber, which use xml-   streams for communication.-</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"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->data</SPAN-> <A HREF="#t%3ASaxElement"->SaxElement</A-> </TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="decl"->= <A HREF="#v%3ASaxDocTypeDecl"->SaxDocTypeDecl</A-> <A HREF="Text-XML-HaXml-Types.html#t%3ADocTypeDecl"->DocTypeDecl</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ASaxProcessingInstruction"->SaxProcessingInstruction</A-> <A HREF="Text-XML-HaXml-Types.html#t%3AProcessingInstruction"->ProcessingInstruction</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ASaxComment"->SaxComment</A-> String</TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ASaxElementOpen"->SaxElementOpen</A-> <A HREF="Text-XML-HaXml-Types.html#t%3AName"->Name</A-> [<A HREF="Text-XML-HaXml-Types.html#t%3AAttribute"->Attribute</A->]</TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ASaxElementClose"->SaxElementClose</A-> <A HREF="Text-XML-HaXml-Types.html#t%3AName"->Name</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ASaxElementTag"->SaxElementTag</A-> <A HREF="Text-XML-HaXml-Types.html#t%3AName"->Name</A-> [<A HREF="Text-XML-HaXml-Types.html#t%3AAttribute"->Attribute</A->]</TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ASaxCharData"->SaxCharData</A-> <A HREF="Text-XML-HaXml-Types.html#t%3ACharData"->CharData</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ASaxReference"->SaxReference</A-> <A HREF="Text-XML-HaXml-Types.html#t%3AReference"->Reference</A-></TD-></TR-></TABLE-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AsaxParse"->saxParse</A-> :: String -&gt; String -&gt; ([<A HREF="Text-XML-HaXml-SAX.html#t%3ASaxElement"->SaxElement</A->], Maybe String)</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="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3ASaxElement"-></A-><B->SaxElement</B-> </TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/SAX.html#SaxElement"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3ASaxDocTypeDecl"-></A-><B->SaxDocTypeDecl</B-> <A HREF="Text-XML-HaXml-Types.html#t%3ADocTypeDecl"->DocTypeDecl</A-></TD-><TD CLASS="rdoc"->A doctype declaration occured(&lt;!DOCTYPE&gt;)-</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASaxProcessingInstruction"-></A-><B->SaxProcessingInstruction</B-> <A HREF="Text-XML-HaXml-Types.html#t%3AProcessingInstruction"->ProcessingInstruction</A-></TD-><TD CLASS="rdoc"->A processing instruction occured (&lt;??&gt;)-</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASaxComment"-></A-><B->SaxComment</B-> String</TD-><TD CLASS="rdoc"->A comment occured (&lt;!-- --&gt;)-</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASaxElementOpen"-></A-><B->SaxElementOpen</B-> <A HREF="Text-XML-HaXml-Types.html#t%3AName"->Name</A-> [<A HREF="Text-XML-HaXml-Types.html#t%3AAttribute"->Attribute</A->]</TD-><TD CLASS="rdoc"->An element was opened (&lt;&gt;)-</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASaxElementClose"-></A-><B->SaxElementClose</B-> <A HREF="Text-XML-HaXml-Types.html#t%3AName"->Name</A-></TD-><TD CLASS="rdoc"->An element was closed (&lt;/&gt;)-</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASaxElementTag"-></A-><B->SaxElementTag</B-> <A HREF="Text-XML-HaXml-Types.html#t%3AName"->Name</A-> [<A HREF="Text-XML-HaXml-Types.html#t%3AAttribute"->Attribute</A->]</TD-><TD CLASS="rdoc"->An element without content occured (&lt;/&gt;)-</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASaxCharData"-></A-><B->SaxCharData</B-> <A HREF="Text-XML-HaXml-Types.html#t%3ACharData"->CharData</A-></TD-><TD CLASS="rdoc"->Some string data occured-</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASaxReference"-></A-><B->SaxReference</B-> <A HREF="Text-XML-HaXml-Types.html#t%3AReference"->Reference</A-></TD-><TD CLASS="rdoc"->A reference occured-</TD-></TR-></TABLE-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AsaxParse"-></A-><B->saxParse</B-></TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/SAX.html#saxParse"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="arg"->:: String</TD-><TD CLASS="rdoc"->The filename-</TD-></TR-><TR-><TD CLASS="arg"->-&gt; String</TD-><TD CLASS="rdoc"->The content of the file-</TD-></TR-><TR-><TD CLASS="arg"->-&gt; ([<A HREF="Text-XML-HaXml-SAX.html#t%3ASaxElement"->SaxElement</A->], Maybe String)</TD-><TD CLASS="rdoc"->A tuple of the parsed elements and <TT->Nothing</TT->, if no-   error occured, or <TT->Just</TT-> <TT->String</TT-> if an error occured.-</TD-></TR-><TR-><TD CLASS="ndoc" COLSPAN="2"-><TT->saxParse file content</TT-> takes a filename and the string content of that-   file and generates a stream of <TT->SaxElement</TT->s. If an error occurs, the-   parsing stops and a string is returned using the <TT->Maybe</TT-> type.-</TD-></TR-></TABLE-></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->
− docs/HaXml/Text-XML-HaXml-ShowXmlLazy.html
@@ -1,141 +0,0 @@-<!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.HaXml.ShowXmlLazy</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"->HaXml</TD-><TD CLASS="topbut"-><A HREF="src/Text/XML/HaXml/ShowXmlLazy.html"->Source code</A-></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.HaXml.ShowXmlLazy</FONT-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></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%3AshowXmlLazy"->showXmlLazy</A-> :: <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a =&gt; Bool -&gt; a -&gt; String</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="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AshowXmlLazy"-></A-><B->showXmlLazy</B-> :: <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a =&gt; Bool -&gt; a -&gt; String</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/ShowXmlLazy.html#showXmlLazy"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Convert a fully-typed XML document to a string (without DTD).-</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->
− docs/HaXml/Text-XML-HaXml-TypeMapping.html
@@ -1,1724 +0,0 @@-<!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.HaXml.TypeMapping</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"->HaXml</TD-><TD CLASS="topbut"-><A HREF="src/Text/XML/HaXml/TypeMapping.html"->Source code</A-></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.HaXml.TypeMapping</FONT-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="section4"-><B->Contents</B-></TD-></TR-><TR-><TD-><DL-><DT-><A HREF="#1"->A class to get an explicit type representation for any value-</A-></DT-><DT-><A HREF="#2"->Explicit representation of Haskell datatype information-</A-></DT-><DT-><A HREF="#3"->Helper functions to extract type info as strings-</A-></DT-><DT-><A HREF="#4"->Conversion from Haskell datatype to DTD-</A-></DT-></DL-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></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"-><SPAN CLASS="keyword"->class</SPAN-> <A HREF="#t%3AHTypeable"->HTypeable</A-> a  <SPAN CLASS="keyword"->where</SPAN-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="decl"-><A HREF="#v%3AtoHType"->toHType</A-> :: a -&gt; <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHType"->HType</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->data</SPAN-> <A HREF="#t%3AHType"->HType</A-> </TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="decl"->= <A HREF="#v%3AMaybe"->Maybe</A-> <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHType"->HType</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3AList"->List</A-> <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHType"->HType</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ATuple"->Tuple</A-> [<A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHType"->HType</A->]</TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3APrim"->Prim</A-> String String</TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3AString"->String</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ADefined"->Defined</A-> String [<A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHType"->HType</A->] [<A HREF="Text-XML-HaXml-TypeMapping.html#t%3AConstr"->Constr</A->]</TD-></TR-></TABLE-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->data</SPAN-> <A HREF="#t%3AConstr"->Constr</A->  = <A HREF="#v%3AConstr"->Constr</A-> String [<A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHType"->HType</A->] [<A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHType"->HType</A->]</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AshowHType"->showHType</A-> :: <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHType"->HType</A-> -&gt; ShowS</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AshowConstr"->showConstr</A-> :: Int -&gt; <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHType"->HType</A-> -&gt; String</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AtoDTD"->toDTD</A-> :: <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHType"->HType</A-> -&gt; <A HREF="Text-XML-HaXml-Types.html#t%3ADocTypeDecl"->DocTypeDecl</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section1"-><A NAME="1"->A class to get an explicit type representation for any value-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->class</SPAN-> <A NAME="t%3AHTypeable"-></A-><B->HTypeable</B-> a  <SPAN CLASS="keyword"->where</SPAN-></TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/TypeMapping.html#HTypeable"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="ndoc"-><TT->HTypeable</TT-> promises that we can create an explicit representation of-   of the type of any value.-</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="section4"->Methods</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AtoHType"-></A-><B->toHType</B-> :: a -&gt; <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHType"->HType</A-></TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/TypeMapping.html#toHType"->Source</A-></TD-></TR-></TABLE-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:HTypeable')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:HTypeable" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"-><A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AANYContent"->ANYContent</A-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> Bool</TD-></TR-><TR-><TD CLASS="decl"-><A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> Char</TD-></TR-><TR-><TD CLASS="decl"-><A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> Double</TD-></TR-><TR-><TD CLASS="decl"-><A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> Float</TD-></TR-><TR-><TD CLASS="decl"-><A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> Int</TD-></TR-><TR-><TD CLASS="decl"-><A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> Integer</TD-></TR-><TR-><TD CLASS="decl"-><A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> ()</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> a, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> b) =&gt; <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> (a, b)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> a, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> b, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> c) =&gt; <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> (a, b, c)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> a, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> b, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> c, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> d) =&gt; <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> (a, b, c, d)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> a, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> b, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> c, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> d, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> e) =&gt; <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> (a, b, c, d, e)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> a, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> b, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> c, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> d, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> e, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> f) =&gt; <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> (a, b, c, d, e, f)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> a, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> b, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> c, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> d, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> e, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> f, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> g) =&gt; <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> (a, b, c, d, e, f, g)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> a, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> b, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> c, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> d, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> e, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> f, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> g, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> h) =&gt; <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> (a, b, c, d, e, f, g, h)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> a, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> b, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> c, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> d, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> e, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> f, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> g, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> h, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> i) =&gt; <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> (a, b, c, d, e, f, g, h, i)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> a, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> b, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> c, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> d, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> e, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> f, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> g, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> h, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> i, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> j) =&gt; <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> (a, b, c, d, e, f, g, h, i, j)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> a, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> b, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> c, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> d, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> e, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> f, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> g, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> h, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> i, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> j, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> k) =&gt; <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> (a, b, c, d, e, f, g, h, i, j, k)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> a, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> b, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> c, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> d, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> e, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> f, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> g, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> h, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> i, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> j, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> k, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> l) =&gt; <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> (a, b, c, d, e, f, g, h, i, j, k, l)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> a, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> b, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> c, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> d, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> e, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> f, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> g, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> h, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> i, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> j, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> k, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> l, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> m) =&gt; <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> (a, b, c, d, e, f, g, h, i, j, k, l, m)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> a, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> b, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> c, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> d, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> e, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> f, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> g, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> h, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> i, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> j, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> k, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> l, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> m, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> n) =&gt; <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> (a, b, c, d, e, f, g, h, i, j, k, l, m, n)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> a, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> b, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> c, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> d, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> e, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> f, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> g, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> h, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> i, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> j, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> k, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> l, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> m, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> n, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> o) =&gt; <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o)</TD-></TR-><TR-><TD CLASS="decl"-><A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> a =&gt; <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> (<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AList1"->List1</A-> a)</TD-></TR-><TR-><TD CLASS="decl"-><A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> a =&gt; <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> (Maybe a)</TD-></TR-><TR-><TD CLASS="decl"-><A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> a =&gt; <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> [a]</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> a, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> b) =&gt; <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> (Either a b)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> a, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> b) =&gt; <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf2"->OneOf2</A-> a b)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> a, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> b, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> c) =&gt; <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf3"->OneOf3</A-> a b c)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> a, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> b, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> c, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> d) =&gt; <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf4"->OneOf4</A-> a b c d)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> a, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> b, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> c, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> d, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> e) =&gt; <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf5"->OneOf5</A-> a b c d e)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> a, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> b, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> c, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> d, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> e, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> f) =&gt; <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf6"->OneOf6</A-> a b c d e f)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> a, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> b, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> c, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> d, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> e, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> f, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> g) =&gt; <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf7"->OneOf7</A-> a b c d e f g)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> a, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> b, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> c, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> d, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> e, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> f, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> g, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> h) =&gt; <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf8"->OneOf8</A-> a b c d e f g h)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> a, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> b, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> c, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> d, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> e, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> f, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> g, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> h, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> i) =&gt; <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf9"->OneOf9</A-> a b c d e f g h i)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> a, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> b, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> c, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> d, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> e, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> f, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> g, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> h, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> i, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> j) =&gt; <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf10"->OneOf10</A-> a b c d e f g h i j)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> a, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> b, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> c, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> d, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> e, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> f, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> g, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> h, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> i, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> j, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> k) =&gt; <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf11"->OneOf11</A-> a b c d e f g h i j k)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> a, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> b, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> c, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> d, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> e, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> f, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> g, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> h, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> i, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> j, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> k, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> l) =&gt; <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf12"->OneOf12</A-> a b c d e f g h i j k l)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> a, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> b, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> c, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> d, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> e, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> f, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> g, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> h, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> i, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> j, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> k, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> l, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> m) =&gt; <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf13"->OneOf13</A-> a b c d e f g h i j k l m)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> a, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> b, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> c, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> d, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> e, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> f, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> g, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> h, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> i, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> j, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> k, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> l, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> m, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> n) =&gt; <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf14"->OneOf14</A-> a b c d e f g h i j k l m n)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> a, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> b, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> c, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> d, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> e, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> f, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> g, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> h, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> i, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> j, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> k, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> l, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> m, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> n, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> o) =&gt; <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf15"->OneOf15</A-> a b c d e f g h i j k l m n o)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> a, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> b, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> c, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> d, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> e, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> f, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> g, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> h, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> i, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> j, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> k, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> l, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> m, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> n, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> o, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> p) =&gt; <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf16"->OneOf16</A-> a b c d e f g h i j k l m n o p)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> a, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> b, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> c, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> d, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> e, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> f, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> g, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> h, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> i, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> j, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> k, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> l, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> m, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> n, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> o, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> p, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> q) =&gt; <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf17"->OneOf17</A-> a b c d e f g h i j k l m n o p q)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> a, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> b, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> c, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> d, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> e, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> f, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> g, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> h, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> i, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> j, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> k, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> l, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> m, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> n, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> o, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> p, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> q, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> r) =&gt; <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf18"->OneOf18</A-> a b c d e f g h i j k l m n o p q r)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> a, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> b, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> c, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> d, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> e, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> f, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> g, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> h, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> i, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> j, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> k, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> l, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> m, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> n, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> o, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> p, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> q, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> r, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> s) =&gt; <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf19"->OneOf19</A-> a b c d e f g h i j k l m n o p q r s)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> a, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> b, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> c, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> d, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> e, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> f, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> g, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> h, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> i, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> j, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> k, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> l, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> m, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> n, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> o, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> p, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> q, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> r, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> s, <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> t) =&gt; <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf20"->OneOf20</A-> a b c d e f g h i j k l m n o p q r s t)</TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section1"-><A NAME="2"->Explicit representation of Haskell datatype information-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3AHType"-></A-><B->HType</B-> </TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/TypeMapping.html#HType"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="ndoc"->A concrete representation of any Haskell type.-</TD-></TR-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3AMaybe"-></A-><B->Maybe</B-> <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHType"->HType</A-></TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AList"-></A-><B->List</B-> <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHType"->HType</A-></TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ATuple"-></A-><B->Tuple</B-> [<A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHType"->HType</A->]</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3APrim"-></A-><B->Prim</B-> String String</TD-><TD CLASS="rdoc"->separate Haskell name and XML name-</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AString"-></A-><B->String</B-></TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ADefined"-></A-><B->Defined</B-> String [<A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHType"->HType</A->] [<A HREF="Text-XML-HaXml-TypeMapping.html#t%3AConstr"->Constr</A->]</TD-><TD CLASS="rdoc"->A user-defined type has a name, a sequence of type variables,-   and a set of constructors.  (The variables might already be-   instantiated to actual types.)-</TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:HType')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:HType" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"->Eq <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHType"->HType</A-></TD-></TR-><TR-><TD CLASS="decl"->Show <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHType"->HType</A-></TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3AConstr"-></A-><B->Constr</B-> </TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/TypeMapping.html#Constr"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="ndoc"->A concrete representation of any user-defined Haskell constructor.-   The constructor has a name, and a sequence of component types.  The-   first sequence of types represents the minimum set of free type-   variables occurring in the (second) list of real component types.-   If there are fieldnames, they are contained in the final list, and-   correspond one-to-one with the component types.-</TD-></TR-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3AConstr"-></A-><B->Constr</B-> String [<A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHType"->HType</A->] [<A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHType"->HType</A->]</TD-><TD CLASS="rdoc"-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:Constr')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:Constr" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"->Eq <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AConstr"->Constr</A-></TD-></TR-><TR-><TD CLASS="decl"->Show <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AConstr"->Constr</A-></TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section1"-><A NAME="3"->Helper functions to extract type info as strings-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AshowHType"-></A-><B->showHType</B-> :: <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHType"->HType</A-> -&gt; ShowS</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/TypeMapping.html#showHType"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AshowConstr"-></A-><B->showConstr</B-> :: Int -&gt; <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHType"->HType</A-> -&gt; String</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/TypeMapping.html#showConstr"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Project the n'th constructor from an HType and convert it to a string-   suitable for an XML tagname.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section1"-><A NAME="4"->Conversion from Haskell datatype to DTD-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AtoDTD"-></A-><B->toDTD</B-> :: <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHType"->HType</A-> -&gt; <A HREF="Text-XML-HaXml-Types.html#t%3ADocTypeDecl"->DocTypeDecl</A-></TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/TypeMapping.html#toDTD"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"-><TT-><A HREF="Text-XML-HaXml-TypeMapping.html#v%3AtoDTD"->toDTD</A-></TT-> converts a concrete representation of the Haskell type of-   a value (obtained by the method <TT-><A HREF="Text-XML-HaXml-TypeMapping.html#v%3AtoHType"->toHType</A-></TT->) into a real DocTypeDecl.-   It ensures that PERefs are defined before they are used, and that no-   element or attribute-list is declared more than once.-</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->
− docs/HaXml/Text-XML-HaXml-Types.html
@@ -1,6375 +0,0 @@-<!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.HaXml.Types</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"->HaXml</TD-><TD CLASS="topbut"-><A HREF="src/Text/XML/HaXml/Types.html"->Source code</A-></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.HaXml.Types</FONT-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="section4"-><B->Contents</B-></TD-></TR-><TR-><TD-><DL-><DT-><A HREF="#1"->A simple symbol table mapping strings (references) to values.-</A-></DT-><DD-><DL-><DT-><A HREF="#2"->Symbol table operations-</A-></DT-></DL-></DD-><DT-><A HREF="#3"->XML Types-</A-></DT-><DD-><DL-><DT-><A HREF="#4"->The top-level document container-</A-></DT-><DT-><A HREF="#5"->The main document content-</A-></DT-><DT-><A HREF="#6"->Administrative parts of the document-</A-></DT-><DT-><A HREF="#7"->The DTD-</A-></DT-><DD-><DL-><DT-><A HREF="#8"->content model-</A-></DT-><DT-><A HREF="#9"->attribute model-</A-></DT-><DT-><A HREF="#10"->conditional sections-</A-></DT-></DL-></DD-><DT-><A HREF="#11"->References-</A-></DT-><DT-><A HREF="#12"->Entities-</A-></DT-><DT-><A HREF="#13"->Basic value types-</A-></DT-></DL-></DD-></DL-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section1"->Description</TD-></TR-><TR-><TD CLASS="doc"-><P->This module defines an internal (generic) representation for XML-   documents including their DTDs.-</P-><P->History:-   The original module was derived by hand from the XML specification,-   following the grammar precisely.  Then we simplified the types,-   removing layers of indirection and redundancy, and generally making-   things easier to work with.  Then we allowed PEReferences to be-   ubiquitous, by removing them from the types and resolving all-   PE references at parse-time.  Finally, we added a per-document-   symbol table for GEReferences, and a whitespace-significance flag-   for plaintext.-</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"-><SPAN CLASS="keyword"->type</SPAN-> <A HREF="#t%3ASymTab"->SymTab</A-> a = [(String, a)]</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AemptyST"->emptyST</A-> :: <A HREF="Text-XML-HaXml-Types.html#t%3ASymTab"->SymTab</A-> a</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AaddST"->addST</A-> :: String -&gt; a -&gt; <A HREF="Text-XML-HaXml-Types.html#t%3ASymTab"->SymTab</A-> a -&gt; <A HREF="Text-XML-HaXml-Types.html#t%3ASymTab"->SymTab</A-> a</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AlookupST"->lookupST</A-> :: String -&gt; <A HREF="Text-XML-HaXml-Types.html#t%3ASymTab"->SymTab</A-> a -&gt; Maybe a</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->data</SPAN-> <A HREF="#t%3ADocument"->Document</A-> i = <A HREF="#v%3ADocument"->Document</A-> <A HREF="Text-XML-HaXml-Types.html#t%3AProlog"->Prolog</A-> (<A HREF="Text-XML-HaXml-Types.html#t%3ASymTab"->SymTab</A-> <A HREF="Text-XML-HaXml-Types.html#t%3AEntityDef"->EntityDef</A->) (<A HREF="Text-XML-HaXml-Types.html#t%3AElement"->Element</A-> i) [<A HREF="Text-XML-HaXml-Types.html#t%3AMisc"->Misc</A->]</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->data</SPAN-> <A HREF="#t%3AElement"->Element</A-> i = <A HREF="#v%3AElem"->Elem</A-> <A HREF="Text-XML-HaXml-Types.html#t%3AName"->Name</A-> [<A HREF="Text-XML-HaXml-Types.html#t%3AAttribute"->Attribute</A->] [<A HREF="Text-XML-HaXml-Types.html#t%3AContent"->Content</A-> i]</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->data</SPAN-> <A HREF="#t%3AElemTag"->ElemTag</A->  = <A HREF="#v%3AElemTag"->ElemTag</A-> <A HREF="Text-XML-HaXml-Types.html#t%3AName"->Name</A-> [<A HREF="Text-XML-HaXml-Types.html#t%3AAttribute"->Attribute</A->]</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->data</SPAN-> <A HREF="#t%3AContent"->Content</A-> i</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="decl"->= <A HREF="#v%3ACElem"->CElem</A-> (<A HREF="Text-XML-HaXml-Types.html#t%3AElement"->Element</A-> i) i</TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ACString"->CString</A-> Bool <A HREF="Text-XML-HaXml-Types.html#t%3ACharData"->CharData</A-> i</TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ACRef"->CRef</A-> <A HREF="Text-XML-HaXml-Types.html#t%3AReference"->Reference</A-> i</TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ACMisc"->CMisc</A-> <A HREF="Text-XML-HaXml-Types.html#t%3AMisc"->Misc</A-> i</TD-></TR-></TABLE-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->type</SPAN-> <A HREF="#t%3AAttribute"->Attribute</A-> = (<A HREF="Text-XML-HaXml-Types.html#t%3AName"->Name</A->, <A HREF="Text-XML-HaXml-Types.html#t%3AAttValue"->AttValue</A->)</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->data</SPAN-> <A HREF="#t%3AAttValue"->AttValue</A->  = <A HREF="#v%3AAttValue"->AttValue</A-> [Either String <A HREF="Text-XML-HaXml-Types.html#t%3AReference"->Reference</A->]</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Ainfo"->info</A-> :: <A HREF="Text-XML-HaXml-Types.html#t%3AContent"->Content</A-> t -&gt; t</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->data</SPAN-> <A HREF="#t%3AProlog"->Prolog</A->  = <A HREF="#v%3AProlog"->Prolog</A-> (Maybe <A HREF="Text-XML-HaXml-Types.html#t%3AXMLDecl"->XMLDecl</A->) [<A HREF="Text-XML-HaXml-Types.html#t%3AMisc"->Misc</A->] (Maybe <A HREF="Text-XML-HaXml-Types.html#t%3ADocTypeDecl"->DocTypeDecl</A->) [<A HREF="Text-XML-HaXml-Types.html#t%3AMisc"->Misc</A->]</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->data</SPAN-> <A HREF="#t%3AXMLDecl"->XMLDecl</A->  = <A HREF="#v%3AXMLDecl"->XMLDecl</A-> <A HREF="Text-XML-HaXml-Types.html#t%3AVersionInfo"->VersionInfo</A-> (Maybe <A HREF="Text-XML-HaXml-Types.html#t%3AEncodingDecl"->EncodingDecl</A->) (Maybe <A HREF="Text-XML-HaXml-Types.html#t%3ASDDecl"->SDDecl</A->)</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->data</SPAN-> <A HREF="#t%3AMisc"->Misc</A-> </TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="decl"->= <A HREF="#v%3AComment"->Comment</A-> <A HREF="Text-XML-HaXml-Types.html#t%3AComment"->Comment</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3API"->PI</A-> <A HREF="Text-XML-HaXml-Types.html#t%3AProcessingInstruction"->ProcessingInstruction</A-></TD-></TR-></TABLE-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->type</SPAN-> <A HREF="#t%3AProcessingInstruction"->ProcessingInstruction</A-> = (<A HREF="Text-XML-HaXml-Types.html#t%3APITarget"->PITarget</A->, String)</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->type</SPAN-> <A HREF="#t%3ASDDecl"->SDDecl</A-> = Bool</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->type</SPAN-> <A HREF="#t%3AVersionInfo"->VersionInfo</A-> = String</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->type</SPAN-> <A HREF="#t%3AComment"->Comment</A-> = String</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->type</SPAN-> <A HREF="#t%3APITarget"->PITarget</A-> = String</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->data</SPAN-> <A HREF="#t%3ADocTypeDecl"->DocTypeDecl</A->  = <A HREF="#v%3ADTD"->DTD</A-> <A HREF="Text-XML-HaXml-Types.html#t%3AName"->Name</A-> (Maybe <A HREF="Text-XML-HaXml-Types.html#t%3AExternalID"->ExternalID</A->) [<A HREF="Text-XML-HaXml-Types.html#t%3AMarkupDecl"->MarkupDecl</A->]</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->data</SPAN-> <A HREF="#t%3AMarkupDecl"->MarkupDecl</A-> </TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="decl"->= <A HREF="#v%3AElement"->Element</A-> <A HREF="Text-XML-HaXml-Types.html#t%3AElementDecl"->ElementDecl</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3AAttList"->AttList</A-> <A HREF="Text-XML-HaXml-Types.html#t%3AAttListDecl"->AttListDecl</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3AEntity"->Entity</A-> <A HREF="Text-XML-HaXml-Types.html#t%3AEntityDecl"->EntityDecl</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ANotation"->Notation</A-> <A HREF="Text-XML-HaXml-Types.html#t%3ANotationDecl"->NotationDecl</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3AMarkupMisc"->MarkupMisc</A-> <A HREF="Text-XML-HaXml-Types.html#t%3AMisc"->Misc</A-></TD-></TR-></TABLE-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->data</SPAN-> <A HREF="#t%3AExtSubset"->ExtSubset</A->  = <A HREF="#v%3AExtSubset"->ExtSubset</A-> (Maybe <A HREF="Text-XML-HaXml-Types.html#t%3ATextDecl"->TextDecl</A->) [<A HREF="Text-XML-HaXml-Types.html#t%3AExtSubsetDecl"->ExtSubsetDecl</A->]</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->data</SPAN-> <A HREF="#t%3AExtSubsetDecl"->ExtSubsetDecl</A-> </TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="decl"->= <A HREF="#v%3AExtMarkupDecl"->ExtMarkupDecl</A-> <A HREF="Text-XML-HaXml-Types.html#t%3AMarkupDecl"->MarkupDecl</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3AExtConditionalSect"->ExtConditionalSect</A-> <A HREF="Text-XML-HaXml-Types.html#t%3AConditionalSect"->ConditionalSect</A-></TD-></TR-></TABLE-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->data</SPAN-> <A HREF="#t%3AElementDecl"->ElementDecl</A->  = <A HREF="#v%3AElementDecl"->ElementDecl</A-> <A HREF="Text-XML-HaXml-Types.html#t%3AName"->Name</A-> <A HREF="Text-XML-HaXml-Types.html#t%3AContentSpec"->ContentSpec</A-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->data</SPAN-> <A HREF="#t%3AContentSpec"->ContentSpec</A-> </TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="decl"->= <A HREF="#v%3AEMPTY"->EMPTY</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3AANY"->ANY</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3AMixed"->Mixed</A-> <A HREF="Text-XML-HaXml-Types.html#t%3AMixed"->Mixed</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3AContentSpec"->ContentSpec</A-> <A HREF="Text-XML-HaXml-Types.html#t%3ACP"->CP</A-></TD-></TR-></TABLE-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->data</SPAN-> <A HREF="#t%3ACP"->CP</A-> </TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="decl"->= <A HREF="#v%3ATagName"->TagName</A-> <A HREF="Text-XML-HaXml-Types.html#t%3AName"->Name</A-> <A HREF="Text-XML-HaXml-Types.html#t%3AModifier"->Modifier</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3AChoice"->Choice</A-> [<A HREF="Text-XML-HaXml-Types.html#t%3ACP"->CP</A->] <A HREF="Text-XML-HaXml-Types.html#t%3AModifier"->Modifier</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ASeq"->Seq</A-> [<A HREF="Text-XML-HaXml-Types.html#t%3ACP"->CP</A->] <A HREF="Text-XML-HaXml-Types.html#t%3AModifier"->Modifier</A-></TD-></TR-></TABLE-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->data</SPAN-> <A HREF="#t%3AModifier"->Modifier</A-> </TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="decl"->= <A HREF="#v%3ANone"->None</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3AQuery"->Query</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3AStar"->Star</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3APlus"->Plus</A-></TD-></TR-></TABLE-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->data</SPAN-> <A HREF="#t%3AMixed"->Mixed</A-> </TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="decl"->= <A HREF="#v%3APCDATA"->PCDATA</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3APCDATAplus"->PCDATAplus</A-> [<A HREF="Text-XML-HaXml-Types.html#t%3AName"->Name</A->]</TD-></TR-></TABLE-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->data</SPAN-> <A HREF="#t%3AAttListDecl"->AttListDecl</A->  = <A HREF="#v%3AAttListDecl"->AttListDecl</A-> <A HREF="Text-XML-HaXml-Types.html#t%3AName"->Name</A-> [<A HREF="Text-XML-HaXml-Types.html#t%3AAttDef"->AttDef</A->]</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->data</SPAN-> <A HREF="#t%3AAttDef"->AttDef</A->  = <A HREF="#v%3AAttDef"->AttDef</A-> <A HREF="Text-XML-HaXml-Types.html#t%3AName"->Name</A-> <A HREF="Text-XML-HaXml-Types.html#t%3AAttType"->AttType</A-> <A HREF="Text-XML-HaXml-Types.html#t%3ADefaultDecl"->DefaultDecl</A-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->data</SPAN-> <A HREF="#t%3AAttType"->AttType</A-> </TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="decl"->= <A HREF="#v%3AStringType"->StringType</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ATokenizedType"->TokenizedType</A-> <A HREF="Text-XML-HaXml-Types.html#t%3ATokenizedType"->TokenizedType</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3AEnumeratedType"->EnumeratedType</A-> <A HREF="Text-XML-HaXml-Types.html#t%3AEnumeratedType"->EnumeratedType</A-></TD-></TR-></TABLE-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->data</SPAN-> <A HREF="#t%3ATokenizedType"->TokenizedType</A-> </TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="decl"->= <A HREF="#v%3AID"->ID</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3AIDREF"->IDREF</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3AIDREFS"->IDREFS</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3AENTITY"->ENTITY</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3AENTITIES"->ENTITIES</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ANMTOKEN"->NMTOKEN</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ANMTOKENS"->NMTOKENS</A-></TD-></TR-></TABLE-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->data</SPAN-> <A HREF="#t%3AEnumeratedType"->EnumeratedType</A-> </TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="decl"->= <A HREF="#v%3ANotationType"->NotationType</A-> <A HREF="Text-XML-HaXml-Types.html#t%3ANotationType"->NotationType</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3AEnumeration"->Enumeration</A-> <A HREF="Text-XML-HaXml-Types.html#t%3AEnumeration"->Enumeration</A-></TD-></TR-></TABLE-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->type</SPAN-> <A HREF="#t%3ANotationType"->NotationType</A-> = [<A HREF="Text-XML-HaXml-Types.html#t%3AName"->Name</A->]</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->type</SPAN-> <A HREF="#t%3AEnumeration"->Enumeration</A-> = [<A HREF="Text-XML-HaXml-Types.html#t%3ANmToken"->NmToken</A->]</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->data</SPAN-> <A HREF="#t%3ADefaultDecl"->DefaultDecl</A-> </TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="decl"->= <A HREF="#v%3AREQUIRED"->REQUIRED</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3AIMPLIED"->IMPLIED</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ADefaultTo"->DefaultTo</A-> <A HREF="Text-XML-HaXml-Types.html#t%3AAttValue"->AttValue</A-> (Maybe <A HREF="Text-XML-HaXml-Types.html#t%3AFIXED"->FIXED</A->)</TD-></TR-></TABLE-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->data</SPAN-> <A HREF="#t%3AFIXED"->FIXED</A->  = <A HREF="#v%3AFIXED"->FIXED</A-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->data</SPAN-> <A HREF="#t%3AConditionalSect"->ConditionalSect</A-> </TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="decl"->= <A HREF="#v%3AIncludeSect"->IncludeSect</A-> <A HREF="Text-XML-HaXml-Types.html#t%3AIncludeSect"->IncludeSect</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3AIgnoreSect"->IgnoreSect</A-> <A HREF="Text-XML-HaXml-Types.html#t%3AIgnoreSect"->IgnoreSect</A-></TD-></TR-></TABLE-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->type</SPAN-> <A HREF="#t%3AIncludeSect"->IncludeSect</A-> = [<A HREF="Text-XML-HaXml-Types.html#t%3AExtSubsetDecl"->ExtSubsetDecl</A->]</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->type</SPAN-> <A HREF="#t%3AIgnoreSect"->IgnoreSect</A-> = [<A HREF="Text-XML-HaXml-Types.html#t%3AIgnoreSectContents"->IgnoreSectContents</A->]</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->data</SPAN-> <A HREF="#t%3AIgnore"->Ignore</A->  = <A HREF="#v%3AIgnore"->Ignore</A-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->data</SPAN-> <A HREF="#t%3AIgnoreSectContents"->IgnoreSectContents</A->  = <A HREF="#v%3AIgnoreSectContents"->IgnoreSectContents</A-> <A HREF="Text-XML-HaXml-Types.html#t%3AIgnore"->Ignore</A-> [(<A HREF="Text-XML-HaXml-Types.html#t%3AIgnoreSectContents"->IgnoreSectContents</A->, <A HREF="Text-XML-HaXml-Types.html#t%3AIgnore"->Ignore</A->)]</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->data</SPAN-> <A HREF="#t%3AReference"->Reference</A-> </TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="decl"->= <A HREF="#v%3ARefEntity"->RefEntity</A-> <A HREF="Text-XML-HaXml-Types.html#t%3AEntityRef"->EntityRef</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ARefChar"->RefChar</A-> <A HREF="Text-XML-HaXml-Types.html#t%3ACharRef"->CharRef</A-></TD-></TR-></TABLE-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->type</SPAN-> <A HREF="#t%3AEntityRef"->EntityRef</A-> = <A HREF="Text-XML-HaXml-Types.html#t%3AName"->Name</A-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->type</SPAN-> <A HREF="#t%3ACharRef"->CharRef</A-> = Int</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->type</SPAN-> <A HREF="#t%3APEReference"->PEReference</A-> = <A HREF="Text-XML-HaXml-Types.html#t%3AName"->Name</A-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->data</SPAN-> <A HREF="#t%3AEntityDecl"->EntityDecl</A-> </TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="decl"->= <A HREF="#v%3AEntityGEDecl"->EntityGEDecl</A-> <A HREF="Text-XML-HaXml-Types.html#t%3AGEDecl"->GEDecl</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3AEntityPEDecl"->EntityPEDecl</A-> <A HREF="Text-XML-HaXml-Types.html#t%3APEDecl"->PEDecl</A-></TD-></TR-></TABLE-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->data</SPAN-> <A HREF="#t%3AGEDecl"->GEDecl</A->  = <A HREF="#v%3AGEDecl"->GEDecl</A-> <A HREF="Text-XML-HaXml-Types.html#t%3AName"->Name</A-> <A HREF="Text-XML-HaXml-Types.html#t%3AEntityDef"->EntityDef</A-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->data</SPAN-> <A HREF="#t%3APEDecl"->PEDecl</A->  = <A HREF="#v%3APEDecl"->PEDecl</A-> <A HREF="Text-XML-HaXml-Types.html#t%3AName"->Name</A-> <A HREF="Text-XML-HaXml-Types.html#t%3APEDef"->PEDef</A-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->data</SPAN-> <A HREF="#t%3AEntityDef"->EntityDef</A-> </TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="decl"->= <A HREF="#v%3ADefEntityValue"->DefEntityValue</A-> <A HREF="Text-XML-HaXml-Types.html#t%3AEntityValue"->EntityValue</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ADefExternalID"->DefExternalID</A-> <A HREF="Text-XML-HaXml-Types.html#t%3AExternalID"->ExternalID</A-> (Maybe <A HREF="Text-XML-HaXml-Types.html#t%3ANDataDecl"->NDataDecl</A->)</TD-></TR-></TABLE-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->data</SPAN-> <A HREF="#t%3APEDef"->PEDef</A-> </TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="decl"->= <A HREF="#v%3APEDefEntityValue"->PEDefEntityValue</A-> <A HREF="Text-XML-HaXml-Types.html#t%3AEntityValue"->EntityValue</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3APEDefExternalID"->PEDefExternalID</A-> <A HREF="Text-XML-HaXml-Types.html#t%3AExternalID"->ExternalID</A-></TD-></TR-></TABLE-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->data</SPAN-> <A HREF="#t%3AExternalID"->ExternalID</A-> </TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="decl"->= <A HREF="#v%3ASYSTEM"->SYSTEM</A-> <A HREF="Text-XML-HaXml-Types.html#t%3ASystemLiteral"->SystemLiteral</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3APUBLIC"->PUBLIC</A-> <A HREF="Text-XML-HaXml-Types.html#t%3APubidLiteral"->PubidLiteral</A-> <A HREF="Text-XML-HaXml-Types.html#t%3ASystemLiteral"->SystemLiteral</A-></TD-></TR-></TABLE-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->newtype</SPAN-> <A HREF="#t%3ANDataDecl"->NDataDecl</A->  = <A HREF="#v%3ANDATA"->NDATA</A-> <A HREF="Text-XML-HaXml-Types.html#t%3AName"->Name</A-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->data</SPAN-> <A HREF="#t%3ATextDecl"->TextDecl</A->  = <A HREF="#v%3ATextDecl"->TextDecl</A-> (Maybe <A HREF="Text-XML-HaXml-Types.html#t%3AVersionInfo"->VersionInfo</A->) <A HREF="Text-XML-HaXml-Types.html#t%3AEncodingDecl"->EncodingDecl</A-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->data</SPAN-> <A HREF="#t%3AExtParsedEnt"->ExtParsedEnt</A-> i = <A HREF="#v%3AExtParsedEnt"->ExtParsedEnt</A-> (Maybe <A HREF="Text-XML-HaXml-Types.html#t%3ATextDecl"->TextDecl</A->) (<A HREF="Text-XML-HaXml-Types.html#t%3AContent"->Content</A-> i)</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->data</SPAN-> <A HREF="#t%3AExtPE"->ExtPE</A->  = <A HREF="#v%3AExtPE"->ExtPE</A-> (Maybe <A HREF="Text-XML-HaXml-Types.html#t%3ATextDecl"->TextDecl</A->) [<A HREF="Text-XML-HaXml-Types.html#t%3AExtSubsetDecl"->ExtSubsetDecl</A->]</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->data</SPAN-> <A HREF="#t%3ANotationDecl"->NotationDecl</A->  = <A HREF="#v%3ANOTATION"->NOTATION</A-> <A HREF="Text-XML-HaXml-Types.html#t%3AName"->Name</A-> (Either <A HREF="Text-XML-HaXml-Types.html#t%3AExternalID"->ExternalID</A-> <A HREF="Text-XML-HaXml-Types.html#t%3APublicID"->PublicID</A->)</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->newtype</SPAN-> <A HREF="#t%3APublicID"->PublicID</A->  = <A HREF="#v%3APUBLICID"->PUBLICID</A-> <A HREF="Text-XML-HaXml-Types.html#t%3APubidLiteral"->PubidLiteral</A-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->newtype</SPAN-> <A HREF="#t%3AEncodingDecl"->EncodingDecl</A->  = <A HREF="#v%3AEncodingDecl"->EncodingDecl</A-> String</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->data</SPAN-> <A HREF="#t%3AEntityValue"->EntityValue</A->  = <A HREF="#v%3AEntityValue"->EntityValue</A-> [<A HREF="Text-XML-HaXml-Types.html#t%3AEV"->EV</A->]</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->data</SPAN-> <A HREF="#t%3AEV"->EV</A-> </TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="decl"->= <A HREF="#v%3AEVString"->EVString</A-> String</TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3AEVRef"->EVRef</A-> <A HREF="Text-XML-HaXml-Types.html#t%3AReference"->Reference</A-></TD-></TR-></TABLE-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->newtype</SPAN-> <A HREF="#t%3APubidLiteral"->PubidLiteral</A->  = <A HREF="#v%3APubidLiteral"->PubidLiteral</A-> String</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->newtype</SPAN-> <A HREF="#t%3ASystemLiteral"->SystemLiteral</A->  = <A HREF="#v%3ASystemLiteral"->SystemLiteral</A-> String</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->type</SPAN-> <A HREF="#t%3AName"->Name</A-> = String</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->type</SPAN-> <A HREF="#t%3ANames"->Names</A-> = [<A HREF="Text-XML-HaXml-Types.html#t%3AName"->Name</A->]</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->type</SPAN-> <A HREF="#t%3ANmToken"->NmToken</A-> = String</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->type</SPAN-> <A HREF="#t%3ANmTokens"->NmTokens</A-> = [<A HREF="Text-XML-HaXml-Types.html#t%3ANmToken"->NmToken</A->]</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->type</SPAN-> <A HREF="#t%3ACharData"->CharData</A-> = String</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->type</SPAN-> <A HREF="#t%3ACDSect"->CDSect</A-> = <A HREF="Text-XML-HaXml-Types.html#t%3ACharData"->CharData</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section1"-><A NAME="1"->A simple symbol table mapping strings (references) to values.-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->type</SPAN-> <A NAME="t%3ASymTab"-></A-><B->SymTab</B-> a = [(String, a)]</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Types.html#SymTab"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section2"-><A NAME="2"->Symbol table operations-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AemptyST"-></A-><B->emptyST</B-> :: <A HREF="Text-XML-HaXml-Types.html#t%3ASymTab"->SymTab</A-> a</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Types.html#emptyST"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AaddST"-></A-><B->addST</B-> :: String -&gt; a -&gt; <A HREF="Text-XML-HaXml-Types.html#t%3ASymTab"->SymTab</A-> a -&gt; <A HREF="Text-XML-HaXml-Types.html#t%3ASymTab"->SymTab</A-> a</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Types.html#addST"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AlookupST"-></A-><B->lookupST</B-> :: String -&gt; <A HREF="Text-XML-HaXml-Types.html#t%3ASymTab"->SymTab</A-> a -&gt; Maybe a</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Types.html#lookupST"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section1"-><A NAME="3"->XML Types-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section2"-><A NAME="4"->The top-level document container-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3ADocument"-></A-><B->Document</B-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Types.html#Document"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="ndoc"->The symbol table stored in a document holds all its general entity-   reference definitions.-</TD-></TR-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3ADocument"-></A-><B->Document</B-> <A HREF="Text-XML-HaXml-Types.html#t%3AProlog"->Prolog</A-> (<A HREF="Text-XML-HaXml-Types.html#t%3ASymTab"->SymTab</A-> <A HREF="Text-XML-HaXml-Types.html#t%3AEntityDef"->EntityDef</A->) (<A HREF="Text-XML-HaXml-Types.html#t%3AElement"->Element</A-> i) [<A HREF="Text-XML-HaXml-Types.html#t%3AMisc"->Misc</A->]</TD-><TD CLASS="rdoc"-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:Document')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:Document" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"->Functor <A HREF="Text-XML-HaXml-Types.html#t%3ADocument"->Document</A-></TD-></TR-><TR-><TD CLASS="decl"->??? i =&gt; Eq (<A HREF="Text-XML-HaXml-Types.html#t%3ADocument"->Document</A-> i)</TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section2"-><A NAME="5"->The main document content-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3AElement"-></A-><B->Element</B-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Types.html#Element"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3AElem"-></A-><B->Elem</B-> <A HREF="Text-XML-HaXml-Types.html#t%3AName"->Name</A-> [<A HREF="Text-XML-HaXml-Types.html#t%3AAttribute"->Attribute</A->] [<A HREF="Text-XML-HaXml-Types.html#t%3AContent"->Content</A-> i]</TD-><TD CLASS="rdoc"-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:Element')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:Element" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"->Functor <A HREF="Text-XML-HaXml-Types.html#t%3AElement"->Element</A-></TD-></TR-><TR-><TD CLASS="decl"->??? i =&gt; Eq (<A HREF="Text-XML-HaXml-Types.html#t%3AElement"->Element</A-> i)</TD-></TR-><TR-><TD CLASS="decl"-><A HREF="Text-XML-HaXml-Verbatim.html#t%3AVerbatim"->Verbatim</A-> (<A HREF="Text-XML-HaXml-Types.html#t%3AElement"->Element</A-> i)</TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3AElemTag"-></A-><B->ElemTag</B-> </TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Types.html#ElemTag"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3AElemTag"-></A-><B->ElemTag</B-> <A HREF="Text-XML-HaXml-Types.html#t%3AName"->Name</A-> [<A HREF="Text-XML-HaXml-Types.html#t%3AAttribute"->Attribute</A->]</TD-><TD CLASS="rdoc"-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:ElemTag')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:ElemTag" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"->Eq <A HREF="Text-XML-HaXml-Types.html#t%3AElemTag"->ElemTag</A-></TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3AContent"-></A-><B->Content</B-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Types.html#Content"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3ACElem"-></A-><B->CElem</B-> (<A HREF="Text-XML-HaXml-Types.html#t%3AElement"->Element</A-> i) i</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ACString"-></A-><B->CString</B-> Bool <A HREF="Text-XML-HaXml-Types.html#t%3ACharData"->CharData</A-> i</TD-><TD CLASS="rdoc"->bool is whether whitespace is significant-</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ACRef"-></A-><B->CRef</B-> <A HREF="Text-XML-HaXml-Types.html#t%3AReference"->Reference</A-> i</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ACMisc"-></A-><B->CMisc</B-> <A HREF="Text-XML-HaXml-Types.html#t%3AMisc"->Misc</A-> i</TD-><TD CLASS="rdoc"-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:Content')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:Content" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"->Functor <A HREF="Text-XML-HaXml-Types.html#t%3AContent"->Content</A-></TD-></TR-><TR-><TD CLASS="decl"->(Eq i, ??? i) =&gt; Eq (<A HREF="Text-XML-HaXml-Types.html#t%3AContent"->Content</A-> i)</TD-></TR-><TR-><TD CLASS="decl"-><A HREF="Text-XML-HaXml-Verbatim.html#t%3AVerbatim"->Verbatim</A-> (<A HREF="Text-XML-HaXml-Types.html#t%3AContent"->Content</A-> i)</TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->type</SPAN-> <A NAME="t%3AAttribute"-></A-><B->Attribute</B-> = (<A HREF="Text-XML-HaXml-Types.html#t%3AName"->Name</A->, <A HREF="Text-XML-HaXml-Types.html#t%3AAttValue"->AttValue</A->)</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Types.html#Attribute"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3AAttValue"-></A-><B->AttValue</B-> </TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Types.html#AttValue"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3AAttValue"-></A-><B->AttValue</B-> [Either String <A HREF="Text-XML-HaXml-Types.html#t%3AReference"->Reference</A->]</TD-><TD CLASS="rdoc"-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:AttValue')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:AttValue" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"->Eq <A HREF="Text-XML-HaXml-Types.html#t%3AAttValue"->AttValue</A-></TD-></TR-><TR-><TD CLASS="decl"->Show <A HREF="Text-XML-HaXml-Types.html#t%3AAttValue"->AttValue</A-></TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Ainfo"-></A-><B->info</B-> :: <A HREF="Text-XML-HaXml-Types.html#t%3AContent"->Content</A-> t -&gt; t</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Types.html#info"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section2"-><A NAME="6"->Administrative parts of the document-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3AProlog"-></A-><B->Prolog</B-> </TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Types.html#Prolog"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3AProlog"-></A-><B->Prolog</B-> (Maybe <A HREF="Text-XML-HaXml-Types.html#t%3AXMLDecl"->XMLDecl</A->) [<A HREF="Text-XML-HaXml-Types.html#t%3AMisc"->Misc</A->] (Maybe <A HREF="Text-XML-HaXml-Types.html#t%3ADocTypeDecl"->DocTypeDecl</A->) [<A HREF="Text-XML-HaXml-Types.html#t%3AMisc"->Misc</A->]</TD-><TD CLASS="rdoc"-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:Prolog')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:Prolog" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"->Eq <A HREF="Text-XML-HaXml-Types.html#t%3AProlog"->Prolog</A-></TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3AXMLDecl"-></A-><B->XMLDecl</B-> </TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Types.html#XMLDecl"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3AXMLDecl"-></A-><B->XMLDecl</B-> <A HREF="Text-XML-HaXml-Types.html#t%3AVersionInfo"->VersionInfo</A-> (Maybe <A HREF="Text-XML-HaXml-Types.html#t%3AEncodingDecl"->EncodingDecl</A->) (Maybe <A HREF="Text-XML-HaXml-Types.html#t%3ASDDecl"->SDDecl</A->)</TD-><TD CLASS="rdoc"-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:XMLDecl')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:XMLDecl" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"->Eq <A HREF="Text-XML-HaXml-Types.html#t%3AXMLDecl"->XMLDecl</A-></TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3AMisc"-></A-><B->Misc</B-> </TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Types.html#Misc"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3AComment"-></A-><B->Comment</B-> <A HREF="Text-XML-HaXml-Types.html#t%3AComment"->Comment</A-></TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3API"-></A-><B->PI</B-> <A HREF="Text-XML-HaXml-Types.html#t%3AProcessingInstruction"->ProcessingInstruction</A-></TD-><TD CLASS="rdoc"-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:Misc')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:Misc" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"->Eq <A HREF="Text-XML-HaXml-Types.html#t%3AMisc"->Misc</A-></TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->type</SPAN-> <A NAME="t%3AProcessingInstruction"-></A-><B->ProcessingInstruction</B-> = (<A HREF="Text-XML-HaXml-Types.html#t%3APITarget"->PITarget</A->, String)</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Types.html#ProcessingInstruction"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->type</SPAN-> <A NAME="t%3ASDDecl"-></A-><B->SDDecl</B-> = Bool</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Types.html#SDDecl"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->type</SPAN-> <A NAME="t%3AVersionInfo"-></A-><B->VersionInfo</B-> = String</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Types.html#VersionInfo"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->type</SPAN-> <A NAME="t%3AComment"-></A-><B->Comment</B-> = String</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Types.html#Comment"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->type</SPAN-> <A NAME="t%3APITarget"-></A-><B->PITarget</B-> = String</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Types.html#PITarget"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section2"-><A NAME="7"->The DTD-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section3"-><A NAME="8"->content model-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3ADocTypeDecl"-></A-><B->DocTypeDecl</B-> </TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Types.html#DocTypeDecl"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3ADTD"-></A-><B->DTD</B-> <A HREF="Text-XML-HaXml-Types.html#t%3AName"->Name</A-> (Maybe <A HREF="Text-XML-HaXml-Types.html#t%3AExternalID"->ExternalID</A->) [<A HREF="Text-XML-HaXml-Types.html#t%3AMarkupDecl"->MarkupDecl</A->]</TD-><TD CLASS="rdoc"-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:DocTypeDecl')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:DocTypeDecl" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"->Eq <A HREF="Text-XML-HaXml-Types.html#t%3ADocTypeDecl"->DocTypeDecl</A-></TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3AMarkupDecl"-></A-><B->MarkupDecl</B-> </TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Types.html#MarkupDecl"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3AElement"-></A-><B->Element</B-> <A HREF="Text-XML-HaXml-Types.html#t%3AElementDecl"->ElementDecl</A-></TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AAttList"-></A-><B->AttList</B-> <A HREF="Text-XML-HaXml-Types.html#t%3AAttListDecl"->AttListDecl</A-></TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AEntity"-></A-><B->Entity</B-> <A HREF="Text-XML-HaXml-Types.html#t%3AEntityDecl"->EntityDecl</A-></TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ANotation"-></A-><B->Notation</B-> <A HREF="Text-XML-HaXml-Types.html#t%3ANotationDecl"->NotationDecl</A-></TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AMarkupMisc"-></A-><B->MarkupMisc</B-> <A HREF="Text-XML-HaXml-Types.html#t%3AMisc"->Misc</A-></TD-><TD CLASS="rdoc"-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:MarkupDecl')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:MarkupDecl" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"->Eq <A HREF="Text-XML-HaXml-Types.html#t%3AMarkupDecl"->MarkupDecl</A-></TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3AExtSubset"-></A-><B->ExtSubset</B-> </TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Types.html#ExtSubset"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3AExtSubset"-></A-><B->ExtSubset</B-> (Maybe <A HREF="Text-XML-HaXml-Types.html#t%3ATextDecl"->TextDecl</A->) [<A HREF="Text-XML-HaXml-Types.html#t%3AExtSubsetDecl"->ExtSubsetDecl</A->]</TD-><TD CLASS="rdoc"-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:ExtSubset')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:ExtSubset" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"->Eq <A HREF="Text-XML-HaXml-Types.html#t%3AExtSubset"->ExtSubset</A-></TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3AExtSubsetDecl"-></A-><B->ExtSubsetDecl</B-> </TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Types.html#ExtSubsetDecl"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3AExtMarkupDecl"-></A-><B->ExtMarkupDecl</B-> <A HREF="Text-XML-HaXml-Types.html#t%3AMarkupDecl"->MarkupDecl</A-></TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AExtConditionalSect"-></A-><B->ExtConditionalSect</B-> <A HREF="Text-XML-HaXml-Types.html#t%3AConditionalSect"->ConditionalSect</A-></TD-><TD CLASS="rdoc"-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:ExtSubsetDecl')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:ExtSubsetDecl" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"->Eq <A HREF="Text-XML-HaXml-Types.html#t%3AExtSubsetDecl"->ExtSubsetDecl</A-></TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3AElementDecl"-></A-><B->ElementDecl</B-> </TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Types.html#ElementDecl"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3AElementDecl"-></A-><B->ElementDecl</B-> <A HREF="Text-XML-HaXml-Types.html#t%3AName"->Name</A-> <A HREF="Text-XML-HaXml-Types.html#t%3AContentSpec"->ContentSpec</A-></TD-><TD CLASS="rdoc"-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:ElementDecl')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:ElementDecl" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"->Eq <A HREF="Text-XML-HaXml-Types.html#t%3AElementDecl"->ElementDecl</A-></TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3AContentSpec"-></A-><B->ContentSpec</B-> </TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Types.html#ContentSpec"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3AEMPTY"-></A-><B->EMPTY</B-></TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AANY"-></A-><B->ANY</B-></TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AMixed"-></A-><B->Mixed</B-> <A HREF="Text-XML-HaXml-Types.html#t%3AMixed"->Mixed</A-></TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AContentSpec"-></A-><B->ContentSpec</B-> <A HREF="Text-XML-HaXml-Types.html#t%3ACP"->CP</A-></TD-><TD CLASS="rdoc"-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:ContentSpec')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:ContentSpec" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"->Eq <A HREF="Text-XML-HaXml-Types.html#t%3AContentSpec"->ContentSpec</A-></TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3ACP"-></A-><B->CP</B-> </TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Types.html#CP"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3ATagName"-></A-><B->TagName</B-> <A HREF="Text-XML-HaXml-Types.html#t%3AName"->Name</A-> <A HREF="Text-XML-HaXml-Types.html#t%3AModifier"->Modifier</A-></TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AChoice"-></A-><B->Choice</B-> [<A HREF="Text-XML-HaXml-Types.html#t%3ACP"->CP</A->] <A HREF="Text-XML-HaXml-Types.html#t%3AModifier"->Modifier</A-></TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ASeq"-></A-><B->Seq</B-> [<A HREF="Text-XML-HaXml-Types.html#t%3ACP"->CP</A->] <A HREF="Text-XML-HaXml-Types.html#t%3AModifier"->Modifier</A-></TD-><TD CLASS="rdoc"-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:CP')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:CP" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"->Eq <A HREF="Text-XML-HaXml-Types.html#t%3ACP"->CP</A-></TD-></TR-><TR-><TD CLASS="decl"->Show <A HREF="Text-XML-HaXml-Types.html#t%3ACP"->CP</A-></TD-></TR-><TR-><TD CLASS="decl"->Show <A HREF="Text-XML-HaXml-Types.html#t%3ACP"->CP</A-></TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3AModifier"-></A-><B->Modifier</B-> </TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Types.html#Modifier"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3ANone"-></A-><B->None</B-></TD-><TD CLASS="rdoc"->Just One-</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AQuery"-></A-><B->Query</B-></TD-><TD CLASS="rdoc"->Zero Or One-</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AStar"-></A-><B->Star</B-></TD-><TD CLASS="rdoc"->Zero Or More-</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3APlus"-></A-><B->Plus</B-></TD-><TD CLASS="rdoc"->One Or More-</TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:Modifier')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:Modifier" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"->Eq <A HREF="Text-XML-HaXml-Types.html#t%3AModifier"->Modifier</A-></TD-></TR-><TR-><TD CLASS="decl"->Show <A HREF="Text-XML-HaXml-Types.html#t%3AModifier"->Modifier</A-></TD-></TR-><TR-><TD CLASS="decl"->Show <A HREF="Text-XML-HaXml-Types.html#t%3AModifier"->Modifier</A-></TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3AMixed"-></A-><B->Mixed</B-> </TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Types.html#Mixed"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3APCDATA"-></A-><B->PCDATA</B-></TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3APCDATAplus"-></A-><B->PCDATAplus</B-> [<A HREF="Text-XML-HaXml-Types.html#t%3AName"->Name</A->]</TD-><TD CLASS="rdoc"-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:Mixed')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:Mixed" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"->Eq <A HREF="Text-XML-HaXml-Types.html#t%3AMixed"->Mixed</A-></TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section3"-><A NAME="9"->attribute model-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3AAttListDecl"-></A-><B->AttListDecl</B-> </TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Types.html#AttListDecl"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3AAttListDecl"-></A-><B->AttListDecl</B-> <A HREF="Text-XML-HaXml-Types.html#t%3AName"->Name</A-> [<A HREF="Text-XML-HaXml-Types.html#t%3AAttDef"->AttDef</A->]</TD-><TD CLASS="rdoc"-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:AttListDecl')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:AttListDecl" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"->Eq <A HREF="Text-XML-HaXml-Types.html#t%3AAttListDecl"->AttListDecl</A-></TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3AAttDef"-></A-><B->AttDef</B-> </TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Types.html#AttDef"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3AAttDef"-></A-><B->AttDef</B-> <A HREF="Text-XML-HaXml-Types.html#t%3AName"->Name</A-> <A HREF="Text-XML-HaXml-Types.html#t%3AAttType"->AttType</A-> <A HREF="Text-XML-HaXml-Types.html#t%3ADefaultDecl"->DefaultDecl</A-></TD-><TD CLASS="rdoc"-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:AttDef')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:AttDef" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"->Eq <A HREF="Text-XML-HaXml-Types.html#t%3AAttDef"->AttDef</A-></TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3AAttType"-></A-><B->AttType</B-> </TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Types.html#AttType"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3AStringType"-></A-><B->StringType</B-></TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ATokenizedType"-></A-><B->TokenizedType</B-> <A HREF="Text-XML-HaXml-Types.html#t%3ATokenizedType"->TokenizedType</A-></TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AEnumeratedType"-></A-><B->EnumeratedType</B-> <A HREF="Text-XML-HaXml-Types.html#t%3AEnumeratedType"->EnumeratedType</A-></TD-><TD CLASS="rdoc"-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:AttType')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:AttType" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"->Eq <A HREF="Text-XML-HaXml-Types.html#t%3AAttType"->AttType</A-></TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3ATokenizedType"-></A-><B->TokenizedType</B-> </TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Types.html#TokenizedType"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3AID"-></A-><B->ID</B-></TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AIDREF"-></A-><B->IDREF</B-></TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AIDREFS"-></A-><B->IDREFS</B-></TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AENTITY"-></A-><B->ENTITY</B-></TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AENTITIES"-></A-><B->ENTITIES</B-></TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ANMTOKEN"-></A-><B->NMTOKEN</B-></TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ANMTOKENS"-></A-><B->NMTOKENS</B-></TD-><TD CLASS="rdoc"-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:TokenizedType')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:TokenizedType" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"->Eq <A HREF="Text-XML-HaXml-Types.html#t%3ATokenizedType"->TokenizedType</A-></TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3AEnumeratedType"-></A-><B->EnumeratedType</B-> </TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Types.html#EnumeratedType"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3ANotationType"-></A-><B->NotationType</B-> <A HREF="Text-XML-HaXml-Types.html#t%3ANotationType"->NotationType</A-></TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AEnumeration"-></A-><B->Enumeration</B-> <A HREF="Text-XML-HaXml-Types.html#t%3AEnumeration"->Enumeration</A-></TD-><TD CLASS="rdoc"-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:EnumeratedType')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:EnumeratedType" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"->Eq <A HREF="Text-XML-HaXml-Types.html#t%3AEnumeratedType"->EnumeratedType</A-></TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->type</SPAN-> <A NAME="t%3ANotationType"-></A-><B->NotationType</B-> = [<A HREF="Text-XML-HaXml-Types.html#t%3AName"->Name</A->]</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Types.html#NotationType"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->type</SPAN-> <A NAME="t%3AEnumeration"-></A-><B->Enumeration</B-> = [<A HREF="Text-XML-HaXml-Types.html#t%3ANmToken"->NmToken</A->]</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Types.html#Enumeration"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3ADefaultDecl"-></A-><B->DefaultDecl</B-> </TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Types.html#DefaultDecl"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3AREQUIRED"-></A-><B->REQUIRED</B-></TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AIMPLIED"-></A-><B->IMPLIED</B-></TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ADefaultTo"-></A-><B->DefaultTo</B-> <A HREF="Text-XML-HaXml-Types.html#t%3AAttValue"->AttValue</A-> (Maybe <A HREF="Text-XML-HaXml-Types.html#t%3AFIXED"->FIXED</A->)</TD-><TD CLASS="rdoc"-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:DefaultDecl')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:DefaultDecl" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"->Eq <A HREF="Text-XML-HaXml-Types.html#t%3ADefaultDecl"->DefaultDecl</A-></TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3AFIXED"-></A-><B->FIXED</B-> </TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Types.html#FIXED"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3AFIXED"-></A-><B->FIXED</B-></TD-><TD CLASS="rdoc"-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:FIXED')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:FIXED" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"->Eq <A HREF="Text-XML-HaXml-Types.html#t%3AFIXED"->FIXED</A-></TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section3"-><A NAME="10"->conditional sections-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3AConditionalSect"-></A-><B->ConditionalSect</B-> </TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Types.html#ConditionalSect"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3AIncludeSect"-></A-><B->IncludeSect</B-> <A HREF="Text-XML-HaXml-Types.html#t%3AIncludeSect"->IncludeSect</A-></TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AIgnoreSect"-></A-><B->IgnoreSect</B-> <A HREF="Text-XML-HaXml-Types.html#t%3AIgnoreSect"->IgnoreSect</A-></TD-><TD CLASS="rdoc"-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:ConditionalSect')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:ConditionalSect" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"->Eq <A HREF="Text-XML-HaXml-Types.html#t%3AConditionalSect"->ConditionalSect</A-></TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->type</SPAN-> <A NAME="t%3AIncludeSect"-></A-><B->IncludeSect</B-> = [<A HREF="Text-XML-HaXml-Types.html#t%3AExtSubsetDecl"->ExtSubsetDecl</A->]</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Types.html#IncludeSect"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->type</SPAN-> <A NAME="t%3AIgnoreSect"-></A-><B->IgnoreSect</B-> = [<A HREF="Text-XML-HaXml-Types.html#t%3AIgnoreSectContents"->IgnoreSectContents</A->]</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Types.html#IgnoreSect"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3AIgnore"-></A-><B->Ignore</B-> </TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Types.html#Ignore"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3AIgnore"-></A-><B->Ignore</B-></TD-><TD CLASS="rdoc"-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:Ignore')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:Ignore" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"->Eq <A HREF="Text-XML-HaXml-Types.html#t%3AIgnore"->Ignore</A-></TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3AIgnoreSectContents"-></A-><B->IgnoreSectContents</B-> </TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Types.html#IgnoreSectContents"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3AIgnoreSectContents"-></A-><B->IgnoreSectContents</B-> <A HREF="Text-XML-HaXml-Types.html#t%3AIgnore"->Ignore</A-> [(<A HREF="Text-XML-HaXml-Types.html#t%3AIgnoreSectContents"->IgnoreSectContents</A->, <A HREF="Text-XML-HaXml-Types.html#t%3AIgnore"->Ignore</A->)]</TD-><TD CLASS="rdoc"-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:IgnoreSectContents')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:IgnoreSectContents" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"->Eq <A HREF="Text-XML-HaXml-Types.html#t%3AIgnoreSectContents"->IgnoreSectContents</A-></TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section2"-><A NAME="11"->References-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3AReference"-></A-><B->Reference</B-> </TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Types.html#Reference"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3ARefEntity"-></A-><B->RefEntity</B-> <A HREF="Text-XML-HaXml-Types.html#t%3AEntityRef"->EntityRef</A-></TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ARefChar"-></A-><B->RefChar</B-> <A HREF="Text-XML-HaXml-Types.html#t%3ACharRef"->CharRef</A-></TD-><TD CLASS="rdoc"-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:Reference')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:Reference" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"->Eq <A HREF="Text-XML-HaXml-Types.html#t%3AReference"->Reference</A-></TD-></TR-><TR-><TD CLASS="decl"->Show <A HREF="Text-XML-HaXml-Types.html#t%3AReference"->Reference</A-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="Text-XML-HaXml-Verbatim.html#t%3AVerbatim"->Verbatim</A-> <A HREF="Text-XML-HaXml-Types.html#t%3AReference"->Reference</A-></TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->type</SPAN-> <A NAME="t%3AEntityRef"-></A-><B->EntityRef</B-> = <A HREF="Text-XML-HaXml-Types.html#t%3AName"->Name</A-></TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Types.html#EntityRef"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->type</SPAN-> <A NAME="t%3ACharRef"-></A-><B->CharRef</B-> = Int</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Types.html#CharRef"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->type</SPAN-> <A NAME="t%3APEReference"-></A-><B->PEReference</B-> = <A HREF="Text-XML-HaXml-Types.html#t%3AName"->Name</A-></TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Types.html#PEReference"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section2"-><A NAME="12"->Entities-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3AEntityDecl"-></A-><B->EntityDecl</B-> </TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Types.html#EntityDecl"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3AEntityGEDecl"-></A-><B->EntityGEDecl</B-> <A HREF="Text-XML-HaXml-Types.html#t%3AGEDecl"->GEDecl</A-></TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AEntityPEDecl"-></A-><B->EntityPEDecl</B-> <A HREF="Text-XML-HaXml-Types.html#t%3APEDecl"->PEDecl</A-></TD-><TD CLASS="rdoc"-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:EntityDecl')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:EntityDecl" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"->Eq <A HREF="Text-XML-HaXml-Types.html#t%3AEntityDecl"->EntityDecl</A-></TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3AGEDecl"-></A-><B->GEDecl</B-> </TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Types.html#GEDecl"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3AGEDecl"-></A-><B->GEDecl</B-> <A HREF="Text-XML-HaXml-Types.html#t%3AName"->Name</A-> <A HREF="Text-XML-HaXml-Types.html#t%3AEntityDef"->EntityDef</A-></TD-><TD CLASS="rdoc"-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:GEDecl')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:GEDecl" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"->Eq <A HREF="Text-XML-HaXml-Types.html#t%3AGEDecl"->GEDecl</A-></TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3APEDecl"-></A-><B->PEDecl</B-> </TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Types.html#PEDecl"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3APEDecl"-></A-><B->PEDecl</B-> <A HREF="Text-XML-HaXml-Types.html#t%3AName"->Name</A-> <A HREF="Text-XML-HaXml-Types.html#t%3APEDef"->PEDef</A-></TD-><TD CLASS="rdoc"-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:PEDecl')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:PEDecl" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"->Eq <A HREF="Text-XML-HaXml-Types.html#t%3APEDecl"->PEDecl</A-></TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3AEntityDef"-></A-><B->EntityDef</B-> </TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Types.html#EntityDef"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3ADefEntityValue"-></A-><B->DefEntityValue</B-> <A HREF="Text-XML-HaXml-Types.html#t%3AEntityValue"->EntityValue</A-></TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ADefExternalID"-></A-><B->DefExternalID</B-> <A HREF="Text-XML-HaXml-Types.html#t%3AExternalID"->ExternalID</A-> (Maybe <A HREF="Text-XML-HaXml-Types.html#t%3ANDataDecl"->NDataDecl</A->)</TD-><TD CLASS="rdoc"-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:EntityDef')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:EntityDef" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"->Eq <A HREF="Text-XML-HaXml-Types.html#t%3AEntityDef"->EntityDef</A-></TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3APEDef"-></A-><B->PEDef</B-> </TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Types.html#PEDef"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3APEDefEntityValue"-></A-><B->PEDefEntityValue</B-> <A HREF="Text-XML-HaXml-Types.html#t%3AEntityValue"->EntityValue</A-></TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3APEDefExternalID"-></A-><B->PEDefExternalID</B-> <A HREF="Text-XML-HaXml-Types.html#t%3AExternalID"->ExternalID</A-></TD-><TD CLASS="rdoc"-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:PEDef')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:PEDef" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"->Eq <A HREF="Text-XML-HaXml-Types.html#t%3APEDef"->PEDef</A-></TD-></TR-><TR-><TD CLASS="decl"->Show <A HREF="Text-XML-HaXml-Types.html#t%3APEDef"->PEDef</A-></TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3AExternalID"-></A-><B->ExternalID</B-> </TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Types.html#ExternalID"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3ASYSTEM"-></A-><B->SYSTEM</B-> <A HREF="Text-XML-HaXml-Types.html#t%3ASystemLiteral"->SystemLiteral</A-></TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3APUBLIC"-></A-><B->PUBLIC</B-> <A HREF="Text-XML-HaXml-Types.html#t%3APubidLiteral"->PubidLiteral</A-> <A HREF="Text-XML-HaXml-Types.html#t%3ASystemLiteral"->SystemLiteral</A-></TD-><TD CLASS="rdoc"-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:ExternalID')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:ExternalID" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"->Eq <A HREF="Text-XML-HaXml-Types.html#t%3AExternalID"->ExternalID</A-></TD-></TR-><TR-><TD CLASS="decl"->Show <A HREF="Text-XML-HaXml-Types.html#t%3AExternalID"->ExternalID</A-></TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->newtype</SPAN-> <A NAME="t%3ANDataDecl"-></A-><B->NDataDecl</B-> </TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Types.html#NDataDecl"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3ANDATA"-></A-><B->NDATA</B-> <A HREF="Text-XML-HaXml-Types.html#t%3AName"->Name</A-></TD-><TD CLASS="rdoc"-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:NDataDecl')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:NDataDecl" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"->Eq <A HREF="Text-XML-HaXml-Types.html#t%3ANDataDecl"->NDataDecl</A-></TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3ATextDecl"-></A-><B->TextDecl</B-> </TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Types.html#TextDecl"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3ATextDecl"-></A-><B->TextDecl</B-> (Maybe <A HREF="Text-XML-HaXml-Types.html#t%3AVersionInfo"->VersionInfo</A->) <A HREF="Text-XML-HaXml-Types.html#t%3AEncodingDecl"->EncodingDecl</A-></TD-><TD CLASS="rdoc"-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:TextDecl')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:TextDecl" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"->Eq <A HREF="Text-XML-HaXml-Types.html#t%3ATextDecl"->TextDecl</A-></TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3AExtParsedEnt"-></A-><B->ExtParsedEnt</B-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Types.html#ExtParsedEnt"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3AExtParsedEnt"-></A-><B->ExtParsedEnt</B-> (Maybe <A HREF="Text-XML-HaXml-Types.html#t%3ATextDecl"->TextDecl</A->) (<A HREF="Text-XML-HaXml-Types.html#t%3AContent"->Content</A-> i)</TD-><TD CLASS="rdoc"-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:ExtParsedEnt')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:ExtParsedEnt" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"->??? i =&gt; Eq (<A HREF="Text-XML-HaXml-Types.html#t%3AExtParsedEnt"->ExtParsedEnt</A-> i)</TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3AExtPE"-></A-><B->ExtPE</B-> </TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Types.html#ExtPE"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3AExtPE"-></A-><B->ExtPE</B-> (Maybe <A HREF="Text-XML-HaXml-Types.html#t%3ATextDecl"->TextDecl</A->) [<A HREF="Text-XML-HaXml-Types.html#t%3AExtSubsetDecl"->ExtSubsetDecl</A->]</TD-><TD CLASS="rdoc"-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:ExtPE')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:ExtPE" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"->Eq <A HREF="Text-XML-HaXml-Types.html#t%3AExtPE"->ExtPE</A-></TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3ANotationDecl"-></A-><B->NotationDecl</B-> </TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Types.html#NotationDecl"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3ANOTATION"-></A-><B->NOTATION</B-> <A HREF="Text-XML-HaXml-Types.html#t%3AName"->Name</A-> (Either <A HREF="Text-XML-HaXml-Types.html#t%3AExternalID"->ExternalID</A-> <A HREF="Text-XML-HaXml-Types.html#t%3APublicID"->PublicID</A->)</TD-><TD CLASS="rdoc"-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:NotationDecl')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:NotationDecl" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"->Eq <A HREF="Text-XML-HaXml-Types.html#t%3ANotationDecl"->NotationDecl</A-></TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->newtype</SPAN-> <A NAME="t%3APublicID"-></A-><B->PublicID</B-> </TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Types.html#PublicID"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3APUBLICID"-></A-><B->PUBLICID</B-> <A HREF="Text-XML-HaXml-Types.html#t%3APubidLiteral"->PubidLiteral</A-></TD-><TD CLASS="rdoc"-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:PublicID')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:PublicID" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"->Eq <A HREF="Text-XML-HaXml-Types.html#t%3APublicID"->PublicID</A-></TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->newtype</SPAN-> <A NAME="t%3AEncodingDecl"-></A-><B->EncodingDecl</B-> </TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Types.html#EncodingDecl"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3AEncodingDecl"-></A-><B->EncodingDecl</B-> String</TD-><TD CLASS="rdoc"-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:EncodingDecl')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:EncodingDecl" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"->Eq <A HREF="Text-XML-HaXml-Types.html#t%3AEncodingDecl"->EncodingDecl</A-></TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3AEntityValue"-></A-><B->EntityValue</B-> </TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Types.html#EntityValue"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3AEntityValue"-></A-><B->EntityValue</B-> [<A HREF="Text-XML-HaXml-Types.html#t%3AEV"->EV</A->]</TD-><TD CLASS="rdoc"-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:EntityValue')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:EntityValue" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"->Eq <A HREF="Text-XML-HaXml-Types.html#t%3AEntityValue"->EntityValue</A-></TD-></TR-><TR-><TD CLASS="decl"->Show <A HREF="Text-XML-HaXml-Types.html#t%3AEntityValue"->EntityValue</A-></TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3AEV"-></A-><B->EV</B-> </TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Types.html#EV"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3AEVString"-></A-><B->EVString</B-> String</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AEVRef"-></A-><B->EVRef</B-> <A HREF="Text-XML-HaXml-Types.html#t%3AReference"->Reference</A-></TD-><TD CLASS="rdoc"-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:EV')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:EV" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"->Eq <A HREF="Text-XML-HaXml-Types.html#t%3AEV"->EV</A-></TD-></TR-><TR-><TD CLASS="decl"->Show <A HREF="Text-XML-HaXml-Types.html#t%3AEV"->EV</A-></TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->newtype</SPAN-> <A NAME="t%3APubidLiteral"-></A-><B->PubidLiteral</B-> </TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Types.html#PubidLiteral"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3APubidLiteral"-></A-><B->PubidLiteral</B-> String</TD-><TD CLASS="rdoc"-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:PubidLiteral')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:PubidLiteral" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"->Eq <A HREF="Text-XML-HaXml-Types.html#t%3APubidLiteral"->PubidLiteral</A-></TD-></TR-><TR-><TD CLASS="decl"->Show <A HREF="Text-XML-HaXml-Types.html#t%3APubidLiteral"->PubidLiteral</A-></TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->newtype</SPAN-> <A NAME="t%3ASystemLiteral"-></A-><B->SystemLiteral</B-> </TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Types.html#SystemLiteral"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3ASystemLiteral"-></A-><B->SystemLiteral</B-> String</TD-><TD CLASS="rdoc"-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:SystemLiteral')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:SystemLiteral" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"->Eq <A HREF="Text-XML-HaXml-Types.html#t%3ASystemLiteral"->SystemLiteral</A-></TD-></TR-><TR-><TD CLASS="decl"->Show <A HREF="Text-XML-HaXml-Types.html#t%3ASystemLiteral"->SystemLiteral</A-></TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section2"-><A NAME="13"->Basic value types-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->type</SPAN-> <A NAME="t%3AName"-></A-><B->Name</B-> = String</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Types.html#Name"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->type</SPAN-> <A NAME="t%3ANames"-></A-><B->Names</B-> = [<A HREF="Text-XML-HaXml-Types.html#t%3AName"->Name</A->]</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Types.html#Names"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->type</SPAN-> <A NAME="t%3ANmToken"-></A-><B->NmToken</B-> = String</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Types.html#NmToken"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->type</SPAN-> <A NAME="t%3ANmTokens"-></A-><B->NmTokens</B-> = [<A HREF="Text-XML-HaXml-Types.html#t%3ANmToken"->NmToken</A->]</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Types.html#NmTokens"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->type</SPAN-> <A NAME="t%3ACharData"-></A-><B->CharData</B-> = String</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Types.html#CharData"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->type</SPAN-> <A NAME="t%3ACDSect"-></A-><B->CDSect</B-> = <A HREF="Text-XML-HaXml-Types.html#t%3ACharData"->CharData</A-></TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Types.html#CDSect"->Source</A-></TD-></TR-></TABLE-></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->
− docs/HaXml/Text-XML-HaXml-Util.html
@@ -1,261 +0,0 @@-<!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.HaXml.Util</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"->HaXml</TD-><TD CLASS="topbut"-><A HREF="src/Text/XML/HaXml/Util.html"->Source code</A-></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.HaXml.Util</FONT-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="section4"-><B->Contents</B-></TD-></TR-><TR-><TD-><DL-><DT-><A HREF="#1"->utility functions to access XML content-</A-></DT-></DL-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section1"->Description</TD-></TR-><TR-><TD CLASS="doc"-><UL-><LI-> Only a shmall module containing some helper functions to extract xml content- - I would have added this to Types but I've put it into an additional module- - to avoid circular references (Verbatim <A HREF="-"->-</A-> Types)-</LI-></UL-></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%3AdocContent"->docContent</A-> :: i -&gt; <A HREF="Text-XML-HaXml-Types.html#t%3ADocument"->Document</A-> i -&gt; <A HREF="Text-XML-HaXml-Types.html#t%3AContent"->Content</A-> i</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AcontentElem"->contentElem</A-> :: <A HREF="Text-XML-HaXml-Types.html#t%3AContent"->Content</A-> i -&gt; <A HREF="Text-XML-HaXml-Types.html#t%3AElement"->Element</A-> i</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Aattrs"->attrs</A-> :: <A HREF="Text-XML-HaXml-Types.html#t%3AElement"->Element</A-> i -&gt; [<A HREF="Text-XML-HaXml-Types.html#t%3AAttribute"->Attribute</A->]</TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section2"-><A NAME="1"->utility functions to access XML content-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AdocContent"-></A-><B->docContent</B-> :: i -&gt; <A HREF="Text-XML-HaXml-Types.html#t%3ADocument"->Document</A-> i -&gt; <A HREF="Text-XML-HaXml-Types.html#t%3AContent"->Content</A-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Util.html#docContent"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AcontentElem"-></A-><B->contentElem</B-> :: <A HREF="Text-XML-HaXml-Types.html#t%3AContent"->Content</A-> i -&gt; <A HREF="Text-XML-HaXml-Types.html#t%3AElement"->Element</A-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Util.html#contentElem"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Aattrs"-></A-><B->attrs</B-> :: <A HREF="Text-XML-HaXml-Types.html#t%3AElement"->Element</A-> i -&gt; [<A HREF="Text-XML-HaXml-Types.html#t%3AAttribute"->Attribute</A->]</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Util.html#attrs"->Source</A-></TD-></TR-></TABLE-></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->
− docs/HaXml/Text-XML-HaXml-Validate.html
@@ -1,218 +0,0 @@-<!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.HaXml.Validate</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"->HaXml</TD-><TD CLASS="topbut"-><A HREF="src/Text/XML/HaXml/Validate.html"->Source code</A-></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.HaXml.Validate</FONT-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section1"->Description</TD-></TR-><TR-><TD CLASS="doc"->Validate a document against a dtd.-</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%3Avalidate"->validate</A-> :: <A HREF="Text-XML-HaXml-Types.html#t%3ADocTypeDecl"->DocTypeDecl</A-> -&gt; <A HREF="Text-XML-HaXml-Types.html#t%3AElement"->Element</A-> i -&gt; [String]</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3ApartialValidate"->partialValidate</A-> :: <A HREF="Text-XML-HaXml-Types.html#t%3ADocTypeDecl"->DocTypeDecl</A-> -&gt; <A HREF="Text-XML-HaXml-Types.html#t%3AElement"->Element</A-> i -&gt; [String]</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="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Avalidate"-></A-><B->validate</B-> :: <A HREF="Text-XML-HaXml-Types.html#t%3ADocTypeDecl"->DocTypeDecl</A-> -&gt; <A HREF="Text-XML-HaXml-Types.html#t%3AElement"->Element</A-> i -&gt; [String]</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Validate.html#validate"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"-><P-><TT-><A HREF="Text-XML-HaXml-Validate.html#v%3Avalidate"->validate</A-></TT-> takes a DTD and a tagged element, and returns a list of-   errors in the document with respect to its DTD.-</P-><P->If you have several documents to validate against a single DTD,-   then you will gain efficiency by freezing-in the DTD through partial-   application, e.g. <TT->checkMyDTD = validate myDTD</TT->.-</P-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3ApartialValidate"-></A-><B->partialValidate</B-> :: <A HREF="Text-XML-HaXml-Types.html#t%3ADocTypeDecl"->DocTypeDecl</A-> -&gt; <A HREF="Text-XML-HaXml-Types.html#t%3AElement"->Element</A-> i -&gt; [String]</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Validate.html#partialValidate"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"-><TT-><A HREF="Text-XML-HaXml-Validate.html#v%3ApartialValidate"->partialValidate</A-></TT-> is like validate, except that it does not check that-   the element type matches that of the DTD's root element.-</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->
− docs/HaXml/Text-XML-HaXml-Verbatim.html
@@ -1,463 +0,0 @@-<!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.HaXml.Verbatim</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"->HaXml</TD-><TD CLASS="topbut"-><A HREF="src/Text/XML/HaXml/Verbatim.html"->Source code</A-></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.HaXml.Verbatim</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"->simons@cryp.to</TD-></TR-></TABLE-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section1"->Description</TD-></TR-><TR-><TD CLASS="doc"-><P->The preferred method for rendering a <TT-><A HREF="Text-XML-HaXml-Types.html#t%3ADocument"->Document</A-></TT-> or single <TT-><A HREF="Text-XML-HaXml-Types.html#t%3AContent"->Content</A-></TT->-   is by using the pretty printing facility defined in <A HREF="Pretty.html"->Pretty</A->.-   Pretty-printing does not work well for cases, however, where the-   formatting in the XML document is significant. Examples of this-   case are XHTML's <TT->&lt;pre&gt;</TT-> tag, Docbook's <TT->&lt;literallayout&gt;</TT-> tag,-   and many more.-</P-><P->Theoretically, the document author could avoid this problem by-   wrapping the contents of these tags in a &lt;![CDATA[...]]&gt; section,-   but often this is not practical, for instance when the-   literal-layout section contains other elements. Finally, program-   writers could manually format these elements by transforming them-   into a literal string in their CFliter, etc., but this is-   annoying to do and prone to omissions and formatting errors.-</P-><P->As an alternative, this module provides the function <TT-><A HREF="Text-XML-HaXml-Verbatim.html#v%3Averbatim"->verbatim</A-></TT->,-   which will format XML <TT-><A HREF="Text-XML-HaXml-Types.html#t%3AContent"->Content</A-></TT-> as a String while retaining the-   formatting of the input document unchanged.-</P-><P-><EM->Know problems</EM->:-</P-><UL-><LI-> HaXml's parser eats line feeds between two tags.-</LI-><LI-> <TT-><A HREF="Text-XML-HaXml-Types.html#t%3AAttribute"->Attribute</A-></TT->s should be formatted by making them an instance of-      <TT-><A HREF="Text-XML-HaXml-Verbatim.html#t%3AVerbatim"->Verbatim</A-></TT-> as well, but since an <TT-><A HREF="Text-XML-HaXml-Types.html#t%3AAttribute"->Attribute</A-></TT-> is just a tuple,-      not a full data type, the helper function <TT-><A HREF="Text-XML-HaXml-Verbatim.html#v%3AverbAttr"->verbAttr</A-></TT-> must be-      used instead.-</LI-><LI-> <TT-><A HREF="Text-XML-HaXml-Types.html#v%3ACMisc"->CMisc</A-></TT-> is not yet supported.-</LI-><LI-> <TT-><A HREF="Text-XML-HaXml-Types.html#t%3AElement"->Element</A-></TT->s, which contain no content, are formatted as-       <TT->&lt;element-name/&gt;</TT->, even if they were not defined as being of-       type <TT->EMPTY</TT->. In XML this perfectly alright, but in SGML it is-       not. Those, who wish to use <TT-><A HREF="Text-XML-HaXml-Verbatim.html#v%3Averbatim"->verbatim</A-></TT-> to format parts of say-       an HTML page will have to (a) replace problematic elements by-       literals <EM->before</EM-> running <TT-><A HREF="Text-XML-HaXml-Verbatim.html#v%3Averbatim"->verbatim</A-></TT-> or (b) use a second-       search-and-replace stage to fix this.-</LI-></UL-></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"-><SPAN CLASS="keyword"->class</SPAN-> <A HREF="#t%3AVerbatim"->Verbatim</A-> a  <SPAN CLASS="keyword"->where</SPAN-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="decl"-><A HREF="#v%3Averbatim"->verbatim</A-> :: a -&gt; String</TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AverbAttr"->verbAttr</A-> :: <A HREF="Text-XML-HaXml-Types.html#t%3AAttribute"->Attribute</A-> -&gt; String</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="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->class</SPAN-> <A NAME="t%3AVerbatim"-></A-><B->Verbatim</B-> a  <SPAN CLASS="keyword"->where</SPAN-></TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Verbatim.html#Verbatim"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="ndoc"->This class promises that the function <TT-><A HREF="Text-XML-HaXml-Verbatim.html#v%3Averbatim"->verbatim</A-></TT-> knows how to- format this data type into a string without changing the- formatting.-</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="section4"->Methods</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Averbatim"-></A-><B->verbatim</B-> :: a -&gt; String</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Verbatim.html#verbatim"->Source</A-></TD-></TR-></TABLE-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:Verbatim')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:Verbatim" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"-><A HREF="Text-XML-HaXml-Verbatim.html#t%3AVerbatim"->Verbatim</A-> Char</TD-></TR-><TR-><TD CLASS="decl"-><A HREF="Text-XML-HaXml-Verbatim.html#t%3AVerbatim"->Verbatim</A-> <A HREF="Text-XML-HaXml-Types.html#t%3AReference"->Reference</A-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="Text-XML-HaXml-Verbatim.html#t%3AVerbatim"->Verbatim</A-> (<A HREF="Text-XML-HaXml-Types.html#t%3AContent"->Content</A-> i)</TD-></TR-><TR-><TD CLASS="decl"-><A HREF="Text-XML-HaXml-Verbatim.html#t%3AVerbatim"->Verbatim</A-> (<A HREF="Text-XML-HaXml-Types.html#t%3AElement"->Element</A-> i)</TD-></TR-><TR-><TD CLASS="decl"-><A HREF="Text-XML-HaXml-Verbatim.html#t%3AVerbatim"->Verbatim</A-> a =&gt; <A HREF="Text-XML-HaXml-Verbatim.html#t%3AVerbatim"->Verbatim</A-> [a]</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-Verbatim.html#t%3AVerbatim"->Verbatim</A-> a, <A HREF="Text-XML-HaXml-Verbatim.html#t%3AVerbatim"->Verbatim</A-> b) =&gt; <A HREF="Text-XML-HaXml-Verbatim.html#t%3AVerbatim"->Verbatim</A-> (Either a b)</TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AverbAttr"-></A-><B->verbAttr</B-> :: <A HREF="Text-XML-HaXml-Types.html#t%3AAttribute"->Attribute</A-> -&gt; String</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Verbatim.html#verbAttr"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->This is a helper function is required because Haskell does not- allow to make an ordinary tuple (like <TT-><A HREF="Text-XML-HaXml-Types.html#t%3AAttribute"->Attribute</A-></TT->) an instance of a- class. The resulting output will preface the actual attribute with- a single blank so that lists of <TT-><A HREF="Text-XML-HaXml-Types.html#t%3AAttribute"->Attribute</A-></TT->s can be handled- implicitly by the definition for lists of <TT-><A HREF="Text-XML-HaXml-Verbatim.html#t%3AVerbatim"->Verbatim</A-></TT-> data types.-</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->
− docs/HaXml/Text-XML-HaXml-Wrappers.html
@@ -1,249 +0,0 @@-<!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.HaXml.Wrappers</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"->HaXml</TD-><TD CLASS="topbut"-><A HREF="src/Text/XML/HaXml/Wrappers.html"->Source code</A-></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.HaXml.Wrappers</FONT-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></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%3Afix2Args"->fix2Args</A-> :: IO (String, String)</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AprocessXmlWith"->processXmlWith</A-> :: <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> <A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A-> -&gt; IO ()</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AonContent"->onContent</A-> :: <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Types.html#t%3ADocument"->Document</A-> i -&gt; <A HREF="Text-XML-HaXml-Types.html#t%3ADocument"->Document</A-> i</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="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Afix2Args"-></A-><B->fix2Args</B-> :: IO (String, String)</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Wrappers.html#fix2Args"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->This useful auxiliary checks the commandline arguments for two-   filenames, the input and output file respectively.  If either-   is missing, it is replaced by '-', which can be interpreted by the-   caller as stdin and/or stdout.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AprocessXmlWith"-></A-><B->processXmlWith</B-> :: <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> <A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A-> -&gt; IO ()</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Wrappers.html#processXmlWith"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"-><P->The wrapper <TT->processXmlWith</TT-> returns an IO () computation-   that collects the filenames (or stdin/stdout) to use when-   reading/writing XML documents.  Its CFilter argument-   is applied to transform the XML document from the input and-   write it to the output.  No DTD is attached to the output.-</P-><P->If the input filename ends with .html or .htm, it is parsed using-   the error-correcting HTML parser rather than the strict XML parser.-</P-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AonContent"-></A-><B->onContent</B-> :: <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Types.html#t%3ADocument"->Document</A-> i -&gt; <A HREF="Text-XML-HaXml-Types.html#t%3ADocument"->Document</A-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Wrappers.html#onContent"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->The wrapper <TT->onContent</TT-> simply applies a given content filter to a-   document.  Ambiguous or empty results raise an error exception.-</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->
− docs/HaXml/Text-XML-HaXml-XmlContent-Haskell.html
@@ -1,674 +0,0 @@-<!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.HaXml.XmlContent.Haskell</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"->HaXml</TD-><TD CLASS="topbut"-><A HREF="src/Text/XML/HaXml/XmlContent/Haskell.html"->Source code</A-></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.HaXml.XmlContent.Haskell</FONT-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="section4"-><B->Contents</B-></TD-></TR-><TR-><TD-><DL-><DT-><A HREF="#1"->Re-export everything from Text.XML.HaXml.XmlContent.Parser.-</A-></DT-><DT-><A HREF="#2"->Instances (only) for the XmlContent class, for datatypes that-</A-></DT-><DT-><A HREF="#3"->Whole-document conversion functions-</A-></DT-></DL-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section1"->Description</TD-></TR-><TR-><TD CLASS="doc"-><P->The class <TT-><A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-></TT-> is a kind of replacement for Read and Show:-   it provides conversions between a generic XML tree representation-   and your own more specialised typeful Haskell data trees.-</P-><P->If you are starting with a set of Haskell datatypes, use DrIFT to-   derive instances of this class for you:-       http://repetae.net/john/computer/haskell/DrIFT-   and use the current module for instances of the standard Haskell-   datatypes list, Maybe, and so on.-</P-><P->If you are starting with an XML DTD, use HaXml's tool DtdToHaskell-   to generate both the Haskell types and the corresponding instances,-   but _do_not_ use the current module for instances: use-   Text.XML.HaXml.XmlContent instead.-</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"->module <A HREF="Text-XML-HaXml-XmlContent-Parser.html"->Text.XML.HaXml.XmlContent.Parser</A-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AtoXml"->toXml</A-> :: <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a =&gt; Bool -&gt; a -&gt; <A HREF="Text-XML-HaXml-Types.html#t%3ADocument"->Document</A-> ()</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AfromXml"->fromXml</A-> :: <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a =&gt; <A HREF="Text-XML-HaXml-Types.html#t%3ADocument"->Document</A-> <A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A-> -&gt; Either String a</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AreadXml"->readXml</A-> :: <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a =&gt; String -&gt; Either String a</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AshowXml"->showXml</A-> :: <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a =&gt; Bool -&gt; a -&gt; String</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AfpsShowXml"->fpsShowXml</A-> :: <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a =&gt; Bool -&gt; a -&gt; ByteString</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AfReadXml"->fReadXml</A-> :: <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a =&gt; FilePath -&gt; IO a</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AfWriteXml"->fWriteXml</A-> :: <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a =&gt; FilePath -&gt; a -&gt; IO ()</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AfpsWriteXml"->fpsWriteXml</A-> :: <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a =&gt; FilePath -&gt; a -&gt; IO ()</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AhGetXml"->hGetXml</A-> :: <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a =&gt; Handle -&gt; IO a</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AhPutXml"->hPutXml</A-> :: <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a =&gt; Handle -&gt; Bool -&gt; a -&gt; IO ()</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AfpsHPutXml"->fpsHPutXml</A-> :: <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a =&gt; Handle -&gt; Bool -&gt; a -&gt; IO ()</TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section1"-><A NAME="1"->Re-export everything from Text.XML.HaXml.XmlContent.Parser.-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="decl"->module <A HREF="Text-XML-HaXml-XmlContent-Parser.html"->Text.XML.HaXml.XmlContent.Parser</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section1"-><A NAME="2"->Instances (only) for the XmlContent class, for datatypes that-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section1"-><A NAME="3"->Whole-document conversion functions-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AtoXml"-></A-><B->toXml</B-> :: <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a =&gt; Bool -&gt; a -&gt; <A HREF="Text-XML-HaXml-Types.html#t%3ADocument"->Document</A-> ()</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/XmlContent/Haskell.html#toXml"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Convert a fully-typed XML document to a string (with or without DTD).-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AfromXml"-></A-><B->fromXml</B-> :: <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a =&gt; <A HREF="Text-XML-HaXml-Types.html#t%3ADocument"->Document</A-> <A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A-> -&gt; Either String a</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/XmlContent/Haskell.html#fromXml"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Read a Haskell value from an XML document, ignoring the DTD and-   using the Haskell result type to determine how to parse it.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AreadXml"-></A-><B->readXml</B-> :: <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a =&gt; String -&gt; Either String a</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/XmlContent/Haskell.html#readXml"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Read a fully-typed XML document from a string.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AshowXml"-></A-><B->showXml</B-> :: <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a =&gt; Bool -&gt; a -&gt; String</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/XmlContent/Haskell.html#showXml"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Convert a fully-typed XML document to a string (without DTD).-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AfpsShowXml"-></A-><B->fpsShowXml</B-> :: <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a =&gt; Bool -&gt; a -&gt; ByteString</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/XmlContent/Haskell.html#fpsShowXml"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Convert a fully-typed XML document to a ByteString (without DTD).-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AfReadXml"-></A-><B->fReadXml</B-> :: <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a =&gt; FilePath -&gt; IO a</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/XmlContent/Haskell.html#fReadXml"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Read an XML document from a file and convert it to a fully-typed-   Haskell value.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AfWriteXml"-></A-><B->fWriteXml</B-> :: <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a =&gt; FilePath -&gt; a -&gt; IO ()</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/XmlContent/Haskell.html#fWriteXml"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Write a fully-typed Haskell value to the given file as an XML-   document.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AfpsWriteXml"-></A-><B->fpsWriteXml</B-> :: <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a =&gt; FilePath -&gt; a -&gt; IO ()</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/XmlContent/Haskell.html#fpsWriteXml"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Write any Haskell value to the given file as an XML document,-   using the FastPackedString interface (output will not be prettified).-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AhGetXml"-></A-><B->hGetXml</B-> :: <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a =&gt; Handle -&gt; IO a</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/XmlContent/Haskell.html#hGetXml"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Read a fully-typed XML document from a file handle.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AhPutXml"-></A-><B->hPutXml</B-> :: <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a =&gt; Handle -&gt; Bool -&gt; a -&gt; IO ()</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/XmlContent/Haskell.html#hPutXml"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Write a fully-typed XML document to a file handle.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AfpsHPutXml"-></A-><B->fpsHPutXml</B-> :: <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a =&gt; Handle -&gt; Bool -&gt; a -&gt; IO ()</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/XmlContent/Haskell.html#fpsHPutXml"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Write a fully-typed XML document to a file handle, using the-   FastPackedString interface (output will not be prettified).-</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->
− docs/HaXml/Text-XML-HaXml-XmlContent-Parser.html
@@ -1,4341 +0,0 @@-<!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.HaXml.XmlContent.Parser</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"->HaXml</TD-><TD CLASS="topbut"-><A HREF="src/Text/XML/HaXml/XmlContent/Parser.html"->Source code</A-></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.HaXml.XmlContent.Parser</FONT-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="section4"-><B->Contents</B-></TD-></TR-><TR-><TD-><DL-><DT-><A HREF="#1"->Re-export the relevant set of generic XML document type definitions-</A-></DT-><DT-><A HREF="#2"->The enabling classes, that define parsing/unparsing between Haskell-</A-></DT-><DD-><DL-><DT-><A HREF="#3"->Auxiliaries for writing parsers in the XmlContent class-</A-></DT-><DT-><A HREF="#4"->Auxiliaries for generating in the XmlContent class-</A-></DT-><DT-><A HREF="#5"->Auxiliaries for the attribute-related classes-</A-></DT-></DL-></DD-><DT-><A HREF="#6"->Explicit representation of Haskell datatype information-</A-></DT-><DT-><A HREF="#7"->Types useful for some content models-</A-></DT-></DL-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section1"->Description</TD-></TR-><TR-><TD CLASS="doc"-><P->The class <TT-><A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-></TT-> is a kind of replacement for Read and Show:-   it provides conversions between a generic XML tree representation-   and your own more specialised typeful Haskell data trees.-</P-><P->If you are starting with a set of Haskell datatypes, use DrIFT to-   derive instances of this class for you:-       http://repetae.net/john/computer/haskell/DrIFT-   If you are starting with an XML DTD, use HaXml's tool DtdToHaskell-   to generate both the Haskell types and the corresponding instances.-</P-><P->This unified class interface replaces two previous (somewhat similar)-   classes: Haskell2Xml and Xml2Haskell.  There was no real reason to have-   separate classes depending on how you originally defined your datatypes.-   However, some instances for basic types like lists will depend on which -   direction you are using.  See Text.XML.HaXml.XmlContent and-   Text.XML.HaXml.XmlContent.Haskell.-</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"-><SPAN CLASS="keyword"->data</SPAN-> <A HREF="#t%3ADocument"->Document</A-> i = <A HREF="#v%3ADocument"->Document</A-> <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AProlog"->Prolog</A-> (<A HREF="Text-XML-HaXml-Types.html#t%3ASymTab"->SymTab</A-> <A HREF="Text-XML-HaXml-Types.html#t%3AEntityDef"->EntityDef</A->) (<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AElement"->Element</A-> i) [<A HREF="Text-XML-HaXml-Types.html#t%3AMisc"->Misc</A->]</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->data</SPAN-> <A HREF="#t%3AElement"->Element</A-> i = <A HREF="#v%3AElem"->Elem</A-> <A HREF="Text-XML-HaXml-Types.html#t%3AName"->Name</A-> [<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AAttribute"->Attribute</A->] [<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AContent"->Content</A-> i]</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->data</SPAN-> <A HREF="#t%3AElemTag"->ElemTag</A->  = <A HREF="#v%3AElemTag"->ElemTag</A-> <A HREF="Text-XML-HaXml-Types.html#t%3AName"->Name</A-> [<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AAttribute"->Attribute</A->]</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->data</SPAN-> <A HREF="#t%3AContent"->Content</A-> i</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="decl"->= <A HREF="#v%3ACElem"->CElem</A-> (<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AElement"->Element</A-> i) i</TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ACString"->CString</A-> Bool <A HREF="Text-XML-HaXml-Types.html#t%3ACharData"->CharData</A-> i</TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ACRef"->CRef</A-> <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AReference"->Reference</A-> i</TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ACMisc"->CMisc</A-> <A HREF="Text-XML-HaXml-Types.html#t%3AMisc"->Misc</A-> i</TD-></TR-></TABLE-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->type</SPAN-> <A HREF="#t%3AAttribute"->Attribute</A-> = (<A HREF="Text-XML-HaXml-Types.html#t%3AName"->Name</A->, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AAttValue"->AttValue</A->)</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->data</SPAN-> <A HREF="#t%3AAttValue"->AttValue</A->  = <A HREF="#v%3AAttValue"->AttValue</A-> [Either String <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AReference"->Reference</A->]</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->data</SPAN-> <A HREF="#t%3AProlog"->Prolog</A->  = <A HREF="#v%3AProlog"->Prolog</A-> (Maybe <A HREF="Text-XML-HaXml-Types.html#t%3AXMLDecl"->XMLDecl</A->) [<A HREF="Text-XML-HaXml-Types.html#t%3AMisc"->Misc</A->] (Maybe <A HREF="Text-XML-HaXml-Types.html#t%3ADocTypeDecl"->DocTypeDecl</A->) [<A HREF="Text-XML-HaXml-Types.html#t%3AMisc"->Misc</A->]</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->data</SPAN-> <A HREF="#t%3AReference"->Reference</A-> </TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="decl"->= <A HREF="#v%3ARefEntity"->RefEntity</A-> <A HREF="Text-XML-HaXml-Types.html#t%3AEntityRef"->EntityRef</A-></TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ARefChar"->RefChar</A-> <A HREF="Text-XML-HaXml-Types.html#t%3ACharRef"->CharRef</A-></TD-></TR-></TABLE-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->class</SPAN-> <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> a =&gt; <A HREF="#t%3AXmlContent"->XmlContent</A-> a  <SPAN CLASS="keyword"->where</SPAN-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="decl"-><A HREF="#v%3AparseContents"->parseContents</A-> :: <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXMLParser"->XMLParser</A-> a</TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AtoContents"->toContents</A-> :: a -&gt; [<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AContent"->Content</A-> ()]</TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AxToChar"->xToChar</A-> :: a -&gt; Char</TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AxFromChar"->xFromChar</A-> :: Char -&gt; a</TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->class</SPAN-> <A HREF="#t%3AXmlAttributes"->XmlAttributes</A-> a  <SPAN CLASS="keyword"->where</SPAN-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="decl"-><A HREF="#v%3AfromAttrs"->fromAttrs</A-> :: [<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AAttribute"->Attribute</A->] -&gt; a</TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AtoAttrs"->toAttrs</A-> :: a -&gt; [<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AAttribute"->Attribute</A->]</TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->class</SPAN-> <A HREF="#t%3AXmlAttrType"->XmlAttrType</A-> a  <SPAN CLASS="keyword"->where</SPAN-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="decl"-><A HREF="#v%3AfromAttrToTyp"->fromAttrToTyp</A-> :: String -&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AAttribute"->Attribute</A-> -&gt; Maybe a</TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AtoAttrFrTyp"->toAttrFrTyp</A-> :: String -&gt; a -&gt; Maybe <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AAttribute"->Attribute</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->type</SPAN-> <A HREF="#t%3AXMLParser"->XMLParser</A-> a = Parser (<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AContent"->Content</A-> <A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A->) a</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Acontent"->content</A-> :: String -&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXMLParser"->XMLParser</A-> (<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AContent"->Content</A-> <A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A->)</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AposnElement"->posnElement</A-> :: [String] -&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXMLParser"->XMLParser</A-> (<A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A->, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AElement"->Element</A-> <A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A->)</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Aelement"->element</A-> :: [String] -&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXMLParser"->XMLParser</A-> (<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AElement"->Element</A-> <A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A->)</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Ainterior"->interior</A-> :: <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AElement"->Element</A-> <A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A-> -&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXMLParser"->XMLParser</A-> a -&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXMLParser"->XMLParser</A-> a</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AinElement"->inElement</A-> :: String -&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXMLParser"->XMLParser</A-> a -&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXMLParser"->XMLParser</A-> a</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Atext"->text</A-> :: <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXMLParser"->XMLParser</A-> String</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Aattributes"->attributes</A-> :: <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlAttributes"->XmlAttributes</A-> a =&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AElement"->Element</A-> <A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A-> -&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXMLParser"->XMLParser</A-> a</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AposnElementWith"->posnElementWith</A-> :: (String -&gt; String -&gt; Bool) -&gt; [String] -&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXMLParser"->XMLParser</A-> (<A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A->, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AElement"->Element</A-> <A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A->)</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AelementWith"->elementWith</A-> :: (String -&gt; String -&gt; Bool) -&gt; [String] -&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXMLParser"->XMLParser</A-> (<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AElement"->Element</A-> <A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A->)</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AinElementWith"->inElementWith</A-> :: (String -&gt; String -&gt; Bool) -&gt; String -&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXMLParser"->XMLParser</A-> a -&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXMLParser"->XMLParser</A-> a</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Achoice"->choice</A-> :: <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a =&gt; (a -&gt; b) -&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXMLParser"->XMLParser</A-> b -&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXMLParser"->XMLParser</A-> b</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Adefinite"->definite</A-> :: <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a =&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXMLParser"->XMLParser</A-> a -&gt; String -&gt; String -&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXMLParser"->XMLParser</A-> a</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AmkElem"->mkElem</A-> :: <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a =&gt; a -&gt; [<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AContent"->Content</A-> ()] -&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AContent"->Content</A-> ()</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AmkElemC"->mkElemC</A-> :: String -&gt; [<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AContent"->Content</A-> ()] -&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AContent"->Content</A-> ()</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AmkAttr"->mkAttr</A-> :: String -&gt; String -&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AAttribute"->Attribute</A-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AtoText"->toText</A-> :: String -&gt; [<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AContent"->Content</A-> ()]</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AtoCData"->toCData</A-> :: String -&gt; [<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AContent"->Content</A-> ()]</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AmaybeToAttr"->maybeToAttr</A-> :: (String -&gt; a -&gt; Maybe <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AAttribute"->Attribute</A->) -&gt; String -&gt; Maybe a -&gt; Maybe <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AAttribute"->Attribute</A-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AdefaultToAttr"->defaultToAttr</A-> :: (String -&gt; a -&gt; Maybe <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AAttribute"->Attribute</A->) -&gt; String -&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3ADefaultable"->Defaultable</A-> a -&gt; Maybe <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AAttribute"->Attribute</A-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AdefiniteA"->definiteA</A-> :: (String -&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AAttribute"->Attribute</A-> -&gt; Maybe a) -&gt; String -&gt; String -&gt; [<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AAttribute"->Attribute</A->] -&gt; a</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AdefaultA"->defaultA</A-> :: (String -&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AAttribute"->Attribute</A-> -&gt; Maybe a) -&gt; a -&gt; String -&gt; [<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AAttribute"->Attribute</A->] -&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3ADefaultable"->Defaultable</A-> a</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3ApossibleA"->possibleA</A-> :: (String -&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AAttribute"->Attribute</A-> -&gt; Maybe a) -&gt; String -&gt; [<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AAttribute"->Attribute</A->] -&gt; Maybe a</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AfromAttrToStr"->fromAttrToStr</A-> :: String -&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AAttribute"->Attribute</A-> -&gt; Maybe String</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AtoAttrFrStr"->toAttrFrStr</A-> :: String -&gt; String -&gt; Maybe <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AAttribute"->Attribute</A-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->data</SPAN-> <A HREF="#t%3ADefaultable"->Defaultable</A-> a</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="decl"->= <A HREF="#v%3ADefault"->Default</A-> a</TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ANonDefault"->NonDefault</A-> a</TD-></TR-></TABLE-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Astr2attr"->str2attr</A-> :: String -&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AAttValue"->AttValue</A-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Aattr2str"->attr2str</A-> :: <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AAttValue"->AttValue</A-> -&gt; String</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Aattval"->attval</A-> :: Read a =&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AElement"->Element</A-> i -&gt; a</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"->module <A HREF="Text-XML-HaXml-TypeMapping.html"->Text.XML.HaXml.TypeMapping</A-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->data</SPAN-> <A HREF="#t%3AList1"->List1</A-> a = <A HREF="#v%3ANonEmpty"->NonEmpty</A-> [a]</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->data</SPAN-> <A HREF="#t%3AANYContent"->ANYContent</A-> </TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="decl"->= <SPAN CLASS="keyword"->forall</SPAN-> a . (XmlContent a, Show a) =&gt; <A HREF="#v%3AANYContent"->ANYContent</A-> a</TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3AUnConverted"->UnConverted</A-> [<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AContent"->Content</A-> <A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A->]</TD-></TR-></TABLE-></TD-></TR-></TABLE-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section1"-><A NAME="1"->Re-export the relevant set of generic XML document type definitions-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3ADocument"-></A-><B->Document</B-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/XmlContent/Parser.html#Document"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="ndoc"->The symbol table stored in a document holds all its general entity-   reference definitions.-</TD-></TR-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3ADocument"-></A-><B->Document</B-> <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AProlog"->Prolog</A-> (<A HREF="Text-XML-HaXml-Types.html#t%3ASymTab"->SymTab</A-> <A HREF="Text-XML-HaXml-Types.html#t%3AEntityDef"->EntityDef</A->) (<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AElement"->Element</A-> i) [<A HREF="Text-XML-HaXml-Types.html#t%3AMisc"->Misc</A->]</TD-><TD CLASS="rdoc"-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:Document')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:Document" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"->Functor <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3ADocument"->Document</A-></TD-></TR-><TR-><TD CLASS="decl"->??? i =&gt; Eq (<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3ADocument"->Document</A-> i)</TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3AElement"-></A-><B->Element</B-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/XmlContent/Parser.html#Element"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3AElem"-></A-><B->Elem</B-> <A HREF="Text-XML-HaXml-Types.html#t%3AName"->Name</A-> [<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AAttribute"->Attribute</A->] [<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AContent"->Content</A-> i]</TD-><TD CLASS="rdoc"-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:Element')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:Element" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"->Functor <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AElement"->Element</A-></TD-></TR-><TR-><TD CLASS="decl"->??? i =&gt; Eq (<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AElement"->Element</A-> i)</TD-></TR-><TR-><TD CLASS="decl"-><A HREF="Text-XML-HaXml-Verbatim.html#t%3AVerbatim"->Verbatim</A-> (<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AElement"->Element</A-> i)</TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3AElemTag"-></A-><B->ElemTag</B-> </TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/XmlContent/Parser.html#ElemTag"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3AElemTag"-></A-><B->ElemTag</B-> <A HREF="Text-XML-HaXml-Types.html#t%3AName"->Name</A-> [<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AAttribute"->Attribute</A->]</TD-><TD CLASS="rdoc"-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:ElemTag')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:ElemTag" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"->Eq <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AElemTag"->ElemTag</A-></TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3AContent"-></A-><B->Content</B-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/XmlContent/Parser.html#Content"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3ACElem"-></A-><B->CElem</B-> (<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AElement"->Element</A-> i) i</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ACString"-></A-><B->CString</B-> Bool <A HREF="Text-XML-HaXml-Types.html#t%3ACharData"->CharData</A-> i</TD-><TD CLASS="rdoc"->bool is whether whitespace is significant-</TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ACRef"-></A-><B->CRef</B-> <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AReference"->Reference</A-> i</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ACMisc"-></A-><B->CMisc</B-> <A HREF="Text-XML-HaXml-Types.html#t%3AMisc"->Misc</A-> i</TD-><TD CLASS="rdoc"-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:Content')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:Content" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"->Functor <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AContent"->Content</A-></TD-></TR-><TR-><TD CLASS="decl"->(Eq i, ??? i) =&gt; Eq (<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AContent"->Content</A-> i)</TD-></TR-><TR-><TD CLASS="decl"-><A HREF="Text-XML-HaXml-Verbatim.html#t%3AVerbatim"->Verbatim</A-> (<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AContent"->Content</A-> i)</TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->type</SPAN-> <A NAME="t%3AAttribute"-></A-><B->Attribute</B-> = (<A HREF="Text-XML-HaXml-Types.html#t%3AName"->Name</A->, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AAttValue"->AttValue</A->)</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/XmlContent/Parser.html#Attribute"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3AAttValue"-></A-><B->AttValue</B-> </TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/XmlContent/Parser.html#AttValue"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3AAttValue"-></A-><B->AttValue</B-> [Either String <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AReference"->Reference</A->]</TD-><TD CLASS="rdoc"-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:AttValue')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:AttValue" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"->Eq <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AAttValue"->AttValue</A-></TD-></TR-><TR-><TD CLASS="decl"->Show <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AAttValue"->AttValue</A-></TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3AProlog"-></A-><B->Prolog</B-> </TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/XmlContent/Parser.html#Prolog"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3AProlog"-></A-><B->Prolog</B-> (Maybe <A HREF="Text-XML-HaXml-Types.html#t%3AXMLDecl"->XMLDecl</A->) [<A HREF="Text-XML-HaXml-Types.html#t%3AMisc"->Misc</A->] (Maybe <A HREF="Text-XML-HaXml-Types.html#t%3ADocTypeDecl"->DocTypeDecl</A->) [<A HREF="Text-XML-HaXml-Types.html#t%3AMisc"->Misc</A->]</TD-><TD CLASS="rdoc"-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:Prolog')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:Prolog" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"->Eq <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AProlog"->Prolog</A-></TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3AReference"-></A-><B->Reference</B-> </TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/XmlContent/Parser.html#Reference"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3ARefEntity"-></A-><B->RefEntity</B-> <A HREF="Text-XML-HaXml-Types.html#t%3AEntityRef"->EntityRef</A-></TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ARefChar"-></A-><B->RefChar</B-> <A HREF="Text-XML-HaXml-Types.html#t%3ACharRef"->CharRef</A-></TD-><TD CLASS="rdoc"-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:Reference')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:Reference" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"->Eq <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AReference"->Reference</A-></TD-></TR-><TR-><TD CLASS="decl"->Show <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AReference"->Reference</A-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="Text-XML-HaXml-Verbatim.html#t%3AVerbatim"->Verbatim</A-> <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AReference"->Reference</A-></TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section1"-><A NAME="2"->The enabling classes, that define parsing/unparsing between Haskell-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->class</SPAN-> <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> a =&gt; <A NAME="t%3AXmlContent"-></A-><B->XmlContent</B-> a  <SPAN CLASS="keyword"->where</SPAN-></TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/XmlContent/Parser.html#XmlContent"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="ndoc"->The <TT->XmlContent</TT-> class promises that an XML Content element can be-   converted to and from a Haskell value.-</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="section4"->Methods</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AparseContents"-></A-><B->parseContents</B-> :: <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXMLParser"->XMLParser</A-> a</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/XmlContent/Parser.html#parseContents"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Convert from XML to Haskell-</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AtoContents"-></A-><B->toContents</B-> :: a -&gt; [<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AContent"->Content</A-> ()]</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/XmlContent/Parser.html#toContents"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Convert from Haskell to XML-</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AxToChar"-></A-><B->xToChar</B-> :: a -&gt; Char</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/XmlContent/Parser.html#xToChar"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Dummy functions (for most types): used <EM->only</EM-> in the Char instance-   for coercing lists of Char into String.-</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AxFromChar"-></A-><B->xFromChar</B-> :: Char -&gt; a</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/XmlContent/Parser.html#xFromChar"->Source</A-></TD-></TR-></TABLE-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:XmlContent')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:XmlContent" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"-><A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AANYContent"->ANYContent</A-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> Bool</TD-></TR-><TR-><TD CLASS="decl"-><A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> Char</TD-></TR-><TR-><TD CLASS="decl"-><A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> Char</TD-></TR-><TR-><TD CLASS="decl"-><A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> Double</TD-></TR-><TR-><TD CLASS="decl"-><A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> Float</TD-></TR-><TR-><TD CLASS="decl"-><A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> Int</TD-></TR-><TR-><TD CLASS="decl"-><A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> Integer</TD-></TR-><TR-><TD CLASS="decl"-><A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> ()</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> b) =&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> (a, b)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> b, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> c) =&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> (a, b, c)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> b, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> c, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> d) =&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> (a, b, c, d)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> b, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> c, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> d, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> e) =&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> (a, b, c, d, e)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> b, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> c, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> d, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> e, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> f) =&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> (a, b, c, d, e, f)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> b, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> c, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> d, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> e, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> f, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> g) =&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> (a, b, c, d, e, f, g)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> b, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> c, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> d, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> e, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> f, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> g, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> h) =&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> (a, b, c, d, e, f, g, h)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> b, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> c, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> d, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> e, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> f, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> g, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> h, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> i) =&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> (a, b, c, d, e, f, g, h, i)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> b, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> c, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> d, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> e, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> f, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> g, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> h, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> i, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> j) =&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> (a, b, c, d, e, f, g, h, i, j)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> b, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> c, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> d, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> e, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> f, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> g, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> h, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> i, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> j, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> k) =&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> (a, b, c, d, e, f, g, h, i, j, k)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> b, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> c, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> d, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> e, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> f, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> g, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> h, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> i, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> j, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> k, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> l) =&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> (a, b, c, d, e, f, g, h, i, j, k, l)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> b, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> c, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> d, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> e, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> f, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> g, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> h, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> i, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> j, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> k, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> l, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> m) =&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> (a, b, c, d, e, f, g, h, i, j, k, l, m)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> b, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> c, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> d, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> e, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> f, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> g, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> h, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> i, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> j, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> k, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> l, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> m, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> n) =&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> (a, b, c, d, e, f, g, h, i, j, k, l, m, n)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> b, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> c, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> d, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> e, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> f, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> g, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> h, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> i, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> j, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> k, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> l, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> m, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> n, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> o) =&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o)</TD-></TR-><TR-><TD CLASS="decl"-><A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a =&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> (<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AList1"->List1</A-> a)</TD-></TR-><TR-><TD CLASS="decl"-><A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a =&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> (Maybe a)</TD-></TR-><TR-><TD CLASS="decl"-><A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a =&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> (Maybe a)</TD-></TR-><TR-><TD CLASS="decl"-><A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a =&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> [a]</TD-></TR-><TR-><TD CLASS="decl"-><A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a =&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> [a]</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> b) =&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> (Either a b)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> b) =&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf2"->OneOf2</A-> a b)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> b, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> c) =&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf3"->OneOf3</A-> a b c)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> b, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> c, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> d) =&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf4"->OneOf4</A-> a b c d)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> b, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> c, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> d, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> e) =&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf5"->OneOf5</A-> a b c d e)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> b, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> c, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> d, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> e, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> f) =&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf6"->OneOf6</A-> a b c d e f)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> b, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> c, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> d, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> e, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> f, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> g) =&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf7"->OneOf7</A-> a b c d e f g)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> b, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> c, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> d, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> e, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> f, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> g, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> h) =&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf8"->OneOf8</A-> a b c d e f g h)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> b, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> c, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> d, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> e, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> f, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> g, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> h, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> i) =&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf9"->OneOf9</A-> a b c d e f g h i)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> b, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> c, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> d, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> e, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> f, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> g, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> h, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> i, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> j) =&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf10"->OneOf10</A-> a b c d e f g h i j)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> b, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> c, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> d, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> e, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> f, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> g, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> h, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> i, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> j, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> k) =&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf11"->OneOf11</A-> a b c d e f g h i j k)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> b, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> c, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> d, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> e, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> f, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> g, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> h, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> i, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> j, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> k, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> l) =&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf12"->OneOf12</A-> a b c d e f g h i j k l)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> b, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> c, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> d, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> e, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> f, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> g, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> h, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> i, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> j, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> k, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> l, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> m) =&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf13"->OneOf13</A-> a b c d e f g h i j k l m)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> b, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> c, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> d, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> e, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> f, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> g, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> h, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> i, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> j, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> k, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> l, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> m, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> n) =&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf14"->OneOf14</A-> a b c d e f g h i j k l m n)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> b, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> c, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> d, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> e, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> f, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> g, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> h, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> i, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> j, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> k, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> l, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> m, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> n, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> o) =&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf15"->OneOf15</A-> a b c d e f g h i j k l m n o)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> b, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> c, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> d, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> e, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> f, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> g, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> h, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> i, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> j, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> k, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> l, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> m, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> n, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> o, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> p) =&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf16"->OneOf16</A-> a b c d e f g h i j k l m n o p)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> b, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> c, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> d, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> e, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> f, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> g, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> h, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> i, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> j, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> k, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> l, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> m, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> n, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> o, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> p, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> q) =&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf17"->OneOf17</A-> a b c d e f g h i j k l m n o p q)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> b, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> c, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> d, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> e, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> f, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> g, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> h, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> i, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> j, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> k, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> l, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> m, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> n, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> o, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> p, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> q, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> r) =&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf18"->OneOf18</A-> a b c d e f g h i j k l m n o p q r)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> b, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> c, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> d, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> e, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> f, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> g, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> h, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> i, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> j, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> k, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> l, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> m, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> n, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> o, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> p, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> q, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> r, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> s) =&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf19"->OneOf19</A-> a b c d e f g h i j k l m n o p q r s)</TD-></TR-><TR-><TD CLASS="decl"->(<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> b, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> c, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> d, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> e, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> f, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> g, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> h, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> i, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> j, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> k, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> l, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> m, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> n, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> o, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> p, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> q, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> r, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> s, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> t) =&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> (<A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf20"->OneOf20</A-> a b c d e f g h i j k l m n o p q r s t)</TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->class</SPAN-> <A NAME="t%3AXmlAttributes"-></A-><B->XmlAttributes</B-> a  <SPAN CLASS="keyword"->where</SPAN-></TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/XmlContent/Parser.html#XmlAttributes"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="ndoc"->The <TT->XmlAttributes</TT-> class promises that a list of XML tag attributes-   can be converted to and from a Haskell value.-</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="section4"->Methods</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AfromAttrs"-></A-><B->fromAttrs</B-> :: [<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AAttribute"->Attribute</A->] -&gt; a</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/XmlContent/Parser.html#fromAttrs"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AtoAttrs"-></A-><B->toAttrs</B-> :: a -&gt; [<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AAttribute"->Attribute</A->]</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/XmlContent/Parser.html#toAttrs"->Source</A-></TD-></TR-></TABLE-></TD-></TR-></TABLE-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->class</SPAN-> <A NAME="t%3AXmlAttrType"-></A-><B->XmlAttrType</B-> a  <SPAN CLASS="keyword"->where</SPAN-></TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/XmlContent/Parser.html#XmlAttrType"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="ndoc"->The <TT->XmlAttrType</TT-> class promises that an attribute taking an XML-   enumerated type can be converted to and from a Haskell value.-</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="section4"->Methods</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AfromAttrToTyp"-></A-><B->fromAttrToTyp</B-> :: String -&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AAttribute"->Attribute</A-> -&gt; Maybe a</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/XmlContent/Parser.html#fromAttrToTyp"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AtoAttrFrTyp"-></A-><B->toAttrFrTyp</B-> :: String -&gt; a -&gt; Maybe <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AAttribute"->Attribute</A-></TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/XmlContent/Parser.html#toAttrFrTyp"->Source</A-></TD-></TR-></TABLE-></TD-></TR-></TABLE-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section2"-><A NAME="3"->Auxiliaries for writing parsers in the XmlContent class-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->type</SPAN-> <A NAME="t%3AXMLParser"-></A-><B->XMLParser</B-> a = Parser (<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AContent"->Content</A-> <A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A->) a</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/XmlContent/Parser.html#XMLParser"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->We need a parsing monad for reading generic XML Content into specific-   datatypes.  This is a specialisation of the Text.ParserCombinators.Poly-   ones, where the input token type is fixed as XML Content.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Acontent"-></A-><B->content</B-> :: String -&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXMLParser"->XMLParser</A-> (<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AContent"->Content</A-> <A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A->)</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/XmlContent/Parser.html#content"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->The most primitive combinator for XMLParser - get one content item.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AposnElement"-></A-><B->posnElement</B-> :: [String] -&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXMLParser"->XMLParser</A-> (<A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A->, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AElement"->Element</A-> <A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A->)</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/XmlContent/Parser.html#posnElement"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->A specialisation of <TT->posnElementWith (==)</TT->.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Aelement"-></A-><B->element</B-> :: [String] -&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXMLParser"->XMLParser</A-> (<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AElement"->Element</A-> <A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A->)</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/XmlContent/Parser.html#element"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Get the next content element, checking that it has one of the required-   tags.  (Skips over comments and whitespace, rejects text and refs.)-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Ainterior"-></A-><B->interior</B-> :: <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AElement"->Element</A-> <A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A-> -&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXMLParser"->XMLParser</A-> a -&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXMLParser"->XMLParser</A-> a</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/XmlContent/Parser.html#interior"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Run an XMLParser on the contents of the given element (i.e. not on the-   current monadic content sequence), checking that the contents are-   exhausted, before returning the calculated value within the current-   parser context.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AinElement"-></A-><B->inElement</B-> :: String -&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXMLParser"->XMLParser</A-> a -&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXMLParser"->XMLParser</A-> a</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/XmlContent/Parser.html#inElement"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->A combination of element + interior.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Atext"-></A-><B->text</B-> :: <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXMLParser"->XMLParser</A-> String</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/XmlContent/Parser.html#text"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"-><TT-><A HREF="Text-XML-HaXml-XmlContent-Parser.html#v%3Atext"->text</A-></TT-> is a counterpart to <TT-><A HREF="Text-XML-HaXml-XmlContent-Parser.html#v%3Aelement"->element</A-></TT->, parsing text content if it-   exists.  Adjacent text and references are coalesced.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Aattributes"-></A-><B->attributes</B-> :: <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlAttributes"->XmlAttributes</A-> a =&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AElement"->Element</A-> <A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A-> -&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXMLParser"->XMLParser</A-> a</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/XmlContent/Parser.html#attributes"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Do some parsing of the attributes of the given element-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AposnElementWith"-></A-><B->posnElementWith</B-> :: (String -&gt; String -&gt; Bool) -&gt; [String] -&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXMLParser"->XMLParser</A-> (<A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A->, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AElement"->Element</A-> <A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A->)</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/XmlContent/Parser.html#posnElementWith"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Get the next content element, checking that it has one of the required-   tags, using the given matching function.-   (Skips over comments and whitespace, rejects text and refs.-    Also returns position of element.)-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AelementWith"-></A-><B->elementWith</B-> :: (String -&gt; String -&gt; Bool) -&gt; [String] -&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXMLParser"->XMLParser</A-> (<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AElement"->Element</A-> <A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A->)</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/XmlContent/Parser.html#elementWith"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Like element, only permits a more flexible match against the tagname.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AinElementWith"-></A-><B->inElementWith</B-> :: (String -&gt; String -&gt; Bool) -&gt; String -&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXMLParser"->XMLParser</A-> a -&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXMLParser"->XMLParser</A-> a</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/XmlContent/Parser.html#inElementWith"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->A combination of elementWith + interior.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Achoice"-></A-><B->choice</B-> :: <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a =&gt; (a -&gt; b) -&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXMLParser"->XMLParser</A-> b -&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXMLParser"->XMLParser</A-> b</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/XmlContent/Parser.html#choice"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->'choice f p' means if parseContents succeeds, apply f to the result,-   otherwise use the continuation parser.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Adefinite"-></A-><B->definite</B-> :: <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a =&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXMLParser"->XMLParser</A-> a -&gt; String -&gt; String -&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXMLParser"->XMLParser</A-> a</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/XmlContent/Parser.html#definite"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->not sure this is needed now.   'definite p' previously ensured that-   an element was definitely present.  Now I think the monad might take-   care of that for us.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section2"-><A NAME="4"->Auxiliaries for generating in the XmlContent class-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AmkElem"-></A-><B->mkElem</B-> :: <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a =&gt; a -&gt; [<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AContent"->Content</A-> ()] -&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AContent"->Content</A-> ()</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/XmlContent/Parser.html#mkElem"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Generate an element with no attributes, named for its HType.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AmkElemC"-></A-><B->mkElemC</B-> :: String -&gt; [<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AContent"->Content</A-> ()] -&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AContent"->Content</A-> ()</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/XmlContent/Parser.html#mkElemC"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Generate an element with no attributes, named directly.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AmkAttr"-></A-><B->mkAttr</B-> :: String -&gt; String -&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AAttribute"->Attribute</A-></TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/XmlContent/Parser.html#mkAttr"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Generate a single attribute.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AtoText"-></A-><B->toText</B-> :: String -&gt; [<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AContent"->Content</A-> ()]</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/XmlContent/Parser.html#toText"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Turn a simple string into XML text.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AtoCData"-></A-><B->toCData</B-> :: String -&gt; [<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AContent"->Content</A-> ()]</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/XmlContent/Parser.html#toCData"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Turn a string into an XML CDATA section.-   (i.e. special characters like &amp; are preserved without interpretation.)-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section2"-><A NAME="5"->Auxiliaries for the attribute-related classes-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AmaybeToAttr"-></A-><B->maybeToAttr</B-> :: (String -&gt; a -&gt; Maybe <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AAttribute"->Attribute</A->) -&gt; String -&gt; Maybe a -&gt; Maybe <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AAttribute"->Attribute</A-></TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/XmlContent/Parser.html#maybeToAttr"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AdefaultToAttr"-></A-><B->defaultToAttr</B-> :: (String -&gt; a -&gt; Maybe <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AAttribute"->Attribute</A->) -&gt; String -&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3ADefaultable"->Defaultable</A-> a -&gt; Maybe <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AAttribute"->Attribute</A-></TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/XmlContent/Parser.html#defaultToAttr"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AdefiniteA"-></A-><B->definiteA</B-> :: (String -&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AAttribute"->Attribute</A-> -&gt; Maybe a) -&gt; String -&gt; String -&gt; [<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AAttribute"->Attribute</A->] -&gt; a</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/XmlContent/Parser.html#definiteA"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AdefaultA"-></A-><B->defaultA</B-> :: (String -&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AAttribute"->Attribute</A-> -&gt; Maybe a) -&gt; a -&gt; String -&gt; [<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AAttribute"->Attribute</A->] -&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3ADefaultable"->Defaultable</A-> a</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/XmlContent/Parser.html#defaultA"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3ApossibleA"-></A-><B->possibleA</B-> :: (String -&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AAttribute"->Attribute</A-> -&gt; Maybe a) -&gt; String -&gt; [<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AAttribute"->Attribute</A->] -&gt; Maybe a</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/XmlContent/Parser.html#possibleA"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AfromAttrToStr"-></A-><B->fromAttrToStr</B-> :: String -&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AAttribute"->Attribute</A-> -&gt; Maybe String</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/XmlContent/Parser.html#fromAttrToStr"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AtoAttrFrStr"-></A-><B->toAttrFrStr</B-> :: String -&gt; String -&gt; Maybe <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AAttribute"->Attribute</A-></TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/XmlContent/Parser.html#toAttrFrStr"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3ADefaultable"-></A-><B->Defaultable</B-> a</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/XmlContent/Parser.html#Defaultable"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="ndoc"->If an attribute is defaultable, then it either takes the default-   value (which is omitted from the output), or a non-default value-   (which obviously must be printed).-</TD-></TR-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3ADefault"-></A-><B->Default</B-> a</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ANonDefault"-></A-><B->NonDefault</B-> a</TD-><TD CLASS="rdoc"-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:Defaultable')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:Defaultable" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"->Eq a =&gt; Eq (<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3ADefaultable"->Defaultable</A-> a)</TD-></TR-><TR-><TD CLASS="decl"->Show a =&gt; Show (<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3ADefaultable"->Defaultable</A-> a)</TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Astr2attr"-></A-><B->str2attr</B-> :: String -&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AAttValue"->AttValue</A-></TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/XmlContent/Parser.html#str2attr"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Aattr2str"-></A-><B->attr2str</B-> :: <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AAttValue"->AttValue</A-> -&gt; String</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/XmlContent/Parser.html#attr2str"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Aattval"-></A-><B->attval</B-> :: Read a =&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AElement"->Element</A-> i -&gt; a</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/XmlContent/Parser.html#attval"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Read a single attribute called <A HREF="value.html"->value</A->.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section1"-><A NAME="6"->Explicit representation of Haskell datatype information-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="decl"->module <A HREF="Text-XML-HaXml-TypeMapping.html"->Text.XML.HaXml.TypeMapping</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section1"-><A NAME="7"->Types useful for some content models-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3AList1"-></A-><B->List1</B-> a</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/XmlContent/Parser.html#List1"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="ndoc"->The List1 type represents lists with at least one element.-   It is required for DTD content models that use + as a modifier.-</TD-></TR-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3ANonEmpty"-></A-><B->NonEmpty</B-> [a]</TD-><TD CLASS="rdoc"-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:List1')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:List1" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"->??? a =&gt; Eq (<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AList1"->List1</A-> a)</TD-></TR-><TR-><TD CLASS="decl"-><A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> a =&gt; <A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> (<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AList1"->List1</A-> a)</TD-></TR-><TR-><TD CLASS="decl"->??? a =&gt; Show (<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AList1"->List1</A-> a)</TD-></TR-><TR-><TD CLASS="decl"-><A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a =&gt; <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> (<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AList1"->List1</A-> a)</TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3AANYContent"-></A-><B->ANYContent</B-> </TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/XmlContent/Parser.html#ANYContent"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="ndoc"-><P->A type corresponding to XML's ANY contentspec.-   It is either a list of unconverted xml <TT-><A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AContent"->Content</A-></TT->-   or some <TT-><A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-></TT->-able value.-</P-><P->Parsing functions (e.g. <TT-><A HREF="Text-XML-HaXml-XmlContent-Parser.html#v%3AparseContents"->parseContents</A-></TT->) will always produce <TT-><A HREF="Text-XML-HaXml-XmlContent-Parser.html#v%3AUnConverted"->UnConverted</A-></TT->.- Note: The Show instance for <TT-><A HREF="Text-XML-HaXml-XmlContent-Parser.html#v%3AUnConverted"->UnConverted</A-></TT-> uses <TT-><A HREF="Text-XML-HaXml-Verbatim.html#v%3Averbatim"->verbatim</A-></TT->.-</P-></TD-></TR-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><SPAN CLASS="keyword"->forall</SPAN-> a . (XmlContent a, Show a) =&gt; <A NAME="v%3AANYContent"-></A-><B->ANYContent</B-> a</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3AUnConverted"-></A-><B->UnConverted</B-> [<A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AContent"->Content</A-> <A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A->]</TD-><TD CLASS="rdoc"-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:ANYContent')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:ANYContent" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"->Eq <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AANYContent"->ANYContent</A-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->HTypeable</A-> <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AANYContent"->ANYContent</A-></TD-></TR-><TR-><TD CLASS="decl"->Show <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AANYContent"->ANYContent</A-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AANYContent"->ANYContent</A-></TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></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->
− docs/HaXml/Text-XML-HaXml-XmlContent.html
@@ -1,693 +0,0 @@-<!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.HaXml.XmlContent</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"->HaXml</TD-><TD CLASS="topbut"-><A HREF="src/Text/XML/HaXml/XmlContent.html"->Source code</A-></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.HaXml.XmlContent</FONT-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="section4"-><B->Contents</B-></TD-></TR-><TR-><TD-><DL-><DT-><A HREF="#1"->Re-export everything from Text.XML.HaXml.XmlContent.Parser.-</A-></DT-><DT-><A HREF="#2"->Contains instances of the XmlContent classes,-</A-></DT-><DT-><A HREF="#3"->Whole-document conversion functions-</A-></DT-></DL-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section1"->Description</TD-></TR-><TR-><TD CLASS="doc"-><P->The class <TT-><A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-></TT-> is a kind of replacement for Read and Show:-   it provides conversions between a generic XML tree representation-   and your own more specialised typeful Haskell data trees.-</P-><P->If you are starting with an XML DTD, use HaXml's tool DtdToHaskell-   to generate both the Haskell types and the corresponding instances.-</P-><P->If you are starting with a set of Haskell datatypes, use DrIFT to-   derive instances of this class for you:-       http://repetae.net/john/computer/haskell/DrIFT-   and _do_not_ use the current module, but rather-   Text.XML.HaXml.XmlContent.Haskell, for the correct matching-   instances for standard Haskell datatypes.-</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"->module <A HREF="Text-XML-HaXml-XmlContent-Parser.html"->Text.XML.HaXml.XmlContent.Parser</A-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"->module <A HREF="Text-XML-HaXml-TypeMapping.html"->Text.XML.HaXml.TypeMapping</A-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AtoXml"->toXml</A-> :: <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a =&gt; Bool -&gt; a -&gt; <A HREF="Text-XML-HaXml-Types.html#t%3ADocument"->Document</A-> ()</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AfromXml"->fromXml</A-> :: <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a =&gt; <A HREF="Text-XML-HaXml-Types.html#t%3ADocument"->Document</A-> <A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A-> -&gt; Either String a</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AreadXml"->readXml</A-> :: <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a =&gt; String -&gt; Either String a</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AshowXml"->showXml</A-> :: <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a =&gt; Bool -&gt; a -&gt; String</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AfpsShowXml"->fpsShowXml</A-> :: <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a =&gt; Bool -&gt; a -&gt; ByteString</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AfReadXml"->fReadXml</A-> :: <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a =&gt; FilePath -&gt; IO a</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AfWriteXml"->fWriteXml</A-> :: <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a =&gt; FilePath -&gt; a -&gt; IO ()</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AfpsWriteXml"->fpsWriteXml</A-> :: <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a =&gt; FilePath -&gt; a -&gt; IO ()</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AhGetXml"->hGetXml</A-> :: <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a =&gt; Handle -&gt; IO a</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AhPutXml"->hPutXml</A-> :: <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a =&gt; Handle -&gt; Bool -&gt; a -&gt; IO ()</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AfpsHPutXml"->fpsHPutXml</A-> :: <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a =&gt; Handle -&gt; Bool -&gt; a -&gt; IO ()</TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section1"-><A NAME="1"->Re-export everything from Text.XML.HaXml.XmlContent.Parser.-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="decl"->module <A HREF="Text-XML-HaXml-XmlContent-Parser.html"->Text.XML.HaXml.XmlContent.Parser</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="decl"->module <A HREF="Text-XML-HaXml-TypeMapping.html"->Text.XML.HaXml.TypeMapping</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section1"-><A NAME="2"->Contains instances of the XmlContent classes,-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section1"-><A NAME="3"->Whole-document conversion functions-</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AtoXml"-></A-><B->toXml</B-> :: <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a =&gt; Bool -&gt; a -&gt; <A HREF="Text-XML-HaXml-Types.html#t%3ADocument"->Document</A-> ()</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/XmlContent.html#toXml"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Convert a fully-typed XML document to a string (with or without DTD).-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AfromXml"-></A-><B->fromXml</B-> :: <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a =&gt; <A HREF="Text-XML-HaXml-Types.html#t%3ADocument"->Document</A-> <A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Posn</A-> -&gt; Either String a</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/XmlContent.html#fromXml"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Read a Haskell value from an XML document, ignoring the DTD and-   using the Haskell result type to determine how to parse it.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AreadXml"-></A-><B->readXml</B-> :: <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a =&gt; String -&gt; Either String a</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/XmlContent.html#readXml"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Read a fully-typed XML document from a string.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AshowXml"-></A-><B->showXml</B-> :: <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a =&gt; Bool -&gt; a -&gt; String</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/XmlContent.html#showXml"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Convert a fully-typed XML document to a string (without DTD).-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AfpsShowXml"-></A-><B->fpsShowXml</B-> :: <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a =&gt; Bool -&gt; a -&gt; ByteString</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/XmlContent.html#fpsShowXml"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Convert a fully-typed XML document to a ByteString (without DTD).-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AfReadXml"-></A-><B->fReadXml</B-> :: <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a =&gt; FilePath -&gt; IO a</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/XmlContent.html#fReadXml"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Read an XML document from a file and convert it to a fully-typed-   Haskell value.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AfWriteXml"-></A-><B->fWriteXml</B-> :: <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a =&gt; FilePath -&gt; a -&gt; IO ()</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/XmlContent.html#fWriteXml"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Write a fully-typed Haskell value to the given file as an XML-   document.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AfpsWriteXml"-></A-><B->fpsWriteXml</B-> :: <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a =&gt; FilePath -&gt; a -&gt; IO ()</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/XmlContent.html#fpsWriteXml"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Write any Haskell value to the given file as an XML document,-   using the FastPackedString interface (output will not be prettified).-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AhGetXml"-></A-><B->hGetXml</B-> :: <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a =&gt; Handle -&gt; IO a</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/XmlContent.html#hGetXml"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Read a fully-typed XML document from a file handle.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AhPutXml"-></A-><B->hPutXml</B-> :: <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a =&gt; Handle -&gt; Bool -&gt; a -&gt; IO ()</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/XmlContent.html#hPutXml"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Write a fully-typed XML document to a file handle.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AfpsHPutXml"-></A-><B->fpsHPutXml</B-> :: <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->XmlContent</A-> a =&gt; Handle -&gt; Bool -&gt; a -&gt; IO ()</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/XmlContent.html#fpsHPutXml"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->Write a fully-typed XML document to a file handle, using the-   FastPackedString interface (output will not be prettified).-</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->
− docs/HaXml/Text-XML-HaXml-Xtract-Combinators.html
@@ -1,1237 +0,0 @@-<!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.HaXml.Xtract.Combinators</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"->HaXml</TD-><TD CLASS="topbut"-><A HREF="src/Text/XML/HaXml/Xtract/Combinators.html"->Source code</A-></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.HaXml.Xtract.Combinators</FONT-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section1"->Description</TD-></TR-><TR-><TD CLASS="doc"-><P->This is a new set of XML combinators for Xtract, not standard,-   but based on the standard set in <A HREF="Text-Xml-Haxml-Combinators.html"->Text.Xml.Haxml.Combinators</A->.-   The main difference is that the Content Filter type becomes a-   Double Filter.  A Double Filter always takes the whole document-   as an extra argument, so you can start to traverse it again from-   the root, when at any inner location within the document tree.-</P-><P->The new combinator definitions are derived from the old ones.-   The same names have the equivalent meaning - use module qualification-   on imports to distinguish between CFilter and DFilter variations.-</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"-><SPAN CLASS="keyword"->type</SPAN-> <A HREF="#t%3ADFilter"->DFilter</A-> i = <A HREF="Text-XML-HaXml-Types.html#t%3AContent"->Content</A-> i -&gt; <A HREF="Text-XML-HaXml-Types.html#t%3AContent"->Content</A-> i -&gt; [<A HREF="Text-XML-HaXml-Types.html#t%3AContent"->Content</A-> i]</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Alocal"->local</A-> :: <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Xtract-Combinators.html#t%3ADFilter"->DFilter</A-> i</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Aglobal"->global</A-> :: <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Xtract-Combinators.html#t%3ADFilter"->DFilter</A-> i</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Adfilter"->dfilter</A-> :: <A HREF="Text-XML-HaXml-Xtract-Combinators.html#t%3ADFilter"->DFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Acfilter"->cfilter</A-> :: <A HREF="Text-XML-HaXml-Xtract-Combinators.html#t%3ADFilter"->DFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AliftLocal"->liftLocal</A-> :: (<A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i) -&gt; <A HREF="Text-XML-HaXml-Xtract-Combinators.html#t%3ADFilter"->DFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Xtract-Combinators.html#t%3ADFilter"->DFilter</A-> i</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AliftGlobal"->liftGlobal</A-> :: (<A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i) -&gt; <A HREF="Text-XML-HaXml-Xtract-Combinators.html#t%3ADFilter"->DFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Xtract-Combinators.html#t%3ADFilter"->DFilter</A-> i</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Ao"->o</A-> :: <A HREF="Text-XML-HaXml-Xtract-Combinators.html#t%3ADFilter"->DFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Xtract-Combinators.html#t%3ADFilter"->DFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Xtract-Combinators.html#t%3ADFilter"->DFilter</A-> i</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3A%7C%3E%7C"->(|&gt;|)</A-> :: (a -&gt; b -&gt; [c]) -&gt; (a -&gt; b -&gt; [c]) -&gt; a -&gt; b -&gt; [c]</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Aunion"->union</A-> :: (a -&gt; b -&gt; [c]) -&gt; (a -&gt; b -&gt; [c]) -&gt; a -&gt; b -&gt; [c]</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Awith"->with</A-> :: <A HREF="Text-XML-HaXml-Xtract-Combinators.html#t%3ADFilter"->DFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Xtract-Combinators.html#t%3ADFilter"->DFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Xtract-Combinators.html#t%3ADFilter"->DFilter</A-> i</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Awithout"->without</A-> :: <A HREF="Text-XML-HaXml-Xtract-Combinators.html#t%3ADFilter"->DFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Xtract-Combinators.html#t%3ADFilter"->DFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Xtract-Combinators.html#t%3ADFilter"->DFilter</A-> i</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Akeep"->keep</A-> :: <A HREF="Text-XML-HaXml-Xtract-Combinators.html#t%3ADFilter"->DFilter</A-> i</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Anone"->none</A-> :: <A HREF="Text-XML-HaXml-Xtract-Combinators.html#t%3ADFilter"->DFilter</A-> i</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Achildren"->children</A-> :: <A HREF="Text-XML-HaXml-Xtract-Combinators.html#t%3ADFilter"->DFilter</A-> i</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Aelm"->elm</A-> :: <A HREF="Text-XML-HaXml-Xtract-Combinators.html#t%3ADFilter"->DFilter</A-> i</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Atxt"->txt</A-> :: <A HREF="Text-XML-HaXml-Xtract-Combinators.html#t%3ADFilter"->DFilter</A-> i</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Aapplypred"->applypred</A-> :: <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Xtract-Combinators.html#t%3ADFilter"->DFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Aiffind"->iffind</A-> :: String -&gt; (String -&gt; <A HREF="Text-XML-HaXml-Xtract-Combinators.html#t%3ADFilter"->DFilter</A-> i) -&gt; <A HREF="Text-XML-HaXml-Xtract-Combinators.html#t%3ADFilter"->DFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Xtract-Combinators.html#t%3ADFilter"->DFilter</A-> i</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3AifTxt"->ifTxt</A-> :: (String -&gt; <A HREF="Text-XML-HaXml-Xtract-Combinators.html#t%3ADFilter"->DFilter</A-> i) -&gt; <A HREF="Text-XML-HaXml-Xtract-Combinators.html#t%3ADFilter"->DFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Xtract-Combinators.html#t%3ADFilter"->DFilter</A-> i</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Acat"->cat</A-> :: [a -&gt; b -&gt; [c]] -&gt; a -&gt; b -&gt; [c]</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3A%2F%3E"->(/&gt;)</A-> :: <A HREF="Text-XML-HaXml-Xtract-Combinators.html#t%3ADFilter"->DFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Xtract-Combinators.html#t%3ADFilter"->DFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Xtract-Combinators.html#t%3ADFilter"->DFilter</A-> i</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3A%3C%2F"->(&lt;/)</A-> :: <A HREF="Text-XML-HaXml-Xtract-Combinators.html#t%3ADFilter"->DFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Xtract-Combinators.html#t%3ADFilter"->DFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Xtract-Combinators.html#t%3ADFilter"->DFilter</A-> i</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Adeep"->deep</A-> :: <A HREF="Text-XML-HaXml-Xtract-Combinators.html#t%3ADFilter"->DFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Xtract-Combinators.html#t%3ADFilter"->DFilter</A-> i</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Adeepest"->deepest</A-> :: <A HREF="Text-XML-HaXml-Xtract-Combinators.html#t%3ADFilter"->DFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Xtract-Combinators.html#t%3ADFilter"->DFilter</A-> i</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Amulti"->multi</A-> :: <A HREF="Text-XML-HaXml-Xtract-Combinators.html#t%3ADFilter"->DFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Xtract-Combinators.html#t%3ADFilter"->DFilter</A-> i</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="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->type</SPAN-> <A NAME="t%3ADFilter"-></A-><B->DFilter</B-> i = <A HREF="Text-XML-HaXml-Types.html#t%3AContent"->Content</A-> i -&gt; <A HREF="Text-XML-HaXml-Types.html#t%3AContent"->Content</A-> i -&gt; [<A HREF="Text-XML-HaXml-Types.html#t%3AContent"->Content</A-> i]</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Xtract/Combinators.html#DFilter"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->double content filter - takes document root + local subtree.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Alocal"-></A-><B->local</B-> :: <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Xtract-Combinators.html#t%3ADFilter"->DFilter</A-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Xtract/Combinators.html#local"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->lift an ordinary content filter to a double filter.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Aglobal"-></A-><B->global</B-> :: <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Xtract-Combinators.html#t%3ADFilter"->DFilter</A-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Xtract/Combinators.html#global"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Adfilter"-></A-><B->dfilter</B-> :: <A HREF="Text-XML-HaXml-Xtract-Combinators.html#t%3ADFilter"->DFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Xtract/Combinators.html#dfilter"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->drop a double filter to an ordinary content filter.-   (permitting interior access to document root)-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Acfilter"-></A-><B->cfilter</B-> :: <A HREF="Text-XML-HaXml-Xtract-Combinators.html#t%3ADFilter"->DFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Xtract/Combinators.html#cfilter"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->drop a double filter to an ordinary content filter.-   (Where interior access to the document root is not needed, the-    retaining pointer to the outer element can be pruned away.-   <TT-><A HREF="Text-XML-HaXml-Xtract-Combinators.html#v%3Acfilter"->cfilter</A-></TT-> is more space-efficient than <TT-><A HREF="Text-XML-HaXml-Xtract-Combinators.html#v%3Adfilter"->dfilter</A-></TT-> in this situation.)-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AliftLocal"-></A-><B->liftLocal</B-> :: (<A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i) -&gt; <A HREF="Text-XML-HaXml-Xtract-Combinators.html#t%3ADFilter"->DFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Xtract-Combinators.html#t%3ADFilter"->DFilter</A-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Xtract/Combinators.html#liftLocal"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->lift a CFilter combinator to a DFilter combinator-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AliftGlobal"-></A-><B->liftGlobal</B-> :: (<A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i) -&gt; <A HREF="Text-XML-HaXml-Xtract-Combinators.html#t%3ADFilter"->DFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Xtract-Combinators.html#t%3ADFilter"->DFilter</A-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Xtract/Combinators.html#liftGlobal"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Ao"-></A-><B->o</B-> :: <A HREF="Text-XML-HaXml-Xtract-Combinators.html#t%3ADFilter"->DFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Xtract-Combinators.html#t%3ADFilter"->DFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Xtract-Combinators.html#t%3ADFilter"->DFilter</A-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Xtract/Combinators.html#o"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->lifted composition over double filters.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3A%7C%3E%7C"-></A-><B->(|&gt;|)</B-> :: (a -&gt; b -&gt; [c]) -&gt; (a -&gt; b -&gt; [c]) -&gt; a -&gt; b -&gt; [c]</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Xtract/Combinators.html#%7C%3E%7C"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->lifted choice.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Aunion"-></A-><B->union</B-> :: (a -&gt; b -&gt; [c]) -&gt; (a -&gt; b -&gt; [c]) -&gt; a -&gt; b -&gt; [c]</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Xtract/Combinators.html#union"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->lifted union.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Awith"-></A-><B->with</B-> :: <A HREF="Text-XML-HaXml-Xtract-Combinators.html#t%3ADFilter"->DFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Xtract-Combinators.html#t%3ADFilter"->DFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Xtract-Combinators.html#t%3ADFilter"->DFilter</A-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Xtract/Combinators.html#with"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->lifted predicates.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Awithout"-></A-><B->without</B-> :: <A HREF="Text-XML-HaXml-Xtract-Combinators.html#t%3ADFilter"->DFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Xtract-Combinators.html#t%3ADFilter"->DFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Xtract-Combinators.html#t%3ADFilter"->DFilter</A-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Xtract/Combinators.html#without"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Akeep"-></A-><B->keep</B-> :: <A HREF="Text-XML-HaXml-Xtract-Combinators.html#t%3ADFilter"->DFilter</A-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Xtract/Combinators.html#keep"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->lifted unit and zero.-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Anone"-></A-><B->none</B-> :: <A HREF="Text-XML-HaXml-Xtract-Combinators.html#t%3ADFilter"->DFilter</A-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Xtract/Combinators.html#none"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Achildren"-></A-><B->children</B-> :: <A HREF="Text-XML-HaXml-Xtract-Combinators.html#t%3ADFilter"->DFilter</A-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Xtract/Combinators.html#children"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Aelm"-></A-><B->elm</B-> :: <A HREF="Text-XML-HaXml-Xtract-Combinators.html#t%3ADFilter"->DFilter</A-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Xtract/Combinators.html#elm"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Atxt"-></A-><B->txt</B-> :: <A HREF="Text-XML-HaXml-Xtract-Combinators.html#t%3ADFilter"->DFilter</A-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Xtract/Combinators.html#txt"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Aapplypred"-></A-><B->applypred</B-> :: <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Xtract-Combinators.html#t%3ADFilter"->DFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Xtract/Combinators.html#applypred"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Aiffind"-></A-><B->iffind</B-> :: String -&gt; (String -&gt; <A HREF="Text-XML-HaXml-Xtract-Combinators.html#t%3ADFilter"->DFilter</A-> i) -&gt; <A HREF="Text-XML-HaXml-Xtract-Combinators.html#t%3ADFilter"->DFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Xtract-Combinators.html#t%3ADFilter"->DFilter</A-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Xtract/Combinators.html#iffind"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AifTxt"-></A-><B->ifTxt</B-> :: (String -&gt; <A HREF="Text-XML-HaXml-Xtract-Combinators.html#t%3ADFilter"->DFilter</A-> i) -&gt; <A HREF="Text-XML-HaXml-Xtract-Combinators.html#t%3ADFilter"->DFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Xtract-Combinators.html#t%3ADFilter"->DFilter</A-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Xtract/Combinators.html#ifTxt"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Acat"-></A-><B->cat</B-> :: [a -&gt; b -&gt; [c]] -&gt; a -&gt; b -&gt; [c]</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Xtract/Combinators.html#cat"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3A%2F%3E"-></A-><B->(/&gt;)</B-> :: <A HREF="Text-XML-HaXml-Xtract-Combinators.html#t%3ADFilter"->DFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Xtract-Combinators.html#t%3ADFilter"->DFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Xtract-Combinators.html#t%3ADFilter"->DFilter</A-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Xtract/Combinators.html#%2F%3E"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3A%3C%2F"-></A-><B->(&lt;/)</B-> :: <A HREF="Text-XML-HaXml-Xtract-Combinators.html#t%3ADFilter"->DFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Xtract-Combinators.html#t%3ADFilter"->DFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Xtract-Combinators.html#t%3ADFilter"->DFilter</A-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Xtract/Combinators.html#%3C%2F"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Adeep"-></A-><B->deep</B-> :: <A HREF="Text-XML-HaXml-Xtract-Combinators.html#t%3ADFilter"->DFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Xtract-Combinators.html#t%3ADFilter"->DFilter</A-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Xtract/Combinators.html#deep"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Adeepest"-></A-><B->deepest</B-> :: <A HREF="Text-XML-HaXml-Xtract-Combinators.html#t%3ADFilter"->DFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Xtract-Combinators.html#t%3ADFilter"->DFilter</A-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Xtract/Combinators.html#deepest"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Amulti"-></A-><B->multi</B-> :: <A HREF="Text-XML-HaXml-Xtract-Combinators.html#t%3ADFilter"->DFilter</A-> i -&gt; <A HREF="Text-XML-HaXml-Xtract-Combinators.html#t%3ADFilter"->DFilter</A-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Xtract/Combinators.html#multi"->Source</A-></TD-></TR-></TABLE-></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->
− docs/HaXml/Text-XML-HaXml-Xtract-Lex.html
@@ -1,432 +0,0 @@-<!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.HaXml.Xtract.Lex</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"->HaXml</TD-><TD CLASS="topbut"-><A HREF="src/Text/XML/HaXml/Xtract/Lex.html"->Source code</A-></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.HaXml.Xtract.Lex</FONT-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section1"->Description</TD-></TR-><TR-><TD CLASS="doc"-><P->This is another hand-written lexer, this time for the Xtract-   command-language.  The entry point is lexXtract.  You don't-   normally need to use this module directly - the lexer is called-   automatically by the parser.  (We only expose this interface-   for debugging purposes.)-</P-><P->The Xtract command language is very like the XPath specification.-</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%3AlexXtract"->lexXtract</A-> :: (String -&gt; String) -&gt; String -&gt; [<A HREF="Text-XML-HaXml-Xtract-Lex.html#t%3AToken"->Token</A->]</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->data</SPAN-> <A HREF="#t%3APosn"->Posn</A->  = <A HREF="#v%3APn"->Pn</A-> Int</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->data</SPAN-> <A HREF="#t%3ATokenT"->TokenT</A-> </TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="decl"->= <A HREF="#v%3ASymbol"->Symbol</A-> String</TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ATokString"->TokString</A-> String</TD-></TR-><TR-><TD CLASS="decl"->| <A HREF="#v%3ATokNum"->TokNum</A-> Integer</TD-></TR-></TABLE-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><SPAN CLASS="keyword"->type</SPAN-> <A HREF="#t%3AToken"->Token</A-> = Either String (<A HREF="Text-XML-HaXml-Xtract-Lex.html#t%3APosn"->Posn</A->, <A HREF="Text-XML-HaXml-Xtract-Lex.html#t%3ATokenT"->TokenT</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="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AlexXtract"-></A-><B->lexXtract</B-> :: (String -&gt; String) -&gt; String -&gt; [<A HREF="Text-XML-HaXml-Xtract-Lex.html#t%3AToken"->Token</A->]</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Xtract/Lex.html#lexXtract"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->First argument is a transformer for pattern strings, e.g. map toLower,-   but only applying to parts of the pattern not in quotation marks.-   (Needed to canonicalise HTML where tags are case-insensitive, but-   attribute values are case sensitive.)-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3APosn"-></A-><B->Posn</B-> </TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Xtract/Lex.html#Posn"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3APn"-></A-><B->Pn</B-> Int</TD-><TD CLASS="rdoc"-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:Posn')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:Posn" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"->Eq <A HREF="Text-XML-HaXml-Xtract-Lex.html#t%3APosn"->Posn</A-></TD-></TR-><TR-><TD CLASS="decl"->Show <A HREF="Text-XML-HaXml-Xtract-Lex.html#t%3APosn"->Posn</A-></TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->data</SPAN-> <A NAME="t%3ATokenT"-></A-><B->TokenT</B-> </TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Xtract/Lex.html#TokenT"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-><TR-><TD CLASS="section4"->Constructors</TD-></TR-><TR-><TD CLASS="body"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="arg"-><A NAME="v%3ASymbol"-></A-><B->Symbol</B-> String</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ATokString"-></A-><B->TokString</B-> String</TD-><TD CLASS="rdoc"-></TD-></TR-><TR-><TD CLASS="arg"-><A NAME="v%3ATokNum"-></A-><B->TokNum</B-> Integer</TD-><TD CLASS="rdoc"-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section4"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:TokenT')" ALT="show/hide"-> Instances</TD-></TR-><TR-><TD CLASS="body"-><DIV ID="i:TokenT" STYLE="display:block;"-><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"-><TR-><TD CLASS="decl"->Eq <A HREF="Text-XML-HaXml-Xtract-Lex.html#t%3ATokenT"->TokenT</A-></TD-></TR-><TR-><TD CLASS="decl"->Show <A HREF="Text-XML-HaXml-Xtract-Lex.html#t%3ATokenT"->TokenT</A-></TD-></TR-></TABLE-></DIV-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><SPAN CLASS="keyword"->type</SPAN-> <A NAME="t%3AToken"-></A-><B->Token</B-> = Either String (<A HREF="Text-XML-HaXml-Xtract-Lex.html#t%3APosn"->Posn</A->, <A HREF="Text-XML-HaXml-Xtract-Lex.html#t%3ATokenT"->TokenT</A->)</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Xtract/Lex.html#Token"->Source</A-></TD-></TR-></TABLE-></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->
− docs/HaXml/Text-XML-HaXml-Xtract-Parse.html
@@ -1,216 +0,0 @@-<!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.HaXml.Xtract.Parse</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"->HaXml</TD-><TD CLASS="topbut"-><A HREF="src/Text/XML/HaXml/Xtract/Parse.html"->Source code</A-></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.HaXml.Xtract.Parse</FONT-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section1"->Description</TD-></TR-><TR-><TD CLASS="doc"->A parser for the Xtract command-language.  (The string input is-   tokenised internally by the lexer <TT-><A HREF="Text-XML-HaXml-Xtract-Lex.html#v%3AlexXtract"->lexXtract</A-></TT->.)-   See <A HREF="http://www.haskell.org/HaXml/Xtract.html"->http://www.haskell.org/HaXml/Xtract.html</A-> for the grammar that-   is accepted.-</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%3AparseXtract"->parseXtract</A-> :: [<A HREF="Text-XML-HaXml-Xtract-Lex.html#t%3AToken"->Token</A->] -&gt; <A HREF="Text-XML-HaXml-Xtract-Combinators.html#t%3ADFilter"->DFilter</A-> i</TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Axtract"->xtract</A-> :: (String -&gt; String) -&gt; String -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</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="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3AparseXtract"-></A-><B->parseXtract</B-> :: [<A HREF="Text-XML-HaXml-Xtract-Lex.html#t%3AToken"->Token</A->] -&gt; <A HREF="Text-XML-HaXml-Xtract-Combinators.html#t%3ADFilter"->DFilter</A-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Xtract/Parse.html#parseXtract"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->The cool thing is that the Xtract command parser directly builds-   a higher-order <TT-><A HREF="Text-XML-HaXml-Xtract-Combinators.html#t%3ADFilter"->DFilter</A-></TT-> (see <A HREF="Text-XML-HaXml-Xtract-Combinators.html"->Text.XML.HaXml.Xtract.Combinators</A->)-   which can be applied to an XML document without further ado.-   (<TT->parseXtract</TT-> halts the program if a parse error is found.)-</TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Axtract"-></A-><B->xtract</B-> :: (String -&gt; String) -&gt; String -&gt; <A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->CFilter</A-> i</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml/Xtract/Parse.html#xtract"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->To convert an Xtract query into an ordinary HaXml combinator expression.-   First arg is a tag-transformation function (e.g. map toLower) applied-</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->
− docs/HaXml/Text-XML-HaXml.html
@@ -1,348 +0,0 @@-<!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.HaXml</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"->HaXml</TD-><TD CLASS="topbut"-><A HREF="src/Text/XML/HaXml.html"->Source code</A-></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.HaXml</FONT-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD-><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"-></TABLE-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="section1"->Description</TD-></TR-><TR-><TD CLASS="doc"->This is just a convenient way of bunching the XML combinators-   together with some other things you are likely to want at the-   same time.-</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"->module <A HREF="Text-XML-HaXml-Types.html"->Text.XML.HaXml.Types</A-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"->module <A HREF="Text-XML-HaXml-Combinators.html"->Text.XML.HaXml.Combinators</A-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"->module <A HREF="Text-XML-HaXml-Parse.html"->Text.XML.HaXml.Parse</A-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"->module <A HREF="Text-XML-HaXml-Pretty.html"->Text.XML.HaXml.Pretty</A-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"->module <A HREF="Text-XML-HaXml-Html-Generate.html"->Text.XML.HaXml.Html.Generate</A-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"->module <A HREF="Text-XML-HaXml-Html-Parse.html"->Text.XML.HaXml.Html.Parse</A-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"->module <A HREF="Text-XML-HaXml-Validate.html"->Text.XML.HaXml.Validate</A-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"->module <A HREF="Text-XML-HaXml-Wrappers.html"->Text.XML.HaXml.Wrappers</A-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"->module <A HREF="Text-XML-HaXml-Verbatim.html"->Text.XML.HaXml.Verbatim</A-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"->module <A HREF="Text-XML-HaXml-Escape.html"->Text.XML.HaXml.Escape</A-></TD-></TR-><TR-><TD CLASS="s8"-></TD-></TR-><TR-><TD CLASS="decl"-><A HREF="#v%3Aversion"->version</A-> :: String</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"->module <A HREF="Text-XML-HaXml-Types.html"->Text.XML.HaXml.Types</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="decl"->module <A HREF="Text-XML-HaXml-Combinators.html"->Text.XML.HaXml.Combinators</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="decl"->module <A HREF="Text-XML-HaXml-Parse.html"->Text.XML.HaXml.Parse</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="decl"->module <A HREF="Text-XML-HaXml-Pretty.html"->Text.XML.HaXml.Pretty</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="decl"->module <A HREF="Text-XML-HaXml-Html-Generate.html"->Text.XML.HaXml.Html.Generate</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="decl"->module <A HREF="Text-XML-HaXml-Html-Parse.html"->Text.XML.HaXml.Html.Parse</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="decl"->module <A HREF="Text-XML-HaXml-Validate.html"->Text.XML.HaXml.Validate</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="decl"->module <A HREF="Text-XML-HaXml-Wrappers.html"->Text.XML.HaXml.Wrappers</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="decl"->module <A HREF="Text-XML-HaXml-Verbatim.html"->Text.XML.HaXml.Verbatim</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="decl"->module <A HREF="Text-XML-HaXml-Escape.html"->Text.XML.HaXml.Escape</A-></TD-></TR-><TR-><TD CLASS="s15"-></TD-></TR-><TR-><TD CLASS="topdecl"-><TABLE CLASS="declbar"-><TR-><TD CLASS="declname"-><A NAME="v%3Aversion"-></A-><B->version</B-> :: String</TD-><TD CLASS="declbut"-><A HREF="src/Text/XML/HaXml.html#version"->Source</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="doc"->The version of the library.-</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->
− docs/HaXml/doc-index-124.html
@@ -1,190 +0,0 @@-<!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->HaXml (Index)</TITLE-><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"-></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"->HaXml</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-><TABLE CELLPADDING="0" CELLSPACING="5"-><TR-><TD-><A HREF="doc-index-A.html"->A</A-></TD-><TD-><A HREF="doc-index-B.html"->B</A-></TD-><TD-><A HREF="doc-index-C.html"->C</A-></TD-><TD-><A HREF="doc-index-D.html"->D</A-></TD-><TD-><A HREF="doc-index-E.html"->E</A-></TD-><TD-><A HREF="doc-index-F.html"->F</A-></TD-><TD-><A HREF="doc-index-G.html"->G</A-></TD-><TD-><A HREF="doc-index-H.html"->H</A-></TD-><TD-><A HREF="doc-index-I.html"->I</A-></TD-><TD-><A HREF="doc-index-K.html"->K</A-></TD-><TD-><A HREF="doc-index-L.html"->L</A-></TD-><TD-><A HREF="doc-index-M.html"->M</A-></TD-><TD-><A HREF="doc-index-N.html"->N</A-></TD-><TD-><A HREF="doc-index-O.html"->O</A-></TD-><TD-><A HREF="doc-index-P.html"->P</A-></TD-><TD-><A HREF="doc-index-Q.html"->Q</A-></TD-><TD-><A HREF="doc-index-R.html"->R</A-></TD-><TD-><A HREF="doc-index-S.html"->S</A-></TD-><TD-><A HREF="doc-index-T.html"->T</A-></TD-><TD-><A HREF="doc-index-U.html"->U</A-></TD-><TD-><A HREF="doc-index-V.html"->V</A-></TD-><TD-><A HREF="doc-index-W.html"->W</A-></TD-><TD-><A HREF="doc-index-X.html"->X</A-></TD-><TD-><A HREF="doc-index-58.html"->:</A-></TD-><TD-><A HREF="doc-index-33.html"->!</A-></TD-><TD-><A HREF="doc-index-47.html"->/</A-></TD-><TD-><A HREF="doc-index-60.html"->&lt;</A-></TD-><TD-><A HREF="doc-index-63.html"->?</A-></TD-><TD-><A HREF="doc-index-124.html"->|</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section1"->Index (|)</TD-></TR-><TR-><TD-><TABLE CELLPADDING="0" CELLSPACING="5"-><TR-><TD CLASS="indexentry" COLSPAN="2"->|&gt;|</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Combinators.html#v%3A%7C%3E%7C"->Text.XML.HaXml.Combinators</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexannot"->2 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Xtract-Combinators.html#v%3A%7C%3E%7C"->Text.XML.HaXml.Xtract.Combinators</A-></TD-></TR-></TABLE-></TD-></TR-></TABLE-></BODY-></HTML->
− docs/HaXml/doc-index-33.html
@@ -1,178 +0,0 @@-<!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->HaXml (Index)</TITLE-><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"-></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"->HaXml</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-><TABLE CELLPADDING="0" CELLSPACING="5"-><TR-><TD-><A HREF="doc-index-A.html"->A</A-></TD-><TD-><A HREF="doc-index-B.html"->B</A-></TD-><TD-><A HREF="doc-index-C.html"->C</A-></TD-><TD-><A HREF="doc-index-D.html"->D</A-></TD-><TD-><A HREF="doc-index-E.html"->E</A-></TD-><TD-><A HREF="doc-index-F.html"->F</A-></TD-><TD-><A HREF="doc-index-G.html"->G</A-></TD-><TD-><A HREF="doc-index-H.html"->H</A-></TD-><TD-><A HREF="doc-index-I.html"->I</A-></TD-><TD-><A HREF="doc-index-K.html"->K</A-></TD-><TD-><A HREF="doc-index-L.html"->L</A-></TD-><TD-><A HREF="doc-index-M.html"->M</A-></TD-><TD-><A HREF="doc-index-N.html"->N</A-></TD-><TD-><A HREF="doc-index-O.html"->O</A-></TD-><TD-><A HREF="doc-index-P.html"->P</A-></TD-><TD-><A HREF="doc-index-Q.html"->Q</A-></TD-><TD-><A HREF="doc-index-R.html"->R</A-></TD-><TD-><A HREF="doc-index-S.html"->S</A-></TD-><TD-><A HREF="doc-index-T.html"->T</A-></TD-><TD-><A HREF="doc-index-U.html"->U</A-></TD-><TD-><A HREF="doc-index-V.html"->V</A-></TD-><TD-><A HREF="doc-index-W.html"->W</A-></TD-><TD-><A HREF="doc-index-X.html"->X</A-></TD-><TD-><A HREF="doc-index-58.html"->:</A-></TD-><TD-><A HREF="doc-index-33.html"->!</A-></TD-><TD-><A HREF="doc-index-47.html"->/</A-></TD-><TD-><A HREF="doc-index-60.html"->&lt;</A-></TD-><TD-><A HREF="doc-index-63.html"->?</A-></TD-><TD-><A HREF="doc-index-124.html"->|</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section1"->Index (!)</TD-></TR-><TR-><TD-><TABLE CELLPADDING="0" CELLSPACING="5"-><TR-><TD CLASS="indexentry"->!</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Html-Generate.html#v%3A%21"->Text.XML.HaXml.Html.Generate</A->, Text.XML.HaXml</TD-></TR-></TABLE-></TD-></TR-></TABLE-></BODY-></HTML->
− docs/HaXml/doc-index-47.html
@@ -1,190 +0,0 @@-<!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->HaXml (Index)</TITLE-><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"-></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"->HaXml</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-><TABLE CELLPADDING="0" CELLSPACING="5"-><TR-><TD-><A HREF="doc-index-A.html"->A</A-></TD-><TD-><A HREF="doc-index-B.html"->B</A-></TD-><TD-><A HREF="doc-index-C.html"->C</A-></TD-><TD-><A HREF="doc-index-D.html"->D</A-></TD-><TD-><A HREF="doc-index-E.html"->E</A-></TD-><TD-><A HREF="doc-index-F.html"->F</A-></TD-><TD-><A HREF="doc-index-G.html"->G</A-></TD-><TD-><A HREF="doc-index-H.html"->H</A-></TD-><TD-><A HREF="doc-index-I.html"->I</A-></TD-><TD-><A HREF="doc-index-K.html"->K</A-></TD-><TD-><A HREF="doc-index-L.html"->L</A-></TD-><TD-><A HREF="doc-index-M.html"->M</A-></TD-><TD-><A HREF="doc-index-N.html"->N</A-></TD-><TD-><A HREF="doc-index-O.html"->O</A-></TD-><TD-><A HREF="doc-index-P.html"->P</A-></TD-><TD-><A HREF="doc-index-Q.html"->Q</A-></TD-><TD-><A HREF="doc-index-R.html"->R</A-></TD-><TD-><A HREF="doc-index-S.html"->S</A-></TD-><TD-><A HREF="doc-index-T.html"->T</A-></TD-><TD-><A HREF="doc-index-U.html"->U</A-></TD-><TD-><A HREF="doc-index-V.html"->V</A-></TD-><TD-><A HREF="doc-index-W.html"->W</A-></TD-><TD-><A HREF="doc-index-X.html"->X</A-></TD-><TD-><A HREF="doc-index-58.html"->:</A-></TD-><TD-><A HREF="doc-index-33.html"->!</A-></TD-><TD-><A HREF="doc-index-47.html"->/</A-></TD-><TD-><A HREF="doc-index-60.html"->&lt;</A-></TD-><TD-><A HREF="doc-index-63.html"->?</A-></TD-><TD-><A HREF="doc-index-124.html"->|</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section1"->Index (/)</TD-></TR-><TR-><TD-><TABLE CELLPADDING="0" CELLSPACING="5"-><TR-><TD CLASS="indexentry" COLSPAN="2"->/&gt;</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Combinators.html#v%3A%2F%3E"->Text.XML.HaXml.Combinators</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexannot"->2 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Xtract-Combinators.html#v%3A%2F%3E"->Text.XML.HaXml.Xtract.Combinators</A-></TD-></TR-></TABLE-></TD-></TR-></TABLE-></BODY-></HTML->
− docs/HaXml/doc-index-58.html
@@ -1,178 +0,0 @@-<!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->HaXml (Index)</TITLE-><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"-></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"->HaXml</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-><TABLE CELLPADDING="0" CELLSPACING="5"-><TR-><TD-><A HREF="doc-index-A.html"->A</A-></TD-><TD-><A HREF="doc-index-B.html"->B</A-></TD-><TD-><A HREF="doc-index-C.html"->C</A-></TD-><TD-><A HREF="doc-index-D.html"->D</A-></TD-><TD-><A HREF="doc-index-E.html"->E</A-></TD-><TD-><A HREF="doc-index-F.html"->F</A-></TD-><TD-><A HREF="doc-index-G.html"->G</A-></TD-><TD-><A HREF="doc-index-H.html"->H</A-></TD-><TD-><A HREF="doc-index-I.html"->I</A-></TD-><TD-><A HREF="doc-index-K.html"->K</A-></TD-><TD-><A HREF="doc-index-L.html"->L</A-></TD-><TD-><A HREF="doc-index-M.html"->M</A-></TD-><TD-><A HREF="doc-index-N.html"->N</A-></TD-><TD-><A HREF="doc-index-O.html"->O</A-></TD-><TD-><A HREF="doc-index-P.html"->P</A-></TD-><TD-><A HREF="doc-index-Q.html"->Q</A-></TD-><TD-><A HREF="doc-index-R.html"->R</A-></TD-><TD-><A HREF="doc-index-S.html"->S</A-></TD-><TD-><A HREF="doc-index-T.html"->T</A-></TD-><TD-><A HREF="doc-index-U.html"->U</A-></TD-><TD-><A HREF="doc-index-V.html"->V</A-></TD-><TD-><A HREF="doc-index-W.html"->W</A-></TD-><TD-><A HREF="doc-index-X.html"->X</A-></TD-><TD-><A HREF="doc-index-58.html"->:</A-></TD-><TD-><A HREF="doc-index-33.html"->!</A-></TD-><TD-><A HREF="doc-index-47.html"->/</A-></TD-><TD-><A HREF="doc-index-60.html"->&lt;</A-></TD-><TD-><A HREF="doc-index-63.html"->?</A-></TD-><TD-><A HREF="doc-index-124.html"->|</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section1"->Index (:)</TD-></TR-><TR-><TD-><TABLE CELLPADDING="0" CELLSPACING="5"-><TR-><TD CLASS="indexentry"->:&gt;</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Combinators.html#v%3A%3A%3E"->Text.XML.HaXml.Combinators</A->, Text.XML.HaXml</TD-></TR-></TABLE-></TD-></TR-></TABLE-></BODY-></HTML->
− docs/HaXml/doc-index-60.html
@@ -1,190 +0,0 @@-<!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->HaXml (Index)</TITLE-><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"-></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"->HaXml</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-><TABLE CELLPADDING="0" CELLSPACING="5"-><TR-><TD-><A HREF="doc-index-A.html"->A</A-></TD-><TD-><A HREF="doc-index-B.html"->B</A-></TD-><TD-><A HREF="doc-index-C.html"->C</A-></TD-><TD-><A HREF="doc-index-D.html"->D</A-></TD-><TD-><A HREF="doc-index-E.html"->E</A-></TD-><TD-><A HREF="doc-index-F.html"->F</A-></TD-><TD-><A HREF="doc-index-G.html"->G</A-></TD-><TD-><A HREF="doc-index-H.html"->H</A-></TD-><TD-><A HREF="doc-index-I.html"->I</A-></TD-><TD-><A HREF="doc-index-K.html"->K</A-></TD-><TD-><A HREF="doc-index-L.html"->L</A-></TD-><TD-><A HREF="doc-index-M.html"->M</A-></TD-><TD-><A HREF="doc-index-N.html"->N</A-></TD-><TD-><A HREF="doc-index-O.html"->O</A-></TD-><TD-><A HREF="doc-index-P.html"->P</A-></TD-><TD-><A HREF="doc-index-Q.html"->Q</A-></TD-><TD-><A HREF="doc-index-R.html"->R</A-></TD-><TD-><A HREF="doc-index-S.html"->S</A-></TD-><TD-><A HREF="doc-index-T.html"->T</A-></TD-><TD-><A HREF="doc-index-U.html"->U</A-></TD-><TD-><A HREF="doc-index-V.html"->V</A-></TD-><TD-><A HREF="doc-index-W.html"->W</A-></TD-><TD-><A HREF="doc-index-X.html"->X</A-></TD-><TD-><A HREF="doc-index-58.html"->:</A-></TD-><TD-><A HREF="doc-index-33.html"->!</A-></TD-><TD-><A HREF="doc-index-47.html"->/</A-></TD-><TD-><A HREF="doc-index-60.html"->&lt;</A-></TD-><TD-><A HREF="doc-index-63.html"->?</A-></TD-><TD-><A HREF="doc-index-124.html"->|</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section1"->Index (&lt;)</TD-></TR-><TR-><TD-><TABLE CELLPADDING="0" CELLSPACING="5"-><TR-><TD CLASS="indexentry" COLSPAN="2"->&lt;/</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Combinators.html#v%3A%3C%2F"->Text.XML.HaXml.Combinators</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexannot"->2 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Xtract-Combinators.html#v%3A%3C%2F"->Text.XML.HaXml.Xtract.Combinators</A-></TD-></TR-></TABLE-></TD-></TR-></TABLE-></BODY-></HTML->
− docs/HaXml/doc-index-63.html
@@ -1,186 +0,0 @@-<!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->HaXml (Index)</TITLE-><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"-></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"->HaXml</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-><TABLE CELLPADDING="0" CELLSPACING="5"-><TR-><TD-><A HREF="doc-index-A.html"->A</A-></TD-><TD-><A HREF="doc-index-B.html"->B</A-></TD-><TD-><A HREF="doc-index-C.html"->C</A-></TD-><TD-><A HREF="doc-index-D.html"->D</A-></TD-><TD-><A HREF="doc-index-E.html"->E</A-></TD-><TD-><A HREF="doc-index-F.html"->F</A-></TD-><TD-><A HREF="doc-index-G.html"->G</A-></TD-><TD-><A HREF="doc-index-H.html"->H</A-></TD-><TD-><A HREF="doc-index-I.html"->I</A-></TD-><TD-><A HREF="doc-index-K.html"->K</A-></TD-><TD-><A HREF="doc-index-L.html"->L</A-></TD-><TD-><A HREF="doc-index-M.html"->M</A-></TD-><TD-><A HREF="doc-index-N.html"->N</A-></TD-><TD-><A HREF="doc-index-O.html"->O</A-></TD-><TD-><A HREF="doc-index-P.html"->P</A-></TD-><TD-><A HREF="doc-index-Q.html"->Q</A-></TD-><TD-><A HREF="doc-index-R.html"->R</A-></TD-><TD-><A HREF="doc-index-S.html"->S</A-></TD-><TD-><A HREF="doc-index-T.html"->T</A-></TD-><TD-><A HREF="doc-index-U.html"->U</A-></TD-><TD-><A HREF="doc-index-V.html"->V</A-></TD-><TD-><A HREF="doc-index-W.html"->W</A-></TD-><TD-><A HREF="doc-index-X.html"->X</A-></TD-><TD-><A HREF="doc-index-58.html"->:</A-></TD-><TD-><A HREF="doc-index-33.html"->!</A-></TD-><TD-><A HREF="doc-index-47.html"->/</A-></TD-><TD-><A HREF="doc-index-60.html"->&lt;</A-></TD-><TD-><A HREF="doc-index-63.html"->?</A-></TD-><TD-><A HREF="doc-index-124.html"->|</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section1"->Index (?)</TD-></TR-><TR-><TD-><TABLE CELLPADDING="0" CELLSPACING="5"-><TR-><TD CLASS="indexentry"->?</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Html-Generate.html#v%3A%3F"->Text.XML.HaXml.Html.Generate</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->?&gt;</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Combinators.html#v%3A%3F%3E"->Text.XML.HaXml.Combinators</A->, Text.XML.HaXml</TD-></TR-></TABLE-></TD-></TR-></TABLE-></BODY-></HTML->
− docs/HaXml/doc-index-A.html
@@ -1,424 +0,0 @@-<!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->HaXml (Index)</TITLE-><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"-></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"->HaXml</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-><TABLE CELLPADDING="0" CELLSPACING="5"-><TR-><TD-><A HREF="doc-index-A.html"->A</A-></TD-><TD-><A HREF="doc-index-B.html"->B</A-></TD-><TD-><A HREF="doc-index-C.html"->C</A-></TD-><TD-><A HREF="doc-index-D.html"->D</A-></TD-><TD-><A HREF="doc-index-E.html"->E</A-></TD-><TD-><A HREF="doc-index-F.html"->F</A-></TD-><TD-><A HREF="doc-index-G.html"->G</A-></TD-><TD-><A HREF="doc-index-H.html"->H</A-></TD-><TD-><A HREF="doc-index-I.html"->I</A-></TD-><TD-><A HREF="doc-index-K.html"->K</A-></TD-><TD-><A HREF="doc-index-L.html"->L</A-></TD-><TD-><A HREF="doc-index-M.html"->M</A-></TD-><TD-><A HREF="doc-index-N.html"->N</A-></TD-><TD-><A HREF="doc-index-O.html"->O</A-></TD-><TD-><A HREF="doc-index-P.html"->P</A-></TD-><TD-><A HREF="doc-index-Q.html"->Q</A-></TD-><TD-><A HREF="doc-index-R.html"->R</A-></TD-><TD-><A HREF="doc-index-S.html"->S</A-></TD-><TD-><A HREF="doc-index-T.html"->T</A-></TD-><TD-><A HREF="doc-index-U.html"->U</A-></TD-><TD-><A HREF="doc-index-V.html"->V</A-></TD-><TD-><A HREF="doc-index-W.html"->W</A-></TD-><TD-><A HREF="doc-index-X.html"->X</A-></TD-><TD-><A HREF="doc-index-58.html"->:</A-></TD-><TD-><A HREF="doc-index-33.html"->!</A-></TD-><TD-><A HREF="doc-index-47.html"->/</A-></TD-><TD-><A HREF="doc-index-60.html"->&lt;</A-></TD-><TD-><A HREF="doc-index-63.html"->?</A-></TD-><TD-><A HREF="doc-index-124.html"->|</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section1"->Index (A)</TD-></TR-><TR-><TD-><TABLE CELLPADDING="0" CELLSPACING="5"-><TR-><TD CLASS="indexentry"->ANY</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#v%3AANY"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->ANYContent</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Type/Class)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AANYContent"->Text.XML.HaXml.XmlContent.Parser</A->, Text.XML.HaXml.XmlContent, Text.XML.HaXml.XmlContent.Haskell</TD-></TR-><TR-><TD CLASS="indexannot"->2 (Data Constructor)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-XmlContent-Parser.html#v%3AANYContent"->Text.XML.HaXml.XmlContent.Parser</A->, Text.XML.HaXml.XmlContent, Text.XML.HaXml.XmlContent.Haskell</TD-></TR-><TR-><TD CLASS="indexentry"->ATTLISTx</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Lex.html#v%3AATTLISTx"->Text.XML.HaXml.Lex</A-></TD-></TR-><TR-><TD CLASS="indexentry"->Any</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-DtdToHaskell-TypeDef.html#v%3AAny"->Text.XML.HaXml.DtdToHaskell.TypeDef</A-></TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->AttDef</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Type/Class)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#t%3AAttDef"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexannot"->2 (Data Constructor)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#v%3AAttDef"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->AttList</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#v%3AAttList"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->AttListDecl</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Type/Class)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#t%3AAttListDecl"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexannot"->2 (Data Constructor)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#v%3AAttListDecl"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->AttType</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#t%3AAttType"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->AttValue</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Type/Class)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#t%3AAttValue"->Text.XML.HaXml.Types</A->, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AAttValue"->Text.XML.HaXml.XmlContent.Parser</A->, Text.XML.HaXml.XmlContent, Text.XML.HaXml.XmlContent.Haskell, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexannot"->2 (Data Constructor)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#v%3AAttValue"->Text.XML.HaXml.Types</A->, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#v%3AAttValue"->Text.XML.HaXml.XmlContent.Parser</A->, Text.XML.HaXml.XmlContent, Text.XML.HaXml.XmlContent.Haskell, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->AttrFields</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-DtdToHaskell-TypeDef.html#t%3AAttrFields"->Text.XML.HaXml.DtdToHaskell.TypeDef</A-></TD-></TR-><TR-><TD CLASS="indexentry"->Attribute</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#t%3AAttribute"->Text.XML.HaXml.Types</A->, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AAttribute"->Text.XML.HaXml.XmlContent.Parser</A->, Text.XML.HaXml.XmlContent, Text.XML.HaXml.XmlContent.Haskell, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->addST</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#v%3AaddST"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->addcol</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Posn.html#v%3Aaddcol"->Text.XML.HaXml.Posn</A-></TD-></TR-><TR-><TD CLASS="indexentry"->anchor</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Html-Generate.html#v%3Aanchor"->Text.XML.HaXml.Html.Generate</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->anchorname</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Html-Generate.html#v%3Aanchorname"->Text.XML.HaXml.Html.Generate</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->andThen</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Combinators.html#v%3AandThen"->Text.XML.HaXml.Combinators</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->applypred</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Xtract-Combinators.html#v%3Aapplypred"->Text.XML.HaXml.Xtract.Combinators</A-></TD-></TR-><TR-><TD CLASS="indexentry"->attr</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Combinators.html#v%3Aattr"->Text.XML.HaXml.Combinators</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->attr2str</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-XmlContent-Parser.html#v%3Aattr2str"->Text.XML.HaXml.XmlContent.Parser</A->, Text.XML.HaXml.XmlContent, Text.XML.HaXml.XmlContent.Haskell</TD-></TR-><TR-><TD CLASS="indexentry"->attribute</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Html-Pretty.html#v%3Aattribute"->Text.XML.HaXml.Html.Pretty</A-></TD-></TR-><TR-><TD CLASS="indexentry"->attributed</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Combinators.html#v%3Aattributed"->Text.XML.HaXml.Combinators</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->attributes</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-XmlContent-Parser.html#v%3Aattributes"->Text.XML.HaXml.XmlContent.Parser</A->, Text.XML.HaXml.XmlContent, Text.XML.HaXml.XmlContent.Haskell</TD-></TR-><TR-><TD CLASS="indexentry"->attrs</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Util.html#v%3Aattrs"->Text.XML.HaXml.Util</A-></TD-></TR-><TR-><TD CLASS="indexentry"->attrval</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Combinators.html#v%3Aattrval"->Text.XML.HaXml.Combinators</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->attval</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-XmlContent-Parser.html#v%3Aattval"->Text.XML.HaXml.XmlContent.Parser</A->, Text.XML.HaXml.XmlContent, Text.XML.HaXml.XmlContent.Haskell</TD-></TR-></TABLE-></TD-></TR-></TABLE-></BODY-></HTML->
− docs/HaXml/doc-index-B.html
@@ -1,178 +0,0 @@-<!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->HaXml (Index)</TITLE-><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"-></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"->HaXml</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-><TABLE CELLPADDING="0" CELLSPACING="5"-><TR-><TD-><A HREF="doc-index-A.html"->A</A-></TD-><TD-><A HREF="doc-index-B.html"->B</A-></TD-><TD-><A HREF="doc-index-C.html"->C</A-></TD-><TD-><A HREF="doc-index-D.html"->D</A-></TD-><TD-><A HREF="doc-index-E.html"->E</A-></TD-><TD-><A HREF="doc-index-F.html"->F</A-></TD-><TD-><A HREF="doc-index-G.html"->G</A-></TD-><TD-><A HREF="doc-index-H.html"->H</A-></TD-><TD-><A HREF="doc-index-I.html"->I</A-></TD-><TD-><A HREF="doc-index-K.html"->K</A-></TD-><TD-><A HREF="doc-index-L.html"->L</A-></TD-><TD-><A HREF="doc-index-M.html"->M</A-></TD-><TD-><A HREF="doc-index-N.html"->N</A-></TD-><TD-><A HREF="doc-index-O.html"->O</A-></TD-><TD-><A HREF="doc-index-P.html"->P</A-></TD-><TD-><A HREF="doc-index-Q.html"->Q</A-></TD-><TD-><A HREF="doc-index-R.html"->R</A-></TD-><TD-><A HREF="doc-index-S.html"->S</A-></TD-><TD-><A HREF="doc-index-T.html"->T</A-></TD-><TD-><A HREF="doc-index-U.html"->U</A-></TD-><TD-><A HREF="doc-index-V.html"->V</A-></TD-><TD-><A HREF="doc-index-W.html"->W</A-></TD-><TD-><A HREF="doc-index-X.html"->X</A-></TD-><TD-><A HREF="doc-index-58.html"->:</A-></TD-><TD-><A HREF="doc-index-33.html"->!</A-></TD-><TD-><A HREF="doc-index-47.html"->/</A-></TD-><TD-><A HREF="doc-index-60.html"->&lt;</A-></TD-><TD-><A HREF="doc-index-63.html"->?</A-></TD-><TD-><A HREF="doc-index-124.html"->|</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section1"->Index (B)</TD-></TR-><TR-><TD-><TABLE CELLPADDING="0" CELLSPACING="5"-><TR-><TD CLASS="indexentry"->bullet</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Html-Generate.html#v%3Abullet"->Text.XML.HaXml.Html.Generate</A->, Text.XML.HaXml</TD-></TR-></TABLE-></TD-></TR-></TABLE-></BODY-></HTML->
− docs/HaXml/doc-index-C.html
@@ -1,564 +0,0 @@-<!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->HaXml (Index)</TITLE-><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"-></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"->HaXml</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-><TABLE CELLPADDING="0" CELLSPACING="5"-><TR-><TD-><A HREF="doc-index-A.html"->A</A-></TD-><TD-><A HREF="doc-index-B.html"->B</A-></TD-><TD-><A HREF="doc-index-C.html"->C</A-></TD-><TD-><A HREF="doc-index-D.html"->D</A-></TD-><TD-><A HREF="doc-index-E.html"->E</A-></TD-><TD-><A HREF="doc-index-F.html"->F</A-></TD-><TD-><A HREF="doc-index-G.html"->G</A-></TD-><TD-><A HREF="doc-index-H.html"->H</A-></TD-><TD-><A HREF="doc-index-I.html"->I</A-></TD-><TD-><A HREF="doc-index-K.html"->K</A-></TD-><TD-><A HREF="doc-index-L.html"->L</A-></TD-><TD-><A HREF="doc-index-M.html"->M</A-></TD-><TD-><A HREF="doc-index-N.html"->N</A-></TD-><TD-><A HREF="doc-index-O.html"->O</A-></TD-><TD-><A HREF="doc-index-P.html"->P</A-></TD-><TD-><A HREF="doc-index-Q.html"->Q</A-></TD-><TD-><A HREF="doc-index-R.html"->R</A-></TD-><TD-><A HREF="doc-index-S.html"->S</A-></TD-><TD-><A HREF="doc-index-T.html"->T</A-></TD-><TD-><A HREF="doc-index-U.html"->U</A-></TD-><TD-><A HREF="doc-index-V.html"->V</A-></TD-><TD-><A HREF="doc-index-W.html"->W</A-></TD-><TD-><A HREF="doc-index-X.html"->X</A-></TD-><TD-><A HREF="doc-index-58.html"->:</A-></TD-><TD-><A HREF="doc-index-33.html"->!</A-></TD-><TD-><A HREF="doc-index-47.html"->/</A-></TD-><TD-><A HREF="doc-index-60.html"->&lt;</A-></TD-><TD-><A HREF="doc-index-63.html"->?</A-></TD-><TD-><A HREF="doc-index-124.html"->|</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section1"->Index (C)</TD-></TR-><TR-><TD-><TABLE CELLPADDING="0" CELLSPACING="5"-><TR-><TD CLASS="indexentry"->CDATAx</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Lex.html#v%3ACDATAx"->Text.XML.HaXml.Lex</A-></TD-></TR-><TR-><TD CLASS="indexentry"->CDSect</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#t%3ACDSect"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->CElem</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#v%3ACElem"->Text.XML.HaXml.Types</A->, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#v%3ACElem"->Text.XML.HaXml.XmlContent.Parser</A->, Text.XML.HaXml.XmlContent, Text.XML.HaXml.XmlContent.Haskell, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->CFilter</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Combinators.html#t%3ACFilter"->Text.XML.HaXml.Combinators</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->CMisc</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#v%3ACMisc"->Text.XML.HaXml.Types</A->, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#v%3ACMisc"->Text.XML.HaXml.XmlContent.Parser</A->, Text.XML.HaXml.XmlContent, Text.XML.HaXml.XmlContent.Haskell, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->CP</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#t%3ACP"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->CRef</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#v%3ACRef"->Text.XML.HaXml.Types</A->, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#v%3ACRef"->Text.XML.HaXml.XmlContent.Parser</A->, Text.XML.HaXml.XmlContent, Text.XML.HaXml.XmlContent.Haskell, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->CString</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#v%3ACString"->Text.XML.HaXml.Types</A->, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#v%3ACString"->Text.XML.HaXml.XmlContent.Parser</A->, Text.XML.HaXml.XmlContent, Text.XML.HaXml.XmlContent.Haskell, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->CharData</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#t%3ACharData"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->CharRef</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#t%3ACharRef"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->Choice</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#v%3AChoice"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->Comment</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Type/Class)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#t%3AComment"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexannot"->2 (Data Constructor)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#v%3AComment"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->ConditionalSect</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#t%3AConditionalSect"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->Constr</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Type/Class)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-TypeMapping.html#t%3AConstr"->Text.XML.HaXml.TypeMapping</A->, Text.XML.HaXml.XmlContent.Parser, Text.XML.HaXml.XmlContent, Text.XML.HaXml.XmlContent.Haskell</TD-></TR-><TR-><TD CLASS="indexannot"->2 (Data Constructor)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-TypeMapping.html#v%3AConstr"->Text.XML.HaXml.TypeMapping</A->, Text.XML.HaXml.XmlContent.Parser, Text.XML.HaXml.XmlContent, Text.XML.HaXml.XmlContent.Haskell</TD-></TR-><TR-><TD CLASS="indexentry"->Constructors</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-DtdToHaskell-TypeDef.html#t%3AConstructors"->Text.XML.HaXml.DtdToHaskell.TypeDef</A-></TD-></TR-><TR-><TD CLASS="indexentry"->Content</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#t%3AContent"->Text.XML.HaXml.Types</A->, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AContent"->Text.XML.HaXml.XmlContent.Parser</A->, Text.XML.HaXml.XmlContent, Text.XML.HaXml.XmlContent.Haskell, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->ContentSpec</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Type/Class)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#t%3AContentSpec"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexannot"->2 (Data Constructor)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#v%3AContentSpec"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->cat</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Combinators.html#v%3Acat"->Text.XML.HaXml.Combinators</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexannot"->2 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Xtract-Combinators.html#v%3Acat"->Text.XML.HaXml.Xtract.Combinators</A-></TD-></TR-><TR-><TD CLASS="indexentry"->catMaybes</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-XmlContent-Parser.html#v%3AcatMaybes"->Text.XML.HaXml.XmlContent.Parser</A->, <A HREF="Text-XML-HaXml-XmlContent.html#v%3AcatMaybes"->Text.XML.HaXml.XmlContent</A->, <A HREF="Text-XML-HaXml-XmlContent-Haskell.html#v%3AcatMaybes"->Text.XML.HaXml.XmlContent.Haskell</A-></TD-></TR-><TR-><TD CLASS="indexentry"->cdata</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Combinators.html#v%3Acdata"->Text.XML.HaXml.Combinators</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->cdsect</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Parse.html#v%3Acdsect"->Text.XML.HaXml.Parse</A-></TD-></TR-><TR-><TD CLASS="indexentry"->cfilter</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Xtract-Combinators.html#v%3Acfilter"->Text.XML.HaXml.Xtract.Combinators</A-></TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->chardata</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Parse.html#v%3Achardata"->Text.XML.HaXml.Parse</A-></TD-></TR-><TR-><TD CLASS="indexannot"->2 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-ParseLazy.html#v%3Achardata"->Text.XML.HaXml.ParseLazy</A-></TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->children</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Combinators.html#v%3Achildren"->Text.XML.HaXml.Combinators</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexannot"->2 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Xtract-Combinators.html#v%3Achildren"->Text.XML.HaXml.Xtract.Combinators</A-></TD-></TR-><TR-><TD CLASS="indexentry"->chip</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Combinators.html#v%3Achip"->Text.XML.HaXml.Combinators</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->choice</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-XmlContent-Parser.html#v%3Achoice"->Text.XML.HaXml.XmlContent.Parser</A->, Text.XML.HaXml.XmlContent, Text.XML.HaXml.XmlContent.Haskell</TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->comment</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Parse.html#v%3Acomment"->Text.XML.HaXml.Parse</A-></TD-></TR-><TR-><TD CLASS="indexannot"->2 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-ParseLazy.html#v%3Acomment"->Text.XML.HaXml.ParseLazy</A-></TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->content</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-ByteStringPP.html#v%3Acontent"->Text.XML.HaXml.ByteStringPP</A-></TD-></TR-><TR-><TD CLASS="indexannot"->2 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Html-Pretty.html#v%3Acontent"->Text.XML.HaXml.Html.Pretty</A-></TD-></TR-><TR-><TD CLASS="indexannot"->3 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Parse.html#v%3Acontent"->Text.XML.HaXml.Parse</A-></TD-></TR-><TR-><TD CLASS="indexannot"->4 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-ParseLazy.html#v%3Acontent"->Text.XML.HaXml.ParseLazy</A-></TD-></TR-><TR-><TD CLASS="indexannot"->5 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Pretty.html#v%3Acontent"->Text.XML.HaXml.Pretty</A-></TD-></TR-><TR-><TD CLASS="indexannot"->6 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-XmlContent-Parser.html#v%3Acontent"->Text.XML.HaXml.XmlContent.Parser</A->, Text.XML.HaXml.XmlContent, Text.XML.HaXml.XmlContent.Haskell</TD-></TR-><TR-><TD CLASS="indexentry"->contentElem</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Util.html#v%3AcontentElem"->Text.XML.HaXml.Util</A-></TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->cp</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-ByteStringPP.html#v%3Acp"->Text.XML.HaXml.ByteStringPP</A-></TD-></TR-><TR-><TD CLASS="indexannot"->2 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Pretty.html#v%3Acp"->Text.XML.HaXml.Pretty</A-></TD-></TR-></TABLE-></TD-></TR-></TABLE-></BODY-></HTML->
− docs/HaXml/doc-index-D.html
@@ -1,518 +0,0 @@-<!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->HaXml (Index)</TITLE-><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"-></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"->HaXml</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-><TABLE CELLPADDING="0" CELLSPACING="5"-><TR-><TD-><A HREF="doc-index-A.html"->A</A-></TD-><TD-><A HREF="doc-index-B.html"->B</A-></TD-><TD-><A HREF="doc-index-C.html"->C</A-></TD-><TD-><A HREF="doc-index-D.html"->D</A-></TD-><TD-><A HREF="doc-index-E.html"->E</A-></TD-><TD-><A HREF="doc-index-F.html"->F</A-></TD-><TD-><A HREF="doc-index-G.html"->G</A-></TD-><TD-><A HREF="doc-index-H.html"->H</A-></TD-><TD-><A HREF="doc-index-I.html"->I</A-></TD-><TD-><A HREF="doc-index-K.html"->K</A-></TD-><TD-><A HREF="doc-index-L.html"->L</A-></TD-><TD-><A HREF="doc-index-M.html"->M</A-></TD-><TD-><A HREF="doc-index-N.html"->N</A-></TD-><TD-><A HREF="doc-index-O.html"->O</A-></TD-><TD-><A HREF="doc-index-P.html"->P</A-></TD-><TD-><A HREF="doc-index-Q.html"->Q</A-></TD-><TD-><A HREF="doc-index-R.html"->R</A-></TD-><TD-><A HREF="doc-index-S.html"->S</A-></TD-><TD-><A HREF="doc-index-T.html"->T</A-></TD-><TD-><A HREF="doc-index-U.html"->U</A-></TD-><TD-><A HREF="doc-index-V.html"->V</A-></TD-><TD-><A HREF="doc-index-W.html"->W</A-></TD-><TD-><A HREF="doc-index-X.html"->X</A-></TD-><TD-><A HREF="doc-index-58.html"->:</A-></TD-><TD-><A HREF="doc-index-33.html"->!</A-></TD-><TD-><A HREF="doc-index-47.html"->/</A-></TD-><TD-><A HREF="doc-index-60.html"->&lt;</A-></TD-><TD-><A HREF="doc-index-63.html"->?</A-></TD-><TD-><A HREF="doc-index-124.html"->|</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section1"->Index (D)</TD-></TR-><TR-><TD-><TABLE CELLPADDING="0" CELLSPACING="5"-><TR-><TD CLASS="indexentry"->DFilter</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Xtract-Combinators.html#t%3ADFilter"->Text.XML.HaXml.Xtract.Combinators</A-></TD-></TR-><TR-><TD CLASS="indexentry"->DOCTYPEx</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Lex.html#v%3ADOCTYPEx"->Text.XML.HaXml.Lex</A-></TD-></TR-><TR-><TD CLASS="indexentry"->DTD</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#v%3ADTD"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->DataDef</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-DtdToHaskell-TypeDef.html#v%3ADataDef"->Text.XML.HaXml.DtdToHaskell.TypeDef</A-></TD-></TR-><TR-><TD CLASS="indexentry"->DefEntityValue</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#v%3ADefEntityValue"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->DefExternalID</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#v%3ADefExternalID"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->Default</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-XmlContent-Parser.html#v%3ADefault"->Text.XML.HaXml.XmlContent.Parser</A->, Text.XML.HaXml.XmlContent, Text.XML.HaXml.XmlContent.Haskell</TD-></TR-><TR-><TD CLASS="indexentry"->DefaultDecl</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#t%3ADefaultDecl"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->DefaultTo</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#v%3ADefaultTo"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->Defaultable</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Data Constructor)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-DtdToHaskell-TypeDef.html#v%3ADefaultable"->Text.XML.HaXml.DtdToHaskell.TypeDef</A-></TD-></TR-><TR-><TD CLASS="indexannot"->2 (Type/Class)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3ADefaultable"->Text.XML.HaXml.XmlContent.Parser</A->, Text.XML.HaXml.XmlContent, Text.XML.HaXml.XmlContent.Haskell</TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->Defined</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Data Constructor)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-DtdToHaskell-TypeDef.html#v%3ADefined"->Text.XML.HaXml.DtdToHaskell.TypeDef</A-></TD-></TR-><TR-><TD CLASS="indexannot"->2 (Data Constructor)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-TypeMapping.html#v%3ADefined"->Text.XML.HaXml.TypeMapping</A->, Text.XML.HaXml.XmlContent.Parser, Text.XML.HaXml.XmlContent, Text.XML.HaXml.XmlContent.Haskell</TD-></TR-><TR-><TD CLASS="indexentry"->DocTypeDecl</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#t%3ADocTypeDecl"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->Document</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Type/Class)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#t%3ADocument"->Text.XML.HaXml.Types</A->, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3ADocument"->Text.XML.HaXml.XmlContent.Parser</A->, Text.XML.HaXml.XmlContent, Text.XML.HaXml.XmlContent.Haskell, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexannot"->2 (Data Constructor)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#v%3ADocument"->Text.XML.HaXml.Types</A->, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#v%3ADocument"->Text.XML.HaXml.XmlContent.Parser</A->, Text.XML.HaXml.XmlContent, Text.XML.HaXml.XmlContent.Haskell, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->deep</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Combinators.html#v%3Adeep"->Text.XML.HaXml.Combinators</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexannot"->2 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Xtract-Combinators.html#v%3Adeep"->Text.XML.HaXml.Xtract.Combinators</A-></TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->deepest</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Combinators.html#v%3Adeepest"->Text.XML.HaXml.Combinators</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexannot"->2 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Xtract-Combinators.html#v%3Adeepest"->Text.XML.HaXml.Xtract.Combinators</A-></TD-></TR-><TR-><TD CLASS="indexentry"->defaultA</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-XmlContent-Parser.html#v%3AdefaultA"->Text.XML.HaXml.XmlContent.Parser</A->, Text.XML.HaXml.XmlContent, Text.XML.HaXml.XmlContent.Haskell</TD-></TR-><TR-><TD CLASS="indexentry"->defaultToAttr</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-XmlContent-Parser.html#v%3AdefaultToAttr"->Text.XML.HaXml.XmlContent.Parser</A->, Text.XML.HaXml.XmlContent, Text.XML.HaXml.XmlContent.Haskell</TD-></TR-><TR-><TD CLASS="indexentry"->definite</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-XmlContent-Parser.html#v%3Adefinite"->Text.XML.HaXml.XmlContent.Parser</A->, Text.XML.HaXml.XmlContent, Text.XML.HaXml.XmlContent.Haskell</TD-></TR-><TR-><TD CLASS="indexentry"->definiteA</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-XmlContent-Parser.html#v%3AdefiniteA"->Text.XML.HaXml.XmlContent.Parser</A->, Text.XML.HaXml.XmlContent, Text.XML.HaXml.XmlContent.Haskell</TD-></TR-><TR-><TD CLASS="indexentry"->dfilter</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Xtract-Combinators.html#v%3Adfilter"->Text.XML.HaXml.Xtract.Combinators</A-></TD-></TR-><TR-><TD CLASS="indexentry"->docContent</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Util.html#v%3AdocContent"->Text.XML.HaXml.Util</A-></TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->doctypedecl</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-ByteStringPP.html#v%3Adoctypedecl"->Text.XML.HaXml.ByteStringPP</A-></TD-></TR-><TR-><TD CLASS="indexannot"->2 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Parse.html#v%3Adoctypedecl"->Text.XML.HaXml.Parse</A-></TD-></TR-><TR-><TD CLASS="indexannot"->3 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-ParseLazy.html#v%3Adoctypedecl"->Text.XML.HaXml.ParseLazy</A-></TD-></TR-><TR-><TD CLASS="indexannot"->4 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Pretty.html#v%3Adoctypedecl"->Text.XML.HaXml.Pretty</A-></TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->document</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-ByteStringPP.html#v%3Adocument"->Text.XML.HaXml.ByteStringPP</A-></TD-></TR-><TR-><TD CLASS="indexannot"->2 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Html-Pretty.html#v%3Adocument"->Text.XML.HaXml.Html.Pretty</A-></TD-></TR-><TR-><TD CLASS="indexannot"->3 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Parse.html#v%3Adocument"->Text.XML.HaXml.Parse</A-></TD-></TR-><TR-><TD CLASS="indexannot"->4 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-ParseLazy.html#v%3Adocument"->Text.XML.HaXml.ParseLazy</A-></TD-></TR-><TR-><TD CLASS="indexannot"->5 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Pretty.html#v%3Adocument"->Text.XML.HaXml.Pretty</A-></TD-></TR-><TR-><TD CLASS="indexentry"->dtd2TypeDef</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-DtdToHaskell-Convert.html#v%3Adtd2TypeDef"->Text.XML.HaXml.DtdToHaskell.Convert</A-></TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->dtdParse</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Parse.html#v%3AdtdParse"->Text.XML.HaXml.Parse</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexannot"->2 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-ParseLazy.html#v%3AdtdParse"->Text.XML.HaXml.ParseLazy</A-></TD-></TR-><TR-><TD CLASS="indexentry"->dtdParse'</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Parse.html#v%3AdtdParse%27"->Text.XML.HaXml.Parse</A-></TD-></TR-></TABLE-></TD-></TR-></TABLE-></BODY-></HTML->
− docs/HaXml/doc-index-E.html
@@ -1,930 +0,0 @@-<!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->HaXml (Index)</TITLE-><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"-></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"->HaXml</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-><TABLE CELLPADDING="0" CELLSPACING="5"-><TR-><TD-><A HREF="doc-index-A.html"->A</A-></TD-><TD-><A HREF="doc-index-B.html"->B</A-></TD-><TD-><A HREF="doc-index-C.html"->C</A-></TD-><TD-><A HREF="doc-index-D.html"->D</A-></TD-><TD-><A HREF="doc-index-E.html"->E</A-></TD-><TD-><A HREF="doc-index-F.html"->F</A-></TD-><TD-><A HREF="doc-index-G.html"->G</A-></TD-><TD-><A HREF="doc-index-H.html"->H</A-></TD-><TD-><A HREF="doc-index-I.html"->I</A-></TD-><TD-><A HREF="doc-index-K.html"->K</A-></TD-><TD-><A HREF="doc-index-L.html"->L</A-></TD-><TD-><A HREF="doc-index-M.html"->M</A-></TD-><TD-><A HREF="doc-index-N.html"->N</A-></TD-><TD-><A HREF="doc-index-O.html"->O</A-></TD-><TD-><A HREF="doc-index-P.html"->P</A-></TD-><TD-><A HREF="doc-index-Q.html"->Q</A-></TD-><TD-><A HREF="doc-index-R.html"->R</A-></TD-><TD-><A HREF="doc-index-S.html"->S</A-></TD-><TD-><A HREF="doc-index-T.html"->T</A-></TD-><TD-><A HREF="doc-index-U.html"->U</A-></TD-><TD-><A HREF="doc-index-V.html"->V</A-></TD-><TD-><A HREF="doc-index-W.html"->W</A-></TD-><TD-><A HREF="doc-index-X.html"->X</A-></TD-><TD-><A HREF="doc-index-58.html"->:</A-></TD-><TD-><A HREF="doc-index-33.html"->!</A-></TD-><TD-><A HREF="doc-index-47.html"->/</A-></TD-><TD-><A HREF="doc-index-60.html"->&lt;</A-></TD-><TD-><A HREF="doc-index-63.html"->?</A-></TD-><TD-><A HREF="doc-index-124.html"->|</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section1"->Index (E)</TD-></TR-><TR-><TD-><TABLE CELLPADDING="0" CELLSPACING="5"-><TR-><TD CLASS="indexentry"->ELEMENTx</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Lex.html#v%3AELEMENTx"->Text.XML.HaXml.Lex</A-></TD-></TR-><TR-><TD CLASS="indexentry"->EMPTY</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#v%3AEMPTY"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->ENTITIES</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#v%3AENTITIES"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->ENTITY</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#v%3AENTITY"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->ENTITYx</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Lex.html#v%3AENTITYx"->Text.XML.HaXml.Lex</A-></TD-></TR-><TR-><TD CLASS="indexentry"->EV</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#t%3AEV"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->EVRef</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#v%3AEVRef"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->EVString</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#v%3AEVString"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->EightOf10</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AEightOf10"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->EightOf11</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AEightOf11"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->EightOf12</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AEightOf12"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->EightOf13</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AEightOf13"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->EightOf14</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AEightOf14"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->EightOf15</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AEightOf15"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->EightOf16</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AEightOf16"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->EightOf17</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AEightOf17"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->EightOf18</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AEightOf18"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->EightOf19</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AEightOf19"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->EightOf20</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AEightOf20"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->EightOf8</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AEightOf8"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->EightOf9</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AEightOf9"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->EighteenOf18</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AEighteenOf18"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->EighteenOf19</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AEighteenOf19"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->EighteenOf20</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AEighteenOf20"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->Elem</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#v%3AElem"->Text.XML.HaXml.Types</A->, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#v%3AElem"->Text.XML.HaXml.XmlContent.Parser</A->, Text.XML.HaXml.XmlContent, Text.XML.HaXml.XmlContent.Haskell, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->ElemTag</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Type/Class)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#t%3AElemTag"->Text.XML.HaXml.Types</A->, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AElemTag"->Text.XML.HaXml.XmlContent.Parser</A->, Text.XML.HaXml.XmlContent, Text.XML.HaXml.XmlContent.Haskell, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexannot"->2 (Data Constructor)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#v%3AElemTag"->Text.XML.HaXml.Types</A->, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#v%3AElemTag"->Text.XML.HaXml.XmlContent.Parser</A->, Text.XML.HaXml.XmlContent, Text.XML.HaXml.XmlContent.Haskell, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->Element</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Type/Class)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#t%3AElement"->Text.XML.HaXml.Types</A->, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AElement"->Text.XML.HaXml.XmlContent.Parser</A->, Text.XML.HaXml.XmlContent, Text.XML.HaXml.XmlContent.Haskell, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexannot"->2 (Data Constructor)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#v%3AElement"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->ElementDecl</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Type/Class)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#t%3AElementDecl"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexannot"->2 (Data Constructor)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#v%3AElementDecl"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->ElevenOf11</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AElevenOf11"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->ElevenOf12</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AElevenOf12"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->ElevenOf13</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AElevenOf13"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->ElevenOf14</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AElevenOf14"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->ElevenOf15</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AElevenOf15"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->ElevenOf16</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AElevenOf16"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->ElevenOf17</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AElevenOf17"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->ElevenOf18</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AElevenOf18"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->ElevenOf19</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AElevenOf19"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->ElevenOf20</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AElevenOf20"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->EncodingDecl</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Type/Class)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#t%3AEncodingDecl"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexannot"->2 (Data Constructor)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#v%3AEncodingDecl"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->Entity</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#v%3AEntity"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->EntityDecl</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#t%3AEntityDecl"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->EntityDef</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#t%3AEntityDef"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->EntityGEDecl</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#v%3AEntityGEDecl"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->EntityPEDecl</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#v%3AEntityPEDecl"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->EntityRef</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#t%3AEntityRef"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->EntityValue</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Type/Class)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#t%3AEntityValue"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexannot"->2 (Data Constructor)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#v%3AEntityValue"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->EnumDef</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-DtdToHaskell-TypeDef.html#v%3AEnumDef"->Text.XML.HaXml.DtdToHaskell.TypeDef</A-></TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->EnumeratedType</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Type/Class)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#t%3AEnumeratedType"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexannot"->2 (Data Constructor)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#v%3AEnumeratedType"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->Enumeration</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Type/Class)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#t%3AEnumeration"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexannot"->2 (Data Constructor)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#v%3AEnumeration"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->ExtConditionalSect</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#v%3AExtConditionalSect"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->ExtMarkupDecl</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#v%3AExtMarkupDecl"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->ExtPE</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Type/Class)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#t%3AExtPE"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexannot"->2 (Data Constructor)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#v%3AExtPE"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->ExtParsedEnt</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Type/Class)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#t%3AExtParsedEnt"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexannot"->2 (Data Constructor)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#v%3AExtParsedEnt"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->ExtSubset</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Type/Class)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#t%3AExtSubset"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexannot"->2 (Data Constructor)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#v%3AExtSubset"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->ExtSubsetDecl</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#t%3AExtSubsetDecl"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->ExternalID</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#t%3AExternalID"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->elemCloseTag</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Parse.html#v%3AelemCloseTag"->Text.XML.HaXml.Parse</A-></TD-></TR-><TR-><TD CLASS="indexannot"->2 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-ParseLazy.html#v%3AelemCloseTag"->Text.XML.HaXml.ParseLazy</A-></TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->elemOpenTag</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Parse.html#v%3AelemOpenTag"->Text.XML.HaXml.Parse</A-></TD-></TR-><TR-><TD CLASS="indexannot"->2 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-ParseLazy.html#v%3AelemOpenTag"->Text.XML.HaXml.ParseLazy</A-></TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->element</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-ByteStringPP.html#v%3Aelement"->Text.XML.HaXml.ByteStringPP</A-></TD-></TR-><TR-><TD CLASS="indexannot"->2 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Html-Pretty.html#v%3Aelement"->Text.XML.HaXml.Html.Pretty</A-></TD-></TR-><TR-><TD CLASS="indexannot"->3 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Parse.html#v%3Aelement"->Text.XML.HaXml.Parse</A-></TD-></TR-><TR-><TD CLASS="indexannot"->4 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-ParseLazy.html#v%3Aelement"->Text.XML.HaXml.ParseLazy</A-></TD-></TR-><TR-><TD CLASS="indexannot"->5 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Pretty.html#v%3Aelement"->Text.XML.HaXml.Pretty</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexannot"->6 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-XmlContent-Parser.html#v%3Aelement"->Text.XML.HaXml.XmlContent.Parser</A->, Text.XML.HaXml.XmlContent, Text.XML.HaXml.XmlContent.Haskell</TD-></TR-><TR-><TD CLASS="indexentry"->elementWith</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-XmlContent-Parser.html#v%3AelementWith"->Text.XML.HaXml.XmlContent.Parser</A->, Text.XML.HaXml.XmlContent, Text.XML.HaXml.XmlContent.Haskell</TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->elemtag</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Parse.html#v%3Aelemtag"->Text.XML.HaXml.Parse</A-></TD-></TR-><TR-><TD CLASS="indexannot"->2 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-ParseLazy.html#v%3Aelemtag"->Text.XML.HaXml.ParseLazy</A-></TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->elm</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Combinators.html#v%3Aelm"->Text.XML.HaXml.Combinators</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexannot"->2 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Xtract-Combinators.html#v%3Aelm"->Text.XML.HaXml.Xtract.Combinators</A-></TD-></TR-><TR-><TD CLASS="indexentry"->emptyST</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#v%3AemptyST"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->emptySTs</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Parse.html#v%3AemptySTs"->Text.XML.HaXml.Parse</A-></TD-></TR-><TR-><TD CLASS="indexannot"->2 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-ParseLazy.html#v%3AemptySTs"->Text.XML.HaXml.ParseLazy</A-></TD-></TR-><TR-><TD CLASS="indexentry"->et</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Combinators.html#v%3Aet"->Text.XML.HaXml.Combinators</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->extracted</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Combinators.html#v%3Aextracted"->Text.XML.HaXml.Combinators</A->, Text.XML.HaXml</TD-></TR-></TABLE-></TD-></TR-></TABLE-></BODY-></HTML->
− docs/HaXml/doc-index-F.html
@@ -1,754 +0,0 @@-<!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->HaXml (Index)</TITLE-><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"-></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"->HaXml</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-><TABLE CELLPADDING="0" CELLSPACING="5"-><TR-><TD-><A HREF="doc-index-A.html"->A</A-></TD-><TD-><A HREF="doc-index-B.html"->B</A-></TD-><TD-><A HREF="doc-index-C.html"->C</A-></TD-><TD-><A HREF="doc-index-D.html"->D</A-></TD-><TD-><A HREF="doc-index-E.html"->E</A-></TD-><TD-><A HREF="doc-index-F.html"->F</A-></TD-><TD-><A HREF="doc-index-G.html"->G</A-></TD-><TD-><A HREF="doc-index-H.html"->H</A-></TD-><TD-><A HREF="doc-index-I.html"->I</A-></TD-><TD-><A HREF="doc-index-K.html"->K</A-></TD-><TD-><A HREF="doc-index-L.html"->L</A-></TD-><TD-><A HREF="doc-index-M.html"->M</A-></TD-><TD-><A HREF="doc-index-N.html"->N</A-></TD-><TD-><A HREF="doc-index-O.html"->O</A-></TD-><TD-><A HREF="doc-index-P.html"->P</A-></TD-><TD-><A HREF="doc-index-Q.html"->Q</A-></TD-><TD-><A HREF="doc-index-R.html"->R</A-></TD-><TD-><A HREF="doc-index-S.html"->S</A-></TD-><TD-><A HREF="doc-index-T.html"->T</A-></TD-><TD-><A HREF="doc-index-U.html"->U</A-></TD-><TD-><A HREF="doc-index-V.html"->V</A-></TD-><TD-><A HREF="doc-index-W.html"->W</A-></TD-><TD-><A HREF="doc-index-X.html"->X</A-></TD-><TD-><A HREF="doc-index-58.html"->:</A-></TD-><TD-><A HREF="doc-index-33.html"->!</A-></TD-><TD-><A HREF="doc-index-47.html"->/</A-></TD-><TD-><A HREF="doc-index-60.html"->&lt;</A-></TD-><TD-><A HREF="doc-index-63.html"->?</A-></TD-><TD-><A HREF="doc-index-124.html"->|</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section1"->Index (F)</TD-></TR-><TR-><TD-><TABLE CELLPADDING="0" CELLSPACING="5"-><TR-><TD CLASS="indexentry" COLSPAN="2"->FIXED</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Type/Class)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#t%3AFIXED"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexannot"->2 (Data Constructor)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#v%3AFIXED"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->FifteenOf15</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AFifteenOf15"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->FifteenOf16</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AFifteenOf16"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->FifteenOf17</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AFifteenOf17"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->FifteenOf18</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AFifteenOf18"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->FifteenOf19</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AFifteenOf19"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->FifteenOf20</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AFifteenOf20"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->FiveOf10</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AFiveOf10"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->FiveOf11</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AFiveOf11"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->FiveOf12</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AFiveOf12"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->FiveOf13</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AFiveOf13"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->FiveOf14</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AFiveOf14"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->FiveOf15</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AFiveOf15"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->FiveOf16</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AFiveOf16"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->FiveOf17</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AFiveOf17"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->FiveOf18</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AFiveOf18"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->FiveOf19</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AFiveOf19"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->FiveOf20</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AFiveOf20"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->FiveOf5</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AFiveOf5"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->FiveOf6</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AFiveOf6"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->FiveOf7</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AFiveOf7"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->FiveOf8</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AFiveOf8"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->FiveOf9</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AFiveOf9"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->FourOf10</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AFourOf10"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->FourOf11</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AFourOf11"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->FourOf12</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AFourOf12"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->FourOf13</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AFourOf13"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->FourOf14</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AFourOf14"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->FourOf15</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AFourOf15"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->FourOf16</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AFourOf16"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->FourOf17</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AFourOf17"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->FourOf18</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AFourOf18"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->FourOf19</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AFourOf19"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->FourOf20</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AFourOf20"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->FourOf4</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AFourOf4"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->FourOf5</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AFourOf5"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->FourOf6</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AFourOf6"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->FourOf7</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AFourOf7"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->FourOf8</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AFourOf8"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->FourOf9</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AFourOf9"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->FourteenOf14</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AFourteenOf14"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->FourteenOf15</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AFourteenOf15"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->FourteenOf16</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AFourteenOf16"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->FourteenOf17</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AFourteenOf17"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->FourteenOf18</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AFourteenOf18"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->FourteenOf19</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AFourteenOf19"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->FourteenOf20</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AFourteenOf20"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->fReadXml</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-XmlContent.html#v%3AfReadXml"->Text.XML.HaXml.XmlContent</A-></TD-></TR-><TR-><TD CLASS="indexannot"->2 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-XmlContent-Haskell.html#v%3AfReadXml"->Text.XML.HaXml.XmlContent.Haskell</A-></TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->fWriteXml</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-XmlContent.html#v%3AfWriteXml"->Text.XML.HaXml.XmlContent</A-></TD-></TR-><TR-><TD CLASS="indexannot"->2 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-XmlContent-Haskell.html#v%3AfWriteXml"->Text.XML.HaXml.XmlContent.Haskell</A-></TD-></TR-><TR-><TD CLASS="indexentry"->find</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Combinators.html#v%3Afind"->Text.XML.HaXml.Combinators</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->fix2Args</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Wrappers.html#v%3Afix2Args"->Text.XML.HaXml.Wrappers</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->foldXml</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Combinators.html#v%3AfoldXml"->Text.XML.HaXml.Combinators</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->forcep</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Posn.html#v%3Aforcep"->Text.XML.HaXml.Posn</A-></TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->fpsHPutXml</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-XmlContent.html#v%3AfpsHPutXml"->Text.XML.HaXml.XmlContent</A-></TD-></TR-><TR-><TD CLASS="indexannot"->2 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-XmlContent-Haskell.html#v%3AfpsHPutXml"->Text.XML.HaXml.XmlContent.Haskell</A-></TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->fpsShowXml</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-XmlContent.html#v%3AfpsShowXml"->Text.XML.HaXml.XmlContent</A-></TD-></TR-><TR-><TD CLASS="indexannot"->2 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-XmlContent-Haskell.html#v%3AfpsShowXml"->Text.XML.HaXml.XmlContent.Haskell</A-></TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->fpsWriteXml</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-XmlContent.html#v%3AfpsWriteXml"->Text.XML.HaXml.XmlContent</A-></TD-></TR-><TR-><TD CLASS="indexannot"->2 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-XmlContent-Haskell.html#v%3AfpsWriteXml"->Text.XML.HaXml.XmlContent.Haskell</A-></TD-></TR-><TR-><TD CLASS="indexentry"->fromAttrToStr</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-XmlContent-Parser.html#v%3AfromAttrToStr"->Text.XML.HaXml.XmlContent.Parser</A->, Text.XML.HaXml.XmlContent, Text.XML.HaXml.XmlContent.Haskell</TD-></TR-><TR-><TD CLASS="indexentry"->fromAttrToTyp</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-XmlContent-Parser.html#v%3AfromAttrToTyp"->Text.XML.HaXml.XmlContent.Parser</A->, Text.XML.HaXml.XmlContent, Text.XML.HaXml.XmlContent.Haskell</TD-></TR-><TR-><TD CLASS="indexentry"->fromAttrs</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-XmlContent-Parser.html#v%3AfromAttrs"->Text.XML.HaXml.XmlContent.Parser</A->, Text.XML.HaXml.XmlContent, Text.XML.HaXml.XmlContent.Haskell</TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->fromXml</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-XmlContent.html#v%3AfromXml"->Text.XML.HaXml.XmlContent</A-></TD-></TR-><TR-><TD CLASS="indexannot"->2 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-XmlContent-Haskell.html#v%3AfromXml"->Text.XML.HaXml.XmlContent.Haskell</A-></TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->fst3</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Parse.html#v%3Afst3"->Text.XML.HaXml.Parse</A-></TD-></TR-><TR-><TD CLASS="indexannot"->2 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-ParseLazy.html#v%3Afst3"->Text.XML.HaXml.ParseLazy</A-></TD-></TR-></TABLE-></TD-></TR-></TABLE-></BODY-></HTML->
− docs/HaXml/doc-index-G.html
@@ -1,206 +0,0 @@-<!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->HaXml (Index)</TITLE-><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"-></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"->HaXml</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-><TABLE CELLPADDING="0" CELLSPACING="5"-><TR-><TD-><A HREF="doc-index-A.html"->A</A-></TD-><TD-><A HREF="doc-index-B.html"->B</A-></TD-><TD-><A HREF="doc-index-C.html"->C</A-></TD-><TD-><A HREF="doc-index-D.html"->D</A-></TD-><TD-><A HREF="doc-index-E.html"->E</A-></TD-><TD-><A HREF="doc-index-F.html"->F</A-></TD-><TD-><A HREF="doc-index-G.html"->G</A-></TD-><TD-><A HREF="doc-index-H.html"->H</A-></TD-><TD-><A HREF="doc-index-I.html"->I</A-></TD-><TD-><A HREF="doc-index-K.html"->K</A-></TD-><TD-><A HREF="doc-index-L.html"->L</A-></TD-><TD-><A HREF="doc-index-M.html"->M</A-></TD-><TD-><A HREF="doc-index-N.html"->N</A-></TD-><TD-><A HREF="doc-index-O.html"->O</A-></TD-><TD-><A HREF="doc-index-P.html"->P</A-></TD-><TD-><A HREF="doc-index-Q.html"->Q</A-></TD-><TD-><A HREF="doc-index-R.html"->R</A-></TD-><TD-><A HREF="doc-index-S.html"->S</A-></TD-><TD-><A HREF="doc-index-T.html"->T</A-></TD-><TD-><A HREF="doc-index-U.html"->U</A-></TD-><TD-><A HREF="doc-index-V.html"->V</A-></TD-><TD-><A HREF="doc-index-W.html"->W</A-></TD-><TD-><A HREF="doc-index-X.html"->X</A-></TD-><TD-><A HREF="doc-index-58.html"->:</A-></TD-><TD-><A HREF="doc-index-33.html"->!</A-></TD-><TD-><A HREF="doc-index-47.html"->/</A-></TD-><TD-><A HREF="doc-index-60.html"->&lt;</A-></TD-><TD-><A HREF="doc-index-63.html"->?</A-></TD-><TD-><A HREF="doc-index-124.html"->|</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section1"->Index (G)</TD-></TR-><TR-><TD-><TABLE CELLPADDING="0" CELLSPACING="5"-><TR-><TD CLASS="indexentry" COLSPAN="2"->GEDecl</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Type/Class)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#t%3AGEDecl"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexannot"->2 (Data Constructor)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#v%3AGEDecl"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->global</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Xtract-Combinators.html#v%3Aglobal"->Text.XML.HaXml.Xtract.Combinators</A-></TD-></TR-><TR-><TD CLASS="indexentry"->guards</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Combinators.html#v%3Aguards"->Text.XML.HaXml.Combinators</A->, Text.XML.HaXml</TD-></TR-></TABLE-></TD-></TR-></TABLE-></BODY-></HTML->
− docs/HaXml/doc-index-H.html
@@ -1,430 +0,0 @@-<!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->HaXml (Index)</TITLE-><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"-></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"->HaXml</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-><TABLE CELLPADDING="0" CELLSPACING="5"-><TR-><TD-><A HREF="doc-index-A.html"->A</A-></TD-><TD-><A HREF="doc-index-B.html"->B</A-></TD-><TD-><A HREF="doc-index-C.html"->C</A-></TD-><TD-><A HREF="doc-index-D.html"->D</A-></TD-><TD-><A HREF="doc-index-E.html"->E</A-></TD-><TD-><A HREF="doc-index-F.html"->F</A-></TD-><TD-><A HREF="doc-index-G.html"->G</A-></TD-><TD-><A HREF="doc-index-H.html"->H</A-></TD-><TD-><A HREF="doc-index-I.html"->I</A-></TD-><TD-><A HREF="doc-index-K.html"->K</A-></TD-><TD-><A HREF="doc-index-L.html"->L</A-></TD-><TD-><A HREF="doc-index-M.html"->M</A-></TD-><TD-><A HREF="doc-index-N.html"->N</A-></TD-><TD-><A HREF="doc-index-O.html"->O</A-></TD-><TD-><A HREF="doc-index-P.html"->P</A-></TD-><TD-><A HREF="doc-index-Q.html"->Q</A-></TD-><TD-><A HREF="doc-index-R.html"->R</A-></TD-><TD-><A HREF="doc-index-S.html"->S</A-></TD-><TD-><A HREF="doc-index-T.html"->T</A-></TD-><TD-><A HREF="doc-index-U.html"->U</A-></TD-><TD-><A HREF="doc-index-V.html"->V</A-></TD-><TD-><A HREF="doc-index-W.html"->W</A-></TD-><TD-><A HREF="doc-index-X.html"->X</A-></TD-><TD-><A HREF="doc-index-58.html"->:</A-></TD-><TD-><A HREF="doc-index-33.html"->!</A-></TD-><TD-><A HREF="doc-index-47.html"->/</A-></TD-><TD-><A HREF="doc-index-60.html"->&lt;</A-></TD-><TD-><A HREF="doc-index-63.html"->?</A-></TD-><TD-><A HREF="doc-index-124.html"->|</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section1"->Index (H)</TD-></TR-><TR-><TD-><TABLE CELLPADDING="0" CELLSPACING="5"-><TR-><TD CLASS="indexentry"->HType</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHType"->Text.XML.HaXml.TypeMapping</A->, Text.XML.HaXml.XmlContent.Parser, Text.XML.HaXml.XmlContent, Text.XML.HaXml.XmlContent.Haskell</TD-></TR-><TR-><TD CLASS="indexentry"->HTypeable</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-TypeMapping.html#t%3AHTypeable"->Text.XML.HaXml.TypeMapping</A->, Text.XML.HaXml.XmlContent.Parser, Text.XML.HaXml.XmlContent, Text.XML.HaXml.XmlContent.Haskell</TD-></TR-><TR-><TD CLASS="indexentry"->h1</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Html-Generate.html#v%3Ah1"->Text.XML.HaXml.Html.Generate</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->h2</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Html-Generate.html#v%3Ah2"->Text.XML.HaXml.Html.Generate</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->h3</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Html-Generate.html#v%3Ah3"->Text.XML.HaXml.Html.Generate</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->h4</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Html-Generate.html#v%3Ah4"->Text.XML.HaXml.Html.Generate</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->hGetXml</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-XmlContent.html#v%3AhGetXml"->Text.XML.HaXml.XmlContent</A-></TD-></TR-><TR-><TD CLASS="indexannot"->2 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-XmlContent-Haskell.html#v%3AhGetXml"->Text.XML.HaXml.XmlContent.Haskell</A-></TD-></TR-><TR-><TD CLASS="indexentry"->hName</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-DtdToHaskell-TypeDef.html#v%3AhName"->Text.XML.HaXml.DtdToHaskell.TypeDef</A-></TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->hPutXml</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-XmlContent.html#v%3AhPutXml"->Text.XML.HaXml.XmlContent</A-></TD-></TR-><TR-><TD CLASS="indexannot"->2 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-XmlContent-Haskell.html#v%3AhPutXml"->Text.XML.HaXml.XmlContent.Haskell</A-></TD-></TR-><TR-><TD CLASS="indexentry"->hbody</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Html-Generate.html#v%3Ahbody"->Text.XML.HaXml.Html.Generate</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->hbold</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Html-Generate.html#v%3Ahbold"->Text.XML.HaXml.Html.Generate</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->hbr</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Html-Generate.html#v%3Ahbr"->Text.XML.HaXml.Html.Generate</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->hcentre</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Html-Generate.html#v%3Ahcentre"->Text.XML.HaXml.Html.Generate</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->hcol</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Html-Generate.html#v%3Ahcol"->Text.XML.HaXml.Html.Generate</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->hdiv</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Html-Generate.html#v%3Ahdiv"->Text.XML.HaXml.Html.Generate</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->hem</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Html-Generate.html#v%3Ahem"->Text.XML.HaXml.Html.Generate</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->hhead</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Html-Generate.html#v%3Ahhead"->Text.XML.HaXml.Html.Generate</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->hhr</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Html-Generate.html#v%3Ahhr"->Text.XML.HaXml.Html.Generate</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->hpara</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Html-Generate.html#v%3Ahpara"->Text.XML.HaXml.Html.Generate</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->hpre</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Html-Generate.html#v%3Ahpre"->Text.XML.HaXml.Html.Generate</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->hrow</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Html-Generate.html#v%3Ahrow"->Text.XML.HaXml.Html.Generate</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->hspan</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Html-Generate.html#v%3Ahspan"->Text.XML.HaXml.Html.Generate</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->htable</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Html-Generate.html#v%3Ahtable"->Text.XML.HaXml.Html.Generate</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->htitle</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Html-Generate.html#v%3Ahtitle"->Text.XML.HaXml.Html.Generate</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->html</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Html-Generate.html#v%3Ahtml"->Text.XML.HaXml.Html.Generate</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->htmlParse</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Html-Parse.html#v%3AhtmlParse"->Text.XML.HaXml.Html.Parse</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexannot"->2 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Html-ParseLazy.html#v%3AhtmlParse"->Text.XML.HaXml.Html.ParseLazy</A-></TD-></TR-><TR-><TD CLASS="indexentry"->htmlprint</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Html-Generate.html#v%3Ahtmlprint"->Text.XML.HaXml.Html.Generate</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->htt</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Html-Generate.html#v%3Ahtt"->Text.XML.HaXml.Html.Generate</A->, Text.XML.HaXml</TD-></TR-></TABLE-></TD-></TR-></TABLE-></BODY-></HTML->
− docs/HaXml/doc-index-I.html
@@ -1,386 +0,0 @@-<!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->HaXml (Index)</TITLE-><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"-></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"->HaXml</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-><TABLE CELLPADDING="0" CELLSPACING="5"-><TR-><TD-><A HREF="doc-index-A.html"->A</A-></TD-><TD-><A HREF="doc-index-B.html"->B</A-></TD-><TD-><A HREF="doc-index-C.html"->C</A-></TD-><TD-><A HREF="doc-index-D.html"->D</A-></TD-><TD-><A HREF="doc-index-E.html"->E</A-></TD-><TD-><A HREF="doc-index-F.html"->F</A-></TD-><TD-><A HREF="doc-index-G.html"->G</A-></TD-><TD-><A HREF="doc-index-H.html"->H</A-></TD-><TD-><A HREF="doc-index-I.html"->I</A-></TD-><TD-><A HREF="doc-index-K.html"->K</A-></TD-><TD-><A HREF="doc-index-L.html"->L</A-></TD-><TD-><A HREF="doc-index-M.html"->M</A-></TD-><TD-><A HREF="doc-index-N.html"->N</A-></TD-><TD-><A HREF="doc-index-O.html"->O</A-></TD-><TD-><A HREF="doc-index-P.html"->P</A-></TD-><TD-><A HREF="doc-index-Q.html"->Q</A-></TD-><TD-><A HREF="doc-index-R.html"->R</A-></TD-><TD-><A HREF="doc-index-S.html"->S</A-></TD-><TD-><A HREF="doc-index-T.html"->T</A-></TD-><TD-><A HREF="doc-index-U.html"->U</A-></TD-><TD-><A HREF="doc-index-V.html"->V</A-></TD-><TD-><A HREF="doc-index-W.html"->W</A-></TD-><TD-><A HREF="doc-index-X.html"->X</A-></TD-><TD-><A HREF="doc-index-58.html"->:</A-></TD-><TD-><A HREF="doc-index-33.html"->!</A-></TD-><TD-><A HREF="doc-index-47.html"->/</A-></TD-><TD-><A HREF="doc-index-60.html"->&lt;</A-></TD-><TD-><A HREF="doc-index-63.html"->?</A-></TD-><TD-><A HREF="doc-index-124.html"->|</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section1"->Index (I)</TD-></TR-><TR-><TD-><TABLE CELLPADDING="0" CELLSPACING="5"-><TR-><TD CLASS="indexentry"->ID</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#v%3AID"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->IDREF</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#v%3AIDREF"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->IDREFS</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#v%3AIDREFS"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->IGNOREx</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Lex.html#v%3AIGNOREx"->Text.XML.HaXml.Lex</A-></TD-></TR-><TR-><TD CLASS="indexentry"->IMPLIED</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#v%3AIMPLIED"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->INCLUDEx</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Lex.html#v%3AINCLUDEx"->Text.XML.HaXml.Lex</A-></TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->Ignore</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Type/Class)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#t%3AIgnore"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexannot"->2 (Data Constructor)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#v%3AIgnore"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->IgnoreSect</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Type/Class)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#t%3AIgnoreSect"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexannot"->2 (Data Constructor)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#v%3AIgnoreSect"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->IgnoreSectContents</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Type/Class)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#t%3AIgnoreSectContents"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexannot"->2 (Data Constructor)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#v%3AIgnoreSectContents"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->IncludeSect</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Type/Class)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#t%3AIncludeSect"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexannot"->2 (Data Constructor)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#v%3AIncludeSect"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->ifTxt</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Combinators.html#v%3AifTxt"->Text.XML.HaXml.Combinators</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexannot"->2 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Xtract-Combinators.html#v%3AifTxt"->Text.XML.HaXml.Xtract.Combinators</A-></TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->iffind</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Combinators.html#v%3Aiffind"->Text.XML.HaXml.Combinators</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexannot"->2 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Xtract-Combinators.html#v%3Aiffind"->Text.XML.HaXml.Xtract.Combinators</A-></TD-></TR-><TR-><TD CLASS="indexentry"->inElement</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-XmlContent-Parser.html#v%3AinElement"->Text.XML.HaXml.XmlContent.Parser</A->, Text.XML.HaXml.XmlContent, Text.XML.HaXml.XmlContent.Haskell</TD-></TR-><TR-><TD CLASS="indexentry"->inElementWith</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-XmlContent-Parser.html#v%3AinElementWith"->Text.XML.HaXml.XmlContent.Parser</A->, Text.XML.HaXml.XmlContent, Text.XML.HaXml.XmlContent.Haskell</TD-></TR-><TR-><TD CLASS="indexentry"->info</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#v%3Ainfo"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->inplace</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Combinators.html#v%3Ainplace"->Text.XML.HaXml.Combinators</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->interior</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-XmlContent-Parser.html#v%3Ainterior"->Text.XML.HaXml.XmlContent.Parser</A->, Text.XML.HaXml.XmlContent, Text.XML.HaXml.XmlContent.Haskell</TD-></TR-><TR-><TD CLASS="indexentry"->interspersed</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Combinators.html#v%3Ainterspersed"->Text.XML.HaXml.Combinators</A->, Text.XML.HaXml</TD-></TR-></TABLE-></TD-></TR-></TABLE-></BODY-></HTML->
− docs/HaXml/doc-index-K.html
@@ -1,190 +0,0 @@-<!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->HaXml (Index)</TITLE-><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"-></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"->HaXml</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-><TABLE CELLPADDING="0" CELLSPACING="5"-><TR-><TD-><A HREF="doc-index-A.html"->A</A-></TD-><TD-><A HREF="doc-index-B.html"->B</A-></TD-><TD-><A HREF="doc-index-C.html"->C</A-></TD-><TD-><A HREF="doc-index-D.html"->D</A-></TD-><TD-><A HREF="doc-index-E.html"->E</A-></TD-><TD-><A HREF="doc-index-F.html"->F</A-></TD-><TD-><A HREF="doc-index-G.html"->G</A-></TD-><TD-><A HREF="doc-index-H.html"->H</A-></TD-><TD-><A HREF="doc-index-I.html"->I</A-></TD-><TD-><A HREF="doc-index-K.html"->K</A-></TD-><TD-><A HREF="doc-index-L.html"->L</A-></TD-><TD-><A HREF="doc-index-M.html"->M</A-></TD-><TD-><A HREF="doc-index-N.html"->N</A-></TD-><TD-><A HREF="doc-index-O.html"->O</A-></TD-><TD-><A HREF="doc-index-P.html"->P</A-></TD-><TD-><A HREF="doc-index-Q.html"->Q</A-></TD-><TD-><A HREF="doc-index-R.html"->R</A-></TD-><TD-><A HREF="doc-index-S.html"->S</A-></TD-><TD-><A HREF="doc-index-T.html"->T</A-></TD-><TD-><A HREF="doc-index-U.html"->U</A-></TD-><TD-><A HREF="doc-index-V.html"->V</A-></TD-><TD-><A HREF="doc-index-W.html"->W</A-></TD-><TD-><A HREF="doc-index-X.html"->X</A-></TD-><TD-><A HREF="doc-index-58.html"->:</A-></TD-><TD-><A HREF="doc-index-33.html"->!</A-></TD-><TD-><A HREF="doc-index-47.html"->/</A-></TD-><TD-><A HREF="doc-index-60.html"->&lt;</A-></TD-><TD-><A HREF="doc-index-63.html"->?</A-></TD-><TD-><A HREF="doc-index-124.html"->|</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section1"->Index (K)</TD-></TR-><TR-><TD-><TABLE CELLPADDING="0" CELLSPACING="5"-><TR-><TD CLASS="indexentry" COLSPAN="2"->keep</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Combinators.html#v%3Akeep"->Text.XML.HaXml.Combinators</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexannot"->2 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Xtract-Combinators.html#v%3Akeep"->Text.XML.HaXml.Xtract.Combinators</A-></TD-></TR-></TABLE-></TD-></TR-></TABLE-></BODY-></HTML->
− docs/HaXml/doc-index-L.html
@@ -1,266 +0,0 @@-<!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->HaXml (Index)</TITLE-><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"-></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"->HaXml</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-><TABLE CELLPADDING="0" CELLSPACING="5"-><TR-><TD-><A HREF="doc-index-A.html"->A</A-></TD-><TD-><A HREF="doc-index-B.html"->B</A-></TD-><TD-><A HREF="doc-index-C.html"->C</A-></TD-><TD-><A HREF="doc-index-D.html"->D</A-></TD-><TD-><A HREF="doc-index-E.html"->E</A-></TD-><TD-><A HREF="doc-index-F.html"->F</A-></TD-><TD-><A HREF="doc-index-G.html"->G</A-></TD-><TD-><A HREF="doc-index-H.html"->H</A-></TD-><TD-><A HREF="doc-index-I.html"->I</A-></TD-><TD-><A HREF="doc-index-K.html"->K</A-></TD-><TD-><A HREF="doc-index-L.html"->L</A-></TD-><TD-><A HREF="doc-index-M.html"->M</A-></TD-><TD-><A HREF="doc-index-N.html"->N</A-></TD-><TD-><A HREF="doc-index-O.html"->O</A-></TD-><TD-><A HREF="doc-index-P.html"->P</A-></TD-><TD-><A HREF="doc-index-Q.html"->Q</A-></TD-><TD-><A HREF="doc-index-R.html"->R</A-></TD-><TD-><A HREF="doc-index-S.html"->S</A-></TD-><TD-><A HREF="doc-index-T.html"->T</A-></TD-><TD-><A HREF="doc-index-U.html"->U</A-></TD-><TD-><A HREF="doc-index-V.html"->V</A-></TD-><TD-><A HREF="doc-index-W.html"->W</A-></TD-><TD-><A HREF="doc-index-X.html"->X</A-></TD-><TD-><A HREF="doc-index-58.html"->:</A-></TD-><TD-><A HREF="doc-index-33.html"->!</A-></TD-><TD-><A HREF="doc-index-47.html"->/</A-></TD-><TD-><A HREF="doc-index-60.html"->&lt;</A-></TD-><TD-><A HREF="doc-index-63.html"->?</A-></TD-><TD-><A HREF="doc-index-124.html"->|</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section1"->Index (L)</TD-></TR-><TR-><TD-><TABLE CELLPADDING="0" CELLSPACING="5"-><TR-><TD CLASS="indexentry"->LabelFilter</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Combinators.html#t%3ALabelFilter"->Text.XML.HaXml.Combinators</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->List</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Data Constructor)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-DtdToHaskell-TypeDef.html#v%3AList"->Text.XML.HaXml.DtdToHaskell.TypeDef</A-></TD-></TR-><TR-><TD CLASS="indexannot"->2 (Data Constructor)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-TypeMapping.html#v%3AList"->Text.XML.HaXml.TypeMapping</A->, Text.XML.HaXml.XmlContent.Parser, Text.XML.HaXml.XmlContent, Text.XML.HaXml.XmlContent.Haskell</TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->List1</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Data Constructor)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-DtdToHaskell-TypeDef.html#v%3AList1"->Text.XML.HaXml.DtdToHaskell.TypeDef</A-></TD-></TR-><TR-><TD CLASS="indexannot"->2 (Type/Class)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AList1"->Text.XML.HaXml.XmlContent.Parser</A->, Text.XML.HaXml.XmlContent, Text.XML.HaXml.XmlContent.Haskell</TD-></TR-><TR-><TD CLASS="indexentry"->lexXtract</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Xtract-Lex.html#v%3AlexXtract"->Text.XML.HaXml.Xtract.Lex</A-></TD-></TR-><TR-><TD CLASS="indexentry"->liftGlobal</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Xtract-Combinators.html#v%3AliftGlobal"->Text.XML.HaXml.Xtract.Combinators</A-></TD-></TR-><TR-><TD CLASS="indexentry"->liftLocal</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Xtract-Combinators.html#v%3AliftLocal"->Text.XML.HaXml.Xtract.Combinators</A-></TD-></TR-><TR-><TD CLASS="indexentry"->literal</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Combinators.html#v%3Aliteral"->Text.XML.HaXml.Combinators</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->local</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Xtract-Combinators.html#v%3Alocal"->Text.XML.HaXml.Xtract.Combinators</A-></TD-></TR-><TR-><TD CLASS="indexentry"->lookupST</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#v%3AlookupST"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-></TABLE-></TD-></TR-></TABLE-></BODY-></HTML->
− docs/HaXml/doc-index-M.html
@@ -1,362 +0,0 @@-<!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->HaXml (Index)</TITLE-><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"-></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"->HaXml</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-><TABLE CELLPADDING="0" CELLSPACING="5"-><TR-><TD-><A HREF="doc-index-A.html"->A</A-></TD-><TD-><A HREF="doc-index-B.html"->B</A-></TD-><TD-><A HREF="doc-index-C.html"->C</A-></TD-><TD-><A HREF="doc-index-D.html"->D</A-></TD-><TD-><A HREF="doc-index-E.html"->E</A-></TD-><TD-><A HREF="doc-index-F.html"->F</A-></TD-><TD-><A HREF="doc-index-G.html"->G</A-></TD-><TD-><A HREF="doc-index-H.html"->H</A-></TD-><TD-><A HREF="doc-index-I.html"->I</A-></TD-><TD-><A HREF="doc-index-K.html"->K</A-></TD-><TD-><A HREF="doc-index-L.html"->L</A-></TD-><TD-><A HREF="doc-index-M.html"->M</A-></TD-><TD-><A HREF="doc-index-N.html"->N</A-></TD-><TD-><A HREF="doc-index-O.html"->O</A-></TD-><TD-><A HREF="doc-index-P.html"->P</A-></TD-><TD-><A HREF="doc-index-Q.html"->Q</A-></TD-><TD-><A HREF="doc-index-R.html"->R</A-></TD-><TD-><A HREF="doc-index-S.html"->S</A-></TD-><TD-><A HREF="doc-index-T.html"->T</A-></TD-><TD-><A HREF="doc-index-U.html"->U</A-></TD-><TD-><A HREF="doc-index-V.html"->V</A-></TD-><TD-><A HREF="doc-index-W.html"->W</A-></TD-><TD-><A HREF="doc-index-X.html"->X</A-></TD-><TD-><A HREF="doc-index-58.html"->:</A-></TD-><TD-><A HREF="doc-index-33.html"->!</A-></TD-><TD-><A HREF="doc-index-47.html"->/</A-></TD-><TD-><A HREF="doc-index-60.html"->&lt;</A-></TD-><TD-><A HREF="doc-index-63.html"->?</A-></TD-><TD-><A HREF="doc-index-124.html"->|</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section1"->Index (M)</TD-></TR-><TR-><TD-><TABLE CELLPADDING="0" CELLSPACING="5"-><TR-><TD CLASS="indexentry"->MarkupDecl</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#t%3AMarkupDecl"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->MarkupMisc</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#v%3AMarkupMisc"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->Maybe</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Data Constructor)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-DtdToHaskell-TypeDef.html#v%3AMaybe"->Text.XML.HaXml.DtdToHaskell.TypeDef</A-></TD-></TR-><TR-><TD CLASS="indexannot"->2 (Data Constructor)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-TypeMapping.html#v%3AMaybe"->Text.XML.HaXml.TypeMapping</A->, Text.XML.HaXml.XmlContent.Parser, Text.XML.HaXml.XmlContent, Text.XML.HaXml.XmlContent.Haskell</TD-></TR-><TR-><TD CLASS="indexentry"->Misc</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#t%3AMisc"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->Mixed</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Type/Class)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#t%3AMixed"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexannot"->2 (Data Constructor)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#v%3AMixed"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->Modifier</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#t%3AModifier"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->makehref</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Html-Generate.html#v%3Amakehref"->Text.XML.HaXml.Html.Generate</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->mangle</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-DtdToHaskell-TypeDef.html#v%3Amangle"->Text.XML.HaXml.DtdToHaskell.TypeDef</A-></TD-></TR-><TR-><TD CLASS="indexentry"->manglef</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-DtdToHaskell-TypeDef.html#v%3Amanglef"->Text.XML.HaXml.DtdToHaskell.TypeDef</A-></TD-></TR-><TR-><TD CLASS="indexentry"->margin</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Html-Generate.html#v%3Amargin"->Text.XML.HaXml.Html.Generate</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->maybeToAttr</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-XmlContent-Parser.html#v%3AmaybeToAttr"->Text.XML.HaXml.XmlContent.Parser</A->, Text.XML.HaXml.XmlContent, Text.XML.HaXml.XmlContent.Haskell</TD-></TR-><TR-><TD CLASS="indexentry"->mkAttr</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-XmlContent-Parser.html#v%3AmkAttr"->Text.XML.HaXml.XmlContent.Parser</A->, Text.XML.HaXml.XmlContent, Text.XML.HaXml.XmlContent.Haskell</TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->mkElem</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Combinators.html#v%3AmkElem"->Text.XML.HaXml.Combinators</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexannot"->2 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-XmlContent-Parser.html#v%3AmkElem"->Text.XML.HaXml.XmlContent.Parser</A->, Text.XML.HaXml.XmlContent, Text.XML.HaXml.XmlContent.Haskell</TD-></TR-><TR-><TD CLASS="indexentry"->mkElemAttr</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Combinators.html#v%3AmkElemAttr"->Text.XML.HaXml.Combinators</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->mkElemC</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-XmlContent-Parser.html#v%3AmkElemC"->Text.XML.HaXml.XmlContent.Parser</A->, Text.XML.HaXml.XmlContent, Text.XML.HaXml.XmlContent.Haskell</TD-></TR-><TR-><TD CLASS="indexentry"->mkInstance</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-DtdToHaskell-Instance.html#v%3AmkInstance"->Text.XML.HaXml.DtdToHaskell.Instance</A-></TD-></TR-><TR-><TD CLASS="indexentry"->mkXmlEscaper</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Escape.html#v%3AmkXmlEscaper"->Text.XML.HaXml.Escape</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->multi</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Combinators.html#v%3Amulti"->Text.XML.HaXml.Combinators</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexannot"->2 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Xtract-Combinators.html#v%3Amulti"->Text.XML.HaXml.Xtract.Combinators</A-></TD-></TR-></TABLE-></TD-></TR-></TABLE-></BODY-></HTML->
− docs/HaXml/doc-index-N.html
@@ -1,546 +0,0 @@-<!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->HaXml (Index)</TITLE-><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"-></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"->HaXml</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-><TABLE CELLPADDING="0" CELLSPACING="5"-><TR-><TD-><A HREF="doc-index-A.html"->A</A-></TD-><TD-><A HREF="doc-index-B.html"->B</A-></TD-><TD-><A HREF="doc-index-C.html"->C</A-></TD-><TD-><A HREF="doc-index-D.html"->D</A-></TD-><TD-><A HREF="doc-index-E.html"->E</A-></TD-><TD-><A HREF="doc-index-F.html"->F</A-></TD-><TD-><A HREF="doc-index-G.html"->G</A-></TD-><TD-><A HREF="doc-index-H.html"->H</A-></TD-><TD-><A HREF="doc-index-I.html"->I</A-></TD-><TD-><A HREF="doc-index-K.html"->K</A-></TD-><TD-><A HREF="doc-index-L.html"->L</A-></TD-><TD-><A HREF="doc-index-M.html"->M</A-></TD-><TD-><A HREF="doc-index-N.html"->N</A-></TD-><TD-><A HREF="doc-index-O.html"->O</A-></TD-><TD-><A HREF="doc-index-P.html"->P</A-></TD-><TD-><A HREF="doc-index-Q.html"->Q</A-></TD-><TD-><A HREF="doc-index-R.html"->R</A-></TD-><TD-><A HREF="doc-index-S.html"->S</A-></TD-><TD-><A HREF="doc-index-T.html"->T</A-></TD-><TD-><A HREF="doc-index-U.html"->U</A-></TD-><TD-><A HREF="doc-index-V.html"->V</A-></TD-><TD-><A HREF="doc-index-W.html"->W</A-></TD-><TD-><A HREF="doc-index-X.html"->X</A-></TD-><TD-><A HREF="doc-index-58.html"->:</A-></TD-><TD-><A HREF="doc-index-33.html"->!</A-></TD-><TD-><A HREF="doc-index-47.html"->/</A-></TD-><TD-><A HREF="doc-index-60.html"->&lt;</A-></TD-><TD-><A HREF="doc-index-63.html"->?</A-></TD-><TD-><A HREF="doc-index-124.html"->|</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section1"->Index (N)</TD-></TR-><TR-><TD-><TABLE CELLPADDING="0" CELLSPACING="5"-><TR-><TD CLASS="indexentry"->NDATA</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#v%3ANDATA"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->NDataDecl</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#t%3ANDataDecl"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->NMTOKEN</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#v%3ANMTOKEN"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->NMTOKENS</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#v%3ANMTOKENS"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->NOTATION</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#v%3ANOTATION"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->NOTATIONx</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Lex.html#v%3ANOTATIONx"->Text.XML.HaXml.Lex</A-></TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->Name</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Type/Class)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-DtdToHaskell-TypeDef.html#t%3AName"->Text.XML.HaXml.DtdToHaskell.TypeDef</A-></TD-></TR-><TR-><TD CLASS="indexannot"->2 (Data Constructor)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-DtdToHaskell-TypeDef.html#v%3AName"->Text.XML.HaXml.DtdToHaskell.TypeDef</A-></TD-></TR-><TR-><TD CLASS="indexannot"->3 (Type/Class)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#t%3AName"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->Names</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#t%3ANames"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->NineOf10</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3ANineOf10"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->NineOf11</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3ANineOf11"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->NineOf12</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3ANineOf12"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->NineOf13</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3ANineOf13"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->NineOf14</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3ANineOf14"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->NineOf15</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3ANineOf15"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->NineOf16</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3ANineOf16"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->NineOf17</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3ANineOf17"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->NineOf18</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3ANineOf18"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->NineOf19</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3ANineOf19"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->NineOf20</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3ANineOf20"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->NineOf9</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3ANineOf9"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->NineteenOf19</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3ANineteenOf19"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->NineteenOf20</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3ANineteenOf20"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->NmToken</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#t%3ANmToken"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->NmTokens</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#t%3ANmTokens"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->NonDefault</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-XmlContent-Parser.html#v%3ANonDefault"->Text.XML.HaXml.XmlContent.Parser</A->, Text.XML.HaXml.XmlContent, Text.XML.HaXml.XmlContent.Haskell</TD-></TR-><TR-><TD CLASS="indexentry"->NonEmpty</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-XmlContent-Parser.html#v%3ANonEmpty"->Text.XML.HaXml.XmlContent.Parser</A->, Text.XML.HaXml.XmlContent, Text.XML.HaXml.XmlContent.Haskell</TD-></TR-><TR-><TD CLASS="indexentry"->None</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#v%3ANone"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->Notation</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#v%3ANotation"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->NotationDecl</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#t%3ANotationDecl"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->NotationType</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Type/Class)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#t%3ANotationType"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexannot"->2 (Data Constructor)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#v%3ANotationType"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->name</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-DtdToHaskell-TypeDef.html#v%3Aname"->Text.XML.HaXml.DtdToHaskell.TypeDef</A-></TD-></TR-><TR-><TD CLASS="indexannot"->2 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Parse.html#v%3Aname"->Text.XML.HaXml.Parse</A-></TD-></TR-><TR-><TD CLASS="indexannot"->3 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-ParseLazy.html#v%3Aname"->Text.XML.HaXml.ParseLazy</A-></TD-></TR-><TR-><TD CLASS="indexentry"->name_</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-DtdToHaskell-TypeDef.html#v%3Aname_"->Text.XML.HaXml.DtdToHaskell.TypeDef</A-></TD-></TR-><TR-><TD CLASS="indexentry"->name_a</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-DtdToHaskell-TypeDef.html#v%3Aname_a"->Text.XML.HaXml.DtdToHaskell.TypeDef</A-></TD-></TR-><TR-><TD CLASS="indexentry"->name_ac</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-DtdToHaskell-TypeDef.html#v%3Aname_ac"->Text.XML.HaXml.DtdToHaskell.TypeDef</A-></TD-></TR-><TR-><TD CLASS="indexentry"->name_f</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-DtdToHaskell-TypeDef.html#v%3Aname_f"->Text.XML.HaXml.DtdToHaskell.TypeDef</A-></TD-></TR-><TR-><TD CLASS="indexentry"->newline</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Posn.html#v%3Anewline"->Text.XML.HaXml.Posn</A-></TD-></TR-><TR-><TD CLASS="indexentry"->noPos</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Posn.html#v%3AnoPos"->Text.XML.HaXml.Posn</A-></TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->none</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Combinators.html#v%3Anone"->Text.XML.HaXml.Combinators</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexannot"->2 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Xtract-Combinators.html#v%3Anone"->Text.XML.HaXml.Xtract.Combinators</A-></TD-></TR-><TR-><TD CLASS="indexentry"->numbered</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Combinators.html#v%3Anumbered"->Text.XML.HaXml.Combinators</A->, Text.XML.HaXml</TD-></TR-></TABLE-></TD-></TR-></TABLE-></BODY-></HTML->
− docs/HaXml/doc-index-O.html
@@ -1,594 +0,0 @@-<!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->HaXml (Index)</TITLE-><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"-></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"->HaXml</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-><TABLE CELLPADDING="0" CELLSPACING="5"-><TR-><TD-><A HREF="doc-index-A.html"->A</A-></TD-><TD-><A HREF="doc-index-B.html"->B</A-></TD-><TD-><A HREF="doc-index-C.html"->C</A-></TD-><TD-><A HREF="doc-index-D.html"->D</A-></TD-><TD-><A HREF="doc-index-E.html"->E</A-></TD-><TD-><A HREF="doc-index-F.html"->F</A-></TD-><TD-><A HREF="doc-index-G.html"->G</A-></TD-><TD-><A HREF="doc-index-H.html"->H</A-></TD-><TD-><A HREF="doc-index-I.html"->I</A-></TD-><TD-><A HREF="doc-index-K.html"->K</A-></TD-><TD-><A HREF="doc-index-L.html"->L</A-></TD-><TD-><A HREF="doc-index-M.html"->M</A-></TD-><TD-><A HREF="doc-index-N.html"->N</A-></TD-><TD-><A HREF="doc-index-O.html"->O</A-></TD-><TD-><A HREF="doc-index-P.html"->P</A-></TD-><TD-><A HREF="doc-index-Q.html"->Q</A-></TD-><TD-><A HREF="doc-index-R.html"->R</A-></TD-><TD-><A HREF="doc-index-S.html"->S</A-></TD-><TD-><A HREF="doc-index-T.html"->T</A-></TD-><TD-><A HREF="doc-index-U.html"->U</A-></TD-><TD-><A HREF="doc-index-V.html"->V</A-></TD-><TD-><A HREF="doc-index-W.html"->W</A-></TD-><TD-><A HREF="doc-index-X.html"->X</A-></TD-><TD-><A HREF="doc-index-58.html"->:</A-></TD-><TD-><A HREF="doc-index-33.html"->!</A-></TD-><TD-><A HREF="doc-index-47.html"->/</A-></TD-><TD-><A HREF="doc-index-60.html"->&lt;</A-></TD-><TD-><A HREF="doc-index-63.html"->?</A-></TD-><TD-><A HREF="doc-index-124.html"->|</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section1"->Index (O)</TD-></TR-><TR-><TD-><TABLE CELLPADDING="0" CELLSPACING="5"-><TR-><TD CLASS="indexentry"->OneOf</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-DtdToHaskell-TypeDef.html#v%3AOneOf"->Text.XML.HaXml.DtdToHaskell.TypeDef</A-></TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->OneOf10</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Type/Class)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf10"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexannot"->2 (Data Constructor)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AOneOf10"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->OneOf11</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Type/Class)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf11"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexannot"->2 (Data Constructor)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AOneOf11"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->OneOf12</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Type/Class)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf12"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexannot"->2 (Data Constructor)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AOneOf12"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->OneOf13</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Type/Class)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf13"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexannot"->2 (Data Constructor)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AOneOf13"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->OneOf14</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Type/Class)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf14"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexannot"->2 (Data Constructor)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AOneOf14"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->OneOf15</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Type/Class)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf15"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexannot"->2 (Data Constructor)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AOneOf15"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->OneOf16</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Type/Class)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf16"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexannot"->2 (Data Constructor)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AOneOf16"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->OneOf17</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Type/Class)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf17"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexannot"->2 (Data Constructor)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AOneOf17"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->OneOf18</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Type/Class)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf18"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexannot"->2 (Data Constructor)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AOneOf18"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->OneOf19</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Type/Class)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf19"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexannot"->2 (Data Constructor)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AOneOf19"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->OneOf2</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Type/Class)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf2"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexannot"->2 (Data Constructor)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AOneOf2"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->OneOf20</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Type/Class)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf20"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexannot"->2 (Data Constructor)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AOneOf20"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->OneOf3</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Type/Class)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf3"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexannot"->2 (Data Constructor)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AOneOf3"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->OneOf4</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Type/Class)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf4"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexannot"->2 (Data Constructor)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AOneOf4"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->OneOf5</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Type/Class)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf5"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexannot"->2 (Data Constructor)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AOneOf5"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->OneOf6</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Type/Class)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf6"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexannot"->2 (Data Constructor)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AOneOf6"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->OneOf7</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Type/Class)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf7"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexannot"->2 (Data Constructor)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AOneOf7"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->OneOf8</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Type/Class)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf8"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexannot"->2 (Data Constructor)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AOneOf8"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->OneOf9</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Type/Class)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#t%3AOneOf9"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexannot"->2 (Data Constructor)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AOneOf9"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->o</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Combinators.html#v%3Ao"->Text.XML.HaXml.Combinators</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexannot"->2 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Xtract-Combinators.html#v%3Ao"->Text.XML.HaXml.Xtract.Combinators</A-></TD-></TR-><TR-><TD CLASS="indexentry"->onContent</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Wrappers.html#v%3AonContent"->Text.XML.HaXml.Wrappers</A-></TD-></TR-><TR-><TD CLASS="indexentry"->oo</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Combinators.html#v%3Aoo"->Text.XML.HaXml.Combinators</A->, Text.XML.HaXml</TD-></TR-></TABLE-></TD-></TR-></TABLE-></BODY-></HTML->
− docs/HaXml/doc-index-P.html
@@ -1,558 +0,0 @@-<!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->HaXml (Index)</TITLE-><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"-></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"->HaXml</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-><TABLE CELLPADDING="0" CELLSPACING="5"-><TR-><TD-><A HREF="doc-index-A.html"->A</A-></TD-><TD-><A HREF="doc-index-B.html"->B</A-></TD-><TD-><A HREF="doc-index-C.html"->C</A-></TD-><TD-><A HREF="doc-index-D.html"->D</A-></TD-><TD-><A HREF="doc-index-E.html"->E</A-></TD-><TD-><A HREF="doc-index-F.html"->F</A-></TD-><TD-><A HREF="doc-index-G.html"->G</A-></TD-><TD-><A HREF="doc-index-H.html"->H</A-></TD-><TD-><A HREF="doc-index-I.html"->I</A-></TD-><TD-><A HREF="doc-index-K.html"->K</A-></TD-><TD-><A HREF="doc-index-L.html"->L</A-></TD-><TD-><A HREF="doc-index-M.html"->M</A-></TD-><TD-><A HREF="doc-index-N.html"->N</A-></TD-><TD-><A HREF="doc-index-O.html"->O</A-></TD-><TD-><A HREF="doc-index-P.html"->P</A-></TD-><TD-><A HREF="doc-index-Q.html"->Q</A-></TD-><TD-><A HREF="doc-index-R.html"->R</A-></TD-><TD-><A HREF="doc-index-S.html"->S</A-></TD-><TD-><A HREF="doc-index-T.html"->T</A-></TD-><TD-><A HREF="doc-index-U.html"->U</A-></TD-><TD-><A HREF="doc-index-V.html"->V</A-></TD-><TD-><A HREF="doc-index-W.html"->W</A-></TD-><TD-><A HREF="doc-index-X.html"->X</A-></TD-><TD-><A HREF="doc-index-58.html"->:</A-></TD-><TD-><A HREF="doc-index-33.html"->!</A-></TD-><TD-><A HREF="doc-index-47.html"->/</A-></TD-><TD-><A HREF="doc-index-60.html"->&lt;</A-></TD-><TD-><A HREF="doc-index-63.html"->?</A-></TD-><TD-><A HREF="doc-index-124.html"->|</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section1"->Index (P)</TD-></TR-><TR-><TD-><TABLE CELLPADDING="0" CELLSPACING="5"-><TR-><TD CLASS="indexentry"->PCDATA</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#v%3APCDATA"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->PCDATAplus</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#v%3APCDATAplus"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->PEDecl</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Type/Class)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#t%3APEDecl"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexannot"->2 (Data Constructor)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#v%3APEDecl"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->PEDef</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#t%3APEDef"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->PEDefEntityValue</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#v%3APEDefEntityValue"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->PEDefExternalID</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#v%3APEDefExternalID"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->PEReference</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#t%3APEReference"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->PI</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#v%3API"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->PITarget</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#t%3APITarget"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->PUBLIC</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#v%3APUBLIC"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->PUBLICID</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#v%3APUBLICID"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->Plus</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#v%3APlus"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->Pn</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Xtract-Lex.html#v%3APn"->Text.XML.HaXml.Xtract.Lex</A-></TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->Posn</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Type/Class)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Posn.html#t%3APosn"->Text.XML.HaXml.Posn</A-></TD-></TR-><TR-><TD CLASS="indexannot"->2 (Type/Class)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Xtract-Lex.html#t%3APosn"->Text.XML.HaXml.Xtract.Lex</A-></TD-></TR-><TR-><TD CLASS="indexentry"->Prim</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-TypeMapping.html#v%3APrim"->Text.XML.HaXml.TypeMapping</A->, Text.XML.HaXml.XmlContent.Parser, Text.XML.HaXml.XmlContent, Text.XML.HaXml.XmlContent.Haskell</TD-></TR-><TR-><TD CLASS="indexentry"->ProcessingInstruction</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#t%3AProcessingInstruction"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->Prolog</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Type/Class)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#t%3AProlog"->Text.XML.HaXml.Types</A->, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AProlog"->Text.XML.HaXml.XmlContent.Parser</A->, Text.XML.HaXml.XmlContent, Text.XML.HaXml.XmlContent.Haskell, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexannot"->2 (Data Constructor)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#v%3AProlog"->Text.XML.HaXml.Types</A->, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#v%3AProlog"->Text.XML.HaXml.XmlContent.Parser</A->, Text.XML.HaXml.XmlContent, Text.XML.HaXml.XmlContent.Haskell, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->PubidLiteral</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Type/Class)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#t%3APubidLiteral"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexannot"->2 (Data Constructor)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#v%3APubidLiteral"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->PublicID</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#t%3APublicID"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->parens</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Html-Generate.html#v%3Aparens"->Text.XML.HaXml.Html.Generate</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->parseContents</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-XmlContent-Parser.html#v%3AparseContents"->Text.XML.HaXml.XmlContent.Parser</A->, Text.XML.HaXml.XmlContent, Text.XML.HaXml.XmlContent.Haskell</TD-></TR-><TR-><TD CLASS="indexentry"->parseXtract</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Xtract-Parse.html#v%3AparseXtract"->Text.XML.HaXml.Xtract.Parse</A-></TD-></TR-><TR-><TD CLASS="indexentry"->partialValidate</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Validate.html#v%3ApartialValidate"->Text.XML.HaXml.Validate</A-></TD-></TR-><TR-><TD CLASS="indexentry"->path</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Combinators.html#v%3Apath"->Text.XML.HaXml.Combinators</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->posInNewCxt</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Posn.html#v%3AposInNewCxt"->Text.XML.HaXml.Posn</A-></TD-></TR-><TR-><TD CLASS="indexentry"->position</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Combinators.html#v%3Aposition"->Text.XML.HaXml.Combinators</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->posnColumn</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Posn.html#v%3AposnColumn"->Text.XML.HaXml.Posn</A-></TD-></TR-><TR-><TD CLASS="indexentry"->posnElement</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-XmlContent-Parser.html#v%3AposnElement"->Text.XML.HaXml.XmlContent.Parser</A->, Text.XML.HaXml.XmlContent, Text.XML.HaXml.XmlContent.Haskell</TD-></TR-><TR-><TD CLASS="indexentry"->posnElementWith</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-XmlContent-Parser.html#v%3AposnElementWith"->Text.XML.HaXml.XmlContent.Parser</A->, Text.XML.HaXml.XmlContent, Text.XML.HaXml.XmlContent.Haskell</TD-></TR-><TR-><TD CLASS="indexentry"->posnFilename</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Posn.html#v%3AposnFilename"->Text.XML.HaXml.Posn</A-></TD-></TR-><TR-><TD CLASS="indexentry"->posnLine</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Posn.html#v%3AposnLine"->Text.XML.HaXml.Posn</A-></TD-></TR-><TR-><TD CLASS="indexentry"->possibleA</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-XmlContent-Parser.html#v%3ApossibleA"->Text.XML.HaXml.XmlContent.Parser</A->, Text.XML.HaXml.XmlContent, Text.XML.HaXml.XmlContent.Haskell</TD-></TR-><TR-><TD CLASS="indexentry"->ppAName</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-DtdToHaskell-TypeDef.html#v%3AppAName"->Text.XML.HaXml.DtdToHaskell.TypeDef</A-></TD-></TR-><TR-><TD CLASS="indexentry"->ppHName</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-DtdToHaskell-TypeDef.html#v%3AppHName"->Text.XML.HaXml.DtdToHaskell.TypeDef</A-></TD-></TR-><TR-><TD CLASS="indexentry"->ppTypeDef</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-DtdToHaskell-TypeDef.html#v%3AppTypeDef"->Text.XML.HaXml.DtdToHaskell.TypeDef</A-></TD-></TR-><TR-><TD CLASS="indexentry"->ppXName</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-DtdToHaskell-TypeDef.html#v%3AppXName"->Text.XML.HaXml.DtdToHaskell.TypeDef</A-></TD-></TR-><TR-><TD CLASS="indexentry"->processXmlWith</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Wrappers.html#v%3AprocessXmlWith"->Text.XML.HaXml.Wrappers</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->processinginstruction</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Parse.html#v%3Aprocessinginstruction"->Text.XML.HaXml.Parse</A-></TD-></TR-><TR-><TD CLASS="indexannot"->2 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-ParseLazy.html#v%3Aprocessinginstruction"->Text.XML.HaXml.ParseLazy</A-></TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->prolog</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-ByteStringPP.html#v%3Aprolog"->Text.XML.HaXml.ByteStringPP</A-></TD-></TR-><TR-><TD CLASS="indexannot"->2 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Pretty.html#v%3Aprolog"->Text.XML.HaXml.Pretty</A-></TD-></TR-></TABLE-></TD-></TR-></TABLE-></BODY-></HTML->
− docs/HaXml/doc-index-Q.html
@@ -1,178 +0,0 @@-<!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->HaXml (Index)</TITLE-><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"-></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"->HaXml</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-><TABLE CELLPADDING="0" CELLSPACING="5"-><TR-><TD-><A HREF="doc-index-A.html"->A</A-></TD-><TD-><A HREF="doc-index-B.html"->B</A-></TD-><TD-><A HREF="doc-index-C.html"->C</A-></TD-><TD-><A HREF="doc-index-D.html"->D</A-></TD-><TD-><A HREF="doc-index-E.html"->E</A-></TD-><TD-><A HREF="doc-index-F.html"->F</A-></TD-><TD-><A HREF="doc-index-G.html"->G</A-></TD-><TD-><A HREF="doc-index-H.html"->H</A-></TD-><TD-><A HREF="doc-index-I.html"->I</A-></TD-><TD-><A HREF="doc-index-K.html"->K</A-></TD-><TD-><A HREF="doc-index-L.html"->L</A-></TD-><TD-><A HREF="doc-index-M.html"->M</A-></TD-><TD-><A HREF="doc-index-N.html"->N</A-></TD-><TD-><A HREF="doc-index-O.html"->O</A-></TD-><TD-><A HREF="doc-index-P.html"->P</A-></TD-><TD-><A HREF="doc-index-Q.html"->Q</A-></TD-><TD-><A HREF="doc-index-R.html"->R</A-></TD-><TD-><A HREF="doc-index-S.html"->S</A-></TD-><TD-><A HREF="doc-index-T.html"->T</A-></TD-><TD-><A HREF="doc-index-U.html"->U</A-></TD-><TD-><A HREF="doc-index-V.html"->V</A-></TD-><TD-><A HREF="doc-index-W.html"->W</A-></TD-><TD-><A HREF="doc-index-X.html"->X</A-></TD-><TD-><A HREF="doc-index-58.html"->:</A-></TD-><TD-><A HREF="doc-index-33.html"->!</A-></TD-><TD-><A HREF="doc-index-47.html"->/</A-></TD-><TD-><A HREF="doc-index-60.html"->&lt;</A-></TD-><TD-><A HREF="doc-index-63.html"->?</A-></TD-><TD-><A HREF="doc-index-124.html"->|</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section1"->Index (Q)</TD-></TR-><TR-><TD-><TABLE CELLPADDING="0" CELLSPACING="5"-><TR-><TD CLASS="indexentry"->Query</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#v%3AQuery"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-></TABLE-></TD-></TR-></TABLE-></BODY-></HTML->
− docs/HaXml/doc-index-R.html
@@ -1,280 +0,0 @@-<!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->HaXml (Index)</TITLE-><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"-></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"->HaXml</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-><TABLE CELLPADDING="0" CELLSPACING="5"-><TR-><TD-><A HREF="doc-index-A.html"->A</A-></TD-><TD-><A HREF="doc-index-B.html"->B</A-></TD-><TD-><A HREF="doc-index-C.html"->C</A-></TD-><TD-><A HREF="doc-index-D.html"->D</A-></TD-><TD-><A HREF="doc-index-E.html"->E</A-></TD-><TD-><A HREF="doc-index-F.html"->F</A-></TD-><TD-><A HREF="doc-index-G.html"->G</A-></TD-><TD-><A HREF="doc-index-H.html"->H</A-></TD-><TD-><A HREF="doc-index-I.html"->I</A-></TD-><TD-><A HREF="doc-index-K.html"->K</A-></TD-><TD-><A HREF="doc-index-L.html"->L</A-></TD-><TD-><A HREF="doc-index-M.html"->M</A-></TD-><TD-><A HREF="doc-index-N.html"->N</A-></TD-><TD-><A HREF="doc-index-O.html"->O</A-></TD-><TD-><A HREF="doc-index-P.html"->P</A-></TD-><TD-><A HREF="doc-index-Q.html"->Q</A-></TD-><TD-><A HREF="doc-index-R.html"->R</A-></TD-><TD-><A HREF="doc-index-S.html"->S</A-></TD-><TD-><A HREF="doc-index-T.html"->T</A-></TD-><TD-><A HREF="doc-index-U.html"->U</A-></TD-><TD-><A HREF="doc-index-V.html"->V</A-></TD-><TD-><A HREF="doc-index-W.html"->W</A-></TD-><TD-><A HREF="doc-index-X.html"->X</A-></TD-><TD-><A HREF="doc-index-58.html"->:</A-></TD-><TD-><A HREF="doc-index-33.html"->!</A-></TD-><TD-><A HREF="doc-index-47.html"->/</A-></TD-><TD-><A HREF="doc-index-60.html"->&lt;</A-></TD-><TD-><A HREF="doc-index-63.html"->?</A-></TD-><TD-><A HREF="doc-index-124.html"->|</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section1"->Index (R)</TD-></TR-><TR-><TD-><TABLE CELLPADDING="0" CELLSPACING="5"-><TR-><TD CLASS="indexentry"->REQUIRED</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#v%3AREQUIRED"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->RefChar</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#v%3ARefChar"->Text.XML.HaXml.Types</A->, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#v%3ARefChar"->Text.XML.HaXml.XmlContent.Parser</A->, Text.XML.HaXml.XmlContent, Text.XML.HaXml.XmlContent.Haskell, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->RefEntity</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#v%3ARefEntity"->Text.XML.HaXml.Types</A->, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#v%3ARefEntity"->Text.XML.HaXml.XmlContent.Parser</A->, Text.XML.HaXml.XmlContent, Text.XML.HaXml.XmlContent.Haskell, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->Reference</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#t%3AReference"->Text.XML.HaXml.Types</A->, <A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AReference"->Text.XML.HaXml.XmlContent.Parser</A->, Text.XML.HaXml.XmlContent, Text.XML.HaXml.XmlContent.Haskell, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->reLexEntityValue</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Lex.html#v%3AreLexEntityValue"->Text.XML.HaXml.Lex</A-></TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->readXml</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-XmlContent.html#v%3AreadXml"->Text.XML.HaXml.XmlContent</A-></TD-></TR-><TR-><TD CLASS="indexannot"->2 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-XmlContent-Haskell.html#v%3AreadXml"->Text.XML.HaXml.XmlContent.Haskell</A-></TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->reference</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Parse.html#v%3Areference"->Text.XML.HaXml.Parse</A-></TD-></TR-><TR-><TD CLASS="indexannot"->2 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-ParseLazy.html#v%3Areference"->Text.XML.HaXml.ParseLazy</A-></TD-></TR-><TR-><TD CLASS="indexentry"->render</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml.html#v%3Arender"->Text.XML.HaXml</A-></TD-></TR-><TR-><TD CLASS="indexentry"->replaceAttrs</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Combinators.html#v%3AreplaceAttrs"->Text.XML.HaXml.Combinators</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->replaceTag</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Combinators.html#v%3AreplaceTag"->Text.XML.HaXml.Combinators</A->, Text.XML.HaXml</TD-></TR-></TABLE-></TD-></TR-></TABLE-></BODY-></HTML->
− docs/HaXml/doc-index-S.html
@@ -1,762 +0,0 @@-<!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->HaXml (Index)</TITLE-><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"-></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"->HaXml</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-><TABLE CELLPADDING="0" CELLSPACING="5"-><TR-><TD-><A HREF="doc-index-A.html"->A</A-></TD-><TD-><A HREF="doc-index-B.html"->B</A-></TD-><TD-><A HREF="doc-index-C.html"->C</A-></TD-><TD-><A HREF="doc-index-D.html"->D</A-></TD-><TD-><A HREF="doc-index-E.html"->E</A-></TD-><TD-><A HREF="doc-index-F.html"->F</A-></TD-><TD-><A HREF="doc-index-G.html"->G</A-></TD-><TD-><A HREF="doc-index-H.html"->H</A-></TD-><TD-><A HREF="doc-index-I.html"->I</A-></TD-><TD-><A HREF="doc-index-K.html"->K</A-></TD-><TD-><A HREF="doc-index-L.html"->L</A-></TD-><TD-><A HREF="doc-index-M.html"->M</A-></TD-><TD-><A HREF="doc-index-N.html"->N</A-></TD-><TD-><A HREF="doc-index-O.html"->O</A-></TD-><TD-><A HREF="doc-index-P.html"->P</A-></TD-><TD-><A HREF="doc-index-Q.html"->Q</A-></TD-><TD-><A HREF="doc-index-R.html"->R</A-></TD-><TD-><A HREF="doc-index-S.html"->S</A-></TD-><TD-><A HREF="doc-index-T.html"->T</A-></TD-><TD-><A HREF="doc-index-U.html"->U</A-></TD-><TD-><A HREF="doc-index-V.html"->V</A-></TD-><TD-><A HREF="doc-index-W.html"->W</A-></TD-><TD-><A HREF="doc-index-X.html"->X</A-></TD-><TD-><A HREF="doc-index-58.html"->:</A-></TD-><TD-><A HREF="doc-index-33.html"->!</A-></TD-><TD-><A HREF="doc-index-47.html"->/</A-></TD-><TD-><A HREF="doc-index-60.html"->&lt;</A-></TD-><TD-><A HREF="doc-index-63.html"->?</A-></TD-><TD-><A HREF="doc-index-124.html"->|</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section1"->Index (S)</TD-></TR-><TR-><TD-><TABLE CELLPADDING="0" CELLSPACING="5"-><TR-><TD CLASS="indexentry"->SDDecl</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#t%3ASDDecl"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->SYSTEM</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#v%3ASYSTEM"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->SaxCharData</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-SAX.html#v%3ASaxCharData"->Text.XML.HaXml.SAX</A-></TD-></TR-><TR-><TD CLASS="indexentry"->SaxComment</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-SAX.html#v%3ASaxComment"->Text.XML.HaXml.SAX</A-></TD-></TR-><TR-><TD CLASS="indexentry"->SaxDocTypeDecl</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-SAX.html#v%3ASaxDocTypeDecl"->Text.XML.HaXml.SAX</A-></TD-></TR-><TR-><TD CLASS="indexentry"->SaxElement</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-SAX.html#t%3ASaxElement"->Text.XML.HaXml.SAX</A-></TD-></TR-><TR-><TD CLASS="indexentry"->SaxElementClose</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-SAX.html#v%3ASaxElementClose"->Text.XML.HaXml.SAX</A-></TD-></TR-><TR-><TD CLASS="indexentry"->SaxElementOpen</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-SAX.html#v%3ASaxElementOpen"->Text.XML.HaXml.SAX</A-></TD-></TR-><TR-><TD CLASS="indexentry"->SaxElementTag</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-SAX.html#v%3ASaxElementTag"->Text.XML.HaXml.SAX</A-></TD-></TR-><TR-><TD CLASS="indexentry"->SaxProcessingInstruction</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-SAX.html#v%3ASaxProcessingInstruction"->Text.XML.HaXml.SAX</A-></TD-></TR-><TR-><TD CLASS="indexentry"->SaxReference</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-SAX.html#v%3ASaxReference"->Text.XML.HaXml.SAX</A-></TD-></TR-><TR-><TD CLASS="indexentry"->Section</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Lex.html#t%3ASection"->Text.XML.HaXml.Lex</A-></TD-></TR-><TR-><TD CLASS="indexentry"->Seq</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#v%3ASeq"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->SevenOf10</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3ASevenOf10"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->SevenOf11</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3ASevenOf11"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->SevenOf12</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3ASevenOf12"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->SevenOf13</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3ASevenOf13"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->SevenOf14</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3ASevenOf14"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->SevenOf15</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3ASevenOf15"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->SevenOf16</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3ASevenOf16"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->SevenOf17</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3ASevenOf17"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->SevenOf18</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3ASevenOf18"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->SevenOf19</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3ASevenOf19"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->SevenOf20</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3ASevenOf20"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->SevenOf7</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3ASevenOf7"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->SevenOf8</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3ASevenOf8"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->SevenOf9</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3ASevenOf9"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->SeventeenOf17</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3ASeventeenOf17"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->SeventeenOf18</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3ASeventeenOf18"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->SeventeenOf19</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3ASeventeenOf19"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->SeventeenOf20</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3ASeventeenOf20"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->SixOf10</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3ASixOf10"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->SixOf11</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3ASixOf11"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->SixOf12</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3ASixOf12"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->SixOf13</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3ASixOf13"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->SixOf14</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3ASixOf14"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->SixOf15</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3ASixOf15"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->SixOf16</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3ASixOf16"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->SixOf17</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3ASixOf17"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->SixOf18</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3ASixOf18"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->SixOf19</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3ASixOf19"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->SixOf20</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3ASixOf20"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->SixOf6</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3ASixOf6"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->SixOf7</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3ASixOf7"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->SixOf8</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3ASixOf8"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->SixOf9</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3ASixOf9"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->SixteenOf16</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3ASixteenOf16"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->SixteenOf17</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3ASixteenOf17"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->SixteenOf18</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3ASixteenOf18"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->SixteenOf19</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3ASixteenOf19"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->SixteenOf20</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3ASixteenOf20"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->Special</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Lex.html#t%3ASpecial"->Text.XML.HaXml.Lex</A-></TD-></TR-><TR-><TD CLASS="indexentry"->Star</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#v%3AStar"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->String</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Data Constructor)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-DtdToHaskell-TypeDef.html#v%3AString"->Text.XML.HaXml.DtdToHaskell.TypeDef</A-></TD-></TR-><TR-><TD CLASS="indexannot"->2 (Data Constructor)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-TypeMapping.html#v%3AString"->Text.XML.HaXml.TypeMapping</A->, Text.XML.HaXml.XmlContent.Parser, Text.XML.HaXml.XmlContent, Text.XML.HaXml.XmlContent.Haskell</TD-></TR-><TR-><TD CLASS="indexentry"->StringType</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#v%3AStringType"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->StructType</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-DtdToHaskell-TypeDef.html#t%3AStructType"->Text.XML.HaXml.DtdToHaskell.TypeDef</A-></TD-></TR-><TR-><TD CLASS="indexentry"->SymTab</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#t%3ASymTab"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->Symbol</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Xtract-Lex.html#v%3ASymbol"->Text.XML.HaXml.Xtract.Lex</A-></TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->SystemLiteral</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Type/Class)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#t%3ASystemLiteral"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexannot"->2 (Data Constructor)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#v%3ASystemLiteral"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->saxParse</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-SAX.html#v%3AsaxParse"->Text.XML.HaXml.SAX</A-></TD-></TR-><TR-><TD CLASS="indexentry"->showConstr</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-TypeMapping.html#v%3AshowConstr"->Text.XML.HaXml.TypeMapping</A->, Text.XML.HaXml.XmlContent.Parser, Text.XML.HaXml.XmlContent, Text.XML.HaXml.XmlContent.Haskell</TD-></TR-><TR-><TD CLASS="indexentry"->showHType</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-TypeMapping.html#v%3AshowHType"->Text.XML.HaXml.TypeMapping</A->, Text.XML.HaXml.XmlContent.Parser, Text.XML.HaXml.XmlContent, Text.XML.HaXml.XmlContent.Haskell</TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->showXml</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-XmlContent.html#v%3AshowXml"->Text.XML.HaXml.XmlContent</A-></TD-></TR-><TR-><TD CLASS="indexannot"->2 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-XmlContent-Haskell.html#v%3AshowXml"->Text.XML.HaXml.XmlContent.Haskell</A-></TD-></TR-><TR-><TD CLASS="indexentry"->showXmlLazy</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-ShowXmlLazy.html#v%3AshowXmlLazy"->Text.XML.HaXml.ShowXmlLazy</A-></TD-></TR-><TR-><TD CLASS="indexentry"->showattr</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Html-Generate.html#v%3Ashowattr"->Text.XML.HaXml.Html.Generate</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->snd3</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Parse.html#v%3Asnd3"->Text.XML.HaXml.Parse</A-></TD-></TR-><TR-><TD CLASS="indexannot"->2 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-ParseLazy.html#v%3Asnd3"->Text.XML.HaXml.ParseLazy</A-></TD-></TR-><TR-><TD CLASS="indexentry"->stdXmlEscaper</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Escape.html#v%3AstdXmlEscaper"->Text.XML.HaXml.Escape</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->str2attr</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-XmlContent-Parser.html#v%3Astr2attr"->Text.XML.HaXml.XmlContent.Parser</A->, Text.XML.HaXml.XmlContent, Text.XML.HaXml.XmlContent.Haskell</TD-></TR-></TABLE-></TD-></TR-></TABLE-></BODY-></HTML->
− docs/HaXml/doc-index-T.html
@@ -1,1294 +0,0 @@-<!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->HaXml (Index)</TITLE-><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"-></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"->HaXml</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-><TABLE CELLPADDING="0" CELLSPACING="5"-><TR-><TD-><A HREF="doc-index-A.html"->A</A-></TD-><TD-><A HREF="doc-index-B.html"->B</A-></TD-><TD-><A HREF="doc-index-C.html"->C</A-></TD-><TD-><A HREF="doc-index-D.html"->D</A-></TD-><TD-><A HREF="doc-index-E.html"->E</A-></TD-><TD-><A HREF="doc-index-F.html"->F</A-></TD-><TD-><A HREF="doc-index-G.html"->G</A-></TD-><TD-><A HREF="doc-index-H.html"->H</A-></TD-><TD-><A HREF="doc-index-I.html"->I</A-></TD-><TD-><A HREF="doc-index-K.html"->K</A-></TD-><TD-><A HREF="doc-index-L.html"->L</A-></TD-><TD-><A HREF="doc-index-M.html"->M</A-></TD-><TD-><A HREF="doc-index-N.html"->N</A-></TD-><TD-><A HREF="doc-index-O.html"->O</A-></TD-><TD-><A HREF="doc-index-P.html"->P</A-></TD-><TD-><A HREF="doc-index-Q.html"->Q</A-></TD-><TD-><A HREF="doc-index-R.html"->R</A-></TD-><TD-><A HREF="doc-index-S.html"->S</A-></TD-><TD-><A HREF="doc-index-T.html"->T</A-></TD-><TD-><A HREF="doc-index-U.html"->U</A-></TD-><TD-><A HREF="doc-index-V.html"->V</A-></TD-><TD-><A HREF="doc-index-W.html"->W</A-></TD-><TD-><A HREF="doc-index-X.html"->X</A-></TD-><TD-><A HREF="doc-index-58.html"->:</A-></TD-><TD-><A HREF="doc-index-33.html"->!</A-></TD-><TD-><A HREF="doc-index-47.html"->/</A-></TD-><TD-><A HREF="doc-index-60.html"->&lt;</A-></TD-><TD-><A HREF="doc-index-63.html"->?</A-></TD-><TD-><A HREF="doc-index-124.html"->|</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section1"->Index (T)</TD-></TR-><TR-><TD-><TABLE CELLPADDING="0" CELLSPACING="5"-><TR-><TD CLASS="indexentry"->TagName</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#v%3ATagName"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->TenOf10</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3ATenOf10"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->TenOf11</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3ATenOf11"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->TenOf12</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3ATenOf12"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->TenOf13</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3ATenOf13"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->TenOf14</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3ATenOf14"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->TenOf15</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3ATenOf15"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->TenOf16</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3ATenOf16"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->TenOf17</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3ATenOf17"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->TenOf18</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3ATenOf18"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->TenOf19</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3ATenOf19"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->TenOf20</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3ATenOf20"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->TextDecl</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Type/Class)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#t%3ATextDecl"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexannot"->2 (Data Constructor)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#v%3ATextDecl"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->ThenElse</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Combinators.html#t%3AThenElse"->Text.XML.HaXml.Combinators</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->ThirteenOf13</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AThirteenOf13"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->ThirteenOf14</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AThirteenOf14"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->ThirteenOf15</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AThirteenOf15"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->ThirteenOf16</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AThirteenOf16"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->ThirteenOf17</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AThirteenOf17"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->ThirteenOf18</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AThirteenOf18"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->ThirteenOf19</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AThirteenOf19"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->ThirteenOf20</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AThirteenOf20"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->ThreeOf10</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AThreeOf10"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->ThreeOf11</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AThreeOf11"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->ThreeOf12</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AThreeOf12"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->ThreeOf13</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AThreeOf13"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->ThreeOf14</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AThreeOf14"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->ThreeOf15</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AThreeOf15"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->ThreeOf16</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AThreeOf16"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->ThreeOf17</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AThreeOf17"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->ThreeOf18</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AThreeOf18"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->ThreeOf19</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AThreeOf19"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->ThreeOf20</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AThreeOf20"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->ThreeOf3</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AThreeOf3"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->ThreeOf4</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AThreeOf4"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->ThreeOf5</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AThreeOf5"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->ThreeOf6</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AThreeOf6"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->ThreeOf7</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AThreeOf7"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->ThreeOf8</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AThreeOf8"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->ThreeOf9</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3AThreeOf9"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->TokAmp</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Lex.html#v%3ATokAmp"->Text.XML.HaXml.Lex</A-></TD-></TR-><TR-><TD CLASS="indexentry"->TokAnyClose</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Lex.html#v%3ATokAnyClose"->Text.XML.HaXml.Lex</A-></TD-></TR-><TR-><TD CLASS="indexentry"->TokAnyOpen</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Lex.html#v%3ATokAnyOpen"->Text.XML.HaXml.Lex</A-></TD-></TR-><TR-><TD CLASS="indexentry"->TokBraClose</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Lex.html#v%3ATokBraClose"->Text.XML.HaXml.Lex</A-></TD-></TR-><TR-><TD CLASS="indexentry"->TokBraOpen</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Lex.html#v%3ATokBraOpen"->Text.XML.HaXml.Lex</A-></TD-></TR-><TR-><TD CLASS="indexentry"->TokComma</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Lex.html#v%3ATokComma"->Text.XML.HaXml.Lex</A-></TD-></TR-><TR-><TD CLASS="indexentry"->TokCommentClose</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Lex.html#v%3ATokCommentClose"->Text.XML.HaXml.Lex</A-></TD-></TR-><TR-><TD CLASS="indexentry"->TokCommentOpen</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Lex.html#v%3ATokCommentOpen"->Text.XML.HaXml.Lex</A-></TD-></TR-><TR-><TD CLASS="indexentry"->TokEndClose</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Lex.html#v%3ATokEndClose"->Text.XML.HaXml.Lex</A-></TD-></TR-><TR-><TD CLASS="indexentry"->TokEndOpen</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Lex.html#v%3ATokEndOpen"->Text.XML.HaXml.Lex</A-></TD-></TR-><TR-><TD CLASS="indexentry"->TokEqual</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Lex.html#v%3ATokEqual"->Text.XML.HaXml.Lex</A-></TD-></TR-><TR-><TD CLASS="indexentry"->TokError</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Lex.html#v%3ATokError"->Text.XML.HaXml.Lex</A-></TD-></TR-><TR-><TD CLASS="indexentry"->TokFreeText</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Lex.html#v%3ATokFreeText"->Text.XML.HaXml.Lex</A-></TD-></TR-><TR-><TD CLASS="indexentry"->TokHash</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Lex.html#v%3ATokHash"->Text.XML.HaXml.Lex</A-></TD-></TR-><TR-><TD CLASS="indexentry"->TokName</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Lex.html#v%3ATokName"->Text.XML.HaXml.Lex</A-></TD-></TR-><TR-><TD CLASS="indexentry"->TokNull</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Lex.html#v%3ATokNull"->Text.XML.HaXml.Lex</A-></TD-></TR-><TR-><TD CLASS="indexentry"->TokNum</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Xtract-Lex.html#v%3ATokNum"->Text.XML.HaXml.Xtract.Lex</A-></TD-></TR-><TR-><TD CLASS="indexentry"->TokPIClose</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Lex.html#v%3ATokPIClose"->Text.XML.HaXml.Lex</A-></TD-></TR-><TR-><TD CLASS="indexentry"->TokPIOpen</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Lex.html#v%3ATokPIOpen"->Text.XML.HaXml.Lex</A-></TD-></TR-><TR-><TD CLASS="indexentry"->TokPercent</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Lex.html#v%3ATokPercent"->Text.XML.HaXml.Lex</A-></TD-></TR-><TR-><TD CLASS="indexentry"->TokPipe</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Lex.html#v%3ATokPipe"->Text.XML.HaXml.Lex</A-></TD-></TR-><TR-><TD CLASS="indexentry"->TokPlus</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Lex.html#v%3ATokPlus"->Text.XML.HaXml.Lex</A-></TD-></TR-><TR-><TD CLASS="indexentry"->TokQuery</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Lex.html#v%3ATokQuery"->Text.XML.HaXml.Lex</A-></TD-></TR-><TR-><TD CLASS="indexentry"->TokQuote</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Lex.html#v%3ATokQuote"->Text.XML.HaXml.Lex</A-></TD-></TR-><TR-><TD CLASS="indexentry"->TokSection</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Lex.html#v%3ATokSection"->Text.XML.HaXml.Lex</A-></TD-></TR-><TR-><TD CLASS="indexentry"->TokSectionClose</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Lex.html#v%3ATokSectionClose"->Text.XML.HaXml.Lex</A-></TD-></TR-><TR-><TD CLASS="indexentry"->TokSectionOpen</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Lex.html#v%3ATokSectionOpen"->Text.XML.HaXml.Lex</A-></TD-></TR-><TR-><TD CLASS="indexentry"->TokSemi</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Lex.html#v%3ATokSemi"->Text.XML.HaXml.Lex</A-></TD-></TR-><TR-><TD CLASS="indexentry"->TokSpecial</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Lex.html#v%3ATokSpecial"->Text.XML.HaXml.Lex</A-></TD-></TR-><TR-><TD CLASS="indexentry"->TokSpecialOpen</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Lex.html#v%3ATokSpecialOpen"->Text.XML.HaXml.Lex</A-></TD-></TR-><TR-><TD CLASS="indexentry"->TokSqClose</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Lex.html#v%3ATokSqClose"->Text.XML.HaXml.Lex</A-></TD-></TR-><TR-><TD CLASS="indexentry"->TokSqOpen</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Lex.html#v%3ATokSqOpen"->Text.XML.HaXml.Lex</A-></TD-></TR-><TR-><TD CLASS="indexentry"->TokStar</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Lex.html#v%3ATokStar"->Text.XML.HaXml.Lex</A-></TD-></TR-><TR-><TD CLASS="indexentry"->TokString</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Xtract-Lex.html#v%3ATokString"->Text.XML.HaXml.Xtract.Lex</A-></TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->Token</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Type/Class)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Lex.html#t%3AToken"->Text.XML.HaXml.Lex</A-></TD-></TR-><TR-><TD CLASS="indexannot"->2 (Type/Class)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Xtract-Lex.html#t%3AToken"->Text.XML.HaXml.Xtract.Lex</A-></TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->TokenT</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Type/Class)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Lex.html#t%3ATokenT"->Text.XML.HaXml.Lex</A-></TD-></TR-><TR-><TD CLASS="indexannot"->2 (Type/Class)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Xtract-Lex.html#t%3ATokenT"->Text.XML.HaXml.Xtract.Lex</A-></TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->TokenizedType</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Type/Class)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#t%3ATokenizedType"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexannot"->2 (Data Constructor)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#v%3ATokenizedType"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->Tuple</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Data Constructor)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-DtdToHaskell-TypeDef.html#v%3ATuple"->Text.XML.HaXml.DtdToHaskell.TypeDef</A-></TD-></TR-><TR-><TD CLASS="indexannot"->2 (Data Constructor)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-TypeMapping.html#v%3ATuple"->Text.XML.HaXml.TypeMapping</A->, Text.XML.HaXml.XmlContent.Parser, Text.XML.HaXml.XmlContent, Text.XML.HaXml.XmlContent.Haskell</TD-></TR-><TR-><TD CLASS="indexentry"->TwelveOf12</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3ATwelveOf12"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->TwelveOf13</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3ATwelveOf13"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->TwelveOf14</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3ATwelveOf14"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->TwelveOf15</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3ATwelveOf15"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->TwelveOf16</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3ATwelveOf16"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->TwelveOf17</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3ATwelveOf17"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->TwelveOf18</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3ATwelveOf18"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->TwelveOf19</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3ATwelveOf19"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->TwelveOf20</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3ATwelveOf20"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->TwentyOf20</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3ATwentyOf20"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->TwoOf10</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3ATwoOf10"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->TwoOf11</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3ATwoOf11"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->TwoOf12</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3ATwoOf12"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->TwoOf13</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3ATwoOf13"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->TwoOf14</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3ATwoOf14"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->TwoOf15</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3ATwoOf15"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->TwoOf16</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3ATwoOf16"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->TwoOf17</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3ATwoOf17"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->TwoOf18</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3ATwoOf18"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->TwoOf19</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3ATwoOf19"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->TwoOf2</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3ATwoOf2"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->TwoOf20</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3ATwoOf20"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->TwoOf3</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3ATwoOf3"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->TwoOf4</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3ATwoOf4"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->TwoOf5</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3ATwoOf5"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->TwoOf6</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3ATwoOf6"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->TwoOf7</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3ATwoOf7"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->TwoOf8</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3ATwoOf8"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->TwoOf9</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-OneOfN.html#v%3ATwoOf9"->Text.XML.HaXml.OneOfN</A-></TD-></TR-><TR-><TD CLASS="indexentry"->TypeDef</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-DtdToHaskell-TypeDef.html#t%3ATypeDef"->Text.XML.HaXml.DtdToHaskell.TypeDef</A-></TD-></TR-><TR-><TD CLASS="indexentry"->tab</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Posn.html#v%3Atab"->Text.XML.HaXml.Posn</A-></TD-></TR-><TR-><TD CLASS="indexentry"->tag</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Combinators.html#v%3Atag"->Text.XML.HaXml.Combinators</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->tagTextContent</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Util.html#v%3AtagTextContent"->Text.XML.HaXml.Util</A-></TD-></TR-><TR-><TD CLASS="indexentry"->tagWith</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Combinators.html#v%3AtagWith"->Text.XML.HaXml.Combinators</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->tagged</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Combinators.html#v%3Atagged"->Text.XML.HaXml.Combinators</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->text</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-XmlContent-Parser.html#v%3Atext"->Text.XML.HaXml.XmlContent.Parser</A->, Text.XML.HaXml.XmlContent, Text.XML.HaXml.XmlContent.Haskell</TD-></TR-><TR-><TD CLASS="indexentry"->textlabelled</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Combinators.html#v%3Atextlabelled"->Text.XML.HaXml.Combinators</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->thd3</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Parse.html#v%3Athd3"->Text.XML.HaXml.Parse</A-></TD-></TR-><TR-><TD CLASS="indexannot"->2 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-ParseLazy.html#v%3Athd3"->Text.XML.HaXml.ParseLazy</A-></TD-></TR-><TR-><TD CLASS="indexentry"->toAttrFrStr</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-XmlContent-Parser.html#v%3AtoAttrFrStr"->Text.XML.HaXml.XmlContent.Parser</A->, Text.XML.HaXml.XmlContent, Text.XML.HaXml.XmlContent.Haskell</TD-></TR-><TR-><TD CLASS="indexentry"->toAttrFrTyp</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-XmlContent-Parser.html#v%3AtoAttrFrTyp"->Text.XML.HaXml.XmlContent.Parser</A->, Text.XML.HaXml.XmlContent, Text.XML.HaXml.XmlContent.Haskell</TD-></TR-><TR-><TD CLASS="indexentry"->toAttrs</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-XmlContent-Parser.html#v%3AtoAttrs"->Text.XML.HaXml.XmlContent.Parser</A->, Text.XML.HaXml.XmlContent, Text.XML.HaXml.XmlContent.Haskell</TD-></TR-><TR-><TD CLASS="indexentry"->toCData</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-XmlContent-Parser.html#v%3AtoCData"->Text.XML.HaXml.XmlContent.Parser</A->, Text.XML.HaXml.XmlContent, Text.XML.HaXml.XmlContent.Haskell</TD-></TR-><TR-><TD CLASS="indexentry"->toContents</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-XmlContent-Parser.html#v%3AtoContents"->Text.XML.HaXml.XmlContent.Parser</A->, Text.XML.HaXml.XmlContent, Text.XML.HaXml.XmlContent.Haskell</TD-></TR-><TR-><TD CLASS="indexentry"->toDTD</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-TypeMapping.html#v%3AtoDTD"->Text.XML.HaXml.TypeMapping</A->, Text.XML.HaXml.XmlContent.Parser, Text.XML.HaXml.XmlContent, Text.XML.HaXml.XmlContent.Haskell</TD-></TR-><TR-><TD CLASS="indexentry"->toHType</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-TypeMapping.html#v%3AtoHType"->Text.XML.HaXml.TypeMapping</A->, Text.XML.HaXml.XmlContent.Parser, Text.XML.HaXml.XmlContent, Text.XML.HaXml.XmlContent.Haskell</TD-></TR-><TR-><TD CLASS="indexentry"->toText</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-XmlContent-Parser.html#v%3AtoText"->Text.XML.HaXml.XmlContent.Parser</A->, Text.XML.HaXml.XmlContent, Text.XML.HaXml.XmlContent.Haskell</TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->toXml</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-XmlContent.html#v%3AtoXml"->Text.XML.HaXml.XmlContent</A-></TD-></TR-><TR-><TD CLASS="indexannot"->2 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-XmlContent-Haskell.html#v%3AtoXml"->Text.XML.HaXml.XmlContent.Haskell</A-></TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->tok</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Parse.html#v%3Atok"->Text.XML.HaXml.Parse</A-></TD-></TR-><TR-><TD CLASS="indexannot"->2 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-ParseLazy.html#v%3Atok"->Text.XML.HaXml.ParseLazy</A-></TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->txt</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Combinators.html#v%3Atxt"->Text.XML.HaXml.Combinators</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexannot"->2 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Xtract-Combinators.html#v%3Atxt"->Text.XML.HaXml.Xtract.Combinators</A-></TD-></TR-></TABLE-></TD-></TR-></TABLE-></BODY-></HTML->
− docs/HaXml/doc-index-U.html
@@ -1,198 +0,0 @@-<!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->HaXml (Index)</TITLE-><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"-></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"->HaXml</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-><TABLE CELLPADDING="0" CELLSPACING="5"-><TR-><TD-><A HREF="doc-index-A.html"->A</A-></TD-><TD-><A HREF="doc-index-B.html"->B</A-></TD-><TD-><A HREF="doc-index-C.html"->C</A-></TD-><TD-><A HREF="doc-index-D.html"->D</A-></TD-><TD-><A HREF="doc-index-E.html"->E</A-></TD-><TD-><A HREF="doc-index-F.html"->F</A-></TD-><TD-><A HREF="doc-index-G.html"->G</A-></TD-><TD-><A HREF="doc-index-H.html"->H</A-></TD-><TD-><A HREF="doc-index-I.html"->I</A-></TD-><TD-><A HREF="doc-index-K.html"->K</A-></TD-><TD-><A HREF="doc-index-L.html"->L</A-></TD-><TD-><A HREF="doc-index-M.html"->M</A-></TD-><TD-><A HREF="doc-index-N.html"->N</A-></TD-><TD-><A HREF="doc-index-O.html"->O</A-></TD-><TD-><A HREF="doc-index-P.html"->P</A-></TD-><TD-><A HREF="doc-index-Q.html"->Q</A-></TD-><TD-><A HREF="doc-index-R.html"->R</A-></TD-><TD-><A HREF="doc-index-S.html"->S</A-></TD-><TD-><A HREF="doc-index-T.html"->T</A-></TD-><TD-><A HREF="doc-index-U.html"->U</A-></TD-><TD-><A HREF="doc-index-V.html"->V</A-></TD-><TD-><A HREF="doc-index-W.html"->W</A-></TD-><TD-><A HREF="doc-index-X.html"->X</A-></TD-><TD-><A HREF="doc-index-58.html"->:</A-></TD-><TD-><A HREF="doc-index-33.html"->!</A-></TD-><TD-><A HREF="doc-index-47.html"->/</A-></TD-><TD-><A HREF="doc-index-60.html"->&lt;</A-></TD-><TD-><A HREF="doc-index-63.html"->?</A-></TD-><TD-><A HREF="doc-index-124.html"->|</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section1"->Index (U)</TD-></TR-><TR-><TD-><TABLE CELLPADDING="0" CELLSPACING="5"-><TR-><TD CLASS="indexentry"->UnConverted</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-XmlContent-Parser.html#v%3AUnConverted"->Text.XML.HaXml.XmlContent.Parser</A->, Text.XML.HaXml.XmlContent, Text.XML.HaXml.XmlContent.Haskell</TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->union</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Combinators.html#v%3Aunion"->Text.XML.HaXml.Combinators</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexannot"->2 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Xtract-Combinators.html#v%3Aunion"->Text.XML.HaXml.Xtract.Combinators</A-></TD-></TR-></TABLE-></TD-></TR-></TABLE-></BODY-></HTML->
− docs/HaXml/doc-index-V.html
@@ -1,218 +0,0 @@-<!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->HaXml (Index)</TITLE-><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"-></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"->HaXml</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-><TABLE CELLPADDING="0" CELLSPACING="5"-><TR-><TD-><A HREF="doc-index-A.html"->A</A-></TD-><TD-><A HREF="doc-index-B.html"->B</A-></TD-><TD-><A HREF="doc-index-C.html"->C</A-></TD-><TD-><A HREF="doc-index-D.html"->D</A-></TD-><TD-><A HREF="doc-index-E.html"->E</A-></TD-><TD-><A HREF="doc-index-F.html"->F</A-></TD-><TD-><A HREF="doc-index-G.html"->G</A-></TD-><TD-><A HREF="doc-index-H.html"->H</A-></TD-><TD-><A HREF="doc-index-I.html"->I</A-></TD-><TD-><A HREF="doc-index-K.html"->K</A-></TD-><TD-><A HREF="doc-index-L.html"->L</A-></TD-><TD-><A HREF="doc-index-M.html"->M</A-></TD-><TD-><A HREF="doc-index-N.html"->N</A-></TD-><TD-><A HREF="doc-index-O.html"->O</A-></TD-><TD-><A HREF="doc-index-P.html"->P</A-></TD-><TD-><A HREF="doc-index-Q.html"->Q</A-></TD-><TD-><A HREF="doc-index-R.html"->R</A-></TD-><TD-><A HREF="doc-index-S.html"->S</A-></TD-><TD-><A HREF="doc-index-T.html"->T</A-></TD-><TD-><A HREF="doc-index-U.html"->U</A-></TD-><TD-><A HREF="doc-index-V.html"->V</A-></TD-><TD-><A HREF="doc-index-W.html"->W</A-></TD-><TD-><A HREF="doc-index-X.html"->X</A-></TD-><TD-><A HREF="doc-index-58.html"->:</A-></TD-><TD-><A HREF="doc-index-33.html"->!</A-></TD-><TD-><A HREF="doc-index-47.html"->/</A-></TD-><TD-><A HREF="doc-index-60.html"->&lt;</A-></TD-><TD-><A HREF="doc-index-63.html"->?</A-></TD-><TD-><A HREF="doc-index-124.html"->|</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section1"->Index (V)</TD-></TR-><TR-><TD-><TABLE CELLPADDING="0" CELLSPACING="5"-><TR-><TD CLASS="indexentry"->Verbatim</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Verbatim.html#t%3AVerbatim"->Text.XML.HaXml.Verbatim</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->VersionInfo</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#t%3AVersionInfo"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->validate</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Validate.html#v%3Avalidate"->Text.XML.HaXml.Validate</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->verbAttr</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Verbatim.html#v%3AverbAttr"->Text.XML.HaXml.Verbatim</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->verbatim</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Verbatim.html#v%3Averbatim"->Text.XML.HaXml.Verbatim</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->version</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml.html#v%3Aversion"->Text.XML.HaXml</A-></TD-></TR-></TABLE-></TD-></TR-></TABLE-></BODY-></HTML->
− docs/HaXml/doc-index-W.html
@@ -1,226 +0,0 @@-<!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->HaXml (Index)</TITLE-><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"-></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"->HaXml</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-><TABLE CELLPADDING="0" CELLSPACING="5"-><TR-><TD-><A HREF="doc-index-A.html"->A</A-></TD-><TD-><A HREF="doc-index-B.html"->B</A-></TD-><TD-><A HREF="doc-index-C.html"->C</A-></TD-><TD-><A HREF="doc-index-D.html"->D</A-></TD-><TD-><A HREF="doc-index-E.html"->E</A-></TD-><TD-><A HREF="doc-index-F.html"->F</A-></TD-><TD-><A HREF="doc-index-G.html"->G</A-></TD-><TD-><A HREF="doc-index-H.html"->H</A-></TD-><TD-><A HREF="doc-index-I.html"->I</A-></TD-><TD-><A HREF="doc-index-K.html"->K</A-></TD-><TD-><A HREF="doc-index-L.html"->L</A-></TD-><TD-><A HREF="doc-index-M.html"->M</A-></TD-><TD-><A HREF="doc-index-N.html"->N</A-></TD-><TD-><A HREF="doc-index-O.html"->O</A-></TD-><TD-><A HREF="doc-index-P.html"->P</A-></TD-><TD-><A HREF="doc-index-Q.html"->Q</A-></TD-><TD-><A HREF="doc-index-R.html"->R</A-></TD-><TD-><A HREF="doc-index-S.html"->S</A-></TD-><TD-><A HREF="doc-index-T.html"->T</A-></TD-><TD-><A HREF="doc-index-U.html"->U</A-></TD-><TD-><A HREF="doc-index-V.html"->V</A-></TD-><TD-><A HREF="doc-index-W.html"->W</A-></TD-><TD-><A HREF="doc-index-X.html"->X</A-></TD-><TD-><A HREF="doc-index-58.html"->:</A-></TD-><TD-><A HREF="doc-index-33.html"->!</A-></TD-><TD-><A HREF="doc-index-47.html"->/</A-></TD-><TD-><A HREF="doc-index-60.html"->&lt;</A-></TD-><TD-><A HREF="doc-index-63.html"->?</A-></TD-><TD-><A HREF="doc-index-124.html"->|</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section1"->Index (W)</TD-></TR-><TR-><TD-><TABLE CELLPADDING="0" CELLSPACING="5"-><TR-><TD CLASS="indexentry"->when</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Combinators.html#v%3Awhen"->Text.XML.HaXml.Combinators</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->white</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Posn.html#v%3Awhite"->Text.XML.HaXml.Posn</A-></TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->with</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Combinators.html#v%3Awith"->Text.XML.HaXml.Combinators</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexannot"->2 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Xtract-Combinators.html#v%3Awith"->Text.XML.HaXml.Xtract.Combinators</A-></TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->without</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Combinators.html#v%3Awithout"->Text.XML.HaXml.Combinators</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexannot"->2 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Xtract-Combinators.html#v%3Awithout"->Text.XML.HaXml.Xtract.Combinators</A-></TD-></TR-></TABLE-></TD-></TR-></TABLE-></BODY-></HTML->
− docs/HaXml/doc-index-X.html
@@ -1,386 +0,0 @@-<!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->HaXml (Index)</TITLE-><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"-></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"->HaXml</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-><TABLE CELLPADDING="0" CELLSPACING="5"-><TR-><TD-><A HREF="doc-index-A.html"->A</A-></TD-><TD-><A HREF="doc-index-B.html"->B</A-></TD-><TD-><A HREF="doc-index-C.html"->C</A-></TD-><TD-><A HREF="doc-index-D.html"->D</A-></TD-><TD-><A HREF="doc-index-E.html"->E</A-></TD-><TD-><A HREF="doc-index-F.html"->F</A-></TD-><TD-><A HREF="doc-index-G.html"->G</A-></TD-><TD-><A HREF="doc-index-H.html"->H</A-></TD-><TD-><A HREF="doc-index-I.html"->I</A-></TD-><TD-><A HREF="doc-index-K.html"->K</A-></TD-><TD-><A HREF="doc-index-L.html"->L</A-></TD-><TD-><A HREF="doc-index-M.html"->M</A-></TD-><TD-><A HREF="doc-index-N.html"->N</A-></TD-><TD-><A HREF="doc-index-O.html"->O</A-></TD-><TD-><A HREF="doc-index-P.html"->P</A-></TD-><TD-><A HREF="doc-index-Q.html"->Q</A-></TD-><TD-><A HREF="doc-index-R.html"->R</A-></TD-><TD-><A HREF="doc-index-S.html"->S</A-></TD-><TD-><A HREF="doc-index-T.html"->T</A-></TD-><TD-><A HREF="doc-index-U.html"->U</A-></TD-><TD-><A HREF="doc-index-V.html"->V</A-></TD-><TD-><A HREF="doc-index-W.html"->W</A-></TD-><TD-><A HREF="doc-index-X.html"->X</A-></TD-><TD-><A HREF="doc-index-58.html"->:</A-></TD-><TD-><A HREF="doc-index-33.html"->!</A-></TD-><TD-><A HREF="doc-index-47.html"->/</A-></TD-><TD-><A HREF="doc-index-60.html"->&lt;</A-></TD-><TD-><A HREF="doc-index-63.html"->?</A-></TD-><TD-><A HREF="doc-index-124.html"->|</A-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD CLASS="section1"->Index (X)</TD-></TR-><TR-><TD-><TABLE CELLPADDING="0" CELLSPACING="5"-><TR-><TD CLASS="indexentry" COLSPAN="2"->XMLDecl</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Type/Class)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#t%3AXMLDecl"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexannot"->2 (Data Constructor)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Types.html#v%3AXMLDecl"->Text.XML.HaXml.Types</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->XMLParser</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXMLParser"->Text.XML.HaXml.XmlContent.Parser</A->, Text.XML.HaXml.XmlContent, Text.XML.HaXml.XmlContent.Haskell</TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->XParser</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Type/Class)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Parse.html#t%3AXParser"->Text.XML.HaXml.Parse</A-></TD-></TR-><TR-><TD CLASS="indexannot"->2 (Type/Class)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-ParseLazy.html#t%3AXParser"->Text.XML.HaXml.ParseLazy</A-></TD-></TR-><TR-><TD CLASS="indexentry"->XmlAttrType</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlAttrType"->Text.XML.HaXml.XmlContent.Parser</A->, Text.XML.HaXml.XmlContent, Text.XML.HaXml.XmlContent.Haskell</TD-></TR-><TR-><TD CLASS="indexentry"->XmlAttributes</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlAttributes"->Text.XML.HaXml.XmlContent.Parser</A->, Text.XML.HaXml.XmlContent, Text.XML.HaXml.XmlContent.Haskell</TD-></TR-><TR-><TD CLASS="indexentry"->XmlContent</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-XmlContent-Parser.html#t%3AXmlContent"->Text.XML.HaXml.XmlContent.Parser</A->, Text.XML.HaXml.XmlContent, Text.XML.HaXml.XmlContent.Haskell</TD-></TR-><TR-><TD CLASS="indexentry"->XmlEscaper</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Escape.html#t%3AXmlEscaper"->Text.XML.HaXml.Escape</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->x</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Combinators.html#v%3Ax"->Text.XML.HaXml.Combinators</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->xFromChar</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-XmlContent-Parser.html#v%3AxFromChar"->Text.XML.HaXml.XmlContent.Parser</A->, Text.XML.HaXml.XmlContent, Text.XML.HaXml.XmlContent.Haskell</TD-></TR-><TR-><TD CLASS="indexentry"->xName</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-DtdToHaskell-TypeDef.html#v%3AxName"->Text.XML.HaXml.DtdToHaskell.TypeDef</A-></TD-></TR-><TR-><TD CLASS="indexentry"->xToChar</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-XmlContent-Parser.html#v%3AxToChar"->Text.XML.HaXml.XmlContent.Parser</A->, Text.XML.HaXml.XmlContent, Text.XML.HaXml.XmlContent.Haskell</TD-></TR-><TR-><TD CLASS="indexentry"->xmlEscape</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Escape.html#v%3AxmlEscape"->Text.XML.HaXml.Escape</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->xmlEscapeContent</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Escape.html#v%3AxmlEscapeContent"->Text.XML.HaXml.Escape</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->xmlLex</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Lex.html#v%3AxmlLex"->Text.XML.HaXml.Lex</A-></TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->xmlParse</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Parse.html#v%3AxmlParse"->Text.XML.HaXml.Parse</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexannot"->2 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-ParseLazy.html#v%3AxmlParse"->Text.XML.HaXml.ParseLazy</A-></TD-></TR-><TR-><TD CLASS="indexentry"->xmlParse'</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Parse.html#v%3AxmlParse%27"->Text.XML.HaXml.Parse</A-></TD-></TR-><TR-><TD CLASS="indexentry" COLSPAN="2"->xmlParseWith</TD-></TR-><TR-><TD CLASS="indexannot"->1 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Parse.html#v%3AxmlParseWith"->Text.XML.HaXml.Parse</A-></TD-></TR-><TR-><TD CLASS="indexannot"->2 (Function)</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-ParseLazy.html#v%3AxmlParseWith"->Text.XML.HaXml.ParseLazy</A-></TD-></TR-><TR-><TD CLASS="indexentry"->xmlReLex</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Lex.html#v%3AxmlReLex"->Text.XML.HaXml.Lex</A-></TD-></TR-><TR-><TD CLASS="indexentry"->xmlUnEscape</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Escape.html#v%3AxmlUnEscape"->Text.XML.HaXml.Escape</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->xmlUnEscapeContent</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Escape.html#v%3AxmlUnEscapeContent"->Text.XML.HaXml.Escape</A->, Text.XML.HaXml</TD-></TR-><TR-><TD CLASS="indexentry"->xtract</TD-><TD CLASS="indexlinks"-><A HREF="Text-XML-HaXml-Xtract-Parse.html#v%3Axtract"->Text.XML.HaXml.Xtract.Parse</A-></TD-></TR-></TABLE-></TD-></TR-></TABLE-></BODY-></HTML->
− docs/HaXml/doc-index.html
@@ -1,164 +0,0 @@-<!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->HaXml (Index)</TITLE-><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"-></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"->HaXml</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="section1"->Index</TD-></TR-><TR-><TD-><TABLE CELLPADDING="0" CELLSPACING="5"-><TR-><TD-><A HREF="doc-index-A.html"->A</A-></TD-><TD-><A HREF="doc-index-B.html"->B</A-></TD-><TD-><A HREF="doc-index-C.html"->C</A-></TD-><TD-><A HREF="doc-index-D.html"->D</A-></TD-><TD-><A HREF="doc-index-E.html"->E</A-></TD-><TD-><A HREF="doc-index-F.html"->F</A-></TD-><TD-><A HREF="doc-index-G.html"->G</A-></TD-><TD-><A HREF="doc-index-H.html"->H</A-></TD-><TD-><A HREF="doc-index-I.html"->I</A-></TD-><TD-><A HREF="doc-index-K.html"->K</A-></TD-><TD-><A HREF="doc-index-L.html"->L</A-></TD-><TD-><A HREF="doc-index-M.html"->M</A-></TD-><TD-><A HREF="doc-index-N.html"->N</A-></TD-><TD-><A HREF="doc-index-O.html"->O</A-></TD-><TD-><A HREF="doc-index-P.html"->P</A-></TD-><TD-><A HREF="doc-index-Q.html"->Q</A-></TD-><TD-><A HREF="doc-index-R.html"->R</A-></TD-><TD-><A HREF="doc-index-S.html"->S</A-></TD-><TD-><A HREF="doc-index-T.html"->T</A-></TD-><TD-><A HREF="doc-index-U.html"->U</A-></TD-><TD-><A HREF="doc-index-V.html"->V</A-></TD-><TD-><A HREF="doc-index-W.html"->W</A-></TD-><TD-><A HREF="doc-index-X.html"->X</A-></TD-><TD-><A HREF="doc-index-58.html"->:</A-></TD-><TD-><A HREF="doc-index-33.html"->!</A-></TD-><TD-><A HREF="doc-index-47.html"->/</A-></TD-><TD-><A HREF="doc-index-60.html"->&lt;</A-></TD-><TD-><A HREF="doc-index-63.html"->?</A-></TD-><TD-><A HREF="doc-index-124.html"->|</A-></TD-></TR-></TABLE-></TD-></TR-></TABLE-></BODY-></HTML->
− docs/HaXml/haddock.css
@@ -1,260 +0,0 @@-/* -------- Global things --------- */--BODY { -  background-color: #ffffff;-  color: #000000;-  font-family: sans-serif;-  } --A:link    { color: #0000e0; text-decoration: none }-A:visited { color: #0000a0; text-decoration: none }-A:hover   { background-color: #e0e0ff; text-decoration: none }--TABLE.vanilla {-  width: 100%;-  border-width: 0px;-  /* I can't seem to specify cellspacing or cellpadding properly using CSS... */-}--TABLE.vanilla2 {-  border-width: 0px;-}--/* <TT> font is a little too small in MSIE */-TT  { font-size: 100%; }-PRE { font-size: 100%; }--LI P { margin: 0pt } --TD {-  border-width: 0px;-}--TABLE.narrow {-  border-width: 0px;-}--TD.s8  {  height: 8px;  }-TD.s15 {  height: 15px; }--SPAN.keyword { text-decoration: underline; }--/* Resize the buttom image to match the text size */-IMG.coll { width : 0.75em; height: 0.75em; margin-bottom: 0; margin-right: 0.5em }--/* --------- Contents page ---------- */--DIV.node {-  padding-left: 3em;-}--DIV.cnode {-  padding-left: 1.75em;-}--SPAN.pkg {-  position: absolute;-  left: 50em;-}--/* --------- Documentation elements ---------- */--TD.children {-  padding-left: 25px;-  }--TD.synopsis {-  padding: 2px;-  background-color: #f0f0f0;-  font-family: monospace- }--TD.decl { -  padding: 2px;-  background-color: #f0f0f0; -  font-family: monospace;-  vertical-align: top;-  }--TD.topdecl {-  padding: 2px;-  background-color: #f0f0f0;-  font-family: monospace;-  vertical-align: top;-}--TABLE.declbar {-  border-spacing: 0px;- }--TD.declname {-  width: 100%;- }--TD.declbut {-  padding-left: 5px;-  padding-right: 5px;-  border-left-width: 1px;-  border-left-color: #000099;-  border-left-style: solid;-  white-space: nowrap;-  font-size: small;- }--/* -  arg is just like decl, except that wrapping is not allowed.  It is-  used for function and constructor arguments which have a text box-  to the right, where if wrapping is allowed the text box squashes up-  the declaration by wrapping it.-*/-TD.arg { -  padding: 2px;-  background-color: #f0f0f0; -  font-family: monospace;-  vertical-align: top;-  white-space: nowrap;-  }--TD.recfield { padding-left: 20px }--TD.doc  { -  padding-top: 2px;-  padding-left: 10px;-  }--TD.ndoc  { -  padding: 2px;-  }--TD.rdoc  { -  padding: 2px;-  padding-left: 10px;-  width: 100%;-  }--TD.body  { -  padding-left: 10px-  }--TD.pkg {-  width: 100%;-  padding-left: 10px-}--TD.indexentry {-  vertical-align: top;-  padding-right: 10px-  }--TD.indexannot {-  vertical-align: top;-  padding-left: 20px;-  white-space: nowrap-  }--TD.indexlinks {-  width: 100%-  }--/* ------- Section Headings ------- */--TD.section1 {-  padding-top: 15px;-  font-weight: bold;-  font-size: 150%-  }--TD.section2 {-  padding-top: 10px;-  font-weight: bold;-  font-size: 130%-  }--TD.section3 {-  padding-top: 5px;-  font-weight: bold;-  font-size: 110%-  }--TD.section4 {-  font-weight: bold;-  font-size: 100%-  }--/* -------------- The title bar at the top of the page */--TD.infohead {-  color: #ffffff;-  font-weight: bold;-  padding-right: 10px;-  text-align: left;-}--TD.infoval {-  color: #ffffff;-  padding-right: 10px;-  text-align: left;-}--TD.topbar {-  background-color: #000099;-  padding: 5px;-}--TD.title {-  color: #ffffff;-  padding-left: 10px;-  width: 100%-  }--TD.topbut {-  padding-left: 5px;-  padding-right: 5px;-  border-left-width: 1px;-  border-left-color: #ffffff;-  border-left-style: solid;-  white-space: nowrap;-  }--TD.topbut A:link {-  color: #ffffff-  }--TD.topbut A:visited {-  color: #ffff00-  }--TD.topbut A:hover {-  background-color: #6060ff;-  }--TD.topbut:hover {-  background-color: #6060ff-  }--TD.modulebar { -  background-color: #0077dd;-  padding: 5px;-  border-top-width: 1px;-  border-top-color: #ffffff;-  border-top-style: solid;-  }--/* --------- The page footer --------- */--TD.botbar {-  background-color: #000099;-  color: #ffffff;-  padding: 5px-  }-TD.botbar A:link {-  color: #ffffff;-  text-decoration: underline-  }-TD.botbar A:visited {-  color: #ffff00-  }-TD.botbar A:hover {-  background-color: #6060ff-  }-
− docs/HaXml/haddock.js
@@ -1,15 +0,0 @@-// Haddock JavaScript utilities-function toggle(button,id)-{-   var n = document.getElementById(id).style;-   if (n.display == "none")-   {-	button.src = "minus.gif";-	n.display = "block";-   }-   else-   {-	button.src = "plus.gif";-	n.display = "none";-   }-}
− docs/HaXml/haskell_icon.gif

binary file changed (911 → absent bytes)

− docs/HaXml/index.html
@@ -1,457 +0,0 @@-<!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->HaXml</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"->HaXml</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="section1"->Modules</TD-></TR-><TR-><TD-><TABLE CLASS="vanilla2" CELLSPACING="0" CELLPADDING="0"-><TR-><TD STYLE="width: 50em"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'n:0')" ALT="show/hide"->Text</TD-><TD-></TD-><TD-></TD-></TR-><TR-><TD STYLE="padding: 0; padding-left: 2em" COLSPAN="3"-><TABLE CLASS="vanilla2" CELLSPACING="0" CELLPADDING="0" ID="n:0" STYLE="display:block;"-><TR-><TD STYLE="width: 48em"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'n:1')" ALT="show/hide"->XML</TD-><TD-></TD-><TD-></TD-></TR-><TR-><TD STYLE="padding: 0; padding-left: 2em" COLSPAN="3"-><TABLE CLASS="vanilla2" CELLSPACING="0" CELLPADDING="0" ID="n:1" STYLE="display:block;"-><TR-><TD STYLE="width: 46em"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'n:2')" ALT="show/hide"-><A HREF="Text-XML-HaXml.html"->Text.XML.HaXml</A-></TD-><TD-></TD-><TD-></TD-></TR-><TR-><TD STYLE="padding: 0; padding-left: 2em" COLSPAN="3"-><TABLE CLASS="vanilla2" CELLSPACING="0" CELLPADDING="0" ID="n:2" STYLE="display:block;"-><TR-><TD STYLE="padding-left: 1.25em;width: 44em"-><A HREF="Text-XML-HaXml-ByteStringPP.html"->Text.XML.HaXml.ByteStringPP</A-></TD-><TD-></TD-><TD-></TD-></TR-><TR-><TD STYLE="padding-left: 1.25em;width: 44em"-><A HREF="Text-XML-HaXml-Combinators.html"->Text.XML.HaXml.Combinators</A-></TD-><TD-></TD-><TD-></TD-></TR-><TR-><TD STYLE="width: 44em"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'n:3')" ALT="show/hide"->DtdToHaskell</TD-><TD-></TD-><TD-></TD-></TR-><TR-><TD STYLE="padding: 0; padding-left: 2em" COLSPAN="3"-><TABLE CLASS="vanilla2" CELLSPACING="0" CELLPADDING="0" ID="n:3" STYLE="display:block;"-><TR-><TD STYLE="padding-left: 1.25em;width: 42em"-><A HREF="Text-XML-HaXml-DtdToHaskell-Convert.html"->Text.XML.HaXml.DtdToHaskell.Convert</A-></TD-><TD-></TD-><TD-></TD-></TR-><TR-><TD STYLE="padding-left: 1.25em;width: 42em"-><A HREF="Text-XML-HaXml-DtdToHaskell-Instance.html"->Text.XML.HaXml.DtdToHaskell.Instance</A-></TD-><TD-></TD-><TD-></TD-></TR-><TR-><TD STYLE="padding-left: 1.25em;width: 42em"-><A HREF="Text-XML-HaXml-DtdToHaskell-TypeDef.html"->Text.XML.HaXml.DtdToHaskell.TypeDef</A-></TD-><TD-></TD-><TD-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD STYLE="padding-left: 1.25em;width: 44em"-><A HREF="Text-XML-HaXml-Escape.html"->Text.XML.HaXml.Escape</A-></TD-><TD-></TD-><TD-></TD-></TR-><TR-><TD STYLE="width: 44em"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'n:4')" ALT="show/hide"->Html</TD-><TD-></TD-><TD-></TD-></TR-><TR-><TD STYLE="padding: 0; padding-left: 2em" COLSPAN="3"-><TABLE CLASS="vanilla2" CELLSPACING="0" CELLPADDING="0" ID="n:4" STYLE="display:block;"-><TR-><TD STYLE="padding-left: 1.25em;width: 42em"-><A HREF="Text-XML-HaXml-Html-Generate.html"->Text.XML.HaXml.Html.Generate</A-></TD-><TD-></TD-><TD-></TD-></TR-><TR-><TD STYLE="padding-left: 1.25em;width: 42em"-><A HREF="Text-XML-HaXml-Html-Parse.html"->Text.XML.HaXml.Html.Parse</A-></TD-><TD-></TD-><TD-></TD-></TR-><TR-><TD STYLE="padding-left: 1.25em;width: 42em"-><A HREF="Text-XML-HaXml-Html-ParseLazy.html"->Text.XML.HaXml.Html.ParseLazy</A-></TD-><TD-></TD-><TD-></TD-></TR-><TR-><TD STYLE="padding-left: 1.25em;width: 42em"-><A HREF="Text-XML-HaXml-Html-Pretty.html"->Text.XML.HaXml.Html.Pretty</A-></TD-><TD-></TD-><TD-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD STYLE="padding-left: 1.25em;width: 44em"-><A HREF="Text-XML-HaXml-Lex.html"->Text.XML.HaXml.Lex</A-></TD-><TD-></TD-><TD-></TD-></TR-><TR-><TD STYLE="padding-left: 1.25em;width: 44em"-><A HREF="Text-XML-HaXml-OneOfN.html"->Text.XML.HaXml.OneOfN</A-></TD-><TD-></TD-><TD-></TD-></TR-><TR-><TD STYLE="padding-left: 1.25em;width: 44em"-><A HREF="Text-XML-HaXml-Parse.html"->Text.XML.HaXml.Parse</A-></TD-><TD-></TD-><TD-></TD-></TR-><TR-><TD STYLE="padding-left: 1.25em;width: 44em"-><A HREF="Text-XML-HaXml-ParseLazy.html"->Text.XML.HaXml.ParseLazy</A-></TD-><TD-></TD-><TD-></TD-></TR-><TR-><TD STYLE="padding-left: 1.25em;width: 44em"-><A HREF="Text-XML-HaXml-Posn.html"->Text.XML.HaXml.Posn</A-></TD-><TD-></TD-><TD-></TD-></TR-><TR-><TD STYLE="padding-left: 1.25em;width: 44em"-><A HREF="Text-XML-HaXml-Pretty.html"->Text.XML.HaXml.Pretty</A-></TD-><TD-></TD-><TD-></TD-></TR-><TR-><TD STYLE="padding-left: 1.25em;width: 44em"-><A HREF="Text-XML-HaXml-SAX.html"->Text.XML.HaXml.SAX</A-></TD-><TD-></TD-><TD-></TD-></TR-><TR-><TD STYLE="padding-left: 1.25em;width: 44em"-><A HREF="Text-XML-HaXml-ShowXmlLazy.html"->Text.XML.HaXml.ShowXmlLazy</A-></TD-><TD-></TD-><TD-></TD-></TR-><TR-><TD STYLE="padding-left: 1.25em;width: 44em"-><A HREF="Text-XML-HaXml-TypeMapping.html"->Text.XML.HaXml.TypeMapping</A-></TD-><TD-></TD-><TD-></TD-></TR-><TR-><TD STYLE="padding-left: 1.25em;width: 44em"-><A HREF="Text-XML-HaXml-Types.html"->Text.XML.HaXml.Types</A-></TD-><TD-></TD-><TD-></TD-></TR-><TR-><TD STYLE="padding-left: 1.25em;width: 44em"-><A HREF="Text-XML-HaXml-Util.html"->Text.XML.HaXml.Util</A-></TD-><TD-></TD-><TD-></TD-></TR-><TR-><TD STYLE="padding-left: 1.25em;width: 44em"-><A HREF="Text-XML-HaXml-Validate.html"->Text.XML.HaXml.Validate</A-></TD-><TD-></TD-><TD-></TD-></TR-><TR-><TD STYLE="padding-left: 1.25em;width: 44em"-><A HREF="Text-XML-HaXml-Verbatim.html"->Text.XML.HaXml.Verbatim</A-></TD-><TD-></TD-><TD-></TD-></TR-><TR-><TD STYLE="padding-left: 1.25em;width: 44em"-><A HREF="Text-XML-HaXml-Wrappers.html"->Text.XML.HaXml.Wrappers</A-></TD-><TD-></TD-><TD-></TD-></TR-><TR-><TD STYLE="width: 44em"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'n:5')" ALT="show/hide"-><A HREF="Text-XML-HaXml-XmlContent.html"->Text.XML.HaXml.XmlContent</A-></TD-><TD-></TD-><TD-></TD-></TR-><TR-><TD STYLE="padding: 0; padding-left: 2em" COLSPAN="3"-><TABLE CLASS="vanilla2" CELLSPACING="0" CELLPADDING="0" ID="n:5" STYLE="display:block;"-><TR-><TD STYLE="padding-left: 1.25em;width: 42em"-><A HREF="Text-XML-HaXml-XmlContent-Haskell.html"->Text.XML.HaXml.XmlContent.Haskell</A-></TD-><TD-></TD-><TD-></TD-></TR-><TR-><TD STYLE="padding-left: 1.25em;width: 42em"-><A HREF="Text-XML-HaXml-XmlContent-Parser.html"->Text.XML.HaXml.XmlContent.Parser</A-></TD-><TD-></TD-><TD-></TD-></TR-></TABLE-></TD-></TR-><TR-><TD STYLE="width: 44em"-><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'n:6')" ALT="show/hide"->Xtract</TD-><TD-></TD-><TD-></TD-></TR-><TR-><TD STYLE="padding: 0; padding-left: 2em" COLSPAN="3"-><TABLE CLASS="vanilla2" CELLSPACING="0" CELLPADDING="0" ID="n:6" STYLE="display:block;"-><TR-><TD STYLE="padding-left: 1.25em;width: 42em"-><A HREF="Text-XML-HaXml-Xtract-Combinators.html"->Text.XML.HaXml.Xtract.Combinators</A-></TD-><TD-></TD-><TD-></TD-></TR-><TR-><TD STYLE="padding-left: 1.25em;width: 42em"-><A HREF="Text-XML-HaXml-Xtract-Lex.html"->Text.XML.HaXml.Xtract.Lex</A-></TD-><TD-></TD-><TD-></TD-></TR-><TR-><TD STYLE="padding-left: 1.25em;width: 42em"-><A HREF="Text-XML-HaXml-Xtract-Parse.html"->Text.XML.HaXml.Xtract.Parse</A-></TD-><TD-></TD-><TD-></TD-></TR-></TABLE-></TD-></TR-></TABLE-></TD-></TR-></TABLE-></TD-></TR-></TABLE-></TD-></TR-></TABLE-></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->
− docs/HaXml/minus.gif

binary file changed (56 → absent bytes)

− docs/HaXml/plus.gif

binary file changed (59 → absent bytes)

− docs/HaXml/src/Text/XML/HaXml.html
@@ -1,46 +0,0 @@-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">-<html>-<head>-<!-- Generated by HsColour, http://www.cs.york.ac.uk/fp/darcs/hscolour/ -->-<title>src/Text/XML/HaXml.hs</title>-</head>-<body>-<pre><a name="line-1"></a><font color=Magenta><em>#</em></font>define dummy	<font color=Blue>-- just to ensure cpp gets called on this file</font>-<a name="line-2"></a><font color=Blue>-- | This is just a convenient way of bunching the XML combinators</font>-<a name="line-3"></a><font color=Blue>--   together with some other things you are likely to want at the</font>-<a name="line-4"></a><font color=Blue>--   same time.</font>-<a name="line-5"></a><font color=Green><u>module</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml-<a name="line-6"></a>  <font color=Cyan>(</font> <font color=Green><u>module</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Types-<a name="line-7"></a>  <font color=Cyan>,</font> <font color=Green><u>module</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Combinators-<a name="line-8"></a>  <font color=Cyan>,</font> <font color=Green><u>module</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Parse-<a name="line-9"></a>  <font color=Cyan>,</font> <font color=Green><u>module</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Pretty-<a name="line-10"></a>  <font color=Cyan>,</font> <font color=Green><u>module</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Html<font color=Cyan>.</font>Generate-<a name="line-11"></a>  <font color=Cyan>,</font> <font color=Green><u>module</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Html<font color=Cyan>.</font>Parse-<a name="line-12"></a>  <font color=Cyan>,</font> <font color=Green><u>module</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Validate-<a name="line-13"></a>  <font color=Cyan>,</font> <font color=Green><u>module</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Wrappers-<a name="line-14"></a>  <font color=Cyan>,</font> <font color=Green><u>module</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Verbatim-<a name="line-15"></a>  <font color=Cyan>,</font> <font color=Green><u>module</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Escape-<a name="line-16"></a>  <font color=Cyan>,</font> render-<a name="line-17"></a>  <font color=Cyan>,</font> version-<a name="line-18"></a>  <font color=Cyan>)</font> <font color=Green><u>where</u></font>-<a name="line-19"></a>-<a name="line-20"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Types-<a name="line-21"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Combinators-<a name="line-22"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Parse       <font color=Cyan>(</font>xmlParse<font color=Cyan>,</font>dtdParse<font color=Cyan>)</font>-<a name="line-23"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Pretty      <font color=Cyan>(</font>element<font color=Cyan>)</font>-<a name="line-24"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Html<font color=Cyan>.</font>Generate-<a name="line-25"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Html<font color=Cyan>.</font>Parse  <font color=Cyan>(</font>htmlParse<font color=Cyan>)</font>-<a name="line-26"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Validate    <font color=Cyan>(</font>validate<font color=Cyan>)</font>-<a name="line-27"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Wrappers    <font color=Cyan>(</font>fix2Args<font color=Cyan>,</font>processXmlWith<font color=Cyan>)</font>-<a name="line-28"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Verbatim-<a name="line-29"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Escape-<a name="line-30"></a>-<a name="line-31"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>PrettyPrint<font color=Cyan>.</font>HughesPJ  <font color=Cyan>(</font>render<font color=Cyan>)</font>-<a name="line-32"></a>-<a name="line-33"></a><a name="version"></a><font color=Blue>-- | The version of the library.</font>-<a name="line-34"></a><font color=Blue>version</font> <font color=Red>::</font> String-<a name="line-35"></a><font color=Blue>version</font>  <font color=Red>=</font> <font color=Magenta>"VERSION"</font>-<a name="line-36"></a>		<font color=Blue>-- expect cpp to fill in value</font>-</pre>-</body>-</html>
− docs/HaXml/src/Text/XML/HaXml/ByteStringPP.html
@@ -1,350 +0,0 @@-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">-<html>-<head>-<!-- Generated by HsColour, http://www.cs.york.ac.uk/fp/darcs/hscolour/ -->-<title>src/Text/XML/HaXml/ByteStringPP.hs</title>-</head>-<body>-<pre><a name="line-1"></a><font color=Blue>-- | This is a fast non-pretty-printer for turning the internal representation</font>-<a name="line-2"></a><font color=Blue>--   of generic structured XML documents into Lazy ByteStrings.</font>-<a name="line-3"></a><font color=Blue>--   Like in Text.Xml.HaXml.Pretty, there is one pp function for each type in</font>-<a name="line-4"></a><font color=Blue>--   Text.Xml.HaXml.Types, so you can pretty-print as much or as little</font>-<a name="line-5"></a><font color=Blue>--   of the document as you wish.</font>-<a name="line-6"></a>-<a name="line-7"></a><font color=Green><u>module</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>ByteStringPP-<a name="line-8"></a>  <font color=Cyan>(</font>-<a name="line-9"></a>  <font color=Blue>-- * Pretty-print a whole document</font>-<a name="line-10"></a>    document-<a name="line-11"></a>  <font color=Blue>-- ** Just one content</font>-<a name="line-12"></a>  <font color=Cyan>,</font>   content-<a name="line-13"></a>  <font color=Blue>-- ** Just one tagged element</font>-<a name="line-14"></a>  <font color=Cyan>,</font>   element-<a name="line-15"></a>  <font color=Blue>-- * Pretty-print just a DTD</font>-<a name="line-16"></a>  <font color=Cyan>,</font> doctypedecl-<a name="line-17"></a>  <font color=Blue>-- ** The prolog</font>-<a name="line-18"></a>  <font color=Cyan>,</font>   prolog-<a name="line-19"></a>  <font color=Blue>-- ** A content particle description</font>-<a name="line-20"></a>  <font color=Cyan>,</font>   cp-<a name="line-21"></a>  <font color=Cyan>)</font> <font color=Green><u>where</u></font>-<a name="line-22"></a>-<a name="line-23"></a><font color=Green><u>import</u></font> Prelude hiding <font color=Cyan>(</font>maybe<font color=Cyan>,</font>either<font color=Cyan>,</font>elem<font color=Cyan>,</font>concat<font color=Cyan>)</font>-<a name="line-24"></a><font color=Green><u>import</u></font> Maybe hiding <font color=Cyan>(</font>maybe<font color=Cyan>)</font>-<a name="line-25"></a><font color=Green><u>import</u></font> Data<font color=Cyan>.</font>List <font color=Cyan>(</font>intersperse<font color=Cyan>)</font>-<a name="line-26"></a><font color=Blue>--import Data.ByteString.Lazy hiding (pack,map,head,any,singleton,intersperse,join)</font>-<a name="line-27"></a><font color=Green><u>import</u></font> Data<font color=Cyan>.</font>ByteString<font color=Cyan>.</font>Lazy<font color=Cyan>.</font>Char8 <font color=Cyan>(</font>ByteString()<font color=Cyan>,</font> concat<font color=Cyan>,</font> pack<font color=Cyan>,</font> singleton<font color=Cyan>,</font> intercalate-<a name="line-28"></a>                                  <font color=Cyan>,</font> append<font color=Cyan>,</font> elem<font color=Cyan>,</font> empty<font color=Cyan>)</font>-<a name="line-29"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Types-<a name="line-30"></a>-<a name="line-31"></a><a name="either"></a><font color=Blue>either</font> <font color=Red>::</font> <font color=Cyan>(</font>t <font color=Red>-&gt;</font> t1<font color=Cyan>)</font> <font color=Red>-&gt;</font> <font color=Cyan>(</font>t2 <font color=Red>-&gt;</font> t1<font color=Cyan>)</font> <font color=Red>-&gt;</font> Either t t2 <font color=Red>-&gt;</font> t1-<a name="line-32"></a><font color=Blue>either</font> f <font color=Green><u>_</u></font> <font color=Cyan>(</font>Left x<font color=Cyan>)</font>  <font color=Red>=</font> f x-<a name="line-33"></a><font color=Blue>either</font> <font color=Green><u>_</u></font> g <font color=Cyan>(</font>Right x<font color=Cyan>)</font> <font color=Red>=</font> g x-<a name="line-34"></a>-<a name="line-35"></a><a name="maybe"></a><font color=Blue>maybe</font> <font color=Red>::</font> <font color=Cyan>(</font>t <font color=Red>-&gt;</font> ByteString<font color=Cyan>)</font> <font color=Red>-&gt;</font> Maybe t <font color=Red>-&gt;</font> ByteString-<a name="line-36"></a><font color=Blue>maybe</font> <font color=Green><u>_</u></font> Nothing  <font color=Red>=</font> empty-<a name="line-37"></a><font color=Blue>maybe</font> f <font color=Cyan>(</font>Just x<font color=Cyan>)</font> <font color=Red>=</font> f x-<a name="line-38"></a>-<a name="line-39"></a>-<a name="line-40"></a><font color=Blue>-- A simple implementation of the pretty-printing combinator interface,</font>-<a name="line-41"></a><font color=Blue>-- but for plain ByteStrings:</font>-<a name="line-42"></a><font color=Green><u>infixl</u></font> <font color=Magenta>6</font> <font color=Cyan>&lt;&gt;</font>-<a name="line-43"></a><font color=Green><u>infixl</u></font> <font color=Magenta>6</font> <font color=Cyan>&lt;+&gt;</font>-<a name="line-44"></a><font color=Green><u>infixl</u></font> <font color=Magenta>5</font> <font color=Cyan>$$</font>-<a name="line-45"></a><a name="<>"></a><font color=Cyan>(</font><font color=Cyan>&lt;&gt;</font><font color=Cyan>)</font>   <font color=Red>::</font> ByteString   <font color=Red>-&gt;</font> ByteString <font color=Red>-&gt;</font> ByteString <font color=Blue>-- Beside</font>-<a name="line-46"></a><a name="hcat"></a><font color=Blue>hcat</font>   <font color=Red>::</font> <font color=Red>[</font>ByteString<font color=Red>]</font> <font color=Red>-&gt;</font> ByteString                 <font color=Blue>-- List version of &lt;&gt;</font>-<a name="line-47"></a><a name="<+>"></a><font color=Cyan>(</font><font color=Cyan>&lt;+&gt;</font><font color=Cyan>)</font>  <font color=Red>::</font> ByteString   <font color=Red>-&gt;</font> ByteString <font color=Red>-&gt;</font> ByteString <font color=Blue>-- Beside, separated by space</font>-<a name="line-48"></a><a name="hsep"></a><font color=Blue>hsep</font>   <font color=Red>::</font> <font color=Red>[</font>ByteString<font color=Red>]</font> <font color=Red>-&gt;</font> ByteString                 <font color=Blue>-- List version of &lt;+&gt;</font>-<a name="line-49"></a><a name="$$"></a><font color=Cyan>(</font><font color=Cyan>$$</font><font color=Cyan>)</font>   <font color=Red>::</font> ByteString   <font color=Red>-&gt;</font> ByteString <font color=Red>-&gt;</font> ByteString <font color=Blue>-- Above; if there is no</font>-<a name="line-50"></a>                                                   <font color=Blue>-- overlap, it "dovetails"</font>-<a name="line-51"></a><a name="vcat"></a><font color=Blue>vcat</font>   <font color=Red>::</font> <font color=Red>[</font>ByteString<font color=Red>]</font> <font color=Red>-&gt;</font> ByteString       <font color=Blue>-- List version of $$</font>-<a name="line-52"></a><a name="sep"></a><font color=Blue>-- cat    :: [ByteString] -&gt; ByteString       -- Either hcat or vcat</font>-<a name="line-53"></a><font color=Blue>sep</font>    <font color=Red>::</font> <font color=Red>[</font>ByteString<font color=Red>]</font> <font color=Red>-&gt;</font> ByteString       <font color=Blue>-- Either hsep or vcat</font>-<a name="line-54"></a><a name="fsep"></a><font color=Blue>-- fcat   :: [ByteString] -&gt; ByteString       -- ``Paragraph fill'' version of cat</font>-<a name="line-55"></a><font color=Blue>fsep</font>   <font color=Red>::</font> <font color=Red>[</font>ByteString<font color=Red>]</font> <font color=Red>-&gt;</font> ByteString       <font color=Blue>-- ``Paragraph fill'' version of sep</font>-<a name="line-56"></a><a name="nest"></a><font color=Blue>nest</font>   <font color=Red>::</font> Int <font color=Red>-&gt;</font> ByteString <font color=Red>-&gt;</font> ByteString  <font color=Blue>-- Nested</font>-<a name="line-57"></a>-<a name="line-58"></a><font color=Cyan>(</font><font color=Cyan>&lt;&gt;</font><font color=Cyan>)</font>  b1 b2  <font color=Red>=</font> b1 <font color=Cyan>`append`</font> b2-<a name="line-59"></a><font color=Cyan>(</font><font color=Cyan>&lt;+&gt;</font><font color=Cyan>)</font> b1 b2  <font color=Red>=</font> b1 <font color=Cyan>&lt;&gt;</font> pack <font color=Magenta>" "</font> <font color=Cyan>&lt;&gt;</font> b2-<a name="line-60"></a><font color=Cyan>(</font><font color=Cyan>$$</font><font color=Cyan>)</font>  b1 b2  <font color=Red>=</font> b1 <font color=Cyan>&lt;&gt;</font> pack <font color=Magenta>"\n"</font> <font color=Cyan>&lt;&gt;</font> b2-<a name="line-61"></a><font color=Blue>-- ($+$)        = ($$)</font>-<a name="line-62"></a>-<a name="line-63"></a><font color=Blue>hcat</font> <font color=Red>=</font> Data<font color=Cyan>.</font>ByteString<font color=Cyan>.</font>Lazy<font color=Cyan>.</font>Char8<font color=Cyan>.</font>concat-<a name="line-64"></a><font color=Blue>hsep</font> <font color=Red>=</font> Data<font color=Cyan>.</font>ByteString<font color=Cyan>.</font>Lazy<font color=Cyan>.</font>Char8<font color=Cyan>.</font>intercalate <font color=Cyan>(</font>singleton <font color=Magenta>' '</font><font color=Cyan>)</font>-<a name="line-65"></a><font color=Blue>vcat</font> <font color=Red>=</font> Data<font color=Cyan>.</font>ByteString<font color=Cyan>.</font>Lazy<font color=Cyan>.</font>Char8<font color=Cyan>.</font>intercalate <font color=Cyan>(</font>singleton <font color=Magenta>'\n'</font><font color=Cyan>)</font>-<a name="line-66"></a><font color=Green><u>_</u></font>  <font color=Red>=</font> hcat-<a name="line-67"></a><font color=Blue>sep</font>  <font color=Red>=</font> hsep-<a name="line-68"></a><a name="text"></a><font color=Blue>text</font> <font color=Red>::</font> <font color=Red>[</font>Char<font color=Red>]</font> <font color=Red>-&gt;</font> ByteString-<a name="line-69"></a><font color=Blue>text</font> <font color=Red>=</font> pack-<a name="line-70"></a><font color=Blue>-- _ = cat</font>-<a name="line-71"></a><font color=Blue>fsep</font> <font color=Red>=</font> sep-<a name="line-72"></a><font color=Blue>nest</font> <font color=Green><u>_</u></font> b <font color=Red>=</font> pack <font color=Magenta>" "</font> <font color=Cyan>&lt;&gt;</font> b-<a name="line-73"></a><a name="parens"></a><font color=Blue>parens</font> <font color=Red>::</font> ByteString <font color=Red>-&gt;</font> ByteString-<a name="line-74"></a><font color=Blue>parens</font> p <font color=Red>=</font> pack <font color=Magenta>"("</font> <font color=Cyan>&lt;&gt;</font> p <font color=Cyan>&lt;&gt;</font> pack <font color=Magenta>")"</font>-<a name="line-75"></a>-<a name="line-76"></a>-<a name="line-77"></a><font color=Blue>----</font>-<a name="line-78"></a><font color=Blue>-- Now for the XML pretty-printing interface.</font>-<a name="line-79"></a><font color=Blue>-- (Basically copied direct from Text.XML.HaXml.Pretty).</font>-<a name="line-80"></a>-<a name="line-81"></a><a name="document"></a><font color=Blue>document</font> <font color=Red>::</font> Document i <font color=Red>-&gt;</font> ByteString-<a name="line-82"></a><a name="prolog"></a><font color=Blue>prolog</font>   <font color=Red>::</font> Prolog     <font color=Red>-&gt;</font> ByteString-<a name="line-83"></a><a name="xmldecl"></a><font color=Blue>xmldecl</font>  <font color=Red>::</font> XMLDecl    <font color=Red>-&gt;</font> ByteString-<a name="line-84"></a><a name="misc"></a><font color=Blue>misc</font>     <font color=Red>::</font> Misc       <font color=Red>-&gt;</font> ByteString-<a name="line-85"></a><a name="sddecl"></a><font color=Blue>sddecl</font>   <font color=Red>::</font> Bool       <font color=Red>-&gt;</font> ByteString-<a name="line-86"></a>-<a name="line-87"></a><a name="doctypedecl"></a><font color=Blue>doctypedecl</font>   <font color=Red>::</font> DocTypeDecl   <font color=Red>-&gt;</font> ByteString-<a name="line-88"></a><a name="markupdecl"></a><font color=Blue>markupdecl</font>    <font color=Red>::</font> MarkupDecl    <font color=Red>-&gt;</font> ByteString-<a name="line-89"></a><a name="cp"></a><font color=Blue>-- extsubset     :: ExtSubset     -&gt; ByteString</font>-<a name="line-90"></a><font color=Blue>-- extsubsetdecl :: ExtSubsetDecl -&gt; ByteString</font>-<a name="line-91"></a><font color=Blue>cp</font>            <font color=Red>::</font> CP            <font color=Red>-&gt;</font> ByteString-<a name="line-92"></a>-<a name="line-93"></a><a name="element"></a><font color=Blue>element</font>   <font color=Red>::</font> Element i <font color=Red>-&gt;</font> ByteString-<a name="line-94"></a><a name="attribute"></a><font color=Blue>attribute</font> <font color=Red>::</font> Attribute <font color=Red>-&gt;</font> ByteString-<a name="line-95"></a><a name="content"></a><font color=Blue>content</font>   <font color=Red>::</font> Content i <font color=Red>-&gt;</font> ByteString-<a name="line-96"></a>-<a name="line-97"></a><font color=Blue>----</font>-<a name="line-98"></a>-<a name="line-99"></a><font color=Blue>document</font> <font color=Cyan>(</font>Document p <font color=Green><u>_</u></font> e m<font color=Cyan>)</font><font color=Red>=</font> prolog p <font color=Cyan>$$</font> element e <font color=Cyan>$$</font> vcat <font color=Cyan>(</font>Prelude<font color=Cyan>.</font>map misc m<font color=Cyan>)</font>-<a name="line-100"></a><font color=Blue>prolog</font> <font color=Cyan>(</font>Prolog x m1 dtd m2<font color=Cyan>)</font><font color=Red>=</font> maybe xmldecl x <font color=Cyan>$$</font>-<a name="line-101"></a>                             vcat <font color=Cyan>(</font>Prelude<font color=Cyan>.</font>map misc m1<font color=Cyan>)</font> <font color=Cyan>$$</font>-<a name="line-102"></a>                             maybe doctypedecl dtd <font color=Cyan>$$</font>-<a name="line-103"></a>                             vcat <font color=Cyan>(</font>Prelude<font color=Cyan>.</font>map misc m2<font color=Cyan>)</font>-<a name="line-104"></a><font color=Blue>xmldecl</font> <font color=Cyan>(</font>XMLDecl v e sd<font color=Cyan>)</font>   <font color=Red>=</font> text <font color=Magenta>"&lt;?xml version='"</font> <font color=Cyan>&lt;&gt;</font> text v <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>"'"</font> <font color=Cyan>&lt;+&gt;</font>-<a name="line-105"></a>                             maybe encodingdecl e <font color=Cyan>&lt;+&gt;</font>-<a name="line-106"></a>                             maybe sddecl sd <font color=Cyan>&lt;+&gt;</font>-<a name="line-107"></a>                             text <font color=Magenta>"?&gt;"</font>-<a name="line-108"></a><font color=Blue>misc</font> <font color=Cyan>(</font>Comment s<font color=Cyan>)</font>           <font color=Red>=</font> text <font color=Magenta>"&lt;!--"</font> <font color=Cyan>&lt;+&gt;</font> text s <font color=Cyan>&lt;+&gt;</font> text <font color=Magenta>"--&gt;"</font>-<a name="line-109"></a><font color=Blue>misc</font> <font color=Cyan>(</font>PI <font color=Cyan>(</font>n<font color=Cyan>,</font>s<font color=Cyan>)</font><font color=Cyan>)</font>            <font color=Red>=</font> text <font color=Magenta>"&lt;?"</font> <font color=Cyan>&lt;&gt;</font> text n <font color=Cyan>&lt;+&gt;</font> text s <font color=Cyan>&lt;+&gt;</font> text <font color=Magenta>"?&gt;"</font>-<a name="line-110"></a><font color=Blue>sddecl</font> sd   <font color=Red>|</font> sd           <font color=Red>=</font> text <font color=Magenta>"standalone='yes'"</font>-<a name="line-111"></a>            <font color=Red>|</font> otherwise    <font color=Red>=</font> text <font color=Magenta>"standalone='no'"</font>-<a name="line-112"></a><font color=Blue>doctypedecl</font> <font color=Cyan>(</font>DTD n eid ds<font color=Cyan>)</font> <font color=Red>=</font> <font color=Green><u>if</u></font> Prelude<font color=Cyan>.</font>null ds <font color=Green><u>then</u></font>-<a name="line-113"></a>                                  hd <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>"&gt;"</font>-<a name="line-114"></a>                             <font color=Green><u>else</u></font> hd <font color=Cyan>&lt;+&gt;</font> text <font color=Magenta>" ["</font> <font color=Cyan>$$</font>-<a name="line-115"></a>                                  vcat <font color=Cyan>(</font>Prelude<font color=Cyan>.</font>map markupdecl ds<font color=Cyan>)</font> <font color=Cyan>$$</font> text <font color=Magenta>"]&gt;"</font>-<a name="line-116"></a>                           <font color=Green><u>where</u></font> hd <font color=Red>=</font> text <font color=Magenta>"&lt;!DOCTYPE"</font> <font color=Cyan>&lt;+&gt;</font> text n <font color=Cyan>&lt;+&gt;</font>-<a name="line-117"></a>                                      maybe externalid eid-<a name="line-118"></a><font color=Blue>markupdecl</font> <font color=Cyan>(</font>Element e<font color=Cyan>)</font>     <font color=Red>=</font> elementdecl e-<a name="line-119"></a><font color=Blue>markupdecl</font> <font color=Cyan>(</font>AttList a<font color=Cyan>)</font>     <font color=Red>=</font> attlistdecl a-<a name="line-120"></a><font color=Blue>markupdecl</font> <font color=Cyan>(</font>Entity e<font color=Cyan>)</font>      <font color=Red>=</font> entitydecl e-<a name="line-121"></a><font color=Blue>markupdecl</font> <font color=Cyan>(</font>Notation n<font color=Cyan>)</font>    <font color=Red>=</font> notationdecl n-<a name="line-122"></a><font color=Blue>markupdecl</font> <font color=Cyan>(</font>MarkupMisc m<font color=Cyan>)</font>  <font color=Red>=</font> misc m-<a name="line-123"></a><font color=Blue>--markupdecl (MarkupPE p m)  = peref p</font>-<a name="line-124"></a><font color=Blue>-- _ (ExtSubset t ds) = maybe textdecl t $$</font>-<a name="line-125"></a><font color=Blue>--                             vcat (Prelude.map extsubsetdecl ds)</font>-<a name="line-126"></a><font color=Blue>-- _ (ExtMarkupDecl m)      = markupdecl m</font>-<a name="line-127"></a><font color=Blue>-- extsubsetdecl (ExtConditionalSect c) = conditionalsect c</font>-<a name="line-128"></a><font color=Blue>--extsubsetdecl (ExtPEReference p e)   = peref p</font>-<a name="line-129"></a>-<a name="line-130"></a><font color=Blue>element</font> <font color=Cyan>(</font>Elem n <font color=Green><u>as</u></font> []<font color=Cyan>)</font> <font color=Red>=</font> text <font color=Magenta>"&lt;"</font> <font color=Cyan>&lt;&gt;</font> text n <font color=Cyan>&lt;+&gt;</font>-<a name="line-131"></a>                         fsep <font color=Cyan>(</font>Prelude<font color=Cyan>.</font>map attribute <font color=Green><u>as</u></font><font color=Cyan>)</font> <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>"/&gt;"</font>-<a name="line-132"></a><font color=Blue>element</font> e<font color=Red>@</font><font color=Cyan>(</font>Elem n <font color=Green><u>as</u></font> cs<font color=Cyan>)</font>-<a name="line-133"></a><font color=Blue>--  | any isText cs    = text "&lt;" &lt;&gt; text n &lt;+&gt; fsep (map attribute as) &lt;&gt;</font>-<a name="line-134"></a><font color=Blue>--                       text "&gt;" &lt;&gt; hcat (map content cs) &lt;&gt;</font>-<a name="line-135"></a><font color=Blue>--                       text "&lt;/" &lt;&gt; text n &lt;&gt; text "&gt;"</font>-<a name="line-136"></a>    <font color=Red>|</font> isText <font color=Cyan>(</font>head cs<font color=Cyan>)</font> <font color=Red>=</font> text <font color=Magenta>"&lt;"</font> <font color=Cyan>&lt;&gt;</font> text n <font color=Cyan>&lt;+&gt;</font> fsep <font color=Cyan>(</font>Prelude<font color=Cyan>.</font>map attribute <font color=Green><u>as</u></font><font color=Cyan>)</font> <font color=Cyan>&lt;&gt;</font>-<a name="line-137"></a>                         text <font color=Magenta>"&gt;"</font> <font color=Cyan>&lt;&gt;</font> hcat <font color=Cyan>(</font>Prelude<font color=Cyan>.</font>map content cs<font color=Cyan>)</font> <font color=Cyan>&lt;&gt;</font>-<a name="line-138"></a>                         text <font color=Magenta>"&lt;/"</font> <font color=Cyan>&lt;&gt;</font> text n <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>"&gt;"</font>-<a name="line-139"></a>    <font color=Red>|</font> otherwise        <font color=Red>=</font> <font color=Green><u>let</u></font> <font color=Cyan>(</font>d<font color=Cyan>,</font>c<font color=Cyan>)</font> <font color=Red>=</font> carryelem e empty-<a name="line-140"></a>                         <font color=Green><u>in</u></font> d <font color=Cyan>&lt;&gt;</font> c-<a name="line-141"></a>-<a name="line-142"></a><a name="isText"></a><font color=Blue>isText</font> <font color=Red>::</font> Content t <font color=Red>-&gt;</font> Bool-<a name="line-143"></a><font color=Blue>isText</font> <font color=Cyan>(</font>CString <font color=Green><u>_</u></font> <font color=Green><u>_</u></font> <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red>=</font> True-<a name="line-144"></a><font color=Blue>isText</font> <font color=Cyan>(</font>CRef <font color=Green><u>_</u></font> <font color=Green><u>_</u></font><font color=Cyan>)</font>      <font color=Red>=</font> True-<a name="line-145"></a><font color=Blue>isText</font> <font color=Green><u>_</u></font>               <font color=Red>=</font> False-<a name="line-146"></a>-<a name="line-147"></a><a name="carryelem"></a><font color=Blue>carryelem</font> <font color=Red>::</font> Element t <font color=Red>-&gt;</font> ByteString <font color=Red>-&gt;</font> <font color=Cyan>(</font>ByteString<font color=Cyan>,</font> ByteString<font color=Cyan>)</font>-<a name="line-148"></a><font color=Blue>carryelem</font> <font color=Cyan>(</font>Elem n <font color=Green><u>as</u></font> []<font color=Cyan>)</font> c-<a name="line-149"></a>                       <font color=Red>=</font> <font color=Cyan>(</font> c <font color=Cyan>&lt;&gt;</font>-<a name="line-150"></a>                           text <font color=Magenta>"&lt;"</font> <font color=Cyan>&lt;&gt;</font> text n <font color=Cyan>&lt;+&gt;</font> fsep <font color=Cyan>(</font>Prelude<font color=Cyan>.</font>map attribute <font color=Green><u>as</u></font><font color=Cyan>)</font>-<a name="line-151"></a>                         <font color=Cyan>,</font> text <font color=Magenta>"/&gt;"</font><font color=Cyan>)</font>-<a name="line-152"></a><font color=Blue>carryelem</font> <font color=Cyan>(</font>Elem n <font color=Green><u>as</u></font> cs<font color=Cyan>)</font> c-<a name="line-153"></a><font color=Blue>--  | any isText cs    =  ( c &lt;&gt; element e, empty)</font>-<a name="line-154"></a>    <font color=Red>|</font> otherwise        <font color=Red>=</font>  <font color=Green><u>let</u></font> <font color=Cyan>(</font>cs0<font color=Cyan>,</font>d0<font color=Cyan>)</font> <font color=Red>=</font> carryscan carrycontent cs <font color=Cyan>(</font>text <font color=Magenta>"&gt;"</font><font color=Cyan>)</font>-<a name="line-155"></a>                          <font color=Green><u>in</u></font>-<a name="line-156"></a>                          <font color=Cyan>(</font> c <font color=Cyan>&lt;&gt;</font>-<a name="line-157"></a>                            text <font color=Magenta>"&lt;"</font> <font color=Cyan>&lt;&gt;</font> text n <font color=Cyan>&lt;+&gt;</font> fsep <font color=Cyan>(</font>Prelude<font color=Cyan>.</font>map attribute <font color=Green><u>as</u></font><font color=Cyan>)</font> <font color=Cyan>$$</font>-<a name="line-158"></a>                            nest <font color=Magenta>2</font> <font color=Cyan>(</font>vcat cs0<font color=Cyan>)</font> <font color=Cyan>&lt;&gt;</font> <font color=Blue>--- $$</font>-<a name="line-159"></a>                            d0 <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>"&lt;/"</font> <font color=Cyan>&lt;&gt;</font> text n-<a name="line-160"></a>                          <font color=Cyan>,</font> text <font color=Magenta>"&gt;"</font><font color=Cyan>)</font>-<a name="line-161"></a><a name="carrycontent"></a><font color=Blue>carrycontent</font> <font color=Red>::</font> Content t <font color=Red>-&gt;</font> ByteString <font color=Red>-&gt;</font> <font color=Cyan>(</font>ByteString<font color=Cyan>,</font> ByteString<font color=Cyan>)</font>-<a name="line-162"></a><font color=Blue>carrycontent</font> <font color=Cyan>(</font>CElem e <font color=Green><u>_</u></font><font color=Cyan>)</font> c   <font color=Red>=</font> carryelem e c-<a name="line-163"></a><font color=Blue>carrycontent</font> <font color=Cyan>(</font>CString False s <font color=Green><u>_</u></font><font color=Cyan>)</font> c <font color=Red>=</font> <font color=Cyan>(</font>c <font color=Cyan>&lt;&gt;</font> chardata s<font color=Cyan>,</font> empty<font color=Cyan>)</font>-<a name="line-164"></a><font color=Blue>carrycontent</font> <font color=Cyan>(</font>CString True  s <font color=Green><u>_</u></font><font color=Cyan>)</font> c <font color=Red>=</font> <font color=Cyan>(</font>c <font color=Cyan>&lt;&gt;</font> cdsect s<font color=Cyan>,</font> empty<font color=Cyan>)</font>-<a name="line-165"></a><font color=Blue>carrycontent</font> <font color=Cyan>(</font>CRef r <font color=Green><u>_</u></font><font color=Cyan>)</font> c    <font color=Red>=</font> <font color=Cyan>(</font>c <font color=Cyan>&lt;&gt;</font> reference r<font color=Cyan>,</font> empty<font color=Cyan>)</font>-<a name="line-166"></a><font color=Blue>carrycontent</font> <font color=Cyan>(</font>CMisc m <font color=Green><u>_</u></font><font color=Cyan>)</font> c   <font color=Red>=</font> <font color=Cyan>(</font>c <font color=Cyan>&lt;&gt;</font> misc m<font color=Cyan>,</font> empty<font color=Cyan>)</font>-<a name="line-167"></a>-<a name="line-168"></a><a name="carryscan"></a><font color=Blue>carryscan</font> <font color=Red>::</font> <font color=Cyan>(</font>a<font color=Red>-&gt;</font>c<font color=Red>-&gt;</font><font color=Cyan>(</font>b<font color=Cyan>,</font>c<font color=Cyan>)</font><font color=Cyan>)</font> <font color=Red>-&gt;</font> <font color=Red>[</font>a<font color=Red>]</font> <font color=Red>-&gt;</font> c <font color=Red>-&gt;</font> <font color=Cyan>(</font><font color=Red>[</font>b<font color=Red>]</font><font color=Cyan>,</font>c<font color=Cyan>)</font>-<a name="line-169"></a><font color=Blue>carryscan</font> <font color=Green><u>_</u></font> []     c <font color=Red>=</font> <font color=Cyan>(</font>[]<font color=Cyan>,</font>c<font color=Cyan>)</font>-<a name="line-170"></a><font color=Blue>carryscan</font> f <font color=Cyan>(</font>a<font color=Red><b>:</b></font><font color=Green><u>as</u></font><font color=Cyan>)</font> c <font color=Red>=</font> <font color=Green><u>let</u></font> <font color=Cyan>(</font>b<font color=Cyan>,</font> c0<font color=Cyan>)</font> <font color=Red>=</font> f a c-<a name="line-171"></a>                           <font color=Cyan>(</font>bs<font color=Cyan>,</font>c1<font color=Cyan>)</font> <font color=Red>=</font> carryscan f <font color=Green><u>as</u></font> c0-<a name="line-172"></a>                       <font color=Green><u>in</u></font> <font color=Cyan>(</font>b<font color=Red><b>:</b></font>bs<font color=Cyan>,</font> c1<font color=Cyan>)</font>-<a name="line-173"></a>-<a name="line-174"></a><font color=Blue>--carryelem e@(Elem n as cs) c</font>-<a name="line-175"></a><font color=Blue>--  | isText (head cs) =</font>-<a name="line-176"></a><font color=Blue>--        ( start &lt;&gt;</font>-<a name="line-177"></a><font color=Blue>--          text "&gt;" &lt;&gt; hcat (map content cs) &lt;&gt; text "&lt;/" &lt;&gt; text n</font>-<a name="line-178"></a><font color=Blue>--        , text "&gt;")</font>-<a name="line-179"></a><font color=Blue>--  | otherwise =</font>-<a name="line-180"></a><font color=Blue>--        let (d,c0) = foldl carrycontent (start, text "&gt;") cs in</font>-<a name="line-181"></a><font color=Blue>--        ( d &lt;&gt; c0 &lt;&gt; text "&lt;/" &lt;&gt; text n</font>-<a name="line-182"></a><font color=Blue>--        , text "&gt;")</font>-<a name="line-183"></a><font color=Blue>--  where start = c &lt;&gt; text "&lt;" &lt;&gt; text n &lt;+&gt; fsep (map attribute as)</font>-<a name="line-184"></a><font color=Blue>--</font>-<a name="line-185"></a><font color=Blue>--carrycontent (d,c) (CElem e)   = let (d',c') = carryelem e c in</font>-<a name="line-186"></a><font color=Blue>--                                 (d $$ nest 2 d',       c')</font>-<a name="line-187"></a><font color=Blue>--carrycontent (d,c) (CString _ s) = (d &lt;&gt; c &lt;&gt; chardata s, empty)</font>-<a name="line-188"></a><font color=Blue>--carrycontent (d,c) (CRef r)    = (d &lt;&gt; c &lt;&gt; reference r,empty)</font>-<a name="line-189"></a><font color=Blue>--carrycontent (d,c) (CMisc m)   = (d $$ c &lt;&gt; misc m,     empty)</font>-<a name="line-190"></a>-<a name="line-191"></a>-<a name="line-192"></a><font color=Blue>attribute</font> <font color=Cyan>(</font>n<font color=Cyan>,</font>v<font color=Cyan>)</font>             <font color=Red>=</font> text n <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>"="</font> <font color=Cyan>&lt;&gt;</font> attvalue v-<a name="line-193"></a><font color=Blue>content</font> <font color=Cyan>(</font>CElem e <font color=Green><u>_</u></font><font color=Cyan>)</font>         <font color=Red>=</font> element e-<a name="line-194"></a><font color=Blue>content</font> <font color=Cyan>(</font>CString False s <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red>=</font> chardata s-<a name="line-195"></a><font color=Blue>content</font> <font color=Cyan>(</font>CString True s <font color=Green><u>_</u></font><font color=Cyan>)</font>  <font color=Red>=</font> cdsect s-<a name="line-196"></a><font color=Blue>content</font> <font color=Cyan>(</font>CRef r <font color=Green><u>_</u></font><font color=Cyan>)</font>          <font color=Red>=</font> reference r-<a name="line-197"></a><font color=Blue>content</font> <font color=Cyan>(</font>CMisc m <font color=Green><u>_</u></font><font color=Cyan>)</font>         <font color=Red>=</font> misc m-<a name="line-198"></a>-<a name="line-199"></a><a name="elementdecl"></a><font color=Blue>elementdecl</font> <font color=Red>::</font> ElementDecl <font color=Red>-&gt;</font> ByteString-<a name="line-200"></a><font color=Blue>elementdecl</font> <font color=Cyan>(</font>ElementDecl n cs<font color=Cyan>)</font> <font color=Red>=</font> text <font color=Magenta>"&lt;!ELEMENT"</font> <font color=Cyan>&lt;+&gt;</font> text n <font color=Cyan>&lt;+&gt;</font>-<a name="line-201"></a>                                 contentspec cs <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>"&gt;"</font>-<a name="line-202"></a><a name="contentspec"></a><font color=Blue>contentspec</font> <font color=Red>::</font> ContentSpec <font color=Red>-&gt;</font> ByteString-<a name="line-203"></a><font color=Blue>contentspec</font> EMPTY              <font color=Red>=</font> text <font color=Magenta>"EMPTY"</font>-<a name="line-204"></a><font color=Blue>contentspec</font> ANY                <font color=Red>=</font> text <font color=Magenta>"ANY"</font>-<a name="line-205"></a><font color=Blue>contentspec</font> <font color=Cyan>(</font>Mixed m<font color=Cyan>)</font>          <font color=Red>=</font> mixed m-<a name="line-206"></a><font color=Blue>contentspec</font> <font color=Cyan>(</font>ContentSpec c<font color=Cyan>)</font>    <font color=Red>=</font> cp c-<a name="line-207"></a><font color=Blue>--contentspec (ContentPE p cs)   = peref p</font>-<a name="line-208"></a><font color=Blue>cp</font> <font color=Cyan>(</font>TagName n m<font color=Cyan>)</font>       <font color=Red>=</font> text n <font color=Cyan>&lt;&gt;</font> modifier m-<a name="line-209"></a><font color=Blue>cp</font> <font color=Cyan>(</font>Choice cs m<font color=Cyan>)</font>       <font color=Red>=</font> parens <font color=Cyan>(</font>hcat <font color=Cyan>(</font>intersperse <font color=Cyan>(</font>text <font color=Magenta>"|"</font><font color=Cyan>)</font> <font color=Cyan>(</font>Prelude<font color=Cyan>.</font>map cp cs<font color=Cyan>)</font><font color=Cyan>)</font><font color=Cyan>)</font> <font color=Cyan>&lt;&gt;</font>-<a name="line-210"></a>                           modifier m-<a name="line-211"></a><font color=Blue>cp</font> <font color=Cyan>(</font>Seq cs m<font color=Cyan>)</font>          <font color=Red>=</font> parens <font color=Cyan>(</font>hcat <font color=Cyan>(</font>intersperse <font color=Cyan>(</font>text <font color=Magenta>","</font><font color=Cyan>)</font> <font color=Cyan>(</font>Prelude<font color=Cyan>.</font>map cp cs<font color=Cyan>)</font><font color=Cyan>)</font><font color=Cyan>)</font> <font color=Cyan>&lt;&gt;</font>-<a name="line-212"></a>                           modifier m-<a name="line-213"></a><a name="modifier"></a><font color=Blue>--cp (CPPE p c)          = peref p</font>-<a name="line-214"></a><font color=Blue>modifier</font> <font color=Red>::</font> Modifier <font color=Red>-&gt;</font> ByteString-<a name="line-215"></a><font color=Blue>modifier</font> None          <font color=Red>=</font> empty-<a name="line-216"></a><font color=Blue>modifier</font> Query         <font color=Red>=</font> text <font color=Magenta>"?"</font>-<a name="line-217"></a><font color=Blue>modifier</font> Star          <font color=Red>=</font> text <font color=Magenta>"*"</font>-<a name="line-218"></a><font color=Blue>modifier</font> Plus          <font color=Red>=</font> text <font color=Magenta>"+"</font>-<a name="line-219"></a><a name="mixed"></a><font color=Blue>mixed</font> <font color=Red>::</font> Mixed <font color=Red>-&gt;</font> ByteString-<a name="line-220"></a><font color=Blue>mixed</font>  PCDATA          <font color=Red>=</font> text <font color=Magenta>"(#PCDATA)"</font>-<a name="line-221"></a><font color=Blue>mixed</font> <font color=Cyan>(</font>PCDATAplus ns<font color=Cyan>)</font>  <font color=Red>=</font> text <font color=Magenta>"(#PCDATA |"</font> <font color=Cyan>&lt;+&gt;</font>-<a name="line-222"></a>                         hcat <font color=Cyan>(</font>intersperse <font color=Cyan>(</font>text <font color=Magenta>"|"</font><font color=Cyan>)</font> <font color=Cyan>(</font>Prelude<font color=Cyan>.</font>map text ns<font color=Cyan>)</font><font color=Cyan>)</font> <font color=Cyan>&lt;&gt;</font>-<a name="line-223"></a>                         text <font color=Magenta>")*"</font>-<a name="line-224"></a>-<a name="line-225"></a><a name="attlistdecl"></a><font color=Blue>attlistdecl</font> <font color=Red>::</font> AttListDecl <font color=Red>-&gt;</font> ByteString-<a name="line-226"></a><font color=Blue>attlistdecl</font> <font color=Cyan>(</font>AttListDecl n ds<font color=Cyan>)</font> <font color=Red>=</font> text <font color=Magenta>"&lt;!ATTLIST"</font> <font color=Cyan>&lt;+&gt;</font> text n <font color=Cyan>&lt;+&gt;</font>-<a name="line-227"></a>                                 fsep <font color=Cyan>(</font>Prelude<font color=Cyan>.</font>map attdef ds<font color=Cyan>)</font> <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>"&gt;"</font>-<a name="line-228"></a><a name="attdef"></a><font color=Blue>attdef</font> <font color=Red>::</font> AttDef <font color=Red>-&gt;</font> ByteString-<a name="line-229"></a><font color=Blue>attdef</font> <font color=Cyan>(</font>AttDef n t d<font color=Cyan>)</font>          <font color=Red>=</font> text n <font color=Cyan>&lt;+&gt;</font> atttype t <font color=Cyan>&lt;+&gt;</font> defaultdecl d-<a name="line-230"></a><a name="atttype"></a><font color=Blue>atttype</font> <font color=Red>::</font> AttType <font color=Red>-&gt;</font> ByteString-<a name="line-231"></a><font color=Blue>atttype</font>  StringType            <font color=Red>=</font> text <font color=Magenta>"CDATA"</font>-<a name="line-232"></a><font color=Blue>atttype</font> <font color=Cyan>(</font>TokenizedType t<font color=Cyan>)</font>      <font color=Red>=</font> tokenizedtype t-<a name="line-233"></a><font color=Blue>atttype</font> <font color=Cyan>(</font>EnumeratedType t<font color=Cyan>)</font>     <font color=Red>=</font> enumeratedtype t-<a name="line-234"></a><a name="tokenizedtype"></a><font color=Blue>tokenizedtype</font> <font color=Red>::</font> TokenizedType <font color=Red>-&gt;</font> ByteString-<a name="line-235"></a><font color=Blue>tokenizedtype</font> ID               <font color=Red>=</font> text <font color=Magenta>"ID"</font>-<a name="line-236"></a><font color=Blue>tokenizedtype</font> IDREF            <font color=Red>=</font> text <font color=Magenta>"IDREF"</font>-<a name="line-237"></a><font color=Blue>tokenizedtype</font> IDREFS           <font color=Red>=</font> text <font color=Magenta>"IDREFS"</font>-<a name="line-238"></a><font color=Blue>tokenizedtype</font> ENTITY           <font color=Red>=</font> text <font color=Magenta>"ENTITY"</font>-<a name="line-239"></a><font color=Blue>tokenizedtype</font> ENTITIES         <font color=Red>=</font> text <font color=Magenta>"ENTITIES"</font>-<a name="line-240"></a><font color=Blue>tokenizedtype</font> NMTOKEN          <font color=Red>=</font> text <font color=Magenta>"NMTOKEN"</font>-<a name="line-241"></a><font color=Blue>tokenizedtype</font> NMTOKENS         <font color=Red>=</font> text <font color=Magenta>"NMTOKENS"</font>-<a name="line-242"></a><a name="enumeratedtype"></a><font color=Blue>enumeratedtype</font> <font color=Red>::</font> EnumeratedType <font color=Red>-&gt;</font> ByteString-<a name="line-243"></a><font color=Blue>enumeratedtype</font> <font color=Cyan>(</font>NotationType n<font color=Cyan>)</font><font color=Red>=</font> notationtype n-<a name="line-244"></a><font color=Blue>enumeratedtype</font> <font color=Cyan>(</font>Enumeration e<font color=Cyan>)</font> <font color=Red>=</font> enumeration e-<a name="line-245"></a><a name="notationtype"></a><font color=Blue>notationtype</font> <font color=Red>::</font> <font color=Red>[</font><font color=Red>[</font>Char<font color=Red>]</font><font color=Red>]</font> <font color=Red>-&gt;</font> ByteString-<a name="line-246"></a><font color=Blue>notationtype</font> ns                <font color=Red>=</font> text <font color=Magenta>"NOTATION"</font> <font color=Cyan>&lt;+&gt;</font>-<a name="line-247"></a>                                 parens <font color=Cyan>(</font>hcat <font color=Cyan>(</font>intersperse <font color=Cyan>(</font>text <font color=Magenta>"|"</font><font color=Cyan>)</font> <font color=Cyan>(</font>Prelude<font color=Cyan>.</font>map text ns<font color=Cyan>)</font><font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-248"></a><a name="enumeration"></a><font color=Blue>enumeration</font> <font color=Red>::</font> <font color=Red>[</font><font color=Red>[</font>Char<font color=Red>]</font><font color=Red>]</font> <font color=Red>-&gt;</font> ByteString-<a name="line-249"></a><font color=Blue>enumeration</font> ns                 <font color=Red>=</font> parens <font color=Cyan>(</font>hcat <font color=Cyan>(</font>intersperse <font color=Cyan>(</font>text <font color=Magenta>"|"</font><font color=Cyan>)</font> <font color=Cyan>(</font>Prelude<font color=Cyan>.</font>map nmtoken ns<font color=Cyan>)</font><font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-250"></a><a name="defaultdecl"></a><font color=Blue>defaultdecl</font> <font color=Red>::</font> DefaultDecl <font color=Red>-&gt;</font> ByteString-<a name="line-251"></a><font color=Blue>defaultdecl</font>  REQUIRED          <font color=Red>=</font> text <font color=Magenta>"#REQUIRED"</font>-<a name="line-252"></a><font color=Blue>defaultdecl</font>  IMPLIED           <font color=Red>=</font> text <font color=Magenta>"#IMPLIED"</font>-<a name="line-253"></a><font color=Blue>defaultdecl</font> <font color=Cyan>(</font>DefaultTo a f<font color=Cyan>)</font>    <font color=Red>=</font> maybe <font color=Cyan>(</font>const <font color=Cyan>(</font>text <font color=Magenta>"#FIXED"</font><font color=Cyan>)</font><font color=Cyan>)</font> f <font color=Cyan>&lt;+&gt;</font> attvalue a-<a name="line-254"></a><a name="reference"></a><font color=Blue>--_ (IncludeSect i)= text "&lt;![INCLUDE [" &lt;+&gt;</font>-<a name="line-255"></a><font color=Blue>--                                 vcat (Prelude.map extsubsetdecl i) &lt;+&gt; text "]]&gt;"</font>-<a name="line-256"></a><font color=Blue>-- conditionalsect (IgnoreSect i) = text "&lt;![IGNORE [" &lt;+&gt;</font>-<a name="line-257"></a><font color=Blue>--                                  fsep (Prelude.map ignoresectcontents i) &lt;+&gt; text "]]&gt;"</font>-<a name="line-258"></a><font color=Blue>-- -- _ (Ignore)                = empty</font>-<a name="line-259"></a><font color=Blue>-- ignoresectcontents :: IgnoreSectContents -&gt; ByteString</font>-<a name="line-260"></a><font color=Blue>-- _ (IgnoreSectContents i is)</font>-<a name="line-261"></a><font color=Blue>--                                = ignore i &lt;+&gt; vcat (Prelude.map internal is)</font>-<a name="line-262"></a><font color=Blue>--                           where internal (ics,i) = text "&lt;![[" &lt;+&gt;</font>-<a name="line-263"></a><font color=Blue>--                                                    ignoresectcontents ics &lt;+&gt;</font>-<a name="line-264"></a><font color=Blue>--                                                    text "]]&gt;" &lt;+&gt; ignore i</font>-<a name="line-265"></a><font color=Blue>reference</font> <font color=Red>::</font> Reference <font color=Red>-&gt;</font> ByteString-<a name="line-266"></a><font color=Blue>reference</font> <font color=Cyan>(</font>RefEntity er<font color=Cyan>)</font>       <font color=Red>=</font> entityref er-<a name="line-267"></a><font color=Blue>reference</font> <font color=Cyan>(</font>RefChar cr<font color=Cyan>)</font>         <font color=Red>=</font> charref cr-<a name="line-268"></a><a name="entityref"></a><font color=Blue>entityref</font> <font color=Red>::</font> <font color=Red>[</font>Char<font color=Red>]</font> <font color=Red>-&gt;</font> ByteString-<a name="line-269"></a><font color=Blue>entityref</font> n                    <font color=Red>=</font> text <font color=Magenta>"&amp;"</font> <font color=Cyan>&lt;&gt;</font> text n <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>";"</font>-<a name="line-270"></a><a name="charref"></a><font color=Blue>charref</font> <font color=Red>::</font> <font color=Cyan>(</font>Show a<font color=Cyan>)</font> <font color=Red>=&gt;</font> a <font color=Red>-&gt;</font> ByteString-<a name="line-271"></a><font color=Blue>charref</font> c                      <font color=Red>=</font> text <font color=Magenta>"&amp;#"</font> <font color=Cyan>&lt;&gt;</font> text <font color=Cyan>(</font>show c<font color=Cyan>)</font> <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>";"</font>-<a name="line-272"></a><a name="entitydecl"></a><font color=Blue>entitydecl</font> <font color=Red>::</font> EntityDecl <font color=Red>-&gt;</font> ByteString-<a name="line-273"></a><font color=Blue>entitydecl</font> <font color=Cyan>(</font>EntityGEDecl d<font color=Cyan>)</font>    <font color=Red>=</font> gedecl d-<a name="line-274"></a><font color=Blue>entitydecl</font> <font color=Cyan>(</font>EntityPEDecl d<font color=Cyan>)</font>    <font color=Red>=</font> pedecl d-<a name="line-275"></a><a name="gedecl"></a><font color=Blue>gedecl</font> <font color=Red>::</font> GEDecl <font color=Red>-&gt;</font> ByteString-<a name="line-276"></a><font color=Blue>gedecl</font> <font color=Cyan>(</font>GEDecl n ed<font color=Cyan>)</font>           <font color=Red>=</font> text <font color=Magenta>"&lt;!ENTITY"</font> <font color=Cyan>&lt;+&gt;</font> text n <font color=Cyan>&lt;+&gt;</font> entitydef ed <font color=Cyan>&lt;&gt;</font>-<a name="line-277"></a>                                 text <font color=Magenta>"&gt;"</font>-<a name="line-278"></a><a name="pedecl"></a><font color=Blue>pedecl</font> <font color=Red>::</font> PEDecl <font color=Red>-&gt;</font> ByteString-<a name="line-279"></a><font color=Blue>pedecl</font> <font color=Cyan>(</font>PEDecl n pd<font color=Cyan>)</font>           <font color=Red>=</font> text <font color=Magenta>"&lt;!ENTITY %"</font> <font color=Cyan>&lt;&gt;</font> text n <font color=Cyan>&lt;+&gt;</font> pedef pd <font color=Cyan>&lt;&gt;</font>-<a name="line-280"></a>                                 text <font color=Magenta>"&gt;"</font>-<a name="line-281"></a><a name="entitydef"></a><font color=Blue>entitydef</font> <font color=Red>::</font> EntityDef <font color=Red>-&gt;</font> ByteString-<a name="line-282"></a><font color=Blue>entitydef</font> <font color=Cyan>(</font>DefEntityValue ew<font color=Cyan>)</font>  <font color=Red>=</font> entityvalue ew-<a name="line-283"></a><font color=Blue>entitydef</font> <font color=Cyan>(</font>DefExternalID i nd<font color=Cyan>)</font> <font color=Red>=</font> externalid i <font color=Cyan>&lt;+&gt;</font> maybe ndatadecl nd-<a name="line-284"></a><a name="pedef"></a><font color=Blue>pedef</font> <font color=Red>::</font> PEDef <font color=Red>-&gt;</font> ByteString-<a name="line-285"></a><font color=Blue>pedef</font> <font color=Cyan>(</font>PEDefEntityValue ew<font color=Cyan>)</font>    <font color=Red>=</font> entityvalue ew-<a name="line-286"></a><font color=Blue>pedef</font> <font color=Cyan>(</font>PEDefExternalID eid<font color=Cyan>)</font>    <font color=Red>=</font> externalid eid-<a name="line-287"></a><a name="externalid"></a><font color=Blue>externalid</font> <font color=Red>::</font> ExternalID <font color=Red>-&gt;</font> ByteString-<a name="line-288"></a><font color=Blue>externalid</font> <font color=Cyan>(</font>SYSTEM sl<font color=Cyan>)</font>         <font color=Red>=</font> text <font color=Magenta>"SYSTEM"</font> <font color=Cyan>&lt;+&gt;</font> systemliteral sl-<a name="line-289"></a><font color=Blue>externalid</font> <font color=Cyan>(</font>PUBLIC i sl<font color=Cyan>)</font>       <font color=Red>=</font> text <font color=Magenta>"PUBLIC"</font> <font color=Cyan>&lt;+&gt;</font> pubidliteral i <font color=Cyan>&lt;+&gt;</font>-<a name="line-290"></a>                                 systemliteral sl-<a name="line-291"></a><a name="ndatadecl"></a><font color=Blue>ndatadecl</font> <font color=Red>::</font> NDataDecl <font color=Red>-&gt;</font> ByteString-<a name="line-292"></a><font color=Blue>ndatadecl</font> <font color=Cyan>(</font>NDATA n<font color=Cyan>)</font>            <font color=Red>=</font> text <font color=Magenta>"NDATA"</font> <font color=Cyan>&lt;+&gt;</font> text n-<a name="line-293"></a><a name="notationdecl"></a><font color=Blue>-- _ (TextDecl vi ed)      = text "&lt;?xml" &lt;+&gt; maybe text vi &lt;+&gt;</font>-<a name="line-294"></a><font color=Blue>--                                  encodingdecl ed &lt;&gt; text "?&gt;"</font>-<a name="line-295"></a><font color=Blue>-- extparsedent :: ExtParsedEnt t -&gt; ByteString</font>-<a name="line-296"></a><font color=Blue>-- _ (ExtParsedEnt t c)= maybe textdecl t &lt;+&gt; content c</font>-<a name="line-297"></a><font color=Blue>-- _ (ExtPE t esd)            = maybe textdecl t &lt;+&gt;</font>-<a name="line-298"></a><font color=Blue>--                                  vcat (Prelude.map extsubsetdecl esd)</font>-<a name="line-299"></a><font color=Blue>notationdecl</font> <font color=Red>::</font> NotationDecl <font color=Red>-&gt;</font> ByteString-<a name="line-300"></a><font color=Blue>notationdecl</font> <font color=Cyan>(</font>NOTATION n e<font color=Cyan>)</font>    <font color=Red>=</font> text <font color=Magenta>"&lt;!NOTATION"</font> <font color=Cyan>&lt;+&gt;</font> text n <font color=Cyan>&lt;+&gt;</font>-<a name="line-301"></a>                                 either externalid publicid e <font color=Cyan>&lt;&gt;</font>-<a name="line-302"></a>                                 text <font color=Magenta>"&gt;"</font>-<a name="line-303"></a><a name="publicid"></a><font color=Blue>publicid</font> <font color=Red>::</font> PublicID <font color=Red>-&gt;</font> ByteString-<a name="line-304"></a><font color=Blue>publicid</font> <font color=Cyan>(</font>PUBLICID p<font color=Cyan>)</font>          <font color=Red>=</font> text <font color=Magenta>"PUBLICID"</font> <font color=Cyan>&lt;+&gt;</font> pubidliteral p-<a name="line-305"></a><a name="encodingdecl"></a><font color=Blue>encodingdecl</font> <font color=Red>::</font> EncodingDecl <font color=Red>-&gt;</font> ByteString-<a name="line-306"></a><font color=Blue>encodingdecl</font> <font color=Cyan>(</font>EncodingDecl s<font color=Cyan>)</font>  <font color=Red>=</font> text <font color=Magenta>"encoding='"</font> <font color=Cyan>&lt;&gt;</font> text s <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>"'"</font>-<a name="line-307"></a><a name="nmtoken"></a><font color=Blue>nmtoken</font> <font color=Red>::</font> <font color=Red>[</font>Char<font color=Red>]</font> <font color=Red>-&gt;</font> ByteString-<a name="line-308"></a><font color=Blue>nmtoken</font> s                      <font color=Red>=</font> text s-<a name="line-309"></a><a name="attvalue"></a><font color=Blue>attvalue</font> <font color=Red>::</font> AttValue <font color=Red>-&gt;</font> ByteString-<a name="line-310"></a><font color=Blue>attvalue</font> <font color=Cyan>(</font>AttValue esr<font color=Cyan>)</font>        <font color=Red>=</font> text <font color=Magenta>"\""</font> <font color=Cyan>&lt;&gt;</font>-<a name="line-311"></a>                                 hcat <font color=Cyan>(</font>Prelude<font color=Cyan>.</font>map <font color=Cyan>(</font>either text reference<font color=Cyan>)</font> esr<font color=Cyan>)</font> <font color=Cyan>&lt;&gt;</font>-<a name="line-312"></a>                                 text <font color=Magenta>"\""</font>-<a name="line-313"></a><a name="entityvalue"></a><font color=Blue>entityvalue</font> <font color=Red>::</font> EntityValue <font color=Red>-&gt;</font> ByteString-<a name="line-314"></a><font color=Blue>entityvalue</font> <font color=Cyan>(</font>EntityValue evs<font color=Cyan>)</font>-<a name="line-315"></a>  <font color=Red>|</font> containsDoubleQuote evs    <font color=Red>=</font> text <font color=Magenta>"'"</font>  <font color=Cyan>&lt;&gt;</font> hcat <font color=Cyan>(</font>Prelude<font color=Cyan>.</font>map ev evs<font color=Cyan>)</font> <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>"'"</font>-<a name="line-316"></a>  <font color=Red>|</font> otherwise                  <font color=Red>=</font> text <font color=Magenta>"\""</font> <font color=Cyan>&lt;&gt;</font> hcat <font color=Cyan>(</font>Prelude<font color=Cyan>.</font>map ev evs<font color=Cyan>)</font> <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>"\""</font>-<a name="line-317"></a><a name="ev"></a><font color=Blue>ev</font> <font color=Red>::</font> EV <font color=Red>-&gt;</font> ByteString-<a name="line-318"></a><font color=Blue>ev</font> <font color=Cyan>(</font>EVString s<font color=Cyan>)</font>                <font color=Red>=</font> text s-<a name="line-319"></a><font color=Blue>--ev (EVPERef p e)               = peref p</font>-<a name="line-320"></a><font color=Blue>ev</font> <font color=Cyan>(</font>EVRef r<font color=Cyan>)</font>                   <font color=Red>=</font> reference r-<a name="line-321"></a><a name="pubidliteral"></a><font color=Blue>pubidliteral</font> <font color=Red>::</font> PubidLiteral <font color=Red>-&gt;</font> ByteString-<a name="line-322"></a><font color=Blue>pubidliteral</font> <font color=Cyan>(</font>PubidLiteral s<font color=Cyan>)</font>-<a name="line-323"></a>    <font color=Red>|</font> toWord8 <font color=Magenta>'"'</font> <font color=Cyan>`elem`</font> <font color=Cyan>(</font>pack s<font color=Cyan>)</font> <font color=Red>=</font> text <font color=Magenta>"'"</font> <font color=Cyan>&lt;&gt;</font> text s <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>"'"</font>-<a name="line-324"></a>    <font color=Red>|</font> otherwise                <font color=Red>=</font> text <font color=Magenta>"\""</font> <font color=Cyan>&lt;&gt;</font> text s <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>"\""</font>-<a name="line-325"></a><a name="systemliteral"></a><font color=Blue>systemliteral</font> <font color=Red>::</font> SystemLiteral <font color=Red>-&gt;</font> ByteString-<a name="line-326"></a><font color=Blue>systemliteral</font> <font color=Cyan>(</font>SystemLiteral s<font color=Cyan>)</font>-<a name="line-327"></a>    <font color=Red>|</font> toWord8 <font color=Magenta>'"'</font> <font color=Cyan>`elem`</font> <font color=Cyan>(</font>pack s<font color=Cyan>)</font> <font color=Red>=</font> text <font color=Magenta>"'"</font> <font color=Cyan>&lt;&gt;</font> text s <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>"'"</font>-<a name="line-328"></a>    <font color=Red>|</font> otherwise                <font color=Red>=</font> text <font color=Magenta>"\""</font> <font color=Cyan>&lt;&gt;</font> text s <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>"\""</font>-<a name="line-329"></a><a name="chardata"></a><font color=Blue>chardata</font><font color=Cyan>,</font> cdsect <font color=Red>::</font> <font color=Red>[</font>Char<font color=Red>]</font> <font color=Red>-&gt;</font> ByteString-<a name="line-330"></a><font color=Blue>chardata</font> s                     <font color=Red>=</font> <font color=Blue>{-if all isSpace s then empty else-}</font> text s-<a name="line-331"></a><a name="cdsect"></a><font color=Blue>cdsect</font> c                       <font color=Red>=</font> text <font color=Magenta>"&lt;![CDATA["</font> <font color=Cyan>&lt;&gt;</font> chardata c <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>"]]&gt;"</font>-<a name="line-332"></a>-<a name="line-333"></a><a name="toWord8"></a><font color=Blue>-- toWord8 :: Char -&gt; Word8</font>-<a name="line-334"></a><font color=Blue>toWord8</font> <font color=Red>::</font> <font color=Cyan>(</font>Enum a<font color=Cyan>,</font> Enum a1<font color=Cyan>)</font> <font color=Red>=&gt;</font> a1 <font color=Red>-&gt;</font> a-<a name="line-335"></a><font color=Blue>toWord8</font> <font color=Red>=</font> toEnum <font color=Cyan>.</font> fromEnum-<a name="line-336"></a>-<a name="line-337"></a><a name="containsDoubleQuote"></a><font color=Blue>containsDoubleQuote</font> <font color=Red>::</font> <font color=Red>[</font>EV<font color=Red>]</font> <font color=Red>-&gt;</font> Bool-<a name="line-338"></a><font color=Blue>containsDoubleQuote</font> evs <font color=Red>=</font> any csq evs-<a name="line-339"></a>    <font color=Green><u>where</u></font> csq <font color=Cyan>(</font>EVString s<font color=Cyan>)</font> <font color=Red>=</font> toWord8 <font color=Magenta>'"'</font> <font color=Cyan>`elem`</font> <font color=Cyan>(</font>pack s<font color=Cyan>)</font>-<a name="line-340"></a>          csq <font color=Green><u>_</u></font>            <font color=Red>=</font> False-</pre>-</body>-</html>
− docs/HaXml/src/Text/XML/HaXml/Combinators.html
@@ -1,434 +0,0 @@-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">-<html>-<head>-<!-- Generated by HsColour, http://www.cs.york.ac.uk/fp/darcs/hscolour/ -->-<title>src/Text/XML/HaXml/Combinators.hs</title>-</head>-<body>-<pre><a name="line-1"></a><font color=Blue>--------------------------------------------</font>-<a name="line-2"></a><font color=Blue>-- | This module defines the notion of filters and filter combinators</font>-<a name="line-3"></a><font color=Blue>--   for processing XML documents.</font>-<a name="line-4"></a><font color=Blue>--</font>-<a name="line-5"></a><font color=Blue>--   These XML transformation combinators are described in the paper</font>-<a name="line-6"></a><font color=Blue>--   ``Haskell and XML: Generic Combinators or Type-Based Translation?''</font>-<a name="line-7"></a><font color=Blue>--   Malcolm Wallace and Colin Runciman, Proceedings ICFP'99.</font>-<a name="line-8"></a><font color=Blue>--------------------------------------------</font>-<a name="line-9"></a><font color=Green><u>module</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Combinators-<a name="line-10"></a>  <font color=Cyan>(</font><font color=Blue>-- * The content filter type.</font>-<a name="line-11"></a>    CFilter-<a name="line-12"></a>-<a name="line-13"></a>   <font color=Blue>-- * Simple filters.</font>-<a name="line-14"></a>   <font color=Blue>-- ** Selection filters.</font>-<a name="line-15"></a>   <font color=Blue>-- $selection</font>-<a name="line-16"></a>  <font color=Cyan>,</font> keep<font color=Cyan>,</font> none<font color=Cyan>,</font> children<font color=Cyan>,</font> position-<a name="line-17"></a>-<a name="line-18"></a>   <font color=Blue>-- ** Predicate filters.</font>-<a name="line-19"></a>   <font color=Blue>-- $pred</font>-<a name="line-20"></a>  <font color=Cyan>,</font> elm<font color=Cyan>,</font> txt<font color=Cyan>,</font> tag<font color=Cyan>,</font> attr<font color=Cyan>,</font> attrval<font color=Cyan>,</font> tagWith-<a name="line-21"></a>-<a name="line-22"></a>   <font color=Blue>-- ** Search filters.</font>-<a name="line-23"></a>  <font color=Cyan>,</font> find<font color=Cyan>,</font> iffind<font color=Cyan>,</font> ifTxt-<a name="line-24"></a>-<a name="line-25"></a>   <font color=Blue>-- * Filter combinators</font>-<a name="line-26"></a>   <font color=Blue>-- ** Basic combinators.</font>-<a name="line-27"></a>  <font color=Cyan>,</font> o<font color=Cyan>,</font> union<font color=Cyan>,</font> cat<font color=Cyan>,</font> andThen-<a name="line-28"></a>  <font color=Cyan>,</font> <font color=Cyan>(</font><font color=Cyan>|&gt;|</font><font color=Cyan>)</font><font color=Cyan>,</font> with<font color=Cyan>,</font> without-<a name="line-29"></a>  <font color=Cyan>,</font> <font color=Cyan>(</font><font color=Cyan>/&gt;</font><font color=Cyan>)</font><font color=Cyan>,</font> <font color=Cyan>(</font><font color=Cyan>&lt;/</font><font color=Cyan>)</font><font color=Cyan>,</font> et-<a name="line-30"></a>  <font color=Cyan>,</font> path-<a name="line-31"></a>   <font color=Blue>-- ** Recursive search.</font>-<a name="line-32"></a>   <font color=Blue>-- $recursive</font>-<a name="line-33"></a>  <font color=Cyan>,</font> deep<font color=Cyan>,</font> deepest<font color=Cyan>,</font> multi-<a name="line-34"></a>   <font color=Blue>-- ** Interior editing.</font>-<a name="line-35"></a>  <font color=Cyan>,</font> when<font color=Cyan>,</font> guards<font color=Cyan>,</font> chip<font color=Cyan>,</font> inplace<font color=Cyan>,</font> foldXml-<a name="line-36"></a>   <font color=Blue>-- ** Constructive filters.</font>-<a name="line-37"></a>  <font color=Cyan>,</font> mkElem<font color=Cyan>,</font> mkElemAttr<font color=Cyan>,</font> literal<font color=Cyan>,</font> cdata<font color=Cyan>,</font> replaceTag<font color=Cyan>,</font> replaceAttrs-<a name="line-38"></a>-<a name="line-39"></a>   <font color=Blue>-- * C-like conditionals.</font>-<a name="line-40"></a>   <font color=Blue>-- $cond</font>-<a name="line-41"></a>  <font color=Cyan>,</font> ThenElse<font color=Cyan>(</font><font color=Red>..</font><font color=Cyan>)</font><font color=Cyan>,</font> <font color=Cyan>(</font><font color=Cyan>?&gt;</font><font color=Cyan>)</font>-<a name="line-42"></a>-<a name="line-43"></a>   <font color=Blue>-- * Filters with labelled results.</font>-<a name="line-44"></a>  <font color=Cyan>,</font> LabelFilter-<a name="line-45"></a>   <font color=Blue>-- ** Using and combining labelled filters.</font>-<a name="line-46"></a>  <font color=Cyan>,</font> oo<font color=Cyan>,</font> x-<a name="line-47"></a>   <font color=Blue>-- ** Some label-generating filters.</font>-<a name="line-48"></a>  <font color=Cyan>,</font> numbered<font color=Cyan>,</font> interspersed<font color=Cyan>,</font> tagged<font color=Cyan>,</font> attributed<font color=Cyan>,</font> textlabelled<font color=Cyan>,</font> extracted-<a name="line-49"></a>-<a name="line-50"></a>  <font color=Cyan>)</font> <font color=Green><u>where</u></font>-<a name="line-51"></a>-<a name="line-52"></a>-<a name="line-53"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Types-<a name="line-54"></a><font color=Green><u>import</u></font> Maybe <font color=Cyan>(</font>fromMaybe<font color=Cyan>)</font>-<a name="line-55"></a>-<a name="line-56"></a><font color=Green><u>infixl</u></font> <font color=Magenta>6</font> <font color=Cyan>`with`</font><font color=Cyan>,</font> <font color=Cyan>`without`</font>-<a name="line-57"></a><font color=Green><u>infixr</u></font> <font color=Magenta>5</font> <font color=Cyan>`o`</font><font color=Cyan>,</font> <font color=Cyan>`oo`</font><font color=Cyan>,</font> <font color=Cyan>`union`</font><font color=Cyan>,</font> <font color=Cyan>`andThen`</font>		<font color=Blue>-- , `orelse`</font>-<a name="line-58"></a><font color=Green><u>infixl</u></font> <font color=Magenta>5</font> <font color=Cyan>/&gt;</font><font color=Cyan>,</font> <font color=Cyan>&lt;/</font><font color=Cyan>,</font> <font color=Cyan>|&gt;|</font>-<a name="line-59"></a><font color=Green><u>infixr</u></font> <font color=Magenta>4</font> <font color=Cyan>`when`</font><font color=Cyan>,</font> <font color=Cyan>`guards`</font>-<a name="line-60"></a><font color=Green><u>infixr</u></font> <font color=Magenta>3</font> <font color=Cyan>?&gt;</font><font color=Cyan>,</font> <font color=Red><b>:&gt;</b></font>-<a name="line-61"></a>-<a name="line-62"></a>-<a name="line-63"></a>-<a name="line-64"></a><font color=Blue>-- THE CONTENT FILTER TYPE</font>-<a name="line-65"></a>-<a name="line-66"></a><a name="CFilter"></a><font color=Blue>-- | All document transformations are /content filters/.</font>-<a name="line-67"></a><a name="CFilter"></a><font color=Blue>--   A filter takes a single XML 'Content' value and returns a sequence</font>-<a name="line-68"></a><a name="CFilter"></a><font color=Blue>--   of 'Content' values, possibly empty.</font>-<a name="line-69"></a><a name="CFilter"></a><font color=Green><u>type</u></font> CFilter i  <font color=Red>=</font> Content i <font color=Red>-&gt;</font> <font color=Red>[</font>Content i<font color=Red>]</font>-<a name="line-70"></a>-<a name="line-71"></a>-<a name="line-72"></a>-<a name="line-73"></a><a name="keep"></a><font color=Blue>-- BASIC SELECTION FILTERS</font>-<a name="line-74"></a><font color=Blue>-- $selection</font>-<a name="line-75"></a><font color=Blue>-- In the algebra of combinators, @none@ is the zero, and @keep@ the identity.</font>-<a name="line-76"></a><font color=Blue>-- (They have a more general type than just CFilter.)</font>-<a name="line-77"></a><font color=Blue>keep</font> <font color=Red>::</font> a<font color=Red>-&gt;</font><font color=Red>[</font>a<font color=Red>]</font>-<a name="line-78"></a><font color=Blue>keep</font> <font color=Red>=</font> <font color=Red>\</font>x<font color=Red>-&gt;</font><font color=Red>[</font>x<font color=Red>]</font>-<a name="line-79"></a><a name="none"></a><font color=Blue>none</font> <font color=Red>::</font> a<font color=Red>-&gt;</font><font color=Red>[</font>b<font color=Red>]</font>-<a name="line-80"></a><font color=Blue>none</font> <font color=Red>=</font> <font color=Red>\</font>x<font color=Red>-&gt;</font>[]-<a name="line-81"></a>-<a name="line-82"></a><a name="children"></a><font color=Blue>-- | Throw away current node, keep just the (unprocessed) children.</font>-<a name="line-83"></a><font color=Blue>children</font> <font color=Red>::</font> CFilter i-<a name="line-84"></a><font color=Blue>children</font> <font color=Cyan>(</font>CElem <font color=Cyan>(</font>Elem <font color=Green><u>_</u></font> <font color=Green><u>_</u></font> cs<font color=Cyan>)</font> <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red>=</font> cs-<a name="line-85"></a><font color=Blue>children</font> <font color=Green><u>_</u></font> <font color=Red>=</font> []-<a name="line-86"></a>-<a name="line-87"></a><a name="position"></a><font color=Blue>-- | Select the @n@'th positional result of a filter.</font>-<a name="line-88"></a><font color=Blue>position</font> <font color=Red>::</font> Int <font color=Red>-&gt;</font> CFilter i <font color=Red>-&gt;</font> CFilter i-<a name="line-89"></a><font color=Blue>position</font> n f <font color=Red>=</font> <font color=Cyan>(</font><font color=Red>\</font>cs<font color=Red>-&gt;</font> <font color=Red>[</font>cs<font color=Cyan>!!</font>n<font color=Red>]</font><font color=Cyan>)</font> <font color=Cyan>.</font> f-<a name="line-90"></a>-<a name="line-91"></a>-<a name="line-92"></a>-<a name="line-93"></a><font color=Blue>-- BASIC PREDICATE FILTERS</font>-<a name="line-94"></a><font color=Blue>-- $pred</font>-<a name="line-95"></a><font color=Blue>-- These filters either keep or throw away some content based on</font>-<a name="line-96"></a><font color=Blue>-- a simple test.  For instance, @elm@ keeps only a tagged element,</font>-<a name="line-97"></a><font color=Blue>-- @txt@ keeps only non-element text, @tag@ keeps only an element</font>-<a name="line-98"></a><font color=Blue>-- with the named tag, @attr@ keeps only an element with the named</font>-<a name="line-99"></a><font color=Blue>-- attribute, @attrval@ keeps only an element with the given</font>-<a name="line-100"></a><font color=Blue>-- attribute value, @tagWith@ keeps only an element whose tag name</font>-<a name="line-101"></a><font color=Blue>-- satisfies the given predicate.</font>-<a name="line-102"></a>-<a name="line-103"></a><a name="elm"></a><font color=Blue>elm</font><font color=Cyan>,</font> txt   <font color=Red>::</font> CFilter i-<a name="line-104"></a><a name="tag"></a><font color=Blue>tag</font>        <font color=Red>::</font> String <font color=Red>-&gt;</font> CFilter i-<a name="line-105"></a><a name="attr"></a><font color=Blue>attr</font>       <font color=Red>::</font> Name <font color=Red>-&gt;</font> CFilter i-<a name="line-106"></a><a name="attrval"></a><font color=Blue>attrval</font>    <font color=Red>::</font> Attribute <font color=Red>-&gt;</font> CFilter i-<a name="line-107"></a><a name="tagWith"></a><font color=Blue>tagWith</font>    <font color=Red>::</font> <font color=Cyan>(</font>String<font color=Red>-&gt;</font>Bool<font color=Cyan>)</font> <font color=Red>-&gt;</font> CFilter i-<a name="line-108"></a>-<a name="line-109"></a><font color=Blue>elm</font> x<font color=Red>@</font><font color=Cyan>(</font>CElem <font color=Green><u>_</u></font> <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red>=</font> <font color=Red>[</font>x<font color=Red>]</font>-<a name="line-110"></a><font color=Blue>elm</font> <font color=Green><u>_</u></font>             <font color=Red>=</font> []-<a name="line-111"></a>-<a name="line-112"></a><a name="txt"></a><font color=Blue>txt</font> x<font color=Red>@</font><font color=Cyan>(</font>CString <font color=Green><u>_</u></font> <font color=Green><u>_</u></font> <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red>=</font> <font color=Red>[</font>x<font color=Red>]</font>-<a name="line-113"></a><font color=Blue>txt</font> x<font color=Red>@</font><font color=Cyan>(</font>CRef <font color=Green><u>_</u></font> <font color=Green><u>_</u></font><font color=Cyan>)</font>      <font color=Red>=</font> <font color=Red>[</font>x<font color=Red>]</font>-<a name="line-114"></a><font color=Blue>txt</font> <font color=Green><u>_</u></font>                 <font color=Red>=</font> []-<a name="line-115"></a>-<a name="line-116"></a><font color=Blue>tag</font> t x<font color=Red>@</font><font color=Cyan>(</font>CElem <font color=Cyan>(</font>Elem n <font color=Green><u>_</u></font> <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red>|</font> t<font color=Cyan>==</font>n  <font color=Red>=</font> <font color=Red>[</font>x<font color=Red>]</font>-<a name="line-117"></a><font color=Blue>tag</font> t <font color=Green><u>_</u></font>  <font color=Red>=</font> []-<a name="line-118"></a>-<a name="line-119"></a><font color=Blue>tagWith</font> p x<font color=Red>@</font><font color=Cyan>(</font>CElem <font color=Cyan>(</font>Elem n <font color=Green><u>_</u></font> <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red>|</font> p n  <font color=Red>=</font> <font color=Red>[</font>x<font color=Red>]</font>-<a name="line-120"></a><font color=Blue>tagWith</font> p <font color=Green><u>_</u></font>  <font color=Red>=</font> []-<a name="line-121"></a>-<a name="line-122"></a><font color=Blue>attr</font> n x<font color=Red>@</font><font color=Cyan>(</font>CElem <font color=Cyan>(</font>Elem <font color=Green><u>_</u></font> <font color=Green><u>as</u></font> <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red>|</font> n <font color=Cyan>`elem`</font> <font color=Cyan>(</font>map fst <font color=Green><u>as</u></font><font color=Cyan>)</font>  <font color=Red>=</font> <font color=Red>[</font>x<font color=Red>]</font>-<a name="line-123"></a><font color=Blue>attr</font> n <font color=Green><u>_</u></font>  <font color=Red>=</font> []-<a name="line-124"></a>-<a name="line-125"></a><font color=Blue>attrval</font> av x<font color=Red>@</font><font color=Cyan>(</font>CElem <font color=Cyan>(</font>Elem <font color=Green><u>_</u></font> <font color=Green><u>as</u></font> <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red>|</font> av <font color=Cyan>`elem`</font> <font color=Green><u>as</u></font>  <font color=Red>=</font> <font color=Red>[</font>x<font color=Red>]</font>-<a name="line-126"></a><font color=Blue>attrval</font> av <font color=Green><u>_</u></font>  <font color=Red>=</font> []-<a name="line-127"></a>-<a name="line-128"></a>-<a name="line-129"></a>-<a name="line-130"></a><font color=Blue>-- SEARCH FILTERS</font>-<a name="line-131"></a>-<a name="line-132"></a><a name="find"></a><font color=Blue>-- | For a mandatory attribute field, @find key cont@ looks up the value of</font>-<a name="line-133"></a><font color=Blue>--   the attribute name @key@, and applies the continuation @cont@ to</font>-<a name="line-134"></a><font color=Blue>--   the value.</font>-<a name="line-135"></a><font color=Blue>find</font> <font color=Red>::</font> String <font color=Red>-&gt;</font> <font color=Cyan>(</font>String<font color=Red>-&gt;</font>CFilter i<font color=Cyan>)</font> <font color=Red>-&gt;</font> CFilter i-<a name="line-136"></a><font color=Blue>find</font> key cont c<font color=Red>@</font><font color=Cyan>(</font>CElem <font color=Cyan>(</font>Elem <font color=Green><u>_</u></font> <font color=Green><u>as</u></font> <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red>=</font> cont <font color=Cyan>(</font>show <font color=Cyan>(</font>lookfor key <font color=Green><u>as</u></font><font color=Cyan>)</font><font color=Cyan>)</font> c-<a name="line-137"></a>  <font color=Green><u>where</u></font> lookfor x <font color=Red>=</font> fromMaybe <font color=Cyan>(</font>error <font color=Cyan>(</font><font color=Magenta>"missing attribute: "</font><font color=Cyan>++</font>show x<font color=Cyan>)</font><font color=Cyan>)</font> <font color=Cyan>.</font> lookup x-<a name="line-138"></a><font color=Blue>-- 'lookfor' has the more general type :: (Eq a,Show a) =&gt; a -&gt; [(a,b)] -&gt; b</font>-<a name="line-139"></a>-<a name="line-140"></a><a name="iffind"></a><font color=Blue>-- | When an attribute field may be absent, use @iffind key yes no@ to lookup</font>-<a name="line-141"></a><font color=Blue>--   its value.  If the attribute is absent, it acts as the @no@ filter,</font>-<a name="line-142"></a><font color=Blue>--   otherwise it applies the @yes@ filter.</font>-<a name="line-143"></a><font color=Blue>iffind</font> <font color=Red>::</font> String <font color=Red>-&gt;</font> <font color=Cyan>(</font>String<font color=Red>-&gt;</font>CFilter i<font color=Cyan>)</font> <font color=Red>-&gt;</font> CFilter i <font color=Red>-&gt;</font> CFilter i-<a name="line-144"></a><font color=Blue>iffind</font> key yes no c<font color=Red>@</font><font color=Cyan>(</font>CElem <font color=Cyan>(</font>Elem <font color=Green><u>_</u></font> <font color=Green><u>as</u></font> <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red>=</font>-<a name="line-145"></a>  <font color=Green><u>case</u></font> <font color=Cyan>(</font>lookup key <font color=Green><u>as</u></font><font color=Cyan>)</font> <font color=Green><u>of</u></font>-<a name="line-146"></a>    Nothing  <font color=Red>-&gt;</font> no c-<a name="line-147"></a>    <font color=Cyan>(</font>Just v<font color=Red>@</font><font color=Cyan>(</font>AttValue <font color=Green><u>_</u></font><font color=Cyan>)</font><font color=Cyan>)</font> <font color=Red>-&gt;</font> yes <font color=Cyan>(</font>show v<font color=Cyan>)</font> c-<a name="line-148"></a><font color=Blue>iffind</font> key yes no other <font color=Red>=</font> no other-<a name="line-149"></a>-<a name="line-150"></a><a name="ifTxt"></a><font color=Blue>-- | @ifTxt yes no@ processes any textual content with the @yes@ filter,</font>-<a name="line-151"></a><font color=Blue>--   but otherwise is the same as the @no@ filter.</font>-<a name="line-152"></a><font color=Blue>ifTxt</font> <font color=Red>::</font> <font color=Cyan>(</font>String<font color=Red>-&gt;</font>CFilter i<font color=Cyan>)</font> <font color=Red>-&gt;</font> CFilter i <font color=Red>-&gt;</font> CFilter i-<a name="line-153"></a><font color=Blue>ifTxt</font> yes no c<font color=Red>@</font><font color=Cyan>(</font>CString <font color=Green><u>_</u></font> s <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red>=</font> yes s c-<a name="line-154"></a><font color=Blue>ifTxt</font> yes no c                 <font color=Red>=</font> no c-<a name="line-155"></a>-<a name="line-156"></a>-<a name="line-157"></a>-<a name="line-158"></a><font color=Blue>-- C-LIKE CONDITIONALS</font>-<a name="line-159"></a><font color=Blue>--</font>-<a name="line-160"></a><font color=Blue>-- $cond</font>-<a name="line-161"></a><font color=Blue>-- These definitions provide C-like conditionals, lifted to the filter level.</font>-<a name="line-162"></a><font color=Blue>--</font>-<a name="line-163"></a><font color=Blue>-- The @(cond ? yes : no)@ style in C becomes @(cond ?&gt; yes :&gt; no)@ in Haskell.</font>-<a name="line-164"></a>-<a name="line-165"></a><a name="ThenElse"></a><font color=Blue>-- | Conjoin the two branches of a conditional.</font>-<a name="line-166"></a><a name="ThenElse"></a><font color=Green><u>data</u></font> ThenElse a <font color=Red>=</font> a <font color=Red><b>:&gt;</b></font> a-<a name="line-167"></a>-<a name="line-168"></a><a name="?>"></a><font color=Blue>-- | Select between the two branches of a joined conditional.</font>-<a name="line-169"></a><font color=Cyan>(</font><font color=Cyan>?&gt;</font><font color=Cyan>)</font> <font color=Red>::</font> <font color=Cyan>(</font>a<font color=Red>-&gt;</font><font color=Red>[</font>b<font color=Red>]</font><font color=Cyan>)</font> <font color=Red>-&gt;</font> ThenElse <font color=Cyan>(</font>a<font color=Red>-&gt;</font><font color=Red>[</font>b<font color=Red>]</font><font color=Cyan>)</font> <font color=Red>-&gt;</font> <font color=Cyan>(</font>a<font color=Red>-&gt;</font><font color=Red>[</font>b<font color=Red>]</font><font color=Cyan>)</font>-<a name="line-170"></a><a name="p"></a><font color=Blue>p</font> <font color=Cyan>?&gt;</font> <font color=Cyan>(</font>f <font color=Red><b>:&gt;</b></font> g<font color=Cyan>)</font> <font color=Red>=</font> <font color=Red>\</font>c<font color=Red>-&gt;</font> <font color=Green><u>if</u></font> <font color=Cyan>(</font>not<font color=Cyan>.</font>null<font color=Cyan>.</font>p<font color=Cyan>)</font> c <font color=Green><u>then</u></font> f c <font color=Green><u>else</u></font> g c-<a name="line-171"></a>-<a name="line-172"></a>-<a name="line-173"></a>-<a name="line-174"></a><font color=Blue>-- FILTER COMBINATORS</font>-<a name="line-175"></a>-<a name="line-176"></a>-<a name="line-177"></a><a name="o"></a><font color=Blue>-- | Sequential (/Irish/,/backwards/) composition</font>-<a name="line-178"></a><font color=Blue>o</font> <font color=Red>::</font> CFilter i <font color=Red>-&gt;</font> CFilter i <font color=Red>-&gt;</font> CFilter i-<a name="line-179"></a><a name="o"></a><font color=Blue>f</font> <font color=Cyan>`o`</font> g <font color=Red>=</font> concatMap f <font color=Cyan>.</font> g-<a name="line-180"></a>-<a name="line-181"></a><a name="union"></a><font color=Blue>-- | Binary parallel composition.  Each filter uses a copy of the input,</font>-<a name="line-182"></a><font color=Blue>-- rather than one filter using the result of the other.</font>-<a name="line-183"></a><font color=Blue>--   (Has a more general type than just CFilter.)</font>-<a name="line-184"></a><font color=Blue>union</font> <font color=Red>::</font> <font color=Cyan>(</font>a<font color=Red>-&gt;</font><font color=Red>[</font>b<font color=Red>]</font><font color=Cyan>)</font> <font color=Red>-&gt;</font> <font color=Cyan>(</font>a<font color=Red>-&gt;</font><font color=Red>[</font>b<font color=Red>]</font><font color=Cyan>)</font> <font color=Red>-&gt;</font> <font color=Cyan>(</font>a<font color=Red>-&gt;</font><font color=Red>[</font>b<font color=Red>]</font><font color=Cyan>)</font>-<a name="line-185"></a><font color=Blue>union</font> <font color=Red>=</font> lift <font color=Cyan>(</font><font color=Cyan>++</font><font color=Cyan>)</font>		<font color=Blue>-- in Haskell 98:   union = lift List.union</font>-<a name="line-186"></a>  <font color=Green><u>where</u></font>-<a name="line-187"></a>    lift <font color=Red>::</font> <font color=Cyan>(</font>a<font color=Red>-&gt;</font>b<font color=Red>-&gt;</font>d<font color=Cyan>)</font> <font color=Red>-&gt;</font> <font color=Cyan>(</font>c<font color=Red>-&gt;</font>a<font color=Cyan>)</font> <font color=Red>-&gt;</font> <font color=Cyan>(</font>c<font color=Red>-&gt;</font>b<font color=Cyan>)</font> <font color=Red>-&gt;</font> c <font color=Red>-&gt;</font> d-<a name="line-188"></a>    lift f g h <font color=Red>=</font> <font color=Red>\</font>x<font color=Red>-&gt;</font> f <font color=Cyan>(</font>g x<font color=Cyan>)</font> <font color=Cyan>(</font>h x<font color=Cyan>)</font>-<a name="line-189"></a>-<a name="line-190"></a><a name="cat"></a><font color=Blue>-- | Glue a list of filters together.  (A list version of union;</font>-<a name="line-191"></a><font color=Blue>--   also has a more general type than just CFilter.)</font>-<a name="line-192"></a><font color=Blue>cat</font> <font color=Red>::</font> <font color=Red>[</font>a<font color=Red>-&gt;</font><font color=Red>[</font>b<font color=Red>]</font><font color=Red>]</font> <font color=Red>-&gt;</font> <font color=Cyan>(</font>a<font color=Red>-&gt;</font><font color=Red>[</font>b<font color=Red>]</font><font color=Cyan>)</font>-<a name="line-193"></a><font color=Blue>--   Specification: cat fs = \e-&gt; concat [ f e | f &lt;- fs ]</font>-<a name="line-194"></a><font color=Blue>--   more efficient implementation below:</font>-<a name="line-195"></a><font color=Blue>cat</font> [] <font color=Red>=</font> const []-<a name="line-196"></a><font color=Blue>cat</font> fs <font color=Red>=</font> foldr1 union fs-<a name="line-197"></a>-<a name="line-198"></a><a name="andThen"></a><font color=Blue>-- | A special form of filter composition where the second filter</font>-<a name="line-199"></a><font color=Blue>--   works over the same data as the first, but also uses the</font>-<a name="line-200"></a><font color=Blue>--   first's result.</font>-<a name="line-201"></a><font color=Blue>andThen</font> <font color=Red>::</font> <font color=Cyan>(</font>a<font color=Red>-&gt;</font>c<font color=Cyan>)</font> <font color=Red>-&gt;</font> <font color=Cyan>(</font>c<font color=Red>-&gt;</font>a<font color=Red>-&gt;</font>b<font color=Cyan>)</font> <font color=Red>-&gt;</font> <font color=Cyan>(</font>a<font color=Red>-&gt;</font>b<font color=Cyan>)</font>-<a name="line-202"></a><font color=Blue>andThen</font> f g <font color=Red>=</font> <font color=Red>\</font>x<font color=Red>-&gt;</font> g <font color=Cyan>(</font>f x<font color=Cyan>)</font> x			<font color=Blue>-- lift g f id</font>-<a name="line-203"></a>-<a name="line-204"></a><a name="childrenBy"></a><font color=Blue>-- | Process children using specified filters.  /not exported/</font>-<a name="line-205"></a><font color=Blue>childrenBy</font> <font color=Red>::</font> CFilter i <font color=Red>-&gt;</font> CFilter i -<a name="line-206"></a><font color=Blue>childrenBy</font> f <font color=Red>=</font> f <font color=Cyan>`o`</font> children-<a name="line-207"></a>-<a name="line-208"></a><a name="|>|"></a><font color=Blue>-- | Directional choice:</font>-<a name="line-209"></a><font color=Blue>--   in @f |&gt;| g@ give g-productions only if no f-productions</font>-<a name="line-210"></a><font color=Cyan>(</font><font color=Cyan>|&gt;|</font><font color=Cyan>)</font> <font color=Red>::</font> <font color=Cyan>(</font>a<font color=Red>-&gt;</font><font color=Red>[</font>b<font color=Red>]</font><font color=Cyan>)</font> <font color=Red>-&gt;</font> <font color=Cyan>(</font>a<font color=Red>-&gt;</font><font color=Red>[</font>b<font color=Red>]</font><font color=Cyan>)</font> <font color=Red>-&gt;</font> <font color=Cyan>(</font>a<font color=Red>-&gt;</font><font color=Red>[</font>b<font color=Red>]</font><font color=Cyan>)</font>-<a name="line-211"></a><a name="f"></a><font color=Blue>f</font> <font color=Cyan>|&gt;|</font> g <font color=Red>=</font> <font color=Red>\</font>x<font color=Red>-&gt;</font> <font color=Green><u>let</u></font> fx <font color=Red>=</font> f x <font color=Green><u>in</u></font> <font color=Green><u>if</u></font> null fx <font color=Green><u>then</u></font> g x <font color=Green><u>else</u></font> fx-<a name="line-212"></a><font color=Blue>--      f |&gt;| g  =  f ?&gt; f :&gt; g</font>-<a name="line-213"></a>-<a name="line-214"></a><a name="with"></a><font color=Blue>-- | Pruning: in @f `with` g@,</font>-<a name="line-215"></a><font color=Blue>--   keep only those f-productions which have at least one g-production</font>-<a name="line-216"></a><font color=Blue>with</font> <font color=Red>::</font> CFilter i <font color=Red>-&gt;</font> CFilter i <font color=Red>-&gt;</font> CFilter i-<a name="line-217"></a><a name="with"></a><font color=Blue>f</font> <font color=Cyan>`with`</font> g <font color=Red>=</font> filter <font color=Cyan>(</font>not<font color=Cyan>.</font>null<font color=Cyan>.</font>g<font color=Cyan>)</font> <font color=Cyan>.</font> f-<a name="line-218"></a>-<a name="line-219"></a><a name="without"></a><font color=Blue>-- | Pruning: in @f `without` g@,</font>-<a name="line-220"></a><font color=Blue>--   keep only those f-productions which have no g-productions</font>-<a name="line-221"></a><font color=Blue>without</font> <font color=Red>::</font> CFilter i <font color=Red>-&gt;</font> CFilter i <font color=Red>-&gt;</font> CFilter i-<a name="line-222"></a><a name="without"></a><font color=Blue>f</font> <font color=Cyan>`without`</font> g <font color=Red>=</font> filter <font color=Cyan>(</font>null<font color=Cyan>.</font>g<font color=Cyan>)</font> <font color=Cyan>.</font> f-<a name="line-223"></a>-<a name="line-224"></a><a name="/>"></a><font color=Blue>-- | Pronounced /slash/, @f \/&gt; g@ means g inside f</font>-<a name="line-225"></a><font color=Cyan>(</font><font color=Cyan>/&gt;</font><font color=Cyan>)</font> <font color=Red>::</font> CFilter i <font color=Red>-&gt;</font> CFilter i <font color=Red>-&gt;</font> CFilter i-<a name="line-226"></a><font color=Blue>f</font> <font color=Cyan>/&gt;</font> g <font color=Red>=</font> g <font color=Cyan>`o`</font> children <font color=Cyan>`o`</font> f-<a name="line-227"></a>-<a name="line-228"></a><a name="</"></a><font color=Blue>-- | Pronounced /outside/, @f \&lt;\/ g@ means f containing g</font>-<a name="line-229"></a><font color=Cyan>(</font><font color=Cyan>&lt;/</font><font color=Cyan>)</font> <font color=Red>::</font> CFilter i <font color=Red>-&gt;</font> CFilter i <font color=Red>-&gt;</font> CFilter i-<a name="line-230"></a><font color=Blue>f</font> <font color=Cyan>&lt;/</font> g <font color=Red>=</font> f <font color=Cyan>`with`</font> <font color=Cyan>(</font>g <font color=Cyan>`o`</font> children<font color=Cyan>)</font>-<a name="line-231"></a>-<a name="line-232"></a><a name="et"></a><font color=Blue>-- | Join an element-matching filter with a text-only filter</font>-<a name="line-233"></a><font color=Blue>et</font> <font color=Red>::</font> <font color=Cyan>(</font>String<font color=Red>-&gt;</font>CFilter i<font color=Cyan>)</font> <font color=Red>-&gt;</font> CFilter i <font color=Red>-&gt;</font> CFilter i-<a name="line-234"></a><font color=Blue>et</font> f g <font color=Red>=</font> <font color=Cyan>(</font>f <font color=Cyan>`oo`</font> tagged elm<font color=Cyan>)</font>-<a name="line-235"></a>            <font color=Cyan>|&gt;|</font>-<a name="line-236"></a>         <font color=Cyan>(</font>g <font color=Cyan>`o`</font> txt<font color=Cyan>)</font>-<a name="line-237"></a>-<a name="line-238"></a><a name="path"></a><font color=Blue>-- | Express a list of filters like an XPath query, e.g.</font>-<a name="line-239"></a><font color=Blue>--   @path [children, tag \"name1\", attr \"attr1\", children, tag \"name2\"]@</font>-<a name="line-240"></a><font color=Blue>--   is like the XPath query @\/name1[\@attr1]\/name2@.</font>-<a name="line-241"></a><font color=Blue>path</font> <font color=Red>::</font> <font color=Red>[</font>CFilter i<font color=Red>]</font> <font color=Red>-&gt;</font> CFilter i-<a name="line-242"></a><font color=Blue>path</font> fs <font color=Red>=</font> foldr <font color=Cyan>(</font>flip <font color=Cyan>(</font>o<font color=Cyan>)</font><font color=Cyan>)</font> keep fs-<a name="line-243"></a>-<a name="line-244"></a>-<a name="line-245"></a><a name="deep"></a><font color=Blue>-- RECURSIVE SEARCH</font>-<a name="line-246"></a><font color=Blue>-- $recursive</font>-<a name="line-247"></a><font color=Blue>-- Recursive search has three variants: @deep@ does a breadth-first</font>-<a name="line-248"></a><font color=Blue>-- search of the tree, @deepest@ does a depth-first search, @multi@ returns</font>-<a name="line-249"></a><font color=Blue>-- content at all tree-levels, even those strictly contained within results</font>-<a name="line-250"></a><font color=Blue>-- that have already been returned.</font>-<a name="line-251"></a><font color=Blue>deep</font><font color=Cyan>,</font> deepest<font color=Cyan>,</font> multi <font color=Red>::</font> CFilter i <font color=Red>-&gt;</font> CFilter i-<a name="line-252"></a><font color=Blue>deep</font> f     <font color=Red>=</font> f <font color=Cyan>|&gt;|</font> <font color=Cyan>(</font>deep f <font color=Cyan>`o`</font> children<font color=Cyan>)</font>-<a name="line-253"></a><a name="deepest"></a><font color=Blue>deepest</font> f  <font color=Red>=</font> <font color=Cyan>(</font>deepest f <font color=Cyan>`o`</font> children<font color=Cyan>)</font> <font color=Cyan>|&gt;|</font> f-<a name="line-254"></a><a name="multi"></a><font color=Blue>multi</font> f    <font color=Red>=</font> f <font color=Cyan>`union`</font> <font color=Cyan>(</font>multi f <font color=Cyan>`o`</font> children<font color=Cyan>)</font>-<a name="line-255"></a>-<a name="line-256"></a><a name="when"></a><font color=Blue>-- | Interior editing:</font>-<a name="line-257"></a><font color=Blue>--   @f `when` g@ applies @f@ only when the predicate @g@ succeeds,</font>-<a name="line-258"></a><font color=Blue>--   otherwise the content is unchanged.</font>-<a name="line-259"></a><font color=Blue>when</font>   <font color=Red>::</font> CFilter i <font color=Red>-&gt;</font> CFilter i <font color=Red>-&gt;</font> CFilter i-<a name="line-260"></a><a name="guards"></a><font color=Blue>-- | Interior editing:</font>-<a name="line-261"></a><font color=Blue>--   @g `guards` f@ applies @f@ only when the predicate @g@ succeeds,</font>-<a name="line-262"></a><font color=Blue>--   otherwise the content is discarded.</font>-<a name="line-263"></a><font color=Blue>guards</font> <font color=Red>::</font> CFilter i <font color=Red>-&gt;</font> CFilter i <font color=Red>-&gt;</font> CFilter i-<a name="line-264"></a><a name="when"></a><font color=Blue>f</font> <font color=Cyan>`when`</font> g       <font color=Red>=</font> g <font color=Cyan>?&gt;</font> f <font color=Red><b>:&gt;</b></font> keep-<a name="line-265"></a><a name="guards"></a><font color=Blue>g</font> <font color=Cyan>`guards`</font> f     <font color=Red>=</font> g <font color=Cyan>?&gt;</font> f <font color=Red><b>:&gt;</b></font> none	<font color=Blue>-- = f `o` (keep `with` g)</font>-<a name="line-266"></a>-<a name="line-267"></a><a name="chip"></a><font color=Blue>-- | Process CHildren In Place.  The filter is applied to any children</font>-<a name="line-268"></a><font color=Blue>--   of an element content, and the element rebuilt around the results.</font>-<a name="line-269"></a><font color=Blue>chip</font> <font color=Red>::</font> CFilter i <font color=Red>-&gt;</font> CFilter i-<a name="line-270"></a><font color=Blue>chip</font> f <font color=Cyan>(</font>CElem <font color=Cyan>(</font>Elem n <font color=Green><u>as</u></font> cs<font color=Cyan>)</font> i<font color=Cyan>)</font> <font color=Red>=</font> <font color=Red>[</font> CElem <font color=Cyan>(</font>Elem n <font color=Green><u>as</u></font> <font color=Cyan>(</font>concatMap f cs<font color=Cyan>)</font><font color=Cyan>)</font> i <font color=Red>]</font>-<a name="line-271"></a><font color=Blue>chip</font> f c <font color=Red>=</font> <font color=Red>[</font>c<font color=Red>]</font>-<a name="line-272"></a><font color=Blue>-- chip f = inplace (f `o` children)</font>-<a name="line-273"></a>-<a name="line-274"></a><a name="inplace"></a><font color=Blue>-- | Process an element In Place.  The filter is applied to the element</font>-<a name="line-275"></a><font color=Blue>--   itself, and then the original element rebuilt around the results.</font>-<a name="line-276"></a><font color=Blue>inplace</font> <font color=Red>::</font> CFilter i <font color=Red>-&gt;</font> CFilter i-<a name="line-277"></a><font color=Blue>inplace</font> f c<font color=Red>@</font><font color=Cyan>(</font>CElem <font color=Cyan>(</font>Elem name <font color=Green><u>as</u></font> <font color=Green><u>_</u></font><font color=Cyan>)</font> i<font color=Cyan>)</font> <font color=Red>=</font> <font color=Red>[</font> CElem <font color=Cyan>(</font>Elem name <font color=Green><u>as</u></font> <font color=Cyan>(</font>f c<font color=Cyan>)</font><font color=Cyan>)</font> i <font color=Red>]</font>-<a name="line-278"></a><font color=Blue>inplace</font> f c <font color=Red>=</font> <font color=Red>[</font>c<font color=Red>]</font>-<a name="line-279"></a>-<a name="line-280"></a>-<a name="line-281"></a><a name="foldXml"></a><font color=Blue>-- | Recursive application of filters: a fold-like operator.  Defined</font>-<a name="line-282"></a><font color=Blue>--   as @f `o` chip (foldXml f)@.</font>-<a name="line-283"></a><font color=Blue>foldXml</font> <font color=Red>::</font> CFilter i <font color=Red>-&gt;</font> CFilter i-<a name="line-284"></a><font color=Blue>foldXml</font> f <font color=Red>=</font> f <font color=Cyan>`o`</font> chip <font color=Cyan>(</font>foldXml f<font color=Cyan>)</font>-<a name="line-285"></a>-<a name="line-286"></a>-<a name="line-287"></a>-<a name="line-288"></a>-<a name="line-289"></a><font color=Blue>-- CONSTRUCTIVE CONTENT FILTERS</font>-<a name="line-290"></a>-<a name="line-291"></a><a name="mkElem"></a><font color=Blue>-- | Build an element with the given tag name - its content is the results</font>-<a name="line-292"></a><font color=Blue>--   of the given list of filters.</font>-<a name="line-293"></a><font color=Blue>mkElem</font> <font color=Red>::</font> String <font color=Red>-&gt;</font> <font color=Red>[</font>CFilter i<font color=Red>]</font> <font color=Red>-&gt;</font> CFilter i-<a name="line-294"></a><font color=Blue>mkElem</font> h cfs <font color=Red>=</font> <font color=Red>\</font>t<font color=Red>-&gt;</font> <font color=Red>[</font> CElem <font color=Cyan>(</font>Elem h [] <font color=Cyan>(</font>cat cfs t<font color=Cyan>)</font><font color=Cyan>)</font> undefined <font color=Red>]</font>-<a name="line-295"></a>-<a name="line-296"></a><a name="mkElemAttr"></a><font color=Blue>-- | Build an element with the given name, attributes, and content.</font>-<a name="line-297"></a><font color=Blue>mkElemAttr</font> <font color=Red>::</font> String <font color=Red>-&gt;</font> <font color=Red>[</font><font color=Cyan>(</font>String<font color=Cyan>,</font>CFilter i<font color=Cyan>)</font><font color=Red>]</font> <font color=Red>-&gt;</font> <font color=Red>[</font>CFilter i<font color=Red>]</font> <font color=Red>-&gt;</font> CFilter i-<a name="line-298"></a><font color=Blue>mkElemAttr</font> h <font color=Green><u>as</u></font> cfs <font color=Red>=</font> <font color=Red>\</font>t<font color=Red>-&gt;</font> <font color=Red>[</font> CElem <font color=Cyan>(</font>Elem h <font color=Cyan>(</font>map <font color=Cyan>(</font>attr t<font color=Cyan>)</font> <font color=Green><u>as</u></font><font color=Cyan>)</font> <font color=Cyan>(</font>cat cfs t<font color=Cyan>)</font><font color=Cyan>)</font> undefined <font color=Red>]</font>-<a name="line-299"></a>  <font color=Green><u>where</u></font> attr t <font color=Cyan>(</font>n<font color=Cyan>,</font>vf<font color=Cyan>)</font> <font color=Red>=</font>-<a name="line-300"></a>            <font color=Green><u>let</u></font> v <font color=Red>=</font> concat <font color=Red>[</font> s <font color=Red>|</font> <font color=Cyan>(</font>CString <font color=Green><u>_</u></font> s <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red>&lt;-</font> <font color=Cyan>(</font>deep txt <font color=Cyan>`o`</font> vf<font color=Cyan>)</font> t <font color=Red>]</font>-<a name="line-301"></a>            <font color=Green><u>in</u></font>  <font color=Cyan>(</font>n<font color=Cyan>,</font> AttValue <font color=Red>[</font>Left v<font color=Red>]</font><font color=Cyan>)</font>-<a name="line-302"></a>-<a name="line-303"></a><a name="literal"></a><font color=Blue>-- | Build some textual content.</font>-<a name="line-304"></a><font color=Blue>literal</font> <font color=Red>::</font> String <font color=Red>-&gt;</font> CFilter i-<a name="line-305"></a><font color=Blue>literal</font> s <font color=Red>=</font> const <font color=Red>[</font>CString False s undefined<font color=Red>]</font>-<a name="line-306"></a>-<a name="line-307"></a><a name="cdata"></a><font color=Blue>-- | Build some CDATA content.</font>-<a name="line-308"></a><font color=Blue>cdata</font> <font color=Red>::</font> String <font color=Red>-&gt;</font> CFilter i-<a name="line-309"></a><font color=Blue>cdata</font> s <font color=Red>=</font> const <font color=Red>[</font>CString True s undefined<font color=Red>]</font>-<a name="line-310"></a>-<a name="line-311"></a><a name="replaceTag"></a><font color=Blue>-- | Rename an element tag (leaving attributes in place).</font>-<a name="line-312"></a><font color=Blue>replaceTag</font> <font color=Red>::</font> String <font color=Red>-&gt;</font> CFilter i-<a name="line-313"></a><font color=Blue>replaceTag</font> n <font color=Cyan>(</font>CElem <font color=Cyan>(</font>Elem <font color=Green><u>_</u></font> <font color=Green><u>as</u></font> cs<font color=Cyan>)</font> i<font color=Cyan>)</font> <font color=Red>=</font> <font color=Red>[</font>CElem <font color=Cyan>(</font>Elem n <font color=Green><u>as</u></font> cs<font color=Cyan>)</font> i<font color=Red>]</font>-<a name="line-314"></a><font color=Blue>replaceTag</font> n <font color=Green><u>_</u></font> <font color=Red>=</font> []-<a name="line-315"></a>-<a name="line-316"></a><a name="replaceAttrs"></a><font color=Blue>-- | Replace the attributes of an element (leaving tag the same).</font>-<a name="line-317"></a><font color=Blue>replaceAttrs</font> <font color=Red>::</font> <font color=Red>[</font><font color=Cyan>(</font>String<font color=Cyan>,</font>String<font color=Cyan>)</font><font color=Red>]</font> <font color=Red>-&gt;</font> CFilter i-<a name="line-318"></a><font color=Blue>replaceAttrs</font> <font color=Green><u>as</u></font> <font color=Cyan>(</font>CElem <font color=Cyan>(</font>Elem n <font color=Green><u>_</u></font> cs<font color=Cyan>)</font> i<font color=Cyan>)</font> <font color=Red>=</font> <font color=Red>[</font>CElem <font color=Cyan>(</font>Elem n as' cs<font color=Cyan>)</font> i<font color=Red>]</font>-<a name="line-319"></a>    <font color=Green><u>where</u></font> as' <font color=Red>=</font> map <font color=Cyan>(</font><font color=Red>\</font><font color=Cyan>(</font>n<font color=Cyan>,</font>v<font color=Cyan>)</font><font color=Red>-&gt;</font> <font color=Cyan>(</font>n<font color=Cyan>,</font> AttValue <font color=Red>[</font>Left v<font color=Red>]</font><font color=Cyan>)</font><font color=Cyan>)</font> <font color=Green><u>as</u></font>-<a name="line-320"></a><font color=Blue>replaceAttrs</font> <font color=Green><u>as</u></font> <font color=Green><u>_</u></font> <font color=Red>=</font> []-<a name="line-321"></a>-<a name="line-322"></a>-<a name="line-323"></a>-<a name="line-324"></a><font color=Blue>-- LABELLING</font>-<a name="line-325"></a>-<a name="line-326"></a><a name="LabelFilter"></a><font color=Blue>-- | A LabelFilter is like a CFilter except that it pairs up a polymorphic</font>-<a name="line-327"></a><a name="LabelFilter"></a><font color=Blue>--   value (label) with each of its results.</font>-<a name="line-328"></a><a name="LabelFilter"></a><font color=Green><u>type</u></font> LabelFilter i a <font color=Red>=</font> Content i <font color=Red>-&gt;</font> <font color=Red>[</font><font color=Cyan>(</font>a<font color=Cyan>,</font>Content i<font color=Cyan>)</font><font color=Red>]</font>-<a name="line-329"></a>-<a name="line-330"></a><a name="oo"></a><font color=Blue>-- | Compose a label-processing filter with a label-generating filter.</font>-<a name="line-331"></a><font color=Blue>oo</font> <font color=Red>::</font> <font color=Cyan>(</font>a<font color=Red>-&gt;</font>CFilter i<font color=Cyan>)</font> <font color=Red>-&gt;</font> LabelFilter i a <font color=Red>-&gt;</font> CFilter i-<a name="line-332"></a><a name="oo"></a><font color=Blue>f</font> <font color=Cyan>`oo`</font> g <font color=Red>=</font> concatMap <font color=Cyan>(</font>uncurry f<font color=Cyan>)</font> <font color=Cyan>.</font> g-<a name="line-333"></a>-<a name="line-334"></a><font color=Blue>{--<a name="line-335"></a>-- | Process the information labels (very nearly monadic bind).-<a name="line-336"></a>oo :: (b -&gt; CFilter b c) -&gt; CFilter a b -&gt; CFilter a c-<a name="line-337"></a>f `oo` g = concatMap info . g-<a name="line-338"></a>    where info c@(CElem _ i)     = f i c-<a name="line-339"></a>          info c@(CString _ _ i) = f i c-<a name="line-340"></a>          info c@(CRef _ i)      = f i c-<a name="line-341"></a>          info c                 = [c]-<a name="line-342"></a>-}</font>-<a name="line-343"></a>-<a name="line-344"></a><a name="x"></a><font color=Blue>-- | Combine labels.  Think of this as a pair-wise zip on labels.</font>-<a name="line-345"></a><font color=Blue>--   e.g. @(numbered `x` tagged)@</font>-<a name="line-346"></a><font color=Blue>x</font> <font color=Red>::</font> <font color=Cyan>(</font>CFilter i<font color=Red>-&gt;</font>LabelFilter i a<font color=Cyan>)</font> <font color=Red>-&gt;</font> <font color=Cyan>(</font>CFilter i<font color=Red>-&gt;</font>LabelFilter i b<font color=Cyan>)</font> <font color=Red>-&gt;</font>-<a name="line-347"></a>       <font color=Cyan>(</font>CFilter i<font color=Red>-&gt;</font>LabelFilter i <font color=Cyan>(</font>a<font color=Cyan>,</font>b<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-348"></a><a name="x"></a><font color=Blue>f</font> <font color=Cyan>`x`</font> g <font color=Red>=</font> <font color=Red>\</font>cf c<font color=Red>-&gt;</font> <font color=Green><u>let</u></font> gs <font color=Red>=</font> map fst <font color=Cyan>(</font>g cf c<font color=Cyan>)</font>-<a name="line-349"></a>                      fs <font color=Red>=</font> map fst <font color=Cyan>(</font>f cf c<font color=Cyan>)</font>-<a name="line-350"></a>                  <font color=Green><u>in</u></font> zip <font color=Cyan>(</font>zip fs gs<font color=Cyan>)</font> <font color=Cyan>(</font>cf c<font color=Cyan>)</font>-<a name="line-351"></a>-<a name="line-352"></a>-<a name="line-353"></a><font color=Blue>-- Some basic label-generating filters.</font>-<a name="line-354"></a>-<a name="line-355"></a><a name="numbered"></a><font color=Blue>-- | Number the results from 1 upwards.</font>-<a name="line-356"></a><font color=Blue>numbered</font> <font color=Red>::</font> CFilter i <font color=Red>-&gt;</font> LabelFilter i Int-<a name="line-357"></a><font color=Blue>numbered</font> f <font color=Red>=</font> zip <font color=Red>[</font><font color=Magenta>1</font><font color=Red>..</font><font color=Red>]</font> <font color=Cyan>.</font> f-<a name="line-358"></a>-<a name="line-359"></a><a name="interspersed"></a><font color=Blue>-- | In @interspersed a f b@, label each result of @f@ with the string @a@,</font>-<a name="line-360"></a><font color=Blue>--   except for the last one which is labelled with the string @b@.</font>-<a name="line-361"></a><font color=Blue>interspersed</font> <font color=Red>::</font> String <font color=Red>-&gt;</font> CFilter i <font color=Red>-&gt;</font> String <font color=Red>-&gt;</font> LabelFilter i String-<a name="line-362"></a><font color=Blue>interspersed</font> a f b <font color=Red>=</font>-<a name="line-363"></a>  <font color=Cyan>(</font><font color=Red>\</font>xs<font color=Red>-&gt;</font> zip <font color=Cyan>(</font>replicate <font color=Cyan>(</font>len xs<font color=Cyan>)</font> a <font color=Cyan>++</font> <font color=Red>[</font>b<font color=Red>]</font><font color=Cyan>)</font> xs<font color=Cyan>)</font> <font color=Cyan>.</font> f-<a name="line-364"></a>  <font color=Green><u>where</u></font>-<a name="line-365"></a>  len [] <font color=Red>=</font> <font color=Magenta>0</font>-<a name="line-366"></a>  len xs <font color=Red>=</font> length xs <font color=Blue>-</font> <font color=Magenta>1</font>-<a name="line-367"></a>-<a name="line-368"></a><a name="tagged"></a><font color=Blue>-- | Label each element in the result with its tag name.  Non-element</font>-<a name="line-369"></a><font color=Blue>--   results get an empty string label.</font>-<a name="line-370"></a><font color=Blue>tagged</font> <font color=Red>::</font> CFilter i <font color=Red>-&gt;</font> LabelFilter i String-<a name="line-371"></a><font color=Blue>tagged</font> f <font color=Red>=</font> extracted name f-<a name="line-372"></a>  <font color=Green><u>where</u></font> name <font color=Cyan>(</font>CElem <font color=Cyan>(</font>Elem n <font color=Green><u>_</u></font> <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red>=</font> n-<a name="line-373"></a>        name <font color=Green><u>_</u></font>                      <font color=Red>=</font> <font color=Magenta>""</font>-<a name="line-374"></a>-<a name="line-375"></a><a name="attributed"></a><font color=Blue>-- | Label each element in the result with the value of the named attribute.</font>-<a name="line-376"></a><font color=Blue>--   Elements without the attribute, and non-element results, get an</font>-<a name="line-377"></a><font color=Blue>--   empty string label.</font>-<a name="line-378"></a><font color=Blue>attributed</font> <font color=Red>::</font> String <font color=Red>-&gt;</font> CFilter i <font color=Red>-&gt;</font> LabelFilter i String-<a name="line-379"></a><font color=Blue>attributed</font> key f <font color=Red>=</font> extracted att f-<a name="line-380"></a>  <font color=Green><u>where</u></font> att <font color=Cyan>(</font>CElem <font color=Cyan>(</font>Elem <font color=Green><u>_</u></font> <font color=Green><u>as</u></font> <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red>=</font>-<a name="line-381"></a>            <font color=Green><u>case</u></font> <font color=Cyan>(</font>lookup key <font color=Green><u>as</u></font><font color=Cyan>)</font> <font color=Green><u>of</u></font>-<a name="line-382"></a>              Nothing  <font color=Red>-&gt;</font> <font color=Magenta>""</font>-<a name="line-383"></a>              <font color=Cyan>(</font>Just v<font color=Red>@</font><font color=Cyan>(</font>AttValue <font color=Green><u>_</u></font><font color=Cyan>)</font><font color=Cyan>)</font> <font color=Red>-&gt;</font> show v-<a name="line-384"></a>        att <font color=Green><u>_</u></font> <font color=Red>=</font> <font color=Magenta>""</font>-<a name="line-385"></a>-<a name="line-386"></a><a name="textlabelled"></a><font color=Blue>-- | Label each textual part of the result with its text.  Element</font>-<a name="line-387"></a><font color=Blue>--   results get an empty string label.</font>-<a name="line-388"></a><font color=Blue>textlabelled</font> <font color=Red>::</font> CFilter i <font color=Red>-&gt;</font> LabelFilter i <font color=Cyan>(</font>Maybe String<font color=Cyan>)</font>-<a name="line-389"></a><font color=Blue>textlabelled</font> f <font color=Red>=</font> extracted text f-<a name="line-390"></a>  <font color=Green><u>where</u></font> text <font color=Cyan>(</font>CString <font color=Green><u>_</u></font> s <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red>=</font> Just s-<a name="line-391"></a>        text <font color=Green><u>_</u></font>               <font color=Red>=</font> Nothing-<a name="line-392"></a>-<a name="line-393"></a><a name="extracted"></a><font color=Blue>-- | Label each content with some information extracted from itself.</font>-<a name="line-394"></a><font color=Blue>extracted</font> <font color=Red>::</font> <font color=Cyan>(</font>Content i<font color=Red>-&gt;</font>a<font color=Cyan>)</font> <font color=Red>-&gt;</font> CFilter i <font color=Red>-&gt;</font> LabelFilter i a-<a name="line-395"></a><font color=Blue>extracted</font> proj f <font color=Red>=</font> concatMap <font color=Cyan>(</font><font color=Red>\</font>c<font color=Red>-&gt;</font><font color=Red>[</font><font color=Cyan>(</font>proj c<font color=Cyan>,</font> c<font color=Cyan>)</font><font color=Red>]</font><font color=Cyan>)</font> <font color=Cyan>.</font> f-<a name="line-396"></a>                                                                                -<a name="line-397"></a>-<a name="line-398"></a>-<a name="line-399"></a><font color=Blue>{--<a name="line-400"></a>-- MISC-<a name="line-401"></a>-<a name="line-402"></a>-- | I haven't yet remembered \/ worked out what this does.-<a name="line-403"></a>combine :: (Read a,Show a) =&gt; ([a]-&gt;a) -&gt; LabelFilter String -&gt; CFilter-<a name="line-404"></a>combine f lf = \c-&gt; [ CString False (show (f [ read l | (l,_) &lt;- lf c ])) ]-<a name="line-405"></a>-}</font>-<a name="line-406"></a>-<a name="line-407"></a>-<a name="line-408"></a><font color=Blue>{- OLD STUFF - OBSOLETE-<a name="line-409"></a>-- Keep an element by its numbered position (starting at 1).-<a name="line-410"></a>position :: Int -&gt; [Content] -&gt; [Content]-<a name="line-411"></a>position n | n&gt;0  = (:[]) . (!!(n-1))-<a name="line-412"></a>           | otherwise = const []-<a name="line-413"></a>-<a name="line-414"></a>-- Chop and remove the root portions of trees to depth n.-<a name="line-415"></a>layer :: Int -&gt; [Content] -&gt; [Content]-<a name="line-416"></a>layer n = apply n (concatMap lay)-<a name="line-417"></a>  where lay (CElem (Elem _ _ cs)) = cs-<a name="line-418"></a>        lay _ = []-<a name="line-419"></a>        apply 0 f xs = xs-<a name="line-420"></a>        apply n f xs = apply (n-1) f (f xs)-<a name="line-421"></a>-<a name="line-422"></a>combine :: (Read a, Show a) =&gt; ([a]-&gt;a) -&gt; [Content] -&gt; [Content]-<a name="line-423"></a>combine f = \cs-&gt; [ CString False (show (f [ read s | CString _ s &lt;- cs ])) ]-<a name="line-424"></a>-}</font>-</pre>-</body>-</html>
− docs/HaXml/src/Text/XML/HaXml/DtdToHaskell/Convert.html
@@ -1,137 +0,0 @@-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">-<html>-<head>-<!-- Generated by HsColour, http://www.cs.york.ac.uk/fp/darcs/hscolour/ -->-<title>src/Text/XML/HaXml/DtdToHaskell/Convert.hs</title>-</head>-<body>-<pre><a name="line-1"></a><font color=Blue>-- | This module performs the translation of a parsed XML DTD into the</font>-<a name="line-2"></a><font color=Blue>--   internal representation of corresponding Haskell data\/newtypes.</font>-<a name="line-3"></a>-<a name="line-4"></a><font color=Green><u>module</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>DtdToHaskell<font color=Cyan>.</font>Convert-<a name="line-5"></a>  <font color=Cyan>(</font> dtd2TypeDef-<a name="line-6"></a>  <font color=Cyan>)</font> <font color=Green><u>where</u></font>-<a name="line-7"></a>-<a name="line-8"></a><font color=Green><u>import</u></font> List <font color=Cyan>(</font>intersperse<font color=Cyan>,</font>nub<font color=Cyan>)</font>-<a name="line-9"></a>-<a name="line-10"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Types hiding <font color=Cyan>(</font>Name<font color=Cyan>)</font>-<a name="line-11"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>DtdToHaskell<font color=Cyan>.</font>TypeDef-<a name="line-12"></a>-<a name="line-13"></a>-<a name="line-14"></a><a name="Record"></a><font color=Blue>---- Internal representation for database of DTD decls ----</font>-<a name="line-15"></a><a name="Record"></a><font color=Green><u>data</u></font> Record <font color=Red>=</font> R <font color=Red>[</font>AttDef<font color=Red>]</font> ContentSpec-<a name="line-16"></a><font color=Blue>-- type Db = [(String,Record)]</font>-<a name="line-17"></a>-<a name="line-18"></a>-<a name="line-19"></a><a name="dtd2TypeDef"></a><font color=Blue>---- Build a database of DTD decls then convert them to typedefs ----</font>-<a name="line-20"></a><font color=Blue>---- (Done in two steps because we need to merge ELEMENT and ATTLIST decls.)</font>-<a name="line-21"></a><font color=Blue>---- Apparently multiple ATTLIST decls for the same element are permitted,</font>-<a name="line-22"></a><font color=Blue>---- although only one ELEMENT decl for it is allowed.</font>-<a name="line-23"></a><font color=Blue>dtd2TypeDef</font> <font color=Red>::</font> <font color=Red>[</font>MarkupDecl<font color=Red>]</font> <font color=Red>-&gt;</font> <font color=Red>[</font>TypeDef<font color=Red>]</font>-<a name="line-24"></a><font color=Blue>dtd2TypeDef</font> mds <font color=Red>=</font>-<a name="line-25"></a>  <font color=Cyan>(</font>concatMap convert <font color=Cyan>.</font> reverse <font color=Cyan>.</font> database []<font color=Cyan>)</font> mds-<a name="line-26"></a>  <font color=Green><u>where</u></font>-<a name="line-27"></a>  database db [] <font color=Red>=</font> db-<a name="line-28"></a>  database db <font color=Cyan>(</font>m<font color=Red><b>:</b></font>ms<font color=Cyan>)</font> <font color=Red>=</font>-<a name="line-29"></a>      <font color=Green><u>case</u></font> m <font color=Green><u>of</u></font>-<a name="line-30"></a>        <font color=Cyan>(</font>Element <font color=Cyan>(</font>ElementDecl n cs<font color=Cyan>)</font><font color=Cyan>)</font> <font color=Red>-&gt;</font>-<a name="line-31"></a>          <font color=Green><u>case</u></font> lookup n db <font color=Green><u>of</u></font>-<a name="line-32"></a>            Nothing <font color=Red>-&gt;</font> database <font color=Cyan>(</font><font color=Cyan>(</font>n<font color=Cyan>,</font> R [] cs<font color=Cyan>)</font><font color=Red><b>:</b></font>db<font color=Cyan>)</font> ms-<a name="line-33"></a>            <font color=Cyan>(</font>Just <font color=Cyan>(</font>R <font color=Green><u>as</u></font> <font color=Green><u>_</u></font><font color=Cyan>)</font><font color=Cyan>)</font> <font color=Red>-&gt;</font> database <font color=Cyan>(</font>replace n <font color=Cyan>(</font>R <font color=Green><u>as</u></font> cs<font color=Cyan>)</font> db<font color=Cyan>)</font> ms-<a name="line-34"></a>        <font color=Cyan>(</font>AttList <font color=Cyan>(</font>AttListDecl n <font color=Green><u>as</u></font><font color=Cyan>)</font><font color=Cyan>)</font> <font color=Red>-&gt;</font>-<a name="line-35"></a>          <font color=Green><u>case</u></font> lookup n db <font color=Green><u>of</u></font>-<a name="line-36"></a>            Nothing <font color=Red>-&gt;</font> database <font color=Cyan>(</font><font color=Cyan>(</font>n<font color=Cyan>,</font> R <font color=Green><u>as</u></font> EMPTY<font color=Cyan>)</font><font color=Red><b>:</b></font>db<font color=Cyan>)</font> ms-<a name="line-37"></a>            <font color=Cyan>(</font>Just <font color=Cyan>(</font>R a cs<font color=Cyan>)</font><font color=Cyan>)</font> <font color=Red>-&gt;</font> database <font color=Cyan>(</font>replace n <font color=Cyan>(</font>R <font color=Cyan>(</font>nub <font color=Cyan>(</font>a<font color=Cyan>++</font><font color=Green><u>as</u></font><font color=Cyan>)</font><font color=Cyan>)</font> cs<font color=Cyan>)</font> db<font color=Cyan>)</font> ms-<a name="line-38"></a>    <font color=Blue>--  (MarkupPE _ m') -&gt; database db (m':ms)</font>-<a name="line-39"></a>        <font color=Green><u>_</u></font> <font color=Red>-&gt;</font> database db ms-<a name="line-40"></a>-<a name="line-41"></a>  replace <font color=Green><u>_</u></font> <font color=Green><u>_</u></font> [] <font color=Red>=</font> error <font color=Magenta>"dtd2TypeDef.replace: no element to replace"</font>-<a name="line-42"></a>  replace n v <font color=Cyan>(</font>x<font color=Red>@</font><font color=Cyan>(</font>n0<font color=Cyan>,</font><font color=Green><u>_</u></font><font color=Cyan>)</font><font color=Red><b>:</b></font>db<font color=Cyan>)</font>-<a name="line-43"></a>      <font color=Red>|</font> n<font color=Cyan>==</font>n0     <font color=Red>=</font> <font color=Cyan>(</font>n<font color=Cyan>,</font>v<font color=Cyan>)</font><font color=Red><b>:</b></font> db-<a name="line-44"></a>      <font color=Red>|</font> otherwise <font color=Red>=</font> x<font color=Red><b>:</b></font> replace n v db-<a name="line-45"></a>-<a name="line-46"></a>-<a name="line-47"></a>-<a name="line-48"></a><a name="convert"></a><font color=Blue>---- Convert DTD record to typedef ----</font>-<a name="line-49"></a><font color=Blue>convert</font> <font color=Red>::</font> <font color=Cyan>(</font>String<font color=Cyan>,</font> Record<font color=Cyan>)</font> <font color=Red>-&gt;</font> <font color=Red>[</font>TypeDef<font color=Red>]</font>-<a name="line-50"></a><font color=Blue>convert</font> <font color=Cyan>(</font>n<font color=Cyan>,</font> R <font color=Green><u>as</u></font> cs<font color=Cyan>)</font> <font color=Red>=</font>-<a name="line-51"></a>    <font color=Green><u>case</u></font> cs <font color=Green><u>of</u></font>-<a name="line-52"></a>      EMPTY                   <font color=Red>-&gt;</font> modifier None []-<a name="line-53"></a>      ANY                     <font color=Red>-&gt;</font> modifier None <font color=Red>[</font><font color=Red>[</font>Any<font color=Red>]</font><font color=Red>]</font>-<a name="line-54"></a>                                 <font color=Blue>--error "NYI: contentspec of ANY"</font>-<a name="line-55"></a>      <font color=Cyan>(</font>Mixed PCDATA<font color=Cyan>)</font>          <font color=Red>-&gt;</font> modifier None <font color=Red>[</font><font color=Red>[</font>String<font color=Red>]</font><font color=Red>]</font>-<a name="line-56"></a>      <font color=Cyan>(</font>Mixed <font color=Cyan>(</font>PCDATAplus ns<font color=Cyan>)</font><font color=Cyan>)</font> <font color=Red>-&gt;</font> modifier Star <font color=Cyan>(</font><font color=Red>[</font>String<font color=Red>]</font><font color=Red><b>:</b></font> map <font color=Cyan>(</font><font color=Cyan>(</font><font color=Red><b>:</b></font>[]<font color=Cyan>)</font> <font color=Cyan>.</font> Defined <font color=Cyan>.</font> name<font color=Cyan>)</font> ns<font color=Cyan>)</font>-<a name="line-57"></a>      <font color=Cyan>(</font>ContentSpec cp<font color=Cyan>)</font>        <font color=Red>-&gt;</font>-<a name="line-58"></a>          <font color=Green><u>case</u></font> cp <font color=Green><u>of</u></font>-<a name="line-59"></a>            <font color=Cyan>(</font>TagName n' m<font color=Cyan>)</font> <font color=Red>-&gt;</font> modifier m <font color=Red>[</font><font color=Red>[</font>Defined <font color=Cyan>(</font>name n'<font color=Cyan>)</font><font color=Red>]</font><font color=Red>]</font>-<a name="line-60"></a>            <font color=Cyan>(</font>Choice cps m<font color=Cyan>)</font> <font color=Red>-&gt;</font> modifier m <font color=Cyan>(</font>map <font color=Cyan>(</font><font color=Cyan>(</font><font color=Red><b>:</b></font>[]<font color=Cyan>)</font><font color=Cyan>.</font>inner<font color=Cyan>)</font> cps<font color=Cyan>)</font>-<a name="line-61"></a>            <font color=Cyan>(</font>Seq cps m<font color=Cyan>)</font>    <font color=Red>-&gt;</font> modifier m <font color=Red>[</font>map inner cps<font color=Red>]</font>-<a name="line-62"></a>    <font color=Cyan>++</font> concatMap <font color=Cyan>(</font>mkAttrDef n<font color=Cyan>)</font> <font color=Green><u>as</u></font>-<a name="line-63"></a>  <font color=Green><u>where</u></font>-<a name="line-64"></a>    attrs    <font color=Red>::</font> AttrFields-<a name="line-65"></a>    attrs     <font color=Red>=</font> map <font color=Cyan>(</font>mkAttrField n<font color=Cyan>)</font> <font color=Green><u>as</u></font>-<a name="line-66"></a>-<a name="line-67"></a>    modifier None sts   <font color=Red>=</font> mkData sts            attrs False <font color=Cyan>(</font>name n<font color=Cyan>)</font>-<a name="line-68"></a>    modifier m   <font color=Red>[</font><font color=Red>[</font>st<font color=Red>]</font><font color=Red>]</font> <font color=Red>=</font> mkData <font color=Red>[</font><font color=Red>[</font>modf m st<font color=Red>]</font><font color=Red>]</font>  attrs False <font color=Cyan>(</font>name n<font color=Cyan>)</font>-<a name="line-69"></a>    modifier m    sts   <font color=Red>=</font> mkData <font color=Red>[</font><font color=Red>[</font>modf m <font color=Cyan>(</font>Defined <font color=Cyan>(</font>name_ n<font color=Cyan>)</font><font color=Cyan>)</font><font color=Red>]</font><font color=Red>]</font>-<a name="line-70"></a>                                                attrs False <font color=Cyan>(</font>name n<font color=Cyan>)</font> <font color=Cyan>++</font>-<a name="line-71"></a>                          mkData sts            []    True  <font color=Cyan>(</font>name_ n<font color=Cyan>)</font>-<a name="line-72"></a>-<a name="line-73"></a>    inner <font color=Red>::</font> CP <font color=Red>-&gt;</font> StructType-<a name="line-74"></a>    inner <font color=Cyan>(</font>TagName n' m<font color=Cyan>)</font> <font color=Red>=</font> modf m <font color=Cyan>(</font>Defined <font color=Cyan>(</font>name n'<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-75"></a>    inner <font color=Cyan>(</font>Choice cps m<font color=Cyan>)</font> <font color=Red>=</font> modf m <font color=Cyan>(</font>OneOf <font color=Cyan>(</font>map inner cps<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-76"></a>    inner <font color=Cyan>(</font>Seq cps None<font color=Cyan>)</font> <font color=Red>=</font> Tuple <font color=Cyan>(</font>map inner cps<font color=Cyan>)</font>-<a name="line-77"></a>    inner <font color=Cyan>(</font>Seq cps m<font color=Cyan>)</font>    <font color=Red>=</font> modf m <font color=Cyan>(</font>Tuple <font color=Cyan>(</font>map inner cps<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-78"></a>-<a name="line-79"></a>    modf None x  <font color=Red>=</font> x-<a name="line-80"></a>    modf Query x <font color=Red>=</font> Maybe x-<a name="line-81"></a>    modf Star x  <font color=Red>=</font> List x-<a name="line-82"></a>    modf Plus x  <font color=Red>=</font> List1 x-<a name="line-83"></a>-<a name="line-84"></a><a name="mkData"></a><font color=Blue>mkData</font> <font color=Red>::</font> <font color=Red>[</font><font color=Red>[</font>StructType<font color=Red>]</font><font color=Red>]</font> <font color=Red>-&gt;</font> AttrFields <font color=Red>-&gt;</font> Bool <font color=Red>-&gt;</font> Name <font color=Red>-&gt;</font> <font color=Red>[</font>TypeDef<font color=Red>]</font>-<a name="line-85"></a><font color=Blue>mkData</font> []   fs aux n  <font color=Red>=</font> <font color=Red>[</font>DataDef aux n fs []<font color=Red>]</font>-<a name="line-86"></a><font color=Blue>mkData</font> <font color=Red>[</font>ts<font color=Red>]</font> fs aux n  <font color=Red>=</font> <font color=Red>[</font>DataDef aux n fs <font color=Red>[</font><font color=Cyan>(</font>n<font color=Cyan>,</font> ts<font color=Cyan>)</font><font color=Red>]</font><font color=Red>]</font>-<a name="line-87"></a><font color=Blue>mkData</font> tss  fs aux n  <font color=Red>=</font> <font color=Red>[</font>DataDef aux n fs <font color=Cyan>(</font>map <font color=Cyan>(</font>mkConstr n<font color=Cyan>)</font> tss<font color=Cyan>)</font><font color=Red>]</font>-<a name="line-88"></a>  <font color=Green><u>where</u></font>-<a name="line-89"></a>    mkConstr m ts <font color=Red>=</font> <font color=Cyan>(</font>mkConsName m ts<font color=Cyan>,</font> ts<font color=Cyan>)</font>-<a name="line-90"></a>    mkConsName <font color=Cyan>(</font>Name x m<font color=Cyan>)</font> sts <font color=Red>=</font> Name x <font color=Cyan>(</font>m<font color=Cyan>++</font>concat <font color=Cyan>(</font>intersperse <font color=Magenta>"_"</font> <font color=Cyan>(</font>map flatten sts<font color=Cyan>)</font><font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-91"></a>    flatten <font color=Cyan>(</font>Maybe st<font color=Cyan>)</font>   <font color=Red>=</font> <font color=Blue>{-"Maybe_" ++ -}</font> flatten st-<a name="line-92"></a>    flatten <font color=Cyan>(</font>List st<font color=Cyan>)</font>    <font color=Red>=</font> <font color=Blue>{-"List_" ++ -}</font> flatten st-<a name="line-93"></a>    flatten <font color=Cyan>(</font>List1 st<font color=Cyan>)</font>   <font color=Red>=</font> <font color=Blue>{-"List1_" ++ -}</font> flatten st-<a name="line-94"></a>    flatten <font color=Cyan>(</font>Tuple sts<font color=Cyan>)</font>  <font color=Red>=</font> <font color=Blue>{-"Tuple" ++ show (length sts) ++ "_" ++ -}</font>-<a name="line-95"></a>                            concat <font color=Cyan>(</font>intersperse <font color=Magenta>"_"</font> <font color=Cyan>(</font>map flatten sts<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-96"></a>    flatten String       <font color=Red>=</font> <font color=Magenta>"Str"</font>-<a name="line-97"></a>    flatten <font color=Cyan>(</font>OneOf sts<font color=Cyan>)</font>  <font color=Red>=</font> <font color=Blue>{-"OneOf" ++ show (length sts) ++ "_" ++ -}</font>-<a name="line-98"></a>                            concat <font color=Cyan>(</font>intersperse <font color=Magenta>"_"</font> <font color=Cyan>(</font>map flatten sts<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-99"></a>    flatten Any          <font color=Red>=</font> <font color=Magenta>"Any"</font>-<a name="line-100"></a>    flatten <font color=Cyan>(</font>Defined <font color=Cyan>(</font>Name <font color=Green><u>_</u></font> m<font color=Cyan>)</font><font color=Cyan>)</font>  <font color=Red>=</font> m-<a name="line-101"></a>-<a name="line-102"></a><a name="mkAttrDef"></a><font color=Blue>mkAttrDef</font> <font color=Red>::</font> String <font color=Red>-&gt;</font> AttDef <font color=Red>-&gt;</font> <font color=Red>[</font>TypeDef<font color=Red>]</font>-<a name="line-103"></a><font color=Blue>mkAttrDef</font> <font color=Green><u>_</u></font> <font color=Cyan>(</font>AttDef <font color=Green><u>_</u></font> StringType <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red>=</font>-<a name="line-104"></a>    []-<a name="line-105"></a><font color=Blue>mkAttrDef</font> <font color=Green><u>_</u></font> <font color=Cyan>(</font>AttDef <font color=Green><u>_</u></font> <font color=Cyan>(</font>TokenizedType <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red>=</font>-<a name="line-106"></a>    [] <font color=Blue>-- mkData [[String]] [] False (name n)</font>-<a name="line-107"></a><font color=Blue>mkAttrDef</font> e <font color=Cyan>(</font>AttDef n <font color=Cyan>(</font>EnumeratedType <font color=Cyan>(</font>NotationType nt<font color=Cyan>)</font><font color=Cyan>)</font> <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red>=</font>-<a name="line-108"></a>    <font color=Red>[</font>EnumDef <font color=Cyan>(</font>name_a e n<font color=Cyan>)</font> <font color=Cyan>(</font>map <font color=Cyan>(</font>name_ac e n<font color=Cyan>)</font> nt<font color=Cyan>)</font><font color=Red>]</font>-<a name="line-109"></a><font color=Blue>mkAttrDef</font> e <font color=Cyan>(</font>AttDef n <font color=Cyan>(</font>EnumeratedType <font color=Cyan>(</font>Enumeration es<font color=Cyan>)</font><font color=Cyan>)</font> <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red>=</font>-<a name="line-110"></a>    <font color=Red>[</font>EnumDef <font color=Cyan>(</font>name_a e n<font color=Cyan>)</font> <font color=Cyan>(</font>map <font color=Cyan>(</font>name_ac e n<font color=Cyan>)</font> es<font color=Cyan>)</font><font color=Red>]</font>-<a name="line-111"></a>        <font color=Blue>-- Default attribute values not handled here</font>-<a name="line-112"></a>-<a name="line-113"></a><a name="mkAttrField"></a><font color=Blue>mkAttrField</font> <font color=Red>::</font> String <font color=Red>-&gt;</font> AttDef <font color=Red>-&gt;</font> <font color=Cyan>(</font>Name<font color=Cyan>,</font>StructType<font color=Cyan>)</font>-<a name="line-114"></a><font color=Blue>mkAttrField</font> e <font color=Cyan>(</font>AttDef n typ req<font color=Cyan>)</font> <font color=Red>=</font> <font color=Cyan>(</font>name_f e n<font color=Cyan>,</font> mkType typ req<font color=Cyan>)</font>-<a name="line-115"></a>  <font color=Green><u>where</u></font>-<a name="line-116"></a>    mkType StringType REQUIRED <font color=Red>=</font> String-<a name="line-117"></a>    mkType StringType IMPLIED  <font color=Red>=</font> Maybe String-<a name="line-118"></a>    mkType StringType <font color=Cyan>(</font>DefaultTo v<font color=Red>@</font><font color=Cyan>(</font>AttValue <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red>=</font> Defaultable String <font color=Cyan>(</font>show v<font color=Cyan>)</font>-<a name="line-119"></a>    mkType <font color=Cyan>(</font>TokenizedType <font color=Green><u>_</u></font><font color=Cyan>)</font> REQUIRED  <font color=Red>=</font> String-<a name="line-120"></a>    mkType <font color=Cyan>(</font>TokenizedType <font color=Green><u>_</u></font><font color=Cyan>)</font> IMPLIED   <font color=Red>=</font> Maybe String-<a name="line-121"></a>    mkType <font color=Cyan>(</font>TokenizedType <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Cyan>(</font>DefaultTo v<font color=Red>@</font><font color=Cyan>(</font>AttValue <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red>=</font>-<a name="line-122"></a>                                                        Defaultable String <font color=Cyan>(</font>show v<font color=Cyan>)</font>-<a name="line-123"></a>    mkType <font color=Cyan>(</font>EnumeratedType <font color=Green><u>_</u></font><font color=Cyan>)</font> REQUIRED <font color=Red>=</font> Defined <font color=Cyan>(</font>name_a e n<font color=Cyan>)</font>-<a name="line-124"></a>    mkType <font color=Cyan>(</font>EnumeratedType <font color=Green><u>_</u></font><font color=Cyan>)</font> IMPLIED  <font color=Red>=</font> Maybe <font color=Cyan>(</font>Defined <font color=Cyan>(</font>name_a e n<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-125"></a>    mkType <font color=Cyan>(</font>EnumeratedType <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Cyan>(</font>DefaultTo v<font color=Red>@</font><font color=Cyan>(</font>AttValue <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red>=</font>-<a name="line-126"></a>                Defaultable <font color=Cyan>(</font>Defined <font color=Cyan>(</font>name_a e n<font color=Cyan>)</font><font color=Cyan>)</font> <font color=Cyan>(</font>hName <font color=Cyan>(</font>name_ac e n <font color=Cyan>(</font>show v<font color=Cyan>)</font><font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-127"></a>-</pre>-</body>-</html>
− docs/HaXml/src/Text/XML/HaXml/DtdToHaskell/Instance.html
@@ -1,405 +0,0 @@-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">-<html>-<head>-<!-- Generated by HsColour, http://www.cs.york.ac.uk/fp/darcs/hscolour/ -->-<title>src/Text/XML/HaXml/DtdToHaskell/Instance.hs</title>-</head>-<body>-<pre><a name="line-1"></a><font color=Green><u>module</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>DtdToHaskell<font color=Cyan>.</font>Instance-<a name="line-2"></a>  <font color=Cyan>(</font> mkInstance-<a name="line-3"></a>  <font color=Cyan>)</font> <font color=Green><u>where</u></font>-<a name="line-4"></a>-<a name="line-5"></a><font color=Green><u>import</u></font> List <font color=Cyan>(</font>intersperse<font color=Cyan>)</font>-<a name="line-6"></a>-<a name="line-7"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>DtdToHaskell<font color=Cyan>.</font>TypeDef-<a name="line-8"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>PrettyPrint<font color=Cyan>.</font>HughesPJ-<a name="line-9"></a>-<a name="line-10"></a><a name="mkInstance"></a><font color=Blue>-- | Convert typedef to appropriate instance declaration, either @XmlContent@,</font>-<a name="line-11"></a><font color=Blue>--   @XmlAttributes@, or @XmlAttrType@.</font>-<a name="line-12"></a><font color=Blue>mkInstance</font> <font color=Red>::</font> TypeDef <font color=Red>-&gt;</font> Doc-<a name="line-13"></a>-<a name="line-14"></a><font color=Blue>-- no constructors - represents an element with empty content but attributes.</font>-<a name="line-15"></a><font color=Blue>mkInstance</font> <font color=Cyan>(</font>DataDef <font color=Green><u>_</u></font> n fs []<font color=Cyan>)</font> <font color=Red>=</font>-<a name="line-16"></a>    <font color=Green><u>let</u></font> <font color=Cyan>(</font><font color=Green><u>_</u></font><font color=Cyan>,</font> frattr<font color=Cyan>,</font> topat<font color=Cyan>,</font> toattr<font color=Cyan>)</font> <font color=Red>=</font> attrpats fs-<a name="line-17"></a>        frretval <font color=Red>=</font> <font color=Green><u>if</u></font> null fs <font color=Green><u>then</u></font> ppHName n <font color=Green><u>else</u></font> frattr-<a name="line-18"></a>        topatval <font color=Red>=</font> <font color=Green><u>if</u></font> null fs <font color=Green><u>then</u></font> ppHName n <font color=Green><u>else</u></font> topat-<a name="line-19"></a>    <font color=Green><u>in</u></font>-<a name="line-20"></a>    text <font color=Magenta>"instance HTypeable"</font> <font color=Cyan>&lt;+&gt;</font> ppHName n <font color=Cyan>&lt;+&gt;</font> text <font color=Magenta>"where"</font> <font color=Cyan>$$</font>-<a name="line-21"></a>    nest <font color=Magenta>4</font> <font color=Cyan>(</font> text <font color=Magenta>"toHType x = Defined \""</font> <font color=Cyan>&lt;&gt;</font> ppXName n <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>"\" [] []"</font> <font color=Cyan>)</font>-<a name="line-22"></a>    <font color=Cyan>$$</font>-<a name="line-23"></a>    text <font color=Magenta>"instance XmlContent"</font> <font color=Cyan>&lt;+&gt;</font> ppHName n <font color=Cyan>&lt;+&gt;</font> text <font color=Magenta>"where"</font> <font color=Cyan>$$</font>-<a name="line-24"></a>    nest <font color=Magenta>4</font> <font color=Cyan>(</font>-<a name="line-25"></a>             text <font color=Magenta>"toContents"</font> <font color=Cyan>&lt;+&gt;</font> topatval <font color=Cyan>&lt;+&gt;</font> text <font color=Magenta>"="</font> <font color=Cyan>$$</font>-<a name="line-26"></a>             nest <font color=Magenta>4</font> <font color=Cyan>(</font>text <font color=Magenta>"[CElem (Elem \""</font> <font color=Cyan>&lt;&gt;</font> ppXName n <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>"\""</font>-<a name="line-27"></a>                          <font color=Cyan>&lt;+&gt;</font> toattr <font color=Cyan>&lt;+&gt;</font> text <font color=Magenta>"[]) ()]"</font><font color=Cyan>)</font>-<a name="line-28"></a>           <font color=Cyan>$$</font>-<a name="line-29"></a>             text <font color=Magenta>"parseContents = do"</font> <font color=Cyan>$$</font>-<a name="line-30"></a>             nest <font color=Magenta>4</font> <font color=Cyan>(</font>text <font color=Magenta>"{ (Elem _ as []) &lt;- element [\""</font>-<a name="line-31"></a>                             <font color=Cyan>&lt;&gt;</font> ppXName n <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>"\"]"</font> <font color=Cyan>$$</font>-<a name="line-32"></a>                     text <font color=Magenta>"; return"</font> <font color=Cyan>&lt;+&gt;</font> frretval <font color=Cyan>$$</font>-<a name="line-33"></a>                     text <font color=Magenta>"} `adjustErr` (\"in &lt;"</font> <font color=Cyan>&lt;&gt;</font> ppXName n-<a name="line-34"></a>                                                  <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>"&gt;, \"++)"</font>-<a name="line-35"></a>                    <font color=Cyan>)</font>-<a name="line-36"></a>           <font color=Cyan>)</font>-<a name="line-37"></a>    <font color=Cyan>$$</font>-<a name="line-38"></a>    mkInstanceAttrs Same n fs-<a name="line-39"></a>-<a name="line-40"></a><font color=Blue>-- single constructor, "real" (non-auxiliary) type</font>-<a name="line-41"></a><font color=Blue>mkInstance</font> <font color=Cyan>(</font>DataDef False n fs <font color=Red>[</font><font color=Cyan>(</font>n0<font color=Cyan>,</font>sts<font color=Cyan>)</font><font color=Red>]</font><font color=Cyan>)</font> <font color=Red>=</font>-<a name="line-42"></a>    <font color=Green><u>let</u></font> vs <font color=Red>=</font> nameSupply sts-<a name="line-43"></a>        <font color=Cyan>(</font>frpat<font color=Cyan>,</font> frattr<font color=Cyan>,</font> topat<font color=Cyan>,</font> toattr<font color=Cyan>)</font> <font color=Red>=</font> attrpats fs-<a name="line-44"></a>    <font color=Green><u>in</u></font>-<a name="line-45"></a>    text <font color=Magenta>"instance HTypeable"</font> <font color=Cyan>&lt;+&gt;</font> ppHName n <font color=Cyan>&lt;+&gt;</font> text <font color=Magenta>"where"</font> <font color=Cyan>$$</font>-<a name="line-46"></a>    nest <font color=Magenta>4</font> <font color=Cyan>(</font> text <font color=Magenta>"toHType x = Defined \""</font> <font color=Cyan>&lt;&gt;</font> ppXName n <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>"\" [] []"</font> <font color=Cyan>)</font>-<a name="line-47"></a>    <font color=Cyan>$$</font>-<a name="line-48"></a>    text <font color=Magenta>"instance XmlContent"</font> <font color=Cyan>&lt;+&gt;</font> ppHName n <font color=Cyan>&lt;+&gt;</font> text <font color=Magenta>"where"</font> <font color=Cyan>$$</font>-<a name="line-49"></a>    nest <font color=Magenta>4</font> <font color=Cyan>(</font>-<a name="line-50"></a>             text <font color=Magenta>"toContents"</font> <font color=Cyan>&lt;+&gt;</font> parens <font color=Cyan>(</font>mkCpat n0 topat vs<font color=Cyan>)</font> <font color=Cyan>&lt;+&gt;</font> text <font color=Magenta>"="</font> <font color=Cyan>$$</font>-<a name="line-51"></a>             nest <font color=Magenta>4</font> <font color=Cyan>(</font>text <font color=Magenta>"[CElem (Elem \""</font> <font color=Cyan>&lt;&gt;</font> ppXName n <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>"\""</font>-<a name="line-52"></a>                          <font color=Cyan>&lt;+&gt;</font> toattr <font color=Cyan>&lt;+&gt;</font> parens <font color=Cyan>(</font>mkToElem sts vs<font color=Cyan>)</font>-<a name="line-53"></a>                          <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>") ()]"</font><font color=Cyan>)</font>-<a name="line-54"></a>           <font color=Cyan>$$</font>-<a name="line-55"></a>             text <font color=Magenta>"parseContents = do"</font> <font color=Cyan>$$</font>-<a name="line-56"></a>             nest <font color=Magenta>4</font> <font color=Cyan>(</font>text <font color=Magenta>"{ e@(Elem _"</font><font color=Cyan>&lt;+&gt;</font> frpat <font color=Cyan>&lt;+&gt;</font> text <font color=Magenta>"_) &lt;- element [\""</font>-<a name="line-57"></a>                             <font color=Cyan>&lt;&gt;</font> ppXName n <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>"\"]"</font>-<a name="line-58"></a>                     <font color=Cyan>$$</font> text <font color=Magenta>"; interior e $"</font>-<a name="line-59"></a>                           <font color=Cyan>&lt;+&gt;</font> <font color=Cyan>(</font>mkParseConstr frattr <font color=Cyan>(</font>n0<font color=Cyan>,</font>sts<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-60"></a>                     <font color=Cyan>$$</font> text <font color=Magenta>"} `adjustErr` (\"in &lt;"</font> <font color=Cyan>&lt;&gt;</font> ppXName n-<a name="line-61"></a>                                                     <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>"&gt;, \"++)"</font><font color=Cyan>)</font>-<a name="line-62"></a>           <font color=Cyan>)</font>-<a name="line-63"></a>    <font color=Cyan>$$</font>-<a name="line-64"></a>    mkInstanceAttrs Extended n fs-<a name="line-65"></a>-<a name="line-66"></a><font color=Blue>-- single constructor, auxiliary type (i.e. no corresponding element tag)</font>-<a name="line-67"></a><font color=Blue>--   cannot be attributes here?</font>-<a name="line-68"></a><font color=Blue>mkInstance</font> <font color=Cyan>(</font>DataDef True n [] <font color=Red>[</font><font color=Cyan>(</font>n0<font color=Cyan>,</font>sts<font color=Cyan>)</font><font color=Red>]</font><font color=Cyan>)</font> <font color=Red>=</font>-<a name="line-69"></a>    <font color=Green><u>let</u></font> vs <font color=Red>=</font> nameSupply sts-<a name="line-70"></a>    <font color=Green><u>in</u></font>-<a name="line-71"></a>    text <font color=Magenta>"instance HTypeable"</font> <font color=Cyan>&lt;+&gt;</font> ppHName n <font color=Cyan>&lt;+&gt;</font> text <font color=Magenta>"where"</font> <font color=Cyan>$$</font>-<a name="line-72"></a>    nest <font color=Magenta>4</font> <font color=Cyan>(</font> text <font color=Magenta>"toHType x = Defined \""</font> <font color=Cyan>&lt;&gt;</font> ppXName n <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>"\" [] []"</font> <font color=Cyan>)</font>-<a name="line-73"></a>    <font color=Cyan>$$</font>-<a name="line-74"></a>    text <font color=Magenta>"instance XmlContent"</font> <font color=Cyan>&lt;+&gt;</font> ppHName n <font color=Cyan>&lt;+&gt;</font> text <font color=Magenta>"where"</font> <font color=Cyan>$$</font>-<a name="line-75"></a>    nest <font color=Magenta>4</font> <font color=Cyan>(</font> text <font color=Magenta>"toContents"</font> <font color=Cyan>&lt;+&gt;</font> parens <font color=Cyan>(</font>mkCpat n0 empty vs<font color=Cyan>)</font>-<a name="line-76"></a>                               <font color=Cyan>&lt;+&gt;</font> text <font color=Magenta>"="</font>-<a name="line-77"></a>                               <font color=Cyan>$$</font>  nest <font color=Magenta>4</font> <font color=Cyan>(</font>parens <font color=Cyan>(</font>mkToElem sts vs<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-78"></a>           <font color=Cyan>$$</font>-<a name="line-79"></a>             text <font color=Magenta>"parseContents ="</font> <font color=Cyan>&lt;+&gt;</font> mkParseConstr empty <font color=Cyan>(</font>n0<font color=Cyan>,</font>sts<font color=Cyan>)</font>-<a name="line-80"></a>           <font color=Cyan>)</font>-<a name="line-81"></a>-<a name="line-82"></a><font color=Blue>-- multiple constructors (real)</font>-<a name="line-83"></a><font color=Blue>mkInstance</font> <font color=Cyan>(</font>DataDef False n fs cs<font color=Cyan>)</font> <font color=Red>=</font>-<a name="line-84"></a>    <font color=Green><u>let</u></font> <font color=Green><u>_</u></font> <font color=Red>=</font> nameSupply cs-<a name="line-85"></a>        <font color=Cyan>(</font>frpat<font color=Cyan>,</font> frattr<font color=Cyan>,</font> topat<font color=Cyan>,</font> toattr<font color=Cyan>)</font> <font color=Red>=</font> attrpats fs-<a name="line-86"></a>        <font color=Green><u>_</u></font> <font color=Red>=</font> <font color=Green><u>if</u></font> null fs <font color=Green><u>then</u></font> False <font color=Green><u>else</u></font> True-<a name="line-87"></a>    <font color=Green><u>in</u></font>-<a name="line-88"></a>    text <font color=Magenta>"instance HTypeable"</font> <font color=Cyan>&lt;+&gt;</font> ppHName n <font color=Cyan>&lt;+&gt;</font> text <font color=Magenta>"where"</font> <font color=Cyan>$$</font>-<a name="line-89"></a>    nest <font color=Magenta>4</font> <font color=Cyan>(</font> text <font color=Magenta>"toHType x = Defined \""</font> <font color=Cyan>&lt;&gt;</font> ppXName n <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>"\" [] []"</font> <font color=Cyan>)</font>-<a name="line-90"></a>    <font color=Cyan>$$</font>-<a name="line-91"></a>    text <font color=Magenta>"instance XmlContent"</font> <font color=Cyan>&lt;+&gt;</font> ppHName n <font color=Cyan>&lt;+&gt;</font> text <font color=Magenta>"where"</font> <font color=Cyan>$$</font>-<a name="line-92"></a>    nest <font color=Magenta>4</font> <font color=Cyan>(</font> vcat <font color=Cyan>(</font>map <font color=Cyan>(</font>mkToMult n topat toattr<font color=Cyan>)</font> cs<font color=Cyan>)</font>-<a name="line-93"></a>           <font color=Cyan>$$</font> text <font color=Magenta>"parseContents = do "</font>-<a name="line-94"></a>           <font color=Cyan>$$</font> nest <font color=Magenta>4</font> <font color=Cyan>(</font>text <font color=Magenta>"{ e@(Elem _"</font><font color=Cyan>&lt;+&gt;</font> frpat <font color=Cyan>&lt;+&gt;</font> text <font color=Magenta>"_) &lt;- element [\""</font>-<a name="line-95"></a>                                                  <font color=Cyan>&lt;&gt;</font> ppXName n <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>"\"]"</font>-<a name="line-96"></a>                     <font color=Cyan>$$</font> text <font color=Magenta>"; interior e $ oneOf"</font>-<a name="line-97"></a>                     <font color=Cyan>$$</font> nest <font color=Magenta>4</font> <font color=Cyan>(</font> text <font color=Magenta>"["</font> <font color=Cyan>&lt;+&gt;</font> mkParseConstr frattr <font color=Cyan>(</font>head cs<font color=Cyan>)</font>-<a name="line-98"></a>                               <font color=Cyan>$$</font> vcat <font color=Cyan>(</font>map <font color=Cyan>(</font><font color=Red>\</font>c<font color=Red>-&gt;</font> text <font color=Magenta>","</font> <font color=Cyan>&lt;+&gt;</font> mkParseConstr frattr c<font color=Cyan>)</font>-<a name="line-99"></a>                                            <font color=Cyan>(</font>tail cs<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-100"></a>                               <font color=Cyan>$$</font> text <font color=Magenta>"] `adjustErr` (\"in &lt;"</font> <font color=Cyan>&lt;&gt;</font> ppXName n-<a name="line-101"></a>                                                             <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>"&gt;, \"++)"</font>-<a name="line-102"></a>                               <font color=Cyan>)</font>-<a name="line-103"></a>                     <font color=Cyan>$$</font> text <font color=Magenta>"}"</font>-<a name="line-104"></a>                     <font color=Cyan>)</font>-<a name="line-105"></a>           <font color=Cyan>)</font>-<a name="line-106"></a>    <font color=Cyan>$$</font>-<a name="line-107"></a>    mkInstanceAttrs Extended n fs-<a name="line-108"></a>-<a name="line-109"></a><font color=Blue>-- multiple constructors (auxiliary)</font>-<a name="line-110"></a><font color=Blue>mkInstance</font> <font color=Cyan>(</font>DataDef True n fs cs<font color=Cyan>)</font> <font color=Red>=</font>-<a name="line-111"></a>    <font color=Green><u>let</u></font> <font color=Green><u>_</u></font> <font color=Red>=</font> nameSupply cs-<a name="line-112"></a>        <font color=Cyan>(</font><font color=Green><u>_</u></font><font color=Cyan>,</font> frattr<font color=Cyan>,</font> <font color=Green><u>_</u></font><font color=Cyan>,</font> <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red>=</font> attrpats fs-<a name="line-113"></a>        mixattrs <font color=Red>=</font> <font color=Green><u>if</u></font> null fs <font color=Green><u>then</u></font> False <font color=Green><u>else</u></font> True-<a name="line-114"></a>    <font color=Green><u>in</u></font>-<a name="line-115"></a>    text <font color=Magenta>"instance HTypeable"</font> <font color=Cyan>&lt;+&gt;</font> ppHName n <font color=Cyan>&lt;+&gt;</font> text <font color=Magenta>"where"</font> <font color=Cyan>$$</font>-<a name="line-116"></a>    nest <font color=Magenta>4</font> <font color=Cyan>(</font> text <font color=Magenta>"toHType x = Defined \""</font> <font color=Cyan>&lt;&gt;</font> ppXName n <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>"\" [] []"</font> <font color=Cyan>)</font>-<a name="line-117"></a>    <font color=Cyan>$$</font>-<a name="line-118"></a>    text <font color=Magenta>"instance XmlContent"</font> <font color=Cyan>&lt;+&gt;</font> ppHName n <font color=Cyan>&lt;+&gt;</font> text <font color=Magenta>"where"</font> <font color=Cyan>$$</font>-<a name="line-119"></a>    nest <font color=Magenta>4</font> <font color=Cyan>(</font> vcat <font color=Cyan>(</font>map <font color=Cyan>(</font>mkToAux mixattrs<font color=Cyan>)</font> cs<font color=Cyan>)</font>-<a name="line-120"></a>           <font color=Cyan>$$</font> text <font color=Magenta>"parseContents = oneOf"</font>-<a name="line-121"></a>           <font color=Cyan>$$</font> nest <font color=Magenta>4</font> <font color=Cyan>(</font> text <font color=Magenta>"["</font> <font color=Cyan>&lt;+&gt;</font> mkParseConstr frattr <font color=Cyan>(</font>head cs<font color=Cyan>)</font>-<a name="line-122"></a>                     <font color=Cyan>$$</font> vcat <font color=Cyan>(</font>map <font color=Cyan>(</font><font color=Red>\</font>c<font color=Red>-&gt;</font> text <font color=Magenta>","</font> <font color=Cyan>&lt;+&gt;</font> mkParseConstr frattr c<font color=Cyan>)</font>-<a name="line-123"></a>                                  <font color=Cyan>(</font>tail cs<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-124"></a>                     <font color=Cyan>$$</font> text <font color=Magenta>"] `adjustErr` (\"in &lt;"</font> <font color=Cyan>&lt;&gt;</font> ppXName n-<a name="line-125"></a>                                                     <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>"&gt;, \"++)"</font>-<a name="line-126"></a>                     <font color=Cyan>)</font>-<a name="line-127"></a>           <font color=Cyan>)</font>-<a name="line-128"></a>    <font color=Cyan>$$</font>-<a name="line-129"></a>    mkInstanceAttrs Extended n fs-<a name="line-130"></a>-<a name="line-131"></a><font color=Blue>-- enumeration of attribute values</font>-<a name="line-132"></a><font color=Blue>mkInstance</font> <font color=Cyan>(</font>EnumDef n es<font color=Cyan>)</font> <font color=Red>=</font>-<a name="line-133"></a>    text <font color=Magenta>"instance XmlAttrType"</font> <font color=Cyan>&lt;+&gt;</font> ppHName n <font color=Cyan>&lt;+&gt;</font> text <font color=Magenta>"where"</font> <font color=Cyan>$$</font>-<a name="line-134"></a>    nest <font color=Magenta>4</font> <font color=Cyan>(</font> text <font color=Magenta>"fromAttrToTyp n (n',v)"</font> <font color=Cyan>$$</font>-<a name="line-135"></a>             nest <font color=Magenta>4</font> <font color=Cyan>(</font>text <font color=Magenta>"| n==n'     = translate (attr2str v)"</font> <font color=Cyan>$$</font>-<a name="line-136"></a>                     text <font color=Magenta>"| otherwise = Nothing"</font><font color=Cyan>)</font> <font color=Cyan>$$</font>-<a name="line-137"></a>             nest <font color=Magenta>2</font> <font color=Cyan>(</font>text <font color=Magenta>"where"</font> <font color=Cyan>&lt;+&gt;</font> mkTranslate es<font color=Cyan>)</font>-<a name="line-138"></a>           <font color=Cyan>$$</font>-<a name="line-139"></a>             vcat <font color=Cyan>(</font>map mkToAttr es<font color=Cyan>)</font>-<a name="line-140"></a>           <font color=Cyan>)</font>-<a name="line-141"></a>-<a name="line-142"></a>-<a name="line-143"></a><a name="SameName"></a><font color=Green><u>data</u></font> SameName <font color=Red>=</font> Same <font color=Red>|</font> Extended-<a name="line-144"></a>-<a name="line-145"></a><a name="mkInstanceAttrs"></a><font color=Blue>mkInstanceAttrs</font>        <font color=Red>::</font> SameName <font color=Red>-&gt;</font> Name <font color=Red>-&gt;</font> AttrFields <font color=Red>-&gt;</font> Doc-<a name="line-146"></a><font color=Blue>mkInstanceAttrs</font> <font color=Green><u>_</u></font> <font color=Green><u>_</u></font> []  <font color=Red>=</font> empty-<a name="line-147"></a><font color=Blue>mkInstanceAttrs</font> s n fs  <font color=Red>=</font>-<a name="line-148"></a>    <font color=Green><u>let</u></font> ppName <font color=Red>=</font> <font color=Green><u>case</u></font> s <font color=Green><u>of</u></font> <font color=Cyan>{</font> Same<font color=Red>-&gt;</font> ppHName<font color=Cyan>;</font>  Extended<font color=Red>-&gt;</font> ppAName<font color=Cyan>;</font> <font color=Cyan>}</font>-<a name="line-149"></a>    <font color=Green><u>in</u></font>-<a name="line-150"></a>    text <font color=Magenta>"instance XmlAttributes"</font> <font color=Cyan>&lt;+&gt;</font> ppName n <font color=Cyan>&lt;+&gt;</font> text <font color=Magenta>"where"</font> <font color=Cyan>$$</font>-<a name="line-151"></a>    nest <font color=Magenta>4</font> <font color=Cyan>(</font> text <font color=Magenta>"fromAttrs as ="</font> <font color=Cyan>$$</font>-<a name="line-152"></a>             nest <font color=Magenta>4</font> <font color=Cyan>(</font> ppName n <font color=Cyan>$$</font>-<a name="line-153"></a>                      nest <font color=Magenta>2</font> <font color=Cyan>(</font>vcat <font color=Cyan>(</font><font color=Cyan>(</font>text <font color=Magenta>"{"</font> <font color=Cyan>&lt;+&gt;</font> mkFrFld n <font color=Cyan>(</font>head fs<font color=Cyan>)</font><font color=Cyan>)</font><font color=Red><b>:</b></font>-<a name="line-154"></a>                                     map <font color=Cyan>(</font><font color=Red>\</font>x<font color=Red>-&gt;</font> comma <font color=Cyan>&lt;+&gt;</font> mkFrFld n x<font color=Cyan>)</font> <font color=Cyan>(</font>tail fs<font color=Cyan>)</font><font color=Cyan>)</font> <font color=Cyan>$$</font>-<a name="line-155"></a>                              text <font color=Magenta>"}"</font><font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-156"></a>           <font color=Cyan>$$</font>-<a name="line-157"></a>             text <font color=Magenta>"toAttrs v = catMaybes "</font> <font color=Cyan>$$</font>-<a name="line-158"></a>             nest <font color=Magenta>4</font> <font color=Cyan>(</font>vcat <font color=Cyan>(</font><font color=Cyan>(</font>text <font color=Magenta>"["</font> <font color=Cyan>&lt;+&gt;</font> mkToFld <font color=Cyan>(</font>head fs<font color=Cyan>)</font><font color=Cyan>)</font><font color=Red><b>:</b></font>-<a name="line-159"></a>                           map <font color=Cyan>(</font><font color=Red>\</font>x<font color=Red>-&gt;</font> comma <font color=Cyan>&lt;+&gt;</font> mkToFld x<font color=Cyan>)</font> <font color=Cyan>(</font>tail fs<font color=Cyan>)</font><font color=Cyan>)</font> <font color=Cyan>$$</font>-<a name="line-160"></a>                     text <font color=Magenta>"]"</font><font color=Cyan>)</font>-<a name="line-161"></a>           <font color=Cyan>)</font>-<a name="line-162"></a>-<a name="line-163"></a>-<a name="line-164"></a><a name="attrpats"></a><font color=Blue>--                  respectively (frpat,frattr,topat,toattr)</font>-<a name="line-165"></a><font color=Blue>attrpats</font> <font color=Red>::</font> AttrFields <font color=Red>-&gt;</font> <font color=Cyan>(</font>Doc<font color=Cyan>,</font>Doc<font color=Cyan>,</font>Doc<font color=Cyan>,</font>Doc<font color=Cyan>)</font>-<a name="line-166"></a><font color=Blue>attrpats</font> fs <font color=Red>=</font>-<a name="line-167"></a>  <font color=Green><u>if</u></font> null fs <font color=Green><u>then</u></font> <font color=Cyan>(</font>text <font color=Magenta>"[]"</font><font color=Cyan>,</font> empty<font color=Cyan>,</font> empty<font color=Cyan>,</font> text <font color=Magenta>"[]"</font><font color=Cyan>)</font>-<a name="line-168"></a>  <font color=Green><u>else</u></font> <font color=Cyan>(</font>text <font color=Magenta>"as"</font><font color=Cyan>,</font> parens <font color=Cyan>(</font>text <font color=Magenta>"fromAttrs as"</font><font color=Cyan>)</font><font color=Cyan>,</font> text <font color=Magenta>"as"</font><font color=Cyan>,</font> parens <font color=Cyan>(</font>text <font color=Magenta>"toAttrs as"</font><font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-169"></a>-<a name="line-170"></a>-<a name="line-171"></a>-<a name="line-172"></a>-<a name="line-173"></a><font color=Blue>-- mkFrElem :: Name -&gt; [StructType] -&gt; [Doc] -&gt; Doc -&gt; Doc</font>-<a name="line-174"></a><font color=Blue>-- mkFrElem n sts vs inner =</font>-<a name="line-175"></a><font color=Blue>--     foldr (frElem n) inner (zip3 sts vs cvs)</font>-<a name="line-176"></a><font color=Blue>--   where</font>-<a name="line-177"></a><font color=Blue>--     cvs = let ns = nameSupply2 vs</font>-<a name="line-178"></a><font color=Blue>--           in zip ns (text "c0": init ns)</font>-<a name="line-179"></a><font color=Blue>--     frElem _ (st,v,(cvi,cvo)) inner =</font>-<a name="line-180"></a><font color=Blue>--         parens (text "\\" &lt;&gt; parens (v&lt;&gt;comma&lt;&gt;cvi) &lt;&gt; text "-&gt;" $$</font>-<a name="line-181"></a><font color=Blue>--                 nest 2 inner) $$</font>-<a name="line-182"></a><font color=Blue>--         parens (</font>-<a name="line-183"></a><font color=Blue>--           case st of</font>-<a name="line-184"></a><font color=Blue>--             (Maybe String)  -&gt; text "fromText" &lt;+&gt; cvo</font>-<a name="line-185"></a><font color=Blue>--             (Maybe _)       -&gt; text "fromElem" &lt;+&gt; cvo</font>-<a name="line-186"></a><font color=Blue>--             (List String)   -&gt; text "many fromText" &lt;+&gt; cvo</font>-<a name="line-187"></a><font color=Blue>--             (List _)        -&gt; text "many fromElem" &lt;+&gt; cvo</font>-<a name="line-188"></a><font color=Blue>--             (List1 s)       -&gt; text "definite fromElem"</font>-<a name="line-189"></a><font color=Blue>--                                &lt;+&gt; text "\"" &lt;&gt; text (show s)&lt;&gt; text "+\""</font>-<a name="line-190"></a><font color=Blue>--                                &lt;+&gt; text "\"" &lt;&gt; ppXName n &lt;&gt; text "\""</font>-<a name="line-191"></a><font color=Blue>--                                &lt;+&gt; cvo</font>-<a name="line-192"></a><font color=Blue>--             (Tuple ss)  -&gt; text "definite fromElem"</font>-<a name="line-193"></a><font color=Blue>--                            &lt;+&gt; text "\"(" &lt;&gt; hcat (intersperse (text ",")</font>-<a name="line-194"></a><font color=Blue>--                                                            (map (text.show) ss))</font>-<a name="line-195"></a><font color=Blue>--                                           &lt;&gt; text ")\""</font>-<a name="line-196"></a><font color=Blue>--                            &lt;+&gt; text "\"" &lt;&gt; ppXName n &lt;&gt; text "\""</font>-<a name="line-197"></a><font color=Blue>--                            &lt;+&gt; cvo</font>-<a name="line-198"></a><font color=Blue>--             (OneOf _)  -&gt; text "definite fromElem"</font>-<a name="line-199"></a><font color=Blue>--                            &lt;+&gt; text "\"OneOf\""</font>-<a name="line-200"></a><font color=Blue>--                            &lt;+&gt; text "\"" &lt;&gt; ppXName n &lt;&gt; text "\""</font>-<a name="line-201"></a><font color=Blue>--                            &lt;+&gt; cvo</font>-<a name="line-202"></a><font color=Blue>--             (String)    -&gt; text "definite fromText" &lt;+&gt; text "\"text\" \"" &lt;&gt;</font>-<a name="line-203"></a><font color=Blue>--                                                  ppXName n &lt;&gt; text "\"" &lt;+&gt; cvo</font>-<a name="line-204"></a><font color=Blue>--             (Any)       -&gt; text "definite fromElem" &lt;+&gt; text "\"ANY\" \"" &lt;&gt;</font>-<a name="line-205"></a><font color=Blue>--                                                  ppXName n &lt;&gt; text "\"" &lt;+&gt; cvo</font>-<a name="line-206"></a><font color=Blue>--             (Defined m) -&gt; text "definite fromElem" &lt;+&gt;</font>-<a name="line-207"></a><font color=Blue>--                                  text "\"&lt;" &lt;&gt; ppXName m &lt;&gt; text "&gt;\" \"" &lt;&gt;</font>-<a name="line-208"></a><font color=Blue>--                                                  ppXName m &lt;&gt; text "\"" &lt;+&gt; cvo</font>-<a name="line-209"></a><font color=Blue>--             (Defaultable _ _)  -&gt; text "nyi_fromElem_Defaultable" &lt;+&gt; cvo</font>-<a name="line-210"></a><font color=Blue>--           )</font>-<a name="line-211"></a>-<a name="line-212"></a><a name="mkParseConstr"></a><font color=Blue>--</font>-<a name="line-213"></a><font color=Blue>{--<a name="line-214"></a>mkParseContents :: Name -&gt; [StructType] -&gt; [Doc] -&gt; Doc -&gt; Doc-<a name="line-215"></a>mkParseContents n sts vs inner =-<a name="line-216"></a>    foldr (frElem n) inner (zip3 sts vs cvs)-<a name="line-217"></a>  where-<a name="line-218"></a>    cvs = let ns = nameSupply2 vs-<a name="line-219"></a>          in zip ns (text "c0": init ns)-<a name="line-220"></a>    frElem n (st,v,(cvi,cvo)) inner =-<a name="line-221"></a>        parens (text "\\" &lt;&gt; parens (v&lt;&gt;comma&lt;&gt;cvi) &lt;&gt; text "-&gt;" $$-<a name="line-222"></a>                nest 2 inner) $$-<a name="line-223"></a>        parens (-<a name="line-224"></a>          )-<a name="line-225"></a>-}</font>-<a name="line-226"></a><font color=Blue>mkParseConstr</font> <font color=Red>::</font> Doc <font color=Red>-&gt;</font> <font color=Cyan>(</font>Name<font color=Cyan>,</font> <font color=Red>[</font>StructType<font color=Red>]</font><font color=Cyan>)</font> <font color=Red>-&gt;</font> Doc-<a name="line-227"></a><font color=Blue>mkParseConstr</font> frattr <font color=Cyan>(</font>c<font color=Cyan>,</font>sts<font color=Cyan>)</font> <font color=Red>=</font>-<a name="line-228"></a>        fsep <font color=Cyan>(</font>text <font color=Magenta>"return"</font> <font color=Cyan>&lt;+&gt;</font> parens <font color=Cyan>(</font>ppHName c <font color=Cyan>&lt;+&gt;</font> frattr<font color=Cyan>)</font>-<a name="line-229"></a>             <font color=Red><b>:</b></font> map mkParseContents sts<font color=Cyan>)</font>-<a name="line-230"></a>-<a name="line-231"></a><a name="mkParseContents"></a><font color=Blue>mkParseContents</font> <font color=Red>::</font> StructType <font color=Red>-&gt;</font> Doc-<a name="line-232"></a><font color=Blue>mkParseContents</font> st <font color=Red>=</font>-<a name="line-233"></a>  <font color=Green><u>let</u></font> ap <font color=Red>=</font> text <font color=Magenta>"`apply`"</font> <font color=Green><u>in</u></font>-<a name="line-234"></a>          <font color=Green><u>case</u></font> st <font color=Green><u>of</u></font>-<a name="line-235"></a>            <font color=Cyan>(</font>Maybe String<font color=Cyan>)</font>  <font color=Red>-&gt;</font> ap <font color=Cyan>&lt;+&gt;</font> text <font color=Magenta>"optional text"</font>-<a name="line-236"></a>            <font color=Cyan>(</font>Maybe <font color=Green><u>_</u></font><font color=Cyan>)</font>       <font color=Red>-&gt;</font> ap <font color=Cyan>&lt;+&gt;</font> text <font color=Magenta>"optional parseContents"</font>-<a name="line-237"></a>            <font color=Cyan>(</font>List String<font color=Cyan>)</font>   <font color=Red>-&gt;</font> ap <font color=Cyan>&lt;+&gt;</font> text <font color=Magenta>"many text"</font>-<a name="line-238"></a>            <font color=Cyan>(</font>List <font color=Green><u>_</u></font><font color=Cyan>)</font>        <font color=Red>-&gt;</font> ap <font color=Cyan>&lt;+&gt;</font> text <font color=Magenta>"many parseContents"</font>-<a name="line-239"></a>            <font color=Cyan>(</font>List1 <font color=Green><u>_</u></font><font color=Cyan>)</font>       <font color=Red>-&gt;</font> ap <font color=Cyan>&lt;+&gt;</font> text <font color=Magenta>"parseContents"</font>-<a name="line-240"></a>            <font color=Cyan>(</font>Tuple <font color=Green><u>_</u></font><font color=Cyan>)</font>      <font color=Red>-&gt;</font> ap <font color=Cyan>&lt;+&gt;</font> text <font color=Magenta>"parseContents"</font>-<a name="line-241"></a>            <font color=Cyan>(</font>OneOf <font color=Green><u>_</u></font><font color=Cyan>)</font>      <font color=Red>-&gt;</font> ap <font color=Cyan>&lt;+&gt;</font> text <font color=Magenta>"parseContents"</font>-<a name="line-242"></a>            <font color=Cyan>(</font>String<font color=Cyan>)</font>        <font color=Red>-&gt;</font> ap <font color=Cyan>&lt;+&gt;</font> text <font color=Magenta>"(text `onFail` return \"\")"</font>-<a name="line-243"></a>            <font color=Cyan>(</font>Any<font color=Cyan>)</font>           <font color=Red>-&gt;</font> ap <font color=Cyan>&lt;+&gt;</font> text <font color=Magenta>"parseContents"</font>-<a name="line-244"></a>            <font color=Cyan>(</font>Defined <font color=Green><u>_</u></font><font color=Cyan>)</font>     <font color=Red>-&gt;</font> ap <font color=Cyan>&lt;+&gt;</font> text <font color=Magenta>"parseContents"</font>-<a name="line-245"></a>            <font color=Cyan>(</font>Defaultable <font color=Green><u>_</u></font> <font color=Green><u>_</u></font><font color=Cyan>)</font>  <font color=Red>-&gt;</font> ap <font color=Cyan>&lt;+&gt;</font> text <font color=Magenta>"nyi_fromElem_Defaultable"</font>-<a name="line-246"></a>-<a name="line-247"></a><a name="mkToElem"></a><font color=Blue>--</font>-<a name="line-248"></a><font color=Blue>mkToElem</font> <font color=Red>::</font> <font color=Red>[</font>StructType<font color=Red>]</font> <font color=Red>-&gt;</font> <font color=Red>[</font>Doc<font color=Red>]</font> <font color=Red>-&gt;</font> Doc-<a name="line-249"></a><font color=Blue>mkToElem</font> []  [] <font color=Red>=</font> text <font color=Magenta>"[]"</font>-<a name="line-250"></a><font color=Blue>mkToElem</font> sts vs <font color=Red>=</font>-<a name="line-251"></a>    fsep <font color=Cyan>(</font>intersperse <font color=Cyan>(</font>text <font color=Magenta>"++"</font><font color=Cyan>)</font> <font color=Cyan>(</font>zipWith toElem sts vs<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-252"></a>  <font color=Green><u>where</u></font>-<a name="line-253"></a>    toElem st v <font color=Red>=</font>-<a name="line-254"></a>      <font color=Green><u>case</u></font> st <font color=Green><u>of</u></font>-<a name="line-255"></a>        <font color=Cyan>(</font>Maybe String<font color=Cyan>)</font>  <font color=Red>-&gt;</font> text <font color=Magenta>"maybe [] toText"</font> <font color=Cyan>&lt;+&gt;</font> v-<a name="line-256"></a>        <font color=Cyan>(</font>Maybe <font color=Green><u>_</u></font><font color=Cyan>)</font>       <font color=Red>-&gt;</font> text <font color=Magenta>"maybe [] toContents"</font> <font color=Cyan>&lt;+&gt;</font> v-<a name="line-257"></a>        <font color=Cyan>(</font>List String<font color=Cyan>)</font>   <font color=Red>-&gt;</font> text <font color=Magenta>"concatMap toText"</font> <font color=Cyan>&lt;+&gt;</font> v-<a name="line-258"></a>        <font color=Cyan>(</font>List <font color=Green><u>_</u></font><font color=Cyan>)</font>        <font color=Red>-&gt;</font> text <font color=Magenta>"concatMap toContents"</font> <font color=Cyan>&lt;+&gt;</font> v-<a name="line-259"></a>        <font color=Cyan>(</font>List1 <font color=Green><u>_</u></font><font color=Cyan>)</font>       <font color=Red>-&gt;</font> text <font color=Magenta>"toContents"</font> <font color=Cyan>&lt;+&gt;</font> v-<a name="line-260"></a>        <font color=Cyan>(</font>Tuple <font color=Green><u>_</u></font><font color=Cyan>)</font>      <font color=Red>-&gt;</font> text <font color=Magenta>"toContents"</font> <font color=Cyan>&lt;+&gt;</font> v-<a name="line-261"></a>        <font color=Cyan>(</font>OneOf <font color=Green><u>_</u></font><font color=Cyan>)</font>      <font color=Red>-&gt;</font> text <font color=Magenta>"toContents"</font> <font color=Cyan>&lt;+&gt;</font> v-<a name="line-262"></a>        <font color=Cyan>(</font>String<font color=Cyan>)</font>        <font color=Red>-&gt;</font> text <font color=Magenta>"toText"</font> <font color=Cyan>&lt;+&gt;</font> v-<a name="line-263"></a>        <font color=Cyan>(</font>Any<font color=Cyan>)</font>           <font color=Red>-&gt;</font> text <font color=Magenta>"toContents"</font> <font color=Cyan>&lt;+&gt;</font> v-<a name="line-264"></a>        <font color=Cyan>(</font>Defined <font color=Green><u>_</u></font><font color=Cyan>)</font>     <font color=Red>-&gt;</font> text <font color=Magenta>"toContents"</font> <font color=Cyan>&lt;+&gt;</font> v-<a name="line-265"></a>        <font color=Cyan>(</font>Defaultable <font color=Green><u>_</u></font> <font color=Green><u>_</u></font><font color=Cyan>)</font>  <font color=Red>-&gt;</font> text <font color=Magenta>"nyi_toElem_Defaultable"</font> <font color=Cyan>&lt;+&gt;</font> v-<a name="line-266"></a>-<a name="line-267"></a><font color=Blue>-- mkRpat :: [Doc] -&gt; Doc</font>-<a name="line-268"></a><font color=Blue>-- mkRpat [v] = v</font>-<a name="line-269"></a><font color=Blue>-- mkRpat vs  = (parens . hcat . intersperse comma) vs</font>-<a name="line-270"></a>-<a name="line-271"></a><a name="mkCpat"></a><font color=Blue>mkCpat</font> <font color=Red>::</font> Name <font color=Red>-&gt;</font> Doc <font color=Red>-&gt;</font> <font color=Red>[</font>Doc<font color=Red>]</font> <font color=Red>-&gt;</font> Doc-<a name="line-272"></a><font color=Blue>mkCpat</font> n i vs <font color=Red>=</font> ppHName n <font color=Cyan>&lt;+&gt;</font> i <font color=Cyan>&lt;+&gt;</font> fsep vs-<a name="line-273"></a>-<a name="line-274"></a><a name="nameSupply"></a><font color=Blue>nameSupply</font> <font color=Red>::</font> <font color=Red>[</font>b<font color=Red>]</font> <font color=Red>-&gt;</font> <font color=Red>[</font>Doc<font color=Red>]</font>-<a name="line-275"></a><font color=Blue>nameSupply</font>  ss <font color=Red>=</font> take <font color=Cyan>(</font>length ss<font color=Cyan>)</font> <font color=Cyan>(</font>map char <font color=Red>[</font><font color=Magenta>'a'</font><font color=Red>..</font><font color=Magenta>'z'</font><font color=Red>]</font>-<a name="line-276"></a>                                  <font color=Cyan>++</font> map text <font color=Red>[</font> a<font color=Red><b>:</b></font>n<font color=Red><b>:</b></font>[] <font color=Red>|</font> n <font color=Red>&lt;-</font> <font color=Red>[</font><font color=Magenta>'0'</font><font color=Red>..</font><font color=Magenta>'9'</font><font color=Red>]</font>-<a name="line-277"></a>                                                       <font color=Cyan>,</font> a <font color=Red>&lt;-</font> <font color=Red>[</font><font color=Magenta>'a'</font><font color=Red>..</font><font color=Magenta>'z'</font><font color=Red>]</font> <font color=Red>]</font><font color=Cyan>)</font>-<a name="line-278"></a><font color=Blue>-- nameSupply2 ss = take (length ss) [ text ('c':v:[]) | v &lt;- ['a'..]]</font>-<a name="line-279"></a>-<a name="line-280"></a><a name="mkTranslate"></a><font color=Blue>mkTranslate</font> <font color=Red>::</font> <font color=Red>[</font>Name<font color=Red>]</font> <font color=Red>-&gt;</font> Doc-<a name="line-281"></a><font color=Blue>mkTranslate</font> es <font color=Red>=</font>-<a name="line-282"></a>    vcat <font color=Cyan>(</font>map trans es<font color=Cyan>)</font> <font color=Cyan>$$</font>-<a name="line-283"></a>    text <font color=Magenta>"translate _ = Nothing"</font>-<a name="line-284"></a>  <font color=Green><u>where</u></font>-<a name="line-285"></a>    trans n <font color=Red>=</font> text <font color=Magenta>"translate \""</font> <font color=Cyan>&lt;&gt;</font> ppXName n <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>"\" ="</font> <font color=Cyan>&lt;+&gt;</font>-<a name="line-286"></a>              text <font color=Magenta>"Just"</font> <font color=Cyan>&lt;+&gt;</font> ppHName n-<a name="line-287"></a>-<a name="line-288"></a><a name="mkToAttr"></a><font color=Blue>mkToAttr</font> <font color=Red>::</font> Name <font color=Red>-&gt;</font> Doc-<a name="line-289"></a><font color=Blue>mkToAttr</font> n <font color=Red>=</font> text <font color=Magenta>"toAttrFrTyp n"</font> <font color=Cyan>&lt;+&gt;</font> ppHName n <font color=Cyan>&lt;+&gt;</font> text <font color=Magenta>"="</font> <font color=Cyan>&lt;+&gt;</font>-<a name="line-290"></a>             text <font color=Magenta>"Just (n, str2attr"</font> <font color=Cyan>&lt;+&gt;</font> doubleQuotes <font color=Cyan>(</font>ppXName n<font color=Cyan>)</font> <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>")"</font>-<a name="line-291"></a>-<a name="line-292"></a><a name="mkFrFld"></a><font color=Blue>mkFrFld</font> <font color=Red>::</font> Name <font color=Red>-&gt;</font> <font color=Cyan>(</font>Name<font color=Cyan>,</font>StructType<font color=Cyan>)</font> <font color=Red>-&gt;</font> Doc-<a name="line-293"></a><font color=Blue>mkFrFld</font> tag <font color=Cyan>(</font>n<font color=Cyan>,</font>st<font color=Cyan>)</font> <font color=Red>=</font>-<a name="line-294"></a>    ppHName n <font color=Cyan>&lt;+&gt;</font> text <font color=Magenta>"="</font> <font color=Cyan>&lt;+&gt;</font>-<a name="line-295"></a>    <font color=Cyan>(</font> <font color=Green><u>case</u></font> st <font color=Green><u>of</u></font>-<a name="line-296"></a>        <font color=Cyan>(</font>Defaultable String s<font color=Cyan>)</font> <font color=Red>-&gt;</font> text <font color=Magenta>"defaultA fromAttrToStr"</font> <font color=Cyan>&lt;+&gt;</font>-<a name="line-297"></a>                                                 doubleQuotes <font color=Cyan>(</font>text s<font color=Cyan>)</font>-<a name="line-298"></a>        <font color=Cyan>(</font>Defaultable <font color=Green><u>_</u></font> s<font color=Cyan>)</font>      <font color=Red>-&gt;</font> text <font color=Magenta>"defaultA fromAttrToTyp"</font> <font color=Cyan>&lt;+&gt;</font> text s-<a name="line-299"></a>        <font color=Cyan>(</font>Maybe String<font color=Cyan>)</font>         <font color=Red>-&gt;</font> text <font color=Magenta>"possibleA fromAttrToStr"</font>-<a name="line-300"></a>        <font color=Cyan>(</font>Maybe <font color=Green><u>_</u></font><font color=Cyan>)</font>              <font color=Red>-&gt;</font> text <font color=Magenta>"possibleA fromAttrToTyp"</font>-<a name="line-301"></a>        String                 <font color=Red>-&gt;</font> text <font color=Magenta>"definiteA fromAttrToStr"</font> <font color=Cyan>&lt;+&gt;</font>-<a name="line-302"></a>                                                 doubleQuotes <font color=Cyan>(</font>ppXName tag<font color=Cyan>)</font>-<a name="line-303"></a>        <font color=Green><u>_</u></font>                      <font color=Red>-&gt;</font> text <font color=Magenta>"definiteA fromAttrToTyp"</font> <font color=Cyan>&lt;+&gt;</font>-<a name="line-304"></a>                                                 doubleQuotes <font color=Cyan>(</font>ppXName tag<font color=Cyan>)</font>-<a name="line-305"></a>    <font color=Cyan>)</font> <font color=Cyan>&lt;+&gt;</font> doubleQuotes <font color=Cyan>(</font>ppXName n<font color=Cyan>)</font> <font color=Cyan>&lt;+&gt;</font> text <font color=Magenta>"as"</font>-<a name="line-306"></a>-<a name="line-307"></a><a name="mkToFld"></a><font color=Blue>mkToFld</font> <font color=Red>::</font> <font color=Cyan>(</font>Name<font color=Cyan>,</font>StructType<font color=Cyan>)</font> <font color=Red>-&gt;</font> Doc-<a name="line-308"></a><font color=Blue>mkToFld</font> <font color=Cyan>(</font>n<font color=Cyan>,</font>st<font color=Cyan>)</font> <font color=Red>=</font>-<a name="line-309"></a>    <font color=Cyan>(</font> <font color=Green><u>case</u></font> st <font color=Green><u>of</u></font>-<a name="line-310"></a>        <font color=Cyan>(</font>Defaultable String <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red>-&gt;</font> text <font color=Magenta>"defaultToAttr toAttrFrStr"</font>-<a name="line-311"></a>        <font color=Cyan>(</font>Defaultable <font color=Green><u>_</u></font> <font color=Green><u>_</u></font><font color=Cyan>)</font>      <font color=Red>-&gt;</font> text <font color=Magenta>"defaultToAttr toAttrFrTyp"</font>-<a name="line-312"></a>        <font color=Cyan>(</font>Maybe String<font color=Cyan>)</font>         <font color=Red>-&gt;</font> text <font color=Magenta>"maybeToAttr toAttrFrStr"</font>-<a name="line-313"></a>        <font color=Cyan>(</font>Maybe <font color=Green><u>_</u></font><font color=Cyan>)</font>              <font color=Red>-&gt;</font> text <font color=Magenta>"maybeToAttr toAttrFrTyp"</font>-<a name="line-314"></a>        String                 <font color=Red>-&gt;</font> text <font color=Magenta>"toAttrFrStr"</font>-<a name="line-315"></a>        <font color=Green><u>_</u></font>                      <font color=Red>-&gt;</font> text <font color=Magenta>"toAttrFrTyp"</font>-<a name="line-316"></a>    <font color=Cyan>)</font> <font color=Cyan>&lt;+&gt;</font> doubleQuotes <font color=Cyan>(</font>ppXName n<font color=Cyan>)</font> <font color=Cyan>&lt;+&gt;</font> parens <font color=Cyan>(</font>ppHName n <font color=Cyan>&lt;+&gt;</font> text <font color=Magenta>"v"</font><font color=Cyan>)</font>-<a name="line-317"></a>-<a name="line-318"></a><font color=Blue>-- mkFrAux :: Bool -&gt; Doc -&gt; [(Name,[StructType])] -&gt; Doc</font>-<a name="line-319"></a><font color=Blue>-- mkFrAux keeprest attrs cs = foldr frAux inner cs</font>-<a name="line-320"></a><font color=Blue>--   where</font>-<a name="line-321"></a><font color=Blue>--     inner = text "(Nothing, c0)"</font>-<a name="line-322"></a><font color=Blue>--     rest  = if keeprest then text "rest" else text "_"</font>-<a name="line-323"></a><font color=Blue>--     frAux (n,sts) innr =</font>-<a name="line-324"></a><font color=Blue>--         let vs  = nameSupply sts in</font>-<a name="line-325"></a><font color=Blue>--         nest 4 (text "case" &lt;+&gt; blah sts vs &lt;+&gt; text "of" $$</font>-<a name="line-326"></a><font color=Blue>--                 succpat sts vs &lt;+&gt; text "-&gt; (Just" &lt;+&gt;</font>-<a name="line-327"></a><font color=Blue>--                                    parens (mkCpat n attrs vs) &lt;&gt; text ", rest)"</font>-<a name="line-328"></a><font color=Blue>--                 $$</font>-<a name="line-329"></a><font color=Blue>--                 failpat sts &lt;+&gt; text "-&gt;" $$ nest 4 innr</font>-<a name="line-330"></a><font color=Blue>--                )</font>-<a name="line-331"></a><font color=Blue>--     blah [st] [_] =</font>-<a name="line-332"></a><font color=Blue>--         blahblahblah st (text "c0")</font>-<a name="line-333"></a><font color=Blue>--     blah sts vs =</font>-<a name="line-334"></a><font color=Blue>--         let ns = nameSupply2 vs</font>-<a name="line-335"></a><font color=Blue>--             cvs = zip ns (text "c0": init ns)</font>-<a name="line-336"></a><font color=Blue>--             blahblah (st,v,(cvi,cvo)) innr =</font>-<a name="line-337"></a><font color=Blue>--                 parens (text "\\" &lt;&gt; parens (v&lt;&gt;comma&lt;&gt;cvi) &lt;&gt; text "-&gt;" $$</font>-<a name="line-338"></a><font color=Blue>--                         nest 2 innr) $$</font>-<a name="line-339"></a><font color=Blue>--                 blahblahblah st cvo</font>-<a name="line-340"></a><font color=Blue>--         in</font>-<a name="line-341"></a><font color=Blue>--         foldr blahblah (mkRpat (vs++[last ns])) (zip3 sts vs cvs)</font>-<a name="line-342"></a><font color=Blue>--     blahblahblah st cvo = parens (</font>-<a name="line-343"></a><font color=Blue>--         case st of</font>-<a name="line-344"></a><font color=Blue>--           (Maybe String) -&gt; text "fromText" &lt;+&gt; cvo</font>-<a name="line-345"></a><font color=Blue>--           (Maybe _)      -&gt; text "fromElem" &lt;+&gt; cvo</font>-<a name="line-346"></a><font color=Blue>--           (List String)  -&gt; text "many fromText" &lt;+&gt; cvo</font>-<a name="line-347"></a><font color=Blue>--           (List _)       -&gt; text "many fromElem" &lt;+&gt; cvo</font>-<a name="line-348"></a><font color=Blue>--           (List1 _)      -&gt; text "fromElem" &lt;+&gt; cvo</font>-<a name="line-349"></a><font color=Blue>--           (Tuple _)     -&gt; text "fromElem" &lt;+&gt; cvo      -- ??</font>-<a name="line-350"></a><font color=Blue>--           (OneOf _)     -&gt; text "fromElem" &lt;+&gt; cvo</font>-<a name="line-351"></a><font color=Blue>--           (String)       -&gt; text "fromText" &lt;+&gt; cvo</font>-<a name="line-352"></a><font color=Blue>--           (Any)          -&gt; text "fromElem" &lt;+&gt; cvo</font>-<a name="line-353"></a><font color=Blue>--           (Defined _)    -&gt; text "fromElem" &lt;+&gt; cvo</font>-<a name="line-354"></a><font color=Blue>--         )</font>-<a name="line-355"></a><font color=Blue>--     failpat sts =</font>-<a name="line-356"></a><font color=Blue>--         let fp st =</font>-<a name="line-357"></a><font color=Blue>--                 case st of</font>-<a name="line-358"></a><font color=Blue>--                   (Maybe _)   -&gt; text "Nothing"</font>-<a name="line-359"></a><font color=Blue>--                   (List _)    -&gt; text "[]"</font>-<a name="line-360"></a><font color=Blue>--                   (List1 _)   -&gt; text "_"</font>-<a name="line-361"></a><font color=Blue>--                   (Tuple _)  -&gt; text "_"</font>-<a name="line-362"></a><font color=Blue>--                   (OneOf _)  -&gt; text "_"</font>-<a name="line-363"></a><font color=Blue>--                   (String)    -&gt; text "_"</font>-<a name="line-364"></a><font color=Blue>--                   (Any)       -&gt; text "_"</font>-<a name="line-365"></a><font color=Blue>--                   (Defined _) -&gt; text "_"</font>-<a name="line-366"></a><font color=Blue>--         in parens (hcat (intersperse comma (map fp sts++[text "_"])))</font>-<a name="line-367"></a><font color=Blue>--     succpat sts vs =</font>-<a name="line-368"></a><font color=Blue>--         let sp st v =</font>-<a name="line-369"></a><font color=Blue>--                 case st of</font>-<a name="line-370"></a><font color=Blue>--                   (Maybe _)   -&gt; v</font>-<a name="line-371"></a><font color=Blue>--                   (List _)    -&gt; v</font>-<a name="line-372"></a><font color=Blue>--                   (List1 _)   -&gt; text "Just" &lt;+&gt; v</font>-<a name="line-373"></a><font color=Blue>--                   (Tuple _)  -&gt; text "Just" &lt;+&gt; v</font>-<a name="line-374"></a><font color=Blue>--                   (OneOf _)  -&gt; text "Just" &lt;+&gt; v</font>-<a name="line-375"></a><font color=Blue>--                   (String)    -&gt; text "Just" &lt;+&gt; v</font>-<a name="line-376"></a><font color=Blue>--                   (Any)       -&gt; text "Just" &lt;+&gt; v</font>-<a name="line-377"></a><font color=Blue>--                   (Defined _) -&gt; text "Just" &lt;+&gt; v</font>-<a name="line-378"></a><font color=Blue>--         in parens (hcat (intersperse comma (zipWith sp sts vs++[rest])))</font>-<a name="line-379"></a>-<a name="line-380"></a><a name="mkToAux"></a><font color=Blue>mkToAux</font> <font color=Red>::</font> Bool <font color=Red>-&gt;</font> <font color=Cyan>(</font>Name<font color=Cyan>,</font><font color=Red>[</font>StructType<font color=Red>]</font><font color=Cyan>)</font> <font color=Red>-&gt;</font> Doc-<a name="line-381"></a><font color=Blue>mkToAux</font> mixattrs <font color=Cyan>(</font>n<font color=Cyan>,</font>sts<font color=Cyan>)</font> <font color=Red>=</font>-<a name="line-382"></a>    <font color=Green><u>let</u></font> vs <font color=Red>=</font> nameSupply sts-<a name="line-383"></a>        attrs <font color=Red>=</font> <font color=Green><u>if</u></font> mixattrs <font color=Green><u>then</u></font> text <font color=Magenta>"as"</font> <font color=Green><u>else</u></font> empty-<a name="line-384"></a>    <font color=Green><u>in</u></font>-<a name="line-385"></a>    text <font color=Magenta>"toContents"</font> <font color=Cyan>&lt;+&gt;</font> parens <font color=Cyan>(</font>mkCpat n attrs vs<font color=Cyan>)</font> <font color=Cyan>&lt;+&gt;</font> text <font color=Magenta>"="</font> <font color=Cyan>&lt;+&gt;</font>-<a name="line-386"></a>    mkToElem sts vs-<a name="line-387"></a>-<a name="line-388"></a><a name="mkToMult"></a><font color=Blue>mkToMult</font> <font color=Red>::</font> Name <font color=Red>-&gt;</font> Doc <font color=Red>-&gt;</font> Doc <font color=Red>-&gt;</font> <font color=Cyan>(</font>Name<font color=Cyan>,</font><font color=Red>[</font>StructType<font color=Red>]</font><font color=Cyan>)</font> <font color=Red>-&gt;</font> Doc-<a name="line-389"></a><font color=Blue>mkToMult</font> tag attrpat attrexp <font color=Cyan>(</font>n<font color=Cyan>,</font>sts<font color=Cyan>)</font> <font color=Red>=</font>-<a name="line-390"></a>    <font color=Green><u>let</u></font> vs <font color=Red>=</font> nameSupply sts-<a name="line-391"></a>    <font color=Green><u>in</u></font>-<a name="line-392"></a>    text <font color=Magenta>"toContents"</font> <font color=Cyan>&lt;+&gt;</font> parens <font color=Cyan>(</font>mkCpat n attrpat vs<font color=Cyan>)</font> <font color=Cyan>&lt;+&gt;</font> text <font color=Magenta>"="</font>-<a name="line-393"></a>    <font color=Cyan>$$</font> nest <font color=Magenta>4</font> <font color=Cyan>(</font>text <font color=Magenta>"[CElem (Elem \""</font> <font color=Cyan>&lt;&gt;</font> ppXName tag <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>"\""</font><font color=Cyan>&lt;+&gt;</font> attrexp-<a name="line-394"></a>              <font color=Cyan>&lt;+&gt;</font> parens <font color=Cyan>(</font>mkToElem sts vs<font color=Cyan>)</font> <font color=Cyan>&lt;+&gt;</font> text <font color=Magenta>") ()]"</font><font color=Cyan>)</font>-<a name="line-395"></a>-</pre>-</body>-</html>
− docs/HaXml/src/Text/XML/HaXml/DtdToHaskell/TypeDef.html
@@ -1,258 +0,0 @@-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">-<html>-<head>-<!-- Generated by HsColour, http://www.cs.york.ac.uk/fp/darcs/hscolour/ -->-<title>src/Text/XML/HaXml/DtdToHaskell/TypeDef.hs</title>-</head>-<body>-<pre><a name="line-1"></a><font color=Blue>-- | Defines an internal representation of Haskell data\/newtype definitions</font>-<a name="line-2"></a><font color=Blue>--   that correspond to the XML DTD types, and provides pretty-printers to</font>-<a name="line-3"></a><font color=Blue>--   convert these types into the 'Doc' type of "Text.PrettyPrint.HughesPJ".</font>-<a name="line-4"></a>-<a name="line-5"></a><font color=Green><u>module</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>DtdToHaskell<font color=Cyan>.</font>TypeDef-<a name="line-6"></a>  <font color=Cyan>(</font> <font color=Blue>-- * Internal representation of types</font>-<a name="line-7"></a>    TypeDef<font color=Cyan>(</font><font color=Red>..</font><font color=Cyan>)</font>-<a name="line-8"></a>  <font color=Cyan>,</font> Constructors-<a name="line-9"></a>  <font color=Cyan>,</font> AttrFields-<a name="line-10"></a>  <font color=Cyan>,</font> StructType<font color=Cyan>(</font><font color=Red>..</font><font color=Cyan>)</font>-<a name="line-11"></a>  <font color=Blue>-- * Pretty-print a TypeDef</font>-<a name="line-12"></a>  <font color=Cyan>,</font> ppTypeDef-<a name="line-13"></a>  <font color=Cyan>,</font> ppHName-<a name="line-14"></a>  <font color=Cyan>,</font> ppXName-<a name="line-15"></a>  <font color=Cyan>,</font> ppAName-<a name="line-16"></a>  <font color=Blue>-- * Name mangling</font>-<a name="line-17"></a>  <font color=Cyan>,</font> Name<font color=Cyan>(</font><font color=Red>..</font><font color=Cyan>)</font>-<a name="line-18"></a>  <font color=Cyan>,</font> name<font color=Cyan>,</font> name_<font color=Cyan>,</font> name_a<font color=Cyan>,</font> name_ac<font color=Cyan>,</font> name_f<font color=Cyan>,</font> mangle<font color=Cyan>,</font> manglef-<a name="line-19"></a>  <font color=Cyan>)</font> <font color=Green><u>where</u></font>-<a name="line-20"></a>-<a name="line-21"></a><font color=Green><u>import</u></font> Char <font color=Cyan>(</font>isLower<font color=Cyan>,</font> isUpper<font color=Cyan>,</font> toLower<font color=Cyan>,</font> toUpper<font color=Cyan>,</font> isDigit<font color=Cyan>)</font>-<a name="line-22"></a><font color=Green><u>import</u></font> List <font color=Cyan>(</font>intersperse<font color=Cyan>)</font>-<a name="line-23"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>PrettyPrint<font color=Cyan>.</font>HughesPJ-<a name="line-24"></a>-<a name="line-25"></a>-<a name="line-26"></a><font color=Blue>---- Internal representation for typedefs ----</font>-<a name="line-27"></a>-<a name="line-28"></a><a name="Name"></a><font color=Blue>-- | Need to keep both the XML and Haskell versions of a name.</font>-<a name="line-29"></a><a name="Name"></a><font color=Green><u>data</u></font> Name <font color=Red>=</font> Name <font color=Cyan>{</font> xName <font color=Red>::</font> String       <font color=Blue>-- ^ original XML name</font>-<a name="line-30"></a>                 <font color=Cyan>,</font> hName <font color=Red>::</font> String       <font color=Blue>-- ^ mangled Haskell name</font>-<a name="line-31"></a>                 <font color=Cyan>}</font>-<a name="line-32"></a>          <font color=Green><u>deriving</u></font> Eq-<a name="line-33"></a>-<a name="line-34"></a><a name="TypeDef"></a><font color=Green><u>data</u></font> TypeDef <font color=Red>=</font>-<a name="line-35"></a>      DataDef Bool Name AttrFields Constructors <font color=Blue>-- ^ Bool for main\/aux.</font>-<a name="line-36"></a>    <font color=Red>|</font> EnumDef Name <font color=Red>[</font>Name<font color=Red>]</font>-<a name="line-37"></a>    <font color=Green><u>deriving</u></font> Eq-<a name="line-38"></a><a name="Constructors"></a><font color=Green><u>type</u></font> Constructors <font color=Red>=</font> <font color=Red>[</font><font color=Cyan>(</font>Name<font color=Cyan>,</font><font color=Red>[</font>StructType<font color=Red>]</font><font color=Cyan>)</font><font color=Red>]</font>-<a name="line-39"></a><a name="AttrFields"></a><font color=Green><u>type</u></font> AttrFields   <font color=Red>=</font> <font color=Red>[</font><font color=Cyan>(</font>Name<font color=Cyan>,</font> StructType<font color=Cyan>)</font><font color=Red>]</font>-<a name="line-40"></a><a name="StructType"></a><font color=Green><u>data</u></font> StructType <font color=Red>=</font>-<a name="line-41"></a>      Maybe StructType-<a name="line-42"></a>    <font color=Red>|</font> Defaultable StructType String     <font color=Blue>-- ^ String holds default value.</font>-<a name="line-43"></a>    <font color=Red>|</font> List StructType-<a name="line-44"></a>    <font color=Red>|</font> List1 StructType                  <font color=Blue>-- ^ Non-empty lists.</font>-<a name="line-45"></a>    <font color=Red>|</font> Tuple <font color=Red>[</font>StructType<font color=Red>]</font>-<a name="line-46"></a>    <font color=Red>|</font> OneOf <font color=Red>[</font>StructType<font color=Red>]</font>-<a name="line-47"></a>    <font color=Red>|</font> Any                               <font color=Blue>-- ^ XML's contentspec allows ANY</font>-<a name="line-48"></a>    <font color=Red>|</font> String-<a name="line-49"></a>    <font color=Red>|</font> Defined Name-<a name="line-50"></a>    <font color=Green><u>deriving</u></font> Eq-<a name="line-51"></a>-<a name="line-52"></a><font color=Blue>-- used for converting StructType (roughly) back to an XML content model</font>-<a name="line-53"></a><font color=Green><u>instance</u></font> Show StructType <font color=Green><u>where</u></font>-<a name="line-54"></a>    showsPrec p <font color=Cyan>(</font>Maybe s<font color=Cyan>)</font>         <font color=Red>=</font> showsPrec <font color=Cyan>(</font>p<font color=Cyan>+</font><font color=Magenta>1</font><font color=Cyan>)</font> s <font color=Cyan>.</font> showChar <font color=Magenta>'?'</font>-<a name="line-55"></a>    showsPrec <font color=Green><u>_</u></font> <font color=Cyan>(</font>Defaultable s <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red>=</font> shows s-<a name="line-56"></a>    showsPrec p <font color=Cyan>(</font>List s<font color=Cyan>)</font>          <font color=Red>=</font> showsPrec <font color=Cyan>(</font>p<font color=Cyan>+</font><font color=Magenta>1</font><font color=Cyan>)</font> s <font color=Cyan>.</font> showChar <font color=Magenta>'*'</font>-<a name="line-57"></a>    showsPrec p <font color=Cyan>(</font>List1 s<font color=Cyan>)</font>         <font color=Red>=</font> showsPrec <font color=Cyan>(</font>p<font color=Cyan>+</font><font color=Magenta>1</font><font color=Cyan>)</font> s <font color=Cyan>.</font> showChar <font color=Magenta>'+'</font>-<a name="line-58"></a>    showsPrec <font color=Green><u>_</u></font> <font color=Cyan>(</font>Tuple ss<font color=Cyan>)</font>        <font color=Red>=</font> showChar <font color=Magenta>'('</font>-<a name="line-59"></a>                                    <font color=Cyan>.</font> foldr1 <font color=Cyan>(</font><font color=Cyan>.</font><font color=Cyan>)</font> <font color=Cyan>(</font>intersperse <font color=Cyan>(</font>showChar <font color=Magenta>','</font><font color=Cyan>)</font>-<a name="line-60"></a>                                                              <font color=Cyan>(</font>map shows ss<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-61"></a>                                    <font color=Cyan>.</font> showChar <font color=Magenta>')'</font>-<a name="line-62"></a>    showsPrec <font color=Green><u>_</u></font> <font color=Cyan>(</font>OneOf ss<font color=Cyan>)</font>        <font color=Red>=</font> showChar <font color=Magenta>'('</font>-<a name="line-63"></a>                                    <font color=Cyan>.</font> foldr1 <font color=Cyan>(</font><font color=Cyan>.</font><font color=Cyan>)</font> <font color=Cyan>(</font>intersperse <font color=Cyan>(</font>showChar <font color=Magenta>'|'</font><font color=Cyan>)</font>-<a name="line-64"></a>                                                              <font color=Cyan>(</font>map shows ss<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-65"></a>                                    <font color=Cyan>.</font> showChar <font color=Magenta>')'</font>-<a name="line-66"></a>    showsPrec <font color=Green><u>_</u></font> <font color=Cyan>(</font>Any<font color=Cyan>)</font>             <font color=Red>=</font> showString <font color=Magenta>"ANY"</font>-<a name="line-67"></a>    showsPrec <font color=Green><u>_</u></font> <font color=Cyan>(</font>String<font color=Cyan>)</font>          <font color=Red>=</font> showString <font color=Magenta>"#PCDATA"</font>-<a name="line-68"></a>    showsPrec <font color=Green><u>_</u></font> <font color=Cyan>(</font>Defined <font color=Cyan>(</font>Name n <font color=Green><u>_</u></font><font color=Cyan>)</font><font color=Cyan>)</font> <font color=Red>=</font> showString n-<a name="line-69"></a>-<a name="line-70"></a>-<a name="line-71"></a><a name="ppTypeDef"></a><font color=Blue>---- Pretty-printing typedefs ----</font>-<a name="line-72"></a><font color=Blue>ppTypeDef</font> <font color=Red>::</font> TypeDef <font color=Red>-&gt;</font> Doc-<a name="line-73"></a>-<a name="line-74"></a><font color=Blue>--      no attrs, no constructors</font>-<a name="line-75"></a><font color=Blue>ppTypeDef</font> <font color=Cyan>(</font>DataDef <font color=Green><u>_</u></font> n [] []<font color=Cyan>)</font> <font color=Red>=</font>-<a name="line-76"></a>    <font color=Green><u>let</u></font> nme <font color=Red>=</font> ppHName n <font color=Green><u>in</u></font>-<a name="line-77"></a>    text <font color=Magenta>"data"</font> <font color=Cyan>&lt;+&gt;</font> nme <font color=Cyan>&lt;+&gt;</font> text <font color=Magenta>"="</font> <font color=Cyan>&lt;+&gt;</font> nme <font color=Cyan>&lt;+&gt;</font> text <font color=Magenta>"\t\t"</font> <font color=Cyan>&lt;&gt;</font> derives-<a name="line-78"></a>-<a name="line-79"></a><font color=Blue>--      no attrs, single constructor</font>-<a name="line-80"></a><font color=Blue>ppTypeDef</font> <font color=Cyan>(</font>DataDef <font color=Green><u>_</u></font> n [] <font color=Red>[</font>c<font color=Red>@</font><font color=Cyan>(</font><font color=Green><u>_</u></font><font color=Cyan>,</font><font color=Red>[</font><font color=Green><u>_</u></font><font color=Red>]</font><font color=Cyan>)</font><font color=Red>]</font><font color=Cyan>)</font> <font color=Red>=</font>-<a name="line-81"></a>    text <font color=Magenta>"newtype"</font> <font color=Cyan>&lt;+&gt;</font> ppHName n <font color=Cyan>&lt;+&gt;</font> text <font color=Magenta>"="</font> <font color=Cyan>&lt;+&gt;</font> ppC c <font color=Cyan>&lt;+&gt;</font> text <font color=Magenta>"\t\t"</font> <font color=Cyan>&lt;&gt;</font> derives-<a name="line-82"></a>-<a name="line-83"></a><font color=Blue>--      no attrs, multiple constrs</font>-<a name="line-84"></a><font color=Blue>ppTypeDef</font> <font color=Cyan>(</font>DataDef <font color=Green><u>_</u></font> n [] cs<font color=Cyan>)</font> <font color=Red>=</font>-<a name="line-85"></a>    text <font color=Magenta>"data"</font> <font color=Cyan>&lt;+&gt;</font> ppHName n <font color=Cyan>&lt;+&gt;</font>-<a name="line-86"></a>           <font color=Cyan>(</font> text <font color=Magenta>"="</font> <font color=Cyan>&lt;+&gt;</font> ppC <font color=Cyan>(</font>head cs<font color=Cyan>)</font> <font color=Cyan>$$</font>-<a name="line-87"></a>             vcat <font color=Cyan>(</font>map <font color=Cyan>(</font><font color=Red>\</font>c<font color=Red>-&gt;</font> text <font color=Magenta>"|"</font> <font color=Cyan>&lt;+&gt;</font> ppC c<font color=Cyan>)</font> <font color=Cyan>(</font>tail cs<font color=Cyan>)</font><font color=Cyan>)</font> <font color=Cyan>$$</font>-<a name="line-88"></a>             derives <font color=Cyan>)</font>-<a name="line-89"></a>-<a name="line-90"></a><font color=Blue>--      nonzero attrs, no constructors</font>-<a name="line-91"></a><font color=Blue>ppTypeDef</font> <font color=Cyan>(</font>DataDef <font color=Green><u>_</u></font> n fs []<font color=Cyan>)</font> <font color=Red>=</font>-<a name="line-92"></a>    <font color=Green><u>let</u></font> nme <font color=Red>=</font> ppHName n <font color=Green><u>in</u></font>-<a name="line-93"></a>    text <font color=Magenta>"data"</font> <font color=Cyan>&lt;+&gt;</font> nme <font color=Cyan>&lt;+&gt;</font> text <font color=Magenta>"="</font> <font color=Cyan>&lt;+&gt;</font> nme <font color=Cyan>$$</font>-<a name="line-94"></a>    nest <font color=Magenta>4</font> <font color=Cyan>(</font> text <font color=Magenta>"{"</font> <font color=Cyan>&lt;+&gt;</font> ppF <font color=Cyan>(</font>head fs<font color=Cyan>)</font> <font color=Cyan>$$</font>-<a name="line-95"></a>             vcat <font color=Cyan>(</font>map <font color=Cyan>(</font><font color=Red>\</font>f<font color=Red>-&gt;</font> text <font color=Magenta>","</font> <font color=Cyan>&lt;+&gt;</font> ppF f<font color=Cyan>)</font> <font color=Cyan>(</font>tail fs<font color=Cyan>)</font><font color=Cyan>)</font> <font color=Cyan>$$</font>-<a name="line-96"></a>             text <font color=Magenta>"}"</font> <font color=Cyan>&lt;+&gt;</font> derives <font color=Cyan>)</font>-<a name="line-97"></a>-<a name="line-98"></a><font color=Blue>--      nonzero attrs, one or more constrs</font>-<a name="line-99"></a><font color=Blue>ppTypeDef</font> <font color=Cyan>(</font>DataDef <font color=Green><u>_</u></font> n fs cs<font color=Cyan>)</font> <font color=Red>=</font>-<a name="line-100"></a>    <font color=Green><u>let</u></font> attr <font color=Red>=</font> ppAName n <font color=Green><u>in</u></font>-<a name="line-101"></a>    text <font color=Magenta>"data"</font> <font color=Cyan>&lt;+&gt;</font> ppHName n <font color=Cyan>&lt;+&gt;</font>-<a name="line-102"></a>           <font color=Cyan>(</font> text <font color=Magenta>"="</font> <font color=Cyan>&lt;+&gt;</font> ppAC attr <font color=Cyan>(</font>head cs<font color=Cyan>)</font> <font color=Cyan>$$</font>-<a name="line-103"></a>             vcat <font color=Cyan>(</font>map <font color=Cyan>(</font><font color=Red>\</font>c<font color=Red>-&gt;</font> text <font color=Magenta>"|"</font> <font color=Cyan>&lt;+&gt;</font> ppAC attr c<font color=Cyan>)</font> <font color=Cyan>(</font>tail cs<font color=Cyan>)</font><font color=Cyan>)</font> <font color=Cyan>$$</font>-<a name="line-104"></a>             derives <font color=Cyan>)</font>  <font color=Cyan>$$</font>-<a name="line-105"></a>    text <font color=Magenta>"data"</font> <font color=Cyan>&lt;+&gt;</font> attr <font color=Cyan>&lt;+&gt;</font> text <font color=Magenta>"="</font> <font color=Cyan>&lt;+&gt;</font> attr <font color=Cyan>$$</font>-<a name="line-106"></a>    nest <font color=Magenta>4</font> <font color=Cyan>(</font> text <font color=Magenta>"{"</font> <font color=Cyan>&lt;+&gt;</font> ppF <font color=Cyan>(</font>head fs<font color=Cyan>)</font> <font color=Cyan>$$</font>-<a name="line-107"></a>             vcat <font color=Cyan>(</font>map <font color=Cyan>(</font><font color=Red>\</font>f<font color=Red>-&gt;</font> text <font color=Magenta>","</font> <font color=Cyan>&lt;+&gt;</font> ppF f<font color=Cyan>)</font> <font color=Cyan>(</font>tail fs<font color=Cyan>)</font><font color=Cyan>)</font> <font color=Cyan>$$</font>-<a name="line-108"></a>             text <font color=Magenta>"}"</font> <font color=Cyan>&lt;+&gt;</font> derives <font color=Cyan>)</font>-<a name="line-109"></a>-<a name="line-110"></a><font color=Blue>--      enumerations (of attribute values)</font>-<a name="line-111"></a><font color=Blue>ppTypeDef</font> <font color=Cyan>(</font>EnumDef n es<font color=Cyan>)</font> <font color=Red>=</font>-<a name="line-112"></a>    text <font color=Magenta>"data"</font> <font color=Cyan>&lt;+&gt;</font> ppHName n <font color=Cyan>&lt;+&gt;</font>-<a name="line-113"></a>    <font color=Cyan>(</font> text <font color=Magenta>"="</font> <font color=Cyan>&lt;+&gt;</font>-<a name="line-114"></a>      fsep <font color=Cyan>(</font>intersperse <font color=Cyan>(</font>text <font color=Magenta>" | "</font><font color=Cyan>)</font> <font color=Cyan>(</font>map ppHName es<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-115"></a>    <font color=Cyan>$$</font> derives <font color=Cyan>)</font>-<a name="line-116"></a>-<a name="line-117"></a>-<a name="line-118"></a><a name="ppST"></a><font color=Blue>ppST</font> <font color=Red>::</font> StructType <font color=Red>-&gt;</font> Doc-<a name="line-119"></a><font color=Blue>ppST</font> <font color=Cyan>(</font>Defaultable st <font color=Green><u>_</u></font><font color=Cyan>)</font>  <font color=Red>=</font> parens <font color=Cyan>(</font>text <font color=Magenta>"Defaultable"</font> <font color=Cyan>&lt;+&gt;</font> ppST st<font color=Cyan>)</font>-<a name="line-120"></a><font color=Blue>ppST</font> <font color=Cyan>(</font>Maybe st<font color=Cyan>)</font>  <font color=Red>=</font> parens <font color=Cyan>(</font>text <font color=Magenta>"Maybe"</font> <font color=Cyan>&lt;+&gt;</font> ppST st<font color=Cyan>)</font>-<a name="line-121"></a><font color=Blue>ppST</font> <font color=Cyan>(</font>List st<font color=Cyan>)</font>   <font color=Red>=</font> text <font color=Magenta>"["</font> <font color=Cyan>&lt;&gt;</font> ppST st <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>"]"</font>-<a name="line-122"></a><font color=Blue>ppST</font> <font color=Cyan>(</font>List1 st<font color=Cyan>)</font>  <font color=Red>=</font> parens <font color=Cyan>(</font>text <font color=Magenta>"List1"</font> <font color=Cyan>&lt;+&gt;</font> ppST st<font color=Cyan>)</font>-<a name="line-123"></a><font color=Blue>ppST</font> <font color=Cyan>(</font>Tuple sts<font color=Cyan>)</font> <font color=Red>=</font> parens <font color=Cyan>(</font>commaList <font color=Cyan>(</font>map ppST sts<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-124"></a><font color=Blue>ppST</font> <font color=Cyan>(</font>OneOf sts<font color=Cyan>)</font> <font color=Red>=</font> parens <font color=Cyan>(</font>text <font color=Magenta>"OneOf"</font> <font color=Cyan>&lt;&gt;</font> text <font color=Cyan>(</font>show <font color=Cyan>(</font>length sts<font color=Cyan>)</font><font color=Cyan>)</font> <font color=Cyan>&lt;+&gt;</font>-<a name="line-125"></a>                           hsep <font color=Cyan>(</font>map ppST sts<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-126"></a><font color=Blue>ppST</font>  String     <font color=Red>=</font> text <font color=Magenta>"String"</font>-<a name="line-127"></a><font color=Blue>ppST</font>  Any        <font color=Red>=</font> text <font color=Magenta>"ANYContent"</font>-<a name="line-128"></a><font color=Blue>ppST</font> <font color=Cyan>(</font>Defined n<font color=Cyan>)</font> <font color=Red>=</font> ppHName n-<a name="line-129"></a>-<a name="line-130"></a><a name="ppC"></a><font color=Blue>-- constructor and components</font>-<a name="line-131"></a><font color=Blue>ppC</font> <font color=Red>::</font> <font color=Cyan>(</font>Name<font color=Cyan>,</font><font color=Red>[</font>StructType<font color=Red>]</font><font color=Cyan>)</font> <font color=Red>-&gt;</font> Doc-<a name="line-132"></a><font color=Blue>ppC</font> <font color=Cyan>(</font>n<font color=Cyan>,</font>sts<font color=Cyan>)</font> <font color=Red>=</font> ppHName n <font color=Cyan>&lt;+&gt;</font> fsep <font color=Cyan>(</font>map ppST sts<font color=Cyan>)</font>-<a name="line-133"></a>-<a name="line-134"></a><a name="ppF"></a><font color=Blue>-- attribute (fieldname and type)</font>-<a name="line-135"></a><font color=Blue>ppF</font> <font color=Red>::</font> <font color=Cyan>(</font>Name<font color=Cyan>,</font>StructType<font color=Cyan>)</font> <font color=Red>-&gt;</font> Doc-<a name="line-136"></a><font color=Blue>ppF</font> <font color=Cyan>(</font>n<font color=Cyan>,</font>st<font color=Cyan>)</font> <font color=Red>=</font> ppHName n <font color=Cyan>&lt;+&gt;</font> text <font color=Magenta>"::"</font> <font color=Cyan>&lt;+&gt;</font> ppST st-<a name="line-137"></a>-<a name="line-138"></a><a name="ppAC"></a><font color=Blue>-- constructor and components with initial attr-type</font>-<a name="line-139"></a><font color=Blue>ppAC</font> <font color=Red>::</font> Doc <font color=Red>-&gt;</font> <font color=Cyan>(</font>Name<font color=Cyan>,</font><font color=Red>[</font>StructType<font color=Red>]</font><font color=Cyan>)</font> <font color=Red>-&gt;</font> Doc-<a name="line-140"></a><font color=Blue>ppAC</font> atype <font color=Cyan>(</font>n<font color=Cyan>,</font>sts<font color=Cyan>)</font> <font color=Red>=</font> ppHName n <font color=Cyan>&lt;+&gt;</font> fsep <font color=Cyan>(</font>atype<font color=Red><b>:</b></font> map ppST sts<font color=Cyan>)</font>-<a name="line-141"></a>-<a name="line-142"></a><a name="ppHName"></a><font color=Blue>-- | Pretty print Haskell name.</font>-<a name="line-143"></a><font color=Blue>ppHName</font> <font color=Red>::</font> Name <font color=Red>-&gt;</font> Doc-<a name="line-144"></a><font color=Blue>ppHName</font> <font color=Cyan>(</font>Name <font color=Green><u>_</u></font> s<font color=Cyan>)</font> <font color=Red>=</font> text s-<a name="line-145"></a><a name="ppXName"></a><font color=Blue>-- | Pretty print XML name.</font>-<a name="line-146"></a><font color=Blue>ppXName</font> <font color=Red>::</font> Name <font color=Red>-&gt;</font> Doc-<a name="line-147"></a><font color=Blue>ppXName</font> <font color=Cyan>(</font>Name s <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red>=</font> text s-<a name="line-148"></a><a name="ppAName"></a><font color=Blue>-- | Pretty print Haskell attributes name.</font>-<a name="line-149"></a><font color=Blue>ppAName</font> <font color=Red>::</font> Name <font color=Red>-&gt;</font> Doc-<a name="line-150"></a><font color=Blue>ppAName</font> <font color=Cyan>(</font>Name <font color=Green><u>_</u></font> s<font color=Cyan>)</font> <font color=Red>=</font> text s <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>"_Attrs"</font>-<a name="line-151"></a>-<a name="line-152"></a><a name="derives"></a><font color=Blue>derives</font> <font color=Red>::</font> Doc-<a name="line-153"></a><font color=Blue>derives</font> <font color=Red>=</font> text <font color=Magenta>"deriving"</font> <font color=Cyan>&lt;+&gt;</font> parens <font color=Cyan>(</font>commaList <font color=Cyan>(</font>map text <font color=Red>[</font><font color=Magenta>"Eq"</font><font color=Cyan>,</font><font color=Magenta>"Show"</font><font color=Red>]</font><font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-154"></a>-<a name="line-155"></a>-<a name="line-156"></a><font color=Blue>---- Some operations on Names ----</font>-<a name="line-157"></a>-<a name="line-158"></a><a name="name"></a><font color=Blue>-- | Make a type name valid in both XML and Haskell.</font>-<a name="line-159"></a><font color=Blue>name</font> <font color=Red>::</font> String <font color=Red>-&gt;</font> Name-<a name="line-160"></a><font color=Blue>name</font> n     <font color=Red>=</font> Name <font color=Cyan>{</font> xName <font color=Red>=</font> n-<a name="line-161"></a>                  <font color=Cyan>,</font> hName <font color=Red>=</font> mangle n <font color=Cyan>}</font>-<a name="line-162"></a>-<a name="line-163"></a><a name="name_"></a><font color=Blue>-- | Append an underscore to the Haskell version of the name.</font>-<a name="line-164"></a><font color=Blue>name_</font> <font color=Red>::</font> String <font color=Red>-&gt;</font> Name-<a name="line-165"></a><font color=Blue>name_</font> n    <font color=Red>=</font> Name <font color=Cyan>{</font> xName <font color=Red>=</font> n-<a name="line-166"></a>                  <font color=Cyan>,</font> hName <font color=Red>=</font> mangle n <font color=Cyan>++</font> <font color=Magenta>"_"</font> <font color=Cyan>}</font>-<a name="line-167"></a>-<a name="line-168"></a><a name="name_a"></a><font color=Blue>-- | Prefix an attribute enumeration type name with its containing element</font>-<a name="line-169"></a><font color=Blue>--   name.</font>-<a name="line-170"></a><font color=Blue>name_a</font> <font color=Red>::</font> String <font color=Red>-&gt;</font> String <font color=Red>-&gt;</font> Name-<a name="line-171"></a><font color=Blue>name_a</font> e n <font color=Red>=</font> Name <font color=Cyan>{</font> xName <font color=Red>=</font> n-<a name="line-172"></a>                  <font color=Cyan>,</font> hName <font color=Red>=</font> mangle e <font color=Cyan>++</font> <font color=Magenta>"_"</font> <font color=Cyan>++</font> map decolonify n <font color=Cyan>}</font>-<a name="line-173"></a>-<a name="line-174"></a><a name="name_ac"></a><font color=Blue>-- | Prefix an attribute enumeration constructor with its element-tag name,</font>-<a name="line-175"></a><font color=Blue>--   and its enumeration type name.</font>-<a name="line-176"></a><font color=Blue>name_ac</font> <font color=Red>::</font> String <font color=Red>-&gt;</font> String <font color=Red>-&gt;</font> String <font color=Red>-&gt;</font> Name-<a name="line-177"></a><font color=Blue>name_ac</font> e t n <font color=Red>=</font> Name <font color=Cyan>{</font> xName <font color=Red>=</font> n-<a name="line-178"></a>                     <font color=Cyan>,</font> hName <font color=Red>=</font> mangle e <font color=Cyan>++</font> <font color=Magenta>"_"</font> <font color=Cyan>++</font> map decolonify t-<a name="line-179"></a>                                        <font color=Cyan>++</font> <font color=Magenta>"_"</font> <font color=Cyan>++</font> map decolonify n <font color=Cyan>}</font>-<a name="line-180"></a>-<a name="line-181"></a><a name="name_f"></a><font color=Blue>-- | Prefix a field name with its enclosing element name.</font>-<a name="line-182"></a><font color=Blue>name_f</font> <font color=Red>::</font> String <font color=Red>-&gt;</font> String <font color=Red>-&gt;</font> Name-<a name="line-183"></a><font color=Blue>name_f</font> e n <font color=Red>=</font> Name <font color=Cyan>{</font> xName <font color=Red>=</font> n-<a name="line-184"></a>                  <font color=Cyan>,</font> hName <font color=Red>=</font> manglef e <font color=Cyan>++</font> mangle n <font color=Cyan>}</font>-<a name="line-185"></a>-<a name="line-186"></a><font color=Blue>---- obsolete</font>-<a name="line-187"></a><font color=Blue>-- elementname_at :: String -&gt; Name</font>-<a name="line-188"></a><font color=Blue>-- elementname_at n  = Name n (mangle n ++ "_Attrs")</font>-<a name="line-189"></a>-<a name="line-190"></a><a name="mangle"></a><font color=Blue>-- | Convert an XML name to a Haskell conid.</font>-<a name="line-191"></a><font color=Blue>mangle</font> <font color=Red>::</font> String <font color=Red>-&gt;</font> String-<a name="line-192"></a><font color=Blue>mangle</font> <font color=Cyan>(</font>n<font color=Red><b>:</b></font>ns<font color=Cyan>)</font>-<a name="line-193"></a>    <font color=Red>|</font> isLower n   <font color=Red>=</font> notPrelude <font color=Cyan>(</font>toUpper n<font color=Red><b>:</b></font> map decolonify ns<font color=Cyan>)</font>-<a name="line-194"></a>    <font color=Red>|</font> isDigit n   <font color=Red>=</font> <font color=Magenta>'I'</font><font color=Red><b>:</b></font> n<font color=Red><b>:</b></font> map decolonify ns-<a name="line-195"></a>    <font color=Red>|</font> otherwise   <font color=Red>=</font> notPrelude <font color=Cyan>(</font>n<font color=Red><b>:</b></font> map decolonify ns<font color=Cyan>)</font>-<a name="line-196"></a>-<a name="line-197"></a><a name="notPrelude"></a><font color=Blue>-- | Ensure a generated name does not conflict with a standard haskell one.</font>-<a name="line-198"></a><font color=Blue>notPrelude</font> <font color=Red>::</font> String <font color=Red>-&gt;</font> String-<a name="line-199"></a><font color=Blue>notPrelude</font> <font color=Magenta>"Bool"</font>    <font color=Red>=</font> <font color=Magenta>"ABool"</font>-<a name="line-200"></a><font color=Blue>notPrelude</font> <font color=Magenta>"Bounded"</font> <font color=Red>=</font> <font color=Magenta>"ABounded"</font>-<a name="line-201"></a><font color=Blue>notPrelude</font> <font color=Magenta>"Char"</font>    <font color=Red>=</font> <font color=Magenta>"AChar"</font>-<a name="line-202"></a><font color=Blue>notPrelude</font> <font color=Magenta>"Double"</font>  <font color=Red>=</font> <font color=Magenta>"ADouble"</font>-<a name="line-203"></a><font color=Blue>notPrelude</font> <font color=Magenta>"Either"</font>  <font color=Red>=</font> <font color=Magenta>"AEither"</font>-<a name="line-204"></a><font color=Blue>notPrelude</font> <font color=Magenta>"Enum"</font>    <font color=Red>=</font> <font color=Magenta>"AEnum"</font>-<a name="line-205"></a><font color=Blue>notPrelude</font> <font color=Magenta>"Eq"</font>      <font color=Red>=</font> <font color=Magenta>"AEq"</font>-<a name="line-206"></a><font color=Blue>notPrelude</font> <font color=Magenta>"FilePath"</font><font color=Red>=</font> <font color=Magenta>"AFilePath"</font>-<a name="line-207"></a><font color=Blue>notPrelude</font> <font color=Magenta>"Float"</font>   <font color=Red>=</font> <font color=Magenta>"AFloat"</font>-<a name="line-208"></a><font color=Blue>notPrelude</font> <font color=Magenta>"Floating"</font><font color=Red>=</font> <font color=Magenta>"AFloating"</font>-<a name="line-209"></a><font color=Blue>notPrelude</font> <font color=Magenta>"Fractional"</font><font color=Red>=</font> <font color=Magenta>"AFractional"</font>-<a name="line-210"></a><font color=Blue>notPrelude</font> <font color=Magenta>"Functor"</font> <font color=Red>=</font> <font color=Magenta>"AFunctor"</font>-<a name="line-211"></a><font color=Blue>notPrelude</font> <font color=Magenta>"IO"</font>      <font color=Red>=</font> <font color=Magenta>"AIO"</font>-<a name="line-212"></a><font color=Blue>notPrelude</font> <font color=Magenta>"IOError"</font> <font color=Red>=</font> <font color=Magenta>"AIOError"</font>-<a name="line-213"></a><font color=Blue>notPrelude</font> <font color=Magenta>"Int"</font>     <font color=Red>=</font> <font color=Magenta>"AInt"</font>-<a name="line-214"></a><font color=Blue>notPrelude</font> <font color=Magenta>"Integer"</font> <font color=Red>=</font> <font color=Magenta>"AInteger"</font>-<a name="line-215"></a><font color=Blue>notPrelude</font> <font color=Magenta>"Integral"</font><font color=Red>=</font> <font color=Magenta>"AIntegral"</font>-<a name="line-216"></a><font color=Blue>notPrelude</font> <font color=Magenta>"List1"</font>   <font color=Red>=</font> <font color=Magenta>"AList1"</font> <font color=Blue>-- part of HaXml</font>-<a name="line-217"></a><font color=Blue>notPrelude</font> <font color=Magenta>"Maybe"</font>   <font color=Red>=</font> <font color=Magenta>"AMaybe"</font>-<a name="line-218"></a><font color=Blue>notPrelude</font> <font color=Magenta>"Monad"</font>   <font color=Red>=</font> <font color=Magenta>"AMonad"</font>-<a name="line-219"></a><font color=Blue>notPrelude</font> <font color=Magenta>"Num"</font>     <font color=Red>=</font> <font color=Magenta>"ANum"</font>-<a name="line-220"></a><font color=Blue>notPrelude</font> <font color=Magenta>"Ord"</font>     <font color=Red>=</font> <font color=Magenta>"AOrd"</font>-<a name="line-221"></a><font color=Blue>notPrelude</font> <font color=Magenta>"Ordering"</font><font color=Red>=</font> <font color=Magenta>"AOrdering"</font>-<a name="line-222"></a><font color=Blue>notPrelude</font> <font color=Magenta>"Rational"</font><font color=Red>=</font> <font color=Magenta>"ARational"</font>-<a name="line-223"></a><font color=Blue>notPrelude</font> <font color=Magenta>"Read"</font>    <font color=Red>=</font> <font color=Magenta>"ARead"</font>-<a name="line-224"></a><font color=Blue>notPrelude</font> <font color=Magenta>"ReadS"</font>   <font color=Red>=</font> <font color=Magenta>"AReadS"</font>-<a name="line-225"></a><font color=Blue>notPrelude</font> <font color=Magenta>"Real"</font>    <font color=Red>=</font> <font color=Magenta>"AReal"</font>-<a name="line-226"></a><font color=Blue>notPrelude</font> <font color=Magenta>"RealFloat"</font> <font color=Red>=</font> <font color=Magenta>"ARealFloat"</font>-<a name="line-227"></a><font color=Blue>notPrelude</font> <font color=Magenta>"RealFrac"</font><font color=Red>=</font> <font color=Magenta>"ARealFrac"</font>-<a name="line-228"></a><font color=Blue>notPrelude</font> <font color=Magenta>"Show"</font>    <font color=Red>=</font> <font color=Magenta>"AShow"</font>-<a name="line-229"></a><font color=Blue>notPrelude</font> <font color=Magenta>"ShowS"</font>   <font color=Red>=</font> <font color=Magenta>"AShowS"</font>-<a name="line-230"></a><font color=Blue>notPrelude</font> <font color=Magenta>"String"</font>  <font color=Red>=</font> <font color=Magenta>"AString"</font>-<a name="line-231"></a><font color=Blue>notPrelude</font> n         <font color=Red>=</font> n-<a name="line-232"></a>-<a name="line-233"></a><a name="manglef"></a><font color=Blue>-- | Convert an XML name to a Haskell varid.</font>-<a name="line-234"></a><font color=Blue>manglef</font> <font color=Red>::</font> String <font color=Red>-&gt;</font> String-<a name="line-235"></a><font color=Blue>manglef</font> <font color=Cyan>(</font>n<font color=Red><b>:</b></font>ns<font color=Cyan>)</font>-<a name="line-236"></a>    <font color=Red>|</font> isUpper n   <font color=Red>=</font> toLower n<font color=Red><b>:</b></font> map decolonify ns-<a name="line-237"></a>    <font color=Red>|</font> isDigit n   <font color=Red>=</font> <font color=Magenta>'_'</font><font color=Red><b>:</b></font> n<font color=Red><b>:</b></font> map decolonify ns-<a name="line-238"></a>    <font color=Red>|</font> otherwise   <font color=Red>=</font> n<font color=Red><b>:</b></font> map decolonify ns-<a name="line-239"></a>-<a name="line-240"></a><a name="decolonify"></a><font color=Blue>-- | Convert colon to prime, hyphen to underscore.</font>-<a name="line-241"></a><font color=Blue>decolonify</font> <font color=Red>::</font> Char <font color=Red>-&gt;</font> Char-<a name="line-242"></a><font color=Blue>decolonify</font> <font color=Magenta>':'</font> <font color=Red>=</font> <font color=Magenta>'\''</font>   <font color=Blue>-- TODO: turn namespaces into qualified identifiers</font>-<a name="line-243"></a><font color=Blue>decolonify</font> <font color=Magenta>'-'</font> <font color=Red>=</font> <font color=Magenta>'_'</font>-<a name="line-244"></a><font color=Blue>decolonify</font> <font color=Magenta>'.'</font> <font color=Red>=</font> <font color=Magenta>'_'</font>-<a name="line-245"></a><font color=Blue>decolonify</font>  c  <font color=Red>=</font> c-<a name="line-246"></a>-<a name="line-247"></a><a name="commaList"></a><font color=Blue>commaList</font> <font color=Red>::</font> <font color=Red>[</font>Doc<font color=Red>]</font> <font color=Red>-&gt;</font> Doc-<a name="line-248"></a><font color=Blue>commaList</font> <font color=Red>=</font> hcat <font color=Cyan>.</font> intersperse comma-</pre>-</body>-</html>
− docs/HaXml/src/Text/XML/HaXml/Escape.html
@@ -1,301 +0,0 @@-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">-<html>-<head>-<!-- Generated by HsColour, http://www.cs.york.ac.uk/fp/darcs/hscolour/ -->-<title>src/Text/XML/HaXml/Escape.hs</title>-</head>-<body>-<pre><a name="line-1"></a><font color=Blue>{- This module contains code for escaping/unescaping text in attributes-<a name="line-2"></a>   and elements in the HaXml Element type, replacing characters by character-<a name="line-3"></a>   references or vice-versa.  Two uses are envisaged for this:-<a name="line-4"></a>-<a name="line-5"></a>   (1) stopping HaXml generating incorrect XML when a character is included-<a name="line-6"></a>       which is also the appropriate XML terminating character, for example-<a name="line-7"></a>       when an attribute includes a double quote.-<a name="line-8"></a>   (2) representing XML which contains non-ASCII characters as ASCII.-<a name="line-9"></a>   -}</font>-<a name="line-10"></a><font color=Green><u>module</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Escape<font color=Cyan>(</font>-<a name="line-11"></a>   xmlEscape<font color=Cyan>,</font>-<a name="line-12"></a>      <font color=Blue>-- :: XmlEscaper -&gt; Element i -&gt; Element i</font>-<a name="line-13"></a>   xmlUnEscape<font color=Cyan>,</font>-<a name="line-14"></a>      <font color=Blue>-- :: XmlEscaper -&gt; Element i -&gt; Element i</font>-<a name="line-15"></a>   xmlEscapeContent<font color=Cyan>,</font>-<a name="line-16"></a>      <font color=Blue>-- :: XmlEscaper -&gt; [Content i] -&gt; [Content i]</font>-<a name="line-17"></a>   xmlUnEscapeContent<font color=Cyan>,</font>-<a name="line-18"></a>      <font color=Blue>-- :: XmlEscaper -&gt; [Content i] -&gt; [Content i]</font>-<a name="line-19"></a>-<a name="line-20"></a>   XmlEscaper<font color=Cyan>,</font>-<a name="line-21"></a>      <font color=Blue>-- Something describing a particular set of escapes.</font>-<a name="line-22"></a>-<a name="line-23"></a>   stdXmlEscaper<font color=Cyan>,</font>-<a name="line-24"></a>      <font color=Blue>-- Standard boilerplate escaper, escaping everything that is</font>-<a name="line-25"></a>      <font color=Blue>-- nonprintable, non-ASCII, or might conceivably cause problems by</font>-<a name="line-26"></a>      <font color=Blue>-- parsing XML, for example quotes, &lt; signs, and ampersands.</font>-<a name="line-27"></a>-<a name="line-28"></a>   mkXmlEscaper<font color=Cyan>,</font>-<a name="line-29"></a>      <font color=Blue>-- :: [(Char,String)] -&gt; (Char -&gt; Bool) -&gt; XmlEscaper</font>-<a name="line-30"></a>      <font color=Blue>-- The first argument contains a list of characters, with their</font>-<a name="line-31"></a>      <font color=Blue>--    corresponding character reference names.</font>-<a name="line-32"></a>      <font color=Blue>--    For example [('\60',"lt"),('\62',"gt"),('\38',"amp"),</font>-<a name="line-33"></a>      <font color=Blue>--       ('\39',"apos"),('\34',"quot")] will give you the "standard"</font>-<a name="line-34"></a>      <font color=Blue>--       XML escapes listed in section 4.6 of the XML standard, so that</font>-<a name="line-35"></a>      <font color=Blue>--       "&amp;quot;" will automatically get translated into a double</font>-<a name="line-36"></a>      <font color=Blue>--       quotation mark.</font>-<a name="line-37"></a>      <font color=Blue>--</font>-<a name="line-38"></a>      <font color=Blue>--       It's the caller's responsibility to see that the reference</font>-<a name="line-39"></a>      <font color=Blue>--       names ("lt","gt","amp","apos" and "quot" in the above example)</font>-<a name="line-40"></a>      <font color=Blue>--       are valid XML reference names.  A sequence of letters, digits,</font>-<a name="line-41"></a>      <font color=Blue>--       "." or ":" characters should be fine so long as the first one</font>-<a name="line-42"></a>      <font color=Blue>--       isn't a digit.</font>-<a name="line-43"></a>      <font color=Blue>--</font>-<a name="line-44"></a>      <font color=Blue>-- The second argument is a function applied to each text character.</font>-<a name="line-45"></a>      <font color=Blue>--    If it returns True, that means we should escape this character.</font>-<a name="line-46"></a>-<a name="line-47"></a>      <font color=Blue>-- Policy: on escaping, we expand all characters for which the</font>-<a name="line-48"></a>      <font color=Blue>-- (Char -&gt; Bool) function returns True, either giving the corresponding</font>-<a name="line-49"></a>      <font color=Blue>-- character reference name if one was supplied, or else using a</font>-<a name="line-50"></a>      <font color=Blue>-- hexadecimal CharRef.</font>-<a name="line-51"></a>      <font color=Blue>--</font>-<a name="line-52"></a>      <font color=Blue>-- on unescaping, we translate all the references we understand</font>-<a name="line-53"></a>      <font color=Blue>--   (hexadecimal,decimal, and the ones in the [(Char,String)] list,</font>-<a name="line-54"></a>      <font color=Blue>--   and leave the others alone.</font>-<a name="line-55"></a>-<a name="line-56"></a>   <font color=Cyan>)</font> <font color=Green><u>where</u></font>-<a name="line-57"></a>-<a name="line-58"></a><font color=Green><u>import</u></font> Char-<a name="line-59"></a><font color=Blue>-- import Numeric</font>-<a name="line-60"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Types-<a name="line-61"></a>-<a name="line-62"></a><font color=Magenta><em>#if __GLASGOW_HASKELL__ &gt;= 604 || __NHC__ &gt;= 118 || defined(__HUGS__)</em></font>-<a name="line-63"></a><font color=Blue>-- emulate older finite map interface using Data.Map, if it is available</font>-<a name="line-64"></a><font color=Green><u>import</u></font> <font color=Green><u>qualified</u></font> Data<font color=Cyan>.</font>Map <font color=Green><u>as</u></font> Map-<a name="line-65"></a><a name="FiniteMap"></a><font color=Green><u>type</u></font> FiniteMap a b <font color=Red>=</font> Map<font color=Cyan>.</font>Map a b-<a name="line-66"></a><a name="listToFM"></a><font color=Blue>listToFM</font> <font color=Red>::</font> Ord a <font color=Red>=&gt;</font> <font color=Red>[</font><font color=Cyan>(</font>a<font color=Cyan>,</font>b<font color=Cyan>)</font><font color=Red>]</font> <font color=Red>-&gt;</font> FiniteMap a b-<a name="line-67"></a><font color=Blue>listToFM</font> <font color=Red>=</font> Map<font color=Cyan>.</font>fromList-<a name="line-68"></a><a name="lookupFM"></a><font color=Blue>lookupFM</font> <font color=Red>::</font> Ord a <font color=Red>=&gt;</font> FiniteMap a b <font color=Red>-&gt;</font> a <font color=Red>-&gt;</font> Maybe b-<a name="line-69"></a><font color=Blue>lookupFM</font> <font color=Red>=</font> flip Map<font color=Cyan>.</font>lookup-<a name="line-70"></a><font color=Magenta><em>#elif __GLASGOW_HASKELL__ &gt;= 504 || __NHC__ &gt; 114</em></font>-<a name="line-71"></a><font color=Blue>-- real finite map, if it is available</font>-<a name="line-72"></a><font color=Green><u>import</u></font> Data<font color=Cyan>.</font>FiniteMap-<a name="line-73"></a><font color=Magenta><em>#else</em></font>-<a name="line-74"></a><a name="FiniteMap"></a><font color=Blue>-- otherwise, a very simple and inefficient implementation of a finite map</font>-<a name="line-75"></a><a name="FiniteMap"></a><font color=Green><u>type</u></font> FiniteMap a b <font color=Red>=</font> <font color=Red>[</font><font color=Cyan>(</font>a<font color=Cyan>,</font>b<font color=Cyan>)</font><font color=Red>]</font>-<a name="line-76"></a><font color=Blue>listToFM</font> <font color=Red>::</font> Eq a <font color=Red>=&gt;</font> <font color=Red>[</font><font color=Cyan>(</font>a<font color=Cyan>,</font>b<font color=Cyan>)</font><font color=Red>]</font> <font color=Red>-&gt;</font> FiniteMap a b-<a name="line-77"></a><font color=Blue>listToFM</font> <font color=Red>=</font> id-<a name="line-78"></a><font color=Blue>lookupFM</font> <font color=Red>::</font> Eq a <font color=Red>=&gt;</font> FiniteMap a b <font color=Red>-&gt;</font> a <font color=Red>-&gt;</font> Maybe b-<a name="line-79"></a><font color=Blue>lookupFM</font> fm k <font color=Red>=</font> lookup k fm-<a name="line-80"></a><font color=Magenta><em>#endif</em></font>-<a name="line-81"></a>-<a name="line-82"></a>-<a name="line-83"></a><font color=Blue>-- ------------------------------------------------------------------------</font>-<a name="line-84"></a><font color=Blue>-- Data types</font>-<a name="line-85"></a><font color=Blue>-- ------------------------------------------------------------------------</font>-<a name="line-86"></a>-<a name="line-87"></a><a name="XmlEscaper"></a><font color=Green><u>data</u></font> XmlEscaper <font color=Red>=</font> XmlEscaper <font color=Cyan>{</font>-<a name="line-88"></a>   toEscape <font color=Red>::</font> FiniteMap Char String<font color=Cyan>,</font>-<a name="line-89"></a>   fromEscape <font color=Red>::</font> FiniteMap String Char<font color=Cyan>,</font>-<a name="line-90"></a>   isEscape <font color=Red>::</font> Char <font color=Red>-&gt;</font> Bool-<a name="line-91"></a>   <font color=Cyan>}</font>-<a name="line-92"></a>-<a name="line-93"></a>-<a name="line-94"></a><font color=Blue>-- ------------------------------------------------------------------------</font>-<a name="line-95"></a><font color=Blue>-- Escaping</font>-<a name="line-96"></a><font color=Blue>-- ------------------------------------------------------------------------</font>-<a name="line-97"></a>-<a name="line-98"></a>-<a name="line-99"></a>-<a name="line-100"></a><a name="xmlEscape"></a><font color=Blue>xmlEscape</font> <font color=Red>::</font> XmlEscaper <font color=Red>-&gt;</font> Element i <font color=Red>-&gt;</font> Element i-<a name="line-101"></a><font color=Blue>xmlEscape</font> xmlEscaper element <font color=Red>=</font>-<a name="line-102"></a>   compressElement <font color=Cyan>(</font>escapeElement xmlEscaper element<font color=Cyan>)</font>-<a name="line-103"></a>-<a name="line-104"></a><a name="xmlEscapeContent"></a><font color=Blue>xmlEscapeContent</font> <font color=Red>::</font> XmlEscaper <font color=Red>-&gt;</font> <font color=Red>[</font>Content i<font color=Red>]</font> <font color=Red>-&gt;</font> <font color=Red>[</font>Content i<font color=Red>]</font>-<a name="line-105"></a><font color=Blue>xmlEscapeContent</font> xmlEscaper cs <font color=Red>=</font>-<a name="line-106"></a>   compressContent <font color=Cyan>(</font>escapeContent xmlEscaper cs<font color=Cyan>)</font>-<a name="line-107"></a>-<a name="line-108"></a><a name="escapeElement"></a><font color=Blue>escapeElement</font> <font color=Red>::</font> XmlEscaper <font color=Red>-&gt;</font> Element i <font color=Red>-&gt;</font> Element i-<a name="line-109"></a><font color=Blue>escapeElement</font> xmlEscaper <font color=Cyan>(</font>Elem name attributes content<font color=Cyan>)</font> <font color=Red>=</font>-<a name="line-110"></a>   Elem name <font color=Cyan>(</font>escapeAttributes xmlEscaper attributes<font color=Cyan>)</font>-<a name="line-111"></a>      <font color=Cyan>(</font>escapeContent xmlEscaper content<font color=Cyan>)</font>-<a name="line-112"></a>-<a name="line-113"></a><a name="escapeAttributes"></a><font color=Blue>escapeAttributes</font> <font color=Red>::</font> XmlEscaper <font color=Red>-&gt;</font> <font color=Red>[</font>Attribute<font color=Red>]</font> <font color=Red>-&gt;</font> <font color=Red>[</font>Attribute<font color=Red>]</font>-<a name="line-114"></a><font color=Blue>escapeAttributes</font> xmlEscaper atts <font color=Red>=</font>-<a name="line-115"></a>   map-<a name="line-116"></a>      <font color=Cyan>(</font><font color=Red>\</font> <font color=Cyan>(</font>name<font color=Cyan>,</font>av<font color=Cyan>)</font> <font color=Red>-&gt;</font> <font color=Cyan>(</font>name<font color=Cyan>,</font>escapeAttValue xmlEscaper av<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-117"></a>      atts-<a name="line-118"></a>-<a name="line-119"></a><a name="escapeAttValue"></a><font color=Blue>escapeAttValue</font> <font color=Red>::</font> XmlEscaper <font color=Red>-&gt;</font> AttValue <font color=Red>-&gt;</font> AttValue-<a name="line-120"></a><font color=Blue>escapeAttValue</font> xmlEscaper <font color=Cyan>(</font>AttValue attValList<font color=Cyan>)</font> <font color=Red>=</font>-<a name="line-121"></a>   AttValue <font color=Cyan>(</font>-<a name="line-122"></a>      concat <font color=Cyan>(</font>-<a name="line-123"></a>         map-<a name="line-124"></a>            <font color=Cyan>(</font><font color=Red>\</font> av <font color=Red>-&gt;</font> <font color=Green><u>case</u></font> av <font color=Green><u>of</u></font>-<a name="line-125"></a>               Right <font color=Green><u>_</u></font> <font color=Red>-&gt;</font> <font color=Red>[</font>av<font color=Red>]</font>-<a name="line-126"></a>               Left s <font color=Red>-&gt;</font>-<a name="line-127"></a>                  map-<a name="line-128"></a>                     <font color=Cyan>(</font><font color=Red>\</font> c <font color=Red>-&gt;</font> <font color=Green><u>if</u></font> isEscape xmlEscaper c-<a name="line-129"></a>                        <font color=Green><u>then</u></font>-<a name="line-130"></a>                           Right <font color=Cyan>(</font>mkEscape xmlEscaper c<font color=Cyan>)</font>-<a name="line-131"></a>                        <font color=Green><u>else</u></font>-<a name="line-132"></a>                           Left <font color=Red>[</font>c<font color=Red>]</font>-<a name="line-133"></a>                        <font color=Cyan>)</font>-<a name="line-134"></a>                     s-<a name="line-135"></a>               <font color=Cyan>)</font>-<a name="line-136"></a>            attValList-<a name="line-137"></a>         <font color=Cyan>)</font>-<a name="line-138"></a>      <font color=Cyan>)</font>-<a name="line-139"></a>-<a name="line-140"></a><a name="escapeContent"></a><font color=Blue>escapeContent</font> <font color=Red>::</font> XmlEscaper <font color=Red>-&gt;</font> <font color=Red>[</font>Content i<font color=Red>]</font> <font color=Red>-&gt;</font> <font color=Red>[</font>Content i<font color=Red>]</font>-<a name="line-141"></a><font color=Blue>escapeContent</font> xmlEscaper contents <font color=Red>=</font>-<a name="line-142"></a>   concat-<a name="line-143"></a>      <font color=Cyan>(</font>map-<a name="line-144"></a>          <font color=Cyan>(</font><font color=Red>\</font> content <font color=Red>-&gt;</font> <font color=Green><u>case</u></font> content <font color=Green><u>of</u></font>-<a name="line-145"></a>             <font color=Cyan>(</font>CString b str i<font color=Cyan>)</font> <font color=Red>-&gt;</font>-<a name="line-146"></a>                map-<a name="line-147"></a>                   <font color=Cyan>(</font><font color=Red>\</font> c <font color=Red>-&gt;</font> <font color=Green><u>if</u></font> isEscape xmlEscaper c-<a name="line-148"></a>                      <font color=Green><u>then</u></font>-<a name="line-149"></a>                         CRef <font color=Cyan>(</font>mkEscape xmlEscaper c<font color=Cyan>)</font> i-<a name="line-150"></a>                      <font color=Green><u>else</u></font>-<a name="line-151"></a>                         CString b <font color=Red>[</font>c<font color=Red>]</font> i-<a name="line-152"></a>                      <font color=Cyan>)</font>-<a name="line-153"></a>                   str-<a name="line-154"></a>             <font color=Cyan>(</font>CElem element i<font color=Cyan>)</font> <font color=Red>-&gt;</font> <font color=Red>[</font>CElem <font color=Cyan>(</font>escapeElement xmlEscaper element<font color=Cyan>)</font> i<font color=Red>]</font>-<a name="line-155"></a>             <font color=Green><u>_</u></font> <font color=Red>-&gt;</font> <font color=Red>[</font>content<font color=Red>]</font>-<a name="line-156"></a>             <font color=Cyan>)</font>-<a name="line-157"></a>          contents-<a name="line-158"></a>          <font color=Cyan>)</font>-<a name="line-159"></a>-<a name="line-160"></a><a name="mkEscape"></a><font color=Blue>mkEscape</font> <font color=Red>::</font> XmlEscaper <font color=Red>-&gt;</font> Char <font color=Red>-&gt;</font> Reference-<a name="line-161"></a><font color=Blue>mkEscape</font> <font color=Cyan>(</font>XmlEscaper <font color=Cyan>{</font>toEscape <font color=Red>=</font> toescape<font color=Cyan>}</font><font color=Cyan>)</font> ch <font color=Red>=</font>-<a name="line-162"></a>   <font color=Green><u>case</u></font> lookupFM toescape ch <font color=Green><u>of</u></font>-<a name="line-163"></a>      Nothing  <font color=Red>-&gt;</font> RefChar <font color=Cyan>(</font>ord ch<font color=Cyan>)</font>-<a name="line-164"></a>      Just str <font color=Red>-&gt;</font> RefEntity str-<a name="line-165"></a><font color=Blue>--    where</font>-<a name="line-166"></a><font color=Blue>--       _ = showIntAtBase 16 intToDigit</font>-<a name="line-167"></a><font color=Blue>--       -- It should be, but in GHC it isn't.</font>-<a name="line-168"></a>-<a name="line-169"></a><font color=Blue>-- ------------------------------------------------------------------------</font>-<a name="line-170"></a><font color=Blue>-- Unescaping</font>-<a name="line-171"></a><font color=Blue>-- ------------------------------------------------------------------------</font>-<a name="line-172"></a>-<a name="line-173"></a><a name="xmlUnEscape"></a><font color=Blue>xmlUnEscape</font> <font color=Red>::</font> XmlEscaper <font color=Red>-&gt;</font> Element i <font color=Red>-&gt;</font> Element i-<a name="line-174"></a><font color=Blue>xmlUnEscape</font> xmlEscaper element <font color=Red>=</font>-<a name="line-175"></a>   compressElement <font color=Cyan>(</font>unEscapeElement xmlEscaper element<font color=Cyan>)</font>-<a name="line-176"></a>-<a name="line-177"></a><a name="xmlUnEscapeContent"></a><font color=Blue>xmlUnEscapeContent</font> <font color=Red>::</font> XmlEscaper <font color=Red>-&gt;</font> <font color=Red>[</font>Content i<font color=Red>]</font> <font color=Red>-&gt;</font> <font color=Red>[</font>Content i<font color=Red>]</font>-<a name="line-178"></a><font color=Blue>xmlUnEscapeContent</font> xmlEscaper cs <font color=Red>=</font>-<a name="line-179"></a>   compressContent <font color=Cyan>(</font>unEscapeContent xmlEscaper cs<font color=Cyan>)</font>-<a name="line-180"></a>-<a name="line-181"></a><a name="unEscapeElement"></a><font color=Blue>unEscapeElement</font> <font color=Red>::</font> XmlEscaper <font color=Red>-&gt;</font> Element i <font color=Red>-&gt;</font> Element i-<a name="line-182"></a><font color=Blue>unEscapeElement</font> xmlEscaper <font color=Cyan>(</font>Elem name attributes content<font color=Cyan>)</font> <font color=Red>=</font>-<a name="line-183"></a>   Elem name <font color=Cyan>(</font>unEscapeAttributes xmlEscaper attributes<font color=Cyan>)</font>-<a name="line-184"></a>      <font color=Cyan>(</font>unEscapeContent xmlEscaper content<font color=Cyan>)</font>-<a name="line-185"></a>-<a name="line-186"></a><a name="unEscapeAttributes"></a><font color=Blue>unEscapeAttributes</font> <font color=Red>::</font> XmlEscaper <font color=Red>-&gt;</font> <font color=Red>[</font>Attribute<font color=Red>]</font> <font color=Red>-&gt;</font> <font color=Red>[</font>Attribute<font color=Red>]</font>-<a name="line-187"></a><font color=Blue>unEscapeAttributes</font> xmlEscaper atts <font color=Red>=</font>-<a name="line-188"></a>   map-<a name="line-189"></a>      <font color=Cyan>(</font><font color=Red>\</font> <font color=Cyan>(</font>name<font color=Cyan>,</font>av<font color=Cyan>)</font> <font color=Red>-&gt;</font> <font color=Cyan>(</font>name<font color=Cyan>,</font>unEscapeAttValue xmlEscaper av<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-190"></a>      atts-<a name="line-191"></a>-<a name="line-192"></a><a name="unEscapeAttValue"></a><font color=Blue>unEscapeAttValue</font> <font color=Red>::</font> XmlEscaper <font color=Red>-&gt;</font> AttValue <font color=Red>-&gt;</font> AttValue-<a name="line-193"></a><font color=Blue>unEscapeAttValue</font> xmlEscaper <font color=Cyan>(</font>AttValue attValList<font color=Cyan>)</font> <font color=Red>=</font>-<a name="line-194"></a>   AttValue <font color=Cyan>(</font>-<a name="line-195"></a>      map-<a name="line-196"></a>         <font color=Cyan>(</font><font color=Red>\</font> av <font color=Red>-&gt;</font> <font color=Green><u>case</u></font> av <font color=Green><u>of</u></font>-<a name="line-197"></a>            Left <font color=Green><u>_</u></font> <font color=Red>-&gt;</font> av-<a name="line-198"></a>            Right ref <font color=Red>-&gt;</font> <font color=Green><u>case</u></font> unEscapeChar xmlEscaper ref <font color=Green><u>of</u></font>-<a name="line-199"></a>               Just c <font color=Red>-&gt;</font> Left <font color=Red>[</font>c<font color=Red>]</font>-<a name="line-200"></a>               Nothing <font color=Red>-&gt;</font> av-<a name="line-201"></a>            <font color=Cyan>)</font>-<a name="line-202"></a>         attValList-<a name="line-203"></a>      <font color=Cyan>)</font>-<a name="line-204"></a>-<a name="line-205"></a><a name="unEscapeContent"></a><font color=Blue>unEscapeContent</font> <font color=Red>::</font> XmlEscaper <font color=Red>-&gt;</font> <font color=Red>[</font>Content i<font color=Red>]</font> <font color=Red>-&gt;</font> <font color=Red>[</font>Content i<font color=Red>]</font>-<a name="line-206"></a><font color=Blue>unEscapeContent</font> xmlEscaper content <font color=Red>=</font>-<a name="line-207"></a>   map-<a name="line-208"></a>      <font color=Cyan>(</font><font color=Red>\</font> cntnt <font color=Red>-&gt;</font> <font color=Green><u>case</u></font> cntnt <font color=Green><u>of</u></font>-<a name="line-209"></a>         CRef ref i <font color=Red>-&gt;</font> <font color=Green><u>case</u></font> unEscapeChar xmlEscaper ref <font color=Green><u>of</u></font>-<a name="line-210"></a>            Just c <font color=Red>-&gt;</font> CString False <font color=Red>[</font>c<font color=Red>]</font> i-<a name="line-211"></a>            Nothing <font color=Red>-&gt;</font> cntnt-<a name="line-212"></a>         CElem element i <font color=Red>-&gt;</font> CElem <font color=Cyan>(</font>unEscapeElement xmlEscaper element<font color=Cyan>)</font> i-<a name="line-213"></a>         <font color=Green><u>_</u></font> <font color=Red>-&gt;</font> cntnt-<a name="line-214"></a>         <font color=Cyan>)</font>-<a name="line-215"></a>      content-<a name="line-216"></a>-<a name="line-217"></a><a name="unEscapeChar"></a><font color=Blue>unEscapeChar</font> <font color=Red>::</font> XmlEscaper <font color=Red>-&gt;</font> Reference <font color=Red>-&gt;</font> Maybe Char-<a name="line-218"></a><font color=Blue>unEscapeChar</font> xmlEscaper ref <font color=Red>=</font>-<a name="line-219"></a>   <font color=Green><u>case</u></font> ref <font color=Green><u>of</u></font>-<a name="line-220"></a>      RefChar i      <font color=Red>-&gt;</font> Just <font color=Cyan>(</font>chr i<font color=Cyan>)</font>-<a name="line-221"></a>      RefEntity name <font color=Red>-&gt;</font> lookupFM <font color=Cyan>(</font>fromEscape xmlEscaper<font color=Cyan>)</font> name-<a name="line-222"></a>-<a name="line-223"></a><font color=Blue>-- ------------------------------------------------------------------------</font>-<a name="line-224"></a><font color=Blue>-- After escaping and unescaping we rebuild the lists, compressing</font>-<a name="line-225"></a><font color=Blue>-- adjacent identical character data.</font>-<a name="line-226"></a><font color=Blue>-- ------------------------------------------------------------------------</font>-<a name="line-227"></a>-<a name="line-228"></a><a name="compressElement"></a><font color=Blue>compressElement</font> <font color=Red>::</font> Element i <font color=Red>-&gt;</font> Element i-<a name="line-229"></a><font color=Blue>compressElement</font> <font color=Cyan>(</font>Elem name attributes content<font color=Cyan>)</font> <font color=Red>=</font>-<a name="line-230"></a>   Elem name <font color=Cyan>(</font>compressAttributes attributes<font color=Cyan>)</font> <font color=Cyan>(</font>compressContent content<font color=Cyan>)</font>-<a name="line-231"></a>-<a name="line-232"></a><a name="compressAttributes"></a><font color=Blue>compressAttributes</font> <font color=Red>::</font> <font color=Red>[</font><font color=Cyan>(</font>Name<font color=Cyan>,</font>AttValue<font color=Cyan>)</font><font color=Red>]</font> <font color=Red>-&gt;</font> <font color=Red>[</font><font color=Cyan>(</font>Name<font color=Cyan>,</font>AttValue<font color=Cyan>)</font><font color=Red>]</font>-<a name="line-233"></a><font color=Blue>compressAttributes</font> atts <font color=Red>=</font>-<a name="line-234"></a>   map-<a name="line-235"></a>      <font color=Cyan>(</font><font color=Red>\</font> <font color=Cyan>(</font>name<font color=Cyan>,</font>av<font color=Cyan>)</font> <font color=Red>-&gt;</font> <font color=Cyan>(</font>name<font color=Cyan>,</font>compressAttValue av<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-236"></a>      atts-<a name="line-237"></a>-<a name="line-238"></a><a name="compressAttValue"></a><font color=Blue>compressAttValue</font> <font color=Red>::</font> AttValue <font color=Red>-&gt;</font> AttValue-<a name="line-239"></a><font color=Blue>compressAttValue</font> <font color=Cyan>(</font>AttValue l<font color=Cyan>)</font> <font color=Red>=</font> AttValue <font color=Cyan>(</font>compress l<font color=Cyan>)</font>-<a name="line-240"></a>   <font color=Green><u>where</u></font>-<a name="line-241"></a>      compress <font color=Red>::</font> <font color=Red>[</font>Either String Reference<font color=Red>]</font> <font color=Red>-&gt;</font> <font color=Red>[</font>Either String Reference<font color=Red>]</font>-<a name="line-242"></a>      compress [] <font color=Red>=</font> []-<a name="line-243"></a>      compress <font color=Cyan>(</font>Right ref <font color=Red><b>:</b></font> es<font color=Cyan>)</font> <font color=Red>=</font> Right ref <font color=Red><b>:</b></font> <font color=Cyan>(</font>compress es<font color=Cyan>)</font>-<a name="line-244"></a>      compress <font color=Cyan>(</font> <font color=Cyan>(</font>ls <font color=Red>@</font> <font color=Cyan>(</font>Left s1<font color=Cyan>)</font><font color=Cyan>)</font> <font color=Red><b>:</b></font> es<font color=Cyan>)</font> <font color=Red>=</font>-<a name="line-245"></a>         <font color=Green><u>case</u></font> compress es <font color=Green><u>of</u></font>-<a name="line-246"></a>            <font color=Cyan>(</font>Left s2 <font color=Red><b>:</b></font> es2<font color=Cyan>)</font> <font color=Red>-&gt;</font> Left <font color=Cyan>(</font>s1 <font color=Cyan>++</font> s2<font color=Cyan>)</font> <font color=Red><b>:</b></font> es2-<a name="line-247"></a>            es2 <font color=Red>-&gt;</font> ls <font color=Red><b>:</b></font> es2-<a name="line-248"></a>-<a name="line-249"></a><a name="compressContent"></a><font color=Blue>compressContent</font> <font color=Red>::</font> <font color=Red>[</font>Content i<font color=Red>]</font> <font color=Red>-&gt;</font> <font color=Red>[</font>Content i<font color=Red>]</font>-<a name="line-250"></a><font color=Blue>compressContent</font> [] <font color=Red>=</font> []-<a name="line-251"></a><font color=Blue>compressContent</font> <font color=Cyan>(</font><font color=Cyan>(</font>csb <font color=Red>@</font> <font color=Cyan>(</font>CString b1 s1 i1<font color=Cyan>)</font><font color=Cyan>)</font> <font color=Red><b>:</b></font> cs<font color=Cyan>)</font> <font color=Red>=</font>-<a name="line-252"></a>   <font color=Green><u>case</u></font> compressContent cs <font color=Green><u>of</u></font>-<a name="line-253"></a>      <font color=Cyan>(</font>CString b2 s2 <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red><b>:</b></font> cs2-<a name="line-254"></a>          <font color=Red>|</font> b1 <font color=Cyan>==</font> b2-<a name="line-255"></a>          <font color=Red>-&gt;</font> CString b1 <font color=Cyan>(</font>s1 <font color=Cyan>++</font> s2<font color=Cyan>)</font> i1<font color=Red><b>:</b></font> cs2-<a name="line-256"></a>      cs2 <font color=Red>-&gt;</font> csb <font color=Red><b>:</b></font> cs2-<a name="line-257"></a><font color=Blue>compressContent</font> <font color=Cyan>(</font>CElem element i <font color=Red><b>:</b></font> cs<font color=Cyan>)</font> <font color=Red>=</font>-<a name="line-258"></a>   CElem <font color=Cyan>(</font>compressElement element<font color=Cyan>)</font> i <font color=Red><b>:</b></font> compressContent cs-<a name="line-259"></a><font color=Blue>compressContent</font> <font color=Cyan>(</font>c <font color=Red><b>:</b></font> cs<font color=Cyan>)</font> <font color=Red>=</font> c <font color=Red><b>:</b></font> compressContent cs-<a name="line-260"></a>-<a name="line-261"></a>-<a name="line-262"></a><font color=Blue>-- ------------------------------------------------------------------------</font>-<a name="line-263"></a><font color=Blue>-- Making XmlEscaper values.</font>-<a name="line-264"></a><font color=Blue>-- ------------------------------------------------------------------------</font>-<a name="line-265"></a>-<a name="line-266"></a><a name="stdXmlEscaper"></a><font color=Blue>stdXmlEscaper</font> <font color=Red>::</font> XmlEscaper-<a name="line-267"></a><font color=Blue>stdXmlEscaper</font> <font color=Red>=</font> mkXmlEscaper-<a name="line-268"></a>   <font color=Red>[</font><font color=Cyan>(</font><font color=Magenta>'\60'</font><font color=Cyan>,</font><font color=Magenta>"lt"</font><font color=Cyan>)</font><font color=Cyan>,</font><font color=Cyan>(</font><font color=Magenta>'\62'</font><font color=Cyan>,</font><font color=Magenta>"gt"</font><font color=Cyan>)</font><font color=Cyan>,</font><font color=Cyan>(</font><font color=Magenta>'\38'</font><font color=Cyan>,</font><font color=Magenta>"amp"</font><font color=Cyan>)</font><font color=Cyan>,</font><font color=Cyan>(</font><font color=Magenta>'\39'</font><font color=Cyan>,</font><font color=Magenta>"apos"</font><font color=Cyan>)</font><font color=Cyan>,</font><font color=Cyan>(</font><font color=Magenta>'\34'</font><font color=Cyan>,</font><font color=Magenta>"quot"</font><font color=Cyan>)</font><font color=Red>]</font>-<a name="line-269"></a>   <font color=Cyan>(</font><font color=Red>\</font> ch <font color=Red>-&gt;</font>-<a name="line-270"></a>      <font color=Green><u>let</u></font>-<a name="line-271"></a>         i <font color=Red>=</font> ord ch-<a name="line-272"></a>      <font color=Green><u>in</u></font>-<a name="line-273"></a>         i <font color=Cyan>&lt;</font> <font color=Magenta>10</font> <font color=Cyan>||</font> <font color=Cyan>(</font><font color=Magenta>10</font><font color=Cyan>&lt;</font>i <font color=Cyan>&amp;&amp;</font> i<font color=Cyan>&lt;</font><font color=Magenta>32</font><font color=Cyan>)</font> <font color=Cyan>||</font> i <font color=Cyan>&gt;=</font> <font color=Magenta>127</font> <font color=Cyan>||</font>-<a name="line-274"></a>            <font color=Green><u>case</u></font> ch <font color=Green><u>of</u></font>-<a name="line-275"></a>               <font color=Magenta>'\''</font> <font color=Red>-&gt;</font> True-<a name="line-276"></a>               <font color=Magenta>'\"'</font> <font color=Red>-&gt;</font> True-<a name="line-277"></a>               <font color=Magenta>'&amp;'</font> <font color=Red>-&gt;</font> True-<a name="line-278"></a>               <font color=Magenta>'&lt;'</font> <font color=Red>-&gt;</font> True-<a name="line-279"></a>               <font color=Magenta>'&gt;'</font> <font color=Red>-&gt;</font> True-<a name="line-280"></a>               <font color=Green><u>_</u></font> <font color=Red>-&gt;</font> False-<a name="line-281"></a>      <font color=Cyan>)</font>-<a name="line-282"></a>-<a name="line-283"></a>-<a name="line-284"></a><a name="mkXmlEscaper"></a><font color=Blue>mkXmlEscaper</font> <font color=Red>::</font> <font color=Red>[</font><font color=Cyan>(</font>Char<font color=Cyan>,</font>String<font color=Cyan>)</font><font color=Red>]</font> <font color=Red>-&gt;</font> <font color=Cyan>(</font>Char <font color=Red>-&gt;</font> Bool<font color=Cyan>)</font> <font color=Red>-&gt;</font> XmlEscaper-<a name="line-285"></a><font color=Blue>mkXmlEscaper</font> escapes isescape <font color=Red>=</font>-<a name="line-286"></a>   XmlEscaper <font color=Cyan>{</font>-<a name="line-287"></a>      toEscape <font color=Red>=</font> listToFM escapes<font color=Cyan>,</font>-<a name="line-288"></a>      fromEscape <font color=Red>=</font> listToFM <font color=Cyan>(</font>map <font color=Cyan>(</font><font color=Red>\</font> <font color=Cyan>(</font>c<font color=Cyan>,</font>str<font color=Cyan>)</font> <font color=Red>-&gt;</font> <font color=Cyan>(</font>str<font color=Cyan>,</font>c<font color=Cyan>)</font><font color=Cyan>)</font> escapes<font color=Cyan>)</font><font color=Cyan>,</font>-<a name="line-289"></a>      isEscape <font color=Red>=</font> isescape-<a name="line-290"></a>      <font color=Cyan>}</font>-<a name="line-291"></a>-</pre>-</body>-</html>
− docs/HaXml/src/Text/XML/HaXml/Html/Generate.html
@@ -1,185 +0,0 @@-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">-<html>-<head>-<!-- Generated by HsColour, http://www.cs.york.ac.uk/fp/darcs/hscolour/ -->-<title>src/Text/XML/HaXml/Html/Generate.hs</title>-</head>-<body>-<pre><a name="line-1"></a><font color=Blue>-- | These are just some common abbreviations for generating HTML</font>-<a name="line-2"></a><font color=Blue>--   content within the XML transformation framework defined</font>-<a name="line-3"></a><font color=Blue>--   by "Text.Xml.HaXml.Combinators".</font>-<a name="line-4"></a><font color=Green><u>module</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Html<font color=Cyan>.</font>Generate-<a name="line-5"></a>  <font color=Cyan>(</font> <font color=Blue>-- * HTML construction filters</font>-<a name="line-6"></a>  <font color=Blue>-- ** Containers</font>-<a name="line-7"></a>    html-<a name="line-8"></a>  <font color=Cyan>,</font> hhead-<a name="line-9"></a>  <font color=Cyan>,</font> htitle-<a name="line-10"></a>  <font color=Cyan>,</font> hbody-<a name="line-11"></a>  <font color=Cyan>,</font> h1<font color=Cyan>,</font> h2<font color=Cyan>,</font> h3<font color=Cyan>,</font> h4-<a name="line-12"></a>  <font color=Cyan>,</font> hpara-<a name="line-13"></a>  <font color=Cyan>,</font> hdiv<font color=Cyan>,</font> hspan<font color=Cyan>,</font> margin-<a name="line-14"></a>  <font color=Blue>-- ** Anchors</font>-<a name="line-15"></a>  <font color=Cyan>,</font> anchor<font color=Cyan>,</font> makehref<font color=Cyan>,</font> anchorname-<a name="line-16"></a>  <font color=Blue>-- ** Text style</font>-<a name="line-17"></a>  <font color=Cyan>,</font> hpre-<a name="line-18"></a>  <font color=Cyan>,</font> hcentre-<a name="line-19"></a>  <font color=Cyan>,</font> hem<font color=Cyan>,</font> htt<font color=Cyan>,</font> hbold-<a name="line-20"></a>  <font color=Cyan>,</font> parens<font color=Cyan>,</font> bullet-<a name="line-21"></a>  <font color=Blue>-- ** Tables</font>-<a name="line-22"></a>  <font color=Cyan>,</font> htable<font color=Cyan>,</font> hrow<font color=Cyan>,</font> hcol-<a name="line-23"></a>  <font color=Blue>-- ** Breaks, lines</font>-<a name="line-24"></a>  <font color=Cyan>,</font> hbr<font color=Cyan>,</font> hhr-<a name="line-25"></a>  <font color=Blue>-- ** Attributes</font>-<a name="line-26"></a>  <font color=Cyan>,</font> showattr<font color=Cyan>,</font> <font color=Cyan>(</font><font color=Cyan>!</font><font color=Cyan>)</font><font color=Cyan>,</font> <font color=Cyan>(</font><font color=Cyan>?</font><font color=Cyan>)</font>-<a name="line-27"></a>  <font color=Blue>-- * A simple HTML pretty-printer</font>-<a name="line-28"></a>  <font color=Cyan>,</font> htmlprint-<a name="line-29"></a>  <font color=Cyan>)</font> <font color=Green><u>where</u></font>-<a name="line-30"></a>-<a name="line-31"></a><font color=Green><u>import</u></font> Char <font color=Cyan>(</font>isSpace<font color=Cyan>)</font>-<a name="line-32"></a>-<a name="line-33"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Types-<a name="line-34"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Combinators-<a name="line-35"></a><font color=Green><u>import</u></font> <font color=Green><u>qualified</u></font> Text<font color=Cyan>.</font>PrettyPrint<font color=Cyan>.</font>HughesPJ <font color=Green><u>as</u></font> Pretty-<a name="line-36"></a>-<a name="line-37"></a><font color=Blue>---- Constructor functions</font>-<a name="line-38"></a>-<a name="line-39"></a><a name="html"></a><font color=Blue>html</font><font color=Cyan>,</font> hhead<font color=Cyan>,</font> htitle<font color=Cyan>,</font> hbody<font color=Cyan>,</font> h1<font color=Cyan>,</font> h2<font color=Cyan>,</font> h3<font color=Cyan>,</font> h4<font color=Cyan>,</font> hpara<font color=Cyan>,</font> hpre<font color=Cyan>,</font> hcentre<font color=Cyan>,</font>-<a name="line-40"></a>    hem<font color=Cyan>,</font> htt<font color=Cyan>,</font> hbold<font color=Cyan>,</font> htable<font color=Cyan>,</font> hrow<font color=Cyan>,</font> hcol<font color=Cyan>,</font> hdiv<font color=Cyan>,</font> hspan<font color=Cyan>,</font> margin-<a name="line-41"></a>       <font color=Red>::</font> <font color=Red>[</font>CFilter i<font color=Red>]</font> <font color=Red>-&gt;</font> CFilter i-<a name="line-42"></a><font color=Blue>html</font>    <font color=Red>=</font> mkElem <font color=Magenta>"html"</font>-<a name="line-43"></a><a name="hhead"></a><font color=Blue>hhead</font>   <font color=Red>=</font> mkElem <font color=Magenta>"head"</font>-<a name="line-44"></a><a name="htitle"></a><font color=Blue>htitle</font>  <font color=Red>=</font> mkElem <font color=Magenta>"title"</font>-<a name="line-45"></a><a name="hbody"></a><font color=Blue>hbody</font>   <font color=Red>=</font> mkElem <font color=Magenta>"body"</font>-<a name="line-46"></a><a name="h1"></a><font color=Blue>h1</font>      <font color=Red>=</font> mkElem <font color=Magenta>"h1"</font>-<a name="line-47"></a><a name="h2"></a><font color=Blue>h2</font>      <font color=Red>=</font> mkElem <font color=Magenta>"h2"</font>-<a name="line-48"></a><a name="h3"></a><font color=Blue>h3</font>      <font color=Red>=</font> mkElem <font color=Magenta>"h3"</font>-<a name="line-49"></a><a name="h4"></a><font color=Blue>h4</font>      <font color=Red>=</font> mkElem <font color=Magenta>"h4"</font>-<a name="line-50"></a><a name="hpara"></a><font color=Blue>hpara</font>   <font color=Red>=</font> mkElem <font color=Magenta>"p"</font>-<a name="line-51"></a><a name="hpre"></a><font color=Blue>hpre</font>    <font color=Red>=</font> mkElem <font color=Magenta>"pre"</font>-<a name="line-52"></a><a name="hcentre"></a><font color=Blue>hcentre</font> <font color=Red>=</font> mkElem <font color=Magenta>"center"</font>-<a name="line-53"></a><a name="hem"></a><font color=Blue>hem</font>     <font color=Red>=</font> mkElem <font color=Magenta>"em"</font>-<a name="line-54"></a><a name="htt"></a><font color=Blue>htt</font>     <font color=Red>=</font> mkElem <font color=Magenta>"tt"</font>-<a name="line-55"></a><a name="hbold"></a><font color=Blue>hbold</font>   <font color=Red>=</font> mkElem <font color=Magenta>"b"</font>-<a name="line-56"></a>-<a name="line-57"></a><a name="htable"></a><font color=Blue>htable</font> <font color=Red>=</font> mkElem <font color=Magenta>"table"</font>-<a name="line-58"></a><a name="hrow"></a><font color=Blue>hrow</font>   <font color=Red>=</font> mkElem <font color=Magenta>"tr"</font>-<a name="line-59"></a><a name="hcol"></a><font color=Blue>hcol</font>   <font color=Red>=</font> mkElem <font color=Magenta>"td"</font>-<a name="line-60"></a>-<a name="line-61"></a><a name="hdiv"></a><font color=Blue>hdiv</font>   <font color=Red>=</font> mkElem <font color=Magenta>"div"</font>-<a name="line-62"></a><a name="hspan"></a><font color=Blue>hspan</font>  <font color=Red>=</font> mkElem <font color=Magenta>"span"</font>-<a name="line-63"></a><a name="margin"></a><font color=Blue>margin</font> <font color=Red>=</font> mkElemAttr <font color=Magenta>"div"</font> <font color=Red>[</font><font color=Cyan>(</font><font color=Magenta>"margin-left"</font><font color=Cyan>,</font><font color=Cyan>(</font><font color=Magenta>"2em"</font><font color=Cyan>!</font><font color=Cyan>)</font><font color=Cyan>)</font><font color=Cyan>,</font>-<a name="line-64"></a>                           <font color=Cyan>(</font><font color=Magenta>"margin-top"</font><font color=Cyan>,</font> <font color=Cyan>(</font><font color=Magenta>"1em"</font><font color=Cyan>!</font><font color=Cyan>)</font><font color=Cyan>)</font><font color=Red>]</font>-<a name="line-65"></a>-<a name="line-66"></a><a name="anchor"></a><font color=Blue>anchor</font>      <font color=Red>::</font> <font color=Red>[</font><font color=Cyan>(</font>String<font color=Cyan>,</font> CFilter i<font color=Cyan>)</font><font color=Red>]</font> <font color=Red>-&gt;</font> <font color=Red>[</font>CFilter i<font color=Red>]</font> <font color=Red>-&gt;</font> CFilter  i-<a name="line-67"></a><font color=Blue>anchor</font>       <font color=Red>=</font> mkElemAttr <font color=Magenta>"a"</font>-<a name="line-68"></a>-<a name="line-69"></a><a name="makehref"></a><font color=Blue>makehref</font><font color=Cyan>,</font> anchorname <font color=Red>::</font> CFilter i <font color=Red>-&gt;</font> <font color=Red>[</font>CFilter i<font color=Red>]</font> <font color=Red>-&gt;</font> CFilter i-<a name="line-70"></a><font color=Blue>makehref</font> r   <font color=Red>=</font> anchor <font color=Red>[</font> <font color=Cyan>(</font><font color=Magenta>"href"</font><font color=Cyan>,</font>r<font color=Cyan>)</font> <font color=Red>]</font>-<a name="line-71"></a><a name="anchorname"></a><font color=Blue>anchorname</font> n <font color=Red>=</font> anchor <font color=Red>[</font> <font color=Cyan>(</font><font color=Magenta>"name"</font><font color=Cyan>,</font>n<font color=Cyan>)</font> <font color=Red>]</font>-<a name="line-72"></a>-<a name="line-73"></a>-<a name="line-74"></a><a name="hbr"></a><font color=Blue>hbr</font><font color=Cyan>,</font> hhr <font color=Red>::</font> CFilter i-<a name="line-75"></a><font color=Blue>hbr</font>       <font color=Red>=</font> mkElem <font color=Magenta>"br"</font> []-<a name="line-76"></a><a name="hhr"></a><font color=Blue>hhr</font>       <font color=Red>=</font> mkElem <font color=Magenta>"hr"</font> []-<a name="line-77"></a>-<a name="line-78"></a>-<a name="line-79"></a><a name="showattr"></a><font color=Blue>showattr</font><font color=Cyan>,</font> <font color=Cyan>(</font><font color=Cyan>!</font><font color=Cyan>)</font><font color=Cyan>,</font> <font color=Cyan>(</font><font color=Cyan>?</font><font color=Cyan>)</font> <font color=Red>::</font> String <font color=Red>-&gt;</font> CFilter i-<a name="line-80"></a><font color=Blue>showattr</font> n <font color=Red>=</font> find n literal-<a name="line-81"></a><a name="!"></a><font color=Cyan>(</font><font color=Cyan>!</font><font color=Cyan>)</font> <font color=Red>=</font> literal-<a name="line-82"></a><a name="?"></a><font color=Cyan>(</font><font color=Cyan>?</font><font color=Cyan>)</font> <font color=Red>=</font> showattr-<a name="line-83"></a>-<a name="line-84"></a><a name="parens"></a><font color=Blue>parens</font> <font color=Red>::</font> CFilter i <font color=Red>-&gt;</font> CFilter i-<a name="line-85"></a><font color=Blue>parens</font> f <font color=Red>=</font> cat <font color=Red>[</font> literal <font color=Magenta>"("</font><font color=Cyan>,</font> f<font color=Cyan>,</font> literal <font color=Magenta>")"</font> <font color=Red>]</font>-<a name="line-86"></a>-<a name="line-87"></a><a name="bullet"></a><font color=Blue>bullet</font> <font color=Red>::</font> <font color=Red>[</font>CFilter i<font color=Red>]</font> <font color=Red>-&gt;</font> CFilter i-<a name="line-88"></a><font color=Blue>bullet</font> <font color=Red>=</font> cat <font color=Cyan>.</font> <font color=Cyan>(</font>literal <font color=Magenta>"M-^U"</font><font color=Red><b>:</b></font><font color=Cyan>)</font>-<a name="line-89"></a>-<a name="line-90"></a>-<a name="line-91"></a><font color=Blue>---- Printing function</font>-<a name="line-92"></a>-<a name="line-93"></a><font color=Blue>-- htmlprint :: [Content] -&gt; String</font>-<a name="line-94"></a><font color=Blue>-- htmlprint = concatMap cprint</font>-<a name="line-95"></a><font color=Blue>--   where</font>-<a name="line-96"></a><font color=Blue>--   cprint (CElem e _) = elem e</font>-<a name="line-97"></a><font color=Blue>--   cprint (CString _ s) = s</font>-<a name="line-98"></a><font color=Blue>--   cprint (CMisc m) = ""</font>-<a name="line-99"></a><font color=Blue>--</font>-<a name="line-100"></a><font color=Blue>--   elem (Elem n as []) = "\n&lt;"++n++attrs as++" /&gt;"</font>-<a name="line-101"></a><font color=Blue>--   elem (Elem n as cs) = "\n&lt;"++n++attrs as++"&gt;"++htmlprint cs++"\n&lt;/"++n++"&gt;"</font>-<a name="line-102"></a><font color=Blue>--</font>-<a name="line-103"></a><font color=Blue>--   attrs = concatMap attr</font>-<a name="line-104"></a><font color=Blue>--   attr (n,v) = " "++n++"='"++v++"'"</font>-<a name="line-105"></a>-<a name="line-106"></a>-<a name="line-107"></a><a name="htmlprint"></a><font color=Blue>htmlprint</font> <font color=Red>::</font> <font color=Red>[</font>Content i<font color=Red>]</font> <font color=Red>-&gt;</font> Pretty<font color=Cyan>.</font>Doc-<a name="line-108"></a><font color=Blue>htmlprint</font> <font color=Red>=</font> Pretty<font color=Cyan>.</font>cat <font color=Cyan>.</font> map cprint <font color=Cyan>.</font> foldrefs-<a name="line-109"></a>  <font color=Green><u>where</u></font>-<a name="line-110"></a>  foldrefs [] <font color=Red>=</font> []-<a name="line-111"></a>  foldrefs <font color=Cyan>(</font>CString ws s1 i<font color=Red><b>:</b></font>CRef r <font color=Green><u>_</u></font><font color=Red><b>:</b></font>CString <font color=Green><u>_</u></font> s2 <font color=Green><u>_</u></font><font color=Red><b>:</b></font>cs<font color=Cyan>)</font> <font color=Red>=</font>-<a name="line-112"></a>              CString ws <font color=Cyan>(</font>s1<font color=Cyan>++</font><font color=Magenta>"&amp;"</font><font color=Cyan>++</font>ref r<font color=Cyan>++</font><font color=Magenta>";"</font><font color=Cyan>++</font>s2<font color=Cyan>)</font> i<font color=Red><b>:</b></font> foldrefs cs-<a name="line-113"></a>  foldrefs <font color=Cyan>(</font>c<font color=Red><b>:</b></font>cs<font color=Cyan>)</font> <font color=Red>=</font> c <font color=Red><b>:</b></font> foldrefs cs-<a name="line-114"></a>-<a name="line-115"></a><font color=Blue>--ref (RefEntity (EntityRef n)) = n     -- Actually, should look-up symtable.</font>-<a name="line-116"></a><font color=Blue>--ref (RefChar (CharRef s)) = s</font>-<a name="line-117"></a>  ref <font color=Cyan>(</font>RefEntity n<font color=Cyan>)</font> <font color=Red>=</font> n <font color=Blue>-- Actually, should look-up symtable.</font>-<a name="line-118"></a>  ref <font color=Cyan>(</font>RefChar s<font color=Cyan>)</font> <font color=Red>=</font> show s-<a name="line-119"></a>-<a name="line-120"></a>  cprint <font color=Cyan>(</font>CElem e <font color=Green><u>_</u></font><font color=Cyan>)</font>      <font color=Red>=</font> element e-<a name="line-121"></a>  cprint <font color=Cyan>(</font>CString ws s <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red>=</font> Pretty<font color=Cyan>.</font>cat <font color=Cyan>(</font>map Pretty<font color=Cyan>.</font>text <font color=Cyan>(</font>fmt <font color=Magenta>60</font>-<a name="line-122"></a>                                             <font color=Cyan>(</font><font color=Cyan>(</font><font color=Green><u>if</u></font> ws <font color=Green><u>then</u></font> id <font color=Green><u>else</u></font> deSpace<font color=Cyan>)</font> s<font color=Cyan>)</font><font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-123"></a>  cprint <font color=Cyan>(</font>CRef r <font color=Green><u>_</u></font><font color=Cyan>)</font>       <font color=Red>=</font> Pretty<font color=Cyan>.</font>text <font color=Cyan>(</font><font color=Magenta>"&amp;"</font><font color=Cyan>++</font>ref r<font color=Cyan>++</font><font color=Magenta>";"</font><font color=Cyan>)</font>-<a name="line-124"></a>  cprint <font color=Cyan>(</font>CMisc <font color=Green><u>_</u></font> <font color=Green><u>_</u></font><font color=Cyan>)</font>      <font color=Red>=</font> Pretty<font color=Cyan>.</font>empty-<a name="line-125"></a>-<a name="line-126"></a>  element <font color=Cyan>(</font>Elem n <font color=Green><u>as</u></font> []<font color=Cyan>)</font> <font color=Red>=</font> Pretty<font color=Cyan>.</font>text <font color=Magenta>"&lt;"</font>   Pretty<font color=Cyan>.&lt;&gt;</font>-<a name="line-127"></a>                        Pretty<font color=Cyan>.</font>text n     Pretty<font color=Cyan>.&lt;&gt;</font>-<a name="line-128"></a>                        attrs <font color=Green><u>as</u></font>          Pretty<font color=Cyan>.&lt;&gt;</font>-<a name="line-129"></a>                        Pretty<font color=Cyan>.</font>text <font color=Magenta>" /&gt;"</font>-<a name="line-130"></a>  element <font color=Cyan>(</font>Elem n <font color=Green><u>as</u></font> cs<font color=Cyan>)</font> <font color=Red>=</font>-<a name="line-131"></a>                    <font color=Blue>--  ( Pretty.text "&lt;"   Pretty.&lt;&gt;</font>-<a name="line-132"></a>                    <font color=Blue>--    Pretty.text n     Pretty.&lt;&gt;</font>-<a name="line-133"></a>                    <font color=Blue>--    attrs as          Pretty.&lt;&gt;</font>-<a name="line-134"></a>                    <font color=Blue>--    Pretty.text "&gt;")  Pretty.$$</font>-<a name="line-135"></a>                    <font color=Blue>--  Pretty.nest 6 (htmlprint cs)  Pretty.$$</font>-<a name="line-136"></a>                    <font color=Blue>--  ( Pretty.text "&lt;/"  Pretty.&lt;&gt;</font>-<a name="line-137"></a>                    <font color=Blue>--    Pretty.text n     Pretty.&lt;&gt;</font>-<a name="line-138"></a>                    <font color=Blue>--    Pretty.text "&gt;" )</font>-<a name="line-139"></a>                        Pretty<font color=Cyan>.</font>fcat <font color=Red>[</font> <font color=Cyan>(</font> Pretty<font color=Cyan>.</font>text <font color=Magenta>"&lt;"</font>   Pretty<font color=Cyan>.&lt;&gt;</font>-<a name="line-140"></a>                                        Pretty<font color=Cyan>.</font>text n     Pretty<font color=Cyan>.&lt;&gt;</font>-<a name="line-141"></a>                                        attrs <font color=Green><u>as</u></font>          Pretty<font color=Cyan>.&lt;&gt;</font>-<a name="line-142"></a>                                        Pretty<font color=Cyan>.</font>text <font color=Magenta>"&gt;"</font><font color=Cyan>)</font>-<a name="line-143"></a>                                    <font color=Cyan>,</font> Pretty<font color=Cyan>.</font>nest <font color=Magenta>4</font> <font color=Cyan>(</font>htmlprint cs<font color=Cyan>)</font>-<a name="line-144"></a>                                    <font color=Cyan>,</font> <font color=Cyan>(</font> Pretty<font color=Cyan>.</font>text <font color=Magenta>"&lt;/"</font>  Pretty<font color=Cyan>.&lt;&gt;</font>-<a name="line-145"></a>                                        Pretty<font color=Cyan>.</font>text n     Pretty<font color=Cyan>.&lt;&gt;</font>-<a name="line-146"></a>                                        Pretty<font color=Cyan>.</font>text <font color=Magenta>"&gt;"</font> <font color=Cyan>)</font>-<a name="line-147"></a>                                    <font color=Red>]</font>-<a name="line-148"></a>-<a name="line-149"></a>  attrs <font color=Red>=</font> Pretty<font color=Cyan>.</font>cat <font color=Cyan>.</font> map attribute-<a name="line-150"></a>  attribute <font color=Cyan>(</font>n<font color=Cyan>,</font>v<font color=Red>@</font><font color=Cyan>(</font>AttValue <font color=Green><u>_</u></font><font color=Cyan>)</font><font color=Cyan>)</font> <font color=Red>=</font>-<a name="line-151"></a>               Pretty<font color=Cyan>.</font>text <font color=Magenta>" "</font>  Pretty<font color=Cyan>.&lt;&gt;</font>-<a name="line-152"></a>               Pretty<font color=Cyan>.</font>text n    Pretty<font color=Cyan>.&lt;&gt;</font>-<a name="line-153"></a>               Pretty<font color=Cyan>.</font>text <font color=Magenta>"='"</font> Pretty<font color=Cyan>.&lt;&gt;</font>-<a name="line-154"></a>               Pretty<font color=Cyan>.</font>text <font color=Cyan>(</font>show v<font color=Cyan>)</font> Pretty<font color=Cyan>.&lt;&gt;</font>-<a name="line-155"></a>               Pretty<font color=Cyan>.</font>text <font color=Magenta>"'"</font>-<a name="line-156"></a>-<a name="line-157"></a>  fmt <font color=Green><u>_</u></font> [] <font color=Red>=</font> []-<a name="line-158"></a>  fmt n s  <font color=Red>=</font> <font color=Green><u>let</u></font> <font color=Cyan>(</font>top<font color=Cyan>,</font>bot<font color=Cyan>)</font> <font color=Red>=</font> splitAt n s-<a name="line-159"></a>                 <font color=Cyan>(</font>word<font color=Cyan>,</font>left<font color=Cyan>)</font> <font color=Red>=</font> keepUntil isSpace <font color=Cyan>(</font>reverse top<font color=Cyan>)</font>-<a name="line-160"></a>             <font color=Green><u>in</u></font> <font color=Green><u>if</u></font> length top <font color=Cyan>&lt;</font> n <font color=Green><u>then</u></font> <font color=Red>[</font>s<font color=Red>]</font>-<a name="line-161"></a>                <font color=Green><u>else</u></font> <font color=Green><u>if</u></font> not <font color=Cyan>(</font>null left<font color=Cyan>)</font> <font color=Green><u>then</u></font>-<a name="line-162"></a>                     reverse left<font color=Red><b>:</b></font> fmt n <font color=Cyan>(</font>word<font color=Cyan>++</font>bot<font color=Cyan>)</font>-<a name="line-163"></a>                <font color=Green><u>else</u></font> <font color=Green><u>let</u></font> <font color=Cyan>(</font>big<font color=Cyan>,</font>rest<font color=Cyan>)</font> <font color=Red>=</font> keepUntil isSpace s-<a name="line-164"></a>                     <font color=Green><u>in</u></font> reverse big<font color=Red><b>:</b></font> fmt n rest-<a name="line-165"></a>-<a name="line-166"></a>  deSpace []     <font color=Red>=</font> []-<a name="line-167"></a>  deSpace <font color=Cyan>(</font>c<font color=Red><b>:</b></font>cs<font color=Cyan>)</font> <font color=Red>|</font> c<font color=Cyan>==</font><font color=Magenta>'\n'</font>   <font color=Red>=</font> deSpace <font color=Cyan>(</font><font color=Magenta>' '</font><font color=Red><b>:</b></font>cs<font color=Cyan>)</font>-<a name="line-168"></a>                 <font color=Red>|</font> isSpace c <font color=Red>=</font> c <font color=Red><b>:</b></font> deSpace <font color=Cyan>(</font>dropWhile isSpace cs<font color=Cyan>)</font>-<a name="line-169"></a>                 <font color=Red>|</font> otherwise <font color=Red>=</font> c <font color=Red><b>:</b></font> deSpace cs-<a name="line-170"></a>-<a name="line-171"></a>  keepUntil p xs <font color=Red>=</font> select p <font color=Cyan>(</font>[]<font color=Cyan>,</font>xs<font color=Cyan>)</font>-<a name="line-172"></a>      <font color=Green><u>where</u></font> select <font color=Green><u>_</u></font> <font color=Cyan>(</font>ls<font color=Cyan>,</font>[]<font color=Cyan>)</font>     <font color=Red>=</font> <font color=Cyan>(</font>ls<font color=Cyan>,</font>[]<font color=Cyan>)</font>-<a name="line-173"></a>            select q <font color=Cyan>(</font>ls<font color=Cyan>,</font><font color=Cyan>(</font>y<font color=Red><b>:</b></font>ys<font color=Cyan>)</font><font color=Cyan>)</font> <font color=Red>|</font> q y       <font color=Red>=</font> <font color=Cyan>(</font>ls<font color=Cyan>,</font>y<font color=Red><b>:</b></font>ys<font color=Cyan>)</font>-<a name="line-174"></a>                                 <font color=Red>|</font> otherwise <font color=Red>=</font> select q <font color=Cyan>(</font>y<font color=Red><b>:</b></font>ls<font color=Cyan>,</font>ys<font color=Cyan>)</font>-<a name="line-175"></a>-</pre>-</body>-</html>
− docs/HaXml/src/Text/XML/HaXml/Html/Parse.html
@@ -1,734 +0,0 @@-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">-<html>-<head>-<!-- Generated by HsColour, http://www.cs.york.ac.uk/fp/darcs/hscolour/ -->-<title>src/Text/XML/HaXml/Html/Parse.hs</title>-</head>-<body>-<pre><a name="line-1"></a><font color=Blue>-- | This is a parser for HTML documents.  Unlike for XML documents, it</font>-<a name="line-2"></a><font color=Blue>--   must include a certain amount of error-correction to account for</font>-<a name="line-3"></a><font color=Blue>--   HTML features like self-terminating tags, unterminated tags, and</font>-<a name="line-4"></a><font color=Blue>--   incorrect nesting.  The input is tokenised by the</font>-<a name="line-5"></a><font color=Blue>--   XML lexer (a separate lexer is not required for HTML).</font>-<a name="line-6"></a>-<a name="line-7"></a><font color=Blue>-- It uses a slightly extended version of the Hutton/Meijer parser</font>-<a name="line-8"></a><font color=Blue>-- combinators.</font>-<a name="line-9"></a>-<a name="line-10"></a><font color=Green><u>module</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Html<font color=Cyan>.</font>Parse-<a name="line-11"></a>  <font color=Cyan>(</font> htmlParse-<a name="line-12"></a>  <font color=Cyan>)</font> <font color=Green><u>where</u></font>-<a name="line-13"></a>-<a name="line-14"></a><font color=Green><u>import</u></font> Prelude hiding <font color=Cyan>(</font>either<font color=Cyan>,</font>maybe<font color=Cyan>,</font>sequence<font color=Cyan>)</font>-<a name="line-15"></a><font color=Green><u>import</u></font> <font color=Green><u>qualified</u></font> Prelude <font color=Cyan>(</font>either<font color=Cyan>)</font>-<a name="line-16"></a><font color=Green><u>import</u></font> Maybe hiding <font color=Cyan>(</font>maybe<font color=Cyan>)</font>-<a name="line-17"></a><font color=Green><u>import</u></font> Char <font color=Cyan>(</font>toLower<font color=Cyan>,</font> isSpace<font color=Cyan>,</font> isDigit<font color=Cyan>,</font> isHexDigit<font color=Cyan>)</font>-<a name="line-18"></a><font color=Green><u>import</u></font> Numeric <font color=Cyan>(</font>readDec<font color=Cyan>,</font>readHex<font color=Cyan>)</font>-<a name="line-19"></a><font color=Green><u>import</u></font> Monad-<a name="line-20"></a>-<a name="line-21"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Types-<a name="line-22"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Lex-<a name="line-23"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Posn-<a name="line-24"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>ParserCombinators<font color=Cyan>.</font>Poly<font color=Cyan>.</font>Plain-<a name="line-25"></a>-<a name="line-26"></a><font color=Blue>--  #define DEBUG</font>-<a name="line-27"></a> -<a name="line-28"></a><font color=Magenta><em>#if defined(DEBUG)</em></font>-<a name="line-29"></a><font color=Magenta><em>#  if ( defined(__GLASGOW_HASKELL__) &amp;&amp; __GLASGOW_HASKELL__ &gt; 502 ) || \</em></font>-<a name="line-30"></a>      <font color=Cyan>(</font> defined<font color=Cyan>(</font><b><font color=Magenta>__NHC__</font></b><font color=Cyan>)</font> <font color=Cyan>&amp;&amp;</font> <b><font color=Magenta>__NHC__</font></b> <font color=Cyan>&gt;</font> <font color=Magenta>114</font> <font color=Cyan>)</font> <font color=Cyan>||</font> defined<font color=Cyan>(</font><b><font color=Magenta>__HUGS__</font></b><font color=Cyan>)</font>-<a name="line-31"></a><font color=Green><u>import</u></font> Debug<font color=Cyan>.</font>Trace<font color=Cyan>(</font>trace<font color=Cyan>)</font>-<a name="line-32"></a><font color=Magenta><em>#  elif defined(__GLASGOW_HASKELL__)</em></font>-<a name="line-33"></a><font color=Green><u>import</u></font> IOExts<font color=Cyan>(</font>trace<font color=Cyan>)</font>-<a name="line-34"></a><font color=Magenta><em>#  elif defined(__NHC__) || defined(__HBC__)</em></font>-<a name="line-35"></a><font color=Green><u>import</u></font> NonStdTrace-<a name="line-36"></a><font color=Magenta><em>#  endif</em></font>-<a name="line-37"></a><a name="debug"></a><font color=Blue>debug</font> <font color=Red>::</font> Monad m <font color=Red>=&gt;</font> String <font color=Red>-&gt;</font> m ()-<a name="line-38"></a><font color=Blue>debug</font> s <font color=Red>=</font> trace s <font color=Cyan>(</font>return ()<font color=Cyan>)</font>-<a name="line-39"></a><font color=Magenta><em>#else</em></font>-<a name="line-40"></a><font color=Blue>debug</font> <font color=Red>::</font> Monad m <font color=Red>=&gt;</font> String <font color=Red>-&gt;</font> m ()-<a name="line-41"></a><font color=Blue>debug</font> s <font color=Red>=</font> return ()-<a name="line-42"></a><font color=Magenta><em>#endif</em></font>-<a name="line-43"></a>-<a name="line-44"></a>-<a name="line-45"></a><a name="htmlParse"></a><font color=Blue>-- | The first argument is the name of the file, the second is the string</font>-<a name="line-46"></a><font color=Blue>--   contents of the file.  The result is the generic representation of</font>-<a name="line-47"></a><font color=Blue>--   an XML document.  Any errors cause program failure with message to stderr.</font>-<a name="line-48"></a><font color=Blue>htmlParse</font> <font color=Red>::</font> String <font color=Red>-&gt;</font> String <font color=Red>-&gt;</font> Document Posn-<a name="line-49"></a><font color=Blue>htmlParse</font> name <font color=Red>=</font> Prelude<font color=Cyan>.</font>either error id <font color=Cyan>.</font> htmlParse' name-<a name="line-50"></a>-<a name="line-51"></a><a name="htmlParse'"></a><font color=Blue>-- | The first argument is the name of the file, the second is the string</font>-<a name="line-52"></a><font color=Blue>--   contents of the file.  The result is the generic representation of</font>-<a name="line-53"></a><font color=Blue>--   an XML document.  Any parsing errors are returned in the @Either@ type.</font>-<a name="line-54"></a><font color=Blue>htmlParse'</font> <font color=Red>::</font> String <font color=Red>-&gt;</font> String <font color=Red>-&gt;</font> Either String <font color=Cyan>(</font>Document Posn<font color=Cyan>)</font>-<a name="line-55"></a><font color=Blue>htmlParse'</font> name <font color=Red>=</font> Prelude<font color=Cyan>.</font>either Left <font color=Cyan>(</font>Right <font color=Cyan>.</font> simplify<font color=Cyan>)</font> <font color=Cyan>.</font> fst-<a name="line-56"></a>                  <font color=Cyan>.</font> runParser document <font color=Cyan>.</font> xmlLex name-<a name="line-57"></a>-<a name="line-58"></a><font color=Blue>---- Document simplification ----</font>-<a name="line-59"></a>-<a name="line-60"></a><a name="simplify"></a><font color=Blue>simplify</font> <font color=Red>::</font> Document i <font color=Red>-&gt;</font> Document i-<a name="line-61"></a><font color=Blue>simplify</font> <font color=Cyan>(</font>Document p st <font color=Cyan>(</font>Elem n avs cs<font color=Cyan>)</font> ms<font color=Cyan>)</font> <font color=Red>=</font>-<a name="line-62"></a>    Document p st <font color=Cyan>(</font>Elem n avs <font color=Cyan>(</font>deepfilter simp cs<font color=Cyan>)</font><font color=Cyan>)</font> ms-<a name="line-63"></a>  <font color=Green><u>where</u></font>-<a name="line-64"></a>    simp <font color=Cyan>(</font>CElem <font color=Cyan>(</font>Elem <font color=Magenta>"null"</font> [] []<font color=Cyan>)</font> <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red>=</font> False-<a name="line-65"></a>    simp <font color=Cyan>(</font>CElem <font color=Cyan>(</font>Elem  n     <font color=Green><u>_</u></font>  []<font color=Cyan>)</font> <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red>|</font> n <font color=Cyan>`elem`</font> <font color=Red>[</font><font color=Magenta>"font"</font><font color=Cyan>,</font><font color=Magenta>"p"</font><font color=Cyan>,</font><font color=Magenta>"i"</font><font color=Cyan>,</font><font color=Magenta>"b"</font><font color=Cyan>,</font><font color=Magenta>"em"</font>-<a name="line-66"></a>                                                  <font color=Cyan>,</font><font color=Magenta>"tt"</font><font color=Cyan>,</font><font color=Magenta>"big"</font><font color=Cyan>,</font><font color=Magenta>"small"</font><font color=Red>]</font> <font color=Red>=</font> False-<a name="line-67"></a> <font color=Blue>-- simp (CString False s _) | all isSpace s = False</font>-<a name="line-68"></a>    simp <font color=Green><u>_</u></font> <font color=Red>=</font> True-<a name="line-69"></a>    deepfilter p <font color=Red>=</font>-<a name="line-70"></a>        filter p <font color=Cyan>.</font> map <font color=Cyan>(</font><font color=Red>\</font>c<font color=Red>-&gt;</font> <font color=Green><u>case</u></font> c <font color=Green><u>of</u></font>-<a name="line-71"></a>                          CElem <font color=Cyan>(</font>Elem n avs cs<font color=Cyan>)</font> i-<a name="line-72"></a>                                  <font color=Red>-&gt;</font> CElem <font color=Cyan>(</font>Elem n avs <font color=Cyan>(</font>deepfilter p cs<font color=Cyan>)</font><font color=Cyan>)</font> i-<a name="line-73"></a>                          <font color=Green><u>_</u></font>       <font color=Red>-&gt;</font> c<font color=Cyan>)</font>-<a name="line-74"></a>-<a name="line-75"></a><a name="selfclosingtags"></a><font color=Blue>-- opening any of these, they close again immediately</font>-<a name="line-76"></a><font color=Blue>selfclosingtags</font> <font color=Red>=</font> <font color=Red>[</font><font color=Magenta>"img"</font><font color=Cyan>,</font><font color=Magenta>"hr"</font><font color=Cyan>,</font><font color=Magenta>"br"</font><font color=Cyan>,</font><font color=Magenta>"meta"</font><font color=Cyan>,</font><font color=Magenta>"col"</font><font color=Cyan>,</font><font color=Magenta>"link"</font><font color=Cyan>,</font><font color=Magenta>"base"</font>-<a name="line-77"></a>                  <font color=Cyan>,</font><font color=Magenta>"param"</font><font color=Cyan>,</font><font color=Magenta>"area"</font><font color=Cyan>,</font><font color=Magenta>"frame"</font><font color=Cyan>,</font><font color=Magenta>"input"</font><font color=Red>]</font>-<a name="line-78"></a>-<a name="line-79"></a><a name="closeInnerTags"></a><font color=Blue>--closing this, implicitly closes any of those which are contained in it</font>-<a name="line-80"></a><font color=Blue>closeInnerTags</font> <font color=Red>=</font>-<a name="line-81"></a>  <font color=Red>[</font> <font color=Cyan>(</font><font color=Magenta>"ul"</font><font color=Cyan>,</font>      <font color=Red>[</font><font color=Magenta>"li"</font><font color=Red>]</font><font color=Cyan>)</font>-<a name="line-82"></a>  <font color=Cyan>,</font> <font color=Cyan>(</font><font color=Magenta>"ol"</font><font color=Cyan>,</font>      <font color=Red>[</font><font color=Magenta>"li"</font><font color=Red>]</font><font color=Cyan>)</font>-<a name="line-83"></a>  <font color=Cyan>,</font> <font color=Cyan>(</font><font color=Magenta>"dl"</font><font color=Cyan>,</font>      <font color=Red>[</font><font color=Magenta>"dt"</font><font color=Cyan>,</font><font color=Magenta>"dd"</font><font color=Red>]</font><font color=Cyan>)</font>-<a name="line-84"></a>  <font color=Cyan>,</font> <font color=Cyan>(</font><font color=Magenta>"tr"</font><font color=Cyan>,</font>      <font color=Red>[</font><font color=Magenta>"th"</font><font color=Cyan>,</font><font color=Magenta>"td"</font><font color=Red>]</font><font color=Cyan>)</font>-<a name="line-85"></a>  <font color=Cyan>,</font> <font color=Cyan>(</font><font color=Magenta>"div"</font><font color=Cyan>,</font>     <font color=Red>[</font><font color=Magenta>"p"</font><font color=Red>]</font><font color=Cyan>)</font>-<a name="line-86"></a>  <font color=Cyan>,</font> <font color=Cyan>(</font><font color=Magenta>"thead"</font><font color=Cyan>,</font>   <font color=Red>[</font><font color=Magenta>"th"</font><font color=Cyan>,</font><font color=Magenta>"tr"</font><font color=Cyan>,</font><font color=Magenta>"td"</font><font color=Red>]</font><font color=Cyan>)</font>-<a name="line-87"></a>  <font color=Cyan>,</font> <font color=Cyan>(</font><font color=Magenta>"tfoot"</font><font color=Cyan>,</font>   <font color=Red>[</font><font color=Magenta>"th"</font><font color=Cyan>,</font><font color=Magenta>"tr"</font><font color=Cyan>,</font><font color=Magenta>"td"</font><font color=Red>]</font><font color=Cyan>)</font>-<a name="line-88"></a>  <font color=Cyan>,</font> <font color=Cyan>(</font><font color=Magenta>"tbody"</font><font color=Cyan>,</font>   <font color=Red>[</font><font color=Magenta>"th"</font><font color=Cyan>,</font><font color=Magenta>"tr"</font><font color=Cyan>,</font><font color=Magenta>"td"</font><font color=Red>]</font><font color=Cyan>)</font>-<a name="line-89"></a>  <font color=Cyan>,</font> <font color=Cyan>(</font><font color=Magenta>"table"</font><font color=Cyan>,</font>   <font color=Red>[</font><font color=Magenta>"th"</font><font color=Cyan>,</font><font color=Magenta>"tr"</font><font color=Cyan>,</font><font color=Magenta>"td"</font><font color=Cyan>,</font><font color=Magenta>"thead"</font><font color=Cyan>,</font><font color=Magenta>"tfoot"</font><font color=Cyan>,</font><font color=Magenta>"tbody"</font><font color=Red>]</font><font color=Cyan>)</font>-<a name="line-90"></a>  <font color=Cyan>,</font> <font color=Cyan>(</font><font color=Magenta>"caption"</font><font color=Cyan>,</font> <font color=Red>[</font><font color=Magenta>"p"</font><font color=Red>]</font><font color=Cyan>)</font>-<a name="line-91"></a>  <font color=Cyan>,</font> <font color=Cyan>(</font><font color=Magenta>"th"</font><font color=Cyan>,</font>      <font color=Red>[</font><font color=Magenta>"p"</font><font color=Red>]</font><font color=Cyan>)</font>-<a name="line-92"></a>  <font color=Cyan>,</font> <font color=Cyan>(</font><font color=Magenta>"td"</font><font color=Cyan>,</font>      <font color=Red>[</font><font color=Magenta>"p"</font><font color=Red>]</font><font color=Cyan>)</font>-<a name="line-93"></a>  <font color=Cyan>,</font> <font color=Cyan>(</font><font color=Magenta>"li"</font><font color=Cyan>,</font>      <font color=Red>[</font><font color=Magenta>"p"</font><font color=Red>]</font><font color=Cyan>)</font>-<a name="line-94"></a>  <font color=Cyan>,</font> <font color=Cyan>(</font><font color=Magenta>"dt"</font><font color=Cyan>,</font>      <font color=Red>[</font><font color=Magenta>"p"</font><font color=Red>]</font><font color=Cyan>)</font>-<a name="line-95"></a>  <font color=Cyan>,</font> <font color=Cyan>(</font><font color=Magenta>"dd"</font><font color=Cyan>,</font>      <font color=Red>[</font><font color=Magenta>"p"</font><font color=Red>]</font><font color=Cyan>)</font>-<a name="line-96"></a>  <font color=Cyan>,</font> <font color=Cyan>(</font><font color=Magenta>"object"</font><font color=Cyan>,</font>  <font color=Red>[</font><font color=Magenta>"p"</font><font color=Red>]</font><font color=Cyan>)</font>-<a name="line-97"></a>  <font color=Cyan>,</font> <font color=Cyan>(</font><font color=Magenta>"map"</font><font color=Cyan>,</font>     <font color=Red>[</font><font color=Magenta>"p"</font><font color=Red>]</font><font color=Cyan>)</font>-<a name="line-98"></a>  <font color=Cyan>,</font> <font color=Cyan>(</font><font color=Magenta>"body"</font><font color=Cyan>,</font>    <font color=Red>[</font><font color=Magenta>"p"</font><font color=Red>]</font><font color=Cyan>)</font>-<a name="line-99"></a>  <font color=Red>]</font>-<a name="line-100"></a>-<a name="line-101"></a><a name="closes"></a><font color=Blue>--opening this, implicitly closes that</font>-<a name="line-102"></a><font color=Blue>closes</font> <font color=Red>::</font> Name <font color=Red>-&gt;</font> Name <font color=Red>-&gt;</font> Bool-<a name="line-103"></a><font color=Magenta>"a"</font>  <font color=Cyan>`closes`</font> <font color=Magenta>"a"</font>   <font color=Red>=</font>  True-<a name="line-104"></a><font color=Magenta>"li"</font> <font color=Cyan>`closes`</font> <font color=Magenta>"li"</font>  <font color=Red>=</font>  True-<a name="line-105"></a><font color=Magenta>"th"</font> <font color=Cyan>`closes`</font>  t    <font color=Red>|</font> t <font color=Cyan>`elem`</font> <font color=Red>[</font><font color=Magenta>"th"</font><font color=Cyan>,</font><font color=Magenta>"td"</font><font color=Red>]</font>      <font color=Red>=</font>  True-<a name="line-106"></a><font color=Magenta>"td"</font> <font color=Cyan>`closes`</font>  t    <font color=Red>|</font> t <font color=Cyan>`elem`</font> <font color=Red>[</font><font color=Magenta>"th"</font><font color=Cyan>,</font><font color=Magenta>"td"</font><font color=Red>]</font>      <font color=Red>=</font>  True-<a name="line-107"></a><font color=Magenta>"tr"</font> <font color=Cyan>`closes`</font>  t    <font color=Red>|</font> t <font color=Cyan>`elem`</font> <font color=Red>[</font><font color=Magenta>"th"</font><font color=Cyan>,</font><font color=Magenta>"td"</font><font color=Cyan>,</font><font color=Magenta>"tr"</font><font color=Red>]</font> <font color=Red>=</font>  True-<a name="line-108"></a><font color=Magenta>"dt"</font> <font color=Cyan>`closes`</font>  t    <font color=Red>|</font> t <font color=Cyan>`elem`</font> <font color=Red>[</font><font color=Magenta>"dt"</font><font color=Cyan>,</font><font color=Magenta>"dd"</font><font color=Red>]</font>      <font color=Red>=</font>  True-<a name="line-109"></a><font color=Magenta>"dd"</font> <font color=Cyan>`closes`</font>  t    <font color=Red>|</font> t <font color=Cyan>`elem`</font> <font color=Red>[</font><font color=Magenta>"dt"</font><font color=Cyan>,</font><font color=Magenta>"dd"</font><font color=Red>]</font>      <font color=Red>=</font>  True-<a name="line-110"></a><font color=Magenta>"form"</font>  <font color=Cyan>`closes`</font> <font color=Magenta>"form"</font>      <font color=Red>=</font> True-<a name="line-111"></a><font color=Magenta>"label"</font> <font color=Cyan>`closes`</font> <font color=Magenta>"label"</font>     <font color=Red>=</font> True-<a name="line-112"></a><font color=Green><u>_</u></font>       <font color=Cyan>`closes`</font> <font color=Magenta>"option"</font>    <font color=Red>=</font> True-<a name="line-113"></a><font color=Magenta>"thead"</font> <font color=Cyan>`closes`</font> t  <font color=Red>|</font> t <font color=Cyan>`elem`</font> <font color=Red>[</font><font color=Magenta>"colgroup"</font><font color=Red>]</font>          <font color=Red>=</font> True-<a name="line-114"></a><font color=Magenta>"tfoot"</font> <font color=Cyan>`closes`</font> t  <font color=Red>|</font> t <font color=Cyan>`elem`</font> <font color=Red>[</font><font color=Magenta>"thead"</font><font color=Cyan>,</font><font color=Magenta>"colgroup"</font><font color=Red>]</font>  <font color=Red>=</font> True-<a name="line-115"></a><font color=Magenta>"tbody"</font> <font color=Cyan>`closes`</font> t  <font color=Red>|</font> t <font color=Cyan>`elem`</font> <font color=Red>[</font><font color=Magenta>"tbody"</font><font color=Cyan>,</font><font color=Magenta>"tfoot"</font><font color=Cyan>,</font><font color=Magenta>"thead"</font><font color=Cyan>,</font><font color=Magenta>"colgroup"</font><font color=Red>]</font> <font color=Red>=</font> True-<a name="line-116"></a><font color=Magenta>"colgroup"</font> <font color=Cyan>`closes`</font> <font color=Magenta>"colgroup"</font>  <font color=Red>=</font> True-<a name="line-117"></a><a name="closes"></a><font color=Blue>t</font> <font color=Cyan>`closes`</font> <font color=Magenta>"p"</font>-<a name="line-118"></a>    <font color=Red>|</font> t <font color=Cyan>`elem`</font> <font color=Red>[</font><font color=Magenta>"p"</font><font color=Cyan>,</font><font color=Magenta>"h1"</font><font color=Cyan>,</font><font color=Magenta>"h2"</font><font color=Cyan>,</font><font color=Magenta>"h3"</font><font color=Cyan>,</font><font color=Magenta>"h4"</font><font color=Cyan>,</font><font color=Magenta>"h5"</font><font color=Cyan>,</font><font color=Magenta>"h6"</font>-<a name="line-119"></a>               <font color=Cyan>,</font><font color=Magenta>"hr"</font><font color=Cyan>,</font><font color=Magenta>"div"</font><font color=Cyan>,</font><font color=Magenta>"ul"</font><font color=Cyan>,</font><font color=Magenta>"dl"</font><font color=Cyan>,</font><font color=Magenta>"ol"</font><font color=Cyan>,</font><font color=Magenta>"table"</font><font color=Red>]</font>  <font color=Red>=</font>  True-<a name="line-120"></a><font color=Green><u>_</u></font> <font color=Cyan>`closes`</font> <font color=Green><u>_</u></font> <font color=Red>=</font> False-<a name="line-121"></a>-<a name="line-122"></a>-<a name="line-123"></a>-<a name="line-124"></a><font color=Blue>---- Misc ----</font>-<a name="line-125"></a>-<a name="line-126"></a><a name="fst3"></a><font color=Blue>fst3</font> <font color=Cyan>(</font>a<font color=Cyan>,</font><font color=Green><u>_</u></font><font color=Cyan>,</font><font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red>=</font> a-<a name="line-127"></a><a name="snd3"></a><font color=Blue>snd3</font> <font color=Cyan>(</font><font color=Green><u>_</u></font><font color=Cyan>,</font>a<font color=Cyan>,</font><font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red>=</font> a-<a name="line-128"></a><a name="thd3"></a><font color=Blue>thd3</font> <font color=Cyan>(</font><font color=Green><u>_</u></font><font color=Cyan>,</font><font color=Green><u>_</u></font><font color=Cyan>,</font>a<font color=Cyan>)</font> <font color=Red>=</font> a-<a name="line-129"></a>-<a name="line-130"></a>-<a name="line-131"></a>-<a name="line-132"></a><font color=Blue>---- Auxiliary Parsing Functions ----</font>-<a name="line-133"></a>-<a name="line-134"></a><a name="HParser"></a><font color=Green><u>type</u></font> HParser a <font color=Red>=</font> Parser <font color=Cyan>(</font>Posn<font color=Cyan>,</font>TokenT<font color=Cyan>)</font> a-<a name="line-135"></a>-<a name="line-136"></a><a name="tok"></a><font color=Blue>tok</font> <font color=Red>::</font> TokenT <font color=Red>-&gt;</font> HParser TokenT-<a name="line-137"></a><font color=Blue>tok</font> t <font color=Red>=</font> <font color=Green><u>do</u></font> <font color=Cyan>(</font>p<font color=Cyan>,</font>t'<font color=Cyan>)</font> <font color=Red>&lt;-</font> next-<a name="line-138"></a>           <font color=Green><u>case</u></font> t' <font color=Green><u>of</u></font> TokError s    <font color=Red>-&gt;</font> report failBad <font color=Cyan>(</font>show t<font color=Cyan>)</font> p t'-<a name="line-139"></a>                      <font color=Green><u>_</u></font> <font color=Red>|</font> t'<font color=Cyan>==</font>t     <font color=Red>-&gt;</font> return t-<a name="line-140"></a>                        <font color=Red>|</font> otherwise <font color=Red>-&gt;</font> report fail <font color=Cyan>(</font>show t<font color=Cyan>)</font> p t'-<a name="line-141"></a>-<a name="line-142"></a><a name="name"></a><font color=Blue>name</font> <font color=Red>::</font> HParser Name-<a name="line-143"></a><font color=Blue>--name = do {(p,TokName s) &lt;- next; return s}</font>-<a name="line-144"></a><font color=Blue>name</font> <font color=Red>=</font> <font color=Green><u>do</u></font> <font color=Cyan>(</font>p<font color=Cyan>,</font>tok<font color=Cyan>)</font> <font color=Red>&lt;-</font> next-<a name="line-145"></a>          <font color=Green><u>case</u></font> tok <font color=Green><u>of</u></font> -<a name="line-146"></a>            TokName s  <font color=Red>-&gt;</font> return s -<a name="line-147"></a>            TokError s <font color=Red>-&gt;</font> report failBad <font color=Magenta>"a name"</font> p tok-<a name="line-148"></a>            <font color=Green><u>_</u></font>          <font color=Red>-&gt;</font> report fail <font color=Magenta>"a name"</font> p tok-<a name="line-149"></a>-<a name="line-150"></a><a name="string"></a><font color=Blue>string</font><font color=Cyan>,</font> freetext <font color=Red>::</font> HParser String-<a name="line-151"></a><font color=Blue>string</font>   <font color=Red>=</font> <font color=Green><u>do</u></font> <font color=Cyan>(</font>p<font color=Cyan>,</font>t<font color=Cyan>)</font> <font color=Red>&lt;-</font> next-<a name="line-152"></a>              <font color=Green><u>case</u></font> t <font color=Green><u>of</u></font> TokName s <font color=Red>-&gt;</font> return s-<a name="line-153"></a>                        <font color=Green><u>_</u></font>         <font color=Red>-&gt;</font> report fail <font color=Magenta>"text"</font> p t-<a name="line-154"></a><a name="freetext"></a><font color=Blue>freetext</font> <font color=Red>=</font> <font color=Green><u>do</u></font> <font color=Cyan>(</font>p<font color=Cyan>,</font>t<font color=Cyan>)</font> <font color=Red>&lt;-</font> next-<a name="line-155"></a>              <font color=Green><u>case</u></font> t <font color=Green><u>of</u></font> TokFreeText s <font color=Red>-&gt;</font> return s-<a name="line-156"></a>                        <font color=Green><u>_</u></font>             <font color=Red>-&gt;</font> report fail <font color=Magenta>"text"</font> p t-<a name="line-157"></a>-<a name="line-158"></a><a name="maybe"></a><font color=Blue>maybe</font> <font color=Red>::</font> HParser a <font color=Red>-&gt;</font> HParser <font color=Cyan>(</font>Maybe a<font color=Cyan>)</font>-<a name="line-159"></a><font color=Blue>maybe</font> p <font color=Red>=</font>-<a name="line-160"></a>    <font color=Cyan>(</font> p <font color=Cyan>&gt;&gt;=</font> return <font color=Cyan>.</font> Just<font color=Cyan>)</font> <font color=Cyan>`onFail`</font>-<a name="line-161"></a>    <font color=Cyan>(</font> return Nothing<font color=Cyan>)</font>-<a name="line-162"></a>-<a name="line-163"></a><a name="either"></a><font color=Blue>either</font> <font color=Red>::</font> HParser a <font color=Red>-&gt;</font> HParser b <font color=Red>-&gt;</font> HParser <font color=Cyan>(</font>Either a b<font color=Cyan>)</font>-<a name="line-164"></a><font color=Blue>either</font> p q <font color=Red>=</font>-<a name="line-165"></a>    <font color=Cyan>(</font> p <font color=Cyan>&gt;&gt;=</font> return <font color=Cyan>.</font> Left<font color=Cyan>)</font> <font color=Cyan>`onFail`</font>-<a name="line-166"></a>    <font color=Cyan>(</font> q <font color=Cyan>&gt;&gt;=</font> return <font color=Cyan>.</font> Right<font color=Cyan>)</font>-<a name="line-167"></a>-<a name="line-168"></a><a name="word"></a><font color=Blue>word</font> <font color=Red>::</font> String <font color=Red>-&gt;</font> HParser ()-<a name="line-169"></a><font color=Blue>word</font> s <font color=Red>=</font> <font color=Green><u>do</u></font> <font color=Cyan>{</font> x <font color=Red>&lt;-</font> next-<a name="line-170"></a>            <font color=Cyan>;</font> <font color=Green><u>case</u></font> x <font color=Green><u>of</u></font>-<a name="line-171"></a>                <font color=Cyan>(</font>p<font color=Cyan>,</font>TokName n<font color=Cyan>)</font>     <font color=Red>|</font> s<font color=Cyan>==</font>n <font color=Red>-&gt;</font> return ()-<a name="line-172"></a>                <font color=Cyan>(</font>p<font color=Cyan>,</font>TokFreeText n<font color=Cyan>)</font> <font color=Red>|</font> s<font color=Cyan>==</font>n <font color=Red>-&gt;</font> return ()-<a name="line-173"></a>                <font color=Cyan>(</font>p<font color=Cyan>,</font>t<font color=Red>@</font><font color=Cyan>(</font>TokError <font color=Green><u>_</u></font><font color=Cyan>)</font><font color=Cyan>)</font> <font color=Red>-&gt;</font> report failBad <font color=Cyan>(</font>show s<font color=Cyan>)</font> p t-<a name="line-174"></a>                <font color=Cyan>(</font>p<font color=Cyan>,</font>t<font color=Cyan>)</font> <font color=Red>-&gt;</font> report fail <font color=Cyan>(</font>show s<font color=Cyan>)</font> p t-<a name="line-175"></a>            <font color=Cyan>}</font>-<a name="line-176"></a>-<a name="line-177"></a><a name="posn"></a><font color=Blue>posn</font> <font color=Red>::</font> HParser Posn-<a name="line-178"></a><font color=Blue>posn</font> <font color=Red>=</font> <font color=Green><u>do</u></font> <font color=Cyan>{</font> x<font color=Red>@</font><font color=Cyan>(</font>p<font color=Cyan>,</font><font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red>&lt;-</font> next-<a name="line-179"></a>          <font color=Cyan>;</font> reparse <font color=Red>[</font>x<font color=Red>]</font>-<a name="line-180"></a>          <font color=Cyan>;</font> return p-<a name="line-181"></a>          <font color=Cyan>}</font> <font color=Cyan>`onFail`</font> return noPos-<a name="line-182"></a>-<a name="line-183"></a><a name="nmtoken"></a><font color=Blue>nmtoken</font> <font color=Red>::</font> HParser NmToken-<a name="line-184"></a><font color=Blue>nmtoken</font> <font color=Red>=</font> <font color=Cyan>(</font>string <font color=Cyan>`onFail`</font> freetext<font color=Cyan>)</font>-<a name="line-185"></a>-<a name="line-186"></a><a name="failP"></a><font color=Blue>failP</font><font color=Cyan>,</font> failBadP <font color=Red>::</font> String <font color=Red>-&gt;</font> HParser a-<a name="line-187"></a><font color=Blue>failP</font> msg    <font color=Red>=</font> <font color=Green><u>do</u></font> <font color=Cyan>{</font> p <font color=Red>&lt;-</font> posn<font color=Cyan>;</font> fail <font color=Cyan>(</font>msg<font color=Cyan>++</font><font color=Magenta>"\n    at "</font><font color=Cyan>++</font>show p<font color=Cyan>)</font> <font color=Cyan>}</font>-<a name="line-188"></a><a name="failBadP"></a><font color=Blue>failBadP</font> msg <font color=Red>=</font> <font color=Green><u>do</u></font> <font color=Cyan>{</font> p <font color=Red>&lt;-</font> posn<font color=Cyan>;</font> failBad <font color=Cyan>(</font>msg<font color=Cyan>++</font><font color=Magenta>"\n    at "</font><font color=Cyan>++</font>show p<font color=Cyan>)</font> <font color=Cyan>}</font>-<a name="line-189"></a>-<a name="line-190"></a><a name="report"></a><font color=Blue>report</font> <font color=Red>::</font> <font color=Cyan>(</font>String<font color=Red>-&gt;</font>HParser a<font color=Cyan>)</font> <font color=Red>-&gt;</font> String <font color=Red>-&gt;</font> Posn <font color=Red>-&gt;</font> TokenT <font color=Red>-&gt;</font> HParser a-<a name="line-191"></a><font color=Blue>report</font> fail exp p t <font color=Red>=</font> fail <font color=Cyan>(</font><font color=Magenta>"Expected "</font><font color=Cyan>++</font>show exp<font color=Cyan>++</font><font color=Magenta>" but found "</font><font color=Cyan>++</font>show t-<a name="line-192"></a>                           <font color=Cyan>++</font><font color=Magenta>"\n  at "</font><font color=Cyan>++</font>show p<font color=Cyan>)</font>-<a name="line-193"></a>-<a name="line-194"></a><a name="adjustErrP"></a><font color=Blue>adjustErrP</font> <font color=Red>::</font> HParser a <font color=Red>-&gt;</font> <font color=Cyan>(</font>String<font color=Red>-&gt;</font>String<font color=Cyan>)</font> <font color=Red>-&gt;</font> HParser a-<a name="line-195"></a><a name="adjustErrP"></a><font color=Blue>p</font> <font color=Cyan>`adjustErrP`</font> f <font color=Red>=</font> p <font color=Cyan>`onFail`</font> <font color=Green><u>do</u></font> pn <font color=Red>&lt;-</font> posn-<a name="line-196"></a>                                 <font color=Cyan>(</font>p <font color=Cyan>`adjustErr`</font> f<font color=Cyan>)</font> <font color=Cyan>`adjustErr`</font> <font color=Cyan>(</font><font color=Cyan>++</font>show pn<font color=Cyan>)</font>-<a name="line-197"></a>-<a name="line-198"></a><font color=Blue>---- XML Parsing Functions ----</font>-<a name="line-199"></a>-<a name="line-200"></a><a name="document"></a><font color=Blue>document</font> <font color=Red>::</font> HParser <font color=Cyan>(</font>Document Posn<font color=Cyan>)</font>-<a name="line-201"></a><font color=Blue>document</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-202"></a>    p     <font color=Red>&lt;-</font> prolog <font color=Cyan>`adjustErr`</font> <font color=Cyan>(</font><font color=Magenta>"unrecognisable XML prolog\n"</font><font color=Cyan>++</font><font color=Cyan>)</font>-<a name="line-203"></a>    es    <font color=Red>&lt;-</font> many1 <font color=Cyan>(</font>element <font color=Magenta>"HTML document"</font><font color=Cyan>)</font>-<a name="line-204"></a>    ms    <font color=Red>&lt;-</font> many misc-<a name="line-205"></a>    return <font color=Cyan>(</font>Document p emptyST <font color=Cyan>(</font><font color=Green><u>case</u></font> map snd es <font color=Green><u>of</u></font>-<a name="line-206"></a>                                  <font color=Red>[</font>e<font color=Red>]</font> <font color=Red>-&gt;</font> e-<a name="line-207"></a>                                  es  <font color=Red>-&gt;</font> Elem <font color=Magenta>"html"</font> [] <font color=Cyan>(</font>map mkCElem es<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-208"></a>                               ms<font color=Cyan>)</font>-<a name="line-209"></a>  <font color=Green><u>where</u></font> mkCElem e <font color=Red>=</font> CElem e noPos-<a name="line-210"></a>-<a name="line-211"></a><a name="comment"></a><font color=Blue>comment</font> <font color=Red>::</font> HParser Comment-<a name="line-212"></a><font color=Blue>comment</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-213"></a>    bracket <font color=Cyan>(</font>tok TokCommentOpen<font color=Cyan>)</font> <font color=Cyan>(</font>tok TokCommentClose<font color=Cyan>)</font> freetext-<a name="line-214"></a>-<a name="line-215"></a><a name="processinginstruction"></a><font color=Blue>processinginstruction</font> <font color=Red>::</font> HParser ProcessingInstruction-<a name="line-216"></a><font color=Blue>processinginstruction</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-217"></a>    tok TokPIOpen-<a name="line-218"></a>    commit <font color=Cyan>$</font> <font color=Green><u>do</u></font>-<a name="line-219"></a>      n <font color=Red>&lt;-</font> string  <font color=Cyan>`onFail`</font> failP <font color=Magenta>"processing instruction has no target"</font>-<a name="line-220"></a>      f <font color=Red>&lt;-</font> freetext-<a name="line-221"></a>      <font color=Cyan>(</font>tok TokPIClose <font color=Cyan>`onFail`</font> tok TokAnyClose<font color=Cyan>)</font> <font color=Cyan>`onFail`</font> failP <font color=Magenta>"missing ?&gt; or &gt;"</font>-<a name="line-222"></a>      return <font color=Cyan>(</font>n<font color=Cyan>,</font> f<font color=Cyan>)</font>-<a name="line-223"></a>-<a name="line-224"></a><a name="cdsect"></a><font color=Blue>cdsect</font> <font color=Red>::</font> HParser CDSect-<a name="line-225"></a><font color=Blue>cdsect</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-226"></a>    tok TokSectionOpen-<a name="line-227"></a>    bracket <font color=Cyan>(</font>tok <font color=Cyan>(</font>TokSection CDATAx<font color=Cyan>)</font><font color=Cyan>)</font> <font color=Cyan>(</font>tok TokSectionClose<font color=Cyan>)</font> chardata-<a name="line-228"></a>-<a name="line-229"></a><a name="prolog"></a><font color=Blue>prolog</font> <font color=Red>::</font> HParser Prolog-<a name="line-230"></a><font color=Blue>prolog</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-231"></a>    x <font color=Red>&lt;-</font> maybe xmldecl-<a name="line-232"></a>    m1 <font color=Red>&lt;-</font> many misc-<a name="line-233"></a>    dtd <font color=Red>&lt;-</font> maybe doctypedecl-<a name="line-234"></a>    m2 <font color=Red>&lt;-</font> many misc-<a name="line-235"></a>    return <font color=Cyan>(</font>Prolog x m1 dtd m2<font color=Cyan>)</font>-<a name="line-236"></a>-<a name="line-237"></a><a name="xmldecl"></a><font color=Blue>xmldecl</font> <font color=Red>::</font> HParser XMLDecl-<a name="line-238"></a><font color=Blue>xmldecl</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-239"></a>    tok TokPIOpen-<a name="line-240"></a>    <font color=Cyan>(</font>word <font color=Magenta>"xml"</font> <font color=Cyan>`onFail`</font> word <font color=Magenta>"XML"</font><font color=Cyan>)</font>-<a name="line-241"></a>    p <font color=Red>&lt;-</font> posn-<a name="line-242"></a>    s <font color=Red>&lt;-</font> freetext-<a name="line-243"></a>    tok TokPIClose <font color=Cyan>`onFail`</font> failBadP <font color=Magenta>"missing ?&gt; in &lt;?xml ...?&gt;"</font>-<a name="line-244"></a>    <font color=Cyan>(</font>Prelude<font color=Cyan>.</font>either failP return <font color=Cyan>.</font> fst <font color=Cyan>.</font> runParser aux <font color=Cyan>.</font> xmlReLex p<font color=Cyan>)</font> s-<a name="line-245"></a>  <font color=Green><u>where</u></font>-<a name="line-246"></a>    aux <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-247"></a>      v <font color=Red>&lt;-</font> versioninfo  <font color=Cyan>`onFail`</font> failP <font color=Magenta>"missing XML version info"</font>-<a name="line-248"></a>      e <font color=Red>&lt;-</font> maybe encodingdecl-<a name="line-249"></a>      s <font color=Red>&lt;-</font> maybe sddecl-<a name="line-250"></a>      return <font color=Cyan>(</font>XMLDecl v e s<font color=Cyan>)</font>-<a name="line-251"></a>-<a name="line-252"></a><a name="versioninfo"></a><font color=Blue>versioninfo</font> <font color=Red>::</font> HParser VersionInfo-<a name="line-253"></a><font color=Blue>versioninfo</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-254"></a>    <font color=Cyan>(</font>word <font color=Magenta>"version"</font> <font color=Cyan>`onFail`</font> word <font color=Magenta>"VERSION"</font><font color=Cyan>)</font>-<a name="line-255"></a>    tok TokEqual-<a name="line-256"></a>    bracket <font color=Cyan>(</font>tok TokQuote<font color=Cyan>)</font> <font color=Cyan>(</font>tok TokQuote<font color=Cyan>)</font> freetext-<a name="line-257"></a>-<a name="line-258"></a><a name="misc"></a><font color=Blue>misc</font> <font color=Red>::</font> HParser Misc-<a name="line-259"></a><font color=Blue>misc</font> <font color=Red>=</font> -<a name="line-260"></a>    oneOf' <font color=Red>[</font> <font color=Cyan>(</font><font color=Magenta>"&lt;!--comment--&gt;"</font><font color=Cyan>,</font> comment <font color=Cyan>&gt;&gt;=</font> return <font color=Cyan>.</font> Comment<font color=Cyan>)</font>-<a name="line-261"></a>           <font color=Cyan>,</font> <font color=Cyan>(</font><font color=Magenta>"&lt;?PI?&gt;"</font><font color=Cyan>,</font>         processinginstruction <font color=Cyan>&gt;&gt;=</font> return <font color=Cyan>.</font> PI<font color=Cyan>)</font>-<a name="line-262"></a>           <font color=Red>]</font>-<a name="line-263"></a>-<a name="line-264"></a>-<a name="line-265"></a><font color=Blue>-- Question: for HTML, should we disallow in-line DTDs, allowing only externals?</font>-<a name="line-266"></a><font color=Blue>-- Answer: I think so.</font>-<a name="line-267"></a>-<a name="line-268"></a><a name="doctypedecl"></a><font color=Blue>doctypedecl</font> <font color=Red>::</font> HParser DocTypeDecl-<a name="line-269"></a><font color=Blue>doctypedecl</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-270"></a>    tok TokSpecialOpen-<a name="line-271"></a>    tok <font color=Cyan>(</font>TokSpecial DOCTYPEx<font color=Cyan>)</font>-<a name="line-272"></a>    commit <font color=Cyan>$</font> <font color=Green><u>do</u></font>-<a name="line-273"></a>      n <font color=Red>&lt;-</font> name-<a name="line-274"></a>      eid <font color=Red>&lt;-</font> maybe externalid-<a name="line-275"></a><font color=Blue>--    es &lt;- maybe (bracket (tok TokSqOpen) (tok TokSqClose)) (many markupdecl)</font>-<a name="line-276"></a>      tok TokAnyClose  <font color=Cyan>`onFail`</font> failP <font color=Magenta>"missing &gt; in DOCTYPE decl"</font>-<a name="line-277"></a><font color=Blue>--    return (DTD n eid (case es of { Nothing -&gt; []; Just e -&gt; e }))</font>-<a name="line-278"></a>      return <font color=Cyan>(</font>DTD n eid []<font color=Cyan>)</font>-<a name="line-279"></a>-<a name="line-280"></a><font color=Blue>--markupdecl :: HParser MarkupDecl</font>-<a name="line-281"></a><font color=Blue>--markupdecl =</font>-<a name="line-282"></a><font color=Blue>--    ( elementdecl &gt;&gt;= return . Element) `onFail`</font>-<a name="line-283"></a><font color=Blue>--    ( attlistdecl &gt;&gt;= return . AttList) `onFail`</font>-<a name="line-284"></a><font color=Blue>--    ( entitydecl &gt;&gt;= return . Entity) `onFail`</font>-<a name="line-285"></a><font color=Blue>--    ( notationdecl &gt;&gt;= return . Notation) `onFail`</font>-<a name="line-286"></a><font color=Blue>--    ( misc &gt;&gt;= return . MarkupMisc) `onFail`</font>-<a name="line-287"></a><font color=Blue>--    PEREF(MarkupPE,markupdecl)</font>-<a name="line-288"></a><font color=Blue>--</font>-<a name="line-289"></a><font color=Blue>--extsubset :: HParser ExtSubset</font>-<a name="line-290"></a><font color=Blue>--extsubset = do</font>-<a name="line-291"></a><font color=Blue>--    td &lt;- maybe textdecl</font>-<a name="line-292"></a><font color=Blue>--    ds &lt;- many extsubsetdecl</font>-<a name="line-293"></a><font color=Blue>--    return (ExtSubset td ds)</font>-<a name="line-294"></a><font color=Blue>--</font>-<a name="line-295"></a><font color=Blue>--extsubsetdecl :: HParser ExtSubsetDecl</font>-<a name="line-296"></a><font color=Blue>--extsubsetdecl =</font>-<a name="line-297"></a><font color=Blue>--    ( markupdecl &gt;&gt;= return . ExtMarkupDecl) `onFail`</font>-<a name="line-298"></a><font color=Blue>--    ( conditionalsect &gt;&gt;= return . ExtConditionalSect) `onFail`</font>-<a name="line-299"></a><font color=Blue>--    PEREF(ExtPEReference,extsubsetdecl)</font>-<a name="line-300"></a>-<a name="line-301"></a><a name="sddecl"></a><font color=Blue>sddecl</font> <font color=Red>::</font> HParser SDDecl-<a name="line-302"></a><font color=Blue>sddecl</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-303"></a>    <font color=Cyan>(</font>word <font color=Magenta>"standalone"</font> <font color=Cyan>`onFail`</font> word <font color=Magenta>"STANDALONE"</font><font color=Cyan>)</font>-<a name="line-304"></a>    commit <font color=Cyan>$</font> <font color=Green><u>do</u></font>-<a name="line-305"></a>      tok TokEqual <font color=Cyan>`onFail`</font> failP <font color=Magenta>"missing = in 'standalone' decl"</font>-<a name="line-306"></a>      bracket <font color=Cyan>(</font>tok TokQuote<font color=Cyan>)</font> <font color=Cyan>(</font>tok TokQuote<font color=Cyan>)</font>-<a name="line-307"></a>              <font color=Cyan>(</font> <font color=Cyan>(</font>word <font color=Magenta>"yes"</font> <font color=Cyan>&gt;&gt;</font> return True<font color=Cyan>)</font> <font color=Cyan>`onFail`</font>-<a name="line-308"></a>                <font color=Cyan>(</font>word <font color=Magenta>"no"</font> <font color=Cyan>&gt;&gt;</font> return False<font color=Cyan>)</font> <font color=Cyan>`onFail`</font>-<a name="line-309"></a>                failP <font color=Magenta>"'standalone' decl requires 'yes' or 'no' value"</font> <font color=Cyan>)</font>-<a name="line-310"></a>-<a name="line-311"></a>-<a name="line-312"></a>-<a name="line-313"></a>-<a name="line-314"></a><a name="Stack"></a><font color=Blue>----</font>-<a name="line-315"></a><a name="Stack"></a><font color=Blue>-- VERY IMPORTANT NOTE: The stack returned here contains those tags which</font>-<a name="line-316"></a><a name="Stack"></a><font color=Blue>-- have been closed implicitly and need to be reopened again at the</font>-<a name="line-317"></a><a name="Stack"></a><font color=Blue>-- earliest opportunity.</font>-<a name="line-318"></a><a name="Stack"></a><font color=Green><u>type</u></font> Stack <font color=Red>=</font> <font color=Red>[</font><font color=Cyan>(</font>Name<font color=Cyan>,</font><font color=Red>[</font>Attribute<font color=Red>]</font><font color=Cyan>)</font><font color=Red>]</font>-<a name="line-319"></a>-<a name="line-320"></a><a name="element"></a><font color=Blue>element</font> <font color=Red>::</font> Name <font color=Red>-&gt;</font> HParser <font color=Cyan>(</font>Stack<font color=Cyan>,</font>Element Posn<font color=Cyan>)</font>-<a name="line-321"></a><font color=Blue>element</font> ctx <font color=Red>=</font>-<a name="line-322"></a>  <font color=Green><u>do</u></font>-<a name="line-323"></a>    tok TokAnyOpen-<a name="line-324"></a>    <font color=Cyan>(</font>ElemTag e avs<font color=Cyan>)</font> <font color=Red>&lt;-</font> elemtag-<a name="line-325"></a>    <font color=Cyan>(</font> <font color=Green><u>if</u></font> e <font color=Cyan>`closes`</font> ctx <font color=Green><u>then</u></font>-<a name="line-326"></a>         <font color=Blue>-- insert the missing close-tag, fail forward, and reparse.</font>-<a name="line-327"></a>         <font color=Cyan>(</font> <font color=Green><u>do</u></font> debug <font color=Cyan>(</font><font color=Magenta>"/"</font><font color=Cyan>)</font>-<a name="line-328"></a>              unparse <font color=Cyan>(</font><font color=Red>[</font>TokEndOpen<font color=Cyan>,</font> TokName ctx<font color=Cyan>,</font> TokAnyClose<font color=Cyan>,</font>-<a name="line-329"></a>                        TokAnyOpen<font color=Cyan>,</font> TokName e<font color=Red>]</font> <font color=Cyan>++</font> reformatAttrs avs<font color=Cyan>)</font>-<a name="line-330"></a>              return <font color=Cyan>(</font>[]<font color=Cyan>,</font> Elem <font color=Magenta>"null"</font> [] []<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-331"></a>      <font color=Green><u>else</u></font> <font color=Green><u>if</u></font> e <font color=Cyan>`elem`</font> selfclosingtags <font color=Green><u>then</u></font>-<a name="line-332"></a>         <font color=Blue>-- complete the parse straightaway.</font>-<a name="line-333"></a>         <font color=Cyan>(</font> <font color=Green><u>do</u></font> tok TokEndClose	<font color=Blue>-- self-closing &lt;tag /&gt; </font>-<a name="line-334"></a>              debug <font color=Cyan>(</font>e<font color=Cyan>++</font><font color=Magenta>"[+]"</font><font color=Cyan>)</font>-<a name="line-335"></a>              return <font color=Cyan>(</font>[]<font color=Cyan>,</font> Elem e avs []<font color=Cyan>)</font><font color=Cyan>)</font> <font color=Cyan>`onFail`</font>-<a name="line-336"></a>     <font color=Blue>--  ( do tok TokAnyClose	-- sequence &lt;tag&gt;&lt;/tag&gt;	(**not HTML?**)</font>-<a name="line-337"></a>     <font color=Blue>--       debug (e++"[+")</font>-<a name="line-338"></a>     <font color=Blue>--       n &lt;- bracket (tok TokEndOpen) (tok TokAnyClose) name</font>-<a name="line-339"></a>     <font color=Blue>--       debug "]"</font>-<a name="line-340"></a>     <font color=Blue>--       if e == (map toLower n :: Name) </font>-<a name="line-341"></a>     <font color=Blue>--         then return ([], Elem e avs [])      </font>-<a name="line-342"></a>     <font color=Blue>--         else return (error "no nesting in empty tag")) `onFail`</font>-<a name="line-343"></a>         <font color=Cyan>(</font> <font color=Green><u>do</u></font> tok TokAnyClose	<font color=Blue>-- &lt;tag&gt; with no close (e.g. &lt;IMG&gt;)</font>-<a name="line-344"></a>              debug <font color=Cyan>(</font>e<font color=Cyan>++</font><font color=Magenta>"[+]"</font><font color=Cyan>)</font>-<a name="line-345"></a>              return <font color=Cyan>(</font>[]<font color=Cyan>,</font> Elem e avs []<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-346"></a>      <font color=Green><u>else</u></font>-<a name="line-347"></a>        <font color=Cyan>(</font><font color=Cyan>(</font> <font color=Green><u>do</u></font> tok TokEndClose-<a name="line-348"></a>              debug <font color=Cyan>(</font>e<font color=Cyan>++</font><font color=Magenta>"[]"</font><font color=Cyan>)</font>-<a name="line-349"></a>              return <font color=Cyan>(</font>[]<font color=Cyan>,</font> Elem e avs []<font color=Cyan>)</font><font color=Cyan>)</font> <font color=Cyan>`onFail`</font>-<a name="line-350"></a>         <font color=Cyan>(</font> <font color=Green><u>do</u></font> tok TokAnyClose <font color=Cyan>`onFail`</font> failP <font color=Magenta>"missing &gt; or /&gt; in element tag"</font>-<a name="line-351"></a>              debug <font color=Cyan>(</font>e<font color=Cyan>++</font><font color=Magenta>"["</font><font color=Cyan>)</font>-<a name="line-352"></a>           <font color=Blue>-- zz &lt;- many (content e)</font>-<a name="line-353"></a>           <font color=Blue>-- n &lt;- bracket (tok TokEndOpen) (tok TokAnyClose) name</font>-<a name="line-354"></a>              zz <font color=Red>&lt;-</font> manyFinally <font color=Cyan>(</font>content e<font color=Cyan>)</font>-<a name="line-355"></a>                                <font color=Cyan>(</font>tok TokEndOpen<font color=Cyan>)</font>-<a name="line-356"></a>              n <font color=Red>&lt;-</font> name-<a name="line-357"></a>              commit <font color=Cyan>(</font>tok TokAnyClose<font color=Cyan>)</font>-<a name="line-358"></a>              debug <font color=Magenta>"]"</font>-<a name="line-359"></a>              <font color=Green><u>let</u></font> <font color=Cyan>(</font>ss<font color=Cyan>,</font>cs<font color=Cyan>)</font> <font color=Red>=</font> unzip zz-<a name="line-360"></a>              <font color=Green><u>let</u></font> s       <font color=Red>=</font> <font color=Green><u>if</u></font> null ss <font color=Green><u>then</u></font> [] <font color=Green><u>else</u></font> last ss-<a name="line-361"></a>              <font color=Cyan>(</font> <font color=Green><u>if</u></font> e <font color=Cyan>==</font> <font color=Cyan>(</font>map toLower n <font color=Red>::</font> Name<font color=Cyan>)</font> <font color=Green><u>then</u></font>-<a name="line-362"></a>                  <font color=Green><u>do</u></font> unparse <font color=Cyan>(</font>reformatTags <font color=Cyan>(</font>closeInner e s<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-363"></a>                     debug <font color=Magenta>"^"</font>-<a name="line-364"></a>                     return <font color=Cyan>(</font>[]<font color=Cyan>,</font> Elem e avs cs<font color=Cyan>)</font>-<a name="line-365"></a>                <font color=Green><u>else</u></font>-<a name="line-366"></a>                  <font color=Green><u>do</u></font> unparse <font color=Red>[</font>TokEndOpen<font color=Cyan>,</font> TokName n<font color=Cyan>,</font> TokAnyClose<font color=Red>]</font>-<a name="line-367"></a>                     debug <font color=Magenta>"-"</font>-<a name="line-368"></a>                     return <font color=Cyan>(</font><font color=Cyan>(</font><font color=Cyan>(</font>e<font color=Cyan>,</font>avs<font color=Cyan>)</font><font color=Red><b>:</b></font>s<font color=Cyan>)</font><font color=Cyan>,</font> Elem e avs cs<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-369"></a>         <font color=Cyan>)</font> <font color=Cyan>`onFail`</font> failP <font color=Cyan>(</font><font color=Magenta>"failed to repair non-matching tags in context: "</font><font color=Cyan>++</font>ctx<font color=Cyan>)</font><font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-370"></a>-<a name="line-371"></a><a name="closeInner"></a><font color=Blue>closeInner</font> <font color=Red>::</font> Name <font color=Red>-&gt;</font> <font color=Red>[</font><font color=Cyan>(</font>Name<font color=Cyan>,</font><font color=Red>[</font>Attribute<font color=Red>]</font><font color=Cyan>)</font><font color=Red>]</font> <font color=Red>-&gt;</font> <font color=Red>[</font><font color=Cyan>(</font>Name<font color=Cyan>,</font><font color=Red>[</font>Attribute<font color=Red>]</font><font color=Cyan>)</font><font color=Red>]</font>-<a name="line-372"></a><font color=Blue>closeInner</font> c ts <font color=Red>=</font>-<a name="line-373"></a>    <font color=Green><u>case</u></font> lookup c closeInnerTags <font color=Green><u>of</u></font>-<a name="line-374"></a>      <font color=Cyan>(</font>Just these<font color=Cyan>)</font> <font color=Red>-&gt;</font> filter <font color=Cyan>(</font><font color=Cyan>(</font><font color=Cyan>`notElem`</font> these<font color=Cyan>)</font><font color=Cyan>.</font>fst<font color=Cyan>)</font> ts-<a name="line-375"></a>      Nothing      <font color=Red>-&gt;</font> ts-<a name="line-376"></a>-<a name="line-377"></a><a name="unparse"></a><font color=Blue>unparse</font> ts <font color=Red>=</font> <font color=Green><u>do</u></font> p <font color=Red>&lt;-</font> posn-<a name="line-378"></a>                reparse <font color=Cyan>(</font>zip <font color=Cyan>(</font>repeat p<font color=Cyan>)</font> ts<font color=Cyan>)</font>-<a name="line-379"></a>-<a name="line-380"></a><a name="reformatAttrs"></a><font color=Blue>reformatAttrs</font> avs <font color=Red>=</font> concatMap f0 avs-<a name="line-381"></a>    <font color=Green><u>where</u></font> f0 <font color=Cyan>(</font>a<font color=Cyan>,</font> v<font color=Red>@</font><font color=Cyan>(</font>AttValue <font color=Green><u>_</u></font><font color=Cyan>)</font><font color=Cyan>)</font> <font color=Red>=</font> <font color=Red>[</font>TokName a<font color=Cyan>,</font> TokEqual<font color=Cyan>,</font> TokQuote<font color=Cyan>,</font>-<a name="line-382"></a>                                       TokFreeText <font color=Cyan>(</font>show v<font color=Cyan>)</font><font color=Cyan>,</font> TokQuote<font color=Red>]</font>-<a name="line-383"></a><a name="reformatTags"></a><font color=Blue>reformatTags</font> ts <font color=Red>=</font> concatMap f0 ts-<a name="line-384"></a>    <font color=Green><u>where</u></font> f0 <font color=Cyan>(</font>t<font color=Cyan>,</font>avs<font color=Cyan>)</font> <font color=Red>=</font> <font color=Red>[</font>TokAnyOpen<font color=Cyan>,</font> TokName t<font color=Red>]</font><font color=Cyan>++</font>reformatAttrs avs<font color=Cyan>++</font><font color=Red>[</font>TokAnyClose<font color=Red>]</font>-<a name="line-385"></a>-<a name="line-386"></a><a name="content"></a><font color=Blue>content</font> <font color=Red>::</font> Name <font color=Red>-&gt;</font> HParser <font color=Cyan>(</font>Stack<font color=Cyan>,</font>Content Posn<font color=Cyan>)</font>-<a name="line-387"></a><font color=Blue>content</font> ctx <font color=Red>=</font> <font color=Green><u>do</u></font> <font color=Cyan>{</font> p <font color=Red>&lt;-</font> posn <font color=Cyan>;</font> content' p ctx <font color=Cyan>}</font>-<a name="line-388"></a>  <font color=Green><u>where</u></font> content' p ctx <font color=Red>=</font> oneOf'-<a name="line-389"></a>          <font color=Red>[</font> <font color=Cyan>(</font> <font color=Magenta>"element"</font><font color=Cyan>,</font> element ctx <font color=Cyan>&gt;&gt;=</font> <font color=Red>\</font><font color=Cyan>(</font>s<font color=Cyan>,</font>e<font color=Cyan>)</font><font color=Red>-&gt;</font> return <font color=Cyan>(</font>s<font color=Cyan>,</font> CElem e p<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-390"></a>          <font color=Cyan>,</font> <font color=Cyan>(</font> <font color=Magenta>"chardata"</font><font color=Cyan>,</font> chardata <font color=Cyan>&gt;&gt;=</font> <font color=Red>\</font>s<font color=Red>-&gt;</font> return <font color=Cyan>(</font>[]<font color=Cyan>,</font> CString False s p<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-391"></a>          <font color=Cyan>,</font> <font color=Cyan>(</font> <font color=Magenta>"reference"</font><font color=Cyan>,</font> reference <font color=Cyan>&gt;&gt;=</font> <font color=Red>\</font>r<font color=Red>-&gt;</font> return <font color=Cyan>(</font>[]<font color=Cyan>,</font> CRef r p<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-392"></a>          <font color=Cyan>,</font> <font color=Cyan>(</font> <font color=Magenta>"cdsect"</font><font color=Cyan>,</font> cdsect <font color=Cyan>&gt;&gt;=</font> <font color=Red>\</font>c<font color=Red>-&gt;</font> return <font color=Cyan>(</font>[]<font color=Cyan>,</font> CString True c p<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-393"></a>          <font color=Cyan>,</font> <font color=Cyan>(</font> <font color=Magenta>"misc"</font><font color=Cyan>,</font> misc <font color=Cyan>&gt;&gt;=</font> <font color=Red>\</font>m<font color=Red>-&gt;</font>  return <font color=Cyan>(</font>[]<font color=Cyan>,</font> CMisc m p<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-394"></a>          <font color=Red>]</font> <font color=Cyan>`adjustErrP`</font> <font color=Cyan>(</font><font color=Magenta>"when looking for a content item,\n"</font><font color=Cyan>++</font><font color=Cyan>)</font>-<a name="line-395"></a>-<a name="line-396"></a><a name="elemtag"></a><font color=Blue>----</font>-<a name="line-397"></a><font color=Blue>elemtag</font> <font color=Red>::</font> HParser ElemTag-<a name="line-398"></a><font color=Blue>elemtag</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-399"></a>    n <font color=Red>&lt;-</font> name <font color=Cyan>`adjustErrBad`</font> <font color=Cyan>(</font><font color=Magenta>"malformed element tag\n"</font><font color=Cyan>++</font><font color=Cyan>)</font>-<a name="line-400"></a>    <font color=Green><u>as</u></font> <font color=Red>&lt;-</font> many attribute-<a name="line-401"></a>    return <font color=Cyan>(</font>ElemTag <font color=Cyan>(</font>map toLower n<font color=Cyan>)</font> <font color=Green><u>as</u></font><font color=Cyan>)</font>-<a name="line-402"></a>-<a name="line-403"></a><a name="attribute"></a><font color=Blue>attribute</font> <font color=Red>::</font> HParser Attribute-<a name="line-404"></a><font color=Blue>attribute</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-405"></a>    n <font color=Red>&lt;-</font> name-<a name="line-406"></a>    v <font color=Red>&lt;-</font> <font color=Cyan>(</font><font color=Green><u>do</u></font> tok TokEqual-<a name="line-407"></a>             attvalue<font color=Cyan>)</font> <font color=Cyan>`onFail`</font>-<a name="line-408"></a>         <font color=Cyan>(</font>return <font color=Cyan>(</font>AttValue <font color=Red>[</font>Left <font color=Magenta>"TRUE"</font><font color=Red>]</font><font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-409"></a>    return <font color=Cyan>(</font>map toLower n<font color=Cyan>,</font>v<font color=Cyan>)</font>-<a name="line-410"></a>-<a name="line-411"></a><font color=Blue>--elementdecl :: HParser ElementDecl</font>-<a name="line-412"></a><font color=Blue>--elementdecl = do</font>-<a name="line-413"></a><font color=Blue>--    tok TokSpecialOpen</font>-<a name="line-414"></a><font color=Blue>--    tok (TokSpecial ELEMENTx)</font>-<a name="line-415"></a><font color=Blue>--    n &lt;- name `onFail` failP "missing identifier in ELEMENT decl"</font>-<a name="line-416"></a><font color=Blue>--    c &lt;- contentspec `onFail` failP "missing content spec in ELEMENT decl"</font>-<a name="line-417"></a><font color=Blue>--    tok TokAnyClose `onFail` failP "expected &gt; terminating ELEMENT decl"</font>-<a name="line-418"></a><font color=Blue>--    return (ElementDecl n c)</font>-<a name="line-419"></a><font color=Blue>--</font>-<a name="line-420"></a><font color=Blue>--contentspec :: HParser ContentSpec</font>-<a name="line-421"></a><font color=Blue>--contentspec =</font>-<a name="line-422"></a><font color=Blue>--    ( word "EMPTY" &gt;&gt; return EMPTY) `onFail`</font>-<a name="line-423"></a><font color=Blue>--    ( word "ANY" &gt;&gt; return ANY) `onFail`</font>-<a name="line-424"></a><font color=Blue>--    ( mixed &gt;&gt;= return . Mixed) `onFail`</font>-<a name="line-425"></a><font color=Blue>--    ( cp &gt;&gt;= return . ContentSpec) `onFail`</font>-<a name="line-426"></a><font color=Blue>--    PEREF(ContentPE,contentspec)</font>-<a name="line-427"></a><font color=Blue>--</font>-<a name="line-428"></a><font color=Blue>--choice :: HParser [CP]</font>-<a name="line-429"></a><font color=Blue>--choice = do</font>-<a name="line-430"></a><font color=Blue>--    bracket (tok TokBraOpen) (tok TokBraClose)</font>-<a name="line-431"></a><font color=Blue>--            (cp `sepby1` (tok TokPipe))</font>-<a name="line-432"></a><font color=Blue>--</font>-<a name="line-433"></a><font color=Blue>--sequence :: HParser [CP]</font>-<a name="line-434"></a><font color=Blue>--sequence = do</font>-<a name="line-435"></a><font color=Blue>--    bracket (tok TokBraOpen) (tok TokBraClose)</font>-<a name="line-436"></a><font color=Blue>--            (cp `sepby1` (tok TokComma))</font>-<a name="line-437"></a><font color=Blue>--</font>-<a name="line-438"></a><font color=Blue>--cp :: HParser CP</font>-<a name="line-439"></a><font color=Blue>--cp =</font>-<a name="line-440"></a><font color=Blue>--    ( do n &lt;- name</font>-<a name="line-441"></a><font color=Blue>--         m &lt;- modifier</font>-<a name="line-442"></a><font color=Blue>--         return (TagName n m)) `onFail`</font>-<a name="line-443"></a><font color=Blue>--    ( do ss &lt;- sequence</font>-<a name="line-444"></a><font color=Blue>--         m &lt;- modifier</font>-<a name="line-445"></a><font color=Blue>--         return (Seq ss m)) `onFail`</font>-<a name="line-446"></a><font color=Blue>--    ( do cs &lt;- choice</font>-<a name="line-447"></a><font color=Blue>--         m &lt;- modifier</font>-<a name="line-448"></a><font color=Blue>--         return (Choice cs m)) `onFail`</font>-<a name="line-449"></a><font color=Blue>--    PEREF(CPPE,cp)</font>-<a name="line-450"></a><font color=Blue>--</font>-<a name="line-451"></a><font color=Blue>--modifier :: HParser Modifier</font>-<a name="line-452"></a><font color=Blue>--modifier =</font>-<a name="line-453"></a><font color=Blue>--    ( tok TokStar &gt;&gt; return Star) `onFail`</font>-<a name="line-454"></a><font color=Blue>--    ( tok TokQuery &gt;&gt; return Query) `onFail`</font>-<a name="line-455"></a><font color=Blue>--    ( tok TokPlus &gt;&gt; return Plus) `onFail`</font>-<a name="line-456"></a><font color=Blue>--    ( return None)</font>-<a name="line-457"></a><font color=Blue>--</font>-<a name="line-458"></a><font color=Blue>--mixed :: HParser Mixed</font>-<a name="line-459"></a><font color=Blue>--mixed = do</font>-<a name="line-460"></a><font color=Blue>--    tok TokBraOpen</font>-<a name="line-461"></a><font color=Blue>--    tok TokHash</font>-<a name="line-462"></a><font color=Blue>--    word "PCDATA"</font>-<a name="line-463"></a><font color=Blue>--    cont</font>-<a name="line-464"></a><font color=Blue>--  where</font>-<a name="line-465"></a><font color=Blue>--    cont = ( tok TokBraClose &gt;&gt; return PCDATA) `onFail`</font>-<a name="line-466"></a><font color=Blue>--           ( do cs &lt;- many ( do tok TokPipe</font>-<a name="line-467"></a><font color=Blue>--                                n &lt;- name</font>-<a name="line-468"></a><font color=Blue>--                                return n)</font>-<a name="line-469"></a><font color=Blue>--                tok TokBraClose</font>-<a name="line-470"></a><font color=Blue>--                tok TokStar</font>-<a name="line-471"></a><font color=Blue>--                return (PCDATAplus cs))</font>-<a name="line-472"></a><font color=Blue>--</font>-<a name="line-473"></a><font color=Blue>--attlistdecl :: HParser AttListDecl</font>-<a name="line-474"></a><font color=Blue>--attlistdecl = do</font>-<a name="line-475"></a><font color=Blue>--    tok TokSpecialOpen</font>-<a name="line-476"></a><font color=Blue>--    tok (TokSpecial ATTLISTx)</font>-<a name="line-477"></a><font color=Blue>--    n &lt;- name `onFail` failP "missing identifier in ATTLIST"</font>-<a name="line-478"></a><font color=Blue>--    ds &lt;- many attdef</font>-<a name="line-479"></a><font color=Blue>--    tok TokAnyClose `onFail` failP "missing &gt; terminating ATTLIST"</font>-<a name="line-480"></a><font color=Blue>--    return (AttListDecl n ds)</font>-<a name="line-481"></a><font color=Blue>--</font>-<a name="line-482"></a><font color=Blue>--attdef :: HParser AttDef</font>-<a name="line-483"></a><font color=Blue>--attdef = do</font>-<a name="line-484"></a><font color=Blue>--    n &lt;- name</font>-<a name="line-485"></a><font color=Blue>--    t &lt;- atttype `onFail` failP "missing attribute type in attlist defn"</font>-<a name="line-486"></a><font color=Blue>--    d &lt;- defaultdecl</font>-<a name="line-487"></a><font color=Blue>--    return (AttDef n t d)</font>-<a name="line-488"></a><font color=Blue>--</font>-<a name="line-489"></a><font color=Blue>--atttype :: HParser AttType</font>-<a name="line-490"></a><font color=Blue>--atttype =</font>-<a name="line-491"></a><font color=Blue>--    ( word "CDATA" &gt;&gt; return StringType) `onFail`</font>-<a name="line-492"></a><font color=Blue>--    ( tokenizedtype &gt;&gt;= return . TokenizedType) `onFail`</font>-<a name="line-493"></a><font color=Blue>--    ( enumeratedtype &gt;&gt;= return . EnumeratedType)</font>-<a name="line-494"></a><font color=Blue>--</font>-<a name="line-495"></a><font color=Blue>--tokenizedtype :: HParser TokenizedType</font>-<a name="line-496"></a><font color=Blue>--tokenizedtype =</font>-<a name="line-497"></a><font color=Blue>--    ( word "ID" &gt;&gt; return ID) `onFail`</font>-<a name="line-498"></a><font color=Blue>--    ( word "IDREF" &gt;&gt; return IDREF) `onFail`</font>-<a name="line-499"></a><font color=Blue>--    ( word "IDREFS" &gt;&gt; return IDREFS) `onFail`</font>-<a name="line-500"></a><font color=Blue>--    ( word "ENTITY" &gt;&gt; return ENTITY) `onFail`</font>-<a name="line-501"></a><font color=Blue>--    ( word "ENTITIES" &gt;&gt; return ENTITIES) `onFail`</font>-<a name="line-502"></a><font color=Blue>--    ( word "NMTOKEN" &gt;&gt; return NMTOKEN) `onFail`</font>-<a name="line-503"></a><font color=Blue>--    ( word "NMTOKENS" &gt;&gt; return NMTOKENS)</font>-<a name="line-504"></a><font color=Blue>--</font>-<a name="line-505"></a><font color=Blue>--enumeratedtype :: HParser EnumeratedType</font>-<a name="line-506"></a><font color=Blue>--enumeratedtype =</font>-<a name="line-507"></a><font color=Blue>--    ( notationtype &gt;&gt;= return . NotationType) `onFail`</font>-<a name="line-508"></a><font color=Blue>--    ( enumeration &gt;&gt;= return . Enumeration)</font>-<a name="line-509"></a><font color=Blue>--</font>-<a name="line-510"></a><font color=Blue>--notationtype :: HParser NotationType</font>-<a name="line-511"></a><font color=Blue>--notationtype = do</font>-<a name="line-512"></a><font color=Blue>--    word "NOTATION"</font>-<a name="line-513"></a><font color=Blue>--    bracket (tok TokBraOpen) (tok TokBraClose)</font>-<a name="line-514"></a><font color=Blue>--            (name `sepby1` (tok TokPipe))</font>-<a name="line-515"></a><font color=Blue>--</font>-<a name="line-516"></a><font color=Blue>--enumeration :: HParser Enumeration</font>-<a name="line-517"></a><font color=Blue>--enumeration =</font>-<a name="line-518"></a><font color=Blue>--    bracket (tok TokBraOpen) (tok TokBraClose)</font>-<a name="line-519"></a><font color=Blue>--            (nmtoken `sepby1` (tok TokPipe))</font>-<a name="line-520"></a><font color=Blue>--</font>-<a name="line-521"></a><font color=Blue>--defaultdecl :: HParser DefaultDecl</font>-<a name="line-522"></a><font color=Blue>--defaultdecl =</font>-<a name="line-523"></a><font color=Blue>--    ( tok TokHash &gt;&gt; word "REQUIRED" &gt;&gt; return REQUIRED) `onFail`</font>-<a name="line-524"></a><font color=Blue>--    ( tok TokHash &gt;&gt; word "IMPLIED" &gt;&gt; return IMPLIED) `onFail`</font>-<a name="line-525"></a><font color=Blue>--    ( do f &lt;- maybe (tok TokHash &gt;&gt; word "FIXED" &gt;&gt; return FIXED)</font>-<a name="line-526"></a><font color=Blue>--         a &lt;- attvalue</font>-<a name="line-527"></a><font color=Blue>--         return (DefaultTo a f))</font>-<a name="line-528"></a><font color=Blue>--</font>-<a name="line-529"></a><font color=Blue>--conditionalsect :: HParser ConditionalSect</font>-<a name="line-530"></a><font color=Blue>--conditionalsect =</font>-<a name="line-531"></a><font color=Blue>--    ( do tok TokSectionOpen</font>-<a name="line-532"></a><font color=Blue>--         tok (TokSection INCLUDEx)</font>-<a name="line-533"></a><font color=Blue>--         tok TokSqOpen `onFail` failP "missing [ after INCLUDE"</font>-<a name="line-534"></a><font color=Blue>--         i &lt;- extsubsetdecl `onFail` failP "missing ExtSubsetDecl in INCLUDE"</font>-<a name="line-535"></a><font color=Blue>--         tok TokSectionClose `onFail` failP "missing ] after INCLUDE"</font>-<a name="line-536"></a><font color=Blue>--         return (IncludeSect i)) `onFail`</font>-<a name="line-537"></a><font color=Blue>--    ( do tok TokSectionOpen</font>-<a name="line-538"></a><font color=Blue>--         tok (TokSection IGNOREx)</font>-<a name="line-539"></a><font color=Blue>--         tok TokSqOpen `onFail` failP "missing [ after IGNORE"</font>-<a name="line-540"></a><font color=Blue>--         i &lt;- many ignoresectcontents</font>-<a name="line-541"></a><font color=Blue>--         tok TokSectionClose `onFail` failP "missing ] after IGNORE"</font>-<a name="line-542"></a><font color=Blue>--         return (IgnoreSect i))</font>-<a name="line-543"></a><font color=Blue>--</font>-<a name="line-544"></a><font color=Blue>--ignoresectcontents :: HParser IgnoreSectContents</font>-<a name="line-545"></a><font color=Blue>--ignoresectcontents = do</font>-<a name="line-546"></a><font color=Blue>--    i &lt;- ignore</font>-<a name="line-547"></a><font color=Blue>--    is &lt;- many (do tok TokSectionOpen</font>-<a name="line-548"></a><font color=Blue>--                   ic &lt;- ignoresectcontents</font>-<a name="line-549"></a><font color=Blue>--                   tok TokSectionClose</font>-<a name="line-550"></a><font color=Blue>--                   ig &lt;- ignore</font>-<a name="line-551"></a><font color=Blue>--                   return (ic,ig))</font>-<a name="line-552"></a><font color=Blue>--    return (IgnoreSectContents i is)</font>-<a name="line-553"></a><font color=Blue>--</font>-<a name="line-554"></a><font color=Blue>--ignore :: HParser Ignore</font>-<a name="line-555"></a><font color=Blue>--ignore = freetext &gt;&gt;= return . Ignore</font>-<a name="line-556"></a>-<a name="line-557"></a><a name="reference"></a><font color=Blue>reference</font> <font color=Red>::</font> HParser Reference-<a name="line-558"></a><font color=Blue>reference</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-559"></a>    bracket <font color=Cyan>(</font>tok TokAmp<font color=Cyan>)</font> <font color=Cyan>(</font>tok TokSemi<font color=Cyan>)</font> <font color=Cyan>(</font>freetext <font color=Cyan>&gt;&gt;=</font> val<font color=Cyan>)</font>-<a name="line-560"></a>  <font color=Green><u>where</u></font>-<a name="line-561"></a>    val <font color=Cyan>(</font><font color=Magenta>'#'</font><font color=Red><b>:</b></font><font color=Magenta>'x'</font><font color=Red><b>:</b></font>i<font color=Cyan>)</font> <font color=Red>|</font> all isHexDigit i-<a name="line-562"></a>                    <font color=Red>=</font> return <font color=Cyan>.</font> RefChar <font color=Cyan>.</font> fst <font color=Cyan>.</font> head <font color=Cyan>.</font> readHex <font color=Cyan>$</font> i-<a name="line-563"></a>    val <font color=Cyan>(</font><font color=Magenta>'#'</font><font color=Red><b>:</b></font>i<font color=Cyan>)</font>     <font color=Red>|</font> all isDigit i-<a name="line-564"></a>                    <font color=Red>=</font> return <font color=Cyan>.</font> RefChar <font color=Cyan>.</font> fst <font color=Cyan>.</font> head <font color=Cyan>.</font> readDec <font color=Cyan>$</font> i-<a name="line-565"></a>    val name        <font color=Red>=</font> return <font color=Cyan>.</font> RefEntity <font color=Cyan>$</font> name-<a name="line-566"></a>-<a name="line-567"></a><font color=Blue>{--<a name="line-568"></a>reference :: HParser Reference-<a name="line-569"></a>reference =-<a name="line-570"></a>    ( charref &gt;&gt;= return . RefChar) `onFail`-<a name="line-571"></a>    ( entityref &gt;&gt;= return . RefEntity)-<a name="line-572"></a>-<a name="line-573"></a>entityref :: HParser EntityRef-<a name="line-574"></a>entityref = do-<a name="line-575"></a>    n &lt;- bracket (tok TokAmp) (tok TokSemi) name-<a name="line-576"></a>    return n-<a name="line-577"></a>-<a name="line-578"></a>charref :: HParser CharRef-<a name="line-579"></a>charref = do-<a name="line-580"></a>    bracket (tok TokAmp) (tok TokSemi) (freetext &gt;&gt;= readCharVal)-<a name="line-581"></a>  where-<a name="line-582"></a>    readCharVal ('#':'x':i) = return . fst . head . readHex $ i-<a name="line-583"></a>    readCharVal ('#':i)     = return . fst . head . readDec $ i-<a name="line-584"></a>    readCharVal _           = mzero-<a name="line-585"></a>-}</font>-<a name="line-586"></a>-<a name="line-587"></a><font color=Blue>--pereference :: HParser PEReference</font>-<a name="line-588"></a><font color=Blue>--pereference = do</font>-<a name="line-589"></a><font color=Blue>--    bracket (tok TokPercent) (tok TokSemi) nmtoken</font>-<a name="line-590"></a><font color=Blue>--</font>-<a name="line-591"></a><font color=Blue>--entitydecl :: HParser EntityDecl</font>-<a name="line-592"></a><font color=Blue>--entitydecl =</font>-<a name="line-593"></a><font color=Blue>--    ( gedecl &gt;&gt;= return . EntityGEDecl) `onFail`</font>-<a name="line-594"></a><font color=Blue>--    ( pedecl &gt;&gt;= return . EntityPEDecl)</font>-<a name="line-595"></a><font color=Blue>--</font>-<a name="line-596"></a><font color=Blue>--gedecl :: HParser GEDecl</font>-<a name="line-597"></a><font color=Blue>--gedecl = do</font>-<a name="line-598"></a><font color=Blue>--    tok TokSpecialOpen</font>-<a name="line-599"></a><font color=Blue>--    tok (TokSpecial ENTITYx)</font>-<a name="line-600"></a><font color=Blue>--    n &lt;- name</font>-<a name="line-601"></a><font color=Blue>--    e &lt;- entitydef `onFail` failP "missing entity defn in G ENTITY decl"</font>-<a name="line-602"></a><font color=Blue>--    tok TokAnyClose `onFail` failP "expected &gt; terminating G ENTITY decl"</font>-<a name="line-603"></a><font color=Blue>--    return (GEDecl n e)</font>-<a name="line-604"></a><font color=Blue>--</font>-<a name="line-605"></a><font color=Blue>--pedecl :: HParser PEDecl</font>-<a name="line-606"></a><font color=Blue>--pedecl = do</font>-<a name="line-607"></a><font color=Blue>--    tok TokSpecialOpen</font>-<a name="line-608"></a><font color=Blue>--    tok (TokSpecial ENTITYx)</font>-<a name="line-609"></a><font color=Blue>--    tok TokPercent</font>-<a name="line-610"></a><font color=Blue>--    n &lt;- name</font>-<a name="line-611"></a><font color=Blue>--    e &lt;- pedef `onFail` failP "missing entity defn in P ENTITY decl"</font>-<a name="line-612"></a><font color=Blue>--    tok TokAnyClose `onFail` failP "expected &gt; terminating P ENTITY decl"</font>-<a name="line-613"></a><font color=Blue>--    return (PEDecl n e)</font>-<a name="line-614"></a><font color=Blue>--</font>-<a name="line-615"></a><font color=Blue>--entitydef :: HParser EntityDef</font>-<a name="line-616"></a><font color=Blue>--entitydef =</font>-<a name="line-617"></a><font color=Blue>--    ( entityvalue &gt;&gt;= return . DefEntityValue) `onFail`</font>-<a name="line-618"></a><font color=Blue>--    ( do eid &lt;- externalid</font>-<a name="line-619"></a><font color=Blue>--         ndd &lt;- maybe ndatadecl</font>-<a name="line-620"></a><font color=Blue>--         return (DefExternalID eid ndd))</font>-<a name="line-621"></a><font color=Blue>--</font>-<a name="line-622"></a><font color=Blue>--pedef :: HParser PEDef</font>-<a name="line-623"></a><font color=Blue>--pedef =</font>-<a name="line-624"></a><font color=Blue>--    ( entityvalue &gt;&gt;= return . PEDefEntityValue) `onFail`</font>-<a name="line-625"></a><font color=Blue>--    ( externalid &gt;&gt;= return . PEDefExternalID)</font>-<a name="line-626"></a>-<a name="line-627"></a><a name="externalid"></a><font color=Blue>externalid</font> <font color=Red>::</font> HParser ExternalID-<a name="line-628"></a><font color=Blue>externalid</font> <font color=Red>=</font>-<a name="line-629"></a>    <font color=Cyan>(</font> <font color=Green><u>do</u></font> word <font color=Magenta>"SYSTEM"</font>-<a name="line-630"></a>         s <font color=Red>&lt;-</font> systemliteral-<a name="line-631"></a>         return <font color=Cyan>(</font>SYSTEM s<font color=Cyan>)</font><font color=Cyan>)</font> <font color=Cyan>`onFail`</font>-<a name="line-632"></a>    <font color=Cyan>(</font> <font color=Green><u>do</u></font> word <font color=Magenta>"PUBLIC"</font>-<a name="line-633"></a>         p <font color=Red>&lt;-</font> pubidliteral-<a name="line-634"></a>         s <font color=Red>&lt;-</font> <font color=Cyan>(</font>systemliteral <font color=Cyan>`onFail`</font> return <font color=Cyan>(</font>SystemLiteral <font color=Magenta>""</font><font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-635"></a>         return <font color=Cyan>(</font>PUBLIC p s<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-636"></a>-<a name="line-637"></a><font color=Blue>--ndatadecl :: HParser NDataDecl</font>-<a name="line-638"></a><font color=Blue>--ndatadecl = do</font>-<a name="line-639"></a><font color=Blue>--    word "NDATA"</font>-<a name="line-640"></a><font color=Blue>--    n &lt;- name</font>-<a name="line-641"></a><font color=Blue>--    return (NDATA n)</font>-<a name="line-642"></a>-<a name="line-643"></a><a name="textdecl"></a><font color=Blue>textdecl</font> <font color=Red>::</font> HParser TextDecl-<a name="line-644"></a><font color=Blue>textdecl</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-645"></a>    tok TokPIOpen-<a name="line-646"></a>    <font color=Cyan>(</font>word <font color=Magenta>"xml"</font> <font color=Cyan>`onFail`</font> word <font color=Magenta>"XML"</font><font color=Cyan>)</font>-<a name="line-647"></a>    v <font color=Red>&lt;-</font> maybe versioninfo-<a name="line-648"></a>    e <font color=Red>&lt;-</font> encodingdecl-<a name="line-649"></a>    tok TokPIClose <font color=Cyan>`onFail`</font> failP <font color=Magenta>"expected ?&gt; terminating text decl"</font>-<a name="line-650"></a>    return <font color=Cyan>(</font>TextDecl v e<font color=Cyan>)</font>-<a name="line-651"></a>-<a name="line-652"></a><font color=Blue>--extparsedent :: HParser ExtParsedEnt</font>-<a name="line-653"></a><font color=Blue>--extparsedent = do</font>-<a name="line-654"></a><font color=Blue>--    t &lt;- maybe textdecl</font>-<a name="line-655"></a><font color=Blue>--    (_,c) &lt;- (content "")</font>-<a name="line-656"></a><font color=Blue>--    return (ExtParsedEnt t c)</font>-<a name="line-657"></a><font color=Blue>--</font>-<a name="line-658"></a><font color=Blue>--extpe :: HParser ExtPE</font>-<a name="line-659"></a><font color=Blue>--extpe = do</font>-<a name="line-660"></a><font color=Blue>--    t &lt;- maybe textdecl</font>-<a name="line-661"></a><font color=Blue>--    e &lt;- extsubsetdecl</font>-<a name="line-662"></a><font color=Blue>--    return (ExtPE t e)</font>-<a name="line-663"></a>-<a name="line-664"></a><a name="encodingdecl"></a><font color=Blue>encodingdecl</font> <font color=Red>::</font> HParser EncodingDecl-<a name="line-665"></a><font color=Blue>encodingdecl</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-666"></a>    <font color=Cyan>(</font>word <font color=Magenta>"encoding"</font> <font color=Cyan>`onFail`</font> word <font color=Magenta>"ENCODING"</font><font color=Cyan>)</font>-<a name="line-667"></a>    tok TokEqual <font color=Cyan>`onFail`</font> failBadP <font color=Magenta>"expected = in 'encoding' decl"</font>-<a name="line-668"></a>    f <font color=Red>&lt;-</font> bracket <font color=Cyan>(</font>tok TokQuote<font color=Cyan>)</font> <font color=Cyan>(</font>tok TokQuote<font color=Cyan>)</font> freetext-<a name="line-669"></a>    return <font color=Cyan>(</font>EncodingDecl f<font color=Cyan>)</font>-<a name="line-670"></a>-<a name="line-671"></a><font color=Blue>--notationdecl :: HParser NotationDecl</font>-<a name="line-672"></a><font color=Blue>--notationdecl = do</font>-<a name="line-673"></a><font color=Blue>--    tok TokSpecialOpen</font>-<a name="line-674"></a><font color=Blue>--    word "NOTATION"</font>-<a name="line-675"></a><font color=Blue>--    n &lt;- name</font>-<a name="line-676"></a><font color=Blue>--    e &lt;- either externalid publicid</font>-<a name="line-677"></a><font color=Blue>--    tok TokAnyClose `onFail` failP "expected &gt; terminating NOTATION decl"</font>-<a name="line-678"></a><font color=Blue>--    return (NOTATION n e)</font>-<a name="line-679"></a>-<a name="line-680"></a><a name="publicid"></a><font color=Blue>publicid</font> <font color=Red>::</font> HParser PublicID-<a name="line-681"></a><font color=Blue>publicid</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-682"></a>    word <font color=Magenta>"PUBLICID"</font>-<a name="line-683"></a>    p <font color=Red>&lt;-</font> pubidliteral-<a name="line-684"></a>    return <font color=Cyan>(</font>PUBLICID p<font color=Cyan>)</font>-<a name="line-685"></a>-<a name="line-686"></a><a name="entityvalue"></a><font color=Blue>entityvalue</font> <font color=Red>::</font> HParser EntityValue-<a name="line-687"></a><font color=Blue>entityvalue</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-688"></a>    evs <font color=Red>&lt;-</font> bracket <font color=Cyan>(</font>tok TokQuote<font color=Cyan>)</font> <font color=Cyan>(</font>tok TokQuote<font color=Cyan>)</font> <font color=Cyan>(</font>many ev<font color=Cyan>)</font>-<a name="line-689"></a>    return <font color=Cyan>(</font>EntityValue evs<font color=Cyan>)</font>-<a name="line-690"></a>-<a name="line-691"></a><a name="ev"></a><font color=Blue>ev</font> <font color=Red>::</font> HParser EV-<a name="line-692"></a><font color=Blue>ev</font> <font color=Red>=</font>-<a name="line-693"></a>    <font color=Cyan>(</font> freetext <font color=Cyan>&gt;&gt;=</font> return <font color=Cyan>.</font> EVString<font color=Cyan>)</font> <font color=Cyan>`onFail`</font>-<a name="line-694"></a><font color=Blue>--  PEREF(EVPERef,ev) `onFail`</font>-<a name="line-695"></a>    <font color=Cyan>(</font> reference <font color=Cyan>&gt;&gt;=</font> return <font color=Cyan>.</font> EVRef<font color=Cyan>)</font>-<a name="line-696"></a>-<a name="line-697"></a><a name="attvalue"></a><font color=Blue>attvalue</font> <font color=Red>::</font> HParser AttValue-<a name="line-698"></a><font color=Blue>attvalue</font> <font color=Red>=</font>-<a name="line-699"></a>  <font color=Cyan>(</font> <font color=Green><u>do</u></font> avs <font color=Red>&lt;-</font> bracket <font color=Cyan>(</font>tok TokQuote<font color=Cyan>)</font> <font color=Cyan>(</font>tok TokQuote<font color=Cyan>)</font>-<a name="line-700"></a>                      <font color=Cyan>(</font>many <font color=Cyan>(</font>either freetext reference<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-701"></a>       return <font color=Cyan>(</font>AttValue avs<font color=Cyan>)</font> <font color=Cyan>)</font> <font color=Cyan>`onFail`</font>-<a name="line-702"></a>  <font color=Cyan>(</font> <font color=Green><u>do</u></font> v <font color=Red>&lt;-</font> nmtoken-<a name="line-703"></a>       s <font color=Red>&lt;-</font> <font color=Cyan>(</font>tok TokPercent <font color=Cyan>&gt;&gt;</font> return <font color=Magenta>"%"</font><font color=Cyan>)</font> <font color=Cyan>`onFail`</font> return <font color=Magenta>""</font>-<a name="line-704"></a>       return <font color=Cyan>(</font>AttValue <font color=Red>[</font>Left <font color=Cyan>(</font>v<font color=Cyan>++</font>s<font color=Cyan>)</font><font color=Red>]</font><font color=Cyan>)</font> <font color=Cyan>)</font> <font color=Cyan>`onFail`</font>-<a name="line-705"></a>  <font color=Cyan>(</font> <font color=Green><u>do</u></font> s <font color=Red>&lt;-</font> oneOf <font color=Red>[</font> tok TokPlus <font color=Cyan>&gt;&gt;</font> return <font color=Magenta>"+"</font>-<a name="line-706"></a>                  <font color=Cyan>,</font> tok TokHash <font color=Cyan>&gt;&gt;</font> return <font color=Magenta>"#"</font>-<a name="line-707"></a>                  <font color=Red>]</font>-<a name="line-708"></a>       v <font color=Red>&lt;-</font> nmtoken-<a name="line-709"></a>       return <font color=Cyan>(</font>AttValue <font color=Red>[</font>Left <font color=Cyan>(</font>s<font color=Cyan>++</font>v<font color=Cyan>)</font><font color=Red>]</font><font color=Cyan>)</font> <font color=Cyan>)</font> <font color=Cyan>`onFail`</font>-<a name="line-710"></a>  failP <font color=Magenta>"Badly formatted attribute value"</font>-<a name="line-711"></a>-<a name="line-712"></a><a name="systemliteral"></a><font color=Blue>systemliteral</font> <font color=Red>::</font> HParser SystemLiteral-<a name="line-713"></a><font color=Blue>systemliteral</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-714"></a>    s <font color=Red>&lt;-</font> bracket <font color=Cyan>(</font>tok TokQuote<font color=Cyan>)</font> <font color=Cyan>(</font>tok TokQuote<font color=Cyan>)</font> freetext-<a name="line-715"></a>    return <font color=Cyan>(</font>SystemLiteral s<font color=Cyan>)</font>		<font color=Blue>-- note: need to fold &amp;...; escapes</font>-<a name="line-716"></a>-<a name="line-717"></a><a name="pubidliteral"></a><font color=Blue>pubidliteral</font> <font color=Red>::</font> HParser PubidLiteral-<a name="line-718"></a><font color=Blue>pubidliteral</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-719"></a>    s <font color=Red>&lt;-</font> bracket <font color=Cyan>(</font>tok TokQuote<font color=Cyan>)</font> <font color=Cyan>(</font>tok TokQuote<font color=Cyan>)</font> freetext-<a name="line-720"></a>    return <font color=Cyan>(</font>PubidLiteral s<font color=Cyan>)</font>		<font color=Blue>-- note: need to fold &amp;...; escapes</font>-<a name="line-721"></a>-<a name="line-722"></a><a name="chardata"></a><font color=Blue>chardata</font> <font color=Red>::</font> HParser CharData-<a name="line-723"></a><font color=Blue>chardata</font> <font color=Red>=</font> freetext <font color=Blue>-- &gt;&gt;= return . CharData</font>-<a name="line-724"></a>-</pre>-</body>-</html>
− docs/HaXml/src/Text/XML/HaXml/Html/ParseLazy.html
@@ -1,738 +0,0 @@-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">-<html>-<head>-<!-- Generated by HsColour, http://www.cs.york.ac.uk/fp/darcs/hscolour/ -->-<title>src/Text/XML/HaXml/Html/ParseLazy.hs</title>-</head>-<body>-<pre><a name="line-1"></a><font color=Blue>-- | This is a parser for HTML documents.  Unlike for XML documents, it</font>-<a name="line-2"></a><font color=Blue>--   must include a certain amount of error-correction to account for</font>-<a name="line-3"></a><font color=Blue>--   HTML features like self-terminating tags, unterminated tags, and</font>-<a name="line-4"></a><font color=Blue>--   incorrect nesting.  The input is tokenised by the</font>-<a name="line-5"></a><font color=Blue>--   XML lexer (a separate lexer is not required for HTML).</font>-<a name="line-6"></a>-<a name="line-7"></a><font color=Blue>-- It uses a slightly extended version of the Hutton/Meijer parser</font>-<a name="line-8"></a><font color=Blue>-- combinators.</font>-<a name="line-9"></a>-<a name="line-10"></a><font color=Green><u>module</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Html<font color=Cyan>.</font>ParseLazy-<a name="line-11"></a>  <font color=Cyan>(</font> htmlParse-<a name="line-12"></a>  <font color=Cyan>)</font> <font color=Green><u>where</u></font>-<a name="line-13"></a>-<a name="line-14"></a><font color=Green><u>import</u></font> Prelude hiding <font color=Cyan>(</font>either<font color=Cyan>,</font>maybe<font color=Cyan>,</font>sequence<font color=Cyan>)</font>-<a name="line-15"></a><font color=Green><u>import</u></font> <font color=Green><u>qualified</u></font> Prelude <font color=Cyan>(</font>either<font color=Cyan>)</font>-<a name="line-16"></a><font color=Green><u>import</u></font> Maybe hiding <font color=Cyan>(</font>maybe<font color=Cyan>)</font>-<a name="line-17"></a><font color=Green><u>import</u></font> Char <font color=Cyan>(</font>toLower<font color=Cyan>,</font> isSpace<font color=Cyan>,</font> isDigit<font color=Cyan>,</font> isHexDigit<font color=Cyan>)</font>-<a name="line-18"></a><font color=Green><u>import</u></font> Numeric <font color=Cyan>(</font>readDec<font color=Cyan>,</font>readHex<font color=Cyan>)</font>-<a name="line-19"></a><font color=Green><u>import</u></font> Monad-<a name="line-20"></a>-<a name="line-21"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Types-<a name="line-22"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Lex-<a name="line-23"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Posn-<a name="line-24"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>ParserCombinators<font color=Cyan>.</font>Poly<font color=Cyan>.</font>Lazy-<a name="line-25"></a>-<a name="line-26"></a><font color=Blue>--  #define DEBUG</font>-<a name="line-27"></a> -<a name="line-28"></a><font color=Magenta><em>#if defined(DEBUG)</em></font>-<a name="line-29"></a><font color=Magenta><em>#  if ( defined(__GLASGOW_HASKELL__) &amp;&amp; __GLASGOW_HASKELL__ &gt; 502 ) || \</em></font>-<a name="line-30"></a>      <font color=Cyan>(</font> defined<font color=Cyan>(</font><b><font color=Magenta>__NHC__</font></b><font color=Cyan>)</font> <font color=Cyan>&amp;&amp;</font> <b><font color=Magenta>__NHC__</font></b> <font color=Cyan>&gt;</font> <font color=Magenta>114</font> <font color=Cyan>)</font> <font color=Cyan>||</font> defined<font color=Cyan>(</font><b><font color=Magenta>__HUGS__</font></b><font color=Cyan>)</font>-<a name="line-31"></a><font color=Green><u>import</u></font> Debug<font color=Cyan>.</font>Trace<font color=Cyan>(</font>trace<font color=Cyan>)</font>-<a name="line-32"></a><font color=Magenta><em>#  elif defined(__GLASGOW_HASKELL__)</em></font>-<a name="line-33"></a><font color=Green><u>import</u></font> IOExts<font color=Cyan>(</font>trace<font color=Cyan>)</font>-<a name="line-34"></a><font color=Magenta><em>#  elif defined(__NHC__) || defined(__HBC__)</em></font>-<a name="line-35"></a><font color=Green><u>import</u></font> NonStdTrace-<a name="line-36"></a><font color=Magenta><em>#  endif</em></font>-<a name="line-37"></a><a name="debug"></a><font color=Blue>debug</font> <font color=Red>::</font> Monad m <font color=Red>=&gt;</font> String <font color=Red>-&gt;</font> m ()-<a name="line-38"></a><font color=Blue>debug</font> s <font color=Red>=</font> trace s <font color=Cyan>(</font>return ()<font color=Cyan>)</font>-<a name="line-39"></a><font color=Magenta><em>#else</em></font>-<a name="line-40"></a><font color=Blue>debug</font> <font color=Red>::</font> Monad m <font color=Red>=&gt;</font> String <font color=Red>-&gt;</font> m ()-<a name="line-41"></a><font color=Blue>debug</font> s <font color=Red>=</font> return ()-<a name="line-42"></a><font color=Magenta><em>#endif</em></font>-<a name="line-43"></a>-<a name="line-44"></a>-<a name="line-45"></a><a name="htmlParse"></a><font color=Blue>-- | The first argument is the name of the file, the second is the string</font>-<a name="line-46"></a><font color=Blue>--   contents of the file.  The result is the generic representation of</font>-<a name="line-47"></a><font color=Blue>--   an XML document.  Any errors cause program failure with message to stderr.</font>-<a name="line-48"></a><font color=Blue>htmlParse</font> <font color=Red>::</font> String <font color=Red>-&gt;</font> String <font color=Red>-&gt;</font> Document Posn-<a name="line-49"></a><font color=Blue>htmlParse</font> name <font color=Red>=</font> <font color=Blue>{-simplify .-}</font> fst <font color=Cyan>.</font> runParser document <font color=Cyan>.</font> xmlLex name-<a name="line-50"></a>-<a name="line-51"></a><font color=Blue>{--<a name="line-52"></a>-- | The first argument is the name of the file, the second is the string-<a name="line-53"></a>--   contents of the file.  The result is the generic representation of-<a name="line-54"></a>--   an XML document.  Any parsing errors are returned in the @Either@ type.-<a name="line-55"></a>htmlParse' :: String -&gt; String -&gt; Either String (Document Posn)-<a name="line-56"></a>htmlParse' name = Prelude.either Left (Right . simplify) . fst-<a name="line-57"></a>                  . runParser document . xmlLex name-<a name="line-58"></a>-}</font>-<a name="line-59"></a>-<a name="line-60"></a><font color=Blue>---- Document simplification ----</font>-<a name="line-61"></a>-<a name="line-62"></a><a name="simplify"></a><font color=Blue>simplify</font> <font color=Red>::</font> Document i <font color=Red>-&gt;</font> Document i-<a name="line-63"></a><font color=Blue>simplify</font> <font color=Cyan>(</font>Document p st <font color=Cyan>(</font>Elem n avs cs<font color=Cyan>)</font> ms<font color=Cyan>)</font> <font color=Red>=</font>-<a name="line-64"></a>    Document p st <font color=Cyan>(</font>Elem n avs <font color=Cyan>(</font>deepfilter simp cs<font color=Cyan>)</font><font color=Cyan>)</font> ms-<a name="line-65"></a>  <font color=Green><u>where</u></font>-<a name="line-66"></a>    simp <font color=Cyan>(</font>CElem <font color=Cyan>(</font>Elem <font color=Magenta>"null"</font> [] []<font color=Cyan>)</font> <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red>=</font> False-<a name="line-67"></a>    simp <font color=Cyan>(</font>CElem <font color=Cyan>(</font>Elem  n     <font color=Green><u>_</u></font>  []<font color=Cyan>)</font> <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red>|</font> n <font color=Cyan>`elem`</font> <font color=Red>[</font><font color=Magenta>"font"</font><font color=Cyan>,</font><font color=Magenta>"p"</font><font color=Cyan>,</font><font color=Magenta>"i"</font><font color=Cyan>,</font><font color=Magenta>"b"</font><font color=Cyan>,</font><font color=Magenta>"em"</font>-<a name="line-68"></a>                                                  <font color=Cyan>,</font><font color=Magenta>"tt"</font><font color=Cyan>,</font><font color=Magenta>"big"</font><font color=Cyan>,</font><font color=Magenta>"small"</font><font color=Red>]</font> <font color=Red>=</font> False-<a name="line-69"></a> <font color=Blue>-- simp (CString False s _) | all isSpace s = False</font>-<a name="line-70"></a>    simp <font color=Green><u>_</u></font> <font color=Red>=</font> True-<a name="line-71"></a>    deepfilter p <font color=Red>=</font>-<a name="line-72"></a>        filter p <font color=Cyan>.</font> map <font color=Cyan>(</font><font color=Red>\</font>c<font color=Red>-&gt;</font> <font color=Green><u>case</u></font> c <font color=Green><u>of</u></font>-<a name="line-73"></a>                          CElem <font color=Cyan>(</font>Elem n avs cs<font color=Cyan>)</font> i-<a name="line-74"></a>                                  <font color=Red>-&gt;</font> CElem <font color=Cyan>(</font>Elem n avs <font color=Cyan>(</font>deepfilter p cs<font color=Cyan>)</font><font color=Cyan>)</font> i-<a name="line-75"></a>                          <font color=Green><u>_</u></font>       <font color=Red>-&gt;</font> c<font color=Cyan>)</font>-<a name="line-76"></a>-<a name="line-77"></a><a name="selfclosingtags"></a><font color=Blue>-- opening any of these, they close again immediately</font>-<a name="line-78"></a><font color=Blue>selfclosingtags</font> <font color=Red>=</font> <font color=Red>[</font><font color=Magenta>"img"</font><font color=Cyan>,</font><font color=Magenta>"hr"</font><font color=Cyan>,</font><font color=Magenta>"br"</font><font color=Cyan>,</font><font color=Magenta>"meta"</font><font color=Cyan>,</font><font color=Magenta>"col"</font><font color=Cyan>,</font><font color=Magenta>"link"</font><font color=Cyan>,</font><font color=Magenta>"base"</font>-<a name="line-79"></a>                  <font color=Cyan>,</font><font color=Magenta>"param"</font><font color=Cyan>,</font><font color=Magenta>"area"</font><font color=Cyan>,</font><font color=Magenta>"frame"</font><font color=Cyan>,</font><font color=Magenta>"input"</font><font color=Red>]</font>-<a name="line-80"></a>-<a name="line-81"></a><a name="closeInnerTags"></a><font color=Blue>--closing this, implicitly closes any of those which are contained in it</font>-<a name="line-82"></a><font color=Blue>closeInnerTags</font> <font color=Red>=</font>-<a name="line-83"></a>  <font color=Red>[</font> <font color=Cyan>(</font><font color=Magenta>"ul"</font><font color=Cyan>,</font>      <font color=Red>[</font><font color=Magenta>"li"</font><font color=Red>]</font><font color=Cyan>)</font>-<a name="line-84"></a>  <font color=Cyan>,</font> <font color=Cyan>(</font><font color=Magenta>"ol"</font><font color=Cyan>,</font>      <font color=Red>[</font><font color=Magenta>"li"</font><font color=Red>]</font><font color=Cyan>)</font>-<a name="line-85"></a>  <font color=Cyan>,</font> <font color=Cyan>(</font><font color=Magenta>"dl"</font><font color=Cyan>,</font>      <font color=Red>[</font><font color=Magenta>"dt"</font><font color=Cyan>,</font><font color=Magenta>"dd"</font><font color=Red>]</font><font color=Cyan>)</font>-<a name="line-86"></a>  <font color=Cyan>,</font> <font color=Cyan>(</font><font color=Magenta>"tr"</font><font color=Cyan>,</font>      <font color=Red>[</font><font color=Magenta>"th"</font><font color=Cyan>,</font><font color=Magenta>"td"</font><font color=Red>]</font><font color=Cyan>)</font>-<a name="line-87"></a>  <font color=Cyan>,</font> <font color=Cyan>(</font><font color=Magenta>"div"</font><font color=Cyan>,</font>     <font color=Red>[</font><font color=Magenta>"p"</font><font color=Red>]</font><font color=Cyan>)</font>-<a name="line-88"></a>  <font color=Cyan>,</font> <font color=Cyan>(</font><font color=Magenta>"thead"</font><font color=Cyan>,</font>   <font color=Red>[</font><font color=Magenta>"th"</font><font color=Cyan>,</font><font color=Magenta>"tr"</font><font color=Cyan>,</font><font color=Magenta>"td"</font><font color=Red>]</font><font color=Cyan>)</font>-<a name="line-89"></a>  <font color=Cyan>,</font> <font color=Cyan>(</font><font color=Magenta>"tfoot"</font><font color=Cyan>,</font>   <font color=Red>[</font><font color=Magenta>"th"</font><font color=Cyan>,</font><font color=Magenta>"tr"</font><font color=Cyan>,</font><font color=Magenta>"td"</font><font color=Red>]</font><font color=Cyan>)</font>-<a name="line-90"></a>  <font color=Cyan>,</font> <font color=Cyan>(</font><font color=Magenta>"tbody"</font><font color=Cyan>,</font>   <font color=Red>[</font><font color=Magenta>"th"</font><font color=Cyan>,</font><font color=Magenta>"tr"</font><font color=Cyan>,</font><font color=Magenta>"td"</font><font color=Red>]</font><font color=Cyan>)</font>-<a name="line-91"></a>  <font color=Cyan>,</font> <font color=Cyan>(</font><font color=Magenta>"table"</font><font color=Cyan>,</font>   <font color=Red>[</font><font color=Magenta>"th"</font><font color=Cyan>,</font><font color=Magenta>"tr"</font><font color=Cyan>,</font><font color=Magenta>"td"</font><font color=Cyan>,</font><font color=Magenta>"thead"</font><font color=Cyan>,</font><font color=Magenta>"tfoot"</font><font color=Cyan>,</font><font color=Magenta>"tbody"</font><font color=Red>]</font><font color=Cyan>)</font>-<a name="line-92"></a>  <font color=Cyan>,</font> <font color=Cyan>(</font><font color=Magenta>"caption"</font><font color=Cyan>,</font> <font color=Red>[</font><font color=Magenta>"p"</font><font color=Red>]</font><font color=Cyan>)</font>-<a name="line-93"></a>  <font color=Cyan>,</font> <font color=Cyan>(</font><font color=Magenta>"th"</font><font color=Cyan>,</font>      <font color=Red>[</font><font color=Magenta>"p"</font><font color=Red>]</font><font color=Cyan>)</font>-<a name="line-94"></a>  <font color=Cyan>,</font> <font color=Cyan>(</font><font color=Magenta>"td"</font><font color=Cyan>,</font>      <font color=Red>[</font><font color=Magenta>"p"</font><font color=Red>]</font><font color=Cyan>)</font>-<a name="line-95"></a>  <font color=Cyan>,</font> <font color=Cyan>(</font><font color=Magenta>"li"</font><font color=Cyan>,</font>      <font color=Red>[</font><font color=Magenta>"p"</font><font color=Red>]</font><font color=Cyan>)</font>-<a name="line-96"></a>  <font color=Cyan>,</font> <font color=Cyan>(</font><font color=Magenta>"dt"</font><font color=Cyan>,</font>      <font color=Red>[</font><font color=Magenta>"p"</font><font color=Red>]</font><font color=Cyan>)</font>-<a name="line-97"></a>  <font color=Cyan>,</font> <font color=Cyan>(</font><font color=Magenta>"dd"</font><font color=Cyan>,</font>      <font color=Red>[</font><font color=Magenta>"p"</font><font color=Red>]</font><font color=Cyan>)</font>-<a name="line-98"></a>  <font color=Cyan>,</font> <font color=Cyan>(</font><font color=Magenta>"object"</font><font color=Cyan>,</font>  <font color=Red>[</font><font color=Magenta>"p"</font><font color=Red>]</font><font color=Cyan>)</font>-<a name="line-99"></a>  <font color=Cyan>,</font> <font color=Cyan>(</font><font color=Magenta>"map"</font><font color=Cyan>,</font>     <font color=Red>[</font><font color=Magenta>"p"</font><font color=Red>]</font><font color=Cyan>)</font>-<a name="line-100"></a>  <font color=Cyan>,</font> <font color=Cyan>(</font><font color=Magenta>"body"</font><font color=Cyan>,</font>    <font color=Red>[</font><font color=Magenta>"p"</font><font color=Red>]</font><font color=Cyan>)</font>-<a name="line-101"></a>  <font color=Red>]</font>-<a name="line-102"></a>-<a name="line-103"></a><a name="closes"></a><font color=Blue>--opening this, implicitly closes that</font>-<a name="line-104"></a><font color=Blue>closes</font> <font color=Red>::</font> Name <font color=Red>-&gt;</font> Name <font color=Red>-&gt;</font> Bool-<a name="line-105"></a><font color=Magenta>"a"</font>  <font color=Cyan>`closes`</font> <font color=Magenta>"a"</font>   <font color=Red>=</font>  True-<a name="line-106"></a><font color=Magenta>"li"</font> <font color=Cyan>`closes`</font> <font color=Magenta>"li"</font>  <font color=Red>=</font>  True-<a name="line-107"></a><font color=Magenta>"th"</font> <font color=Cyan>`closes`</font>  t    <font color=Red>|</font> t <font color=Cyan>`elem`</font> <font color=Red>[</font><font color=Magenta>"th"</font><font color=Cyan>,</font><font color=Magenta>"td"</font><font color=Red>]</font>      <font color=Red>=</font>  True-<a name="line-108"></a><font color=Magenta>"td"</font> <font color=Cyan>`closes`</font>  t    <font color=Red>|</font> t <font color=Cyan>`elem`</font> <font color=Red>[</font><font color=Magenta>"th"</font><font color=Cyan>,</font><font color=Magenta>"td"</font><font color=Red>]</font>      <font color=Red>=</font>  True-<a name="line-109"></a><font color=Magenta>"tr"</font> <font color=Cyan>`closes`</font>  t    <font color=Red>|</font> t <font color=Cyan>`elem`</font> <font color=Red>[</font><font color=Magenta>"th"</font><font color=Cyan>,</font><font color=Magenta>"td"</font><font color=Cyan>,</font><font color=Magenta>"tr"</font><font color=Red>]</font> <font color=Red>=</font>  True-<a name="line-110"></a><font color=Magenta>"dt"</font> <font color=Cyan>`closes`</font>  t    <font color=Red>|</font> t <font color=Cyan>`elem`</font> <font color=Red>[</font><font color=Magenta>"dt"</font><font color=Cyan>,</font><font color=Magenta>"dd"</font><font color=Red>]</font>      <font color=Red>=</font>  True-<a name="line-111"></a><font color=Magenta>"dd"</font> <font color=Cyan>`closes`</font>  t    <font color=Red>|</font> t <font color=Cyan>`elem`</font> <font color=Red>[</font><font color=Magenta>"dt"</font><font color=Cyan>,</font><font color=Magenta>"dd"</font><font color=Red>]</font>      <font color=Red>=</font>  True-<a name="line-112"></a><font color=Magenta>"form"</font>  <font color=Cyan>`closes`</font> <font color=Magenta>"form"</font>      <font color=Red>=</font> True-<a name="line-113"></a><font color=Magenta>"label"</font> <font color=Cyan>`closes`</font> <font color=Magenta>"label"</font>     <font color=Red>=</font> True-<a name="line-114"></a><font color=Green><u>_</u></font>       <font color=Cyan>`closes`</font> <font color=Magenta>"option"</font>    <font color=Red>=</font> True-<a name="line-115"></a><font color=Magenta>"thead"</font> <font color=Cyan>`closes`</font> t  <font color=Red>|</font> t <font color=Cyan>`elem`</font> <font color=Red>[</font><font color=Magenta>"colgroup"</font><font color=Red>]</font>          <font color=Red>=</font> True-<a name="line-116"></a><font color=Magenta>"tfoot"</font> <font color=Cyan>`closes`</font> t  <font color=Red>|</font> t <font color=Cyan>`elem`</font> <font color=Red>[</font><font color=Magenta>"thead"</font><font color=Cyan>,</font><font color=Magenta>"colgroup"</font><font color=Red>]</font>  <font color=Red>=</font> True-<a name="line-117"></a><font color=Magenta>"tbody"</font> <font color=Cyan>`closes`</font> t  <font color=Red>|</font> t <font color=Cyan>`elem`</font> <font color=Red>[</font><font color=Magenta>"tbody"</font><font color=Cyan>,</font><font color=Magenta>"tfoot"</font><font color=Cyan>,</font><font color=Magenta>"thead"</font><font color=Cyan>,</font><font color=Magenta>"colgroup"</font><font color=Red>]</font> <font color=Red>=</font> True-<a name="line-118"></a><font color=Magenta>"colgroup"</font> <font color=Cyan>`closes`</font> <font color=Magenta>"colgroup"</font>  <font color=Red>=</font> True-<a name="line-119"></a><a name="closes"></a><font color=Blue>t</font> <font color=Cyan>`closes`</font> <font color=Magenta>"p"</font>-<a name="line-120"></a>    <font color=Red>|</font> t <font color=Cyan>`elem`</font> <font color=Red>[</font><font color=Magenta>"p"</font><font color=Cyan>,</font><font color=Magenta>"h1"</font><font color=Cyan>,</font><font color=Magenta>"h2"</font><font color=Cyan>,</font><font color=Magenta>"h3"</font><font color=Cyan>,</font><font color=Magenta>"h4"</font><font color=Cyan>,</font><font color=Magenta>"h5"</font><font color=Cyan>,</font><font color=Magenta>"h6"</font>-<a name="line-121"></a>               <font color=Cyan>,</font><font color=Magenta>"hr"</font><font color=Cyan>,</font><font color=Magenta>"div"</font><font color=Cyan>,</font><font color=Magenta>"ul"</font><font color=Cyan>,</font><font color=Magenta>"dl"</font><font color=Cyan>,</font><font color=Magenta>"ol"</font><font color=Cyan>,</font><font color=Magenta>"table"</font><font color=Red>]</font>  <font color=Red>=</font>  True-<a name="line-122"></a><font color=Green><u>_</u></font> <font color=Cyan>`closes`</font> <font color=Green><u>_</u></font> <font color=Red>=</font> False-<a name="line-123"></a>-<a name="line-124"></a>-<a name="line-125"></a>-<a name="line-126"></a><font color=Blue>---- Misc ----</font>-<a name="line-127"></a>-<a name="line-128"></a><a name="fst3"></a><font color=Blue>fst3</font> <font color=Cyan>(</font>a<font color=Cyan>,</font><font color=Green><u>_</u></font><font color=Cyan>,</font><font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red>=</font> a-<a name="line-129"></a><a name="snd3"></a><font color=Blue>snd3</font> <font color=Cyan>(</font><font color=Green><u>_</u></font><font color=Cyan>,</font>a<font color=Cyan>,</font><font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red>=</font> a-<a name="line-130"></a><a name="thd3"></a><font color=Blue>thd3</font> <font color=Cyan>(</font><font color=Green><u>_</u></font><font color=Cyan>,</font><font color=Green><u>_</u></font><font color=Cyan>,</font>a<font color=Cyan>)</font> <font color=Red>=</font> a-<a name="line-131"></a>-<a name="line-132"></a>-<a name="line-133"></a>-<a name="line-134"></a><font color=Blue>---- Auxiliary Parsing Functions ----</font>-<a name="line-135"></a>-<a name="line-136"></a><a name="HParser"></a><font color=Green><u>type</u></font> HParser a <font color=Red>=</font> Parser <font color=Cyan>(</font>Posn<font color=Cyan>,</font>TokenT<font color=Cyan>)</font> a-<a name="line-137"></a>-<a name="line-138"></a><a name="tok"></a><font color=Blue>tok</font> <font color=Red>::</font> TokenT <font color=Red>-&gt;</font> HParser TokenT-<a name="line-139"></a><font color=Blue>tok</font> t <font color=Red>=</font> <font color=Green><u>do</u></font> <font color=Cyan>(</font>p<font color=Cyan>,</font>t'<font color=Cyan>)</font> <font color=Red>&lt;-</font> next-<a name="line-140"></a>           <font color=Green><u>case</u></font> t' <font color=Green><u>of</u></font> TokError s    <font color=Red>-&gt;</font> report failBad <font color=Cyan>(</font>show t<font color=Cyan>)</font> p t'-<a name="line-141"></a>                      <font color=Green><u>_</u></font> <font color=Red>|</font> t'<font color=Cyan>==</font>t     <font color=Red>-&gt;</font> return t-<a name="line-142"></a>                        <font color=Red>|</font> otherwise <font color=Red>-&gt;</font> report fail <font color=Cyan>(</font>show t<font color=Cyan>)</font> p t'-<a name="line-143"></a>-<a name="line-144"></a><a name="name"></a><font color=Blue>name</font> <font color=Red>::</font> HParser Name-<a name="line-145"></a><font color=Blue>--name = do {(p,TokName s) &lt;- next; return s}</font>-<a name="line-146"></a><font color=Blue>name</font> <font color=Red>=</font> <font color=Green><u>do</u></font> <font color=Cyan>(</font>p<font color=Cyan>,</font>tok<font color=Cyan>)</font> <font color=Red>&lt;-</font> next-<a name="line-147"></a>          <font color=Green><u>case</u></font> tok <font color=Green><u>of</u></font> -<a name="line-148"></a>            TokName s  <font color=Red>-&gt;</font> return s -<a name="line-149"></a>            TokError s <font color=Red>-&gt;</font> report failBad <font color=Magenta>"a name"</font> p tok-<a name="line-150"></a>            <font color=Green><u>_</u></font>          <font color=Red>-&gt;</font> report fail <font color=Magenta>"a name"</font> p tok-<a name="line-151"></a>-<a name="line-152"></a><a name="string"></a><font color=Blue>string</font><font color=Cyan>,</font> freetext <font color=Red>::</font> HParser String-<a name="line-153"></a><font color=Blue>string</font>   <font color=Red>=</font> <font color=Green><u>do</u></font> <font color=Cyan>(</font>p<font color=Cyan>,</font>t<font color=Cyan>)</font> <font color=Red>&lt;-</font> next-<a name="line-154"></a>              <font color=Green><u>case</u></font> t <font color=Green><u>of</u></font> TokName s <font color=Red>-&gt;</font> return s-<a name="line-155"></a>                        <font color=Green><u>_</u></font>         <font color=Red>-&gt;</font> report fail <font color=Magenta>"text"</font> p t-<a name="line-156"></a><a name="freetext"></a><font color=Blue>freetext</font> <font color=Red>=</font> <font color=Green><u>do</u></font> <font color=Cyan>(</font>p<font color=Cyan>,</font>t<font color=Cyan>)</font> <font color=Red>&lt;-</font> next-<a name="line-157"></a>              <font color=Green><u>case</u></font> t <font color=Green><u>of</u></font> TokFreeText s <font color=Red>-&gt;</font> return s-<a name="line-158"></a>                        <font color=Green><u>_</u></font>             <font color=Red>-&gt;</font> report fail <font color=Magenta>"text"</font> p t-<a name="line-159"></a>-<a name="line-160"></a><a name="maybe"></a><font color=Blue>maybe</font> <font color=Red>::</font> HParser a <font color=Red>-&gt;</font> HParser <font color=Cyan>(</font>Maybe a<font color=Cyan>)</font>-<a name="line-161"></a><font color=Blue>maybe</font> p <font color=Red>=</font>-<a name="line-162"></a>    <font color=Cyan>(</font> p <font color=Cyan>&gt;&gt;=</font> return <font color=Cyan>.</font> Just<font color=Cyan>)</font> <font color=Cyan>`onFail`</font>-<a name="line-163"></a>    <font color=Cyan>(</font> return Nothing<font color=Cyan>)</font>-<a name="line-164"></a>-<a name="line-165"></a><a name="either"></a><font color=Blue>either</font> <font color=Red>::</font> HParser a <font color=Red>-&gt;</font> HParser b <font color=Red>-&gt;</font> HParser <font color=Cyan>(</font>Either a b<font color=Cyan>)</font>-<a name="line-166"></a><font color=Blue>either</font> p q <font color=Red>=</font>-<a name="line-167"></a>    <font color=Cyan>(</font> p <font color=Cyan>&gt;&gt;=</font> return <font color=Cyan>.</font> Left<font color=Cyan>)</font> <font color=Cyan>`onFail`</font>-<a name="line-168"></a>    <font color=Cyan>(</font> q <font color=Cyan>&gt;&gt;=</font> return <font color=Cyan>.</font> Right<font color=Cyan>)</font>-<a name="line-169"></a>-<a name="line-170"></a><a name="word"></a><font color=Blue>word</font> <font color=Red>::</font> String <font color=Red>-&gt;</font> HParser ()-<a name="line-171"></a><font color=Blue>word</font> s <font color=Red>=</font> <font color=Green><u>do</u></font> <font color=Cyan>{</font> x <font color=Red>&lt;-</font> next-<a name="line-172"></a>            <font color=Cyan>;</font> <font color=Green><u>case</u></font> x <font color=Green><u>of</u></font>-<a name="line-173"></a>                <font color=Cyan>(</font>p<font color=Cyan>,</font>TokName n<font color=Cyan>)</font>     <font color=Red>|</font> s<font color=Cyan>==</font>n <font color=Red>-&gt;</font> return ()-<a name="line-174"></a>                <font color=Cyan>(</font>p<font color=Cyan>,</font>TokFreeText n<font color=Cyan>)</font> <font color=Red>|</font> s<font color=Cyan>==</font>n <font color=Red>-&gt;</font> return ()-<a name="line-175"></a>                <font color=Cyan>(</font>p<font color=Cyan>,</font>t<font color=Red>@</font><font color=Cyan>(</font>TokError <font color=Green><u>_</u></font><font color=Cyan>)</font><font color=Cyan>)</font> <font color=Red>-&gt;</font> report failBad <font color=Cyan>(</font>show s<font color=Cyan>)</font> p t-<a name="line-176"></a>                <font color=Cyan>(</font>p<font color=Cyan>,</font>t<font color=Cyan>)</font> <font color=Red>-&gt;</font> report fail <font color=Cyan>(</font>show s<font color=Cyan>)</font> p t-<a name="line-177"></a>            <font color=Cyan>}</font>-<a name="line-178"></a>-<a name="line-179"></a><a name="posn"></a><font color=Blue>posn</font> <font color=Red>::</font> HParser Posn-<a name="line-180"></a><font color=Blue>posn</font> <font color=Red>=</font> <font color=Green><u>do</u></font> <font color=Cyan>{</font> x<font color=Red>@</font><font color=Cyan>(</font>p<font color=Cyan>,</font><font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red>&lt;-</font> next-<a name="line-181"></a>          <font color=Cyan>;</font> reparse <font color=Red>[</font>x<font color=Red>]</font>-<a name="line-182"></a>          <font color=Cyan>;</font> return p-<a name="line-183"></a>          <font color=Cyan>}</font> <font color=Cyan>`onFail`</font> return noPos-<a name="line-184"></a>-<a name="line-185"></a><a name="nmtoken"></a><font color=Blue>nmtoken</font> <font color=Red>::</font> HParser NmToken-<a name="line-186"></a><font color=Blue>nmtoken</font> <font color=Red>=</font> <font color=Cyan>(</font>string <font color=Cyan>`onFail`</font> freetext<font color=Cyan>)</font>-<a name="line-187"></a>-<a name="line-188"></a><a name="failP"></a><font color=Blue>failP</font><font color=Cyan>,</font> failBadP <font color=Red>::</font> String <font color=Red>-&gt;</font> HParser a-<a name="line-189"></a><font color=Blue>failP</font> msg    <font color=Red>=</font> <font color=Green><u>do</u></font> <font color=Cyan>{</font> p <font color=Red>&lt;-</font> posn<font color=Cyan>;</font> fail <font color=Cyan>(</font>msg<font color=Cyan>++</font><font color=Magenta>"\n    at "</font><font color=Cyan>++</font>show p<font color=Cyan>)</font> <font color=Cyan>}</font>-<a name="line-190"></a><a name="failBadP"></a><font color=Blue>failBadP</font> msg <font color=Red>=</font> <font color=Green><u>do</u></font> <font color=Cyan>{</font> p <font color=Red>&lt;-</font> posn<font color=Cyan>;</font> failBad <font color=Cyan>(</font>msg<font color=Cyan>++</font><font color=Magenta>"\n    at "</font><font color=Cyan>++</font>show p<font color=Cyan>)</font> <font color=Cyan>}</font>-<a name="line-191"></a>-<a name="line-192"></a><a name="report"></a><font color=Blue>report</font> <font color=Red>::</font> <font color=Cyan>(</font>String<font color=Red>-&gt;</font>HParser a<font color=Cyan>)</font> <font color=Red>-&gt;</font> String <font color=Red>-&gt;</font> Posn <font color=Red>-&gt;</font> TokenT <font color=Red>-&gt;</font> HParser a-<a name="line-193"></a><font color=Blue>report</font> fail exp p t <font color=Red>=</font> fail <font color=Cyan>(</font><font color=Magenta>"Expected "</font><font color=Cyan>++</font>show exp<font color=Cyan>++</font><font color=Magenta>" but found "</font><font color=Cyan>++</font>show t-<a name="line-194"></a>                           <font color=Cyan>++</font><font color=Magenta>"\n  at "</font><font color=Cyan>++</font>show p<font color=Cyan>)</font>-<a name="line-195"></a>-<a name="line-196"></a><a name="adjustErrP"></a><font color=Blue>adjustErrP</font> <font color=Red>::</font> HParser a <font color=Red>-&gt;</font> <font color=Cyan>(</font>String<font color=Red>-&gt;</font>String<font color=Cyan>)</font> <font color=Red>-&gt;</font> HParser a-<a name="line-197"></a><a name="adjustErrP"></a><font color=Blue>p</font> <font color=Cyan>`adjustErrP`</font> f <font color=Red>=</font> p <font color=Cyan>`onFail`</font> <font color=Green><u>do</u></font> pn <font color=Red>&lt;-</font> posn-<a name="line-198"></a>                                 <font color=Cyan>(</font>p <font color=Cyan>`adjustErr`</font> f<font color=Cyan>)</font> <font color=Cyan>`adjustErr`</font> <font color=Cyan>(</font><font color=Cyan>++</font>show pn<font color=Cyan>)</font>-<a name="line-199"></a>-<a name="line-200"></a><font color=Blue>---- XML Parsing Functions ----</font>-<a name="line-201"></a>-<a name="line-202"></a><a name="document"></a><font color=Blue>document</font> <font color=Red>::</font> HParser <font color=Cyan>(</font>Document Posn<font color=Cyan>)</font>-<a name="line-203"></a><font color=Blue>document</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-204"></a>    return Document-<a name="line-205"></a>        <font color=Cyan>`apply`</font> <font color=Cyan>(</font>prolog <font color=Cyan>`adjustErr`</font> <font color=Cyan>(</font><font color=Magenta>"unrecognisable XML prolog\n"</font><font color=Cyan>++</font><font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-206"></a>        <font color=Cyan>`apply`</font> <font color=Cyan>(</font>return emptyST<font color=Cyan>)</font>-<a name="line-207"></a>        <font color=Cyan>`apply`</font> <font color=Cyan>(</font><font color=Green><u>do</u></font> es <font color=Red>&lt;-</font> many1 <font color=Cyan>(</font>element <font color=Magenta>"HTML document"</font><font color=Cyan>)</font>-<a name="line-208"></a>                    return <font color=Cyan>(</font><font color=Green><u>case</u></font> map snd es <font color=Green><u>of</u></font>-<a name="line-209"></a>                                <font color=Red>[</font>e<font color=Red>]</font> <font color=Red>-&gt;</font> e-<a name="line-210"></a>                                es  <font color=Red>-&gt;</font> Elem <font color=Magenta>"html"</font> [] <font color=Cyan>(</font>map mkCElem es<font color=Cyan>)</font><font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-211"></a>        <font color=Cyan>`apply`</font> <font color=Cyan>(</font>many misc<font color=Cyan>)</font>-<a name="line-212"></a>  <font color=Green><u>where</u></font> mkCElem e <font color=Red>=</font> CElem e noPos-<a name="line-213"></a>-<a name="line-214"></a><a name="comment"></a><font color=Blue>comment</font> <font color=Red>::</font> HParser Comment-<a name="line-215"></a><font color=Blue>comment</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-216"></a>    bracket <font color=Cyan>(</font>tok TokCommentOpen<font color=Cyan>)</font> <font color=Cyan>(</font>tok TokCommentClose<font color=Cyan>)</font> freetext-<a name="line-217"></a>-<a name="line-218"></a><a name="processinginstruction"></a><font color=Blue>processinginstruction</font> <font color=Red>::</font> HParser ProcessingInstruction-<a name="line-219"></a><font color=Blue>processinginstruction</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-220"></a>    tok TokPIOpen-<a name="line-221"></a>    commit <font color=Cyan>$</font> <font color=Green><u>do</u></font>-<a name="line-222"></a>      n <font color=Red>&lt;-</font> string  <font color=Cyan>`onFail`</font> failP <font color=Magenta>"processing instruction has no target"</font>-<a name="line-223"></a>      f <font color=Red>&lt;-</font> freetext-<a name="line-224"></a>      <font color=Cyan>(</font>tok TokPIClose <font color=Cyan>`onFail`</font> tok TokAnyClose<font color=Cyan>)</font> <font color=Cyan>`onFail`</font> failP <font color=Magenta>"missing ?&gt; or &gt;"</font>-<a name="line-225"></a>      return <font color=Cyan>(</font>n<font color=Cyan>,</font> f<font color=Cyan>)</font>-<a name="line-226"></a>-<a name="line-227"></a><a name="cdsect"></a><font color=Blue>cdsect</font> <font color=Red>::</font> HParser CDSect-<a name="line-228"></a><font color=Blue>cdsect</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-229"></a>    tok TokSectionOpen-<a name="line-230"></a>    bracket <font color=Cyan>(</font>tok <font color=Cyan>(</font>TokSection CDATAx<font color=Cyan>)</font><font color=Cyan>)</font> <font color=Cyan>(</font>tok TokSectionClose<font color=Cyan>)</font> chardata-<a name="line-231"></a>-<a name="line-232"></a><a name="prolog"></a><font color=Blue>prolog</font> <font color=Red>::</font> HParser Prolog-<a name="line-233"></a><font color=Blue>prolog</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-234"></a>    x <font color=Red>&lt;-</font> maybe xmldecl-<a name="line-235"></a>    m1 <font color=Red>&lt;-</font> many misc-<a name="line-236"></a>    dtd <font color=Red>&lt;-</font> maybe doctypedecl-<a name="line-237"></a>    m2 <font color=Red>&lt;-</font> many misc-<a name="line-238"></a>    return <font color=Cyan>(</font>Prolog x m1 dtd m2<font color=Cyan>)</font>-<a name="line-239"></a>-<a name="line-240"></a><a name="xmldecl"></a><font color=Blue>xmldecl</font> <font color=Red>::</font> HParser XMLDecl-<a name="line-241"></a><font color=Blue>xmldecl</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-242"></a>    tok TokPIOpen-<a name="line-243"></a>    <font color=Cyan>(</font>word <font color=Magenta>"xml"</font> <font color=Cyan>`onFail`</font> word <font color=Magenta>"XML"</font><font color=Cyan>)</font>-<a name="line-244"></a>    p <font color=Red>&lt;-</font> posn-<a name="line-245"></a>    s <font color=Red>&lt;-</font> freetext-<a name="line-246"></a>    tok TokPIClose <font color=Cyan>`onFail`</font> failBadP <font color=Magenta>"missing ?&gt; in &lt;?xml ...?&gt;"</font>-<a name="line-247"></a>    <font color=Cyan>(</font>return <font color=Cyan>.</font> fst <font color=Cyan>.</font> runParser aux <font color=Cyan>.</font> xmlReLex p<font color=Cyan>)</font> s-<a name="line-248"></a>  <font color=Green><u>where</u></font>-<a name="line-249"></a>    aux <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-250"></a>      v <font color=Red>&lt;-</font> versioninfo  <font color=Cyan>`onFail`</font> failP <font color=Magenta>"missing XML version info"</font>-<a name="line-251"></a>      e <font color=Red>&lt;-</font> maybe encodingdecl-<a name="line-252"></a>      s <font color=Red>&lt;-</font> maybe sddecl-<a name="line-253"></a>      return <font color=Cyan>(</font>XMLDecl v e s<font color=Cyan>)</font>-<a name="line-254"></a>-<a name="line-255"></a><a name="versioninfo"></a><font color=Blue>versioninfo</font> <font color=Red>::</font> HParser VersionInfo-<a name="line-256"></a><font color=Blue>versioninfo</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-257"></a>    <font color=Cyan>(</font>word <font color=Magenta>"version"</font> <font color=Cyan>`onFail`</font> word <font color=Magenta>"VERSION"</font><font color=Cyan>)</font>-<a name="line-258"></a>    tok TokEqual-<a name="line-259"></a>    bracket <font color=Cyan>(</font>tok TokQuote<font color=Cyan>)</font> <font color=Cyan>(</font>tok TokQuote<font color=Cyan>)</font> freetext-<a name="line-260"></a>-<a name="line-261"></a><a name="misc"></a><font color=Blue>misc</font> <font color=Red>::</font> HParser Misc-<a name="line-262"></a><font color=Blue>misc</font> <font color=Red>=</font> -<a name="line-263"></a>    oneOf' <font color=Red>[</font> <font color=Cyan>(</font><font color=Magenta>"&lt;!--comment--&gt;"</font><font color=Cyan>,</font> comment <font color=Cyan>&gt;&gt;=</font> return <font color=Cyan>.</font> Comment<font color=Cyan>)</font>-<a name="line-264"></a>           <font color=Cyan>,</font> <font color=Cyan>(</font><font color=Magenta>"&lt;?PI?&gt;"</font><font color=Cyan>,</font>         processinginstruction <font color=Cyan>&gt;&gt;=</font> return <font color=Cyan>.</font> PI<font color=Cyan>)</font>-<a name="line-265"></a>           <font color=Red>]</font>-<a name="line-266"></a>-<a name="line-267"></a>-<a name="line-268"></a><font color=Blue>-- Question: for HTML, should we disallow in-line DTDs, allowing only externals?</font>-<a name="line-269"></a><font color=Blue>-- Answer: I think so.</font>-<a name="line-270"></a>-<a name="line-271"></a><a name="doctypedecl"></a><font color=Blue>doctypedecl</font> <font color=Red>::</font> HParser DocTypeDecl-<a name="line-272"></a><font color=Blue>doctypedecl</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-273"></a>    tok TokSpecialOpen-<a name="line-274"></a>    tok <font color=Cyan>(</font>TokSpecial DOCTYPEx<font color=Cyan>)</font>-<a name="line-275"></a>    commit <font color=Cyan>$</font> <font color=Green><u>do</u></font>-<a name="line-276"></a>      n <font color=Red>&lt;-</font> name-<a name="line-277"></a>      eid <font color=Red>&lt;-</font> maybe externalid-<a name="line-278"></a><font color=Blue>--    es &lt;- maybe (bracket (tok TokSqOpen) (tok TokSqClose)) (many markupdecl)</font>-<a name="line-279"></a>      tok TokAnyClose  <font color=Cyan>`onFail`</font> failP <font color=Magenta>"missing &gt; in DOCTYPE decl"</font>-<a name="line-280"></a><font color=Blue>--    return (DTD n eid (case es of { Nothing -&gt; []; Just e -&gt; e }))</font>-<a name="line-281"></a>      return <font color=Cyan>(</font>DTD n eid []<font color=Cyan>)</font>-<a name="line-282"></a>-<a name="line-283"></a><font color=Blue>--markupdecl :: HParser MarkupDecl</font>-<a name="line-284"></a><font color=Blue>--markupdecl =</font>-<a name="line-285"></a><font color=Blue>--    ( elementdecl &gt;&gt;= return . Element) `onFail`</font>-<a name="line-286"></a><font color=Blue>--    ( attlistdecl &gt;&gt;= return . AttList) `onFail`</font>-<a name="line-287"></a><font color=Blue>--    ( entitydecl &gt;&gt;= return . Entity) `onFail`</font>-<a name="line-288"></a><font color=Blue>--    ( notationdecl &gt;&gt;= return . Notation) `onFail`</font>-<a name="line-289"></a><font color=Blue>--    ( misc &gt;&gt;= return . MarkupMisc) `onFail`</font>-<a name="line-290"></a><font color=Blue>--    PEREF(MarkupPE,markupdecl)</font>-<a name="line-291"></a><font color=Blue>--</font>-<a name="line-292"></a><font color=Blue>--extsubset :: HParser ExtSubset</font>-<a name="line-293"></a><font color=Blue>--extsubset = do</font>-<a name="line-294"></a><font color=Blue>--    td &lt;- maybe textdecl</font>-<a name="line-295"></a><font color=Blue>--    ds &lt;- many extsubsetdecl</font>-<a name="line-296"></a><font color=Blue>--    return (ExtSubset td ds)</font>-<a name="line-297"></a><font color=Blue>--</font>-<a name="line-298"></a><font color=Blue>--extsubsetdecl :: HParser ExtSubsetDecl</font>-<a name="line-299"></a><font color=Blue>--extsubsetdecl =</font>-<a name="line-300"></a><font color=Blue>--    ( markupdecl &gt;&gt;= return . ExtMarkupDecl) `onFail`</font>-<a name="line-301"></a><font color=Blue>--    ( conditionalsect &gt;&gt;= return . ExtConditionalSect) `onFail`</font>-<a name="line-302"></a><font color=Blue>--    PEREF(ExtPEReference,extsubsetdecl)</font>-<a name="line-303"></a>-<a name="line-304"></a><a name="sddecl"></a><font color=Blue>sddecl</font> <font color=Red>::</font> HParser SDDecl-<a name="line-305"></a><font color=Blue>sddecl</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-306"></a>    <font color=Cyan>(</font>word <font color=Magenta>"standalone"</font> <font color=Cyan>`onFail`</font> word <font color=Magenta>"STANDALONE"</font><font color=Cyan>)</font>-<a name="line-307"></a>    commit <font color=Cyan>$</font> <font color=Green><u>do</u></font>-<a name="line-308"></a>      tok TokEqual <font color=Cyan>`onFail`</font> failP <font color=Magenta>"missing = in 'standalone' decl"</font>-<a name="line-309"></a>      bracket <font color=Cyan>(</font>tok TokQuote<font color=Cyan>)</font> <font color=Cyan>(</font>tok TokQuote<font color=Cyan>)</font>-<a name="line-310"></a>              <font color=Cyan>(</font> <font color=Cyan>(</font>word <font color=Magenta>"yes"</font> <font color=Cyan>&gt;&gt;</font> return True<font color=Cyan>)</font> <font color=Cyan>`onFail`</font>-<a name="line-311"></a>                <font color=Cyan>(</font>word <font color=Magenta>"no"</font> <font color=Cyan>&gt;&gt;</font> return False<font color=Cyan>)</font> <font color=Cyan>`onFail`</font>-<a name="line-312"></a>                failP <font color=Magenta>"'standalone' decl requires 'yes' or 'no' value"</font> <font color=Cyan>)</font>-<a name="line-313"></a>-<a name="line-314"></a>-<a name="line-315"></a>-<a name="line-316"></a>-<a name="line-317"></a><a name="Stack"></a><font color=Blue>----</font>-<a name="line-318"></a><a name="Stack"></a><font color=Blue>-- VERY IMPORTANT NOTE: The stack returned here contains those tags which</font>-<a name="line-319"></a><a name="Stack"></a><font color=Blue>-- have been closed implicitly and need to be reopened again at the</font>-<a name="line-320"></a><a name="Stack"></a><font color=Blue>-- earliest opportunity.</font>-<a name="line-321"></a><a name="Stack"></a><font color=Green><u>type</u></font> Stack <font color=Red>=</font> <font color=Red>[</font><font color=Cyan>(</font>Name<font color=Cyan>,</font><font color=Red>[</font>Attribute<font color=Red>]</font><font color=Cyan>)</font><font color=Red>]</font>-<a name="line-322"></a>-<a name="line-323"></a><a name="element"></a><font color=Blue>element</font> <font color=Red>::</font> Name <font color=Red>-&gt;</font> HParser <font color=Cyan>(</font>Stack<font color=Cyan>,</font>Element Posn<font color=Cyan>)</font>-<a name="line-324"></a><font color=Blue>element</font> ctx <font color=Red>=</font>-<a name="line-325"></a>  <font color=Green><u>do</u></font>-<a name="line-326"></a>    tok TokAnyOpen-<a name="line-327"></a>    <font color=Cyan>(</font>ElemTag e avs<font color=Cyan>)</font> <font color=Red>&lt;-</font> elemtag-<a name="line-328"></a>    <font color=Cyan>(</font> <font color=Green><u>if</u></font> e <font color=Cyan>`closes`</font> ctx <font color=Green><u>then</u></font>-<a name="line-329"></a>         <font color=Blue>-- insert the missing close-tag, fail forward, and reparse.</font>-<a name="line-330"></a>         <font color=Cyan>(</font> <font color=Green><u>do</u></font> debug <font color=Cyan>(</font><font color=Magenta>"/"</font><font color=Cyan>)</font>-<a name="line-331"></a>              unparse <font color=Cyan>(</font><font color=Red>[</font>TokEndOpen<font color=Cyan>,</font> TokName ctx<font color=Cyan>,</font> TokAnyClose<font color=Cyan>,</font>-<a name="line-332"></a>                        TokAnyOpen<font color=Cyan>,</font> TokName e<font color=Red>]</font> <font color=Cyan>++</font> reformatAttrs avs<font color=Cyan>)</font>-<a name="line-333"></a>              return <font color=Cyan>(</font>[]<font color=Cyan>,</font> Elem <font color=Magenta>"null"</font> [] []<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-334"></a>      <font color=Green><u>else</u></font> <font color=Green><u>if</u></font> e <font color=Cyan>`elem`</font> selfclosingtags <font color=Green><u>then</u></font>-<a name="line-335"></a>         <font color=Blue>-- complete the parse straightaway.</font>-<a name="line-336"></a>         <font color=Cyan>(</font> <font color=Green><u>do</u></font> tok TokEndClose	<font color=Blue>-- self-closing &lt;tag /&gt; </font>-<a name="line-337"></a>              debug <font color=Cyan>(</font>e<font color=Cyan>++</font><font color=Magenta>"[+]"</font><font color=Cyan>)</font>-<a name="line-338"></a>              return <font color=Cyan>(</font>[]<font color=Cyan>,</font> Elem e avs []<font color=Cyan>)</font><font color=Cyan>)</font> <font color=Cyan>`onFail`</font>-<a name="line-339"></a>     <font color=Blue>--  ( do tok TokAnyClose	-- sequence &lt;tag&gt;&lt;/tag&gt;	(**not HTML?**)</font>-<a name="line-340"></a>     <font color=Blue>--       debug (e++"[+")</font>-<a name="line-341"></a>     <font color=Blue>--       n &lt;- bracket (tok TokEndOpen) (tok TokAnyClose) name</font>-<a name="line-342"></a>     <font color=Blue>--       debug "]"</font>-<a name="line-343"></a>     <font color=Blue>--       if e == (map toLower n :: Name) </font>-<a name="line-344"></a>     <font color=Blue>--         then return ([], Elem e avs [])      </font>-<a name="line-345"></a>     <font color=Blue>--         else return (error "no nesting in empty tag")) `onFail`</font>-<a name="line-346"></a>         <font color=Cyan>(</font> <font color=Green><u>do</u></font> tok TokAnyClose	<font color=Blue>-- &lt;tag&gt; with no close (e.g. &lt;IMG&gt;)</font>-<a name="line-347"></a>              debug <font color=Cyan>(</font>e<font color=Cyan>++</font><font color=Magenta>"[+]"</font><font color=Cyan>)</font>-<a name="line-348"></a>              return <font color=Cyan>(</font>[]<font color=Cyan>,</font> Elem e avs []<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-349"></a>      <font color=Green><u>else</u></font>-<a name="line-350"></a>        <font color=Cyan>(</font><font color=Cyan>(</font> <font color=Green><u>do</u></font> tok TokEndClose-<a name="line-351"></a>              debug <font color=Cyan>(</font>e<font color=Cyan>++</font><font color=Magenta>"[]"</font><font color=Cyan>)</font>-<a name="line-352"></a>              return <font color=Cyan>(</font>[]<font color=Cyan>,</font> Elem e avs []<font color=Cyan>)</font><font color=Cyan>)</font> <font color=Cyan>`onFail`</font>-<a name="line-353"></a>         <font color=Cyan>(</font> <font color=Green><u>do</u></font> tok TokAnyClose <font color=Cyan>`onFail`</font> failP <font color=Magenta>"missing &gt; or /&gt; in element tag"</font>-<a name="line-354"></a>              debug <font color=Cyan>(</font>e<font color=Cyan>++</font><font color=Magenta>"["</font><font color=Cyan>)</font>-<a name="line-355"></a>              return <font color=Cyan>(</font><font color=Red>\</font> interior<font color=Red>-&gt;</font> <font color=Green><u>let</u></font> <font color=Cyan>(</font>stack<font color=Cyan>,</font>contained<font color=Cyan>)</font> <font color=Red>=</font> interior-<a name="line-356"></a>                                   <font color=Green><u>in</u></font>  <font color=Cyan>(</font>stack<font color=Cyan>,</font> Elem e avs contained<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-357"></a>                  <font color=Cyan>`apply`</font>-<a name="line-358"></a>                  <font color=Cyan>(</font><font color=Green><u>do</u></font> zz <font color=Red>&lt;-</font> manyFinally <font color=Cyan>(</font>content e<font color=Cyan>)</font>-<a name="line-359"></a>                                        <font color=Cyan>(</font>tok TokEndOpen<font color=Cyan>)</font>-<a name="line-360"></a>                      n <font color=Red>&lt;-</font> name-<a name="line-361"></a>                      commit <font color=Cyan>(</font>tok TokAnyClose<font color=Cyan>)</font>-<a name="line-362"></a>                      debug <font color=Magenta>"]"</font>-<a name="line-363"></a>                      <font color=Green><u>let</u></font> <font color=Cyan>(</font>ss<font color=Cyan>,</font>cs<font color=Cyan>)</font> <font color=Red>=</font> unzip zz-<a name="line-364"></a>                      <font color=Green><u>let</u></font> s       <font color=Red>=</font> <font color=Green><u>if</u></font> null ss <font color=Green><u>then</u></font> [] <font color=Green><u>else</u></font> last ss-<a name="line-365"></a>                      <font color=Cyan>(</font> <font color=Green><u>if</u></font> e <font color=Cyan>==</font> <font color=Cyan>(</font>map toLower n <font color=Red>::</font> Name<font color=Cyan>)</font> <font color=Green><u>then</u></font>-<a name="line-366"></a>                          <font color=Green><u>do</u></font> unparse <font color=Cyan>(</font>reformatTags <font color=Cyan>(</font>closeInner e s<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-367"></a>                             debug <font color=Magenta>"^"</font>-<a name="line-368"></a>                             return <font color=Cyan>(</font>[]<font color=Cyan>,</font> cs<font color=Cyan>)</font>-<a name="line-369"></a>                        <font color=Green><u>else</u></font>-<a name="line-370"></a>                          <font color=Green><u>do</u></font> unparse <font color=Red>[</font>TokEndOpen<font color=Cyan>,</font> TokName n<font color=Cyan>,</font> TokAnyClose<font color=Red>]</font>-<a name="line-371"></a>                             debug <font color=Magenta>"-"</font>-<a name="line-372"></a>                             return <font color=Cyan>(</font><font color=Cyan>(</font><font color=Cyan>(</font>e<font color=Cyan>,</font>avs<font color=Cyan>)</font><font color=Red><b>:</b></font>s<font color=Cyan>)</font><font color=Cyan>,</font> cs<font color=Cyan>)</font><font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-373"></a>         <font color=Cyan>)</font> <font color=Cyan>`onFail`</font> failP <font color=Cyan>(</font><font color=Magenta>"failed to repair non-matching tags in context: "</font><font color=Cyan>++</font>ctx<font color=Cyan>)</font><font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-374"></a>-<a name="line-375"></a><a name="closeInner"></a><font color=Blue>closeInner</font> <font color=Red>::</font> Name <font color=Red>-&gt;</font> <font color=Red>[</font><font color=Cyan>(</font>Name<font color=Cyan>,</font><font color=Red>[</font>Attribute<font color=Red>]</font><font color=Cyan>)</font><font color=Red>]</font> <font color=Red>-&gt;</font> <font color=Red>[</font><font color=Cyan>(</font>Name<font color=Cyan>,</font><font color=Red>[</font>Attribute<font color=Red>]</font><font color=Cyan>)</font><font color=Red>]</font>-<a name="line-376"></a><font color=Blue>closeInner</font> c ts <font color=Red>=</font>-<a name="line-377"></a>    <font color=Green><u>case</u></font> lookup c closeInnerTags <font color=Green><u>of</u></font>-<a name="line-378"></a>      <font color=Cyan>(</font>Just these<font color=Cyan>)</font> <font color=Red>-&gt;</font> filter <font color=Cyan>(</font><font color=Cyan>(</font><font color=Cyan>`notElem`</font> these<font color=Cyan>)</font><font color=Cyan>.</font>fst<font color=Cyan>)</font> ts-<a name="line-379"></a>      Nothing      <font color=Red>-&gt;</font> ts-<a name="line-380"></a>-<a name="line-381"></a><a name="unparse"></a><font color=Blue>unparse</font> ts <font color=Red>=</font> <font color=Green><u>do</u></font> p <font color=Red>&lt;-</font> posn-<a name="line-382"></a>                reparse <font color=Cyan>(</font>zip <font color=Cyan>(</font>repeat p<font color=Cyan>)</font> ts<font color=Cyan>)</font>-<a name="line-383"></a>-<a name="line-384"></a><a name="reformatAttrs"></a><font color=Blue>reformatAttrs</font> avs <font color=Red>=</font> concatMap f0 avs-<a name="line-385"></a>    <font color=Green><u>where</u></font> f0 <font color=Cyan>(</font>a<font color=Cyan>,</font> v<font color=Red>@</font><font color=Cyan>(</font>AttValue <font color=Green><u>_</u></font><font color=Cyan>)</font><font color=Cyan>)</font> <font color=Red>=</font> <font color=Red>[</font>TokName a<font color=Cyan>,</font> TokEqual<font color=Cyan>,</font> TokQuote<font color=Cyan>,</font>-<a name="line-386"></a>                                       TokFreeText <font color=Cyan>(</font>show v<font color=Cyan>)</font><font color=Cyan>,</font> TokQuote<font color=Red>]</font>-<a name="line-387"></a><a name="reformatTags"></a><font color=Blue>reformatTags</font> ts <font color=Red>=</font> concatMap f0 ts-<a name="line-388"></a>    <font color=Green><u>where</u></font> f0 <font color=Cyan>(</font>t<font color=Cyan>,</font>avs<font color=Cyan>)</font> <font color=Red>=</font> <font color=Red>[</font>TokAnyOpen<font color=Cyan>,</font> TokName t<font color=Red>]</font><font color=Cyan>++</font>reformatAttrs avs<font color=Cyan>++</font><font color=Red>[</font>TokAnyClose<font color=Red>]</font>-<a name="line-389"></a>-<a name="line-390"></a><a name="content"></a><font color=Blue>content</font> <font color=Red>::</font> Name <font color=Red>-&gt;</font> HParser <font color=Cyan>(</font>Stack<font color=Cyan>,</font>Content Posn<font color=Cyan>)</font>-<a name="line-391"></a><font color=Blue>content</font> ctx <font color=Red>=</font> <font color=Green><u>do</u></font> <font color=Cyan>{</font> p <font color=Red>&lt;-</font> posn <font color=Cyan>;</font> content' p ctx <font color=Cyan>}</font>-<a name="line-392"></a>  <font color=Green><u>where</u></font> content' p ctx <font color=Red>=</font> oneOf'-<a name="line-393"></a>          <font color=Red>[</font> <font color=Cyan>(</font> <font color=Magenta>"element"</font><font color=Cyan>,</font> element ctx <font color=Cyan>&gt;&gt;=</font> <font color=Red>\</font><font color=Cyan>(</font>s<font color=Cyan>,</font>e<font color=Cyan>)</font><font color=Red>-&gt;</font> return <font color=Cyan>(</font>s<font color=Cyan>,</font> CElem e p<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-394"></a>          <font color=Cyan>,</font> <font color=Cyan>(</font> <font color=Magenta>"chardata"</font><font color=Cyan>,</font> chardata <font color=Cyan>&gt;&gt;=</font> <font color=Red>\</font>s<font color=Red>-&gt;</font> return <font color=Cyan>(</font>[]<font color=Cyan>,</font> CString False s p<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-395"></a>          <font color=Cyan>,</font> <font color=Cyan>(</font> <font color=Magenta>"reference"</font><font color=Cyan>,</font> reference <font color=Cyan>&gt;&gt;=</font> <font color=Red>\</font>r<font color=Red>-&gt;</font> return <font color=Cyan>(</font>[]<font color=Cyan>,</font> CRef r p<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-396"></a>          <font color=Cyan>,</font> <font color=Cyan>(</font> <font color=Magenta>"cdsect"</font><font color=Cyan>,</font> cdsect <font color=Cyan>&gt;&gt;=</font> <font color=Red>\</font>c<font color=Red>-&gt;</font> return <font color=Cyan>(</font>[]<font color=Cyan>,</font> CString True c p<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-397"></a>          <font color=Cyan>,</font> <font color=Cyan>(</font> <font color=Magenta>"misc"</font><font color=Cyan>,</font> misc <font color=Cyan>&gt;&gt;=</font> <font color=Red>\</font>m<font color=Red>-&gt;</font>  return <font color=Cyan>(</font>[]<font color=Cyan>,</font> CMisc m p<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-398"></a>          <font color=Red>]</font> <font color=Cyan>`adjustErrP`</font> <font color=Cyan>(</font><font color=Magenta>"when looking for a content item,\n"</font><font color=Cyan>++</font><font color=Cyan>)</font>-<a name="line-399"></a>-<a name="line-400"></a><a name="elemtag"></a><font color=Blue>----</font>-<a name="line-401"></a><font color=Blue>elemtag</font> <font color=Red>::</font> HParser ElemTag-<a name="line-402"></a><font color=Blue>elemtag</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-403"></a>    n <font color=Red>&lt;-</font> name <font color=Cyan>`adjustErrBad`</font> <font color=Cyan>(</font><font color=Magenta>"malformed element tag\n"</font><font color=Cyan>++</font><font color=Cyan>)</font>-<a name="line-404"></a>    <font color=Green><u>as</u></font> <font color=Red>&lt;-</font> many attribute-<a name="line-405"></a>    return <font color=Cyan>(</font>ElemTag <font color=Cyan>(</font>map toLower n<font color=Cyan>)</font> <font color=Green><u>as</u></font><font color=Cyan>)</font>-<a name="line-406"></a>-<a name="line-407"></a><a name="attribute"></a><font color=Blue>attribute</font> <font color=Red>::</font> HParser Attribute-<a name="line-408"></a><font color=Blue>attribute</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-409"></a>    n <font color=Red>&lt;-</font> name-<a name="line-410"></a>    v <font color=Red>&lt;-</font> <font color=Cyan>(</font><font color=Green><u>do</u></font> tok TokEqual-<a name="line-411"></a>             attvalue<font color=Cyan>)</font> <font color=Cyan>`onFail`</font>-<a name="line-412"></a>         <font color=Cyan>(</font>return <font color=Cyan>(</font>AttValue <font color=Red>[</font>Left <font color=Magenta>"TRUE"</font><font color=Red>]</font><font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-413"></a>    return <font color=Cyan>(</font>map toLower n<font color=Cyan>,</font>v<font color=Cyan>)</font>-<a name="line-414"></a>-<a name="line-415"></a><font color=Blue>--elementdecl :: HParser ElementDecl</font>-<a name="line-416"></a><font color=Blue>--elementdecl = do</font>-<a name="line-417"></a><font color=Blue>--    tok TokSpecialOpen</font>-<a name="line-418"></a><font color=Blue>--    tok (TokSpecial ELEMENTx)</font>-<a name="line-419"></a><font color=Blue>--    n &lt;- name `onFail` failP "missing identifier in ELEMENT decl"</font>-<a name="line-420"></a><font color=Blue>--    c &lt;- contentspec `onFail` failP "missing content spec in ELEMENT decl"</font>-<a name="line-421"></a><font color=Blue>--    tok TokAnyClose `onFail` failP "expected &gt; terminating ELEMENT decl"</font>-<a name="line-422"></a><font color=Blue>--    return (ElementDecl n c)</font>-<a name="line-423"></a><font color=Blue>--</font>-<a name="line-424"></a><font color=Blue>--contentspec :: HParser ContentSpec</font>-<a name="line-425"></a><font color=Blue>--contentspec =</font>-<a name="line-426"></a><font color=Blue>--    ( word "EMPTY" &gt;&gt; return EMPTY) `onFail`</font>-<a name="line-427"></a><font color=Blue>--    ( word "ANY" &gt;&gt; return ANY) `onFail`</font>-<a name="line-428"></a><font color=Blue>--    ( mixed &gt;&gt;= return . Mixed) `onFail`</font>-<a name="line-429"></a><font color=Blue>--    ( cp &gt;&gt;= return . ContentSpec) `onFail`</font>-<a name="line-430"></a><font color=Blue>--    PEREF(ContentPE,contentspec)</font>-<a name="line-431"></a><font color=Blue>--</font>-<a name="line-432"></a><font color=Blue>--choice :: HParser [CP]</font>-<a name="line-433"></a><font color=Blue>--choice = do</font>-<a name="line-434"></a><font color=Blue>--    bracket (tok TokBraOpen) (tok TokBraClose)</font>-<a name="line-435"></a><font color=Blue>--            (cp `sepby1` (tok TokPipe))</font>-<a name="line-436"></a><font color=Blue>--</font>-<a name="line-437"></a><font color=Blue>--sequence :: HParser [CP]</font>-<a name="line-438"></a><font color=Blue>--sequence = do</font>-<a name="line-439"></a><font color=Blue>--    bracket (tok TokBraOpen) (tok TokBraClose)</font>-<a name="line-440"></a><font color=Blue>--            (cp `sepby1` (tok TokComma))</font>-<a name="line-441"></a><font color=Blue>--</font>-<a name="line-442"></a><font color=Blue>--cp :: HParser CP</font>-<a name="line-443"></a><font color=Blue>--cp =</font>-<a name="line-444"></a><font color=Blue>--    ( do n &lt;- name</font>-<a name="line-445"></a><font color=Blue>--         m &lt;- modifier</font>-<a name="line-446"></a><font color=Blue>--         return (TagName n m)) `onFail`</font>-<a name="line-447"></a><font color=Blue>--    ( do ss &lt;- sequence</font>-<a name="line-448"></a><font color=Blue>--         m &lt;- modifier</font>-<a name="line-449"></a><font color=Blue>--         return (Seq ss m)) `onFail`</font>-<a name="line-450"></a><font color=Blue>--    ( do cs &lt;- choice</font>-<a name="line-451"></a><font color=Blue>--         m &lt;- modifier</font>-<a name="line-452"></a><font color=Blue>--         return (Choice cs m)) `onFail`</font>-<a name="line-453"></a><font color=Blue>--    PEREF(CPPE,cp)</font>-<a name="line-454"></a><font color=Blue>--</font>-<a name="line-455"></a><font color=Blue>--modifier :: HParser Modifier</font>-<a name="line-456"></a><font color=Blue>--modifier =</font>-<a name="line-457"></a><font color=Blue>--    ( tok TokStar &gt;&gt; return Star) `onFail`</font>-<a name="line-458"></a><font color=Blue>--    ( tok TokQuery &gt;&gt; return Query) `onFail`</font>-<a name="line-459"></a><font color=Blue>--    ( tok TokPlus &gt;&gt; return Plus) `onFail`</font>-<a name="line-460"></a><font color=Blue>--    ( return None)</font>-<a name="line-461"></a><font color=Blue>--</font>-<a name="line-462"></a><font color=Blue>--mixed :: HParser Mixed</font>-<a name="line-463"></a><font color=Blue>--mixed = do</font>-<a name="line-464"></a><font color=Blue>--    tok TokBraOpen</font>-<a name="line-465"></a><font color=Blue>--    tok TokHash</font>-<a name="line-466"></a><font color=Blue>--    word "PCDATA"</font>-<a name="line-467"></a><font color=Blue>--    cont</font>-<a name="line-468"></a><font color=Blue>--  where</font>-<a name="line-469"></a><font color=Blue>--    cont = ( tok TokBraClose &gt;&gt; return PCDATA) `onFail`</font>-<a name="line-470"></a><font color=Blue>--           ( do cs &lt;- many ( do tok TokPipe</font>-<a name="line-471"></a><font color=Blue>--                                n &lt;- name</font>-<a name="line-472"></a><font color=Blue>--                                return n)</font>-<a name="line-473"></a><font color=Blue>--                tok TokBraClose</font>-<a name="line-474"></a><font color=Blue>--                tok TokStar</font>-<a name="line-475"></a><font color=Blue>--                return (PCDATAplus cs))</font>-<a name="line-476"></a><font color=Blue>--</font>-<a name="line-477"></a><font color=Blue>--attlistdecl :: HParser AttListDecl</font>-<a name="line-478"></a><font color=Blue>--attlistdecl = do</font>-<a name="line-479"></a><font color=Blue>--    tok TokSpecialOpen</font>-<a name="line-480"></a><font color=Blue>--    tok (TokSpecial ATTLISTx)</font>-<a name="line-481"></a><font color=Blue>--    n &lt;- name `onFail` failP "missing identifier in ATTLIST"</font>-<a name="line-482"></a><font color=Blue>--    ds &lt;- many attdef</font>-<a name="line-483"></a><font color=Blue>--    tok TokAnyClose `onFail` failP "missing &gt; terminating ATTLIST"</font>-<a name="line-484"></a><font color=Blue>--    return (AttListDecl n ds)</font>-<a name="line-485"></a><font color=Blue>--</font>-<a name="line-486"></a><font color=Blue>--attdef :: HParser AttDef</font>-<a name="line-487"></a><font color=Blue>--attdef = do</font>-<a name="line-488"></a><font color=Blue>--    n &lt;- name</font>-<a name="line-489"></a><font color=Blue>--    t &lt;- atttype `onFail` failP "missing attribute type in attlist defn"</font>-<a name="line-490"></a><font color=Blue>--    d &lt;- defaultdecl</font>-<a name="line-491"></a><font color=Blue>--    return (AttDef n t d)</font>-<a name="line-492"></a><font color=Blue>--</font>-<a name="line-493"></a><font color=Blue>--atttype :: HParser AttType</font>-<a name="line-494"></a><font color=Blue>--atttype =</font>-<a name="line-495"></a><font color=Blue>--    ( word "CDATA" &gt;&gt; return StringType) `onFail`</font>-<a name="line-496"></a><font color=Blue>--    ( tokenizedtype &gt;&gt;= return . TokenizedType) `onFail`</font>-<a name="line-497"></a><font color=Blue>--    ( enumeratedtype &gt;&gt;= return . EnumeratedType)</font>-<a name="line-498"></a><font color=Blue>--</font>-<a name="line-499"></a><font color=Blue>--tokenizedtype :: HParser TokenizedType</font>-<a name="line-500"></a><font color=Blue>--tokenizedtype =</font>-<a name="line-501"></a><font color=Blue>--    ( word "ID" &gt;&gt; return ID) `onFail`</font>-<a name="line-502"></a><font color=Blue>--    ( word "IDREF" &gt;&gt; return IDREF) `onFail`</font>-<a name="line-503"></a><font color=Blue>--    ( word "IDREFS" &gt;&gt; return IDREFS) `onFail`</font>-<a name="line-504"></a><font color=Blue>--    ( word "ENTITY" &gt;&gt; return ENTITY) `onFail`</font>-<a name="line-505"></a><font color=Blue>--    ( word "ENTITIES" &gt;&gt; return ENTITIES) `onFail`</font>-<a name="line-506"></a><font color=Blue>--    ( word "NMTOKEN" &gt;&gt; return NMTOKEN) `onFail`</font>-<a name="line-507"></a><font color=Blue>--    ( word "NMTOKENS" &gt;&gt; return NMTOKENS)</font>-<a name="line-508"></a><font color=Blue>--</font>-<a name="line-509"></a><font color=Blue>--enumeratedtype :: HParser EnumeratedType</font>-<a name="line-510"></a><font color=Blue>--enumeratedtype =</font>-<a name="line-511"></a><font color=Blue>--    ( notationtype &gt;&gt;= return . NotationType) `onFail`</font>-<a name="line-512"></a><font color=Blue>--    ( enumeration &gt;&gt;= return . Enumeration)</font>-<a name="line-513"></a><font color=Blue>--</font>-<a name="line-514"></a><font color=Blue>--notationtype :: HParser NotationType</font>-<a name="line-515"></a><font color=Blue>--notationtype = do</font>-<a name="line-516"></a><font color=Blue>--    word "NOTATION"</font>-<a name="line-517"></a><font color=Blue>--    bracket (tok TokBraOpen) (tok TokBraClose)</font>-<a name="line-518"></a><font color=Blue>--            (name `sepby1` (tok TokPipe))</font>-<a name="line-519"></a><font color=Blue>--</font>-<a name="line-520"></a><font color=Blue>--enumeration :: HParser Enumeration</font>-<a name="line-521"></a><font color=Blue>--enumeration =</font>-<a name="line-522"></a><font color=Blue>--    bracket (tok TokBraOpen) (tok TokBraClose)</font>-<a name="line-523"></a><font color=Blue>--            (nmtoken `sepby1` (tok TokPipe))</font>-<a name="line-524"></a><font color=Blue>--</font>-<a name="line-525"></a><font color=Blue>--defaultdecl :: HParser DefaultDecl</font>-<a name="line-526"></a><font color=Blue>--defaultdecl =</font>-<a name="line-527"></a><font color=Blue>--    ( tok TokHash &gt;&gt; word "REQUIRED" &gt;&gt; return REQUIRED) `onFail`</font>-<a name="line-528"></a><font color=Blue>--    ( tok TokHash &gt;&gt; word "IMPLIED" &gt;&gt; return IMPLIED) `onFail`</font>-<a name="line-529"></a><font color=Blue>--    ( do f &lt;- maybe (tok TokHash &gt;&gt; word "FIXED" &gt;&gt; return FIXED)</font>-<a name="line-530"></a><font color=Blue>--         a &lt;- attvalue</font>-<a name="line-531"></a><font color=Blue>--         return (DefaultTo a f))</font>-<a name="line-532"></a><font color=Blue>--</font>-<a name="line-533"></a><font color=Blue>--conditionalsect :: HParser ConditionalSect</font>-<a name="line-534"></a><font color=Blue>--conditionalsect =</font>-<a name="line-535"></a><font color=Blue>--    ( do tok TokSectionOpen</font>-<a name="line-536"></a><font color=Blue>--         tok (TokSection INCLUDEx)</font>-<a name="line-537"></a><font color=Blue>--         tok TokSqOpen `onFail` failP "missing [ after INCLUDE"</font>-<a name="line-538"></a><font color=Blue>--         i &lt;- extsubsetdecl `onFail` failP "missing ExtSubsetDecl in INCLUDE"</font>-<a name="line-539"></a><font color=Blue>--         tok TokSectionClose `onFail` failP "missing ] after INCLUDE"</font>-<a name="line-540"></a><font color=Blue>--         return (IncludeSect i)) `onFail`</font>-<a name="line-541"></a><font color=Blue>--    ( do tok TokSectionOpen</font>-<a name="line-542"></a><font color=Blue>--         tok (TokSection IGNOREx)</font>-<a name="line-543"></a><font color=Blue>--         tok TokSqOpen `onFail` failP "missing [ after IGNORE"</font>-<a name="line-544"></a><font color=Blue>--         i &lt;- many ignoresectcontents</font>-<a name="line-545"></a><font color=Blue>--         tok TokSectionClose `onFail` failP "missing ] after IGNORE"</font>-<a name="line-546"></a><font color=Blue>--         return (IgnoreSect i))</font>-<a name="line-547"></a><font color=Blue>--</font>-<a name="line-548"></a><font color=Blue>--ignoresectcontents :: HParser IgnoreSectContents</font>-<a name="line-549"></a><font color=Blue>--ignoresectcontents = do</font>-<a name="line-550"></a><font color=Blue>--    i &lt;- ignore</font>-<a name="line-551"></a><font color=Blue>--    is &lt;- many (do tok TokSectionOpen</font>-<a name="line-552"></a><font color=Blue>--                   ic &lt;- ignoresectcontents</font>-<a name="line-553"></a><font color=Blue>--                   tok TokSectionClose</font>-<a name="line-554"></a><font color=Blue>--                   ig &lt;- ignore</font>-<a name="line-555"></a><font color=Blue>--                   return (ic,ig))</font>-<a name="line-556"></a><font color=Blue>--    return (IgnoreSectContents i is)</font>-<a name="line-557"></a><font color=Blue>--</font>-<a name="line-558"></a><font color=Blue>--ignore :: HParser Ignore</font>-<a name="line-559"></a><font color=Blue>--ignore = freetext &gt;&gt;= return . Ignore</font>-<a name="line-560"></a>-<a name="line-561"></a><a name="reference"></a><font color=Blue>reference</font> <font color=Red>::</font> HParser Reference-<a name="line-562"></a><font color=Blue>reference</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-563"></a>    bracket <font color=Cyan>(</font>tok TokAmp<font color=Cyan>)</font> <font color=Cyan>(</font>tok TokSemi<font color=Cyan>)</font> <font color=Cyan>(</font>freetext <font color=Cyan>&gt;&gt;=</font> val<font color=Cyan>)</font>-<a name="line-564"></a>  <font color=Green><u>where</u></font>-<a name="line-565"></a>    val <font color=Cyan>(</font><font color=Magenta>'#'</font><font color=Red><b>:</b></font><font color=Magenta>'x'</font><font color=Red><b>:</b></font>i<font color=Cyan>)</font> <font color=Red>|</font> all isHexDigit i-<a name="line-566"></a>                    <font color=Red>=</font> return <font color=Cyan>.</font> RefChar <font color=Cyan>.</font> fst <font color=Cyan>.</font> head <font color=Cyan>.</font> readHex <font color=Cyan>$</font> i-<a name="line-567"></a>    val <font color=Cyan>(</font><font color=Magenta>'#'</font><font color=Red><b>:</b></font>i<font color=Cyan>)</font>     <font color=Red>|</font> all isDigit i-<a name="line-568"></a>                    <font color=Red>=</font> return <font color=Cyan>.</font> RefChar <font color=Cyan>.</font> fst <font color=Cyan>.</font> head <font color=Cyan>.</font> readDec <font color=Cyan>$</font> i-<a name="line-569"></a>    val name        <font color=Red>=</font> return <font color=Cyan>.</font> RefEntity <font color=Cyan>$</font> name-<a name="line-570"></a>-<a name="line-571"></a><font color=Blue>{--<a name="line-572"></a>reference :: HParser Reference-<a name="line-573"></a>reference =-<a name="line-574"></a>    ( charref &gt;&gt;= return . RefChar) `onFail`-<a name="line-575"></a>    ( entityref &gt;&gt;= return . RefEntity)-<a name="line-576"></a>-<a name="line-577"></a>entityref :: HParser EntityRef-<a name="line-578"></a>entityref = do-<a name="line-579"></a>    n &lt;- bracket (tok TokAmp) (tok TokSemi) name-<a name="line-580"></a>    return n-<a name="line-581"></a>-<a name="line-582"></a>charref :: HParser CharRef-<a name="line-583"></a>charref = do-<a name="line-584"></a>    bracket (tok TokAmp) (tok TokSemi) (freetext &gt;&gt;= readCharVal)-<a name="line-585"></a>  where-<a name="line-586"></a>    readCharVal ('#':'x':i) = return . fst . head . readHex $ i-<a name="line-587"></a>    readCharVal ('#':i)     = return . fst . head . readDec $ i-<a name="line-588"></a>    readCharVal _           = mzero-<a name="line-589"></a>-}</font>-<a name="line-590"></a>-<a name="line-591"></a><font color=Blue>--pereference :: HParser PEReference</font>-<a name="line-592"></a><font color=Blue>--pereference = do</font>-<a name="line-593"></a><font color=Blue>--    bracket (tok TokPercent) (tok TokSemi) nmtoken</font>-<a name="line-594"></a><font color=Blue>--</font>-<a name="line-595"></a><font color=Blue>--entitydecl :: HParser EntityDecl</font>-<a name="line-596"></a><font color=Blue>--entitydecl =</font>-<a name="line-597"></a><font color=Blue>--    ( gedecl &gt;&gt;= return . EntityGEDecl) `onFail`</font>-<a name="line-598"></a><font color=Blue>--    ( pedecl &gt;&gt;= return . EntityPEDecl)</font>-<a name="line-599"></a><font color=Blue>--</font>-<a name="line-600"></a><font color=Blue>--gedecl :: HParser GEDecl</font>-<a name="line-601"></a><font color=Blue>--gedecl = do</font>-<a name="line-602"></a><font color=Blue>--    tok TokSpecialOpen</font>-<a name="line-603"></a><font color=Blue>--    tok (TokSpecial ENTITYx)</font>-<a name="line-604"></a><font color=Blue>--    n &lt;- name</font>-<a name="line-605"></a><font color=Blue>--    e &lt;- entitydef `onFail` failP "missing entity defn in G ENTITY decl"</font>-<a name="line-606"></a><font color=Blue>--    tok TokAnyClose `onFail` failP "expected &gt; terminating G ENTITY decl"</font>-<a name="line-607"></a><font color=Blue>--    return (GEDecl n e)</font>-<a name="line-608"></a><font color=Blue>--</font>-<a name="line-609"></a><font color=Blue>--pedecl :: HParser PEDecl</font>-<a name="line-610"></a><font color=Blue>--pedecl = do</font>-<a name="line-611"></a><font color=Blue>--    tok TokSpecialOpen</font>-<a name="line-612"></a><font color=Blue>--    tok (TokSpecial ENTITYx)</font>-<a name="line-613"></a><font color=Blue>--    tok TokPercent</font>-<a name="line-614"></a><font color=Blue>--    n &lt;- name</font>-<a name="line-615"></a><font color=Blue>--    e &lt;- pedef `onFail` failP "missing entity defn in P ENTITY decl"</font>-<a name="line-616"></a><font color=Blue>--    tok TokAnyClose `onFail` failP "expected &gt; terminating P ENTITY decl"</font>-<a name="line-617"></a><font color=Blue>--    return (PEDecl n e)</font>-<a name="line-618"></a><font color=Blue>--</font>-<a name="line-619"></a><font color=Blue>--entitydef :: HParser EntityDef</font>-<a name="line-620"></a><font color=Blue>--entitydef =</font>-<a name="line-621"></a><font color=Blue>--    ( entityvalue &gt;&gt;= return . DefEntityValue) `onFail`</font>-<a name="line-622"></a><font color=Blue>--    ( do eid &lt;- externalid</font>-<a name="line-623"></a><font color=Blue>--         ndd &lt;- maybe ndatadecl</font>-<a name="line-624"></a><font color=Blue>--         return (DefExternalID eid ndd))</font>-<a name="line-625"></a><font color=Blue>--</font>-<a name="line-626"></a><font color=Blue>--pedef :: HParser PEDef</font>-<a name="line-627"></a><font color=Blue>--pedef =</font>-<a name="line-628"></a><font color=Blue>--    ( entityvalue &gt;&gt;= return . PEDefEntityValue) `onFail`</font>-<a name="line-629"></a><font color=Blue>--    ( externalid &gt;&gt;= return . PEDefExternalID)</font>-<a name="line-630"></a>-<a name="line-631"></a><a name="externalid"></a><font color=Blue>externalid</font> <font color=Red>::</font> HParser ExternalID-<a name="line-632"></a><font color=Blue>externalid</font> <font color=Red>=</font>-<a name="line-633"></a>    <font color=Cyan>(</font> <font color=Green><u>do</u></font> word <font color=Magenta>"SYSTEM"</font>-<a name="line-634"></a>         s <font color=Red>&lt;-</font> systemliteral-<a name="line-635"></a>         return <font color=Cyan>(</font>SYSTEM s<font color=Cyan>)</font><font color=Cyan>)</font> <font color=Cyan>`onFail`</font>-<a name="line-636"></a>    <font color=Cyan>(</font> <font color=Green><u>do</u></font> word <font color=Magenta>"PUBLIC"</font>-<a name="line-637"></a>         p <font color=Red>&lt;-</font> pubidliteral-<a name="line-638"></a>         s <font color=Red>&lt;-</font> <font color=Cyan>(</font>systemliteral <font color=Cyan>`onFail`</font> return <font color=Cyan>(</font>SystemLiteral <font color=Magenta>""</font><font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-639"></a>         return <font color=Cyan>(</font>PUBLIC p s<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-640"></a>-<a name="line-641"></a><font color=Blue>--ndatadecl :: HParser NDataDecl</font>-<a name="line-642"></a><font color=Blue>--ndatadecl = do</font>-<a name="line-643"></a><font color=Blue>--    word "NDATA"</font>-<a name="line-644"></a><font color=Blue>--    n &lt;- name</font>-<a name="line-645"></a><font color=Blue>--    return (NDATA n)</font>-<a name="line-646"></a>-<a name="line-647"></a><a name="textdecl"></a><font color=Blue>textdecl</font> <font color=Red>::</font> HParser TextDecl-<a name="line-648"></a><font color=Blue>textdecl</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-649"></a>    tok TokPIOpen-<a name="line-650"></a>    <font color=Cyan>(</font>word <font color=Magenta>"xml"</font> <font color=Cyan>`onFail`</font> word <font color=Magenta>"XML"</font><font color=Cyan>)</font>-<a name="line-651"></a>    v <font color=Red>&lt;-</font> maybe versioninfo-<a name="line-652"></a>    e <font color=Red>&lt;-</font> encodingdecl-<a name="line-653"></a>    tok TokPIClose <font color=Cyan>`onFail`</font> failP <font color=Magenta>"expected ?&gt; terminating text decl"</font>-<a name="line-654"></a>    return <font color=Cyan>(</font>TextDecl v e<font color=Cyan>)</font>-<a name="line-655"></a>-<a name="line-656"></a><font color=Blue>--extparsedent :: HParser ExtParsedEnt</font>-<a name="line-657"></a><font color=Blue>--extparsedent = do</font>-<a name="line-658"></a><font color=Blue>--    t &lt;- maybe textdecl</font>-<a name="line-659"></a><font color=Blue>--    (_,c) &lt;- (content "")</font>-<a name="line-660"></a><font color=Blue>--    return (ExtParsedEnt t c)</font>-<a name="line-661"></a><font color=Blue>--</font>-<a name="line-662"></a><font color=Blue>--extpe :: HParser ExtPE</font>-<a name="line-663"></a><font color=Blue>--extpe = do</font>-<a name="line-664"></a><font color=Blue>--    t &lt;- maybe textdecl</font>-<a name="line-665"></a><font color=Blue>--    e &lt;- extsubsetdecl</font>-<a name="line-666"></a><font color=Blue>--    return (ExtPE t e)</font>-<a name="line-667"></a>-<a name="line-668"></a><a name="encodingdecl"></a><font color=Blue>encodingdecl</font> <font color=Red>::</font> HParser EncodingDecl-<a name="line-669"></a><font color=Blue>encodingdecl</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-670"></a>    <font color=Cyan>(</font>word <font color=Magenta>"encoding"</font> <font color=Cyan>`onFail`</font> word <font color=Magenta>"ENCODING"</font><font color=Cyan>)</font>-<a name="line-671"></a>    tok TokEqual <font color=Cyan>`onFail`</font> failBadP <font color=Magenta>"expected = in 'encoding' decl"</font>-<a name="line-672"></a>    f <font color=Red>&lt;-</font> bracket <font color=Cyan>(</font>tok TokQuote<font color=Cyan>)</font> <font color=Cyan>(</font>tok TokQuote<font color=Cyan>)</font> freetext-<a name="line-673"></a>    return <font color=Cyan>(</font>EncodingDecl f<font color=Cyan>)</font>-<a name="line-674"></a>-<a name="line-675"></a><font color=Blue>--notationdecl :: HParser NotationDecl</font>-<a name="line-676"></a><font color=Blue>--notationdecl = do</font>-<a name="line-677"></a><font color=Blue>--    tok TokSpecialOpen</font>-<a name="line-678"></a><font color=Blue>--    word "NOTATION"</font>-<a name="line-679"></a><font color=Blue>--    n &lt;- name</font>-<a name="line-680"></a><font color=Blue>--    e &lt;- either externalid publicid</font>-<a name="line-681"></a><font color=Blue>--    tok TokAnyClose `onFail` failP "expected &gt; terminating NOTATION decl"</font>-<a name="line-682"></a><font color=Blue>--    return (NOTATION n e)</font>-<a name="line-683"></a>-<a name="line-684"></a><a name="publicid"></a><font color=Blue>publicid</font> <font color=Red>::</font> HParser PublicID-<a name="line-685"></a><font color=Blue>publicid</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-686"></a>    word <font color=Magenta>"PUBLICID"</font>-<a name="line-687"></a>    p <font color=Red>&lt;-</font> pubidliteral-<a name="line-688"></a>    return <font color=Cyan>(</font>PUBLICID p<font color=Cyan>)</font>-<a name="line-689"></a>-<a name="line-690"></a><a name="entityvalue"></a><font color=Blue>entityvalue</font> <font color=Red>::</font> HParser EntityValue-<a name="line-691"></a><font color=Blue>entityvalue</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-692"></a>    evs <font color=Red>&lt;-</font> bracket <font color=Cyan>(</font>tok TokQuote<font color=Cyan>)</font> <font color=Cyan>(</font>tok TokQuote<font color=Cyan>)</font> <font color=Cyan>(</font>many ev<font color=Cyan>)</font>-<a name="line-693"></a>    return <font color=Cyan>(</font>EntityValue evs<font color=Cyan>)</font>-<a name="line-694"></a>-<a name="line-695"></a><a name="ev"></a><font color=Blue>ev</font> <font color=Red>::</font> HParser EV-<a name="line-696"></a><font color=Blue>ev</font> <font color=Red>=</font>-<a name="line-697"></a>    <font color=Cyan>(</font> freetext <font color=Cyan>&gt;&gt;=</font> return <font color=Cyan>.</font> EVString<font color=Cyan>)</font> <font color=Cyan>`onFail`</font>-<a name="line-698"></a><font color=Blue>--  PEREF(EVPERef,ev) `onFail`</font>-<a name="line-699"></a>    <font color=Cyan>(</font> reference <font color=Cyan>&gt;&gt;=</font> return <font color=Cyan>.</font> EVRef<font color=Cyan>)</font>-<a name="line-700"></a>-<a name="line-701"></a><a name="attvalue"></a><font color=Blue>attvalue</font> <font color=Red>::</font> HParser AttValue-<a name="line-702"></a><font color=Blue>attvalue</font> <font color=Red>=</font>-<a name="line-703"></a>  <font color=Cyan>(</font> <font color=Green><u>do</u></font> avs <font color=Red>&lt;-</font> bracket <font color=Cyan>(</font>tok TokQuote<font color=Cyan>)</font> <font color=Cyan>(</font>tok TokQuote<font color=Cyan>)</font>-<a name="line-704"></a>                      <font color=Cyan>(</font>many <font color=Cyan>(</font>either freetext reference<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-705"></a>       return <font color=Cyan>(</font>AttValue avs<font color=Cyan>)</font> <font color=Cyan>)</font> <font color=Cyan>`onFail`</font>-<a name="line-706"></a>  <font color=Cyan>(</font> <font color=Green><u>do</u></font> v <font color=Red>&lt;-</font> nmtoken-<a name="line-707"></a>       s <font color=Red>&lt;-</font> <font color=Cyan>(</font>tok TokPercent <font color=Cyan>&gt;&gt;</font> return <font color=Magenta>"%"</font><font color=Cyan>)</font> <font color=Cyan>`onFail`</font> return <font color=Magenta>""</font>-<a name="line-708"></a>       return <font color=Cyan>(</font>AttValue <font color=Red>[</font>Left <font color=Cyan>(</font>v<font color=Cyan>++</font>s<font color=Cyan>)</font><font color=Red>]</font><font color=Cyan>)</font> <font color=Cyan>)</font> <font color=Cyan>`onFail`</font>-<a name="line-709"></a>  <font color=Cyan>(</font> <font color=Green><u>do</u></font> s <font color=Red>&lt;-</font> oneOf <font color=Red>[</font> tok TokPlus <font color=Cyan>&gt;&gt;</font> return <font color=Magenta>"+"</font>-<a name="line-710"></a>                  <font color=Cyan>,</font> tok TokHash <font color=Cyan>&gt;&gt;</font> return <font color=Magenta>"#"</font>-<a name="line-711"></a>                  <font color=Red>]</font>-<a name="line-712"></a>       v <font color=Red>&lt;-</font> nmtoken-<a name="line-713"></a>       return <font color=Cyan>(</font>AttValue <font color=Red>[</font>Left <font color=Cyan>(</font>s<font color=Cyan>++</font>v<font color=Cyan>)</font><font color=Red>]</font><font color=Cyan>)</font> <font color=Cyan>)</font> <font color=Cyan>`onFail`</font>-<a name="line-714"></a>  failP <font color=Magenta>"Badly formatted attribute value"</font>-<a name="line-715"></a>-<a name="line-716"></a><a name="systemliteral"></a><font color=Blue>systemliteral</font> <font color=Red>::</font> HParser SystemLiteral-<a name="line-717"></a><font color=Blue>systemliteral</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-718"></a>    s <font color=Red>&lt;-</font> bracket <font color=Cyan>(</font>tok TokQuote<font color=Cyan>)</font> <font color=Cyan>(</font>tok TokQuote<font color=Cyan>)</font> freetext-<a name="line-719"></a>    return <font color=Cyan>(</font>SystemLiteral s<font color=Cyan>)</font>		<font color=Blue>-- note: need to fold &amp;...; escapes</font>-<a name="line-720"></a>-<a name="line-721"></a><a name="pubidliteral"></a><font color=Blue>pubidliteral</font> <font color=Red>::</font> HParser PubidLiteral-<a name="line-722"></a><font color=Blue>pubidliteral</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-723"></a>    s <font color=Red>&lt;-</font> bracket <font color=Cyan>(</font>tok TokQuote<font color=Cyan>)</font> <font color=Cyan>(</font>tok TokQuote<font color=Cyan>)</font> freetext-<a name="line-724"></a>    return <font color=Cyan>(</font>PubidLiteral s<font color=Cyan>)</font>		<font color=Blue>-- note: need to fold &amp;...; escapes</font>-<a name="line-725"></a>-<a name="line-726"></a><a name="chardata"></a><font color=Blue>chardata</font> <font color=Red>::</font> HParser CharData-<a name="line-727"></a><font color=Blue>chardata</font> <font color=Red>=</font> freetext <font color=Blue>-- &gt;&gt;= return . CharData</font>-<a name="line-728"></a>-</pre>-</body>-</html>
− docs/HaXml/src/Text/XML/HaXml/Html/Pretty.html
@@ -1,244 +0,0 @@-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">-<html>-<head>-<!-- Generated by HsColour, http://www.cs.york.ac.uk/fp/darcs/hscolour/ -->-<title>src/Text/XML/HaXml/Html/Pretty.hs</title>-</head>-<body>-<pre><a name="line-1"></a><font color=Blue>-- | This is a separate pretty-printer for HTML documents, recognising</font>-<a name="line-2"></a><font color=Blue>--   some of the differences between HTML and true XML.</font>-<a name="line-3"></a>-<a name="line-4"></a><font color=Green><u>module</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Html<font color=Cyan>.</font>Pretty-<a name="line-5"></a>  <font color=Cyan>(</font> document-<a name="line-6"></a>  <font color=Cyan>,</font> element-<a name="line-7"></a>  <font color=Cyan>,</font> attribute-<a name="line-8"></a>  <font color=Cyan>,</font> content-<a name="line-9"></a>  <font color=Cyan>)</font> <font color=Green><u>where</u></font>-<a name="line-10"></a>-<a name="line-11"></a><font color=Green><u>import</u></font> Prelude hiding <font color=Cyan>(</font>maybe<font color=Cyan>,</font>either<font color=Cyan>)</font>-<a name="line-12"></a><font color=Green><u>import</u></font> Maybe hiding <font color=Cyan>(</font>maybe<font color=Cyan>)</font>-<a name="line-13"></a><font color=Green><u>import</u></font> List <font color=Cyan>(</font>intersperse<font color=Cyan>)</font>-<a name="line-14"></a><font color=Green><u>import</u></font> Char <font color=Cyan>(</font>isSpace<font color=Cyan>)</font>-<a name="line-15"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>PrettyPrint<font color=Cyan>.</font>HughesPJ-<a name="line-16"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Types-<a name="line-17"></a>-<a name="line-18"></a><a name="either"></a><font color=Blue>either</font> f g <font color=Cyan>(</font>Left x<font color=Cyan>)</font>  <font color=Red>=</font> f x-<a name="line-19"></a><font color=Blue>either</font> f g <font color=Cyan>(</font>Right x<font color=Cyan>)</font> <font color=Red>=</font> g x-<a name="line-20"></a>-<a name="line-21"></a><a name="maybe"></a><font color=Blue>maybe</font> f Nothing  <font color=Red>=</font> empty-<a name="line-22"></a><font color=Blue>maybe</font> f <font color=Cyan>(</font>Just x<font color=Cyan>)</font> <font color=Red>=</font> f x-<a name="line-23"></a>-<a name="line-24"></a><font color=Blue>--peref p   = text "%" &lt;&gt; text p &lt;&gt; text ";"</font>-<a name="line-25"></a>-<a name="line-26"></a><font color=Blue>----</font>-<a name="line-27"></a>-<a name="line-28"></a><a name="document"></a><font color=Blue>document</font> <font color=Red>::</font> Document i <font color=Red>-&gt;</font> Doc-<a name="line-29"></a><a name="prolog"></a><font color=Blue>prolog</font>   <font color=Red>::</font> Prolog <font color=Red>-&gt;</font> Doc-<a name="line-30"></a><a name="xmldecl"></a><font color=Blue>xmldecl</font>  <font color=Red>::</font> XMLDecl <font color=Red>-&gt;</font> Doc-<a name="line-31"></a><a name="misc"></a><font color=Blue>misc</font>     <font color=Red>::</font> Misc <font color=Red>-&gt;</font> Doc-<a name="line-32"></a><a name="sddecl"></a><font color=Blue>sddecl</font>   <font color=Red>::</font> Bool <font color=Red>-&gt;</font> Doc-<a name="line-33"></a>-<a name="line-34"></a><a name="doctypedecl"></a><font color=Blue>doctypedecl</font> <font color=Red>::</font> DocTypeDecl <font color=Red>-&gt;</font> Doc-<a name="line-35"></a><a name="markupdecl"></a><font color=Blue>markupdecl</font>  <font color=Red>::</font> MarkupDecl <font color=Red>-&gt;</font> Doc-<a name="line-36"></a><a name="extsubset"></a><font color=Blue>extsubset</font>   <font color=Red>::</font> ExtSubset <font color=Red>-&gt;</font> Doc-<a name="line-37"></a><a name="extsubsetdecl"></a><font color=Blue>extsubsetdecl</font> <font color=Red>::</font> ExtSubsetDecl <font color=Red>-&gt;</font> Doc-<a name="line-38"></a>-<a name="line-39"></a><a name="element"></a><font color=Blue>element</font>   <font color=Red>::</font> Element i <font color=Red>-&gt;</font> Doc-<a name="line-40"></a><a name="attribute"></a><font color=Blue>attribute</font> <font color=Red>::</font> Attribute <font color=Red>-&gt;</font> Doc                     <font color=Cyan>--etc</font>-<a name="line-41"></a><a name="content"></a><font color=Blue>content</font>   <font color=Red>::</font> Content i <font color=Red>-&gt;</font> Doc-<a name="line-42"></a>-<a name="line-43"></a><font color=Blue>----</font>-<a name="line-44"></a>-<a name="line-45"></a><font color=Blue>document</font> <font color=Cyan>(</font>Document p <font color=Green><u>_</u></font> e m<font color=Cyan>)</font><font color=Red>=</font> prolog p <font color=Cyan>$$</font> element e <font color=Cyan>$$</font> vcat <font color=Cyan>(</font>map misc m<font color=Cyan>)</font>-<a name="line-46"></a><font color=Blue>prolog</font> <font color=Cyan>(</font>Prolog x m1 dtd m2<font color=Cyan>)</font><font color=Red>=</font> maybe xmldecl x <font color=Cyan>$$</font>-<a name="line-47"></a>                             vcat <font color=Cyan>(</font>map misc m1<font color=Cyan>)</font> <font color=Cyan>$$</font>-<a name="line-48"></a>                             maybe doctypedecl dtd <font color=Cyan>$$</font>-<a name="line-49"></a>                             vcat <font color=Cyan>(</font>map misc m2<font color=Cyan>)</font>-<a name="line-50"></a><font color=Blue>xmldecl</font> <font color=Cyan>(</font>XMLDecl v e sd<font color=Cyan>)</font>   <font color=Red>=</font> text <font color=Magenta>"&lt;?xml version='"</font> <font color=Cyan>&lt;&gt;</font> text v <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>"'"</font> <font color=Cyan>&lt;+&gt;</font>-<a name="line-51"></a>                             maybe encodingdecl e <font color=Cyan>&lt;+&gt;</font>-<a name="line-52"></a>                             maybe sddecl sd <font color=Cyan>&lt;+&gt;</font>-<a name="line-53"></a>                             text <font color=Magenta>"?&gt;"</font>-<a name="line-54"></a><font color=Blue>misc</font> <font color=Cyan>(</font>Comment s<font color=Cyan>)</font>           <font color=Red>=</font> text <font color=Magenta>"&lt;!--"</font> <font color=Cyan>&lt;+&gt;</font> text s <font color=Cyan>&lt;+&gt;</font> text <font color=Magenta>"--&gt;"</font>-<a name="line-55"></a><font color=Blue>misc</font> <font color=Cyan>(</font>PI <font color=Cyan>(</font>n<font color=Cyan>,</font>s<font color=Cyan>)</font><font color=Cyan>)</font>            <font color=Red>=</font> text <font color=Magenta>"&lt;?"</font> <font color=Cyan>&lt;&gt;</font> text n <font color=Cyan>&lt;+&gt;</font> text s <font color=Cyan>&lt;+&gt;</font> text <font color=Magenta>"?&gt;"</font>-<a name="line-56"></a><font color=Blue>sddecl</font> sd   <font color=Red>|</font> sd           <font color=Red>=</font> text <font color=Magenta>"standalone='yes'"</font>-<a name="line-57"></a>            <font color=Red>|</font> otherwise    <font color=Red>=</font> text <font color=Magenta>"standalone='no'"</font>-<a name="line-58"></a><font color=Blue>doctypedecl</font> <font color=Cyan>(</font>DTD n eid ds<font color=Cyan>)</font> <font color=Red>=</font> <font color=Green><u>if</u></font> null ds <font color=Green><u>then</u></font> -<a name="line-59"></a>                                  hd <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>"&gt;"</font>-<a name="line-60"></a>                             <font color=Green><u>else</u></font> hd <font color=Cyan>&lt;+&gt;</font> text <font color=Magenta>" ["</font> <font color=Cyan>$$</font>-<a name="line-61"></a>                                  vcat <font color=Cyan>(</font>map markupdecl ds<font color=Cyan>)</font> <font color=Cyan>$$</font> text <font color=Magenta>"]&gt;"</font>-<a name="line-62"></a>                           <font color=Green><u>where</u></font> hd <font color=Red>=</font> text <font color=Magenta>"&lt;!DOCTYPE"</font> <font color=Cyan>&lt;+&gt;</font> text n <font color=Cyan>&lt;+&gt;</font>-<a name="line-63"></a>                                      maybe externalid eid-<a name="line-64"></a><font color=Blue>markupdecl</font> <font color=Cyan>(</font>Element e<font color=Cyan>)</font>     <font color=Red>=</font> elementdecl e-<a name="line-65"></a><font color=Blue>markupdecl</font> <font color=Cyan>(</font>AttList a<font color=Cyan>)</font>     <font color=Red>=</font> attlistdecl a-<a name="line-66"></a><font color=Blue>markupdecl</font> <font color=Cyan>(</font>Entity e<font color=Cyan>)</font>      <font color=Red>=</font> entitydecl e-<a name="line-67"></a><font color=Blue>markupdecl</font> <font color=Cyan>(</font>Notation n<font color=Cyan>)</font>    <font color=Red>=</font> notationdecl n-<a name="line-68"></a><font color=Blue>markupdecl</font> <font color=Cyan>(</font>MarkupMisc m<font color=Cyan>)</font>  <font color=Red>=</font> misc m-<a name="line-69"></a><font color=Blue>--markupdecl (MarkupPE p m)  = peref p</font>-<a name="line-70"></a><font color=Blue>extsubset</font> <font color=Cyan>(</font>ExtSubset t ds<font color=Cyan>)</font> <font color=Red>=</font> maybe textdecl t <font color=Cyan>$$</font>-<a name="line-71"></a>                             vcat <font color=Cyan>(</font>map extsubsetdecl ds<font color=Cyan>)</font>-<a name="line-72"></a><font color=Blue>extsubsetdecl</font> <font color=Cyan>(</font>ExtMarkupDecl m<font color=Cyan>)</font>      <font color=Red>=</font> markupdecl m-<a name="line-73"></a><font color=Blue>extsubsetdecl</font> <font color=Cyan>(</font>ExtConditionalSect c<font color=Cyan>)</font> <font color=Red>=</font> conditionalsect c-<a name="line-74"></a><font color=Blue>--extsubsetdecl (ExtPEReference p e)   = peref p</font>-<a name="line-75"></a>-<a name="line-76"></a><font color=Blue>element</font> <font color=Cyan>(</font>Elem n <font color=Green><u>as</u></font> []<font color=Cyan>)</font> <font color=Red>=</font> text <font color=Magenta>"&lt;"</font> <font color=Cyan>&lt;&gt;</font> text n <font color=Cyan>&lt;+&gt;</font>-<a name="line-77"></a>                         fsep <font color=Cyan>(</font>map attribute <font color=Green><u>as</u></font><font color=Cyan>)</font> <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>"/&gt;"</font>-<a name="line-78"></a><font color=Blue>element</font> e<font color=Red>@</font><font color=Cyan>(</font>Elem n <font color=Green><u>as</u></font> cs<font color=Cyan>)</font>-<a name="line-79"></a><font color=Blue>--  | any isText cs    = text "&lt;" &lt;&gt; text n &lt;+&gt; fsep (map attribute as) &lt;&gt;</font>-<a name="line-80"></a><font color=Blue>--                       text "&gt;" &lt;&gt; hcat (map content cs) &lt;&gt;</font>-<a name="line-81"></a><font color=Blue>--                       text "&lt;/" &lt;&gt; text n &lt;&gt; text "&gt;"</font>-<a name="line-82"></a>    <font color=Red>|</font> isText <font color=Cyan>(</font>head cs<font color=Cyan>)</font> <font color=Red>=</font> text <font color=Magenta>"&lt;"</font> <font color=Cyan>&lt;&gt;</font> text n <font color=Cyan>&lt;+&gt;</font> fsep <font color=Cyan>(</font>map attribute <font color=Green><u>as</u></font><font color=Cyan>)</font> <font color=Cyan>&lt;&gt;</font>-<a name="line-83"></a>                         text <font color=Magenta>"&gt;"</font> <font color=Cyan>&lt;&gt;</font> hcat <font color=Cyan>(</font>map content cs<font color=Cyan>)</font> <font color=Cyan>&lt;&gt;</font>-<a name="line-84"></a>                         text <font color=Magenta>"&lt;/"</font> <font color=Cyan>&lt;&gt;</font> text n <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>"&gt;"</font>-<a name="line-85"></a>    <font color=Red>|</font> otherwise        <font color=Red>=</font> <font color=Green><u>let</u></font> <font color=Cyan>(</font>d<font color=Cyan>,</font>c<font color=Cyan>)</font> <font color=Red>=</font> carryelem e empty-<a name="line-86"></a>                         <font color=Green><u>in</u></font> d <font color=Cyan>&lt;&gt;</font> c-<a name="line-87"></a>-<a name="line-88"></a><a name="isText"></a><font color=Blue>isText</font> <font color=Cyan>(</font>CString <font color=Green><u>_</u></font> <font color=Green><u>_</u></font> <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red>=</font> True-<a name="line-89"></a><font color=Blue>isText</font> <font color=Cyan>(</font>CRef <font color=Green><u>_</u></font> <font color=Green><u>_</u></font><font color=Cyan>)</font>      <font color=Red>=</font> True-<a name="line-90"></a><font color=Blue>isText</font> <font color=Green><u>_</u></font>               <font color=Red>=</font> False-<a name="line-91"></a>-<a name="line-92"></a><a name="carryelem"></a><font color=Blue>carryelem</font> <font color=Cyan>(</font>Elem n <font color=Green><u>as</u></font> []<font color=Cyan>)</font> c-<a name="line-93"></a>                       <font color=Red>=</font> <font color=Cyan>(</font> c <font color=Cyan>&lt;&gt;</font>-<a name="line-94"></a>                           text <font color=Magenta>"&lt;"</font> <font color=Cyan>&lt;&gt;</font> text n <font color=Cyan>&lt;+&gt;</font> fsep <font color=Cyan>(</font>map attribute <font color=Green><u>as</u></font><font color=Cyan>)</font>-<a name="line-95"></a>                         <font color=Cyan>,</font> text <font color=Magenta>"/&gt;"</font><font color=Cyan>)</font>-<a name="line-96"></a><font color=Blue>--carryelem e@(Elem n as cs) c</font>-<a name="line-97"></a><font color=Blue>----  | any isText cs    =  ( c &lt;&gt; element e, empty)</font>-<a name="line-98"></a><font color=Blue>--    | otherwise        =  let (cs',d') = carryscan carrycontent cs (text "&gt;")</font>-<a name="line-99"></a><font color=Blue>--                          in</font>-<a name="line-100"></a><font color=Blue>--                          ( c &lt;&gt;</font>-<a name="line-101"></a><font color=Blue>--                            text "&lt;" &lt;&gt; text n &lt;+&gt; fsep (map attribute as) $$</font>-<a name="line-102"></a><font color=Blue>--                            nest 2 (vcat cs') &lt;&gt; -- $$</font>-<a name="line-103"></a><font color=Blue>--                            c' &lt;&gt; text "&lt;/" &lt;&gt; text n</font>-<a name="line-104"></a><font color=Blue>--                          , text "&gt;")</font>-<a name="line-105"></a><font color=Blue>--carrycontent (CElem e) c   = carryelem e c</font>-<a name="line-106"></a><font color=Blue>--carrycontent (CString _ s) c = (c &lt;&gt; chardata s, empty)</font>-<a name="line-107"></a><font color=Blue>--carrycontent (CRef r) c    = (c &lt;&gt; reference r, empty)</font>-<a name="line-108"></a><font color=Blue>--carrycontent (CMisc m) c   = (c &lt;&gt; misc m, empty)</font>-<a name="line-109"></a><font color=Blue>--</font>-<a name="line-110"></a><font color=Blue>--carryscan :: (a-&gt;c-&gt;(b,c)) -&gt; [a] -&gt; c -&gt; ([b],c)</font>-<a name="line-111"></a><font color=Blue>--carryscan f []     c = ([],c)</font>-<a name="line-112"></a><font color=Blue>--carryscan f (a:as) c = let (b, c')   = f a c</font>-<a name="line-113"></a><font color=Blue>--                           (bs,c'') = carryscan f as c'</font>-<a name="line-114"></a><font color=Blue>--                       in (b:bs, c'')</font>-<a name="line-115"></a>-<a name="line-116"></a><font color=Blue>carryelem</font> e<font color=Red>@</font><font color=Cyan>(</font>Elem n <font color=Green><u>as</u></font> cs<font color=Cyan>)</font> c-<a name="line-117"></a>  <font color=Red>|</font> isText <font color=Cyan>(</font>head cs<font color=Cyan>)</font> <font color=Red>=</font>-<a name="line-118"></a>        <font color=Cyan>(</font> start <font color=Cyan>&lt;&gt;</font>-<a name="line-119"></a>          text <font color=Magenta>"&gt;"</font> <font color=Cyan>&lt;&gt;</font> hcat <font color=Cyan>(</font>map content cs<font color=Cyan>)</font> <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>"&lt;/"</font> <font color=Cyan>&lt;&gt;</font> text n-<a name="line-120"></a>        <font color=Cyan>,</font> text <font color=Magenta>"&gt;"</font><font color=Cyan>)</font>-<a name="line-121"></a>  <font color=Red>|</font> otherwise <font color=Red>=</font>-<a name="line-122"></a>        <font color=Green><u>let</u></font> <font color=Cyan>(</font>d<font color=Cyan>,</font>c'<font color=Cyan>)</font> <font color=Red>=</font> foldl carrycontent <font color=Cyan>(</font>start<font color=Cyan>,</font> text <font color=Magenta>"&gt;"</font><font color=Cyan>)</font> cs <font color=Green><u>in</u></font>-<a name="line-123"></a>        <font color=Cyan>(</font> d <font color=Cyan>&lt;&gt;</font> c' <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>"&lt;/"</font> <font color=Cyan>&lt;&gt;</font> text n-<a name="line-124"></a>        <font color=Cyan>,</font> text <font color=Magenta>"&gt;"</font><font color=Cyan>)</font>-<a name="line-125"></a>  <font color=Green><u>where</u></font> start <font color=Red>=</font> c <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>"&lt;"</font> <font color=Cyan>&lt;&gt;</font> text n <font color=Cyan>&lt;+&gt;</font> fsep <font color=Cyan>(</font>map attribute <font color=Green><u>as</u></font><font color=Cyan>)</font>-<a name="line-126"></a>-<a name="line-127"></a><a name="carrycontent"></a><font color=Blue>carrycontent</font> <font color=Cyan>(</font>d<font color=Cyan>,</font>c<font color=Cyan>)</font> <font color=Cyan>(</font>CElem e <font color=Green><u>_</u></font><font color=Cyan>)</font>     <font color=Red>=</font> <font color=Green><u>let</u></font> <font color=Cyan>(</font>d'<font color=Cyan>,</font>c'<font color=Cyan>)</font> <font color=Red>=</font> carryelem e c <font color=Green><u>in</u></font>-<a name="line-128"></a>                                     <font color=Cyan>(</font>d <font color=Cyan>$$</font> nest <font color=Magenta>2</font> d'<font color=Cyan>,</font>       c'<font color=Cyan>)</font>-<a name="line-129"></a><font color=Blue>carrycontent</font> <font color=Cyan>(</font>d<font color=Cyan>,</font>c<font color=Cyan>)</font> <font color=Cyan>(</font>CString <font color=Green><u>_</u></font> s <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red>=</font> <font color=Cyan>(</font>d <font color=Cyan>&lt;&gt;</font> c <font color=Cyan>&lt;&gt;</font> chardata s<font color=Cyan>,</font> empty<font color=Cyan>)</font>-<a name="line-130"></a><font color=Blue>carrycontent</font> <font color=Cyan>(</font>d<font color=Cyan>,</font>c<font color=Cyan>)</font> <font color=Cyan>(</font>CRef r <font color=Green><u>_</u></font><font color=Cyan>)</font>      <font color=Red>=</font> <font color=Cyan>(</font>d <font color=Cyan>&lt;&gt;</font> c <font color=Cyan>&lt;&gt;</font> reference r<font color=Cyan>,</font>empty<font color=Cyan>)</font>-<a name="line-131"></a><font color=Blue>carrycontent</font> <font color=Cyan>(</font>d<font color=Cyan>,</font>c<font color=Cyan>)</font> <font color=Cyan>(</font>CMisc m <font color=Green><u>_</u></font><font color=Cyan>)</font>     <font color=Red>=</font> <font color=Cyan>(</font>d <font color=Cyan>$$</font> c <font color=Cyan>&lt;&gt;</font> misc m<font color=Cyan>,</font>     empty<font color=Cyan>)</font>-<a name="line-132"></a>-<a name="line-133"></a>-<a name="line-134"></a><font color=Blue>attribute</font> <font color=Cyan>(</font>n<font color=Cyan>,</font>v<font color=Cyan>)</font>          <font color=Red>=</font> text n <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>"="</font> <font color=Cyan>&lt;&gt;</font> attvalue v-<a name="line-135"></a><font color=Blue>content</font> <font color=Cyan>(</font>CElem e <font color=Green><u>_</u></font><font color=Cyan>)</font>      <font color=Red>=</font> element e-<a name="line-136"></a><font color=Blue>content</font> <font color=Cyan>(</font>CString <font color=Green><u>_</u></font> s <font color=Green><u>_</u></font><font color=Cyan>)</font>  <font color=Red>=</font> chardata s-<a name="line-137"></a><font color=Blue>content</font> <font color=Cyan>(</font>CRef r <font color=Green><u>_</u></font><font color=Cyan>)</font>       <font color=Red>=</font> reference r-<a name="line-138"></a><font color=Blue>content</font> <font color=Cyan>(</font>CMisc m <font color=Green><u>_</u></font><font color=Cyan>)</font>      <font color=Red>=</font> misc m-<a name="line-139"></a>-<a name="line-140"></a><a name="elementdecl"></a><font color=Blue>elementdecl</font> <font color=Cyan>(</font>ElementDecl n cs<font color=Cyan>)</font> <font color=Red>=</font> text <font color=Magenta>"&lt;!ELEMENT"</font> <font color=Cyan>&lt;+&gt;</font> text n <font color=Cyan>&lt;+&gt;</font>-<a name="line-141"></a>                                 contentspec cs <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>"&gt;"</font>-<a name="line-142"></a><a name="contentspec"></a><font color=Blue>contentspec</font> EMPTY              <font color=Red>=</font> text <font color=Magenta>"EMPTY"</font>-<a name="line-143"></a><font color=Blue>contentspec</font> ANY                <font color=Red>=</font> text <font color=Magenta>"ANY"</font>-<a name="line-144"></a><font color=Blue>contentspec</font> <font color=Cyan>(</font>Mixed m<font color=Cyan>)</font>          <font color=Red>=</font> mixed m-<a name="line-145"></a><font color=Blue>contentspec</font> <font color=Cyan>(</font>ContentSpec c<font color=Cyan>)</font>    <font color=Red>=</font> cp c-<a name="line-146"></a><a name="cp"></a><font color=Blue>--contentspec (ContentPE p cs)   = peref p</font>-<a name="line-147"></a><font color=Blue>cp</font> <font color=Cyan>(</font>TagName n m<font color=Cyan>)</font>       <font color=Red>=</font> text n <font color=Cyan>&lt;&gt;</font> modifier m-<a name="line-148"></a><font color=Blue>cp</font> <font color=Cyan>(</font>Choice cs m<font color=Cyan>)</font>       <font color=Red>=</font> parens <font color=Cyan>(</font>hcat <font color=Cyan>(</font>intersperse <font color=Cyan>(</font>text <font color=Magenta>"|"</font><font color=Cyan>)</font> <font color=Cyan>(</font>map cp cs<font color=Cyan>)</font><font color=Cyan>)</font><font color=Cyan>)</font> <font color=Cyan>&lt;&gt;</font>-<a name="line-149"></a>                           modifier m-<a name="line-150"></a><font color=Blue>cp</font> <font color=Cyan>(</font>Seq cs m<font color=Cyan>)</font>          <font color=Red>=</font> parens <font color=Cyan>(</font>hcat <font color=Cyan>(</font>intersperse <font color=Cyan>(</font>text <font color=Magenta>","</font><font color=Cyan>)</font> <font color=Cyan>(</font>map cp cs<font color=Cyan>)</font><font color=Cyan>)</font><font color=Cyan>)</font> <font color=Cyan>&lt;&gt;</font>-<a name="line-151"></a>                           modifier m-<a name="line-152"></a><a name="modifier"></a><font color=Blue>--cp (CPPE p c)          = peref p</font>-<a name="line-153"></a><font color=Blue>modifier</font> None          <font color=Red>=</font> empty-<a name="line-154"></a><font color=Blue>modifier</font> Query         <font color=Red>=</font> text <font color=Magenta>"?"</font>-<a name="line-155"></a><font color=Blue>modifier</font> Star          <font color=Red>=</font> text <font color=Magenta>"*"</font>-<a name="line-156"></a><font color=Blue>modifier</font> Plus          <font color=Red>=</font> text <font color=Magenta>"+"</font>-<a name="line-157"></a><a name="mixed"></a><font color=Blue>mixed</font>  PCDATA          <font color=Red>=</font> text <font color=Magenta>"(#PCDATA)"</font>-<a name="line-158"></a><font color=Blue>mixed</font> <font color=Cyan>(</font>PCDATAplus ns<font color=Cyan>)</font>  <font color=Red>=</font> text <font color=Magenta>"(#PCDATA |"</font> <font color=Cyan>&lt;+&gt;</font>-<a name="line-159"></a>                         hcat <font color=Cyan>(</font>intersperse <font color=Cyan>(</font>text <font color=Magenta>"|"</font><font color=Cyan>)</font> <font color=Cyan>(</font>map text ns<font color=Cyan>)</font><font color=Cyan>)</font> <font color=Cyan>&lt;&gt;</font>-<a name="line-160"></a>                         text <font color=Magenta>")*"</font>-<a name="line-161"></a>-<a name="line-162"></a><a name="attlistdecl"></a><font color=Blue>attlistdecl</font> <font color=Cyan>(</font>AttListDecl n ds<font color=Cyan>)</font> <font color=Red>=</font> text <font color=Magenta>"&lt;!ATTLIST"</font> <font color=Cyan>&lt;+&gt;</font> text n <font color=Cyan>&lt;+&gt;</font>-<a name="line-163"></a>                                 fsep <font color=Cyan>(</font>map attdef ds<font color=Cyan>)</font> <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>"&gt;"</font>-<a name="line-164"></a><a name="attdef"></a><font color=Blue>attdef</font> <font color=Cyan>(</font>AttDef n t d<font color=Cyan>)</font>          <font color=Red>=</font> text n <font color=Cyan>&lt;+&gt;</font> atttype t <font color=Cyan>&lt;+&gt;</font> defaultdecl d-<a name="line-165"></a><a name="atttype"></a><font color=Blue>atttype</font>  StringType            <font color=Red>=</font> text <font color=Magenta>"CDATA"</font>-<a name="line-166"></a><font color=Blue>atttype</font> <font color=Cyan>(</font>TokenizedType t<font color=Cyan>)</font>      <font color=Red>=</font> tokenizedtype t-<a name="line-167"></a><font color=Blue>atttype</font> <font color=Cyan>(</font>EnumeratedType t<font color=Cyan>)</font>     <font color=Red>=</font> enumeratedtype t-<a name="line-168"></a><a name="tokenizedtype"></a><font color=Blue>tokenizedtype</font> ID               <font color=Red>=</font> text <font color=Magenta>"ID"</font>-<a name="line-169"></a><font color=Blue>tokenizedtype</font> IDREF            <font color=Red>=</font> text <font color=Magenta>"IDREF"</font>-<a name="line-170"></a><font color=Blue>tokenizedtype</font> IDREFS           <font color=Red>=</font> text <font color=Magenta>"IDREFS"</font>-<a name="line-171"></a><font color=Blue>tokenizedtype</font> ENTITY           <font color=Red>=</font> text <font color=Magenta>"ENTITY"</font>-<a name="line-172"></a><font color=Blue>tokenizedtype</font> ENTITIES         <font color=Red>=</font> text <font color=Magenta>"ENTITIES"</font>-<a name="line-173"></a><font color=Blue>tokenizedtype</font> NMTOKEN          <font color=Red>=</font> text <font color=Magenta>"NMTOKEN"</font>-<a name="line-174"></a><font color=Blue>tokenizedtype</font> NMTOKENS         <font color=Red>=</font> text <font color=Magenta>"NMTOKENS"</font>-<a name="line-175"></a><a name="enumeratedtype"></a><font color=Blue>enumeratedtype</font> <font color=Cyan>(</font>NotationType n<font color=Cyan>)</font><font color=Red>=</font> notationtype n-<a name="line-176"></a><font color=Blue>enumeratedtype</font> <font color=Cyan>(</font>Enumeration e<font color=Cyan>)</font> <font color=Red>=</font> enumeration e-<a name="line-177"></a><a name="notationtype"></a><font color=Blue>notationtype</font> ns                <font color=Red>=</font> text <font color=Magenta>"NOTATION"</font> <font color=Cyan>&lt;+&gt;</font>-<a name="line-178"></a>                                 parens <font color=Cyan>(</font>hcat <font color=Cyan>(</font>intersperse <font color=Cyan>(</font>text <font color=Magenta>"|"</font><font color=Cyan>)</font> <font color=Cyan>(</font>map text ns<font color=Cyan>)</font><font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-179"></a><a name="enumeration"></a><font color=Blue>enumeration</font> ns                 <font color=Red>=</font> parens <font color=Cyan>(</font>hcat <font color=Cyan>(</font>intersperse <font color=Cyan>(</font>text <font color=Magenta>"|"</font><font color=Cyan>)</font> <font color=Cyan>(</font>map nmtoken ns<font color=Cyan>)</font><font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-180"></a><a name="defaultdecl"></a><font color=Blue>defaultdecl</font>  REQUIRED          <font color=Red>=</font> text <font color=Magenta>"#REQUIRED"</font>-<a name="line-181"></a><font color=Blue>defaultdecl</font>  IMPLIED           <font color=Red>=</font> text <font color=Magenta>"#IMPLIED"</font>-<a name="line-182"></a><font color=Blue>defaultdecl</font> <font color=Cyan>(</font>DefaultTo a f<font color=Cyan>)</font>    <font color=Red>=</font> maybe <font color=Cyan>(</font>const <font color=Cyan>(</font>text <font color=Magenta>"#FIXED"</font><font color=Cyan>)</font><font color=Cyan>)</font> f <font color=Cyan>&lt;+&gt;</font> attvalue a-<a name="line-183"></a><a name="conditionalsect"></a><font color=Blue>conditionalsect</font> <font color=Cyan>(</font>IncludeSect i<font color=Cyan>)</font><font color=Red>=</font> text <font color=Magenta>"&lt;![INCLUDE ["</font> <font color=Cyan>&lt;+&gt;</font>-<a name="line-184"></a>                                 vcat <font color=Cyan>(</font>map extsubsetdecl i<font color=Cyan>)</font> <font color=Cyan>&lt;+&gt;</font> text <font color=Magenta>"]]&gt;"</font>-<a name="line-185"></a><font color=Blue>conditionalsect</font> <font color=Cyan>(</font>IgnoreSect i<font color=Cyan>)</font> <font color=Red>=</font> text <font color=Magenta>"&lt;![IGNORE ["</font> <font color=Cyan>&lt;+&gt;</font>-<a name="line-186"></a>                                 fsep <font color=Cyan>(</font>map ignoresectcontents i<font color=Cyan>)</font> <font color=Cyan>&lt;+&gt;</font> text <font color=Magenta>"]]&gt;"</font>-<a name="line-187"></a><a name="ignore"></a><font color=Blue>ignore</font> <font color=Cyan>(</font>Ignore<font color=Cyan>)</font>                <font color=Red>=</font> empty-<a name="line-188"></a><a name="ignoresectcontents"></a><font color=Blue>ignoresectcontents</font> <font color=Cyan>(</font>IgnoreSectContents i is<font color=Cyan>)</font>-<a name="line-189"></a>                               <font color=Red>=</font> ignore i <font color=Cyan>&lt;+&gt;</font> vcat <font color=Cyan>(</font>map internal is<font color=Cyan>)</font>-<a name="line-190"></a>                          <font color=Green><u>where</u></font> internal <font color=Cyan>(</font>ics<font color=Cyan>,</font>i<font color=Cyan>)</font> <font color=Red>=</font> text <font color=Magenta>"&lt;![["</font> <font color=Cyan>&lt;+&gt;</font>-<a name="line-191"></a>                                                   ignoresectcontents ics <font color=Cyan>&lt;+&gt;</font>-<a name="line-192"></a>                                                   text <font color=Magenta>"]]&gt;"</font> <font color=Cyan>&lt;+&gt;</font> ignore i-<a name="line-193"></a><a name="reference"></a><font color=Blue>reference</font> <font color=Cyan>(</font>RefEntity er<font color=Cyan>)</font>       <font color=Red>=</font> entityref er-<a name="line-194"></a><font color=Blue>reference</font> <font color=Cyan>(</font>RefChar cr<font color=Cyan>)</font>         <font color=Red>=</font> charref cr-<a name="line-195"></a><a name="entityref"></a><font color=Blue>entityref</font> n                    <font color=Red>=</font> text <font color=Magenta>"&amp;"</font> <font color=Cyan>&lt;&gt;</font> text n <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>";"</font>-<a name="line-196"></a><a name="charref"></a><font color=Blue>charref</font> c                      <font color=Red>=</font> text <font color=Magenta>"&amp;#"</font> <font color=Cyan>&lt;&gt;</font> text <font color=Cyan>(</font>show c<font color=Cyan>)</font> <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>";"</font>-<a name="line-197"></a><a name="entitydecl"></a><font color=Blue>entitydecl</font> <font color=Cyan>(</font>EntityGEDecl d<font color=Cyan>)</font>    <font color=Red>=</font> gedecl d-<a name="line-198"></a><font color=Blue>entitydecl</font> <font color=Cyan>(</font>EntityPEDecl d<font color=Cyan>)</font>    <font color=Red>=</font> pedecl d-<a name="line-199"></a><a name="gedecl"></a><font color=Blue>gedecl</font> <font color=Cyan>(</font>GEDecl n ed<font color=Cyan>)</font>           <font color=Red>=</font> text <font color=Magenta>"&lt;!ENTITY"</font> <font color=Cyan>&lt;+&gt;</font> text n <font color=Cyan>&lt;+&gt;</font> entitydef ed <font color=Cyan>&lt;&gt;</font>-<a name="line-200"></a>                                 text <font color=Magenta>"&gt;"</font>-<a name="line-201"></a><a name="pedecl"></a><font color=Blue>pedecl</font> <font color=Cyan>(</font>PEDecl n pd<font color=Cyan>)</font>           <font color=Red>=</font> text <font color=Magenta>"&lt;!ENTITY %"</font> <font color=Cyan>&lt;&gt;</font> text n <font color=Cyan>&lt;+&gt;</font> pedef pd <font color=Cyan>&lt;&gt;</font>-<a name="line-202"></a>                                 text <font color=Magenta>"&gt;"</font>-<a name="line-203"></a><a name="entitydef"></a><font color=Blue>entitydef</font> <font color=Cyan>(</font>DefEntityValue ev<font color=Cyan>)</font>  <font color=Red>=</font> entityvalue ev-<a name="line-204"></a><font color=Blue>entitydef</font> <font color=Cyan>(</font>DefExternalID i nd<font color=Cyan>)</font> <font color=Red>=</font> externalid i <font color=Cyan>&lt;+&gt;</font> maybe ndatadecl nd-<a name="line-205"></a><a name="pedef"></a><font color=Blue>pedef</font> <font color=Cyan>(</font>PEDefEntityValue ev<font color=Cyan>)</font>    <font color=Red>=</font> entityvalue ev-<a name="line-206"></a><font color=Blue>pedef</font> <font color=Cyan>(</font>PEDefExternalID eid<font color=Cyan>)</font>    <font color=Red>=</font> externalid eid-<a name="line-207"></a><a name="externalid"></a><font color=Blue>externalid</font> <font color=Cyan>(</font>SYSTEM sl<font color=Cyan>)</font>         <font color=Red>=</font> text <font color=Magenta>"SYSTEM"</font> <font color=Cyan>&lt;+&gt;</font> systemliteral sl-<a name="line-208"></a><font color=Blue>externalid</font> <font color=Cyan>(</font>PUBLIC i sl<font color=Cyan>)</font>       <font color=Red>=</font> text <font color=Magenta>"PUBLIC"</font> <font color=Cyan>&lt;+&gt;</font> pubidliteral i <font color=Cyan>&lt;+&gt;</font>-<a name="line-209"></a>                                 systemliteral sl-<a name="line-210"></a><a name="ndatadecl"></a><font color=Blue>ndatadecl</font> <font color=Cyan>(</font>NDATA n<font color=Cyan>)</font>            <font color=Red>=</font> text <font color=Magenta>"NDATA"</font> <font color=Cyan>&lt;+&gt;</font> text n-<a name="line-211"></a><a name="textdecl"></a><font color=Blue>textdecl</font> <font color=Cyan>(</font>TextDecl vi ed<font color=Cyan>)</font>      <font color=Red>=</font> text <font color=Magenta>"&lt;?xml"</font> <font color=Cyan>&lt;+&gt;</font> maybe text vi <font color=Cyan>&lt;+&gt;</font>-<a name="line-212"></a>                                 encodingdecl ed <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>"?&gt;"</font>-<a name="line-213"></a><a name="extparsedent"></a><font color=Blue>extparsedent</font> <font color=Cyan>(</font>ExtParsedEnt t c<font color=Cyan>)</font><font color=Red>=</font> maybe textdecl t <font color=Cyan>&lt;+&gt;</font> content c-<a name="line-214"></a><a name="extpe"></a><font color=Blue>extpe</font> <font color=Cyan>(</font>ExtPE t esd<font color=Cyan>)</font>            <font color=Red>=</font> maybe textdecl t <font color=Cyan>&lt;+&gt;</font>-<a name="line-215"></a>                                 vcat <font color=Cyan>(</font>map extsubsetdecl esd<font color=Cyan>)</font>-<a name="line-216"></a><a name="notationdecl"></a><font color=Blue>notationdecl</font> <font color=Cyan>(</font>NOTATION n e<font color=Cyan>)</font>    <font color=Red>=</font> text <font color=Magenta>"&lt;!NOTATION"</font> <font color=Cyan>&lt;+&gt;</font> text n <font color=Cyan>&lt;+&gt;</font>-<a name="line-217"></a>                                 either externalid publicid e <font color=Cyan>&lt;&gt;</font>-<a name="line-218"></a>                                 text <font color=Magenta>"&gt;"</font>-<a name="line-219"></a><a name="publicid"></a><font color=Blue>publicid</font> <font color=Cyan>(</font>PUBLICID p<font color=Cyan>)</font>          <font color=Red>=</font> text <font color=Magenta>"PUBLICID"</font> <font color=Cyan>&lt;+&gt;</font> pubidliteral p-<a name="line-220"></a><a name="encodingdecl"></a><font color=Blue>encodingdecl</font> <font color=Cyan>(</font>EncodingDecl s<font color=Cyan>)</font>  <font color=Red>=</font> text <font color=Magenta>"encoding='"</font> <font color=Cyan>&lt;&gt;</font> text s <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>"'"</font>-<a name="line-221"></a><a name="nmtoken"></a><font color=Blue>nmtoken</font> s                      <font color=Red>=</font> text s-<a name="line-222"></a><a name="attvalue"></a><font color=Blue>attvalue</font> <font color=Cyan>(</font>AttValue esr<font color=Cyan>)</font>        <font color=Red>=</font> text <font color=Magenta>"\""</font> <font color=Cyan>&lt;&gt;</font>-<a name="line-223"></a>                                 hcat <font color=Cyan>(</font>map <font color=Cyan>(</font>either text reference<font color=Cyan>)</font> esr<font color=Cyan>)</font> <font color=Cyan>&lt;&gt;</font>-<a name="line-224"></a>                                 text <font color=Magenta>"\""</font>-<a name="line-225"></a><a name="entityvalue"></a><font color=Blue>entityvalue</font> <font color=Cyan>(</font>EntityValue evs<font color=Cyan>)</font>  <font color=Red>=</font> text <font color=Magenta>"'"</font> <font color=Cyan>&lt;&gt;</font> hcat <font color=Cyan>(</font>map ev evs<font color=Cyan>)</font> <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>"'"</font>-<a name="line-226"></a><a name="ev"></a><font color=Blue>ev</font> <font color=Cyan>(</font>EVString s<font color=Cyan>)</font>                <font color=Red>=</font> text s-<a name="line-227"></a><font color=Blue>--ev (EVPERef p e)               = peref p</font>-<a name="line-228"></a><font color=Blue>ev</font> <font color=Cyan>(</font>EVRef r<font color=Cyan>)</font>                   <font color=Red>=</font> reference r-<a name="line-229"></a><a name="pubidliteral"></a><font color=Blue>pubidliteral</font> <font color=Cyan>(</font>PubidLiteral s<font color=Cyan>)</font>  <font color=Red>=</font> text <font color=Magenta>"'"</font> <font color=Cyan>&lt;&gt;</font> text s <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>"'"</font>-<a name="line-230"></a><a name="systemliteral"></a><font color=Blue>systemliteral</font> <font color=Cyan>(</font>SystemLiteral s<font color=Cyan>)</font><font color=Red>=</font> text <font color=Magenta>"'"</font> <font color=Cyan>&lt;&gt;</font> text s <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>"'"</font>-<a name="line-231"></a><a name="chardata"></a><font color=Blue>chardata</font> s                     <font color=Red>=</font> <font color=Green><u>if</u></font> all isSpace s <font color=Green><u>then</u></font> empty <font color=Green><u>else</u></font> text s-<a name="line-232"></a><a name="cdsect"></a><font color=Blue>cdsect</font> c                       <font color=Red>=</font> text <font color=Magenta>"&lt;![CDATA["</font> <font color=Cyan>&lt;&gt;</font> chardata c <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>"]]&gt;"</font>-<a name="line-233"></a>-<a name="line-234"></a><font color=Blue>----</font>-</pre>-</body>-</html>
− docs/HaXml/src/Text/XML/HaXml/Lex.html
@@ -1,343 +0,0 @@-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">-<html>-<head>-<!-- Generated by HsColour, http://www.cs.york.ac.uk/fp/darcs/hscolour/ -->-<title>src/Text/XML/HaXml/Lex.hs</title>-</head>-<body>-<pre><a name="line-1"></a><font color=Blue>-- | You don't normally need to use this Lex module directly - it is</font>-<a name="line-2"></a><font color=Blue>--   called automatically by the parser.  (This interface is only exposed</font>-<a name="line-3"></a><font color=Blue>--   for debugging purposes.)</font>-<a name="line-4"></a><font color=Blue>--</font>-<a name="line-5"></a><font color=Blue>-- This is a hand-written lexer for tokenising the text of an XML</font>-<a name="line-6"></a><font color=Blue>-- document so that it is ready for parsing.  It attaches position</font>-<a name="line-7"></a><font color=Blue>-- information in (line,column) format to every token.  The main</font>-<a name="line-8"></a><font color=Blue>-- entry point is 'xmlLex'.  A secondary entry point, 'xmlReLex', is</font>-<a name="line-9"></a><font color=Blue>-- provided for when the parser needs to stuff a string back onto</font>-<a name="line-10"></a><font color=Blue>-- the front of the text and re-tokenise it (typically when expanding</font>-<a name="line-11"></a><font color=Blue>-- macros).</font>-<a name="line-12"></a><font color=Blue>--</font>-<a name="line-13"></a><font color=Blue>-- As one would expect, the lexer is essentially a small finite</font>-<a name="line-14"></a><font color=Blue>-- state machine.</font>-<a name="line-15"></a>-<a name="line-16"></a><font color=Green><u>module</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Lex-<a name="line-17"></a>  <font color=Cyan>(</font>-<a name="line-18"></a>  <font color=Blue>-- * Entry points to the lexer</font>-<a name="line-19"></a>    xmlLex         <font color=Blue>-- :: String -&gt; String -&gt; [Token]</font>-<a name="line-20"></a>  <font color=Cyan>,</font> xmlReLex       <font color=Blue>-- :: Posn   -&gt; String -&gt; [Token]</font>-<a name="line-21"></a>  <font color=Cyan>,</font> reLexEntityValue <font color=Blue>-- :: (String-&gt;Maybe String) -&gt; Posn -&gt; String -&gt; [Token]</font>-<a name="line-22"></a>  <font color=Blue>-- * Token types</font>-<a name="line-23"></a>  <font color=Cyan>,</font> Token-<a name="line-24"></a>  <font color=Cyan>,</font> TokenT<font color=Cyan>(</font><font color=Red>..</font><font color=Cyan>)</font>-<a name="line-25"></a>  <font color=Cyan>,</font> Special<font color=Cyan>(</font><font color=Red>..</font><font color=Cyan>)</font>-<a name="line-26"></a>  <font color=Cyan>,</font> Section<font color=Cyan>(</font><font color=Red>..</font><font color=Cyan>)</font>-<a name="line-27"></a>  <font color=Cyan>)</font> <font color=Green><u>where</u></font>-<a name="line-28"></a>-<a name="line-29"></a><font color=Green><u>import</u></font> Char-<a name="line-30"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Posn-<a name="line-31"></a>-<a name="line-32"></a><a name="Where"></a><font color=Green><u>data</u></font> Where <font color=Red>=</font> InTag String <font color=Red>|</font> NotInTag-<a name="line-33"></a>    <font color=Green><u>deriving</u></font> <font color=Cyan>(</font>Eq<font color=Cyan>)</font>-<a name="line-34"></a>-<a name="line-35"></a><a name="Token"></a><font color=Blue>-- | All tokens are paired up with a source position.</font>-<a name="line-36"></a><a name="Token"></a><font color=Blue>--   Lexical errors are passed back as a special @TokenT@ value.</font>-<a name="line-37"></a><a name="Token"></a><font color=Green><u>type</u></font> Token <font color=Red>=</font> <font color=Cyan>(</font>Posn<font color=Cyan>,</font> TokenT<font color=Cyan>)</font>-<a name="line-38"></a>-<a name="line-39"></a><a name="TokenT"></a><font color=Blue>-- | The basic token type.</font>-<a name="line-40"></a><a name="TokenT"></a><font color=Green><u>data</u></font> TokenT <font color=Red>=</font>-<a name="line-41"></a>      TokCommentOpen		<font color=Blue>-- ^   \&lt;!--</font>-<a name="line-42"></a>    <font color=Red>|</font> TokCommentClose		<font color=Blue>-- ^   --&gt;</font>-<a name="line-43"></a>    <font color=Red>|</font> TokPIOpen			<font color=Blue>-- ^   \&lt;?</font>-<a name="line-44"></a>    <font color=Red>|</font> TokPIClose		<font color=Blue>-- ^   ?&gt;</font>-<a name="line-45"></a>    <font color=Red>|</font> TokSectionOpen		<font color=Blue>-- ^   \&lt;![</font>-<a name="line-46"></a>    <font color=Red>|</font> TokSectionClose		<font color=Blue>-- ^   ]]&gt;</font>-<a name="line-47"></a>    <font color=Red>|</font> TokSection Section	<font color=Blue>-- ^   CDATA INCLUDE IGNORE etc</font>-<a name="line-48"></a>    <font color=Red>|</font> TokSpecialOpen		<font color=Blue>-- ^   \&lt;!</font>-<a name="line-49"></a>    <font color=Red>|</font> TokSpecial Special	<font color=Blue>-- ^   DOCTYPE ELEMENT ATTLIST etc</font>-<a name="line-50"></a>    <font color=Red>|</font> TokEndOpen		<font color=Blue>-- ^   \&lt;\/</font>-<a name="line-51"></a>    <font color=Red>|</font> TokEndClose		<font color=Blue>-- ^   \/&gt;</font>-<a name="line-52"></a>    <font color=Red>|</font> TokAnyOpen		<font color=Blue>-- ^   \&lt;</font>-<a name="line-53"></a>    <font color=Red>|</font> TokAnyClose		<font color=Blue>-- ^   &gt;</font>-<a name="line-54"></a>    <font color=Red>|</font> TokSqOpen			<font color=Blue>-- ^   \[</font>-<a name="line-55"></a>    <font color=Red>|</font> TokSqClose		<font color=Blue>-- ^   \]</font>-<a name="line-56"></a>    <font color=Red>|</font> TokEqual			<font color=Blue>-- ^   =</font>-<a name="line-57"></a>    <font color=Red>|</font> TokQuery			<font color=Blue>-- ^   ?</font>-<a name="line-58"></a>    <font color=Red>|</font> TokStar			<font color=Blue>-- ^   \*</font>-<a name="line-59"></a>    <font color=Red>|</font> TokPlus			<font color=Blue>-- ^   +</font>-<a name="line-60"></a>    <font color=Red>|</font> TokAmp			<font color=Blue>-- ^   &amp;</font>-<a name="line-61"></a>    <font color=Red>|</font> TokSemi			<font color=Blue>-- ^   ;</font>-<a name="line-62"></a>    <font color=Red>|</font> TokHash			<font color=Blue>-- ^   #</font>-<a name="line-63"></a>    <font color=Red>|</font> TokBraOpen		<font color=Blue>-- ^   (</font>-<a name="line-64"></a>    <font color=Red>|</font> TokBraClose		<font color=Blue>-- ^   )</font>-<a name="line-65"></a>    <font color=Red>|</font> TokPipe			<font color=Blue>-- ^   |</font>-<a name="line-66"></a>    <font color=Red>|</font> TokPercent		<font color=Blue>-- ^   %</font>-<a name="line-67"></a>    <font color=Red>|</font> TokComma			<font color=Blue>-- ^   ,</font>-<a name="line-68"></a>    <font color=Red>|</font> TokQuote			<font color=Blue>-- ^   \'\' or \"\"</font>-<a name="line-69"></a>    <font color=Red>|</font> TokName      String	<font color=Blue>-- ^   begins with letter, no spaces</font>-<a name="line-70"></a>    <font color=Red>|</font> TokFreeText  String	<font color=Blue>-- ^   any character data</font>-<a name="line-71"></a>    <font color=Red>|</font> TokNull			<font color=Blue>-- ^   fake token</font>-<a name="line-72"></a>    <font color=Red>|</font> TokError     String	<font color=Blue>-- ^   lexical error</font>-<a name="line-73"></a>    <font color=Green><u>deriving</u></font> <font color=Cyan>(</font>Eq<font color=Cyan>)</font>-<a name="line-74"></a>-<a name="line-75"></a><a name="Special"></a><font color=Green><u>data</u></font> Special <font color=Red>=</font>-<a name="line-76"></a>      DOCTYPEx-<a name="line-77"></a>    <font color=Red>|</font> ELEMENTx-<a name="line-78"></a>    <font color=Red>|</font> ATTLISTx-<a name="line-79"></a>    <font color=Red>|</font> ENTITYx-<a name="line-80"></a>    <font color=Red>|</font> NOTATIONx-<a name="line-81"></a>    <font color=Green><u>deriving</u></font> <font color=Cyan>(</font>Eq<font color=Cyan>,</font>Show<font color=Cyan>)</font>-<a name="line-82"></a><a name="Section"></a><font color=Green><u>data</u></font> Section <font color=Red>=</font>-<a name="line-83"></a>      CDATAx-<a name="line-84"></a>    <font color=Red>|</font> INCLUDEx-<a name="line-85"></a>    <font color=Red>|</font> IGNOREx-<a name="line-86"></a>    <font color=Green><u>deriving</u></font> <font color=Cyan>(</font>Eq<font color=Cyan>,</font>Show<font color=Cyan>)</font>-<a name="line-87"></a>-<a name="line-88"></a><font color=Green><u>instance</u></font> Show TokenT <font color=Green><u>where</u></font>-<a name="line-89"></a>  showsPrec p  TokCommentOpen		<font color=Red>=</font> showString     <font color=Magenta>"&lt;!--"</font>-<a name="line-90"></a>  showsPrec p  TokCommentClose		<font color=Red>=</font> showString     <font color=Magenta>"--&gt;"</font>-<a name="line-91"></a>  showsPrec p  TokPIOpen		<font color=Red>=</font> showString     <font color=Magenta>"&lt;?"</font>-<a name="line-92"></a>  showsPrec p  TokPIClose		<font color=Red>=</font> showString     <font color=Magenta>"?&gt;"</font>-<a name="line-93"></a>  showsPrec p  TokSectionOpen		<font color=Red>=</font> showString     <font color=Magenta>"&lt;!["</font>-<a name="line-94"></a>  showsPrec p  TokSectionClose		<font color=Red>=</font> showString     <font color=Magenta>"]]&gt;"</font>-<a name="line-95"></a>  showsPrec p  <font color=Cyan>(</font>TokSection s<font color=Cyan>)</font>		<font color=Red>=</font> showsPrec p s-<a name="line-96"></a>  showsPrec p  TokSpecialOpen		<font color=Red>=</font> showString     <font color=Magenta>"&lt;!"</font>-<a name="line-97"></a>  showsPrec p  <font color=Cyan>(</font>TokSpecial s<font color=Cyan>)</font>		<font color=Red>=</font> showsPrec p s-<a name="line-98"></a>  showsPrec p  TokEndOpen		<font color=Red>=</font> showString     <font color=Magenta>"&lt;/"</font>-<a name="line-99"></a>  showsPrec p  TokEndClose		<font color=Red>=</font> showString     <font color=Magenta>"/&gt;"</font>-<a name="line-100"></a>  showsPrec p  TokAnyOpen		<font color=Red>=</font> showString     <font color=Magenta>"&lt;"</font>-<a name="line-101"></a>  showsPrec p  TokAnyClose		<font color=Red>=</font> showString     <font color=Magenta>"&gt;"</font>-<a name="line-102"></a>  showsPrec p  TokSqOpen		<font color=Red>=</font> showString     <font color=Magenta>"["</font>-<a name="line-103"></a>  showsPrec p  TokSqClose		<font color=Red>=</font> showString     <font color=Magenta>"]"</font>-<a name="line-104"></a>  showsPrec p  TokEqual			<font color=Red>=</font> showString     <font color=Magenta>"="</font>-<a name="line-105"></a>  showsPrec p  TokQuery			<font color=Red>=</font> showString     <font color=Magenta>"?"</font>-<a name="line-106"></a>  showsPrec p  TokStar			<font color=Red>=</font> showString     <font color=Magenta>"*"</font>-<a name="line-107"></a>  showsPrec p  TokPlus			<font color=Red>=</font> showString     <font color=Magenta>"+"</font>-<a name="line-108"></a>  showsPrec p  TokAmp			<font color=Red>=</font> showString     <font color=Magenta>"&amp;"</font>-<a name="line-109"></a>  showsPrec p  TokSemi			<font color=Red>=</font> showString     <font color=Magenta>";"</font>-<a name="line-110"></a>  showsPrec p  TokHash			<font color=Red>=</font> showString     <font color=Magenta>"#"</font>-<a name="line-111"></a>  showsPrec p  TokBraOpen		<font color=Red>=</font> showString     <font color=Magenta>"("</font>-<a name="line-112"></a>  showsPrec p  TokBraClose		<font color=Red>=</font> showString     <font color=Magenta>")"</font>-<a name="line-113"></a>  showsPrec p  TokPipe			<font color=Red>=</font> showString     <font color=Magenta>"|"</font>-<a name="line-114"></a>  showsPrec p  TokPercent		<font color=Red>=</font> showString     <font color=Magenta>"%"</font>-<a name="line-115"></a>  showsPrec p  TokComma			<font color=Red>=</font> showString     <font color=Magenta>","</font>-<a name="line-116"></a>  showsPrec p  TokQuote			<font color=Red>=</font> showString     <font color=Magenta>"' or \""</font>-<a name="line-117"></a>  showsPrec p  <font color=Cyan>(</font>TokName      s<font color=Cyan>)</font>		<font color=Red>=</font> showString     s-<a name="line-118"></a>  showsPrec p  <font color=Cyan>(</font>TokFreeText  s<font color=Cyan>)</font>		<font color=Red>=</font> showString     s-<a name="line-119"></a>  showsPrec p  TokNull			<font color=Red>=</font> showString     <font color=Magenta>"(null)"</font>-<a name="line-120"></a>  showsPrec p  <font color=Cyan>(</font>TokError     s<font color=Cyan>)</font>		<font color=Red>=</font> showString     s-<a name="line-121"></a>-<a name="line-122"></a><font color=Blue>--trim, revtrim :: String -&gt; String</font>-<a name="line-123"></a><font color=Blue>--trim    = f . f         where f = reverse . dropWhile isSpace</font>-<a name="line-124"></a><font color=Blue>--revtrim = f.reverse.f   where f = dropWhile isSpace</font>-<a name="line-125"></a><font color=Blue>--revtrim = reverse . dropWhile (=='\n')  -- most recently used defn.</font>-<a name="line-126"></a>-<a name="line-127"></a><a name="emit"></a><font color=Blue>emit</font> <font color=Red>::</font> TokenT <font color=Red>-&gt;</font> Posn <font color=Red>-&gt;</font> Token-<a name="line-128"></a><font color=Blue>emit</font> tok p <font color=Red>=</font> forcep p <font color=Cyan>`seq`</font> <font color=Cyan>(</font>p<font color=Cyan>,</font>tok<font color=Cyan>)</font>-<a name="line-129"></a>-<a name="line-130"></a><a name="lexerror"></a><font color=Blue>lexerror</font> <font color=Red>::</font> String <font color=Red>-&gt;</font> Posn <font color=Red>-&gt;</font> <font color=Red>[</font>Token<font color=Red>]</font>-<a name="line-131"></a><font color=Blue>lexerror</font> s p <font color=Red>=</font> <font color=Red>[</font><font color=Cyan>(</font>p<font color=Cyan>,</font> TokError <font color=Cyan>(</font><font color=Magenta>"Lexical error:\n  "</font><font color=Cyan>++</font>s<font color=Cyan>)</font><font color=Cyan>)</font><font color=Red>]</font>-<a name="line-132"></a>-<a name="line-133"></a><a name="skip"></a><font color=Blue>skip</font> <font color=Red>::</font> Int <font color=Red>-&gt;</font> Posn <font color=Red>-&gt;</font> String <font color=Red>-&gt;</font> <font color=Cyan>(</font>Posn<font color=Red>-&gt;</font>String<font color=Red>-&gt;</font><font color=Red>[</font>Token<font color=Red>]</font><font color=Cyan>)</font> <font color=Red>-&gt;</font> <font color=Red>[</font>Token<font color=Red>]</font>-<a name="line-134"></a><font color=Blue>skip</font> n p s k <font color=Red>=</font> k <font color=Cyan>(</font>addcol n p<font color=Cyan>)</font> <font color=Cyan>(</font>drop n s<font color=Cyan>)</font>-<a name="line-135"></a>-<a name="line-136"></a><a name="blank"></a><font color=Blue>blank</font> <font color=Red>::</font> <font color=Cyan>(</font><font color=Red>[</font>Where<font color=Red>]</font><font color=Red>-&gt;</font>Posn<font color=Red>-&gt;</font>String<font color=Red>-&gt;</font><font color=Red>[</font>Token<font color=Red>]</font><font color=Cyan>)</font> <font color=Red>-&gt;</font> <font color=Red>[</font>Where<font color=Red>]</font><font color=Red>-&gt;</font> Posn<font color=Red>-&gt;</font> String<font color=Red>-&gt;</font> <font color=Red>[</font>Token<font color=Red>]</font>-<a name="line-137"></a><font color=Blue>blank</font> k  <font color=Cyan>(</font>InTag t<font color=Red><b>:</b></font><font color=Green><u>_</u></font><font color=Cyan>)</font> p [] <font color=Red>=</font> lexerror <font color=Cyan>(</font><font color=Magenta>"unexpected EOF within "</font><font color=Cyan>++</font>t<font color=Cyan>)</font> p-<a name="line-138"></a><font color=Blue>blank</font> k          <font color=Green><u>_</u></font>   p [] <font color=Red>=</font> []-<a name="line-139"></a><font color=Blue>blank</font> k      w p <font color=Cyan>(</font><font color=Magenta>' '</font><font color=Red><b>:</b></font> s<font color=Cyan>)</font> <font color=Red>=</font> blank k w <font color=Cyan>(</font>addcol <font color=Magenta>1</font> p<font color=Cyan>)</font> s-<a name="line-140"></a><font color=Blue>blank</font> k      w p <font color=Cyan>(</font><font color=Magenta>'\t'</font><font color=Red><b>:</b></font>s<font color=Cyan>)</font> <font color=Red>=</font> blank k w <font color=Cyan>(</font>tab p<font color=Cyan>)</font> s-<a name="line-141"></a><font color=Blue>blank</font> k      w p <font color=Cyan>(</font><font color=Magenta>'\n'</font><font color=Red><b>:</b></font>s<font color=Cyan>)</font> <font color=Red>=</font> blank k w <font color=Cyan>(</font>newline p<font color=Cyan>)</font> s-<a name="line-142"></a><font color=Blue>blank</font> k      w p <font color=Cyan>(</font><font color=Magenta>'\r'</font><font color=Red><b>:</b></font>s<font color=Cyan>)</font> <font color=Red>=</font> blank k w  p s-<a name="line-143"></a><font color=Blue>blank</font> k   w p <font color=Cyan>(</font><font color=Magenta>'\xa0'</font><font color=Red><b>:</b></font> s<font color=Cyan>)</font> <font color=Red>=</font> blank k w <font color=Cyan>(</font>addcol <font color=Magenta>1</font> p<font color=Cyan>)</font> s-<a name="line-144"></a><font color=Blue>blank</font> k      w p    s     <font color=Red>=</font> k w p s-<a name="line-145"></a>-<a name="line-146"></a><a name="prefixes"></a><font color=Blue>prefixes</font> <font color=Red>::</font> String <font color=Red>-&gt;</font> String <font color=Red>-&gt;</font> Bool-<a name="line-147"></a>[]     <font color=Cyan>`prefixes`</font>   ys   <font color=Red>=</font> True-<a name="line-148"></a><a name="prefixes"></a><font color=Cyan>(</font>x<font color=Red><b>:</b></font>xs<font color=Cyan>)</font> <font color=Cyan>`prefixes`</font> <font color=Cyan>(</font>y<font color=Red><b>:</b></font>ys<font color=Cyan>)</font> <font color=Red>=</font> x<font color=Cyan>==</font>y <font color=Cyan>&amp;&amp;</font> xs <font color=Cyan>`prefixes`</font> ys-<a name="line-149"></a><a name="prefixes"></a><font color=Cyan>(</font>x<font color=Red><b>:</b></font>xs<font color=Cyan>)</font> <font color=Cyan>`prefixes`</font>   []   <font color=Red>=</font> False <font color=Blue>--error "unexpected EOF in prefix"</font>-<a name="line-150"></a>-<a name="line-151"></a><a name="textUntil"></a><font color=Blue>textUntil</font> close tok acc pos p [] k <font color=Red>=</font>-<a name="line-152"></a>    lexerror <font color=Cyan>(</font><font color=Magenta>"unexpected EOF while looking for closing token "</font><font color=Cyan>++</font>close-<a name="line-153"></a>              <font color=Cyan>++</font><font color=Magenta>"\n  to match the opening token in "</font><font color=Cyan>++</font>show pos<font color=Cyan>)</font> p-<a name="line-154"></a><font color=Blue>textUntil</font> close tok acc pos p <font color=Cyan>(</font>s<font color=Red><b>:</b></font>ss<font color=Cyan>)</font> k-<a name="line-155"></a>    <font color=Red>|</font> close <font color=Cyan>`prefixes`</font> <font color=Cyan>(</font>s<font color=Red><b>:</b></font>ss<font color=Cyan>)</font>  <font color=Red>=</font> emit <font color=Cyan>(</font>TokFreeText <font color=Cyan>(</font>reverse acc<font color=Cyan>)</font><font color=Cyan>)</font> pos<font color=Red><b>:</b></font>-<a name="line-156"></a>                                 emit tok p<font color=Red><b>:</b></font>-<a name="line-157"></a>                                 skip <font color=Cyan>(</font>length close<font color=Blue>-</font><font color=Magenta>1</font><font color=Cyan>)</font> <font color=Cyan>(</font>addcol <font color=Magenta>1</font> p<font color=Cyan>)</font> ss k-<a name="line-158"></a>    <font color=Red>|</font> isSpace s  <font color=Red>=</font> textUntil close tok <font color=Cyan>(</font>s<font color=Red><b>:</b></font>acc<font color=Cyan>)</font> pos <font color=Cyan>(</font>white s p<font color=Cyan>)</font> ss k-<a name="line-159"></a>    <font color=Red>|</font> otherwise  <font color=Red>=</font> textUntil close tok <font color=Cyan>(</font>s<font color=Red><b>:</b></font>acc<font color=Cyan>)</font> pos <font color=Cyan>(</font>addcol <font color=Magenta>1</font> p<font color=Cyan>)</font> ss k-<a name="line-160"></a>-<a name="line-161"></a><a name="textOrRefUntil"></a><font color=Blue>textOrRefUntil</font> close tok acc pos p [] k <font color=Red>=</font>-<a name="line-162"></a>    lexerror <font color=Cyan>(</font><font color=Magenta>"unexpected EOF while looking for closing token "</font><font color=Cyan>++</font>close-<a name="line-163"></a>              <font color=Cyan>++</font><font color=Magenta>"\n  to match the opening token in "</font><font color=Cyan>++</font>show pos<font color=Cyan>)</font> p-<a name="line-164"></a><font color=Blue>textOrRefUntil</font> close tok acc pos p <font color=Cyan>(</font>s<font color=Red><b>:</b></font>ss<font color=Cyan>)</font> k-<a name="line-165"></a>    <font color=Red>|</font> close <font color=Cyan>`prefixes`</font> <font color=Cyan>(</font>s<font color=Red><b>:</b></font>ss<font color=Cyan>)</font>  <font color=Red>=</font> emit <font color=Cyan>(</font>TokFreeText <font color=Cyan>(</font>reverse acc<font color=Cyan>)</font><font color=Cyan>)</font> pos<font color=Red><b>:</b></font>-<a name="line-166"></a>                                 emit tok p<font color=Red><b>:</b></font>-<a name="line-167"></a>                                 skip <font color=Cyan>(</font>length close<font color=Blue>-</font><font color=Magenta>1</font><font color=Cyan>)</font> <font color=Cyan>(</font>addcol <font color=Magenta>1</font> p<font color=Cyan>)</font> ss k-<a name="line-168"></a>    <font color=Red>|</font> s<font color=Cyan>==</font><font color=Magenta>'&amp;'</font>     <font color=Red>=</font> <font color=Cyan>(</font><font color=Green><u>if</u></font> not <font color=Cyan>(</font>null acc<font color=Cyan>)</font>-<a name="line-169"></a>                       <font color=Green><u>then</u></font> <font color=Cyan>(</font>emit <font color=Cyan>(</font>TokFreeText <font color=Cyan>(</font>reverse acc<font color=Cyan>)</font><font color=Cyan>)</font> pos<font color=Red><b>:</b></font><font color=Cyan>)</font>-<a name="line-170"></a>                       <font color=Green><u>else</u></font> id<font color=Cyan>)</font>-<a name="line-171"></a>                   <font color=Cyan>(</font>emit TokAmp p<font color=Red><b>:</b></font>-<a name="line-172"></a>                    textUntil <font color=Magenta>";"</font> TokSemi <font color=Magenta>""</font> p <font color=Cyan>(</font>addcol <font color=Magenta>1</font> p<font color=Cyan>)</font> ss-<a name="line-173"></a>                        <font color=Cyan>(</font><font color=Red>\</font>p' i<font color=Red>-&gt;</font> textOrRefUntil close tok <font color=Magenta>""</font> p p' i k<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-174"></a>    <font color=Red>|</font> isSpace s  <font color=Red>=</font> textOrRefUntil close tok <font color=Cyan>(</font>s<font color=Red><b>:</b></font>acc<font color=Cyan>)</font> pos <font color=Cyan>(</font>white s p<font color=Cyan>)</font> ss k-<a name="line-175"></a>    <font color=Red>|</font> otherwise  <font color=Red>=</font> textOrRefUntil close tok <font color=Cyan>(</font>s<font color=Red><b>:</b></font>acc<font color=Cyan>)</font> pos <font color=Cyan>(</font>addcol <font color=Magenta>1</font> p<font color=Cyan>)</font> ss k-<a name="line-176"></a>-<a name="line-177"></a><font color=Blue>----</font>-<a name="line-178"></a>-<a name="line-179"></a><a name="xmlLex"></a><font color=Blue>-- | The first argument to 'xmlLex' is the filename (used for source positions,</font>-<a name="line-180"></a><font color=Blue>--   especially in error messages), and the second is the string content of</font>-<a name="line-181"></a><font color=Blue>--   the XML file.</font>-<a name="line-182"></a><font color=Blue>xmlLex</font> <font color=Red>::</font> String <font color=Red>-&gt;</font> String <font color=Red>-&gt;</font> <font color=Red>[</font>Token<font color=Red>]</font>-<a name="line-183"></a><font color=Blue>xmlLex</font> filename <font color=Red>=</font> xmlAny [] <font color=Cyan>(</font>posInNewCxt filename Nothing<font color=Cyan>)</font>-<a name="line-184"></a>-<a name="line-185"></a><a name="xmlReLex"></a><font color=Blue>-- | 'xmlReLex' is used when the parser expands a macro (PE reference).</font>-<a name="line-186"></a><font color=Blue>--    The expansion of the macro must be re-lexed as if for the first time.</font>-<a name="line-187"></a><font color=Blue>xmlReLex</font> <font color=Red>::</font> Posn <font color=Red>-&gt;</font> String <font color=Red>-&gt;</font> <font color=Red>[</font>Token<font color=Red>]</font>-<a name="line-188"></a><font color=Blue>xmlReLex</font> p s-<a name="line-189"></a>      <font color=Red>|</font> <font color=Magenta>"INCLUDE"</font>  <font color=Cyan>`prefixes`</font> s  <font color=Red>=</font> emit <font color=Cyan>(</font>TokSection INCLUDEx<font color=Cyan>)</font> p<font color=Red><b>:</b></font> k <font color=Magenta>7</font>-<a name="line-190"></a>      <font color=Red>|</font> <font color=Magenta>"IGNORE"</font>   <font color=Cyan>`prefixes`</font> s  <font color=Red>=</font> emit <font color=Cyan>(</font>TokSection IGNOREx<font color=Cyan>)</font> p<font color=Red><b>:</b></font>  k <font color=Magenta>6</font>-<a name="line-191"></a>      <font color=Red>|</font> otherwise <font color=Red>=</font> blank xmlAny [] p s-<a name="line-192"></a>  <font color=Green><u>where</u></font>-<a name="line-193"></a>    k n <font color=Red>=</font> skip n p s <font color=Cyan>(</font>blank xmlAny []<font color=Cyan>)</font>-<a name="line-194"></a>-<a name="line-195"></a><a name="reLexEntityValue"></a><font color=Blue>-- | 'reLexEntityValue' is used solely within parsing an entityvalue.</font>-<a name="line-196"></a><font color=Blue>--   Normally, a PERef is logically separated from its surroundings by</font>-<a name="line-197"></a><font color=Blue>--   whitespace.  But in an entityvalue, a PERef can be juxtaposed to</font>-<a name="line-198"></a><font color=Blue>--   an identifier, so the expansion forms a new identifier.</font>-<a name="line-199"></a><font color=Blue>--   Thus the need to rescan the whole text for possible PERefs.</font>-<a name="line-200"></a><font color=Blue>reLexEntityValue</font> <font color=Red>::</font> <font color=Cyan>(</font>String<font color=Red>-&gt;</font>Maybe String<font color=Cyan>)</font> <font color=Red>-&gt;</font> Posn <font color=Red>-&gt;</font> String <font color=Red>-&gt;</font> <font color=Red>[</font>Token<font color=Red>]</font>-<a name="line-201"></a><font color=Blue>reLexEntityValue</font> lookup p s <font color=Red>=</font>-<a name="line-202"></a>    textOrRefUntil <font color=Magenta>"%"</font> TokNull [] p p <font color=Cyan>(</font>expand s<font color=Cyan>++</font><font color=Magenta>"%"</font><font color=Cyan>)</font> <font color=Cyan>(</font>xmlAny []<font color=Cyan>)</font>-<a name="line-203"></a>  <font color=Green><u>where</u></font>-<a name="line-204"></a>    expand []       <font color=Red>=</font> []-<a name="line-205"></a>    expand <font color=Cyan>(</font><font color=Magenta>'%'</font><font color=Red><b>:</b></font>ss<font color=Cyan>)</font> <font color=Red>=</font> <font color=Green><u>let</u></font> <font color=Cyan>(</font>sym<font color=Cyan>,</font>rest<font color=Cyan>)</font> <font color=Red>=</font> break <font color=Cyan>(</font><font color=Cyan>==</font><font color=Magenta>';'</font><font color=Cyan>)</font> ss <font color=Green><u>in</u></font>-<a name="line-206"></a>                      <font color=Green><u>case</u></font> lookup sym <font color=Green><u>of</u></font>-<a name="line-207"></a>                        Just val <font color=Red>-&gt;</font> expand val <font color=Cyan>++</font> expand <font color=Cyan>(</font>tail rest<font color=Cyan>)</font>-<a name="line-208"></a>                        Nothing  <font color=Red>-&gt;</font> <font color=Magenta>"%"</font><font color=Cyan>++</font>sym<font color=Cyan>++</font><font color=Magenta>";"</font><font color=Cyan>++</font> expand <font color=Cyan>(</font>tail rest<font color=Cyan>)</font> <font color=Blue>-- hmmm</font>-<a name="line-209"></a>    expand <font color=Cyan>(</font>s<font color=Red><b>:</b></font>ss<font color=Cyan>)</font>   <font color=Red>=</font> s<font color=Red><b>:</b></font> expand ss-<a name="line-210"></a>-<a name="line-211"></a><font color=Blue>--xmltop :: Posn -&gt; String -&gt; [Token]</font>-<a name="line-212"></a><font color=Blue>--xmltop p [] = []</font>-<a name="line-213"></a><font color=Blue>--xmltop p s</font>-<a name="line-214"></a><font color=Blue>--    | "&lt;?"   `prefixes` s = emit TokPIOpen p:      next 2 (xmlPI [InTag "&lt;?...?&gt;"])</font>-<a name="line-215"></a><font color=Blue>--    | "&lt;!--" `prefixes` s = emit TokCommentOpen p: next 4 (xmlComment [])</font>-<a name="line-216"></a><font color=Blue>--    | "&lt;!"   `prefixes` s = emit TokSpecialOpen p: next 2 (xmlSpecial [InTag "&lt;!...&gt;"])</font>-<a name="line-217"></a><font color=Blue>--    | otherwise           = lexerror "expected &lt;?xml?&gt; or &lt;!DOCTYPE&gt;" p</font>-<a name="line-218"></a><font color=Blue>--  where next n k = skip n p s k</font>-<a name="line-219"></a>-<a name="line-220"></a><a name="xmlPI"></a><font color=Blue>xmlPI</font>      w p s <font color=Red>=</font> xmlName p s <font color=Magenta>"name of processor in &lt;? ?&gt;"</font> <font color=Cyan>(</font>blank xmlPIEnd w<font color=Cyan>)</font>-<a name="line-221"></a><a name="xmlPIEnd"></a><font color=Blue>xmlPIEnd</font>   w p s <font color=Red>=</font> textUntil <font color=Magenta>"?&gt;"</font>  TokPIClose <font color=Magenta>""</font> p p s <font color=Cyan>(</font>blank xmlAny <font color=Cyan>(</font>tail w<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-222"></a><a name="xmlComment"></a><font color=Blue>xmlComment</font> w p s <font color=Red>=</font> textUntil <font color=Magenta>"--&gt;"</font> TokCommentClose <font color=Magenta>""</font> p p s <font color=Cyan>(</font>blank xmlAny w<font color=Cyan>)</font>-<a name="line-223"></a>-<a name="line-224"></a><a name="xmlAny"></a><font color=Blue>-- Note: the order of the clauses in xmlAny is very important.</font>-<a name="line-225"></a><font color=Blue>-- Some matches must precede the NotInTag test, the rest must follow it.</font>-<a name="line-226"></a><font color=Blue>xmlAny</font> <font color=Red>::</font> <font color=Red>[</font>Where<font color=Red>]</font> <font color=Red>-&gt;</font> Posn <font color=Red>-&gt;</font> String <font color=Red>-&gt;</font> <font color=Red>[</font>Token<font color=Red>]</font>-<a name="line-227"></a><font color=Blue>xmlAny</font>  <font color=Cyan>(</font>InTag t<font color=Red><b>:</b></font><font color=Green><u>_</u></font><font color=Cyan>)</font>  p [] <font color=Red>=</font> lexerror <font color=Cyan>(</font><font color=Magenta>"unexpected EOF within "</font><font color=Cyan>++</font>t<font color=Cyan>)</font> p-<a name="line-228"></a><font color=Blue>xmlAny</font>          <font color=Green><u>_</u></font>    p [] <font color=Red>=</font> []-<a name="line-229"></a><font color=Blue>xmlAny</font> w p s<font color=Red>@</font><font color=Cyan>(</font><font color=Magenta>'&lt;'</font><font color=Red><b>:</b></font>ss<font color=Cyan>)</font>-<a name="line-230"></a>    <font color=Red>|</font> <font color=Magenta>"?"</font>   <font color=Cyan>`prefixes`</font> ss <font color=Red>=</font> emit TokPIOpen p<font color=Red><b>:</b></font>-<a name="line-231"></a>                                         skip <font color=Magenta>2</font> p s <font color=Cyan>(</font>xmlPI <font color=Cyan>(</font>InTag <font color=Magenta>"&lt;?...?&gt;"</font><font color=Red><b>:</b></font>w<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-232"></a>    <font color=Red>|</font> <font color=Magenta>"!--"</font> <font color=Cyan>`prefixes`</font> ss <font color=Red>=</font> emit TokCommentOpen p<font color=Red><b>:</b></font> skip <font color=Magenta>4</font> p s <font color=Cyan>(</font>xmlComment w<font color=Cyan>)</font>-<a name="line-233"></a>    <font color=Red>|</font> <font color=Magenta>"!["</font>  <font color=Cyan>`prefixes`</font> ss <font color=Red>=</font> emit TokSectionOpen p<font color=Red><b>:</b></font> skip <font color=Magenta>3</font> p s <font color=Cyan>(</font>xmlSection w<font color=Cyan>)</font>-<a name="line-234"></a>    <font color=Red>|</font> <font color=Magenta>"!"</font>   <font color=Cyan>`prefixes`</font> ss <font color=Red>=</font> emit TokSpecialOpen p<font color=Red><b>:</b></font>-<a name="line-235"></a>                                     skip <font color=Magenta>2</font> p s <font color=Cyan>(</font>xmlSpecial <font color=Cyan>(</font>InTag <font color=Magenta>"&lt;!...&gt;"</font><font color=Red><b>:</b></font>w<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-236"></a>    <font color=Red>|</font> <font color=Magenta>"/"</font>   <font color=Cyan>`prefixes`</font> ss <font color=Red>=</font> emit TokEndOpen p<font color=Red><b>:</b></font> -<a name="line-237"></a>                                    skip <font color=Magenta>2</font> p s <font color=Cyan>(</font>xmlTag <font color=Cyan>(</font>InTag <font color=Magenta>"&lt;/...&gt;"</font><font color=Red><b>:</b></font>tail w<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-238"></a>    <font color=Red>|</font> otherwise           <font color=Red>=</font> emit TokAnyOpen p<font color=Red><b>:</b></font>-<a name="line-239"></a>                                 skip <font color=Magenta>1</font> p s <font color=Cyan>(</font>xmlTag <font color=Cyan>(</font>InTag <font color=Magenta>"&lt;...&gt;"</font><font color=Red><b>:</b></font>NotInTag<font color=Red><b>:</b></font>w<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-240"></a><font color=Blue>xmlAny</font> <font color=Cyan>(</font><font color=Green><u>_</u></font><font color=Red><b>:</b></font><font color=Green><u>_</u></font><font color=Red><b>:</b></font>w<font color=Cyan>)</font> p s<font color=Red>@</font><font color=Cyan>(</font><font color=Magenta>'/'</font><font color=Red><b>:</b></font>ss<font color=Cyan>)</font>-<a name="line-241"></a>    <font color=Red>|</font> <font color=Magenta>"&gt;"</font>   <font color=Cyan>`prefixes`</font> ss <font color=Red>=</font> emit TokEndClose p<font color=Red><b>:</b></font> skip <font color=Magenta>2</font> p s <font color=Cyan>(</font>xmlAny w<font color=Cyan>)</font>-<a name="line-242"></a><font color=Blue>xmlAny</font> w p <font color=Cyan>(</font><font color=Magenta>'&amp;'</font><font color=Red><b>:</b></font>ss<font color=Cyan>)</font> <font color=Red>=</font> emit TokAmp p<font color=Red><b>:</b></font>      textUntil <font color=Magenta>";"</font> TokSemi <font color=Magenta>""</font> p-<a name="line-243"></a>                                                     <font color=Cyan>(</font>addcol <font color=Magenta>1</font> p<font color=Cyan>)</font> ss <font color=Cyan>(</font>xmlAny w<font color=Cyan>)</font>-<a name="line-244"></a><font color=Blue>xmlAny</font> w<font color=Red>@</font><font color=Cyan>(</font>NotInTag<font color=Red><b>:</b></font><font color=Green><u>_</u></font><font color=Cyan>)</font> p s <font color=Red>=</font> xmlContent <font color=Magenta>""</font> w p p s-<a name="line-245"></a><font color=Blue>-- everything below here is implicitly InTag.</font>-<a name="line-246"></a><font color=Blue>xmlAny</font> w p <font color=Cyan>(</font><font color=Magenta>'&gt;'</font><font color=Red><b>:</b></font>ss<font color=Cyan>)</font> <font color=Red>=</font> emit TokAnyClose p<font color=Red><b>:</b></font> xmlAny <font color=Cyan>(</font>tail w<font color=Cyan>)</font> <font color=Cyan>(</font>addcol <font color=Magenta>1</font> p<font color=Cyan>)</font> ss-<a name="line-247"></a><font color=Blue>xmlAny</font> w p <font color=Cyan>(</font><font color=Magenta>'['</font><font color=Red><b>:</b></font>ss<font color=Cyan>)</font> <font color=Red>=</font> emit TokSqOpen p<font color=Red><b>:</b></font>-<a name="line-248"></a>                                 blank xmlAny <font color=Cyan>(</font>InTag <font color=Magenta>"[...]"</font><font color=Red><b>:</b></font>w<font color=Cyan>)</font> <font color=Cyan>(</font>addcol <font color=Magenta>1</font> p<font color=Cyan>)</font> ss-<a name="line-249"></a><font color=Blue>xmlAny</font> w p <font color=Cyan>(</font><font color=Magenta>']'</font><font color=Red><b>:</b></font>ss<font color=Cyan>)</font>-<a name="line-250"></a>    <font color=Red>|</font> <font color=Magenta>"]&gt;"</font> <font color=Cyan>`prefixes`</font> ss  <font color=Red>=</font>-<a name="line-251"></a>                 emit TokSectionClose p<font color=Red><b>:</b></font>  skip <font color=Magenta>3</font> p <font color=Cyan>(</font><font color=Magenta>']'</font><font color=Red><b>:</b></font>ss<font color=Cyan>)</font> <font color=Cyan>(</font>xmlAny <font color=Cyan>(</font>tail w<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-252"></a>    <font color=Red>|</font> otherwise  <font color=Red>=</font>    emit TokSqClose p<font color=Red><b>:</b></font>  blank xmlAny <font color=Cyan>(</font>tail w<font color=Cyan>)</font> <font color=Cyan>(</font>addcol <font color=Magenta>1</font> p<font color=Cyan>)</font> ss-<a name="line-253"></a><font color=Blue>xmlAny</font> w p <font color=Cyan>(</font><font color=Magenta>'('</font><font color=Red><b>:</b></font>ss<font color=Cyan>)</font> <font color=Red>=</font> emit TokBraOpen p<font color=Red><b>:</b></font>-<a name="line-254"></a>                                 blank xmlAny <font color=Cyan>(</font>InTag <font color=Magenta>"(...)"</font><font color=Red><b>:</b></font>w<font color=Cyan>)</font> <font color=Cyan>(</font>addcol <font color=Magenta>1</font> p<font color=Cyan>)</font> ss-<a name="line-255"></a><font color=Blue>xmlAny</font> w p <font color=Cyan>(</font><font color=Magenta>')'</font><font color=Red><b>:</b></font>ss<font color=Cyan>)</font> <font color=Red>=</font> emit TokBraClose p<font color=Red><b>:</b></font> blank xmlAny <font color=Cyan>(</font>tail w<font color=Cyan>)</font> <font color=Cyan>(</font>addcol <font color=Magenta>1</font> p<font color=Cyan>)</font> ss-<a name="line-256"></a><font color=Blue>xmlAny</font> w p <font color=Cyan>(</font><font color=Magenta>'='</font><font color=Red><b>:</b></font>ss<font color=Cyan>)</font> <font color=Red>=</font> emit TokEqual p<font color=Red><b>:</b></font>    blank xmlAny w <font color=Cyan>(</font>addcol <font color=Magenta>1</font> p<font color=Cyan>)</font> ss-<a name="line-257"></a><font color=Blue>xmlAny</font> w p <font color=Cyan>(</font><font color=Magenta>'*'</font><font color=Red><b>:</b></font>ss<font color=Cyan>)</font> <font color=Red>=</font> emit TokStar p<font color=Red><b>:</b></font>     blank xmlAny w <font color=Cyan>(</font>addcol <font color=Magenta>1</font> p<font color=Cyan>)</font> ss-<a name="line-258"></a><font color=Blue>xmlAny</font> w p <font color=Cyan>(</font><font color=Magenta>'+'</font><font color=Red><b>:</b></font>ss<font color=Cyan>)</font> <font color=Red>=</font> emit TokPlus p<font color=Red><b>:</b></font>     blank xmlAny w <font color=Cyan>(</font>addcol <font color=Magenta>1</font> p<font color=Cyan>)</font> ss-<a name="line-259"></a><font color=Blue>xmlAny</font> w p <font color=Cyan>(</font><font color=Magenta>'?'</font><font color=Red><b>:</b></font>ss<font color=Cyan>)</font> <font color=Red>=</font> emit TokQuery p<font color=Red><b>:</b></font>    blank xmlAny w <font color=Cyan>(</font>addcol <font color=Magenta>1</font> p<font color=Cyan>)</font> ss-<a name="line-260"></a><font color=Blue>xmlAny</font> w p <font color=Cyan>(</font><font color=Magenta>'|'</font><font color=Red><b>:</b></font>ss<font color=Cyan>)</font> <font color=Red>=</font> emit TokPipe p<font color=Red><b>:</b></font>     blank xmlAny w <font color=Cyan>(</font>addcol <font color=Magenta>1</font> p<font color=Cyan>)</font> ss-<a name="line-261"></a><font color=Blue>xmlAny</font> w p <font color=Cyan>(</font><font color=Magenta>'%'</font><font color=Red><b>:</b></font>ss<font color=Cyan>)</font> <font color=Red>=</font> emit TokPercent p<font color=Red><b>:</b></font>  blank xmlAny w <font color=Cyan>(</font>addcol <font color=Magenta>1</font> p<font color=Cyan>)</font> ss-<a name="line-262"></a><font color=Blue>xmlAny</font> w p <font color=Cyan>(</font><font color=Magenta>';'</font><font color=Red><b>:</b></font>ss<font color=Cyan>)</font> <font color=Red>=</font> emit TokSemi p<font color=Red><b>:</b></font>     blank xmlAny w <font color=Cyan>(</font>addcol <font color=Magenta>1</font> p<font color=Cyan>)</font> ss-<a name="line-263"></a><font color=Blue>xmlAny</font> w p <font color=Cyan>(</font><font color=Magenta>','</font><font color=Red><b>:</b></font>ss<font color=Cyan>)</font> <font color=Red>=</font> emit TokComma p<font color=Red><b>:</b></font>    blank xmlAny w <font color=Cyan>(</font>addcol <font color=Magenta>1</font> p<font color=Cyan>)</font> ss-<a name="line-264"></a><font color=Blue>xmlAny</font> w p <font color=Cyan>(</font><font color=Magenta>'#'</font><font color=Red><b>:</b></font>ss<font color=Cyan>)</font> <font color=Red>=</font> emit TokHash p<font color=Red><b>:</b></font>     blank xmlAny w <font color=Cyan>(</font>addcol <font color=Magenta>1</font> p<font color=Cyan>)</font> ss-<a name="line-265"></a><font color=Blue>xmlAny</font> w p <font color=Cyan>(</font><font color=Magenta>'"'</font><font color=Red><b>:</b></font>ss<font color=Cyan>)</font> <font color=Red>=</font> emit TokQuote p<font color=Red><b>:</b></font>    textOrRefUntil <font color=Magenta>"\""</font> TokQuote <font color=Magenta>""</font> p1-<a name="line-266"></a>                                                          p1 ss <font color=Cyan>(</font>xmlAny w<font color=Cyan>)</font>-<a name="line-267"></a>                                             <font color=Green><u>where</u></font> p1 <font color=Red>=</font> addcol <font color=Magenta>1</font> p-<a name="line-268"></a><font color=Blue>xmlAny</font> w p <font color=Cyan>(</font><font color=Magenta>'\''</font><font color=Red><b>:</b></font>ss<font color=Cyan>)</font> <font color=Red>=</font> emit TokQuote p<font color=Red><b>:</b></font>   textOrRefUntil <font color=Magenta>"'"</font> TokQuote <font color=Magenta>""</font> p1-<a name="line-269"></a>                                                          p1 ss <font color=Cyan>(</font>xmlAny w<font color=Cyan>)</font>-<a name="line-270"></a>                                             <font color=Green><u>where</u></font> p1 <font color=Red>=</font> addcol <font color=Magenta>1</font> p-<a name="line-271"></a><font color=Blue>xmlAny</font> w p s-<a name="line-272"></a>    <font color=Red>|</font> isSpace <font color=Cyan>(</font>head s<font color=Cyan>)</font>     <font color=Red>=</font> blank xmlAny w p s-<a name="line-273"></a>    <font color=Red>|</font> isAlphaNum <font color=Cyan>(</font>head s<font color=Cyan>)</font> <font color=Cyan>||</font> <font color=Cyan>(</font>head s<font color=Cyan>)</font><font color=Cyan>`elem`</font><font color=Magenta>":_"</font>-<a name="line-274"></a>                           <font color=Red>=</font> xmlName p s <font color=Magenta>"some kind of name"</font> <font color=Cyan>(</font>blank xmlAny w<font color=Cyan>)</font>-<a name="line-275"></a>    <font color=Red>|</font> otherwise            <font color=Red>=</font> lexerror <font color=Cyan>(</font><font color=Magenta>"unrecognised token: "</font><font color=Cyan>++</font>take <font color=Magenta>4</font> s<font color=Cyan>)</font> p-<a name="line-276"></a>-<a name="line-277"></a><a name="xmlTag"></a><font color=Blue>xmlTag</font> w p s <font color=Red>=</font> xmlName p s <font color=Magenta>"tagname for element in &lt; &gt;"</font> <font color=Cyan>(</font>blank xmlAny w<font color=Cyan>)</font>-<a name="line-278"></a>-<a name="line-279"></a><a name="xmlSection"></a><font color=Blue>xmlSection</font> <font color=Red>=</font> blank xmlSection0-<a name="line-280"></a>  <font color=Green><u>where</u></font>-<a name="line-281"></a>    xmlSection0 w p s-<a name="line-282"></a>      <font color=Red>|</font> <font color=Magenta>"CDATA["</font>   <font color=Cyan>`prefixes`</font> s  <font color=Red>=</font> emit <font color=Cyan>(</font>TokSection CDATAx<font color=Cyan>)</font> p<font color=Red><b>:</b></font>  accum w p s <font color=Magenta>6</font>-<a name="line-283"></a>      <font color=Red>|</font> <font color=Magenta>"INCLUDE"</font>  <font color=Cyan>`prefixes`</font> s  <font color=Red>=</font> emit <font color=Cyan>(</font>TokSection INCLUDEx<font color=Cyan>)</font> p<font color=Red><b>:</b></font>    k w p s <font color=Magenta>7</font>-<a name="line-284"></a>      <font color=Red>|</font> <font color=Magenta>"IGNORE"</font>   <font color=Cyan>`prefixes`</font> s  <font color=Red>=</font> emit <font color=Cyan>(</font>TokSection IGNOREx<font color=Cyan>)</font> p<font color=Red><b>:</b></font>     k w p s <font color=Magenta>6</font>-<a name="line-285"></a>      <font color=Red>|</font> <font color=Magenta>"%"</font>        <font color=Cyan>`prefixes`</font> s  <font color=Red>=</font> emit TokPercent p<font color=Red><b>:</b></font>               k w p s <font color=Magenta>1</font>-<a name="line-286"></a>      <font color=Red>|</font> otherwise <font color=Red>=</font> lexerror <font color=Cyan>(</font><font color=Magenta>"expected CDATA, IGNORE, or INCLUDE, but got "</font>-<a name="line-287"></a>                             <font color=Cyan>++</font>take <font color=Magenta>7</font> s<font color=Cyan>)</font> p-<a name="line-288"></a>    accum w p s n <font color=Red>=</font>-<a name="line-289"></a>      <font color=Green><u>let</u></font> p0 <font color=Red>=</font> addcol n p <font color=Green><u>in</u></font>-<a name="line-290"></a>      textUntil <font color=Magenta>"]]&gt;"</font> TokSectionClose <font color=Magenta>""</font> p0 p0 <font color=Cyan>(</font>drop n s<font color=Cyan>)</font> <font color=Cyan>(</font>blank xmlAny w<font color=Cyan>)</font>-<a name="line-291"></a>    k w p s n <font color=Red>=</font>-<a name="line-292"></a>      skip n p s <font color=Cyan>(</font>xmlAny <font color=Cyan>(</font><font color=Blue>{-InTag "&lt;![section[ ... ]]&gt;": -}</font>w<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-293"></a>-<a name="line-294"></a><a name="xmlSpecial"></a><font color=Blue>xmlSpecial</font> w p s-<a name="line-295"></a>    <font color=Red>|</font> <font color=Magenta>"DOCTYPE"</font>  <font color=Cyan>`prefixes`</font> s <font color=Red>=</font> emit <font color=Cyan>(</font>TokSpecial DOCTYPEx<font color=Cyan>)</font>  p<font color=Red><b>:</b></font> k <font color=Magenta>7</font>-<a name="line-296"></a>    <font color=Red>|</font> <font color=Magenta>"ELEMENT"</font>  <font color=Cyan>`prefixes`</font> s <font color=Red>=</font> emit <font color=Cyan>(</font>TokSpecial ELEMENTx<font color=Cyan>)</font>  p<font color=Red><b>:</b></font> k <font color=Magenta>7</font>-<a name="line-297"></a>    <font color=Red>|</font> <font color=Magenta>"ATTLIST"</font>  <font color=Cyan>`prefixes`</font> s <font color=Red>=</font> emit <font color=Cyan>(</font>TokSpecial ATTLISTx<font color=Cyan>)</font>  p<font color=Red><b>:</b></font> k <font color=Magenta>7</font>-<a name="line-298"></a>    <font color=Red>|</font> <font color=Magenta>"ENTITY"</font>   <font color=Cyan>`prefixes`</font> s <font color=Red>=</font> emit <font color=Cyan>(</font>TokSpecial ENTITYx<font color=Cyan>)</font>   p<font color=Red><b>:</b></font> k <font color=Magenta>6</font>-<a name="line-299"></a>    <font color=Red>|</font> <font color=Magenta>"NOTATION"</font> <font color=Cyan>`prefixes`</font> s <font color=Red>=</font> emit <font color=Cyan>(</font>TokSpecial NOTATIONx<font color=Cyan>)</font> p<font color=Red><b>:</b></font> k <font color=Magenta>8</font>-<a name="line-300"></a>    <font color=Red>|</font> otherwise <font color=Red>=</font> lexerror-<a name="line-301"></a>                    <font color=Cyan>(</font><font color=Magenta>"expected DOCTYPE, ELEMENT, ENTITY, ATTLIST, or NOTATION,"</font>-<a name="line-302"></a>                    <font color=Cyan>++</font><font color=Magenta>" but got "</font><font color=Cyan>++</font>take <font color=Magenta>7</font> s<font color=Cyan>)</font> p-<a name="line-303"></a>  <font color=Green><u>where</u></font> k n <font color=Red>=</font> skip n p s <font color=Cyan>(</font>blank xmlAny w<font color=Cyan>)</font>-<a name="line-304"></a>-<a name="line-305"></a><a name="xmlName"></a><font color=Blue>xmlName</font> p <font color=Cyan>(</font>s<font color=Red><b>:</b></font>ss<font color=Cyan>)</font> cxt k-<a name="line-306"></a>    <font color=Red>|</font> isAlphaNum s <font color=Cyan>||</font> s<font color=Cyan>==</font><font color=Magenta>':'</font> <font color=Cyan>||</font> s<font color=Cyan>==</font><font color=Magenta>'_'</font>  <font color=Red>=</font> gatherName <font color=Cyan>(</font>s<font color=Red><b>:</b></font>[]<font color=Cyan>)</font> p <font color=Cyan>(</font>addcol <font color=Magenta>1</font> p<font color=Cyan>)</font> ss k-<a name="line-307"></a>    <font color=Red>|</font> otherwise   <font color=Red>=</font> lexerror <font color=Cyan>(</font><font color=Magenta>"expected a "</font><font color=Cyan>++</font>cxt<font color=Cyan>++</font><font color=Magenta>", but got char "</font><font color=Cyan>++</font>show s<font color=Cyan>)</font> p-<a name="line-308"></a>  <font color=Green><u>where</u></font>-<a name="line-309"></a>    gatherName acc pos p [] k <font color=Red>=</font>-<a name="line-310"></a>        emit <font color=Cyan>(</font>TokName <font color=Cyan>(</font>reverse acc<font color=Cyan>)</font><font color=Cyan>)</font> pos<font color=Red><b>:</b></font> k p []-<a name="line-311"></a>    <font color=Blue>--  lexerror ("unexpected EOF in name at "++show pos) p</font>-<a name="line-312"></a>    gatherName acc pos p <font color=Cyan>(</font>s<font color=Red><b>:</b></font>ss<font color=Cyan>)</font> k-<a name="line-313"></a>        <font color=Red>|</font> isAlphaNum s <font color=Cyan>||</font> s <font color=Cyan>`elem`</font> <font color=Magenta>".-_:"</font>-<a name="line-314"></a>                      <font color=Red>=</font> gatherName <font color=Cyan>(</font>s<font color=Red><b>:</b></font>acc<font color=Cyan>)</font> pos <font color=Cyan>(</font>addcol <font color=Magenta>1</font> p<font color=Cyan>)</font> ss k-<a name="line-315"></a>        <font color=Red>|</font> otherwise   <font color=Red>=</font> emit <font color=Cyan>(</font>TokName <font color=Cyan>(</font>reverse acc<font color=Cyan>)</font><font color=Cyan>)</font> pos<font color=Red><b>:</b></font> k p <font color=Cyan>(</font>s<font color=Red><b>:</b></font>ss<font color=Cyan>)</font>-<a name="line-316"></a><font color=Blue>xmlName</font> p [] cxt k <font color=Red>=</font> lexerror <font color=Cyan>(</font><font color=Magenta>"expected a "</font><font color=Cyan>++</font>cxt<font color=Cyan>++</font><font color=Magenta>", but got end of input"</font><font color=Cyan>)</font> p-<a name="line-317"></a>-<a name="line-318"></a><a name="xmlContent"></a><font color=Blue>xmlContent</font> acc w pos p [] <font color=Red>=</font> <font color=Green><u>if</u></font> all isSpace acc <font color=Green><u>then</u></font> []-<a name="line-319"></a>                            <font color=Green><u>else</u></font> lexerror <font color=Magenta>"unexpected EOF between tags"</font> p-<a name="line-320"></a><font color=Blue>xmlContent</font> acc w pos p <font color=Cyan>(</font>s<font color=Red><b>:</b></font>ss<font color=Cyan>)</font>-<a name="line-321"></a>    <font color=Red>|</font> elem s <font color=Magenta>"&lt;&amp;"</font>    <font color=Red>=</font> <font color=Blue>{- if all isSpace acc then xmlAny w p (s:ss) else -}</font>-<a name="line-322"></a>                       emit <font color=Cyan>(</font>TokFreeText <font color=Cyan>(</font>reverse acc<font color=Cyan>)</font><font color=Cyan>)</font> pos<font color=Red><b>:</b></font> xmlAny w p <font color=Cyan>(</font>s<font color=Red><b>:</b></font>ss<font color=Cyan>)</font>-<a name="line-323"></a>    <font color=Red>|</font> isSpace s      <font color=Red>=</font> xmlContent <font color=Cyan>(</font>s<font color=Red><b>:</b></font>acc<font color=Cyan>)</font> w pos <font color=Cyan>(</font>white s p<font color=Cyan>)</font> ss-<a name="line-324"></a>    <font color=Red>|</font> otherwise      <font color=Red>=</font> xmlContent <font color=Cyan>(</font>s<font color=Red><b>:</b></font>acc<font color=Cyan>)</font> w pos <font color=Cyan>(</font>addcol <font color=Magenta>1</font> p<font color=Cyan>)</font> ss-<a name="line-325"></a>-<a name="line-326"></a>-<a name="line-327"></a>-<a name="line-328"></a><font color=Blue>--ident :: (String-&gt;TokenT) -&gt;</font>-<a name="line-329"></a><font color=Blue>--          Posn -&gt; String -&gt; [String] -&gt;</font>-<a name="line-330"></a><font color=Blue>--         (Posn-&gt;String-&gt;[String]-&gt;[Token]) -&gt; [Token]</font>-<a name="line-331"></a><font color=Blue>--ident tok p s ss k =</font>-<a name="line-332"></a><font color=Blue>--    let (name,s0) = span (\c-&gt; isAlphaNum c || c `elem` "`-_#.'/\\") s</font>-<a name="line-333"></a><font color=Blue>--    in emit (tok name) p: skip (length name) p s ss k</font>-</pre>-</body>-</html>
− docs/HaXml/src/Text/XML/HaXml/OneOfN.html
@@ -1,673 +0,0 @@-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">-<html>-<head>-<!-- Generated by HsColour, http://www.cs.york.ac.uk/fp/darcs/hscolour/ -->-<title>src/Text/XML/HaXml/OneOfN.hs</title>-</head>-<body>-<pre><a name="line-1"></a><font color=Green><u>module</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>OneOfN <font color=Green><u>where</u></font>-<a name="line-2"></a>-<a name="line-3"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>XmlContent-<a name="line-4"></a>-<a name="line-5"></a><a name="OneOf2"></a><font color=Green><u>data</u></font> OneOf2 a b-<a name="line-6"></a>    <font color=Red>=</font> OneOf2 a <font color=Red>|</font> TwoOf2 b-<a name="line-7"></a>    <font color=Green><u>deriving</u></font> <font color=Cyan>(</font>Eq<font color=Cyan>,</font>Show<font color=Cyan>)</font>-<a name="line-8"></a>-<a name="line-9"></a><font color=Green><u>instance</u></font> <font color=Cyan>(</font>HTypeable a<font color=Cyan>,</font>HTypeable b<font color=Cyan>)</font>-<a name="line-10"></a>    <font color=Red>=&gt;</font> HTypeable <font color=Cyan>(</font>OneOf2 a b<font color=Cyan>)</font>-<a name="line-11"></a>  <font color=Green><u>where</u></font>      toHType <font color=Green><u>_</u></font> <font color=Red>=</font> Defined <font color=Magenta>"OneOf2"</font> [] []-<a name="line-12"></a>  <font color=Blue>--         toHType m = Defined "OneOf2" [a,b] []</font>-<a name="line-13"></a>  <font color=Blue>--            where a = toHType $ (\ (OneOf2 a)-&gt;a) $ m</font>-<a name="line-14"></a>  <font color=Blue>--                  b = toHType $ (\ (TwoOf2 b)-&gt;b) $ m</font>-<a name="line-15"></a>-<a name="line-16"></a>-<a name="line-17"></a><font color=Green><u>instance</u></font> <font color=Cyan>(</font>XmlContent a<font color=Cyan>,</font>XmlContent b<font color=Cyan>)</font>-<a name="line-18"></a>    <font color=Red>=&gt;</font> XmlContent <font color=Cyan>(</font>OneOf2 a b<font color=Cyan>)</font>-<a name="line-19"></a>  <font color=Green><u>where</u></font>-<a name="line-20"></a>    parseContents <font color=Red>=</font>-<a name="line-21"></a>        <font color=Cyan>(</font>choice OneOf2 <font color=Cyan>$</font> choice TwoOf2-<a name="line-22"></a>        <font color=Cyan>$</font> fail <font color=Magenta>"OneOf2"</font><font color=Cyan>)</font>-<a name="line-23"></a>    toContents <font color=Cyan>(</font>OneOf2 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-24"></a>    toContents <font color=Cyan>(</font>TwoOf2 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-25"></a>-<a name="line-26"></a><a name="OneOf3"></a><font color=Blue>----</font>-<a name="line-27"></a><a name="OneOf3"></a><font color=Green><u>data</u></font> OneOf3 a b c-<a name="line-28"></a>    <font color=Red>=</font> OneOf3 a <font color=Red>|</font> TwoOf3 b <font color=Red>|</font> ThreeOf3 c-<a name="line-29"></a>    <font color=Green><u>deriving</u></font> <font color=Cyan>(</font>Eq<font color=Cyan>,</font>Show<font color=Cyan>)</font>-<a name="line-30"></a>-<a name="line-31"></a><font color=Green><u>instance</u></font> <font color=Cyan>(</font>HTypeable a<font color=Cyan>,</font>HTypeable b<font color=Cyan>,</font>HTypeable c<font color=Cyan>)</font>-<a name="line-32"></a>    <font color=Red>=&gt;</font> HTypeable <font color=Cyan>(</font>OneOf3 a b c<font color=Cyan>)</font>-<a name="line-33"></a>  <font color=Green><u>where</u></font>      toHType <font color=Green><u>_</u></font> <font color=Red>=</font> Defined <font color=Magenta>"OneOf3"</font> [] []-<a name="line-34"></a>-<a name="line-35"></a><font color=Green><u>instance</u></font> <font color=Cyan>(</font>XmlContent a<font color=Cyan>,</font>XmlContent b<font color=Cyan>,</font>XmlContent c<font color=Cyan>)</font>-<a name="line-36"></a>    <font color=Red>=&gt;</font> XmlContent <font color=Cyan>(</font>OneOf3 a b c<font color=Cyan>)</font>-<a name="line-37"></a>  <font color=Green><u>where</u></font>-<a name="line-38"></a>    parseContents <font color=Red>=</font>-<a name="line-39"></a>        <font color=Cyan>(</font>choice OneOf3 <font color=Cyan>$</font> choice TwoOf3 <font color=Cyan>$</font> choice ThreeOf3-<a name="line-40"></a>        <font color=Cyan>$</font> fail <font color=Magenta>"OneOf3"</font><font color=Cyan>)</font>-<a name="line-41"></a>    toContents <font color=Cyan>(</font>OneOf3 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-42"></a>    toContents <font color=Cyan>(</font>TwoOf3 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-43"></a>    toContents <font color=Cyan>(</font>ThreeOf3 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-44"></a>-<a name="line-45"></a><a name="OneOf4"></a><font color=Blue>----</font>-<a name="line-46"></a><a name="OneOf4"></a><font color=Green><u>data</u></font> OneOf4 a b c d-<a name="line-47"></a>    <font color=Red>=</font> OneOf4 a <font color=Red>|</font> TwoOf4 b <font color=Red>|</font> ThreeOf4 c <font color=Red>|</font> FourOf4 d-<a name="line-48"></a>    <font color=Green><u>deriving</u></font> <font color=Cyan>(</font>Eq<font color=Cyan>,</font>Show<font color=Cyan>)</font>-<a name="line-49"></a>-<a name="line-50"></a><font color=Green><u>instance</u></font> <font color=Cyan>(</font>HTypeable a<font color=Cyan>,</font>HTypeable b<font color=Cyan>,</font>HTypeable c<font color=Cyan>,</font>HTypeable d<font color=Cyan>)</font>-<a name="line-51"></a>    <font color=Red>=&gt;</font> HTypeable <font color=Cyan>(</font>OneOf4 a b c d<font color=Cyan>)</font>-<a name="line-52"></a>  <font color=Green><u>where</u></font>      toHType <font color=Green><u>_</u></font> <font color=Red>=</font> Defined <font color=Magenta>"OneOf4"</font> [] []-<a name="line-53"></a>-<a name="line-54"></a><font color=Green><u>instance</u></font> <font color=Cyan>(</font>XmlContent a<font color=Cyan>,</font>XmlContent b<font color=Cyan>,</font>XmlContent c<font color=Cyan>,</font>XmlContent d<font color=Cyan>)</font>-<a name="line-55"></a>    <font color=Red>=&gt;</font> XmlContent <font color=Cyan>(</font>OneOf4 a b c d<font color=Cyan>)</font>-<a name="line-56"></a>  <font color=Green><u>where</u></font>-<a name="line-57"></a>    parseContents <font color=Red>=</font>-<a name="line-58"></a>        <font color=Cyan>(</font>choice OneOf4 <font color=Cyan>$</font> choice TwoOf4 <font color=Cyan>$</font> choice ThreeOf4 <font color=Cyan>$</font> choice FourOf4-<a name="line-59"></a>        <font color=Cyan>$</font> fail <font color=Magenta>"OneOf4"</font><font color=Cyan>)</font>-<a name="line-60"></a>    toContents <font color=Cyan>(</font>OneOf4 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-61"></a>    toContents <font color=Cyan>(</font>TwoOf4 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-62"></a>    toContents <font color=Cyan>(</font>ThreeOf4 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-63"></a>    toContents <font color=Cyan>(</font>FourOf4 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-64"></a>-<a name="line-65"></a><a name="OneOf5"></a><font color=Blue>----</font>-<a name="line-66"></a><a name="OneOf5"></a><font color=Green><u>data</u></font> OneOf5 a b c d e-<a name="line-67"></a>    <font color=Red>=</font> OneOf5 a <font color=Red>|</font> TwoOf5 b <font color=Red>|</font> ThreeOf5 c <font color=Red>|</font> FourOf5 d <font color=Red>|</font> FiveOf5 e-<a name="line-68"></a>    <font color=Green><u>deriving</u></font> <font color=Cyan>(</font>Eq<font color=Cyan>,</font>Show<font color=Cyan>)</font>-<a name="line-69"></a>-<a name="line-70"></a><font color=Green><u>instance</u></font> <font color=Cyan>(</font>HTypeable a<font color=Cyan>,</font>HTypeable b<font color=Cyan>,</font>HTypeable c<font color=Cyan>,</font>HTypeable d<font color=Cyan>,</font>HTypeable e<font color=Cyan>)</font>-<a name="line-71"></a>    <font color=Red>=&gt;</font> HTypeable <font color=Cyan>(</font>OneOf5 a b c d e<font color=Cyan>)</font>-<a name="line-72"></a>  <font color=Green><u>where</u></font>      toHType <font color=Green><u>_</u></font> <font color=Red>=</font> Defined <font color=Magenta>"OneOf5"</font> [] []-<a name="line-73"></a>-<a name="line-74"></a><font color=Green><u>instance</u></font> <font color=Cyan>(</font>XmlContent a<font color=Cyan>,</font>XmlContent b<font color=Cyan>,</font>XmlContent c<font color=Cyan>,</font>XmlContent d<font color=Cyan>,</font>XmlContent e<font color=Cyan>)</font>-<a name="line-75"></a>    <font color=Red>=&gt;</font> XmlContent <font color=Cyan>(</font>OneOf5 a b c d e<font color=Cyan>)</font>-<a name="line-76"></a>  <font color=Green><u>where</u></font>-<a name="line-77"></a>    parseContents <font color=Red>=</font>-<a name="line-78"></a>        <font color=Cyan>(</font>choice OneOf5 <font color=Cyan>$</font> choice TwoOf5 <font color=Cyan>$</font> choice ThreeOf5 <font color=Cyan>$</font> choice FourOf5-<a name="line-79"></a>        <font color=Cyan>$</font> choice FiveOf5-<a name="line-80"></a>        <font color=Cyan>$</font> fail <font color=Magenta>"OneOf5"</font><font color=Cyan>)</font>-<a name="line-81"></a>    toContents <font color=Cyan>(</font>OneOf5 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-82"></a>    toContents <font color=Cyan>(</font>TwoOf5 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-83"></a>    toContents <font color=Cyan>(</font>ThreeOf5 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-84"></a>    toContents <font color=Cyan>(</font>FourOf5 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-85"></a>    toContents <font color=Cyan>(</font>FiveOf5 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-86"></a>-<a name="line-87"></a><a name="OneOf6"></a><font color=Blue>----</font>-<a name="line-88"></a><a name="OneOf6"></a><font color=Green><u>data</u></font> OneOf6 a b c d e f-<a name="line-89"></a>    <font color=Red>=</font> OneOf6 a <font color=Red>|</font> TwoOf6 b <font color=Red>|</font> ThreeOf6 c <font color=Red>|</font> FourOf6 d <font color=Red>|</font> FiveOf6 e <font color=Red>|</font> SixOf6 f-<a name="line-90"></a>    <font color=Green><u>deriving</u></font> <font color=Cyan>(</font>Eq<font color=Cyan>,</font>Show<font color=Cyan>)</font>-<a name="line-91"></a>-<a name="line-92"></a><font color=Green><u>instance</u></font> <font color=Cyan>(</font>HTypeable a<font color=Cyan>,</font>HTypeable b<font color=Cyan>,</font>HTypeable c<font color=Cyan>,</font>HTypeable d<font color=Cyan>,</font>HTypeable e-<a name="line-93"></a>          <font color=Cyan>,</font>HTypeable f<font color=Cyan>)</font>-<a name="line-94"></a>    <font color=Red>=&gt;</font> HTypeable <font color=Cyan>(</font>OneOf6 a b c d e f<font color=Cyan>)</font>-<a name="line-95"></a>  <font color=Green><u>where</u></font>      toHType <font color=Green><u>_</u></font> <font color=Red>=</font> Defined <font color=Magenta>"OneOf6"</font> [] []-<a name="line-96"></a>-<a name="line-97"></a><font color=Green><u>instance</u></font> <font color=Cyan>(</font>XmlContent a<font color=Cyan>,</font>XmlContent b<font color=Cyan>,</font>XmlContent c<font color=Cyan>,</font>XmlContent d<font color=Cyan>,</font>XmlContent e-<a name="line-98"></a>          <font color=Cyan>,</font>XmlContent f<font color=Cyan>)</font>-<a name="line-99"></a>    <font color=Red>=&gt;</font> XmlContent <font color=Cyan>(</font>OneOf6 a b c d e f<font color=Cyan>)</font>-<a name="line-100"></a>  <font color=Green><u>where</u></font>-<a name="line-101"></a>    parseContents <font color=Red>=</font>-<a name="line-102"></a>        <font color=Cyan>(</font>choice OneOf6 <font color=Cyan>$</font> choice TwoOf6 <font color=Cyan>$</font> choice ThreeOf6 <font color=Cyan>$</font> choice FourOf6-<a name="line-103"></a>        <font color=Cyan>$</font> choice FiveOf6 <font color=Cyan>$</font> choice SixOf6-<a name="line-104"></a>        <font color=Cyan>$</font> fail <font color=Magenta>"OneOf6"</font><font color=Cyan>)</font>-<a name="line-105"></a>    toContents <font color=Cyan>(</font>OneOf6 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-106"></a>    toContents <font color=Cyan>(</font>TwoOf6 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-107"></a>    toContents <font color=Cyan>(</font>ThreeOf6 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-108"></a>    toContents <font color=Cyan>(</font>FourOf6 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-109"></a>    toContents <font color=Cyan>(</font>FiveOf6 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-110"></a>    toContents <font color=Cyan>(</font>SixOf6 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-111"></a>-<a name="line-112"></a><a name="OneOf7"></a><font color=Blue>----</font>-<a name="line-113"></a><a name="OneOf7"></a><font color=Green><u>data</u></font> OneOf7 a b c d e f g-<a name="line-114"></a>    <font color=Red>=</font> OneOf7 a <font color=Red>|</font> TwoOf7 b <font color=Red>|</font> ThreeOf7 c <font color=Red>|</font> FourOf7 d <font color=Red>|</font> FiveOf7 e <font color=Red>|</font> SixOf7 f-<a name="line-115"></a>    <font color=Red>|</font> SevenOf7 g-<a name="line-116"></a>    <font color=Green><u>deriving</u></font> <font color=Cyan>(</font>Eq<font color=Cyan>,</font>Show<font color=Cyan>)</font>-<a name="line-117"></a>-<a name="line-118"></a><font color=Green><u>instance</u></font> <font color=Cyan>(</font>HTypeable a<font color=Cyan>,</font>HTypeable b<font color=Cyan>,</font>HTypeable c<font color=Cyan>,</font>HTypeable d<font color=Cyan>,</font>HTypeable e-<a name="line-119"></a>          <font color=Cyan>,</font>HTypeable f<font color=Cyan>,</font>HTypeable g<font color=Cyan>)</font>-<a name="line-120"></a>    <font color=Red>=&gt;</font> HTypeable <font color=Cyan>(</font>OneOf7 a b c d e f g<font color=Cyan>)</font>-<a name="line-121"></a>  <font color=Green><u>where</u></font>      toHType <font color=Green><u>_</u></font> <font color=Red>=</font> Defined <font color=Magenta>"OneOf7"</font> [] []-<a name="line-122"></a>-<a name="line-123"></a><font color=Green><u>instance</u></font> <font color=Cyan>(</font>XmlContent a<font color=Cyan>,</font>XmlContent b<font color=Cyan>,</font>XmlContent c<font color=Cyan>,</font>XmlContent d<font color=Cyan>,</font>XmlContent e-<a name="line-124"></a>          <font color=Cyan>,</font>XmlContent f<font color=Cyan>,</font>XmlContent g<font color=Cyan>)</font>-<a name="line-125"></a>    <font color=Red>=&gt;</font> XmlContent <font color=Cyan>(</font>OneOf7 a b c d e f g<font color=Cyan>)</font>-<a name="line-126"></a>  <font color=Green><u>where</u></font>-<a name="line-127"></a>    parseContents <font color=Red>=</font>-<a name="line-128"></a>        <font color=Cyan>(</font>choice OneOf7 <font color=Cyan>$</font> choice TwoOf7 <font color=Cyan>$</font> choice ThreeOf7 <font color=Cyan>$</font> choice FourOf7-<a name="line-129"></a>        <font color=Cyan>$</font> choice FiveOf7 <font color=Cyan>$</font> choice SixOf7 <font color=Cyan>$</font> choice SevenOf7-<a name="line-130"></a>        <font color=Cyan>$</font> fail <font color=Magenta>"OneOf7"</font><font color=Cyan>)</font>-<a name="line-131"></a>    toContents <font color=Cyan>(</font>OneOf7 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-132"></a>    toContents <font color=Cyan>(</font>TwoOf7 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-133"></a>    toContents <font color=Cyan>(</font>ThreeOf7 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-134"></a>    toContents <font color=Cyan>(</font>FourOf7 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-135"></a>    toContents <font color=Cyan>(</font>FiveOf7 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-136"></a>    toContents <font color=Cyan>(</font>SixOf7 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-137"></a>    toContents <font color=Cyan>(</font>SevenOf7 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-138"></a>-<a name="line-139"></a><a name="OneOf8"></a><font color=Blue>----</font>-<a name="line-140"></a><a name="OneOf8"></a><font color=Green><u>data</u></font> OneOf8 a b c d e f g h-<a name="line-141"></a>    <font color=Red>=</font> OneOf8 a <font color=Red>|</font> TwoOf8 b <font color=Red>|</font> ThreeOf8 c <font color=Red>|</font> FourOf8 d <font color=Red>|</font> FiveOf8 e <font color=Red>|</font> SixOf8 f-<a name="line-142"></a>    <font color=Red>|</font> SevenOf8 g <font color=Red>|</font> EightOf8 h-<a name="line-143"></a>    <font color=Green><u>deriving</u></font> <font color=Cyan>(</font>Eq<font color=Cyan>,</font>Show<font color=Cyan>)</font>-<a name="line-144"></a>-<a name="line-145"></a><font color=Green><u>instance</u></font> <font color=Cyan>(</font>HTypeable a<font color=Cyan>,</font>HTypeable b<font color=Cyan>,</font>HTypeable c<font color=Cyan>,</font>HTypeable d<font color=Cyan>,</font>HTypeable e-<a name="line-146"></a>          <font color=Cyan>,</font>HTypeable f<font color=Cyan>,</font>HTypeable g<font color=Cyan>,</font>HTypeable h<font color=Cyan>)</font>-<a name="line-147"></a>    <font color=Red>=&gt;</font> HTypeable <font color=Cyan>(</font>OneOf8 a b c d e f g h<font color=Cyan>)</font>-<a name="line-148"></a>  <font color=Green><u>where</u></font>      toHType <font color=Green><u>_</u></font> <font color=Red>=</font> Defined <font color=Magenta>"OneOf8"</font> [] []-<a name="line-149"></a>-<a name="line-150"></a><font color=Green><u>instance</u></font> <font color=Cyan>(</font>XmlContent a<font color=Cyan>,</font>XmlContent b<font color=Cyan>,</font>XmlContent c<font color=Cyan>,</font>XmlContent d<font color=Cyan>,</font>XmlContent e-<a name="line-151"></a>          <font color=Cyan>,</font>XmlContent f<font color=Cyan>,</font>XmlContent g<font color=Cyan>,</font>XmlContent h<font color=Cyan>)</font>-<a name="line-152"></a>    <font color=Red>=&gt;</font> XmlContent <font color=Cyan>(</font>OneOf8 a b c d e f g h<font color=Cyan>)</font>-<a name="line-153"></a>  <font color=Green><u>where</u></font>-<a name="line-154"></a>    parseContents <font color=Red>=</font>-<a name="line-155"></a>        <font color=Cyan>(</font>choice OneOf8 <font color=Cyan>$</font> choice TwoOf8 <font color=Cyan>$</font> choice ThreeOf8 <font color=Cyan>$</font> choice FourOf8-<a name="line-156"></a>        <font color=Cyan>$</font> choice FiveOf8 <font color=Cyan>$</font> choice SixOf8 <font color=Cyan>$</font> choice SevenOf8 <font color=Cyan>$</font> choice EightOf8-<a name="line-157"></a>        <font color=Cyan>$</font> fail <font color=Magenta>"OneOf8"</font><font color=Cyan>)</font>-<a name="line-158"></a>    toContents <font color=Cyan>(</font>OneOf8 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-159"></a>    toContents <font color=Cyan>(</font>TwoOf8 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-160"></a>    toContents <font color=Cyan>(</font>ThreeOf8 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-161"></a>    toContents <font color=Cyan>(</font>FourOf8 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-162"></a>    toContents <font color=Cyan>(</font>FiveOf8 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-163"></a>    toContents <font color=Cyan>(</font>SixOf8 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-164"></a>    toContents <font color=Cyan>(</font>SevenOf8 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-165"></a>    toContents <font color=Cyan>(</font>EightOf8 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-166"></a>-<a name="line-167"></a><a name="OneOf9"></a><font color=Blue>----</font>-<a name="line-168"></a><a name="OneOf9"></a><font color=Green><u>data</u></font> OneOf9 a b c d e f g h i-<a name="line-169"></a>    <font color=Red>=</font> OneOf9 a <font color=Red>|</font> TwoOf9 b <font color=Red>|</font> ThreeOf9 c <font color=Red>|</font> FourOf9 d <font color=Red>|</font> FiveOf9 e <font color=Red>|</font> SixOf9 f-<a name="line-170"></a>    <font color=Red>|</font> SevenOf9 g <font color=Red>|</font> EightOf9 h <font color=Red>|</font> NineOf9 i-<a name="line-171"></a>    <font color=Green><u>deriving</u></font> <font color=Cyan>(</font>Eq<font color=Cyan>,</font>Show<font color=Cyan>)</font>-<a name="line-172"></a>-<a name="line-173"></a><font color=Green><u>instance</u></font> <font color=Cyan>(</font>HTypeable a<font color=Cyan>,</font>HTypeable b<font color=Cyan>,</font>HTypeable c<font color=Cyan>,</font>HTypeable d<font color=Cyan>,</font>HTypeable e-<a name="line-174"></a>          <font color=Cyan>,</font>HTypeable f<font color=Cyan>,</font>HTypeable g<font color=Cyan>,</font>HTypeable h<font color=Cyan>,</font>HTypeable i<font color=Cyan>)</font>-<a name="line-175"></a>    <font color=Red>=&gt;</font> HTypeable <font color=Cyan>(</font>OneOf9 a b c d e f g h i<font color=Cyan>)</font>-<a name="line-176"></a>  <font color=Green><u>where</u></font>      toHType <font color=Green><u>_</u></font> <font color=Red>=</font> Defined <font color=Magenta>"OneOf9"</font> [] []-<a name="line-177"></a>-<a name="line-178"></a><font color=Green><u>instance</u></font> <font color=Cyan>(</font>XmlContent a<font color=Cyan>,</font>XmlContent b<font color=Cyan>,</font>XmlContent c<font color=Cyan>,</font>XmlContent d<font color=Cyan>,</font>XmlContent e-<a name="line-179"></a>          <font color=Cyan>,</font>XmlContent f<font color=Cyan>,</font>XmlContent g<font color=Cyan>,</font>XmlContent h<font color=Cyan>,</font>XmlContent i<font color=Cyan>)</font>-<a name="line-180"></a>    <font color=Red>=&gt;</font> XmlContent <font color=Cyan>(</font>OneOf9 a b c d e f g h i<font color=Cyan>)</font>-<a name="line-181"></a>  <font color=Green><u>where</u></font>-<a name="line-182"></a>    parseContents <font color=Red>=</font>-<a name="line-183"></a>        <font color=Cyan>(</font>choice OneOf9 <font color=Cyan>$</font> choice TwoOf9 <font color=Cyan>$</font> choice ThreeOf9 <font color=Cyan>$</font> choice FourOf9-<a name="line-184"></a>        <font color=Cyan>$</font> choice FiveOf9 <font color=Cyan>$</font> choice SixOf9 <font color=Cyan>$</font> choice SevenOf9 <font color=Cyan>$</font> choice EightOf9-<a name="line-185"></a>        <font color=Cyan>$</font> choice NineOf9-<a name="line-186"></a>        <font color=Cyan>$</font> fail <font color=Magenta>"OneOf9"</font><font color=Cyan>)</font>-<a name="line-187"></a>    toContents <font color=Cyan>(</font>OneOf9 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-188"></a>    toContents <font color=Cyan>(</font>TwoOf9 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-189"></a>    toContents <font color=Cyan>(</font>ThreeOf9 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-190"></a>    toContents <font color=Cyan>(</font>FourOf9 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-191"></a>    toContents <font color=Cyan>(</font>FiveOf9 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-192"></a>    toContents <font color=Cyan>(</font>SixOf9 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-193"></a>    toContents <font color=Cyan>(</font>SevenOf9 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-194"></a>    toContents <font color=Cyan>(</font>EightOf9 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-195"></a>    toContents <font color=Cyan>(</font>NineOf9 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-196"></a>-<a name="line-197"></a><a name="OneOf10"></a><font color=Blue>----</font>-<a name="line-198"></a><a name="OneOf10"></a><font color=Green><u>data</u></font> OneOf10 a b c d e f g h i j-<a name="line-199"></a>    <font color=Red>=</font> OneOf10 a <font color=Red>|</font> TwoOf10 b <font color=Red>|</font> ThreeOf10 c <font color=Red>|</font> FourOf10 d <font color=Red>|</font> FiveOf10 e-<a name="line-200"></a>    <font color=Red>|</font> SixOf10 f <font color=Red>|</font> SevenOf10 g <font color=Red>|</font> EightOf10 h <font color=Red>|</font> NineOf10 i <font color=Red>|</font> TenOf10 j-<a name="line-201"></a>    <font color=Green><u>deriving</u></font> <font color=Cyan>(</font>Eq<font color=Cyan>,</font>Show<font color=Cyan>)</font>-<a name="line-202"></a>-<a name="line-203"></a><font color=Green><u>instance</u></font> <font color=Cyan>(</font>HTypeable a<font color=Cyan>,</font>HTypeable b<font color=Cyan>,</font>HTypeable c<font color=Cyan>,</font>HTypeable d<font color=Cyan>,</font>HTypeable e-<a name="line-204"></a>          <font color=Cyan>,</font>HTypeable f<font color=Cyan>,</font>HTypeable g<font color=Cyan>,</font>HTypeable h<font color=Cyan>,</font>HTypeable i<font color=Cyan>,</font>HTypeable j<font color=Cyan>)</font>-<a name="line-205"></a>    <font color=Red>=&gt;</font> HTypeable <font color=Cyan>(</font>OneOf10 a b c d e f g h i j<font color=Cyan>)</font>-<a name="line-206"></a>  <font color=Green><u>where</u></font>      toHType <font color=Green><u>_</u></font> <font color=Red>=</font> Defined <font color=Magenta>"OneOf10"</font> [] []-<a name="line-207"></a>-<a name="line-208"></a><font color=Green><u>instance</u></font> <font color=Cyan>(</font>XmlContent a<font color=Cyan>,</font>XmlContent b<font color=Cyan>,</font>XmlContent c<font color=Cyan>,</font>XmlContent d<font color=Cyan>,</font>XmlContent e-<a name="line-209"></a>          <font color=Cyan>,</font>XmlContent f<font color=Cyan>,</font>XmlContent g<font color=Cyan>,</font>XmlContent h<font color=Cyan>,</font>XmlContent i<font color=Cyan>,</font>XmlContent j<font color=Cyan>)</font>-<a name="line-210"></a>    <font color=Red>=&gt;</font> XmlContent <font color=Cyan>(</font>OneOf10 a b c d e f g h i j<font color=Cyan>)</font>-<a name="line-211"></a>  <font color=Green><u>where</u></font>-<a name="line-212"></a>    parseContents <font color=Red>=</font>-<a name="line-213"></a>        <font color=Cyan>(</font>choice OneOf10 <font color=Cyan>$</font> choice TwoOf10 <font color=Cyan>$</font> choice ThreeOf10 <font color=Cyan>$</font> choice FourOf10-<a name="line-214"></a>        <font color=Cyan>$</font> choice FiveOf10 <font color=Cyan>$</font> choice SixOf10 <font color=Cyan>$</font> choice SevenOf10-<a name="line-215"></a>        <font color=Cyan>$</font> choice EightOf10 <font color=Cyan>$</font> choice NineOf10 <font color=Cyan>$</font> choice TenOf10-<a name="line-216"></a>        <font color=Cyan>$</font> fail <font color=Magenta>"OneOf10"</font><font color=Cyan>)</font>-<a name="line-217"></a>    toContents <font color=Cyan>(</font>OneOf10 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-218"></a>    toContents <font color=Cyan>(</font>TwoOf10 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-219"></a>    toContents <font color=Cyan>(</font>ThreeOf10 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-220"></a>    toContents <font color=Cyan>(</font>FourOf10 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-221"></a>    toContents <font color=Cyan>(</font>FiveOf10 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-222"></a>    toContents <font color=Cyan>(</font>SixOf10 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-223"></a>    toContents <font color=Cyan>(</font>SevenOf10 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-224"></a>    toContents <font color=Cyan>(</font>EightOf10 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-225"></a>    toContents <font color=Cyan>(</font>NineOf10 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-226"></a>    toContents <font color=Cyan>(</font>TenOf10 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-227"></a>-<a name="line-228"></a><a name="OneOf11"></a><font color=Blue>----</font>-<a name="line-229"></a><a name="OneOf11"></a><font color=Green><u>data</u></font> OneOf11 a b c d e f g h i j k-<a name="line-230"></a>    <font color=Red>=</font> OneOf11 a <font color=Red>|</font> TwoOf11 b <font color=Red>|</font> ThreeOf11 c <font color=Red>|</font> FourOf11 d <font color=Red>|</font> FiveOf11 e-<a name="line-231"></a>    <font color=Red>|</font> SixOf11 f <font color=Red>|</font> SevenOf11 g <font color=Red>|</font> EightOf11 h <font color=Red>|</font> NineOf11 i <font color=Red>|</font> TenOf11 j-<a name="line-232"></a>    <font color=Red>|</font> ElevenOf11 k-<a name="line-233"></a>    <font color=Green><u>deriving</u></font> <font color=Cyan>(</font>Eq<font color=Cyan>,</font>Show<font color=Cyan>)</font>-<a name="line-234"></a>-<a name="line-235"></a><font color=Green><u>instance</u></font> <font color=Cyan>(</font>HTypeable a<font color=Cyan>,</font>HTypeable b<font color=Cyan>,</font>HTypeable c<font color=Cyan>,</font>HTypeable d<font color=Cyan>,</font>HTypeable e-<a name="line-236"></a>          <font color=Cyan>,</font>HTypeable f<font color=Cyan>,</font>HTypeable g<font color=Cyan>,</font>HTypeable h<font color=Cyan>,</font>HTypeable i<font color=Cyan>,</font>HTypeable j-<a name="line-237"></a>          <font color=Cyan>,</font>HTypeable k<font color=Cyan>)</font>-<a name="line-238"></a>    <font color=Red>=&gt;</font> HTypeable <font color=Cyan>(</font>OneOf11 a b c d e f g h i j k<font color=Cyan>)</font>-<a name="line-239"></a>  <font color=Green><u>where</u></font>      toHType <font color=Green><u>_</u></font> <font color=Red>=</font> Defined <font color=Magenta>"OneOf11"</font> [] []-<a name="line-240"></a>-<a name="line-241"></a><font color=Green><u>instance</u></font> <font color=Cyan>(</font>XmlContent a<font color=Cyan>,</font>XmlContent b<font color=Cyan>,</font>XmlContent c<font color=Cyan>,</font>XmlContent d<font color=Cyan>,</font>XmlContent e-<a name="line-242"></a>          <font color=Cyan>,</font>XmlContent f<font color=Cyan>,</font>XmlContent g<font color=Cyan>,</font>XmlContent h<font color=Cyan>,</font>XmlContent i<font color=Cyan>,</font>XmlContent j-<a name="line-243"></a>          <font color=Cyan>,</font>XmlContent k<font color=Cyan>)</font>-<a name="line-244"></a>    <font color=Red>=&gt;</font> XmlContent <font color=Cyan>(</font>OneOf11 a b c d e f g h i j k<font color=Cyan>)</font>-<a name="line-245"></a>  <font color=Green><u>where</u></font>-<a name="line-246"></a>    parseContents <font color=Red>=</font>-<a name="line-247"></a>        <font color=Cyan>(</font>choice OneOf11 <font color=Cyan>$</font> choice TwoOf11 <font color=Cyan>$</font> choice ThreeOf11 <font color=Cyan>$</font> choice FourOf11-<a name="line-248"></a>        <font color=Cyan>$</font> choice FiveOf11 <font color=Cyan>$</font> choice SixOf11 <font color=Cyan>$</font> choice SevenOf11-<a name="line-249"></a>        <font color=Cyan>$</font> choice EightOf11 <font color=Cyan>$</font> choice NineOf11 <font color=Cyan>$</font> choice TenOf11-<a name="line-250"></a>        <font color=Cyan>$</font> choice ElevenOf11-<a name="line-251"></a>        <font color=Cyan>$</font> fail <font color=Magenta>"OneOf11"</font><font color=Cyan>)</font>-<a name="line-252"></a>    toContents <font color=Cyan>(</font>OneOf11 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-253"></a>    toContents <font color=Cyan>(</font>TwoOf11 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-254"></a>    toContents <font color=Cyan>(</font>ThreeOf11 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-255"></a>    toContents <font color=Cyan>(</font>FourOf11 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-256"></a>    toContents <font color=Cyan>(</font>FiveOf11 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-257"></a>    toContents <font color=Cyan>(</font>SixOf11 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-258"></a>    toContents <font color=Cyan>(</font>SevenOf11 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-259"></a>    toContents <font color=Cyan>(</font>EightOf11 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-260"></a>    toContents <font color=Cyan>(</font>NineOf11 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-261"></a>    toContents <font color=Cyan>(</font>TenOf11 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-262"></a>    toContents <font color=Cyan>(</font>ElevenOf11 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-263"></a>-<a name="line-264"></a><a name="OneOf12"></a><font color=Blue>----</font>-<a name="line-265"></a><a name="OneOf12"></a><font color=Green><u>data</u></font> OneOf12 a b c d e f g h i j k l-<a name="line-266"></a>    <font color=Red>=</font> OneOf12 a <font color=Red>|</font> TwoOf12 b <font color=Red>|</font> ThreeOf12 c <font color=Red>|</font> FourOf12 d <font color=Red>|</font> FiveOf12 e-<a name="line-267"></a>    <font color=Red>|</font> SixOf12 f <font color=Red>|</font> SevenOf12 g <font color=Red>|</font> EightOf12 h <font color=Red>|</font> NineOf12 i <font color=Red>|</font> TenOf12 j-<a name="line-268"></a>    <font color=Red>|</font> ElevenOf12 k <font color=Red>|</font> TwelveOf12 l-<a name="line-269"></a>    <font color=Green><u>deriving</u></font> <font color=Cyan>(</font>Eq<font color=Cyan>,</font>Show<font color=Cyan>)</font>-<a name="line-270"></a>-<a name="line-271"></a><font color=Green><u>instance</u></font> <font color=Cyan>(</font>HTypeable a<font color=Cyan>,</font>HTypeable b<font color=Cyan>,</font>HTypeable c<font color=Cyan>,</font>HTypeable d<font color=Cyan>,</font>HTypeable e-<a name="line-272"></a>          <font color=Cyan>,</font>HTypeable f<font color=Cyan>,</font>HTypeable g<font color=Cyan>,</font>HTypeable h<font color=Cyan>,</font>HTypeable i<font color=Cyan>,</font>HTypeable j-<a name="line-273"></a>          <font color=Cyan>,</font>HTypeable k<font color=Cyan>,</font>HTypeable l<font color=Cyan>)</font>-<a name="line-274"></a>    <font color=Red>=&gt;</font> HTypeable <font color=Cyan>(</font>OneOf12 a b c d e f g h i j k l<font color=Cyan>)</font>-<a name="line-275"></a>  <font color=Green><u>where</u></font>      toHType <font color=Green><u>_</u></font> <font color=Red>=</font> Defined <font color=Magenta>"OneOf12"</font> [] []-<a name="line-276"></a>-<a name="line-277"></a><font color=Green><u>instance</u></font> <font color=Cyan>(</font>XmlContent a<font color=Cyan>,</font>XmlContent b<font color=Cyan>,</font>XmlContent c<font color=Cyan>,</font>XmlContent d<font color=Cyan>,</font>XmlContent e-<a name="line-278"></a>          <font color=Cyan>,</font>XmlContent f<font color=Cyan>,</font>XmlContent g<font color=Cyan>,</font>XmlContent h<font color=Cyan>,</font>XmlContent i<font color=Cyan>,</font>XmlContent j-<a name="line-279"></a>          <font color=Cyan>,</font>XmlContent k<font color=Cyan>,</font>XmlContent l<font color=Cyan>)</font>-<a name="line-280"></a>    <font color=Red>=&gt;</font> XmlContent <font color=Cyan>(</font>OneOf12 a b c d e f g h i j k l<font color=Cyan>)</font>-<a name="line-281"></a>  <font color=Green><u>where</u></font>-<a name="line-282"></a>    parseContents <font color=Red>=</font>-<a name="line-283"></a>        <font color=Cyan>(</font>choice OneOf12 <font color=Cyan>$</font> choice TwoOf12 <font color=Cyan>$</font> choice ThreeOf12 <font color=Cyan>$</font> choice FourOf12-<a name="line-284"></a>        <font color=Cyan>$</font> choice FiveOf12 <font color=Cyan>$</font> choice SixOf12 <font color=Cyan>$</font> choice SevenOf12-<a name="line-285"></a>        <font color=Cyan>$</font> choice EightOf12 <font color=Cyan>$</font> choice NineOf12 <font color=Cyan>$</font> choice TenOf12-<a name="line-286"></a>        <font color=Cyan>$</font> choice ElevenOf12 <font color=Cyan>$</font> choice TwelveOf12-<a name="line-287"></a>        <font color=Cyan>$</font> fail <font color=Magenta>"OneOf12"</font><font color=Cyan>)</font>-<a name="line-288"></a>    toContents <font color=Cyan>(</font>OneOf12 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-289"></a>    toContents <font color=Cyan>(</font>TwoOf12 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-290"></a>    toContents <font color=Cyan>(</font>ThreeOf12 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-291"></a>    toContents <font color=Cyan>(</font>FourOf12 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-292"></a>    toContents <font color=Cyan>(</font>FiveOf12 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-293"></a>    toContents <font color=Cyan>(</font>SixOf12 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-294"></a>    toContents <font color=Cyan>(</font>SevenOf12 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-295"></a>    toContents <font color=Cyan>(</font>EightOf12 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-296"></a>    toContents <font color=Cyan>(</font>NineOf12 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-297"></a>    toContents <font color=Cyan>(</font>TenOf12 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-298"></a>    toContents <font color=Cyan>(</font>ElevenOf12 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-299"></a>    toContents <font color=Cyan>(</font>TwelveOf12 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-300"></a>-<a name="line-301"></a><a name="OneOf13"></a><font color=Blue>----</font>-<a name="line-302"></a><a name="OneOf13"></a><font color=Green><u>data</u></font> OneOf13 a b c d e f g h i j k l m-<a name="line-303"></a>    <font color=Red>=</font> OneOf13 a <font color=Red>|</font> TwoOf13 b <font color=Red>|</font> ThreeOf13 c <font color=Red>|</font> FourOf13 d <font color=Red>|</font> FiveOf13 e-<a name="line-304"></a>    <font color=Red>|</font> SixOf13 f <font color=Red>|</font> SevenOf13 g <font color=Red>|</font> EightOf13 h <font color=Red>|</font> NineOf13 i <font color=Red>|</font> TenOf13 j-<a name="line-305"></a>    <font color=Red>|</font> ElevenOf13 k <font color=Red>|</font> TwelveOf13 l <font color=Red>|</font> ThirteenOf13 m-<a name="line-306"></a>    <font color=Green><u>deriving</u></font> <font color=Cyan>(</font>Eq<font color=Cyan>,</font>Show<font color=Cyan>)</font>-<a name="line-307"></a>-<a name="line-308"></a><font color=Green><u>instance</u></font> <font color=Cyan>(</font>HTypeable a<font color=Cyan>,</font>HTypeable b<font color=Cyan>,</font>HTypeable c<font color=Cyan>,</font>HTypeable d<font color=Cyan>,</font>HTypeable e-<a name="line-309"></a>          <font color=Cyan>,</font>HTypeable f<font color=Cyan>,</font>HTypeable g<font color=Cyan>,</font>HTypeable h<font color=Cyan>,</font>HTypeable i<font color=Cyan>,</font>HTypeable j-<a name="line-310"></a>          <font color=Cyan>,</font>HTypeable k<font color=Cyan>,</font>HTypeable l<font color=Cyan>,</font>HTypeable m<font color=Cyan>)</font>-<a name="line-311"></a>    <font color=Red>=&gt;</font> HTypeable <font color=Cyan>(</font>OneOf13 a b c d e f g h i j k l m<font color=Cyan>)</font>-<a name="line-312"></a>  <font color=Green><u>where</u></font>      toHType <font color=Green><u>_</u></font> <font color=Red>=</font> Defined <font color=Magenta>"OneOf13"</font> [] []-<a name="line-313"></a>-<a name="line-314"></a><font color=Green><u>instance</u></font> <font color=Cyan>(</font>XmlContent a<font color=Cyan>,</font>XmlContent b<font color=Cyan>,</font>XmlContent c<font color=Cyan>,</font>XmlContent d<font color=Cyan>,</font>XmlContent e-<a name="line-315"></a>          <font color=Cyan>,</font>XmlContent f<font color=Cyan>,</font>XmlContent g<font color=Cyan>,</font>XmlContent h<font color=Cyan>,</font>XmlContent i<font color=Cyan>,</font>XmlContent j-<a name="line-316"></a>          <font color=Cyan>,</font>XmlContent k<font color=Cyan>,</font>XmlContent l<font color=Cyan>,</font>XmlContent m<font color=Cyan>)</font>-<a name="line-317"></a>    <font color=Red>=&gt;</font> XmlContent <font color=Cyan>(</font>OneOf13 a b c d e f g h i j k l m<font color=Cyan>)</font>-<a name="line-318"></a>  <font color=Green><u>where</u></font>-<a name="line-319"></a>    parseContents <font color=Red>=</font>-<a name="line-320"></a>        <font color=Cyan>(</font>choice OneOf13 <font color=Cyan>$</font> choice TwoOf13 <font color=Cyan>$</font> choice ThreeOf13 <font color=Cyan>$</font> choice FourOf13-<a name="line-321"></a>        <font color=Cyan>$</font> choice FiveOf13 <font color=Cyan>$</font> choice SixOf13 <font color=Cyan>$</font> choice SevenOf13-<a name="line-322"></a>        <font color=Cyan>$</font> choice EightOf13 <font color=Cyan>$</font> choice NineOf13 <font color=Cyan>$</font> choice TenOf13-<a name="line-323"></a>        <font color=Cyan>$</font> choice ElevenOf13 <font color=Cyan>$</font> choice TwelveOf13 <font color=Cyan>$</font> choice ThirteenOf13-<a name="line-324"></a>        <font color=Cyan>$</font> fail <font color=Magenta>"OneOf13"</font><font color=Cyan>)</font>-<a name="line-325"></a>    toContents <font color=Cyan>(</font>OneOf13 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-326"></a>    toContents <font color=Cyan>(</font>TwoOf13 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-327"></a>    toContents <font color=Cyan>(</font>ThreeOf13 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-328"></a>    toContents <font color=Cyan>(</font>FourOf13 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-329"></a>    toContents <font color=Cyan>(</font>FiveOf13 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-330"></a>    toContents <font color=Cyan>(</font>SixOf13 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-331"></a>    toContents <font color=Cyan>(</font>SevenOf13 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-332"></a>    toContents <font color=Cyan>(</font>EightOf13 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-333"></a>    toContents <font color=Cyan>(</font>NineOf13 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-334"></a>    toContents <font color=Cyan>(</font>TenOf13 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-335"></a>    toContents <font color=Cyan>(</font>ElevenOf13 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-336"></a>    toContents <font color=Cyan>(</font>TwelveOf13 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-337"></a>    toContents <font color=Cyan>(</font>ThirteenOf13 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-338"></a>-<a name="line-339"></a><a name="OneOf14"></a><font color=Blue>----</font>-<a name="line-340"></a><a name="OneOf14"></a><font color=Green><u>data</u></font> OneOf14 a b c d e f g h i j k l m n-<a name="line-341"></a>    <font color=Red>=</font> OneOf14 a <font color=Red>|</font> TwoOf14 b <font color=Red>|</font> ThreeOf14 c <font color=Red>|</font> FourOf14 d <font color=Red>|</font> FiveOf14 e-<a name="line-342"></a>    <font color=Red>|</font> SixOf14 f <font color=Red>|</font> SevenOf14 g <font color=Red>|</font> EightOf14 h <font color=Red>|</font> NineOf14 i <font color=Red>|</font> TenOf14 j-<a name="line-343"></a>    <font color=Red>|</font> ElevenOf14 k <font color=Red>|</font> TwelveOf14 l <font color=Red>|</font> ThirteenOf14 m <font color=Red>|</font> FourteenOf14 n-<a name="line-344"></a>    <font color=Green><u>deriving</u></font> <font color=Cyan>(</font>Eq<font color=Cyan>,</font>Show<font color=Cyan>)</font>-<a name="line-345"></a>-<a name="line-346"></a><font color=Green><u>instance</u></font> <font color=Cyan>(</font>HTypeable a<font color=Cyan>,</font>HTypeable b<font color=Cyan>,</font>HTypeable c<font color=Cyan>,</font>HTypeable d<font color=Cyan>,</font>HTypeable e-<a name="line-347"></a>          <font color=Cyan>,</font>HTypeable f<font color=Cyan>,</font>HTypeable g<font color=Cyan>,</font>HTypeable h<font color=Cyan>,</font>HTypeable i<font color=Cyan>,</font>HTypeable j-<a name="line-348"></a>          <font color=Cyan>,</font>HTypeable k<font color=Cyan>,</font>HTypeable l<font color=Cyan>,</font>HTypeable m<font color=Cyan>,</font>HTypeable n<font color=Cyan>)</font>-<a name="line-349"></a>    <font color=Red>=&gt;</font> HTypeable <font color=Cyan>(</font>OneOf14 a b c d e f g h i j k l m n<font color=Cyan>)</font>-<a name="line-350"></a>  <font color=Green><u>where</u></font>      toHType <font color=Green><u>_</u></font> <font color=Red>=</font> Defined <font color=Magenta>"OneOf14"</font> [] []-<a name="line-351"></a>-<a name="line-352"></a><font color=Green><u>instance</u></font> <font color=Cyan>(</font>XmlContent a<font color=Cyan>,</font>XmlContent b<font color=Cyan>,</font>XmlContent c<font color=Cyan>,</font>XmlContent d<font color=Cyan>,</font>XmlContent e-<a name="line-353"></a>          <font color=Cyan>,</font>XmlContent f<font color=Cyan>,</font>XmlContent g<font color=Cyan>,</font>XmlContent h<font color=Cyan>,</font>XmlContent i<font color=Cyan>,</font>XmlContent j-<a name="line-354"></a>          <font color=Cyan>,</font>XmlContent k<font color=Cyan>,</font>XmlContent l<font color=Cyan>,</font>XmlContent m<font color=Cyan>,</font>XmlContent n<font color=Cyan>)</font>-<a name="line-355"></a>    <font color=Red>=&gt;</font> XmlContent <font color=Cyan>(</font>OneOf14 a b c d e f g h i j k l m n<font color=Cyan>)</font>-<a name="line-356"></a>  <font color=Green><u>where</u></font>-<a name="line-357"></a>    parseContents <font color=Red>=</font>-<a name="line-358"></a>        <font color=Cyan>(</font>choice OneOf14 <font color=Cyan>$</font> choice TwoOf14 <font color=Cyan>$</font> choice ThreeOf14 <font color=Cyan>$</font> choice FourOf14-<a name="line-359"></a>        <font color=Cyan>$</font> choice FiveOf14 <font color=Cyan>$</font> choice SixOf14 <font color=Cyan>$</font> choice SevenOf14-<a name="line-360"></a>        <font color=Cyan>$</font> choice EightOf14 <font color=Cyan>$</font> choice NineOf14 <font color=Cyan>$</font> choice TenOf14-<a name="line-361"></a>        <font color=Cyan>$</font> choice ElevenOf14 <font color=Cyan>$</font> choice TwelveOf14 <font color=Cyan>$</font> choice ThirteenOf14-<a name="line-362"></a>        <font color=Cyan>$</font> choice FourteenOf14-<a name="line-363"></a>        <font color=Cyan>$</font> fail <font color=Magenta>"OneOf14"</font><font color=Cyan>)</font>-<a name="line-364"></a>    toContents <font color=Cyan>(</font>OneOf14 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-365"></a>    toContents <font color=Cyan>(</font>TwoOf14 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-366"></a>    toContents <font color=Cyan>(</font>ThreeOf14 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-367"></a>    toContents <font color=Cyan>(</font>FourOf14 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-368"></a>    toContents <font color=Cyan>(</font>FiveOf14 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-369"></a>    toContents <font color=Cyan>(</font>SixOf14 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-370"></a>    toContents <font color=Cyan>(</font>SevenOf14 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-371"></a>    toContents <font color=Cyan>(</font>EightOf14 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-372"></a>    toContents <font color=Cyan>(</font>NineOf14 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-373"></a>    toContents <font color=Cyan>(</font>TenOf14 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-374"></a>    toContents <font color=Cyan>(</font>ElevenOf14 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-375"></a>    toContents <font color=Cyan>(</font>TwelveOf14 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-376"></a>    toContents <font color=Cyan>(</font>ThirteenOf14 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-377"></a>    toContents <font color=Cyan>(</font>FourteenOf14 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-378"></a>-<a name="line-379"></a><a name="OneOf15"></a><font color=Blue>----</font>-<a name="line-380"></a><a name="OneOf15"></a><font color=Green><u>data</u></font> OneOf15 a b c d e f g h i j k l m n o-<a name="line-381"></a>    <font color=Red>=</font> OneOf15 a <font color=Red>|</font> TwoOf15 b <font color=Red>|</font> ThreeOf15 c <font color=Red>|</font> FourOf15 d <font color=Red>|</font> FiveOf15 e-<a name="line-382"></a>    <font color=Red>|</font> SixOf15 f <font color=Red>|</font> SevenOf15 g <font color=Red>|</font> EightOf15 h <font color=Red>|</font> NineOf15 i <font color=Red>|</font> TenOf15 j-<a name="line-383"></a>    <font color=Red>|</font> ElevenOf15 k <font color=Red>|</font> TwelveOf15 l <font color=Red>|</font> ThirteenOf15 m <font color=Red>|</font> FourteenOf15 n-<a name="line-384"></a>    <font color=Red>|</font> FifteenOf15 o-<a name="line-385"></a>    <font color=Green><u>deriving</u></font> <font color=Cyan>(</font>Eq<font color=Cyan>,</font>Show<font color=Cyan>)</font>-<a name="line-386"></a>-<a name="line-387"></a><font color=Green><u>instance</u></font> <font color=Cyan>(</font>HTypeable a<font color=Cyan>,</font>HTypeable b<font color=Cyan>,</font>HTypeable c<font color=Cyan>,</font>HTypeable d<font color=Cyan>,</font>HTypeable e-<a name="line-388"></a>          <font color=Cyan>,</font>HTypeable f<font color=Cyan>,</font>HTypeable g<font color=Cyan>,</font>HTypeable h<font color=Cyan>,</font>HTypeable i<font color=Cyan>,</font>HTypeable j-<a name="line-389"></a>          <font color=Cyan>,</font>HTypeable k<font color=Cyan>,</font>HTypeable l<font color=Cyan>,</font>HTypeable m<font color=Cyan>,</font>HTypeable n<font color=Cyan>,</font>HTypeable o<font color=Cyan>)</font>-<a name="line-390"></a>    <font color=Red>=&gt;</font> HTypeable <font color=Cyan>(</font>OneOf15 a b c d e f g h i j k l m n o<font color=Cyan>)</font>-<a name="line-391"></a>  <font color=Green><u>where</u></font>      toHType <font color=Green><u>_</u></font> <font color=Red>=</font> Defined <font color=Magenta>"OneOf15"</font> [] []-<a name="line-392"></a>-<a name="line-393"></a><font color=Green><u>instance</u></font> <font color=Cyan>(</font>XmlContent a<font color=Cyan>,</font>XmlContent b<font color=Cyan>,</font>XmlContent c<font color=Cyan>,</font>XmlContent d<font color=Cyan>,</font>XmlContent e-<a name="line-394"></a>          <font color=Cyan>,</font>XmlContent f<font color=Cyan>,</font>XmlContent g<font color=Cyan>,</font>XmlContent h<font color=Cyan>,</font>XmlContent i<font color=Cyan>,</font>XmlContent j-<a name="line-395"></a>          <font color=Cyan>,</font>XmlContent k<font color=Cyan>,</font>XmlContent l<font color=Cyan>,</font>XmlContent m<font color=Cyan>,</font>XmlContent n<font color=Cyan>,</font>XmlContent o<font color=Cyan>)</font>-<a name="line-396"></a>    <font color=Red>=&gt;</font> XmlContent <font color=Cyan>(</font>OneOf15 a b c d e f g h i j k l m n o<font color=Cyan>)</font>-<a name="line-397"></a>  <font color=Green><u>where</u></font>-<a name="line-398"></a>    parseContents <font color=Red>=</font>-<a name="line-399"></a>        <font color=Cyan>(</font>choice OneOf15 <font color=Cyan>$</font> choice TwoOf15 <font color=Cyan>$</font> choice ThreeOf15 <font color=Cyan>$</font> choice FourOf15-<a name="line-400"></a>        <font color=Cyan>$</font> choice FiveOf15 <font color=Cyan>$</font> choice SixOf15 <font color=Cyan>$</font> choice SevenOf15-<a name="line-401"></a>        <font color=Cyan>$</font> choice EightOf15 <font color=Cyan>$</font> choice NineOf15 <font color=Cyan>$</font> choice TenOf15-<a name="line-402"></a>        <font color=Cyan>$</font> choice ElevenOf15 <font color=Cyan>$</font> choice TwelveOf15 <font color=Cyan>$</font> choice ThirteenOf15-<a name="line-403"></a>        <font color=Cyan>$</font> choice FourteenOf15 <font color=Cyan>$</font> choice FifteenOf15-<a name="line-404"></a>        <font color=Cyan>$</font> fail <font color=Magenta>"OneOf15"</font><font color=Cyan>)</font>-<a name="line-405"></a>    toContents <font color=Cyan>(</font>OneOf15 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-406"></a>    toContents <font color=Cyan>(</font>TwoOf15 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-407"></a>    toContents <font color=Cyan>(</font>ThreeOf15 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-408"></a>    toContents <font color=Cyan>(</font>FourOf15 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-409"></a>    toContents <font color=Cyan>(</font>FiveOf15 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-410"></a>    toContents <font color=Cyan>(</font>SixOf15 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-411"></a>    toContents <font color=Cyan>(</font>SevenOf15 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-412"></a>    toContents <font color=Cyan>(</font>EightOf15 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-413"></a>    toContents <font color=Cyan>(</font>NineOf15 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-414"></a>    toContents <font color=Cyan>(</font>TenOf15 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-415"></a>    toContents <font color=Cyan>(</font>ElevenOf15 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-416"></a>    toContents <font color=Cyan>(</font>TwelveOf15 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-417"></a>    toContents <font color=Cyan>(</font>ThirteenOf15 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-418"></a>    toContents <font color=Cyan>(</font>FourteenOf15 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-419"></a>    toContents <font color=Cyan>(</font>FifteenOf15 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-420"></a>-<a name="line-421"></a><a name="OneOf16"></a><font color=Blue>----</font>-<a name="line-422"></a><a name="OneOf16"></a><font color=Green><u>data</u></font> OneOf16 a b c d e f g h i j k l m n o p-<a name="line-423"></a>    <font color=Red>=</font> OneOf16 a <font color=Red>|</font> TwoOf16 b <font color=Red>|</font> ThreeOf16 c <font color=Red>|</font> FourOf16 d <font color=Red>|</font> FiveOf16 e-<a name="line-424"></a>    <font color=Red>|</font> SixOf16 f <font color=Red>|</font> SevenOf16 g <font color=Red>|</font> EightOf16 h <font color=Red>|</font> NineOf16 i <font color=Red>|</font> TenOf16 j-<a name="line-425"></a>    <font color=Red>|</font> ElevenOf16 k <font color=Red>|</font> TwelveOf16 l <font color=Red>|</font> ThirteenOf16 m <font color=Red>|</font> FourteenOf16 n-<a name="line-426"></a>    <font color=Red>|</font> FifteenOf16 o <font color=Red>|</font> SixteenOf16 p-<a name="line-427"></a>    <font color=Green><u>deriving</u></font> <font color=Cyan>(</font>Eq<font color=Cyan>,</font>Show<font color=Cyan>)</font>-<a name="line-428"></a>-<a name="line-429"></a><font color=Green><u>instance</u></font> <font color=Cyan>(</font>HTypeable a<font color=Cyan>,</font>HTypeable b<font color=Cyan>,</font>HTypeable c<font color=Cyan>,</font>HTypeable d<font color=Cyan>,</font>HTypeable e-<a name="line-430"></a>          <font color=Cyan>,</font>HTypeable f<font color=Cyan>,</font>HTypeable g<font color=Cyan>,</font>HTypeable h<font color=Cyan>,</font>HTypeable i<font color=Cyan>,</font>HTypeable j-<a name="line-431"></a>          <font color=Cyan>,</font>HTypeable k<font color=Cyan>,</font>HTypeable l<font color=Cyan>,</font>HTypeable m<font color=Cyan>,</font>HTypeable n<font color=Cyan>,</font>HTypeable o-<a name="line-432"></a>          <font color=Cyan>,</font>HTypeable p<font color=Cyan>)</font>-<a name="line-433"></a>    <font color=Red>=&gt;</font> HTypeable <font color=Cyan>(</font>OneOf16 a b c d e f g h i j k l m n o p<font color=Cyan>)</font>-<a name="line-434"></a>  <font color=Green><u>where</u></font>      toHType <font color=Green><u>_</u></font> <font color=Red>=</font> Defined <font color=Magenta>"OneOf16"</font> [] []-<a name="line-435"></a>-<a name="line-436"></a><font color=Green><u>instance</u></font> <font color=Cyan>(</font>XmlContent a<font color=Cyan>,</font>XmlContent b<font color=Cyan>,</font>XmlContent c<font color=Cyan>,</font>XmlContent d<font color=Cyan>,</font>XmlContent e-<a name="line-437"></a>          <font color=Cyan>,</font>XmlContent f<font color=Cyan>,</font>XmlContent g<font color=Cyan>,</font>XmlContent h<font color=Cyan>,</font>XmlContent i<font color=Cyan>,</font>XmlContent j-<a name="line-438"></a>          <font color=Cyan>,</font>XmlContent k<font color=Cyan>,</font>XmlContent l<font color=Cyan>,</font>XmlContent m<font color=Cyan>,</font>XmlContent n<font color=Cyan>,</font>XmlContent o-<a name="line-439"></a>          <font color=Cyan>,</font>XmlContent p<font color=Cyan>)</font>-<a name="line-440"></a>    <font color=Red>=&gt;</font> XmlContent <font color=Cyan>(</font>OneOf16 a b c d e f g h i j k l m n o p<font color=Cyan>)</font>-<a name="line-441"></a>  <font color=Green><u>where</u></font>-<a name="line-442"></a>    parseContents <font color=Red>=</font>-<a name="line-443"></a>        <font color=Cyan>(</font>choice OneOf16 <font color=Cyan>$</font> choice TwoOf16 <font color=Cyan>$</font> choice ThreeOf16 <font color=Cyan>$</font> choice FourOf16-<a name="line-444"></a>        <font color=Cyan>$</font> choice FiveOf16 <font color=Cyan>$</font> choice SixOf16 <font color=Cyan>$</font> choice SevenOf16-<a name="line-445"></a>        <font color=Cyan>$</font> choice EightOf16 <font color=Cyan>$</font> choice NineOf16 <font color=Cyan>$</font> choice TenOf16-<a name="line-446"></a>        <font color=Cyan>$</font> choice ElevenOf16 <font color=Cyan>$</font> choice TwelveOf16 <font color=Cyan>$</font> choice ThirteenOf16-<a name="line-447"></a>        <font color=Cyan>$</font> choice FourteenOf16 <font color=Cyan>$</font> choice FifteenOf16 <font color=Cyan>$</font> choice SixteenOf16-<a name="line-448"></a>        <font color=Cyan>$</font> fail <font color=Magenta>"OneOf16"</font><font color=Cyan>)</font>-<a name="line-449"></a>    toContents <font color=Cyan>(</font>OneOf16 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-450"></a>    toContents <font color=Cyan>(</font>TwoOf16 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-451"></a>    toContents <font color=Cyan>(</font>ThreeOf16 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-452"></a>    toContents <font color=Cyan>(</font>FourOf16 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-453"></a>    toContents <font color=Cyan>(</font>FiveOf16 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-454"></a>    toContents <font color=Cyan>(</font>SixOf16 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-455"></a>    toContents <font color=Cyan>(</font>SevenOf16 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-456"></a>    toContents <font color=Cyan>(</font>EightOf16 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-457"></a>    toContents <font color=Cyan>(</font>NineOf16 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-458"></a>    toContents <font color=Cyan>(</font>TenOf16 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-459"></a>    toContents <font color=Cyan>(</font>ElevenOf16 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-460"></a>    toContents <font color=Cyan>(</font>TwelveOf16 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-461"></a>    toContents <font color=Cyan>(</font>ThirteenOf16 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-462"></a>    toContents <font color=Cyan>(</font>FourteenOf16 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-463"></a>    toContents <font color=Cyan>(</font>FifteenOf16 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-464"></a>    toContents <font color=Cyan>(</font>SixteenOf16 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-465"></a>-<a name="line-466"></a><a name="OneOf17"></a><font color=Blue>----</font>-<a name="line-467"></a><a name="OneOf17"></a><font color=Green><u>data</u></font> OneOf17 a b c d e f g h i j k l m n o p q-<a name="line-468"></a>    <font color=Red>=</font> OneOf17 a <font color=Red>|</font> TwoOf17 b <font color=Red>|</font> ThreeOf17 c <font color=Red>|</font> FourOf17 d <font color=Red>|</font> FiveOf17 e-<a name="line-469"></a>    <font color=Red>|</font> SixOf17 f <font color=Red>|</font> SevenOf17 g <font color=Red>|</font> EightOf17 h <font color=Red>|</font> NineOf17 i <font color=Red>|</font> TenOf17 j-<a name="line-470"></a>    <font color=Red>|</font> ElevenOf17 k <font color=Red>|</font> TwelveOf17 l <font color=Red>|</font> ThirteenOf17 m <font color=Red>|</font> FourteenOf17 n-<a name="line-471"></a>    <font color=Red>|</font> FifteenOf17 o <font color=Red>|</font> SixteenOf17 p <font color=Red>|</font> SeventeenOf17 q-<a name="line-472"></a>    <font color=Green><u>deriving</u></font> <font color=Cyan>(</font>Eq<font color=Cyan>,</font>Show<font color=Cyan>)</font>-<a name="line-473"></a>-<a name="line-474"></a><font color=Green><u>instance</u></font> <font color=Cyan>(</font>HTypeable a<font color=Cyan>,</font>HTypeable b<font color=Cyan>,</font>HTypeable c<font color=Cyan>,</font>HTypeable d<font color=Cyan>,</font>HTypeable e-<a name="line-475"></a>          <font color=Cyan>,</font>HTypeable f<font color=Cyan>,</font>HTypeable g<font color=Cyan>,</font>HTypeable h<font color=Cyan>,</font>HTypeable i<font color=Cyan>,</font>HTypeable j-<a name="line-476"></a>          <font color=Cyan>,</font>HTypeable k<font color=Cyan>,</font>HTypeable l<font color=Cyan>,</font>HTypeable m<font color=Cyan>,</font>HTypeable n<font color=Cyan>,</font>HTypeable o-<a name="line-477"></a>          <font color=Cyan>,</font>HTypeable p<font color=Cyan>,</font>HTypeable q<font color=Cyan>)</font>-<a name="line-478"></a>    <font color=Red>=&gt;</font> HTypeable <font color=Cyan>(</font>OneOf17 a b c d e f g h i j k l m n o p q<font color=Cyan>)</font>-<a name="line-479"></a>  <font color=Green><u>where</u></font>      toHType <font color=Green><u>_</u></font> <font color=Red>=</font> Defined <font color=Magenta>"OneOf17"</font> [] []-<a name="line-480"></a>-<a name="line-481"></a><font color=Green><u>instance</u></font> <font color=Cyan>(</font>XmlContent a<font color=Cyan>,</font>XmlContent b<font color=Cyan>,</font>XmlContent c<font color=Cyan>,</font>XmlContent d<font color=Cyan>,</font>XmlContent e-<a name="line-482"></a>          <font color=Cyan>,</font>XmlContent f<font color=Cyan>,</font>XmlContent g<font color=Cyan>,</font>XmlContent h<font color=Cyan>,</font>XmlContent i<font color=Cyan>,</font>XmlContent j-<a name="line-483"></a>          <font color=Cyan>,</font>XmlContent k<font color=Cyan>,</font>XmlContent l<font color=Cyan>,</font>XmlContent m<font color=Cyan>,</font>XmlContent n<font color=Cyan>,</font>XmlContent o-<a name="line-484"></a>          <font color=Cyan>,</font>XmlContent p<font color=Cyan>,</font>XmlContent q<font color=Cyan>)</font>-<a name="line-485"></a>    <font color=Red>=&gt;</font> XmlContent <font color=Cyan>(</font>OneOf17 a b c d e f g h i j k l m n o p q<font color=Cyan>)</font>-<a name="line-486"></a>  <font color=Green><u>where</u></font>-<a name="line-487"></a>    parseContents <font color=Red>=</font>-<a name="line-488"></a>        <font color=Cyan>(</font>choice OneOf17 <font color=Cyan>$</font> choice TwoOf17 <font color=Cyan>$</font> choice ThreeOf17 <font color=Cyan>$</font> choice FourOf17-<a name="line-489"></a>        <font color=Cyan>$</font> choice FiveOf17 <font color=Cyan>$</font> choice SixOf17 <font color=Cyan>$</font> choice SevenOf17-<a name="line-490"></a>        <font color=Cyan>$</font> choice EightOf17 <font color=Cyan>$</font> choice NineOf17 <font color=Cyan>$</font> choice TenOf17-<a name="line-491"></a>        <font color=Cyan>$</font> choice ElevenOf17 <font color=Cyan>$</font> choice TwelveOf17 <font color=Cyan>$</font> choice ThirteenOf17-<a name="line-492"></a>        <font color=Cyan>$</font> choice FourteenOf17 <font color=Cyan>$</font> choice FifteenOf17 <font color=Cyan>$</font> choice SixteenOf17-<a name="line-493"></a>        <font color=Cyan>$</font> choice SeventeenOf17-<a name="line-494"></a>        <font color=Cyan>$</font> fail <font color=Magenta>"OneOf17"</font><font color=Cyan>)</font>-<a name="line-495"></a>    toContents <font color=Cyan>(</font>OneOf17 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-496"></a>    toContents <font color=Cyan>(</font>TwoOf17 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-497"></a>    toContents <font color=Cyan>(</font>ThreeOf17 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-498"></a>    toContents <font color=Cyan>(</font>FourOf17 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-499"></a>    toContents <font color=Cyan>(</font>FiveOf17 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-500"></a>    toContents <font color=Cyan>(</font>SixOf17 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-501"></a>    toContents <font color=Cyan>(</font>SevenOf17 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-502"></a>    toContents <font color=Cyan>(</font>EightOf17 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-503"></a>    toContents <font color=Cyan>(</font>NineOf17 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-504"></a>    toContents <font color=Cyan>(</font>TenOf17 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-505"></a>    toContents <font color=Cyan>(</font>ElevenOf17 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-506"></a>    toContents <font color=Cyan>(</font>TwelveOf17 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-507"></a>    toContents <font color=Cyan>(</font>ThirteenOf17 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-508"></a>    toContents <font color=Cyan>(</font>FourteenOf17 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-509"></a>    toContents <font color=Cyan>(</font>FifteenOf17 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-510"></a>    toContents <font color=Cyan>(</font>SixteenOf17 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-511"></a>    toContents <font color=Cyan>(</font>SeventeenOf17 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-512"></a>-<a name="line-513"></a><a name="OneOf18"></a><font color=Blue>----</font>-<a name="line-514"></a><a name="OneOf18"></a><font color=Green><u>data</u></font> OneOf18 a b c d e f g h i j k l m n o p q r-<a name="line-515"></a>    <font color=Red>=</font> OneOf18 a <font color=Red>|</font> TwoOf18 b <font color=Red>|</font> ThreeOf18 c <font color=Red>|</font> FourOf18 d <font color=Red>|</font> FiveOf18 e-<a name="line-516"></a>    <font color=Red>|</font> SixOf18 f <font color=Red>|</font> SevenOf18 g <font color=Red>|</font> EightOf18 h <font color=Red>|</font> NineOf18 i <font color=Red>|</font> TenOf18 j-<a name="line-517"></a>    <font color=Red>|</font> ElevenOf18 k <font color=Red>|</font> TwelveOf18 l <font color=Red>|</font> ThirteenOf18 m <font color=Red>|</font> FourteenOf18 n-<a name="line-518"></a>    <font color=Red>|</font> FifteenOf18 o <font color=Red>|</font> SixteenOf18 p <font color=Red>|</font> SeventeenOf18 q <font color=Red>|</font> EighteenOf18 r-<a name="line-519"></a>    <font color=Green><u>deriving</u></font> <font color=Cyan>(</font>Eq<font color=Cyan>,</font>Show<font color=Cyan>)</font>-<a name="line-520"></a>-<a name="line-521"></a><font color=Green><u>instance</u></font> <font color=Cyan>(</font>HTypeable a<font color=Cyan>,</font>HTypeable b<font color=Cyan>,</font>HTypeable c<font color=Cyan>,</font>HTypeable d<font color=Cyan>,</font>HTypeable e-<a name="line-522"></a>          <font color=Cyan>,</font>HTypeable f<font color=Cyan>,</font>HTypeable g<font color=Cyan>,</font>HTypeable h<font color=Cyan>,</font>HTypeable i<font color=Cyan>,</font>HTypeable j-<a name="line-523"></a>          <font color=Cyan>,</font>HTypeable k<font color=Cyan>,</font>HTypeable l<font color=Cyan>,</font>HTypeable m<font color=Cyan>,</font>HTypeable n<font color=Cyan>,</font>HTypeable o-<a name="line-524"></a>          <font color=Cyan>,</font>HTypeable p<font color=Cyan>,</font>HTypeable q<font color=Cyan>,</font>HTypeable r<font color=Cyan>)</font>-<a name="line-525"></a>    <font color=Red>=&gt;</font> HTypeable <font color=Cyan>(</font>OneOf18 a b c d e f g h i j k l m n o p q r<font color=Cyan>)</font>-<a name="line-526"></a>  <font color=Green><u>where</u></font>      toHType <font color=Green><u>_</u></font> <font color=Red>=</font> Defined <font color=Magenta>"OneOf18"</font> [] []-<a name="line-527"></a>-<a name="line-528"></a><font color=Green><u>instance</u></font> <font color=Cyan>(</font>XmlContent a<font color=Cyan>,</font>XmlContent b<font color=Cyan>,</font>XmlContent c<font color=Cyan>,</font>XmlContent d<font color=Cyan>,</font>XmlContent e-<a name="line-529"></a>          <font color=Cyan>,</font>XmlContent f<font color=Cyan>,</font>XmlContent g<font color=Cyan>,</font>XmlContent h<font color=Cyan>,</font>XmlContent i<font color=Cyan>,</font>XmlContent j-<a name="line-530"></a>          <font color=Cyan>,</font>XmlContent k<font color=Cyan>,</font>XmlContent l<font color=Cyan>,</font>XmlContent m<font color=Cyan>,</font>XmlContent n<font color=Cyan>,</font>XmlContent o-<a name="line-531"></a>          <font color=Cyan>,</font>XmlContent p<font color=Cyan>,</font>XmlContent q<font color=Cyan>,</font>XmlContent r<font color=Cyan>)</font>-<a name="line-532"></a>    <font color=Red>=&gt;</font> XmlContent <font color=Cyan>(</font>OneOf18 a b c d e f g h i j k l m n o p q r<font color=Cyan>)</font>-<a name="line-533"></a>  <font color=Green><u>where</u></font>-<a name="line-534"></a>    parseContents <font color=Red>=</font>-<a name="line-535"></a>        <font color=Cyan>(</font>choice OneOf18 <font color=Cyan>$</font> choice TwoOf18 <font color=Cyan>$</font> choice ThreeOf18 <font color=Cyan>$</font> choice FourOf18-<a name="line-536"></a>        <font color=Cyan>$</font> choice FiveOf18 <font color=Cyan>$</font> choice SixOf18 <font color=Cyan>$</font> choice SevenOf18-<a name="line-537"></a>        <font color=Cyan>$</font> choice EightOf18 <font color=Cyan>$</font> choice NineOf18 <font color=Cyan>$</font> choice TenOf18-<a name="line-538"></a>        <font color=Cyan>$</font> choice ElevenOf18 <font color=Cyan>$</font> choice TwelveOf18 <font color=Cyan>$</font> choice ThirteenOf18-<a name="line-539"></a>        <font color=Cyan>$</font> choice FourteenOf18 <font color=Cyan>$</font> choice FifteenOf18 <font color=Cyan>$</font> choice SixteenOf18-<a name="line-540"></a>        <font color=Cyan>$</font> choice SeventeenOf18 <font color=Cyan>$</font> choice EighteenOf18-<a name="line-541"></a>        <font color=Cyan>$</font> fail <font color=Magenta>"OneOf18"</font><font color=Cyan>)</font>-<a name="line-542"></a>    toContents <font color=Cyan>(</font>OneOf18 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-543"></a>    toContents <font color=Cyan>(</font>TwoOf18 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-544"></a>    toContents <font color=Cyan>(</font>ThreeOf18 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-545"></a>    toContents <font color=Cyan>(</font>FourOf18 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-546"></a>    toContents <font color=Cyan>(</font>FiveOf18 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-547"></a>    toContents <font color=Cyan>(</font>SixOf18 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-548"></a>    toContents <font color=Cyan>(</font>SevenOf18 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-549"></a>    toContents <font color=Cyan>(</font>EightOf18 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-550"></a>    toContents <font color=Cyan>(</font>NineOf18 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-551"></a>    toContents <font color=Cyan>(</font>TenOf18 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-552"></a>    toContents <font color=Cyan>(</font>ElevenOf18 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-553"></a>    toContents <font color=Cyan>(</font>TwelveOf18 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-554"></a>    toContents <font color=Cyan>(</font>ThirteenOf18 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-555"></a>    toContents <font color=Cyan>(</font>FourteenOf18 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-556"></a>    toContents <font color=Cyan>(</font>FifteenOf18 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-557"></a>    toContents <font color=Cyan>(</font>SixteenOf18 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-558"></a>    toContents <font color=Cyan>(</font>SeventeenOf18 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-559"></a>    toContents <font color=Cyan>(</font>EighteenOf18 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-560"></a>-<a name="line-561"></a><a name="OneOf19"></a><font color=Blue>----</font>-<a name="line-562"></a><a name="OneOf19"></a><font color=Green><u>data</u></font> OneOf19 a b c d e f g h i j k l m n o p q r s-<a name="line-563"></a>    <font color=Red>=</font> OneOf19 a <font color=Red>|</font> TwoOf19 b <font color=Red>|</font> ThreeOf19 c <font color=Red>|</font> FourOf19 d <font color=Red>|</font> FiveOf19 e-<a name="line-564"></a>    <font color=Red>|</font> SixOf19 f <font color=Red>|</font> SevenOf19 g <font color=Red>|</font> EightOf19 h <font color=Red>|</font> NineOf19 i <font color=Red>|</font> TenOf19 j-<a name="line-565"></a>    <font color=Red>|</font> ElevenOf19 k <font color=Red>|</font> TwelveOf19 l <font color=Red>|</font> ThirteenOf19 m <font color=Red>|</font> FourteenOf19 n-<a name="line-566"></a>    <font color=Red>|</font> FifteenOf19 o <font color=Red>|</font> SixteenOf19 p <font color=Red>|</font> SeventeenOf19 q <font color=Red>|</font> EighteenOf19 r-<a name="line-567"></a>    <font color=Red>|</font> NineteenOf19 s-<a name="line-568"></a>    <font color=Green><u>deriving</u></font> <font color=Cyan>(</font>Eq<font color=Cyan>,</font>Show<font color=Cyan>)</font>-<a name="line-569"></a>-<a name="line-570"></a><font color=Green><u>instance</u></font> <font color=Cyan>(</font>HTypeable a<font color=Cyan>,</font>HTypeable b<font color=Cyan>,</font>HTypeable c<font color=Cyan>,</font>HTypeable d<font color=Cyan>,</font>HTypeable e-<a name="line-571"></a>          <font color=Cyan>,</font>HTypeable f<font color=Cyan>,</font>HTypeable g<font color=Cyan>,</font>HTypeable h<font color=Cyan>,</font>HTypeable i<font color=Cyan>,</font>HTypeable j-<a name="line-572"></a>          <font color=Cyan>,</font>HTypeable k<font color=Cyan>,</font>HTypeable l<font color=Cyan>,</font>HTypeable m<font color=Cyan>,</font>HTypeable n<font color=Cyan>,</font>HTypeable o-<a name="line-573"></a>          <font color=Cyan>,</font>HTypeable p<font color=Cyan>,</font>HTypeable q<font color=Cyan>,</font>HTypeable r<font color=Cyan>,</font>HTypeable s<font color=Cyan>)</font>-<a name="line-574"></a>    <font color=Red>=&gt;</font> HTypeable <font color=Cyan>(</font>OneOf19 a b c d e f g h i j k l m n o p q r s<font color=Cyan>)</font>-<a name="line-575"></a>  <font color=Green><u>where</u></font>      toHType <font color=Green><u>_</u></font> <font color=Red>=</font> Defined <font color=Magenta>"OneOf19"</font> [] []-<a name="line-576"></a>-<a name="line-577"></a><font color=Green><u>instance</u></font> <font color=Cyan>(</font>XmlContent a<font color=Cyan>,</font>XmlContent b<font color=Cyan>,</font>XmlContent c<font color=Cyan>,</font>XmlContent d<font color=Cyan>,</font>XmlContent e-<a name="line-578"></a>          <font color=Cyan>,</font>XmlContent f<font color=Cyan>,</font>XmlContent g<font color=Cyan>,</font>XmlContent h<font color=Cyan>,</font>XmlContent i<font color=Cyan>,</font>XmlContent j-<a name="line-579"></a>          <font color=Cyan>,</font>XmlContent k<font color=Cyan>,</font>XmlContent l<font color=Cyan>,</font>XmlContent m<font color=Cyan>,</font>XmlContent n<font color=Cyan>,</font>XmlContent o-<a name="line-580"></a>          <font color=Cyan>,</font>XmlContent p<font color=Cyan>,</font>XmlContent q<font color=Cyan>,</font>XmlContent r<font color=Cyan>,</font>XmlContent s<font color=Cyan>)</font>-<a name="line-581"></a>    <font color=Red>=&gt;</font> XmlContent <font color=Cyan>(</font>OneOf19 a b c d e f g h i j k l m n o p q r s<font color=Cyan>)</font>-<a name="line-582"></a>  <font color=Green><u>where</u></font>-<a name="line-583"></a>    parseContents <font color=Red>=</font>-<a name="line-584"></a>        <font color=Cyan>(</font>choice OneOf19 <font color=Cyan>$</font> choice TwoOf19 <font color=Cyan>$</font> choice ThreeOf19 <font color=Cyan>$</font> choice FourOf19-<a name="line-585"></a>        <font color=Cyan>$</font> choice FiveOf19 <font color=Cyan>$</font> choice SixOf19 <font color=Cyan>$</font> choice SevenOf19-<a name="line-586"></a>        <font color=Cyan>$</font> choice EightOf19 <font color=Cyan>$</font> choice NineOf19 <font color=Cyan>$</font> choice TenOf19-<a name="line-587"></a>        <font color=Cyan>$</font> choice ElevenOf19 <font color=Cyan>$</font> choice TwelveOf19 <font color=Cyan>$</font> choice ThirteenOf19-<a name="line-588"></a>        <font color=Cyan>$</font> choice FourteenOf19 <font color=Cyan>$</font> choice FifteenOf19 <font color=Cyan>$</font> choice SixteenOf19-<a name="line-589"></a>        <font color=Cyan>$</font> choice SeventeenOf19 <font color=Cyan>$</font> choice EighteenOf19 <font color=Cyan>$</font> choice NineteenOf19-<a name="line-590"></a>        <font color=Cyan>$</font> fail <font color=Magenta>"OneOf19"</font><font color=Cyan>)</font>-<a name="line-591"></a>    toContents <font color=Cyan>(</font>OneOf19 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-592"></a>    toContents <font color=Cyan>(</font>TwoOf19 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-593"></a>    toContents <font color=Cyan>(</font>ThreeOf19 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-594"></a>    toContents <font color=Cyan>(</font>FourOf19 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-595"></a>    toContents <font color=Cyan>(</font>FiveOf19 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-596"></a>    toContents <font color=Cyan>(</font>SixOf19 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-597"></a>    toContents <font color=Cyan>(</font>SevenOf19 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-598"></a>    toContents <font color=Cyan>(</font>EightOf19 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-599"></a>    toContents <font color=Cyan>(</font>NineOf19 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-600"></a>    toContents <font color=Cyan>(</font>TenOf19 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-601"></a>    toContents <font color=Cyan>(</font>ElevenOf19 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-602"></a>    toContents <font color=Cyan>(</font>TwelveOf19 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-603"></a>    toContents <font color=Cyan>(</font>ThirteenOf19 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-604"></a>    toContents <font color=Cyan>(</font>FourteenOf19 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-605"></a>    toContents <font color=Cyan>(</font>FifteenOf19 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-606"></a>    toContents <font color=Cyan>(</font>SixteenOf19 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-607"></a>    toContents <font color=Cyan>(</font>SeventeenOf19 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-608"></a>    toContents <font color=Cyan>(</font>EighteenOf19 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-609"></a>    toContents <font color=Cyan>(</font>NineteenOf19 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-610"></a>-<a name="line-611"></a><a name="OneOf20"></a><font color=Blue>----</font>-<a name="line-612"></a><a name="OneOf20"></a><font color=Green><u>data</u></font> OneOf20 a b c d e f g h i j k l m n o p q r s t-<a name="line-613"></a>    <font color=Red>=</font> OneOf20 a <font color=Red>|</font> TwoOf20 b <font color=Red>|</font> ThreeOf20 c <font color=Red>|</font> FourOf20 d <font color=Red>|</font> FiveOf20 e-<a name="line-614"></a>    <font color=Red>|</font> SixOf20 f <font color=Red>|</font> SevenOf20 g <font color=Red>|</font> EightOf20 h <font color=Red>|</font> NineOf20 i <font color=Red>|</font> TenOf20 j-<a name="line-615"></a>    <font color=Red>|</font> ElevenOf20 k <font color=Red>|</font> TwelveOf20 l <font color=Red>|</font> ThirteenOf20 m <font color=Red>|</font> FourteenOf20 n-<a name="line-616"></a>    <font color=Red>|</font> FifteenOf20 o <font color=Red>|</font> SixteenOf20 p <font color=Red>|</font> SeventeenOf20 q <font color=Red>|</font> EighteenOf20 r-<a name="line-617"></a>    <font color=Red>|</font> NineteenOf20 s <font color=Red>|</font> TwentyOf20 t-<a name="line-618"></a>    <font color=Green><u>deriving</u></font> <font color=Cyan>(</font>Eq<font color=Cyan>,</font>Show<font color=Cyan>)</font>-<a name="line-619"></a>-<a name="line-620"></a><font color=Green><u>instance</u></font> <font color=Cyan>(</font>HTypeable a<font color=Cyan>,</font>HTypeable b<font color=Cyan>,</font>HTypeable c<font color=Cyan>,</font>HTypeable d<font color=Cyan>,</font>HTypeable e-<a name="line-621"></a>          <font color=Cyan>,</font>HTypeable f<font color=Cyan>,</font>HTypeable g<font color=Cyan>,</font>HTypeable h<font color=Cyan>,</font>HTypeable i<font color=Cyan>,</font>HTypeable j-<a name="line-622"></a>          <font color=Cyan>,</font>HTypeable k<font color=Cyan>,</font>HTypeable l<font color=Cyan>,</font>HTypeable m<font color=Cyan>,</font>HTypeable n<font color=Cyan>,</font>HTypeable o-<a name="line-623"></a>          <font color=Cyan>,</font>HTypeable p<font color=Cyan>,</font>HTypeable q<font color=Cyan>,</font>HTypeable r<font color=Cyan>,</font>HTypeable s<font color=Cyan>,</font>HTypeable t<font color=Cyan>)</font>-<a name="line-624"></a>    <font color=Red>=&gt;</font> HTypeable <font color=Cyan>(</font>OneOf20 a b c d e f g h i j k l m n o p q r s t<font color=Cyan>)</font>-<a name="line-625"></a>  <font color=Green><u>where</u></font>      toHType <font color=Green><u>_</u></font> <font color=Red>=</font> Defined <font color=Magenta>"OneOf20"</font> [] []-<a name="line-626"></a>-<a name="line-627"></a><font color=Green><u>instance</u></font> <font color=Cyan>(</font>XmlContent a<font color=Cyan>,</font>XmlContent b<font color=Cyan>,</font>XmlContent c<font color=Cyan>,</font>XmlContent d<font color=Cyan>,</font>XmlContent e-<a name="line-628"></a>          <font color=Cyan>,</font>XmlContent f<font color=Cyan>,</font>XmlContent g<font color=Cyan>,</font>XmlContent h<font color=Cyan>,</font>XmlContent i<font color=Cyan>,</font>XmlContent j-<a name="line-629"></a>          <font color=Cyan>,</font>XmlContent k<font color=Cyan>,</font>XmlContent l<font color=Cyan>,</font>XmlContent m<font color=Cyan>,</font>XmlContent n<font color=Cyan>,</font>XmlContent o-<a name="line-630"></a>          <font color=Cyan>,</font>XmlContent p<font color=Cyan>,</font>XmlContent q<font color=Cyan>,</font>XmlContent r<font color=Cyan>,</font>XmlContent s<font color=Cyan>,</font>XmlContent t<font color=Cyan>)</font>-<a name="line-631"></a>    <font color=Red>=&gt;</font> XmlContent <font color=Cyan>(</font>OneOf20 a b c d e f g h i j k l m n o p q r s t<font color=Cyan>)</font>-<a name="line-632"></a>  <font color=Green><u>where</u></font>-<a name="line-633"></a>    parseContents <font color=Red>=</font>-<a name="line-634"></a>        <font color=Cyan>(</font>choice OneOf20 <font color=Cyan>$</font> choice TwoOf20 <font color=Cyan>$</font> choice ThreeOf20 <font color=Cyan>$</font> choice FourOf20-<a name="line-635"></a>        <font color=Cyan>$</font> choice FiveOf20 <font color=Cyan>$</font> choice SixOf20 <font color=Cyan>$</font> choice SevenOf20-<a name="line-636"></a>        <font color=Cyan>$</font> choice EightOf20 <font color=Cyan>$</font> choice NineOf20 <font color=Cyan>$</font> choice TenOf20-<a name="line-637"></a>        <font color=Cyan>$</font> choice ElevenOf20 <font color=Cyan>$</font> choice TwelveOf20 <font color=Cyan>$</font> choice ThirteenOf20-<a name="line-638"></a>        <font color=Cyan>$</font> choice FourteenOf20 <font color=Cyan>$</font> choice FifteenOf20 <font color=Cyan>$</font> choice SixteenOf20-<a name="line-639"></a>        <font color=Cyan>$</font> choice SeventeenOf20 <font color=Cyan>$</font> choice EighteenOf20 <font color=Cyan>$</font> choice NineteenOf20-<a name="line-640"></a>        <font color=Cyan>$</font> choice TwentyOf20-<a name="line-641"></a>        <font color=Cyan>$</font> fail <font color=Magenta>"OneOf20"</font><font color=Cyan>)</font>-<a name="line-642"></a>    toContents <font color=Cyan>(</font>OneOf20 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-643"></a>    toContents <font color=Cyan>(</font>TwoOf20 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-644"></a>    toContents <font color=Cyan>(</font>ThreeOf20 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-645"></a>    toContents <font color=Cyan>(</font>FourOf20 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-646"></a>    toContents <font color=Cyan>(</font>FiveOf20 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-647"></a>    toContents <font color=Cyan>(</font>SixOf20 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-648"></a>    toContents <font color=Cyan>(</font>SevenOf20 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-649"></a>    toContents <font color=Cyan>(</font>EightOf20 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-650"></a>    toContents <font color=Cyan>(</font>NineOf20 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-651"></a>    toContents <font color=Cyan>(</font>TenOf20 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-652"></a>    toContents <font color=Cyan>(</font>ElevenOf20 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-653"></a>    toContents <font color=Cyan>(</font>TwelveOf20 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-654"></a>    toContents <font color=Cyan>(</font>ThirteenOf20 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-655"></a>    toContents <font color=Cyan>(</font>FourteenOf20 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-656"></a>    toContents <font color=Cyan>(</font>FifteenOf20 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-657"></a>    toContents <font color=Cyan>(</font>SixteenOf20 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-658"></a>    toContents <font color=Cyan>(</font>SeventeenOf20 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-659"></a>    toContents <font color=Cyan>(</font>EighteenOf20 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-660"></a>    toContents <font color=Cyan>(</font>NineteenOf20 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-661"></a>    toContents <font color=Cyan>(</font>TwentyOf20 x<font color=Cyan>)</font> <font color=Red>=</font> toContents x-<a name="line-662"></a>-<a name="line-663"></a><font color=Blue>----</font>-</pre>-</body>-</html>
− docs/HaXml/src/Text/XML/HaXml/Parse.html
@@ -1,896 +0,0 @@-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">-<html>-<head>-<!-- Generated by HsColour, http://www.cs.york.ac.uk/fp/darcs/hscolour/ -->-<title>src/Text/XML/HaXml/Parse.hs</title>-</head>-<body>-<pre><a name="line-1"></a><font color=Blue>{-# OPTIONS -cpp #-}</font>-<a name="line-2"></a><font color=Blue>-- | A non-validating XML parser.  For the input grammar, see</font>-<a name="line-3"></a><font color=Blue>--   &lt;<a href="http://www.w3.org/TR/REC-xml">http://www.w3.org/TR/REC-xml</a>&gt;.</font>-<a name="line-4"></a><font color=Green><u>module</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Parse-<a name="line-5"></a>  <font color=Cyan>(</font>-<a name="line-6"></a>  <font color=Blue>-- * Parse a whole document</font>-<a name="line-7"></a>    xmlParse<font color=Cyan>,</font> xmlParse'-<a name="line-8"></a>  <font color=Blue>-- * Parse just a DTD</font>-<a name="line-9"></a>  <font color=Cyan>,</font> dtdParse<font color=Cyan>,</font> dtdParse'-<a name="line-10"></a>  <font color=Blue>-- * Parse a partial document</font>-<a name="line-11"></a>  <font color=Cyan>,</font> xmlParseWith-<a name="line-12"></a>  <font color=Blue>-- * Individual parsers for use with /xmlParseWith/ and module SAX</font>-<a name="line-13"></a>  <font color=Cyan>,</font> document<font color=Cyan>,</font> element<font color=Cyan>,</font> content-<a name="line-14"></a>  <font color=Cyan>,</font> comment<font color=Cyan>,</font> cdsect<font color=Cyan>,</font> chardata-<a name="line-15"></a>  <font color=Cyan>,</font> reference<font color=Cyan>,</font> doctypedecl-<a name="line-16"></a>  <font color=Cyan>,</font> processinginstruction-<a name="line-17"></a>  <font color=Cyan>,</font> elemtag<font color=Cyan>,</font> name<font color=Cyan>,</font> tok-<a name="line-18"></a>  <font color=Cyan>,</font> elemOpenTag<font color=Cyan>,</font> elemCloseTag-<a name="line-19"></a>  <font color=Cyan>,</font> emptySTs<font color=Cyan>,</font> XParser-<a name="line-20"></a>  <font color=Blue>-- * These general utility functions don't belong here</font>-<a name="line-21"></a>  <font color=Cyan>,</font> fst3<font color=Cyan>,</font> snd3<font color=Cyan>,</font> thd3-<a name="line-22"></a>  <font color=Cyan>)</font> <font color=Green><u>where</u></font>-<a name="line-23"></a>-<a name="line-24"></a><font color=Blue>-- An XML parser, written using a slightly extended version of the</font>-<a name="line-25"></a><font color=Blue>-- Hutton/Meijer parser combinators.  The input is tokenised internally</font>-<a name="line-26"></a><font color=Blue>-- by the lexer xmlLex.  Whilst parsing, we gather a symbol</font>-<a name="line-27"></a><font color=Blue>-- table of entity references.  PERefs must be defined before use, so we</font>-<a name="line-28"></a><font color=Blue>-- expand their uses as we encounter them, forcing the remainder of the</font>-<a name="line-29"></a><font color=Blue>-- input to be re-lexed and re-parsed.  GERefs are simply stored for</font>-<a name="line-30"></a><font color=Blue>-- later retrieval.</font>-<a name="line-31"></a>-<a name="line-32"></a><font color=Green><u>import</u></font> Prelude hiding <font color=Cyan>(</font>either<font color=Cyan>,</font>maybe<font color=Cyan>,</font>sequence<font color=Cyan>)</font>-<a name="line-33"></a><font color=Green><u>import</u></font> <font color=Green><u>qualified</u></font> Prelude <font color=Cyan>(</font>either<font color=Cyan>)</font>-<a name="line-34"></a><font color=Green><u>import</u></font> Maybe hiding <font color=Cyan>(</font>maybe<font color=Cyan>)</font>-<a name="line-35"></a><font color=Green><u>import</u></font> List <font color=Cyan>(</font>intersperse<font color=Cyan>)</font>       <font color=Blue>-- debugging only</font>-<a name="line-36"></a><font color=Green><u>import</u></font> Char <font color=Cyan>(</font>isSpace<font color=Cyan>,</font>isDigit<font color=Cyan>,</font>isHexDigit<font color=Cyan>)</font>-<a name="line-37"></a><font color=Green><u>import</u></font> Monad hiding <font color=Cyan>(</font>sequence<font color=Cyan>)</font>-<a name="line-38"></a><font color=Green><u>import</u></font> Numeric <font color=Cyan>(</font>readDec<font color=Cyan>,</font>readHex<font color=Cyan>)</font>-<a name="line-39"></a>-<a name="line-40"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Types-<a name="line-41"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Posn-<a name="line-42"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Lex-<a name="line-43"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>ParserCombinators<font color=Cyan>.</font>Poly<font color=Cyan>.</font>State-<a name="line-44"></a>-<a name="line-45"></a><font color=Green><u>import</u></font> System<font color=Cyan>.</font>FilePath <font color=Cyan>(</font>combine<font color=Cyan>,</font> dropFileName<font color=Cyan>)</font>-<a name="line-46"></a>-<a name="line-47"></a>-<a name="line-48"></a><font color=Magenta><em>#if ( defined(__GLASGOW_HASKELL__) &amp;&amp; __GLASGOW_HASKELL__ &gt; 502 ) || \</em></font>-<a name="line-49"></a>    <font color=Cyan>(</font> defined<font color=Cyan>(</font><b><font color=Magenta>__NHC__</font></b><font color=Cyan>)</font> <font color=Cyan>&amp;&amp;</font> <b><font color=Magenta>__NHC__</font></b> <font color=Cyan>&gt;</font> <font color=Magenta>114</font> <font color=Cyan>)</font> <font color=Cyan>||</font> defined<font color=Cyan>(</font><b><font color=Magenta>__HUGS__</font></b><font color=Cyan>)</font>-<a name="line-50"></a><font color=Green><u>import</u></font> System<font color=Cyan>.</font>IO<font color=Cyan>.</font>Unsafe <font color=Cyan>(</font>unsafePerformIO<font color=Cyan>)</font>-<a name="line-51"></a><font color=Magenta><em>#elif defined(__GLASGOW_HASKELL__)</em></font>-<a name="line-52"></a><font color=Green><u>import</u></font> IOExts <font color=Cyan>(</font>unsafePerformIO<font color=Cyan>)</font>-<a name="line-53"></a><font color=Magenta><em>#elif defined(__NHC__)</em></font>-<a name="line-54"></a><font color=Green><u>import</u></font> IOExtras <font color=Cyan>(</font>unsafePerformIO<font color=Cyan>)</font>-<a name="line-55"></a><font color=Magenta><em>#elif defined(__HBC__)</em></font>-<a name="line-56"></a><font color=Green><u>import</u></font> UnsafePerformIO-<a name="line-57"></a><font color=Magenta><em>#endif</em></font>-<a name="line-58"></a>-<a name="line-59"></a><font color=Blue>--  #define DEBUG</font>-<a name="line-60"></a>-<a name="line-61"></a><font color=Magenta><em>#if defined(DEBUG)</em></font>-<a name="line-62"></a><font color=Magenta><em>#  if ( defined(__GLASGOW_HASKELL__) &amp;&amp; __GLASGOW_HASKELL__ &gt; 502 ) || \</em></font>-<a name="line-63"></a>      <font color=Cyan>(</font> defined<font color=Cyan>(</font><b><font color=Magenta>__NHC__</font></b><font color=Cyan>)</font> <font color=Cyan>&amp;&amp;</font> <b><font color=Magenta>__NHC__</font></b> <font color=Cyan>&gt;</font> <font color=Magenta>114</font> <font color=Cyan>)</font> <font color=Cyan>||</font> defined<font color=Cyan>(</font><b><font color=Magenta>__HUGS__</font></b><font color=Cyan>)</font>-<a name="line-64"></a><font color=Green><u>import</u></font> Debug<font color=Cyan>.</font>Trace<font color=Cyan>(</font>trace<font color=Cyan>)</font>-<a name="line-65"></a><font color=Magenta><em>#  elif defined(__GLASGOW_HASKELL__)</em></font>-<a name="line-66"></a><font color=Green><u>import</u></font> IOExts<font color=Cyan>(</font>trace<font color=Cyan>)</font>-<a name="line-67"></a><font color=Magenta><em>#  elif defined(__NHC__) || defined(__HBC__)</em></font>-<a name="line-68"></a><font color=Green><u>import</u></font> NonStdTrace-<a name="line-69"></a><font color=Magenta><em>#  endif</em></font>-<a name="line-70"></a><a name="debug"></a><font color=Blue>debug</font> <font color=Red>::</font> a <font color=Red>-&gt;</font> String <font color=Red>-&gt;</font> a-<a name="line-71"></a><a name="debug"></a><font color=Blue>v</font> <font color=Cyan>`debug`</font> s <font color=Red>=</font> trace s v-<a name="line-72"></a><font color=Magenta><em>#else</em></font>-<a name="line-73"></a><a name="debug"></a><font color=Blue>v</font> <font color=Cyan>`debug`</font> s <font color=Red>=</font> v-<a name="line-74"></a><font color=Magenta><em>#endif</em></font>-<a name="line-75"></a>-<a name="line-76"></a>-<a name="line-77"></a><a name="xmlParse"></a><font color=Blue>-- | To parse a whole document, @xmlParse file content@ takes a filename</font>-<a name="line-78"></a><font color=Blue>--   (for generating error reports) and the string content of that file.</font>-<a name="line-79"></a><font color=Blue>--   A parse error causes program failure, with message to stderr.</font>-<a name="line-80"></a><font color=Blue>xmlParse</font> <font color=Red>::</font> String <font color=Red>-&gt;</font> String <font color=Red>-&gt;</font> Document Posn-<a name="line-81"></a>-<a name="line-82"></a><a name="xmlParse'"></a><font color=Blue>-- | To parse a whole document, @xmlParse' file content@ takes a filename</font>-<a name="line-83"></a><font color=Blue>--   (for generating error reports) and the string content of that file.</font>-<a name="line-84"></a><font color=Blue>--   Any parse error message is passed back to the caller through the</font>-<a name="line-85"></a><font color=Blue>--   @Either@ type.</font>-<a name="line-86"></a><font color=Blue>xmlParse'</font> <font color=Red>::</font> String <font color=Red>-&gt;</font> String <font color=Red>-&gt;</font> Either String <font color=Cyan>(</font>Document Posn<font color=Cyan>)</font>-<a name="line-87"></a>-<a name="line-88"></a><a name="dtdParse"></a><font color=Blue>-- | To parse just a DTD, @dtdParse file content@ takes a filename</font>-<a name="line-89"></a><font color=Blue>--   (for generating error reports) and the string content of that</font>-<a name="line-90"></a><font color=Blue>--   file.  If no DTD was found, you get @Nothing@ rather than an error.</font>-<a name="line-91"></a><font color=Blue>--   However, if a DTD is found but contains errors, the program crashes.</font>-<a name="line-92"></a><font color=Blue>dtdParse</font>  <font color=Red>::</font> String <font color=Red>-&gt;</font> String <font color=Red>-&gt;</font> Maybe DocTypeDecl-<a name="line-93"></a>-<a name="line-94"></a><a name="dtdParse'"></a><font color=Blue>-- | To parse just a DTD, @dtdParse' file content@ takes a filename</font>-<a name="line-95"></a><font color=Blue>--   (for generating error reports) and the string content of that</font>-<a name="line-96"></a><font color=Blue>--   file.  If no DTD was found, you get @Right Nothing@.</font>-<a name="line-97"></a><font color=Blue>--   If a DTD was found but contains errors, you get a @Left message@.</font>-<a name="line-98"></a><font color=Blue>dtdParse'</font> <font color=Red>::</font> String <font color=Red>-&gt;</font> String <font color=Red>-&gt;</font> Either String <font color=Cyan>(</font>Maybe DocTypeDecl<font color=Cyan>)</font>-<a name="line-99"></a>-<a name="line-100"></a><font color=Blue>xmlParse</font>  name  <font color=Red>=</font> Prelude<font color=Cyan>.</font>either error id <font color=Cyan>.</font> xmlParse' name-<a name="line-101"></a><font color=Blue>dtdParse</font>  name  <font color=Red>=</font> Prelude<font color=Cyan>.</font>either error id <font color=Cyan>.</font> dtdParse' name-<a name="line-102"></a>-<a name="line-103"></a><font color=Blue>xmlParse'</font> name  <font color=Red>=</font> fst3 <font color=Cyan>.</font> runParser <font color=Cyan>(</font>toEOF document<font color=Cyan>)</font> emptySTs <font color=Cyan>.</font> xmlLex name-<a name="line-104"></a><font color=Blue>dtdParse'</font> name  <font color=Red>=</font> fst3 <font color=Cyan>.</font> runParser justDTD  emptySTs <font color=Cyan>.</font> xmlLex name-<a name="line-105"></a>-<a name="line-106"></a><a name="toEOF"></a><font color=Blue>toEOF</font> <font color=Red>=</font> id	<font color=Blue>-- there are other possible implementations...</font>-<a name="line-107"></a>-<a name="line-108"></a><a name="xmlParseWith"></a><font color=Blue>-- | To parse a partial document, e.g. from an XML-based stream protocol,</font>-<a name="line-109"></a><font color=Blue>--   where you may later want to get more document elements from the same</font>-<a name="line-110"></a><font color=Blue>--   stream.  Arguments are: a parser for the item you want, and the</font>-<a name="line-111"></a><font color=Blue>--   already-lexed input to parse from.  Returns the item you wanted</font>-<a name="line-112"></a><font color=Blue>--   (or an error message), plus the remainder of the input.</font>-<a name="line-113"></a><font color=Blue>xmlParseWith</font> <font color=Red>::</font> XParser a <font color=Red>-&gt;</font> <font color=Red>[</font><font color=Cyan>(</font>Posn<font color=Cyan>,</font>TokenT<font color=Cyan>)</font><font color=Red>]</font>-<a name="line-114"></a>                <font color=Red>-&gt;</font> <font color=Cyan>(</font>Either String a<font color=Cyan>,</font> <font color=Red>[</font><font color=Cyan>(</font>Posn<font color=Cyan>,</font>TokenT<font color=Cyan>)</font><font color=Red>]</font><font color=Cyan>)</font>-<a name="line-115"></a><font color=Blue>xmlParseWith</font> p <font color=Red>=</font> <font color=Cyan>(</font><font color=Red>\</font><font color=Cyan>(</font>v<font color=Cyan>,</font><font color=Green><u>_</u></font><font color=Cyan>,</font>s<font color=Cyan>)</font><font color=Red>-&gt;</font><font color=Cyan>(</font>v<font color=Cyan>,</font>s<font color=Cyan>)</font><font color=Cyan>)</font> <font color=Cyan>.</font> runParser p emptySTs-<a name="line-116"></a>-<a name="line-117"></a>-<a name="line-118"></a><font color=Blue>---- Symbol table stuff ----</font>-<a name="line-119"></a>-<a name="line-120"></a><a name="SymTabs"></a><font color=Green><u>type</u></font> SymTabs <font color=Red>=</font> <font color=Cyan>(</font>SymTab PEDef<font color=Cyan>,</font> SymTab EntityDef<font color=Cyan>)</font>-<a name="line-121"></a>-<a name="line-122"></a><a name="emptySTs"></a><font color=Blue>-- | Some empty symbol tables for GE and PE references.</font>-<a name="line-123"></a><font color=Blue>emptySTs</font> <font color=Red>::</font> SymTabs-<a name="line-124"></a><font color=Blue>emptySTs</font> <font color=Red>=</font> <font color=Cyan>(</font>emptyST<font color=Cyan>,</font> emptyST<font color=Cyan>)</font>-<a name="line-125"></a>-<a name="line-126"></a><a name="addPE"></a><font color=Blue>addPE</font> <font color=Red>::</font> String <font color=Red>-&gt;</font> PEDef <font color=Red>-&gt;</font> SymTabs <font color=Red>-&gt;</font> SymTabs-<a name="line-127"></a><font color=Blue>addPE</font> n v <font color=Cyan>(</font>pe<font color=Cyan>,</font>ge<font color=Cyan>)</font> <font color=Red>=</font> <font color=Cyan>(</font>addST n v pe<font color=Cyan>,</font> ge<font color=Cyan>)</font>-<a name="line-128"></a>-<a name="line-129"></a><a name="addGE"></a><font color=Blue>addGE</font> <font color=Red>::</font> String <font color=Red>-&gt;</font> EntityDef <font color=Red>-&gt;</font> SymTabs <font color=Red>-&gt;</font> SymTabs-<a name="line-130"></a><font color=Blue>addGE</font> n v <font color=Cyan>(</font>pe<font color=Cyan>,</font>ge<font color=Cyan>)</font> <font color=Red>=</font> <font color=Green><u>let</u></font> newge <font color=Red>=</font> addST n v ge <font color=Green><u>in</u></font> newge <font color=Cyan>`seq`</font> <font color=Cyan>(</font>pe<font color=Cyan>,</font> newge<font color=Cyan>)</font>-<a name="line-131"></a>-<a name="line-132"></a><a name="lookupPE"></a><font color=Blue>lookupPE</font> <font color=Red>::</font> String <font color=Red>-&gt;</font> SymTabs <font color=Red>-&gt;</font> Maybe PEDef-<a name="line-133"></a><font color=Blue>lookupPE</font> s <font color=Cyan>(</font>pe<font color=Cyan>,</font>ge<font color=Cyan>)</font> <font color=Red>=</font> lookupST s pe-<a name="line-134"></a>-<a name="line-135"></a><a name="flattenEV"></a><font color=Blue>flattenEV</font> <font color=Red>::</font> EntityValue <font color=Red>-&gt;</font> String-<a name="line-136"></a><font color=Blue>flattenEV</font> <font color=Cyan>(</font>EntityValue evs<font color=Cyan>)</font> <font color=Red>=</font> concatMap flatten evs-<a name="line-137"></a>  <font color=Green><u>where</u></font>-<a name="line-138"></a>    flatten <font color=Cyan>(</font>EVString s<font color=Cyan>)</font>          <font color=Red>=</font> s-<a name="line-139"></a>    flatten <font color=Cyan>(</font>EVRef <font color=Cyan>(</font>RefEntity r<font color=Cyan>)</font><font color=Cyan>)</font> <font color=Red>=</font> <font color=Magenta>"&amp;"</font> <font color=Cyan>++</font>r<font color=Cyan>++</font><font color=Magenta>";"</font>-<a name="line-140"></a>    flatten <font color=Cyan>(</font>EVRef <font color=Cyan>(</font>RefChar r<font color=Cyan>)</font><font color=Cyan>)</font>   <font color=Red>=</font> <font color=Magenta>"&amp;#"</font><font color=Cyan>++</font>show r<font color=Cyan>++</font><font color=Magenta>";"</font>-<a name="line-141"></a> <font color=Blue>-- flatten (EVPERef n)           = "%" ++n++";"</font>-<a name="line-142"></a>-<a name="line-143"></a>-<a name="line-144"></a><a name="fst3"></a><font color=Blue>---- Misc ----</font>-<a name="line-145"></a><font color=Blue>fst3</font> <font color=Red>::</font> <font color=Cyan>(</font>a<font color=Cyan>,</font>b<font color=Cyan>,</font>c<font color=Cyan>)</font> <font color=Red>-&gt;</font> a-<a name="line-146"></a><a name="snd3"></a><font color=Blue>snd3</font> <font color=Red>::</font> <font color=Cyan>(</font>a<font color=Cyan>,</font>b<font color=Cyan>,</font>c<font color=Cyan>)</font> <font color=Red>-&gt;</font> b-<a name="line-147"></a><a name="thd3"></a><font color=Blue>thd3</font> <font color=Red>::</font> <font color=Cyan>(</font>a<font color=Cyan>,</font>b<font color=Cyan>,</font>c<font color=Cyan>)</font> <font color=Red>-&gt;</font> c-<a name="line-148"></a>-<a name="line-149"></a><font color=Blue>fst3</font> <font color=Cyan>(</font>a<font color=Cyan>,</font><font color=Green><u>_</u></font><font color=Cyan>,</font><font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red>=</font> a-<a name="line-150"></a><font color=Blue>snd3</font> <font color=Cyan>(</font><font color=Green><u>_</u></font><font color=Cyan>,</font>a<font color=Cyan>,</font><font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red>=</font> a-<a name="line-151"></a><font color=Blue>thd3</font> <font color=Cyan>(</font><font color=Green><u>_</u></font><font color=Cyan>,</font><font color=Green><u>_</u></font><font color=Cyan>,</font>a<font color=Cyan>)</font> <font color=Red>=</font> a-<a name="line-152"></a>-<a name="line-153"></a>-<a name="line-154"></a><font color=Blue>---- Auxiliary Parsing Functions ----</font>-<a name="line-155"></a>-<a name="line-156"></a><a name="myBracket"></a><font color=Blue>-- | Parse a bracketed item, discarding the brackets AND NOT using adjustErrBad</font>-<a name="line-157"></a><font color=Blue>myBracket</font> <font color=Red>::</font> PolyParse p <font color=Red>=&gt;</font> p bra <font color=Red>-&gt;</font> p ket <font color=Red>-&gt;</font> p a <font color=Red>-&gt;</font> p a-<a name="line-158"></a><font color=Blue>myBracket</font> open close p <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-159"></a>    <font color=Green><u>do</u></font> <font color=Cyan>{</font> open    <font color=Cyan>`adjustErr`</font> <font color=Cyan>(</font><font color=Magenta>"Missing opening bracket:\n\t"</font><font color=Cyan>++</font><font color=Cyan>)</font>-<a name="line-160"></a>       <font color=Cyan>;</font> p <font color=Cyan>`discard`</font> <font color=Cyan>(</font>close <font color=Cyan>`adjustErr`</font> <font color=Cyan>(</font><font color=Magenta>"Missing closing bracket:\n\t"</font><font color=Cyan>++</font><font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-161"></a>       <font color=Cyan>}</font>-<a name="line-162"></a>-<a name="line-163"></a><a name="XParser"></a><font color=Blue>-- | XParser is just a specialisation of the PolyState parser.</font>-<a name="line-164"></a><a name="XParser"></a><font color=Green><u>type</u></font> XParser a <font color=Red>=</font> Parser SymTabs <font color=Cyan>(</font>Posn<font color=Cyan>,</font>TokenT<font color=Cyan>)</font> a-<a name="line-165"></a>-<a name="line-166"></a><a name="tok"></a><font color=Blue>-- | Return the next token from the input only if it matches the given token.</font>-<a name="line-167"></a><font color=Blue>tok</font> <font color=Red>::</font> TokenT <font color=Red>-&gt;</font> XParser TokenT-<a name="line-168"></a><font color=Blue>tok</font> t <font color=Red>=</font> <font color=Green><u>do</u></font> <font color=Cyan>(</font>p<font color=Cyan>,</font>t'<font color=Cyan>)</font> <font color=Red>&lt;-</font> next-<a name="line-169"></a>           <font color=Green><u>case</u></font> t' <font color=Green><u>of</u></font> TokError <font color=Green><u>_</u></font>    <font color=Red>-&gt;</font> report failBad <font color=Cyan>(</font>show t<font color=Cyan>)</font> p t'-<a name="line-170"></a>                      <font color=Green><u>_</u></font> <font color=Red>|</font> t'<font color=Cyan>==</font>t     <font color=Red>-&gt;</font> return t-<a name="line-171"></a>                        <font color=Red>|</font> otherwise <font color=Red>-&gt;</font> report fail <font color=Cyan>(</font>show t<font color=Cyan>)</font> p t'-<a name="line-172"></a><a name="nottok"></a><font color=Blue>nottok</font> <font color=Red>::</font> <font color=Red>[</font>TokenT<font color=Red>]</font> <font color=Red>-&gt;</font> XParser TokenT-<a name="line-173"></a><font color=Blue>nottok</font> ts <font color=Red>=</font> <font color=Green><u>do</u></font> <font color=Cyan>(</font>p<font color=Cyan>,</font>t<font color=Cyan>)</font> <font color=Red>&lt;-</font> next-<a name="line-174"></a>               <font color=Green><u>if</u></font> t<font color=Cyan>`elem`</font>ts <font color=Green><u>then</u></font> report fail <font color=Cyan>(</font><font color=Magenta>"no "</font><font color=Cyan>++</font>show t<font color=Cyan>)</font> p t-<a name="line-175"></a>                            <font color=Green><u>else</u></font> return t-<a name="line-176"></a>-<a name="line-177"></a><a name="name"></a><font color=Blue>-- | Return just a name, e.g. element name, attribute name.</font>-<a name="line-178"></a><font color=Blue>name</font> <font color=Red>::</font> XParser Name-<a name="line-179"></a><font color=Blue>name</font> <font color=Red>=</font> <font color=Green><u>do</u></font> <font color=Cyan>(</font>p<font color=Cyan>,</font>tok<font color=Cyan>)</font> <font color=Red>&lt;-</font> next-<a name="line-180"></a>          <font color=Green><u>case</u></font> tok <font color=Green><u>of</u></font>-<a name="line-181"></a>            TokName s  <font color=Red>-&gt;</font> return s-<a name="line-182"></a>            TokError <font color=Green><u>_</u></font> <font color=Red>-&gt;</font> report failBad <font color=Magenta>"a name"</font> p tok-<a name="line-183"></a>            <font color=Green><u>_</u></font>          <font color=Red>-&gt;</font> report fail <font color=Magenta>"a name"</font> p tok-<a name="line-184"></a>-<a name="line-185"></a><a name="string"></a><font color=Blue>string</font><font color=Cyan>,</font> freetext <font color=Red>::</font> XParser String-<a name="line-186"></a><font color=Blue>string</font>   <font color=Red>=</font> <font color=Green><u>do</u></font> <font color=Cyan>(</font>p<font color=Cyan>,</font>t<font color=Cyan>)</font> <font color=Red>&lt;-</font> next-<a name="line-187"></a>              <font color=Green><u>case</u></font> t <font color=Green><u>of</u></font> TokName s <font color=Red>-&gt;</font> return s-<a name="line-188"></a>                        <font color=Green><u>_</u></font>         <font color=Red>-&gt;</font> report fail <font color=Magenta>"text"</font> p t-<a name="line-189"></a><a name="freetext"></a><font color=Blue>freetext</font> <font color=Red>=</font> <font color=Green><u>do</u></font> <font color=Cyan>(</font>p<font color=Cyan>,</font>t<font color=Cyan>)</font> <font color=Red>&lt;-</font> next-<a name="line-190"></a>              <font color=Green><u>case</u></font> t <font color=Green><u>of</u></font> TokFreeText s <font color=Red>-&gt;</font> return s-<a name="line-191"></a>                        <font color=Green><u>_</u></font>             <font color=Red>-&gt;</font> report fail <font color=Magenta>"text"</font> p t-<a name="line-192"></a>-<a name="line-193"></a><a name="maybe"></a><font color=Blue>maybe</font> <font color=Red>::</font> XParser a <font color=Red>-&gt;</font> XParser <font color=Cyan>(</font>Maybe a<font color=Cyan>)</font>-<a name="line-194"></a><font color=Blue>maybe</font> p <font color=Red>=</font>-<a name="line-195"></a>    <font color=Cyan>(</font> p <font color=Cyan>&gt;&gt;=</font> return <font color=Cyan>.</font> Just<font color=Cyan>)</font> <font color=Cyan>`onFail`</font>-<a name="line-196"></a>    <font color=Cyan>(</font> return Nothing<font color=Cyan>)</font>-<a name="line-197"></a>-<a name="line-198"></a><a name="either"></a><font color=Blue>either</font> <font color=Red>::</font> XParser a <font color=Red>-&gt;</font> XParser b <font color=Red>-&gt;</font> XParser <font color=Cyan>(</font>Either a b<font color=Cyan>)</font>-<a name="line-199"></a><font color=Blue>either</font> p q <font color=Red>=</font>-<a name="line-200"></a>    <font color=Cyan>(</font> p <font color=Cyan>&gt;&gt;=</font> return <font color=Cyan>.</font> Left<font color=Cyan>)</font> <font color=Cyan>`onFail`</font>-<a name="line-201"></a>    <font color=Cyan>(</font> q <font color=Cyan>&gt;&gt;=</font> return <font color=Cyan>.</font> Right<font color=Cyan>)</font>-<a name="line-202"></a>-<a name="line-203"></a><a name="word"></a><font color=Blue>word</font> <font color=Red>::</font> String <font color=Red>-&gt;</font> XParser ()-<a name="line-204"></a><font color=Blue>word</font> s <font color=Red>=</font> <font color=Green><u>do</u></font> <font color=Cyan>{</font> x <font color=Red>&lt;-</font> next-<a name="line-205"></a>            <font color=Cyan>;</font> <font color=Green><u>case</u></font> x <font color=Green><u>of</u></font>-<a name="line-206"></a>                <font color=Cyan>(</font>p<font color=Cyan>,</font>TokName n<font color=Cyan>)</font>     <font color=Red>|</font> s<font color=Cyan>==</font>n <font color=Red>-&gt;</font> return ()-<a name="line-207"></a>                <font color=Cyan>(</font>p<font color=Cyan>,</font>TokFreeText n<font color=Cyan>)</font> <font color=Red>|</font> s<font color=Cyan>==</font>n <font color=Red>-&gt;</font> return ()-<a name="line-208"></a>                <font color=Cyan>(</font>p<font color=Cyan>,</font>t<font color=Red>@</font><font color=Cyan>(</font>TokError <font color=Green><u>_</u></font><font color=Cyan>)</font><font color=Cyan>)</font> <font color=Red>-&gt;</font> report failBad <font color=Cyan>(</font>show s<font color=Cyan>)</font> p t-<a name="line-209"></a>                <font color=Cyan>(</font>p<font color=Cyan>,</font>t<font color=Cyan>)</font> <font color=Red>-&gt;</font> report fail <font color=Cyan>(</font>show s<font color=Cyan>)</font> p t-<a name="line-210"></a>            <font color=Cyan>}</font>-<a name="line-211"></a>-<a name="line-212"></a><a name="posn"></a><font color=Blue>posn</font> <font color=Red>=</font> <font color=Green><u>do</u></font> <font color=Cyan>{</font> x<font color=Red>@</font><font color=Cyan>(</font>p<font color=Cyan>,</font><font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red>&lt;-</font> next-<a name="line-213"></a>          <font color=Cyan>;</font> reparse <font color=Red>[</font>x<font color=Red>]</font>-<a name="line-214"></a>          <font color=Cyan>;</font> return p-<a name="line-215"></a>          <font color=Cyan>}</font>-<a name="line-216"></a>-<a name="line-217"></a><a name="nmtoken"></a><font color=Blue>nmtoken</font> <font color=Red>::</font> XParser NmToken-<a name="line-218"></a><font color=Blue>nmtoken</font> <font color=Red>=</font> <font color=Cyan>(</font>string <font color=Cyan>`onFail`</font> freetext<font color=Cyan>)</font>-<a name="line-219"></a>-<a name="line-220"></a><a name="failP"></a><font color=Blue>failP</font><font color=Cyan>,</font> failBadP <font color=Red>::</font> String <font color=Red>-&gt;</font> XParser a-<a name="line-221"></a><font color=Blue>failP</font> msg <font color=Red>=</font> <font color=Green><u>do</u></font> <font color=Cyan>{</font> p <font color=Red>&lt;-</font> posn<font color=Cyan>;</font> fail <font color=Cyan>(</font>msg<font color=Cyan>++</font><font color=Magenta>"\n    at "</font><font color=Cyan>++</font>show p<font color=Cyan>)</font> <font color=Cyan>}</font>-<a name="line-222"></a><a name="failBadP"></a><font color=Blue>failBadP</font> msg <font color=Red>=</font> <font color=Green><u>do</u></font> <font color=Cyan>{</font> p <font color=Red>&lt;-</font> posn<font color=Cyan>;</font> failBad <font color=Cyan>(</font>msg<font color=Cyan>++</font><font color=Magenta>"\n    at "</font><font color=Cyan>++</font>show p<font color=Cyan>)</font> <font color=Cyan>}</font>-<a name="line-223"></a>-<a name="line-224"></a><a name="report"></a><font color=Blue>report</font> <font color=Red>::</font> <font color=Cyan>(</font>String<font color=Red>-&gt;</font>XParser a<font color=Cyan>)</font> <font color=Red>-&gt;</font> String <font color=Red>-&gt;</font> Posn <font color=Red>-&gt;</font> TokenT <font color=Red>-&gt;</font> XParser a-<a name="line-225"></a><font color=Blue>report</font> fail exp p t <font color=Red>=</font> fail <font color=Cyan>(</font><font color=Magenta>"Expected "</font><font color=Cyan>++</font>exp<font color=Cyan>++</font><font color=Magenta>" but found "</font><font color=Cyan>++</font>show t-<a name="line-226"></a>                           <font color=Cyan>++</font><font color=Magenta>"\n  in "</font><font color=Cyan>++</font>show p<font color=Cyan>)</font>-<a name="line-227"></a>-<a name="line-228"></a><a name="adjustErrP"></a><font color=Blue>adjustErrP</font> <font color=Red>::</font> XParser a <font color=Red>-&gt;</font> <font color=Cyan>(</font>String<font color=Red>-&gt;</font>String<font color=Cyan>)</font> <font color=Red>-&gt;</font> XParser a-<a name="line-229"></a><a name="adjustErrP"></a><font color=Blue>p</font> <font color=Cyan>`adjustErrP`</font> f <font color=Red>=</font> p <font color=Cyan>`onFail`</font> <font color=Green><u>do</u></font> pn <font color=Red>&lt;-</font> posn-<a name="line-230"></a>                                 <font color=Cyan>(</font>p <font color=Cyan>`adjustErr`</font> f<font color=Cyan>)</font> <font color=Cyan>`adjustErr`</font> <font color=Cyan>(</font><font color=Cyan>++</font>show pn<font color=Cyan>)</font>-<a name="line-231"></a>-<a name="line-232"></a><a name="peRef"></a><font color=Blue>peRef</font> <font color=Red>::</font> XParser a <font color=Red>-&gt;</font> XParser a-<a name="line-233"></a><font color=Blue>peRef</font> p <font color=Red>=</font>-<a name="line-234"></a>    p <font color=Cyan>`onFail`</font>-<a name="line-235"></a>    <font color=Green><u>do</u></font> pn <font color=Red>&lt;-</font> posn-<a name="line-236"></a>       n <font color=Red>&lt;-</font> pereference-<a name="line-237"></a>       tr <font color=Red>&lt;-</font> stQuery <font color=Cyan>(</font>lookupPE n<font color=Cyan>)</font> <font color=Cyan>`debug`</font> <font color=Cyan>(</font><font color=Magenta>"Looking up %"</font><font color=Cyan>++</font>n<font color=Cyan>)</font>-<a name="line-238"></a>       <font color=Green><u>case</u></font> tr <font color=Green><u>of</u></font>-<a name="line-239"></a>           Just <font color=Cyan>(</font>PEDefEntityValue ev<font color=Cyan>)</font> <font color=Red>-&gt;</font>-<a name="line-240"></a>                      <font color=Green><u>do</u></font> reparse <font color=Cyan>(</font>xmlReLex <font color=Cyan>(</font>posInNewCxt <font color=Cyan>(</font><font color=Magenta>"macro %"</font><font color=Cyan>++</font>n<font color=Cyan>++</font><font color=Magenta>";"</font><font color=Cyan>)</font>-<a name="line-241"></a>                                                        <font color=Cyan>(</font>Just pn<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-242"></a>                                           <font color=Cyan>(</font>flattenEV ev<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-243"></a>                               <font color=Cyan>`debug`</font> <font color=Cyan>(</font><font color=Magenta>"  defn:  "</font><font color=Cyan>++</font>flattenEV ev<font color=Cyan>)</font>-<a name="line-244"></a>                         peRef p-<a name="line-245"></a>           Just <font color=Cyan>(</font>PEDefExternalID <font color=Cyan>(</font>PUBLIC <font color=Green><u>_</u></font> <font color=Cyan>(</font>SystemLiteral f<font color=Cyan>)</font><font color=Cyan>)</font><font color=Cyan>)</font> <font color=Red>-&gt;</font>-<a name="line-246"></a>                      <font color=Green><u>do</u></font> <font color=Green><u>let</u></font> f' <font color=Red>=</font> combine <font color=Cyan>(</font>dropFileName <font color=Cyan>$</font> posnFilename pn<font color=Cyan>)</font> f-<a name="line-247"></a>                             val <font color=Red>=</font> unsafePerformIO <font color=Cyan>(</font>readFile f'<font color=Cyan>)</font>-<a name="line-248"></a>                         reparse <font color=Cyan>(</font>xmlReLex <font color=Cyan>(</font>posInNewCxt f'-<a name="line-249"></a>                                                        <font color=Cyan>(</font>Just pn<font color=Cyan>)</font><font color=Cyan>)</font> val<font color=Cyan>)</font>-<a name="line-250"></a>                               <font color=Cyan>`debug`</font> <font color=Cyan>(</font><font color=Magenta>"  reading from file "</font><font color=Cyan>++</font>f'<font color=Cyan>)</font>-<a name="line-251"></a>                         peRef p-<a name="line-252"></a>           Just <font color=Cyan>(</font>PEDefExternalID <font color=Cyan>(</font>SYSTEM <font color=Cyan>(</font>SystemLiteral f<font color=Cyan>)</font><font color=Cyan>)</font><font color=Cyan>)</font> <font color=Red>-&gt;</font>-<a name="line-253"></a>                      <font color=Green><u>do</u></font> <font color=Green><u>let</u></font> f' <font color=Red>=</font> combine <font color=Cyan>(</font>dropFileName <font color=Cyan>$</font> posnFilename pn<font color=Cyan>)</font> f-<a name="line-254"></a>                             val <font color=Red>=</font> unsafePerformIO <font color=Cyan>(</font>readFile f'<font color=Cyan>)</font>-<a name="line-255"></a>                         reparse <font color=Cyan>(</font>xmlReLex <font color=Cyan>(</font>posInNewCxt f'-<a name="line-256"></a>                                                        <font color=Cyan>(</font>Just pn<font color=Cyan>)</font><font color=Cyan>)</font> val<font color=Cyan>)</font>-<a name="line-257"></a>                               <font color=Cyan>`debug`</font> <font color=Cyan>(</font><font color=Magenta>"  reading from file "</font><font color=Cyan>++</font>f'<font color=Cyan>)</font>-<a name="line-258"></a>                         peRef p-<a name="line-259"></a>           Nothing <font color=Red>-&gt;</font> fail <font color=Cyan>(</font><font color=Magenta>"PEReference use before definition: "</font><font color=Cyan>++</font><font color=Magenta>"%"</font><font color=Cyan>++</font>n<font color=Cyan>++</font><font color=Magenta>";"</font>-<a name="line-260"></a>                           <font color=Cyan>++</font><font color=Magenta>"\n    at "</font><font color=Cyan>++</font>show pn<font color=Cyan>)</font>-<a name="line-261"></a>-<a name="line-262"></a><a name="blank"></a><font color=Blue>blank</font> <font color=Red>::</font> XParser a <font color=Red>-&gt;</font> XParser a-<a name="line-263"></a><font color=Blue>blank</font> p <font color=Red>=</font>-<a name="line-264"></a>    p <font color=Cyan>`onFail`</font>-<a name="line-265"></a>    <font color=Green><u>do</u></font> n <font color=Red>&lt;-</font> pereference-<a name="line-266"></a>       tr <font color=Red>&lt;-</font> stQuery <font color=Cyan>(</font>lookupPE n<font color=Cyan>)</font> <font color=Cyan>`debug`</font> <font color=Cyan>(</font><font color=Magenta>"Looking up %"</font><font color=Cyan>++</font>n<font color=Cyan>++</font><font color=Magenta>" (is blank?)"</font><font color=Cyan>)</font>-<a name="line-267"></a>       <font color=Green><u>case</u></font> tr <font color=Green><u>of</u></font>-<a name="line-268"></a>           Just <font color=Cyan>(</font>PEDefEntityValue ev<font color=Cyan>)</font>-<a name="line-269"></a>                    <font color=Red>|</font> all isSpace <font color=Cyan>(</font>flattenEV ev<font color=Cyan>)</font>  <font color=Red>-&gt;</font>-<a name="line-270"></a>                            <font color=Green><u>do</u></font> blank p <font color=Cyan>`debug`</font> <font color=Magenta>"Empty macro definition"</font>-<a name="line-271"></a>           Just <font color=Green><u>_</u></font>  <font color=Red>-&gt;</font> failP <font color=Cyan>(</font><font color=Magenta>"expected a blank PERef macro: "</font><font color=Cyan>++</font><font color=Magenta>"%"</font><font color=Cyan>++</font>n<font color=Cyan>++</font><font color=Magenta>";"</font><font color=Cyan>)</font>-<a name="line-272"></a>           Nothing <font color=Red>-&gt;</font> failP <font color=Cyan>(</font><font color=Magenta>"PEReference use before definition: "</font><font color=Cyan>++</font><font color=Magenta>"%"</font><font color=Cyan>++</font>n<font color=Cyan>++</font><font color=Magenta>";"</font><font color=Cyan>)</font>-<a name="line-273"></a>-<a name="line-274"></a>-<a name="line-275"></a>-<a name="line-276"></a><font color=Blue>---- XML Parsing Functions ----</font>-<a name="line-277"></a>-<a name="line-278"></a><a name="justDTD"></a><font color=Blue>justDTD</font> <font color=Red>::</font> XParser <font color=Cyan>(</font>Maybe DocTypeDecl<font color=Cyan>)</font>-<a name="line-279"></a><font color=Blue>justDTD</font> <font color=Red>=</font>-<a name="line-280"></a>  <font color=Green><u>do</u></font> <font color=Cyan>(</font>ExtSubset <font color=Green><u>_</u></font> ds<font color=Cyan>)</font> <font color=Red>&lt;-</font> extsubset <font color=Cyan>`debug`</font> <font color=Magenta>"Trying external subset"</font>-<a name="line-281"></a>     <font color=Green><u>if</u></font> null ds <font color=Green><u>then</u></font> fail <font color=Magenta>"empty"</font>-<a name="line-282"></a>         <font color=Green><u>else</u></font> return <font color=Cyan>(</font>Just <font color=Cyan>(</font>DTD <font color=Magenta>"extsubset"</font> Nothing <font color=Cyan>(</font>concatMap extract ds<font color=Cyan>)</font><font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-283"></a>  <font color=Cyan>`onFail`</font>-<a name="line-284"></a>  <font color=Green><u>do</u></font> <font color=Cyan>(</font>Prolog <font color=Green><u>_</u></font> <font color=Green><u>_</u></font> dtd <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red>&lt;-</font> prolog-<a name="line-285"></a>     return dtd-<a name="line-286"></a> <font color=Green><u>where</u></font> extract <font color=Cyan>(</font>ExtMarkupDecl m<font color=Cyan>)</font> <font color=Red>=</font> <font color=Red>[</font>m<font color=Red>]</font>-<a name="line-287"></a>       extract <font color=Cyan>(</font>ExtConditionalSect <font color=Cyan>(</font>IncludeSect i<font color=Cyan>)</font><font color=Cyan>)</font> <font color=Red>=</font> concatMap extract i-<a name="line-288"></a>       extract <font color=Cyan>(</font>ExtConditionalSect <font color=Cyan>(</font>IgnoreSect i<font color=Cyan>)</font><font color=Cyan>)</font> <font color=Red>=</font> []-<a name="line-289"></a>-<a name="line-290"></a><a name="document"></a><font color=Blue>-- | Return an entire XML document including prolog and trailing junk.</font>-<a name="line-291"></a><font color=Blue>document</font> <font color=Red>::</font> XParser <font color=Cyan>(</font>Document Posn<font color=Cyan>)</font>-<a name="line-292"></a><font color=Blue>document</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-293"></a>    p <font color=Red>&lt;-</font> prolog <font color=Cyan>`adjustErr`</font> <font color=Cyan>(</font><font color=Magenta>"unrecognisable XML prolog\n"</font><font color=Cyan>++</font><font color=Cyan>)</font>-<a name="line-294"></a>    e <font color=Red>&lt;-</font> element-<a name="line-295"></a>    ms <font color=Red>&lt;-</font> many misc-<a name="line-296"></a>    <font color=Cyan>(</font><font color=Green><u>_</u></font><font color=Cyan>,</font>ge<font color=Cyan>)</font> <font color=Red>&lt;-</font> stGet-<a name="line-297"></a>    return <font color=Cyan>(</font>Document p ge e ms<font color=Cyan>)</font>-<a name="line-298"></a>-<a name="line-299"></a><a name="comment"></a><font color=Blue>-- | Return an XML comment.</font>-<a name="line-300"></a><font color=Blue>comment</font> <font color=Red>::</font> XParser Comment-<a name="line-301"></a><font color=Blue>comment</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-302"></a>    myBracket <font color=Cyan>(</font>tok TokCommentOpen<font color=Cyan>)</font> <font color=Cyan>(</font>tok TokCommentClose<font color=Cyan>)</font> freetext-<a name="line-303"></a><font color=Blue>--  tok TokCommentOpen</font>-<a name="line-304"></a><font color=Blue>--  commit $ do</font>-<a name="line-305"></a><font color=Blue>--    c &lt;- freetext</font>-<a name="line-306"></a><font color=Blue>--    tok TokCommentClose</font>-<a name="line-307"></a><font color=Blue>--    return c</font>-<a name="line-308"></a>-<a name="line-309"></a><a name="processinginstruction"></a><font color=Blue>-- | Parse a processing instruction.</font>-<a name="line-310"></a><font color=Blue>processinginstruction</font> <font color=Red>::</font> XParser ProcessingInstruction-<a name="line-311"></a><font color=Blue>processinginstruction</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-312"></a>    tok TokPIOpen-<a name="line-313"></a>    commit <font color=Cyan>$</font> <font color=Green><u>do</u></font>-<a name="line-314"></a>      n <font color=Red>&lt;-</font> string  <font color=Cyan>`onFail`</font> failP <font color=Magenta>"processing instruction has no target"</font>-<a name="line-315"></a>      f <font color=Red>&lt;-</font> freetext-<a name="line-316"></a>      tok TokPIClose <font color=Cyan>`onFail`</font> failP <font color=Cyan>(</font><font color=Magenta>"missing ?&gt; in &lt;?"</font><font color=Cyan>++</font>n<font color=Cyan>)</font>-<a name="line-317"></a>      return <font color=Cyan>(</font>n<font color=Cyan>,</font> f<font color=Cyan>)</font>-<a name="line-318"></a>-<a name="line-319"></a><a name="cdsect"></a><font color=Blue>cdsect</font> <font color=Red>::</font> XParser CDSect-<a name="line-320"></a><font color=Blue>cdsect</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-321"></a>    tok TokSectionOpen-<a name="line-322"></a>    bracket <font color=Cyan>(</font>tok <font color=Cyan>(</font>TokSection CDATAx<font color=Cyan>)</font><font color=Cyan>)</font> <font color=Cyan>(</font>tok TokSectionClose<font color=Cyan>)</font> chardata-<a name="line-323"></a>-<a name="line-324"></a><a name="prolog"></a><font color=Blue>prolog</font> <font color=Red>::</font> XParser Prolog-<a name="line-325"></a><font color=Blue>prolog</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-326"></a>    x   <font color=Red>&lt;-</font> maybe xmldecl-<a name="line-327"></a>    m1  <font color=Red>&lt;-</font> many misc-<a name="line-328"></a>    dtd <font color=Red>&lt;-</font> maybe doctypedecl-<a name="line-329"></a>    m2  <font color=Red>&lt;-</font> many misc-<a name="line-330"></a>    return <font color=Cyan>(</font>Prolog x m1 dtd m2<font color=Cyan>)</font>-<a name="line-331"></a>-<a name="line-332"></a><a name="xmldecl"></a><font color=Blue>xmldecl</font> <font color=Red>::</font> XParser XMLDecl-<a name="line-333"></a><font color=Blue>xmldecl</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-334"></a>    tok TokPIOpen-<a name="line-335"></a>    <font color=Cyan>(</font>word <font color=Magenta>"xml"</font> <font color=Cyan>`onFail`</font> word <font color=Magenta>"XML"</font><font color=Cyan>)</font>-<a name="line-336"></a>    p <font color=Red>&lt;-</font> posn-<a name="line-337"></a>    s <font color=Red>&lt;-</font> freetext-<a name="line-338"></a>    tok TokPIClose <font color=Cyan>`onFail`</font> failBadP <font color=Magenta>"missing ?&gt; in &lt;?xml ...?&gt;"</font>-<a name="line-339"></a>    raise <font color=Cyan>(</font><font color=Cyan>(</font>runParser aux emptySTs <font color=Cyan>.</font> xmlReLex p<font color=Cyan>)</font> s<font color=Cyan>)</font>-<a name="line-340"></a>  <font color=Green><u>where</u></font>-<a name="line-341"></a>    aux <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-342"></a>        v <font color=Red>&lt;-</font> versioninfo  <font color=Cyan>`onFail`</font> failP <font color=Magenta>"missing XML version info"</font>-<a name="line-343"></a>        e <font color=Red>&lt;-</font> maybe encodingdecl-<a name="line-344"></a>        s <font color=Red>&lt;-</font> maybe sddecl-<a name="line-345"></a>        return <font color=Cyan>(</font>XMLDecl v e s<font color=Cyan>)</font>-<a name="line-346"></a>    raise <font color=Cyan>(</font>Left err<font color=Cyan>,</font> <font color=Green><u>_</u></font><font color=Cyan>,</font> <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red>=</font> failP err-<a name="line-347"></a>    raise <font color=Cyan>(</font>Right ok<font color=Cyan>,</font> <font color=Green><u>_</u></font><font color=Cyan>,</font> <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red>=</font> return ok-<a name="line-348"></a>-<a name="line-349"></a><a name="versioninfo"></a><font color=Blue>versioninfo</font> <font color=Red>::</font> XParser VersionInfo-<a name="line-350"></a><font color=Blue>versioninfo</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-351"></a>    <font color=Cyan>(</font>word <font color=Magenta>"version"</font> <font color=Cyan>`onFail`</font> word <font color=Magenta>"VERSION"</font><font color=Cyan>)</font>-<a name="line-352"></a>    tok TokEqual-<a name="line-353"></a>    bracket <font color=Cyan>(</font>tok TokQuote<font color=Cyan>)</font> <font color=Cyan>(</font>tok TokQuote<font color=Cyan>)</font> freetext-<a name="line-354"></a>-<a name="line-355"></a><a name="misc"></a><font color=Blue>misc</font> <font color=Red>::</font> XParser Misc-<a name="line-356"></a><font color=Blue>misc</font> <font color=Red>=</font>-<a name="line-357"></a>    oneOf' <font color=Red>[</font> <font color=Cyan>(</font><font color=Magenta>"&lt;!--comment--&gt;"</font><font color=Cyan>,</font>  comment <font color=Cyan>&gt;&gt;=</font> return <font color=Cyan>.</font> Comment<font color=Cyan>)</font>-<a name="line-358"></a>           <font color=Cyan>,</font> <font color=Cyan>(</font><font color=Magenta>"&lt;?PI?&gt;"</font><font color=Cyan>,</font>          processinginstruction <font color=Cyan>&gt;&gt;=</font> return <font color=Cyan>.</font> PI<font color=Cyan>)</font>-<a name="line-359"></a>           <font color=Red>]</font>-<a name="line-360"></a>-<a name="line-361"></a><a name="doctypedecl"></a><font color=Blue>-- | Return a DOCTYPE decl, indicating a DTD.</font>-<a name="line-362"></a><font color=Blue>doctypedecl</font> <font color=Red>::</font> XParser DocTypeDecl-<a name="line-363"></a><font color=Blue>doctypedecl</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-364"></a>    tok TokSpecialOpen-<a name="line-365"></a>    tok <font color=Cyan>(</font>TokSpecial DOCTYPEx<font color=Cyan>)</font>-<a name="line-366"></a>    commit <font color=Cyan>$</font> <font color=Green><u>do</u></font>-<a name="line-367"></a>      n   <font color=Red>&lt;-</font> name-<a name="line-368"></a>      eid <font color=Red>&lt;-</font> maybe externalid-<a name="line-369"></a>      es  <font color=Red>&lt;-</font> maybe <font color=Cyan>(</font>bracket <font color=Cyan>(</font>tok TokSqOpen<font color=Cyan>)</font> <font color=Cyan>(</font>tok TokSqClose<font color=Cyan>)</font>-<a name="line-370"></a>                            <font color=Cyan>(</font>many <font color=Cyan>(</font>peRef markupdecl<font color=Cyan>)</font><font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-371"></a>      blank <font color=Cyan>(</font>tok TokAnyClose<font color=Cyan>)</font>  <font color=Cyan>`onFail`</font> failP <font color=Magenta>"missing &gt; in DOCTYPE decl"</font>-<a name="line-372"></a>      return <font color=Cyan>(</font>DTD n eid <font color=Cyan>(</font><font color=Green><u>case</u></font> es <font color=Green><u>of</u></font> <font color=Cyan>{</font> Nothing <font color=Red>-&gt;</font> []<font color=Cyan>;</font> Just e <font color=Red>-&gt;</font> e <font color=Cyan>}</font><font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-373"></a>-<a name="line-374"></a><a name="markupdecl"></a><font color=Blue>-- | Return a DTD markup decl, e.g. ELEMENT, ATTLIST, etc</font>-<a name="line-375"></a><font color=Blue>markupdecl</font> <font color=Red>::</font> XParser MarkupDecl-<a name="line-376"></a><font color=Blue>markupdecl</font> <font color=Red>=</font>-<a name="line-377"></a>  oneOf' <font color=Red>[</font> <font color=Cyan>(</font><font color=Magenta>"ELEMENT"</font><font color=Cyan>,</font>  elementdecl  <font color=Cyan>&gt;&gt;=</font> return <font color=Cyan>.</font> Element<font color=Cyan>)</font>-<a name="line-378"></a>         <font color=Cyan>,</font> <font color=Cyan>(</font><font color=Magenta>"ATTLIST"</font><font color=Cyan>,</font>  attlistdecl  <font color=Cyan>&gt;&gt;=</font> return <font color=Cyan>.</font> AttList<font color=Cyan>)</font>-<a name="line-379"></a>         <font color=Cyan>,</font> <font color=Cyan>(</font><font color=Magenta>"ENTITY"</font><font color=Cyan>,</font>   entitydecl   <font color=Cyan>&gt;&gt;=</font> return <font color=Cyan>.</font> Entity<font color=Cyan>)</font>-<a name="line-380"></a>         <font color=Cyan>,</font> <font color=Cyan>(</font><font color=Magenta>"NOTATION"</font><font color=Cyan>,</font> notationdecl <font color=Cyan>&gt;&gt;=</font> return <font color=Cyan>.</font> Notation<font color=Cyan>)</font>-<a name="line-381"></a>         <font color=Cyan>,</font> <font color=Cyan>(</font><font color=Magenta>"misc"</font><font color=Cyan>,</font>     misc         <font color=Cyan>&gt;&gt;=</font> return <font color=Cyan>.</font> MarkupMisc<font color=Cyan>)</font>-<a name="line-382"></a>         <font color=Red>]</font>-<a name="line-383"></a>    <font color=Cyan>`adjustErrP`</font>-<a name="line-384"></a>          <font color=Cyan>(</font><font color=Magenta>"when looking for a markup decl,\n"</font><font color=Cyan>++</font><font color=Cyan>)</font>-<a name="line-385"></a> <font color=Blue>--       (\  (ELEMENT, ATTLIST, ENTITY, NOTATION, &lt;!--comment--&gt;, or &lt;?PI?&gt;")</font>-<a name="line-386"></a>-<a name="line-387"></a><a name="extsubset"></a><font color=Blue>extsubset</font> <font color=Red>::</font> XParser ExtSubset-<a name="line-388"></a><font color=Blue>extsubset</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-389"></a>    td <font color=Red>&lt;-</font> maybe textdecl-<a name="line-390"></a>    ds <font color=Red>&lt;-</font> many <font color=Cyan>(</font>peRef extsubsetdecl<font color=Cyan>)</font>-<a name="line-391"></a>    return <font color=Cyan>(</font>ExtSubset td ds<font color=Cyan>)</font>-<a name="line-392"></a>-<a name="line-393"></a><a name="extsubsetdecl"></a><font color=Blue>extsubsetdecl</font> <font color=Red>::</font> XParser ExtSubsetDecl-<a name="line-394"></a><font color=Blue>extsubsetdecl</font> <font color=Red>=</font>-<a name="line-395"></a>    <font color=Cyan>(</font> markupdecl <font color=Cyan>&gt;&gt;=</font> return <font color=Cyan>.</font> ExtMarkupDecl<font color=Cyan>)</font> <font color=Cyan>`onFail`</font>-<a name="line-396"></a>    <font color=Cyan>(</font> conditionalsect <font color=Cyan>&gt;&gt;=</font> return <font color=Cyan>.</font> ExtConditionalSect<font color=Cyan>)</font>-<a name="line-397"></a>-<a name="line-398"></a><a name="sddecl"></a><font color=Blue>sddecl</font> <font color=Red>::</font> XParser SDDecl-<a name="line-399"></a><font color=Blue>sddecl</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-400"></a>    <font color=Cyan>(</font>word <font color=Magenta>"standalone"</font> <font color=Cyan>`onFail`</font> word <font color=Magenta>"STANDALONE"</font><font color=Cyan>)</font>-<a name="line-401"></a>    commit <font color=Cyan>$</font> <font color=Green><u>do</u></font>-<a name="line-402"></a>      tok TokEqual <font color=Cyan>`onFail`</font> failP <font color=Magenta>"missing = in 'standalone' decl"</font>-<a name="line-403"></a>      bracket <font color=Cyan>(</font>tok TokQuote<font color=Cyan>)</font> <font color=Cyan>(</font>tok TokQuote<font color=Cyan>)</font>-<a name="line-404"></a>              <font color=Cyan>(</font> <font color=Cyan>(</font>word <font color=Magenta>"yes"</font> <font color=Cyan>&gt;&gt;</font> return True<font color=Cyan>)</font> <font color=Cyan>`onFail`</font>-<a name="line-405"></a>                <font color=Cyan>(</font>word <font color=Magenta>"no"</font> <font color=Cyan>&gt;&gt;</font> return False<font color=Cyan>)</font> <font color=Cyan>`onFail`</font>-<a name="line-406"></a>                failP <font color=Magenta>"'standalone' decl requires 'yes' or 'no' value"</font> <font color=Cyan>)</font>-<a name="line-407"></a>-<a name="line-408"></a><font color=Blue>{--<a name="line-409"></a>element :: XParser (Element Posn)-<a name="line-410"></a>element = do-<a name="line-411"></a>    tok TokAnyOpen-<a name="line-412"></a>    (ElemTag n as) &lt;- elemtag-<a name="line-413"></a>    oneOf' [ ("self-closing tag &lt;"++n++"/&gt;"-<a name="line-414"></a>             ,  do tok TokEndClose-<a name="line-415"></a>                   return (Elem n as []))-<a name="line-416"></a>           , ("after open tag &lt;"++n++"&gt;"-<a name="line-417"></a>             ,  do tok TokAnyClose-<a name="line-418"></a>                   cs &lt;- many content-<a name="line-419"></a>                   p  &lt;- posn-<a name="line-420"></a>                   m  &lt;- bracket (tok TokEndOpen) (tok TokAnyClose) name-<a name="line-421"></a>                   checkmatch p n m-<a name="line-422"></a>                   return (Elem n as cs))-<a name="line-423"></a>           ] `adjustErr` (("in element tag "++n++",\n")++)-<a name="line-424"></a>-}</font>-<a name="line-425"></a>-<a name="line-426"></a><a name="element"></a><font color=Blue>-- | Return a complete element including all its inner content.</font>-<a name="line-427"></a><font color=Blue>element</font> <font color=Red>::</font> XParser <font color=Cyan>(</font>Element Posn<font color=Cyan>)</font>-<a name="line-428"></a><font color=Blue>element</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-429"></a>    tok TokAnyOpen-<a name="line-430"></a>    <font color=Cyan>(</font>ElemTag n <font color=Green><u>as</u></font><font color=Cyan>)</font> <font color=Red>&lt;-</font> elemtag-<a name="line-431"></a>    <font color=Cyan>(</font> <font color=Green><u>do</u></font> tok TokEndClose-<a name="line-432"></a>         commit <font color=Cyan>(</font>return <font color=Cyan>(</font>Elem n <font color=Green><u>as</u></font> []<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-433"></a>        <font color=Cyan>`onFail`</font>-<a name="line-434"></a>      <font color=Green><u>do</u></font> tok TokAnyClose-<a name="line-435"></a>         commit <font color=Cyan>$</font> <font color=Green><u>do</u></font>-<a name="line-436"></a>           return <font color=Cyan>(</font>Elem n <font color=Green><u>as</u></font><font color=Cyan>)</font> <font color=Cyan>`apply`</font>-<a name="line-437"></a>                 manyFinally content-<a name="line-438"></a>                             <font color=Cyan>(</font><font color=Green><u>do</u></font> p <font color=Red>&lt;-</font> posn-<a name="line-439"></a>                                 m <font color=Red>&lt;-</font> bracket <font color=Cyan>(</font>tok TokEndOpen<font color=Cyan>)</font>-<a name="line-440"></a>                                              <font color=Cyan>(</font>tok TokAnyClose<font color=Cyan>)</font> name-<a name="line-441"></a>                                 checkmatch p n m<font color=Cyan>)</font>-<a name="line-442"></a>      <font color=Cyan>)</font> <font color=Cyan>`adjustErrBad`</font> <font color=Cyan>(</font><font color=Cyan>(</font><font color=Magenta>"in element tag "</font><font color=Cyan>++</font>n<font color=Cyan>++</font><font color=Magenta>",\n"</font><font color=Cyan>)</font><font color=Cyan>++</font><font color=Cyan>)</font>-<a name="line-443"></a>-<a name="line-444"></a><a name="checkmatch"></a><font color=Blue>checkmatch</font> <font color=Red>::</font> Posn <font color=Red>-&gt;</font> Name <font color=Red>-&gt;</font> Name <font color=Red>-&gt;</font> XParser ()-<a name="line-445"></a><font color=Blue>checkmatch</font> p n m <font color=Red>=</font>-<a name="line-446"></a>  <font color=Green><u>if</u></font> n <font color=Cyan>==</font> m <font color=Green><u>then</u></font> return ()-<a name="line-447"></a>  <font color=Green><u>else</u></font> failBadP <font color=Cyan>(</font><font color=Magenta>"tag &lt;"</font><font color=Cyan>++</font>n<font color=Cyan>++</font><font color=Magenta>"&gt; terminated by &lt;/"</font><font color=Cyan>++</font>m<font color=Cyan>++</font><font color=Magenta>"&gt;"</font><font color=Cyan>)</font>-<a name="line-448"></a>-<a name="line-449"></a><a name="elemtag"></a><font color=Blue>-- | Parse only the parts between angle brackets in an element tag.</font>-<a name="line-450"></a><font color=Blue>elemtag</font> <font color=Red>::</font> XParser ElemTag-<a name="line-451"></a><font color=Blue>elemtag</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-452"></a>    n  <font color=Red>&lt;-</font> name <font color=Cyan>`adjustErrBad`</font> <font color=Cyan>(</font><font color=Magenta>"malformed element tag\n"</font><font color=Cyan>++</font><font color=Cyan>)</font>-<a name="line-453"></a>    <font color=Green><u>as</u></font> <font color=Red>&lt;-</font> many attribute-<a name="line-454"></a>    return <font color=Cyan>(</font>ElemTag n <font color=Green><u>as</u></font><font color=Cyan>)</font>-<a name="line-455"></a>-<a name="line-456"></a><a name="elemOpenTag"></a><font color=Blue>-- | For use with stream parsers - returns the complete opening element tag.</font>-<a name="line-457"></a><font color=Blue>elemOpenTag</font> <font color=Red>::</font> XParser ElemTag-<a name="line-458"></a><font color=Blue>elemOpenTag</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-459"></a>    tok TokAnyOpen-<a name="line-460"></a>    e <font color=Red>&lt;-</font> elemtag-<a name="line-461"></a>    tok TokAnyClose-<a name="line-462"></a>    return e-<a name="line-463"></a>-<a name="line-464"></a><a name="elemCloseTag"></a><font color=Blue>-- | For use with stream parsers - accepts a closing tag, provided it</font>-<a name="line-465"></a><font color=Blue>--   matches the given element name.</font>-<a name="line-466"></a><font color=Blue>elemCloseTag</font> <font color=Red>::</font> Name <font color=Red>-&gt;</font> XParser ()-<a name="line-467"></a><font color=Blue>elemCloseTag</font> n <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-468"></a>    tok TokEndOpen-<a name="line-469"></a>    p <font color=Red>&lt;-</font> posn-<a name="line-470"></a>    m <font color=Red>&lt;-</font> name-<a name="line-471"></a>    tok TokAnyClose-<a name="line-472"></a>    checkmatch p n m-<a name="line-473"></a>-<a name="line-474"></a><a name="attribute"></a><font color=Blue>attribute</font> <font color=Red>::</font> XParser Attribute-<a name="line-475"></a><font color=Blue>attribute</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-476"></a>    n <font color=Red>&lt;-</font> name <font color=Cyan>`adjustErr`</font> <font color=Cyan>(</font><font color=Magenta>"malformed attribute name\n"</font><font color=Cyan>++</font><font color=Cyan>)</font>-<a name="line-477"></a>    tok TokEqual <font color=Cyan>`onFail`</font> failBadP <font color=Magenta>"missing = in attribute"</font>-<a name="line-478"></a>    v <font color=Red>&lt;-</font> attvalue <font color=Cyan>`onFail`</font> failBadP <font color=Magenta>"missing attvalue"</font>-<a name="line-479"></a>    return <font color=Cyan>(</font>n<font color=Cyan>,</font>v<font color=Cyan>)</font>-<a name="line-480"></a>-<a name="line-481"></a><a name="content"></a><font color=Blue>-- | Return a content particle, e.g. text, element, reference, etc</font>-<a name="line-482"></a><font color=Blue>content</font> <font color=Red>::</font> XParser <font color=Cyan>(</font>Content Posn<font color=Cyan>)</font>-<a name="line-483"></a><font color=Blue>content</font> <font color=Red>=</font>-<a name="line-484"></a>  <font color=Green><u>do</u></font> <font color=Cyan>{</font> p  <font color=Red>&lt;-</font> posn-<a name="line-485"></a>     <font color=Cyan>;</font> c' <font color=Red>&lt;-</font> content'-<a name="line-486"></a>     <font color=Cyan>;</font> return <font color=Cyan>(</font>c' p<font color=Cyan>)</font>-<a name="line-487"></a>     <font color=Cyan>}</font>-<a name="line-488"></a>  <font color=Green><u>where</u></font>-<a name="line-489"></a>     content' <font color=Red>=</font> oneOf' <font color=Red>[</font> <font color=Cyan>(</font><font color=Magenta>"element"</font><font color=Cyan>,</font>   element   <font color=Cyan>&gt;&gt;=</font> return <font color=Cyan>.</font> CElem<font color=Cyan>)</font>-<a name="line-490"></a>                       <font color=Cyan>,</font> <font color=Cyan>(</font><font color=Magenta>"chardata"</font><font color=Cyan>,</font>  chardata  <font color=Cyan>&gt;&gt;=</font> return <font color=Cyan>.</font> CString False<font color=Cyan>)</font>-<a name="line-491"></a>                       <font color=Cyan>,</font> <font color=Cyan>(</font><font color=Magenta>"reference"</font><font color=Cyan>,</font> reference <font color=Cyan>&gt;&gt;=</font> return <font color=Cyan>.</font> CRef<font color=Cyan>)</font>-<a name="line-492"></a>                       <font color=Cyan>,</font> <font color=Cyan>(</font><font color=Magenta>"CDATA"</font><font color=Cyan>,</font>     cdsect    <font color=Cyan>&gt;&gt;=</font> return <font color=Cyan>.</font> CString True<font color=Cyan>)</font>-<a name="line-493"></a>                       <font color=Cyan>,</font> <font color=Cyan>(</font><font color=Magenta>"misc"</font><font color=Cyan>,</font>      misc      <font color=Cyan>&gt;&gt;=</font> return <font color=Cyan>.</font> CMisc<font color=Cyan>)</font>-<a name="line-494"></a>                       <font color=Red>]</font>-<a name="line-495"></a>                  <font color=Cyan>`adjustErrP`</font> <font color=Cyan>(</font><font color=Magenta>"when looking for a content item,\n"</font><font color=Cyan>++</font><font color=Cyan>)</font>-<a name="line-496"></a><font color=Blue>-- (\    (element, text, reference, CDATA section, &lt;!--comment--&gt;, or &lt;?PI?&gt;")</font>-<a name="line-497"></a>-<a name="line-498"></a><a name="elementdecl"></a><font color=Blue>elementdecl</font> <font color=Red>::</font> XParser ElementDecl-<a name="line-499"></a><font color=Blue>elementdecl</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-500"></a>    tok TokSpecialOpen-<a name="line-501"></a>    tok <font color=Cyan>(</font>TokSpecial ELEMENTx<font color=Cyan>)</font>-<a name="line-502"></a>    n <font color=Red>&lt;-</font> peRef name <font color=Cyan>`adjustErrBad`</font> <font color=Cyan>(</font><font color=Magenta>"expecting identifier in ELEMENT decl\n"</font><font color=Cyan>++</font><font color=Cyan>)</font>-<a name="line-503"></a>    c <font color=Red>&lt;-</font> peRef contentspec-<a name="line-504"></a>             <font color=Cyan>`adjustErrBad`</font> <font color=Cyan>(</font><font color=Cyan>(</font><font color=Magenta>"in content spec of ELEMENT decl: "</font><font color=Cyan>++</font>n<font color=Cyan>++</font><font color=Magenta>"\n"</font><font color=Cyan>)</font><font color=Cyan>++</font><font color=Cyan>)</font>-<a name="line-505"></a>    blank <font color=Cyan>(</font>tok TokAnyClose<font color=Cyan>)</font> <font color=Cyan>`onFail`</font> failBadP-<a name="line-506"></a>       <font color=Cyan>(</font><font color=Magenta>"expected &gt; terminating ELEMENT decl"</font>-<a name="line-507"></a>       <font color=Cyan>++</font><font color=Magenta>"\n    element name was "</font><font color=Cyan>++</font>show n-<a name="line-508"></a>       <font color=Cyan>++</font><font color=Magenta>"\n    contentspec was "</font><font color=Cyan>++</font><font color=Cyan>(</font><font color=Red>\</font> <font color=Cyan>(</font>ContentSpec p<font color=Cyan>)</font><font color=Red>-&gt;</font> show p<font color=Cyan>)</font> c<font color=Cyan>)</font>-<a name="line-509"></a>    return <font color=Cyan>(</font>ElementDecl n c<font color=Cyan>)</font>-<a name="line-510"></a>-<a name="line-511"></a><a name="contentspec"></a><font color=Blue>contentspec</font> <font color=Red>::</font> XParser ContentSpec-<a name="line-512"></a><font color=Blue>contentspec</font> <font color=Red>=</font>-<a name="line-513"></a>    oneOf' <font color=Red>[</font> <font color=Cyan>(</font><font color=Magenta>"EMPTY"</font><font color=Cyan>,</font>  peRef <font color=Cyan>(</font>word <font color=Magenta>"EMPTY"</font><font color=Cyan>)</font> <font color=Cyan>&gt;&gt;</font> return EMPTY<font color=Cyan>)</font>-<a name="line-514"></a>           <font color=Cyan>,</font> <font color=Cyan>(</font><font color=Magenta>"ANY"</font><font color=Cyan>,</font>    peRef <font color=Cyan>(</font>word <font color=Magenta>"ANY"</font><font color=Cyan>)</font> <font color=Cyan>&gt;&gt;</font> return ANY<font color=Cyan>)</font>-<a name="line-515"></a>           <font color=Cyan>,</font> <font color=Cyan>(</font><font color=Magenta>"mixed"</font><font color=Cyan>,</font>  peRef mixed <font color=Cyan>&gt;&gt;=</font> return <font color=Cyan>.</font> Mixed<font color=Cyan>)</font>-<a name="line-516"></a>           <font color=Cyan>,</font> <font color=Cyan>(</font><font color=Magenta>"simple"</font><font color=Cyan>,</font> peRef cp <font color=Cyan>&gt;&gt;=</font> return <font color=Cyan>.</font> ContentSpec<font color=Cyan>)</font>-<a name="line-517"></a>           <font color=Red>]</font>-<a name="line-518"></a> <font color=Blue>--   `adjustErr` ("when looking for content spec,\n"++)</font>-<a name="line-519"></a> <font color=Blue>--   `adjustErr` (++"\nLooking for content spec (EMPTY, ANY, mixed, etc)")</font>-<a name="line-520"></a>-<a name="line-521"></a><a name="choice"></a><font color=Blue>choice</font> <font color=Red>::</font> XParser <font color=Red>[</font>CP<font color=Red>]</font>-<a name="line-522"></a><font color=Blue>choice</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-523"></a>    myBracket <font color=Cyan>(</font>tok TokBraOpen <font color=Cyan>`debug`</font> <font color=Magenta>"Trying choice"</font><font color=Cyan>)</font>-<a name="line-524"></a>              <font color=Cyan>(</font>blank <font color=Cyan>(</font>tok TokBraClose <font color=Cyan>`debug`</font> <font color=Magenta>"Succeeded with choice"</font><font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-525"></a>              <font color=Cyan>(</font>peRef cp <font color=Cyan>`sepBy1`</font> blank <font color=Cyan>(</font>tok TokPipe<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-526"></a>-<a name="line-527"></a><a name="sequence"></a><font color=Blue>sequence</font> <font color=Red>::</font> XParser <font color=Red>[</font>CP<font color=Red>]</font>-<a name="line-528"></a><font color=Blue>sequence</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-529"></a> myBracket <font color=Cyan>(</font>tok TokBraOpen <font color=Cyan>`debug`</font> <font color=Magenta>"Trying sequence"</font><font color=Cyan>)</font>-<a name="line-530"></a>           <font color=Cyan>(</font>blank <font color=Cyan>(</font>tok TokBraClose <font color=Cyan>`debug`</font> <font color=Magenta>"Succeeded with sequence"</font><font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-531"></a>           <font color=Cyan>(</font>peRef cp <font color=Cyan>`sepBy1`</font> blank <font color=Cyan>(</font>tok TokComma<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-532"></a>-<a name="line-533"></a><a name="cp"></a><font color=Blue>cp</font> <font color=Red>::</font> XParser CP-<a name="line-534"></a><font color=Blue>cp</font> <font color=Red>=</font> oneOf <font color=Red>[</font> <font color=Cyan>(</font> <font color=Green><u>do</u></font> n <font color=Red>&lt;-</font> name-<a name="line-535"></a>                  m <font color=Red>&lt;-</font> modifier-<a name="line-536"></a>                  <font color=Green><u>let</u></font> c <font color=Red>=</font> TagName n m-<a name="line-537"></a>                  return c <font color=Cyan>`debug`</font> <font color=Cyan>(</font><font color=Magenta>"ContentSpec: name "</font><font color=Cyan>++</font>show c<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-538"></a>           <font color=Cyan>,</font> <font color=Cyan>(</font> <font color=Green><u>do</u></font> ss <font color=Red>&lt;-</font> sequence-<a name="line-539"></a>                  m <font color=Red>&lt;-</font> modifier-<a name="line-540"></a>                  <font color=Green><u>let</u></font> c <font color=Red>=</font> Seq ss m-<a name="line-541"></a>                  return c <font color=Cyan>`debug`</font> <font color=Cyan>(</font><font color=Magenta>"ContentSpec: sequence "</font><font color=Cyan>++</font>show c<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-542"></a>           <font color=Cyan>,</font> <font color=Cyan>(</font> <font color=Green><u>do</u></font> cs <font color=Red>&lt;-</font> choice-<a name="line-543"></a>                  m <font color=Red>&lt;-</font> modifier-<a name="line-544"></a>                  <font color=Green><u>let</u></font> c <font color=Red>=</font> Choice cs m-<a name="line-545"></a>                  return c <font color=Cyan>`debug`</font> <font color=Cyan>(</font><font color=Magenta>"ContentSpec: choice "</font><font color=Cyan>++</font>show c<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-546"></a>           <font color=Red>]</font> <font color=Cyan>`adjustErr`</font> <font color=Cyan>(</font><font color=Cyan>++</font><font color=Magenta>"\nwhen looking for a content particle"</font><font color=Cyan>)</font>-<a name="line-547"></a>-<a name="line-548"></a><a name="modifier"></a><font color=Blue>modifier</font> <font color=Red>::</font> XParser Modifier-<a name="line-549"></a><font color=Blue>modifier</font> <font color=Red>=</font> oneOf <font color=Red>[</font> <font color=Cyan>(</font> tok TokStar <font color=Cyan>&gt;&gt;</font> return Star <font color=Cyan>)</font>-<a name="line-550"></a>                 <font color=Cyan>,</font> <font color=Cyan>(</font> tok TokQuery <font color=Cyan>&gt;&gt;</font> return Query <font color=Cyan>)</font>-<a name="line-551"></a>                 <font color=Cyan>,</font> <font color=Cyan>(</font> tok TokPlus <font color=Cyan>&gt;&gt;</font> return Plus <font color=Cyan>)</font>-<a name="line-552"></a>                 <font color=Cyan>,</font> <font color=Cyan>(</font> return None <font color=Cyan>)</font>-<a name="line-553"></a>                 <font color=Red>]</font>-<a name="line-554"></a>-<a name="line-555"></a><font color=Blue>-- just for debugging</font>-<a name="line-556"></a><font color=Green><u>instance</u></font> Show CP <font color=Green><u>where</u></font>-<a name="line-557"></a>    show <font color=Cyan>(</font>TagName n m<font color=Cyan>)</font> <font color=Red>=</font> n<font color=Cyan>++</font>show m-<a name="line-558"></a>    show <font color=Cyan>(</font>Choice cps m<font color=Cyan>)</font> <font color=Red>=</font> <font color=Magenta>'('</font><font color=Red><b>:</b></font> concat <font color=Cyan>(</font>intersperse <font color=Magenta>"|"</font> <font color=Cyan>(</font>map show cps<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-559"></a>                          <font color=Cyan>++</font><font color=Magenta>")"</font><font color=Cyan>++</font>show m-<a name="line-560"></a>    show <font color=Cyan>(</font>Seq cps m<font color=Cyan>)</font> <font color=Red>=</font> <font color=Magenta>'('</font><font color=Red><b>:</b></font> concat <font color=Cyan>(</font>intersperse <font color=Magenta>","</font> <font color=Cyan>(</font>map show cps<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-561"></a>                          <font color=Cyan>++</font><font color=Magenta>")"</font><font color=Cyan>++</font>show m-<a name="line-562"></a><font color=Green><u>instance</u></font> Show Modifier <font color=Green><u>where</u></font>-<a name="line-563"></a>    show None <font color=Red>=</font> <font color=Magenta>""</font>-<a name="line-564"></a>    show Query <font color=Red>=</font> <font color=Magenta>"?"</font>-<a name="line-565"></a>    show Star <font color=Red>=</font> <font color=Magenta>"*"</font>-<a name="line-566"></a>    show Plus <font color=Red>=</font> <font color=Magenta>"+"</font>-<a name="line-567"></a><font color=Blue>----</font>-<a name="line-568"></a>-<a name="line-569"></a><a name="mixed"></a><font color=Blue>mixed</font> <font color=Red>::</font> XParser Mixed-<a name="line-570"></a><font color=Blue>mixed</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-571"></a>    tok TokBraOpen-<a name="line-572"></a>    peRef <font color=Cyan>(</font><font color=Green><u>do</u></font> tok TokHash-<a name="line-573"></a>              word <font color=Magenta>"PCDATA"</font><font color=Cyan>)</font>-<a name="line-574"></a>    commit <font color=Cyan>$</font>-<a name="line-575"></a>      oneOf <font color=Red>[</font> <font color=Cyan>(</font> <font color=Green><u>do</u></font> cs <font color=Red>&lt;-</font> many <font color=Cyan>(</font>peRef <font color=Cyan>(</font><font color=Green><u>do</u></font> tok TokPipe-<a name="line-576"></a>                                         peRef name<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-577"></a>                   blank <font color=Cyan>(</font>tok TokBraClose <font color=Cyan>&gt;&gt;</font> tok TokStar<font color=Cyan>)</font>-<a name="line-578"></a>                   return <font color=Cyan>(</font>PCDATAplus cs<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-579"></a>            <font color=Cyan>,</font> <font color=Cyan>(</font> blank <font color=Cyan>(</font>tok TokBraClose <font color=Cyan>&gt;&gt;</font> tok TokStar<font color=Cyan>)</font> <font color=Cyan>&gt;&gt;</font> return PCDATA<font color=Cyan>)</font>-<a name="line-580"></a>            <font color=Cyan>,</font> <font color=Cyan>(</font> blank <font color=Cyan>(</font>tok TokBraClose<font color=Cyan>)</font> <font color=Cyan>&gt;&gt;</font> return PCDATA<font color=Cyan>)</font>-<a name="line-581"></a>            <font color=Red>]</font>-<a name="line-582"></a>        <font color=Cyan>`adjustErrP`</font> <font color=Cyan>(</font><font color=Cyan>++</font><font color=Magenta>"\nLooking for mixed content spec (#PCDATA | ...)*\n"</font><font color=Cyan>)</font>-<a name="line-583"></a>-<a name="line-584"></a><a name="attlistdecl"></a><font color=Blue>attlistdecl</font> <font color=Red>::</font> XParser AttListDecl-<a name="line-585"></a><font color=Blue>attlistdecl</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-586"></a>    tok TokSpecialOpen-<a name="line-587"></a>    tok <font color=Cyan>(</font>TokSpecial ATTLISTx<font color=Cyan>)</font>-<a name="line-588"></a>    n <font color=Red>&lt;-</font> peRef name <font color=Cyan>`adjustErrBad`</font> <font color=Cyan>(</font><font color=Magenta>"expecting identifier in ATTLIST\n"</font><font color=Cyan>++</font><font color=Cyan>)</font>-<a name="line-589"></a>    ds <font color=Red>&lt;-</font> peRef <font color=Cyan>(</font>many1 <font color=Cyan>(</font>peRef attdef<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-590"></a>    blank <font color=Cyan>(</font>tok TokAnyClose<font color=Cyan>)</font> <font color=Cyan>`onFail`</font> failBadP <font color=Magenta>"missing &gt; terminating ATTLIST"</font>-<a name="line-591"></a>    return <font color=Cyan>(</font>AttListDecl n ds<font color=Cyan>)</font>-<a name="line-592"></a>-<a name="line-593"></a><a name="attdef"></a><font color=Blue>attdef</font> <font color=Red>::</font> XParser AttDef-<a name="line-594"></a><font color=Blue>attdef</font> <font color=Red>=</font>-<a name="line-595"></a>  <font color=Green><u>do</u></font> n <font color=Red>&lt;-</font> peRef name <font color=Cyan>`adjustErr`</font> <font color=Cyan>(</font><font color=Magenta>"expecting attribute name\n"</font><font color=Cyan>++</font><font color=Cyan>)</font>-<a name="line-596"></a>     t <font color=Red>&lt;-</font> peRef atttype <font color=Cyan>`adjustErr`</font> <font color=Cyan>(</font><font color=Cyan>(</font><font color=Magenta>"within attlist defn: "</font><font color=Cyan>++</font>n<font color=Cyan>++</font><font color=Magenta>",\n"</font><font color=Cyan>)</font><font color=Cyan>++</font><font color=Cyan>)</font>-<a name="line-597"></a>     d <font color=Red>&lt;-</font> peRef defaultdecl <font color=Cyan>`adjustErr`</font> <font color=Cyan>(</font><font color=Cyan>(</font><font color=Magenta>"in attlist defn: "</font><font color=Cyan>++</font>n<font color=Cyan>++</font><font color=Magenta>",\n"</font><font color=Cyan>)</font><font color=Cyan>++</font><font color=Cyan>)</font>-<a name="line-598"></a>     return <font color=Cyan>(</font>AttDef n t d<font color=Cyan>)</font>-<a name="line-599"></a>-<a name="line-600"></a><a name="atttype"></a><font color=Blue>atttype</font> <font color=Red>::</font> XParser AttType-<a name="line-601"></a><font color=Blue>atttype</font> <font color=Red>=</font>-<a name="line-602"></a>    oneOf' <font color=Red>[</font> <font color=Cyan>(</font><font color=Magenta>"CDATA"</font><font color=Cyan>,</font>      word <font color=Magenta>"CDATA"</font> <font color=Cyan>&gt;&gt;</font> return StringType<font color=Cyan>)</font>-<a name="line-603"></a>           <font color=Cyan>,</font> <font color=Cyan>(</font><font color=Magenta>"tokenized"</font><font color=Cyan>,</font>  tokenizedtype <font color=Cyan>&gt;&gt;=</font> return <font color=Cyan>.</font> TokenizedType<font color=Cyan>)</font>-<a name="line-604"></a>           <font color=Cyan>,</font> <font color=Cyan>(</font><font color=Magenta>"enumerated"</font><font color=Cyan>,</font> enumeratedtype <font color=Cyan>&gt;&gt;=</font> return <font color=Cyan>.</font> EnumeratedType<font color=Cyan>)</font>-<a name="line-605"></a>           <font color=Red>]</font>-<a name="line-606"></a>      <font color=Cyan>`adjustErr`</font> <font color=Cyan>(</font><font color=Magenta>"looking for ATTTYPE,\n"</font><font color=Cyan>++</font><font color=Cyan>)</font>-<a name="line-607"></a> <font color=Blue>--   `adjustErr` (++"\nLooking for ATTTYPE (CDATA, tokenized, or enumerated")</font>-<a name="line-608"></a>-<a name="line-609"></a><a name="tokenizedtype"></a><font color=Blue>tokenizedtype</font> <font color=Red>::</font> XParser TokenizedType-<a name="line-610"></a><font color=Blue>tokenizedtype</font> <font color=Red>=</font>-<a name="line-611"></a>    oneOf <font color=Red>[</font> <font color=Cyan>(</font> word <font color=Magenta>"ID"</font> <font color=Cyan>&gt;&gt;</font> return ID<font color=Cyan>)</font>-<a name="line-612"></a>          <font color=Cyan>,</font> <font color=Cyan>(</font> word <font color=Magenta>"IDREF"</font> <font color=Cyan>&gt;&gt;</font> return IDREF<font color=Cyan>)</font>-<a name="line-613"></a>          <font color=Cyan>,</font> <font color=Cyan>(</font> word <font color=Magenta>"IDREFS"</font> <font color=Cyan>&gt;&gt;</font> return IDREFS<font color=Cyan>)</font>-<a name="line-614"></a>          <font color=Cyan>,</font> <font color=Cyan>(</font> word <font color=Magenta>"ENTITY"</font> <font color=Cyan>&gt;&gt;</font> return ENTITY<font color=Cyan>)</font>-<a name="line-615"></a>          <font color=Cyan>,</font> <font color=Cyan>(</font> word <font color=Magenta>"ENTITIES"</font> <font color=Cyan>&gt;&gt;</font> return ENTITIES<font color=Cyan>)</font>-<a name="line-616"></a>          <font color=Cyan>,</font> <font color=Cyan>(</font> word <font color=Magenta>"NMTOKEN"</font> <font color=Cyan>&gt;&gt;</font> return NMTOKEN<font color=Cyan>)</font>-<a name="line-617"></a>          <font color=Cyan>,</font> <font color=Cyan>(</font> word <font color=Magenta>"NMTOKENS"</font> <font color=Cyan>&gt;&gt;</font> return NMTOKENS<font color=Cyan>)</font>-<a name="line-618"></a>          <font color=Red>]</font> <font color=Cyan>`onFail`</font>-<a name="line-619"></a>    <font color=Green><u>do</u></font> <font color=Cyan>{</font> t <font color=Red>&lt;-</font> next-<a name="line-620"></a>       <font color=Cyan>;</font> failP <font color=Cyan>(</font><font color=Magenta>"Expected one of"</font>-<a name="line-621"></a>               <font color=Cyan>++</font><font color=Magenta>" (ID, IDREF, IDREFS, ENTITY, ENTITIES, NMTOKEN, NMTOKENS)"</font>-<a name="line-622"></a>               <font color=Cyan>++</font><font color=Magenta>"\nbut got "</font><font color=Cyan>++</font>show t<font color=Cyan>)</font>-<a name="line-623"></a>       <font color=Cyan>}</font>-<a name="line-624"></a><font color=Blue>-- `adjustErr` (++"\nLooking for a tokenized type:\n\ </font>-<a name="line-625"></a><font color=Blue>-- \    (ID, IDREF, IDREFS, ENTITY, ENTITIES, NMTOKEN, NMTOKENS)")</font>-<a name="line-626"></a>-<a name="line-627"></a><a name="enumeratedtype"></a><font color=Blue>enumeratedtype</font> <font color=Red>::</font> XParser EnumeratedType-<a name="line-628"></a><font color=Blue>enumeratedtype</font> <font color=Red>=</font>-<a name="line-629"></a>    oneOf' <font color=Red>[</font> <font color=Cyan>(</font><font color=Magenta>"NOTATION"</font><font color=Cyan>,</font>   notationtype <font color=Cyan>&gt;&gt;=</font> return <font color=Cyan>.</font> NotationType<font color=Cyan>)</font>-<a name="line-630"></a>           <font color=Cyan>,</font> <font color=Cyan>(</font><font color=Magenta>"enumerated"</font><font color=Cyan>,</font> enumeration <font color=Cyan>&gt;&gt;=</font> return <font color=Cyan>.</font> Enumeration<font color=Cyan>)</font>-<a name="line-631"></a>           <font color=Red>]</font>-<a name="line-632"></a>      <font color=Cyan>`adjustErr`</font> <font color=Cyan>(</font><font color=Magenta>"looking for an enumerated or NOTATION type,\n"</font><font color=Cyan>++</font><font color=Cyan>)</font>-<a name="line-633"></a>-<a name="line-634"></a><a name="notationtype"></a><font color=Blue>notationtype</font> <font color=Red>::</font> XParser NotationType-<a name="line-635"></a><font color=Blue>notationtype</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-636"></a>    word <font color=Magenta>"NOTATION"</font>-<a name="line-637"></a>    bracket <font color=Cyan>(</font>tok TokBraOpen<font color=Cyan>)</font> <font color=Cyan>(</font>blank <font color=Cyan>(</font>tok TokBraClose<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-638"></a>            <font color=Cyan>(</font>peRef name <font color=Cyan>`sepBy1`</font> peRef <font color=Cyan>(</font>tok TokPipe<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-639"></a>-<a name="line-640"></a><a name="enumeration"></a><font color=Blue>enumeration</font> <font color=Red>::</font> XParser Enumeration-<a name="line-641"></a><font color=Blue>enumeration</font> <font color=Red>=</font>-<a name="line-642"></a>    bracket <font color=Cyan>(</font>tok TokBraOpen<font color=Cyan>)</font> <font color=Cyan>(</font>blank <font color=Cyan>(</font>tok TokBraClose<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-643"></a>            <font color=Cyan>(</font>peRef nmtoken <font color=Cyan>`sepBy1`</font> blank <font color=Cyan>(</font>peRef <font color=Cyan>(</font>tok TokPipe<font color=Cyan>)</font><font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-644"></a>-<a name="line-645"></a><a name="defaultdecl"></a><font color=Blue>defaultdecl</font> <font color=Red>::</font> XParser DefaultDecl-<a name="line-646"></a><font color=Blue>defaultdecl</font> <font color=Red>=</font>-<a name="line-647"></a>    oneOf' <font color=Red>[</font> <font color=Cyan>(</font><font color=Magenta>"REQUIRED"</font><font color=Cyan>,</font>  tok TokHash <font color=Cyan>&gt;&gt;</font> word <font color=Magenta>"REQUIRED"</font> <font color=Cyan>&gt;&gt;</font> return REQUIRED<font color=Cyan>)</font>-<a name="line-648"></a>           <font color=Cyan>,</font> <font color=Cyan>(</font><font color=Magenta>"IMPLIED"</font><font color=Cyan>,</font>   tok TokHash <font color=Cyan>&gt;&gt;</font> word <font color=Magenta>"IMPLIED"</font> <font color=Cyan>&gt;&gt;</font> return IMPLIED<font color=Cyan>)</font>-<a name="line-649"></a>           <font color=Cyan>,</font> <font color=Cyan>(</font><font color=Magenta>"FIXED"</font><font color=Cyan>,</font>     <font color=Green><u>do</u></font> f <font color=Red>&lt;-</font> maybe <font color=Cyan>(</font>tok TokHash <font color=Cyan>&gt;&gt;</font> word <font color=Magenta>"FIXED"</font>-<a name="line-650"></a>                                                      <font color=Cyan>&gt;&gt;</font> return FIXED<font color=Cyan>)</font>-<a name="line-651"></a>                              a <font color=Red>&lt;-</font> peRef attvalue-<a name="line-652"></a>                              return <font color=Cyan>(</font>DefaultTo a f<font color=Cyan>)</font> <font color=Cyan>)</font>-<a name="line-653"></a>           <font color=Red>]</font>-<a name="line-654"></a>        <font color=Cyan>`adjustErr`</font> <font color=Cyan>(</font><font color=Magenta>"looking for an attribute default decl,\n"</font><font color=Cyan>++</font><font color=Cyan>)</font>-<a name="line-655"></a><font color=Blue>--      `adjustErr` (++"\nLooking for an attribute default decl:\n\ </font>-<a name="line-656"></a><font color=Blue>-- \    (REQUIRED, IMPLIED, FIXED)")</font>-<a name="line-657"></a>-<a name="line-658"></a><a name="conditionalsect"></a><font color=Blue>conditionalsect</font> <font color=Red>::</font> XParser ConditionalSect-<a name="line-659"></a><font color=Blue>conditionalsect</font> <font color=Red>=</font> oneOf'-<a name="line-660"></a>    <font color=Red>[</font> <font color=Cyan>(</font> <font color=Magenta>"INCLUDE"</font>-<a name="line-661"></a>      <font color=Cyan>,</font> <font color=Green><u>do</u></font> tok TokSectionOpen-<a name="line-662"></a>           peRef <font color=Cyan>(</font>tok <font color=Cyan>(</font>TokSection INCLUDEx<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-663"></a>           p <font color=Red>&lt;-</font> posn-<a name="line-664"></a>           tok TokSqOpen <font color=Cyan>`onFail`</font> failBadP <font color=Magenta>"missing [ after INCLUDE"</font>-<a name="line-665"></a>           i <font color=Red>&lt;-</font> many <font color=Cyan>(</font>peRef extsubsetdecl<font color=Cyan>)</font>-<a name="line-666"></a>           tok TokSectionClose-<a name="line-667"></a>                   <font color=Cyan>`onFail`</font> failBadP <font color=Cyan>(</font><font color=Magenta>"missing ]]&gt; for INCLUDE section"</font>-<a name="line-668"></a>                                     <font color=Cyan>++</font><font color=Magenta>"\n    begun at "</font><font color=Cyan>++</font>show p<font color=Cyan>)</font>-<a name="line-669"></a>           return <font color=Cyan>(</font>IncludeSect i<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-670"></a>    <font color=Cyan>,</font> <font color=Cyan>(</font> <font color=Magenta>"IGNORE"</font>-<a name="line-671"></a>      <font color=Cyan>,</font> <font color=Green><u>do</u></font> tok TokSectionOpen-<a name="line-672"></a>           peRef <font color=Cyan>(</font>tok <font color=Cyan>(</font>TokSection IGNOREx<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-673"></a>           p <font color=Red>&lt;-</font> posn-<a name="line-674"></a>           tok TokSqOpen <font color=Cyan>`onFail`</font> failBadP <font color=Magenta>"missing [ after IGNORE"</font>-<a name="line-675"></a>           i <font color=Red>&lt;-</font> many newIgnore  <font color=Blue>-- many ignoresectcontents</font>-<a name="line-676"></a>           tok TokSectionClose-<a name="line-677"></a>                   <font color=Cyan>`onFail`</font> failBadP <font color=Cyan>(</font><font color=Magenta>"missing ]]&gt; for IGNORE section"</font>-<a name="line-678"></a>                                     <font color=Cyan>++</font><font color=Magenta>"\n    begun at "</font><font color=Cyan>++</font>show p<font color=Cyan>)</font>-<a name="line-679"></a>           return <font color=Cyan>(</font>IgnoreSect []<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-680"></a>    <font color=Red>]</font> <font color=Cyan>`adjustErr`</font> <font color=Cyan>(</font><font color=Magenta>"in a conditional section,\n"</font><font color=Cyan>++</font><font color=Cyan>)</font>-<a name="line-681"></a>-<a name="line-682"></a><a name="newIgnore"></a><font color=Blue>newIgnore</font> <font color=Red>::</font> XParser Ignore-<a name="line-683"></a><font color=Blue>newIgnore</font> <font color=Red>=</font>-<a name="line-684"></a>    <font color=Cyan>(</font> <font color=Green><u>do</u></font> tok TokSectionOpen-<a name="line-685"></a>         many newIgnore <font color=Cyan>`debug`</font> <font color=Magenta>"IGNORING conditional section"</font>-<a name="line-686"></a>         tok TokSectionClose-<a name="line-687"></a>         return Ignore <font color=Cyan>`debug`</font> <font color=Magenta>"end of IGNORED conditional section"</font><font color=Cyan>)</font> <font color=Cyan>`onFail`</font>-<a name="line-688"></a>    <font color=Cyan>(</font> <font color=Green><u>do</u></font> t <font color=Red>&lt;-</font> nottok <font color=Red>[</font>TokSectionOpen<font color=Cyan>,</font>TokSectionClose<font color=Red>]</font>-<a name="line-689"></a>         return Ignore  <font color=Cyan>`debug`</font> <font color=Cyan>(</font><font color=Magenta>"ignoring: "</font><font color=Cyan>++</font>show t<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-690"></a>-<a name="line-691"></a><a name="ignoresectcontents"></a><font color=Blue>--- obsolete?</font>-<a name="line-692"></a><font color=Blue>ignoresectcontents</font> <font color=Red>::</font> XParser IgnoreSectContents-<a name="line-693"></a><font color=Blue>ignoresectcontents</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-694"></a>    i <font color=Red>&lt;-</font> ignore-<a name="line-695"></a>    is <font color=Red>&lt;-</font> many <font color=Cyan>(</font><font color=Green><u>do</u></font> tok TokSectionOpen-<a name="line-696"></a>                   ic <font color=Red>&lt;-</font> ignoresectcontents-<a name="line-697"></a>                   tok TokSectionClose-<a name="line-698"></a>                   ig <font color=Red>&lt;-</font> ignore-<a name="line-699"></a>                   return <font color=Cyan>(</font>ic<font color=Cyan>,</font>ig<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-700"></a>    return <font color=Cyan>(</font>IgnoreSectContents i is<font color=Cyan>)</font>-<a name="line-701"></a>-<a name="line-702"></a><a name="ignore"></a><font color=Blue>ignore</font> <font color=Red>::</font> XParser Ignore-<a name="line-703"></a><font color=Blue>ignore</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-704"></a>  is <font color=Red>&lt;-</font> many1 <font color=Cyan>(</font>nottok <font color=Red>[</font>TokSectionOpen<font color=Cyan>,</font>TokSectionClose<font color=Red>]</font><font color=Cyan>)</font>-<a name="line-705"></a>  return Ignore  <font color=Cyan>`debug`</font> <font color=Cyan>(</font><font color=Magenta>"ignored all of: "</font><font color=Cyan>++</font>show is<font color=Cyan>)</font>-<a name="line-706"></a><font color=Blue>----</font>-<a name="line-707"></a>-<a name="line-708"></a><a name="reference"></a><font color=Blue>-- | Return either a general entity reference, or a character reference.</font>-<a name="line-709"></a><font color=Blue>reference</font> <font color=Red>::</font> XParser Reference-<a name="line-710"></a><font color=Blue>reference</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-711"></a>    myBracket <font color=Cyan>(</font>tok TokAmp<font color=Cyan>)</font> <font color=Cyan>(</font>tok TokSemi<font color=Cyan>)</font> <font color=Cyan>(</font>freetext <font color=Cyan>&gt;&gt;=</font> val<font color=Cyan>)</font>-<a name="line-712"></a>  <font color=Green><u>where</u></font>-<a name="line-713"></a>    val <font color=Cyan>(</font><font color=Magenta>'#'</font><font color=Red><b>:</b></font><font color=Magenta>'x'</font><font color=Red><b>:</b></font>i<font color=Cyan>)</font> <font color=Red>|</font> all isHexDigit i-<a name="line-714"></a>                    <font color=Red>=</font> return <font color=Cyan>.</font> RefChar <font color=Cyan>.</font> fst <font color=Cyan>.</font> head <font color=Cyan>.</font> readHex <font color=Cyan>$</font> i-<a name="line-715"></a>    val <font color=Cyan>(</font><font color=Magenta>'#'</font><font color=Red><b>:</b></font>i<font color=Cyan>)</font>     <font color=Red>|</font> all isDigit i-<a name="line-716"></a>                    <font color=Red>=</font> return <font color=Cyan>.</font> RefChar <font color=Cyan>.</font> fst <font color=Cyan>.</font> head <font color=Cyan>.</font> readDec <font color=Cyan>$</font> i-<a name="line-717"></a>    val name        <font color=Red>=</font> return <font color=Cyan>.</font> RefEntity <font color=Cyan>$</font> name-<a name="line-718"></a>-<a name="line-719"></a><font color=Blue>{- -- following is incorrect-<a name="line-720"></a>reference =-<a name="line-721"></a>    ( charref &gt;&gt;= return . RefChar) `onFail`-<a name="line-722"></a>    ( entityref &gt;&gt;= return . RefEntity)-<a name="line-723"></a>-<a name="line-724"></a>entityref :: XParser EntityRef-<a name="line-725"></a>entityref = do-<a name="line-726"></a>    bracket (tok TokAmp) (tok TokSemi) name-<a name="line-727"></a>-<a name="line-728"></a>charref :: XParser CharRef-<a name="line-729"></a>charref = do-<a name="line-730"></a>    bracket (tok TokAmp) (tok TokSemi) (freetext &gt;&gt;= readCharVal)-<a name="line-731"></a>  where-<a name="line-732"></a>    readCharVal ('#':'x':i) = return . fst . head . readHex $ i-<a name="line-733"></a>    readCharVal ('#':i)     = return . fst . head . readDec $ i-<a name="line-734"></a>    readCharVal _           = mzero-<a name="line-735"></a>-}</font>-<a name="line-736"></a>-<a name="line-737"></a><a name="pereference"></a><font color=Blue>pereference</font> <font color=Red>::</font> XParser PEReference-<a name="line-738"></a><font color=Blue>pereference</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-739"></a>    myBracket <font color=Cyan>(</font>tok TokPercent<font color=Cyan>)</font> <font color=Cyan>(</font>tok TokSemi<font color=Cyan>)</font> nmtoken-<a name="line-740"></a>-<a name="line-741"></a><a name="entitydecl"></a><font color=Blue>entitydecl</font> <font color=Red>::</font> XParser EntityDecl-<a name="line-742"></a><font color=Blue>entitydecl</font> <font color=Red>=</font>-<a name="line-743"></a>    <font color=Cyan>(</font> gedecl <font color=Cyan>&gt;&gt;=</font> return <font color=Cyan>.</font> EntityGEDecl<font color=Cyan>)</font> <font color=Cyan>`onFail`</font>-<a name="line-744"></a>    <font color=Cyan>(</font> pedecl <font color=Cyan>&gt;&gt;=</font> return <font color=Cyan>.</font> EntityPEDecl<font color=Cyan>)</font>-<a name="line-745"></a>-<a name="line-746"></a><a name="gedecl"></a><font color=Blue>gedecl</font> <font color=Red>::</font> XParser GEDecl-<a name="line-747"></a><font color=Blue>gedecl</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-748"></a>    tok TokSpecialOpen-<a name="line-749"></a>    tok <font color=Cyan>(</font>TokSpecial ENTITYx<font color=Cyan>)</font>-<a name="line-750"></a>    n <font color=Red>&lt;-</font> name-<a name="line-751"></a>    e <font color=Red>&lt;-</font> entitydef <font color=Cyan>`adjustErrBad`</font> <font color=Cyan>(</font><font color=Cyan>(</font><font color=Magenta>"in general entity defn "</font><font color=Cyan>++</font>n<font color=Cyan>++</font><font color=Magenta>",\n"</font><font color=Cyan>)</font><font color=Cyan>++</font><font color=Cyan>)</font>-<a name="line-752"></a>    tok TokAnyClose <font color=Cyan>`onFail`</font> failBadP <font color=Cyan>(</font><font color=Magenta>"expected &gt; terminating G ENTITY decl "</font><font color=Cyan>++</font>n<font color=Cyan>)</font>-<a name="line-753"></a>    stUpdate <font color=Cyan>(</font>addGE n e<font color=Cyan>)</font> <font color=Cyan>`debug`</font> <font color=Cyan>(</font><font color=Magenta>"added GE defn &amp;"</font><font color=Cyan>++</font>n<font color=Cyan>++</font><font color=Magenta>";"</font><font color=Cyan>)</font>-<a name="line-754"></a>    return <font color=Cyan>(</font>GEDecl n e<font color=Cyan>)</font>-<a name="line-755"></a>-<a name="line-756"></a><a name="pedecl"></a><font color=Blue>pedecl</font> <font color=Red>::</font> XParser PEDecl-<a name="line-757"></a><font color=Blue>pedecl</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-758"></a>    tok TokSpecialOpen-<a name="line-759"></a>    tok <font color=Cyan>(</font>TokSpecial ENTITYx<font color=Cyan>)</font>-<a name="line-760"></a>    tok TokPercent-<a name="line-761"></a>    n <font color=Red>&lt;-</font> name-<a name="line-762"></a>    e <font color=Red>&lt;-</font> pedef <font color=Cyan>`adjustErrBad`</font> <font color=Cyan>(</font><font color=Cyan>(</font><font color=Magenta>"in parameter entity defn "</font><font color=Cyan>++</font>n<font color=Cyan>++</font><font color=Magenta>",\n"</font><font color=Cyan>)</font><font color=Cyan>++</font><font color=Cyan>)</font>-<a name="line-763"></a>    tok TokAnyClose <font color=Cyan>`onFail`</font> failBadP <font color=Cyan>(</font><font color=Magenta>"expected &gt; terminating P ENTITY decl "</font><font color=Cyan>++</font>n<font color=Cyan>)</font>-<a name="line-764"></a>    stUpdate <font color=Cyan>(</font>addPE n e<font color=Cyan>)</font> <font color=Cyan>`debug`</font> <font color=Cyan>(</font><font color=Magenta>"added PE defn %"</font><font color=Cyan>++</font>n<font color=Cyan>++</font><font color=Magenta>";\n"</font><font color=Cyan>++</font>show e<font color=Cyan>)</font>-<a name="line-765"></a>    return <font color=Cyan>(</font>PEDecl n e<font color=Cyan>)</font>-<a name="line-766"></a>-<a name="line-767"></a><a name="entitydef"></a><font color=Blue>entitydef</font> <font color=Red>::</font> XParser EntityDef-<a name="line-768"></a><font color=Blue>entitydef</font> <font color=Red>=</font>-<a name="line-769"></a>    oneOf' <font color=Red>[</font> <font color=Cyan>(</font><font color=Magenta>"entityvalue"</font><font color=Cyan>,</font> entityvalue <font color=Cyan>&gt;&gt;=</font> return <font color=Cyan>.</font> DefEntityValue<font color=Cyan>)</font>-<a name="line-770"></a>           <font color=Cyan>,</font> <font color=Cyan>(</font><font color=Magenta>"external"</font><font color=Cyan>,</font>    <font color=Green><u>do</u></font> eid <font color=Red>&lt;-</font> externalid-<a name="line-771"></a>                                ndd <font color=Red>&lt;-</font> maybe ndatadecl-<a name="line-772"></a>                                return <font color=Cyan>(</font>DefExternalID eid ndd<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-773"></a>           <font color=Red>]</font>-<a name="line-774"></a>-<a name="line-775"></a><a name="pedef"></a><font color=Blue>pedef</font> <font color=Red>::</font> XParser PEDef-<a name="line-776"></a><font color=Blue>pedef</font> <font color=Red>=</font>-<a name="line-777"></a>    oneOf' <font color=Red>[</font> <font color=Cyan>(</font><font color=Magenta>"entityvalue"</font><font color=Cyan>,</font> entityvalue <font color=Cyan>&gt;&gt;=</font> return <font color=Cyan>.</font> PEDefEntityValue<font color=Cyan>)</font>-<a name="line-778"></a>           <font color=Cyan>,</font> <font color=Cyan>(</font><font color=Magenta>"externalid"</font><font color=Cyan>,</font>  externalid  <font color=Cyan>&gt;&gt;=</font> return <font color=Cyan>.</font> PEDefExternalID<font color=Cyan>)</font>-<a name="line-779"></a>           <font color=Red>]</font>-<a name="line-780"></a>-<a name="line-781"></a><a name="externalid"></a><font color=Blue>externalid</font> <font color=Red>::</font> XParser ExternalID-<a name="line-782"></a><font color=Blue>externalid</font> <font color=Red>=</font>-<a name="line-783"></a>    oneOf' <font color=Red>[</font> <font color=Cyan>(</font><font color=Magenta>"SYSTEM"</font><font color=Cyan>,</font> <font color=Green><u>do</u></font> word <font color=Magenta>"SYSTEM"</font>-<a name="line-784"></a>                           s <font color=Red>&lt;-</font> systemliteral-<a name="line-785"></a>                           return <font color=Cyan>(</font>SYSTEM s<font color=Cyan>)</font> <font color=Cyan>)</font>-<a name="line-786"></a>           <font color=Cyan>,</font> <font color=Cyan>(</font><font color=Magenta>"PUBLIC"</font><font color=Cyan>,</font> <font color=Green><u>do</u></font> word <font color=Magenta>"PUBLIC"</font>-<a name="line-787"></a>                           p <font color=Red>&lt;-</font> pubidliteral-<a name="line-788"></a>                           s <font color=Red>&lt;-</font> systemliteral-<a name="line-789"></a>                           return <font color=Cyan>(</font>PUBLIC p s<font color=Cyan>)</font> <font color=Cyan>)</font>-<a name="line-790"></a>           <font color=Red>]</font>-<a name="line-791"></a>      <font color=Cyan>`adjustErr`</font> <font color=Cyan>(</font><font color=Magenta>"looking for an external id,\n"</font><font color=Cyan>++</font><font color=Cyan>)</font>-<a name="line-792"></a>-<a name="line-793"></a><a name="ndatadecl"></a><font color=Blue>ndatadecl</font> <font color=Red>::</font> XParser NDataDecl-<a name="line-794"></a><font color=Blue>ndatadecl</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-795"></a>    word <font color=Magenta>"NDATA"</font>-<a name="line-796"></a>    n <font color=Red>&lt;-</font> name-<a name="line-797"></a>    return <font color=Cyan>(</font>NDATA n<font color=Cyan>)</font>-<a name="line-798"></a>-<a name="line-799"></a><a name="textdecl"></a><font color=Blue>textdecl</font> <font color=Red>::</font> XParser TextDecl-<a name="line-800"></a><font color=Blue>textdecl</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-801"></a>    tok TokPIOpen-<a name="line-802"></a>    <font color=Cyan>(</font>word <font color=Magenta>"xml"</font> <font color=Cyan>`onFail`</font> word <font color=Magenta>"XML"</font><font color=Cyan>)</font>-<a name="line-803"></a>    v <font color=Red>&lt;-</font> maybe versioninfo-<a name="line-804"></a>    e <font color=Red>&lt;-</font> encodingdecl-<a name="line-805"></a>    tok TokPIClose <font color=Cyan>`onFail`</font> failP <font color=Magenta>"expected ?&gt; terminating text decl"</font>-<a name="line-806"></a>    return <font color=Cyan>(</font>TextDecl v e<font color=Cyan>)</font>-<a name="line-807"></a>-<a name="line-808"></a><a name="extparsedent"></a><font color=Blue>extparsedent</font> <font color=Red>::</font> XParser <font color=Cyan>(</font>ExtParsedEnt Posn<font color=Cyan>)</font>-<a name="line-809"></a><font color=Blue>extparsedent</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-810"></a>    t <font color=Red>&lt;-</font> maybe textdecl-<a name="line-811"></a>    c <font color=Red>&lt;-</font> content-<a name="line-812"></a>    return <font color=Cyan>(</font>ExtParsedEnt t c<font color=Cyan>)</font>-<a name="line-813"></a>-<a name="line-814"></a><a name="extpe"></a><font color=Blue>extpe</font> <font color=Red>::</font> XParser ExtPE-<a name="line-815"></a><font color=Blue>extpe</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-816"></a>    t <font color=Red>&lt;-</font> maybe textdecl-<a name="line-817"></a>    e <font color=Red>&lt;-</font> many <font color=Cyan>(</font>peRef extsubsetdecl<font color=Cyan>)</font>-<a name="line-818"></a>    return <font color=Cyan>(</font>ExtPE t e<font color=Cyan>)</font>-<a name="line-819"></a>-<a name="line-820"></a><a name="encodingdecl"></a><font color=Blue>encodingdecl</font> <font color=Red>::</font> XParser EncodingDecl-<a name="line-821"></a><font color=Blue>encodingdecl</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-822"></a>    <font color=Cyan>(</font>word <font color=Magenta>"encoding"</font> <font color=Cyan>`onFail`</font> word <font color=Magenta>"ENCODING"</font><font color=Cyan>)</font>-<a name="line-823"></a>    tok TokEqual <font color=Cyan>`onFail`</font> failBadP <font color=Magenta>"expected = in 'encoding' decl"</font>-<a name="line-824"></a>    f <font color=Red>&lt;-</font> bracket <font color=Cyan>(</font>tok TokQuote<font color=Cyan>)</font> <font color=Cyan>(</font>tok TokQuote<font color=Cyan>)</font> freetext-<a name="line-825"></a>    return <font color=Cyan>(</font>EncodingDecl f<font color=Cyan>)</font>-<a name="line-826"></a>-<a name="line-827"></a><a name="notationdecl"></a><font color=Blue>notationdecl</font> <font color=Red>::</font> XParser NotationDecl-<a name="line-828"></a><font color=Blue>notationdecl</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-829"></a>    tok TokSpecialOpen-<a name="line-830"></a>    tok <font color=Cyan>(</font>TokSpecial NOTATIONx<font color=Cyan>)</font>-<a name="line-831"></a>    n <font color=Red>&lt;-</font> name-<a name="line-832"></a>    e <font color=Red>&lt;-</font> either externalid publicid-<a name="line-833"></a>    tok TokAnyClose <font color=Cyan>`onFail`</font> failBadP <font color=Cyan>(</font><font color=Magenta>"expected &gt; terminating NOTATION decl "</font><font color=Cyan>++</font>n<font color=Cyan>)</font>-<a name="line-834"></a>    return <font color=Cyan>(</font>NOTATION n e<font color=Cyan>)</font>-<a name="line-835"></a>-<a name="line-836"></a><a name="publicid"></a><font color=Blue>publicid</font> <font color=Red>::</font> XParser PublicID-<a name="line-837"></a><font color=Blue>publicid</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-838"></a>    word <font color=Magenta>"PUBLIC"</font>-<a name="line-839"></a>    p <font color=Red>&lt;-</font> pubidliteral-<a name="line-840"></a>    return <font color=Cyan>(</font>PUBLICID p<font color=Cyan>)</font>-<a name="line-841"></a>-<a name="line-842"></a><a name="entityvalue"></a><font color=Blue>entityvalue</font> <font color=Red>::</font> XParser EntityValue-<a name="line-843"></a><font color=Blue>entityvalue</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-844"></a> <font color=Blue>-- evs &lt;- bracket (tok TokQuote) (tok TokQuote) (many (peRef ev))</font>-<a name="line-845"></a>    tok TokQuote-<a name="line-846"></a>    pn <font color=Red>&lt;-</font> posn-<a name="line-847"></a>    evs <font color=Red>&lt;-</font> many ev-<a name="line-848"></a>    tok TokQuote <font color=Cyan>`onFail`</font> failBadP <font color=Magenta>"expected quote to terminate entityvalue"</font>-<a name="line-849"></a>    <font color=Blue>-- quoted text must be rescanned for possible PERefs</font>-<a name="line-850"></a>    st <font color=Red>&lt;-</font> stGet-<a name="line-851"></a>    Prelude<font color=Cyan>.</font>either failBad <font color=Cyan>(</font>return <font color=Cyan>.</font> EntityValue<font color=Cyan>)</font> <font color=Cyan>.</font> fst3 <font color=Cyan>$</font>-<a name="line-852"></a>                <font color=Cyan>(</font>runParser <font color=Cyan>(</font>many ev<font color=Cyan>)</font> st-<a name="line-853"></a>                         <font color=Cyan>(</font>reLexEntityValue <font color=Cyan>(</font><font color=Red>\</font>s<font color=Red>-&gt;</font> stringify <font color=Cyan>(</font>lookupPE s st<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-854"></a>                                           pn-<a name="line-855"></a>                                           <font color=Cyan>(</font>flattenEV <font color=Cyan>(</font>EntityValue evs<font color=Cyan>)</font><font color=Cyan>)</font><font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-856"></a>  <font color=Green><u>where</u></font>-<a name="line-857"></a>    stringify <font color=Cyan>(</font>Just <font color=Cyan>(</font>PEDefEntityValue ev<font color=Cyan>)</font><font color=Cyan>)</font> <font color=Red>=</font> Just <font color=Cyan>(</font>flattenEV ev<font color=Cyan>)</font>-<a name="line-858"></a>    stringify <font color=Green><u>_</u></font> <font color=Red>=</font> Nothing-<a name="line-859"></a>-<a name="line-860"></a><a name="ev"></a><font color=Blue>ev</font> <font color=Red>::</font> XParser EV-<a name="line-861"></a><font color=Blue>ev</font> <font color=Red>=</font>-<a name="line-862"></a>    oneOf' <font color=Red>[</font> <font color=Cyan>(</font><font color=Magenta>"string"</font><font color=Cyan>,</font>    <font color=Cyan>(</font>string<font color=Cyan>`onFail`</font>freetext<font color=Cyan>)</font> <font color=Cyan>&gt;&gt;=</font> return <font color=Cyan>.</font> EVString<font color=Cyan>)</font>-<a name="line-863"></a>           <font color=Cyan>,</font> <font color=Cyan>(</font><font color=Magenta>"reference"</font><font color=Cyan>,</font> reference <font color=Cyan>&gt;&gt;=</font> return <font color=Cyan>.</font> EVRef<font color=Cyan>)</font>-<a name="line-864"></a>           <font color=Red>]</font>-<a name="line-865"></a>      <font color=Cyan>`adjustErr`</font> <font color=Cyan>(</font><font color=Magenta>"looking for entity value,\n"</font><font color=Cyan>++</font><font color=Cyan>)</font>-<a name="line-866"></a>-<a name="line-867"></a><a name="attvalue"></a><font color=Blue>attvalue</font> <font color=Red>::</font> XParser AttValue-<a name="line-868"></a><font color=Blue>attvalue</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-869"></a>    avs <font color=Red>&lt;-</font> bracket <font color=Cyan>(</font>tok TokQuote<font color=Cyan>)</font> <font color=Cyan>(</font>tok TokQuote<font color=Cyan>)</font>-<a name="line-870"></a>                   <font color=Cyan>(</font>many <font color=Cyan>(</font>either freetext reference<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-871"></a>    return <font color=Cyan>(</font>AttValue avs<font color=Cyan>)</font>-<a name="line-872"></a>-<a name="line-873"></a><a name="systemliteral"></a><font color=Blue>systemliteral</font> <font color=Red>::</font> XParser SystemLiteral-<a name="line-874"></a><font color=Blue>systemliteral</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-875"></a>    s <font color=Red>&lt;-</font> bracket <font color=Cyan>(</font>tok TokQuote<font color=Cyan>)</font> <font color=Cyan>(</font>tok TokQuote<font color=Cyan>)</font> freetext-<a name="line-876"></a>    return <font color=Cyan>(</font>SystemLiteral s<font color=Cyan>)</font>            <font color=Blue>-- note: refs &amp;...; not permitted</font>-<a name="line-877"></a>-<a name="line-878"></a><a name="pubidliteral"></a><font color=Blue>pubidliteral</font> <font color=Red>::</font> XParser PubidLiteral-<a name="line-879"></a><font color=Blue>pubidliteral</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-880"></a>    s <font color=Red>&lt;-</font> bracket <font color=Cyan>(</font>tok TokQuote<font color=Cyan>)</font> <font color=Cyan>(</font>tok TokQuote<font color=Cyan>)</font> freetext-<a name="line-881"></a>    return <font color=Cyan>(</font>PubidLiteral s<font color=Cyan>)</font>             <font color=Blue>-- note: freetext is too liberal here</font>-<a name="line-882"></a>-<a name="line-883"></a><a name="chardata"></a><font color=Blue>-- | Return parsed freetext (i.e. until the next markup)</font>-<a name="line-884"></a><font color=Blue>chardata</font> <font color=Red>::</font> XParser CharData-<a name="line-885"></a><font color=Blue>chardata</font> <font color=Red>=</font> freetext-<a name="line-886"></a>-</pre>-</body>-</html>
− docs/HaXml/src/Text/XML/HaXml/ParseLazy.html
@@ -1,906 +0,0 @@-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">-<html>-<head>-<!-- Generated by HsColour, http://www.cs.york.ac.uk/fp/darcs/hscolour/ -->-<title>src/Text/XML/HaXml/ParseLazy.hs</title>-</head>-<body>-<pre><a name="line-1"></a><font color=Blue>-- | A non-validating XML parser.  For the input grammar, see</font>-<a name="line-2"></a><font color=Blue>--   &lt;<a href="http://www.w3.org/TR/REC-xml">http://www.w3.org/TR/REC-xml</a>&gt;.</font>-<a name="line-3"></a><font color=Green><u>module</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>ParseLazy-<a name="line-4"></a>  <font color=Cyan>(</font>-<a name="line-5"></a>  <font color=Blue>-- * Parse a whole document</font>-<a name="line-6"></a>    xmlParse  <font color=Blue>-- , xmlParse'</font>-<a name="line-7"></a>  <font color=Blue>-- * Parse just a DTD</font>-<a name="line-8"></a>  <font color=Cyan>,</font> dtdParse  <font color=Blue>-- , dtdParse'</font>-<a name="line-9"></a>  <font color=Blue>-- * Parse a partial document</font>-<a name="line-10"></a>  <font color=Cyan>,</font> xmlParseWith-<a name="line-11"></a>  <font color=Blue>-- * Individual parsers for use with /xmlParseWith/ and module SAX</font>-<a name="line-12"></a>  <font color=Cyan>,</font> document<font color=Cyan>,</font> element<font color=Cyan>,</font> content-<a name="line-13"></a>  <font color=Cyan>,</font> comment<font color=Cyan>,</font> chardata-<a name="line-14"></a>  <font color=Cyan>,</font> reference<font color=Cyan>,</font> doctypedecl-<a name="line-15"></a>  <font color=Cyan>,</font> processinginstruction-<a name="line-16"></a>  <font color=Cyan>,</font> elemtag<font color=Cyan>,</font> name<font color=Cyan>,</font> tok-<a name="line-17"></a>  <font color=Cyan>,</font> elemOpenTag<font color=Cyan>,</font> elemCloseTag-<a name="line-18"></a>  <font color=Cyan>,</font> emptySTs<font color=Cyan>,</font> XParser-<a name="line-19"></a>  <font color=Blue>-- * These general utility functions don't belong here</font>-<a name="line-20"></a>  <font color=Cyan>,</font> fst3<font color=Cyan>,</font> snd3<font color=Cyan>,</font> thd3-<a name="line-21"></a>  <font color=Cyan>)</font> <font color=Green><u>where</u></font>-<a name="line-22"></a>-<a name="line-23"></a><font color=Blue>-- An XML parser, written using a slightly extended version of the</font>-<a name="line-24"></a><font color=Blue>-- Hutton/Meijer parser combinators.  The input is tokenised internally</font>-<a name="line-25"></a><font color=Blue>-- by the lexer xmlLex.  Whilst parsing, we gather a symbol</font>-<a name="line-26"></a><font color=Blue>-- table of entity references.  PERefs must be defined before use, so we</font>-<a name="line-27"></a><font color=Blue>-- expand their uses as we encounter them, forcing the remainder of the</font>-<a name="line-28"></a><font color=Blue>-- input to be re-lexed and re-parsed.  GERefs are simply stored for</font>-<a name="line-29"></a><font color=Blue>-- later retrieval.</font>-<a name="line-30"></a>-<a name="line-31"></a><font color=Green><u>import</u></font> Prelude hiding <font color=Cyan>(</font>either<font color=Cyan>,</font>maybe<font color=Cyan>,</font>sequence<font color=Cyan>,</font>catch<font color=Cyan>)</font>-<a name="line-32"></a><font color=Green><u>import</u></font> <font color=Green><u>qualified</u></font> Prelude <font color=Cyan>(</font>either<font color=Cyan>)</font>-<a name="line-33"></a><font color=Green><u>import</u></font> Maybe hiding <font color=Cyan>(</font>maybe<font color=Cyan>)</font>-<a name="line-34"></a><font color=Green><u>import</u></font> List <font color=Cyan>(</font>intersperse<font color=Cyan>)</font>       <font color=Blue>-- debugging only</font>-<a name="line-35"></a><font color=Green><u>import</u></font> Char <font color=Cyan>(</font>isSpace<font color=Cyan>,</font>isDigit<font color=Cyan>,</font>isHexDigit<font color=Cyan>)</font>-<a name="line-36"></a><font color=Green><u>import</u></font> Monad hiding <font color=Cyan>(</font>sequence<font color=Cyan>)</font>-<a name="line-37"></a><font color=Green><u>import</u></font> Numeric <font color=Cyan>(</font>readDec<font color=Cyan>,</font>readHex<font color=Cyan>)</font>-<a name="line-38"></a><font color=Blue>--import Control.Exception (catch)</font>-<a name="line-39"></a>-<a name="line-40"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Types-<a name="line-41"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Posn-<a name="line-42"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Lex-<a name="line-43"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>ParserCombinators<font color=Cyan>.</font>Poly<font color=Cyan>.</font>StateLazy-<a name="line-44"></a>-<a name="line-45"></a><font color=Green><u>import</u></font> System<font color=Cyan>.</font>FilePath <font color=Cyan>(</font>combine<font color=Cyan>,</font> dropFileName<font color=Cyan>)</font>-<a name="line-46"></a>-<a name="line-47"></a>-<a name="line-48"></a><font color=Magenta><em>#if ( defined(__GLASGOW_HASKELL__) &amp;&amp; __GLASGOW_HASKELL__ &gt; 502 ) || \</em></font>-<a name="line-49"></a>    <font color=Cyan>(</font> defined<font color=Cyan>(</font><b><font color=Magenta>__NHC__</font></b><font color=Cyan>)</font> <font color=Cyan>&amp;&amp;</font> <b><font color=Magenta>__NHC__</font></b> <font color=Cyan>&gt;</font> <font color=Magenta>114</font> <font color=Cyan>)</font> <font color=Cyan>||</font> defined<font color=Cyan>(</font><b><font color=Magenta>__HUGS__</font></b><font color=Cyan>)</font>-<a name="line-50"></a><font color=Green><u>import</u></font> System<font color=Cyan>.</font>IO<font color=Cyan>.</font>Unsafe <font color=Cyan>(</font>unsafePerformIO<font color=Cyan>)</font>-<a name="line-51"></a><font color=Magenta><em>#elif defined(__GLASGOW_HASKELL__)</em></font>-<a name="line-52"></a><font color=Green><u>import</u></font> IOExts <font color=Cyan>(</font>unsafePerformIO<font color=Cyan>)</font>-<a name="line-53"></a><font color=Magenta><em>#elif defined(__NHC__)</em></font>-<a name="line-54"></a><font color=Green><u>import</u></font> IOExtras <font color=Cyan>(</font>unsafePerformIO<font color=Cyan>)</font>-<a name="line-55"></a><font color=Magenta><em>#elif defined(__HBC__)</em></font>-<a name="line-56"></a><font color=Green><u>import</u></font> UnsafePerformIO-<a name="line-57"></a><font color=Magenta><em>#endif</em></font>-<a name="line-58"></a>-<a name="line-59"></a><font color=Blue>--  #define DEBUG</font>-<a name="line-60"></a>-<a name="line-61"></a><font color=Magenta><em>#if defined(DEBUG)</em></font>-<a name="line-62"></a><font color=Magenta><em>#  if ( defined(__GLASGOW_HASKELL__) &amp;&amp; __GLASGOW_HASKELL__ &gt; 502 ) || \</em></font>-<a name="line-63"></a>      <font color=Cyan>(</font> defined<font color=Cyan>(</font><b><font color=Magenta>__NHC__</font></b><font color=Cyan>)</font> <font color=Cyan>&amp;&amp;</font> <b><font color=Magenta>__NHC__</font></b> <font color=Cyan>&gt;</font> <font color=Magenta>114</font> <font color=Cyan>)</font> <font color=Cyan>||</font> defined<font color=Cyan>(</font><b><font color=Magenta>__HUGS__</font></b><font color=Cyan>)</font>-<a name="line-64"></a><font color=Green><u>import</u></font> Debug<font color=Cyan>.</font>Trace<font color=Cyan>(</font>trace<font color=Cyan>)</font>-<a name="line-65"></a><font color=Magenta><em>#  elif defined(__GLASGOW_HASKELL__)</em></font>-<a name="line-66"></a><font color=Green><u>import</u></font> IOExts<font color=Cyan>(</font>trace<font color=Cyan>)</font>-<a name="line-67"></a><font color=Magenta><em>#  elif defined(__NHC__) || defined(__HBC__)</em></font>-<a name="line-68"></a><font color=Green><u>import</u></font> NonStdTrace-<a name="line-69"></a><font color=Magenta><em>#  endif</em></font>-<a name="line-70"></a><a name="debug"></a><font color=Blue>debug</font> <font color=Red>::</font> a <font color=Red>-&gt;</font> String <font color=Red>-&gt;</font> a-<a name="line-71"></a><a name="debug"></a><font color=Blue>v</font> <font color=Cyan>`debug`</font> s <font color=Red>=</font> trace s v-<a name="line-72"></a><font color=Magenta><em>#else</em></font>-<a name="line-73"></a><a name="debug"></a><font color=Blue>v</font> <font color=Cyan>`debug`</font> s <font color=Red>=</font> v-<a name="line-74"></a><font color=Magenta><em>#endif</em></font>-<a name="line-75"></a>-<a name="line-76"></a>-<a name="line-77"></a><a name="xmlParse"></a><font color=Blue>-- | To parse a whole document, @xmlParse file content@ takes a filename</font>-<a name="line-78"></a><font color=Blue>--   (for generating error reports) and the string content of that file.</font>-<a name="line-79"></a><font color=Blue>--   A parse error causes program failure, with message to stderr.</font>-<a name="line-80"></a><font color=Blue>xmlParse</font> <font color=Red>::</font> String <font color=Red>-&gt;</font> String <font color=Red>-&gt;</font> Document Posn-<a name="line-81"></a>-<a name="line-82"></a><font color=Blue>{--<a name="line-83"></a>-- | To parse a whole document, @xmlParse' file content@ takes a filename-<a name="line-84"></a>--   (for generating error reports) and the string content of that file.-<a name="line-85"></a>--   Any parse error message is passed back to the caller through the-<a name="line-86"></a>--   @Either@ type.-<a name="line-87"></a>xmlParse' :: String -&gt; String -&gt; Either String (Document Posn)-<a name="line-88"></a>-<a name="line-89"></a>-- | To parse just a DTD, @dtdParse file content@ takes a filename-<a name="line-90"></a>--   (for generating error reports) and the string content of that-<a name="line-91"></a>--   file.  If no DTD was found, you get @Nothing@ rather than an error.-<a name="line-92"></a>--   However, if a DTD is found but contains errors, the program crashes.-<a name="line-93"></a>dtdParse  :: String -&gt; String -&gt; Maybe DocTypeDecl-<a name="line-94"></a>-<a name="line-95"></a>-- | To parse just a DTD, @dtdParse' file content@ takes a filename-<a name="line-96"></a>--   (for generating error reports) and the string content of that-<a name="line-97"></a>--   file.  If no DTD was found, you get @Right Nothing@.-<a name="line-98"></a>--   If a DTD was found but contains errors, you get a @Left message@.-<a name="line-99"></a>dtdParse' :: String -&gt; String -&gt; Either String (Maybe DocTypeDecl)-<a name="line-100"></a>-<a name="line-101"></a>xmlParse' name inp = xmlParse name inp `catch` (Left . show)-<a name="line-102"></a>dtdParse' name inp = dtdParse name inp `catch` (Left . show)-<a name="line-103"></a>-}</font>-<a name="line-104"></a>-<a name="line-105"></a><font color=Blue>xmlParse</font>  name  <font color=Red>=</font> fst3 <font color=Cyan>.</font> runParser <font color=Cyan>(</font>toEOF document<font color=Cyan>)</font> emptySTs <font color=Cyan>.</font> xmlLex name-<a name="line-106"></a><a name="dtdParse"></a><font color=Blue>dtdParse</font>  name  <font color=Red>=</font> fst3 <font color=Cyan>.</font> runParser justDTD  emptySTs <font color=Cyan>.</font> xmlLex name-<a name="line-107"></a>-<a name="line-108"></a>-<a name="line-109"></a><a name="toEOF"></a><font color=Blue>toEOF</font> <font color=Red>=</font> id	<font color=Blue>-- there are other possible implementations...</font>-<a name="line-110"></a>-<a name="line-111"></a><a name="xmlParseWith"></a><font color=Blue>-- | To parse a partial document, e.g. from an XML-based stream protocol,</font>-<a name="line-112"></a><font color=Blue>--   where you may later want to get more document elements from the same</font>-<a name="line-113"></a><font color=Blue>--   stream.  Arguments are: a parser for the item you want, and the</font>-<a name="line-114"></a><font color=Blue>--   already-lexed input to parse from.  Returns the item you wanted</font>-<a name="line-115"></a><font color=Blue>--   (or an error message), plus the remainder of the input.</font>-<a name="line-116"></a><font color=Blue>xmlParseWith</font> <font color=Red>::</font> XParser a <font color=Red>-&gt;</font> <font color=Red>[</font><font color=Cyan>(</font>Posn<font color=Cyan>,</font>TokenT<font color=Cyan>)</font><font color=Red>]</font>-<a name="line-117"></a>                <font color=Red>-&gt;</font> <font color=Cyan>(</font>Either String a<font color=Cyan>,</font> <font color=Red>[</font><font color=Cyan>(</font>Posn<font color=Cyan>,</font>TokenT<font color=Cyan>)</font><font color=Red>]</font><font color=Cyan>)</font>-<a name="line-118"></a><font color=Blue>xmlParseWith</font> p <font color=Red>=</font> <font color=Cyan>(</font><font color=Red>\</font><font color=Cyan>(</font>v<font color=Cyan>,</font><font color=Green><u>_</u></font><font color=Cyan>,</font>s<font color=Cyan>)</font><font color=Red>-&gt;</font><font color=Cyan>(</font>Right v<font color=Cyan>,</font>s<font color=Cyan>)</font><font color=Cyan>)</font> <font color=Cyan>.</font> runParser p emptySTs-<a name="line-119"></a>-<a name="line-120"></a>-<a name="line-121"></a><font color=Blue>---- Symbol table stuff ----</font>-<a name="line-122"></a>-<a name="line-123"></a><a name="SymTabs"></a><font color=Green><u>type</u></font> SymTabs <font color=Red>=</font> <font color=Cyan>(</font>SymTab PEDef<font color=Cyan>,</font> SymTab EntityDef<font color=Cyan>)</font>-<a name="line-124"></a>-<a name="line-125"></a><a name="emptySTs"></a><font color=Blue>-- | Some empty symbol tables for GE and PE references.</font>-<a name="line-126"></a><font color=Blue>emptySTs</font> <font color=Red>::</font> SymTabs-<a name="line-127"></a><font color=Blue>emptySTs</font> <font color=Red>=</font> <font color=Cyan>(</font>emptyST<font color=Cyan>,</font> emptyST<font color=Cyan>)</font>-<a name="line-128"></a>-<a name="line-129"></a><a name="addPE"></a><font color=Blue>addPE</font> <font color=Red>::</font> String <font color=Red>-&gt;</font> PEDef <font color=Red>-&gt;</font> SymTabs <font color=Red>-&gt;</font> SymTabs-<a name="line-130"></a><font color=Blue>addPE</font> n v <font color=Cyan>(</font>pe<font color=Cyan>,</font>ge<font color=Cyan>)</font> <font color=Red>=</font> <font color=Cyan>(</font>addST n v pe<font color=Cyan>,</font> ge<font color=Cyan>)</font>-<a name="line-131"></a>-<a name="line-132"></a><a name="addGE"></a><font color=Blue>addGE</font> <font color=Red>::</font> String <font color=Red>-&gt;</font> EntityDef <font color=Red>-&gt;</font> SymTabs <font color=Red>-&gt;</font> SymTabs-<a name="line-133"></a><font color=Blue>addGE</font> n v <font color=Cyan>(</font>pe<font color=Cyan>,</font>ge<font color=Cyan>)</font> <font color=Red>=</font> <font color=Green><u>let</u></font> newge <font color=Red>=</font> addST n v ge <font color=Green><u>in</u></font> newge <font color=Cyan>`seq`</font> <font color=Cyan>(</font>pe<font color=Cyan>,</font> newge<font color=Cyan>)</font>-<a name="line-134"></a>-<a name="line-135"></a><a name="lookupPE"></a><font color=Blue>lookupPE</font> <font color=Red>::</font> String <font color=Red>-&gt;</font> SymTabs <font color=Red>-&gt;</font> Maybe PEDef-<a name="line-136"></a><font color=Blue>lookupPE</font> s <font color=Cyan>(</font>pe<font color=Cyan>,</font>ge<font color=Cyan>)</font> <font color=Red>=</font> lookupST s pe-<a name="line-137"></a>-<a name="line-138"></a><a name="flattenEV"></a><font color=Blue>flattenEV</font> <font color=Red>::</font> EntityValue <font color=Red>-&gt;</font> String-<a name="line-139"></a><font color=Blue>flattenEV</font> <font color=Cyan>(</font>EntityValue evs<font color=Cyan>)</font> <font color=Red>=</font> concatMap flatten evs-<a name="line-140"></a>  <font color=Green><u>where</u></font>-<a name="line-141"></a>    flatten <font color=Cyan>(</font>EVString s<font color=Cyan>)</font>          <font color=Red>=</font> s-<a name="line-142"></a>    flatten <font color=Cyan>(</font>EVRef <font color=Cyan>(</font>RefEntity r<font color=Cyan>)</font><font color=Cyan>)</font> <font color=Red>=</font> <font color=Magenta>"&amp;"</font> <font color=Cyan>++</font>r<font color=Cyan>++</font><font color=Magenta>";"</font>-<a name="line-143"></a>    flatten <font color=Cyan>(</font>EVRef <font color=Cyan>(</font>RefChar r<font color=Cyan>)</font><font color=Cyan>)</font>   <font color=Red>=</font> <font color=Magenta>"&amp;#"</font><font color=Cyan>++</font>show r<font color=Cyan>++</font><font color=Magenta>";"</font>-<a name="line-144"></a> <font color=Blue>-- flatten (EVPERef n)           = "%" ++n++";"</font>-<a name="line-145"></a>-<a name="line-146"></a>-<a name="line-147"></a><a name="fst3"></a><font color=Blue>---- Misc ----</font>-<a name="line-148"></a><font color=Blue>fst3</font> <font color=Red>::</font> <font color=Cyan>(</font>a<font color=Cyan>,</font>b<font color=Cyan>,</font>c<font color=Cyan>)</font> <font color=Red>-&gt;</font> a-<a name="line-149"></a><a name="snd3"></a><font color=Blue>snd3</font> <font color=Red>::</font> <font color=Cyan>(</font>a<font color=Cyan>,</font>b<font color=Cyan>,</font>c<font color=Cyan>)</font> <font color=Red>-&gt;</font> b-<a name="line-150"></a><a name="thd3"></a><font color=Blue>thd3</font> <font color=Red>::</font> <font color=Cyan>(</font>a<font color=Cyan>,</font>b<font color=Cyan>,</font>c<font color=Cyan>)</font> <font color=Red>-&gt;</font> c-<a name="line-151"></a>-<a name="line-152"></a><font color=Blue>fst3</font> <font color=Cyan>(</font>a<font color=Cyan>,</font><font color=Green><u>_</u></font><font color=Cyan>,</font><font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red>=</font> a-<a name="line-153"></a><font color=Blue>snd3</font> <font color=Cyan>(</font><font color=Green><u>_</u></font><font color=Cyan>,</font>a<font color=Cyan>,</font><font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red>=</font> a-<a name="line-154"></a><font color=Blue>thd3</font> <font color=Cyan>(</font><font color=Green><u>_</u></font><font color=Cyan>,</font><font color=Green><u>_</u></font><font color=Cyan>,</font>a<font color=Cyan>)</font> <font color=Red>=</font> a-<a name="line-155"></a>-<a name="line-156"></a>-<a name="line-157"></a><font color=Blue>---- Auxiliary Parsing Functions ----</font>-<a name="line-158"></a>-<a name="line-159"></a><a name="myBracket"></a><font color=Blue>-- | Parse a bracketed item, discarding the brackets AND NOT using adjustErrBad</font>-<a name="line-160"></a><font color=Blue>myBracket</font> <font color=Red>::</font> PolyParse p <font color=Red>=&gt;</font> p bra <font color=Red>-&gt;</font> p ket <font color=Red>-&gt;</font> p a <font color=Red>-&gt;</font> p a-<a name="line-161"></a><font color=Blue>myBracket</font> open close p <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-162"></a>    <font color=Green><u>do</u></font> <font color=Cyan>{</font> open    <font color=Cyan>`adjustErr`</font> <font color=Cyan>(</font><font color=Magenta>"Missing opening bracket:\n\t"</font><font color=Cyan>++</font><font color=Cyan>)</font>-<a name="line-163"></a>       <font color=Cyan>;</font> p <font color=Cyan>`discard`</font> <font color=Cyan>(</font>close <font color=Cyan>`adjustErr`</font> <font color=Cyan>(</font><font color=Magenta>"Missing closing bracket:\n\t"</font><font color=Cyan>++</font><font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-164"></a>       <font color=Cyan>}</font>-<a name="line-165"></a>-<a name="line-166"></a>-<a name="line-167"></a><a name="XParser"></a><font color=Blue>-- | XParser is just a specialisation of the PolyStateLazy parser.</font>-<a name="line-168"></a><a name="XParser"></a><font color=Green><u>type</u></font> XParser a <font color=Red>=</font> Parser SymTabs <font color=Cyan>(</font>Posn<font color=Cyan>,</font>TokenT<font color=Cyan>)</font> a-<a name="line-169"></a>-<a name="line-170"></a><a name="tok"></a><font color=Blue>-- | Return the next token from the input only if it matches the given token.</font>-<a name="line-171"></a><font color=Blue>tok</font> <font color=Red>::</font> TokenT <font color=Red>-&gt;</font> XParser TokenT-<a name="line-172"></a><font color=Blue>tok</font> t <font color=Red>=</font> <font color=Green><u>do</u></font> <font color=Cyan>(</font>p<font color=Cyan>,</font>t'<font color=Cyan>)</font> <font color=Red>&lt;-</font> next-<a name="line-173"></a>           <font color=Green><u>case</u></font> t' <font color=Green><u>of</u></font> TokError <font color=Green><u>_</u></font>    <font color=Red>-&gt;</font> report failBad <font color=Cyan>(</font>show t<font color=Cyan>)</font> p t'-<a name="line-174"></a>                      <font color=Green><u>_</u></font> <font color=Red>|</font> t'<font color=Cyan>==</font>t     <font color=Red>-&gt;</font> return t-<a name="line-175"></a>                        <font color=Red>|</font> otherwise <font color=Red>-&gt;</font> report fail <font color=Cyan>(</font>show t<font color=Cyan>)</font> p t'-<a name="line-176"></a><a name="nottok"></a><font color=Blue>nottok</font> <font color=Red>::</font> <font color=Red>[</font>TokenT<font color=Red>]</font> <font color=Red>-&gt;</font> XParser TokenT-<a name="line-177"></a><font color=Blue>nottok</font> ts <font color=Red>=</font> <font color=Green><u>do</u></font> <font color=Cyan>(</font>p<font color=Cyan>,</font>t<font color=Cyan>)</font> <font color=Red>&lt;-</font> next-<a name="line-178"></a>               <font color=Green><u>if</u></font> t<font color=Cyan>`elem`</font>ts <font color=Green><u>then</u></font> report fail <font color=Cyan>(</font><font color=Magenta>"no "</font><font color=Cyan>++</font>show t<font color=Cyan>)</font> p t-<a name="line-179"></a>                            <font color=Green><u>else</u></font> return t-<a name="line-180"></a>-<a name="line-181"></a><a name="name"></a><font color=Blue>-- | Return just a name, e.g. element name, attribute name.</font>-<a name="line-182"></a><font color=Blue>name</font> <font color=Red>::</font> XParser Name-<a name="line-183"></a><font color=Blue>name</font> <font color=Red>=</font> <font color=Green><u>do</u></font> <font color=Cyan>(</font>p<font color=Cyan>,</font>tok<font color=Cyan>)</font> <font color=Red>&lt;-</font> next-<a name="line-184"></a>          <font color=Green><u>case</u></font> tok <font color=Green><u>of</u></font>-<a name="line-185"></a>            TokName s  <font color=Red>-&gt;</font> return s-<a name="line-186"></a>            TokError <font color=Green><u>_</u></font> <font color=Red>-&gt;</font> report failBad <font color=Magenta>"a name"</font> p tok-<a name="line-187"></a>            <font color=Green><u>_</u></font>          <font color=Red>-&gt;</font> report fail <font color=Magenta>"a name"</font> p tok-<a name="line-188"></a>-<a name="line-189"></a><a name="string"></a><font color=Blue>string</font><font color=Cyan>,</font> freetext <font color=Red>::</font> XParser String-<a name="line-190"></a><font color=Blue>string</font>   <font color=Red>=</font> <font color=Green><u>do</u></font> <font color=Cyan>(</font>p<font color=Cyan>,</font>t<font color=Cyan>)</font> <font color=Red>&lt;-</font> next-<a name="line-191"></a>              <font color=Green><u>case</u></font> t <font color=Green><u>of</u></font> TokName s <font color=Red>-&gt;</font> return s-<a name="line-192"></a>                        <font color=Green><u>_</u></font>         <font color=Red>-&gt;</font> report fail <font color=Magenta>"text"</font> p t-<a name="line-193"></a><a name="freetext"></a><font color=Blue>freetext</font> <font color=Red>=</font> <font color=Green><u>do</u></font> <font color=Cyan>(</font>p<font color=Cyan>,</font>t<font color=Cyan>)</font> <font color=Red>&lt;-</font> next-<a name="line-194"></a>              <font color=Green><u>case</u></font> t <font color=Green><u>of</u></font> TokFreeText s <font color=Red>-&gt;</font> return s-<a name="line-195"></a>                        <font color=Green><u>_</u></font>             <font color=Red>-&gt;</font> report fail <font color=Magenta>"text"</font> p t-<a name="line-196"></a>-<a name="line-197"></a><a name="maybe"></a><font color=Blue>maybe</font> <font color=Red>::</font> XParser a <font color=Red>-&gt;</font> XParser <font color=Cyan>(</font>Maybe a<font color=Cyan>)</font>-<a name="line-198"></a><font color=Blue>maybe</font> p <font color=Red>=</font>-<a name="line-199"></a>    <font color=Cyan>(</font> p <font color=Cyan>&gt;&gt;=</font> return <font color=Cyan>.</font> Just<font color=Cyan>)</font> <font color=Cyan>`onFail`</font>-<a name="line-200"></a>    <font color=Cyan>(</font> return Nothing<font color=Cyan>)</font>-<a name="line-201"></a>-<a name="line-202"></a><a name="either"></a><font color=Blue>either</font> <font color=Red>::</font> XParser a <font color=Red>-&gt;</font> XParser b <font color=Red>-&gt;</font> XParser <font color=Cyan>(</font>Either a b<font color=Cyan>)</font>-<a name="line-203"></a><font color=Blue>either</font> p q <font color=Red>=</font>-<a name="line-204"></a>    <font color=Cyan>(</font> p <font color=Cyan>&gt;&gt;=</font> return <font color=Cyan>.</font> Left<font color=Cyan>)</font> <font color=Cyan>`onFail`</font>-<a name="line-205"></a>    <font color=Cyan>(</font> q <font color=Cyan>&gt;&gt;=</font> return <font color=Cyan>.</font> Right<font color=Cyan>)</font>-<a name="line-206"></a>-<a name="line-207"></a><a name="word"></a><font color=Blue>word</font> <font color=Red>::</font> String <font color=Red>-&gt;</font> XParser ()-<a name="line-208"></a><font color=Blue>word</font> s <font color=Red>=</font> <font color=Green><u>do</u></font> <font color=Cyan>{</font> x <font color=Red>&lt;-</font> next-<a name="line-209"></a>            <font color=Cyan>;</font> <font color=Green><u>case</u></font> x <font color=Green><u>of</u></font>-<a name="line-210"></a>                <font color=Cyan>(</font>p<font color=Cyan>,</font>TokName n<font color=Cyan>)</font>     <font color=Red>|</font> s<font color=Cyan>==</font>n <font color=Red>-&gt;</font> return ()-<a name="line-211"></a>                <font color=Cyan>(</font>p<font color=Cyan>,</font>TokFreeText n<font color=Cyan>)</font> <font color=Red>|</font> s<font color=Cyan>==</font>n <font color=Red>-&gt;</font> return ()-<a name="line-212"></a>                <font color=Cyan>(</font>p<font color=Cyan>,</font>t<font color=Red>@</font><font color=Cyan>(</font>TokError <font color=Green><u>_</u></font><font color=Cyan>)</font><font color=Cyan>)</font> <font color=Red>-&gt;</font> report failBad <font color=Cyan>(</font>show s<font color=Cyan>)</font> p t-<a name="line-213"></a>                <font color=Cyan>(</font>p<font color=Cyan>,</font>t<font color=Cyan>)</font> <font color=Red>-&gt;</font> report fail <font color=Cyan>(</font>show s<font color=Cyan>)</font> p t-<a name="line-214"></a>            <font color=Cyan>}</font>-<a name="line-215"></a>-<a name="line-216"></a><a name="posn"></a><font color=Blue>posn</font> <font color=Red>=</font> <font color=Green><u>do</u></font> <font color=Cyan>{</font> x<font color=Red>@</font><font color=Cyan>(</font>p<font color=Cyan>,</font><font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red>&lt;-</font> next-<a name="line-217"></a>          <font color=Cyan>;</font> reparse <font color=Red>[</font>x<font color=Red>]</font>-<a name="line-218"></a>          <font color=Cyan>;</font> return p-<a name="line-219"></a>          <font color=Cyan>}</font>-<a name="line-220"></a>-<a name="line-221"></a><a name="nmtoken"></a><font color=Blue>nmtoken</font> <font color=Red>::</font> XParser NmToken-<a name="line-222"></a><font color=Blue>nmtoken</font> <font color=Red>=</font> <font color=Cyan>(</font>string <font color=Cyan>`onFail`</font> freetext<font color=Cyan>)</font>-<a name="line-223"></a>-<a name="line-224"></a><a name="failP"></a><font color=Blue>failP</font><font color=Cyan>,</font> failBadP <font color=Red>::</font> String <font color=Red>-&gt;</font> XParser a-<a name="line-225"></a><font color=Blue>failP</font> msg <font color=Red>=</font> <font color=Green><u>do</u></font> <font color=Cyan>{</font> p <font color=Red>&lt;-</font> posn<font color=Cyan>;</font> fail <font color=Cyan>(</font>msg<font color=Cyan>++</font><font color=Magenta>"\n    at "</font><font color=Cyan>++</font>show p<font color=Cyan>)</font> <font color=Cyan>}</font>-<a name="line-226"></a><a name="failBadP"></a><font color=Blue>failBadP</font> msg <font color=Red>=</font> <font color=Green><u>do</u></font> <font color=Cyan>{</font> p <font color=Red>&lt;-</font> posn<font color=Cyan>;</font> failBad <font color=Cyan>(</font>msg<font color=Cyan>++</font><font color=Magenta>"\n    at "</font><font color=Cyan>++</font>show p<font color=Cyan>)</font> <font color=Cyan>}</font>-<a name="line-227"></a>-<a name="line-228"></a><a name="report"></a><font color=Blue>report</font> <font color=Red>::</font> <font color=Cyan>(</font>String<font color=Red>-&gt;</font>XParser a<font color=Cyan>)</font> <font color=Red>-&gt;</font> String <font color=Red>-&gt;</font> Posn <font color=Red>-&gt;</font> TokenT <font color=Red>-&gt;</font> XParser a-<a name="line-229"></a><font color=Blue>report</font> fail exp p t <font color=Red>=</font> fail <font color=Cyan>(</font><font color=Magenta>"Expected "</font><font color=Cyan>++</font>exp<font color=Cyan>++</font><font color=Magenta>" but found "</font><font color=Cyan>++</font>show t-<a name="line-230"></a>                           <font color=Cyan>++</font><font color=Magenta>"\n  in "</font><font color=Cyan>++</font>show p<font color=Cyan>)</font>-<a name="line-231"></a>-<a name="line-232"></a><a name="adjustErrP"></a><font color=Blue>adjustErrP</font> <font color=Red>::</font> XParser a <font color=Red>-&gt;</font> <font color=Cyan>(</font>String<font color=Red>-&gt;</font>String<font color=Cyan>)</font> <font color=Red>-&gt;</font> XParser a-<a name="line-233"></a><a name="adjustErrP"></a><font color=Blue>p</font> <font color=Cyan>`adjustErrP`</font> f <font color=Red>=</font> p <font color=Cyan>`onFail`</font> <font color=Green><u>do</u></font> pn <font color=Red>&lt;-</font> posn-<a name="line-234"></a>                                 <font color=Cyan>(</font>p <font color=Cyan>`adjustErr`</font> f<font color=Cyan>)</font> <font color=Cyan>`adjustErr`</font> <font color=Cyan>(</font><font color=Cyan>++</font>show pn<font color=Cyan>)</font>-<a name="line-235"></a>-<a name="line-236"></a><a name="peRef"></a><font color=Blue>peRef</font> <font color=Red>::</font> XParser a <font color=Red>-&gt;</font> XParser a-<a name="line-237"></a><font color=Blue>peRef</font> p <font color=Red>=</font>-<a name="line-238"></a>    p <font color=Cyan>`onFail`</font>-<a name="line-239"></a>    <font color=Green><u>do</u></font> pn <font color=Red>&lt;-</font> posn-<a name="line-240"></a>       n <font color=Red>&lt;-</font> pereference-<a name="line-241"></a>       tr <font color=Red>&lt;-</font> stQuery <font color=Cyan>(</font>lookupPE n<font color=Cyan>)</font> <font color=Cyan>`debug`</font> <font color=Cyan>(</font><font color=Magenta>"Looking up %"</font><font color=Cyan>++</font>n<font color=Cyan>)</font>-<a name="line-242"></a>       <font color=Green><u>case</u></font> tr <font color=Green><u>of</u></font>-<a name="line-243"></a>           Just <font color=Cyan>(</font>PEDefEntityValue ev<font color=Cyan>)</font> <font color=Red>-&gt;</font>-<a name="line-244"></a>                      <font color=Green><u>do</u></font> reparse <font color=Cyan>(</font>xmlReLex <font color=Cyan>(</font>posInNewCxt <font color=Cyan>(</font><font color=Magenta>"macro %"</font><font color=Cyan>++</font>n<font color=Cyan>++</font><font color=Magenta>";"</font><font color=Cyan>)</font>-<a name="line-245"></a>                                                        <font color=Cyan>(</font>Just pn<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-246"></a>                                           <font color=Cyan>(</font>flattenEV ev<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-247"></a>                               <font color=Cyan>`debug`</font> <font color=Cyan>(</font><font color=Magenta>"  defn:  "</font><font color=Cyan>++</font>flattenEV ev<font color=Cyan>)</font>-<a name="line-248"></a>                         peRef p-<a name="line-249"></a>           Just <font color=Cyan>(</font>PEDefExternalID <font color=Cyan>(</font>PUBLIC <font color=Green><u>_</u></font> <font color=Cyan>(</font>SystemLiteral f<font color=Cyan>)</font><font color=Cyan>)</font><font color=Cyan>)</font> <font color=Red>-&gt;</font>-<a name="line-250"></a>                      <font color=Green><u>do</u></font> <font color=Green><u>let</u></font> f' <font color=Red>=</font> combine <font color=Cyan>(</font>dropFileName <font color=Cyan>$</font> posnFilename pn<font color=Cyan>)</font> f-<a name="line-251"></a>                             val <font color=Red>=</font> unsafePerformIO <font color=Cyan>(</font>readFile f'<font color=Cyan>)</font>-<a name="line-252"></a>                         reparse <font color=Cyan>(</font>xmlReLex <font color=Cyan>(</font>posInNewCxt f'-<a name="line-253"></a>                                                        <font color=Cyan>(</font>Just pn<font color=Cyan>)</font><font color=Cyan>)</font> val<font color=Cyan>)</font>-<a name="line-254"></a>                               <font color=Cyan>`debug`</font> <font color=Cyan>(</font><font color=Magenta>"  reading from file "</font><font color=Cyan>++</font>f'<font color=Cyan>)</font>-<a name="line-255"></a>                         peRef p-<a name="line-256"></a>           Just <font color=Cyan>(</font>PEDefExternalID <font color=Cyan>(</font>SYSTEM <font color=Cyan>(</font>SystemLiteral f<font color=Cyan>)</font><font color=Cyan>)</font><font color=Cyan>)</font> <font color=Red>-&gt;</font>-<a name="line-257"></a>                      <font color=Green><u>do</u></font> <font color=Green><u>let</u></font> f' <font color=Red>=</font> combine <font color=Cyan>(</font>dropFileName <font color=Cyan>$</font> posnFilename pn<font color=Cyan>)</font> f-<a name="line-258"></a>                             val <font color=Red>=</font> unsafePerformIO <font color=Cyan>(</font>readFile f'<font color=Cyan>)</font>-<a name="line-259"></a>                         reparse <font color=Cyan>(</font>xmlReLex <font color=Cyan>(</font>posInNewCxt f'-<a name="line-260"></a>                                                        <font color=Cyan>(</font>Just pn<font color=Cyan>)</font><font color=Cyan>)</font> val<font color=Cyan>)</font>-<a name="line-261"></a>                               <font color=Cyan>`debug`</font> <font color=Cyan>(</font><font color=Magenta>"  reading from file "</font><font color=Cyan>++</font>f'<font color=Cyan>)</font>-<a name="line-262"></a>                         peRef p-<a name="line-263"></a>           Nothing <font color=Red>-&gt;</font> fail <font color=Cyan>(</font><font color=Magenta>"PEReference use before definition: "</font><font color=Cyan>++</font><font color=Magenta>"%"</font><font color=Cyan>++</font>n<font color=Cyan>++</font><font color=Magenta>";"</font>-<a name="line-264"></a>                           <font color=Cyan>++</font><font color=Magenta>"\n    at "</font><font color=Cyan>++</font>show pn<font color=Cyan>)</font>-<a name="line-265"></a>-<a name="line-266"></a><a name="blank"></a><font color=Blue>blank</font> <font color=Red>::</font> XParser a <font color=Red>-&gt;</font> XParser a-<a name="line-267"></a><font color=Blue>blank</font> p <font color=Red>=</font>-<a name="line-268"></a>    p <font color=Cyan>`onFail`</font>-<a name="line-269"></a>    <font color=Green><u>do</u></font> n <font color=Red>&lt;-</font> pereference-<a name="line-270"></a>       tr <font color=Red>&lt;-</font> stQuery <font color=Cyan>(</font>lookupPE n<font color=Cyan>)</font> <font color=Cyan>`debug`</font> <font color=Cyan>(</font><font color=Magenta>"Looking up %"</font><font color=Cyan>++</font>n<font color=Cyan>++</font><font color=Magenta>" (is blank?)"</font><font color=Cyan>)</font>-<a name="line-271"></a>       <font color=Green><u>case</u></font> tr <font color=Green><u>of</u></font>-<a name="line-272"></a>           Just <font color=Cyan>(</font>PEDefEntityValue ev<font color=Cyan>)</font>-<a name="line-273"></a>                    <font color=Red>|</font> all isSpace <font color=Cyan>(</font>flattenEV ev<font color=Cyan>)</font>  <font color=Red>-&gt;</font>-<a name="line-274"></a>                            <font color=Green><u>do</u></font> blank p <font color=Cyan>`debug`</font> <font color=Magenta>"Empty macro definition"</font>-<a name="line-275"></a>           Just <font color=Green><u>_</u></font>  <font color=Red>-&gt;</font> failP <font color=Cyan>(</font><font color=Magenta>"expected a blank PERef macro: "</font><font color=Cyan>++</font><font color=Magenta>"%"</font><font color=Cyan>++</font>n<font color=Cyan>++</font><font color=Magenta>";"</font><font color=Cyan>)</font>-<a name="line-276"></a>           Nothing <font color=Red>-&gt;</font> failP <font color=Cyan>(</font><font color=Magenta>"PEReference use before definition: "</font><font color=Cyan>++</font><font color=Magenta>"%"</font><font color=Cyan>++</font>n<font color=Cyan>++</font><font color=Magenta>";"</font><font color=Cyan>)</font>-<a name="line-277"></a>-<a name="line-278"></a>-<a name="line-279"></a>-<a name="line-280"></a><font color=Blue>---- XML Parsing Functions ----</font>-<a name="line-281"></a>-<a name="line-282"></a><a name="justDTD"></a><font color=Blue>justDTD</font> <font color=Red>::</font> XParser <font color=Cyan>(</font>Maybe DocTypeDecl<font color=Cyan>)</font>-<a name="line-283"></a><font color=Blue>justDTD</font> <font color=Red>=</font>-<a name="line-284"></a>  <font color=Green><u>do</u></font> <font color=Cyan>(</font>ExtSubset <font color=Green><u>_</u></font> ds<font color=Cyan>)</font> <font color=Red>&lt;-</font> extsubset <font color=Cyan>`debug`</font> <font color=Magenta>"Trying external subset"</font>-<a name="line-285"></a>     <font color=Green><u>if</u></font> null ds <font color=Green><u>then</u></font> fail <font color=Magenta>"empty"</font>-<a name="line-286"></a>         <font color=Green><u>else</u></font> return <font color=Cyan>(</font>Just <font color=Cyan>(</font>DTD <font color=Magenta>"extsubset"</font> Nothing <font color=Cyan>(</font>concatMap extract ds<font color=Cyan>)</font><font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-287"></a>  <font color=Cyan>`onFail`</font>-<a name="line-288"></a>  <font color=Green><u>do</u></font> <font color=Cyan>(</font>Prolog <font color=Green><u>_</u></font> <font color=Green><u>_</u></font> dtd <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red>&lt;-</font> prolog-<a name="line-289"></a>     return dtd-<a name="line-290"></a> <font color=Green><u>where</u></font> extract <font color=Cyan>(</font>ExtMarkupDecl m<font color=Cyan>)</font> <font color=Red>=</font> <font color=Red>[</font>m<font color=Red>]</font>-<a name="line-291"></a>       extract <font color=Cyan>(</font>ExtConditionalSect <font color=Cyan>(</font>IncludeSect i<font color=Cyan>)</font><font color=Cyan>)</font> <font color=Red>=</font> concatMap extract i-<a name="line-292"></a>       extract <font color=Cyan>(</font>ExtConditionalSect <font color=Cyan>(</font>IgnoreSect i<font color=Cyan>)</font><font color=Cyan>)</font> <font color=Red>=</font> []-<a name="line-293"></a>-<a name="line-294"></a><a name="document"></a><font color=Blue>-- | Return an entire XML document including prolog and trailing junk.</font>-<a name="line-295"></a><font color=Blue>document</font> <font color=Red>::</font> XParser <font color=Cyan>(</font>Document Posn<font color=Cyan>)</font>-<a name="line-296"></a><font color=Blue>document</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-297"></a> <font color=Blue>-- p &lt;- prolog `adjustErr` ("unrecognisable XML prolog\n"++)</font>-<a name="line-298"></a> <font color=Blue>-- e &lt;- element</font>-<a name="line-299"></a> <font color=Blue>-- ms &lt;- many misc</font>-<a name="line-300"></a> <font color=Blue>-- (_,ge) &lt;- stGet</font>-<a name="line-301"></a> <font color=Blue>-- return (Document p ge e ms)</font>-<a name="line-302"></a>    return Document <font color=Cyan>`apply`</font> <font color=Cyan>(</font>prolog <font color=Cyan>`adjustErr`</font>-<a name="line-303"></a>                                    <font color=Cyan>(</font><font color=Magenta>"unrecognisable XML prolog\n"</font><font color=Cyan>++</font><font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-304"></a>                    <font color=Cyan>`apply`</font> <font color=Cyan>(</font>fmap snd stGet<font color=Cyan>)</font>-<a name="line-305"></a>                    <font color=Cyan>`apply`</font> element-<a name="line-306"></a>                    <font color=Cyan>`apply`</font> many misc-<a name="line-307"></a>-<a name="line-308"></a><a name="comment"></a><font color=Blue>-- | Return an XML comment.</font>-<a name="line-309"></a><font color=Blue>comment</font> <font color=Red>::</font> XParser Comment-<a name="line-310"></a><font color=Blue>comment</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-311"></a>    myBracket <font color=Cyan>(</font>tok TokCommentOpen<font color=Cyan>)</font> <font color=Cyan>(</font>tok TokCommentClose<font color=Cyan>)</font> freetext-<a name="line-312"></a><font color=Blue>--  tok TokCommentOpen</font>-<a name="line-313"></a><font color=Blue>--  commit $ do</font>-<a name="line-314"></a><font color=Blue>--    c &lt;- freetext</font>-<a name="line-315"></a><font color=Blue>--    tok TokCommentClose</font>-<a name="line-316"></a><font color=Blue>--    return c</font>-<a name="line-317"></a>-<a name="line-318"></a><a name="processinginstruction"></a><font color=Blue>-- | Parse a processing instruction.</font>-<a name="line-319"></a><font color=Blue>processinginstruction</font> <font color=Red>::</font> XParser ProcessingInstruction-<a name="line-320"></a><font color=Blue>processinginstruction</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-321"></a>    tok TokPIOpen-<a name="line-322"></a>    commit <font color=Cyan>$</font> <font color=Green><u>do</u></font>-<a name="line-323"></a>      n <font color=Red>&lt;-</font> string  <font color=Cyan>`onFail`</font> failP <font color=Magenta>"processing instruction has no target"</font>-<a name="line-324"></a>      f <font color=Red>&lt;-</font> freetext-<a name="line-325"></a>      tok TokPIClose <font color=Cyan>`onFail`</font> failP <font color=Cyan>(</font><font color=Magenta>"missing ?&gt; in &lt;?"</font><font color=Cyan>++</font>n<font color=Cyan>)</font>-<a name="line-326"></a>      return <font color=Cyan>(</font>n<font color=Cyan>,</font> f<font color=Cyan>)</font>-<a name="line-327"></a>-<a name="line-328"></a><a name="cdsect"></a><font color=Blue>cdsect</font> <font color=Red>::</font> XParser CDSect-<a name="line-329"></a><font color=Blue>cdsect</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-330"></a>    tok TokSectionOpen-<a name="line-331"></a>    bracket <font color=Cyan>(</font>tok <font color=Cyan>(</font>TokSection CDATAx<font color=Cyan>)</font><font color=Cyan>)</font> <font color=Cyan>(</font>tok TokSectionClose<font color=Cyan>)</font> chardata-<a name="line-332"></a>-<a name="line-333"></a><a name="prolog"></a><font color=Blue>prolog</font> <font color=Red>::</font> XParser Prolog-<a name="line-334"></a><font color=Blue>prolog</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-335"></a>    x   <font color=Red>&lt;-</font> maybe xmldecl-<a name="line-336"></a>    m1  <font color=Red>&lt;-</font> many misc-<a name="line-337"></a>    dtd <font color=Red>&lt;-</font> maybe doctypedecl-<a name="line-338"></a>    m2  <font color=Red>&lt;-</font> many misc-<a name="line-339"></a>    return <font color=Cyan>(</font>Prolog x m1 dtd m2<font color=Cyan>)</font>-<a name="line-340"></a>-<a name="line-341"></a><a name="xmldecl"></a><font color=Blue>xmldecl</font> <font color=Red>::</font> XParser XMLDecl-<a name="line-342"></a><font color=Blue>xmldecl</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-343"></a>    tok TokPIOpen-<a name="line-344"></a>    <font color=Cyan>(</font>word <font color=Magenta>"xml"</font> <font color=Cyan>`onFail`</font> word <font color=Magenta>"XML"</font><font color=Cyan>)</font>-<a name="line-345"></a>    p <font color=Red>&lt;-</font> posn-<a name="line-346"></a>    s <font color=Red>&lt;-</font> freetext-<a name="line-347"></a>    tok TokPIClose <font color=Cyan>`onFail`</font> failBadP <font color=Magenta>"missing ?&gt; in &lt;?xml ...?&gt;"</font>-<a name="line-348"></a> <font color=Blue>-- raise ((runParser aux emptySTs . xmlReLex p) s)</font>-<a name="line-349"></a>    return <font color=Cyan>(</font>fst3 <font color=Cyan>(</font><font color=Cyan>(</font>runParser aux emptySTs <font color=Cyan>.</font> xmlReLex p<font color=Cyan>)</font> s<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-350"></a>  <font color=Green><u>where</u></font>-<a name="line-351"></a>    aux <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-352"></a>        v <font color=Red>&lt;-</font> versioninfo  <font color=Cyan>`onFail`</font> failP <font color=Magenta>"missing XML version info"</font>-<a name="line-353"></a>        e <font color=Red>&lt;-</font> maybe encodingdecl-<a name="line-354"></a>        s <font color=Red>&lt;-</font> maybe sddecl-<a name="line-355"></a>        return <font color=Cyan>(</font>XMLDecl v e s<font color=Cyan>)</font>-<a name="line-356"></a> <font color=Blue>-- raise (Left err, _, _) = failP err</font>-<a name="line-357"></a> <font color=Blue>-- raise (Right ok, _, _) = return ok</font>-<a name="line-358"></a>-<a name="line-359"></a><a name="versioninfo"></a><font color=Blue>versioninfo</font> <font color=Red>::</font> XParser VersionInfo-<a name="line-360"></a><font color=Blue>versioninfo</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-361"></a>    <font color=Cyan>(</font>word <font color=Magenta>"version"</font> <font color=Cyan>`onFail`</font> word <font color=Magenta>"VERSION"</font><font color=Cyan>)</font>-<a name="line-362"></a>    tok TokEqual-<a name="line-363"></a>    bracket <font color=Cyan>(</font>tok TokQuote<font color=Cyan>)</font> <font color=Cyan>(</font>tok TokQuote<font color=Cyan>)</font> freetext-<a name="line-364"></a>-<a name="line-365"></a><a name="misc"></a><font color=Blue>misc</font> <font color=Red>::</font> XParser Misc-<a name="line-366"></a><font color=Blue>misc</font> <font color=Red>=</font>-<a name="line-367"></a>    oneOf' <font color=Red>[</font> <font color=Cyan>(</font><font color=Magenta>"&lt;!--comment--&gt;"</font><font color=Cyan>,</font>  comment <font color=Cyan>&gt;&gt;=</font> return <font color=Cyan>.</font> Comment<font color=Cyan>)</font>-<a name="line-368"></a>           <font color=Cyan>,</font> <font color=Cyan>(</font><font color=Magenta>"&lt;?PI?&gt;"</font><font color=Cyan>,</font>          processinginstruction <font color=Cyan>&gt;&gt;=</font> return <font color=Cyan>.</font> PI<font color=Cyan>)</font>-<a name="line-369"></a>           <font color=Red>]</font>-<a name="line-370"></a>-<a name="line-371"></a><a name="doctypedecl"></a><font color=Blue>-- | Return a DOCTYPE decl, indicating a DTD.</font>-<a name="line-372"></a><font color=Blue>doctypedecl</font> <font color=Red>::</font> XParser DocTypeDecl-<a name="line-373"></a><font color=Blue>doctypedecl</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-374"></a>    tok TokSpecialOpen-<a name="line-375"></a>    tok <font color=Cyan>(</font>TokSpecial DOCTYPEx<font color=Cyan>)</font>-<a name="line-376"></a>    commit <font color=Cyan>$</font> <font color=Green><u>do</u></font>-<a name="line-377"></a>      n   <font color=Red>&lt;-</font> name-<a name="line-378"></a>      eid <font color=Red>&lt;-</font> maybe externalid-<a name="line-379"></a>      es  <font color=Red>&lt;-</font> maybe <font color=Cyan>(</font>bracket <font color=Cyan>(</font>tok TokSqOpen<font color=Cyan>)</font> <font color=Cyan>(</font>tok TokSqClose<font color=Cyan>)</font>-<a name="line-380"></a>                            <font color=Cyan>(</font>many <font color=Cyan>(</font>peRef markupdecl<font color=Cyan>)</font><font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-381"></a>      blank <font color=Cyan>(</font>tok TokAnyClose<font color=Cyan>)</font>  <font color=Cyan>`onFail`</font> failP <font color=Magenta>"missing &gt; in DOCTYPE decl"</font>-<a name="line-382"></a>      return <font color=Cyan>(</font>DTD n eid <font color=Cyan>(</font><font color=Green><u>case</u></font> es <font color=Green><u>of</u></font> <font color=Cyan>{</font> Nothing <font color=Red>-&gt;</font> []<font color=Cyan>;</font> Just e <font color=Red>-&gt;</font> e <font color=Cyan>}</font><font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-383"></a>-<a name="line-384"></a><a name="markupdecl"></a><font color=Blue>-- | Return a DTD markup decl, e.g. ELEMENT, ATTLIST, etc</font>-<a name="line-385"></a><font color=Blue>markupdecl</font> <font color=Red>::</font> XParser MarkupDecl-<a name="line-386"></a><font color=Blue>markupdecl</font> <font color=Red>=</font>-<a name="line-387"></a>  oneOf' <font color=Red>[</font> <font color=Cyan>(</font><font color=Magenta>"ELEMENT"</font><font color=Cyan>,</font>  elementdecl  <font color=Cyan>&gt;&gt;=</font> return <font color=Cyan>.</font> Element<font color=Cyan>)</font>-<a name="line-388"></a>         <font color=Cyan>,</font> <font color=Cyan>(</font><font color=Magenta>"ATTLIST"</font><font color=Cyan>,</font>  attlistdecl  <font color=Cyan>&gt;&gt;=</font> return <font color=Cyan>.</font> AttList<font color=Cyan>)</font>-<a name="line-389"></a>         <font color=Cyan>,</font> <font color=Cyan>(</font><font color=Magenta>"ENTITY"</font><font color=Cyan>,</font>   entitydecl   <font color=Cyan>&gt;&gt;=</font> return <font color=Cyan>.</font> Entity<font color=Cyan>)</font>-<a name="line-390"></a>         <font color=Cyan>,</font> <font color=Cyan>(</font><font color=Magenta>"NOTATION"</font><font color=Cyan>,</font> notationdecl <font color=Cyan>&gt;&gt;=</font> return <font color=Cyan>.</font> Notation<font color=Cyan>)</font>-<a name="line-391"></a>         <font color=Cyan>,</font> <font color=Cyan>(</font><font color=Magenta>"misc"</font><font color=Cyan>,</font>     misc         <font color=Cyan>&gt;&gt;=</font> return <font color=Cyan>.</font> MarkupMisc<font color=Cyan>)</font>-<a name="line-392"></a>         <font color=Red>]</font>-<a name="line-393"></a>    <font color=Cyan>`adjustErrP`</font>-<a name="line-394"></a>          <font color=Cyan>(</font><font color=Magenta>"when looking for a markup decl,\n"</font><font color=Cyan>++</font><font color=Cyan>)</font>-<a name="line-395"></a> <font color=Blue>--       (\  (ELEMENT, ATTLIST, ENTITY, NOTATION, &lt;!--comment--&gt;, or &lt;?PI?&gt;")</font>-<a name="line-396"></a>-<a name="line-397"></a><a name="extsubset"></a><font color=Blue>extsubset</font> <font color=Red>::</font> XParser ExtSubset-<a name="line-398"></a><font color=Blue>extsubset</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-399"></a>    td <font color=Red>&lt;-</font> maybe textdecl-<a name="line-400"></a>    ds <font color=Red>&lt;-</font> many <font color=Cyan>(</font>peRef extsubsetdecl<font color=Cyan>)</font>-<a name="line-401"></a>    return <font color=Cyan>(</font>ExtSubset td ds<font color=Cyan>)</font>-<a name="line-402"></a>-<a name="line-403"></a><a name="extsubsetdecl"></a><font color=Blue>extsubsetdecl</font> <font color=Red>::</font> XParser ExtSubsetDecl-<a name="line-404"></a><font color=Blue>extsubsetdecl</font> <font color=Red>=</font>-<a name="line-405"></a>    <font color=Cyan>(</font> markupdecl <font color=Cyan>&gt;&gt;=</font> return <font color=Cyan>.</font> ExtMarkupDecl<font color=Cyan>)</font> <font color=Cyan>`onFail`</font>-<a name="line-406"></a>    <font color=Cyan>(</font> conditionalsect <font color=Cyan>&gt;&gt;=</font> return <font color=Cyan>.</font> ExtConditionalSect<font color=Cyan>)</font>-<a name="line-407"></a>-<a name="line-408"></a><a name="sddecl"></a><font color=Blue>sddecl</font> <font color=Red>::</font> XParser SDDecl-<a name="line-409"></a><font color=Blue>sddecl</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-410"></a>    <font color=Cyan>(</font>word <font color=Magenta>"standalone"</font> <font color=Cyan>`onFail`</font> word <font color=Magenta>"STANDALONE"</font><font color=Cyan>)</font>-<a name="line-411"></a>    commit <font color=Cyan>$</font> <font color=Green><u>do</u></font>-<a name="line-412"></a>      tok TokEqual <font color=Cyan>`onFail`</font> failP <font color=Magenta>"missing = in 'standalone' decl"</font>-<a name="line-413"></a>      bracket <font color=Cyan>(</font>tok TokQuote<font color=Cyan>)</font> <font color=Cyan>(</font>tok TokQuote<font color=Cyan>)</font>-<a name="line-414"></a>              <font color=Cyan>(</font> <font color=Cyan>(</font>word <font color=Magenta>"yes"</font> <font color=Cyan>&gt;&gt;</font> return True<font color=Cyan>)</font> <font color=Cyan>`onFail`</font>-<a name="line-415"></a>                <font color=Cyan>(</font>word <font color=Magenta>"no"</font> <font color=Cyan>&gt;&gt;</font> return False<font color=Cyan>)</font> <font color=Cyan>`onFail`</font>-<a name="line-416"></a>                failP <font color=Magenta>"'standalone' decl requires 'yes' or 'no' value"</font> <font color=Cyan>)</font>-<a name="line-417"></a>-<a name="line-418"></a><font color=Blue>{--<a name="line-419"></a>element :: XParser (Element Posn)-<a name="line-420"></a>element = do-<a name="line-421"></a>    tok TokAnyOpen-<a name="line-422"></a>    (ElemTag n as) &lt;- elemtag-<a name="line-423"></a>    oneOf' [ ("self-closing tag &lt;"++n++"/&gt;"-<a name="line-424"></a>             ,  do tok TokEndClose-<a name="line-425"></a>                   return (Elem n as []))-<a name="line-426"></a>           , ("after open tag &lt;"++n++"&gt;"-<a name="line-427"></a>             ,  do tok TokAnyClose-<a name="line-428"></a>                   cs &lt;- many content-<a name="line-429"></a>                   p  &lt;- posn-<a name="line-430"></a>                   m  &lt;- bracket (tok TokEndOpen) (tok TokAnyClose) name-<a name="line-431"></a>                   checkmatch p n m-<a name="line-432"></a>                   return (Elem n as cs))-<a name="line-433"></a>           ] `adjustErr` (("in element tag "++n++",\n")++)-<a name="line-434"></a>-}</font>-<a name="line-435"></a>-<a name="line-436"></a><a name="element"></a><font color=Blue>-- | Return a complete element including all its inner content.</font>-<a name="line-437"></a><font color=Blue>element</font> <font color=Red>::</font> XParser <font color=Cyan>(</font>Element Posn<font color=Cyan>)</font>-<a name="line-438"></a><font color=Blue>element</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-439"></a>    tok TokAnyOpen-<a name="line-440"></a>    <font color=Cyan>(</font>ElemTag n <font color=Green><u>as</u></font><font color=Cyan>)</font> <font color=Red>&lt;-</font> elemtag-<a name="line-441"></a>    return <font color=Cyan>(</font>Elem n <font color=Green><u>as</u></font><font color=Cyan>)</font> <font color=Cyan>`apply`</font>-<a name="line-442"></a>        <font color=Cyan>(</font> <font color=Green><u>do</u></font> tok TokEndClose-<a name="line-443"></a>             return []-<a name="line-444"></a>          <font color=Cyan>`onFail`</font>-<a name="line-445"></a>          <font color=Green><u>do</u></font> tok TokAnyClose-<a name="line-446"></a>             commit <font color=Cyan>$</font> manyFinally content-<a name="line-447"></a>                                  <font color=Cyan>(</font><font color=Green><u>do</u></font> p <font color=Red>&lt;-</font> posn-<a name="line-448"></a>                                      m <font color=Red>&lt;-</font> bracket <font color=Cyan>(</font>tok TokEndOpen<font color=Cyan>)</font>-<a name="line-449"></a>                                                   <font color=Cyan>(</font>tok TokAnyClose<font color=Cyan>)</font> name-<a name="line-450"></a>                                      checkmatch p n m<font color=Cyan>)</font>-<a name="line-451"></a>          <font color=Cyan>)</font> <font color=Cyan>`adjustErrBad`</font> <font color=Cyan>(</font><font color=Cyan>(</font><font color=Magenta>"in element tag "</font><font color=Cyan>++</font>n<font color=Cyan>++</font><font color=Magenta>",\n"</font><font color=Cyan>)</font><font color=Cyan>++</font><font color=Cyan>)</font>-<a name="line-452"></a>-<a name="line-453"></a><a name="checkmatch"></a><font color=Blue>checkmatch</font> <font color=Red>::</font> Posn <font color=Red>-&gt;</font> Name <font color=Red>-&gt;</font> Name <font color=Red>-&gt;</font> XParser ()-<a name="line-454"></a><font color=Blue>checkmatch</font> p n m <font color=Red>=</font>-<a name="line-455"></a>  <font color=Green><u>if</u></font> n <font color=Cyan>==</font> m <font color=Green><u>then</u></font> return ()-<a name="line-456"></a>  <font color=Green><u>else</u></font> failBadP <font color=Cyan>(</font><font color=Magenta>"tag &lt;"</font><font color=Cyan>++</font>n<font color=Cyan>++</font><font color=Magenta>"&gt; terminated by &lt;/"</font><font color=Cyan>++</font>m<font color=Cyan>++</font><font color=Magenta>"&gt;"</font><font color=Cyan>)</font>-<a name="line-457"></a>-<a name="line-458"></a><a name="elemtag"></a><font color=Blue>-- | Parse only the parts between angle brackets in an element tag.</font>-<a name="line-459"></a><font color=Blue>elemtag</font> <font color=Red>::</font> XParser ElemTag-<a name="line-460"></a><font color=Blue>elemtag</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-461"></a>    n  <font color=Red>&lt;-</font> name <font color=Cyan>`adjustErrBad`</font> <font color=Cyan>(</font><font color=Magenta>"malformed element tag\n"</font><font color=Cyan>++</font><font color=Cyan>)</font>-<a name="line-462"></a>    <font color=Green><u>as</u></font> <font color=Red>&lt;-</font> many attribute-<a name="line-463"></a>    return <font color=Cyan>(</font>ElemTag n <font color=Green><u>as</u></font><font color=Cyan>)</font>-<a name="line-464"></a>-<a name="line-465"></a><a name="elemOpenTag"></a><font color=Blue>-- | For use with stream parsers - returns the complete opening element tag.</font>-<a name="line-466"></a><font color=Blue>elemOpenTag</font> <font color=Red>::</font> XParser ElemTag-<a name="line-467"></a><font color=Blue>elemOpenTag</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-468"></a>    tok TokAnyOpen-<a name="line-469"></a>    e <font color=Red>&lt;-</font> elemtag-<a name="line-470"></a>    tok TokAnyClose-<a name="line-471"></a>    return e-<a name="line-472"></a>-<a name="line-473"></a><a name="elemCloseTag"></a><font color=Blue>-- | For use with stream parsers - accepts a closing tag, provided it</font>-<a name="line-474"></a><font color=Blue>--   matches the given element name.</font>-<a name="line-475"></a><font color=Blue>elemCloseTag</font> <font color=Red>::</font> Name <font color=Red>-&gt;</font> XParser ()-<a name="line-476"></a><font color=Blue>elemCloseTag</font> n <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-477"></a>    tok TokEndOpen-<a name="line-478"></a>    p <font color=Red>&lt;-</font> posn-<a name="line-479"></a>    m <font color=Red>&lt;-</font> name-<a name="line-480"></a>    tok TokAnyClose-<a name="line-481"></a>    checkmatch p n m-<a name="line-482"></a>-<a name="line-483"></a><a name="attribute"></a><font color=Blue>attribute</font> <font color=Red>::</font> XParser Attribute-<a name="line-484"></a><font color=Blue>attribute</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-485"></a>    n <font color=Red>&lt;-</font> name <font color=Cyan>`adjustErr`</font> <font color=Cyan>(</font><font color=Magenta>"malformed attribute name\n"</font><font color=Cyan>++</font><font color=Cyan>)</font>-<a name="line-486"></a>    tok TokEqual <font color=Cyan>`onFail`</font> failBadP <font color=Magenta>"missing = in attribute"</font>-<a name="line-487"></a>    v <font color=Red>&lt;-</font> attvalue <font color=Cyan>`onFail`</font> failBadP <font color=Magenta>"missing attvalue"</font>-<a name="line-488"></a>    return <font color=Cyan>(</font>n<font color=Cyan>,</font>v<font color=Cyan>)</font>-<a name="line-489"></a>-<a name="line-490"></a><a name="content"></a><font color=Blue>-- | Return a content particle, e.g. text, element, reference, etc</font>-<a name="line-491"></a><font color=Blue>content</font> <font color=Red>::</font> XParser <font color=Cyan>(</font>Content Posn<font color=Cyan>)</font>-<a name="line-492"></a><font color=Blue>content</font> <font color=Red>=</font>-<a name="line-493"></a>  <font color=Green><u>do</u></font> <font color=Cyan>{</font> p  <font color=Red>&lt;-</font> posn-<a name="line-494"></a>     <font color=Cyan>;</font> c' <font color=Red>&lt;-</font> content'-<a name="line-495"></a>     <font color=Cyan>;</font> return <font color=Cyan>(</font>c' p<font color=Cyan>)</font>-<a name="line-496"></a>     <font color=Cyan>}</font>-<a name="line-497"></a>  <font color=Green><u>where</u></font>-<a name="line-498"></a>     content' <font color=Red>=</font> oneOf' <font color=Red>[</font> <font color=Cyan>(</font><font color=Magenta>"element"</font><font color=Cyan>,</font>   element   <font color=Cyan>&gt;&gt;=</font> return <font color=Cyan>.</font> CElem<font color=Cyan>)</font>-<a name="line-499"></a>                       <font color=Cyan>,</font> <font color=Cyan>(</font><font color=Magenta>"chardata"</font><font color=Cyan>,</font>  chardata  <font color=Cyan>&gt;&gt;=</font> return <font color=Cyan>.</font> CString False<font color=Cyan>)</font>-<a name="line-500"></a>                       <font color=Cyan>,</font> <font color=Cyan>(</font><font color=Magenta>"reference"</font><font color=Cyan>,</font> reference <font color=Cyan>&gt;&gt;=</font> return <font color=Cyan>.</font> CRef<font color=Cyan>)</font>-<a name="line-501"></a>                       <font color=Cyan>,</font> <font color=Cyan>(</font><font color=Magenta>"CDATA"</font><font color=Cyan>,</font>     cdsect    <font color=Cyan>&gt;&gt;=</font> return <font color=Cyan>.</font> CString True<font color=Cyan>)</font>-<a name="line-502"></a>                       <font color=Cyan>,</font> <font color=Cyan>(</font><font color=Magenta>"misc"</font><font color=Cyan>,</font>      misc      <font color=Cyan>&gt;&gt;=</font> return <font color=Cyan>.</font> CMisc<font color=Cyan>)</font>-<a name="line-503"></a>                       <font color=Red>]</font>-<a name="line-504"></a>                  <font color=Cyan>`adjustErrP`</font> <font color=Cyan>(</font><font color=Magenta>"when looking for a content item,\n"</font><font color=Cyan>++</font><font color=Cyan>)</font>-<a name="line-505"></a><font color=Blue>-- (\    (element, text, reference, CDATA section, &lt;!--comment--&gt;, or &lt;?PI?&gt;")</font>-<a name="line-506"></a>-<a name="line-507"></a><a name="elementdecl"></a><font color=Blue>elementdecl</font> <font color=Red>::</font> XParser ElementDecl-<a name="line-508"></a><font color=Blue>elementdecl</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-509"></a>    tok TokSpecialOpen-<a name="line-510"></a>    tok <font color=Cyan>(</font>TokSpecial ELEMENTx<font color=Cyan>)</font>-<a name="line-511"></a>    n <font color=Red>&lt;-</font> peRef name <font color=Cyan>`adjustErrBad`</font> <font color=Cyan>(</font><font color=Magenta>"expecting identifier in ELEMENT decl\n"</font><font color=Cyan>++</font><font color=Cyan>)</font>-<a name="line-512"></a>    c <font color=Red>&lt;-</font> peRef contentspec-<a name="line-513"></a>             <font color=Cyan>`adjustErrBad`</font> <font color=Cyan>(</font><font color=Cyan>(</font><font color=Magenta>"in content spec of ELEMENT decl: "</font><font color=Cyan>++</font>n<font color=Cyan>++</font><font color=Magenta>"\n"</font><font color=Cyan>)</font><font color=Cyan>++</font><font color=Cyan>)</font>-<a name="line-514"></a>    blank <font color=Cyan>(</font>tok TokAnyClose<font color=Cyan>)</font> <font color=Cyan>`onFail`</font> failBadP-<a name="line-515"></a>       <font color=Cyan>(</font><font color=Magenta>"expected &gt; terminating ELEMENT decl"</font>-<a name="line-516"></a>       <font color=Cyan>++</font><font color=Magenta>"\n    element name was "</font><font color=Cyan>++</font>show n-<a name="line-517"></a>       <font color=Cyan>++</font><font color=Magenta>"\n    contentspec was "</font><font color=Cyan>++</font><font color=Cyan>(</font><font color=Red>\</font> <font color=Cyan>(</font>ContentSpec p<font color=Cyan>)</font><font color=Red>-&gt;</font> show p<font color=Cyan>)</font> c<font color=Cyan>)</font>-<a name="line-518"></a>    return <font color=Cyan>(</font>ElementDecl n c<font color=Cyan>)</font>-<a name="line-519"></a>-<a name="line-520"></a><a name="contentspec"></a><font color=Blue>contentspec</font> <font color=Red>::</font> XParser ContentSpec-<a name="line-521"></a><font color=Blue>contentspec</font> <font color=Red>=</font>-<a name="line-522"></a>    oneOf' <font color=Red>[</font> <font color=Cyan>(</font><font color=Magenta>"EMPTY"</font><font color=Cyan>,</font>  peRef <font color=Cyan>(</font>word <font color=Magenta>"EMPTY"</font><font color=Cyan>)</font> <font color=Cyan>&gt;&gt;</font> return EMPTY<font color=Cyan>)</font>-<a name="line-523"></a>           <font color=Cyan>,</font> <font color=Cyan>(</font><font color=Magenta>"ANY"</font><font color=Cyan>,</font>    peRef <font color=Cyan>(</font>word <font color=Magenta>"ANY"</font><font color=Cyan>)</font> <font color=Cyan>&gt;&gt;</font> return ANY<font color=Cyan>)</font>-<a name="line-524"></a>           <font color=Cyan>,</font> <font color=Cyan>(</font><font color=Magenta>"mixed"</font><font color=Cyan>,</font>  peRef mixed <font color=Cyan>&gt;&gt;=</font> return <font color=Cyan>.</font> Mixed<font color=Cyan>)</font>-<a name="line-525"></a>           <font color=Cyan>,</font> <font color=Cyan>(</font><font color=Magenta>"simple"</font><font color=Cyan>,</font> peRef cp <font color=Cyan>&gt;&gt;=</font> return <font color=Cyan>.</font> ContentSpec<font color=Cyan>)</font>-<a name="line-526"></a>           <font color=Red>]</font>-<a name="line-527"></a> <font color=Blue>--   `adjustErr` ("when looking for content spec,\n"++)</font>-<a name="line-528"></a> <font color=Blue>--   `adjustErr` (++"\nLooking for content spec (EMPTY, ANY, mixed, etc)")</font>-<a name="line-529"></a>-<a name="line-530"></a><a name="choice"></a><font color=Blue>choice</font> <font color=Red>::</font> XParser <font color=Red>[</font>CP<font color=Red>]</font>-<a name="line-531"></a><font color=Blue>choice</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-532"></a>    myBracket <font color=Cyan>(</font>tok TokBraOpen <font color=Cyan>`debug`</font> <font color=Magenta>"Trying choice"</font><font color=Cyan>)</font>-<a name="line-533"></a>              <font color=Cyan>(</font>blank <font color=Cyan>(</font>tok TokBraClose <font color=Cyan>`debug`</font> <font color=Magenta>"Succeeded with choice"</font><font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-534"></a>              <font color=Cyan>(</font>peRef cp <font color=Cyan>`sepBy1`</font> blank <font color=Cyan>(</font>tok TokPipe<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-535"></a>-<a name="line-536"></a><a name="sequence"></a><font color=Blue>sequence</font> <font color=Red>::</font> XParser <font color=Red>[</font>CP<font color=Red>]</font>-<a name="line-537"></a><font color=Blue>sequence</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-538"></a> myBracket <font color=Cyan>(</font>tok TokBraOpen <font color=Cyan>`debug`</font> <font color=Magenta>"Trying sequence"</font><font color=Cyan>)</font>-<a name="line-539"></a>           <font color=Cyan>(</font>blank <font color=Cyan>(</font>tok TokBraClose <font color=Cyan>`debug`</font> <font color=Magenta>"Succeeded with sequence"</font><font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-540"></a>           <font color=Cyan>(</font>peRef cp <font color=Cyan>`sepBy1`</font> blank <font color=Cyan>(</font>tok TokComma<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-541"></a>-<a name="line-542"></a><a name="cp"></a><font color=Blue>cp</font> <font color=Red>::</font> XParser CP-<a name="line-543"></a><font color=Blue>cp</font> <font color=Red>=</font> oneOf <font color=Red>[</font> <font color=Cyan>(</font> <font color=Green><u>do</u></font> n <font color=Red>&lt;-</font> name-<a name="line-544"></a>                  m <font color=Red>&lt;-</font> modifier-<a name="line-545"></a>                  <font color=Green><u>let</u></font> c <font color=Red>=</font> TagName n m-<a name="line-546"></a>                  return c <font color=Cyan>`debug`</font> <font color=Cyan>(</font><font color=Magenta>"ContentSpec: name "</font><font color=Cyan>++</font>show c<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-547"></a>           <font color=Cyan>,</font> <font color=Cyan>(</font> <font color=Green><u>do</u></font> ss <font color=Red>&lt;-</font> sequence-<a name="line-548"></a>                  m <font color=Red>&lt;-</font> modifier-<a name="line-549"></a>                  <font color=Green><u>let</u></font> c <font color=Red>=</font> Seq ss m-<a name="line-550"></a>                  return c <font color=Cyan>`debug`</font> <font color=Cyan>(</font><font color=Magenta>"ContentSpec: sequence "</font><font color=Cyan>++</font>show c<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-551"></a>           <font color=Cyan>,</font> <font color=Cyan>(</font> <font color=Green><u>do</u></font> cs <font color=Red>&lt;-</font> choice-<a name="line-552"></a>                  m <font color=Red>&lt;-</font> modifier-<a name="line-553"></a>                  <font color=Green><u>let</u></font> c <font color=Red>=</font> Choice cs m-<a name="line-554"></a>                  return c <font color=Cyan>`debug`</font> <font color=Cyan>(</font><font color=Magenta>"ContentSpec: choice "</font><font color=Cyan>++</font>show c<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-555"></a>           <font color=Red>]</font> <font color=Cyan>`adjustErr`</font> <font color=Cyan>(</font><font color=Cyan>++</font><font color=Magenta>"\nwhen looking for a content particle"</font><font color=Cyan>)</font>-<a name="line-556"></a>-<a name="line-557"></a><a name="modifier"></a><font color=Blue>modifier</font> <font color=Red>::</font> XParser Modifier-<a name="line-558"></a><font color=Blue>modifier</font> <font color=Red>=</font> oneOf <font color=Red>[</font> <font color=Cyan>(</font> tok TokStar <font color=Cyan>&gt;&gt;</font> return Star <font color=Cyan>)</font>-<a name="line-559"></a>                 <font color=Cyan>,</font> <font color=Cyan>(</font> tok TokQuery <font color=Cyan>&gt;&gt;</font> return Query <font color=Cyan>)</font>-<a name="line-560"></a>                 <font color=Cyan>,</font> <font color=Cyan>(</font> tok TokPlus <font color=Cyan>&gt;&gt;</font> return Plus <font color=Cyan>)</font>-<a name="line-561"></a>                 <font color=Cyan>,</font> <font color=Cyan>(</font> return None <font color=Cyan>)</font>-<a name="line-562"></a>                 <font color=Red>]</font>-<a name="line-563"></a>-<a name="line-564"></a><font color=Blue>-- just for debugging</font>-<a name="line-565"></a><font color=Green><u>instance</u></font> Show CP <font color=Green><u>where</u></font>-<a name="line-566"></a>    show <font color=Cyan>(</font>TagName n m<font color=Cyan>)</font> <font color=Red>=</font> n<font color=Cyan>++</font>show m-<a name="line-567"></a>    show <font color=Cyan>(</font>Choice cps m<font color=Cyan>)</font> <font color=Red>=</font> <font color=Magenta>'('</font><font color=Red><b>:</b></font> concat <font color=Cyan>(</font>intersperse <font color=Magenta>"|"</font> <font color=Cyan>(</font>map show cps<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-568"></a>                          <font color=Cyan>++</font><font color=Magenta>")"</font><font color=Cyan>++</font>show m-<a name="line-569"></a>    show <font color=Cyan>(</font>Seq cps m<font color=Cyan>)</font> <font color=Red>=</font> <font color=Magenta>'('</font><font color=Red><b>:</b></font> concat <font color=Cyan>(</font>intersperse <font color=Magenta>","</font> <font color=Cyan>(</font>map show cps<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-570"></a>                          <font color=Cyan>++</font><font color=Magenta>")"</font><font color=Cyan>++</font>show m-<a name="line-571"></a><font color=Green><u>instance</u></font> Show Modifier <font color=Green><u>where</u></font>-<a name="line-572"></a>    show None <font color=Red>=</font> <font color=Magenta>""</font>-<a name="line-573"></a>    show Query <font color=Red>=</font> <font color=Magenta>"?"</font>-<a name="line-574"></a>    show Star <font color=Red>=</font> <font color=Magenta>"*"</font>-<a name="line-575"></a>    show Plus <font color=Red>=</font> <font color=Magenta>"+"</font>-<a name="line-576"></a><font color=Blue>----</font>-<a name="line-577"></a>-<a name="line-578"></a><a name="mixed"></a><font color=Blue>mixed</font> <font color=Red>::</font> XParser Mixed-<a name="line-579"></a><font color=Blue>mixed</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-580"></a>    tok TokBraOpen-<a name="line-581"></a>    peRef <font color=Cyan>(</font><font color=Green><u>do</u></font> tok TokHash-<a name="line-582"></a>              word <font color=Magenta>"PCDATA"</font><font color=Cyan>)</font>-<a name="line-583"></a>    commit <font color=Cyan>$</font>-<a name="line-584"></a>      oneOf <font color=Red>[</font> <font color=Cyan>(</font> <font color=Green><u>do</u></font> cs <font color=Red>&lt;-</font> many <font color=Cyan>(</font>peRef <font color=Cyan>(</font><font color=Green><u>do</u></font> tok TokPipe-<a name="line-585"></a>                                         peRef name<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-586"></a>                   blank <font color=Cyan>(</font>tok TokBraClose <font color=Cyan>&gt;&gt;</font> tok TokStar<font color=Cyan>)</font>-<a name="line-587"></a>                   return <font color=Cyan>(</font>PCDATAplus cs<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-588"></a>            <font color=Cyan>,</font> <font color=Cyan>(</font> blank <font color=Cyan>(</font>tok TokBraClose <font color=Cyan>&gt;&gt;</font> tok TokStar<font color=Cyan>)</font> <font color=Cyan>&gt;&gt;</font> return PCDATA<font color=Cyan>)</font>-<a name="line-589"></a>            <font color=Cyan>,</font> <font color=Cyan>(</font> blank <font color=Cyan>(</font>tok TokBraClose<font color=Cyan>)</font> <font color=Cyan>&gt;&gt;</font> return PCDATA<font color=Cyan>)</font>-<a name="line-590"></a>            <font color=Red>]</font>-<a name="line-591"></a>        <font color=Cyan>`adjustErrP`</font> <font color=Cyan>(</font><font color=Cyan>++</font><font color=Magenta>"\nLooking for mixed content spec (#PCDATA | ...)*\n"</font><font color=Cyan>)</font>-<a name="line-592"></a>-<a name="line-593"></a><a name="attlistdecl"></a><font color=Blue>attlistdecl</font> <font color=Red>::</font> XParser AttListDecl-<a name="line-594"></a><font color=Blue>attlistdecl</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-595"></a>    tok TokSpecialOpen-<a name="line-596"></a>    tok <font color=Cyan>(</font>TokSpecial ATTLISTx<font color=Cyan>)</font>-<a name="line-597"></a>    n <font color=Red>&lt;-</font> peRef name <font color=Cyan>`adjustErrBad`</font> <font color=Cyan>(</font><font color=Magenta>"expecting identifier in ATTLIST\n"</font><font color=Cyan>++</font><font color=Cyan>)</font>-<a name="line-598"></a>    ds <font color=Red>&lt;-</font> peRef <font color=Cyan>(</font>many1 <font color=Cyan>(</font>peRef attdef<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-599"></a>    blank <font color=Cyan>(</font>tok TokAnyClose<font color=Cyan>)</font> <font color=Cyan>`onFail`</font> failBadP <font color=Magenta>"missing &gt; terminating ATTLIST"</font>-<a name="line-600"></a>    return <font color=Cyan>(</font>AttListDecl n ds<font color=Cyan>)</font>-<a name="line-601"></a>-<a name="line-602"></a><a name="attdef"></a><font color=Blue>attdef</font> <font color=Red>::</font> XParser AttDef-<a name="line-603"></a><font color=Blue>attdef</font> <font color=Red>=</font>-<a name="line-604"></a>  <font color=Green><u>do</u></font> n <font color=Red>&lt;-</font> peRef name <font color=Cyan>`adjustErr`</font> <font color=Cyan>(</font><font color=Magenta>"expecting attribute name\n"</font><font color=Cyan>++</font><font color=Cyan>)</font>-<a name="line-605"></a>     t <font color=Red>&lt;-</font> peRef atttype <font color=Cyan>`adjustErr`</font> <font color=Cyan>(</font><font color=Cyan>(</font><font color=Magenta>"within attlist defn: "</font><font color=Cyan>++</font>n<font color=Cyan>++</font><font color=Magenta>",\n"</font><font color=Cyan>)</font><font color=Cyan>++</font><font color=Cyan>)</font>-<a name="line-606"></a>     d <font color=Red>&lt;-</font> peRef defaultdecl <font color=Cyan>`adjustErr`</font> <font color=Cyan>(</font><font color=Cyan>(</font><font color=Magenta>"in attlist defn: "</font><font color=Cyan>++</font>n<font color=Cyan>++</font><font color=Magenta>",\n"</font><font color=Cyan>)</font><font color=Cyan>++</font><font color=Cyan>)</font>-<a name="line-607"></a>     return <font color=Cyan>(</font>AttDef n t d<font color=Cyan>)</font>-<a name="line-608"></a>-<a name="line-609"></a><a name="atttype"></a><font color=Blue>atttype</font> <font color=Red>::</font> XParser AttType-<a name="line-610"></a><font color=Blue>atttype</font> <font color=Red>=</font>-<a name="line-611"></a>    oneOf' <font color=Red>[</font> <font color=Cyan>(</font><font color=Magenta>"CDATA"</font><font color=Cyan>,</font>      word <font color=Magenta>"CDATA"</font> <font color=Cyan>&gt;&gt;</font> return StringType<font color=Cyan>)</font>-<a name="line-612"></a>           <font color=Cyan>,</font> <font color=Cyan>(</font><font color=Magenta>"tokenized"</font><font color=Cyan>,</font>  tokenizedtype <font color=Cyan>&gt;&gt;=</font> return <font color=Cyan>.</font> TokenizedType<font color=Cyan>)</font>-<a name="line-613"></a>           <font color=Cyan>,</font> <font color=Cyan>(</font><font color=Magenta>"enumerated"</font><font color=Cyan>,</font> enumeratedtype <font color=Cyan>&gt;&gt;=</font> return <font color=Cyan>.</font> EnumeratedType<font color=Cyan>)</font>-<a name="line-614"></a>           <font color=Red>]</font>-<a name="line-615"></a>      <font color=Cyan>`adjustErr`</font> <font color=Cyan>(</font><font color=Magenta>"looking for ATTTYPE,\n"</font><font color=Cyan>++</font><font color=Cyan>)</font>-<a name="line-616"></a> <font color=Blue>--   `adjustErr` (++"\nLooking for ATTTYPE (CDATA, tokenized, or enumerated")</font>-<a name="line-617"></a>-<a name="line-618"></a><a name="tokenizedtype"></a><font color=Blue>tokenizedtype</font> <font color=Red>::</font> XParser TokenizedType-<a name="line-619"></a><font color=Blue>tokenizedtype</font> <font color=Red>=</font>-<a name="line-620"></a>    oneOf <font color=Red>[</font> <font color=Cyan>(</font> word <font color=Magenta>"ID"</font> <font color=Cyan>&gt;&gt;</font> return ID<font color=Cyan>)</font>-<a name="line-621"></a>          <font color=Cyan>,</font> <font color=Cyan>(</font> word <font color=Magenta>"IDREF"</font> <font color=Cyan>&gt;&gt;</font> return IDREF<font color=Cyan>)</font>-<a name="line-622"></a>          <font color=Cyan>,</font> <font color=Cyan>(</font> word <font color=Magenta>"IDREFS"</font> <font color=Cyan>&gt;&gt;</font> return IDREFS<font color=Cyan>)</font>-<a name="line-623"></a>          <font color=Cyan>,</font> <font color=Cyan>(</font> word <font color=Magenta>"ENTITY"</font> <font color=Cyan>&gt;&gt;</font> return ENTITY<font color=Cyan>)</font>-<a name="line-624"></a>          <font color=Cyan>,</font> <font color=Cyan>(</font> word <font color=Magenta>"ENTITIES"</font> <font color=Cyan>&gt;&gt;</font> return ENTITIES<font color=Cyan>)</font>-<a name="line-625"></a>          <font color=Cyan>,</font> <font color=Cyan>(</font> word <font color=Magenta>"NMTOKEN"</font> <font color=Cyan>&gt;&gt;</font> return NMTOKEN<font color=Cyan>)</font>-<a name="line-626"></a>          <font color=Cyan>,</font> <font color=Cyan>(</font> word <font color=Magenta>"NMTOKENS"</font> <font color=Cyan>&gt;&gt;</font> return NMTOKENS<font color=Cyan>)</font>-<a name="line-627"></a>          <font color=Red>]</font> <font color=Cyan>`onFail`</font>-<a name="line-628"></a>    <font color=Green><u>do</u></font> <font color=Cyan>{</font> t <font color=Red>&lt;-</font> next-<a name="line-629"></a>       <font color=Cyan>;</font> failP <font color=Cyan>(</font><font color=Magenta>"Expected one of"</font>-<a name="line-630"></a>               <font color=Cyan>++</font><font color=Magenta>" (ID, IDREF, IDREFS, ENTITY, ENTITIES, NMTOKEN, NMTOKENS)"</font>-<a name="line-631"></a>               <font color=Cyan>++</font><font color=Magenta>"\nbut got "</font><font color=Cyan>++</font>show t<font color=Cyan>)</font>-<a name="line-632"></a>       <font color=Cyan>}</font>-<a name="line-633"></a><font color=Blue>-- `adjustErr` (++"\nLooking for a tokenized type:\n\ </font>-<a name="line-634"></a><font color=Blue>-- \    (ID, IDREF, IDREFS, ENTITY, ENTITIES, NMTOKEN, NMTOKENS)")</font>-<a name="line-635"></a>-<a name="line-636"></a><a name="enumeratedtype"></a><font color=Blue>enumeratedtype</font> <font color=Red>::</font> XParser EnumeratedType-<a name="line-637"></a><font color=Blue>enumeratedtype</font> <font color=Red>=</font>-<a name="line-638"></a>    oneOf' <font color=Red>[</font> <font color=Cyan>(</font><font color=Magenta>"NOTATION"</font><font color=Cyan>,</font>   notationtype <font color=Cyan>&gt;&gt;=</font> return <font color=Cyan>.</font> NotationType<font color=Cyan>)</font>-<a name="line-639"></a>           <font color=Cyan>,</font> <font color=Cyan>(</font><font color=Magenta>"enumerated"</font><font color=Cyan>,</font> enumeration <font color=Cyan>&gt;&gt;=</font> return <font color=Cyan>.</font> Enumeration<font color=Cyan>)</font>-<a name="line-640"></a>           <font color=Red>]</font>-<a name="line-641"></a>      <font color=Cyan>`adjustErr`</font> <font color=Cyan>(</font><font color=Magenta>"looking for an enumerated or NOTATION type,\n"</font><font color=Cyan>++</font><font color=Cyan>)</font>-<a name="line-642"></a>-<a name="line-643"></a><a name="notationtype"></a><font color=Blue>notationtype</font> <font color=Red>::</font> XParser NotationType-<a name="line-644"></a><font color=Blue>notationtype</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-645"></a>    word <font color=Magenta>"NOTATION"</font>-<a name="line-646"></a>    bracket <font color=Cyan>(</font>tok TokBraOpen<font color=Cyan>)</font> <font color=Cyan>(</font>blank <font color=Cyan>(</font>tok TokBraClose<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-647"></a>            <font color=Cyan>(</font>peRef name <font color=Cyan>`sepBy1`</font> peRef <font color=Cyan>(</font>tok TokPipe<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-648"></a>-<a name="line-649"></a><a name="enumeration"></a><font color=Blue>enumeration</font> <font color=Red>::</font> XParser Enumeration-<a name="line-650"></a><font color=Blue>enumeration</font> <font color=Red>=</font>-<a name="line-651"></a>    bracket <font color=Cyan>(</font>tok TokBraOpen<font color=Cyan>)</font> <font color=Cyan>(</font>blank <font color=Cyan>(</font>tok TokBraClose<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-652"></a>            <font color=Cyan>(</font>peRef nmtoken <font color=Cyan>`sepBy1`</font> blank <font color=Cyan>(</font>peRef <font color=Cyan>(</font>tok TokPipe<font color=Cyan>)</font><font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-653"></a>-<a name="line-654"></a><a name="defaultdecl"></a><font color=Blue>defaultdecl</font> <font color=Red>::</font> XParser DefaultDecl-<a name="line-655"></a><font color=Blue>defaultdecl</font> <font color=Red>=</font>-<a name="line-656"></a>    oneOf' <font color=Red>[</font> <font color=Cyan>(</font><font color=Magenta>"REQUIRED"</font><font color=Cyan>,</font>  tok TokHash <font color=Cyan>&gt;&gt;</font> word <font color=Magenta>"REQUIRED"</font> <font color=Cyan>&gt;&gt;</font> return REQUIRED<font color=Cyan>)</font>-<a name="line-657"></a>           <font color=Cyan>,</font> <font color=Cyan>(</font><font color=Magenta>"IMPLIED"</font><font color=Cyan>,</font>   tok TokHash <font color=Cyan>&gt;&gt;</font> word <font color=Magenta>"IMPLIED"</font> <font color=Cyan>&gt;&gt;</font> return IMPLIED<font color=Cyan>)</font>-<a name="line-658"></a>           <font color=Cyan>,</font> <font color=Cyan>(</font><font color=Magenta>"FIXED"</font><font color=Cyan>,</font>     <font color=Green><u>do</u></font> f <font color=Red>&lt;-</font> maybe <font color=Cyan>(</font>tok TokHash <font color=Cyan>&gt;&gt;</font> word <font color=Magenta>"FIXED"</font>-<a name="line-659"></a>                                                      <font color=Cyan>&gt;&gt;</font> return FIXED<font color=Cyan>)</font>-<a name="line-660"></a>                              a <font color=Red>&lt;-</font> peRef attvalue-<a name="line-661"></a>                              return <font color=Cyan>(</font>DefaultTo a f<font color=Cyan>)</font> <font color=Cyan>)</font>-<a name="line-662"></a>           <font color=Red>]</font>-<a name="line-663"></a>        <font color=Cyan>`adjustErr`</font> <font color=Cyan>(</font><font color=Magenta>"looking for an attribute default decl,\n"</font><font color=Cyan>++</font><font color=Cyan>)</font>-<a name="line-664"></a><font color=Blue>--      `adjustErr` (++"\nLooking for an attribute default decl:\n\ </font>-<a name="line-665"></a><font color=Blue>-- \    (REQUIRED, IMPLIED, FIXED)")</font>-<a name="line-666"></a>-<a name="line-667"></a><a name="conditionalsect"></a><font color=Blue>conditionalsect</font> <font color=Red>::</font> XParser ConditionalSect-<a name="line-668"></a><font color=Blue>conditionalsect</font> <font color=Red>=</font> oneOf'-<a name="line-669"></a>    <font color=Red>[</font> <font color=Cyan>(</font> <font color=Magenta>"INCLUDE"</font>-<a name="line-670"></a>      <font color=Cyan>,</font> <font color=Green><u>do</u></font> tok TokSectionOpen-<a name="line-671"></a>           peRef <font color=Cyan>(</font>tok <font color=Cyan>(</font>TokSection INCLUDEx<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-672"></a>           p <font color=Red>&lt;-</font> posn-<a name="line-673"></a>           tok TokSqOpen <font color=Cyan>`onFail`</font> failBadP <font color=Magenta>"missing [ after INCLUDE"</font>-<a name="line-674"></a>           i <font color=Red>&lt;-</font> many <font color=Cyan>(</font>peRef extsubsetdecl<font color=Cyan>)</font>-<a name="line-675"></a>           tok TokSectionClose-<a name="line-676"></a>                   <font color=Cyan>`onFail`</font> failBadP <font color=Cyan>(</font><font color=Magenta>"missing ]]&gt; for INCLUDE section"</font>-<a name="line-677"></a>                                     <font color=Cyan>++</font><font color=Magenta>"\n    begun at "</font><font color=Cyan>++</font>show p<font color=Cyan>)</font>-<a name="line-678"></a>           return <font color=Cyan>(</font>IncludeSect i<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-679"></a>    <font color=Cyan>,</font> <font color=Cyan>(</font> <font color=Magenta>"IGNORE"</font>-<a name="line-680"></a>      <font color=Cyan>,</font> <font color=Green><u>do</u></font> tok TokSectionOpen-<a name="line-681"></a>           peRef <font color=Cyan>(</font>tok <font color=Cyan>(</font>TokSection IGNOREx<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-682"></a>           p <font color=Red>&lt;-</font> posn-<a name="line-683"></a>           tok TokSqOpen <font color=Cyan>`onFail`</font> failBadP <font color=Magenta>"missing [ after IGNORE"</font>-<a name="line-684"></a>           i <font color=Red>&lt;-</font> many newIgnore  <font color=Blue>-- many ignoresectcontents</font>-<a name="line-685"></a>           tok TokSectionClose-<a name="line-686"></a>                   <font color=Cyan>`onFail`</font> failBadP <font color=Cyan>(</font><font color=Magenta>"missing ]]&gt; for IGNORE section"</font>-<a name="line-687"></a>                                     <font color=Cyan>++</font><font color=Magenta>"\n    begun at "</font><font color=Cyan>++</font>show p<font color=Cyan>)</font>-<a name="line-688"></a>           return <font color=Cyan>(</font>IgnoreSect []<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-689"></a>    <font color=Red>]</font> <font color=Cyan>`adjustErr`</font> <font color=Cyan>(</font><font color=Magenta>"in a conditional section,\n"</font><font color=Cyan>++</font><font color=Cyan>)</font>-<a name="line-690"></a>-<a name="line-691"></a><a name="newIgnore"></a><font color=Blue>newIgnore</font> <font color=Red>::</font> XParser Ignore-<a name="line-692"></a><font color=Blue>newIgnore</font> <font color=Red>=</font>-<a name="line-693"></a>    <font color=Cyan>(</font> <font color=Green><u>do</u></font> tok TokSectionOpen-<a name="line-694"></a>         many newIgnore <font color=Cyan>`debug`</font> <font color=Magenta>"IGNORING conditional section"</font>-<a name="line-695"></a>         tok TokSectionClose-<a name="line-696"></a>         return Ignore <font color=Cyan>`debug`</font> <font color=Magenta>"end of IGNORED conditional section"</font><font color=Cyan>)</font> <font color=Cyan>`onFail`</font>-<a name="line-697"></a>    <font color=Cyan>(</font> <font color=Green><u>do</u></font> t <font color=Red>&lt;-</font> nottok <font color=Red>[</font>TokSectionOpen<font color=Cyan>,</font>TokSectionClose<font color=Red>]</font>-<a name="line-698"></a>         return Ignore  <font color=Cyan>`debug`</font> <font color=Cyan>(</font><font color=Magenta>"ignoring: "</font><font color=Cyan>++</font>show t<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-699"></a>-<a name="line-700"></a><a name="ignoresectcontents"></a><font color=Blue>--- obsolete?</font>-<a name="line-701"></a><font color=Blue>ignoresectcontents</font> <font color=Red>::</font> XParser IgnoreSectContents-<a name="line-702"></a><font color=Blue>ignoresectcontents</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-703"></a>    i <font color=Red>&lt;-</font> ignore-<a name="line-704"></a>    is <font color=Red>&lt;-</font> many <font color=Cyan>(</font><font color=Green><u>do</u></font> tok TokSectionOpen-<a name="line-705"></a>                   ic <font color=Red>&lt;-</font> ignoresectcontents-<a name="line-706"></a>                   tok TokSectionClose-<a name="line-707"></a>                   ig <font color=Red>&lt;-</font> ignore-<a name="line-708"></a>                   return <font color=Cyan>(</font>ic<font color=Cyan>,</font>ig<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-709"></a>    return <font color=Cyan>(</font>IgnoreSectContents i is<font color=Cyan>)</font>-<a name="line-710"></a>-<a name="line-711"></a><a name="ignore"></a><font color=Blue>ignore</font> <font color=Red>::</font> XParser Ignore-<a name="line-712"></a><font color=Blue>ignore</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-713"></a>  is <font color=Red>&lt;-</font> many1 <font color=Cyan>(</font>nottok <font color=Red>[</font>TokSectionOpen<font color=Cyan>,</font>TokSectionClose<font color=Red>]</font><font color=Cyan>)</font>-<a name="line-714"></a>  return Ignore  <font color=Cyan>`debug`</font> <font color=Cyan>(</font><font color=Magenta>"ignored all of: "</font><font color=Cyan>++</font>show is<font color=Cyan>)</font>-<a name="line-715"></a><font color=Blue>----</font>-<a name="line-716"></a>-<a name="line-717"></a><a name="reference"></a><font color=Blue>-- | Return either a general entity reference, or a character reference.</font>-<a name="line-718"></a><font color=Blue>reference</font> <font color=Red>::</font> XParser Reference-<a name="line-719"></a><font color=Blue>reference</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-720"></a>    bracket <font color=Cyan>(</font>tok TokAmp<font color=Cyan>)</font> <font color=Cyan>(</font>tok TokSemi<font color=Cyan>)</font> <font color=Cyan>(</font>freetext <font color=Cyan>&gt;&gt;=</font> val<font color=Cyan>)</font>-<a name="line-721"></a>  <font color=Green><u>where</u></font>-<a name="line-722"></a>    val <font color=Cyan>(</font><font color=Magenta>'#'</font><font color=Red><b>:</b></font><font color=Magenta>'x'</font><font color=Red><b>:</b></font>i<font color=Cyan>)</font> <font color=Red>|</font> all isHexDigit i-<a name="line-723"></a>                    <font color=Red>=</font> return <font color=Cyan>.</font> RefChar <font color=Cyan>.</font> fst <font color=Cyan>.</font> head <font color=Cyan>.</font> readHex <font color=Cyan>$</font> i-<a name="line-724"></a>    val <font color=Cyan>(</font><font color=Magenta>'#'</font><font color=Red><b>:</b></font>i<font color=Cyan>)</font>     <font color=Red>|</font> all isDigit i-<a name="line-725"></a>                    <font color=Red>=</font> return <font color=Cyan>.</font> RefChar <font color=Cyan>.</font> fst <font color=Cyan>.</font> head <font color=Cyan>.</font> readDec <font color=Cyan>$</font> i-<a name="line-726"></a>    val name        <font color=Red>=</font> return <font color=Cyan>.</font> RefEntity <font color=Cyan>$</font> name-<a name="line-727"></a>-<a name="line-728"></a><font color=Blue>{- -- following is incorrect-<a name="line-729"></a>reference =-<a name="line-730"></a>    ( charref &gt;&gt;= return . RefChar) `onFail`-<a name="line-731"></a>    ( entityref &gt;&gt;= return . RefEntity)-<a name="line-732"></a>-<a name="line-733"></a>entityref :: XParser EntityRef-<a name="line-734"></a>entityref = do-<a name="line-735"></a>    bracket (tok TokAmp) (tok TokSemi) name-<a name="line-736"></a>-<a name="line-737"></a>charref :: XParser CharRef-<a name="line-738"></a>charref = do-<a name="line-739"></a>    bracket (tok TokAmp) (tok TokSemi) (freetext &gt;&gt;= readCharVal)-<a name="line-740"></a>  where-<a name="line-741"></a>    readCharVal ('#':'x':i) = return . fst . head . readHex $ i-<a name="line-742"></a>    readCharVal ('#':i)     = return . fst . head . readDec $ i-<a name="line-743"></a>    readCharVal _           = mzero-<a name="line-744"></a>-}</font>-<a name="line-745"></a>-<a name="line-746"></a><a name="pereference"></a><font color=Blue>pereference</font> <font color=Red>::</font> XParser PEReference-<a name="line-747"></a><font color=Blue>pereference</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-748"></a>    myBracket <font color=Cyan>(</font>tok TokPercent<font color=Cyan>)</font> <font color=Cyan>(</font>tok TokSemi<font color=Cyan>)</font> nmtoken-<a name="line-749"></a>-<a name="line-750"></a><a name="entitydecl"></a><font color=Blue>entitydecl</font> <font color=Red>::</font> XParser EntityDecl-<a name="line-751"></a><font color=Blue>entitydecl</font> <font color=Red>=</font>-<a name="line-752"></a>    <font color=Cyan>(</font> gedecl <font color=Cyan>&gt;&gt;=</font> return <font color=Cyan>.</font> EntityGEDecl<font color=Cyan>)</font> <font color=Cyan>`onFail`</font>-<a name="line-753"></a>    <font color=Cyan>(</font> pedecl <font color=Cyan>&gt;&gt;=</font> return <font color=Cyan>.</font> EntityPEDecl<font color=Cyan>)</font>-<a name="line-754"></a>-<a name="line-755"></a><a name="gedecl"></a><font color=Blue>gedecl</font> <font color=Red>::</font> XParser GEDecl-<a name="line-756"></a><font color=Blue>gedecl</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-757"></a>    tok TokSpecialOpen-<a name="line-758"></a>    tok <font color=Cyan>(</font>TokSpecial ENTITYx<font color=Cyan>)</font>-<a name="line-759"></a>    n <font color=Red>&lt;-</font> name-<a name="line-760"></a>    e <font color=Red>&lt;-</font> entitydef <font color=Cyan>`adjustErrBad`</font> <font color=Cyan>(</font><font color=Cyan>(</font><font color=Magenta>"in general entity defn "</font><font color=Cyan>++</font>n<font color=Cyan>++</font><font color=Magenta>",\n"</font><font color=Cyan>)</font><font color=Cyan>++</font><font color=Cyan>)</font>-<a name="line-761"></a>    tok TokAnyClose <font color=Cyan>`onFail`</font> failBadP <font color=Cyan>(</font><font color=Magenta>"expected &gt; terminating G ENTITY decl "</font><font color=Cyan>++</font>n<font color=Cyan>)</font>-<a name="line-762"></a>    stUpdate <font color=Cyan>(</font>addGE n e<font color=Cyan>)</font> <font color=Cyan>`debug`</font> <font color=Cyan>(</font><font color=Magenta>"added GE defn &amp;"</font><font color=Cyan>++</font>n<font color=Cyan>++</font><font color=Magenta>";"</font><font color=Cyan>)</font>-<a name="line-763"></a>    return <font color=Cyan>(</font>GEDecl n e<font color=Cyan>)</font>-<a name="line-764"></a>-<a name="line-765"></a><a name="pedecl"></a><font color=Blue>pedecl</font> <font color=Red>::</font> XParser PEDecl-<a name="line-766"></a><font color=Blue>pedecl</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-767"></a>    tok TokSpecialOpen-<a name="line-768"></a>    tok <font color=Cyan>(</font>TokSpecial ENTITYx<font color=Cyan>)</font>-<a name="line-769"></a>    tok TokPercent-<a name="line-770"></a>    n <font color=Red>&lt;-</font> name-<a name="line-771"></a>    e <font color=Red>&lt;-</font> pedef <font color=Cyan>`adjustErrBad`</font> <font color=Cyan>(</font><font color=Cyan>(</font><font color=Magenta>"in parameter entity defn "</font><font color=Cyan>++</font>n<font color=Cyan>++</font><font color=Magenta>",\n"</font><font color=Cyan>)</font><font color=Cyan>++</font><font color=Cyan>)</font>-<a name="line-772"></a>    tok TokAnyClose <font color=Cyan>`onFail`</font> failBadP <font color=Cyan>(</font><font color=Magenta>"expected &gt; terminating P ENTITY decl "</font><font color=Cyan>++</font>n<font color=Cyan>)</font>-<a name="line-773"></a>    stUpdate <font color=Cyan>(</font>addPE n e<font color=Cyan>)</font> <font color=Cyan>`debug`</font> <font color=Cyan>(</font><font color=Magenta>"added PE defn %"</font><font color=Cyan>++</font>n<font color=Cyan>++</font><font color=Magenta>";\n"</font><font color=Cyan>++</font>show e<font color=Cyan>)</font>-<a name="line-774"></a>    return <font color=Cyan>(</font>PEDecl n e<font color=Cyan>)</font>-<a name="line-775"></a>-<a name="line-776"></a><a name="entitydef"></a><font color=Blue>entitydef</font> <font color=Red>::</font> XParser EntityDef-<a name="line-777"></a><font color=Blue>entitydef</font> <font color=Red>=</font>-<a name="line-778"></a>    oneOf' <font color=Red>[</font> <font color=Cyan>(</font><font color=Magenta>"entityvalue"</font><font color=Cyan>,</font> entityvalue <font color=Cyan>&gt;&gt;=</font> return <font color=Cyan>.</font> DefEntityValue<font color=Cyan>)</font>-<a name="line-779"></a>           <font color=Cyan>,</font> <font color=Cyan>(</font><font color=Magenta>"external"</font><font color=Cyan>,</font>    <font color=Green><u>do</u></font> eid <font color=Red>&lt;-</font> externalid-<a name="line-780"></a>                                ndd <font color=Red>&lt;-</font> maybe ndatadecl-<a name="line-781"></a>                                return <font color=Cyan>(</font>DefExternalID eid ndd<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-782"></a>           <font color=Red>]</font>-<a name="line-783"></a>-<a name="line-784"></a><a name="pedef"></a><font color=Blue>pedef</font> <font color=Red>::</font> XParser PEDef-<a name="line-785"></a><font color=Blue>pedef</font> <font color=Red>=</font>-<a name="line-786"></a>    oneOf' <font color=Red>[</font> <font color=Cyan>(</font><font color=Magenta>"entityvalue"</font><font color=Cyan>,</font> entityvalue <font color=Cyan>&gt;&gt;=</font> return <font color=Cyan>.</font> PEDefEntityValue<font color=Cyan>)</font>-<a name="line-787"></a>           <font color=Cyan>,</font> <font color=Cyan>(</font><font color=Magenta>"externalid"</font><font color=Cyan>,</font>  externalid  <font color=Cyan>&gt;&gt;=</font> return <font color=Cyan>.</font> PEDefExternalID<font color=Cyan>)</font>-<a name="line-788"></a>           <font color=Red>]</font>-<a name="line-789"></a>-<a name="line-790"></a><a name="externalid"></a><font color=Blue>externalid</font> <font color=Red>::</font> XParser ExternalID-<a name="line-791"></a><font color=Blue>externalid</font> <font color=Red>=</font>-<a name="line-792"></a>    oneOf' <font color=Red>[</font> <font color=Cyan>(</font><font color=Magenta>"SYSTEM"</font><font color=Cyan>,</font> <font color=Green><u>do</u></font> word <font color=Magenta>"SYSTEM"</font>-<a name="line-793"></a>                           s <font color=Red>&lt;-</font> systemliteral-<a name="line-794"></a>                           return <font color=Cyan>(</font>SYSTEM s<font color=Cyan>)</font> <font color=Cyan>)</font>-<a name="line-795"></a>           <font color=Cyan>,</font> <font color=Cyan>(</font><font color=Magenta>"PUBLIC"</font><font color=Cyan>,</font> <font color=Green><u>do</u></font> word <font color=Magenta>"PUBLIC"</font>-<a name="line-796"></a>                           p <font color=Red>&lt;-</font> pubidliteral-<a name="line-797"></a>                           s <font color=Red>&lt;-</font> systemliteral-<a name="line-798"></a>                           return <font color=Cyan>(</font>PUBLIC p s<font color=Cyan>)</font> <font color=Cyan>)</font>-<a name="line-799"></a>           <font color=Red>]</font>-<a name="line-800"></a>      <font color=Cyan>`adjustErr`</font> <font color=Cyan>(</font><font color=Magenta>"looking for an external id,\n"</font><font color=Cyan>++</font><font color=Cyan>)</font>-<a name="line-801"></a>-<a name="line-802"></a><a name="ndatadecl"></a><font color=Blue>ndatadecl</font> <font color=Red>::</font> XParser NDataDecl-<a name="line-803"></a><font color=Blue>ndatadecl</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-804"></a>    word <font color=Magenta>"NDATA"</font>-<a name="line-805"></a>    n <font color=Red>&lt;-</font> name-<a name="line-806"></a>    return <font color=Cyan>(</font>NDATA n<font color=Cyan>)</font>-<a name="line-807"></a>-<a name="line-808"></a><a name="textdecl"></a><font color=Blue>textdecl</font> <font color=Red>::</font> XParser TextDecl-<a name="line-809"></a><font color=Blue>textdecl</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-810"></a>    tok TokPIOpen-<a name="line-811"></a>    <font color=Cyan>(</font>word <font color=Magenta>"xml"</font> <font color=Cyan>`onFail`</font> word <font color=Magenta>"XML"</font><font color=Cyan>)</font>-<a name="line-812"></a>    v <font color=Red>&lt;-</font> maybe versioninfo-<a name="line-813"></a>    e <font color=Red>&lt;-</font> encodingdecl-<a name="line-814"></a>    tok TokPIClose <font color=Cyan>`onFail`</font> failP <font color=Magenta>"expected ?&gt; terminating text decl"</font>-<a name="line-815"></a>    return <font color=Cyan>(</font>TextDecl v e<font color=Cyan>)</font>-<a name="line-816"></a>-<a name="line-817"></a><a name="extparsedent"></a><font color=Blue>extparsedent</font> <font color=Red>::</font> XParser <font color=Cyan>(</font>ExtParsedEnt Posn<font color=Cyan>)</font>-<a name="line-818"></a><font color=Blue>extparsedent</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-819"></a>    t <font color=Red>&lt;-</font> maybe textdecl-<a name="line-820"></a>    c <font color=Red>&lt;-</font> content-<a name="line-821"></a>    return <font color=Cyan>(</font>ExtParsedEnt t c<font color=Cyan>)</font>-<a name="line-822"></a>-<a name="line-823"></a><a name="extpe"></a><font color=Blue>extpe</font> <font color=Red>::</font> XParser ExtPE-<a name="line-824"></a><font color=Blue>extpe</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-825"></a>    t <font color=Red>&lt;-</font> maybe textdecl-<a name="line-826"></a>    e <font color=Red>&lt;-</font> many <font color=Cyan>(</font>peRef extsubsetdecl<font color=Cyan>)</font>-<a name="line-827"></a>    return <font color=Cyan>(</font>ExtPE t e<font color=Cyan>)</font>-<a name="line-828"></a>-<a name="line-829"></a><a name="encodingdecl"></a><font color=Blue>encodingdecl</font> <font color=Red>::</font> XParser EncodingDecl-<a name="line-830"></a><font color=Blue>encodingdecl</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-831"></a>    <font color=Cyan>(</font>word <font color=Magenta>"encoding"</font> <font color=Cyan>`onFail`</font> word <font color=Magenta>"ENCODING"</font><font color=Cyan>)</font>-<a name="line-832"></a>    tok TokEqual <font color=Cyan>`onFail`</font> failBadP <font color=Magenta>"expected = in 'encoding' decl"</font>-<a name="line-833"></a>    f <font color=Red>&lt;-</font> bracket <font color=Cyan>(</font>tok TokQuote<font color=Cyan>)</font> <font color=Cyan>(</font>tok TokQuote<font color=Cyan>)</font> freetext-<a name="line-834"></a>    return <font color=Cyan>(</font>EncodingDecl f<font color=Cyan>)</font>-<a name="line-835"></a>-<a name="line-836"></a><a name="notationdecl"></a><font color=Blue>notationdecl</font> <font color=Red>::</font> XParser NotationDecl-<a name="line-837"></a><font color=Blue>notationdecl</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-838"></a>    tok TokSpecialOpen-<a name="line-839"></a>    tok <font color=Cyan>(</font>TokSpecial NOTATIONx<font color=Cyan>)</font>-<a name="line-840"></a>    n <font color=Red>&lt;-</font> name-<a name="line-841"></a>    e <font color=Red>&lt;-</font> either externalid publicid-<a name="line-842"></a>    tok TokAnyClose <font color=Cyan>`onFail`</font> failBadP <font color=Cyan>(</font><font color=Magenta>"expected &gt; terminating NOTATION decl "</font><font color=Cyan>++</font>n<font color=Cyan>)</font>-<a name="line-843"></a>    return <font color=Cyan>(</font>NOTATION n e<font color=Cyan>)</font>-<a name="line-844"></a>-<a name="line-845"></a><a name="publicid"></a><font color=Blue>publicid</font> <font color=Red>::</font> XParser PublicID-<a name="line-846"></a><font color=Blue>publicid</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-847"></a>    word <font color=Magenta>"PUBLIC"</font>-<a name="line-848"></a>    p <font color=Red>&lt;-</font> pubidliteral-<a name="line-849"></a>    return <font color=Cyan>(</font>PUBLICID p<font color=Cyan>)</font>-<a name="line-850"></a>-<a name="line-851"></a><a name="entityvalue"></a><font color=Blue>entityvalue</font> <font color=Red>::</font> XParser EntityValue-<a name="line-852"></a><font color=Blue>entityvalue</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-853"></a> <font color=Blue>-- evs &lt;- bracket (tok TokQuote) (tok TokQuote) (many (peRef ev))</font>-<a name="line-854"></a>    tok TokQuote-<a name="line-855"></a>    pn <font color=Red>&lt;-</font> posn-<a name="line-856"></a>    evs <font color=Red>&lt;-</font> many ev-<a name="line-857"></a>    tok TokQuote <font color=Cyan>`onFail`</font> failBadP <font color=Magenta>"expected quote to terminate entityvalue"</font>-<a name="line-858"></a>    <font color=Blue>-- quoted text must be rescanned for possible PERefs</font>-<a name="line-859"></a>    st <font color=Red>&lt;-</font> stGet-<a name="line-860"></a> <font color=Blue>-- Prelude.either failBad (return . EntityValue) . fst3 $</font>-<a name="line-861"></a>    return <font color=Cyan>.</font> EntityValue <font color=Cyan>.</font> fst3 <font color=Cyan>$</font>-<a name="line-862"></a>                <font color=Cyan>(</font>runParser <font color=Cyan>(</font>many ev<font color=Cyan>)</font> st-<a name="line-863"></a>                         <font color=Cyan>(</font>reLexEntityValue <font color=Cyan>(</font><font color=Red>\</font>s<font color=Red>-&gt;</font> stringify <font color=Cyan>(</font>lookupPE s st<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-864"></a>                                           pn-<a name="line-865"></a>                                           <font color=Cyan>(</font>flattenEV <font color=Cyan>(</font>EntityValue evs<font color=Cyan>)</font><font color=Cyan>)</font><font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-866"></a>  <font color=Green><u>where</u></font>-<a name="line-867"></a>    stringify <font color=Cyan>(</font>Just <font color=Cyan>(</font>PEDefEntityValue ev<font color=Cyan>)</font><font color=Cyan>)</font> <font color=Red>=</font> Just <font color=Cyan>(</font>flattenEV ev<font color=Cyan>)</font>-<a name="line-868"></a>    stringify <font color=Green><u>_</u></font> <font color=Red>=</font> Nothing-<a name="line-869"></a>-<a name="line-870"></a><a name="ev"></a><font color=Blue>ev</font> <font color=Red>::</font> XParser EV-<a name="line-871"></a><font color=Blue>ev</font> <font color=Red>=</font>-<a name="line-872"></a>    oneOf' <font color=Red>[</font> <font color=Cyan>(</font><font color=Magenta>"string"</font><font color=Cyan>,</font>    <font color=Cyan>(</font>string<font color=Cyan>`onFail`</font>freetext<font color=Cyan>)</font> <font color=Cyan>&gt;&gt;=</font> return <font color=Cyan>.</font> EVString<font color=Cyan>)</font>-<a name="line-873"></a>           <font color=Cyan>,</font> <font color=Cyan>(</font><font color=Magenta>"reference"</font><font color=Cyan>,</font> reference <font color=Cyan>&gt;&gt;=</font> return <font color=Cyan>.</font> EVRef<font color=Cyan>)</font>-<a name="line-874"></a>           <font color=Red>]</font>-<a name="line-875"></a>      <font color=Cyan>`adjustErr`</font> <font color=Cyan>(</font><font color=Magenta>"looking for entity value,\n"</font><font color=Cyan>++</font><font color=Cyan>)</font>-<a name="line-876"></a>-<a name="line-877"></a><a name="attvalue"></a><font color=Blue>attvalue</font> <font color=Red>::</font> XParser AttValue-<a name="line-878"></a><font color=Blue>attvalue</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-879"></a>    avs <font color=Red>&lt;-</font> bracket <font color=Cyan>(</font>tok TokQuote<font color=Cyan>)</font> <font color=Cyan>(</font>tok TokQuote<font color=Cyan>)</font>-<a name="line-880"></a>                   <font color=Cyan>(</font>many <font color=Cyan>(</font>either freetext reference<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-881"></a>    return <font color=Cyan>(</font>AttValue avs<font color=Cyan>)</font>-<a name="line-882"></a>-<a name="line-883"></a><a name="systemliteral"></a><font color=Blue>systemliteral</font> <font color=Red>::</font> XParser SystemLiteral-<a name="line-884"></a><font color=Blue>systemliteral</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-885"></a>    s <font color=Red>&lt;-</font> bracket <font color=Cyan>(</font>tok TokQuote<font color=Cyan>)</font> <font color=Cyan>(</font>tok TokQuote<font color=Cyan>)</font> freetext-<a name="line-886"></a>    return <font color=Cyan>(</font>SystemLiteral s<font color=Cyan>)</font>            <font color=Blue>-- note: refs &amp;...; not permitted</font>-<a name="line-887"></a>-<a name="line-888"></a><a name="pubidliteral"></a><font color=Blue>pubidliteral</font> <font color=Red>::</font> XParser PubidLiteral-<a name="line-889"></a><font color=Blue>pubidliteral</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-890"></a>    s <font color=Red>&lt;-</font> bracket <font color=Cyan>(</font>tok TokQuote<font color=Cyan>)</font> <font color=Cyan>(</font>tok TokQuote<font color=Cyan>)</font> freetext-<a name="line-891"></a>    return <font color=Cyan>(</font>PubidLiteral s<font color=Cyan>)</font>             <font color=Blue>-- note: freetext is too liberal here</font>-<a name="line-892"></a>-<a name="line-893"></a><a name="chardata"></a><font color=Blue>-- | Return parsed freetext (i.e. until the next markup)</font>-<a name="line-894"></a><font color=Blue>chardata</font> <font color=Red>::</font> XParser CharData-<a name="line-895"></a><font color=Blue>chardata</font> <font color=Red>=</font> freetext-<a name="line-896"></a>-</pre>-</body>-</html>
− docs/HaXml/src/Text/XML/HaXml/Posn.html
@@ -1,86 +0,0 @@-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">-<html>-<head>-<!-- Generated by HsColour, http://www.cs.york.ac.uk/fp/darcs/hscolour/ -->-<title>src/Text/XML/HaXml/Posn.hs</title>-</head>-<body>-<pre><a name="line-1"></a><font color=Blue>-- | Define a position datatype for giving locations in error messages.</font>-<a name="line-2"></a><font color=Green><u>module</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Posn-<a name="line-3"></a>  <font color=Cyan>(</font>-<a name="line-4"></a>  <font color=Blue>-- * Position type</font>-<a name="line-5"></a>    Posn()-<a name="line-6"></a>  <font color=Blue>-- ** Constructors of a new position</font>-<a name="line-7"></a>  <font color=Cyan>,</font> posInNewCxt    <font color=Blue>-- :: String -&gt; Maybe Posn -&gt; Posn</font>-<a name="line-8"></a>  <font color=Cyan>,</font> noPos          <font color=Blue>-- :: Posn</font>-<a name="line-9"></a>  <font color=Blue>-- ** Strictifier</font>-<a name="line-10"></a>  <font color=Cyan>,</font> forcep-<a name="line-11"></a>  <font color=Blue>-- ** Modifiers</font>-<a name="line-12"></a>  <font color=Cyan>,</font> addcol<font color=Cyan>,</font> newline<font color=Cyan>,</font> tab<font color=Cyan>,</font> white-<a name="line-13"></a>  <font color=Blue>-- ** Accessors</font>-<a name="line-14"></a>  <font color=Cyan>,</font> posnFilename<font color=Cyan>,</font> posnLine<font color=Cyan>,</font> posnColumn-<a name="line-15"></a>  <font color=Cyan>)</font> <font color=Green><u>where</u></font>-<a name="line-16"></a>-<a name="line-17"></a><font color=Green><u>import</u></font> Char-<a name="line-18"></a>-<a name="line-19"></a><a name="Posn"></a><font color=Blue>-- | Source positions contain a filename, line, column, and an</font>-<a name="line-20"></a><a name="Posn"></a><font color=Blue>--   inclusion point, which is itself another source position,</font>-<a name="line-21"></a><a name="Posn"></a><font color=Blue>--   recursively.</font>-<a name="line-22"></a><a name="Posn"></a><font color=Green><u>data</u></font> Posn <font color=Red>=</font> Pn String <font color=Cyan>!</font>Int <font color=Cyan>!</font>Int <font color=Cyan>(</font>Maybe Posn<font color=Cyan>)</font>-<a name="line-23"></a>        <font color=Green><u>deriving</u></font> <font color=Cyan>(</font>Eq<font color=Cyan>)</font>-<a name="line-24"></a>-<a name="line-25"></a><a name="posnFilename"></a><font color=Blue>posnFilename</font> <font color=Red>::</font> Posn <font color=Red>-&gt;</font> FilePath-<a name="line-26"></a><font color=Blue>posnFilename</font> <font color=Cyan>(</font>Pn f <font color=Green><u>_</u></font> <font color=Green><u>_</u></font> <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red>=</font> f-<a name="line-27"></a>-<a name="line-28"></a><a name="posnLine"></a><font color=Blue>posnLine</font><font color=Cyan>,</font> posnColumn <font color=Red>::</font> Posn <font color=Red>-&gt;</font> Int-<a name="line-29"></a><font color=Blue>posnLine</font>   <font color=Cyan>(</font>Pn <font color=Green><u>_</u></font> x <font color=Green><u>_</u></font> <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red>=</font> x-<a name="line-30"></a><a name="posnColumn"></a><font color=Blue>posnColumn</font> <font color=Cyan>(</font>Pn <font color=Green><u>_</u></font> <font color=Green><u>_</u></font> x <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red>=</font> x-<a name="line-31"></a>-<a name="line-32"></a><a name="noPos"></a><font color=Blue>-- | Dummy value for generated data, where a true source position does</font>-<a name="line-33"></a><font color=Blue>--   not exist.</font>-<a name="line-34"></a><font color=Blue>noPos</font> <font color=Red>::</font> Posn-<a name="line-35"></a><font color=Blue>noPos</font> <font color=Red>=</font> Pn <font color=Magenta>"no recorded position"</font> <font color=Magenta>0</font> <font color=Magenta>0</font> Nothing-<a name="line-36"></a>-<a name="line-37"></a><a name="posInNewCxt"></a><font color=Blue>-- | @posInNewCxt name pos@ creates a new source position from an old one.</font>-<a name="line-38"></a><font color=Blue>--   It is used when opening a new file (e.g. a DTD inclusion), to denote</font>-<a name="line-39"></a><font color=Blue>--   the start of the file @name@, but retain the stacked information that</font>-<a name="line-40"></a><font color=Blue>--   it was included from the old @pos@.</font>-<a name="line-41"></a><font color=Blue>posInNewCxt</font> <font color=Red>::</font> String <font color=Red>-&gt;</font> Maybe Posn <font color=Red>-&gt;</font> Posn-<a name="line-42"></a><font color=Blue>posInNewCxt</font> name pos <font color=Red>=</font> Pn name <font color=Magenta>1</font> <font color=Magenta>1</font> pos-<a name="line-43"></a>-<a name="line-44"></a><font color=Green><u>instance</u></font> Show Posn <font color=Green><u>where</u></font>-<a name="line-45"></a>      showsPrec <font color=Green><u>_</u></font> <font color=Cyan>(</font>Pn f l c i<font color=Cyan>)</font> <font color=Red>=</font> showString <font color=Magenta>"file "</font> <font color=Cyan>.</font>-<a name="line-46"></a>                                 showString f <font color=Cyan>.</font>-<a name="line-47"></a>                                 showString <font color=Magenta>"  at line "</font> <font color=Cyan>.</font> shows l <font color=Cyan>.</font>-<a name="line-48"></a>                                 showString <font color=Magenta>" col "</font> <font color=Cyan>.</font> shows c <font color=Cyan>.</font>-<a name="line-49"></a>                                 <font color=Cyan>(</font> <font color=Green><u>case</u></font> i <font color=Green><u>of</u></font>-<a name="line-50"></a>                                    Nothing <font color=Red>-&gt;</font> id-<a name="line-51"></a>                                    Just p  <font color=Red>-&gt;</font> showString <font color=Magenta>"\n    used by  "</font> <font color=Cyan>.</font>-<a name="line-52"></a>                                               shows p <font color=Cyan>)</font>-<a name="line-53"></a>-<a name="line-54"></a><a name="forcep"></a><font color=Blue>-- | Just used to strictify the internal values of a position, to avoid</font>-<a name="line-55"></a><font color=Blue>--   space leaks.</font>-<a name="line-56"></a><font color=Blue>forcep</font> <font color=Red>::</font> Posn <font color=Red>-&gt;</font> Int-<a name="line-57"></a><font color=Blue>forcep</font> <font color=Cyan>(</font>Pn <font color=Green><u>_</u></font> n m <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red>=</font> m <font color=Cyan>`seq`</font> n-<a name="line-58"></a>-<a name="line-59"></a><a name="addcol"></a><font color=Blue>-- | Add n character positions to the given position.</font>-<a name="line-60"></a><font color=Blue>addcol</font> <font color=Red>::</font> Int <font color=Red>-&gt;</font> Posn <font color=Red>-&gt;</font> Posn-<a name="line-61"></a><font color=Blue>addcol</font> n <font color=Cyan>(</font>Pn f r c i<font color=Cyan>)</font> <font color=Red>=</font> Pn f r <font color=Cyan>(</font>c<font color=Cyan>+</font>n<font color=Cyan>)</font> i-<a name="line-62"></a>-<a name="line-63"></a><a name="newline"></a><font color=Blue>-- | Add a newline or tab to the given position.</font>-<a name="line-64"></a><font color=Blue>newline</font><font color=Cyan>,</font> tab <font color=Red>::</font> Posn <font color=Red>-&gt;</font> Posn-<a name="line-65"></a><font color=Blue>newline</font> <font color=Cyan>(</font>Pn f r <font color=Green><u>_</u></font> i<font color=Cyan>)</font> <font color=Red>=</font> Pn f <font color=Cyan>(</font>r<font color=Cyan>+</font><font color=Magenta>1</font><font color=Cyan>)</font> <font color=Magenta>1</font> i-<a name="line-66"></a><a name="tab"></a><font color=Blue>tab</font>     <font color=Cyan>(</font>Pn f r c i<font color=Cyan>)</font> <font color=Red>=</font> Pn f r <font color=Cyan>(</font><font color=Cyan>(</font><font color=Cyan>(</font>c<font color=Cyan>`div`</font><font color=Magenta>8</font><font color=Cyan>)</font><font color=Cyan>+</font><font color=Magenta>1</font><font color=Cyan>)</font><font color=Cyan>*</font><font color=Magenta>8</font><font color=Cyan>)</font> i-<a name="line-67"></a>-<a name="line-68"></a><a name="white"></a><font color=Blue>-- | Add the given whitespace char to the given position.</font>-<a name="line-69"></a><font color=Blue>--   Precondition: @white c | isSpace c = True@</font>-<a name="line-70"></a><font color=Blue>white</font> <font color=Red>::</font> Char <font color=Red>-&gt;</font> Posn <font color=Red>-&gt;</font> Posn-<a name="line-71"></a><font color=Blue>white</font> <font color=Magenta>' '</font>  <font color=Red>=</font> addcol <font color=Magenta>1</font>-<a name="line-72"></a><font color=Blue>white</font> <font color=Magenta>'\n'</font> <font color=Red>=</font> newline-<a name="line-73"></a><font color=Blue>white</font> <font color=Magenta>'\r'</font> <font color=Red>=</font> id-<a name="line-74"></a><font color=Blue>white</font> <font color=Magenta>'\t'</font> <font color=Red>=</font> tab-<a name="line-75"></a><font color=Blue>white</font> <font color=Magenta>'\xa0'</font> <font color=Red>=</font> addcol <font color=Magenta>1</font>-<a name="line-76"></a>-</pre>-</body>-</html>
− docs/HaXml/src/Text/XML/HaXml/Pretty.html
@@ -1,308 +0,0 @@-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">-<html>-<head>-<!-- Generated by HsColour, http://www.cs.york.ac.uk/fp/darcs/hscolour/ -->-<title>src/Text/XML/HaXml/Pretty.hs</title>-</head>-<body>-<pre><a name="line-1"></a><font color=Blue>-- | This is a pretty-printer for turning the internal representation</font>-<a name="line-2"></a><font color=Blue>--   of generic structured XML documents into the Doc type (which can</font>-<a name="line-3"></a><font color=Blue>--   later be rendered using Text.PrettyPrint.HughesPJ.render).</font>-<a name="line-4"></a><font color=Blue>--   Essentially there is one pp function for each type in</font>-<a name="line-5"></a><font color=Blue>--   Text.Xml.HaXml.Types, so you can pretty-print as much or as little</font>-<a name="line-6"></a><font color=Blue>--   of the document as you wish.</font>-<a name="line-7"></a>-<a name="line-8"></a><font color=Green><u>module</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Pretty-<a name="line-9"></a>  <font color=Cyan>(</font>-<a name="line-10"></a>  <font color=Blue>-- * Pretty-print a whole document</font>-<a name="line-11"></a>    document-<a name="line-12"></a>  <font color=Blue>-- ** Just one content</font>-<a name="line-13"></a>  <font color=Cyan>,</font>   content-<a name="line-14"></a>  <font color=Blue>-- ** Just one tagged element</font>-<a name="line-15"></a>  <font color=Cyan>,</font>   element-<a name="line-16"></a>  <font color=Blue>-- * Pretty-print just a DTD</font>-<a name="line-17"></a>  <font color=Cyan>,</font> doctypedecl-<a name="line-18"></a>  <font color=Blue>-- ** The prolog</font>-<a name="line-19"></a>  <font color=Cyan>,</font>   prolog-<a name="line-20"></a>  <font color=Blue>-- ** A content particle description</font>-<a name="line-21"></a>  <font color=Cyan>,</font>   cp-<a name="line-22"></a>  <font color=Cyan>)</font> <font color=Green><u>where</u></font>-<a name="line-23"></a>-<a name="line-24"></a><font color=Green><u>import</u></font> Prelude hiding <font color=Cyan>(</font>maybe<font color=Cyan>,</font>either<font color=Cyan>)</font>-<a name="line-25"></a><font color=Green><u>import</u></font> Maybe hiding <font color=Cyan>(</font>maybe<font color=Cyan>)</font>-<a name="line-26"></a><font color=Green><u>import</u></font> List <font color=Cyan>(</font>intersperse<font color=Cyan>)</font>-<a name="line-27"></a><font color=Blue>--import Char (isSpace)</font>-<a name="line-28"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>PrettyPrint<font color=Cyan>.</font>HughesPJ-<a name="line-29"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Types-<a name="line-30"></a>-<a name="line-31"></a><a name="either"></a><font color=Blue>either</font> <font color=Red>::</font> <font color=Cyan>(</font>t <font color=Red>-&gt;</font> t1<font color=Cyan>)</font> <font color=Red>-&gt;</font> <font color=Cyan>(</font>t2 <font color=Red>-&gt;</font> t1<font color=Cyan>)</font> <font color=Red>-&gt;</font> Either t t2 <font color=Red>-&gt;</font> t1-<a name="line-32"></a><font color=Blue>either</font> f <font color=Green><u>_</u></font> <font color=Cyan>(</font>Left x<font color=Cyan>)</font>  <font color=Red>=</font> f x-<a name="line-33"></a><font color=Blue>either</font> <font color=Green><u>_</u></font> g <font color=Cyan>(</font>Right x<font color=Cyan>)</font> <font color=Red>=</font> g x-<a name="line-34"></a>-<a name="line-35"></a><a name="maybe"></a><font color=Blue>maybe</font> <font color=Red>::</font> <font color=Cyan>(</font>t <font color=Red>-&gt;</font> Doc<font color=Cyan>)</font> <font color=Red>-&gt;</font> Maybe t <font color=Red>-&gt;</font> Doc-<a name="line-36"></a><font color=Blue>maybe</font> <font color=Green><u>_</u></font> Nothing  <font color=Red>=</font> empty-<a name="line-37"></a><font color=Blue>maybe</font> f <font color=Cyan>(</font>Just x<font color=Cyan>)</font> <font color=Red>=</font> f x-<a name="line-38"></a>-<a name="line-39"></a><font color=Blue>--peref p   = text "%" &lt;&gt; text p &lt;&gt; text ";"</font>-<a name="line-40"></a>-<a name="line-41"></a><font color=Blue>----</font>-<a name="line-42"></a>-<a name="line-43"></a><a name="document"></a><font color=Blue>document</font> <font color=Red>::</font> Document i <font color=Red>-&gt;</font> Doc-<a name="line-44"></a><a name="prolog"></a><font color=Blue>prolog</font>   <font color=Red>::</font> Prolog <font color=Red>-&gt;</font> Doc-<a name="line-45"></a><a name="xmldecl"></a><font color=Blue>xmldecl</font>  <font color=Red>::</font> XMLDecl <font color=Red>-&gt;</font> Doc-<a name="line-46"></a><a name="misc"></a><font color=Blue>misc</font>     <font color=Red>::</font> Misc <font color=Red>-&gt;</font> Doc-<a name="line-47"></a><a name="sddecl"></a><font color=Blue>sddecl</font>   <font color=Red>::</font> Bool <font color=Red>-&gt;</font> Doc-<a name="line-48"></a>-<a name="line-49"></a><a name="doctypedecl"></a><font color=Blue>doctypedecl</font> <font color=Red>::</font> DocTypeDecl <font color=Red>-&gt;</font> Doc-<a name="line-50"></a><a name="markupdecl"></a><font color=Blue>markupdecl</font>  <font color=Red>::</font> MarkupDecl <font color=Red>-&gt;</font> Doc-<a name="line-51"></a><a name="extsubset"></a><font color=Blue>extsubset</font>   <font color=Red>::</font> ExtSubset <font color=Red>-&gt;</font> Doc-<a name="line-52"></a><a name="extsubsetdecl"></a><font color=Blue>extsubsetdecl</font> <font color=Red>::</font> ExtSubsetDecl <font color=Red>-&gt;</font> Doc-<a name="line-53"></a><a name="cp"></a><font color=Blue>cp</font>          <font color=Red>::</font> CP <font color=Red>-&gt;</font> Doc-<a name="line-54"></a>-<a name="line-55"></a><a name="element"></a><font color=Blue>element</font>   <font color=Red>::</font> Element i <font color=Red>-&gt;</font> Doc-<a name="line-56"></a><a name="attribute"></a><font color=Blue>attribute</font> <font color=Red>::</font> Attribute <font color=Red>-&gt;</font> Doc                     <font color=Cyan>--etc</font>-<a name="line-57"></a><a name="content"></a><font color=Blue>content</font>   <font color=Red>::</font> Content i <font color=Red>-&gt;</font> Doc-<a name="line-58"></a>-<a name="line-59"></a><font color=Blue>----</font>-<a name="line-60"></a>-<a name="line-61"></a><font color=Blue>document</font> <font color=Cyan>(</font>Document p <font color=Green><u>_</u></font> e m<font color=Cyan>)</font><font color=Red>=</font> prolog p <font color=Cyan>$$</font> element e <font color=Cyan>$$</font> vcat <font color=Cyan>(</font>map misc m<font color=Cyan>)</font>-<a name="line-62"></a><font color=Blue>prolog</font> <font color=Cyan>(</font>Prolog x m1 dtd m2<font color=Cyan>)</font><font color=Red>=</font> maybe xmldecl x <font color=Cyan>$$</font>-<a name="line-63"></a>                             vcat <font color=Cyan>(</font>map misc m1<font color=Cyan>)</font> <font color=Cyan>$$</font>-<a name="line-64"></a>                             maybe doctypedecl dtd <font color=Cyan>$$</font>-<a name="line-65"></a>                             vcat <font color=Cyan>(</font>map misc m2<font color=Cyan>)</font>-<a name="line-66"></a><font color=Blue>xmldecl</font> <font color=Cyan>(</font>XMLDecl v e sd<font color=Cyan>)</font>   <font color=Red>=</font> text <font color=Magenta>"&lt;?xml version='"</font> <font color=Cyan>&lt;&gt;</font> text v <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>"'"</font> <font color=Cyan>&lt;+&gt;</font>-<a name="line-67"></a>                             maybe encodingdecl e <font color=Cyan>&lt;+&gt;</font>-<a name="line-68"></a>                             maybe sddecl sd <font color=Cyan>&lt;+&gt;</font>-<a name="line-69"></a>                             text <font color=Magenta>"?&gt;"</font>-<a name="line-70"></a><font color=Blue>misc</font> <font color=Cyan>(</font>Comment s<font color=Cyan>)</font>           <font color=Red>=</font> text <font color=Magenta>"&lt;!--"</font> <font color=Cyan>&lt;&gt;</font> text s <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>"--&gt;"</font>-<a name="line-71"></a><font color=Blue>misc</font> <font color=Cyan>(</font>PI <font color=Cyan>(</font>n<font color=Cyan>,</font>s<font color=Cyan>)</font><font color=Cyan>)</font>            <font color=Red>=</font> text <font color=Magenta>"&lt;?"</font> <font color=Cyan>&lt;&gt;</font> text n <font color=Cyan>&lt;+&gt;</font> text s <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>"?&gt;"</font>-<a name="line-72"></a><font color=Blue>sddecl</font> sd   <font color=Red>|</font> sd           <font color=Red>=</font> text <font color=Magenta>"standalone='yes'"</font>-<a name="line-73"></a>            <font color=Red>|</font> otherwise    <font color=Red>=</font> text <font color=Magenta>"standalone='no'"</font>-<a name="line-74"></a><font color=Blue>doctypedecl</font> <font color=Cyan>(</font>DTD n eid ds<font color=Cyan>)</font> <font color=Red>=</font> <font color=Green><u>if</u></font> null ds <font color=Green><u>then</u></font>-<a name="line-75"></a>                                  hd <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>"&gt;"</font>-<a name="line-76"></a>                             <font color=Green><u>else</u></font> hd <font color=Cyan>&lt;+&gt;</font> text <font color=Magenta>" ["</font> <font color=Cyan>$$</font>-<a name="line-77"></a>                                  vcat <font color=Cyan>(</font>map markupdecl ds<font color=Cyan>)</font> <font color=Cyan>$$</font> text <font color=Magenta>"]&gt;"</font>-<a name="line-78"></a>                           <font color=Green><u>where</u></font> hd <font color=Red>=</font> text <font color=Magenta>"&lt;!DOCTYPE"</font> <font color=Cyan>&lt;+&gt;</font> text n <font color=Cyan>&lt;+&gt;</font>-<a name="line-79"></a>                                      maybe externalid eid-<a name="line-80"></a><font color=Blue>markupdecl</font> <font color=Cyan>(</font>Element e<font color=Cyan>)</font>     <font color=Red>=</font> elementdecl e-<a name="line-81"></a><font color=Blue>markupdecl</font> <font color=Cyan>(</font>AttList a<font color=Cyan>)</font>     <font color=Red>=</font> attlistdecl a-<a name="line-82"></a><font color=Blue>markupdecl</font> <font color=Cyan>(</font>Entity e<font color=Cyan>)</font>      <font color=Red>=</font> entitydecl e-<a name="line-83"></a><font color=Blue>markupdecl</font> <font color=Cyan>(</font>Notation n<font color=Cyan>)</font>    <font color=Red>=</font> notationdecl n-<a name="line-84"></a><font color=Blue>markupdecl</font> <font color=Cyan>(</font>MarkupMisc m<font color=Cyan>)</font>  <font color=Red>=</font> misc m-<a name="line-85"></a><font color=Blue>-- markupdecl (MarkupPE p m)  = peref p</font>-<a name="line-86"></a><font color=Blue>extsubset</font> <font color=Cyan>(</font>ExtSubset t ds<font color=Cyan>)</font> <font color=Red>=</font> maybe textdecl t <font color=Cyan>$$</font>-<a name="line-87"></a>                             vcat <font color=Cyan>(</font>map extsubsetdecl ds<font color=Cyan>)</font>-<a name="line-88"></a><a name="extmarkupdecl"></a><font color=Blue>extmarkupdecl</font> <font color=Cyan>(</font>ExtMarkupDecl m<font color=Cyan>)</font>      <font color=Red>=</font> markupdecl m-<a name="line-89"></a><font color=Blue>extsubsetdecl</font> <font color=Cyan>(</font>ExtConditionalSect c<font color=Cyan>)</font> <font color=Red>=</font> conditionalsect c-<a name="line-90"></a><font color=Blue>-- extsubsetdecl (ExtPEReference p e)   = peref p</font>-<a name="line-91"></a>-<a name="line-92"></a><font color=Blue>element</font> <font color=Cyan>(</font>Elem n <font color=Green><u>as</u></font> []<font color=Cyan>)</font> <font color=Red>=</font> text <font color=Magenta>"&lt;"</font> <font color=Cyan>&lt;&gt;</font> text n <font color=Cyan>&lt;+&gt;</font>-<a name="line-93"></a>                         fsep <font color=Cyan>(</font>map attribute <font color=Green><u>as</u></font><font color=Cyan>)</font> <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>"/&gt;"</font>-<a name="line-94"></a><font color=Blue>element</font> e<font color=Red>@</font><font color=Cyan>(</font>Elem n <font color=Green><u>as</u></font> cs<font color=Cyan>)</font>-<a name="line-95"></a><font color=Blue>--  | any isText cs    = text "&lt;" &lt;&gt; text n &lt;+&gt; fsep (map attribute as) &lt;&gt;</font>-<a name="line-96"></a><font color=Blue>--                       text "&gt;" &lt;&gt; hcat (map content cs) &lt;&gt;</font>-<a name="line-97"></a><font color=Blue>--                       text "&lt;/" &lt;&gt; text n &lt;&gt; text "&gt;"</font>-<a name="line-98"></a>    <font color=Red>|</font> isText <font color=Cyan>(</font>head cs<font color=Cyan>)</font> <font color=Red>=</font> text <font color=Magenta>"&lt;"</font> <font color=Cyan>&lt;&gt;</font> text n <font color=Cyan>&lt;+&gt;</font> fsep <font color=Cyan>(</font>map attribute <font color=Green><u>as</u></font><font color=Cyan>)</font> <font color=Cyan>&lt;&gt;</font>-<a name="line-99"></a>                         text <font color=Magenta>"&gt;"</font> <font color=Cyan>&lt;&gt;</font> hcat <font color=Cyan>(</font>map content cs<font color=Cyan>)</font> <font color=Cyan>&lt;&gt;</font>-<a name="line-100"></a>                         text <font color=Magenta>"&lt;/"</font> <font color=Cyan>&lt;&gt;</font> text n <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>"&gt;"</font>-<a name="line-101"></a>    <font color=Red>|</font> otherwise        <font color=Red>=</font> <font color=Green><u>let</u></font> <font color=Cyan>(</font>d<font color=Cyan>,</font>c<font color=Cyan>)</font> <font color=Red>=</font> carryelem e empty-<a name="line-102"></a>                         <font color=Green><u>in</u></font> d <font color=Cyan>&lt;&gt;</font> c-<a name="line-103"></a>-<a name="line-104"></a><a name="isText"></a><font color=Blue>isText</font> <font color=Red>::</font> Content t <font color=Red>-&gt;</font> Bool-<a name="line-105"></a><font color=Blue>isText</font> <font color=Cyan>(</font>CString <font color=Green><u>_</u></font> <font color=Green><u>_</u></font> <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red>=</font> True-<a name="line-106"></a><font color=Blue>isText</font> <font color=Cyan>(</font>CRef <font color=Green><u>_</u></font> <font color=Green><u>_</u></font><font color=Cyan>)</font>      <font color=Red>=</font> True-<a name="line-107"></a><font color=Blue>isText</font> <font color=Green><u>_</u></font>               <font color=Red>=</font> False-<a name="line-108"></a>-<a name="line-109"></a><a name="carryelem"></a><font color=Blue>carryelem</font> <font color=Red>::</font> Element t <font color=Red>-&gt;</font> Doc <font color=Red>-&gt;</font> <font color=Cyan>(</font>Doc<font color=Cyan>,</font> Doc<font color=Cyan>)</font>-<a name="line-110"></a><a name="carrycontent"></a><font color=Blue>carrycontent</font> <font color=Red>::</font>  Content t <font color=Red>-&gt;</font> Doc <font color=Red>-&gt;</font> <font color=Cyan>(</font>Doc<font color=Cyan>,</font> Doc<font color=Cyan>)</font>-<a name="line-111"></a><font color=Blue>carryelem</font> <font color=Cyan>(</font>Elem n <font color=Green><u>as</u></font> []<font color=Cyan>)</font> c-<a name="line-112"></a>                       <font color=Red>=</font> <font color=Cyan>(</font> c <font color=Cyan>&lt;&gt;</font>-<a name="line-113"></a>                           text <font color=Magenta>"&lt;"</font> <font color=Cyan>&lt;&gt;</font> text n <font color=Cyan>&lt;+&gt;</font> fsep <font color=Cyan>(</font>map attribute <font color=Green><u>as</u></font><font color=Cyan>)</font>-<a name="line-114"></a>                         <font color=Cyan>,</font> text <font color=Magenta>"/&gt;"</font><font color=Cyan>)</font>-<a name="line-115"></a><font color=Blue>carryelem</font> <font color=Cyan>(</font>Elem n <font color=Green><u>as</u></font> cs<font color=Cyan>)</font> c-<a name="line-116"></a><font color=Blue>--  | any isText cs    =  ( c &lt;&gt; element e, empty)</font>-<a name="line-117"></a>    <font color=Red>|</font> otherwise        <font color=Red>=</font>  <font color=Green><u>let</u></font> <font color=Cyan>(</font>cs0<font color=Cyan>,</font>d0<font color=Cyan>)</font> <font color=Red>=</font> carryscan carrycontent cs <font color=Cyan>(</font>text <font color=Magenta>"&gt;"</font><font color=Cyan>)</font>-<a name="line-118"></a>                          <font color=Green><u>in</u></font>-<a name="line-119"></a>                          <font color=Cyan>(</font> c <font color=Cyan>&lt;&gt;</font>-<a name="line-120"></a>                            text <font color=Magenta>"&lt;"</font> <font color=Cyan>&lt;&gt;</font> text n <font color=Cyan>&lt;+&gt;</font> fsep <font color=Cyan>(</font>map attribute <font color=Green><u>as</u></font><font color=Cyan>)</font> <font color=Cyan>$$</font>-<a name="line-121"></a>                            nest <font color=Magenta>2</font> <font color=Cyan>(</font>vcat cs0<font color=Cyan>)</font> <font color=Cyan>&lt;&gt;</font> <font color=Blue>--- $$</font>-<a name="line-122"></a>                            d0 <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>"&lt;/"</font> <font color=Cyan>&lt;&gt;</font> text n-<a name="line-123"></a>                          <font color=Cyan>,</font> text <font color=Magenta>"&gt;"</font><font color=Cyan>)</font>-<a name="line-124"></a><font color=Blue>carrycontent</font> <font color=Cyan>(</font>CElem e <font color=Green><u>_</u></font><font color=Cyan>)</font> c   <font color=Red>=</font> carryelem e c-<a name="line-125"></a><font color=Blue>carrycontent</font> <font color=Cyan>(</font>CString False s <font color=Green><u>_</u></font><font color=Cyan>)</font> c <font color=Red>=</font> <font color=Cyan>(</font>c <font color=Cyan>&lt;&gt;</font> chardata s<font color=Cyan>,</font> empty<font color=Cyan>)</font>-<a name="line-126"></a><font color=Blue>carrycontent</font> <font color=Cyan>(</font>CString True  s <font color=Green><u>_</u></font><font color=Cyan>)</font> c <font color=Red>=</font> <font color=Cyan>(</font>c <font color=Cyan>&lt;&gt;</font> cdsect s<font color=Cyan>,</font> empty<font color=Cyan>)</font>-<a name="line-127"></a><font color=Blue>carrycontent</font> <font color=Cyan>(</font>CRef r <font color=Green><u>_</u></font><font color=Cyan>)</font> c    <font color=Red>=</font> <font color=Cyan>(</font>c <font color=Cyan>&lt;&gt;</font> reference r<font color=Cyan>,</font> empty<font color=Cyan>)</font>-<a name="line-128"></a><font color=Blue>carrycontent</font> <font color=Cyan>(</font>CMisc m <font color=Green><u>_</u></font><font color=Cyan>)</font> c   <font color=Red>=</font> <font color=Cyan>(</font>c <font color=Cyan>&lt;&gt;</font> misc m<font color=Cyan>,</font> empty<font color=Cyan>)</font>-<a name="line-129"></a>-<a name="line-130"></a><a name="carryscan"></a><font color=Blue>carryscan</font> <font color=Red>::</font> <font color=Cyan>(</font>a<font color=Red>-&gt;</font>c<font color=Red>-&gt;</font><font color=Cyan>(</font>b<font color=Cyan>,</font>c<font color=Cyan>)</font><font color=Cyan>)</font> <font color=Red>-&gt;</font> <font color=Red>[</font>a<font color=Red>]</font> <font color=Red>-&gt;</font> c <font color=Red>-&gt;</font> <font color=Cyan>(</font><font color=Red>[</font>b<font color=Red>]</font><font color=Cyan>,</font>c<font color=Cyan>)</font>-<a name="line-131"></a><font color=Blue>carryscan</font> <font color=Green><u>_</u></font> []     c <font color=Red>=</font> <font color=Cyan>(</font>[]<font color=Cyan>,</font>c<font color=Cyan>)</font>-<a name="line-132"></a><font color=Blue>carryscan</font> f <font color=Cyan>(</font>a<font color=Red><b>:</b></font><font color=Green><u>as</u></font><font color=Cyan>)</font> c <font color=Red>=</font> <font color=Green><u>let</u></font> <font color=Cyan>(</font>b<font color=Cyan>,</font> c0<font color=Cyan>)</font> <font color=Red>=</font> f a c-<a name="line-133"></a>                           <font color=Cyan>(</font>bs<font color=Cyan>,</font>c1<font color=Cyan>)</font> <font color=Red>=</font> carryscan f <font color=Green><u>as</u></font> c0-<a name="line-134"></a>                       <font color=Green><u>in</u></font> <font color=Cyan>(</font>b<font color=Red><b>:</b></font>bs<font color=Cyan>,</font> c1<font color=Cyan>)</font>-<a name="line-135"></a>-<a name="line-136"></a><font color=Blue>--carryelem e@(Elem n as cs) c</font>-<a name="line-137"></a><font color=Blue>--  | isText (head cs) =</font>-<a name="line-138"></a><font color=Blue>--        ( start &lt;&gt;</font>-<a name="line-139"></a><font color=Blue>--          text "&gt;" &lt;&gt; hcat (map content cs) &lt;&gt; text "&lt;/" &lt;&gt; text n</font>-<a name="line-140"></a><font color=Blue>--        , text "&gt;")</font>-<a name="line-141"></a><font color=Blue>--  | otherwise =</font>-<a name="line-142"></a><font color=Blue>--        let (d,c0) = foldl carrycontent (start, text "&gt;") cs in</font>-<a name="line-143"></a><font color=Blue>--        ( d &lt;&gt; c0 &lt;&gt; text "&lt;/" &lt;&gt; text n</font>-<a name="line-144"></a><font color=Blue>--        , text "&gt;")</font>-<a name="line-145"></a><font color=Blue>--  where start = c &lt;&gt; text "&lt;" &lt;&gt; text n &lt;+&gt; fsep (map attribute as)</font>-<a name="line-146"></a><font color=Blue>--</font>-<a name="line-147"></a><font color=Blue>--carrycontent (d,c) (CElem e)   = let (d',c') = carryelem e c in</font>-<a name="line-148"></a><font color=Blue>--                                 (d $$ nest 2 d',       c')</font>-<a name="line-149"></a><font color=Blue>--carrycontent (d,c) (CString _ s) = (d &lt;&gt; c &lt;&gt; chardata s, empty)</font>-<a name="line-150"></a><font color=Blue>--carrycontent (d,c) (CRef r)    = (d &lt;&gt; c &lt;&gt; reference r,empty)</font>-<a name="line-151"></a><font color=Blue>--carrycontent (d,c) (CMisc m)   = (d $$ c &lt;&gt; misc m,     empty)</font>-<a name="line-152"></a>-<a name="line-153"></a>-<a name="line-154"></a><font color=Blue>attribute</font> <font color=Cyan>(</font>n<font color=Cyan>,</font>v<font color=Cyan>)</font>             <font color=Red>=</font> text n <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>"="</font> <font color=Cyan>&lt;&gt;</font> attvalue v-<a name="line-155"></a><font color=Blue>content</font> <font color=Cyan>(</font>CElem e <font color=Green><u>_</u></font><font color=Cyan>)</font>         <font color=Red>=</font> element e-<a name="line-156"></a><font color=Blue>content</font> <font color=Cyan>(</font>CString False s <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red>=</font> chardata s-<a name="line-157"></a><font color=Blue>content</font> <font color=Cyan>(</font>CString True s <font color=Green><u>_</u></font><font color=Cyan>)</font>  <font color=Red>=</font> cdsect s-<a name="line-158"></a><font color=Blue>content</font> <font color=Cyan>(</font>CRef r <font color=Green><u>_</u></font><font color=Cyan>)</font>          <font color=Red>=</font> reference r-<a name="line-159"></a><font color=Blue>content</font> <font color=Cyan>(</font>CMisc m <font color=Green><u>_</u></font><font color=Cyan>)</font>         <font color=Red>=</font> misc m-<a name="line-160"></a>-<a name="line-161"></a><a name="elementdecl"></a><font color=Blue>elementdecl</font> <font color=Red>::</font> ElementDecl <font color=Red>-&gt;</font> Doc-<a name="line-162"></a><font color=Blue>elementdecl</font> <font color=Cyan>(</font>ElementDecl n cs<font color=Cyan>)</font> <font color=Red>=</font> text <font color=Magenta>"&lt;!ELEMENT"</font> <font color=Cyan>&lt;+&gt;</font> text n <font color=Cyan>&lt;+&gt;</font>-<a name="line-163"></a>                                 contentspec cs <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>"&gt;"</font>-<a name="line-164"></a><a name="contentspec"></a><font color=Blue>contentspec</font> <font color=Red>::</font> ContentSpec <font color=Red>-&gt;</font> Doc-<a name="line-165"></a><font color=Blue>contentspec</font> EMPTY              <font color=Red>=</font> text <font color=Magenta>"EMPTY"</font>-<a name="line-166"></a><font color=Blue>contentspec</font> ANY                <font color=Red>=</font> text <font color=Magenta>"ANY"</font>-<a name="line-167"></a><font color=Blue>contentspec</font> <font color=Cyan>(</font>Mixed m<font color=Cyan>)</font>          <font color=Red>=</font> mixed m-<a name="line-168"></a><font color=Blue>contentspec</font> <font color=Cyan>(</font>ContentSpec c<font color=Cyan>)</font>    <font color=Red>=</font> cp c-<a name="line-169"></a><font color=Blue>--contentspec (ContentPE p cs)   = peref p</font>-<a name="line-170"></a><font color=Blue>cp</font> <font color=Cyan>(</font>TagName n m<font color=Cyan>)</font>       <font color=Red>=</font> parens <font color=Cyan>(</font>text n<font color=Cyan>)</font> <font color=Cyan>&lt;&gt;</font> modifier m-<a name="line-171"></a><font color=Blue>cp</font> <font color=Cyan>(</font>Choice cs m<font color=Cyan>)</font>       <font color=Red>=</font> parens <font color=Cyan>(</font>hcat <font color=Cyan>(</font>intersperse <font color=Cyan>(</font>text <font color=Magenta>"|"</font><font color=Cyan>)</font> <font color=Cyan>(</font>map cp cs<font color=Cyan>)</font><font color=Cyan>)</font><font color=Cyan>)</font> <font color=Cyan>&lt;&gt;</font>-<a name="line-172"></a>                           modifier m-<a name="line-173"></a><font color=Blue>cp</font> <font color=Cyan>(</font>Seq cs m<font color=Cyan>)</font>          <font color=Red>=</font> parens <font color=Cyan>(</font>hcat <font color=Cyan>(</font>intersperse <font color=Cyan>(</font>text <font color=Magenta>","</font><font color=Cyan>)</font> <font color=Cyan>(</font>map cp cs<font color=Cyan>)</font><font color=Cyan>)</font><font color=Cyan>)</font> <font color=Cyan>&lt;&gt;</font>-<a name="line-174"></a>                           modifier m-<a name="line-175"></a><a name="modifier"></a><font color=Blue>--cp (CPPE p c)          = peref p</font>-<a name="line-176"></a><font color=Blue>modifier</font> <font color=Red>::</font> Modifier <font color=Red>-&gt;</font> Doc-<a name="line-177"></a><font color=Blue>modifier</font> None          <font color=Red>=</font> empty-<a name="line-178"></a><font color=Blue>modifier</font> Query         <font color=Red>=</font> text <font color=Magenta>"?"</font>-<a name="line-179"></a><font color=Blue>modifier</font> Star          <font color=Red>=</font> text <font color=Magenta>"*"</font>-<a name="line-180"></a><font color=Blue>modifier</font> Plus          <font color=Red>=</font> text <font color=Magenta>"+"</font>-<a name="line-181"></a><a name="mixed"></a><font color=Blue>mixed</font> <font color=Red>::</font> Mixed <font color=Red>-&gt;</font> Doc-<a name="line-182"></a><font color=Blue>mixed</font>  PCDATA          <font color=Red>=</font> text <font color=Magenta>"(#PCDATA)"</font>-<a name="line-183"></a><font color=Blue>mixed</font> <font color=Cyan>(</font>PCDATAplus ns<font color=Cyan>)</font>  <font color=Red>=</font> text <font color=Magenta>"(#PCDATA |"</font> <font color=Cyan>&lt;+&gt;</font>-<a name="line-184"></a>                         hcat <font color=Cyan>(</font>intersperse <font color=Cyan>(</font>text <font color=Magenta>"|"</font><font color=Cyan>)</font> <font color=Cyan>(</font>map text ns<font color=Cyan>)</font><font color=Cyan>)</font> <font color=Cyan>&lt;&gt;</font>-<a name="line-185"></a>                         text <font color=Magenta>")*"</font>-<a name="line-186"></a>-<a name="line-187"></a><a name="attlistdecl"></a><font color=Blue>attlistdecl</font> <font color=Red>::</font> AttListDecl <font color=Red>-&gt;</font> Doc-<a name="line-188"></a><font color=Blue>attlistdecl</font> <font color=Cyan>(</font>AttListDecl n ds<font color=Cyan>)</font> <font color=Red>=</font> text <font color=Magenta>"&lt;!ATTLIST"</font> <font color=Cyan>&lt;+&gt;</font> text n <font color=Cyan>&lt;+&gt;</font>-<a name="line-189"></a>                                 fsep <font color=Cyan>(</font>map attdef ds<font color=Cyan>)</font> <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>"&gt;"</font>-<a name="line-190"></a><a name="attdef"></a><font color=Blue>attdef</font> <font color=Red>::</font> AttDef <font color=Red>-&gt;</font> Doc-<a name="line-191"></a><font color=Blue>attdef</font> <font color=Cyan>(</font>AttDef n t d<font color=Cyan>)</font>          <font color=Red>=</font> text n <font color=Cyan>&lt;+&gt;</font> atttype t <font color=Cyan>&lt;+&gt;</font> defaultdecl d-<a name="line-192"></a><a name="atttype"></a><font color=Blue>atttype</font> <font color=Red>::</font> AttType <font color=Red>-&gt;</font> Doc-<a name="line-193"></a><font color=Blue>atttype</font>  StringType            <font color=Red>=</font> text <font color=Magenta>"CDATA"</font>-<a name="line-194"></a><font color=Blue>atttype</font> <font color=Cyan>(</font>TokenizedType t<font color=Cyan>)</font>      <font color=Red>=</font> tokenizedtype t-<a name="line-195"></a><font color=Blue>atttype</font> <font color=Cyan>(</font>EnumeratedType t<font color=Cyan>)</font>     <font color=Red>=</font> enumeratedtype t-<a name="line-196"></a><a name="tokenizedtype"></a><font color=Blue>tokenizedtype</font> <font color=Red>::</font> TokenizedType <font color=Red>-&gt;</font> Doc-<a name="line-197"></a><font color=Blue>tokenizedtype</font> ID               <font color=Red>=</font> text <font color=Magenta>"ID"</font>-<a name="line-198"></a><font color=Blue>tokenizedtype</font> IDREF            <font color=Red>=</font> text <font color=Magenta>"IDREF"</font>-<a name="line-199"></a><font color=Blue>tokenizedtype</font> IDREFS           <font color=Red>=</font> text <font color=Magenta>"IDREFS"</font>-<a name="line-200"></a><font color=Blue>tokenizedtype</font> ENTITY           <font color=Red>=</font> text <font color=Magenta>"ENTITY"</font>-<a name="line-201"></a><font color=Blue>tokenizedtype</font> ENTITIES         <font color=Red>=</font> text <font color=Magenta>"ENTITIES"</font>-<a name="line-202"></a><font color=Blue>tokenizedtype</font> NMTOKEN          <font color=Red>=</font> text <font color=Magenta>"NMTOKEN"</font>-<a name="line-203"></a><font color=Blue>tokenizedtype</font> NMTOKENS         <font color=Red>=</font> text <font color=Magenta>"NMTOKENS"</font>-<a name="line-204"></a><a name="enumeratedtype"></a><font color=Blue>enumeratedtype</font> <font color=Red>::</font> EnumeratedType <font color=Red>-&gt;</font> Doc-<a name="line-205"></a><font color=Blue>enumeratedtype</font> <font color=Cyan>(</font>NotationType n<font color=Cyan>)</font><font color=Red>=</font> notationtype n-<a name="line-206"></a><font color=Blue>enumeratedtype</font> <font color=Cyan>(</font>Enumeration e<font color=Cyan>)</font> <font color=Red>=</font> enumeration e-<a name="line-207"></a><a name="notationtype"></a><font color=Blue>notationtype</font> <font color=Red>::</font> <font color=Red>[</font>String<font color=Red>]</font> <font color=Red>-&gt;</font> Doc-<a name="line-208"></a><font color=Blue>notationtype</font> ns                <font color=Red>=</font> text <font color=Magenta>"NOTATION"</font> <font color=Cyan>&lt;+&gt;</font>-<a name="line-209"></a>                                 parens <font color=Cyan>(</font>hcat <font color=Cyan>(</font>intersperse <font color=Cyan>(</font>text <font color=Magenta>"|"</font><font color=Cyan>)</font> <font color=Cyan>(</font>map text ns<font color=Cyan>)</font><font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-210"></a><a name="enumeration"></a><font color=Blue>enumeration</font> <font color=Red>::</font> <font color=Red>[</font>String<font color=Red>]</font> <font color=Red>-&gt;</font> Doc-<a name="line-211"></a><font color=Blue>enumeration</font> ns                 <font color=Red>=</font> parens <font color=Cyan>(</font>hcat <font color=Cyan>(</font>intersperse <font color=Cyan>(</font>text <font color=Magenta>"|"</font><font color=Cyan>)</font> <font color=Cyan>(</font>map nmtoken ns<font color=Cyan>)</font><font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-212"></a><a name="defaultdecl"></a><font color=Blue>defaultdecl</font> <font color=Red>::</font> DefaultDecl <font color=Red>-&gt;</font> Doc-<a name="line-213"></a><font color=Blue>defaultdecl</font>  REQUIRED          <font color=Red>=</font> text <font color=Magenta>"#REQUIRED"</font>-<a name="line-214"></a><font color=Blue>defaultdecl</font>  IMPLIED           <font color=Red>=</font> text <font color=Magenta>"#IMPLIED"</font>-<a name="line-215"></a><font color=Blue>defaultdecl</font> <font color=Cyan>(</font>DefaultTo a f<font color=Cyan>)</font>    <font color=Red>=</font> maybe <font color=Cyan>(</font>const <font color=Cyan>(</font>text <font color=Magenta>"#FIXED"</font><font color=Cyan>)</font><font color=Cyan>)</font> f <font color=Cyan>&lt;+&gt;</font> attvalue a-<a name="line-216"></a><a name="conditionalsect"></a><font color=Blue>conditionalsect</font> <font color=Cyan>(</font>IncludeSect i<font color=Cyan>)</font><font color=Red>=</font> text <font color=Magenta>"&lt;![INCLUDE ["</font> <font color=Cyan>&lt;+&gt;</font>-<a name="line-217"></a>                                 vcat <font color=Cyan>(</font>map extsubsetdecl i<font color=Cyan>)</font> <font color=Cyan>&lt;+&gt;</font> text <font color=Magenta>"]]&gt;"</font>-<a name="line-218"></a><font color=Blue>conditionalsect</font> <font color=Cyan>(</font>IgnoreSect i<font color=Cyan>)</font> <font color=Red>=</font> text <font color=Magenta>"&lt;![IGNORE ["</font> <font color=Cyan>&lt;+&gt;</font>-<a name="line-219"></a>                                 fsep <font color=Cyan>(</font>map ignoresectcontents i<font color=Cyan>)</font> <font color=Cyan>&lt;+&gt;</font> text <font color=Magenta>"]]&gt;"</font>-<a name="line-220"></a><a name="ignore"></a><font color=Blue>ignore</font> <font color=Cyan>(</font>Ignore<font color=Cyan>)</font>                <font color=Red>=</font> empty-<a name="line-221"></a><a name="ignoresectcontents"></a><font color=Blue>ignoresectcontents</font> <font color=Cyan>(</font>IgnoreSectContents i is<font color=Cyan>)</font>-<a name="line-222"></a>                               <font color=Red>=</font> ignore i <font color=Cyan>&lt;+&gt;</font> vcat <font color=Cyan>(</font>map internal is<font color=Cyan>)</font>-<a name="line-223"></a>                          <font color=Green><u>where</u></font> internal <font color=Cyan>(</font>ics<font color=Cyan>,</font>i<font color=Cyan>)</font> <font color=Red>=</font> text <font color=Magenta>"&lt;![["</font> <font color=Cyan>&lt;+&gt;</font>-<a name="line-224"></a>                                                   ignoresectcontents ics <font color=Cyan>&lt;+&gt;</font>-<a name="line-225"></a>                                                   text <font color=Magenta>"]]&gt;"</font> <font color=Cyan>&lt;+&gt;</font> ignore i-<a name="line-226"></a><a name="reference"></a><font color=Blue>reference</font> <font color=Red>::</font> Reference <font color=Red>-&gt;</font> Doc-<a name="line-227"></a><font color=Blue>reference</font> <font color=Cyan>(</font>RefEntity er<font color=Cyan>)</font>       <font color=Red>=</font> entityref er-<a name="line-228"></a><font color=Blue>reference</font> <font color=Cyan>(</font>RefChar cr<font color=Cyan>)</font>         <font color=Red>=</font> charref cr-<a name="line-229"></a><a name="entityref"></a><font color=Blue>entityref</font> <font color=Red>::</font> String <font color=Red>-&gt;</font> Doc-<a name="line-230"></a><font color=Blue>entityref</font> n                    <font color=Red>=</font> text <font color=Magenta>"&amp;"</font> <font color=Cyan>&lt;&gt;</font> text n <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>";"</font>-<a name="line-231"></a><a name="charref"></a><font color=Blue>charref</font> <font color=Red>::</font> <font color=Cyan>(</font>Show a<font color=Cyan>)</font> <font color=Red>=&gt;</font> a <font color=Red>-&gt;</font> Doc-<a name="line-232"></a><font color=Blue>charref</font> c                      <font color=Red>=</font> text <font color=Magenta>"&amp;#"</font> <font color=Cyan>&lt;&gt;</font> text <font color=Cyan>(</font>show c<font color=Cyan>)</font> <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>";"</font>-<a name="line-233"></a><a name="entitydecl"></a><font color=Blue>entitydecl</font> <font color=Red>::</font> EntityDecl <font color=Red>-&gt;</font> Doc-<a name="line-234"></a><font color=Blue>entitydecl</font> <font color=Cyan>(</font>EntityGEDecl d<font color=Cyan>)</font>    <font color=Red>=</font> gedecl d-<a name="line-235"></a><font color=Blue>entitydecl</font> <font color=Cyan>(</font>EntityPEDecl d<font color=Cyan>)</font>    <font color=Red>=</font> pedecl d-<a name="line-236"></a><a name="gedecl"></a><font color=Blue>gedecl</font> <font color=Red>::</font> GEDecl <font color=Red>-&gt;</font> Doc-<a name="line-237"></a><font color=Blue>gedecl</font> <font color=Cyan>(</font>GEDecl n ed<font color=Cyan>)</font>           <font color=Red>=</font> text <font color=Magenta>"&lt;!ENTITY"</font> <font color=Cyan>&lt;+&gt;</font> text n <font color=Cyan>&lt;+&gt;</font> entitydef ed <font color=Cyan>&lt;&gt;</font>-<a name="line-238"></a>                                 text <font color=Magenta>"&gt;"</font>-<a name="line-239"></a><a name="pedecl"></a><font color=Blue>pedecl</font> <font color=Red>::</font> PEDecl <font color=Red>-&gt;</font> Doc-<a name="line-240"></a><font color=Blue>pedecl</font> <font color=Cyan>(</font>PEDecl n pd<font color=Cyan>)</font>           <font color=Red>=</font> text <font color=Magenta>"&lt;!ENTITY %"</font> <font color=Cyan>&lt;+&gt;</font> text n <font color=Cyan>&lt;+&gt;</font> pedef pd <font color=Cyan>&lt;&gt;</font>-<a name="line-241"></a>                                 text <font color=Magenta>"&gt;"</font>-<a name="line-242"></a><a name="entitydef"></a><font color=Blue>entitydef</font> <font color=Red>::</font> EntityDef <font color=Red>-&gt;</font> Doc-<a name="line-243"></a><font color=Blue>entitydef</font> <font color=Cyan>(</font>DefEntityValue ew<font color=Cyan>)</font>  <font color=Red>=</font> entityvalue ew-<a name="line-244"></a><font color=Blue>entitydef</font> <font color=Cyan>(</font>DefExternalID i nd<font color=Cyan>)</font> <font color=Red>=</font> externalid i <font color=Cyan>&lt;+&gt;</font> maybe ndatadecl nd-<a name="line-245"></a><a name="pedef"></a><font color=Blue>pedef</font> <font color=Red>::</font> PEDef <font color=Red>-&gt;</font> Doc-<a name="line-246"></a><font color=Blue>pedef</font> <font color=Cyan>(</font>PEDefEntityValue ew<font color=Cyan>)</font>    <font color=Red>=</font> entityvalue ew-<a name="line-247"></a><font color=Blue>pedef</font> <font color=Cyan>(</font>PEDefExternalID eid<font color=Cyan>)</font>    <font color=Red>=</font> externalid eid-<a name="line-248"></a><a name="externalid"></a><font color=Blue>externalid</font> <font color=Red>::</font> ExternalID <font color=Red>-&gt;</font> Doc-<a name="line-249"></a><font color=Blue>externalid</font> <font color=Cyan>(</font>SYSTEM sl<font color=Cyan>)</font>         <font color=Red>=</font> text <font color=Magenta>"SYSTEM"</font> <font color=Cyan>&lt;+&gt;</font> systemliteral sl-<a name="line-250"></a><font color=Blue>externalid</font> <font color=Cyan>(</font>PUBLIC i sl<font color=Cyan>)</font>       <font color=Red>=</font> text <font color=Magenta>"PUBLIC"</font> <font color=Cyan>&lt;+&gt;</font> pubidliteral i <font color=Cyan>&lt;+&gt;</font>-<a name="line-251"></a>                                 systemliteral sl-<a name="line-252"></a><a name="ndatadecl"></a><font color=Blue>ndatadecl</font> <font color=Red>::</font> NDataDecl <font color=Red>-&gt;</font> Doc-<a name="line-253"></a><font color=Blue>ndatadecl</font> <font color=Cyan>(</font>NDATA n<font color=Cyan>)</font>            <font color=Red>=</font> text <font color=Magenta>"NDATA"</font> <font color=Cyan>&lt;+&gt;</font> text n-<a name="line-254"></a><a name="textdecl"></a><font color=Blue>textdecl</font> <font color=Cyan>(</font>TextDecl vi ed<font color=Cyan>)</font>      <font color=Red>=</font> text <font color=Magenta>"&lt;?xml"</font> <font color=Cyan>&lt;+&gt;</font> maybe text vi <font color=Cyan>&lt;+&gt;</font>-<a name="line-255"></a>                                 encodingdecl ed <font color=Cyan>&lt;+&gt;</font> text <font color=Magenta>"?&gt;"</font>-<a name="line-256"></a><a name="extparsedent"></a><font color=Blue>extparsedent</font> <font color=Cyan>(</font>ExtParsedEnt t c<font color=Cyan>)</font><font color=Red>=</font> maybe textdecl t <font color=Cyan>&lt;+&gt;</font> content c-<a name="line-257"></a><a name="extpe"></a><font color=Blue>extpe</font> <font color=Cyan>(</font>ExtPE t esd<font color=Cyan>)</font>            <font color=Red>=</font> maybe textdecl t <font color=Cyan>&lt;+&gt;</font>-<a name="line-258"></a>                                 vcat <font color=Cyan>(</font>map extsubsetdecl esd<font color=Cyan>)</font>-<a name="line-259"></a><a name="notationdecl"></a><font color=Blue>notationdecl</font> <font color=Red>::</font> NotationDecl <font color=Red>-&gt;</font> Doc-<a name="line-260"></a><font color=Blue>notationdecl</font> <font color=Cyan>(</font>NOTATION n e<font color=Cyan>)</font>    <font color=Red>=</font> text <font color=Magenta>"&lt;!NOTATION"</font> <font color=Cyan>&lt;+&gt;</font> text n <font color=Cyan>&lt;+&gt;</font>-<a name="line-261"></a>                                 either externalid publicid e <font color=Cyan>&lt;&gt;</font>-<a name="line-262"></a>                                 text <font color=Magenta>"&gt;"</font>-<a name="line-263"></a><a name="publicid"></a><font color=Blue>publicid</font> <font color=Red>::</font> PublicID <font color=Red>-&gt;</font> Doc-<a name="line-264"></a><font color=Blue>publicid</font> <font color=Cyan>(</font>PUBLICID p<font color=Cyan>)</font>          <font color=Red>=</font> text <font color=Magenta>"PUBLIC"</font> <font color=Cyan>&lt;+&gt;</font> pubidliteral p-<a name="line-265"></a><a name="encodingdecl"></a><font color=Blue>encodingdecl</font> <font color=Red>::</font> EncodingDecl <font color=Red>-&gt;</font> Doc-<a name="line-266"></a><font color=Blue>encodingdecl</font> <font color=Cyan>(</font>EncodingDecl s<font color=Cyan>)</font>  <font color=Red>=</font> text <font color=Magenta>"encoding='"</font> <font color=Cyan>&lt;&gt;</font> text s <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>"'"</font>-<a name="line-267"></a><a name="nmtoken"></a><font color=Blue>nmtoken</font> <font color=Red>::</font> String <font color=Red>-&gt;</font> Doc-<a name="line-268"></a><font color=Blue>nmtoken</font> s                      <font color=Red>=</font> text s-<a name="line-269"></a><a name="attvalue"></a><font color=Blue>attvalue</font> <font color=Red>::</font> AttValue <font color=Red>-&gt;</font> Doc-<a name="line-270"></a><font color=Blue>attvalue</font> <font color=Cyan>(</font>AttValue esr<font color=Cyan>)</font>        <font color=Red>=</font> text <font color=Magenta>"\""</font> <font color=Cyan>&lt;&gt;</font>-<a name="line-271"></a>                                 hcat <font color=Cyan>(</font>map <font color=Cyan>(</font>either text reference<font color=Cyan>)</font> esr<font color=Cyan>)</font> <font color=Cyan>&lt;&gt;</font>-<a name="line-272"></a>                                 text <font color=Magenta>"\""</font>-<a name="line-273"></a><a name="entityvalue"></a><font color=Blue>entityvalue</font> <font color=Red>::</font> EntityValue <font color=Red>-&gt;</font> Doc-<a name="line-274"></a><font color=Blue>entityvalue</font> <font color=Cyan>(</font>EntityValue evs<font color=Cyan>)</font>-<a name="line-275"></a>  <font color=Red>|</font> containsDoubleQuote evs    <font color=Red>=</font> text <font color=Magenta>"'"</font>  <font color=Cyan>&lt;&gt;</font> hcat <font color=Cyan>(</font>map ev evs<font color=Cyan>)</font> <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>"'"</font>-<a name="line-276"></a>  <font color=Red>|</font> otherwise                  <font color=Red>=</font> text <font color=Magenta>"\""</font> <font color=Cyan>&lt;&gt;</font> hcat <font color=Cyan>(</font>map ev evs<font color=Cyan>)</font> <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>"\""</font>-<a name="line-277"></a><a name="ev"></a><font color=Blue>ev</font> <font color=Red>::</font> EV <font color=Red>-&gt;</font> Doc-<a name="line-278"></a><font color=Blue>ev</font> <font color=Cyan>(</font>EVString s<font color=Cyan>)</font>                <font color=Red>=</font> text s-<a name="line-279"></a><font color=Blue>--ev (EVPERef p e)               = peref p</font>-<a name="line-280"></a><font color=Blue>ev</font> <font color=Cyan>(</font>EVRef r<font color=Cyan>)</font>                   <font color=Red>=</font> reference r-<a name="line-281"></a><a name="pubidliteral"></a><font color=Blue>pubidliteral</font> <font color=Red>::</font> PubidLiteral <font color=Red>-&gt;</font> Doc-<a name="line-282"></a><font color=Blue>pubidliteral</font> <font color=Cyan>(</font>PubidLiteral s<font color=Cyan>)</font>-<a name="line-283"></a>    <font color=Red>|</font> <font color=Magenta>'"'</font> <font color=Cyan>`elem`</font> s             <font color=Red>=</font> text <font color=Magenta>"'"</font> <font color=Cyan>&lt;&gt;</font> text s <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>"'"</font>-<a name="line-284"></a>    <font color=Red>|</font> otherwise                <font color=Red>=</font> text <font color=Magenta>"\""</font> <font color=Cyan>&lt;&gt;</font> text s <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>"\""</font>-<a name="line-285"></a><a name="systemliteral"></a><font color=Blue>systemliteral</font> <font color=Red>::</font> SystemLiteral <font color=Red>-&gt;</font> Doc-<a name="line-286"></a><font color=Blue>systemliteral</font> <font color=Cyan>(</font>SystemLiteral s<font color=Cyan>)</font>-<a name="line-287"></a>    <font color=Red>|</font> <font color=Magenta>'"'</font> <font color=Cyan>`elem`</font> s             <font color=Red>=</font> text <font color=Magenta>"'"</font> <font color=Cyan>&lt;&gt;</font> text s <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>"'"</font>-<a name="line-288"></a>    <font color=Red>|</font> otherwise                <font color=Red>=</font> text <font color=Magenta>"\""</font> <font color=Cyan>&lt;&gt;</font> text s <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>"\""</font>-<a name="line-289"></a><a name="chardata"></a><font color=Blue>chardata</font> <font color=Red>::</font> String <font color=Red>-&gt;</font> Doc-<a name="line-290"></a><font color=Blue>chardata</font> s                     <font color=Red>=</font> <font color=Blue>{-if all isSpace s then empty else-}</font> text s-<a name="line-291"></a><a name="cdsect"></a><font color=Blue>cdsect</font> <font color=Red>::</font> String <font color=Red>-&gt;</font> Doc-<a name="line-292"></a><font color=Blue>cdsect</font> c                       <font color=Red>=</font> text <font color=Magenta>"&lt;![CDATA["</font> <font color=Cyan>&lt;&gt;</font> chardata c <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>"]]&gt;"</font>-<a name="line-293"></a>-<a name="line-294"></a><a name="containsDoubleQuote"></a><font color=Blue>----</font>-<a name="line-295"></a><font color=Blue>containsDoubleQuote</font> <font color=Red>::</font> <font color=Red>[</font>EV<font color=Red>]</font> <font color=Red>-&gt;</font> Bool-<a name="line-296"></a><font color=Blue>containsDoubleQuote</font> evs <font color=Red>=</font> any csq evs-<a name="line-297"></a>    <font color=Green><u>where</u></font> csq <font color=Cyan>(</font>EVString s<font color=Cyan>)</font> <font color=Red>=</font> <font color=Magenta>'"'</font> <font color=Cyan>`elem`</font> s-<a name="line-298"></a>          csq <font color=Green><u>_</u></font>            <font color=Red>=</font> False-</pre>-</body>-</html>
− docs/HaXml/src/Text/XML/HaXml/SAX.html
@@ -1,103 +0,0 @@-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">-<html>-<head>-<!-- Generated by HsColour, http://www.cs.york.ac.uk/fp/darcs/hscolour/ -->-<title>src/Text/XML/HaXml/SAX.hs</title>-</head>-<body>-<pre><a name="line-1"></a><font color=Blue>-- | A streaming XML parser, using a method known as SAX. SAX isn't really a</font>-<a name="line-2"></a><font color=Blue>--   standard, but an implementation, so it's just an \"SAX-like\" parser.</font>-<a name="line-3"></a><font color=Blue>--   This module allows you parse an XML document without having to evaluate</font>-<a name="line-4"></a><font color=Blue>--   it as a whole. This is needed for protocols like jabber, which use xml</font>-<a name="line-5"></a><font color=Blue>--   streams for communication.</font>-<a name="line-6"></a>-<a name="line-7"></a><font color=Green><u>module</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>SAX-<a name="line-8"></a>	<font color=Cyan>(</font> SaxElement<font color=Cyan>(</font><font color=Red>..</font><font color=Cyan>)</font>-<a name="line-9"></a>	<font color=Cyan>,</font> saxParse-<a name="line-10"></a>	<font color=Cyan>)</font> <font color=Green><u>where</u></font>-<a name="line-11"></a>-<a name="line-12"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Types-<a name="line-13"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Parse-<a name="line-14"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Lex-<a name="line-15"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>ParserCombinators<font color=Cyan>.</font>Poly<font color=Cyan>.</font>State-<a name="line-16"></a>-<a name="line-17"></a><a name="SaxElement"></a><font color=Green><u>data</u></font> SaxElement-<a name="line-18"></a>	<font color=Red>=</font> SaxDocTypeDecl DocTypeDecl-<a name="line-19"></a>		<font color=Blue>-- ^ A doctype declaration occured(\&lt;!DOCTYPE\&gt;)</font>-<a name="line-20"></a>	<font color=Red>|</font> SaxProcessingInstruction ProcessingInstruction-<a name="line-21"></a>		<font color=Blue>-- ^ A processing instruction occured (\&lt;??\&gt;)</font>-<a name="line-22"></a>	<font color=Red>|</font> SaxComment String		<font color=Blue>-- ^ A comment occured (\&lt;!-- --\&gt;)</font>-<a name="line-23"></a>	<font color=Red>|</font> SaxElementOpen Name <font color=Red>[</font>Attribute<font color=Red>]</font> <font color=Blue>-- ^ An element was opened (\&lt;\&gt;)</font>-<a name="line-24"></a>	<font color=Red>|</font> SaxElementClose Name		<font color=Blue>-- ^ An element was closed (\&lt;\/\&gt;)</font>-<a name="line-25"></a>	<font color=Red>|</font> SaxElementTag Name <font color=Red>[</font>Attribute<font color=Red>]</font>-<a name="line-26"></a>		<font color=Blue>-- ^ An element without content occured (\&lt;\/\&gt;)</font>-<a name="line-27"></a>	<font color=Red>|</font> SaxCharData CharData		<font color=Blue>-- ^ Some string data occured</font>-<a name="line-28"></a>	<font color=Red>|</font> SaxReference Reference	<font color=Blue>-- ^ A reference occured</font>-<a name="line-29"></a>-<a name="line-30"></a><a name="saxParse"></a><font color=Blue>-- | @saxParse file content@ takes a filename and the string content of that</font>-<a name="line-31"></a><font color=Blue>--   file and generates a stream of @SaxElement@s. If an error occurs, the</font>-<a name="line-32"></a><font color=Blue>--   parsing stops and a string is returned using the @Maybe@ type.</font>-<a name="line-33"></a><font color=Blue>saxParse</font> <font color=Red>::</font> String <font color=Blue>-- ^ The filename</font>-<a name="line-34"></a>	 <font color=Red>-&gt;</font> String <font color=Blue>-- ^ The content of the file</font>-<a name="line-35"></a>	 <font color=Red>-&gt;</font> <font color=Cyan>(</font><font color=Red>[</font>SaxElement<font color=Red>]</font><font color=Cyan>,</font>Maybe String<font color=Cyan>)</font>-<a name="line-36"></a>		<font color=Blue>-- ^ A tuple of the parsed elements and @Nothing@, if no</font>-<a name="line-37"></a>		<font color=Blue>--   error occured, or @Just@ @String@ if an error occured.</font>-<a name="line-38"></a><font color=Blue>saxParse</font> file cntnt <font color=Red>=</font> parseStream sax emptySTs-<a name="line-39"></a>                                    <font color=Cyan>(</font>xmlLex file cntnt<font color=Cyan>)</font>-<a name="line-40"></a>-<a name="line-41"></a><a name="parseStream"></a><font color=Blue>parseStream</font> <font color=Red>::</font> Parser s t a <font color=Red>-&gt;</font> s <font color=Red>-&gt;</font> <font color=Red>[</font>t<font color=Red>]</font> <font color=Red>-&gt;</font> <font color=Cyan>(</font><font color=Red>[</font>a<font color=Red>]</font><font color=Cyan>,</font> Maybe String<font color=Cyan>)</font>-<a name="line-42"></a><font color=Blue>parseStream</font> <font color=Green><u>_</u></font> <font color=Green><u>_</u></font> [] <font color=Red>=</font> <font color=Cyan>(</font>[]<font color=Cyan>,</font>Nothing<font color=Cyan>)</font>-<a name="line-43"></a><font color=Blue>parseStream</font> p state toks <font color=Red>=</font> <font color=Green><u>case</u></font> runParser p state toks <font color=Green><u>of</u></font>-<a name="line-44"></a>	<font color=Cyan>(</font>Left err<font color=Cyan>,</font> <font color=Green><u>_</u></font><font color=Cyan>,</font> <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red>-&gt;</font> <font color=Cyan>(</font>[]<font color=Cyan>,</font>Just err<font color=Cyan>)</font>-<a name="line-45"></a>	<font color=Cyan>(</font>Right res<font color=Cyan>,</font> nstate<font color=Cyan>,</font> rest<font color=Cyan>)</font> <font color=Red>-&gt;</font> <font color=Cyan>(</font>res<font color=Red><b>:</b></font>moreres<font color=Cyan>,</font> err<font color=Cyan>)</font>-<a name="line-46"></a>            <font color=Green><u>where</u></font> <font color=Cyan>(</font>moreres<font color=Cyan>,</font>err<font color=Cyan>)</font> <font color=Red>=</font> parseStream p nstate rest-<a name="line-47"></a>-<a name="line-48"></a><a name="sax"></a><font color=Blue>sax</font> <font color=Red>::</font> XParser SaxElement-<a name="line-49"></a><font color=Blue>sax</font> <font color=Red>=</font> oneOf <font color=Red>[</font> saxelementopen-<a name="line-50"></a>            <font color=Cyan>,</font> saxelementclose-<a name="line-51"></a>            <font color=Cyan>,</font> saxprocessinginstruction-<a name="line-52"></a>            <font color=Cyan>,</font> saxcomment-<a name="line-53"></a>            <font color=Cyan>,</font> saxdoctypedecl-<a name="line-54"></a>            <font color=Cyan>,</font> saxreference-<a name="line-55"></a>            <font color=Cyan>,</font> saxchardata-<a name="line-56"></a>            <font color=Red>]</font>-<a name="line-57"></a>	<font color=Cyan>`adjustErr`</font> <font color=Cyan>(</font><font color=Cyan>++</font><font color=Cyan>(</font><font color=Magenta>"\nLooking for a SAX event:\n"</font>-<a name="line-58"></a>               <font color=Cyan>++</font><font color=Magenta>"  elem-open, elem-close, PI, comment, DTD, ref, or chardata"</font><font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-59"></a>-<a name="line-60"></a><a name="saxelementopen"></a><font color=Blue>saxelementopen</font> <font color=Red>::</font> XParser SaxElement-<a name="line-61"></a><font color=Blue>saxelementopen</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-62"></a>	tok TokAnyOpen-<a name="line-63"></a>	<font color=Cyan>(</font>ElemTag n <font color=Green><u>as</u></font><font color=Cyan>)</font> <font color=Red>&lt;-</font> elemtag-<a name="line-64"></a>	<font color=Cyan>(</font><font color=Cyan>(</font> <font color=Green><u>do</u></font> tok TokEndClose-<a name="line-65"></a>	      return <font color=Cyan>(</font>SaxElementTag n <font color=Green><u>as</u></font><font color=Cyan>)</font><font color=Cyan>)</font> <font color=Cyan>`onFail`</font>-<a name="line-66"></a>	 <font color=Cyan>(</font> <font color=Green><u>do</u></font> tok TokAnyClose-<a name="line-67"></a>	      return <font color=Cyan>(</font>SaxElementOpen n <font color=Green><u>as</u></font><font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-68"></a>	 <font color=Cyan>`onFail`</font> fail <font color=Magenta>"missing &gt; or /&gt; in element tag"</font><font color=Cyan>)</font>-<a name="line-69"></a>-<a name="line-70"></a><a name="saxelementclose"></a><font color=Blue>saxelementclose</font> <font color=Red>::</font> XParser SaxElement-<a name="line-71"></a><font color=Blue>saxelementclose</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-72"></a>	tok TokEndOpen-<a name="line-73"></a>	n <font color=Red>&lt;-</font> name-<a name="line-74"></a>	tok TokAnyClose-<a name="line-75"></a>	return <font color=Cyan>(</font>SaxElementClose n<font color=Cyan>)</font>-<a name="line-76"></a>-<a name="line-77"></a><a name="saxcomment"></a><font color=Blue>saxcomment</font> <font color=Red>::</font> XParser SaxElement-<a name="line-78"></a><font color=Blue>saxcomment</font> <font color=Red>=</font> comment <font color=Cyan>&gt;&gt;=</font> return <font color=Cyan>.</font> SaxComment-<a name="line-79"></a>-<a name="line-80"></a><a name="saxchardata"></a><font color=Blue>saxchardata</font> <font color=Red>::</font> XParser SaxElement-<a name="line-81"></a><font color=Blue>saxchardata</font> <font color=Red>=</font>-<a name="line-82"></a>  <font color=Cyan>(</font>cdsect <font color=Cyan>&gt;&gt;=</font> return <font color=Cyan>.</font> SaxCharData<font color=Cyan>)</font>-<a name="line-83"></a>  <font color=Cyan>`onFail`</font>-<a name="line-84"></a>  <font color=Cyan>(</font>chardata <font color=Cyan>&gt;&gt;=</font> return <font color=Cyan>.</font> SaxCharData<font color=Cyan>)</font>-<a name="line-85"></a>-<a name="line-86"></a><a name="saxreference"></a><font color=Blue>saxreference</font> <font color=Red>::</font> XParser SaxElement-<a name="line-87"></a><font color=Blue>saxreference</font> <font color=Red>=</font> reference <font color=Cyan>&gt;&gt;=</font> return <font color=Cyan>.</font> SaxReference-<a name="line-88"></a>-<a name="line-89"></a><a name="saxdoctypedecl"></a><font color=Blue>saxdoctypedecl</font> <font color=Red>::</font> XParser SaxElement-<a name="line-90"></a><font color=Blue>saxdoctypedecl</font> <font color=Red>=</font> doctypedecl <font color=Cyan>&gt;&gt;=</font> return <font color=Cyan>.</font> SaxDocTypeDecl-<a name="line-91"></a>-<a name="line-92"></a><a name="saxprocessinginstruction"></a><font color=Blue>saxprocessinginstruction</font> <font color=Red>::</font> XParser SaxElement-<a name="line-93"></a><font color=Blue>saxprocessinginstruction</font> <font color=Red>=</font> fmap SaxProcessingInstruction processinginstruction-</pre>-</body>-</html>
− docs/HaXml/src/Text/XML/HaXml/ShowXmlLazy.html
@@ -1,337 +0,0 @@-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">-<html>-<head>-<!-- Generated by HsColour, http://www.cs.york.ac.uk/fp/darcs/hscolour/ -->-<title>src/Text/XML/HaXml/ShowXmlLazy.hs</title>-</head>-<body>-<pre><a name="line-1"></a><font color=Green><u>module</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>ShowXmlLazy <font color=Cyan>(</font>showXmlLazy<font color=Cyan>)</font> <font color=Green><u>where</u></font>-<a name="line-2"></a>-<a name="line-3"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Types-<a name="line-4"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>TypeMapping <font color=Blue>-- (toHType, toDTD, Tuple(), Defined, showHType)</font>-<a name="line-5"></a>-<a name="line-6"></a><font color=Green><u>import</u></font> <font color=Green><u>qualified</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>XmlContent <font color=Green><u>as</u></font> X-<a name="line-7"></a><font color=Green><u>import</u></font> Prelude hiding <font color=Cyan>(</font>maybe<font color=Cyan>,</font>either<font color=Cyan>)</font>-<a name="line-8"></a><font color=Green><u>import</u></font> Maybe hiding <font color=Cyan>(</font>maybe<font color=Cyan>)</font>-<a name="line-9"></a><font color=Green><u>import</u></font> Data<font color=Cyan>.</font>List-<a name="line-10"></a>-<a name="line-11"></a><a name="showXmlLazy"></a><font color=Blue>-- | Convert a fully-typed XML document to a string (without DTD).</font>-<a name="line-12"></a><font color=Blue>showXmlLazy</font> <font color=Red>::</font> X<font color=Cyan>.</font>XmlContent a <font color=Red>=&gt;</font> Bool <font color=Red>-&gt;</font> a <font color=Red>-&gt;</font> String-<a name="line-13"></a><font color=Blue>showXmlLazy</font> dtd x <font color=Red>=</font>-<a name="line-14"></a>    <font color=Green><u>case</u></font> X<font color=Cyan>.</font>toContents x <font color=Green><u>of</u></font>-<a name="line-15"></a>      <font color=Red>[</font>CElem <font color=Green><u>_</u></font> <font color=Green><u>_</u></font><font color=Red>]</font> <font color=Red>-&gt;</font> document <font color=Cyan>$</font> toXmlLazy dtd x-<a name="line-16"></a>      <font color=Green><u>_</u></font> <font color=Red>-&gt;</font> <font color=Magenta>""</font>-<a name="line-17"></a>-<a name="line-18"></a>-<a name="line-19"></a><a name="toXmlLazy"></a><font color=Blue>-- | Convert a fully-typed XML document to a string (with or without DTD).</font>-<a name="line-20"></a><font color=Blue>toXmlLazy</font> <font color=Red>::</font> X<font color=Cyan>.</font>XmlContent a <font color=Red>=&gt;</font> Bool <font color=Red>-&gt;</font> a <font color=Red>-&gt;</font> Document ()-<a name="line-21"></a><font color=Blue>toXmlLazy</font> dtd value <font color=Red>=</font>-<a name="line-22"></a>    <font color=Green><u>let</u></font> ht <font color=Red>=</font> toHType value <font color=Green><u>in</u></font>-<a name="line-23"></a>    Document <font color=Cyan>(</font>Prolog <font color=Cyan>(</font>Just <font color=Cyan>(</font>XMLDecl <font color=Magenta>"1.0"</font> Nothing Nothing<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-24"></a>                     [] <font color=Cyan>(</font><font color=Green><u>if</u></font> dtd <font color=Green><u>then</u></font> Just <font color=Cyan>(</font>toDTD ht<font color=Cyan>)</font> <font color=Green><u>else</u></font> Nothing<font color=Cyan>)</font> []<font color=Cyan>)</font>-<a name="line-25"></a>             emptyST-<a name="line-26"></a>             <font color=Cyan>(</font> <font color=Green><u>case</u></font> <font color=Cyan>(</font>ht<font color=Cyan>,</font> X<font color=Cyan>.</font>toContents value<font color=Cyan>)</font> <font color=Green><u>of</u></font>-<a name="line-27"></a>                 <font color=Cyan>(</font>Tuple <font color=Green><u>_</u></font><font color=Cyan>,</font> cs<font color=Cyan>)</font>       <font color=Red>-&gt;</font> Elem <font color=Cyan>(</font>showHType ht <font color=Magenta>""</font><font color=Cyan>)</font> [] cs-<a name="line-28"></a>                 <font color=Cyan>(</font>Defined <font color=Green><u>_</u></font> <font color=Green><u>_</u></font> <font color=Green><u>_</u></font><font color=Cyan>,</font> cs<font color=Cyan>)</font> <font color=Red>-&gt;</font> Elem <font color=Cyan>(</font>showHType ht <font color=Magenta>"-XML"</font><font color=Cyan>)</font> [] cs-<a name="line-29"></a>                 <font color=Cyan>(</font><font color=Green><u>_</u></font><font color=Cyan>,</font> <font color=Red>[</font>CElem e ()<font color=Red>]</font><font color=Cyan>)</font>   <font color=Red>-&gt;</font> e <font color=Cyan>)</font>-<a name="line-30"></a>             []-<a name="line-31"></a>-<a name="line-32"></a>-<a name="line-33"></a>-<a name="line-34"></a>-<a name="line-35"></a><a name="Doc"></a><font color=Green><u>type</u></font> Doc <font color=Red>=</font> String-<a name="line-36"></a><a name="empty"></a><font color=Blue>empty</font> <font color=Red>::</font> <font color=Red>[</font>Char<font color=Red>]</font>-<a name="line-37"></a><font color=Blue>empty</font> <font color=Red>=</font> <font color=Magenta>""</font>-<a name="line-38"></a><a name="$$"></a><font color=Cyan>(</font><font color=Cyan>$$</font><font color=Cyan>)</font> <font color=Red>::</font> <font color=Red>[</font>Char<font color=Red>]</font> <font color=Red>-&gt;</font> <font color=Red>[</font>Char<font color=Red>]</font> <font color=Red>-&gt;</font> <font color=Red>[</font>Char<font color=Red>]</font>-<a name="line-39"></a><font color=Cyan>(</font><font color=Cyan>$$</font><font color=Cyan>)</font> a b <font color=Red>=</font> a <font color=Cyan>++</font> <font color=Magenta>"\n"</font> <font color=Cyan>++</font> b-<a name="line-40"></a><a name="vcat"></a><font color=Blue>vcat</font> <font color=Red>::</font> <font color=Red>[</font><font color=Red>[</font>Char<font color=Red>]</font><font color=Red>]</font> <font color=Red>-&gt;</font> <font color=Red>[</font>Char<font color=Red>]</font>-<a name="line-41"></a><font color=Blue>vcat</font> a <font color=Red>=</font> foldr <font color=Cyan>(</font><font color=Cyan>$$</font><font color=Cyan>)</font> [] a-<a name="line-42"></a><a name="hcat"></a><font color=Blue>hcat</font> <font color=Red>::</font> <font color=Red>[</font><font color=Red>[</font>a<font color=Red>]</font><font color=Red>]</font> <font color=Red>-&gt;</font> <font color=Red>[</font>a<font color=Red>]</font>-<a name="line-43"></a><font color=Blue>hcat</font> <font color=Red>=</font> concat-<a name="line-44"></a><a name="<>"></a><font color=Cyan>(</font><font color=Cyan>&lt;&gt;</font><font color=Cyan>)</font> <font color=Red>::</font> <font color=Red>[</font>a<font color=Red>]</font> <font color=Red>-&gt;</font> <font color=Red>[</font>a<font color=Red>]</font> <font color=Red>-&gt;</font> <font color=Red>[</font>a<font color=Red>]</font>-<a name="line-45"></a><font color=Cyan>(</font><font color=Cyan>&lt;&gt;</font><font color=Cyan>)</font> <font color=Red>=</font> <font color=Cyan>(</font><font color=Cyan>++</font><font color=Cyan>)</font>-<a name="line-46"></a><a name="<+>"></a><font color=Cyan>(</font><font color=Cyan>&lt;+&gt;</font><font color=Cyan>)</font> <font color=Red>::</font> <font color=Red>[</font>Char<font color=Red>]</font> <font color=Red>-&gt;</font> <font color=Red>[</font>Char<font color=Red>]</font> <font color=Red>-&gt;</font> <font color=Red>[</font>Char<font color=Red>]</font>-<a name="line-47"></a><font color=Cyan>(</font><font color=Cyan>&lt;+&gt;</font><font color=Cyan>)</font> a b <font color=Red>=</font> a <font color=Cyan>++</font> <font color=Magenta>" "</font> <font color=Cyan>++</font> b-<a name="line-48"></a><a name="fsep"></a><font color=Blue>fsep</font> <font color=Red>::</font> <font color=Red>[</font><font color=Red>[</font>Char<font color=Red>]</font><font color=Red>]</font> <font color=Red>-&gt;</font> <font color=Red>[</font>Char<font color=Red>]</font>-<a name="line-49"></a><font color=Blue>fsep</font> <font color=Red>=</font> vcat-<a name="line-50"></a><a name="text"></a><font color=Blue>text</font> <font color=Red>::</font> t <font color=Red>-&gt;</font> t-<a name="line-51"></a><font color=Blue>text</font> string <font color=Red>=</font> string-<a name="line-52"></a><a name="parens"></a><font color=Blue>parens</font> <font color=Red>::</font> <font color=Red>[</font>Char<font color=Red>]</font> <font color=Red>-&gt;</font> <font color=Red>[</font>Char<font color=Red>]</font>-<a name="line-53"></a><font color=Blue>parens</font> string <font color=Red>=</font> <font color=Magenta>"("</font><font color=Cyan>++</font>string<font color=Cyan>++</font><font color=Magenta>")"</font>-<a name="line-54"></a><a name="nest"></a><font color=Blue>nest</font> <font color=Red>::</font> t <font color=Red>-&gt;</font> t1 <font color=Red>-&gt;</font> t1-<a name="line-55"></a><font color=Blue>nest</font> <font color=Green><u>_</u></font> string <font color=Red>=</font> string-<a name="line-56"></a>-<a name="line-57"></a>-<a name="line-58"></a>-<a name="line-59"></a><a name="either"></a><font color=Blue>either</font> <font color=Red>::</font> <font color=Cyan>(</font>t <font color=Red>-&gt;</font> t1<font color=Cyan>)</font> <font color=Red>-&gt;</font> <font color=Cyan>(</font>t2 <font color=Red>-&gt;</font> t1<font color=Cyan>)</font> <font color=Red>-&gt;</font> Either t t2 <font color=Red>-&gt;</font> t1-<a name="line-60"></a><font color=Blue>either</font> f <font color=Green><u>_</u></font> <font color=Cyan>(</font>Left x<font color=Cyan>)</font>  <font color=Red>=</font> f x-<a name="line-61"></a><font color=Blue>either</font> <font color=Green><u>_</u></font> g <font color=Cyan>(</font>Right x<font color=Cyan>)</font> <font color=Red>=</font> g x-<a name="line-62"></a>-<a name="line-63"></a><a name="maybe"></a><font color=Blue>maybe</font> <font color=Red>::</font> <font color=Cyan>(</font>t <font color=Red>-&gt;</font> <font color=Red>[</font>Char<font color=Red>]</font><font color=Cyan>)</font> <font color=Red>-&gt;</font> Maybe t <font color=Red>-&gt;</font> <font color=Red>[</font>Char<font color=Red>]</font>-<a name="line-64"></a><font color=Blue>maybe</font> <font color=Green><u>_</u></font> Nothing  <font color=Red>=</font> empty-<a name="line-65"></a><font color=Blue>maybe</font> f <font color=Cyan>(</font>Just x<font color=Cyan>)</font> <font color=Red>=</font> f x-<a name="line-66"></a>-<a name="line-67"></a><font color=Blue>--peref p   = text "%" &lt;&gt; text p &lt;&gt; text ";"</font>-<a name="line-68"></a>-<a name="line-69"></a><font color=Blue>----</font>-<a name="line-70"></a>-<a name="line-71"></a><a name="document"></a><font color=Blue>document</font> <font color=Red>::</font> Document i <font color=Red>-&gt;</font> Doc-<a name="line-72"></a><a name="prolog"></a><font color=Blue>prolog</font>   <font color=Red>::</font> Prolog <font color=Red>-&gt;</font> Doc-<a name="line-73"></a><a name="xmldecl"></a><font color=Blue>xmldecl</font>  <font color=Red>::</font> XMLDecl <font color=Red>-&gt;</font> Doc-<a name="line-74"></a><a name="misc"></a><font color=Blue>misc</font>     <font color=Red>::</font> Misc <font color=Red>-&gt;</font> Doc-<a name="line-75"></a><a name="sddecl"></a><font color=Blue>sddecl</font>   <font color=Red>::</font> Bool <font color=Red>-&gt;</font> Doc-<a name="line-76"></a>-<a name="line-77"></a><a name="doctypedecl"></a><font color=Blue>doctypedecl</font> <font color=Red>::</font> DocTypeDecl <font color=Red>-&gt;</font> Doc-<a name="line-78"></a><a name="markupdecl"></a><font color=Blue>markupdecl</font>  <font color=Red>::</font> MarkupDecl <font color=Red>-&gt;</font> Doc-<a name="line-79"></a><a name="cp"></a><font color=Blue>-- extsubset   :: ExtSubset -&gt; Doc</font>-<a name="line-80"></a><font color=Blue>-- extsubsetdecl :: ExtSubsetDecl -&gt; Doc</font>-<a name="line-81"></a><font color=Blue>cp</font>          <font color=Red>::</font> CP <font color=Red>-&gt;</font> Doc-<a name="line-82"></a>-<a name="line-83"></a><a name="element"></a><font color=Blue>element</font>   <font color=Red>::</font> Element i <font color=Red>-&gt;</font> Doc-<a name="line-84"></a><a name="attribute"></a><font color=Blue>attribute</font> <font color=Red>::</font> Attribute <font color=Red>-&gt;</font> Doc                     <font color=Cyan>--etc</font>-<a name="line-85"></a><a name="content"></a><font color=Blue>content</font>   <font color=Red>::</font> Content i <font color=Red>-&gt;</font> Doc-<a name="line-86"></a>-<a name="line-87"></a><font color=Blue>----</font>-<a name="line-88"></a>-<a name="line-89"></a><font color=Blue>document</font> <font color=Cyan>(</font>Document p <font color=Green><u>_</u></font> e m<font color=Cyan>)</font><font color=Red>=</font> prolog p <font color=Cyan>$$</font> element e <font color=Cyan>$$</font> vcat <font color=Cyan>(</font>map misc m<font color=Cyan>)</font>-<a name="line-90"></a><font color=Blue>prolog</font> <font color=Cyan>(</font>Prolog x m1 dtd m2<font color=Cyan>)</font><font color=Red>=</font> maybe xmldecl x <font color=Cyan>$$</font>-<a name="line-91"></a>                             vcat <font color=Cyan>(</font>map misc m1<font color=Cyan>)</font> <font color=Cyan>$$</font>-<a name="line-92"></a>                             maybe doctypedecl dtd <font color=Cyan>$$</font>-<a name="line-93"></a>                             vcat <font color=Cyan>(</font>map misc m2<font color=Cyan>)</font>-<a name="line-94"></a><font color=Blue>xmldecl</font> <font color=Cyan>(</font>XMLDecl v e sd<font color=Cyan>)</font>   <font color=Red>=</font> text <font color=Magenta>"&lt;?xml version='"</font> <font color=Cyan>&lt;&gt;</font> text v <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>"'"</font> <font color=Cyan>&lt;+&gt;</font>-<a name="line-95"></a>                             maybe encodingdecl e <font color=Cyan>&lt;+&gt;</font>-<a name="line-96"></a>                             maybe sddecl sd <font color=Cyan>&lt;+&gt;</font>-<a name="line-97"></a>                             text <font color=Magenta>"?&gt;"</font>-<a name="line-98"></a><font color=Blue>misc</font> <font color=Cyan>(</font>Comment s<font color=Cyan>)</font>           <font color=Red>=</font> text <font color=Magenta>"&lt;!--"</font> <font color=Cyan>&lt;+&gt;</font> text s <font color=Cyan>&lt;+&gt;</font> text <font color=Magenta>"--&gt;"</font>-<a name="line-99"></a><font color=Blue>misc</font> <font color=Cyan>(</font>PI <font color=Cyan>(</font>n<font color=Cyan>,</font>s<font color=Cyan>)</font><font color=Cyan>)</font>            <font color=Red>=</font> text <font color=Magenta>"&lt;?"</font> <font color=Cyan>&lt;&gt;</font> text n <font color=Cyan>&lt;+&gt;</font> text s <font color=Cyan>&lt;+&gt;</font> text <font color=Magenta>"?&gt;"</font>-<a name="line-100"></a><font color=Blue>sddecl</font> sd   <font color=Red>|</font> sd           <font color=Red>=</font> text <font color=Magenta>"standalone='yes'"</font>-<a name="line-101"></a>            <font color=Red>|</font> otherwise    <font color=Red>=</font> text <font color=Magenta>"standalone='no'"</font>-<a name="line-102"></a><font color=Blue>doctypedecl</font> <font color=Cyan>(</font>DTD n eid ds<font color=Cyan>)</font> <font color=Red>=</font> <font color=Green><u>if</u></font> null ds <font color=Green><u>then</u></font>-<a name="line-103"></a>                                  hd <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>"&gt;"</font>-<a name="line-104"></a>                             <font color=Green><u>else</u></font> hd <font color=Cyan>&lt;+&gt;</font> text <font color=Magenta>" ["</font> <font color=Cyan>$$</font>-<a name="line-105"></a>                                  vcat <font color=Cyan>(</font>map markupdecl ds<font color=Cyan>)</font> <font color=Cyan>$$</font> text <font color=Magenta>"]&gt;"</font>-<a name="line-106"></a>                           <font color=Green><u>where</u></font> hd <font color=Red>=</font> text <font color=Magenta>"&lt;!DOCTYPE"</font> <font color=Cyan>&lt;+&gt;</font> text n <font color=Cyan>&lt;+&gt;</font>-<a name="line-107"></a>                                      maybe externalid eid-<a name="line-108"></a><font color=Blue>markupdecl</font> <font color=Cyan>(</font>Element e<font color=Cyan>)</font>     <font color=Red>=</font> elementdecl e-<a name="line-109"></a><font color=Blue>markupdecl</font> <font color=Cyan>(</font>AttList a<font color=Cyan>)</font>     <font color=Red>=</font> attlistdecl a-<a name="line-110"></a><font color=Blue>markupdecl</font> <font color=Cyan>(</font>Entity e<font color=Cyan>)</font>      <font color=Red>=</font> entitydecl e-<a name="line-111"></a><font color=Blue>markupdecl</font> <font color=Cyan>(</font>Notation n<font color=Cyan>)</font>    <font color=Red>=</font> notationdecl n-<a name="line-112"></a><font color=Blue>markupdecl</font> <font color=Cyan>(</font>MarkupMisc m<font color=Cyan>)</font>  <font color=Red>=</font> misc m-<a name="line-113"></a><font color=Blue>--markupdecl (MarkupPE p m)  = peref p</font>-<a name="line-114"></a><font color=Blue>-- _ (ExtSubset t ds) = maybe textdecl t $$</font>-<a name="line-115"></a><font color=Blue>--                              vcat (map extsubsetdecl ds)</font>-<a name="line-116"></a><font color=Blue>-- _ (ExtMarkupDecl m)      = markupdecl m</font>-<a name="line-117"></a><font color=Blue>-- extsubsetdecl (ExtConditionalSect c) = conditionalsect c</font>-<a name="line-118"></a><font color=Blue>--extsubsetdecl (ExtPEReference p e)   = peref p</font>-<a name="line-119"></a>-<a name="line-120"></a><font color=Blue>element</font> <font color=Cyan>(</font>Elem n <font color=Green><u>as</u></font> []<font color=Cyan>)</font> <font color=Red>=</font> text <font color=Magenta>"&lt;"</font> <font color=Cyan>&lt;&gt;</font> text n <font color=Cyan>&lt;+&gt;</font>-<a name="line-121"></a>                         fsep <font color=Cyan>(</font>map attribute <font color=Green><u>as</u></font><font color=Cyan>)</font> <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>"/&gt;"</font>-<a name="line-122"></a><font color=Blue>element</font> e<font color=Red>@</font><font color=Cyan>(</font>Elem n <font color=Green><u>as</u></font> cs<font color=Cyan>)</font>-<a name="line-123"></a><font color=Blue>--  | any isText cs    = text "&lt;" &lt;&gt; text n &lt;+&gt; fsep (map attribute as) &lt;&gt;</font>-<a name="line-124"></a><font color=Blue>--                       text "&gt;" &lt;&gt; hcat (map content cs) &lt;&gt;</font>-<a name="line-125"></a><font color=Blue>--                       text "&lt;/" &lt;&gt; text n &lt;&gt; text "&gt;"</font>-<a name="line-126"></a>    <font color=Red>|</font> isText <font color=Cyan>(</font>head cs<font color=Cyan>)</font> <font color=Red>=</font> text <font color=Magenta>"&lt;"</font> <font color=Cyan>&lt;&gt;</font> text n <font color=Cyan>&lt;+&gt;</font> fsep <font color=Cyan>(</font>map attribute <font color=Green><u>as</u></font><font color=Cyan>)</font> <font color=Cyan>&lt;&gt;</font>-<a name="line-127"></a>                         text <font color=Magenta>"&gt;"</font> <font color=Cyan>&lt;&gt;</font> hcat <font color=Cyan>(</font>map content cs<font color=Cyan>)</font> <font color=Cyan>&lt;&gt;</font>-<a name="line-128"></a>                         text <font color=Magenta>"&lt;/"</font> <font color=Cyan>&lt;&gt;</font> text n <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>"&gt;"</font>-<a name="line-129"></a>    <font color=Red>|</font> otherwise        <font color=Red>=</font> <font color=Green><u>let</u></font> <font color=Cyan>(</font>d<font color=Cyan>,</font>c<font color=Cyan>)</font> <font color=Red>=</font> carryelem e empty-<a name="line-130"></a>                         <font color=Green><u>in</u></font> d <font color=Cyan>&lt;&gt;</font> c-<a name="line-131"></a>-<a name="line-132"></a><a name="isText"></a><font color=Blue>isText</font> <font color=Red>::</font> Content t <font color=Red>-&gt;</font> Bool-<a name="line-133"></a><font color=Blue>isText</font> <font color=Cyan>(</font>CString <font color=Green><u>_</u></font> <font color=Green><u>_</u></font> <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red>=</font> True-<a name="line-134"></a><font color=Blue>isText</font> <font color=Cyan>(</font>CRef <font color=Green><u>_</u></font> <font color=Green><u>_</u></font><font color=Cyan>)</font>      <font color=Red>=</font> True-<a name="line-135"></a><font color=Blue>isText</font> <font color=Green><u>_</u></font>               <font color=Red>=</font> False-<a name="line-136"></a>-<a name="line-137"></a><a name="carryelem"></a><font color=Blue>carryelem</font> <font color=Cyan>(</font>Elem n <font color=Green><u>as</u></font> []<font color=Cyan>)</font> c-<a name="line-138"></a>                       <font color=Red>=</font> <font color=Cyan>(</font> c <font color=Cyan>&lt;&gt;</font>-<a name="line-139"></a>                           text <font color=Magenta>"&lt;"</font> <font color=Cyan>&lt;&gt;</font> text n <font color=Cyan>&lt;+&gt;</font> fsep <font color=Cyan>(</font>map attribute <font color=Green><u>as</u></font><font color=Cyan>)</font>-<a name="line-140"></a>                         <font color=Cyan>,</font> text <font color=Magenta>"/&gt;"</font><font color=Cyan>)</font>-<a name="line-141"></a><font color=Blue>carryelem</font> <font color=Cyan>(</font>Elem n <font color=Green><u>as</u></font> cs<font color=Cyan>)</font> c-<a name="line-142"></a><font color=Blue>--  | any isText cs    =  ( c &lt;&gt; element e, empty)</font>-<a name="line-143"></a>    <font color=Red>|</font> otherwise        <font color=Red>=</font>  <font color=Green><u>let</u></font> <font color=Cyan>(</font>cs0<font color=Cyan>,</font>d0<font color=Cyan>)</font> <font color=Red>=</font> carryscan carrycontent cs <font color=Cyan>(</font>text <font color=Magenta>"&gt;"</font><font color=Cyan>)</font>-<a name="line-144"></a>                          <font color=Green><u>in</u></font>-<a name="line-145"></a>                          <font color=Cyan>(</font> c <font color=Cyan>&lt;&gt;</font>-<a name="line-146"></a>                            text <font color=Magenta>"&lt;"</font> <font color=Cyan>&lt;&gt;</font> text n <font color=Cyan>&lt;+&gt;</font> fsep <font color=Cyan>(</font>map attribute <font color=Green><u>as</u></font><font color=Cyan>)</font> <font color=Cyan>$$</font>-<a name="line-147"></a>                            nest <font color=Cyan>(</font><font color=Magenta>2</font> <font color=Red>::</font> Int<font color=Cyan>)</font> <font color=Cyan>(</font>vcat cs0<font color=Cyan>)</font> <font color=Cyan>&lt;&gt;</font> <font color=Blue>--- $$</font>-<a name="line-148"></a>                            d0 <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>"&lt;/"</font> <font color=Cyan>&lt;&gt;</font> text n-<a name="line-149"></a>                          <font color=Cyan>,</font> text <font color=Magenta>"&gt;"</font><font color=Cyan>)</font>-<a name="line-150"></a><a name="carrycontent"></a><font color=Blue>carrycontent</font> <font color=Red>::</font> Content t <font color=Red>-&gt;</font> <font color=Red>[</font>Char<font color=Red>]</font> <font color=Red>-&gt;</font> <font color=Cyan>(</font><font color=Red>[</font>Char<font color=Red>]</font><font color=Cyan>,</font> <font color=Red>[</font>Char<font color=Red>]</font><font color=Cyan>)</font>-<a name="line-151"></a><font color=Blue>carryelem</font> <font color=Red>::</font> Element t <font color=Red>-&gt;</font> <font color=Red>[</font>Char<font color=Red>]</font> <font color=Red>-&gt;</font> <font color=Cyan>(</font><font color=Red>[</font>Char<font color=Red>]</font><font color=Cyan>,</font> <font color=Red>[</font>Char<font color=Red>]</font><font color=Cyan>)</font>-<a name="line-152"></a><font color=Blue>carrycontent</font> <font color=Cyan>(</font>CElem e <font color=Green><u>_</u></font><font color=Cyan>)</font> c   <font color=Red>=</font> carryelem e c-<a name="line-153"></a><font color=Blue>carrycontent</font> <font color=Cyan>(</font>CString False s <font color=Green><u>_</u></font><font color=Cyan>)</font> c <font color=Red>=</font> <font color=Cyan>(</font>c <font color=Cyan>&lt;&gt;</font> chardata s<font color=Cyan>,</font> empty<font color=Cyan>)</font>-<a name="line-154"></a><font color=Blue>carrycontent</font> <font color=Cyan>(</font>CString True  s <font color=Green><u>_</u></font><font color=Cyan>)</font> c <font color=Red>=</font> <font color=Cyan>(</font>c <font color=Cyan>&lt;&gt;</font> cdsect s<font color=Cyan>,</font> empty<font color=Cyan>)</font>-<a name="line-155"></a><font color=Blue>carrycontent</font> <font color=Cyan>(</font>CRef r <font color=Green><u>_</u></font><font color=Cyan>)</font> c    <font color=Red>=</font> <font color=Cyan>(</font>c <font color=Cyan>&lt;&gt;</font> reference r<font color=Cyan>,</font> empty<font color=Cyan>)</font>-<a name="line-156"></a><font color=Blue>carrycontent</font> <font color=Cyan>(</font>CMisc m <font color=Green><u>_</u></font><font color=Cyan>)</font> c   <font color=Red>=</font> <font color=Cyan>(</font>c <font color=Cyan>&lt;&gt;</font> misc m<font color=Cyan>,</font> empty<font color=Cyan>)</font>-<a name="line-157"></a>-<a name="line-158"></a><a name="carryscan"></a><font color=Blue>carryscan</font> <font color=Red>::</font> <font color=Cyan>(</font>a<font color=Red>-&gt;</font>c<font color=Red>-&gt;</font><font color=Cyan>(</font>b<font color=Cyan>,</font>c<font color=Cyan>)</font><font color=Cyan>)</font> <font color=Red>-&gt;</font> <font color=Red>[</font>a<font color=Red>]</font> <font color=Red>-&gt;</font> c <font color=Red>-&gt;</font> <font color=Cyan>(</font><font color=Red>[</font>b<font color=Red>]</font><font color=Cyan>,</font>c<font color=Cyan>)</font>-<a name="line-159"></a><font color=Blue>carryscan</font> <font color=Green><u>_</u></font> []     c <font color=Red>=</font> <font color=Cyan>(</font>[]<font color=Cyan>,</font>c<font color=Cyan>)</font>-<a name="line-160"></a><font color=Blue>carryscan</font> f <font color=Cyan>(</font>a<font color=Red><b>:</b></font><font color=Green><u>as</u></font><font color=Cyan>)</font> c <font color=Red>=</font> <font color=Green><u>let</u></font> <font color=Cyan>(</font>b<font color=Cyan>,</font> c0<font color=Cyan>)</font> <font color=Red>=</font> f a c-<a name="line-161"></a>                           <font color=Cyan>(</font>bs<font color=Cyan>,</font>c1<font color=Cyan>)</font> <font color=Red>=</font> carryscan f <font color=Green><u>as</u></font> c0-<a name="line-162"></a>                       <font color=Green><u>in</u></font> <font color=Cyan>(</font>b<font color=Red><b>:</b></font>bs<font color=Cyan>,</font> c1<font color=Cyan>)</font>-<a name="line-163"></a>-<a name="line-164"></a><font color=Blue>--carryelem e@(Elem n as cs) c</font>-<a name="line-165"></a><font color=Blue>--  | isText (head cs) =</font>-<a name="line-166"></a><font color=Blue>--        ( start &lt;&gt;</font>-<a name="line-167"></a><font color=Blue>--          text "&gt;" &lt;&gt; hcat (map content cs) &lt;&gt; text "&lt;/" &lt;&gt; text n</font>-<a name="line-168"></a><font color=Blue>--        , text "&gt;")</font>-<a name="line-169"></a><font color=Blue>--  | otherwise =</font>-<a name="line-170"></a><font color=Blue>--        let (d,c0) = foldl carrycontent (start, text "&gt;") cs in</font>-<a name="line-171"></a><font color=Blue>--        ( d &lt;&gt; c0 &lt;&gt; text "&lt;/" &lt;&gt; text n</font>-<a name="line-172"></a><font color=Blue>--        , text "&gt;")</font>-<a name="line-173"></a><font color=Blue>--  where start = c &lt;&gt; text "&lt;" &lt;&gt; text n &lt;+&gt; fsep (map attribute as)</font>-<a name="line-174"></a><font color=Blue>--</font>-<a name="line-175"></a><font color=Blue>--carrycontent (d,c) (CElem e)   = let (d',c') = carryelem e c in</font>-<a name="line-176"></a><font color=Blue>--                                 (d $$ nest 2 d',       c')</font>-<a name="line-177"></a><font color=Blue>--carrycontent (d,c) (CString _ s) = (d &lt;&gt; c &lt;&gt; chardata s, empty)</font>-<a name="line-178"></a><font color=Blue>--carrycontent (d,c) (CRef r)    = (d &lt;&gt; c &lt;&gt; reference r,empty)</font>-<a name="line-179"></a><font color=Blue>--carrycontent (d,c) (CMisc m)   = (d $$ c &lt;&gt; misc m,     empty)</font>-<a name="line-180"></a>-<a name="line-181"></a>-<a name="line-182"></a><font color=Blue>attribute</font> <font color=Cyan>(</font>n<font color=Cyan>,</font>v<font color=Cyan>)</font>             <font color=Red>=</font> text n <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>"="</font> <font color=Cyan>&lt;&gt;</font> attvalue v-<a name="line-183"></a><font color=Blue>content</font> <font color=Cyan>(</font>CElem e <font color=Green><u>_</u></font><font color=Cyan>)</font>         <font color=Red>=</font> element e-<a name="line-184"></a><font color=Blue>content</font> <font color=Cyan>(</font>CString False s <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red>=</font> chardata s-<a name="line-185"></a><font color=Blue>content</font> <font color=Cyan>(</font>CString True s <font color=Green><u>_</u></font><font color=Cyan>)</font>  <font color=Red>=</font> cdsect s-<a name="line-186"></a><font color=Blue>content</font> <font color=Cyan>(</font>CRef r <font color=Green><u>_</u></font><font color=Cyan>)</font>          <font color=Red>=</font> reference r-<a name="line-187"></a><font color=Blue>content</font> <font color=Cyan>(</font>CMisc m <font color=Green><u>_</u></font><font color=Cyan>)</font>         <font color=Red>=</font> misc m-<a name="line-188"></a>-<a name="line-189"></a><a name="elementdecl"></a><font color=Blue>elementdecl</font> <font color=Red>::</font> ElementDecl <font color=Red>-&gt;</font> <font color=Red>[</font>Char<font color=Red>]</font>-<a name="line-190"></a><font color=Blue>elementdecl</font> <font color=Cyan>(</font>ElementDecl n cs<font color=Cyan>)</font> <font color=Red>=</font> text <font color=Magenta>"&lt;!ELEMENT"</font> <font color=Cyan>&lt;+&gt;</font> text n <font color=Cyan>&lt;+&gt;</font>-<a name="line-191"></a>                                 contentspec cs <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>"&gt;"</font>-<a name="line-192"></a><a name="contentspec"></a><font color=Blue>contentspec</font> <font color=Red>::</font> ContentSpec <font color=Red>-&gt;</font> <font color=Red>[</font>Char<font color=Red>]</font>-<a name="line-193"></a><font color=Blue>contentspec</font> EMPTY              <font color=Red>=</font> text <font color=Magenta>"EMPTY"</font>-<a name="line-194"></a><font color=Blue>contentspec</font> ANY                <font color=Red>=</font> text <font color=Magenta>"ANY"</font>-<a name="line-195"></a><font color=Blue>contentspec</font> <font color=Cyan>(</font>Mixed m<font color=Cyan>)</font>          <font color=Red>=</font> mixed m-<a name="line-196"></a><font color=Blue>contentspec</font> <font color=Cyan>(</font>ContentSpec c<font color=Cyan>)</font>    <font color=Red>=</font> cp c-<a name="line-197"></a><font color=Blue>--contentspec (ContentPE p cs)   = peref p</font>-<a name="line-198"></a><font color=Blue>cp</font> <font color=Cyan>(</font>TagName n m<font color=Cyan>)</font>       <font color=Red>=</font> text n <font color=Cyan>&lt;&gt;</font> modifier m-<a name="line-199"></a><font color=Blue>cp</font> <font color=Cyan>(</font>Choice cs m<font color=Cyan>)</font>       <font color=Red>=</font> parens <font color=Cyan>(</font>hcat <font color=Cyan>(</font>intersperse <font color=Cyan>(</font>text <font color=Magenta>"|"</font><font color=Cyan>)</font> <font color=Cyan>(</font>map cp cs<font color=Cyan>)</font><font color=Cyan>)</font><font color=Cyan>)</font> <font color=Cyan>&lt;&gt;</font>-<a name="line-200"></a>                           modifier m-<a name="line-201"></a><font color=Blue>cp</font> <font color=Cyan>(</font>Seq cs m<font color=Cyan>)</font>          <font color=Red>=</font> parens <font color=Cyan>(</font>hcat <font color=Cyan>(</font>intersperse <font color=Cyan>(</font>text <font color=Magenta>","</font><font color=Cyan>)</font> <font color=Cyan>(</font>map cp cs<font color=Cyan>)</font><font color=Cyan>)</font><font color=Cyan>)</font> <font color=Cyan>&lt;&gt;</font>-<a name="line-202"></a>                           modifier m-<a name="line-203"></a><a name="modifier"></a><font color=Blue>--cp (CPPE p c)          = peref p</font>-<a name="line-204"></a><font color=Blue>modifier</font> <font color=Red>::</font> Modifier <font color=Red>-&gt;</font> <font color=Red>[</font>Char<font color=Red>]</font>-<a name="line-205"></a><font color=Blue>modifier</font> None          <font color=Red>=</font> empty-<a name="line-206"></a><font color=Blue>modifier</font> Query         <font color=Red>=</font> text <font color=Magenta>"?"</font>-<a name="line-207"></a><font color=Blue>modifier</font> Star          <font color=Red>=</font> text <font color=Magenta>"*"</font>-<a name="line-208"></a><font color=Blue>modifier</font> Plus          <font color=Red>=</font> text <font color=Magenta>"+"</font>-<a name="line-209"></a><a name="mixed"></a><font color=Blue>mixed</font> <font color=Red>::</font> Mixed <font color=Red>-&gt;</font> <font color=Red>[</font>Char<font color=Red>]</font>-<a name="line-210"></a><font color=Blue>mixed</font>  PCDATA          <font color=Red>=</font> text <font color=Magenta>"(#PCDATA)"</font>-<a name="line-211"></a><font color=Blue>mixed</font> <font color=Cyan>(</font>PCDATAplus ns<font color=Cyan>)</font>  <font color=Red>=</font> text <font color=Magenta>"(#PCDATA |"</font> <font color=Cyan>&lt;+&gt;</font>-<a name="line-212"></a>                         hcat <font color=Cyan>(</font>intersperse <font color=Cyan>(</font>text <font color=Magenta>"|"</font><font color=Cyan>)</font> <font color=Cyan>(</font>map text ns<font color=Cyan>)</font><font color=Cyan>)</font> <font color=Cyan>&lt;&gt;</font>-<a name="line-213"></a>                         text <font color=Magenta>")*"</font>-<a name="line-214"></a>-<a name="line-215"></a><a name="attlistdecl"></a><font color=Blue>attlistdecl</font> <font color=Red>::</font> AttListDecl <font color=Red>-&gt;</font> <font color=Red>[</font>Char<font color=Red>]</font>-<a name="line-216"></a><font color=Blue>attlistdecl</font> <font color=Cyan>(</font>AttListDecl n ds<font color=Cyan>)</font> <font color=Red>=</font> text <font color=Magenta>"&lt;!ATTLIST"</font> <font color=Cyan>&lt;+&gt;</font> text n <font color=Cyan>&lt;+&gt;</font>-<a name="line-217"></a>                                 fsep <font color=Cyan>(</font>map attdef ds<font color=Cyan>)</font> <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>"&gt;"</font>-<a name="line-218"></a><a name="attdef"></a><font color=Blue>attdef</font> <font color=Red>::</font> AttDef <font color=Red>-&gt;</font> <font color=Red>[</font>Char<font color=Red>]</font>-<a name="line-219"></a><font color=Blue>attdef</font> <font color=Cyan>(</font>AttDef n t d<font color=Cyan>)</font>          <font color=Red>=</font> text n <font color=Cyan>&lt;+&gt;</font> atttype t <font color=Cyan>&lt;+&gt;</font> defaultdecl d-<a name="line-220"></a><a name="atttype"></a><font color=Blue>atttype</font> <font color=Red>::</font> AttType <font color=Red>-&gt;</font> <font color=Red>[</font>Char<font color=Red>]</font>-<a name="line-221"></a><font color=Blue>atttype</font>  StringType            <font color=Red>=</font> text <font color=Magenta>"CDATA"</font>-<a name="line-222"></a><font color=Blue>atttype</font> <font color=Cyan>(</font>TokenizedType t<font color=Cyan>)</font>      <font color=Red>=</font> tokenizedtype t-<a name="line-223"></a><font color=Blue>atttype</font> <font color=Cyan>(</font>EnumeratedType t<font color=Cyan>)</font>     <font color=Red>=</font> enumeratedtype t-<a name="line-224"></a><a name="tokenizedtype"></a><font color=Blue>tokenizedtype</font> <font color=Red>::</font> TokenizedType <font color=Red>-&gt;</font> <font color=Red>[</font>Char<font color=Red>]</font>-<a name="line-225"></a><font color=Blue>tokenizedtype</font> ID               <font color=Red>=</font> text <font color=Magenta>"ID"</font>-<a name="line-226"></a><font color=Blue>tokenizedtype</font> IDREF            <font color=Red>=</font> text <font color=Magenta>"IDREF"</font>-<a name="line-227"></a><font color=Blue>tokenizedtype</font> IDREFS           <font color=Red>=</font> text <font color=Magenta>"IDREFS"</font>-<a name="line-228"></a><font color=Blue>tokenizedtype</font> ENTITY           <font color=Red>=</font> text <font color=Magenta>"ENTITY"</font>-<a name="line-229"></a><font color=Blue>tokenizedtype</font> ENTITIES         <font color=Red>=</font> text <font color=Magenta>"ENTITIES"</font>-<a name="line-230"></a><font color=Blue>tokenizedtype</font> NMTOKEN          <font color=Red>=</font> text <font color=Magenta>"NMTOKEN"</font>-<a name="line-231"></a><font color=Blue>tokenizedtype</font> NMTOKENS         <font color=Red>=</font> text <font color=Magenta>"NMTOKENS"</font>-<a name="line-232"></a><a name="enumeratedtype"></a><font color=Blue>enumeratedtype</font> <font color=Red>::</font> EnumeratedType <font color=Red>-&gt;</font> <font color=Red>[</font>Char<font color=Red>]</font>-<a name="line-233"></a><font color=Blue>enumeratedtype</font> <font color=Cyan>(</font>NotationType n<font color=Cyan>)</font><font color=Red>=</font> notationtype n-<a name="line-234"></a><font color=Blue>enumeratedtype</font> <font color=Cyan>(</font>Enumeration e<font color=Cyan>)</font> <font color=Red>=</font> enumeration e-<a name="line-235"></a><a name="notationtype"></a><font color=Blue>notationtype</font> <font color=Red>::</font> <font color=Red>[</font><font color=Red>[</font>Char<font color=Red>]</font><font color=Red>]</font> <font color=Red>-&gt;</font> <font color=Red>[</font>Char<font color=Red>]</font>-<a name="line-236"></a><font color=Blue>notationtype</font> ns                <font color=Red>=</font> text <font color=Magenta>"NOTATION"</font> <font color=Cyan>&lt;+&gt;</font>-<a name="line-237"></a>                                 parens <font color=Cyan>(</font>hcat <font color=Cyan>(</font>intersperse <font color=Cyan>(</font>text <font color=Magenta>"|"</font><font color=Cyan>)</font> <font color=Cyan>(</font>map text ns<font color=Cyan>)</font><font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-238"></a><a name="enumeration"></a><font color=Blue>enumeration</font> <font color=Red>::</font> <font color=Red>[</font><font color=Red>[</font>Char<font color=Red>]</font><font color=Red>]</font> <font color=Red>-&gt;</font> <font color=Red>[</font>Char<font color=Red>]</font>-<a name="line-239"></a><font color=Blue>enumeration</font> ns                 <font color=Red>=</font> parens <font color=Cyan>(</font>hcat <font color=Cyan>(</font>intersperse <font color=Cyan>(</font>text <font color=Magenta>"|"</font><font color=Cyan>)</font> <font color=Cyan>(</font>map nmtoken ns<font color=Cyan>)</font><font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-240"></a><a name="defaultdecl"></a><font color=Blue>defaultdecl</font> <font color=Red>::</font> DefaultDecl <font color=Red>-&gt;</font> <font color=Red>[</font>Char<font color=Red>]</font>-<a name="line-241"></a><font color=Blue>defaultdecl</font>  REQUIRED          <font color=Red>=</font> text <font color=Magenta>"#REQUIRED"</font>-<a name="line-242"></a><font color=Blue>defaultdecl</font>  IMPLIED           <font color=Red>=</font> text <font color=Magenta>"#IMPLIED"</font>-<a name="line-243"></a><font color=Blue>defaultdecl</font> <font color=Cyan>(</font>DefaultTo a f<font color=Cyan>)</font>    <font color=Red>=</font> maybe <font color=Cyan>(</font>const <font color=Cyan>(</font>text <font color=Magenta>"#FIXED"</font><font color=Cyan>)</font><font color=Cyan>)</font> f <font color=Cyan>&lt;+&gt;</font> attvalue a-<a name="line-244"></a><a name="reference"></a><font color=Blue>-- _ (IncludeSect i)= text "&lt;![INCLUDE [" &lt;+&gt;</font>-<a name="line-245"></a><font color=Blue>--                                  vcat (map extsubsetdecl i) &lt;+&gt; text "]]&gt;"</font>-<a name="line-246"></a><font color=Blue>-- conditionalsect (IgnoreSect i) = text "&lt;![IGNORE [" &lt;+&gt;</font>-<a name="line-247"></a><font color=Blue>--                                  fsep (map ignoresectcontents i) &lt;+&gt; text "]]&gt;"</font>-<a name="line-248"></a><font color=Blue>-- _ (Ignore)                = empty</font>-<a name="line-249"></a><font color=Blue>-- _ (IgnoreSectContents i is)</font>-<a name="line-250"></a><font color=Blue>--                                = ignore i &lt;+&gt; vcat (map internal is)</font>-<a name="line-251"></a><font color=Blue>--                           where internal (ics,i) = text "&lt;![[" &lt;+&gt;</font>-<a name="line-252"></a><font color=Blue>--                                                    ignoresectcontents ics &lt;+&gt;</font>-<a name="line-253"></a><font color=Blue>--                                                    text "]]&gt;" &lt;+&gt; ignore i</font>-<a name="line-254"></a><font color=Blue>reference</font> <font color=Red>::</font> Reference <font color=Red>-&gt;</font> <font color=Red>[</font>Char<font color=Red>]</font>-<a name="line-255"></a><font color=Blue>reference</font> <font color=Cyan>(</font>RefEntity er<font color=Cyan>)</font>       <font color=Red>=</font> entityref er-<a name="line-256"></a><font color=Blue>reference</font> <font color=Cyan>(</font>RefChar cr<font color=Cyan>)</font>         <font color=Red>=</font> charref cr-<a name="line-257"></a><a name="entityref"></a><font color=Blue>entityref</font> <font color=Red>::</font> <font color=Red>[</font>Char<font color=Red>]</font> <font color=Red>-&gt;</font> <font color=Red>[</font>Char<font color=Red>]</font>-<a name="line-258"></a><font color=Blue>entityref</font> n                    <font color=Red>=</font> text <font color=Magenta>"&amp;"</font> <font color=Cyan>&lt;&gt;</font> text n <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>";"</font>-<a name="line-259"></a><a name="charref"></a><font color=Blue>charref</font> <font color=Red>::</font> <font color=Cyan>(</font>Show a<font color=Cyan>)</font> <font color=Red>=&gt;</font> a <font color=Red>-&gt;</font> <font color=Red>[</font>Char<font color=Red>]</font>-<a name="line-260"></a><font color=Blue>charref</font> c                      <font color=Red>=</font> text <font color=Magenta>"&amp;#"</font> <font color=Cyan>&lt;&gt;</font> text <font color=Cyan>(</font>show c<font color=Cyan>)</font> <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>";"</font>-<a name="line-261"></a><a name="entitydecl"></a><font color=Blue>entitydecl</font> <font color=Red>::</font> EntityDecl <font color=Red>-&gt;</font> <font color=Red>[</font>Char<font color=Red>]</font>-<a name="line-262"></a><font color=Blue>entitydecl</font> <font color=Cyan>(</font>EntityGEDecl d<font color=Cyan>)</font>    <font color=Red>=</font> gedecl d-<a name="line-263"></a><font color=Blue>entitydecl</font> <font color=Cyan>(</font>EntityPEDecl d<font color=Cyan>)</font>    <font color=Red>=</font> pedecl d-<a name="line-264"></a><a name="gedecl"></a><font color=Blue>gedecl</font> <font color=Red>::</font> GEDecl <font color=Red>-&gt;</font> <font color=Red>[</font>Char<font color=Red>]</font>-<a name="line-265"></a><font color=Blue>gedecl</font> <font color=Cyan>(</font>GEDecl n ed<font color=Cyan>)</font>           <font color=Red>=</font> text <font color=Magenta>"&lt;!ENTITY"</font> <font color=Cyan>&lt;+&gt;</font> text n <font color=Cyan>&lt;+&gt;</font> entitydef ed <font color=Cyan>&lt;&gt;</font>-<a name="line-266"></a>                                 text <font color=Magenta>"&gt;"</font>-<a name="line-267"></a><a name="pedecl"></a><font color=Blue>pedecl</font> <font color=Red>::</font> PEDecl <font color=Red>-&gt;</font> <font color=Red>[</font>Char<font color=Red>]</font>-<a name="line-268"></a><font color=Blue>pedecl</font> <font color=Cyan>(</font>PEDecl n pd<font color=Cyan>)</font>           <font color=Red>=</font> text <font color=Magenta>"&lt;!ENTITY %"</font> <font color=Cyan>&lt;&gt;</font> text n <font color=Cyan>&lt;+&gt;</font> pedef pd <font color=Cyan>&lt;&gt;</font>-<a name="line-269"></a>                                 text <font color=Magenta>"&gt;"</font>-<a name="line-270"></a><a name="entitydef"></a><font color=Blue>entitydef</font> <font color=Red>::</font> EntityDef <font color=Red>-&gt;</font> <font color=Red>[</font>Char<font color=Red>]</font>-<a name="line-271"></a><font color=Blue>entitydef</font> <font color=Cyan>(</font>DefEntityValue ew<font color=Cyan>)</font>  <font color=Red>=</font> entityvalue ew-<a name="line-272"></a><font color=Blue>entitydef</font> <font color=Cyan>(</font>DefExternalID i nd<font color=Cyan>)</font> <font color=Red>=</font> externalid i <font color=Cyan>&lt;+&gt;</font> maybe ndatadecl nd-<a name="line-273"></a><a name="pedef"></a><font color=Blue>pedef</font> <font color=Red>::</font> PEDef <font color=Red>-&gt;</font> <font color=Red>[</font>Char<font color=Red>]</font>-<a name="line-274"></a><font color=Blue>pedef</font> <font color=Cyan>(</font>PEDefEntityValue ew<font color=Cyan>)</font>    <font color=Red>=</font> entityvalue ew-<a name="line-275"></a><font color=Blue>pedef</font> <font color=Cyan>(</font>PEDefExternalID eid<font color=Cyan>)</font>    <font color=Red>=</font> externalid eid-<a name="line-276"></a><a name="externalid"></a><font color=Blue>externalid</font> <font color=Red>::</font> ExternalID <font color=Red>-&gt;</font> <font color=Red>[</font>Char<font color=Red>]</font>-<a name="line-277"></a><font color=Blue>externalid</font> <font color=Cyan>(</font>SYSTEM sl<font color=Cyan>)</font>         <font color=Red>=</font> text <font color=Magenta>"SYSTEM"</font> <font color=Cyan>&lt;+&gt;</font> systemliteral sl-<a name="line-278"></a><font color=Blue>externalid</font> <font color=Cyan>(</font>PUBLIC i sl<font color=Cyan>)</font>       <font color=Red>=</font> text <font color=Magenta>"PUBLIC"</font> <font color=Cyan>&lt;+&gt;</font> pubidliteral i <font color=Cyan>&lt;+&gt;</font>-<a name="line-279"></a>                                 systemliteral sl-<a name="line-280"></a><a name="ndatadecl"></a><font color=Blue>ndatadecl</font> <font color=Red>::</font> NDataDecl <font color=Red>-&gt;</font> <font color=Red>[</font>Char<font color=Red>]</font>-<a name="line-281"></a><font color=Blue>ndatadecl</font> <font color=Cyan>(</font>NDATA n<font color=Cyan>)</font>            <font color=Red>=</font> text <font color=Magenta>"NDATA"</font> <font color=Cyan>&lt;+&gt;</font> text n-<a name="line-282"></a><a name="notationdecl"></a><font color=Blue>-- _ (TextDecl vi ed)      = text "&lt;?xml" &lt;+&gt; maybe text vi &lt;+&gt;</font>-<a name="line-283"></a><font color=Blue>--                                  encodingdecl ed &lt;&gt; text "?&gt;"</font>-<a name="line-284"></a><font color=Blue>-- _ (ExtParsedEnt t c)= maybe textdecl t &lt;+&gt; content c</font>-<a name="line-285"></a><font color=Blue>-- _ (ExtPE t esd)            = maybe textdecl t &lt;+&gt;</font>-<a name="line-286"></a><font color=Blue>--                                  vcat (map extsubsetdecl esd)</font>-<a name="line-287"></a><font color=Blue>notationdecl</font> <font color=Red>::</font> NotationDecl <font color=Red>-&gt;</font> <font color=Red>[</font>Char<font color=Red>]</font>-<a name="line-288"></a><font color=Blue>notationdecl</font> <font color=Cyan>(</font>NOTATION n e<font color=Cyan>)</font>    <font color=Red>=</font> text <font color=Magenta>"&lt;!NOTATION"</font> <font color=Cyan>&lt;+&gt;</font> text n <font color=Cyan>&lt;+&gt;</font>-<a name="line-289"></a>                                 either externalid publicid e <font color=Cyan>&lt;&gt;</font>-<a name="line-290"></a>                                 text <font color=Magenta>"&gt;"</font>-<a name="line-291"></a><a name="publicid"></a><font color=Blue>publicid</font> <font color=Red>::</font> PublicID <font color=Red>-&gt;</font> <font color=Red>[</font>Char<font color=Red>]</font>-<a name="line-292"></a><font color=Blue>publicid</font> <font color=Cyan>(</font>PUBLICID p<font color=Cyan>)</font>          <font color=Red>=</font> text <font color=Magenta>"PUBLICID"</font> <font color=Cyan>&lt;+&gt;</font> pubidliteral p-<a name="line-293"></a><a name="encodingdecl"></a><font color=Blue>encodingdecl</font> <font color=Red>::</font> EncodingDecl <font color=Red>-&gt;</font> <font color=Red>[</font>Char<font color=Red>]</font>-<a name="line-294"></a><font color=Blue>encodingdecl</font> <font color=Cyan>(</font>EncodingDecl s<font color=Cyan>)</font>  <font color=Red>=</font> text <font color=Magenta>"encoding='"</font> <font color=Cyan>&lt;&gt;</font> text s <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>"'"</font>-<a name="line-295"></a><a name="nmtoken"></a><font color=Blue>nmtoken</font> <font color=Red>::</font> t <font color=Red>-&gt;</font> t-<a name="line-296"></a><font color=Blue>nmtoken</font> s                      <font color=Red>=</font> text s-<a name="line-297"></a><a name="attvalue"></a><font color=Blue>attvalue</font> <font color=Red>::</font> AttValue <font color=Red>-&gt;</font> <font color=Red>[</font>Char<font color=Red>]</font>-<a name="line-298"></a><font color=Blue>attvalue</font> <font color=Cyan>(</font>AttValue esr<font color=Cyan>)</font>        <font color=Red>=</font> text <font color=Magenta>"\""</font> <font color=Cyan>&lt;&gt;</font>-<a name="line-299"></a>                                 hcat <font color=Cyan>(</font>map <font color=Cyan>(</font>either text reference<font color=Cyan>)</font> esr<font color=Cyan>)</font> <font color=Cyan>&lt;&gt;</font>-<a name="line-300"></a>                                 text <font color=Magenta>"\""</font>-<a name="line-301"></a><a name="entityvalue"></a><font color=Blue>entityvalue</font> <font color=Red>::</font> EntityValue <font color=Red>-&gt;</font> <font color=Red>[</font>Char<font color=Red>]</font>-<a name="line-302"></a><font color=Blue>entityvalue</font> <font color=Cyan>(</font>EntityValue evs<font color=Cyan>)</font>-<a name="line-303"></a>  <font color=Red>|</font> containsDoubleQuote evs    <font color=Red>=</font> text <font color=Magenta>"'"</font>  <font color=Cyan>&lt;&gt;</font> hcat <font color=Cyan>(</font>map ev evs<font color=Cyan>)</font> <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>"'"</font>-<a name="line-304"></a>  <font color=Red>|</font> otherwise                  <font color=Red>=</font> text <font color=Magenta>"\""</font> <font color=Cyan>&lt;&gt;</font> hcat <font color=Cyan>(</font>map ev evs<font color=Cyan>)</font> <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>"\""</font>-<a name="line-305"></a><a name="ev"></a><font color=Blue>ev</font> <font color=Red>::</font> EV <font color=Red>-&gt;</font> String-<a name="line-306"></a><font color=Blue>ev</font> <font color=Cyan>(</font>EVString s<font color=Cyan>)</font>                <font color=Red>=</font> text s-<a name="line-307"></a><font color=Blue>--ev (EVPERef p e)               = peref p</font>-<a name="line-308"></a><font color=Blue>ev</font> <font color=Cyan>(</font>EVRef r<font color=Cyan>)</font>                   <font color=Red>=</font> reference r-<a name="line-309"></a><a name="pubidliteral"></a><font color=Blue>pubidliteral</font> <font color=Red>::</font> PubidLiteral <font color=Red>-&gt;</font> <font color=Red>[</font>Char<font color=Red>]</font>-<a name="line-310"></a><font color=Blue>pubidliteral</font> <font color=Cyan>(</font>PubidLiteral s<font color=Cyan>)</font>-<a name="line-311"></a>    <font color=Red>|</font> <font color=Magenta>'"'</font> <font color=Cyan>`elem`</font> s             <font color=Red>=</font> text <font color=Magenta>"'"</font> <font color=Cyan>&lt;&gt;</font> text s <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>"'"</font>-<a name="line-312"></a>    <font color=Red>|</font> otherwise                <font color=Red>=</font> text <font color=Magenta>"\""</font> <font color=Cyan>&lt;&gt;</font> text s <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>"\""</font>-<a name="line-313"></a><a name="systemliteral"></a><font color=Blue>systemliteral</font> <font color=Red>::</font> SystemLiteral <font color=Red>-&gt;</font> <font color=Red>[</font>Char<font color=Red>]</font>-<a name="line-314"></a><font color=Blue>systemliteral</font> <font color=Cyan>(</font>SystemLiteral s<font color=Cyan>)</font>-<a name="line-315"></a>    <font color=Red>|</font> <font color=Magenta>'"'</font> <font color=Cyan>`elem`</font> s             <font color=Red>=</font> text <font color=Magenta>"'"</font> <font color=Cyan>&lt;&gt;</font> text s <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>"'"</font>-<a name="line-316"></a>    <font color=Red>|</font> otherwise                <font color=Red>=</font> text <font color=Magenta>"\""</font> <font color=Cyan>&lt;&gt;</font> text s <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>"\""</font>-<a name="line-317"></a><a name="chardata"></a><font color=Blue>chardata</font> <font color=Red>::</font> t <font color=Red>-&gt;</font> t-<a name="line-318"></a><font color=Blue>chardata</font> s                     <font color=Red>=</font> <font color=Blue>{-if all isSpace s then empty else-}</font> text s-<a name="line-319"></a><a name="cdsect"></a><font color=Blue>cdsect</font> <font color=Red>::</font> <font color=Red>[</font>Char<font color=Red>]</font> <font color=Red>-&gt;</font> <font color=Red>[</font>Char<font color=Red>]</font>-<a name="line-320"></a><font color=Blue>cdsect</font> c                       <font color=Red>=</font> text <font color=Magenta>"&lt;![CDATA["</font> <font color=Cyan>&lt;&gt;</font> chardata c <font color=Cyan>&lt;&gt;</font> text <font color=Magenta>"]]&gt;"</font>-<a name="line-321"></a>-<a name="line-322"></a><a name="containsDoubleQuote"></a><font color=Blue>----</font>-<a name="line-323"></a><font color=Blue>containsDoubleQuote</font> <font color=Red>::</font> <font color=Red>[</font>EV<font color=Red>]</font> <font color=Red>-&gt;</font> Bool-<a name="line-324"></a><font color=Blue>containsDoubleQuote</font> evs <font color=Red>=</font> any csq evs-<a name="line-325"></a>    <font color=Green><u>where</u></font> csq <font color=Cyan>(</font>EVString s<font color=Cyan>)</font> <font color=Red>=</font> <font color=Magenta>'"'</font> <font color=Cyan>`elem`</font> s-<a name="line-326"></a>          csq <font color=Green><u>_</u></font>            <font color=Red>=</font> False-<a name="line-327"></a>-</pre>-</body>-</html>
− docs/HaXml/src/Text/XML/HaXml/TypeMapping.html
@@ -1,300 +0,0 @@-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">-<html>-<head>-<!-- Generated by HsColour, http://www.cs.york.ac.uk/fp/darcs/hscolour/ -->-<title>src/Text/XML/HaXml/TypeMapping.hs</title>-</head>-<body>-<pre><a name="line-1"></a><font color=Green><u>module</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>TypeMapping-<a name="line-2"></a>  <font color=Cyan>(</font>-<a name="line-3"></a>  <font color=Blue>-- * A class to get an explicit type representation for any value</font>-<a name="line-4"></a>    HTypeable<font color=Cyan>(</font><font color=Red>..</font><font color=Cyan>)</font>	<font color=Blue>-- sole method, toHType</font>-<a name="line-5"></a>  <font color=Blue>-- * Explicit representation of Haskell datatype information</font>-<a name="line-6"></a>  <font color=Cyan>,</font> HType<font color=Cyan>(</font><font color=Red>..</font><font color=Cyan>)</font>		<font color=Blue>-- instance of Eq, Show</font>-<a name="line-7"></a>  <font color=Cyan>,</font> Constr<font color=Cyan>(</font><font color=Red>..</font><font color=Cyan>)</font>		<font color=Blue>-- instance of Eq, Show</font>-<a name="line-8"></a>  <font color=Blue>-- * Helper functions to extract type info as strings</font>-<a name="line-9"></a>  <font color=Cyan>,</font> showHType		<font color=Blue>-- :: HType -&gt; ShowS</font>-<a name="line-10"></a>  <font color=Cyan>,</font> showConstr		<font color=Blue>-- :: Int -&gt; HType -&gt; String</font>-<a name="line-11"></a>  <font color=Blue>-- * Conversion from Haskell datatype to DTD</font>-<a name="line-12"></a>  <font color=Cyan>,</font> toDTD-<a name="line-13"></a>  <font color=Cyan>)</font> <font color=Green><u>where</u></font>-<a name="line-14"></a>-<a name="line-15"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Types-<a name="line-16"></a><font color=Green><u>import</u></font> Data<font color=Cyan>.</font>List <font color=Cyan>(</font>partition<font color=Cyan>,</font> intersperse<font color=Cyan>)</font>-<a name="line-17"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>PrettyPrint<font color=Cyan>.</font>HughesPJ <font color=Cyan>(</font>render<font color=Cyan>)</font>-<a name="line-18"></a><font color=Green><u>import</u></font> <font color=Green><u>qualified</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Pretty <font color=Green><u>as</u></font> PP-<a name="line-19"></a>-<a name="line-20"></a>-<a name="line-21"></a><font color=Blue>------------------------------------------------------------------------</font>-<a name="line-22"></a>        <font color=Blue>-- idea: in DrIFT,</font>-<a name="line-23"></a>        <font color=Blue>--      named field == primitive type, becomes an attribute</font>-<a name="line-24"></a>        <font color=Blue>--      named field == single-constructor type, renames the tag</font>-<a name="line-25"></a>        <font color=Blue>--      named field == multi-constructor type, as normal</font>-<a name="line-26"></a>        <font color=Blue>-- if prefix of all named fields is roughly typename, delete it</font>-<a name="line-27"></a>-<a name="line-28"></a><a name="HTypeable"></a><font color=Blue>-- | @HTypeable@ promises that we can create an explicit representation of</font>-<a name="line-29"></a><a name="HTypeable"></a><font color=Blue>--   of the type of any value.</font>-<a name="line-30"></a><a name="HTypeable"></a><font color=Green><u>class</u></font> HTypeable a <font color=Green><u>where</u></font>-<a name="line-31"></a>    toHType <font color=Red>::</font> a <font color=Red>-&gt;</font> HType-<a name="line-32"></a>-<a name="line-33"></a><a name="HType"></a><font color=Blue>-- | A concrete representation of any Haskell type.</font>-<a name="line-34"></a><a name="HType"></a><font color=Green><u>data</u></font> HType <font color=Red>=</font>-<a name="line-35"></a>      Maybe HType-<a name="line-36"></a>    <font color=Red>|</font> List HType-<a name="line-37"></a>    <font color=Red>|</font> Tuple <font color=Red>[</font>HType<font color=Red>]</font>-<a name="line-38"></a>    <font color=Red>|</font> Prim String String        <font color=Blue>-- ^ separate Haskell name and XML name</font>-<a name="line-39"></a>    <font color=Red>|</font> String-<a name="line-40"></a>    <font color=Red>|</font> Defined String <font color=Red>[</font>HType<font color=Red>]</font> <font color=Red>[</font>Constr<font color=Red>]</font>-<a name="line-41"></a>	<font color=Blue>-- ^ A user-defined type has a name, a sequence of type variables,</font>-<a name="line-42"></a>	<font color=Blue>--   and a set of constructors.  (The variables might already be</font>-<a name="line-43"></a>	<font color=Blue>--   instantiated to actual types.)</font>-<a name="line-44"></a>    <font color=Green><u>deriving</u></font> <font color=Cyan>(</font>Show<font color=Cyan>)</font>-<a name="line-45"></a>-<a name="line-46"></a><font color=Green><u>instance</u></font> Eq HType <font color=Green><u>where</u></font>-<a name="line-47"></a>    <font color=Cyan>(</font>Maybe x<font color=Cyan>)</font>  <font color=Cyan>==</font> <font color=Cyan>(</font>Maybe y<font color=Cyan>)</font>  <font color=Red>=</font>  x<font color=Cyan>==</font>y-<a name="line-48"></a>    <font color=Cyan>(</font>List x<font color=Cyan>)</font>   <font color=Cyan>==</font> <font color=Cyan>(</font>List y<font color=Cyan>)</font>   <font color=Red>=</font>  x<font color=Cyan>==</font>y-<a name="line-49"></a>    <font color=Cyan>(</font>Tuple xs<font color=Cyan>)</font> <font color=Cyan>==</font> <font color=Cyan>(</font>Tuple ys<font color=Cyan>)</font> <font color=Red>=</font>  xs<font color=Cyan>==</font>ys-<a name="line-50"></a>    <font color=Cyan>(</font>Prim x <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Cyan>==</font> <font color=Cyan>(</font>Prim y <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red>=</font>  x<font color=Cyan>==</font>y-<a name="line-51"></a>    String     <font color=Cyan>==</font> String     <font color=Red>=</font>  True-<a name="line-52"></a>    <font color=Cyan>(</font>Defined n xs <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Cyan>==</font> <font color=Cyan>(</font>Defined m ys <font color=Green><u>_</u></font><font color=Cyan>)</font>  <font color=Red>=</font>  n<font color=Cyan>==</font>m 	<font color=Blue>-- &amp;&amp; xs==ys</font>-<a name="line-53"></a>    <font color=Green><u>_</u></font>          <font color=Cyan>==</font> <font color=Green><u>_</u></font>          <font color=Red>=</font>  False-<a name="line-54"></a>-<a name="line-55"></a><a name="Constr"></a><font color=Blue>-- | A concrete representation of any user-defined Haskell constructor.</font>-<a name="line-56"></a><a name="Constr"></a><font color=Blue>--   The constructor has a name, and a sequence of component types.  The</font>-<a name="line-57"></a><a name="Constr"></a><font color=Blue>--   first sequence of types represents the minimum set of free type</font>-<a name="line-58"></a><a name="Constr"></a><font color=Blue>--   variables occurring in the (second) list of real component types.</font>-<a name="line-59"></a><a name="Constr"></a><font color=Blue>--   If there are fieldnames, they are contained in the final list, and</font>-<a name="line-60"></a><a name="Constr"></a><font color=Blue>--   correspond one-to-one with the component types.</font>-<a name="line-61"></a><a name="Constr"></a><font color=Green><u>data</u></font> Constr <font color=Red>=</font> Constr String <font color=Red>[</font>HType<font color=Red>]</font> <font color=Red>[</font>HType<font color=Red>]</font> <font color=Blue>-- (Maybe [String])</font>-<a name="line-62"></a>    <font color=Green><u>deriving</u></font> <font color=Cyan>(</font>Eq<font color=Cyan>,</font>Show<font color=Cyan>)</font>-<a name="line-63"></a>-<a name="line-64"></a><a name="showConstr"></a><font color=Blue>-- | Project the n'th constructor from an HType and convert it to a string</font>-<a name="line-65"></a><font color=Blue>--   suitable for an XML tagname.</font>-<a name="line-66"></a><font color=Blue>showConstr</font> <font color=Red>::</font> Int <font color=Red>-&gt;</font> HType <font color=Red>-&gt;</font> String-<a name="line-67"></a><font color=Blue>showConstr</font> n <font color=Cyan>(</font>Defined <font color=Green><u>_</u></font> <font color=Green><u>_</u></font> cs<font color=Cyan>)</font> <font color=Red>=</font> flatConstr <font color=Cyan>(</font>cs<font color=Cyan>!!</font>n<font color=Cyan>)</font> <font color=Magenta>""</font>-<a name="line-68"></a><font color=Blue>showConstr</font> n <font color=Green><u>_</u></font> <font color=Red>=</font> error <font color=Magenta>"no constructors for builtin types"</font>-<a name="line-69"></a>-<a name="line-70"></a><font color=Blue>------------------------------------------------------------------------</font>-<a name="line-71"></a><font color=Blue>-- Some instances</font>-<a name="line-72"></a><font color=Green><u>instance</u></font> HTypeable Bool <font color=Green><u>where</u></font>-<a name="line-73"></a>    toHType   <font color=Green><u>_</u></font>    <font color=Red>=</font> Prim <font color=Magenta>"Bool"</font> <font color=Magenta>"bool"</font>-<a name="line-74"></a><font color=Green><u>instance</u></font> HTypeable Int <font color=Green><u>where</u></font>-<a name="line-75"></a>    toHType   <font color=Green><u>_</u></font>    <font color=Red>=</font> Prim <font color=Magenta>"Int"</font> <font color=Magenta>"int"</font>-<a name="line-76"></a><font color=Green><u>instance</u></font> HTypeable Integer <font color=Green><u>where</u></font>-<a name="line-77"></a>    toHType   <font color=Green><u>_</u></font>    <font color=Red>=</font> Prim <font color=Magenta>"Integer"</font> <font color=Magenta>"integer"</font>-<a name="line-78"></a><font color=Green><u>instance</u></font> HTypeable Float <font color=Green><u>where</u></font>-<a name="line-79"></a>    toHType   <font color=Green><u>_</u></font>    <font color=Red>=</font> Prim <font color=Magenta>"Float"</font> <font color=Magenta>"float"</font>-<a name="line-80"></a><font color=Green><u>instance</u></font> HTypeable Double <font color=Green><u>where</u></font>-<a name="line-81"></a>    toHType   <font color=Green><u>_</u></font>    <font color=Red>=</font> Prim <font color=Magenta>"Double"</font> <font color=Magenta>"double"</font>-<a name="line-82"></a><font color=Green><u>instance</u></font> HTypeable Char <font color=Green><u>where</u></font>-<a name="line-83"></a>    toHType   <font color=Green><u>_</u></font>    <font color=Red>=</font> Prim <font color=Magenta>"Char"</font> <font color=Magenta>"char"</font>-<a name="line-84"></a>-<a name="line-85"></a><font color=Green><u>instance</u></font> HTypeable () <font color=Green><u>where</u></font>-<a name="line-86"></a>    toHType <font color=Green><u>_</u></font>      <font color=Red>=</font> Prim <font color=Magenta>"unit"</font> <font color=Magenta>"unit"</font>-<a name="line-87"></a><font color=Green><u>instance</u></font> <font color=Cyan>(</font>HTypeable a<font color=Cyan>,</font> HTypeable b<font color=Cyan>)</font> <font color=Red>=&gt;</font> HTypeable <font color=Cyan>(</font>a<font color=Cyan>,</font>b<font color=Cyan>)</font> <font color=Green><u>where</u></font>-<a name="line-88"></a>    toHType p      <font color=Red>=</font> Tuple <font color=Red>[</font>toHType a<font color=Cyan>,</font> toHType b<font color=Red>]</font>-<a name="line-89"></a>                   <font color=Green><u>where</u></font>  <font color=Cyan>(</font>a<font color=Cyan>,</font>b<font color=Cyan>)</font> <font color=Red>=</font> p-<a name="line-90"></a><font color=Green><u>instance</u></font> <font color=Cyan>(</font>HTypeable a<font color=Cyan>,</font> HTypeable b<font color=Cyan>,</font> HTypeable c<font color=Cyan>)</font> <font color=Red>=&gt;</font> HTypeable <font color=Cyan>(</font>a<font color=Cyan>,</font>b<font color=Cyan>,</font>c<font color=Cyan>)</font> <font color=Green><u>where</u></font>-<a name="line-91"></a>    toHType p      <font color=Red>=</font> Tuple <font color=Red>[</font>toHType a<font color=Cyan>,</font> toHType b<font color=Cyan>,</font> toHType c<font color=Red>]</font>-<a name="line-92"></a>                   <font color=Green><u>where</u></font>  <font color=Cyan>(</font>a<font color=Cyan>,</font>b<font color=Cyan>,</font>c<font color=Cyan>)</font> <font color=Red>=</font> p-<a name="line-93"></a><font color=Green><u>instance</u></font> <font color=Cyan>(</font>HTypeable a<font color=Cyan>,</font> HTypeable b<font color=Cyan>,</font> HTypeable c<font color=Cyan>,</font> HTypeable d<font color=Cyan>)</font> <font color=Red>=&gt;</font>-<a name="line-94"></a>         HTypeable <font color=Cyan>(</font>a<font color=Cyan>,</font>b<font color=Cyan>,</font>c<font color=Cyan>,</font>d<font color=Cyan>)</font> <font color=Green><u>where</u></font>-<a name="line-95"></a>    toHType p      <font color=Red>=</font> Tuple <font color=Red>[</font>toHType a<font color=Cyan>,</font> toHType b<font color=Cyan>,</font> toHType c<font color=Cyan>,</font> toHType d<font color=Red>]</font>-<a name="line-96"></a>                   <font color=Green><u>where</u></font>  <font color=Cyan>(</font>a<font color=Cyan>,</font>b<font color=Cyan>,</font>c<font color=Cyan>,</font>d<font color=Cyan>)</font> <font color=Red>=</font> p-<a name="line-97"></a><font color=Green><u>instance</u></font> <font color=Cyan>(</font>HTypeable a<font color=Cyan>,</font> HTypeable b<font color=Cyan>,</font> HTypeable c<font color=Cyan>,</font> HTypeable d<font color=Cyan>,</font> HTypeable e<font color=Cyan>)</font> <font color=Red>=&gt;</font>-<a name="line-98"></a>         HTypeable <font color=Cyan>(</font>a<font color=Cyan>,</font>b<font color=Cyan>,</font>c<font color=Cyan>,</font>d<font color=Cyan>,</font>e<font color=Cyan>)</font> <font color=Green><u>where</u></font>-<a name="line-99"></a>    toHType p      <font color=Red>=</font> Tuple <font color=Red>[</font> toHType a<font color=Cyan>,</font> toHType b<font color=Cyan>,</font> toHType c<font color=Cyan>,</font> toHType d-<a name="line-100"></a>                           <font color=Cyan>,</font> toHType e <font color=Red>]</font>-<a name="line-101"></a>                   <font color=Green><u>where</u></font>  <font color=Cyan>(</font>a<font color=Cyan>,</font>b<font color=Cyan>,</font>c<font color=Cyan>,</font>d<font color=Cyan>,</font>e<font color=Cyan>)</font> <font color=Red>=</font> p-<a name="line-102"></a><font color=Green><u>instance</u></font> <font color=Cyan>(</font> HTypeable a<font color=Cyan>,</font> HTypeable b<font color=Cyan>,</font> HTypeable c<font color=Cyan>,</font> HTypeable d<font color=Cyan>,</font> HTypeable e-<a name="line-103"></a>         <font color=Cyan>,</font> HTypeable f<font color=Cyan>)</font> <font color=Red>=&gt;</font>-<a name="line-104"></a>         HTypeable <font color=Cyan>(</font>a<font color=Cyan>,</font>b<font color=Cyan>,</font>c<font color=Cyan>,</font>d<font color=Cyan>,</font>e<font color=Cyan>,</font>f<font color=Cyan>)</font> <font color=Green><u>where</u></font>-<a name="line-105"></a>    toHType p      <font color=Red>=</font> Tuple <font color=Red>[</font> toHType a<font color=Cyan>,</font> toHType b<font color=Cyan>,</font> toHType c<font color=Cyan>,</font> toHType d-<a name="line-106"></a>                           <font color=Cyan>,</font> toHType e<font color=Cyan>,</font> toHType f <font color=Red>]</font>-<a name="line-107"></a>                   <font color=Green><u>where</u></font>  <font color=Cyan>(</font>a<font color=Cyan>,</font>b<font color=Cyan>,</font>c<font color=Cyan>,</font>d<font color=Cyan>,</font>e<font color=Cyan>,</font>f<font color=Cyan>)</font> <font color=Red>=</font> p-<a name="line-108"></a><font color=Green><u>instance</u></font> <font color=Cyan>(</font> HTypeable a<font color=Cyan>,</font> HTypeable b<font color=Cyan>,</font> HTypeable c<font color=Cyan>,</font> HTypeable d<font color=Cyan>,</font> HTypeable e-<a name="line-109"></a>         <font color=Cyan>,</font> HTypeable f<font color=Cyan>,</font> HTypeable g<font color=Cyan>)</font> <font color=Red>=&gt;</font>-<a name="line-110"></a>         HTypeable <font color=Cyan>(</font>a<font color=Cyan>,</font>b<font color=Cyan>,</font>c<font color=Cyan>,</font>d<font color=Cyan>,</font>e<font color=Cyan>,</font>f<font color=Cyan>,</font>g<font color=Cyan>)</font> <font color=Green><u>where</u></font>-<a name="line-111"></a>    toHType p      <font color=Red>=</font> Tuple <font color=Red>[</font> toHType a<font color=Cyan>,</font> toHType b<font color=Cyan>,</font> toHType c<font color=Cyan>,</font> toHType d-<a name="line-112"></a>                           <font color=Cyan>,</font> toHType e<font color=Cyan>,</font> toHType f<font color=Cyan>,</font> toHType g <font color=Red>]</font>-<a name="line-113"></a>                   <font color=Green><u>where</u></font>  <font color=Cyan>(</font>a<font color=Cyan>,</font>b<font color=Cyan>,</font>c<font color=Cyan>,</font>d<font color=Cyan>,</font>e<font color=Cyan>,</font>f<font color=Cyan>,</font>g<font color=Cyan>)</font> <font color=Red>=</font> p-<a name="line-114"></a><font color=Green><u>instance</u></font> <font color=Cyan>(</font> HTypeable a<font color=Cyan>,</font> HTypeable b<font color=Cyan>,</font> HTypeable c<font color=Cyan>,</font> HTypeable d<font color=Cyan>,</font> HTypeable e-<a name="line-115"></a>         <font color=Cyan>,</font> HTypeable f<font color=Cyan>,</font> HTypeable g<font color=Cyan>,</font> HTypeable h<font color=Cyan>)</font> <font color=Red>=&gt;</font>-<a name="line-116"></a>         HTypeable <font color=Cyan>(</font>a<font color=Cyan>,</font>b<font color=Cyan>,</font>c<font color=Cyan>,</font>d<font color=Cyan>,</font>e<font color=Cyan>,</font>f<font color=Cyan>,</font>g<font color=Cyan>,</font>h<font color=Cyan>)</font> <font color=Green><u>where</u></font>-<a name="line-117"></a>    toHType p      <font color=Red>=</font> Tuple <font color=Red>[</font> toHType a<font color=Cyan>,</font> toHType b<font color=Cyan>,</font> toHType c<font color=Cyan>,</font> toHType d-<a name="line-118"></a>                           <font color=Cyan>,</font> toHType e<font color=Cyan>,</font> toHType f<font color=Cyan>,</font> toHType g<font color=Cyan>,</font> toHType h <font color=Red>]</font>-<a name="line-119"></a>                   <font color=Green><u>where</u></font>  <font color=Cyan>(</font>a<font color=Cyan>,</font>b<font color=Cyan>,</font>c<font color=Cyan>,</font>d<font color=Cyan>,</font>e<font color=Cyan>,</font>f<font color=Cyan>,</font>g<font color=Cyan>,</font>h<font color=Cyan>)</font> <font color=Red>=</font> p-<a name="line-120"></a><font color=Green><u>instance</u></font> <font color=Cyan>(</font> HTypeable a<font color=Cyan>,</font> HTypeable b<font color=Cyan>,</font> HTypeable c<font color=Cyan>,</font> HTypeable d<font color=Cyan>,</font> HTypeable e-<a name="line-121"></a>         <font color=Cyan>,</font> HTypeable f<font color=Cyan>,</font> HTypeable g<font color=Cyan>,</font> HTypeable h<font color=Cyan>,</font> HTypeable i<font color=Cyan>)</font> <font color=Red>=&gt;</font>-<a name="line-122"></a>         HTypeable <font color=Cyan>(</font>a<font color=Cyan>,</font>b<font color=Cyan>,</font>c<font color=Cyan>,</font>d<font color=Cyan>,</font>e<font color=Cyan>,</font>f<font color=Cyan>,</font>g<font color=Cyan>,</font>h<font color=Cyan>,</font>i<font color=Cyan>)</font> <font color=Green><u>where</u></font>-<a name="line-123"></a>    toHType p      <font color=Red>=</font> Tuple <font color=Red>[</font> toHType a<font color=Cyan>,</font> toHType b<font color=Cyan>,</font> toHType c<font color=Cyan>,</font> toHType d-<a name="line-124"></a>                           <font color=Cyan>,</font> toHType e<font color=Cyan>,</font> toHType f<font color=Cyan>,</font> toHType g<font color=Cyan>,</font> toHType h-<a name="line-125"></a>                           <font color=Cyan>,</font> toHType i <font color=Red>]</font>-<a name="line-126"></a>                   <font color=Green><u>where</u></font>  <font color=Cyan>(</font>a<font color=Cyan>,</font>b<font color=Cyan>,</font>c<font color=Cyan>,</font>d<font color=Cyan>,</font>e<font color=Cyan>,</font>f<font color=Cyan>,</font>g<font color=Cyan>,</font>h<font color=Cyan>,</font>i<font color=Cyan>)</font> <font color=Red>=</font> p-<a name="line-127"></a><font color=Green><u>instance</u></font> <font color=Cyan>(</font> HTypeable a<font color=Cyan>,</font> HTypeable b<font color=Cyan>,</font> HTypeable c<font color=Cyan>,</font> HTypeable d<font color=Cyan>,</font> HTypeable e-<a name="line-128"></a>         <font color=Cyan>,</font> HTypeable f<font color=Cyan>,</font> HTypeable g<font color=Cyan>,</font> HTypeable h<font color=Cyan>,</font> HTypeable i<font color=Cyan>,</font> HTypeable j<font color=Cyan>)</font> <font color=Red>=&gt;</font>-<a name="line-129"></a>         HTypeable <font color=Cyan>(</font>a<font color=Cyan>,</font>b<font color=Cyan>,</font>c<font color=Cyan>,</font>d<font color=Cyan>,</font>e<font color=Cyan>,</font>f<font color=Cyan>,</font>g<font color=Cyan>,</font>h<font color=Cyan>,</font>i<font color=Cyan>,</font>j<font color=Cyan>)</font> <font color=Green><u>where</u></font>-<a name="line-130"></a>    toHType p      <font color=Red>=</font> Tuple <font color=Red>[</font> toHType a<font color=Cyan>,</font> toHType b<font color=Cyan>,</font> toHType c<font color=Cyan>,</font> toHType d-<a name="line-131"></a>                           <font color=Cyan>,</font> toHType e<font color=Cyan>,</font> toHType f<font color=Cyan>,</font> toHType g<font color=Cyan>,</font> toHType h-<a name="line-132"></a>                           <font color=Cyan>,</font> toHType i<font color=Cyan>,</font> toHType j <font color=Red>]</font>-<a name="line-133"></a>                   <font color=Green><u>where</u></font>  <font color=Cyan>(</font>a<font color=Cyan>,</font>b<font color=Cyan>,</font>c<font color=Cyan>,</font>d<font color=Cyan>,</font>e<font color=Cyan>,</font>f<font color=Cyan>,</font>g<font color=Cyan>,</font>h<font color=Cyan>,</font>i<font color=Cyan>,</font>j<font color=Cyan>)</font> <font color=Red>=</font> p-<a name="line-134"></a><font color=Green><u>instance</u></font> <font color=Cyan>(</font> HTypeable a<font color=Cyan>,</font> HTypeable b<font color=Cyan>,</font> HTypeable c<font color=Cyan>,</font> HTypeable d<font color=Cyan>,</font> HTypeable e-<a name="line-135"></a>         <font color=Cyan>,</font> HTypeable f<font color=Cyan>,</font> HTypeable g<font color=Cyan>,</font> HTypeable h<font color=Cyan>,</font> HTypeable i<font color=Cyan>,</font> HTypeable j-<a name="line-136"></a>         <font color=Cyan>,</font> HTypeable k<font color=Cyan>)</font> <font color=Red>=&gt;</font>-<a name="line-137"></a>         HTypeable <font color=Cyan>(</font>a<font color=Cyan>,</font>b<font color=Cyan>,</font>c<font color=Cyan>,</font>d<font color=Cyan>,</font>e<font color=Cyan>,</font>f<font color=Cyan>,</font>g<font color=Cyan>,</font>h<font color=Cyan>,</font>i<font color=Cyan>,</font>j<font color=Cyan>,</font>k<font color=Cyan>)</font> <font color=Green><u>where</u></font>-<a name="line-138"></a>    toHType p      <font color=Red>=</font> Tuple <font color=Red>[</font> toHType a<font color=Cyan>,</font> toHType b<font color=Cyan>,</font> toHType c<font color=Cyan>,</font> toHType d-<a name="line-139"></a>                           <font color=Cyan>,</font> toHType e<font color=Cyan>,</font> toHType f<font color=Cyan>,</font> toHType g<font color=Cyan>,</font> toHType h-<a name="line-140"></a>                           <font color=Cyan>,</font> toHType i<font color=Cyan>,</font> toHType j<font color=Cyan>,</font> toHType k <font color=Red>]</font>-<a name="line-141"></a>                   <font color=Green><u>where</u></font>  <font color=Cyan>(</font>a<font color=Cyan>,</font>b<font color=Cyan>,</font>c<font color=Cyan>,</font>d<font color=Cyan>,</font>e<font color=Cyan>,</font>f<font color=Cyan>,</font>g<font color=Cyan>,</font>h<font color=Cyan>,</font>i<font color=Cyan>,</font>j<font color=Cyan>,</font>k<font color=Cyan>)</font> <font color=Red>=</font> p-<a name="line-142"></a><font color=Green><u>instance</u></font> <font color=Cyan>(</font> HTypeable a<font color=Cyan>,</font> HTypeable b<font color=Cyan>,</font> HTypeable c<font color=Cyan>,</font> HTypeable d<font color=Cyan>,</font> HTypeable e-<a name="line-143"></a>         <font color=Cyan>,</font> HTypeable f<font color=Cyan>,</font> HTypeable g<font color=Cyan>,</font> HTypeable h<font color=Cyan>,</font> HTypeable i<font color=Cyan>,</font> HTypeable j-<a name="line-144"></a>         <font color=Cyan>,</font> HTypeable k<font color=Cyan>,</font> HTypeable l<font color=Cyan>)</font> <font color=Red>=&gt;</font>-<a name="line-145"></a>         HTypeable <font color=Cyan>(</font>a<font color=Cyan>,</font>b<font color=Cyan>,</font>c<font color=Cyan>,</font>d<font color=Cyan>,</font>e<font color=Cyan>,</font>f<font color=Cyan>,</font>g<font color=Cyan>,</font>h<font color=Cyan>,</font>i<font color=Cyan>,</font>j<font color=Cyan>,</font>k<font color=Cyan>,</font>l<font color=Cyan>)</font> <font color=Green><u>where</u></font>-<a name="line-146"></a>    toHType p      <font color=Red>=</font> Tuple <font color=Red>[</font> toHType a<font color=Cyan>,</font> toHType b<font color=Cyan>,</font> toHType c<font color=Cyan>,</font> toHType d-<a name="line-147"></a>                           <font color=Cyan>,</font> toHType e<font color=Cyan>,</font> toHType f<font color=Cyan>,</font> toHType g<font color=Cyan>,</font> toHType h-<a name="line-148"></a>                           <font color=Cyan>,</font> toHType i<font color=Cyan>,</font> toHType j<font color=Cyan>,</font> toHType k<font color=Cyan>,</font> toHType l <font color=Red>]</font>-<a name="line-149"></a>                   <font color=Green><u>where</u></font>  <font color=Cyan>(</font>a<font color=Cyan>,</font>b<font color=Cyan>,</font>c<font color=Cyan>,</font>d<font color=Cyan>,</font>e<font color=Cyan>,</font>f<font color=Cyan>,</font>g<font color=Cyan>,</font>h<font color=Cyan>,</font>i<font color=Cyan>,</font>j<font color=Cyan>,</font>k<font color=Cyan>,</font>l<font color=Cyan>)</font> <font color=Red>=</font> p-<a name="line-150"></a><font color=Green><u>instance</u></font> <font color=Cyan>(</font> HTypeable a<font color=Cyan>,</font> HTypeable b<font color=Cyan>,</font> HTypeable c<font color=Cyan>,</font> HTypeable d<font color=Cyan>,</font> HTypeable e-<a name="line-151"></a>         <font color=Cyan>,</font> HTypeable f<font color=Cyan>,</font> HTypeable g<font color=Cyan>,</font> HTypeable h<font color=Cyan>,</font> HTypeable i<font color=Cyan>,</font> HTypeable j-<a name="line-152"></a>         <font color=Cyan>,</font> HTypeable k<font color=Cyan>,</font> HTypeable l<font color=Cyan>,</font> HTypeable m<font color=Cyan>)</font> <font color=Red>=&gt;</font>-<a name="line-153"></a>         HTypeable <font color=Cyan>(</font>a<font color=Cyan>,</font>b<font color=Cyan>,</font>c<font color=Cyan>,</font>d<font color=Cyan>,</font>e<font color=Cyan>,</font>f<font color=Cyan>,</font>g<font color=Cyan>,</font>h<font color=Cyan>,</font>i<font color=Cyan>,</font>j<font color=Cyan>,</font>k<font color=Cyan>,</font>l<font color=Cyan>,</font>m<font color=Cyan>)</font> <font color=Green><u>where</u></font>-<a name="line-154"></a>    toHType p      <font color=Red>=</font> Tuple <font color=Red>[</font> toHType a<font color=Cyan>,</font> toHType b<font color=Cyan>,</font> toHType c<font color=Cyan>,</font> toHType d-<a name="line-155"></a>                           <font color=Cyan>,</font> toHType e<font color=Cyan>,</font> toHType f<font color=Cyan>,</font> toHType g<font color=Cyan>,</font> toHType h-<a name="line-156"></a>                           <font color=Cyan>,</font> toHType i<font color=Cyan>,</font> toHType j<font color=Cyan>,</font> toHType k<font color=Cyan>,</font> toHType l-<a name="line-157"></a>                           <font color=Cyan>,</font> toHType m <font color=Red>]</font>-<a name="line-158"></a>                   <font color=Green><u>where</u></font>  <font color=Cyan>(</font>a<font color=Cyan>,</font>b<font color=Cyan>,</font>c<font color=Cyan>,</font>d<font color=Cyan>,</font>e<font color=Cyan>,</font>f<font color=Cyan>,</font>g<font color=Cyan>,</font>h<font color=Cyan>,</font>i<font color=Cyan>,</font>j<font color=Cyan>,</font>k<font color=Cyan>,</font>l<font color=Cyan>,</font>m<font color=Cyan>)</font> <font color=Red>=</font> p-<a name="line-159"></a><font color=Green><u>instance</u></font> <font color=Cyan>(</font> HTypeable a<font color=Cyan>,</font> HTypeable b<font color=Cyan>,</font> HTypeable c<font color=Cyan>,</font> HTypeable d<font color=Cyan>,</font> HTypeable e-<a name="line-160"></a>         <font color=Cyan>,</font> HTypeable f<font color=Cyan>,</font> HTypeable g<font color=Cyan>,</font> HTypeable h<font color=Cyan>,</font> HTypeable i<font color=Cyan>,</font> HTypeable j-<a name="line-161"></a>         <font color=Cyan>,</font> HTypeable k<font color=Cyan>,</font> HTypeable l<font color=Cyan>,</font> HTypeable m<font color=Cyan>,</font> HTypeable n<font color=Cyan>)</font> <font color=Red>=&gt;</font>-<a name="line-162"></a>         HTypeable <font color=Cyan>(</font>a<font color=Cyan>,</font>b<font color=Cyan>,</font>c<font color=Cyan>,</font>d<font color=Cyan>,</font>e<font color=Cyan>,</font>f<font color=Cyan>,</font>g<font color=Cyan>,</font>h<font color=Cyan>,</font>i<font color=Cyan>,</font>j<font color=Cyan>,</font>k<font color=Cyan>,</font>l<font color=Cyan>,</font>m<font color=Cyan>,</font>n<font color=Cyan>)</font> <font color=Green><u>where</u></font>-<a name="line-163"></a>    toHType p      <font color=Red>=</font> Tuple <font color=Red>[</font> toHType a<font color=Cyan>,</font> toHType b<font color=Cyan>,</font> toHType c<font color=Cyan>,</font> toHType d-<a name="line-164"></a>                           <font color=Cyan>,</font> toHType e<font color=Cyan>,</font> toHType f<font color=Cyan>,</font> toHType g<font color=Cyan>,</font> toHType h-<a name="line-165"></a>                           <font color=Cyan>,</font> toHType i<font color=Cyan>,</font> toHType j<font color=Cyan>,</font> toHType k<font color=Cyan>,</font> toHType l-<a name="line-166"></a>                           <font color=Cyan>,</font> toHType m<font color=Cyan>,</font> toHType n <font color=Red>]</font>-<a name="line-167"></a>                   <font color=Green><u>where</u></font>  <font color=Cyan>(</font>a<font color=Cyan>,</font>b<font color=Cyan>,</font>c<font color=Cyan>,</font>d<font color=Cyan>,</font>e<font color=Cyan>,</font>f<font color=Cyan>,</font>g<font color=Cyan>,</font>h<font color=Cyan>,</font>i<font color=Cyan>,</font>j<font color=Cyan>,</font>k<font color=Cyan>,</font>l<font color=Cyan>,</font>m<font color=Cyan>,</font>n<font color=Cyan>)</font> <font color=Red>=</font> p-<a name="line-168"></a><font color=Green><u>instance</u></font> <font color=Cyan>(</font> HTypeable a<font color=Cyan>,</font> HTypeable b<font color=Cyan>,</font> HTypeable c<font color=Cyan>,</font> HTypeable d<font color=Cyan>,</font> HTypeable e-<a name="line-169"></a>         <font color=Cyan>,</font> HTypeable f<font color=Cyan>,</font> HTypeable g<font color=Cyan>,</font> HTypeable h<font color=Cyan>,</font> HTypeable i<font color=Cyan>,</font> HTypeable j-<a name="line-170"></a>         <font color=Cyan>,</font> HTypeable k<font color=Cyan>,</font> HTypeable l<font color=Cyan>,</font> HTypeable m<font color=Cyan>,</font> HTypeable n<font color=Cyan>,</font> HTypeable o<font color=Cyan>)</font> <font color=Red>=&gt;</font>-<a name="line-171"></a>         HTypeable <font color=Cyan>(</font>a<font color=Cyan>,</font>b<font color=Cyan>,</font>c<font color=Cyan>,</font>d<font color=Cyan>,</font>e<font color=Cyan>,</font>f<font color=Cyan>,</font>g<font color=Cyan>,</font>h<font color=Cyan>,</font>i<font color=Cyan>,</font>j<font color=Cyan>,</font>k<font color=Cyan>,</font>l<font color=Cyan>,</font>m<font color=Cyan>,</font>n<font color=Cyan>,</font>o<font color=Cyan>)</font> <font color=Green><u>where</u></font>-<a name="line-172"></a>    toHType p      <font color=Red>=</font> Tuple <font color=Red>[</font> toHType a<font color=Cyan>,</font> toHType b<font color=Cyan>,</font> toHType c<font color=Cyan>,</font> toHType d-<a name="line-173"></a>                           <font color=Cyan>,</font> toHType e<font color=Cyan>,</font> toHType f<font color=Cyan>,</font> toHType g<font color=Cyan>,</font> toHType h-<a name="line-174"></a>                           <font color=Cyan>,</font> toHType i<font color=Cyan>,</font> toHType j<font color=Cyan>,</font> toHType k<font color=Cyan>,</font> toHType l-<a name="line-175"></a>                           <font color=Cyan>,</font> toHType m<font color=Cyan>,</font> toHType n<font color=Cyan>,</font> toHType o <font color=Red>]</font>-<a name="line-176"></a>                   <font color=Green><u>where</u></font>  <font color=Cyan>(</font>a<font color=Cyan>,</font>b<font color=Cyan>,</font>c<font color=Cyan>,</font>d<font color=Cyan>,</font>e<font color=Cyan>,</font>f<font color=Cyan>,</font>g<font color=Cyan>,</font>h<font color=Cyan>,</font>i<font color=Cyan>,</font>j<font color=Cyan>,</font>k<font color=Cyan>,</font>l<font color=Cyan>,</font>m<font color=Cyan>,</font>n<font color=Cyan>,</font>o<font color=Cyan>)</font> <font color=Red>=</font> p-<a name="line-177"></a>-<a name="line-178"></a><font color=Green><u>instance</u></font> <font color=Cyan>(</font>HTypeable a<font color=Cyan>)</font> <font color=Red>=&gt;</font> HTypeable <font color=Cyan>(</font>Maybe a<font color=Cyan>)</font> <font color=Green><u>where</u></font>-<a name="line-179"></a>    toHType m      <font color=Red>=</font> Maybe <font color=Cyan>(</font>toHType x<font color=Cyan>)</font>   <font color=Green><u>where</u></font>   <font color=Cyan>(</font>Just x<font color=Cyan>)</font> <font color=Red>=</font> m-<a name="line-180"></a><font color=Green><u>instance</u></font> <font color=Cyan>(</font>HTypeable a<font color=Cyan>,</font> HTypeable b<font color=Cyan>)</font> <font color=Red>=&gt;</font> HTypeable <font color=Cyan>(</font>Either a b<font color=Cyan>)</font> <font color=Green><u>where</u></font>-<a name="line-181"></a>    toHType m      <font color=Red>=</font> Defined <font color=Magenta>"Either"</font> <font color=Red>[</font>hx<font color=Cyan>,</font> hy<font color=Red>]</font>-<a name="line-182"></a>                         <font color=Red>[</font> Constr <font color=Magenta>"Left"</font> <font color=Red>[</font>hx<font color=Red>]</font> <font color=Red>[</font>hx<font color=Red>]</font> <font color=Blue>{-Nothing-}</font>-<a name="line-183"></a>                         <font color=Cyan>,</font> Constr <font color=Magenta>"Right"</font> <font color=Red>[</font>hy<font color=Red>]</font> <font color=Red>[</font>hy<font color=Red>]</font> <font color=Blue>{-Nothing-}</font><font color=Red>]</font>-<a name="line-184"></a>                   <font color=Green><u>where</u></font> <font color=Cyan>(</font>Left x<font color=Cyan>)</font>  <font color=Red>=</font> m-<a name="line-185"></a>                         <font color=Cyan>(</font>Right y<font color=Cyan>)</font> <font color=Red>=</font> m-<a name="line-186"></a>                         hx <font color=Red>=</font> toHType x-<a name="line-187"></a>                         hy <font color=Red>=</font> toHType y-<a name="line-188"></a>-<a name="line-189"></a><font color=Green><u>instance</u></font> HTypeable a <font color=Red>=&gt;</font> HTypeable <font color=Red>[</font>a<font color=Red>]</font> <font color=Green><u>where</u></font>-<a name="line-190"></a>    toHType xs     <font color=Red>=</font> <font color=Green><u>case</u></font> toHType x <font color=Green><u>of</u></font> <font color=Cyan>(</font>Prim <font color=Magenta>"Char"</font> <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red>-&gt;</font> String-<a name="line-191"></a>                                       <font color=Green><u>_</u></font> <font color=Red>-&gt;</font> List <font color=Cyan>(</font>toHType x<font color=Cyan>)</font>-<a name="line-192"></a>                   <font color=Green><u>where</u></font>  <font color=Cyan>(</font>x<font color=Red><b>:</b></font><font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red>=</font> xs-<a name="line-193"></a>-<a name="line-194"></a><font color=Blue>------------------------------------------------------------------------</font>-<a name="line-195"></a>-<a name="line-196"></a><a name="toDTD"></a><font color=Blue>-- | 'toDTD' converts a concrete representation of the Haskell type of</font>-<a name="line-197"></a><font color=Blue>--   a value (obtained by the method 'toHType') into a real DocTypeDecl.</font>-<a name="line-198"></a><font color=Blue>--   It ensures that PERefs are defined before they are used, and that no</font>-<a name="line-199"></a><font color=Blue>--   element or attribute-list is declared more than once.</font>-<a name="line-200"></a><font color=Blue>toDTD</font> <font color=Red>::</font> HType <font color=Red>-&gt;</font> DocTypeDecl-<a name="line-201"></a><font color=Blue>toDTD</font> ht <font color=Red>=</font>-<a name="line-202"></a>  DTD <font color=Cyan>(</font>toplevel ht<font color=Cyan>)</font> Nothing <font color=Cyan>(</font>macrosFirst <font color=Cyan>(</font>reverse <font color=Cyan>(</font>h2d True [] [] <font color=Red>[</font>ht<font color=Red>]</font><font color=Cyan>)</font><font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-203"></a>  <font color=Green><u>where</u></font>-<a name="line-204"></a>    macrosFirst <font color=Red>::</font> <font color=Red>[</font>MarkupDecl<font color=Red>]</font> <font color=Red>-&gt;</font> <font color=Red>[</font>MarkupDecl<font color=Red>]</font>-<a name="line-205"></a>    macrosFirst decls <font color=Red>=</font> concat <font color=Red>[</font>p<font color=Cyan>,</font> p'<font color=Red>]</font> <font color=Green><u>where</u></font> <font color=Cyan>(</font>p<font color=Cyan>,</font> p'<font color=Cyan>)</font> <font color=Red>=</font> partition f decls-<a name="line-206"></a>                                             f <font color=Cyan>(</font>Entity <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red>=</font> True-<a name="line-207"></a>                                             f <font color=Green><u>_</u></font> <font color=Red>=</font> False-<a name="line-208"></a>    toplevel ht<font color=Red>@</font><font color=Cyan>(</font>Defined <font color=Green><u>_</u></font> <font color=Green><u>_</u></font> <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red>=</font> showHType ht <font color=Magenta>"-XML"</font>-<a name="line-209"></a>    toplevel ht<font color=Red>@</font><font color=Green><u>_</u></font>               <font color=Red>=</font> showHType ht <font color=Magenta>""</font>-<a name="line-210"></a>    c0 <font color=Red>=</font> False-<a name="line-211"></a>    h2d <font color=Red>::</font> Bool <font color=Red>-&gt;</font> <font color=Red>[</font>HType<font color=Red>]</font> <font color=Red>-&gt;</font> <font color=Red>[</font>Constr<font color=Red>]</font> <font color=Red>-&gt;</font> <font color=Red>[</font>HType<font color=Red>]</font> <font color=Red>-&gt;</font> <font color=Red>[</font>MarkupDecl<font color=Red>]</font>-<a name="line-212"></a>    <font color=Blue>-- toplevel?   history    history   remainingwork     result</font>-<a name="line-213"></a>    h2d c history chist []       <font color=Red>=</font> []-<a name="line-214"></a>    h2d c history chist <font color=Cyan>(</font>ht<font color=Red><b>:</b></font>hts<font color=Cyan>)</font> <font color=Red>=</font>-<a name="line-215"></a>      <font color=Green><u>if</u></font> ht <font color=Cyan>`elem`</font> history <font color=Green><u>then</u></font> h2d c0 history chist hts-<a name="line-216"></a>      <font color=Green><u>else</u></font>-<a name="line-217"></a>        <font color=Green><u>case</u></font> ht <font color=Green><u>of</u></font>-<a name="line-218"></a>          Maybe ht0  <font color=Red>-&gt;</font> declelem ht<font color=Red><b>:</b></font> h2d c0 <font color=Cyan>(</font>ht<font color=Red><b>:</b></font>history<font color=Cyan>)</font> chist <font color=Cyan>(</font>ht0<font color=Red><b>:</b></font>hts<font color=Cyan>)</font>-<a name="line-219"></a>          List ht0   <font color=Red>-&gt;</font> declelem ht<font color=Red><b>:</b></font> h2d c0 <font color=Cyan>(</font>ht<font color=Red><b>:</b></font>history<font color=Cyan>)</font> chist <font color=Cyan>(</font>ht0<font color=Red><b>:</b></font>hts<font color=Cyan>)</font>-<a name="line-220"></a>          Tuple hts0 <font color=Red>-&gt;</font> <font color=Cyan>(</font>c <font color=Cyan>?</font> <font color=Cyan>(</font>declelem ht<font color=Red><b>:</b></font><font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-221"></a>                                     <font color=Cyan>(</font>h2d c0 history chist <font color=Cyan>(</font>hts0<font color=Cyan>++</font>hts<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-222"></a>          Prim s t   <font color=Red>-&gt;</font> declprim ht <font color=Cyan>++</font> h2d c0 <font color=Cyan>(</font>ht<font color=Red><b>:</b></font>history<font color=Cyan>)</font> chist hts-<a name="line-223"></a>          String     <font color=Red>-&gt;</font> declstring<font color=Red><b>:</b></font>    h2d c0 <font color=Cyan>(</font>ht<font color=Red><b>:</b></font>history<font color=Cyan>)</font> chist hts-<a name="line-224"></a>          Defined s <font color=Green><u>_</u></font> cs <font color=Red>-&gt;</font>-<a name="line-225"></a>               <font color=Green><u>let</u></font> hts0 <font color=Red>=</font> concatMap grab cs <font color=Green><u>in</u></font>-<a name="line-226"></a>               <font color=Cyan>(</font>c <font color=Cyan>?</font> <font color=Cyan>(</font>decltopelem ht<font color=Red><b>:</b></font><font color=Cyan>)</font><font color=Cyan>)</font> <font color=Cyan>(</font>declmacro ht chist<font color=Cyan>)</font>-<a name="line-227"></a>               <font color=Cyan>++</font> h2d c0 <font color=Cyan>(</font>ht<font color=Red><b>:</b></font>history<font color=Cyan>)</font> <font color=Cyan>(</font>cs<font color=Cyan>++</font>chist<font color=Cyan>)</font> <font color=Cyan>(</font>hts0<font color=Cyan>++</font>hts<font color=Cyan>)</font>-<a name="line-228"></a>    declelem ht <font color=Red>=</font>-<a name="line-229"></a>      Element <font color=Cyan>(</font>ElementDecl <font color=Cyan>(</font>showHType ht <font color=Magenta>""</font><font color=Cyan>)</font> <font color=Cyan>(</font>ContentSpec <font color=Cyan>(</font>outerHtExpr ht<font color=Cyan>)</font><font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-230"></a>    decltopelem ht <font color=Red>=</font>    <font color=Blue>-- hack to avoid peref at toplevel</font>-<a name="line-231"></a>      Element <font color=Cyan>(</font>ElementDecl <font color=Cyan>(</font>showHType ht <font color=Magenta>"-XML"</font><font color=Cyan>)</font> <font color=Cyan>(</font>ContentSpec <font color=Cyan>(</font>innerHtExpr ht None<font color=Cyan>)</font><font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-232"></a>    declmacro ht<font color=Red>@</font><font color=Cyan>(</font>Defined <font color=Green><u>_</u></font> <font color=Green><u>_</u></font> cs<font color=Cyan>)</font> chist <font color=Red>=</font>-<a name="line-233"></a>      Entity <font color=Cyan>(</font>EntityPEDecl <font color=Cyan>(</font>PEDecl <font color=Cyan>(</font>showHType ht <font color=Magenta>""</font><font color=Cyan>)</font> <font color=Cyan>(</font>PEDefEntityValue ev<font color=Cyan>)</font><font color=Cyan>)</font><font color=Cyan>)</font><font color=Red><b>:</b></font>-<a name="line-234"></a>      concatMap <font color=Cyan>(</font>declConstr chist<font color=Cyan>)</font> cs-<a name="line-235"></a>      <font color=Green><u>where</u></font> ev <font color=Red>=</font> EntityValue <font color=Red>[</font>EVString <font color=Cyan>(</font>render <font color=Cyan>(</font>PP<font color=Cyan>.</font>cp <font color=Cyan>(</font>outerHtExpr ht<font color=Cyan>)</font><font color=Cyan>)</font><font color=Cyan>)</font><font color=Red>]</font>-<a name="line-236"></a>    declConstr chist c<font color=Red>@</font><font color=Cyan>(</font>Constr s fv hts<font color=Cyan>)</font>-<a name="line-237"></a>      <font color=Red>|</font> c <font color=Cyan>`notElem`</font> chist <font color=Red>=</font>-<a name="line-238"></a>          <font color=Red>[</font>Element <font color=Cyan>(</font>ElementDecl <font color=Cyan>(</font>flatConstr c <font color=Magenta>""</font><font color=Cyan>)</font> <font color=Cyan>(</font>ContentSpec <font color=Cyan>(</font>constrHtExpr c<font color=Cyan>)</font><font color=Cyan>)</font><font color=Cyan>)</font><font color=Red>]</font>-<a name="line-239"></a>      <font color=Red>|</font> otherwise <font color=Red>=</font> [] -<a name="line-240"></a>    declprim <font color=Cyan>(</font>Prim s t<font color=Cyan>)</font> <font color=Red>=</font>-<a name="line-241"></a>      <font color=Red>[</font> Element <font color=Cyan>(</font>ElementDecl t EMPTY<font color=Cyan>)</font>-<a name="line-242"></a>      <font color=Cyan>,</font> AttList <font color=Cyan>(</font>AttListDecl t <font color=Red>[</font>AttDef <font color=Magenta>"value"</font> StringType REQUIRED<font color=Red>]</font><font color=Cyan>)</font><font color=Red>]</font>-<a name="line-243"></a>    declstring <font color=Red>=</font>-<a name="line-244"></a>      Element <font color=Cyan>(</font>ElementDecl <font color=Magenta>"string"</font> <font color=Cyan>(</font>Mixed PCDATA<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-245"></a>    grab <font color=Cyan>(</font>Constr <font color=Green><u>_</u></font> <font color=Green><u>_</u></font> hts<font color=Cyan>)</font> <font color=Red>=</font> hts-<a name="line-246"></a>-<a name="line-247"></a><a name="?"></a><font color=Cyan>(</font><font color=Cyan>?</font><font color=Cyan>)</font> <font color=Red>::</font> Bool <font color=Red>-&gt;</font> <font color=Cyan>(</font>a<font color=Red>-&gt;</font>a<font color=Cyan>)</font> <font color=Red>-&gt;</font> <font color=Cyan>(</font>a<font color=Red>-&gt;</font>a<font color=Cyan>)</font>-<a name="line-248"></a><a name="b"></a><font color=Blue>b</font> <font color=Cyan>?</font> f <font color=Red>|</font> b     <font color=Red>=</font> f-<a name="line-249"></a>      <font color=Red>|</font> not b <font color=Red>=</font> id-<a name="line-250"></a>-<a name="line-251"></a><a name="showHType"></a><font color=Blue>-- Flatten an HType to a String suitable for an XML tagname.</font>-<a name="line-252"></a><font color=Blue>showHType</font> <font color=Red>::</font> HType <font color=Red>-&gt;</font> ShowS-<a name="line-253"></a><font color=Blue>showHType</font> <font color=Cyan>(</font>Maybe ht<font color=Cyan>)</font>  <font color=Red>=</font> showString <font color=Magenta>"maybe-"</font> <font color=Cyan>.</font> showHType ht-<a name="line-254"></a><font color=Blue>showHType</font> <font color=Cyan>(</font>List ht<font color=Cyan>)</font>   <font color=Red>=</font> showString <font color=Magenta>"list-"</font> <font color=Cyan>.</font> showHType ht-<a name="line-255"></a><font color=Blue>showHType</font> <font color=Cyan>(</font>Tuple hts<font color=Cyan>)</font> <font color=Red>=</font> showString <font color=Magenta>"tuple"</font> <font color=Cyan>.</font> shows <font color=Cyan>(</font>length hts<font color=Cyan>)</font>-<a name="line-256"></a>                        <font color=Cyan>.</font> showChar <font color=Magenta>'-'</font>-<a name="line-257"></a>                        <font color=Cyan>.</font> foldr1 <font color=Cyan>(</font><font color=Cyan>.</font><font color=Cyan>)</font> <font color=Cyan>(</font>intersperse <font color=Cyan>(</font>showChar <font color=Magenta>'-'</font><font color=Cyan>)</font>-<a name="line-258"></a>                                                  <font color=Cyan>(</font>map showHType hts<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-259"></a><font color=Blue>showHType</font> <font color=Cyan>(</font>Prim s t<font color=Cyan>)</font>  <font color=Red>=</font> showString t-<a name="line-260"></a><font color=Blue>showHType</font> String      <font color=Red>=</font> showString <font color=Magenta>"string"</font>-<a name="line-261"></a><font color=Blue>showHType</font> <font color=Cyan>(</font>Defined s fv <font color=Green><u>_</u></font><font color=Cyan>)</font>-<a name="line-262"></a>                      <font color=Red>=</font> showString s <font color=Cyan>.</font> <font color=Cyan>(</font><font color=Cyan>(</font>length fv <font color=Cyan>&gt;</font> <font color=Magenta>0</font><font color=Cyan>)</font> <font color=Cyan>?</font> <font color=Cyan>(</font>showChar <font color=Magenta>'-'</font><font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-263"></a>                        <font color=Cyan>.</font> foldr <font color=Cyan>(</font><font color=Cyan>.</font><font color=Cyan>)</font> id <font color=Cyan>(</font>intersperse <font color=Cyan>(</font>showChar <font color=Magenta>'-'</font><font color=Cyan>)</font>-<a name="line-264"></a>                                                    <font color=Cyan>(</font>map showHType fv<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-265"></a>-<a name="line-266"></a><a name="flatConstr"></a><font color=Blue>flatConstr</font> <font color=Red>::</font> Constr <font color=Red>-&gt;</font> ShowS-<a name="line-267"></a><font color=Blue>flatConstr</font> <font color=Cyan>(</font>Constr s fv <font color=Green><u>_</u></font><font color=Cyan>)</font>-<a name="line-268"></a>        <font color=Red>=</font> showString s <font color=Cyan>.</font> <font color=Cyan>(</font><font color=Cyan>(</font>length fv <font color=Cyan>&gt;</font> <font color=Magenta>0</font><font color=Cyan>)</font> <font color=Cyan>?</font> <font color=Cyan>(</font>showChar <font color=Magenta>'-'</font><font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-269"></a>          <font color=Cyan>.</font> foldr <font color=Cyan>(</font><font color=Cyan>.</font><font color=Cyan>)</font> id <font color=Cyan>(</font>intersperse <font color=Cyan>(</font>showChar <font color=Magenta>'-'</font><font color=Cyan>)</font> <font color=Cyan>(</font>map showHType fv<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-270"></a>-<a name="line-271"></a><a name="outerHtExpr"></a><font color=Blue>outerHtExpr</font> <font color=Red>::</font> HType <font color=Red>-&gt;</font> CP-<a name="line-272"></a><font color=Blue>outerHtExpr</font> <font color=Cyan>(</font>Maybe ht<font color=Cyan>)</font>      <font color=Red>=</font> innerHtExpr ht Query-<a name="line-273"></a><font color=Blue>outerHtExpr</font> <font color=Cyan>(</font>List ht<font color=Cyan>)</font>       <font color=Red>=</font> innerHtExpr ht Star-<a name="line-274"></a><font color=Blue>outerHtExpr</font> <font color=Cyan>(</font>Defined s fv cs<font color=Cyan>)</font> <font color=Red>=</font>-<a name="line-275"></a>    Choice <font color=Cyan>(</font>map <font color=Cyan>(</font><font color=Red>\</font>c<font color=Red>-&gt;</font>TagName <font color=Cyan>(</font>flatConstr c <font color=Magenta>""</font><font color=Cyan>)</font> None<font color=Cyan>)</font> cs<font color=Cyan>)</font> None-<a name="line-276"></a><font color=Blue>outerHtExpr</font> ht              <font color=Red>=</font> innerHtExpr ht None-<a name="line-277"></a>-<a name="line-278"></a><a name="innerHtExpr"></a><font color=Blue>innerHtExpr</font> <font color=Red>::</font> HType <font color=Red>-&gt;</font> Modifier <font color=Red>-&gt;</font> CP-<a name="line-279"></a><font color=Blue>innerHtExpr</font> <font color=Cyan>(</font>Prim s t<font color=Cyan>)</font>  m <font color=Red>=</font> TagName t m-<a name="line-280"></a><font color=Blue>innerHtExpr</font> <font color=Cyan>(</font>Tuple hts<font color=Cyan>)</font> m <font color=Red>=</font> Seq <font color=Cyan>(</font>map <font color=Cyan>(</font><font color=Red>\</font>c<font color=Red>-&gt;</font> innerHtExpr c None<font color=Cyan>)</font> hts<font color=Cyan>)</font> m-<a name="line-281"></a><font color=Blue>innerHtExpr</font> ht<font color=Red>@</font><font color=Cyan>(</font>Defined s hts cs<font color=Cyan>)</font> m <font color=Red>=</font> <font color=Blue>-- CPPE (showHType ht "") (outerHtExpr ht)</font>-<a name="line-282"></a>                                      TagName <font color=Cyan>(</font><font color=Magenta>'%'</font><font color=Red><b>:</b></font> showHType ht <font color=Magenta>";"</font><font color=Cyan>)</font> m-<a name="line-283"></a>                                                        <font color=Blue>--  ***HACK!!!***</font>-<a name="line-284"></a><font color=Blue>innerHtExpr</font> ht m <font color=Red>=</font> TagName <font color=Cyan>(</font>showHType ht <font color=Magenta>""</font><font color=Cyan>)</font> m-<a name="line-285"></a>-<a name="line-286"></a><a name="constrHtExpr"></a><font color=Blue>constrHtExpr</font> <font color=Red>::</font> Constr <font color=Red>-&gt;</font> CP-<a name="line-287"></a><font color=Blue>constrHtExpr</font> <font color=Cyan>(</font>Constr s fv []<font color=Cyan>)</font>  <font color=Red>=</font> TagName <font color=Magenta>"EMPTY"</font> None   <font color=Blue>--  ***HACK!!!***</font>-<a name="line-288"></a><font color=Blue>constrHtExpr</font> <font color=Cyan>(</font>Constr s fv hts<font color=Cyan>)</font> <font color=Red>=</font> innerHtExpr <font color=Cyan>(</font>Tuple hts<font color=Cyan>)</font> None-<a name="line-289"></a>-<a name="line-290"></a><font color=Blue>------------------------------------------------------------------------</font>-</pre>-</body>-</html>
− docs/HaXml/src/Text/XML/HaXml/Types.html
@@ -1,302 +0,0 @@-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">-<html>-<head>-<!-- Generated by HsColour, http://www.cs.york.ac.uk/fp/darcs/hscolour/ -->-<title>src/Text/XML/HaXml/Types.hs</title>-</head>-<body>-<pre><a name="line-1"></a><font color=Blue>{- |-<a name="line-2"></a>   This module defines an internal (generic) representation for XML-<a name="line-3"></a>   documents including their DTDs.-<a name="line-4"></a>-<a name="line-5"></a>   History:-<a name="line-6"></a>   The original module was derived by hand from the XML specification,-<a name="line-7"></a>   following the grammar precisely.  Then we simplified the types,-<a name="line-8"></a>   removing layers of indirection and redundancy, and generally making-<a name="line-9"></a>   things easier to work with.  Then we allowed PEReferences to be-<a name="line-10"></a>   ubiquitous, by removing them from the types and resolving all-<a name="line-11"></a>   PE references at parse-time.  Finally, we added a per-document-<a name="line-12"></a>   symbol table for GEReferences, and a whitespace-significance flag-<a name="line-13"></a>   for plaintext.-<a name="line-14"></a>-}</font>-<a name="line-15"></a>-<a name="line-16"></a><font color=Green><u>module</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Types-<a name="line-17"></a>  <font color=Cyan>(</font>-<a name="line-18"></a>  <font color=Blue>-- * A simple symbol table mapping strings (references) to values.</font>-<a name="line-19"></a>    SymTab-<a name="line-20"></a>  <font color=Blue>-- ** Symbol table operations</font>-<a name="line-21"></a>  <font color=Cyan>,</font> emptyST-<a name="line-22"></a>  <font color=Cyan>,</font> addST-<a name="line-23"></a>  <font color=Cyan>,</font> lookupST-<a name="line-24"></a>-<a name="line-25"></a>  <font color=Blue>-- * XML Types</font>-<a name="line-26"></a>  <font color=Blue>-- ** The top-level document container</font>-<a name="line-27"></a>  <font color=Cyan>,</font> Document<font color=Cyan>(</font><font color=Red>..</font><font color=Cyan>)</font>-<a name="line-28"></a>-<a name="line-29"></a>  <font color=Blue>-- ** The main document content</font>-<a name="line-30"></a>  <font color=Cyan>,</font> Element<font color=Cyan>(</font><font color=Red>..</font><font color=Cyan>)</font>-<a name="line-31"></a>  <font color=Cyan>,</font> ElemTag<font color=Cyan>(</font><font color=Red>..</font><font color=Cyan>)</font>-<a name="line-32"></a>  <font color=Cyan>,</font> Content<font color=Cyan>(</font><font color=Red>..</font><font color=Cyan>)</font>-<a name="line-33"></a>  <font color=Cyan>,</font> Attribute-<a name="line-34"></a>  <font color=Cyan>,</font> AttValue<font color=Cyan>(</font><font color=Red>..</font><font color=Cyan>)</font>-<a name="line-35"></a>  <font color=Cyan>,</font> info-<a name="line-36"></a>-<a name="line-37"></a>  <font color=Blue>-- ** Administrative parts of the document</font>-<a name="line-38"></a>  <font color=Cyan>,</font> Prolog<font color=Cyan>(</font><font color=Red>..</font><font color=Cyan>)</font>-<a name="line-39"></a>  <font color=Cyan>,</font> XMLDecl<font color=Cyan>(</font><font color=Red>..</font><font color=Cyan>)</font>-<a name="line-40"></a>  <font color=Cyan>,</font> Misc<font color=Cyan>(</font><font color=Red>..</font><font color=Cyan>)</font>-<a name="line-41"></a>  <font color=Cyan>,</font> ProcessingInstruction-<a name="line-42"></a>  <font color=Cyan>,</font> SDDecl-<a name="line-43"></a>  <font color=Cyan>,</font> VersionInfo-<a name="line-44"></a>  <font color=Cyan>,</font> Comment-<a name="line-45"></a>  <font color=Cyan>,</font> PITarget-<a name="line-46"></a>-<a name="line-47"></a>  <font color=Blue>-- ** The DTD</font>-<a name="line-48"></a>  <font color=Blue>-- *** content model</font>-<a name="line-49"></a>  <font color=Cyan>,</font> DocTypeDecl<font color=Cyan>(</font><font color=Red>..</font><font color=Cyan>)</font>-<a name="line-50"></a>  <font color=Cyan>,</font> MarkupDecl<font color=Cyan>(</font><font color=Red>..</font><font color=Cyan>)</font>-<a name="line-51"></a>  <font color=Cyan>,</font> ExtSubset<font color=Cyan>(</font><font color=Red>..</font><font color=Cyan>)</font>-<a name="line-52"></a>  <font color=Cyan>,</font> ExtSubsetDecl<font color=Cyan>(</font><font color=Red>..</font><font color=Cyan>)</font>-<a name="line-53"></a>  <font color=Cyan>,</font> ElementDecl<font color=Cyan>(</font><font color=Red>..</font><font color=Cyan>)</font>-<a name="line-54"></a>  <font color=Cyan>,</font> ContentSpec<font color=Cyan>(</font><font color=Red>..</font><font color=Cyan>)</font>-<a name="line-55"></a>  <font color=Cyan>,</font> CP<font color=Cyan>(</font><font color=Red>..</font><font color=Cyan>)</font>-<a name="line-56"></a>  <font color=Cyan>,</font> Modifier<font color=Cyan>(</font><font color=Red>..</font><font color=Cyan>)</font>-<a name="line-57"></a>  <font color=Cyan>,</font> Mixed<font color=Cyan>(</font><font color=Red>..</font><font color=Cyan>)</font>-<a name="line-58"></a>-<a name="line-59"></a>  <font color=Blue>-- *** attribute model</font>-<a name="line-60"></a>  <font color=Cyan>,</font> AttListDecl<font color=Cyan>(</font><font color=Red>..</font><font color=Cyan>)</font>-<a name="line-61"></a>  <font color=Cyan>,</font> AttDef<font color=Cyan>(</font><font color=Red>..</font><font color=Cyan>)</font>-<a name="line-62"></a>  <font color=Cyan>,</font> AttType<font color=Cyan>(</font><font color=Red>..</font><font color=Cyan>)</font>-<a name="line-63"></a>  <font color=Cyan>,</font> TokenizedType<font color=Cyan>(</font><font color=Red>..</font><font color=Cyan>)</font>-<a name="line-64"></a>  <font color=Cyan>,</font> EnumeratedType<font color=Cyan>(</font><font color=Red>..</font><font color=Cyan>)</font>-<a name="line-65"></a>  <font color=Cyan>,</font> NotationType-<a name="line-66"></a>  <font color=Cyan>,</font> Enumeration-<a name="line-67"></a>  <font color=Cyan>,</font> DefaultDecl<font color=Cyan>(</font><font color=Red>..</font><font color=Cyan>)</font>-<a name="line-68"></a>  <font color=Cyan>,</font> FIXED<font color=Cyan>(</font><font color=Red>..</font><font color=Cyan>)</font>-<a name="line-69"></a>-<a name="line-70"></a>  <font color=Blue>-- *** conditional sections</font>-<a name="line-71"></a>  <font color=Cyan>,</font> ConditionalSect<font color=Cyan>(</font><font color=Red>..</font><font color=Cyan>)</font>-<a name="line-72"></a>  <font color=Cyan>,</font> IncludeSect-<a name="line-73"></a>  <font color=Cyan>,</font> IgnoreSect-<a name="line-74"></a>  <font color=Cyan>,</font> Ignore<font color=Cyan>(</font><font color=Red>..</font><font color=Cyan>)</font>-<a name="line-75"></a>  <font color=Cyan>,</font> IgnoreSectContents<font color=Cyan>(</font><font color=Red>..</font><font color=Cyan>)</font>-<a name="line-76"></a>-<a name="line-77"></a>  <font color=Blue>-- ** References</font>-<a name="line-78"></a>  <font color=Cyan>,</font> Reference<font color=Cyan>(</font><font color=Red>..</font><font color=Cyan>)</font>-<a name="line-79"></a>  <font color=Cyan>,</font> EntityRef-<a name="line-80"></a>  <font color=Cyan>,</font> CharRef-<a name="line-81"></a>  <font color=Cyan>,</font> PEReference-<a name="line-82"></a>-<a name="line-83"></a>  <font color=Blue>-- ** Entities</font>-<a name="line-84"></a>  <font color=Cyan>,</font> EntityDecl<font color=Cyan>(</font><font color=Red>..</font><font color=Cyan>)</font>-<a name="line-85"></a>  <font color=Cyan>,</font> GEDecl<font color=Cyan>(</font><font color=Red>..</font><font color=Cyan>)</font>-<a name="line-86"></a>  <font color=Cyan>,</font> PEDecl<font color=Cyan>(</font><font color=Red>..</font><font color=Cyan>)</font>-<a name="line-87"></a>  <font color=Cyan>,</font> EntityDef<font color=Cyan>(</font><font color=Red>..</font><font color=Cyan>)</font>-<a name="line-88"></a>  <font color=Cyan>,</font> PEDef<font color=Cyan>(</font><font color=Red>..</font><font color=Cyan>)</font>-<a name="line-89"></a>  <font color=Cyan>,</font> ExternalID<font color=Cyan>(</font><font color=Red>..</font><font color=Cyan>)</font>-<a name="line-90"></a>  <font color=Cyan>,</font> NDataDecl<font color=Cyan>(</font><font color=Red>..</font><font color=Cyan>)</font>-<a name="line-91"></a>  <font color=Cyan>,</font> TextDecl<font color=Cyan>(</font><font color=Red>..</font><font color=Cyan>)</font>-<a name="line-92"></a>  <font color=Cyan>,</font> ExtParsedEnt<font color=Cyan>(</font><font color=Red>..</font><font color=Cyan>)</font>-<a name="line-93"></a>  <font color=Cyan>,</font> ExtPE<font color=Cyan>(</font><font color=Red>..</font><font color=Cyan>)</font>-<a name="line-94"></a>  <font color=Cyan>,</font> NotationDecl<font color=Cyan>(</font><font color=Red>..</font><font color=Cyan>)</font>-<a name="line-95"></a>  <font color=Cyan>,</font> PublicID<font color=Cyan>(</font><font color=Red>..</font><font color=Cyan>)</font>-<a name="line-96"></a>  <font color=Cyan>,</font> EncodingDecl<font color=Cyan>(</font><font color=Red>..</font><font color=Cyan>)</font>-<a name="line-97"></a>  <font color=Cyan>,</font> EntityValue<font color=Cyan>(</font><font color=Red>..</font><font color=Cyan>)</font>-<a name="line-98"></a>  <font color=Cyan>,</font> EV<font color=Cyan>(</font><font color=Red>..</font><font color=Cyan>)</font>-<a name="line-99"></a>  <font color=Cyan>,</font> PubidLiteral<font color=Cyan>(</font><font color=Red>..</font><font color=Cyan>)</font>-<a name="line-100"></a>  <font color=Cyan>,</font> SystemLiteral<font color=Cyan>(</font><font color=Red>..</font><font color=Cyan>)</font>-<a name="line-101"></a>-<a name="line-102"></a>  <font color=Blue>-- ** Basic value types</font>-<a name="line-103"></a>  <font color=Cyan>,</font> Name-<a name="line-104"></a>  <font color=Cyan>,</font> Names-<a name="line-105"></a>  <font color=Cyan>,</font> NmToken-<a name="line-106"></a>  <font color=Cyan>,</font> NmTokens-<a name="line-107"></a>  <font color=Cyan>,</font> CharData-<a name="line-108"></a>  <font color=Cyan>,</font> CDSect-<a name="line-109"></a>  <font color=Cyan>)</font> <font color=Green><u>where</u></font>-<a name="line-110"></a>-<a name="line-111"></a>-<a name="line-112"></a><font color=Blue>{- A simple symbol table for storing macros whilst parsing. -}</font>-<a name="line-113"></a>-<a name="line-114"></a><a name="SymTab"></a><font color=Green><u>type</u></font> SymTab a <font color=Red>=</font> <font color=Red>[</font><font color=Cyan>(</font>String<font color=Cyan>,</font>a<font color=Cyan>)</font><font color=Red>]</font>-<a name="line-115"></a>-<a name="line-116"></a><a name="emptyST"></a><font color=Blue>emptyST</font> <font color=Red>::</font> SymTab a-<a name="line-117"></a><font color=Blue>emptyST</font>  <font color=Red>=</font> []-<a name="line-118"></a>-<a name="line-119"></a><a name="addST"></a><font color=Blue>addST</font> <font color=Red>::</font> String <font color=Red>-&gt;</font> a <font color=Red>-&gt;</font> SymTab a <font color=Red>-&gt;</font> SymTab a-<a name="line-120"></a><font color=Blue>addST</font> n v <font color=Red>=</font> <font color=Cyan>(</font><font color=Cyan>(</font>n<font color=Cyan>,</font>v<font color=Cyan>)</font><font color=Red><b>:</b></font><font color=Cyan>)</font>-<a name="line-121"></a>-<a name="line-122"></a><a name="lookupST"></a><font color=Blue>lookupST</font> <font color=Red>::</font> String <font color=Red>-&gt;</font> SymTab a <font color=Red>-&gt;</font> Maybe a-<a name="line-123"></a><font color=Blue>lookupST</font> <font color=Red>=</font> lookup-<a name="line-124"></a>-<a name="line-125"></a>-<a name="line-126"></a>-<a name="line-127"></a><font color=Blue>{- XML types start here -}</font>-<a name="line-128"></a>-<a name="line-129"></a><a name="Document"></a><font color=Blue>-- | The symbol table stored in a document holds all its general entity</font>-<a name="line-130"></a><a name="Document"></a><font color=Blue>--   reference definitions.</font>-<a name="line-131"></a><a name="Document"></a><font color=Green><u>data</u></font> Document i <font color=Red>=</font> Document Prolog <font color=Cyan>(</font>SymTab EntityDef<font color=Cyan>)</font> <font color=Cyan>(</font>Element i<font color=Cyan>)</font> <font color=Red>[</font>Misc<font color=Red>]</font>-<a name="line-132"></a>                  <font color=Green><u>deriving</u></font> Eq-<a name="line-133"></a><a name="Prolog"></a><font color=Green><u>data</u></font> Prolog     <font color=Red>=</font> Prolog <font color=Cyan>(</font>Maybe XMLDecl<font color=Cyan>)</font> <font color=Red>[</font>Misc<font color=Red>]</font> <font color=Cyan>(</font>Maybe DocTypeDecl<font color=Cyan>)</font> <font color=Red>[</font>Misc<font color=Red>]</font>-<a name="line-134"></a>                  <font color=Green><u>deriving</u></font> Eq-<a name="line-135"></a><a name="XMLDecl"></a><font color=Green><u>data</u></font> XMLDecl    <font color=Red>=</font> XMLDecl VersionInfo <font color=Cyan>(</font>Maybe EncodingDecl<font color=Cyan>)</font> <font color=Cyan>(</font>Maybe SDDecl<font color=Cyan>)</font>-<a name="line-136"></a>                  <font color=Green><u>deriving</u></font> Eq-<a name="line-137"></a><a name="Misc"></a><font color=Green><u>data</u></font> Misc       <font color=Red>=</font> Comment Comment-<a name="line-138"></a>                <font color=Red>|</font> PI ProcessingInstruction-<a name="line-139"></a>                <font color=Green><u>deriving</u></font> Eq-<a name="line-140"></a>-<a name="line-141"></a><a name="ProcessingInstruction"></a><font color=Green><u>type</u></font> ProcessingInstruction <font color=Red>=</font> <font color=Cyan>(</font>PITarget<font color=Cyan>,</font>String<font color=Cyan>)</font>-<a name="line-142"></a>-<a name="line-143"></a><a name="SDDecl"></a><font color=Green><u>type</u></font> SDDecl      <font color=Red>=</font> Bool-<a name="line-144"></a><a name="VersionInfo"></a><font color=Green><u>type</u></font> VersionInfo <font color=Red>=</font> String-<a name="line-145"></a><a name="Comment"></a><font color=Green><u>type</u></font> Comment     <font color=Red>=</font> String-<a name="line-146"></a><a name="PITarget"></a><font color=Green><u>type</u></font> PITarget    <font color=Red>=</font> String-<a name="line-147"></a>-<a name="line-148"></a><a name="DocTypeDecl"></a><font color=Green><u>data</u></font> DocTypeDecl <font color=Red>=</font> DTD Name <font color=Cyan>(</font>Maybe ExternalID<font color=Cyan>)</font> <font color=Red>[</font>MarkupDecl<font color=Red>]</font>  <font color=Green><u>deriving</u></font> Eq-<a name="line-149"></a><a name="MarkupDecl"></a><font color=Green><u>data</u></font> MarkupDecl  <font color=Red>=</font> Element  ElementDecl-<a name="line-150"></a>                 <font color=Red>|</font> AttList  AttListDecl-<a name="line-151"></a>                 <font color=Red>|</font> Entity   EntityDecl-<a name="line-152"></a>                 <font color=Red>|</font> Notation NotationDecl-<a name="line-153"></a>                 <font color=Red>|</font> MarkupMisc Misc-<a name="line-154"></a>                 <font color=Green><u>deriving</u></font> Eq-<a name="line-155"></a>-<a name="line-156"></a><a name="ExtSubset"></a><font color=Green><u>data</u></font> ExtSubset     <font color=Red>=</font> ExtSubset <font color=Cyan>(</font>Maybe TextDecl<font color=Cyan>)</font> <font color=Red>[</font>ExtSubsetDecl<font color=Red>]</font>  <font color=Green><u>deriving</u></font> Eq-<a name="line-157"></a><a name="ExtSubsetDecl"></a><font color=Green><u>data</u></font> ExtSubsetDecl <font color=Red>=</font> ExtMarkupDecl MarkupDecl-<a name="line-158"></a>                   <font color=Red>|</font> ExtConditionalSect ConditionalSect-<a name="line-159"></a>                   <font color=Green><u>deriving</u></font> Eq-<a name="line-160"></a>-<a name="line-161"></a><a name="Element"></a><font color=Green><u>data</u></font> Element i <font color=Red>=</font> Elem Name <font color=Red>[</font>Attribute<font color=Red>]</font> <font color=Red>[</font>Content i<font color=Red>]</font> <font color=Green><u>deriving</u></font> Eq-<a name="line-162"></a>                                        <font color=Blue>--  intermediate for parsing</font>-<a name="line-163"></a><a name="ElemTag"></a><font color=Green><u>data</u></font> ElemTag   <font color=Red>=</font> ElemTag Name <font color=Red>[</font>Attribute<font color=Red>]</font>-<a name="line-164"></a><a name="Attribute"></a><font color=Green><u>type</u></font> Attribute <font color=Red>=</font> <font color=Cyan>(</font>Name<font color=Cyan>,</font> AttValue<font color=Cyan>)</font>-<a name="line-165"></a><a name="Content"></a><font color=Green><u>data</u></font> Content i <font color=Red>=</font> CElem <font color=Cyan>(</font>Element i<font color=Cyan>)</font> i-<a name="line-166"></a>               <font color=Red>|</font> CString Bool CharData i-<a name="line-167"></a>                        <font color=Blue>-- ^ bool is whether whitespace is significant</font>-<a name="line-168"></a>               <font color=Red>|</font> CRef Reference i-<a name="line-169"></a>               <font color=Red>|</font> CMisc Misc i-<a name="line-170"></a>               <font color=Green><u>deriving</u></font> Eq-<a name="line-171"></a>-<a name="line-172"></a><a name="info"></a><font color=Blue>info</font> <font color=Red>::</font> Content t <font color=Red>-&gt;</font> t-<a name="line-173"></a><font color=Blue>info</font> <font color=Cyan>(</font>CElem <font color=Green><u>_</u></font> i<font color=Cyan>)</font> <font color=Red>=</font> i-<a name="line-174"></a><font color=Blue>info</font> <font color=Cyan>(</font>CString <font color=Green><u>_</u></font> <font color=Green><u>_</u></font> i<font color=Cyan>)</font> <font color=Red>=</font> i-<a name="line-175"></a><font color=Blue>info</font> <font color=Cyan>(</font>CRef <font color=Green><u>_</u></font> i<font color=Cyan>)</font> <font color=Red>=</font> i-<a name="line-176"></a><font color=Blue>info</font> <font color=Cyan>(</font>CMisc <font color=Green><u>_</u></font> i<font color=Cyan>)</font> <font color=Red>=</font> i-<a name="line-177"></a>-<a name="line-178"></a><font color=Green><u>instance</u></font> Functor Document <font color=Green><u>where</u></font>-<a name="line-179"></a>  fmap f <font color=Cyan>(</font>Document p st e ms<font color=Cyan>)</font> <font color=Red>=</font> Document p st <font color=Cyan>(</font>fmap f e<font color=Cyan>)</font> ms-<a name="line-180"></a><font color=Green><u>instance</u></font> Functor Element <font color=Green><u>where</u></font>-<a name="line-181"></a>  fmap f <font color=Cyan>(</font>Elem t <font color=Green><u>as</u></font> cs<font color=Cyan>)</font> <font color=Red>=</font> Elem t <font color=Green><u>as</u></font> <font color=Cyan>(</font>map <font color=Cyan>(</font>fmap f<font color=Cyan>)</font> cs<font color=Cyan>)</font>-<a name="line-182"></a><font color=Green><u>instance</u></font> Functor Content <font color=Green><u>where</u></font>-<a name="line-183"></a>  fmap f <font color=Cyan>(</font>CElem e i<font color=Cyan>)</font>     <font color=Red>=</font> CElem <font color=Cyan>(</font>fmap f e<font color=Cyan>)</font> <font color=Cyan>(</font>f i<font color=Cyan>)</font>-<a name="line-184"></a>  fmap f <font color=Cyan>(</font>CString b s i<font color=Cyan>)</font> <font color=Red>=</font> CString b s <font color=Cyan>(</font>f i<font color=Cyan>)</font>-<a name="line-185"></a>  fmap f <font color=Cyan>(</font>CRef r i<font color=Cyan>)</font>      <font color=Red>=</font> CRef r <font color=Cyan>(</font>f i<font color=Cyan>)</font>-<a name="line-186"></a>  fmap f <font color=Cyan>(</font>CMisc m i<font color=Cyan>)</font>     <font color=Red>=</font> CMisc m <font color=Cyan>(</font>f i<font color=Cyan>)</font>-<a name="line-187"></a>-<a name="line-188"></a><a name="ElementDecl"></a><font color=Green><u>data</u></font> ElementDecl <font color=Red>=</font> ElementDecl Name ContentSpec <font color=Green><u>deriving</u></font> Eq-<a name="line-189"></a><a name="ContentSpec"></a><font color=Green><u>data</u></font> ContentSpec <font color=Red>=</font> EMPTY-<a name="line-190"></a>                 <font color=Red>|</font> ANY-<a name="line-191"></a>                 <font color=Red>|</font> Mixed Mixed-<a name="line-192"></a>                 <font color=Red>|</font> ContentSpec CP-<a name="line-193"></a>                 <font color=Green><u>deriving</u></font> Eq-<a name="line-194"></a><a name="CP"></a><font color=Blue>-- FIXME: What is TagName here? Seems to be in disagreement with XML spec.</font>-<a name="line-195"></a><a name="CP"></a><font color=Green><u>data</u></font> CP <font color=Red>=</font> TagName Name Modifier-<a name="line-196"></a>        <font color=Red>|</font> Choice <font color=Red>[</font>CP<font color=Red>]</font> Modifier-<a name="line-197"></a>        <font color=Red>|</font> Seq <font color=Red>[</font>CP<font color=Red>]</font> Modifier-<a name="line-198"></a>        <font color=Green><u>deriving</u></font> Eq-<a name="line-199"></a><a name="Modifier"></a><font color=Green><u>data</u></font> Modifier <font color=Red>=</font> None  <font color=Blue>-- ^ Just One</font>-<a name="line-200"></a>              <font color=Red>|</font> Query <font color=Blue>-- ^ Zero Or One</font>-<a name="line-201"></a>              <font color=Red>|</font> Star  <font color=Blue>-- ^ Zero Or More</font>-<a name="line-202"></a>              <font color=Red>|</font> Plus  <font color=Blue>-- ^ One Or More</font>-<a name="line-203"></a>              <font color=Green><u>deriving</u></font> Eq-<a name="line-204"></a><a name="Mixed"></a><font color=Green><u>data</u></font> Mixed <font color=Red>=</font> PCDATA-<a name="line-205"></a>           <font color=Red>|</font> PCDATAplus <font color=Red>[</font>Name<font color=Red>]</font>-<a name="line-206"></a>           <font color=Green><u>deriving</u></font> Eq-<a name="line-207"></a><a name="AttListDecl"></a><font color=Green><u>data</u></font> AttListDecl <font color=Red>=</font> AttListDecl Name <font color=Red>[</font>AttDef<font color=Red>]</font> <font color=Green><u>deriving</u></font> Eq-<a name="line-208"></a><a name="AttDef"></a><font color=Green><u>data</u></font> AttDef      <font color=Red>=</font> AttDef Name AttType DefaultDecl <font color=Green><u>deriving</u></font> Eq-<a name="line-209"></a><a name="AttType"></a><font color=Green><u>data</u></font> AttType     <font color=Red>=</font> StringType-<a name="line-210"></a>                 <font color=Red>|</font> TokenizedType TokenizedType-<a name="line-211"></a>                 <font color=Red>|</font> EnumeratedType EnumeratedType-<a name="line-212"></a>                 <font color=Green><u>deriving</u></font> Eq-<a name="line-213"></a><a name="TokenizedType"></a><font color=Green><u>data</u></font> TokenizedType <font color=Red>=</font> ID-<a name="line-214"></a>                   <font color=Red>|</font> IDREF-<a name="line-215"></a>                   <font color=Red>|</font> IDREFS-<a name="line-216"></a>                   <font color=Red>|</font> ENTITY-<a name="line-217"></a>                   <font color=Red>|</font> ENTITIES-<a name="line-218"></a>                   <font color=Red>|</font> NMTOKEN-<a name="line-219"></a>                   <font color=Red>|</font> NMTOKENS-<a name="line-220"></a>                   <font color=Green><u>deriving</u></font> Eq-<a name="line-221"></a><a name="EnumeratedType"></a><font color=Green><u>data</u></font> EnumeratedType <font color=Red>=</font> NotationType NotationType-<a name="line-222"></a>                    <font color=Red>|</font> Enumeration Enumeration-<a name="line-223"></a>                    <font color=Green><u>deriving</u></font> Eq-<a name="line-224"></a><a name="NotationType"></a><font color=Green><u>type</u></font> NotationType   <font color=Red>=</font> <font color=Red>[</font>Name<font color=Red>]</font>    <font color=Blue>-- nonempty list</font>-<a name="line-225"></a><a name="Enumeration"></a><font color=Green><u>type</u></font> Enumeration    <font color=Red>=</font> <font color=Red>[</font>NmToken<font color=Red>]</font> <font color=Blue>-- nonempty list</font>-<a name="line-226"></a><a name="DefaultDecl"></a><font color=Green><u>data</u></font> DefaultDecl    <font color=Red>=</font> REQUIRED-<a name="line-227"></a>                    <font color=Red>|</font> IMPLIED-<a name="line-228"></a>                    <font color=Red>|</font> DefaultTo AttValue <font color=Cyan>(</font>Maybe FIXED<font color=Cyan>)</font>-<a name="line-229"></a>                    <font color=Green><u>deriving</u></font> Eq-<a name="line-230"></a><a name="FIXED"></a><font color=Green><u>data</u></font> FIXED          <font color=Red>=</font> FIXED <font color=Green><u>deriving</u></font> Eq-<a name="line-231"></a>-<a name="line-232"></a><a name="ConditionalSect"></a><font color=Green><u>data</u></font> ConditionalSect <font color=Red>=</font> IncludeSect IncludeSect-<a name="line-233"></a>                     <font color=Red>|</font> IgnoreSect IgnoreSect-<a name="line-234"></a>                     <font color=Green><u>deriving</u></font> Eq-<a name="line-235"></a><a name="IncludeSect"></a><font color=Green><u>type</u></font> IncludeSect <font color=Red>=</font> <font color=Red>[</font>ExtSubsetDecl<font color=Red>]</font>-<a name="line-236"></a><a name="IgnoreSect"></a><font color=Green><u>type</u></font> IgnoreSect  <font color=Red>=</font> <font color=Red>[</font>IgnoreSectContents<font color=Red>]</font>-<a name="line-237"></a><a name="Ignore"></a><font color=Green><u>data</u></font> Ignore      <font color=Red>=</font> Ignore <font color=Green><u>deriving</u></font> Eq-<a name="line-238"></a><a name="IgnoreSectContents"></a><font color=Green><u>data</u></font> IgnoreSectContents <font color=Red>=</font> IgnoreSectContents Ignore <font color=Red>[</font><font color=Cyan>(</font>IgnoreSectContents<font color=Cyan>,</font>Ignore<font color=Cyan>)</font><font color=Red>]</font>  <font color=Green><u>deriving</u></font> Eq-<a name="line-239"></a>-<a name="line-240"></a><a name="Reference"></a><font color=Green><u>data</u></font> Reference    <font color=Red>=</font> RefEntity EntityRef-<a name="line-241"></a>                  <font color=Red>|</font> RefChar CharRef-<a name="line-242"></a>                  <font color=Green><u>deriving</u></font> <font color=Cyan>(</font>Eq<font color=Cyan>,</font>Show<font color=Cyan>)</font>-<a name="line-243"></a><a name="EntityRef"></a><font color=Green><u>type</u></font> EntityRef    <font color=Red>=</font> Name-<a name="line-244"></a><a name="CharRef"></a><font color=Green><u>type</u></font> CharRef      <font color=Red>=</font> Int-<a name="line-245"></a><a name="PEReference"></a><font color=Green><u>type</u></font> PEReference  <font color=Red>=</font> Name-<a name="line-246"></a>-<a name="line-247"></a><a name="EntityDecl"></a><font color=Green><u>data</u></font> EntityDecl   <font color=Red>=</font> EntityGEDecl GEDecl-<a name="line-248"></a>                  <font color=Red>|</font> EntityPEDecl PEDecl-<a name="line-249"></a>                  <font color=Green><u>deriving</u></font> Eq-<a name="line-250"></a><a name="GEDecl"></a><font color=Green><u>data</u></font> GEDecl       <font color=Red>=</font> GEDecl Name EntityDef <font color=Green><u>deriving</u></font> Eq-<a name="line-251"></a><a name="PEDecl"></a><font color=Green><u>data</u></font> PEDecl       <font color=Red>=</font> PEDecl Name PEDef <font color=Green><u>deriving</u></font> Eq-<a name="line-252"></a><a name="EntityDef"></a><font color=Green><u>data</u></font> EntityDef    <font color=Red>=</font> DefEntityValue EntityValue-<a name="line-253"></a>                  <font color=Red>|</font> DefExternalID ExternalID <font color=Cyan>(</font>Maybe NDataDecl<font color=Cyan>)</font>-<a name="line-254"></a>                  <font color=Green><u>deriving</u></font> Eq-<a name="line-255"></a><a name="PEDef"></a><font color=Green><u>data</u></font> PEDef        <font color=Red>=</font> PEDefEntityValue EntityValue-<a name="line-256"></a>                  <font color=Red>|</font> PEDefExternalID ExternalID <font color=Green><u>deriving</u></font> <font color=Cyan>(</font>Eq<font color=Cyan>,</font>Show<font color=Cyan>)</font>-<a name="line-257"></a><a name="ExternalID"></a><font color=Green><u>data</u></font> ExternalID   <font color=Red>=</font> SYSTEM SystemLiteral-<a name="line-258"></a>                  <font color=Red>|</font> PUBLIC PubidLiteral SystemLiteral <font color=Green><u>deriving</u></font> <font color=Cyan>(</font>Eq<font color=Cyan>,</font>Show<font color=Cyan>)</font>-<a name="line-259"></a><a name="NDataDecl"></a><font color=Green><u>newtype</u></font> NDataDecl <font color=Red>=</font> NDATA Name  <font color=Green><u>deriving</u></font> Eq-<a name="line-260"></a>-<a name="line-261"></a><a name="TextDecl"></a><font color=Green><u>data</u></font> TextDecl       <font color=Red>=</font> TextDecl <font color=Cyan>(</font>Maybe VersionInfo<font color=Cyan>)</font> EncodingDecl  <font color=Green><u>deriving</u></font> Eq-<a name="line-262"></a><a name="ExtParsedEnt"></a><font color=Green><u>data</u></font> ExtParsedEnt i <font color=Red>=</font> ExtParsedEnt <font color=Cyan>(</font>Maybe TextDecl<font color=Cyan>)</font> <font color=Cyan>(</font>Content i<font color=Cyan>)</font> <font color=Green><u>deriving</u></font> Eq-<a name="line-263"></a><a name="ExtPE"></a><font color=Green><u>data</u></font> ExtPE          <font color=Red>=</font> ExtPE <font color=Cyan>(</font>Maybe TextDecl<font color=Cyan>)</font> <font color=Red>[</font>ExtSubsetDecl<font color=Red>]</font> <font color=Green><u>deriving</u></font> Eq-<a name="line-264"></a>-<a name="line-265"></a><a name="NotationDecl"></a><font color=Green><u>data</u></font> NotationDecl    <font color=Red>=</font> NOTATION Name <font color=Cyan>(</font>Either ExternalID PublicID<font color=Cyan>)</font> <font color=Green><u>deriving</u></font> Eq-<a name="line-266"></a><a name="PublicID"></a><font color=Green><u>newtype</u></font> PublicID     <font color=Red>=</font> PUBLICID PubidLiteral <font color=Green><u>deriving</u></font> Eq-<a name="line-267"></a><a name="EncodingDecl"></a><font color=Green><u>newtype</u></font> EncodingDecl <font color=Red>=</font> EncodingDecl String <font color=Green><u>deriving</u></font> Eq-<a name="line-268"></a>-<a name="line-269"></a><a name="Name"></a><font color=Green><u>type</u></font> Name     <font color=Red>=</font> String           <font color=Blue>-- non-empty string</font>-<a name="line-270"></a><a name="Names"></a><font color=Green><u>type</u></font> Names    <font color=Red>=</font> <font color=Red>[</font>Name<font color=Red>]</font>           <font color=Blue>-- non-empty list</font>-<a name="line-271"></a><a name="NmToken"></a><font color=Green><u>type</u></font> NmToken  <font color=Red>=</font> String           <font color=Blue>-- non-empty string</font>-<a name="line-272"></a><a name="NmTokens"></a><font color=Green><u>type</u></font> NmTokens <font color=Red>=</font> <font color=Red>[</font>NmToken<font color=Red>]</font>        <font color=Blue>-- non-empty list</font>-<a name="line-273"></a>-<a name="line-274"></a><a name="AttValue"></a><font color=Green><u>data</u></font> AttValue    <font color=Red>=</font> AttValue <font color=Red>[</font>Either String Reference<font color=Red>]</font> <font color=Green><u>deriving</u></font> Eq-<a name="line-275"></a><font color=Green><u>instance</u></font> Show AttValue <font color=Green><u>where</u></font>-<a name="line-276"></a>  show <font color=Cyan>(</font>AttValue v<font color=Cyan>)</font> <font color=Red>=</font> concatMap decode v-<a name="line-277"></a>    <font color=Green><u>where</u></font>-<a name="line-278"></a>      decode <font color=Cyan>(</font>Left  w<font color=Cyan>)</font>               <font color=Red>=</font> w-<a name="line-279"></a>      decode <font color=Cyan>(</font>Right <font color=Cyan>(</font>RefEntity ent<font color=Cyan>)</font><font color=Cyan>)</font> <font color=Red>=</font> <font color=Magenta>"&amp;"</font><font color=Cyan>++</font>ent<font color=Cyan>++</font><font color=Magenta>";"</font>-<a name="line-280"></a>      decode <font color=Cyan>(</font>Right <font color=Cyan>(</font>RefChar cref<font color=Cyan>)</font><font color=Cyan>)</font>  <font color=Red>=</font> <font color=Magenta>"&amp;"</font><font color=Cyan>++</font>show cref<font color=Cyan>++</font><font color=Magenta>";"</font>-<a name="line-281"></a>-<a name="line-282"></a><a name="EntityValue"></a><font color=Green><u>data</u></font> EntityValue <font color=Red>=</font> EntityValue <font color=Red>[</font>EV<font color=Red>]</font> <font color=Green><u>deriving</u></font> <font color=Cyan>(</font>Eq<font color=Cyan>,</font>Show<font color=Cyan>)</font>-<a name="line-283"></a><a name="EV"></a><font color=Green><u>data</u></font> EV <font color=Red>=</font> EVString String-<a name="line-284"></a> <font color=Blue>--  -- | EVPERef PEReference</font>-<a name="line-285"></a>        <font color=Red>|</font> EVRef Reference  <font color=Green><u>deriving</u></font> <font color=Cyan>(</font>Eq<font color=Cyan>,</font>Show<font color=Cyan>)</font>-<a name="line-286"></a><a name="PubidLiteral"></a><font color=Green><u>newtype</u></font> PubidLiteral  <font color=Red>=</font> PubidLiteral String <font color=Green><u>deriving</u></font> <font color=Cyan>(</font>Eq<font color=Cyan>,</font>Show<font color=Cyan>)</font>-<a name="line-287"></a><a name="SystemLiteral"></a><font color=Green><u>newtype</u></font> SystemLiteral <font color=Red>=</font> SystemLiteral String <font color=Green><u>deriving</u></font> <font color=Cyan>(</font>Eq<font color=Cyan>,</font>Show<font color=Cyan>)</font>-<a name="line-288"></a><a name="CharData"></a><font color=Green><u>type</u></font> CharData         <font color=Red>=</font> String-<a name="line-289"></a><a name="CDSect"></a><font color=Green><u>type</u></font> CDSect           <font color=Red>=</font> CharData-<a name="line-290"></a>-<a name="line-291"></a><font color=Green><u>instance</u></font> Eq ElemTag <font color=Green><u>where</u></font>-<a name="line-292"></a>    <font color=Cyan>(</font>ElemTag n <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Cyan>==</font> <font color=Cyan>(</font>ElemTag m <font color=Green><u>_</u></font><font color=Cyan>)</font>  <font color=Red>=</font> n<font color=Cyan>==</font>m-</pre>-</body>-</html>
− docs/HaXml/src/Text/XML/HaXml/Util.html
@@ -1,51 +0,0 @@-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">-<html>-<head>-<!-- Generated by HsColour, http://www.cs.york.ac.uk/fp/darcs/hscolour/ -->-<title>src/Text/XML/HaXml/Util.hs</title>-</head>-<body>-<pre><a name="line-1"></a><font color=Blue>{- |-<a name="line-2"></a> - Only a shmall module containing some helper functions to extract xml content-<a name="line-3"></a> - I would have added this to Types but I've put it into an additional module-<a name="line-4"></a> - to avoid circular references (Verbatim &lt;-&gt; Types)-<a name="line-5"></a>-}</font>-<a name="line-6"></a>-<a name="line-7"></a><font color=Green><u>module</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Util-<a name="line-8"></a>  <font color=Cyan>(</font>-<a name="line-9"></a>  <font color=Blue>-- ** utility functions to access XML content</font>-<a name="line-10"></a>    docContent-<a name="line-11"></a>  <font color=Cyan>,</font> contentElem-<a name="line-12"></a>  <font color=Cyan>,</font> attrs-<a name="line-13"></a>  <font color=Cyan>,</font> tagTextContent-<a name="line-14"></a>  <font color=Cyan>)</font> <font color=Green><u>where</u></font>-<a name="line-15"></a>-<a name="line-16"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Posn-<a name="line-17"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Types-<a name="line-18"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Verbatim-<a name="line-19"></a>-<a name="line-20"></a><a name="docContent"></a><font color=Blue>-- get the main element of the document so that you can apply CFilters directly</font>-<a name="line-21"></a><font color=Blue>-- i is typically (posInNewCxt "filename" Nothing) </font>-<a name="line-22"></a><font color=Blue>docContent</font> <font color=Red>::</font> i <font color=Red>-&gt;</font> Document i <font color=Red>-&gt;</font> Content i-<a name="line-23"></a><font color=Blue>docContent</font> i <font color=Cyan>(</font>Document <font color=Green><u>_</u></font> <font color=Green><u>_</u></font> e <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red>=</font> CElem e i-<a name="line-24"></a>-<a name="line-25"></a><a name="contentElem"></a><font color=Blue>-- if you know that your CFilter returns a tag your can use this function to get the tag Element </font>-<a name="line-26"></a><font color=Blue>contentElem</font> <font color=Red>::</font>  Content i <font color=Red>-&gt;</font> Element i-<a name="line-27"></a><font color=Blue>contentElem</font> <font color=Cyan>(</font>CElem e <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red>=</font> e-<a name="line-28"></a><font color=Blue>contentElem</font> <font color=Green><u>_</u></font> <font color=Red>=</font> error <font color=Magenta>"content is not a CElem"</font>-<a name="line-29"></a><a name="attrs"></a><font color=Blue>attrs</font> <font color=Red>::</font> Element i <font color=Red>-&gt;</font> <font color=Red>[</font>Attribute<font color=Red>]</font>-<a name="line-30"></a><font color=Blue>attrs</font> <font color=Cyan>(</font> Elem <font color=Green><u>_</u></font> attrs <font color=Green><u>_</u></font> <font color=Cyan>)</font> <font color=Red>=</font> attrs-<a name="line-31"></a><a name="tagTextContent"></a><font color=Blue>tagTextContent</font> <font color=Cyan>(</font><font color=Cyan>(</font>CElem <font color=Cyan>(</font>Elem <font color=Green><u>_</u></font> <font color=Green><u>_</u></font> cs<font color=Cyan>)</font> <font color=Green><u>_</u></font><font color=Cyan>)</font><font color=Cyan>)</font> <font color=Red>=</font> concatMap verbatim cs -<a name="line-32"></a>-<a name="line-33"></a><font color=Blue>{--<a name="line-34"></a>  now you can extract an attribute quite easily:-<a name="line-35"></a>    let doc = "&lt;xml&gt;&lt;a&gt;&lt;b a=\"x\"&gt;content&lt;/b&gt;&lt;/a&gt;&lt;/xml&gt;"-<a name="line-36"></a>    let b = head $ xtract id "a/b" $ docContent (posInNewCxt filename Nothing) $ xmlParse filename doc-<a name="line-37"></a>    putStrLn $ "attr a of tag b" ++ (show $ lookup "a" $  attrs $ contentElem b)-<a name="line-38"></a>    putStrLn $ "text content of b :" ++ tagTextContent b-<a name="line-39"></a>  still (too) much code IMHO-<a name="line-40"></a>-}</font>-<a name="line-41"></a>-</pre>-</body>-</html>
− docs/HaXml/src/Text/XML/HaXml/Validate.html
@@ -1,282 +0,0 @@-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">-<html>-<head>-<!-- Generated by HsColour, http://www.cs.york.ac.uk/fp/darcs/hscolour/ -->-<title>src/Text/XML/HaXml/Validate.hs</title>-</head>-<body>-<pre><a name="line-1"></a><font color=Blue>-- | Validate a document against a dtd.</font>-<a name="line-2"></a><font color=Green><u>module</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Validate-<a name="line-3"></a>  <font color=Cyan>(</font> validate-<a name="line-4"></a>  <font color=Cyan>,</font> partialValidate-<a name="line-5"></a>  <font color=Cyan>)</font> <font color=Green><u>where</u></font>-<a name="line-6"></a>-<a name="line-7"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Types-<a name="line-8"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Combinators <font color=Cyan>(</font>multi<font color=Cyan>,</font>tag<font color=Cyan>,</font>iffind<font color=Cyan>,</font>literal<font color=Cyan>,</font>none<font color=Cyan>,</font>o<font color=Cyan>)</font>-<a name="line-9"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>XmlContent <font color=Cyan>(</font>attr2str<font color=Cyan>)</font>-<a name="line-10"></a><font color=Green><u>import</u></font> Maybe <font color=Cyan>(</font>fromMaybe<font color=Cyan>,</font>isNothing<font color=Cyan>,</font>fromJust<font color=Cyan>)</font>-<a name="line-11"></a><font color=Green><u>import</u></font> List <font color=Cyan>(</font>intersperse<font color=Cyan>,</font>nub<font color=Cyan>,</font><font color=Cyan>(</font><font color=Cyan>\\</font><font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-12"></a><font color=Green><u>import</u></font> Char <font color=Cyan>(</font>isSpace<font color=Cyan>)</font>-<a name="line-13"></a>-<a name="line-14"></a><font color=Magenta><em>#if __GLASGOW_HASKELL__ &gt;= 604 || __NHC__ &gt;= 118 || defined(__HUGS__)</em></font>-<a name="line-15"></a><font color=Blue>-- emulate older finite map interface using Data.Map, if it is available</font>-<a name="line-16"></a><font color=Green><u>import</u></font> <font color=Green><u>qualified</u></font> Data<font color=Cyan>.</font>Map <font color=Green><u>as</u></font> Map-<a name="line-17"></a><a name="FiniteMap"></a><font color=Green><u>type</u></font> FiniteMap a b <font color=Red>=</font> Map<font color=Cyan>.</font>Map a b-<a name="line-18"></a><a name="listToFM"></a><font color=Blue>listToFM</font> <font color=Red>::</font> Ord a <font color=Red>=&gt;</font> <font color=Red>[</font><font color=Cyan>(</font>a<font color=Cyan>,</font>b<font color=Cyan>)</font><font color=Red>]</font> <font color=Red>-&gt;</font> FiniteMap a b-<a name="line-19"></a><font color=Blue>listToFM</font> <font color=Red>=</font> Map<font color=Cyan>.</font>fromList-<a name="line-20"></a><a name="lookupFM"></a><font color=Blue>lookupFM</font> <font color=Red>::</font> Ord a <font color=Red>=&gt;</font> FiniteMap a b <font color=Red>-&gt;</font> a <font color=Red>-&gt;</font> Maybe b-<a name="line-21"></a><font color=Blue>lookupFM</font> <font color=Red>=</font> flip Map<font color=Cyan>.</font>lookup-<a name="line-22"></a><font color=Magenta><em>#elif __GLASGOW_HASKELL__ &gt;= 504 || __NHC__ &gt; 114</em></font>-<a name="line-23"></a><font color=Blue>-- real finite map, if it is available</font>-<a name="line-24"></a><font color=Green><u>import</u></font> Data<font color=Cyan>.</font>FiniteMap-<a name="line-25"></a><font color=Magenta><em>#else</em></font>-<a name="line-26"></a><a name="FiniteMap"></a><font color=Blue>-- otherwise, a very simple and inefficient implementation of a finite map</font>-<a name="line-27"></a><a name="FiniteMap"></a><font color=Green><u>type</u></font> FiniteMap a b <font color=Red>=</font> <font color=Red>[</font><font color=Cyan>(</font>a<font color=Cyan>,</font>b<font color=Cyan>)</font><font color=Red>]</font>-<a name="line-28"></a><font color=Blue>listToFM</font> <font color=Red>::</font> Eq a <font color=Red>=&gt;</font> <font color=Red>[</font><font color=Cyan>(</font>a<font color=Cyan>,</font>b<font color=Cyan>)</font><font color=Red>]</font> <font color=Red>-&gt;</font> FiniteMap a b-<a name="line-29"></a><font color=Blue>listToFM</font> <font color=Red>=</font> id-<a name="line-30"></a><font color=Blue>lookupFM</font> <font color=Red>::</font> Eq a <font color=Red>=&gt;</font> FiniteMap a b <font color=Red>-&gt;</font> a <font color=Red>-&gt;</font> Maybe b-<a name="line-31"></a><font color=Blue>lookupFM</font> fm k <font color=Red>=</font> lookup k fm-<a name="line-32"></a><font color=Magenta><em>#endif</em></font>-<a name="line-33"></a>-<a name="line-34"></a><a name="SimpleDTD"></a><font color=Blue>-- gather appropriate information out of the DTD</font>-<a name="line-35"></a><a name="SimpleDTD"></a><font color=Green><u>data</u></font> SimpleDTD <font color=Red>=</font> SimpleDTD-<a name="line-36"></a>    <font color=Cyan>{</font> elements   <font color=Red>::</font> FiniteMap Name ContentSpec	<font color=Blue>-- content model of elem</font>-<a name="line-37"></a>    <font color=Cyan>,</font> attributes <font color=Red>::</font> FiniteMap <font color=Cyan>(</font>Name<font color=Cyan>,</font>Name<font color=Cyan>)</font> AttType <font color=Blue>-- type of (elem,attr)</font>-<a name="line-38"></a>    <font color=Cyan>,</font> required   <font color=Red>::</font> FiniteMap Name <font color=Red>[</font>Name<font color=Red>]</font>	<font color=Blue>-- required attributes of elem</font>-<a name="line-39"></a>    <font color=Cyan>,</font> ids        <font color=Red>::</font> <font color=Red>[</font><font color=Cyan>(</font>Name<font color=Cyan>,</font>Name<font color=Cyan>)</font><font color=Red>]</font>	<font color=Blue>-- all (element,attr) with ID type</font>-<a name="line-40"></a>    <font color=Cyan>,</font> idrefs     <font color=Red>::</font> <font color=Red>[</font><font color=Cyan>(</font>Name<font color=Cyan>,</font>Name<font color=Cyan>)</font><font color=Red>]</font>	<font color=Blue>-- all (element,attr) with IDREF type</font>-<a name="line-41"></a>    <font color=Cyan>}</font>-<a name="line-42"></a>-<a name="line-43"></a><a name="simplifyDTD"></a><font color=Blue>simplifyDTD</font> <font color=Red>::</font> DocTypeDecl <font color=Red>-&gt;</font> SimpleDTD-<a name="line-44"></a><font color=Blue>simplifyDTD</font> <font color=Cyan>(</font>DTD <font color=Green><u>_</u></font> <font color=Green><u>_</u></font> decls<font color=Cyan>)</font> <font color=Red>=</font>-<a name="line-45"></a>    SimpleDTD-<a name="line-46"></a>      <font color=Cyan>{</font> elements   <font color=Red>=</font> listToFM <font color=Red>[</font> <font color=Cyan>(</font>name<font color=Cyan>,</font>content<font color=Cyan>)</font>-<a name="line-47"></a>                              <font color=Red>|</font> Element <font color=Cyan>(</font>ElementDecl name content<font color=Cyan>)</font> <font color=Red>&lt;-</font> decls <font color=Red>]</font>-<a name="line-48"></a>      <font color=Cyan>,</font> attributes <font color=Red>=</font> listToFM <font color=Red>[</font> <font color=Cyan>(</font><font color=Cyan>(</font>elem<font color=Cyan>,</font>attr<font color=Cyan>)</font><font color=Cyan>,</font>typ<font color=Cyan>)</font>-<a name="line-49"></a>                              <font color=Red>|</font> AttList <font color=Cyan>(</font>AttListDecl elem attdefs<font color=Cyan>)</font> <font color=Red>&lt;-</font> decls-<a name="line-50"></a>                              <font color=Cyan>,</font> AttDef attr typ <font color=Green><u>_</u></font> <font color=Red>&lt;-</font> attdefs <font color=Red>]</font>-<a name="line-51"></a>      <font color=Cyan>,</font> required   <font color=Red>=</font> listToFM <font color=Red>[</font> <font color=Cyan>(</font>elem<font color=Cyan>,</font> <font color=Red>[</font> attr-<a name="line-52"></a>                                       <font color=Red>|</font> AttDef attr <font color=Green><u>_</u></font> REQUIRED <font color=Red>&lt;-</font> attdefs <font color=Red>]</font><font color=Cyan>)</font>-<a name="line-53"></a>                              <font color=Red>|</font> AttList <font color=Cyan>(</font>AttListDecl elem attdefs<font color=Cyan>)</font> <font color=Red>&lt;-</font> decls <font color=Red>]</font>-<a name="line-54"></a>      <font color=Cyan>,</font> ids        <font color=Red>=</font> <font color=Red>[</font> <font color=Cyan>(</font>elem<font color=Cyan>,</font>attr<font color=Cyan>)</font>-<a name="line-55"></a>                     <font color=Red>|</font> Element <font color=Cyan>(</font>ElementDecl elem <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red>&lt;-</font> decls-<a name="line-56"></a>                     <font color=Cyan>,</font> AttList <font color=Cyan>(</font>AttListDecl name attdefs<font color=Cyan>)</font> <font color=Red>&lt;-</font> decls-<a name="line-57"></a>                     <font color=Cyan>,</font> elem <font color=Cyan>==</font> name-<a name="line-58"></a>                     <font color=Cyan>,</font> AttDef attr <font color=Cyan>(</font>TokenizedType ID<font color=Cyan>)</font> <font color=Green><u>_</u></font> <font color=Red>&lt;-</font> attdefs <font color=Red>]</font>-<a name="line-59"></a>      <font color=Cyan>,</font> idrefs     <font color=Red>=</font> []	<font color=Blue>-- not implemented</font>-<a name="line-60"></a>      <font color=Cyan>}</font>-<a name="line-61"></a>-<a name="line-62"></a><a name="gives"></a><font color=Blue>-- simple auxiliary to avoid lots of if-then-else with empty else clauses.</font>-<a name="line-63"></a><font color=Blue>gives</font> <font color=Red>::</font> Bool <font color=Red>-&gt;</font> a <font color=Red>-&gt;</font> <font color=Red>[</font>a<font color=Red>]</font>-<a name="line-64"></a>True <font color=Cyan>`gives`</font> x <font color=Red>=</font> <font color=Red>[</font>x<font color=Red>]</font>-<a name="line-65"></a>False <font color=Cyan>`gives`</font> <font color=Green><u>_</u></font> <font color=Red>=</font> []-<a name="line-66"></a>-<a name="line-67"></a><a name="validate"></a><font color=Blue>-- | 'validate' takes a DTD and a tagged element, and returns a list of</font>-<a name="line-68"></a><font color=Blue>--   errors in the document with respect to its DTD.</font>-<a name="line-69"></a><font color=Blue>--</font>-<a name="line-70"></a><font color=Blue>--   If you have several documents to validate against a single DTD,</font>-<a name="line-71"></a><font color=Blue>--   then you will gain efficiency by freezing-in the DTD through partial</font>-<a name="line-72"></a><font color=Blue>--   application, e.g. @checkMyDTD = validate myDTD@.</font>-<a name="line-73"></a><font color=Blue>validate</font> <font color=Red>::</font> DocTypeDecl <font color=Red>-&gt;</font> Element i <font color=Red>-&gt;</font> <font color=Red>[</font>String<font color=Red>]</font>-<a name="line-74"></a><font color=Blue>validate</font> dtd' elem <font color=Red>=</font> root dtd' elem <font color=Cyan>++</font> partialValidate dtd' elem-<a name="line-75"></a>  <font color=Green><u>where</u></font>-<a name="line-76"></a>    root <font color=Cyan>(</font>DTD name <font color=Green><u>_</u></font> <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Cyan>(</font>Elem name' <font color=Green><u>_</u></font> <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red>=</font>-<a name="line-77"></a>        <font color=Cyan>(</font>name<font color=Cyan>/=</font>name'<font color=Cyan>)</font> <font color=Cyan>`gives`</font> <font color=Cyan>(</font><font color=Magenta>"Document type should be &lt;"</font><font color=Cyan>++</font>name-<a name="line-78"></a>                               <font color=Cyan>++</font><font color=Magenta>"&gt; but appears to be &lt;"</font><font color=Cyan>++</font>name'<font color=Cyan>++</font><font color=Magenta>"&gt;."</font><font color=Cyan>)</font>-<a name="line-79"></a>-<a name="line-80"></a><a name="partialValidate"></a><font color=Blue>-- | 'partialValidate' is like validate, except that it does not check that</font>-<a name="line-81"></a><font color=Blue>--   the element type matches that of the DTD's root element.</font>-<a name="line-82"></a><font color=Blue>partialValidate</font> <font color=Red>::</font> DocTypeDecl <font color=Red>-&gt;</font> Element i <font color=Red>-&gt;</font> <font color=Red>[</font>String<font color=Red>]</font>-<a name="line-83"></a><font color=Blue>partialValidate</font> dtd' elem <font color=Red>=</font> valid elem <font color=Cyan>++</font> checkIDs elem-<a name="line-84"></a>  <font color=Green><u>where</u></font>-<a name="line-85"></a>    dtd <font color=Red>=</font> simplifyDTD dtd'-<a name="line-86"></a>-<a name="line-87"></a>    valid <font color=Cyan>(</font>Elem name attrs contents<font color=Cyan>)</font> <font color=Red>=</font>-<a name="line-88"></a>        <font color=Blue>-- is the element defined in the DTD?</font>-<a name="line-89"></a>        <font color=Green><u>let</u></font> spec <font color=Red>=</font> lookupFM <font color=Cyan>(</font>elements dtd<font color=Cyan>)</font> name <font color=Green><u>in</u></font> -<a name="line-90"></a>        <font color=Cyan>(</font>isNothing spec<font color=Cyan>)</font> <font color=Cyan>`gives`</font> <font color=Cyan>(</font><font color=Magenta>"Element &lt;"</font><font color=Cyan>++</font>name<font color=Cyan>++</font><font color=Magenta>"&gt; not known."</font><font color=Cyan>)</font>-<a name="line-91"></a>        <font color=Blue>-- is each attribute mentioned only once?</font>-<a name="line-92"></a>        <font color=Cyan>++</font> <font color=Cyan>(</font><font color=Green><u>let</u></font> dups <font color=Red>=</font> duplicates <font color=Cyan>(</font>map fst attrs<font color=Cyan>)</font> <font color=Green><u>in</u></font>-<a name="line-93"></a>            not <font color=Cyan>(</font>null dups<font color=Cyan>)</font> <font color=Cyan>`gives`</font>-<a name="line-94"></a>               <font color=Cyan>(</font><font color=Magenta>"Element &lt;"</font><font color=Cyan>++</font>name<font color=Cyan>++</font><font color=Magenta>"&gt; has duplicate attributes: "</font>-<a name="line-95"></a>                <font color=Cyan>++</font>concat <font color=Cyan>(</font>intersperse <font color=Magenta>","</font> dups<font color=Cyan>)</font><font color=Cyan>++</font><font color=Magenta>"."</font><font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-96"></a>        <font color=Blue>-- does each attribute belong to this element?  value is in range?</font>-<a name="line-97"></a>        <font color=Cyan>++</font> concatMap <font color=Cyan>(</font>checkAttr name<font color=Cyan>)</font> attrs-<a name="line-98"></a>        <font color=Blue>-- are all required attributes present?</font>-<a name="line-99"></a>        <font color=Cyan>++</font> concatMap <font color=Cyan>(</font>checkRequired name attrs<font color=Cyan>)</font>-<a name="line-100"></a>                     <font color=Cyan>(</font>fromMaybe [] <font color=Cyan>(</font>lookupFM <font color=Cyan>(</font>required dtd<font color=Cyan>)</font> name<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-101"></a>        <font color=Blue>-- are its children in a permissible sequence?</font>-<a name="line-102"></a>        <font color=Cyan>++</font> checkContentSpec name <font color=Cyan>(</font>fromMaybe ANY spec<font color=Cyan>)</font> contents-<a name="line-103"></a>        <font color=Blue>-- now recursively check the element children</font>-<a name="line-104"></a>        <font color=Cyan>++</font> concatMap valid <font color=Red>[</font> elem <font color=Red>|</font> CElem elem <font color=Green><u>_</u></font> <font color=Red>&lt;-</font> contents <font color=Red>]</font>-<a name="line-105"></a>-<a name="line-106"></a>    checkAttr elem <font color=Cyan>(</font>attr<font color=Cyan>,</font> val<font color=Cyan>)</font> <font color=Red>=</font>-<a name="line-107"></a>        <font color=Green><u>let</u></font> typ <font color=Red>=</font> lookupFM <font color=Cyan>(</font>attributes dtd<font color=Cyan>)</font> <font color=Cyan>(</font>elem<font color=Cyan>,</font>attr<font color=Cyan>)</font>-<a name="line-108"></a>            attval <font color=Red>=</font> attr2str val <font color=Green><u>in</u></font>-<a name="line-109"></a>        <font color=Green><u>if</u></font> isNothing typ <font color=Green><u>then</u></font> <font color=Red>[</font><font color=Magenta>"Attribute \""</font><font color=Cyan>++</font>attr-<a name="line-110"></a>                               <font color=Cyan>++</font><font color=Magenta>"\" not known for element &lt;"</font><font color=Cyan>++</font>elem<font color=Cyan>++</font><font color=Magenta>"&gt;."</font><font color=Red>]</font>-<a name="line-111"></a>        <font color=Green><u>else</u></font>-<a name="line-112"></a>          <font color=Green><u>case</u></font> fromJust typ <font color=Green><u>of</u></font>-<a name="line-113"></a>            EnumeratedType e <font color=Red>-&gt;</font>-<a name="line-114"></a>              <font color=Green><u>case</u></font> e <font color=Green><u>of</u></font>-<a name="line-115"></a>                Enumeration es <font color=Red>-&gt;</font>-<a name="line-116"></a>                    <font color=Cyan>(</font>not <font color=Cyan>(</font>attval <font color=Cyan>`</font>Prelude<font color=Cyan>.</font>elem<font color=Cyan>`</font> es<font color=Cyan>)</font><font color=Cyan>)</font> <font color=Cyan>`gives`</font>-<a name="line-117"></a>                          <font color=Cyan>(</font><font color=Magenta>"Value \""</font><font color=Cyan>++</font>attval<font color=Cyan>++</font><font color=Magenta>"\" of attribute \""</font>-<a name="line-118"></a>                           <font color=Cyan>++</font>attr<font color=Cyan>++</font><font color=Magenta>"\" in element &lt;"</font><font color=Cyan>++</font>elem-<a name="line-119"></a>                           <font color=Cyan>++</font><font color=Magenta>"&gt; is not in the required enumeration range: "</font>-<a name="line-120"></a>                           <font color=Cyan>++</font>unwords es<font color=Cyan>)</font>-<a name="line-121"></a>                <font color=Green><u>_</u></font> <font color=Red>-&gt;</font> []-<a name="line-122"></a>            <font color=Green><u>_</u></font> <font color=Red>-&gt;</font> []-<a name="line-123"></a>-<a name="line-124"></a>    checkRequired elem attrs req <font color=Red>=</font>-<a name="line-125"></a>        <font color=Cyan>(</font>not <font color=Cyan>(</font>req <font color=Cyan>`</font>Prelude<font color=Cyan>.</font>elem<font color=Cyan>`</font> map fst attrs<font color=Cyan>)</font><font color=Cyan>)</font> <font color=Cyan>`gives`</font>-<a name="line-126"></a>            <font color=Cyan>(</font><font color=Magenta>"Element &lt;"</font><font color=Cyan>++</font>elem<font color=Cyan>++</font><font color=Magenta>"&gt; requires the attribute \""</font><font color=Cyan>++</font>req-<a name="line-127"></a>             <font color=Cyan>++</font><font color=Magenta>"\" but it is missing."</font><font color=Cyan>)</font>-<a name="line-128"></a>-<a name="line-129"></a>    checkContentSpec elem ANY <font color=Green><u>_</u></font> <font color=Red>=</font> []-<a name="line-130"></a>    checkContentSpec elem EMPTY [] <font color=Red>=</font> []-<a name="line-131"></a>    checkContentSpec elem EMPTY <font color=Cyan>(</font><font color=Green><u>_</u></font><font color=Red><b>:</b></font><font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red>=</font>-<a name="line-132"></a>        <font color=Red>[</font><font color=Magenta>"Element &lt;"</font><font color=Cyan>++</font>elem<font color=Cyan>++</font><font color=Magenta>"&gt; is not empty but should be."</font><font color=Red>]</font>-<a name="line-133"></a>    checkContentSpec elem <font color=Cyan>(</font>Mixed PCDATA<font color=Cyan>)</font> cs <font color=Red>=</font> concatMap <font color=Cyan>(</font>checkMixed elem []<font color=Cyan>)</font> cs-<a name="line-134"></a>    checkContentSpec elem <font color=Cyan>(</font>Mixed <font color=Cyan>(</font>PCDATAplus names<font color=Cyan>)</font><font color=Cyan>)</font> cs <font color=Red>=</font>-<a name="line-135"></a>        concatMap <font color=Cyan>(</font>checkMixed elem names<font color=Cyan>)</font> cs-<a name="line-136"></a>    checkContentSpec elem <font color=Cyan>(</font>ContentSpec cp<font color=Cyan>)</font> cs <font color=Red>=</font> excludeText elem cs <font color=Cyan>++</font>-<a name="line-137"></a>        <font color=Cyan>(</font><font color=Green><u>let</u></font> <font color=Cyan>(</font>errs<font color=Cyan>,</font>rest<font color=Cyan>)</font> <font color=Red>=</font> checkCP elem cp <font color=Cyan>(</font>flatten cs<font color=Cyan>)</font> <font color=Green><u>in</u></font>-<a name="line-138"></a>         <font color=Green><u>case</u></font> rest <font color=Green><u>of</u></font> [] <font color=Red>-&gt;</font> errs-<a name="line-139"></a>                      <font color=Green><u>_</u></font>  <font color=Red>-&gt;</font> errs<font color=Cyan>++</font><font color=Red>[</font><font color=Magenta>"Element &lt;"</font><font color=Cyan>++</font>elem<font color=Cyan>++</font><font color=Magenta>"&gt; contains extra "</font>-<a name="line-140"></a>                                  <font color=Cyan>++</font><font color=Magenta>"elements beyond its content spec."</font><font color=Red>]</font><font color=Cyan>)</font>-<a name="line-141"></a>-<a name="line-142"></a>    checkMixed elem permitted <font color=Cyan>(</font>CElem <font color=Cyan>(</font>Elem name <font color=Green><u>_</u></font> <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Green><u>_</u></font><font color=Cyan>)</font>-<a name="line-143"></a>        <font color=Red>|</font> not <font color=Cyan>(</font>name <font color=Cyan>`</font>Prelude<font color=Cyan>.</font>elem<font color=Cyan>`</font> permitted<font color=Cyan>)</font> <font color=Red>=</font>-<a name="line-144"></a>            <font color=Red>[</font><font color=Magenta>"Element &lt;"</font><font color=Cyan>++</font>elem<font color=Cyan>++</font><font color=Magenta>"&gt; contains an element &lt;"</font><font color=Cyan>++</font>name-<a name="line-145"></a>             <font color=Cyan>++</font><font color=Magenta>"&gt; but should not."</font><font color=Red>]</font>-<a name="line-146"></a>    checkMixed elem permitted <font color=Green><u>_</u></font> <font color=Red>=</font> []-<a name="line-147"></a>-<a name="line-148"></a>    flatten <font color=Cyan>(</font>CElem <font color=Cyan>(</font>Elem name <font color=Green><u>_</u></font> <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Green><u>_</u></font><font color=Red><b>:</b></font> cs<font color=Cyan>)</font> <font color=Red>=</font> name<font color=Red><b>:</b></font> flatten cs-<a name="line-149"></a>    flatten <font color=Cyan>(</font><font color=Green><u>_</u></font><font color=Red><b>:</b></font> cs<font color=Cyan>)</font>                       <font color=Red>=</font> flatten cs-<a name="line-150"></a>    flatten []                            <font color=Red>=</font> []-<a name="line-151"></a>-<a name="line-152"></a>    excludeText elem <font color=Cyan>(</font>CElem <font color=Green><u>_</u></font> <font color=Green><u>_</u></font><font color=Red><b>:</b></font> cs<font color=Cyan>)</font> <font color=Red>=</font> excludeText elem cs-<a name="line-153"></a>    excludeText elem <font color=Cyan>(</font>CMisc <font color=Green><u>_</u></font> <font color=Green><u>_</u></font><font color=Red><b>:</b></font> cs<font color=Cyan>)</font> <font color=Red>=</font> excludeText elem cs-<a name="line-154"></a>    excludeText elem <font color=Cyan>(</font>CString <font color=Green><u>_</u></font> s <font color=Green><u>_</u></font><font color=Red><b>:</b></font> cs<font color=Cyan>)</font> <font color=Red>|</font> all isSpace s <font color=Red>=</font> excludeText elem cs-<a name="line-155"></a>    excludeText elem <font color=Cyan>(</font><font color=Green><u>_</u></font><font color=Red><b>:</b></font>  cs<font color=Cyan>)</font> <font color=Red>=</font>-<a name="line-156"></a>        <font color=Red>[</font><font color=Magenta>"Element &lt;"</font><font color=Cyan>++</font>elem<font color=Cyan>++</font><font color=Magenta>"&gt; contains text/references but should not."</font><font color=Red>]</font>-<a name="line-157"></a>    excludeText elem [] <font color=Red>=</font> []-<a name="line-158"></a>-<a name="line-159"></a>    <font color=Blue>-- This is a little parser really.  Returns any errors, plus the remainder</font>-<a name="line-160"></a>    <font color=Blue>-- of the input string.</font>-<a name="line-161"></a>    checkCP <font color=Red>::</font> Name <font color=Red>-&gt;</font> CP <font color=Red>-&gt;</font> <font color=Red>[</font>Name<font color=Red>]</font> <font color=Red>-&gt;</font> <font color=Cyan>(</font><font color=Red>[</font>String<font color=Red>]</font><font color=Cyan>,</font><font color=Red>[</font>Name<font color=Red>]</font><font color=Cyan>)</font>-<a name="line-162"></a>    checkCP elem cp<font color=Red>@</font><font color=Cyan>(</font>TagName n None<font color=Cyan>)</font> [] <font color=Red>=</font> <font color=Cyan>(</font>cpError elem cp<font color=Cyan>,</font> []<font color=Cyan>)</font>-<a name="line-163"></a>    checkCP elem cp<font color=Red>@</font><font color=Cyan>(</font>TagName n None<font color=Cyan>)</font> <font color=Cyan>(</font>n'<font color=Red><b>:</b></font>ns<font color=Cyan>)</font>-<a name="line-164"></a>        <font color=Red>|</font> n<font color=Cyan>==</font>n'     <font color=Red>=</font> <font color=Cyan>(</font>[]<font color=Cyan>,</font> ns<font color=Cyan>)</font>-<a name="line-165"></a>        <font color=Red>|</font> otherwise <font color=Red>=</font> <font color=Cyan>(</font>cpError elem cp<font color=Cyan>,</font> n'<font color=Red><b>:</b></font>ns<font color=Cyan>)</font>-<a name="line-166"></a>    checkCP elem cp<font color=Red>@</font><font color=Cyan>(</font>TagName n Query<font color=Cyan>)</font> [] <font color=Red>=</font> <font color=Cyan>(</font>[]<font color=Cyan>,</font>[]<font color=Cyan>)</font>-<a name="line-167"></a>    checkCP elem cp<font color=Red>@</font><font color=Cyan>(</font>TagName n Query<font color=Cyan>)</font> <font color=Cyan>(</font>n'<font color=Red><b>:</b></font>ns<font color=Cyan>)</font>-<a name="line-168"></a>        <font color=Red>|</font> n<font color=Cyan>==</font>n'     <font color=Red>=</font> <font color=Cyan>(</font>[]<font color=Cyan>,</font> ns<font color=Cyan>)</font>-<a name="line-169"></a>        <font color=Red>|</font> otherwise <font color=Red>=</font> <font color=Cyan>(</font>[]<font color=Cyan>,</font> n'<font color=Red><b>:</b></font>ns<font color=Cyan>)</font>-<a name="line-170"></a>    checkCP elem cp<font color=Red>@</font><font color=Cyan>(</font>TagName n Star<font color=Cyan>)</font> [] <font color=Red>=</font> <font color=Cyan>(</font>[]<font color=Cyan>,</font>[]<font color=Cyan>)</font>-<a name="line-171"></a>    checkCP elem cp<font color=Red>@</font><font color=Cyan>(</font>TagName n Star<font color=Cyan>)</font> <font color=Cyan>(</font>n'<font color=Red><b>:</b></font>ns<font color=Cyan>)</font>-<a name="line-172"></a>        <font color=Red>|</font> n<font color=Cyan>==</font>n'     <font color=Red>=</font> checkCP elem <font color=Cyan>(</font>TagName n Star<font color=Cyan>)</font> ns-<a name="line-173"></a>        <font color=Red>|</font> otherwise <font color=Red>=</font> <font color=Cyan>(</font>[]<font color=Cyan>,</font> n'<font color=Red><b>:</b></font>ns<font color=Cyan>)</font>-<a name="line-174"></a>    checkCP elem cp<font color=Red>@</font><font color=Cyan>(</font>TagName n Plus<font color=Cyan>)</font> [] <font color=Red>=</font> <font color=Cyan>(</font>cpError elem cp<font color=Cyan>,</font> []<font color=Cyan>)</font>-<a name="line-175"></a>    checkCP elem cp<font color=Red>@</font><font color=Cyan>(</font>TagName n Plus<font color=Cyan>)</font> <font color=Cyan>(</font>n'<font color=Red><b>:</b></font>ns<font color=Cyan>)</font>-<a name="line-176"></a>        <font color=Red>|</font> n<font color=Cyan>==</font>n'     <font color=Red>=</font> checkCP elem <font color=Cyan>(</font>TagName n Star<font color=Cyan>)</font> ns-<a name="line-177"></a>        <font color=Red>|</font> otherwise <font color=Red>=</font> <font color=Cyan>(</font>cpError elem cp<font color=Cyan>,</font> n'<font color=Red><b>:</b></font>ns<font color=Cyan>)</font>-<a name="line-178"></a> <font color=Blue>-- omit this clause, to permit (a?|b?) as a valid but empty choice</font>-<a name="line-179"></a> <font color=Blue>-- checkCP elem cp@(Choice cps None) [] = (cpError elem cp, [])</font>-<a name="line-180"></a>    checkCP elem cp<font color=Red>@</font><font color=Cyan>(</font>Choice cps None<font color=Cyan>)</font> ns <font color=Red>=</font>-<a name="line-181"></a>        <font color=Green><u>let</u></font> next <font color=Red>=</font> choice elem ns cps <font color=Green><u>in</u></font>-<a name="line-182"></a>        <font color=Green><u>if</u></font> null next <font color=Green><u>then</u></font> <font color=Cyan>(</font>cpError elem cp<font color=Cyan>,</font> ns<font color=Cyan>)</font>-<a name="line-183"></a>        <font color=Green><u>else</u></font> <font color=Cyan>(</font>[]<font color=Cyan>,</font> head next<font color=Cyan>)</font>	<font color=Blue>-- choose the first alternative with no errors</font>-<a name="line-184"></a>    checkCP elem cp<font color=Red>@</font><font color=Cyan>(</font>Choice cps Query<font color=Cyan>)</font> [] <font color=Red>=</font> <font color=Cyan>(</font>[]<font color=Cyan>,</font>[]<font color=Cyan>)</font>-<a name="line-185"></a>    checkCP elem cp<font color=Red>@</font><font color=Cyan>(</font>Choice cps Query<font color=Cyan>)</font> ns <font color=Red>=</font>-<a name="line-186"></a>        <font color=Green><u>let</u></font> next <font color=Red>=</font> choice elem ns cps <font color=Green><u>in</u></font>-<a name="line-187"></a>        <font color=Green><u>if</u></font> null next <font color=Green><u>then</u></font> <font color=Cyan>(</font>[]<font color=Cyan>,</font>ns<font color=Cyan>)</font>-<a name="line-188"></a>        <font color=Green><u>else</u></font> <font color=Cyan>(</font>[]<font color=Cyan>,</font> head next<font color=Cyan>)</font>-<a name="line-189"></a>    checkCP elem cp<font color=Red>@</font><font color=Cyan>(</font>Choice cps Star<font color=Cyan>)</font> [] <font color=Red>=</font> <font color=Cyan>(</font>[]<font color=Cyan>,</font>[]<font color=Cyan>)</font>-<a name="line-190"></a>    checkCP elem cp<font color=Red>@</font><font color=Cyan>(</font>Choice cps Star<font color=Cyan>)</font> ns <font color=Red>=</font>-<a name="line-191"></a>        <font color=Green><u>let</u></font> next <font color=Red>=</font> choice elem ns cps <font color=Green><u>in</u></font>-<a name="line-192"></a>        <font color=Green><u>if</u></font> null next <font color=Green><u>then</u></font> <font color=Cyan>(</font>[]<font color=Cyan>,</font>ns<font color=Cyan>)</font>-<a name="line-193"></a>        <font color=Green><u>else</u></font> checkCP elem <font color=Cyan>(</font>Choice cps Star<font color=Cyan>)</font> <font color=Cyan>(</font>head next<font color=Cyan>)</font>-<a name="line-194"></a>    checkCP elem cp<font color=Red>@</font><font color=Cyan>(</font>Choice cps Plus<font color=Cyan>)</font> [] <font color=Red>=</font> <font color=Cyan>(</font>cpError elem cp<font color=Cyan>,</font> []<font color=Cyan>)</font>-<a name="line-195"></a>    checkCP elem cp<font color=Red>@</font><font color=Cyan>(</font>Choice cps Plus<font color=Cyan>)</font> ns <font color=Red>=</font>-<a name="line-196"></a>        <font color=Green><u>let</u></font> next <font color=Red>=</font> choice elem ns cps <font color=Green><u>in</u></font>-<a name="line-197"></a>        <font color=Green><u>if</u></font> null next <font color=Green><u>then</u></font> <font color=Cyan>(</font>cpError elem cp<font color=Cyan>,</font> ns<font color=Cyan>)</font>-<a name="line-198"></a>        <font color=Green><u>else</u></font> checkCP elem <font color=Cyan>(</font>Choice cps Star<font color=Cyan>)</font> <font color=Cyan>(</font>head next<font color=Cyan>)</font>-<a name="line-199"></a> <font color=Blue>-- omit this clause, to permit (a?,b?) as a valid but empty sequence</font>-<a name="line-200"></a> <font color=Blue>-- checkCP elem cp@(Seq cps None) [] = (cpError elem cp, [])</font>-<a name="line-201"></a>    checkCP elem cp<font color=Red>@</font><font color=Cyan>(</font>Seq cps None<font color=Cyan>)</font> ns <font color=Red>=</font>-<a name="line-202"></a>        <font color=Green><u>let</u></font> <font color=Cyan>(</font>errs<font color=Cyan>,</font>next<font color=Cyan>)</font> <font color=Red>=</font> sequence elem ns cps <font color=Green><u>in</u></font>-<a name="line-203"></a>        <font color=Green><u>if</u></font> null errs <font color=Green><u>then</u></font> <font color=Cyan>(</font>[]<font color=Cyan>,</font>next<font color=Cyan>)</font>-<a name="line-204"></a>        <font color=Green><u>else</u></font> <font color=Cyan>(</font>cpError elem cp<font color=Cyan>++</font>errs<font color=Cyan>,</font> ns<font color=Cyan>)</font>-<a name="line-205"></a>    checkCP elem cp<font color=Red>@</font><font color=Cyan>(</font>Seq cps Query<font color=Cyan>)</font> [] <font color=Red>=</font> <font color=Cyan>(</font>[]<font color=Cyan>,</font>[]<font color=Cyan>)</font>-<a name="line-206"></a>    checkCP elem cp<font color=Red>@</font><font color=Cyan>(</font>Seq cps Query<font color=Cyan>)</font> ns <font color=Red>=</font>-<a name="line-207"></a>        <font color=Green><u>let</u></font> <font color=Cyan>(</font>errs<font color=Cyan>,</font>next<font color=Cyan>)</font> <font color=Red>=</font> sequence elem ns cps <font color=Green><u>in</u></font>-<a name="line-208"></a>        <font color=Green><u>if</u></font> null errs <font color=Green><u>then</u></font> <font color=Cyan>(</font>[]<font color=Cyan>,</font>next<font color=Cyan>)</font>-<a name="line-209"></a>        <font color=Green><u>else</u></font> <font color=Cyan>(</font>[]<font color=Cyan>,</font> ns<font color=Cyan>)</font>-<a name="line-210"></a>    checkCP elem cp<font color=Red>@</font><font color=Cyan>(</font>Seq cps Star<font color=Cyan>)</font> [] <font color=Red>=</font> <font color=Cyan>(</font>[]<font color=Cyan>,</font>[]<font color=Cyan>)</font>-<a name="line-211"></a>    checkCP elem cp<font color=Red>@</font><font color=Cyan>(</font>Seq cps Star<font color=Cyan>)</font> ns <font color=Red>=</font>-<a name="line-212"></a>        <font color=Green><u>let</u></font> <font color=Cyan>(</font>errs<font color=Cyan>,</font>next<font color=Cyan>)</font> <font color=Red>=</font> sequence elem ns cps <font color=Green><u>in</u></font>-<a name="line-213"></a>        <font color=Green><u>if</u></font> null errs <font color=Green><u>then</u></font> checkCP elem <font color=Cyan>(</font>Seq cps Star<font color=Cyan>)</font> next-<a name="line-214"></a>        <font color=Green><u>else</u></font> <font color=Cyan>(</font>[]<font color=Cyan>,</font> ns<font color=Cyan>)</font>-<a name="line-215"></a>    checkCP elem cp<font color=Red>@</font><font color=Cyan>(</font>Seq cps Plus<font color=Cyan>)</font> [] <font color=Red>=</font> <font color=Cyan>(</font>cpError elem cp<font color=Cyan>,</font> []<font color=Cyan>)</font>-<a name="line-216"></a>    checkCP elem cp<font color=Red>@</font><font color=Cyan>(</font>Seq cps Plus<font color=Cyan>)</font> ns <font color=Red>=</font>-<a name="line-217"></a>        <font color=Green><u>let</u></font> <font color=Cyan>(</font>errs<font color=Cyan>,</font>next<font color=Cyan>)</font> <font color=Red>=</font> sequence elem ns cps <font color=Green><u>in</u></font>-<a name="line-218"></a>        <font color=Green><u>if</u></font> null errs <font color=Green><u>then</u></font> checkCP elem <font color=Cyan>(</font>Seq cps Star<font color=Cyan>)</font> next-<a name="line-219"></a>        <font color=Green><u>else</u></font> <font color=Cyan>(</font>cpError elem cp<font color=Cyan>++</font>errs<font color=Cyan>,</font> ns<font color=Cyan>)</font>-<a name="line-220"></a>-<a name="line-221"></a>    choice elem ns cps <font color=Red>=</font>  <font color=Blue>-- return only those parses that don't give any errors</font>-<a name="line-222"></a>        <font color=Red>[</font> rem <font color=Red>|</font> <font color=Cyan>(</font>[]<font color=Cyan>,</font>rem<font color=Cyan>)</font> <font color=Red>&lt;-</font> map <font color=Cyan>(</font><font color=Red>\</font>cp<font color=Red>-&gt;</font> checkCP elem <font color=Cyan>(</font>definite cp<font color=Cyan>)</font> ns<font color=Cyan>)</font> cps <font color=Red>]</font>-<a name="line-223"></a>        <font color=Cyan>++</font> <font color=Red>[</font> ns <font color=Red>|</font> all possEmpty cps <font color=Red>]</font>-<a name="line-224"></a>        <font color=Green><u>where</u></font> definite <font color=Cyan>(</font>TagName n Query<font color=Cyan>)</font>  <font color=Red>=</font> TagName n None-<a name="line-225"></a>              definite <font color=Cyan>(</font>Choice cps Query<font color=Cyan>)</font> <font color=Red>=</font> Choice cps None-<a name="line-226"></a>              definite <font color=Cyan>(</font>Seq cps Query<font color=Cyan>)</font>    <font color=Red>=</font> Seq cps None-<a name="line-227"></a>              definite <font color=Cyan>(</font>TagName n Star<font color=Cyan>)</font>   <font color=Red>=</font> TagName n Plus-<a name="line-228"></a>              definite <font color=Cyan>(</font>Choice cps Star<font color=Cyan>)</font>  <font color=Red>=</font> Choice cps Plus-<a name="line-229"></a>              definite <font color=Cyan>(</font>Seq cps Star<font color=Cyan>)</font>     <font color=Red>=</font> Seq cps Plus-<a name="line-230"></a>              definite x                  <font color=Red>=</font> x-<a name="line-231"></a>              possEmpty <font color=Cyan>(</font>TagName <font color=Green><u>_</u></font> mod<font color=Cyan>)</font>   <font color=Red>=</font> mod <font color=Cyan>`</font>Prelude<font color=Cyan>.</font>elem<font color=Cyan>`</font> <font color=Red>[</font>Query<font color=Cyan>,</font>Star<font color=Red>]</font>-<a name="line-232"></a>              possEmpty <font color=Cyan>(</font>Choice cps None<font color=Cyan>)</font> <font color=Red>=</font> all possEmpty cps-<a name="line-233"></a>              possEmpty <font color=Cyan>(</font>Choice <font color=Green><u>_</u></font> mod<font color=Cyan>)</font>    <font color=Red>=</font> mod <font color=Cyan>`</font>Prelude<font color=Cyan>.</font>elem<font color=Cyan>`</font> <font color=Red>[</font>Query<font color=Cyan>,</font>Star<font color=Red>]</font>-<a name="line-234"></a>              possEmpty <font color=Cyan>(</font>Seq cps None<font color=Cyan>)</font>    <font color=Red>=</font> all possEmpty cps-<a name="line-235"></a>              possEmpty <font color=Cyan>(</font>Seq <font color=Green><u>_</u></font> mod<font color=Cyan>)</font>       <font color=Red>=</font> mod <font color=Cyan>`</font>Prelude<font color=Cyan>.</font>elem<font color=Cyan>`</font> <font color=Red>[</font>Query<font color=Cyan>,</font>Star<font color=Red>]</font>-<a name="line-236"></a>    sequence elem ns cps <font color=Red>=</font>  <font color=Blue>-- accumulate errors down the sequence</font>-<a name="line-237"></a>        foldl <font color=Cyan>(</font><font color=Red>\</font><font color=Cyan>(</font>es<font color=Cyan>,</font>ns<font color=Cyan>)</font> cp<font color=Red>-&gt;</font> <font color=Green><u>let</u></font> <font color=Cyan>(</font>es'<font color=Cyan>,</font>ns'<font color=Cyan>)</font> <font color=Red>=</font> checkCP elem cp ns-<a name="line-238"></a>                             <font color=Green><u>in</u></font> <font color=Cyan>(</font>es<font color=Cyan>++</font>es'<font color=Cyan>,</font> ns'<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-239"></a>              <font color=Cyan>(</font>[]<font color=Cyan>,</font>ns<font color=Cyan>)</font> cps-<a name="line-240"></a>-<a name="line-241"></a>    checkIDs elem <font color=Red>=</font>-<a name="line-242"></a>        <font color=Green><u>let</u></font> celem <font color=Red>=</font> CElem elem undefined-<a name="line-243"></a>            showAttr a <font color=Red>=</font> iffind a literal none-<a name="line-244"></a>            idElems <font color=Red>=</font> concatMap <font color=Cyan>(</font><font color=Red>\</font><font color=Cyan>(</font>name<font color=Cyan>,</font>at<font color=Cyan>)</font><font color=Red>-&gt;</font> multi <font color=Cyan>(</font>showAttr at <font color=Cyan>`o`</font> tag name<font color=Cyan>)</font>-<a name="line-245"></a>                                                    celem<font color=Cyan>)</font>-<a name="line-246"></a>                                <font color=Cyan>(</font>ids dtd<font color=Cyan>)</font>-<a name="line-247"></a>            badIds  <font color=Red>=</font> duplicates <font color=Cyan>(</font>map <font color=Cyan>(</font><font color=Red>\</font><font color=Cyan>(</font>CString <font color=Green><u>_</u></font> s <font color=Green><u>_</u></font><font color=Cyan>)</font><font color=Red>-&gt;</font>s<font color=Cyan>)</font> idElems<font color=Cyan>)</font>-<a name="line-248"></a>        <font color=Green><u>in</u></font> not <font color=Cyan>(</font>null badIds<font color=Cyan>)</font> <font color=Cyan>`gives`</font>-<a name="line-249"></a>               <font color=Cyan>(</font><font color=Magenta>"These attribute values of type ID are not unique: "</font>-<a name="line-250"></a>                <font color=Cyan>++</font>concat <font color=Cyan>(</font>intersperse <font color=Magenta>","</font> badIds<font color=Cyan>)</font><font color=Cyan>++</font><font color=Magenta>"."</font><font color=Cyan>)</font>-<a name="line-251"></a>-<a name="line-252"></a>-<a name="line-253"></a><a name="cpError"></a><font color=Blue>cpError</font> <font color=Red>::</font> Name <font color=Red>-&gt;</font> CP <font color=Red>-&gt;</font> <font color=Red>[</font>String<font color=Red>]</font>-<a name="line-254"></a><font color=Blue>cpError</font> elem cp <font color=Red>=</font>-<a name="line-255"></a>    <font color=Red>[</font><font color=Magenta>"Element &lt;"</font><font color=Cyan>++</font>elem<font color=Cyan>++</font><font color=Magenta>"&gt; should contain "</font><font color=Cyan>++</font>display cp<font color=Cyan>++</font><font color=Magenta>" but does not."</font><font color=Red>]</font>-<a name="line-256"></a>-<a name="line-257"></a>-<a name="line-258"></a><a name="display"></a><font color=Blue>display</font> <font color=Red>::</font> CP <font color=Red>-&gt;</font> String-<a name="line-259"></a><font color=Blue>display</font> <font color=Cyan>(</font>TagName name mod<font color=Cyan>)</font> <font color=Red>=</font> name <font color=Cyan>++</font> modifier mod-<a name="line-260"></a><font color=Blue>display</font> <font color=Cyan>(</font>Choice cps mod<font color=Cyan>)</font>   <font color=Red>=</font> <font color=Magenta>"("</font> <font color=Cyan>++</font> concat <font color=Cyan>(</font>intersperse <font color=Magenta>"|"</font> <font color=Cyan>(</font>map display cps<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-261"></a>                             <font color=Cyan>++</font> <font color=Magenta>")"</font> <font color=Cyan>++</font> modifier mod-<a name="line-262"></a><font color=Blue>display</font> <font color=Cyan>(</font>Seq cps mod<font color=Cyan>)</font>      <font color=Red>=</font> <font color=Magenta>"("</font> <font color=Cyan>++</font> concat <font color=Cyan>(</font>intersperse <font color=Magenta>","</font> <font color=Cyan>(</font>map display cps<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-263"></a>                             <font color=Cyan>++</font> <font color=Magenta>")"</font> <font color=Cyan>++</font> modifier mod-<a name="line-264"></a>-<a name="line-265"></a><a name="modifier"></a><font color=Blue>modifier</font> <font color=Red>::</font> Modifier <font color=Red>-&gt;</font> String-<a name="line-266"></a><font color=Blue>modifier</font> None  <font color=Red>=</font> <font color=Magenta>""</font>-<a name="line-267"></a><font color=Blue>modifier</font> Query <font color=Red>=</font> <font color=Magenta>"?"</font>-<a name="line-268"></a><font color=Blue>modifier</font> Star  <font color=Red>=</font> <font color=Magenta>"*"</font>-<a name="line-269"></a><font color=Blue>modifier</font> Plus  <font color=Red>=</font> <font color=Magenta>"+"</font>-<a name="line-270"></a>-<a name="line-271"></a><a name="duplicates"></a><font color=Blue>duplicates</font> <font color=Red>::</font> Eq a <font color=Red>=&gt;</font> <font color=Red>[</font>a<font color=Red>]</font> <font color=Red>-&gt;</font> <font color=Red>[</font>a<font color=Red>]</font>-<a name="line-272"></a><font color=Blue>duplicates</font> xs <font color=Red>=</font> xs <font color=Cyan>\\</font> <font color=Cyan>(</font>nub xs<font color=Cyan>)</font>-</pre>-</body>-</html>
− docs/HaXml/src/Text/XML/HaXml/Verbatim.html
@@ -1,101 +0,0 @@-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">-<html>-<head>-<!-- Generated by HsColour, http://www.cs.york.ac.uk/fp/darcs/hscolour/ -->-<title>src/Text/XML/HaXml/Verbatim.hs</title>-</head>-<body>-<pre><a name="line-1"></a><font color=Blue>{- |-<a name="line-2"></a>   Maintainer  :  simons@cryp.to-<a name="line-3"></a>   Stability   :  experimental-<a name="line-4"></a>   Portability :  portable-<a name="line-5"></a>-<a name="line-6"></a>   The preferred method for rendering a 'Document' or single 'Content'-<a name="line-7"></a>   is by using the pretty printing facility defined in "Pretty".-<a name="line-8"></a>   Pretty-printing does not work well for cases, however, where the-<a name="line-9"></a>   formatting in the XML document is significant. Examples of this-<a name="line-10"></a>   case are XHTML's @\&lt;pre\&gt;@ tag, Docbook's @\&lt;literallayout\&gt;@ tag,-<a name="line-11"></a>   and many more.-<a name="line-12"></a>-<a name="line-13"></a>   Theoretically, the document author could avoid this problem by-<a name="line-14"></a>   wrapping the contents of these tags in a \&lt;![CDATA[...]]\&gt; section,-<a name="line-15"></a>   but often this is not practical, for instance when the-<a name="line-16"></a>   literal-layout section contains other elements. Finally, program-<a name="line-17"></a>   writers could manually format these elements by transforming them-<a name="line-18"></a>   into a 'literal' string in their 'CFliter', etc., but this is-<a name="line-19"></a>   annoying to do and prone to omissions and formatting errors.-<a name="line-20"></a>-<a name="line-21"></a>   As an alternative, this module provides the function 'verbatim',-<a name="line-22"></a>   which will format XML 'Content' as a 'String' while retaining the-<a name="line-23"></a>   formatting of the input document unchanged.-<a name="line-24"></a>-<a name="line-25"></a>   /Know problems/:-<a name="line-26"></a>-<a name="line-27"></a>    * HaXml's parser eats line feeds between two tags.-<a name="line-28"></a>-<a name="line-29"></a>    * 'Attribute's should be formatted by making them an instance of-<a name="line-30"></a>      'Verbatim' as well, but since an 'Attribute' is just a tuple,-<a name="line-31"></a>      not a full data type, the helper function 'verbAttr' must be-<a name="line-32"></a>      used instead.-<a name="line-33"></a>-<a name="line-34"></a>    * 'CMisc' is not yet supported.-<a name="line-35"></a>-<a name="line-36"></a>    * 'Element's, which contain no content, are formatted as-<a name="line-37"></a>       @\&lt;element-name\/\&gt;@, even if they were not defined as being of-<a name="line-38"></a>       type @EMPTY@. In XML this perfectly alright, but in SGML it is-<a name="line-39"></a>       not. Those, who wish to use 'verbatim' to format parts of say-<a name="line-40"></a>       an HTML page will have to (a) replace problematic elements by-<a name="line-41"></a>       'literal's /before/ running 'verbatim' or (b) use a second-<a name="line-42"></a>       search-and-replace stage to fix this.-<a name="line-43"></a> -}</font>-<a name="line-44"></a>-<a name="line-45"></a><font color=Green><u>module</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Verbatim <font color=Green><u>where</u></font>-<a name="line-46"></a>-<a name="line-47"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Types-<a name="line-48"></a>-<a name="line-49"></a><font color=Blue>-- |This class promises that the function 'verbatim' knows how to</font>-<a name="line-50"></a><font color=Blue>-- format this data type into a string without changing the</font>-<a name="line-51"></a><font color=Blue>-- formatting.</font>-<a name="line-52"></a>-<a name="line-53"></a><a name="Verbatim"></a><font color=Green><u>class</u></font> Verbatim a <font color=Green><u>where</u></font>-<a name="line-54"></a>    verbatim <font color=Red>::</font> a <font color=Red>-&gt;</font> String-<a name="line-55"></a>-<a name="line-56"></a><font color=Green><u>instance</u></font> <font color=Cyan>(</font>Verbatim a<font color=Cyan>)</font> <font color=Red>=&gt;</font> Verbatim <font color=Red>[</font>a<font color=Red>]</font> <font color=Green><u>where</u></font>-<a name="line-57"></a>    verbatim  <font color=Red>=</font> concat <font color=Cyan>.</font> <font color=Cyan>(</font>map verbatim<font color=Cyan>)</font>-<a name="line-58"></a>-<a name="line-59"></a><font color=Green><u>instance</u></font> Verbatim Char <font color=Green><u>where</u></font>-<a name="line-60"></a>    verbatim c <font color=Red>=</font> <font color=Red>[</font>c<font color=Red>]</font>-<a name="line-61"></a>-<a name="line-62"></a><font color=Green><u>instance</u></font> <font color=Cyan>(</font>Verbatim a<font color=Cyan>,</font> Verbatim b<font color=Cyan>)</font> <font color=Red>=&gt;</font> Verbatim <font color=Cyan>(</font>Either a b<font color=Cyan>)</font> <font color=Green><u>where</u></font>-<a name="line-63"></a>    verbatim <font color=Cyan>(</font>Left v<font color=Cyan>)</font>  <font color=Red>=</font> verbatim v-<a name="line-64"></a>    verbatim <font color=Cyan>(</font>Right v<font color=Cyan>)</font> <font color=Red>=</font> verbatim v-<a name="line-65"></a>-<a name="line-66"></a><font color=Green><u>instance</u></font> Verbatim <font color=Cyan>(</font>Content i<font color=Cyan>)</font> <font color=Green><u>where</u></font>-<a name="line-67"></a>    verbatim <font color=Cyan>(</font>CElem c <font color=Green><u>_</u></font><font color=Cyan>)</font>     <font color=Red>=</font> verbatim c-<a name="line-68"></a>    verbatim <font color=Cyan>(</font>CString <font color=Green><u>_</u></font> c <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red>=</font> c-<a name="line-69"></a>    verbatim <font color=Cyan>(</font>CRef c <font color=Green><u>_</u></font><font color=Cyan>)</font>      <font color=Red>=</font> verbatim c-<a name="line-70"></a>    verbatim <font color=Cyan>(</font>CMisc <font color=Green><u>_</u></font> <font color=Green><u>_</u></font><font color=Cyan>)</font>     <font color=Red>=</font> error <font color=Magenta>"NYI: verbatim not defined for CMisc"</font>-<a name="line-71"></a>-<a name="line-72"></a><font color=Green><u>instance</u></font> Verbatim <font color=Cyan>(</font>Element i<font color=Cyan>)</font> <font color=Green><u>where</u></font>-<a name="line-73"></a>    verbatim <font color=Cyan>(</font>Elem nam att []<font color=Cyan>)</font>   <font color=Red>=</font> <font color=Magenta>"&lt;"</font> <font color=Cyan>++</font> nam <font color=Cyan>++</font> <font color=Cyan>(</font>concat <font color=Cyan>.</font> <font color=Cyan>(</font>map verbAttr<font color=Cyan>)</font><font color=Cyan>)</font> att-<a name="line-74"></a>                                   <font color=Cyan>++</font> <font color=Magenta>"/&gt;"</font>-<a name="line-75"></a>    verbatim <font color=Cyan>(</font>Elem nam att cont<font color=Cyan>)</font> <font color=Red>=</font> <font color=Magenta>"&lt;"</font> <font color=Cyan>++</font> nam <font color=Cyan>++</font> <font color=Cyan>(</font>concat <font color=Cyan>.</font> <font color=Cyan>(</font>map verbAttr<font color=Cyan>)</font><font color=Cyan>)</font> att-<a name="line-76"></a>                                   <font color=Cyan>++</font> <font color=Magenta>"&gt;"</font> <font color=Cyan>++</font> verbatim cont <font color=Cyan>++</font> <font color=Magenta>"&lt;/"</font> <font color=Cyan>++</font> nam <font color=Cyan>++</font> <font color=Magenta>"&gt;"</font>-<a name="line-77"></a>-<a name="line-78"></a><font color=Green><u>instance</u></font> Verbatim Reference <font color=Green><u>where</u></font>-<a name="line-79"></a>    verbatim <font color=Cyan>(</font>RefEntity r<font color=Cyan>)</font> <font color=Red>=</font> <font color=Magenta>"&amp;"</font> <font color=Cyan>++</font> verbatim r <font color=Cyan>++</font> <font color=Magenta>";"</font>-<a name="line-80"></a>    verbatim <font color=Cyan>(</font>RefChar c<font color=Cyan>)</font>   <font color=Red>=</font> <font color=Magenta>"&amp;#"</font> <font color=Cyan>++</font> show c <font color=Cyan>++</font> <font color=Magenta>";"</font>-<a name="line-81"></a>-<a name="line-82"></a>-<a name="line-83"></a><font color=Blue>-- |This is a helper function is required because Haskell does not</font>-<a name="line-84"></a><font color=Blue>-- allow to make an ordinary tuple (like 'Attribute') an instance of a</font>-<a name="line-85"></a><font color=Blue>-- class. The resulting output will preface the actual attribute with</font>-<a name="line-86"></a><font color=Blue>-- a single blank so that lists of 'Attribute's can be handled</font>-<a name="line-87"></a><font color=Blue>-- implicitly by the definition for lists of 'Verbatim' data types.</font>-<a name="line-88"></a>-<a name="line-89"></a><a name="verbAttr"></a><font color=Blue>verbAttr</font> <font color=Red>::</font> Attribute <font color=Red>-&gt;</font> String-<a name="line-90"></a><font color=Blue>verbAttr</font> <font color=Cyan>(</font>n<font color=Cyan>,</font> AttValue v<font color=Cyan>)</font> <font color=Red>=</font> <font color=Magenta>" "</font> <font color=Cyan>++</font> n <font color=Cyan>++</font> <font color=Magenta>"=\""</font> <font color=Cyan>++</font> verbatim v <font color=Cyan>++</font> <font color=Magenta>"\""</font>-<a name="line-91"></a>-</pre>-</body>-</html>
− docs/HaXml/src/Text/XML/HaXml/Wrappers.html
@@ -1,81 +0,0 @@-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">-<html>-<head>-<!-- Generated by HsColour, http://www.cs.york.ac.uk/fp/darcs/hscolour/ -->-<title>src/Text/XML/HaXml/Wrappers.hs</title>-</head>-<body>-<pre><a name="line-1"></a><font color=Green><u>module</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Wrappers-<a name="line-2"></a>  <font color=Cyan>(</font> fix2Args-<a name="line-3"></a>  <font color=Cyan>,</font> processXmlWith-<a name="line-4"></a>  <font color=Cyan>,</font> onContent-<a name="line-5"></a>  <font color=Cyan>)</font> <font color=Green><u>where</u></font>-<a name="line-6"></a>-<a name="line-7"></a><font color=Blue>-- imports required for processXmlWith and fix2Args</font>-<a name="line-8"></a><font color=Green><u>import</u></font> System-<a name="line-9"></a><font color=Green><u>import</u></font> IO-<a name="line-10"></a><font color=Green><u>import</u></font> List <font color=Cyan>(</font>isSuffixOf<font color=Cyan>)</font>-<a name="line-11"></a>-<a name="line-12"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Types       <font color=Cyan>(</font>Document<font color=Cyan>(</font><font color=Red>..</font><font color=Cyan>)</font><font color=Cyan>,</font>Content<font color=Cyan>(</font><font color=Red>..</font><font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-13"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Combinators <font color=Cyan>(</font>CFilter<font color=Cyan>)</font>-<a name="line-14"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Posn        <font color=Cyan>(</font>Posn<font color=Cyan>,</font>posInNewCxt<font color=Cyan>)</font>-<a name="line-15"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Parse       <font color=Cyan>(</font>xmlParse<font color=Cyan>)</font>-<a name="line-16"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Html<font color=Cyan>.</font>Parse  <font color=Cyan>(</font>htmlParse<font color=Cyan>)</font>-<a name="line-17"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Pretty <font color=Green><u>as</u></font> PP<font color=Cyan>(</font>document<font color=Cyan>)</font>-<a name="line-18"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>PrettyPrint<font color=Cyan>.</font>HughesPJ  <font color=Cyan>(</font>render<font color=Cyan>)</font>-<a name="line-19"></a>-<a name="line-20"></a>-<a name="line-21"></a><a name="fix2Args"></a><font color=Blue>-- | This useful auxiliary checks the commandline arguments for two</font>-<a name="line-22"></a><font color=Blue>--   filenames, the input and output file respectively.  If either</font>-<a name="line-23"></a><font color=Blue>--   is missing, it is replaced by '-', which can be interpreted by the</font>-<a name="line-24"></a><font color=Blue>--   caller as stdin and\/or stdout.</font>-<a name="line-25"></a><font color=Blue>fix2Args</font> <font color=Red>::</font> IO <font color=Cyan>(</font>String<font color=Cyan>,</font>String<font color=Cyan>)</font>-<a name="line-26"></a><font color=Blue>fix2Args</font> <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-27"></a>  args <font color=Red>&lt;-</font> getArgs-<a name="line-28"></a>  <font color=Green><u>case</u></font> length args <font color=Green><u>of</u></font>-<a name="line-29"></a>    <font color=Magenta>0</font> <font color=Red>-&gt;</font> return <font color=Cyan>(</font><font color=Magenta>"-"</font><font color=Cyan>,</font>     <font color=Magenta>"-"</font><font color=Cyan>)</font>-<a name="line-30"></a>    <font color=Magenta>1</font> <font color=Red>-&gt;</font> return <font color=Cyan>(</font>args<font color=Cyan>!!</font><font color=Magenta>0</font><font color=Cyan>,</font> <font color=Magenta>"-"</font><font color=Cyan>)</font>-<a name="line-31"></a>    <font color=Magenta>2</font> <font color=Red>-&gt;</font> return <font color=Cyan>(</font>args<font color=Cyan>!!</font><font color=Magenta>0</font><font color=Cyan>,</font> args<font color=Cyan>!!</font><font color=Magenta>1</font><font color=Cyan>)</font>-<a name="line-32"></a>    <font color=Green><u>_</u></font> <font color=Red>-&gt;</font> <font color=Green><u>do</u></font> prog <font color=Red>&lt;-</font> getProgName-<a name="line-33"></a>            putStrLn <font color=Cyan>(</font><font color=Magenta>"Usage: "</font><font color=Cyan>++</font>prog<font color=Cyan>++</font><font color=Magenta>" [infile] [outfile]"</font><font color=Cyan>)</font>-<a name="line-34"></a>            exitFailure-<a name="line-35"></a>-<a name="line-36"></a>-<a name="line-37"></a><a name="processXmlWith"></a><font color=Blue>-- | The wrapper @processXmlWith@ returns an IO () computation</font>-<a name="line-38"></a><font color=Blue>--   that collects the filenames (or stdin\/stdout) to use when</font>-<a name="line-39"></a><font color=Blue>--   reading\/writing XML documents.  Its CFilter argument</font>-<a name="line-40"></a><font color=Blue>--   is applied to transform the XML document from the input and</font>-<a name="line-41"></a><font color=Blue>--   write it to the output.  No DTD is attached to the output.</font>-<a name="line-42"></a><font color=Blue>--</font>-<a name="line-43"></a><font color=Blue>--   If the input filename ends with .html or .htm, it is parsed using</font>-<a name="line-44"></a><font color=Blue>--   the error-correcting HTML parser rather than the strict XML parser.</font>-<a name="line-45"></a><font color=Blue>processXmlWith</font> <font color=Red>::</font> CFilter Posn <font color=Red>-&gt;</font> IO ()-<a name="line-46"></a><font color=Blue>processXmlWith</font> f <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-47"></a>  <font color=Cyan>(</font>inf<font color=Cyan>,</font>outf<font color=Cyan>)</font> <font color=Red>&lt;-</font> fix2Args-<a name="line-48"></a>  input      <font color=Red>&lt;-</font> <font color=Green><u>if</u></font> inf<font color=Cyan>==</font><font color=Magenta>"-"</font> <font color=Green><u>then</u></font> getContents <font color=Green><u>else</u></font> readFile inf-<a name="line-49"></a>  o          <font color=Red>&lt;-</font> <font color=Green><u>if</u></font> outf<font color=Cyan>==</font><font color=Magenta>"-"</font> <font color=Green><u>then</u></font> return stdout <font color=Green><u>else</u></font> openFile outf WriteMode-<a name="line-50"></a>  parse      <font color=Red>&lt;-</font> <font color=Green><u>if</u></font> <font color=Magenta>".html"</font> <font color=Cyan>`isSuffixOf`</font> inf <font color=Cyan>||</font> <font color=Magenta>".htm"</font> <font color=Cyan>`isSuffixOf`</font> inf-<a name="line-51"></a>                <font color=Green><u>then</u></font> return <font color=Cyan>(</font>htmlParse inf<font color=Cyan>)</font>-<a name="line-52"></a>                <font color=Green><u>else</u></font> return <font color=Cyan>(</font>xmlParse inf<font color=Cyan>)</font>-<a name="line-53"></a>  <font color=Cyan>(</font> hPutStrLn o <font color=Cyan>.</font> render <font color=Cyan>.</font> PP<font color=Cyan>.</font>document <font color=Cyan>.</font> onContent inf f <font color=Cyan>.</font> parse <font color=Cyan>)</font> input-<a name="line-54"></a>  hFlush o-<a name="line-55"></a>-<a name="line-56"></a>  <font color=Green><u>where</u></font>-<a name="line-57"></a>    onContent <font color=Red>::</font> FilePath <font color=Red>-&gt;</font> <font color=Cyan>(</font>CFilter Posn<font color=Cyan>)</font> <font color=Red>-&gt;</font> Document Posn <font color=Red>-&gt;</font> Document Posn-<a name="line-58"></a>    onContent file filter <font color=Cyan>(</font>Document p s e m<font color=Cyan>)</font> <font color=Red>=</font>-<a name="line-59"></a>        <font color=Green><u>case</u></font> filter <font color=Cyan>(</font>CElem e <font color=Cyan>(</font>posInNewCxt file Nothing<font color=Cyan>)</font><font color=Cyan>)</font> <font color=Green><u>of</u></font>-<a name="line-60"></a>            <font color=Red>[</font>CElem e' <font color=Green><u>_</u></font><font color=Red>]</font> <font color=Red>-&gt;</font> Document p s e' m-<a name="line-61"></a>            []           <font color=Red>-&gt;</font> error <font color=Magenta>"produced no output"</font>-<a name="line-62"></a>            <font color=Green><u>_</u></font>            <font color=Red>-&gt;</font> error <font color=Magenta>"produced more than one output"</font>-<a name="line-63"></a>-<a name="line-64"></a><a name="onContent"></a><font color=Blue>-- | The wrapper @onContent@ simply applies a given content filter to a</font>-<a name="line-65"></a><font color=Blue>--   document.  Ambiguous or empty results raise an error exception.</font>-<a name="line-66"></a><font color=Blue>onContent</font> <font color=Red>::</font> CFilter i <font color=Red>-&gt;</font> Document i <font color=Red>-&gt;</font> Document i-<a name="line-67"></a><font color=Blue>onContent</font> filter <font color=Cyan>(</font>Document p s e m<font color=Cyan>)</font> <font color=Red>=</font>-<a name="line-68"></a>    <font color=Green><u>case</u></font> filter <font color=Cyan>(</font>CElem e undefined<font color=Cyan>)</font> <font color=Green><u>of</u></font>-<a name="line-69"></a>      <font color=Red>[</font>CElem e' <font color=Green><u>_</u></font><font color=Red>]</font> <font color=Red>-&gt;</font> Document p s e' m-<a name="line-70"></a>      []           <font color=Red>-&gt;</font> error <font color=Magenta>"onContent: produced no output"</font>-<a name="line-71"></a>      <font color=Green><u>_</u></font>            <font color=Red>-&gt;</font> error <font color=Magenta>"onContent: produced more than one output"</font>-</pre>-</body>-</html>
− docs/HaXml/src/Text/XML/HaXml/XmlContent.html
@@ -1,188 +0,0 @@-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">-<html>-<head>-<!-- Generated by HsColour, http://www.cs.york.ac.uk/fp/darcs/hscolour/ -->-<title>src/Text/XML/HaXml/XmlContent.hs</title>-</head>-<body>-<pre><a name="line-1"></a><font color=Blue>-- | The class 'XmlContent' is a kind of replacement for Read and Show:</font>-<a name="line-2"></a><font color=Blue>--   it provides conversions between a generic XML tree representation</font>-<a name="line-3"></a><font color=Blue>--   and your own more specialised typeful Haskell data trees.</font>-<a name="line-4"></a><font color=Blue>--</font>-<a name="line-5"></a><font color=Blue>--   If you are starting with an XML DTD, use HaXml's tool DtdToHaskell</font>-<a name="line-6"></a><font color=Blue>--   to generate both the Haskell types and the corresponding instances.</font>-<a name="line-7"></a><font color=Blue>--   </font>-<a name="line-8"></a><font color=Blue>--   If you are starting with a set of Haskell datatypes, use DrIFT to</font>-<a name="line-9"></a><font color=Blue>--   derive instances of this class for you:</font>-<a name="line-10"></a><font color=Blue>--       http:\/\/repetae.net\/john\/computer\/haskell\/DrIFT</font>-<a name="line-11"></a><font color=Blue>--   and _do_not_ use the current module, but rather</font>-<a name="line-12"></a><font color=Blue>--   Text.XML.HaXml.XmlContent.Haskell, for the correct matching</font>-<a name="line-13"></a><font color=Blue>--   instances for standard Haskell datatypes.</font>-<a name="line-14"></a>-<a name="line-15"></a><font color=Green><u>module</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>XmlContent-<a name="line-16"></a>  <font color=Cyan>(</font>-<a name="line-17"></a>  <font color=Blue>-- * Re-export everything from Text.XML.HaXml.XmlContent.Parser.</font>-<a name="line-18"></a>    <font color=Green><u>module</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>XmlContent<font color=Cyan>.</font>Parser-<a name="line-19"></a>  <font color=Cyan>,</font> <font color=Green><u>module</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>TypeMapping-<a name="line-20"></a>  <font color=Blue>-- * Contains instances of the XmlContent classes,</font>-<a name="line-21"></a>  <font color=Blue>--   for the basic Haskell datatypes list and Maybe,</font>-<a name="line-22"></a>  <font color=Blue>--   intended for use with DtdToHaskell-generated datatypes.</font>-<a name="line-23"></a>  <font color=Blue>--   See the alternative instances in Text.XML.HaXml.XmlContent.Haskell</font>-<a name="line-24"></a>  <font color=Blue>--   if your datatypes originate in Haskell instead.</font>-<a name="line-25"></a><font color=Blue>--  , module Text.XML.HaXml.XmlContent</font>-<a name="line-26"></a>-<a name="line-27"></a>  <font color=Blue>-- * Whole-document conversion functions</font>-<a name="line-28"></a>  <font color=Cyan>,</font> toXml<font color=Cyan>,</font> fromXml-<a name="line-29"></a>  <font color=Cyan>,</font> readXml<font color=Cyan>,</font> showXml<font color=Cyan>,</font> fpsShowXml-<a name="line-30"></a>  <font color=Cyan>,</font> fReadXml<font color=Cyan>,</font> fWriteXml<font color=Cyan>,</font> fpsWriteXml-<a name="line-31"></a>  <font color=Cyan>,</font> hGetXml<font color=Cyan>,</font>  hPutXml<font color=Cyan>,</font> fpsHPutXml-<a name="line-32"></a>  <font color=Cyan>)</font> <font color=Green><u>where</u></font>-<a name="line-33"></a>-<a name="line-34"></a><font color=Green><u>import</u></font> IO-<a name="line-35"></a><font color=Green><u>import</u></font> <font color=Green><u>qualified</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>ByteStringPP <font color=Green><u>as</u></font> FPS <font color=Cyan>(</font>document<font color=Cyan>)</font>-<a name="line-36"></a><font color=Green><u>import</u></font> <font color=Green><u>qualified</u></font> Data<font color=Cyan>.</font>ByteString<font color=Cyan>.</font>Lazy<font color=Cyan>.</font>Char8 <font color=Green><u>as</u></font> FPS-<a name="line-37"></a>-<a name="line-38"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>PrettyPrint<font color=Cyan>.</font>HughesPJ <font color=Cyan>(</font>render<font color=Cyan>)</font>-<a name="line-39"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>ParserCombinators<font color=Cyan>.</font>Poly-<a name="line-40"></a>-<a name="line-41"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Types-<a name="line-42"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>TypeMapping-<a name="line-43"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Posn     <font color=Cyan>(</font>Posn<font color=Cyan>,</font> posInNewCxt<font color=Cyan>)</font>-<a name="line-44"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Pretty   <font color=Cyan>(</font>document<font color=Cyan>)</font>-<a name="line-45"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Parse    <font color=Cyan>(</font>xmlParse<font color=Cyan>)</font>-<a name="line-46"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>XmlContent<font color=Cyan>.</font>Parser-<a name="line-47"></a>-<a name="line-48"></a>-<a name="line-49"></a><font color=Blue>------------------------------------------------------------------------</font>-<a name="line-50"></a>-<a name="line-51"></a>        <font color=Blue>-- probably want to write DTD separately from value, and have</font>-<a name="line-52"></a>        <font color=Blue>-- easy ways to combine DTD + value into a document, or write</font>-<a name="line-53"></a>        <font color=Blue>-- them to separate files.</font>-<a name="line-54"></a>-<a name="line-55"></a><a name="fReadXml"></a><font color=Blue>-- | Read an XML document from a file and convert it to a fully-typed</font>-<a name="line-56"></a><font color=Blue>--   Haskell value.</font>-<a name="line-57"></a><font color=Blue>fReadXml</font>  <font color=Red>::</font> XmlContent a <font color=Red>=&gt;</font> FilePath <font color=Red>-&gt;</font> IO a-<a name="line-58"></a><font color=Blue>fReadXml</font> fp <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-59"></a>    f <font color=Red>&lt;-</font> <font color=Cyan>(</font> <font color=Green><u>if</u></font> fp<font color=Cyan>==</font><font color=Magenta>"-"</font> <font color=Green><u>then</u></font> return stdin-<a name="line-60"></a>           <font color=Green><u>else</u></font> openFile fp ReadMode <font color=Cyan>)</font>-<a name="line-61"></a>    x <font color=Red>&lt;-</font> hGetContents f-<a name="line-62"></a>    <font color=Green><u>let</u></font> <font color=Cyan>(</font>Document <font color=Green><u>_</u></font> <font color=Green><u>_</u></font> y <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red>=</font> xmlParse fp x-<a name="line-63"></a>        y' <font color=Red>=</font> CElem y <font color=Cyan>(</font>posInNewCxt fp Nothing<font color=Cyan>)</font>-<a name="line-64"></a>    either fail return <font color=Cyan>(</font>fst <font color=Cyan>(</font>runParser parseContents <font color=Red>[</font>y'<font color=Red>]</font><font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-65"></a>-<a name="line-66"></a><a name="fWriteXml"></a><font color=Blue>-- | Write a fully-typed Haskell value to the given file as an XML</font>-<a name="line-67"></a><font color=Blue>--   document.</font>-<a name="line-68"></a><font color=Blue>fWriteXml</font> <font color=Red>::</font> XmlContent a <font color=Red>=&gt;</font> FilePath <font color=Red>-&gt;</font> a <font color=Red>-&gt;</font> IO ()-<a name="line-69"></a><font color=Blue>fWriteXml</font> fp x <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-70"></a>    f <font color=Red>&lt;-</font> <font color=Cyan>(</font> <font color=Green><u>if</u></font> fp<font color=Cyan>==</font><font color=Magenta>"-"</font> <font color=Green><u>then</u></font> return stdout-<a name="line-71"></a>           <font color=Green><u>else</u></font> openFile fp WriteMode <font color=Cyan>)</font>-<a name="line-72"></a>    hPutXml f False x-<a name="line-73"></a>    hClose f-<a name="line-74"></a>-<a name="line-75"></a><a name="fpsWriteXml"></a><font color=Blue>-- | Write any Haskell value to the given file as an XML document,</font>-<a name="line-76"></a><font color=Blue>--   using the FastPackedString interface (output will not be prettified).</font>-<a name="line-77"></a><font color=Blue>fpsWriteXml</font> <font color=Red>::</font> XmlContent a <font color=Red>=&gt;</font> FilePath <font color=Red>-&gt;</font> a <font color=Red>-&gt;</font> IO ()-<a name="line-78"></a><font color=Blue>fpsWriteXml</font> fp x <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-79"></a>    f <font color=Red>&lt;-</font> <font color=Cyan>(</font> <font color=Green><u>if</u></font> fp<font color=Cyan>==</font><font color=Magenta>"-"</font> <font color=Green><u>then</u></font> return stdout-<a name="line-80"></a>           <font color=Green><u>else</u></font> openFile fp WriteMode <font color=Cyan>)</font>-<a name="line-81"></a>    fpsHPutXml f False x-<a name="line-82"></a>    hClose f-<a name="line-83"></a>-<a name="line-84"></a><a name="readXml"></a><font color=Blue>-- | Read a fully-typed XML document from a string.</font>-<a name="line-85"></a><font color=Blue>readXml</font> <font color=Red>::</font> XmlContent a <font color=Red>=&gt;</font> String <font color=Red>-&gt;</font> Either String a-<a name="line-86"></a><font color=Blue>readXml</font> s <font color=Red>=</font>-<a name="line-87"></a>    <font color=Green><u>let</u></font> <font color=Cyan>(</font>Document <font color=Green><u>_</u></font> <font color=Green><u>_</u></font> y <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red>=</font> xmlParse <font color=Magenta>"string input"</font> s <font color=Green><u>in</u></font>-<a name="line-88"></a>    fst <font color=Cyan>(</font>runParser parseContents-<a name="line-89"></a>                   <font color=Red>[</font>CElem y <font color=Cyan>(</font>posInNewCxt <font color=Magenta>"string input"</font> Nothing<font color=Cyan>)</font><font color=Red>]</font><font color=Cyan>)</font>-<a name="line-90"></a>-<a name="line-91"></a><a name="showXml"></a><font color=Blue>-- | Convert a fully-typed XML document to a string (without DTD).</font>-<a name="line-92"></a><font color=Blue>showXml</font> <font color=Red>::</font> XmlContent a <font color=Red>=&gt;</font> Bool <font color=Red>-&gt;</font> a <font color=Red>-&gt;</font> String-<a name="line-93"></a><font color=Blue>showXml</font> dtd x <font color=Red>=</font>-<a name="line-94"></a>    <font color=Green><u>case</u></font> toContents x <font color=Green><u>of</u></font>-<a name="line-95"></a>      <font color=Red>[</font>CElem <font color=Green><u>_</u></font> <font color=Green><u>_</u></font><font color=Red>]</font> <font color=Red>-&gt;</font> <font color=Cyan>(</font>render <font color=Cyan>.</font> document <font color=Cyan>.</font> toXml dtd<font color=Cyan>)</font> x-<a name="line-96"></a>      <font color=Green><u>_</u></font> <font color=Red>-&gt;</font> <font color=Magenta>""</font>-<a name="line-97"></a>-<a name="line-98"></a><a name="fpsShowXml"></a><font color=Blue>-- | Convert a fully-typed XML document to a ByteString (without DTD).</font>-<a name="line-99"></a><font color=Blue>fpsShowXml</font> <font color=Red>::</font> XmlContent a <font color=Red>=&gt;</font> Bool <font color=Red>-&gt;</font> a <font color=Red>-&gt;</font> FPS<font color=Cyan>.</font>ByteString-<a name="line-100"></a><font color=Blue>fpsShowXml</font> dtd x <font color=Red>=</font>-<a name="line-101"></a>    <font color=Green><u>case</u></font> toContents x <font color=Green><u>of</u></font>-<a name="line-102"></a>      <font color=Red>[</font>CElem <font color=Green><u>_</u></font> <font color=Green><u>_</u></font><font color=Red>]</font> <font color=Red>-&gt;</font> <font color=Cyan>(</font>FPS<font color=Cyan>.</font>document <font color=Cyan>.</font> toXml dtd<font color=Cyan>)</font> x-<a name="line-103"></a>      <font color=Green><u>_</u></font> <font color=Red>-&gt;</font> FPS<font color=Cyan>.</font>empty-<a name="line-104"></a>-<a name="line-105"></a>-<a name="line-106"></a><a name="toXml"></a><font color=Blue>-- | Convert a fully-typed XML document to a string (with or without DTD).</font>-<a name="line-107"></a><font color=Blue>toXml</font> <font color=Red>::</font> XmlContent a <font color=Red>=&gt;</font> Bool <font color=Red>-&gt;</font> a <font color=Red>-&gt;</font> Document ()-<a name="line-108"></a><font color=Blue>toXml</font> dtd value <font color=Red>=</font>-<a name="line-109"></a>    <font color=Green><u>let</u></font> ht <font color=Red>=</font> toHType value <font color=Green><u>in</u></font>-<a name="line-110"></a>    Document <font color=Cyan>(</font>Prolog <font color=Cyan>(</font>Just <font color=Cyan>(</font>XMLDecl <font color=Magenta>"1.0"</font> Nothing Nothing<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-111"></a>                     [] <font color=Cyan>(</font><font color=Green><u>if</u></font> dtd <font color=Green><u>then</u></font> Just <font color=Cyan>(</font>toDTD ht<font color=Cyan>)</font> <font color=Green><u>else</u></font> Nothing<font color=Cyan>)</font> []<font color=Cyan>)</font>-<a name="line-112"></a>             emptyST-<a name="line-113"></a>             <font color=Cyan>(</font> <font color=Green><u>case</u></font> toContents value <font color=Green><u>of</u></font>-<a name="line-114"></a>                 []             <font color=Red>-&gt;</font> Elem <font color=Magenta>"empty"</font> [] []-<a name="line-115"></a>                 <font color=Red>[</font>CElem e ()<font color=Red>]</font>   <font color=Red>-&gt;</font> e-<a name="line-116"></a>                 <font color=Cyan>(</font>CElem e ()<font color=Red><b>:</b></font><font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red>-&gt;</font> error <font color=Magenta>"too many XML elements in document"</font> <font color=Cyan>)</font>-<a name="line-117"></a>             []-<a name="line-118"></a>-<a name="line-119"></a><a name="fromXml"></a><font color=Blue>-- | Read a Haskell value from an XML document, ignoring the DTD and</font>-<a name="line-120"></a><font color=Blue>--   using the Haskell result type to determine how to parse it.</font>-<a name="line-121"></a><font color=Blue>fromXml</font> <font color=Red>::</font> XmlContent a <font color=Red>=&gt;</font> Document Posn <font color=Red>-&gt;</font> Either String a-<a name="line-122"></a><font color=Blue>fromXml</font> <font color=Cyan>(</font>Document <font color=Green><u>_</u></font> <font color=Green><u>_</u></font> e<font color=Red>@</font><font color=Cyan>(</font>Elem n <font color=Green><u>_</u></font> cs<font color=Cyan>)</font> <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red>=</font>-<a name="line-123"></a>  fst <font color=Cyan>(</font>runParser parseContents <font color=Red>[</font>CElem e <font color=Cyan>(</font>posInNewCxt <font color=Magenta>"document"</font> Nothing<font color=Cyan>)</font><font color=Red>]</font><font color=Cyan>)</font>-<a name="line-124"></a>-<a name="line-125"></a>-<a name="line-126"></a><a name="hGetXml"></a><font color=Blue>-- | Read a fully-typed XML document from a file handle.</font>-<a name="line-127"></a><font color=Blue>hGetXml</font> <font color=Red>::</font> XmlContent a <font color=Red>=&gt;</font> Handle <font color=Red>-&gt;</font> IO a-<a name="line-128"></a><font color=Blue>hGetXml</font> h <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-129"></a>    x <font color=Red>&lt;-</font> hGetContents h-<a name="line-130"></a>    <font color=Green><u>let</u></font> <font color=Cyan>(</font>Document <font color=Green><u>_</u></font> <font color=Green><u>_</u></font> y <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red>=</font> xmlParse <font color=Magenta>"file handle"</font> x-<a name="line-131"></a>    either fail return-<a name="line-132"></a>           <font color=Cyan>(</font>fst <font color=Cyan>(</font>runParser parseContents-<a name="line-133"></a>                           <font color=Red>[</font>CElem y <font color=Cyan>(</font>posInNewCxt <font color=Magenta>"file handle"</font> Nothing<font color=Cyan>)</font><font color=Red>]</font><font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-134"></a>-<a name="line-135"></a><a name="hPutXml"></a><font color=Blue>-- | Write a fully-typed XML document to a file handle.</font>-<a name="line-136"></a><font color=Blue>hPutXml</font> <font color=Red>::</font> XmlContent a <font color=Red>=&gt;</font> Handle <font color=Red>-&gt;</font> Bool <font color=Red>-&gt;</font> a <font color=Red>-&gt;</font> IO ()-<a name="line-137"></a><font color=Blue>hPutXml</font> h dtd x <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-138"></a>    <font color=Cyan>(</font>hPutStrLn h <font color=Cyan>.</font> render <font color=Cyan>.</font> document <font color=Cyan>.</font> toXml dtd<font color=Cyan>)</font> x-<a name="line-139"></a>-<a name="line-140"></a><a name="fpsHPutXml"></a><font color=Blue>-- | Write a fully-typed XML document to a file handle, using the</font>-<a name="line-141"></a><font color=Blue>--   FastPackedString interface (output will not be prettified).</font>-<a name="line-142"></a><font color=Blue>fpsHPutXml</font> <font color=Red>::</font> XmlContent a <font color=Red>=&gt;</font> Handle <font color=Red>-&gt;</font> Bool <font color=Red>-&gt;</font> a <font color=Red>-&gt;</font> IO ()-<a name="line-143"></a><font color=Blue>fpsHPutXml</font> h dtd x <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-144"></a>    <font color=Cyan>(</font>FPS<font color=Cyan>.</font>hPut h <font color=Cyan>.</font> FPS<font color=Cyan>.</font>document <font color=Cyan>.</font> toXml dtd<font color=Cyan>)</font> x-<a name="line-145"></a>-<a name="line-146"></a>-<a name="line-147"></a><font color=Blue>------------------------------------------------------------------------</font>-<a name="line-148"></a><font color=Blue>-- Instances for all the standard basic datatypes.</font>-<a name="line-149"></a><font color=Blue>-- DtdToHaskell uses only a small number of standard datatypes.</font>-<a name="line-150"></a><font color=Blue>------------------------------------------------------------------------</font>-<a name="line-151"></a>-<a name="line-152"></a><font color=Green><u>instance</u></font> XmlContent Char <font color=Green><u>where</u></font>-<a name="line-153"></a>    <font color=Blue>-- NOT in a string</font>-<a name="line-154"></a>    toContents c  <font color=Red>=</font> error <font color=Magenta>"Text.XML.HaXml.XmlContent.toContents used on a Haskell Char"</font>-<a name="line-155"></a>    parseContents <font color=Red>=</font> fail <font color=Magenta>"Text.XML.HaXml.XmlContent.parseContents used on a Haskell Char "</font>-<a name="line-156"></a>    <font color=Blue>-- Only defined for Char and no other types:</font>-<a name="line-157"></a>    xToChar   <font color=Red>=</font> id-<a name="line-158"></a>    xFromChar <font color=Red>=</font> id-<a name="line-159"></a>-<a name="line-160"></a><font color=Green><u>instance</u></font> XmlContent a <font color=Red>=&gt;</font> XmlContent <font color=Red>[</font>a<font color=Red>]</font> <font color=Green><u>where</u></font>-<a name="line-161"></a>    toContents xs  <font color=Red>=</font> <font color=Green><u>case</u></font> toHType x <font color=Green><u>of</u></font>-<a name="line-162"></a>                       <font color=Cyan>(</font>Prim <font color=Magenta>"Char"</font> <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red>-&gt;</font>-<a name="line-163"></a>                            <font color=Red>[</font>CString True <font color=Cyan>(</font>map xToChar xs<font color=Cyan>)</font> ()<font color=Red>]</font>-<a name="line-164"></a>                       <font color=Green><u>_</u></font> <font color=Red>-&gt;</font> concatMap toContents xs-<a name="line-165"></a>                   <font color=Green><u>where</u></font>   <font color=Cyan>(</font>x<font color=Red><b>:</b></font><font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red>=</font> xs-<a name="line-166"></a>    parseContents <font color=Red>=</font> <font color=Green><u>let</u></font> result <font color=Red>=</font> runParser p [] <font color=Blue>-- for type of result only</font>-<a name="line-167"></a>                        p <font color=Red>=</font> <font color=Green><u>case</u></font> <font color=Cyan>(</font>toHType <font color=Cyan>.</font> head <font color=Cyan>.</font> <font color=Cyan>(</font><font color=Red>\</font> <font color=Cyan>(</font>Right x<font color=Cyan>)</font><font color=Red>-&gt;</font>x<font color=Cyan>)</font> <font color=Cyan>.</font> fst<font color=Cyan>)</font>-<a name="line-168"></a>                                 result <font color=Green><u>of</u></font>-<a name="line-169"></a>                              <font color=Cyan>(</font>Prim <font color=Magenta>"Char"</font> <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red>-&gt;</font> fmap <font color=Cyan>(</font>map xFromChar<font color=Cyan>)</font> <font color=Cyan>$</font> text-<a name="line-170"></a>                              <font color=Green><u>_</u></font> <font color=Red>-&gt;</font> many parseContents-<a name="line-171"></a>                    <font color=Green><u>in</u></font> p-<a name="line-172"></a>        <font color=Blue>-- comments, PIs, etc, are skipped in the individual element parser.</font>-<a name="line-173"></a>-<a name="line-174"></a><font color=Green><u>instance</u></font> <font color=Cyan>(</font>XmlContent a<font color=Cyan>)</font> <font color=Red>=&gt;</font> XmlContent <font color=Cyan>(</font>Maybe a<font color=Cyan>)</font> <font color=Green><u>where</u></font>-<a name="line-175"></a>    toContents m  <font color=Red>=</font> maybe [] toContents m-<a name="line-176"></a>    parseContents <font color=Red>=</font> optional parseContents-<a name="line-177"></a>-<a name="line-178"></a><font color=Blue>------------------------------------------------------------------------</font>-</pre>-</body>-</html>
− docs/HaXml/src/Text/XML/HaXml/XmlContent/Haskell.html
@@ -1,258 +0,0 @@-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">-<html>-<head>-<!-- Generated by HsColour, http://www.cs.york.ac.uk/fp/darcs/hscolour/ -->-<title>src/Text/XML/HaXml/XmlContent/Haskell.hs</title>-</head>-<body>-<pre><a name="line-1"></a><font color=Blue>-- | The class 'XmlContent' is a kind of replacement for Read and Show:</font>-<a name="line-2"></a><font color=Blue>--   it provides conversions between a generic XML tree representation</font>-<a name="line-3"></a><font color=Blue>--   and your own more specialised typeful Haskell data trees.</font>-<a name="line-4"></a><font color=Blue>--</font>-<a name="line-5"></a><font color=Blue>--   If you are starting with a set of Haskell datatypes, use DrIFT to</font>-<a name="line-6"></a><font color=Blue>--   derive instances of this class for you:</font>-<a name="line-7"></a><font color=Blue>--       http:\/\/repetae.net\/john\/computer\/haskell\/DrIFT</font>-<a name="line-8"></a><font color=Blue>--   and use the current module for instances of the standard Haskell</font>-<a name="line-9"></a><font color=Blue>--   datatypes list, Maybe, and so on.</font>-<a name="line-10"></a><font color=Blue>--</font>-<a name="line-11"></a><font color=Blue>--   If you are starting with an XML DTD, use HaXml's tool DtdToHaskell</font>-<a name="line-12"></a><font color=Blue>--   to generate both the Haskell types and the corresponding instances,</font>-<a name="line-13"></a><font color=Blue>--   but _do_not_ use the current module for instances: use</font>-<a name="line-14"></a><font color=Blue>--   Text.XML.HaXml.XmlContent instead.</font>-<a name="line-15"></a>-<a name="line-16"></a><font color=Green><u>module</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>XmlContent<font color=Cyan>.</font>Haskell-<a name="line-17"></a>  <font color=Cyan>(</font>-<a name="line-18"></a>  <font color=Blue>-- * Re-export everything from Text.XML.HaXml.XmlContent.Parser.</font>-<a name="line-19"></a>    <font color=Green><u>module</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>XmlContent<font color=Cyan>.</font>Parser-<a name="line-20"></a>  <font color=Blue>-- * Instances (only) for the XmlContent class, for datatypes that</font>-<a name="line-21"></a>  <font color=Blue>--   originated in Haskell, rather than from a DTD definition.</font>-<a name="line-22"></a><font color=Blue>--  , module Text.XML.HaXml.XmlContent.Haskell</font>-<a name="line-23"></a>-<a name="line-24"></a>  <font color=Blue>-- * Whole-document conversion functions</font>-<a name="line-25"></a>  <font color=Cyan>,</font> toXml<font color=Cyan>,</font> fromXml-<a name="line-26"></a>  <font color=Cyan>,</font> readXml<font color=Cyan>,</font> showXml<font color=Cyan>,</font> fpsShowXml-<a name="line-27"></a>  <font color=Cyan>,</font> fReadXml<font color=Cyan>,</font> fWriteXml<font color=Cyan>,</font> fpsWriteXml-<a name="line-28"></a>  <font color=Cyan>,</font> hGetXml<font color=Cyan>,</font>  hPutXml<font color=Cyan>,</font> fpsHPutXml-<a name="line-29"></a>-<a name="line-30"></a>  <font color=Cyan>)</font> <font color=Green><u>where</u></font>-<a name="line-31"></a>-<a name="line-32"></a><font color=Green><u>import</u></font> IO-<a name="line-33"></a><font color=Green><u>import</u></font> List <font color=Cyan>(</font>isPrefixOf<font color=Cyan>,</font> isSuffixOf<font color=Cyan>)</font>-<a name="line-34"></a><font color=Green><u>import</u></font> <font color=Green><u>qualified</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>ByteStringPP <font color=Green><u>as</u></font> FPS <font color=Cyan>(</font>document<font color=Cyan>)</font>-<a name="line-35"></a><font color=Green><u>import</u></font> <font color=Green><u>qualified</u></font> Data<font color=Cyan>.</font>ByteString<font color=Cyan>.</font>Lazy<font color=Cyan>.</font>Char8 <font color=Green><u>as</u></font> FPS-<a name="line-36"></a>-<a name="line-37"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>PrettyPrint<font color=Cyan>.</font>HughesPJ <font color=Cyan>(</font>render<font color=Cyan>)</font>-<a name="line-38"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>ParserCombinators<font color=Cyan>.</font>Poly-<a name="line-39"></a>-<a name="line-40"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Types-<a name="line-41"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>TypeMapping-<a name="line-42"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Posn     <font color=Cyan>(</font>Posn<font color=Cyan>,</font> posInNewCxt<font color=Cyan>)</font>-<a name="line-43"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Pretty   <font color=Cyan>(</font>document<font color=Cyan>)</font>-<a name="line-44"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Parse    <font color=Cyan>(</font>xmlParse<font color=Cyan>)</font>-<a name="line-45"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Verbatim <font color=Cyan>(</font>Verbatim<font color=Cyan>(</font>verbatim<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-46"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>XmlContent<font color=Cyan>.</font>Parser-<a name="line-47"></a>-<a name="line-48"></a>-<a name="line-49"></a>        <font color=Blue>-- probably want to write DTD separately from value, and have</font>-<a name="line-50"></a>        <font color=Blue>-- easy ways to combine DTD + value into a document, or write</font>-<a name="line-51"></a>        <font color=Blue>-- them to separate files.</font>-<a name="line-52"></a>-<a name="line-53"></a><a name="fReadXml"></a><font color=Blue>-- | Read an XML document from a file and convert it to a fully-typed</font>-<a name="line-54"></a><font color=Blue>--   Haskell value.</font>-<a name="line-55"></a><font color=Blue>fReadXml</font>  <font color=Red>::</font> XmlContent a <font color=Red>=&gt;</font> FilePath <font color=Red>-&gt;</font> IO a-<a name="line-56"></a><font color=Blue>fReadXml</font> fp <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-57"></a>    f <font color=Red>&lt;-</font> <font color=Cyan>(</font> <font color=Green><u>if</u></font> fp<font color=Cyan>==</font><font color=Magenta>"-"</font> <font color=Green><u>then</u></font> return stdin-<a name="line-58"></a>           <font color=Green><u>else</u></font> openFile fp ReadMode <font color=Cyan>)</font>-<a name="line-59"></a>    x <font color=Red>&lt;-</font> hGetContents f-<a name="line-60"></a>    <font color=Green><u>let</u></font> <font color=Cyan>(</font>Document <font color=Green><u>_</u></font> <font color=Green><u>_</u></font> y <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red>=</font> xmlParse fp x-<a name="line-61"></a>        y' <font color=Red>=</font> CElem y <font color=Cyan>(</font>posInNewCxt fp Nothing<font color=Cyan>)</font>-<a name="line-62"></a>    either fail return <font color=Cyan>(</font>fst <font color=Cyan>(</font>runParser parseContents <font color=Red>[</font>y'<font color=Red>]</font><font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-63"></a>-<a name="line-64"></a><a name="fWriteXml"></a><font color=Blue>-- | Write a fully-typed Haskell value to the given file as an XML</font>-<a name="line-65"></a><font color=Blue>--   document.</font>-<a name="line-66"></a><font color=Blue>fWriteXml</font> <font color=Red>::</font> XmlContent a <font color=Red>=&gt;</font> FilePath <font color=Red>-&gt;</font> a <font color=Red>-&gt;</font> IO ()-<a name="line-67"></a><font color=Blue>fWriteXml</font> fp x <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-68"></a>    f <font color=Red>&lt;-</font> <font color=Cyan>(</font> <font color=Green><u>if</u></font> fp<font color=Cyan>==</font><font color=Magenta>"-"</font> <font color=Green><u>then</u></font> return stdout-<a name="line-69"></a>           <font color=Green><u>else</u></font> openFile fp WriteMode <font color=Cyan>)</font>-<a name="line-70"></a>    hPutXml f False x-<a name="line-71"></a>    hClose f-<a name="line-72"></a>-<a name="line-73"></a><a name="fpsWriteXml"></a><font color=Blue>-- | Write any Haskell value to the given file as an XML document,</font>-<a name="line-74"></a><font color=Blue>--   using the FastPackedString interface (output will not be prettified).</font>-<a name="line-75"></a><font color=Blue>fpsWriteXml</font> <font color=Red>::</font> XmlContent a <font color=Red>=&gt;</font> FilePath <font color=Red>-&gt;</font> a <font color=Red>-&gt;</font> IO ()-<a name="line-76"></a><font color=Blue>fpsWriteXml</font> fp x <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-77"></a>    f <font color=Red>&lt;-</font> <font color=Cyan>(</font> <font color=Green><u>if</u></font> fp<font color=Cyan>==</font><font color=Magenta>"-"</font> <font color=Green><u>then</u></font> return stdout-<a name="line-78"></a>           <font color=Green><u>else</u></font> openFile fp WriteMode <font color=Cyan>)</font>-<a name="line-79"></a>    fpsHPutXml f False x-<a name="line-80"></a>    hClose f-<a name="line-81"></a>-<a name="line-82"></a><a name="readXml"></a><font color=Blue>-- | Read a fully-typed XML document from a string.</font>-<a name="line-83"></a><font color=Blue>readXml</font> <font color=Red>::</font> XmlContent a <font color=Red>=&gt;</font> String <font color=Red>-&gt;</font> Either String a-<a name="line-84"></a><font color=Blue>readXml</font> s <font color=Red>=</font>-<a name="line-85"></a>    <font color=Green><u>let</u></font> <font color=Cyan>(</font>Document <font color=Green><u>_</u></font> <font color=Green><u>_</u></font> y <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red>=</font> xmlParse <font color=Magenta>"string input"</font> s <font color=Green><u>in</u></font>-<a name="line-86"></a>    fst <font color=Cyan>(</font>runParser parseContents-<a name="line-87"></a>                   <font color=Red>[</font>CElem y <font color=Cyan>(</font>posInNewCxt <font color=Magenta>"string input"</font> Nothing<font color=Cyan>)</font><font color=Red>]</font><font color=Cyan>)</font>-<a name="line-88"></a>-<a name="line-89"></a><a name="showXml"></a><font color=Blue>-- | Convert a fully-typed XML document to a string (without DTD).</font>-<a name="line-90"></a><font color=Blue>showXml</font> <font color=Red>::</font> XmlContent a <font color=Red>=&gt;</font> Bool <font color=Red>-&gt;</font> a <font color=Red>-&gt;</font> String-<a name="line-91"></a><font color=Blue>showXml</font> dtd x <font color=Red>=</font>-<a name="line-92"></a>    <font color=Green><u>case</u></font> toContents x <font color=Green><u>of</u></font>-<a name="line-93"></a>      <font color=Red>[</font>CElem <font color=Green><u>_</u></font> <font color=Green><u>_</u></font><font color=Red>]</font> <font color=Red>-&gt;</font> <font color=Cyan>(</font>render <font color=Cyan>.</font> document <font color=Cyan>.</font> toXml dtd<font color=Cyan>)</font> x-<a name="line-94"></a>      <font color=Green><u>_</u></font> <font color=Red>-&gt;</font> <font color=Magenta>""</font>-<a name="line-95"></a>-<a name="line-96"></a><a name="fpsShowXml"></a><font color=Blue>-- | Convert a fully-typed XML document to a ByteString (without DTD).</font>-<a name="line-97"></a><font color=Blue>fpsShowXml</font> <font color=Red>::</font> XmlContent a <font color=Red>=&gt;</font> Bool <font color=Red>-&gt;</font> a <font color=Red>-&gt;</font> FPS<font color=Cyan>.</font>ByteString-<a name="line-98"></a><font color=Blue>fpsShowXml</font> dtd x <font color=Red>=</font>-<a name="line-99"></a>    <font color=Green><u>case</u></font> toContents x <font color=Green><u>of</u></font>-<a name="line-100"></a>      <font color=Red>[</font>CElem <font color=Green><u>_</u></font> <font color=Green><u>_</u></font><font color=Red>]</font> <font color=Red>-&gt;</font> <font color=Cyan>(</font>FPS<font color=Cyan>.</font>document <font color=Cyan>.</font> toXml dtd<font color=Cyan>)</font> x-<a name="line-101"></a>      <font color=Green><u>_</u></font> <font color=Red>-&gt;</font> FPS<font color=Cyan>.</font>empty-<a name="line-102"></a>-<a name="line-103"></a>-<a name="line-104"></a><a name="toXml"></a><font color=Blue>-- | Convert a fully-typed XML document to a string (with or without DTD).</font>-<a name="line-105"></a><font color=Blue>toXml</font> <font color=Red>::</font> XmlContent a <font color=Red>=&gt;</font> Bool <font color=Red>-&gt;</font> a <font color=Red>-&gt;</font> Document ()-<a name="line-106"></a><font color=Blue>toXml</font> dtd value <font color=Red>=</font>-<a name="line-107"></a>    <font color=Green><u>let</u></font> ht <font color=Red>=</font> toHType value <font color=Green><u>in</u></font>-<a name="line-108"></a>    Document <font color=Cyan>(</font>Prolog <font color=Cyan>(</font>Just <font color=Cyan>(</font>XMLDecl <font color=Magenta>"1.0"</font> Nothing Nothing<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-109"></a>                     [] <font color=Cyan>(</font><font color=Green><u>if</u></font> dtd <font color=Green><u>then</u></font> Just <font color=Cyan>(</font>toDTD ht<font color=Cyan>)</font> <font color=Green><u>else</u></font> Nothing<font color=Cyan>)</font> []<font color=Cyan>)</font>-<a name="line-110"></a>             emptyST-<a name="line-111"></a>             <font color=Cyan>(</font> <font color=Green><u>case</u></font> <font color=Cyan>(</font>ht<font color=Cyan>,</font> toContents value<font color=Cyan>)</font> <font color=Green><u>of</u></font>-<a name="line-112"></a>                 <font color=Cyan>(</font>Tuple <font color=Green><u>_</u></font><font color=Cyan>,</font> cs<font color=Cyan>)</font>       <font color=Red>-&gt;</font> Elem <font color=Cyan>(</font>showHType ht <font color=Magenta>""</font><font color=Cyan>)</font> [] cs-<a name="line-113"></a>                 <font color=Cyan>(</font>Defined <font color=Green><u>_</u></font> <font color=Green><u>_</u></font> <font color=Green><u>_</u></font><font color=Cyan>,</font> cs<font color=Cyan>)</font> <font color=Red>-&gt;</font> Elem <font color=Cyan>(</font>showHType ht <font color=Magenta>"-XML"</font><font color=Cyan>)</font> [] cs-<a name="line-114"></a>                 <font color=Cyan>(</font><font color=Green><u>_</u></font><font color=Cyan>,</font> <font color=Red>[</font>CElem e ()<font color=Red>]</font><font color=Cyan>)</font>   <font color=Red>-&gt;</font> e <font color=Cyan>)</font>-<a name="line-115"></a>             []-<a name="line-116"></a>-<a name="line-117"></a><a name="fromXml"></a><font color=Blue>-- | Read a Haskell value from an XML document, ignoring the DTD and</font>-<a name="line-118"></a><font color=Blue>--   using the Haskell result type to determine how to parse it.</font>-<a name="line-119"></a><font color=Blue>fromXml</font> <font color=Red>::</font> XmlContent a <font color=Red>=&gt;</font> Document Posn <font color=Red>-&gt;</font> Either String a-<a name="line-120"></a><font color=Blue>fromXml</font> <font color=Cyan>(</font>Document <font color=Green><u>_</u></font> <font color=Green><u>_</u></font> e<font color=Red>@</font><font color=Cyan>(</font>Elem n <font color=Green><u>_</u></font> cs<font color=Cyan>)</font> <font color=Green><u>_</u></font><font color=Cyan>)</font>-<a name="line-121"></a>  <font color=Red>|</font> <font color=Magenta>"tuple"</font> <font color=Cyan>`isPrefixOf`</font> n <font color=Red>=</font> fst <font color=Cyan>(</font>runParser parseContents cs<font color=Cyan>)</font>-<a name="line-122"></a>  <font color=Red>|</font> <font color=Magenta>"-XML"</font>  <font color=Cyan>`isSuffixOf`</font> n <font color=Red>=</font> fst <font color=Cyan>(</font>runParser parseContents cs<font color=Cyan>)</font>-<a name="line-123"></a>  <font color=Red>|</font> otherwise <font color=Red>=</font> fst <font color=Cyan>(</font>runParser parseContents-<a name="line-124"></a>                               <font color=Red>[</font>CElem e <font color=Cyan>(</font>posInNewCxt <font color=Magenta>"document"</font> Nothing<font color=Cyan>)</font><font color=Red>]</font><font color=Cyan>)</font>-<a name="line-125"></a>-<a name="line-126"></a>-<a name="line-127"></a><a name="hGetXml"></a><font color=Blue>-- | Read a fully-typed XML document from a file handle.</font>-<a name="line-128"></a><font color=Blue>hGetXml</font> <font color=Red>::</font> XmlContent a <font color=Red>=&gt;</font> Handle <font color=Red>-&gt;</font> IO a-<a name="line-129"></a><font color=Blue>hGetXml</font> h <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-130"></a>    x <font color=Red>&lt;-</font> hGetContents h-<a name="line-131"></a>    <font color=Green><u>let</u></font> <font color=Cyan>(</font>Document <font color=Green><u>_</u></font> <font color=Green><u>_</u></font> y <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red>=</font> xmlParse <font color=Magenta>"file handle"</font> x-<a name="line-132"></a>    either fail return-<a name="line-133"></a>           <font color=Cyan>(</font>fst <font color=Cyan>(</font>runParser parseContents-<a name="line-134"></a>                           <font color=Red>[</font>CElem y <font color=Cyan>(</font>posInNewCxt <font color=Magenta>"file handle"</font> Nothing<font color=Cyan>)</font><font color=Red>]</font><font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-135"></a>-<a name="line-136"></a><a name="hPutXml"></a><font color=Blue>-- | Write a fully-typed XML document to a file handle.</font>-<a name="line-137"></a><font color=Blue>hPutXml</font> <font color=Red>::</font> XmlContent a <font color=Red>=&gt;</font> Handle <font color=Red>-&gt;</font> Bool <font color=Red>-&gt;</font> a <font color=Red>-&gt;</font> IO ()-<a name="line-138"></a><font color=Blue>hPutXml</font> h dtd x <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-139"></a>    <font color=Cyan>(</font>hPutStrLn h <font color=Cyan>.</font> render <font color=Cyan>.</font> document <font color=Cyan>.</font> toXml dtd<font color=Cyan>)</font> x-<a name="line-140"></a>-<a name="line-141"></a><a name="fpsHPutXml"></a><font color=Blue>-- | Write a fully-typed XML document to a file handle, using the</font>-<a name="line-142"></a><font color=Blue>--   FastPackedString interface (output will not be prettified).</font>-<a name="line-143"></a><font color=Blue>fpsHPutXml</font> <font color=Red>::</font> XmlContent a <font color=Red>=&gt;</font> Handle <font color=Red>-&gt;</font> Bool <font color=Red>-&gt;</font> a <font color=Red>-&gt;</font> IO ()-<a name="line-144"></a><font color=Blue>fpsHPutXml</font> h dtd x <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-145"></a>    <font color=Cyan>(</font>FPS<font color=Cyan>.</font>hPut h <font color=Cyan>.</font> FPS<font color=Cyan>.</font>document <font color=Cyan>.</font> toXml dtd<font color=Cyan>)</font> x-<a name="line-146"></a>-<a name="line-147"></a>-<a name="line-148"></a><font color=Blue>------------------------------------------------------------------------</font>-<a name="line-149"></a><font color=Blue>-- Instances for all the standard basic datatypes.</font>-<a name="line-150"></a><font color=Blue>-- These are for Haskell datatypes being derived to go to XML.</font>-<a name="line-151"></a><font color=Blue>-- DtdToHaskell does not use these instances.</font>-<a name="line-152"></a><font color=Blue>------------------------------------------------------------------------</font>-<a name="line-153"></a>-<a name="line-154"></a><font color=Green><u>instance</u></font> XmlContent Bool <font color=Green><u>where</u></font>-<a name="line-155"></a>    toContents b   <font color=Red>=</font> <font color=Red>[</font>CElem <font color=Cyan>(</font>Elem <font color=Magenta>"bool"</font> <font color=Red>[</font>mkAttr <font color=Magenta>"value"</font> <font color=Cyan>(</font>show b<font color=Cyan>)</font><font color=Red>]</font> []<font color=Cyan>)</font> ()<font color=Red>]</font>-<a name="line-156"></a>    parseContents <font color=Red>=</font> <font color=Green><u>do</u></font> <font color=Cyan>{</font> e <font color=Red>&lt;-</font> element <font color=Red>[</font><font color=Magenta>"bool"</font><font color=Red>]</font> <font color=Cyan>;</font> return <font color=Cyan>(</font>attval e<font color=Cyan>)</font> <font color=Cyan>}</font>-<a name="line-157"></a>-<a name="line-158"></a><font color=Green><u>instance</u></font> XmlContent Int <font color=Green><u>where</u></font>-<a name="line-159"></a>    toContents i   <font color=Red>=</font> <font color=Red>[</font>CElem <font color=Cyan>(</font>Elem <font color=Magenta>"int"</font> <font color=Red>[</font>mkAttr <font color=Magenta>"value"</font> <font color=Cyan>(</font>show i<font color=Cyan>)</font><font color=Red>]</font> []<font color=Cyan>)</font> ()<font color=Red>]</font>-<a name="line-160"></a>    parseContents <font color=Red>=</font> <font color=Green><u>do</u></font> <font color=Cyan>{</font> e <font color=Red>&lt;-</font> element <font color=Red>[</font><font color=Magenta>"int"</font><font color=Red>]</font> <font color=Cyan>;</font> return <font color=Cyan>(</font>attval e<font color=Cyan>)</font> <font color=Cyan>}</font>-<a name="line-161"></a>-<a name="line-162"></a><font color=Green><u>instance</u></font> XmlContent Integer <font color=Green><u>where</u></font>-<a name="line-163"></a>    toContents i   <font color=Red>=</font> <font color=Red>[</font>CElem <font color=Cyan>(</font>Elem <font color=Magenta>"integer"</font> <font color=Red>[</font>mkAttr <font color=Magenta>"value"</font> <font color=Cyan>(</font>show i<font color=Cyan>)</font><font color=Red>]</font> []<font color=Cyan>)</font> ()<font color=Red>]</font>-<a name="line-164"></a>    parseContents <font color=Red>=</font> <font color=Green><u>do</u></font> <font color=Cyan>{</font> e <font color=Red>&lt;-</font> element <font color=Red>[</font><font color=Magenta>"integer"</font><font color=Red>]</font> <font color=Cyan>;</font> return <font color=Cyan>(</font>attval e<font color=Cyan>)</font> <font color=Cyan>}</font>-<a name="line-165"></a>-<a name="line-166"></a><font color=Green><u>instance</u></font> XmlContent Float <font color=Green><u>where</u></font>-<a name="line-167"></a>    toContents i   <font color=Red>=</font> <font color=Red>[</font>CElem <font color=Cyan>(</font>Elem <font color=Magenta>"float"</font> <font color=Red>[</font>mkAttr <font color=Magenta>"value"</font> <font color=Cyan>(</font>show i<font color=Cyan>)</font><font color=Red>]</font> []<font color=Cyan>)</font> ()<font color=Red>]</font>-<a name="line-168"></a>    parseContents <font color=Red>=</font> <font color=Green><u>do</u></font> <font color=Cyan>{</font> e <font color=Red>&lt;-</font> element <font color=Red>[</font><font color=Magenta>"float"</font><font color=Red>]</font> <font color=Cyan>;</font> return <font color=Cyan>(</font>attval e<font color=Cyan>)</font> <font color=Cyan>}</font>-<a name="line-169"></a>-<a name="line-170"></a><font color=Green><u>instance</u></font> XmlContent Double <font color=Green><u>where</u></font>-<a name="line-171"></a>    toContents i   <font color=Red>=</font> <font color=Red>[</font>CElem <font color=Cyan>(</font>Elem <font color=Magenta>"double"</font> <font color=Red>[</font>mkAttr <font color=Magenta>"value"</font> <font color=Cyan>(</font>show i<font color=Cyan>)</font><font color=Red>]</font> []<font color=Cyan>)</font> ()<font color=Red>]</font>-<a name="line-172"></a>    parseContents <font color=Red>=</font> <font color=Green><u>do</u></font> <font color=Cyan>{</font> e <font color=Red>&lt;-</font> element <font color=Red>[</font><font color=Magenta>"double"</font><font color=Red>]</font> <font color=Cyan>;</font> return <font color=Cyan>(</font>attval e<font color=Cyan>)</font> <font color=Cyan>}</font>-<a name="line-173"></a>-<a name="line-174"></a><font color=Green><u>instance</u></font> XmlContent Char <font color=Green><u>where</u></font>-<a name="line-175"></a>    <font color=Blue>-- NOT in a string</font>-<a name="line-176"></a>    toContents c   <font color=Red>=</font> <font color=Red>[</font>CElem <font color=Cyan>(</font>Elem <font color=Magenta>"char"</font> <font color=Red>[</font>mkAttr <font color=Magenta>"value"</font> <font color=Red>[</font>c<font color=Red>]</font><font color=Red>]</font> []<font color=Cyan>)</font> ()<font color=Red>]</font>-<a name="line-177"></a>    parseContents <font color=Red>=</font> <font color=Green><u>do</u></font> <font color=Cyan>{</font> <font color=Cyan>(</font>Elem <font color=Green><u>_</u></font> <font color=Red>[</font><font color=Cyan>(</font><font color=Magenta>"value"</font><font color=Cyan>,</font><font color=Cyan>(</font>AttValue <font color=Red>[</font>Left <font color=Red>[</font>c<font color=Red>]</font><font color=Red>]</font><font color=Cyan>)</font><font color=Cyan>)</font><font color=Red>]</font> []<font color=Cyan>)</font>-<a name="line-178"></a>                             <font color=Red>&lt;-</font> element <font color=Red>[</font><font color=Magenta>"char"</font><font color=Red>]</font>-<a name="line-179"></a>                       <font color=Cyan>;</font> return c-<a name="line-180"></a>                       <font color=Cyan>}</font>-<a name="line-181"></a>    <font color=Blue>-- Only defined for Char and no other types:</font>-<a name="line-182"></a>    xToChar   <font color=Red>=</font> id-<a name="line-183"></a>    xFromChar <font color=Red>=</font> id-<a name="line-184"></a>-<a name="line-185"></a><font color=Green><u>instance</u></font> XmlContent a <font color=Red>=&gt;</font> XmlContent <font color=Red>[</font>a<font color=Red>]</font> <font color=Green><u>where</u></font>-<a name="line-186"></a>    toContents xs  <font color=Red>=</font> <font color=Green><u>case</u></font> toHType x <font color=Green><u>of</u></font>-<a name="line-187"></a>                       <font color=Cyan>(</font>Prim <font color=Magenta>"Char"</font> <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red>-&gt;</font>-<a name="line-188"></a>                            <font color=Red>[</font>mkElem <font color=Magenta>"string"</font> <font color=Red>[</font>CString True <font color=Cyan>(</font>map xToChar xs<font color=Cyan>)</font> ()<font color=Red>]</font><font color=Red>]</font>-<a name="line-189"></a>                       <font color=Green><u>_</u></font> <font color=Red>-&gt;</font> <font color=Red>[</font>mkElem xs <font color=Cyan>(</font>concatMap toContents xs<font color=Cyan>)</font><font color=Red>]</font>-<a name="line-190"></a>                   <font color=Green><u>where</u></font>   <font color=Cyan>(</font>x<font color=Red><b>:</b></font><font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red>=</font> xs-<a name="line-191"></a>    parseContents <font color=Red>=</font> P <font color=Cyan>(</font><font color=Red>\</font>x <font color=Red>-&gt;</font>-<a name="line-192"></a>        <font color=Green><u>case</u></font> x <font color=Green><u>of</u></font>-<a name="line-193"></a>            <font color=Cyan>(</font>CString <font color=Green><u>_</u></font> s <font color=Green><u>_</u></font><font color=Red><b>:</b></font>cs<font color=Cyan>)</font>-<a name="line-194"></a>                   <font color=Red>-&gt;</font> Success cs <font color=Cyan>(</font>map xFromChar s<font color=Cyan>)</font>-<a name="line-195"></a>            <font color=Cyan>(</font>CElem <font color=Cyan>(</font>Elem <font color=Magenta>"string"</font> [] <font color=Red>[</font>CString <font color=Green><u>_</u></font> s <font color=Green><u>_</u></font><font color=Red>]</font><font color=Cyan>)</font> <font color=Green><u>_</u></font><font color=Red><b>:</b></font>cs<font color=Cyan>)</font>-<a name="line-196"></a>                   <font color=Red>-&gt;</font> Success cs <font color=Cyan>(</font>map xFromChar s<font color=Cyan>)</font>-<a name="line-197"></a>            <font color=Cyan>(</font>CElem <font color=Cyan>(</font>Elem e [] xs<font color=Cyan>)</font> <font color=Green><u>_</u></font><font color=Red><b>:</b></font>cs<font color=Cyan>)</font> <font color=Red>|</font> <font color=Magenta>"list"</font> <font color=Cyan>`isPrefixOf`</font> e-<a name="line-198"></a>                   <font color=Red>-&gt;</font> scanElements xs-<a name="line-199"></a>                   <font color=Green><u>where</u></font>-<a name="line-200"></a>                  <font color=Blue>-- scanElements :: [Content] -&gt; (Either String [a],[Content])</font>-<a name="line-201"></a>                     scanElements [] <font color=Red>=</font> Success cs []-<a name="line-202"></a>                     scanElements es <font color=Red>=</font>-<a name="line-203"></a>                        <font color=Green><u>case</u></font> runParser parseContents es <font color=Green><u>of</u></font>-<a name="line-204"></a>                            <font color=Cyan>(</font>Left msg<font color=Cyan>,</font> es'<font color=Cyan>)</font> <font color=Red>-&gt;</font> Failure es' msg-<a name="line-205"></a>                            <font color=Cyan>(</font>Right y<font color=Cyan>,</font> es'<font color=Cyan>)</font> <font color=Red>-&gt;</font>-<a name="line-206"></a>                                <font color=Green><u>case</u></font> scanElements es' <font color=Green><u>of</u></font>-<a name="line-207"></a>                                    Failure ds msg <font color=Red>-&gt;</font> Failure ds msg-<a name="line-208"></a>                                    Success ds ys  <font color=Red>-&gt;</font> Success ds <font color=Cyan>(</font>y<font color=Red><b>:</b></font>ys<font color=Cyan>)</font>-<a name="line-209"></a>            <font color=Cyan>(</font>CElem <font color=Cyan>(</font>Elem e <font color=Green><u>_</u></font> <font color=Green><u>_</u></font><font color=Cyan>)</font> pos<font color=Red><b>:</b></font> cs<font color=Cyan>)</font>-<a name="line-210"></a>                   <font color=Red>-&gt;</font> Failure cs <font color=Cyan>(</font><font color=Magenta>"Expected a &lt;list-...&gt;, but found a &lt;"</font><font color=Cyan>++</font>e-<a name="line-211"></a>                                  <font color=Cyan>++</font><font color=Magenta>"&gt; at\n"</font><font color=Cyan>++</font>show pos<font color=Cyan>)</font>-<a name="line-212"></a>            <font color=Cyan>(</font>CRef r pos<font color=Red><b>:</b></font> cs<font color=Cyan>)</font>-<a name="line-213"></a>                   <font color=Red>-&gt;</font> Failure cs <font color=Cyan>(</font><font color=Magenta>"Expected a &lt;list-...&gt;, but found a ref "</font>-<a name="line-214"></a>                                  <font color=Cyan>++</font>verbatim r<font color=Cyan>++</font><font color=Magenta>" at\n"</font><font color=Cyan>++</font> show pos<font color=Cyan>)</font>-<a name="line-215"></a>            <font color=Cyan>(</font><font color=Green><u>_</u></font><font color=Red><b>:</b></font>cs<font color=Cyan>)</font> <font color=Red>-&gt;</font> <font color=Cyan>(</font><font color=Cyan>(</font><font color=Red>\</font> <font color=Cyan>(</font>P p<font color=Cyan>)</font><font color=Red>-&gt;</font> p<font color=Cyan>)</font> parseContents<font color=Cyan>)</font> cs  <font color=Blue>-- skip comments etc.</font>-<a name="line-216"></a>            []     <font color=Red>-&gt;</font> Failure [] <font color=Magenta>"Ran out of input XML whilst secondary parsing"</font>-<a name="line-217"></a>        <font color=Cyan>)</font>-<a name="line-218"></a>-<a name="line-219"></a><font color=Green><u>instance</u></font> XmlContent () <font color=Green><u>where</u></font>-<a name="line-220"></a>    toContents ()  <font color=Red>=</font> <font color=Red>[</font>CElem <font color=Cyan>(</font>Elem <font color=Magenta>"unit"</font> [] []<font color=Cyan>)</font> ()<font color=Red>]</font>-<a name="line-221"></a>    parseContents <font color=Red>=</font> <font color=Green><u>do</u></font> <font color=Cyan>{</font> element <font color=Red>[</font><font color=Magenta>"unit"</font><font color=Red>]</font><font color=Cyan>;</font> return () <font color=Cyan>}</font>-<a name="line-222"></a>-<a name="line-223"></a>-<a name="line-224"></a><font color=Green><u>instance</u></font> <font color=Cyan>(</font>XmlContent a<font color=Cyan>)</font> <font color=Red>=&gt;</font> XmlContent <font color=Cyan>(</font>Maybe a<font color=Cyan>)</font> <font color=Green><u>where</u></font>-<a name="line-225"></a>    toContents m   <font color=Red>=</font> <font color=Red>[</font>mkElem m <font color=Cyan>(</font>maybe [] toContents m<font color=Cyan>)</font><font color=Red>]</font>-<a name="line-226"></a>    parseContents <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-227"></a>        <font color=Cyan>{</font> e <font color=Red>&lt;-</font> elementWith <font color=Cyan>(</font>flip isPrefixOf<font color=Cyan>)</font> <font color=Red>[</font><font color=Magenta>"maybe"</font><font color=Red>]</font>-<a name="line-228"></a>        <font color=Cyan>;</font> <font color=Green><u>case</u></font> e <font color=Green><u>of</u></font> <font color=Cyan>(</font>Elem <font color=Green><u>_</u></font> [] []<font color=Cyan>)</font> <font color=Red>-&gt;</font> return Nothing-<a name="line-229"></a>                    <font color=Cyan>(</font>Elem <font color=Green><u>_</u></font> [] <font color=Green><u>_</u></font><font color=Cyan>)</font>  <font color=Red>-&gt;</font> fmap Just <font color=Cyan>(</font>interior e parseContents<font color=Cyan>)</font>-<a name="line-230"></a>        <font color=Cyan>}</font>-<a name="line-231"></a>-<a name="line-232"></a><font color=Green><u>instance</u></font> <font color=Cyan>(</font>XmlContent a<font color=Cyan>,</font> XmlContent b<font color=Cyan>)</font> <font color=Red>=&gt;</font> XmlContent <font color=Cyan>(</font>Either a b<font color=Cyan>)</font> <font color=Green><u>where</u></font>-<a name="line-233"></a>    toContents v<font color=Red>@</font><font color=Cyan>(</font>Left aa<font color=Cyan>)</font> <font color=Red>=</font>-<a name="line-234"></a>        <font color=Red>[</font>mkElemC <font color=Cyan>(</font>showConstr <font color=Magenta>0</font> <font color=Cyan>(</font>toHType v<font color=Cyan>)</font><font color=Cyan>)</font> <font color=Cyan>(</font>toContents aa<font color=Cyan>)</font><font color=Red>]</font>-<a name="line-235"></a>    toContents v<font color=Red>@</font><font color=Cyan>(</font>Right ab<font color=Cyan>)</font> <font color=Red>=</font>-<a name="line-236"></a>        <font color=Red>[</font>mkElemC <font color=Cyan>(</font>showConstr <font color=Magenta>1</font> <font color=Cyan>(</font>toHType v<font color=Cyan>)</font><font color=Cyan>)</font> <font color=Cyan>(</font>toContents ab<font color=Cyan>)</font><font color=Red>]</font>-<a name="line-237"></a>    parseContents <font color=Red>=</font>-<a name="line-238"></a>        <font color=Cyan>(</font>inElementWith <font color=Cyan>(</font>flip isPrefixOf<font color=Cyan>)</font> <font color=Magenta>"Left"</font>  <font color=Cyan>$</font> fmap Left  parseContents<font color=Cyan>)</font>-<a name="line-239"></a>          <font color=Cyan>`onFail`</font>-<a name="line-240"></a>        <font color=Cyan>(</font>inElementWith <font color=Cyan>(</font>flip isPrefixOf<font color=Cyan>)</font> <font color=Magenta>"Right"</font> <font color=Cyan>$</font> fmap Right parseContents<font color=Cyan>)</font>-<a name="line-241"></a>-<a name="line-242"></a><font color=Blue>--    do{ e@(Elem t [] _) &lt;- element ["Left","Right"]</font>-<a name="line-243"></a><font color=Blue>--      ; case t of</font>-<a name="line-244"></a><font color=Blue>--          _ | "Left"  `isPrefixOf` t -&gt; fmap Left  (interior e parseContents)</font>-<a name="line-245"></a><font color=Blue>--            | "Right" `isPrefixOf` t -&gt; fmap Right (interior e parseContents)</font>-<a name="line-246"></a><font color=Blue>--      }</font>-<a name="line-247"></a>-<a name="line-248"></a><font color=Blue>------------------------------------------------------------------------</font>-</pre>-</body>-</html>
− docs/HaXml/src/Text/XML/HaXml/XmlContent/Parser.html
@@ -1,700 +0,0 @@-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">-<html>-<head>-<!-- Generated by HsColour, http://www.cs.york.ac.uk/fp/darcs/hscolour/ -->-<title>src/Text/XML/HaXml/XmlContent/Parser.hs</title>-</head>-<body>-<pre><a name="line-1"></a><font color=Blue>{-# LANGUAGE ExistentialQuantification #-}</font>-<a name="line-2"></a>-<a name="line-3"></a><font color=Blue>-- | The class 'XmlContent' is a kind of replacement for Read and Show:</font>-<a name="line-4"></a><font color=Blue>--   it provides conversions between a generic XML tree representation</font>-<a name="line-5"></a><font color=Blue>--   and your own more specialised typeful Haskell data trees.</font>-<a name="line-6"></a><font color=Blue>--</font>-<a name="line-7"></a><font color=Blue>--   If you are starting with a set of Haskell datatypes, use DrIFT to</font>-<a name="line-8"></a><font color=Blue>--   derive instances of this class for you:</font>-<a name="line-9"></a><font color=Blue>--       http:\/\/repetae.net\/john\/computer\/haskell\/DrIFT</font>-<a name="line-10"></a><font color=Blue>--   If you are starting with an XML DTD, use HaXml's tool DtdToHaskell</font>-<a name="line-11"></a><font color=Blue>--   to generate both the Haskell types and the corresponding instances.</font>-<a name="line-12"></a><font color=Blue>--</font>-<a name="line-13"></a><font color=Blue>--   This unified class interface replaces two previous (somewhat similar)</font>-<a name="line-14"></a><font color=Blue>--   classes: Haskell2Xml and Xml2Haskell.  There was no real reason to have</font>-<a name="line-15"></a><font color=Blue>--   separate classes depending on how you originally defined your datatypes.</font>-<a name="line-16"></a><font color=Blue>--   However, some instances for basic types like lists will depend on which </font>-<a name="line-17"></a><font color=Blue>--   direction you are using.  See Text.XML.HaXml.XmlContent and</font>-<a name="line-18"></a><font color=Blue>--   Text.XML.HaXml.XmlContent.Haskell.</font>-<a name="line-19"></a>-<a name="line-20"></a><font color=Blue>--   The methods 'toContents' and 'parseContents' convert a value to and from</font>-<a name="line-21"></a><font color=Blue>--   a generic internal representation of an XML document /without/ a DTD.</font>-<a name="line-22"></a><font color=Blue>--   The functions 'toXml' and 'fromXml' convert a value to and from a generic</font>-<a name="line-23"></a><font color=Blue>--   internal representation of an XML document /including/ a DTD.</font>-<a name="line-24"></a><font color=Blue>--   The functions 'readXml' and 'showXml' convert to and from Strings.</font>-<a name="line-25"></a><font color=Blue>--   The functions 'fReadXml' and 'fWriteXml' do the conversion to and from</font>-<a name="line-26"></a><font color=Blue>--   the given filenames.</font>-<a name="line-27"></a><font color=Blue>--   The functions 'hGetXml' and 'hPutXml' do the conversion to and from</font>-<a name="line-28"></a><font color=Blue>--   the given file handles.</font>-<a name="line-29"></a><font color=Blue>--   (See the type signatures.)</font>-<a name="line-30"></a><font color=Blue>--</font>-<a name="line-31"></a>-<a name="line-32"></a><font color=Green><u>module</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>XmlContent<font color=Cyan>.</font>Parser-<a name="line-33"></a>  <font color=Cyan>(</font> <font color=Blue>-- * Re-export the relevant set of generic XML document type definitions</font>-<a name="line-34"></a>    Document<font color=Cyan>(</font><font color=Red>..</font><font color=Cyan>)</font>-<a name="line-35"></a>  <font color=Cyan>,</font> Element<font color=Cyan>(</font><font color=Red>..</font><font color=Cyan>)</font>-<a name="line-36"></a>  <font color=Cyan>,</font> ElemTag<font color=Cyan>(</font><font color=Red>..</font><font color=Cyan>)</font>-<a name="line-37"></a>  <font color=Cyan>,</font> Content<font color=Cyan>(</font><font color=Red>..</font><font color=Cyan>)</font>-<a name="line-38"></a>  <font color=Cyan>,</font> Attribute()-<a name="line-39"></a>  <font color=Cyan>,</font> AttValue<font color=Cyan>(</font><font color=Red>..</font><font color=Cyan>)</font>-<a name="line-40"></a>  <font color=Cyan>,</font> Prolog<font color=Cyan>(</font><font color=Red>..</font><font color=Cyan>)</font>-<a name="line-41"></a>  <font color=Cyan>,</font> Reference<font color=Cyan>(</font><font color=Red>..</font><font color=Cyan>)</font>-<a name="line-42"></a>  <font color=Blue>-- * The enabling classes, that define parsing\/unparsing between Haskell</font>-<a name="line-43"></a>  <font color=Blue>--   datatypes and a generic XML representation.</font>-<a name="line-44"></a>  <font color=Cyan>,</font> XmlContent<font color=Cyan>(</font><font color=Red>..</font><font color=Cyan>)</font>-<a name="line-45"></a>  <font color=Cyan>,</font> XmlAttributes<font color=Cyan>(</font><font color=Red>..</font><font color=Cyan>)</font>-<a name="line-46"></a>  <font color=Cyan>,</font> XmlAttrType<font color=Cyan>(</font><font color=Red>..</font><font color=Cyan>)</font>-<a name="line-47"></a>  <font color=Blue>-- ** Auxiliaries for writing parsers in the XmlContent class</font>-<a name="line-48"></a>  <font color=Cyan>,</font> <font color=Green><u>module</u></font> Text<font color=Cyan>.</font>ParserCombinators<font color=Cyan>.</font>Poly-<a name="line-49"></a>  <font color=Cyan>,</font> XMLParser-<a name="line-50"></a>  <font color=Cyan>,</font> content<font color=Cyan>,</font> posnElement<font color=Cyan>,</font> element<font color=Cyan>,</font> interior<font color=Cyan>,</font> inElement<font color=Cyan>,</font> text<font color=Cyan>,</font> attributes-<a name="line-51"></a>  <font color=Cyan>,</font> posnElementWith<font color=Cyan>,</font> elementWith<font color=Cyan>,</font> inElementWith-<a name="line-52"></a>  <font color=Cyan>,</font> choice<font color=Cyan>,</font> definite <font color=Blue>-- ???</font>-<a name="line-53"></a>  <font color=Blue>-- ** Auxiliaries for generating in the XmlContent class</font>-<a name="line-54"></a>  <font color=Cyan>,</font> mkElem<font color=Cyan>,</font> mkElemC<font color=Cyan>,</font> mkAttr-<a name="line-55"></a>  <font color=Cyan>,</font> toText<font color=Cyan>,</font> toCData-<a name="line-56"></a>  <font color=Blue>-- ** Auxiliaries for the attribute-related classes</font>-<a name="line-57"></a>  <font color=Cyan>,</font> maybeToAttr<font color=Cyan>,</font> defaultToAttr-<a name="line-58"></a>  <font color=Cyan>,</font> definiteA<font color=Cyan>,</font> defaultA<font color=Cyan>,</font> possibleA<font color=Cyan>,</font> fromAttrToStr<font color=Cyan>,</font> toAttrFrStr-<a name="line-59"></a>  <font color=Cyan>,</font> Defaultable<font color=Cyan>(</font><font color=Red>..</font><font color=Cyan>)</font>-<a name="line-60"></a>  <font color=Cyan>,</font> str2attr<font color=Cyan>,</font> attr2str<font color=Cyan>,</font> attval-<a name="line-61"></a>  <font color=Cyan>,</font> catMaybes   <font color=Blue>-- re-exported from Maybe</font>-<a name="line-62"></a>  <font color=Blue>-- * Explicit representation of Haskell datatype information</font>-<a name="line-63"></a>  <font color=Blue>--   (for conversion to a DTD)</font>-<a name="line-64"></a>  <font color=Cyan>,</font> <font color=Green><u>module</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>TypeMapping-<a name="line-65"></a>  <font color=Blue>-- * Types useful for some content models</font>-<a name="line-66"></a>  <font color=Cyan>,</font> List1<font color=Cyan>(</font><font color=Red>..</font><font color=Cyan>)</font>-<a name="line-67"></a>  <font color=Cyan>,</font> ANYContent<font color=Cyan>(</font><font color=Red>..</font><font color=Cyan>)</font>-<a name="line-68"></a>  <font color=Cyan>)</font> <font color=Green><u>where</u></font>-<a name="line-69"></a>-<a name="line-70"></a><font color=Blue>--import IO</font>-<a name="line-71"></a><font color=Green><u>import</u></font> Maybe <font color=Cyan>(</font>catMaybes<font color=Cyan>)</font>-<a name="line-72"></a><font color=Green><u>import</u></font> Char  <font color=Cyan>(</font>chr<font color=Cyan>,</font> isSpace<font color=Cyan>)</font>-<a name="line-73"></a><font color=Green><u>import</u></font> List  <font color=Cyan>(</font>isPrefixOf<font color=Cyan>,</font> isSuffixOf<font color=Cyan>)</font>-<a name="line-74"></a>-<a name="line-75"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>PrettyPrint<font color=Cyan>.</font>HughesPJ <font color=Cyan>(</font>render<font color=Cyan>)</font>-<a name="line-76"></a><font color=Green><u>import</u></font> <font color=Green><u>qualified</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Pretty <font color=Green><u>as</u></font> PP-<a name="line-77"></a>-<a name="line-78"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Types-<a name="line-79"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>TypeMapping-<a name="line-80"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Posn     <font color=Cyan>(</font>Posn<font color=Cyan>,</font> posInNewCxt<font color=Cyan>)</font>-<a name="line-81"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Pretty   <font color=Cyan>(</font>document<font color=Cyan>)</font>-<a name="line-82"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Parse    <font color=Cyan>(</font>xmlParse<font color=Cyan>)</font>-<a name="line-83"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Verbatim <font color=Cyan>(</font>Verbatim<font color=Cyan>(</font>verbatim<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-84"></a><font color=Green><u>import</u></font> <font color=Green><u>qualified</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>ByteStringPP <font color=Green><u>as</u></font> FPS <font color=Cyan>(</font>document<font color=Cyan>)</font>-<a name="line-85"></a><font color=Green><u>import</u></font> <font color=Green><u>qualified</u></font> Data<font color=Cyan>.</font>ByteString<font color=Cyan>.</font>Lazy<font color=Cyan>.</font>Char8 <font color=Green><u>as</u></font> FPS-<a name="line-86"></a>-<a name="line-87"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>ParserCombinators<font color=Cyan>.</font>Poly-<a name="line-88"></a>-<a name="line-89"></a><font color=Blue>--  #define DEBUG</font>-<a name="line-90"></a>-<a name="line-91"></a><font color=Magenta><em>#if defined(DEBUG)</em></font>-<a name="line-92"></a><font color=Green><u>import</u></font> Debug<font color=Cyan>.</font>Trace<font color=Cyan>(</font>trace<font color=Cyan>)</font>-<a name="line-93"></a><a name="debug"></a><font color=Blue>debug</font> <font color=Red>::</font> a <font color=Red>-&gt;</font> String <font color=Red>-&gt;</font> a-<a name="line-94"></a><a name="debug"></a><font color=Blue>v</font> <font color=Cyan>`debug`</font> s <font color=Red>=</font> trace s v-<a name="line-95"></a><font color=Magenta><em>#else</em></font>-<a name="line-96"></a><font color=Blue>debug</font> <font color=Red>::</font> t <font color=Red>-&gt;</font> t1 <font color=Red>-&gt;</font> t-<a name="line-97"></a><a name="debug"></a><font color=Blue>v</font> <font color=Cyan>`debug`</font> <font color=Green><u>_</u></font> <font color=Red>=</font> v-<a name="line-98"></a><font color=Magenta><em>#endif</em></font>-<a name="line-99"></a>-<a name="line-100"></a>-<a name="line-101"></a><a name="attval"></a><font color=Blue>------------------------------------------------------------------------</font>-<a name="line-102"></a><font color=Blue>-- | Read a single attribute called "value".</font>-<a name="line-103"></a><font color=Blue>attval</font> <font color=Red>::</font> <font color=Cyan>(</font>Read a<font color=Cyan>)</font> <font color=Red>=&gt;</font> Element i <font color=Red>-&gt;</font> a-<a name="line-104"></a><font color=Blue>attval</font> <font color=Cyan>(</font>Elem <font color=Green><u>_</u></font> <font color=Red>[</font><font color=Cyan>(</font><font color=Magenta>"value"</font><font color=Cyan>,</font>v<font color=Red>@</font><font color=Cyan>(</font>AttValue <font color=Green><u>_</u></font><font color=Cyan>)</font><font color=Cyan>)</font><font color=Red>]</font> []<font color=Cyan>)</font> <font color=Red>=</font> read <font color=Cyan>(</font>show v<font color=Cyan>)</font>-<a name="line-105"></a>-<a name="line-106"></a><a name="mkAttr"></a><font color=Blue>-- | Generate a single attribute.</font>-<a name="line-107"></a><font color=Blue>mkAttr</font> <font color=Red>::</font> String <font color=Red>-&gt;</font> String <font color=Red>-&gt;</font> Attribute-<a name="line-108"></a><font color=Blue>mkAttr</font> n v <font color=Red>=</font> <font color=Cyan>(</font>n<font color=Cyan>,</font> AttValue <font color=Red>[</font>Left v<font color=Red>]</font><font color=Cyan>)</font>-<a name="line-109"></a>-<a name="line-110"></a><a name="mkElem"></a><font color=Blue>-- | Generate an element with no attributes, named for its HType.</font>-<a name="line-111"></a><font color=Blue>mkElem</font> <font color=Red>::</font> XmlContent a <font color=Red>=&gt;</font> a <font color=Red>-&gt;</font> <font color=Red>[</font>Content ()<font color=Red>]</font> <font color=Red>-&gt;</font> Content ()-<a name="line-112"></a><font color=Blue>mkElem</font> x cs  <font color=Red>=</font> CElem <font color=Cyan>(</font>Elem <font color=Cyan>(</font>showHType <font color=Cyan>(</font>toHType x<font color=Cyan>)</font> <font color=Magenta>""</font><font color=Cyan>)</font> [] cs<font color=Cyan>)</font> ()-<a name="line-113"></a>-<a name="line-114"></a><a name="mkElemC"></a><font color=Blue>-- | Generate an element with no attributes, named directly.</font>-<a name="line-115"></a><font color=Blue>mkElemC</font> <font color=Red>::</font> String <font color=Red>-&gt;</font> <font color=Red>[</font>Content ()<font color=Red>]</font> <font color=Red>-&gt;</font> Content ()-<a name="line-116"></a><font color=Blue>mkElemC</font> x cs <font color=Red>=</font> CElem <font color=Cyan>(</font>Elem x [] cs<font color=Cyan>)</font> ()-<a name="line-117"></a>-<a name="line-118"></a><a name="toText"></a><font color=Blue>-- | Turn a simple string into XML text.</font>-<a name="line-119"></a><font color=Blue>toText</font> <font color=Red>::</font> String <font color=Red>-&gt;</font> <font color=Red>[</font>Content ()<font color=Red>]</font>-<a name="line-120"></a><font color=Blue>toText</font> s <font color=Red>=</font> <font color=Red>[</font>CString False s ()<font color=Red>]</font>-<a name="line-121"></a>-<a name="line-122"></a><a name="toCData"></a><font color=Blue>-- | Turn a string into an XML CDATA section.</font>-<a name="line-123"></a><font color=Blue>--   (i.e. special characters like '&amp;' are preserved without interpretation.)</font>-<a name="line-124"></a><font color=Blue>toCData</font> <font color=Red>::</font> String <font color=Red>-&gt;</font> <font color=Red>[</font>Content ()<font color=Red>]</font>-<a name="line-125"></a><font color=Blue>toCData</font> s <font color=Red>=</font> <font color=Red>[</font>CString True s ()<font color=Red>]</font>-<a name="line-126"></a>-<a name="line-127"></a>-<a name="line-128"></a><font color=Blue>------------------------------------------------------------------------</font>-<a name="line-129"></a>-<a name="line-130"></a><a name="XMLParser"></a><font color=Blue>-- | We need a parsing monad for reading generic XML Content into specific</font>-<a name="line-131"></a><a name="XMLParser"></a><font color=Blue>--   datatypes.  This is a specialisation of the Text.ParserCombinators.Poly</font>-<a name="line-132"></a><a name="XMLParser"></a><font color=Blue>--   ones, where the input token type is fixed as XML Content.</font>-<a name="line-133"></a><a name="XMLParser"></a><font color=Green><u>type</u></font> XMLParser a <font color=Red>=</font> Parser <font color=Cyan>(</font>Content Posn<font color=Cyan>)</font> a-<a name="line-134"></a>-<a name="line-135"></a>-<a name="line-136"></a><font color=Blue>------------------------------------------------------------------------</font>-<a name="line-137"></a><font color=Blue>-- Some useful parsing combinators</font>-<a name="line-138"></a><font color=Blue>------------------------------------------------------------------------</font>-<a name="line-139"></a>-<a name="line-140"></a><a name="content"></a><font color=Blue>-- | The most primitive combinator for XMLParser - get one content item.</font>-<a name="line-141"></a><font color=Blue>content</font> <font color=Red>::</font> String <font color=Red>-&gt;</font> XMLParser <font color=Cyan>(</font>Content Posn<font color=Cyan>)</font>-<a name="line-142"></a><font color=Blue>content</font> word <font color=Red>=</font> next <font color=Cyan>`adjustErr`</font> <font color=Cyan>(</font><font color=Cyan>++</font><font color=Magenta>" when expecting "</font><font color=Cyan>++</font>word<font color=Cyan>)</font>-<a name="line-143"></a>-<a name="line-144"></a><a name="posnElementWith"></a><font color=Blue>-- | Get the next content element, checking that it has one of the required</font>-<a name="line-145"></a><font color=Blue>--   tags, using the given matching function.</font>-<a name="line-146"></a><font color=Blue>--   (Skips over comments and whitespace, rejects text and refs.</font>-<a name="line-147"></a><font color=Blue>--    Also returns position of element.)</font>-<a name="line-148"></a><font color=Blue>posnElementWith</font> <font color=Red>::</font> <font color=Cyan>(</font>String<font color=Red>-&gt;</font>String<font color=Red>-&gt;</font>Bool<font color=Cyan>)</font> <font color=Red>-&gt;</font> <font color=Red>[</font>String<font color=Red>]</font>-<a name="line-149"></a>                   <font color=Red>-&gt;</font> XMLParser <font color=Cyan>(</font>Posn<font color=Cyan>,</font> Element Posn<font color=Cyan>)</font>-<a name="line-150"></a><font color=Blue>posnElementWith</font> match tags <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-151"></a>    <font color=Cyan>{</font> c <font color=Red>&lt;-</font> content <font color=Cyan>(</font>formatted tags<font color=Cyan>)</font>-<a name="line-152"></a>    <font color=Cyan>;</font> <font color=Green><u>case</u></font> c <font color=Green><u>of</u></font>-<a name="line-153"></a>          CElem e<font color=Red>@</font><font color=Cyan>(</font>Elem t <font color=Green><u>_</u></font> <font color=Green><u>_</u></font><font color=Cyan>)</font> pos-<a name="line-154"></a>              <font color=Red>|</font> any <font color=Cyan>(</font>match t<font color=Cyan>)</font> tags <font color=Red>-&gt;</font> return <font color=Cyan>(</font>pos<font color=Cyan>,</font> e<font color=Cyan>)</font>-<a name="line-155"></a>              <font color=Red>|</font> otherwise          <font color=Red>-&gt;</font> fail <font color=Cyan>(</font><font color=Magenta>"Found a &lt;"</font><font color=Cyan>++</font>t<font color=Cyan>++</font><font color=Magenta>"&gt;, but expected "</font>-<a name="line-156"></a>                                           <font color=Cyan>++</font>formatted tags<font color=Cyan>++</font><font color=Magenta>"\nat "</font><font color=Cyan>++</font>show pos<font color=Cyan>)</font>-<a name="line-157"></a>          CString b s pos-<a name="line-158"></a>              <font color=Red>|</font> not b <font color=Cyan>&amp;&amp;</font> all isSpace s <font color=Red>-&gt;</font> posnElementWith match tags-<a name="line-159"></a>                                                        <font color=Blue>-- ignore blank space</font>-<a name="line-160"></a>              <font color=Red>|</font> otherwise <font color=Red>-&gt;</font> fail <font color=Cyan>(</font><font color=Magenta>"Found text content, but expected "</font>-<a name="line-161"></a>                                  <font color=Cyan>++</font>formatted tags<font color=Cyan>++</font><font color=Magenta>"\ntext is: "</font><font color=Cyan>++</font>s-<a name="line-162"></a>                                  <font color=Cyan>++</font><font color=Magenta>"\nat "</font><font color=Cyan>++</font>show pos<font color=Cyan>)</font>-<a name="line-163"></a>          CRef r pos <font color=Red>-&gt;</font> fail <font color=Cyan>(</font><font color=Magenta>"Found reference, but expected "</font>-<a name="line-164"></a>                             <font color=Cyan>++</font>formatted tags<font color=Cyan>++</font><font color=Magenta>"\nreference is: "</font><font color=Cyan>++</font>verbatim r-<a name="line-165"></a>                             <font color=Cyan>++</font><font color=Magenta>"\nat "</font><font color=Cyan>++</font>show pos<font color=Cyan>)</font>-<a name="line-166"></a>          CMisc <font color=Green><u>_</u></font> <font color=Green><u>_</u></font> <font color=Red>-&gt;</font> posnElementWith match tags  <font color=Blue>-- skip comments, PIs, etc.</font>-<a name="line-167"></a>    <font color=Cyan>}</font>-<a name="line-168"></a>  <font color=Green><u>where</u></font>-<a name="line-169"></a>    formatted <font color=Red>[</font>t<font color=Red>]</font>  <font color=Red>=</font> <font color=Magenta>"a &lt;"</font><font color=Cyan>++</font>t<font color=Cyan>++</font><font color=Magenta>"&gt;"</font>-<a name="line-170"></a>    formatted tgs <font color=Red>=</font> <font color=Magenta>"one of"</font><font color=Cyan>++</font> concatMap <font color=Cyan>(</font><font color=Red>\</font>t<font color=Red>-&gt;</font><font color=Magenta>" &lt;"</font><font color=Cyan>++</font>t<font color=Cyan>++</font><font color=Magenta>"&gt;"</font><font color=Cyan>)</font> tgs-<a name="line-171"></a>-<a name="line-172"></a><a name="posnElement"></a><font color=Blue>-- | A specialisation of @posnElementWith (==)@.</font>-<a name="line-173"></a><font color=Blue>posnElement</font> <font color=Red>::</font> <font color=Red>[</font>String<font color=Red>]</font> <font color=Red>-&gt;</font> XMLParser <font color=Cyan>(</font>Posn<font color=Cyan>,</font> Element Posn<font color=Cyan>)</font>-<a name="line-174"></a><font color=Blue>posnElement</font> <font color=Red>=</font> posnElementWith <font color=Cyan>(</font><font color=Cyan>==</font><font color=Cyan>)</font>-<a name="line-175"></a>-<a name="line-176"></a><a name="element"></a><font color=Blue>-- | Get the next content element, checking that it has one of the required</font>-<a name="line-177"></a><font color=Blue>--   tags.  (Skips over comments and whitespace, rejects text and refs.)</font>-<a name="line-178"></a><font color=Blue>element</font> <font color=Red>::</font> <font color=Red>[</font>String<font color=Red>]</font> <font color=Red>-&gt;</font> XMLParser <font color=Cyan>(</font>Element Posn<font color=Cyan>)</font>-<a name="line-179"></a><font color=Blue>element</font> tags <font color=Red>=</font> fmap snd <font color=Cyan>(</font>posnElement tags<font color=Cyan>)</font>-<a name="line-180"></a>                                <font color=Cyan>`debug`</font> <font color=Cyan>(</font><font color=Magenta>"Element: "</font><font color=Cyan>++</font>unwords tags<font color=Cyan>++</font><font color=Magenta>"\n"</font><font color=Cyan>)</font>-<a name="line-181"></a>-<a name="line-182"></a><a name="elementWith"></a><font color=Blue>-- | Like element, only permits a more flexible match against the tagname.</font>-<a name="line-183"></a><font color=Blue>elementWith</font> <font color=Red>::</font> <font color=Cyan>(</font>String<font color=Red>-&gt;</font>String<font color=Red>-&gt;</font>Bool<font color=Cyan>)</font> <font color=Red>-&gt;</font> <font color=Red>[</font>String<font color=Red>]</font> <font color=Red>-&gt;</font> XMLParser <font color=Cyan>(</font>Element Posn<font color=Cyan>)</font>-<a name="line-184"></a><font color=Blue>elementWith</font> match tags <font color=Red>=</font> fmap snd <font color=Cyan>(</font>posnElementWith match tags<font color=Cyan>)</font>-<a name="line-185"></a>                                <font color=Cyan>`debug`</font> <font color=Cyan>(</font><font color=Magenta>"Element: "</font><font color=Cyan>++</font>unwords tags<font color=Cyan>++</font><font color=Magenta>"\n"</font><font color=Cyan>)</font>-<a name="line-186"></a>-<a name="line-187"></a><a name="interior"></a><font color=Blue>-- | Run an XMLParser on the contents of the given element (i.e. not on the</font>-<a name="line-188"></a><font color=Blue>--   current monadic content sequence), checking that the contents are</font>-<a name="line-189"></a><font color=Blue>--   exhausted, before returning the calculated value within the current</font>-<a name="line-190"></a><font color=Blue>--   parser context.</font>-<a name="line-191"></a><font color=Blue>interior</font> <font color=Red>::</font> Element Posn <font color=Red>-&gt;</font> XMLParser a <font color=Red>-&gt;</font> XMLParser a-<a name="line-192"></a><font color=Blue>interior</font> <font color=Cyan>(</font>Elem e <font color=Green><u>_</u></font> cs<font color=Cyan>)</font> p <font color=Red>=</font>-<a name="line-193"></a>    <font color=Green><u>case</u></font> runParser p cs <font color=Green><u>of</u></font>-<a name="line-194"></a>        <font color=Cyan>(</font>Left msg<font color=Cyan>,</font> <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red>-&gt;</font> fail msg-<a name="line-195"></a>        <font color=Cyan>(</font>Right x<font color=Cyan>,</font> []<font color=Cyan>)</font> <font color=Red>-&gt;</font> return x-<a name="line-196"></a>        <font color=Cyan>(</font>Right x<font color=Cyan>,</font> ds<font color=Red>@</font><font color=Cyan>(</font>d<font color=Red><b>:</b></font><font color=Green><u>_</u></font><font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-197"></a>            <font color=Red>|</font> all onlyMisc ds <font color=Red>-&gt;</font> return x-<a name="line-198"></a>            <font color=Red>|</font> otherwise       <font color=Red>-&gt;</font> fail <font color=Cyan>(</font><font color=Magenta>"Too many elements inside &lt;"</font><font color=Cyan>++</font>e<font color=Cyan>++</font><font color=Magenta>"&gt; at\n"</font>-<a name="line-199"></a>                                      <font color=Cyan>++</font>show <font color=Cyan>(</font>info d<font color=Cyan>)</font><font color=Cyan>++</font><font color=Magenta>"\n"</font>-<a name="line-200"></a>                                      <font color=Cyan>++</font><font color=Magenta>"Found excess: "</font><font color=Cyan>++</font>verbatim d<font color=Cyan>)</font>-<a name="line-201"></a>  <font color=Green><u>where</u></font> onlyMisc <font color=Cyan>(</font>CMisc <font color=Green><u>_</u></font> <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red>=</font> True-<a name="line-202"></a>        onlyMisc <font color=Cyan>(</font>CString False s <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red>|</font> all isSpace s <font color=Red>=</font> True-<a name="line-203"></a>        onlyMisc <font color=Green><u>_</u></font> <font color=Red>=</font> False-<a name="line-204"></a>-<a name="line-205"></a><a name="inElement"></a><font color=Blue>-- | A combination of element + interior.</font>-<a name="line-206"></a><font color=Blue>inElement</font> <font color=Red>::</font> String <font color=Red>-&gt;</font> XMLParser a <font color=Red>-&gt;</font> XMLParser a-<a name="line-207"></a><font color=Blue>inElement</font> tag p <font color=Red>=</font> <font color=Green><u>do</u></font> <font color=Cyan>{</font> e <font color=Red>&lt;-</font> element <font color=Red>[</font>tag<font color=Red>]</font><font color=Cyan>;</font> commit <font color=Cyan>(</font>interior e p<font color=Cyan>)</font> <font color=Cyan>}</font>-<a name="line-208"></a>-<a name="line-209"></a><a name="inElementWith"></a><font color=Blue>-- | A combination of elementWith + interior.</font>-<a name="line-210"></a><font color=Blue>inElementWith</font> <font color=Red>::</font> <font color=Cyan>(</font>String<font color=Red>-&gt;</font>String<font color=Red>-&gt;</font>Bool<font color=Cyan>)</font> <font color=Red>-&gt;</font> String <font color=Red>-&gt;</font> XMLParser a <font color=Red>-&gt;</font> XMLParser a-<a name="line-211"></a><font color=Blue>inElementWith</font> match tag p <font color=Red>=</font> <font color=Green><u>do</u></font> <font color=Cyan>{</font> e <font color=Red>&lt;-</font> elementWith match <font color=Red>[</font>tag<font color=Red>]</font>-<a name="line-212"></a>                               <font color=Cyan>;</font> commit <font color=Cyan>(</font>interior e p<font color=Cyan>)</font> <font color=Cyan>}</font>-<a name="line-213"></a>-<a name="line-214"></a><a name="attributes"></a><font color=Blue>-- | Do some parsing of the attributes of the given element</font>-<a name="line-215"></a><font color=Blue>attributes</font> <font color=Red>::</font> XmlAttributes a <font color=Red>=&gt;</font> Element Posn <font color=Red>-&gt;</font> XMLParser a-<a name="line-216"></a><font color=Blue>attributes</font> <font color=Cyan>(</font>Elem <font color=Green><u>_</u></font> <font color=Green><u>as</u></font> <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red>=</font> return <font color=Cyan>(</font>fromAttrs <font color=Green><u>as</u></font><font color=Cyan>)</font>-<a name="line-217"></a>-<a name="line-218"></a><a name="text"></a><font color=Blue>-- | 'text' is a counterpart to 'element', parsing text content if it</font>-<a name="line-219"></a><font color=Blue>--   exists.  Adjacent text and references are coalesced.</font>-<a name="line-220"></a><font color=Blue>text</font> <font color=Red>::</font> XMLParser String-<a name="line-221"></a><font color=Blue>text</font> <font color=Red>=</font> text' []-<a name="line-222"></a>  <font color=Green><u>where</u></font> text' acc <font color=Red>=</font>-<a name="line-223"></a>          <font color=Green><u>do</u></font> <font color=Cyan>{</font> c <font color=Red>&lt;-</font> content <font color=Magenta>"plain text"</font>-<a name="line-224"></a>             <font color=Cyan>;</font> <font color=Green><u>case</u></font> c <font color=Green><u>of</u></font>-<a name="line-225"></a>                 CString <font color=Green><u>_</u></font> s <font color=Green><u>_</u></font>        <font color=Red>-&gt;</font> text' <font color=Cyan>(</font>s<font color=Red><b>:</b></font>acc<font color=Cyan>)</font>-<a name="line-226"></a>                 CRef <font color=Cyan>(</font>RefChar s<font color=Cyan>)</font> <font color=Green><u>_</u></font>   <font color=Red>-&gt;</font> text' <font color=Cyan>(</font><font color=Cyan>(</font><font color=Magenta>"&amp;#"</font><font color=Cyan>++</font>show s<font color=Cyan>++</font><font color=Magenta>";"</font><font color=Cyan>)</font> <font color=Red><b>:</b></font>acc<font color=Cyan>)</font>-<a name="line-227"></a>                 CRef <font color=Cyan>(</font>RefEntity s<font color=Cyan>)</font> <font color=Green><u>_</u></font> <font color=Red>-&gt;</font> text' <font color=Cyan>(</font><font color=Cyan>(</font><font color=Magenta>'&amp;'</font><font color=Red><b>:</b></font>s<font color=Cyan>++</font><font color=Magenta>";"</font><font color=Cyan>)</font><font color=Red><b>:</b></font>acc<font color=Cyan>)</font>-<a name="line-228"></a>                 CMisc <font color=Green><u>_</u></font> <font color=Green><u>_</u></font>            <font color=Red>-&gt;</font> text' acc-<a name="line-229"></a>                 CElem <font color=Green><u>_</u></font> <font color=Green><u>_</u></font>         <font color=Red>-&gt;</font> <font color=Green><u>do</u></font> <font color=Cyan>{</font> reparse <font color=Red>[</font>c<font color=Red>]</font> <font color=Blue>-- put it back!</font>-<a name="line-230"></a>                                         <font color=Cyan>;</font> <font color=Green><u>if</u></font> null acc <font color=Green><u>then</u></font> fail <font color=Magenta>"empty string"</font>-<a name="line-231"></a>                                           <font color=Green><u>else</u></font> return <font color=Cyan>(</font>concat <font color=Cyan>(</font>reverse acc<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-232"></a>                                         <font color=Cyan>}</font>-<a name="line-233"></a>             <font color=Cyan>}</font>-<a name="line-234"></a>          <font color=Cyan>`onFail`</font> <font color=Cyan>(</font> <font color=Green><u>if</u></font> null acc <font color=Green><u>then</u></font> fail <font color=Magenta>"empty string"</font>-<a name="line-235"></a>                     <font color=Green><u>else</u></font> return <font color=Cyan>(</font>concat <font color=Cyan>(</font>reverse acc<font color=Cyan>)</font><font color=Cyan>)</font> <font color=Cyan>)</font>-<a name="line-236"></a>-<a name="line-237"></a>-<a name="line-238"></a><a name="choice"></a><font color=Blue>-- | 'choice f p' means if parseContents succeeds, apply f to the result,</font>-<a name="line-239"></a><font color=Blue>--   otherwise use the continuation parser.</font>-<a name="line-240"></a><font color=Blue>choice</font> <font color=Red>::</font> XmlContent a <font color=Red>=&gt;</font> <font color=Cyan>(</font>a <font color=Red>-&gt;</font> b<font color=Cyan>)</font> <font color=Red>-&gt;</font> XMLParser b <font color=Red>-&gt;</font> XMLParser b-<a name="line-241"></a><font color=Blue>choice</font> cons <font color=Cyan>(</font>P other<font color=Cyan>)</font> <font color=Red>=</font>-<a name="line-242"></a>    P <font color=Cyan>(</font><font color=Red>\</font>cs<font color=Red>-&gt;</font> <font color=Green><u>case</u></font> runParser parseContents cs <font color=Green><u>of</u></font>-<a name="line-243"></a>                 <font color=Cyan>(</font>Left <font color=Green><u>_</u></font><font color=Cyan>,</font> <font color=Green><u>_</u></font><font color=Cyan>)</font>  <font color=Red>-&gt;</font> other cs-<a name="line-244"></a>                 <font color=Cyan>(</font>Right x<font color=Cyan>,</font> cs'<font color=Cyan>)</font> <font color=Red>-&gt;</font> Success cs' <font color=Cyan>(</font>cons x<font color=Cyan>)</font> <font color=Cyan>)</font>-<a name="line-245"></a>-<a name="line-246"></a><font color=Blue>--choice cons other = fmap cons parseContents `onFail` other</font>-<a name="line-247"></a>-<a name="line-248"></a><a name="definite"></a><font color=Blue>-- | not sure this is needed now.   'definite p' previously ensured that</font>-<a name="line-249"></a><font color=Blue>--   an element was definitely present.  Now I think the monad might take</font>-<a name="line-250"></a><font color=Blue>--   care of that for us.</font>-<a name="line-251"></a><font color=Blue>definite</font> <font color=Red>::</font> XmlContent a <font color=Red>=&gt;</font> XMLParser a <font color=Red>-&gt;</font> String <font color=Red>-&gt;</font> String <font color=Red>-&gt;</font> XMLParser a-<a name="line-252"></a><font color=Blue>definite</font> p inner tag <font color=Red>=</font> P <font color=Cyan>(</font><font color=Red>\</font>cs<font color=Red>-&gt;</font> <font color=Green><u>case</u></font> runParser p cs <font color=Green><u>of</u></font>-<a name="line-253"></a>                                   <font color=Cyan>(</font>Left <font color=Green><u>_</u></font><font color=Cyan>,</font> cs'<font color=Cyan>)</font>   <font color=Red>-&gt;</font> Failure cs' msg'-<a name="line-254"></a>                                   <font color=Cyan>(</font>Right x<font color=Cyan>,</font> cs'<font color=Cyan>)</font>  <font color=Red>-&gt;</font> Success cs' x <font color=Cyan>)</font>-<a name="line-255"></a>  <font color=Green><u>where</u></font> msg' <font color=Red>=</font> <font color=Magenta>"content error: expected "</font><font color=Cyan>++</font>inner<font color=Cyan>++</font><font color=Magenta>" inside &lt;"</font><font color=Cyan>++</font>tag-<a name="line-256"></a>               <font color=Cyan>++</font><font color=Magenta>"&gt; element\n"</font>-<a name="line-257"></a>-<a name="line-258"></a><font color=Blue>------------------------------------------------------------------------</font>-<a name="line-259"></a>-<a name="line-260"></a><a name="XmlContent"></a><font color=Blue>-- | The @XmlContent@ class promises that an XML Content element can be</font>-<a name="line-261"></a><a name="XmlContent"></a><font color=Blue>--   converted to and from a Haskell value.</font>-<a name="line-262"></a><a name="XmlContent"></a><font color=Green><u>class</u></font> HTypeable a <font color=Red>=&gt;</font> XmlContent a <font color=Green><u>where</u></font>-<a name="line-263"></a>    <font color=Blue>-- | Convert from XML to Haskell</font>-<a name="line-264"></a>    parseContents <font color=Red>::</font> XMLParser a-<a name="line-265"></a>    <font color=Blue>-- | Convert from Haskell to XML</font>-<a name="line-266"></a>    toContents    <font color=Red>::</font> a <font color=Red>-&gt;</font> <font color=Red>[</font>Content ()<font color=Red>]</font>-<a name="line-267"></a>-<a name="line-268"></a>    <font color=Blue>-- | Dummy functions (for most types): used /only/ in the Char instance</font>-<a name="line-269"></a>    <font color=Blue>--   for coercing lists of Char into String.</font>-<a name="line-270"></a>    xToChar       <font color=Red>::</font> a <font color=Red>-&gt;</font> Char-<a name="line-271"></a>    xFromChar     <font color=Red>::</font> Char <font color=Red>-&gt;</font> a-<a name="line-272"></a>    xToChar        <font color=Red>=</font> error <font color=Magenta>"HaXml.XmlContent.xToChar used in error"</font>-<a name="line-273"></a>    xFromChar      <font color=Red>=</font> error <font color=Magenta>"HaXml.XmlContent.xFromChar used in error"</font>-<a name="line-274"></a>-<a name="line-275"></a><a name="XmlContent"></a><font color=Blue>-- | The @XmlAttributes@ class promises that a list of XML tag attributes</font>-<a name="line-276"></a><a name="XmlContent"></a><font color=Blue>--   can be converted to and from a Haskell value.</font>-<a name="line-277"></a><a name="XmlContent"></a><font color=Green><u>class</u></font> XmlAttributes a <font color=Green><u>where</u></font>-<a name="line-278"></a>    fromAttrs <font color=Red>::</font> <font color=Red>[</font>Attribute<font color=Red>]</font> <font color=Red>-&gt;</font> a-<a name="line-279"></a>    toAttrs   <font color=Red>::</font> a <font color=Red>-&gt;</font> <font color=Red>[</font>Attribute<font color=Red>]</font>-<a name="line-280"></a><a name="XmlContent"></a><font color=Blue>-- | The @XmlAttrType@ class promises that an attribute taking an XML</font>-<a name="line-281"></a><a name="XmlContent"></a><font color=Blue>--   enumerated type can be converted to and from a Haskell value.</font>-<a name="line-282"></a><a name="XmlContent"></a><font color=Green><u>class</u></font> XmlAttrType a <font color=Green><u>where</u></font>-<a name="line-283"></a>    fromAttrToTyp <font color=Red>::</font> String <font color=Red>-&gt;</font> Attribute <font color=Red>-&gt;</font> Maybe a-<a name="line-284"></a>    toAttrFrTyp   <font color=Red>::</font> String <font color=Red>-&gt;</font> a <font color=Red>-&gt;</font> Maybe Attribute-<a name="line-285"></a>-<a name="line-286"></a>-<a name="line-287"></a><font color=Blue>------------------------------------------------------------------------</font>-<a name="line-288"></a><font color=Blue>-- Instances for some of the standard basic datatypes.</font>-<a name="line-289"></a><font color=Blue>-- Both DtdToHaskell and Haskell2Xml share these instances.</font>-<a name="line-290"></a><font color=Blue>------------------------------------------------------------------------</font>-<a name="line-291"></a>-<a name="line-292"></a><font color=Green><u>instance</u></font> <font color=Cyan>(</font>XmlContent a<font color=Cyan>,</font> XmlContent b<font color=Cyan>)</font> <font color=Red>=&gt;</font> XmlContent <font color=Cyan>(</font>a<font color=Cyan>,</font>b<font color=Cyan>)</font> <font color=Green><u>where</u></font>-<a name="line-293"></a>    toContents <font color=Cyan>(</font>a<font color=Cyan>,</font>b<font color=Cyan>)</font> <font color=Red>=</font> toContents a <font color=Cyan>++</font> toContents b-<a name="line-294"></a>    parseContents    <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-295"></a>        <font color=Cyan>{</font> a <font color=Red>&lt;-</font> parseContents-<a name="line-296"></a>        <font color=Cyan>;</font> b <font color=Red>&lt;-</font> parseContents-<a name="line-297"></a>        <font color=Cyan>;</font> return <font color=Cyan>(</font>a<font color=Cyan>,</font>b<font color=Cyan>)</font>-<a name="line-298"></a>        <font color=Cyan>}</font>-<a name="line-299"></a>-<a name="line-300"></a><font color=Green><u>instance</u></font> <font color=Cyan>(</font>XmlContent a<font color=Cyan>,</font> XmlContent b<font color=Cyan>,</font> XmlContent c<font color=Cyan>)</font> <font color=Red>=&gt;</font> XmlContent <font color=Cyan>(</font>a<font color=Cyan>,</font>b<font color=Cyan>,</font>c<font color=Cyan>)</font> <font color=Green><u>where</u></font>-<a name="line-301"></a>    toContents <font color=Cyan>(</font>a<font color=Cyan>,</font>b<font color=Cyan>,</font>c<font color=Cyan>)</font> <font color=Red>=</font> toContents a <font color=Cyan>++</font> toContents b <font color=Cyan>++</font> toContents c-<a name="line-302"></a>    parseContents <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-303"></a>        <font color=Cyan>{</font> a <font color=Red>&lt;-</font> parseContents-<a name="line-304"></a>        <font color=Cyan>;</font> b <font color=Red>&lt;-</font> parseContents-<a name="line-305"></a>        <font color=Cyan>;</font> c <font color=Red>&lt;-</font> parseContents-<a name="line-306"></a>        <font color=Cyan>;</font> return <font color=Cyan>(</font>a<font color=Cyan>,</font>b<font color=Cyan>,</font>c<font color=Cyan>)</font>-<a name="line-307"></a>        <font color=Cyan>}</font>-<a name="line-308"></a>-<a name="line-309"></a><font color=Green><u>instance</u></font> <font color=Cyan>(</font>XmlContent a<font color=Cyan>,</font> XmlContent b<font color=Cyan>,</font> XmlContent c<font color=Cyan>,</font> XmlContent d<font color=Cyan>)</font> <font color=Red>=&gt;</font>-<a name="line-310"></a>         XmlContent <font color=Cyan>(</font>a<font color=Cyan>,</font>b<font color=Cyan>,</font>c<font color=Cyan>,</font>d<font color=Cyan>)</font> <font color=Green><u>where</u></font>-<a name="line-311"></a>    toContents <font color=Cyan>(</font>a<font color=Cyan>,</font>b<font color=Cyan>,</font>c<font color=Cyan>,</font>d<font color=Cyan>)</font> <font color=Red>=</font> toContents a <font color=Cyan>++</font> toContents b <font color=Cyan>++</font> toContents c-<a name="line-312"></a>                           <font color=Cyan>++</font> toContents d-<a name="line-313"></a>    parseContents <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-314"></a>        <font color=Cyan>{</font> a <font color=Red>&lt;-</font> parseContents-<a name="line-315"></a>        <font color=Cyan>;</font> b <font color=Red>&lt;-</font> parseContents-<a name="line-316"></a>        <font color=Cyan>;</font> c <font color=Red>&lt;-</font> parseContents-<a name="line-317"></a>        <font color=Cyan>;</font> d <font color=Red>&lt;-</font> parseContents-<a name="line-318"></a>        <font color=Cyan>;</font> return <font color=Cyan>(</font>a<font color=Cyan>,</font>b<font color=Cyan>,</font>c<font color=Cyan>,</font>d<font color=Cyan>)</font>-<a name="line-319"></a>        <font color=Cyan>}</font>-<a name="line-320"></a>-<a name="line-321"></a><font color=Green><u>instance</u></font> <font color=Cyan>(</font> XmlContent a<font color=Cyan>,</font> XmlContent b<font color=Cyan>,</font> XmlContent c<font color=Cyan>,</font> XmlContent d-<a name="line-322"></a>         <font color=Cyan>,</font> XmlContent e <font color=Cyan>)</font> <font color=Red>=&gt;</font>-<a name="line-323"></a>         XmlContent <font color=Cyan>(</font>a<font color=Cyan>,</font>b<font color=Cyan>,</font>c<font color=Cyan>,</font>d<font color=Cyan>,</font>e<font color=Cyan>)</font> <font color=Green><u>where</u></font>-<a name="line-324"></a>    toContents <font color=Cyan>(</font>a<font color=Cyan>,</font>b<font color=Cyan>,</font>c<font color=Cyan>,</font>d<font color=Cyan>,</font>e<font color=Cyan>)</font> <font color=Red>=</font> toContents a <font color=Cyan>++</font> toContents b <font color=Cyan>++</font> toContents c-<a name="line-325"></a>                             <font color=Cyan>++</font> toContents d <font color=Cyan>++</font> toContents e-<a name="line-326"></a>    parseContents <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-327"></a>        <font color=Cyan>{</font> a <font color=Red>&lt;-</font> parseContents-<a name="line-328"></a>        <font color=Cyan>;</font> b <font color=Red>&lt;-</font> parseContents-<a name="line-329"></a>        <font color=Cyan>;</font> c <font color=Red>&lt;-</font> parseContents-<a name="line-330"></a>        <font color=Cyan>;</font> d <font color=Red>&lt;-</font> parseContents-<a name="line-331"></a>        <font color=Cyan>;</font> e <font color=Red>&lt;-</font> parseContents-<a name="line-332"></a>        <font color=Cyan>;</font> return <font color=Cyan>(</font>a<font color=Cyan>,</font>b<font color=Cyan>,</font>c<font color=Cyan>,</font>d<font color=Cyan>,</font>e<font color=Cyan>)</font>-<a name="line-333"></a>        <font color=Cyan>}</font>-<a name="line-334"></a>-<a name="line-335"></a><font color=Green><u>instance</u></font> <font color=Cyan>(</font> XmlContent a<font color=Cyan>,</font> XmlContent b<font color=Cyan>,</font> XmlContent c<font color=Cyan>,</font> XmlContent d-<a name="line-336"></a>         <font color=Cyan>,</font> XmlContent e<font color=Cyan>,</font> XmlContent f <font color=Cyan>)</font> <font color=Red>=&gt;</font>-<a name="line-337"></a>         XmlContent <font color=Cyan>(</font>a<font color=Cyan>,</font>b<font color=Cyan>,</font>c<font color=Cyan>,</font>d<font color=Cyan>,</font>e<font color=Cyan>,</font>f<font color=Cyan>)</font> <font color=Green><u>where</u></font>-<a name="line-338"></a>    toContents <font color=Cyan>(</font>a<font color=Cyan>,</font>b<font color=Cyan>,</font>c<font color=Cyan>,</font>d<font color=Cyan>,</font>e<font color=Cyan>,</font>f<font color=Cyan>)</font> <font color=Red>=</font> toContents a <font color=Cyan>++</font> toContents b <font color=Cyan>++</font> toContents c-<a name="line-339"></a>                               <font color=Cyan>++</font> toContents d <font color=Cyan>++</font> toContents e <font color=Cyan>++</font> toContents f-<a name="line-340"></a>    parseContents <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-341"></a>        <font color=Cyan>{</font> a <font color=Red>&lt;-</font> parseContents-<a name="line-342"></a>        <font color=Cyan>;</font> b <font color=Red>&lt;-</font> parseContents-<a name="line-343"></a>        <font color=Cyan>;</font> c <font color=Red>&lt;-</font> parseContents-<a name="line-344"></a>        <font color=Cyan>;</font> d <font color=Red>&lt;-</font> parseContents-<a name="line-345"></a>        <font color=Cyan>;</font> e <font color=Red>&lt;-</font> parseContents-<a name="line-346"></a>        <font color=Cyan>;</font> f <font color=Red>&lt;-</font> parseContents-<a name="line-347"></a>        <font color=Cyan>;</font> return <font color=Cyan>(</font>a<font color=Cyan>,</font>b<font color=Cyan>,</font>c<font color=Cyan>,</font>d<font color=Cyan>,</font>e<font color=Cyan>,</font>f<font color=Cyan>)</font>-<a name="line-348"></a>        <font color=Cyan>}</font>-<a name="line-349"></a>-<a name="line-350"></a><font color=Green><u>instance</u></font> <font color=Cyan>(</font> XmlContent a<font color=Cyan>,</font> XmlContent b<font color=Cyan>,</font> XmlContent c<font color=Cyan>,</font> XmlContent d-<a name="line-351"></a>         <font color=Cyan>,</font> XmlContent e<font color=Cyan>,</font> XmlContent f<font color=Cyan>,</font> XmlContent g <font color=Cyan>)</font> <font color=Red>=&gt;</font>-<a name="line-352"></a>         XmlContent <font color=Cyan>(</font>a<font color=Cyan>,</font>b<font color=Cyan>,</font>c<font color=Cyan>,</font>d<font color=Cyan>,</font>e<font color=Cyan>,</font>f<font color=Cyan>,</font>g<font color=Cyan>)</font> <font color=Green><u>where</u></font>-<a name="line-353"></a>    toContents <font color=Cyan>(</font>a<font color=Cyan>,</font>b<font color=Cyan>,</font>c<font color=Cyan>,</font>d<font color=Cyan>,</font>e<font color=Cyan>,</font>f<font color=Cyan>,</font>g<font color=Cyan>)</font>-<a name="line-354"></a>        <font color=Red>=</font> toContents a <font color=Cyan>++</font> toContents b <font color=Cyan>++</font> toContents c <font color=Cyan>++</font> toContents d-<a name="line-355"></a>          <font color=Cyan>++</font> toContents e <font color=Cyan>++</font> toContents f <font color=Cyan>++</font> toContents g-<a name="line-356"></a>    parseContents <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-357"></a>        <font color=Cyan>{</font> a <font color=Red>&lt;-</font> parseContents-<a name="line-358"></a>        <font color=Cyan>;</font> b <font color=Red>&lt;-</font> parseContents-<a name="line-359"></a>        <font color=Cyan>;</font> c <font color=Red>&lt;-</font> parseContents-<a name="line-360"></a>        <font color=Cyan>;</font> d <font color=Red>&lt;-</font> parseContents-<a name="line-361"></a>        <font color=Cyan>;</font> e <font color=Red>&lt;-</font> parseContents-<a name="line-362"></a>        <font color=Cyan>;</font> f <font color=Red>&lt;-</font> parseContents-<a name="line-363"></a>        <font color=Cyan>;</font> g <font color=Red>&lt;-</font> parseContents-<a name="line-364"></a>        <font color=Cyan>;</font> return <font color=Cyan>(</font>a<font color=Cyan>,</font>b<font color=Cyan>,</font>c<font color=Cyan>,</font>d<font color=Cyan>,</font>e<font color=Cyan>,</font>f<font color=Cyan>,</font>g<font color=Cyan>)</font>-<a name="line-365"></a>        <font color=Cyan>}</font>-<a name="line-366"></a>-<a name="line-367"></a><font color=Green><u>instance</u></font> <font color=Cyan>(</font> XmlContent a<font color=Cyan>,</font> XmlContent b<font color=Cyan>,</font> XmlContent c<font color=Cyan>,</font> XmlContent d-<a name="line-368"></a>         <font color=Cyan>,</font> XmlContent e<font color=Cyan>,</font> XmlContent f<font color=Cyan>,</font> XmlContent g<font color=Cyan>,</font> XmlContent h <font color=Cyan>)</font> <font color=Red>=&gt;</font>-<a name="line-369"></a>         XmlContent <font color=Cyan>(</font>a<font color=Cyan>,</font>b<font color=Cyan>,</font>c<font color=Cyan>,</font>d<font color=Cyan>,</font>e<font color=Cyan>,</font>f<font color=Cyan>,</font>g<font color=Cyan>,</font>h<font color=Cyan>)</font> <font color=Green><u>where</u></font>-<a name="line-370"></a>    toContents <font color=Cyan>(</font>a<font color=Cyan>,</font>b<font color=Cyan>,</font>c<font color=Cyan>,</font>d<font color=Cyan>,</font>e<font color=Cyan>,</font>f<font color=Cyan>,</font>g<font color=Cyan>,</font>h<font color=Cyan>)</font>-<a name="line-371"></a>        <font color=Red>=</font> toContents a <font color=Cyan>++</font> toContents b <font color=Cyan>++</font> toContents c <font color=Cyan>++</font> toContents d-<a name="line-372"></a>          <font color=Cyan>++</font> toContents e <font color=Cyan>++</font> toContents f <font color=Cyan>++</font> toContents g <font color=Cyan>++</font> toContents h-<a name="line-373"></a>    parseContents <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-374"></a>        <font color=Cyan>{</font> a <font color=Red>&lt;-</font> parseContents-<a name="line-375"></a>        <font color=Cyan>;</font> b <font color=Red>&lt;-</font> parseContents-<a name="line-376"></a>        <font color=Cyan>;</font> c <font color=Red>&lt;-</font> parseContents-<a name="line-377"></a>        <font color=Cyan>;</font> d <font color=Red>&lt;-</font> parseContents-<a name="line-378"></a>        <font color=Cyan>;</font> e <font color=Red>&lt;-</font> parseContents-<a name="line-379"></a>        <font color=Cyan>;</font> f <font color=Red>&lt;-</font> parseContents-<a name="line-380"></a>        <font color=Cyan>;</font> g <font color=Red>&lt;-</font> parseContents-<a name="line-381"></a>        <font color=Cyan>;</font> h <font color=Red>&lt;-</font> parseContents-<a name="line-382"></a>        <font color=Cyan>;</font> return <font color=Cyan>(</font>a<font color=Cyan>,</font>b<font color=Cyan>,</font>c<font color=Cyan>,</font>d<font color=Cyan>,</font>e<font color=Cyan>,</font>f<font color=Cyan>,</font>g<font color=Cyan>,</font>h<font color=Cyan>)</font>-<a name="line-383"></a>        <font color=Cyan>}</font>-<a name="line-384"></a>-<a name="line-385"></a><font color=Green><u>instance</u></font> <font color=Cyan>(</font> XmlContent a<font color=Cyan>,</font> XmlContent b<font color=Cyan>,</font> XmlContent c<font color=Cyan>,</font> XmlContent d-<a name="line-386"></a>         <font color=Cyan>,</font> XmlContent e<font color=Cyan>,</font> XmlContent f<font color=Cyan>,</font> XmlContent g<font color=Cyan>,</font> XmlContent h-<a name="line-387"></a>         <font color=Cyan>,</font> XmlContent i <font color=Cyan>)</font> <font color=Red>=&gt;</font>-<a name="line-388"></a>         XmlContent <font color=Cyan>(</font>a<font color=Cyan>,</font>b<font color=Cyan>,</font>c<font color=Cyan>,</font>d<font color=Cyan>,</font>e<font color=Cyan>,</font>f<font color=Cyan>,</font>g<font color=Cyan>,</font>h<font color=Cyan>,</font>i<font color=Cyan>)</font> <font color=Green><u>where</u></font>-<a name="line-389"></a>    toContents <font color=Cyan>(</font>a<font color=Cyan>,</font>b<font color=Cyan>,</font>c<font color=Cyan>,</font>d<font color=Cyan>,</font>e<font color=Cyan>,</font>f<font color=Cyan>,</font>g<font color=Cyan>,</font>h<font color=Cyan>,</font>i<font color=Cyan>)</font>-<a name="line-390"></a>        <font color=Red>=</font> toContents a <font color=Cyan>++</font> toContents b <font color=Cyan>++</font> toContents c <font color=Cyan>++</font> toContents d-<a name="line-391"></a>          <font color=Cyan>++</font> toContents e <font color=Cyan>++</font> toContents f <font color=Cyan>++</font> toContents g <font color=Cyan>++</font> toContents h-<a name="line-392"></a>          <font color=Cyan>++</font> toContents i-<a name="line-393"></a>    parseContents <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-394"></a>        <font color=Cyan>{</font> a <font color=Red>&lt;-</font> parseContents-<a name="line-395"></a>        <font color=Cyan>;</font> b <font color=Red>&lt;-</font> parseContents-<a name="line-396"></a>        <font color=Cyan>;</font> c <font color=Red>&lt;-</font> parseContents-<a name="line-397"></a>        <font color=Cyan>;</font> d <font color=Red>&lt;-</font> parseContents-<a name="line-398"></a>        <font color=Cyan>;</font> e <font color=Red>&lt;-</font> parseContents-<a name="line-399"></a>        <font color=Cyan>;</font> f <font color=Red>&lt;-</font> parseContents-<a name="line-400"></a>        <font color=Cyan>;</font> g <font color=Red>&lt;-</font> parseContents-<a name="line-401"></a>        <font color=Cyan>;</font> h <font color=Red>&lt;-</font> parseContents-<a name="line-402"></a>        <font color=Cyan>;</font> i <font color=Red>&lt;-</font> parseContents-<a name="line-403"></a>        <font color=Cyan>;</font> return <font color=Cyan>(</font>a<font color=Cyan>,</font>b<font color=Cyan>,</font>c<font color=Cyan>,</font>d<font color=Cyan>,</font>e<font color=Cyan>,</font>f<font color=Cyan>,</font>g<font color=Cyan>,</font>h<font color=Cyan>,</font>i<font color=Cyan>)</font>-<a name="line-404"></a>        <font color=Cyan>}</font>-<a name="line-405"></a>-<a name="line-406"></a><font color=Green><u>instance</u></font> <font color=Cyan>(</font> XmlContent a<font color=Cyan>,</font> XmlContent b<font color=Cyan>,</font> XmlContent c<font color=Cyan>,</font> XmlContent d-<a name="line-407"></a>         <font color=Cyan>,</font> XmlContent e<font color=Cyan>,</font> XmlContent f<font color=Cyan>,</font> XmlContent g<font color=Cyan>,</font> XmlContent h-<a name="line-408"></a>         <font color=Cyan>,</font> XmlContent i<font color=Cyan>,</font> XmlContent j <font color=Cyan>)</font> <font color=Red>=&gt;</font>-<a name="line-409"></a>         XmlContent <font color=Cyan>(</font>a<font color=Cyan>,</font>b<font color=Cyan>,</font>c<font color=Cyan>,</font>d<font color=Cyan>,</font>e<font color=Cyan>,</font>f<font color=Cyan>,</font>g<font color=Cyan>,</font>h<font color=Cyan>,</font>i<font color=Cyan>,</font>j<font color=Cyan>)</font> <font color=Green><u>where</u></font>-<a name="line-410"></a>    toContents <font color=Cyan>(</font>a<font color=Cyan>,</font>b<font color=Cyan>,</font>c<font color=Cyan>,</font>d<font color=Cyan>,</font>e<font color=Cyan>,</font>f<font color=Cyan>,</font>g<font color=Cyan>,</font>h<font color=Cyan>,</font>i<font color=Cyan>,</font>j<font color=Cyan>)</font>-<a name="line-411"></a>        <font color=Red>=</font> toContents a <font color=Cyan>++</font> toContents b <font color=Cyan>++</font> toContents c <font color=Cyan>++</font> toContents d-<a name="line-412"></a>          <font color=Cyan>++</font> toContents e <font color=Cyan>++</font> toContents f <font color=Cyan>++</font> toContents g <font color=Cyan>++</font> toContents h-<a name="line-413"></a>          <font color=Cyan>++</font> toContents i <font color=Cyan>++</font> toContents j-<a name="line-414"></a>    parseContents <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-415"></a>        <font color=Cyan>{</font> a <font color=Red>&lt;-</font> parseContents-<a name="line-416"></a>        <font color=Cyan>;</font> b <font color=Red>&lt;-</font> parseContents-<a name="line-417"></a>        <font color=Cyan>;</font> c <font color=Red>&lt;-</font> parseContents-<a name="line-418"></a>        <font color=Cyan>;</font> d <font color=Red>&lt;-</font> parseContents-<a name="line-419"></a>        <font color=Cyan>;</font> e <font color=Red>&lt;-</font> parseContents-<a name="line-420"></a>        <font color=Cyan>;</font> f <font color=Red>&lt;-</font> parseContents-<a name="line-421"></a>        <font color=Cyan>;</font> g <font color=Red>&lt;-</font> parseContents-<a name="line-422"></a>        <font color=Cyan>;</font> h <font color=Red>&lt;-</font> parseContents-<a name="line-423"></a>        <font color=Cyan>;</font> i <font color=Red>&lt;-</font> parseContents-<a name="line-424"></a>        <font color=Cyan>;</font> j <font color=Red>&lt;-</font> parseContents-<a name="line-425"></a>        <font color=Cyan>;</font> return <font color=Cyan>(</font>a<font color=Cyan>,</font>b<font color=Cyan>,</font>c<font color=Cyan>,</font>d<font color=Cyan>,</font>e<font color=Cyan>,</font>f<font color=Cyan>,</font>g<font color=Cyan>,</font>h<font color=Cyan>,</font>i<font color=Cyan>,</font>j<font color=Cyan>)</font>-<a name="line-426"></a>        <font color=Cyan>}</font>-<a name="line-427"></a>-<a name="line-428"></a><font color=Green><u>instance</u></font> <font color=Cyan>(</font> XmlContent a<font color=Cyan>,</font> XmlContent b<font color=Cyan>,</font> XmlContent c<font color=Cyan>,</font> XmlContent d-<a name="line-429"></a>         <font color=Cyan>,</font> XmlContent e<font color=Cyan>,</font> XmlContent f<font color=Cyan>,</font> XmlContent g<font color=Cyan>,</font> XmlContent h-<a name="line-430"></a>         <font color=Cyan>,</font> XmlContent i<font color=Cyan>,</font> XmlContent j<font color=Cyan>,</font> XmlContent k <font color=Cyan>)</font> <font color=Red>=&gt;</font>-<a name="line-431"></a>         XmlContent <font color=Cyan>(</font>a<font color=Cyan>,</font>b<font color=Cyan>,</font>c<font color=Cyan>,</font>d<font color=Cyan>,</font>e<font color=Cyan>,</font>f<font color=Cyan>,</font>g<font color=Cyan>,</font>h<font color=Cyan>,</font>i<font color=Cyan>,</font>j<font color=Cyan>,</font>k<font color=Cyan>)</font> <font color=Green><u>where</u></font>-<a name="line-432"></a>    toContents <font color=Cyan>(</font>a<font color=Cyan>,</font>b<font color=Cyan>,</font>c<font color=Cyan>,</font>d<font color=Cyan>,</font>e<font color=Cyan>,</font>f<font color=Cyan>,</font>g<font color=Cyan>,</font>h<font color=Cyan>,</font>i<font color=Cyan>,</font>j<font color=Cyan>,</font>k<font color=Cyan>)</font>-<a name="line-433"></a>        <font color=Red>=</font> toContents a <font color=Cyan>++</font> toContents b <font color=Cyan>++</font> toContents c <font color=Cyan>++</font> toContents d-<a name="line-434"></a>          <font color=Cyan>++</font> toContents e <font color=Cyan>++</font> toContents f <font color=Cyan>++</font> toContents g <font color=Cyan>++</font> toContents h-<a name="line-435"></a>          <font color=Cyan>++</font> toContents i <font color=Cyan>++</font> toContents j <font color=Cyan>++</font> toContents k-<a name="line-436"></a>    parseContents <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-437"></a>        <font color=Cyan>{</font> a <font color=Red>&lt;-</font> parseContents-<a name="line-438"></a>        <font color=Cyan>;</font> b <font color=Red>&lt;-</font> parseContents-<a name="line-439"></a>        <font color=Cyan>;</font> c <font color=Red>&lt;-</font> parseContents-<a name="line-440"></a>        <font color=Cyan>;</font> d <font color=Red>&lt;-</font> parseContents-<a name="line-441"></a>        <font color=Cyan>;</font> e <font color=Red>&lt;-</font> parseContents-<a name="line-442"></a>        <font color=Cyan>;</font> f <font color=Red>&lt;-</font> parseContents-<a name="line-443"></a>        <font color=Cyan>;</font> g <font color=Red>&lt;-</font> parseContents-<a name="line-444"></a>        <font color=Cyan>;</font> h <font color=Red>&lt;-</font> parseContents-<a name="line-445"></a>        <font color=Cyan>;</font> i <font color=Red>&lt;-</font> parseContents-<a name="line-446"></a>        <font color=Cyan>;</font> j <font color=Red>&lt;-</font> parseContents-<a name="line-447"></a>        <font color=Cyan>;</font> k <font color=Red>&lt;-</font> parseContents-<a name="line-448"></a>        <font color=Cyan>;</font> return <font color=Cyan>(</font>a<font color=Cyan>,</font>b<font color=Cyan>,</font>c<font color=Cyan>,</font>d<font color=Cyan>,</font>e<font color=Cyan>,</font>f<font color=Cyan>,</font>g<font color=Cyan>,</font>h<font color=Cyan>,</font>i<font color=Cyan>,</font>j<font color=Cyan>,</font>k<font color=Cyan>)</font>-<a name="line-449"></a>        <font color=Cyan>}</font>-<a name="line-450"></a>-<a name="line-451"></a><font color=Green><u>instance</u></font> <font color=Cyan>(</font> XmlContent a<font color=Cyan>,</font> XmlContent b<font color=Cyan>,</font> XmlContent c<font color=Cyan>,</font> XmlContent d-<a name="line-452"></a>         <font color=Cyan>,</font> XmlContent e<font color=Cyan>,</font> XmlContent f<font color=Cyan>,</font> XmlContent g<font color=Cyan>,</font> XmlContent h-<a name="line-453"></a>         <font color=Cyan>,</font> XmlContent i<font color=Cyan>,</font> XmlContent j<font color=Cyan>,</font> XmlContent k<font color=Cyan>,</font> XmlContent l <font color=Cyan>)</font> <font color=Red>=&gt;</font>-<a name="line-454"></a>         XmlContent <font color=Cyan>(</font>a<font color=Cyan>,</font>b<font color=Cyan>,</font>c<font color=Cyan>,</font>d<font color=Cyan>,</font>e<font color=Cyan>,</font>f<font color=Cyan>,</font>g<font color=Cyan>,</font>h<font color=Cyan>,</font>i<font color=Cyan>,</font>j<font color=Cyan>,</font>k<font color=Cyan>,</font>l<font color=Cyan>)</font> <font color=Green><u>where</u></font>-<a name="line-455"></a>    toContents <font color=Cyan>(</font>a<font color=Cyan>,</font>b<font color=Cyan>,</font>c<font color=Cyan>,</font>d<font color=Cyan>,</font>e<font color=Cyan>,</font>f<font color=Cyan>,</font>g<font color=Cyan>,</font>h<font color=Cyan>,</font>i<font color=Cyan>,</font>j<font color=Cyan>,</font>k<font color=Cyan>,</font>l<font color=Cyan>)</font>-<a name="line-456"></a>        <font color=Red>=</font> toContents a <font color=Cyan>++</font> toContents b <font color=Cyan>++</font> toContents c <font color=Cyan>++</font> toContents d-<a name="line-457"></a>          <font color=Cyan>++</font> toContents e <font color=Cyan>++</font> toContents f <font color=Cyan>++</font> toContents g <font color=Cyan>++</font> toContents h-<a name="line-458"></a>          <font color=Cyan>++</font> toContents i <font color=Cyan>++</font> toContents j <font color=Cyan>++</font> toContents k <font color=Cyan>++</font> toContents l-<a name="line-459"></a>    parseContents <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-460"></a>        <font color=Cyan>{</font> a <font color=Red>&lt;-</font> parseContents-<a name="line-461"></a>        <font color=Cyan>;</font> b <font color=Red>&lt;-</font> parseContents-<a name="line-462"></a>        <font color=Cyan>;</font> c <font color=Red>&lt;-</font> parseContents-<a name="line-463"></a>        <font color=Cyan>;</font> d <font color=Red>&lt;-</font> parseContents-<a name="line-464"></a>        <font color=Cyan>;</font> e <font color=Red>&lt;-</font> parseContents-<a name="line-465"></a>        <font color=Cyan>;</font> f <font color=Red>&lt;-</font> parseContents-<a name="line-466"></a>        <font color=Cyan>;</font> g <font color=Red>&lt;-</font> parseContents-<a name="line-467"></a>        <font color=Cyan>;</font> h <font color=Red>&lt;-</font> parseContents-<a name="line-468"></a>        <font color=Cyan>;</font> i <font color=Red>&lt;-</font> parseContents-<a name="line-469"></a>        <font color=Cyan>;</font> j <font color=Red>&lt;-</font> parseContents-<a name="line-470"></a>        <font color=Cyan>;</font> k <font color=Red>&lt;-</font> parseContents-<a name="line-471"></a>        <font color=Cyan>;</font> l <font color=Red>&lt;-</font> parseContents-<a name="line-472"></a>        <font color=Cyan>;</font> return <font color=Cyan>(</font>a<font color=Cyan>,</font>b<font color=Cyan>,</font>c<font color=Cyan>,</font>d<font color=Cyan>,</font>e<font color=Cyan>,</font>f<font color=Cyan>,</font>g<font color=Cyan>,</font>h<font color=Cyan>,</font>i<font color=Cyan>,</font>j<font color=Cyan>,</font>k<font color=Cyan>,</font>l<font color=Cyan>)</font>-<a name="line-473"></a>        <font color=Cyan>}</font>-<a name="line-474"></a>-<a name="line-475"></a><font color=Green><u>instance</u></font> <font color=Cyan>(</font> XmlContent a<font color=Cyan>,</font> XmlContent b<font color=Cyan>,</font> XmlContent c<font color=Cyan>,</font> XmlContent d-<a name="line-476"></a>         <font color=Cyan>,</font> XmlContent e<font color=Cyan>,</font> XmlContent f<font color=Cyan>,</font> XmlContent g<font color=Cyan>,</font> XmlContent h-<a name="line-477"></a>         <font color=Cyan>,</font> XmlContent i<font color=Cyan>,</font> XmlContent j<font color=Cyan>,</font> XmlContent k<font color=Cyan>,</font> XmlContent l-<a name="line-478"></a>         <font color=Cyan>,</font> XmlContent m <font color=Cyan>)</font> <font color=Red>=&gt;</font>-<a name="line-479"></a>         XmlContent <font color=Cyan>(</font>a<font color=Cyan>,</font>b<font color=Cyan>,</font>c<font color=Cyan>,</font>d<font color=Cyan>,</font>e<font color=Cyan>,</font>f<font color=Cyan>,</font>g<font color=Cyan>,</font>h<font color=Cyan>,</font>i<font color=Cyan>,</font>j<font color=Cyan>,</font>k<font color=Cyan>,</font>l<font color=Cyan>,</font>m<font color=Cyan>)</font> <font color=Green><u>where</u></font>-<a name="line-480"></a>    toContents <font color=Cyan>(</font>a<font color=Cyan>,</font>b<font color=Cyan>,</font>c<font color=Cyan>,</font>d<font color=Cyan>,</font>e<font color=Cyan>,</font>f<font color=Cyan>,</font>g<font color=Cyan>,</font>h<font color=Cyan>,</font>i<font color=Cyan>,</font>j<font color=Cyan>,</font>k<font color=Cyan>,</font>l<font color=Cyan>,</font>m<font color=Cyan>)</font>-<a name="line-481"></a>        <font color=Red>=</font> toContents a <font color=Cyan>++</font> toContents b <font color=Cyan>++</font> toContents c <font color=Cyan>++</font> toContents d-<a name="line-482"></a>          <font color=Cyan>++</font> toContents e <font color=Cyan>++</font> toContents f <font color=Cyan>++</font> toContents g <font color=Cyan>++</font> toContents h-<a name="line-483"></a>          <font color=Cyan>++</font> toContents i <font color=Cyan>++</font> toContents j <font color=Cyan>++</font> toContents k <font color=Cyan>++</font> toContents l-<a name="line-484"></a>          <font color=Cyan>++</font> toContents m-<a name="line-485"></a>    parseContents <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-486"></a>        <font color=Cyan>{</font> a <font color=Red>&lt;-</font> parseContents-<a name="line-487"></a>        <font color=Cyan>;</font> b <font color=Red>&lt;-</font> parseContents-<a name="line-488"></a>        <font color=Cyan>;</font> c <font color=Red>&lt;-</font> parseContents-<a name="line-489"></a>        <font color=Cyan>;</font> d <font color=Red>&lt;-</font> parseContents-<a name="line-490"></a>        <font color=Cyan>;</font> e <font color=Red>&lt;-</font> parseContents-<a name="line-491"></a>        <font color=Cyan>;</font> f <font color=Red>&lt;-</font> parseContents-<a name="line-492"></a>        <font color=Cyan>;</font> g <font color=Red>&lt;-</font> parseContents-<a name="line-493"></a>        <font color=Cyan>;</font> h <font color=Red>&lt;-</font> parseContents-<a name="line-494"></a>        <font color=Cyan>;</font> i <font color=Red>&lt;-</font> parseContents-<a name="line-495"></a>        <font color=Cyan>;</font> j <font color=Red>&lt;-</font> parseContents-<a name="line-496"></a>        <font color=Cyan>;</font> k <font color=Red>&lt;-</font> parseContents-<a name="line-497"></a>        <font color=Cyan>;</font> l <font color=Red>&lt;-</font> parseContents-<a name="line-498"></a>        <font color=Cyan>;</font> m <font color=Red>&lt;-</font> parseContents-<a name="line-499"></a>        <font color=Cyan>;</font> return <font color=Cyan>(</font>a<font color=Cyan>,</font>b<font color=Cyan>,</font>c<font color=Cyan>,</font>d<font color=Cyan>,</font>e<font color=Cyan>,</font>f<font color=Cyan>,</font>g<font color=Cyan>,</font>h<font color=Cyan>,</font>i<font color=Cyan>,</font>j<font color=Cyan>,</font>k<font color=Cyan>,</font>l<font color=Cyan>,</font>m<font color=Cyan>)</font>-<a name="line-500"></a>        <font color=Cyan>}</font>-<a name="line-501"></a>-<a name="line-502"></a><font color=Green><u>instance</u></font> <font color=Cyan>(</font> XmlContent a<font color=Cyan>,</font> XmlContent b<font color=Cyan>,</font> XmlContent c<font color=Cyan>,</font> XmlContent d-<a name="line-503"></a>         <font color=Cyan>,</font> XmlContent e<font color=Cyan>,</font> XmlContent f<font color=Cyan>,</font> XmlContent g<font color=Cyan>,</font> XmlContent h-<a name="line-504"></a>         <font color=Cyan>,</font> XmlContent i<font color=Cyan>,</font> XmlContent j<font color=Cyan>,</font> XmlContent k<font color=Cyan>,</font> XmlContent l-<a name="line-505"></a>         <font color=Cyan>,</font> XmlContent m<font color=Cyan>,</font> XmlContent n <font color=Cyan>)</font> <font color=Red>=&gt;</font>-<a name="line-506"></a>         XmlContent <font color=Cyan>(</font>a<font color=Cyan>,</font>b<font color=Cyan>,</font>c<font color=Cyan>,</font>d<font color=Cyan>,</font>e<font color=Cyan>,</font>f<font color=Cyan>,</font>g<font color=Cyan>,</font>h<font color=Cyan>,</font>i<font color=Cyan>,</font>j<font color=Cyan>,</font>k<font color=Cyan>,</font>l<font color=Cyan>,</font>m<font color=Cyan>,</font>n<font color=Cyan>)</font> <font color=Green><u>where</u></font>-<a name="line-507"></a>    toContents <font color=Cyan>(</font>a<font color=Cyan>,</font>b<font color=Cyan>,</font>c<font color=Cyan>,</font>d<font color=Cyan>,</font>e<font color=Cyan>,</font>f<font color=Cyan>,</font>g<font color=Cyan>,</font>h<font color=Cyan>,</font>i<font color=Cyan>,</font>j<font color=Cyan>,</font>k<font color=Cyan>,</font>l<font color=Cyan>,</font>m<font color=Cyan>,</font>n<font color=Cyan>)</font>-<a name="line-508"></a>        <font color=Red>=</font> toContents a <font color=Cyan>++</font> toContents b <font color=Cyan>++</font> toContents c <font color=Cyan>++</font> toContents d-<a name="line-509"></a>          <font color=Cyan>++</font> toContents e <font color=Cyan>++</font> toContents f <font color=Cyan>++</font> toContents g <font color=Cyan>++</font> toContents h-<a name="line-510"></a>          <font color=Cyan>++</font> toContents i <font color=Cyan>++</font> toContents j <font color=Cyan>++</font> toContents k <font color=Cyan>++</font> toContents l-<a name="line-511"></a>          <font color=Cyan>++</font> toContents m <font color=Cyan>++</font> toContents n-<a name="line-512"></a>    parseContents <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-513"></a>        <font color=Cyan>{</font> a <font color=Red>&lt;-</font> parseContents-<a name="line-514"></a>        <font color=Cyan>;</font> b <font color=Red>&lt;-</font> parseContents-<a name="line-515"></a>        <font color=Cyan>;</font> c <font color=Red>&lt;-</font> parseContents-<a name="line-516"></a>        <font color=Cyan>;</font> d <font color=Red>&lt;-</font> parseContents-<a name="line-517"></a>        <font color=Cyan>;</font> e <font color=Red>&lt;-</font> parseContents-<a name="line-518"></a>        <font color=Cyan>;</font> f <font color=Red>&lt;-</font> parseContents-<a name="line-519"></a>        <font color=Cyan>;</font> g <font color=Red>&lt;-</font> parseContents-<a name="line-520"></a>        <font color=Cyan>;</font> h <font color=Red>&lt;-</font> parseContents-<a name="line-521"></a>        <font color=Cyan>;</font> i <font color=Red>&lt;-</font> parseContents-<a name="line-522"></a>        <font color=Cyan>;</font> j <font color=Red>&lt;-</font> parseContents-<a name="line-523"></a>        <font color=Cyan>;</font> k <font color=Red>&lt;-</font> parseContents-<a name="line-524"></a>        <font color=Cyan>;</font> l <font color=Red>&lt;-</font> parseContents-<a name="line-525"></a>        <font color=Cyan>;</font> m <font color=Red>&lt;-</font> parseContents-<a name="line-526"></a>        <font color=Cyan>;</font> n <font color=Red>&lt;-</font> parseContents-<a name="line-527"></a>        <font color=Cyan>;</font> return <font color=Cyan>(</font>a<font color=Cyan>,</font>b<font color=Cyan>,</font>c<font color=Cyan>,</font>d<font color=Cyan>,</font>e<font color=Cyan>,</font>f<font color=Cyan>,</font>g<font color=Cyan>,</font>h<font color=Cyan>,</font>i<font color=Cyan>,</font>j<font color=Cyan>,</font>k<font color=Cyan>,</font>l<font color=Cyan>,</font>m<font color=Cyan>,</font>n<font color=Cyan>)</font>-<a name="line-528"></a>        <font color=Cyan>}</font>-<a name="line-529"></a>-<a name="line-530"></a><font color=Green><u>instance</u></font> <font color=Cyan>(</font> XmlContent a<font color=Cyan>,</font> XmlContent b<font color=Cyan>,</font> XmlContent c<font color=Cyan>,</font> XmlContent d-<a name="line-531"></a>         <font color=Cyan>,</font> XmlContent e<font color=Cyan>,</font> XmlContent f<font color=Cyan>,</font> XmlContent g<font color=Cyan>,</font> XmlContent h-<a name="line-532"></a>         <font color=Cyan>,</font> XmlContent i<font color=Cyan>,</font> XmlContent j<font color=Cyan>,</font> XmlContent k<font color=Cyan>,</font> XmlContent l-<a name="line-533"></a>         <font color=Cyan>,</font> XmlContent m<font color=Cyan>,</font> XmlContent n<font color=Cyan>,</font> XmlContent o <font color=Cyan>)</font> <font color=Red>=&gt;</font>-<a name="line-534"></a>         XmlContent <font color=Cyan>(</font>a<font color=Cyan>,</font>b<font color=Cyan>,</font>c<font color=Cyan>,</font>d<font color=Cyan>,</font>e<font color=Cyan>,</font>f<font color=Cyan>,</font>g<font color=Cyan>,</font>h<font color=Cyan>,</font>i<font color=Cyan>,</font>j<font color=Cyan>,</font>k<font color=Cyan>,</font>l<font color=Cyan>,</font>m<font color=Cyan>,</font>n<font color=Cyan>,</font>o<font color=Cyan>)</font> <font color=Green><u>where</u></font>-<a name="line-535"></a>    toContents <font color=Cyan>(</font>a<font color=Cyan>,</font>b<font color=Cyan>,</font>c<font color=Cyan>,</font>d<font color=Cyan>,</font>e<font color=Cyan>,</font>f<font color=Cyan>,</font>g<font color=Cyan>,</font>h<font color=Cyan>,</font>i<font color=Cyan>,</font>j<font color=Cyan>,</font>k<font color=Cyan>,</font>l<font color=Cyan>,</font>m<font color=Cyan>,</font>n<font color=Cyan>,</font>o<font color=Cyan>)</font>-<a name="line-536"></a>        <font color=Red>=</font> toContents a <font color=Cyan>++</font> toContents b <font color=Cyan>++</font> toContents c <font color=Cyan>++</font> toContents d-<a name="line-537"></a>          <font color=Cyan>++</font> toContents e <font color=Cyan>++</font> toContents f <font color=Cyan>++</font> toContents g <font color=Cyan>++</font> toContents h-<a name="line-538"></a>          <font color=Cyan>++</font> toContents i <font color=Cyan>++</font> toContents j <font color=Cyan>++</font> toContents k <font color=Cyan>++</font> toContents l-<a name="line-539"></a>          <font color=Cyan>++</font> toContents m <font color=Cyan>++</font> toContents n <font color=Cyan>++</font> toContents o-<a name="line-540"></a>    parseContents <font color=Red>=</font> <font color=Green><u>do</u></font>-<a name="line-541"></a>        <font color=Cyan>{</font> a <font color=Red>&lt;-</font> parseContents-<a name="line-542"></a>        <font color=Cyan>;</font> b <font color=Red>&lt;-</font> parseContents-<a name="line-543"></a>        <font color=Cyan>;</font> c <font color=Red>&lt;-</font> parseContents-<a name="line-544"></a>        <font color=Cyan>;</font> d <font color=Red>&lt;-</font> parseContents-<a name="line-545"></a>        <font color=Cyan>;</font> e <font color=Red>&lt;-</font> parseContents-<a name="line-546"></a>        <font color=Cyan>;</font> f <font color=Red>&lt;-</font> parseContents-<a name="line-547"></a>        <font color=Cyan>;</font> g <font color=Red>&lt;-</font> parseContents-<a name="line-548"></a>        <font color=Cyan>;</font> h <font color=Red>&lt;-</font> parseContents-<a name="line-549"></a>        <font color=Cyan>;</font> i <font color=Red>&lt;-</font> parseContents-<a name="line-550"></a>        <font color=Cyan>;</font> j <font color=Red>&lt;-</font> parseContents-<a name="line-551"></a>        <font color=Cyan>;</font> k <font color=Red>&lt;-</font> parseContents-<a name="line-552"></a>        <font color=Cyan>;</font> l <font color=Red>&lt;-</font> parseContents-<a name="line-553"></a>        <font color=Cyan>;</font> m <font color=Red>&lt;-</font> parseContents-<a name="line-554"></a>        <font color=Cyan>;</font> n <font color=Red>&lt;-</font> parseContents-<a name="line-555"></a>        <font color=Cyan>;</font> o <font color=Red>&lt;-</font> parseContents-<a name="line-556"></a>        <font color=Cyan>;</font> return <font color=Cyan>(</font>a<font color=Cyan>,</font>b<font color=Cyan>,</font>c<font color=Cyan>,</font>d<font color=Cyan>,</font>e<font color=Cyan>,</font>f<font color=Cyan>,</font>g<font color=Cyan>,</font>h<font color=Cyan>,</font>i<font color=Cyan>,</font>j<font color=Cyan>,</font>k<font color=Cyan>,</font>l<font color=Cyan>,</font>m<font color=Cyan>,</font>n<font color=Cyan>,</font>o<font color=Cyan>)</font>-<a name="line-557"></a>        <font color=Cyan>}</font>-<a name="line-558"></a>-<a name="line-559"></a>-<a name="line-560"></a><font color=Blue>------------------------------------------------------------------------</font>-<a name="line-561"></a><font color=Blue>-- Useful auxiliaries for "fromAttributes"</font>-<a name="line-562"></a><font color=Blue>------------------------------------------------------------------------</font>-<a name="line-563"></a>-<a name="line-564"></a><a name="Defaultable"></a><font color=Blue>-- | If an attribute is defaultable, then it either takes the default</font>-<a name="line-565"></a><a name="Defaultable"></a><font color=Blue>--   value (which is omitted from the output), or a non-default value</font>-<a name="line-566"></a><a name="Defaultable"></a><font color=Blue>--   (which obviously must be printed).</font>-<a name="line-567"></a><a name="Defaultable"></a><font color=Green><u>data</u></font> Defaultable a  <font color=Red>=</font> Default a    <font color=Red>|</font> NonDefault a    <font color=Green><u>deriving</u></font> <font color=Cyan>(</font>Eq<font color=Cyan>,</font>Show<font color=Cyan>)</font>-<a name="line-568"></a>-<a name="line-569"></a><a name="searchMaybe"></a><font color=Blue>searchMaybe</font> <font color=Red>::</font> <font color=Cyan>(</font>a <font color=Red>-&gt;</font> Maybe b<font color=Cyan>)</font> <font color=Red>-&gt;</font> <font color=Red>[</font>a<font color=Red>]</font> <font color=Red>-&gt;</font> Maybe b-<a name="line-570"></a><font color=Blue>searchMaybe</font> <font color=Green><u>_</u></font> [] <font color=Red>=</font> Nothing-<a name="line-571"></a><font color=Blue>searchMaybe</font> f <font color=Cyan>(</font>x<font color=Red><b>:</b></font>xs<font color=Cyan>)</font> <font color=Red>=</font>-<a name="line-572"></a>    <font color=Green><u>let</u></font> fx <font color=Red>=</font> f x <font color=Green><u>in</u></font>-<a name="line-573"></a>    <font color=Green><u>case</u></font> fx <font color=Green><u>of</u></font>-<a name="line-574"></a>      Nothing  <font color=Red>-&gt;</font> searchMaybe f xs-<a name="line-575"></a>      <font color=Cyan>(</font>Just <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red>-&gt;</font> fx-<a name="line-576"></a>-<a name="line-577"></a><a name="maybeToAttr"></a><font color=Blue>maybeToAttr</font> <font color=Red>::</font> <font color=Cyan>(</font>String<font color=Red>-&gt;</font>a<font color=Red>-&gt;</font>Maybe Attribute<font color=Cyan>)</font> <font color=Red>-&gt;</font> String <font color=Red>-&gt;</font> Maybe a-<a name="line-578"></a>               <font color=Red>-&gt;</font> Maybe Attribute-<a name="line-579"></a><font color=Blue>maybeToAttr</font> <font color=Green><u>_</u></font> <font color=Green><u>_</u></font> Nothing  <font color=Red>=</font> Nothing-<a name="line-580"></a><font color=Blue>maybeToAttr</font> to n <font color=Cyan>(</font>Just v<font color=Cyan>)</font> <font color=Red>=</font> to n v-<a name="line-581"></a>-<a name="line-582"></a><a name="defaultToAttr"></a><font color=Blue>defaultToAttr</font> <font color=Red>::</font> <font color=Cyan>(</font>String<font color=Red>-&gt;</font>a<font color=Red>-&gt;</font>Maybe Attribute<font color=Cyan>)</font> <font color=Red>-&gt;</font> String <font color=Red>-&gt;</font> Defaultable a-<a name="line-583"></a>                 <font color=Red>-&gt;</font> Maybe Attribute-<a name="line-584"></a><font color=Blue>defaultToAttr</font> <font color=Green><u>_</u></font> <font color=Green><u>_</u></font> <font color=Cyan>(</font>Default <font color=Green><u>_</u></font><font color=Cyan>)</font>  <font color=Red>=</font> Nothing-<a name="line-585"></a><font color=Blue>defaultToAttr</font> to n <font color=Cyan>(</font>NonDefault v<font color=Cyan>)</font> <font color=Red>=</font> to n v-<a name="line-586"></a>-<a name="line-587"></a><a name="definiteA"></a><font color=Blue>definiteA</font> <font color=Red>::</font> <font color=Cyan>(</font>String<font color=Red>-&gt;</font>Attribute<font color=Red>-&gt;</font>Maybe a<font color=Cyan>)</font> <font color=Red>-&gt;</font> String <font color=Red>-&gt;</font> String-<a name="line-588"></a>             <font color=Red>-&gt;</font> <font color=Red>[</font>Attribute<font color=Red>]</font> <font color=Red>-&gt;</font> a-<a name="line-589"></a><font color=Blue>definiteA</font> from tag at <font color=Green><u>as</u></font> <font color=Red>=</font>-<a name="line-590"></a>    <font color=Green><u>case</u></font> searchMaybe <font color=Cyan>(</font>from at<font color=Cyan>)</font> <font color=Green><u>as</u></font> <font color=Green><u>of</u></font>-<a name="line-591"></a>      Nothing  <font color=Red>-&gt;</font> error <font color=Cyan>(</font><font color=Magenta>"missing attribute "</font><font color=Cyan>++</font>at<font color=Cyan>++</font><font color=Magenta>" in tag &lt;"</font><font color=Cyan>++</font>tag<font color=Cyan>++</font><font color=Magenta>"&gt;"</font><font color=Cyan>)</font>-<a name="line-592"></a>      <font color=Cyan>(</font>Just a<font color=Cyan>)</font> <font color=Red>-&gt;</font> a-<a name="line-593"></a>-<a name="line-594"></a><a name="defaultA"></a><font color=Blue>defaultA</font> <font color=Red>::</font> <font color=Cyan>(</font>String<font color=Red>-&gt;</font>Attribute<font color=Red>-&gt;</font>Maybe a<font color=Cyan>)</font> <font color=Red>-&gt;</font> a <font color=Red>-&gt;</font> String-<a name="line-595"></a>            <font color=Red>-&gt;</font> <font color=Red>[</font>Attribute<font color=Red>]</font> <font color=Red>-&gt;</font> Defaultable a-<a name="line-596"></a><font color=Blue>defaultA</font> from def at <font color=Green><u>as</u></font> <font color=Red>=</font>-<a name="line-597"></a>    <font color=Green><u>case</u></font> searchMaybe <font color=Cyan>(</font>from at<font color=Cyan>)</font> <font color=Green><u>as</u></font> <font color=Green><u>of</u></font>-<a name="line-598"></a>      Nothing  <font color=Red>-&gt;</font> Default def-<a name="line-599"></a>      <font color=Cyan>(</font>Just a<font color=Cyan>)</font> <font color=Red>-&gt;</font> NonDefault a-<a name="line-600"></a>-<a name="line-601"></a><a name="possibleA"></a><font color=Blue>possibleA</font> <font color=Red>::</font> <font color=Cyan>(</font>String<font color=Red>-&gt;</font>Attribute<font color=Red>-&gt;</font>Maybe a<font color=Cyan>)</font> <font color=Red>-&gt;</font> String <font color=Red>-&gt;</font> <font color=Red>[</font>Attribute<font color=Red>]</font> <font color=Red>-&gt;</font> Maybe a-<a name="line-602"></a><font color=Blue>possibleA</font> from at <font color=Green><u>as</u></font> <font color=Red>=</font> searchMaybe <font color=Cyan>(</font>from at<font color=Cyan>)</font> <font color=Green><u>as</u></font>-<a name="line-603"></a>-<a name="line-604"></a><a name="fromAttrToStr"></a><font color=Blue>fromAttrToStr</font> <font color=Red>::</font> String <font color=Red>-&gt;</font> Attribute <font color=Red>-&gt;</font> Maybe String-<a name="line-605"></a><font color=Blue>fromAttrToStr</font> n <font color=Cyan>(</font>n0<font color=Cyan>,</font>v<font color=Cyan>)</font>-<a name="line-606"></a>        <font color=Red>|</font> n <font color=Cyan>==</font> n0   <font color=Red>=</font> Just <font color=Cyan>(</font>attr2str v<font color=Cyan>)</font>-<a name="line-607"></a>        <font color=Red>|</font> otherwise <font color=Red>=</font> Nothing-<a name="line-608"></a>-<a name="line-609"></a><a name="toAttrFrStr"></a><font color=Blue>toAttrFrStr</font>   <font color=Red>::</font> String <font color=Red>-&gt;</font> String <font color=Red>-&gt;</font> Maybe Attribute-<a name="line-610"></a><font color=Blue>toAttrFrStr</font> n v <font color=Red>=</font> Just <font color=Cyan>(</font>n<font color=Cyan>,</font> str2attr v<font color=Cyan>)</font>-<a name="line-611"></a>-<a name="line-612"></a><a name="str2attr"></a><font color=Blue>str2attr</font> <font color=Red>::</font> String <font color=Red>-&gt;</font> AttValue-<a name="line-613"></a><font color=Blue>str2attr</font> s <font color=Red>=</font>-<a name="line-614"></a>    <font color=Green><u>let</u></font> f t <font color=Red>=</font>-<a name="line-615"></a>          <font color=Green><u>let</u></font> <font color=Cyan>(</font>l<font color=Cyan>,</font>r<font color=Cyan>)</font> <font color=Red>=</font> span <font color=Cyan>(</font><font color=Red>\</font>c<font color=Red>-&gt;</font> not <font color=Cyan>(</font>elem c <font color=Magenta>"\"&amp;&lt;&gt;'"</font><font color=Cyan>)</font><font color=Cyan>)</font> t-<a name="line-616"></a>          <font color=Green><u>in</u></font> <font color=Green><u>if</u></font> null r <font color=Green><u>then</u></font> <font color=Red>[</font>Left l<font color=Red>]</font>-<a name="line-617"></a>             <font color=Green><u>else</u></font> Left l<font color=Red><b>:</b></font> Right <font color=Cyan>(</font>g <font color=Cyan>(</font>head r<font color=Cyan>)</font><font color=Cyan>)</font><font color=Red><b>:</b></font> f <font color=Cyan>(</font>tail r<font color=Cyan>)</font>-<a name="line-618"></a>        g <font color=Magenta>'"'</font>  <font color=Red>=</font> RefEntity <font color=Magenta>"quot"</font>-<a name="line-619"></a>        g <font color=Magenta>'&amp;'</font>  <font color=Red>=</font> RefEntity <font color=Magenta>"amp"</font>-<a name="line-620"></a>        g <font color=Magenta>'&lt;'</font>  <font color=Red>=</font> RefEntity <font color=Magenta>"lt"</font>-<a name="line-621"></a>        g <font color=Magenta>'&gt;'</font>  <font color=Red>=</font> RefEntity <font color=Magenta>"gt"</font>-<a name="line-622"></a>        g <font color=Magenta>'\''</font> <font color=Red>=</font> RefEntity <font color=Magenta>"apos"</font>-<a name="line-623"></a>    <font color=Green><u>in</u></font> AttValue <font color=Cyan>(</font>f s<font color=Cyan>)</font>-<a name="line-624"></a>-<a name="line-625"></a><a name="attr2str"></a><font color=Blue>attr2str</font> <font color=Red>::</font> AttValue <font color=Red>-&gt;</font> String          <font color=Blue>-- really needs symbol table</font>-<a name="line-626"></a><font color=Blue>attr2str</font> <font color=Cyan>(</font>AttValue xs<font color=Cyan>)</font> <font color=Red>=</font>-<a name="line-627"></a>    <font color=Green><u>let</u></font> f <font color=Cyan>(</font>Left s<font color=Cyan>)</font> <font color=Red>=</font> s-<a name="line-628"></a>        f <font color=Cyan>(</font>Right <font color=Cyan>(</font>RefChar i<font color=Cyan>)</font><font color=Cyan>)</font>        <font color=Red>=</font> <font color=Red>[</font>chr i<font color=Red>]</font>-<a name="line-629"></a>        f <font color=Cyan>(</font>Right <font color=Cyan>(</font>RefEntity <font color=Magenta>"quot"</font><font color=Cyan>)</font><font color=Cyan>)</font> <font color=Red>=</font> <font color=Magenta>"\""</font>-<a name="line-630"></a>        f <font color=Cyan>(</font>Right <font color=Cyan>(</font>RefEntity <font color=Magenta>"amp"</font><font color=Cyan>)</font><font color=Cyan>)</font>  <font color=Red>=</font> <font color=Magenta>"&amp;"</font>-<a name="line-631"></a>        f <font color=Cyan>(</font>Right <font color=Cyan>(</font>RefEntity <font color=Magenta>"lt"</font><font color=Cyan>)</font><font color=Cyan>)</font>   <font color=Red>=</font> <font color=Magenta>"&lt;"</font>-<a name="line-632"></a>        f <font color=Cyan>(</font>Right <font color=Cyan>(</font>RefEntity <font color=Magenta>"gt"</font><font color=Cyan>)</font><font color=Cyan>)</font>   <font color=Red>=</font> <font color=Magenta>"&gt;"</font>-<a name="line-633"></a>        f <font color=Cyan>(</font>Right <font color=Cyan>(</font>RefEntity <font color=Magenta>"apos"</font><font color=Cyan>)</font><font color=Cyan>)</font> <font color=Red>=</font> <font color=Magenta>"'"</font>-<a name="line-634"></a>        f <font color=Cyan>(</font>Right <font color=Green><u>_</u></font><font color=Cyan>)</font>                  <font color=Red>=</font> <font color=Magenta>"*"</font>  <font color=Blue>-- Ooops, ST needed here.</font>-<a name="line-635"></a>    <font color=Green><u>in</u></font> concatMap f xs-<a name="line-636"></a>-<a name="line-637"></a><font color=Blue>------------------------------------------------------------------------</font>-<a name="line-638"></a><font color=Blue>--  New content-model types</font>-<a name="line-639"></a><font color=Blue>------------------------------------------------------------------------</font>-<a name="line-640"></a>-<a name="line-641"></a><font color=Blue>{--<a name="line-642"></a>data OneOf2 a b-<a name="line-643"></a>data OneOf3 a b c-<a name="line-644"></a>data OneOf4 a b c d-<a name="line-645"></a>    ... etc are now defined (with instances) in module OneOfN.-<a name="line-646"></a>-}</font>-<a name="line-647"></a>-<a name="line-648"></a><a name="ANYContent"></a><font color=Blue>-- | A type corresponding to XML's ANY contentspec.</font>-<a name="line-649"></a><a name="ANYContent"></a><font color=Blue>--   It is either a list of unconverted xml 'Content'</font>-<a name="line-650"></a><a name="ANYContent"></a><font color=Blue>--   or some 'XmlContent'-able value.</font>-<a name="line-651"></a><a name="ANYContent"></a><font color=Blue>--</font>-<a name="line-652"></a><a name="ANYContent"></a><font color=Blue>-- Parsing functions (e.g. 'parseContents') will always produce 'UnConverted'.</font>-<a name="line-653"></a><a name="ANYContent"></a><font color=Blue>-- Note: The Show instance for 'UnConverted' uses 'verbatim'.</font>-<a name="line-654"></a><a name="ANYContent"></a><font color=Green><u>data</u></font> ANYContent <font color=Red>=</font> <font color=Green><u>forall</u></font> a <font color=Cyan>.</font> <font color=Cyan>(</font>XmlContent a<font color=Cyan>,</font> Show a<font color=Cyan>)</font> <font color=Red>=&gt;</font> ANYContent a-<a name="line-655"></a>                <font color=Red>|</font> UnConverted <font color=Red>[</font>Content Posn<font color=Red>]</font>-<a name="line-656"></a>-<a name="line-657"></a><font color=Green><u>instance</u></font> Show ANYContent <font color=Green><u>where</u></font>-<a name="line-658"></a>    show <font color=Cyan>(</font>UnConverted c<font color=Cyan>)</font> <font color=Red>=</font> <font color=Magenta>"UnConverted "</font> <font color=Cyan>++</font> <font color=Cyan>(</font>show <font color=Cyan>$</font> map verbatim c<font color=Cyan>)</font>-<a name="line-659"></a>    show <font color=Cyan>(</font>ANYContent a<font color=Cyan>)</font>  <font color=Red>=</font> <font color=Magenta>"ANYContent "</font> <font color=Cyan>++</font> <font color=Cyan>(</font>show a<font color=Cyan>)</font>-<a name="line-660"></a>-<a name="line-661"></a><font color=Green><u>instance</u></font> Eq ANYContent <font color=Green><u>where</u></font>-<a name="line-662"></a>    a <font color=Cyan>==</font> b <font color=Red>=</font> show a <font color=Cyan>==</font> show b-<a name="line-663"></a>-<a name="line-664"></a><a name="List1"></a><font color=Blue>-- | The List1 type represents lists with at least one element.</font>-<a name="line-665"></a><a name="List1"></a><font color=Blue>--   It is required for DTD content models that use + as a modifier.</font>-<a name="line-666"></a><a name="List1"></a><font color=Green><u>data</u></font> List1 a <font color=Red>=</font> NonEmpty <font color=Red>[</font>a<font color=Red>]</font>  <font color=Green><u>deriving</u></font> <font color=Cyan>(</font>Eq<font color=Cyan>,</font> Show<font color=Cyan>)</font>-<a name="line-667"></a>-<a name="line-668"></a>-<a name="line-669"></a><font color=Blue>------------------------------------------------------------------------</font>-<a name="line-670"></a><font color=Blue>--  Instances for new content-model types</font>-<a name="line-671"></a><font color=Blue>------------------------------------------------------------------------</font>-<a name="line-672"></a><font color=Green><u>instance</u></font> <font color=Cyan>(</font>HTypeable a<font color=Cyan>)</font> <font color=Red>=&gt;</font> HTypeable <font color=Cyan>(</font>List1 a<font color=Cyan>)</font> <font color=Green><u>where</u></font>-<a name="line-673"></a>    toHType m  <font color=Red>=</font> Defined <font color=Magenta>"List1"</font> <font color=Red>[</font>hx<font color=Red>]</font>-<a name="line-674"></a>                         <font color=Red>[</font>Constr <font color=Magenta>"NonEmpty"</font> <font color=Red>[</font>hx<font color=Red>]</font> <font color=Red>[</font>List hx<font color=Red>]</font> <font color=Blue>{-Nothing-}</font><font color=Red>]</font>-<a name="line-675"></a>               <font color=Green><u>where</u></font> <font color=Cyan>(</font>NonEmpty x<font color=Cyan>)</font> <font color=Red>=</font> m-<a name="line-676"></a>                     hx <font color=Red>=</font> toHType x-<a name="line-677"></a><font color=Green><u>instance</u></font> <font color=Cyan>(</font>XmlContent a<font color=Cyan>)</font> <font color=Red>=&gt;</font> XmlContent <font color=Cyan>(</font>List1 a<font color=Cyan>)</font> <font color=Green><u>where</u></font>-<a name="line-678"></a>    toContents <font color=Cyan>(</font>NonEmpty xs<font color=Cyan>)</font> <font color=Red>=</font> concatMap toContents xs-<a name="line-679"></a>    parseContents <font color=Red>=</font> fmap NonEmpty <font color=Cyan>$</font> many1 parseContents-<a name="line-680"></a>-<a name="line-681"></a><font color=Green><u>instance</u></font> HTypeable ANYContent <font color=Green><u>where</u></font>-<a name="line-682"></a>    toHType <font color=Green><u>_</u></font>      <font color=Red>=</font> Prim <font color=Magenta>"ANYContent"</font> <font color=Magenta>"ANY"</font>-<a name="line-683"></a><font color=Green><u>instance</u></font> XmlContent ANYContent <font color=Green><u>where</u></font>-<a name="line-684"></a>    toContents <font color=Cyan>(</font>ANYContent a<font color=Cyan>)</font>  <font color=Red>=</font> toContents a-<a name="line-685"></a>    toContents <font color=Cyan>(</font>UnConverted s<font color=Cyan>)</font> <font color=Red>=</font> map <font color=Cyan>(</font>fmap <font color=Cyan>(</font>const ()<font color=Cyan>)</font><font color=Cyan>)</font> s-<a name="line-686"></a>    parseContents <font color=Red>=</font> P <font color=Cyan>(</font><font color=Red>\</font>cs <font color=Red>-&gt;</font> Success [] <font color=Cyan>(</font>UnConverted cs<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-687"></a>-<a name="line-688"></a><font color=Blue>------------------------------------------------------------------------</font>-<a name="line-689"></a><font color=Blue>--</font>-<a name="line-690"></a><font color=Blue>------------------------------------------------------------------------</font>-</pre>-</body>-</html>
− docs/HaXml/src/Text/XML/HaXml/Xtract/Combinators.html
@@ -1,114 +0,0 @@-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">-<html>-<head>-<!-- Generated by HsColour, http://www.cs.york.ac.uk/fp/darcs/hscolour/ -->-<title>src/Text/XML/HaXml/Xtract/Combinators.hs</title>-</head>-<body>-<pre><a name="line-1"></a><font color=Blue>-- | This is a new set of XML combinators for Xtract, not standard,</font>-<a name="line-2"></a><font color=Blue>--   but based on the standard set in "Text.Xml.Haxml.Combinators".</font>-<a name="line-3"></a><font color=Blue>--   The main difference is that the Content Filter type becomes a</font>-<a name="line-4"></a><font color=Blue>--   Double Filter.  A Double Filter always takes the whole document</font>-<a name="line-5"></a><font color=Blue>--   as an extra argument, so you can start to traverse it again from</font>-<a name="line-6"></a><font color=Blue>--   the root, when at any inner location within the document tree.</font>-<a name="line-7"></a><font color=Blue>--</font>-<a name="line-8"></a><font color=Blue>--   The new combinator definitions are derived from the old ones.</font>-<a name="line-9"></a><font color=Blue>--   The same names have the equivalent meaning - use module qualification</font>-<a name="line-10"></a><font color=Blue>--   on imports to distinguish between CFilter and DFilter variations.</font>-<a name="line-11"></a>-<a name="line-12"></a><font color=Green><u>module</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Xtract<font color=Cyan>.</font>Combinators <font color=Green><u>where</u></font>-<a name="line-13"></a>-<a name="line-14"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Types-<a name="line-15"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Combinators <font color=Cyan>(</font>CFilter<font color=Cyan>)</font>-<a name="line-16"></a><font color=Green><u>import</u></font> <font color=Green><u>qualified</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Combinators <font color=Green><u>as</u></font> C-<a name="line-17"></a>-<a name="line-18"></a>-<a name="line-19"></a><a name="DFilter"></a><font color=Blue>-- | double content filter - takes document root + local subtree.</font>-<a name="line-20"></a><a name="DFilter"></a><font color=Green><u>type</u></font> DFilter i <font color=Red>=</font> Content i <font color=Red>-&gt;</font> Content i <font color=Red>-&gt;</font> <font color=Red>[</font>Content i<font color=Red>]</font>-<a name="line-21"></a>-<a name="line-22"></a><a name="local"></a><font color=Blue>-- | lift an ordinary content filter to a double filter.</font>-<a name="line-23"></a><font color=Blue>local</font><font color=Cyan>,</font>global <font color=Red>::</font> CFilter i <font color=Red>-&gt;</font> DFilter i-<a name="line-24"></a><font color=Blue>local</font>  f <font color=Red>=</font> <font color=Red>\</font>xml sub<font color=Red>-&gt;</font> f sub-<a name="line-25"></a><a name="global"></a><font color=Blue>global</font> f <font color=Red>=</font> <font color=Red>\</font>xml sub<font color=Red>-&gt;</font> f xml-<a name="line-26"></a>-<a name="line-27"></a><a name="dfilter"></a><font color=Blue>-- | drop a double filter to an ordinary content filter.</font>-<a name="line-28"></a><font color=Blue>--   (permitting interior access to document root)</font>-<a name="line-29"></a><font color=Blue>dfilter</font> <font color=Red>::</font> DFilter i <font color=Red>-&gt;</font> CFilter i-<a name="line-30"></a><font color=Blue>dfilter</font> f <font color=Red>=</font> <font color=Red>\</font>xml<font color=Red>-&gt;</font> f xml xml-<a name="line-31"></a>-<a name="line-32"></a><a name="cfilter"></a><font color=Blue>-- | drop a double filter to an ordinary content filter.</font>-<a name="line-33"></a><font color=Blue>--   (Where interior access to the document root is not needed, the</font>-<a name="line-34"></a><font color=Blue>--    retaining pointer to the outer element can be pruned away.</font>-<a name="line-35"></a><font color=Blue>--   'cfilter' is more space-efficient than 'dfilter' in this situation.)</font>-<a name="line-36"></a><font color=Blue>cfilter</font> <font color=Red>::</font> DFilter i <font color=Red>-&gt;</font> CFilter i-<a name="line-37"></a><font color=Blue>cfilter</font> f <font color=Red>=</font> <font color=Red>\</font>xml <font color=Red>-&gt;</font> f undefined xml-<a name="line-38"></a><font color=Blue>--cfilter f = \xml-&gt; flip f xml</font>-<a name="line-39"></a><font color=Blue>--                          (case xml of</font>-<a name="line-40"></a><font color=Blue>--                             CElem (Elem n as cs) i -&gt; CElem (Elem n [] []) i</font>-<a name="line-41"></a><font color=Blue>--                             _ -&gt; xml)</font>-<a name="line-42"></a>-<a name="line-43"></a><a name="liftLocal"></a><font color=Blue>-- | lift a CFilter combinator to a DFilter combinator</font>-<a name="line-44"></a><font color=Blue>liftLocal</font><font color=Cyan>,</font> liftGlobal <font color=Red>::</font> <font color=Cyan>(</font>CFilter i<font color=Red>-&gt;</font>CFilter i<font color=Cyan>)</font> <font color=Red>-&gt;</font> <font color=Cyan>(</font>DFilter i<font color=Red>-&gt;</font>DFilter i<font color=Cyan>)</font>-<a name="line-45"></a><font color=Blue>liftLocal</font>  ff <font color=Red>=</font> <font color=Red>\</font>df<font color=Red>-&gt;</font> <font color=Red>\</font>xml sub<font color=Red>-&gt;</font> <font color=Cyan>(</font>ff <font color=Cyan>(</font>df xml<font color=Cyan>)</font><font color=Cyan>)</font> sub-<a name="line-46"></a><a name="liftGlobal"></a><font color=Blue>liftGlobal</font> ff <font color=Red>=</font> <font color=Red>\</font>df<font color=Red>-&gt;</font> <font color=Red>\</font>xml sub<font color=Red>-&gt;</font> <font color=Cyan>(</font>ff <font color=Cyan>(</font>df xml<font color=Cyan>)</font><font color=Cyan>)</font> xml-<a name="line-47"></a>-<a name="line-48"></a><a name="o"></a><font color=Blue>-- | lifted composition over double filters.</font>-<a name="line-49"></a><font color=Blue>o</font> <font color=Red>::</font> DFilter i <font color=Red>-&gt;</font> DFilter i <font color=Red>-&gt;</font> DFilter i-<a name="line-50"></a><a name="o"></a><font color=Blue>g</font> <font color=Cyan>`o`</font> f <font color=Red>=</font> <font color=Red>\</font>xml<font color=Red>-&gt;</font> concatMap <font color=Cyan>(</font>g xml<font color=Cyan>)</font> <font color=Cyan>.</font> <font color=Cyan>(</font>f xml<font color=Cyan>)</font>-<a name="line-51"></a>-<a name="line-52"></a><a name="|>|"></a><font color=Blue>-- | lifted choice.</font>-<a name="line-53"></a><font color=Cyan>(</font><font color=Cyan>|&gt;|</font><font color=Cyan>)</font> <font color=Red>::</font> <font color=Cyan>(</font>a<font color=Red>-&gt;</font>b<font color=Red>-&gt;</font><font color=Red>[</font>c<font color=Red>]</font><font color=Cyan>)</font> <font color=Red>-&gt;</font> <font color=Cyan>(</font>a<font color=Red>-&gt;</font>b<font color=Red>-&gt;</font><font color=Red>[</font>c<font color=Red>]</font><font color=Cyan>)</font> <font color=Red>-&gt;</font> <font color=Cyan>(</font>a<font color=Red>-&gt;</font>b<font color=Red>-&gt;</font><font color=Red>[</font>c<font color=Red>]</font><font color=Cyan>)</font>-<a name="line-54"></a><a name="f"></a><font color=Blue>f</font> <font color=Cyan>|&gt;|</font> g <font color=Red>=</font> <font color=Red>\</font>xml sub<font color=Red>-&gt;</font> <font color=Green><u>let</u></font> first <font color=Red>=</font> f xml sub <font color=Green><u>in</u></font>-<a name="line-55"></a>                     <font color=Green><u>if</u></font> null first <font color=Green><u>then</u></font> g xml sub <font color=Green><u>else</u></font> first-<a name="line-56"></a>-<a name="line-57"></a><a name="union"></a><font color=Blue>-- | lifted union.</font>-<a name="line-58"></a><font color=Blue>union</font> <font color=Red>::</font> <font color=Cyan>(</font>a<font color=Red>-&gt;</font>b<font color=Red>-&gt;</font><font color=Red>[</font>c<font color=Red>]</font><font color=Cyan>)</font> <font color=Red>-&gt;</font> <font color=Cyan>(</font>a<font color=Red>-&gt;</font>b<font color=Red>-&gt;</font><font color=Red>[</font>c<font color=Red>]</font><font color=Cyan>)</font> <font color=Red>-&gt;</font> <font color=Cyan>(</font>a<font color=Red>-&gt;</font>b<font color=Red>-&gt;</font><font color=Red>[</font>c<font color=Red>]</font><font color=Cyan>)</font>-<a name="line-59"></a><font color=Blue>union</font> <font color=Red>=</font> lift <font color=Cyan>(</font><font color=Cyan>++</font><font color=Cyan>)</font>-<a name="line-60"></a>  <font color=Green><u>where</u></font>-<a name="line-61"></a>    lift f g h <font color=Red>=</font> <font color=Red>\</font>x y<font color=Red>-&gt;</font> f <font color=Cyan>(</font>g x y<font color=Cyan>)</font> <font color=Cyan>(</font>h x y<font color=Cyan>)</font>-<a name="line-62"></a>-<a name="line-63"></a><a name="with"></a><font color=Blue>-- | lifted predicates.</font>-<a name="line-64"></a><font color=Blue>with</font><font color=Cyan>,</font> without <font color=Red>::</font> DFilter i <font color=Red>-&gt;</font> DFilter i <font color=Red>-&gt;</font> DFilter i-<a name="line-65"></a><a name="with"></a><font color=Blue>f</font> <font color=Cyan>`with`</font> g    <font color=Red>=</font> <font color=Red>\</font>xml<font color=Red>-&gt;</font> filter <font color=Cyan>(</font>not<font color=Cyan>.</font>null<font color=Cyan>.</font>g xml<font color=Cyan>)</font> <font color=Cyan>.</font> f xml-<a name="line-66"></a><a name="without"></a><font color=Blue>f</font> <font color=Cyan>`without`</font> g <font color=Red>=</font> <font color=Red>\</font>xml<font color=Red>-&gt;</font> filter     <font color=Cyan>(</font>null<font color=Cyan>.</font>g xml<font color=Cyan>)</font> <font color=Cyan>.</font> f xml-<a name="line-67"></a>-<a name="line-68"></a><a name="keep"></a><font color=Blue>-- | lifted unit and zero.</font>-<a name="line-69"></a><font color=Blue>keep</font><font color=Cyan>,</font> none <font color=Red>::</font> DFilter i-<a name="line-70"></a><font color=Blue>keep</font> <font color=Red>=</font> <font color=Red>\</font>xml sub<font color=Red>-&gt;</font> <font color=Red>[</font>sub<font color=Red>]</font>	<font color=Blue>-- local C.keep</font>-<a name="line-71"></a><a name="none"></a><font color=Blue>none</font> <font color=Red>=</font> <font color=Red>\</font>xml sub<font color=Red>-&gt;</font> []	<font color=Blue>-- local C.none</font>-<a name="line-72"></a>-<a name="line-73"></a><a name="children"></a><font color=Blue>children</font><font color=Cyan>,</font> elm<font color=Cyan>,</font> txt <font color=Red>::</font> DFilter i-<a name="line-74"></a><font color=Blue>children</font> <font color=Red>=</font> local C<font color=Cyan>.</font>children-<a name="line-75"></a><a name="elm"></a><font color=Blue>elm</font>      <font color=Red>=</font> local C<font color=Cyan>.</font>elm-<a name="line-76"></a><a name="txt"></a><font color=Blue>txt</font>      <font color=Red>=</font> local C<font color=Cyan>.</font>txt-<a name="line-77"></a>-<a name="line-78"></a><a name="applypred"></a><font color=Blue>applypred</font> <font color=Red>::</font> CFilter i <font color=Red>-&gt;</font> DFilter i <font color=Red>-&gt;</font> CFilter i-<a name="line-79"></a><font color=Blue>applypred</font> f p <font color=Red>=</font> <font color=Red>\</font>xml<font color=Red>-&gt;</font> <font color=Cyan>(</font>const f <font color=Cyan>`with`</font> p<font color=Cyan>)</font> xml xml-<a name="line-80"></a>-<a name="line-81"></a><a name="iffind"></a><font color=Blue>iffind</font> <font color=Red>::</font> String <font color=Red>-&gt;</font> <font color=Cyan>(</font>String <font color=Red>-&gt;</font> DFilter i<font color=Cyan>)</font> <font color=Red>-&gt;</font> DFilter i <font color=Red>-&gt;</font> DFilter i-<a name="line-82"></a><font color=Blue>iffind</font> key yes no xml c<font color=Red>@</font><font color=Cyan>(</font>CElem <font color=Cyan>(</font>Elem <font color=Green><u>_</u></font> <font color=Green><u>as</u></font> <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red>=</font>-<a name="line-83"></a>  <font color=Green><u>case</u></font> <font color=Cyan>(</font>lookup key <font color=Green><u>as</u></font><font color=Cyan>)</font> <font color=Green><u>of</u></font>-<a name="line-84"></a>    Nothing <font color=Red>-&gt;</font> no xml c-<a name="line-85"></a>    <font color=Cyan>(</font>Just v<font color=Red>@</font><font color=Cyan>(</font>AttValue <font color=Green><u>_</u></font><font color=Cyan>)</font><font color=Cyan>)</font> <font color=Red>-&gt;</font> yes <font color=Cyan>(</font>show v<font color=Cyan>)</font> xml c-<a name="line-86"></a><font color=Blue>iffind</font> key yes no xml other <font color=Red>=</font> no xml other-<a name="line-87"></a>-<a name="line-88"></a><a name="ifTxt"></a><font color=Blue>ifTxt</font> <font color=Red>::</font> <font color=Cyan>(</font>String<font color=Red>-&gt;</font>DFilter i<font color=Cyan>)</font> <font color=Red>-&gt;</font> DFilter i <font color=Red>-&gt;</font> DFilter i-<a name="line-89"></a><font color=Blue>ifTxt</font> yes no xml c<font color=Red>@</font><font color=Cyan>(</font>CString <font color=Green><u>_</u></font> s <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red>=</font> yes s xml c-<a name="line-90"></a><font color=Blue>ifTxt</font> yes no xml c                 <font color=Red>=</font> no xml c-<a name="line-91"></a>-<a name="line-92"></a><a name="cat"></a><font color=Blue>cat</font> <font color=Red>::</font> <font color=Red>[</font>a<font color=Red>-&gt;</font>b<font color=Red>-&gt;</font><font color=Red>[</font>c<font color=Red>]</font><font color=Red>]</font> <font color=Red>-&gt;</font> <font color=Cyan>(</font>a<font color=Red>-&gt;</font>b<font color=Red>-&gt;</font><font color=Red>[</font>c<font color=Red>]</font><font color=Cyan>)</font>-<a name="line-93"></a><font color=Blue>cat</font> fs <font color=Red>=</font> <font color=Red>\</font>xml sub<font color=Red>-&gt;</font> concat <font color=Red>[</font> f xml sub <font color=Red>|</font> f <font color=Red>&lt;-</font> fs <font color=Red>]</font>-<a name="line-94"></a>-<a name="line-95"></a><a name="/>"></a><font color=Cyan>(</font><font color=Cyan>/&gt;</font><font color=Cyan>)</font> <font color=Red>::</font> DFilter i <font color=Red>-&gt;</font> DFilter i <font color=Red>-&gt;</font> DFilter i-<a name="line-96"></a><font color=Blue>f</font> <font color=Cyan>/&gt;</font> g <font color=Red>=</font> g <font color=Cyan>`o`</font> children <font color=Cyan>`o`</font> f-<a name="line-97"></a>-<a name="line-98"></a><a name="</"></a><font color=Cyan>(</font><font color=Cyan>&lt;/</font><font color=Cyan>)</font> <font color=Red>::</font> DFilter i <font color=Red>-&gt;</font> DFilter i <font color=Red>-&gt;</font> DFilter i-<a name="line-99"></a><font color=Blue>f</font> <font color=Cyan>&lt;/</font> g <font color=Red>=</font> f <font color=Cyan>`with`</font> <font color=Cyan>(</font>g <font color=Cyan>`o`</font> children<font color=Cyan>)</font>-<a name="line-100"></a>-<a name="line-101"></a><a name="deep"></a><font color=Blue>deep</font><font color=Cyan>,</font> deepest<font color=Cyan>,</font> multi <font color=Red>::</font> DFilter i <font color=Red>-&gt;</font> DFilter i-<a name="line-102"></a><font color=Blue>deep</font> f    <font color=Red>=</font> f <font color=Cyan>|&gt;|</font> <font color=Cyan>(</font>deep f <font color=Cyan>`o`</font> children<font color=Cyan>)</font>-<a name="line-103"></a><a name="deepest"></a><font color=Blue>deepest</font> f <font color=Red>=</font> <font color=Cyan>(</font>deepest f <font color=Cyan>`o`</font> children<font color=Cyan>)</font> <font color=Cyan>|&gt;|</font> f-<a name="line-104"></a><a name="multi"></a><font color=Blue>multi</font> f   <font color=Red>=</font> f <font color=Cyan>`union`</font> <font color=Cyan>(</font>multi f <font color=Cyan>`o`</font> children<font color=Cyan>)</font>-</pre>-</body>-</html>
− docs/HaXml/src/Text/XML/HaXml/Xtract/Lex.html
@@ -1,138 +0,0 @@-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">-<html>-<head>-<!-- Generated by HsColour, http://www.cs.york.ac.uk/fp/darcs/hscolour/ -->-<title>src/Text/XML/HaXml/Xtract/Lex.hs</title>-</head>-<body>-<pre><a name="line-1"></a><font color=Blue>-- | This is another hand-written lexer, this time for the Xtract</font>-<a name="line-2"></a><font color=Blue>--   command-language.  The entry point is lexXtract.  You don't</font>-<a name="line-3"></a><font color=Blue>--   normally need to use this module directly - the lexer is called</font>-<a name="line-4"></a><font color=Blue>--   automatically by the parser.  (We only expose this interface</font>-<a name="line-5"></a><font color=Blue>--   for debugging purposes.)</font>-<a name="line-6"></a><font color=Blue>--</font>-<a name="line-7"></a><font color=Blue>--   The Xtract command language is very like the XPath specification.</font>-<a name="line-8"></a>-<a name="line-9"></a><font color=Green><u>module</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Xtract<font color=Cyan>.</font>Lex-<a name="line-10"></a>  <font color=Cyan>(</font> lexXtract-<a name="line-11"></a>  <font color=Cyan>,</font> Posn<font color=Cyan>(</font><font color=Red>..</font><font color=Cyan>)</font>-<a name="line-12"></a>  <font color=Cyan>,</font> TokenT<font color=Cyan>(</font><font color=Red>..</font><font color=Cyan>)</font>-<a name="line-13"></a>  <font color=Cyan>,</font> Token-<a name="line-14"></a>  <font color=Cyan>)</font> <font color=Green><u>where</u></font>-<a name="line-15"></a>-<a name="line-16"></a><font color=Green><u>import</u></font> Char-<a name="line-17"></a><font color=Green><u>import</u></font> List<font color=Cyan>(</font>isPrefixOf<font color=Cyan>)</font>-<a name="line-18"></a>-<a name="line-19"></a>-<a name="line-20"></a><a name="Token"></a><font color=Green><u>type</u></font> Token <font color=Red>=</font> Either String <font color=Cyan>(</font>Posn<font color=Cyan>,</font> TokenT<font color=Cyan>)</font>-<a name="line-21"></a>-<a name="line-22"></a><a name="Posn"></a><font color=Green><u>data</u></font> Posn <font color=Red>=</font> Pn Int		<font color=Blue>-- char index only</font>-<a name="line-23"></a>        <font color=Green><u>deriving</u></font> Eq-<a name="line-24"></a>-<a name="line-25"></a><font color=Green><u>instance</u></font> Show Posn <font color=Green><u>where</u></font>-<a name="line-26"></a>      showsPrec p <font color=Cyan>(</font>Pn c<font color=Cyan>)</font> <font color=Red>=</font> showString <font color=Magenta>"char pos "</font> <font color=Cyan>.</font> shows c-<a name="line-27"></a>-<a name="line-28"></a><a name="TokenT"></a><font color=Green><u>data</u></font> TokenT <font color=Red>=</font>-<a name="line-29"></a>      Symbol String-<a name="line-30"></a>    <font color=Red>|</font> TokString String		<font color=Blue>--     begins with letter</font>-<a name="line-31"></a>    <font color=Red>|</font> TokNum Integer		<font color=Blue>--     begins with digit</font>-<a name="line-32"></a>    <font color=Green><u>deriving</u></font> Eq-<a name="line-33"></a>-<a name="line-34"></a><font color=Green><u>instance</u></font> Show TokenT <font color=Green><u>where</u></font>-<a name="line-35"></a>    showsPrec p <font color=Cyan>(</font>Symbol s<font color=Cyan>)</font> <font color=Red>=</font> showString s-<a name="line-36"></a>    showsPrec p <font color=Cyan>(</font>TokString s<font color=Cyan>)</font> <font color=Red>=</font> showString s-<a name="line-37"></a>    showsPrec p <font color=Cyan>(</font>TokNum n<font color=Cyan>)</font> <font color=Red>=</font> shows n-<a name="line-38"></a>-<a name="line-39"></a><a name="emit"></a><font color=Blue>emit</font> <font color=Red>::</font> TokenT <font color=Red>-&gt;</font> Posn <font color=Red>-&gt;</font> Token-<a name="line-40"></a><font color=Blue>emit</font> tok p <font color=Red>=</font> forcep p <font color=Cyan>`seq`</font> Right <font color=Cyan>(</font>p<font color=Cyan>,</font>tok<font color=Cyan>)</font>-<a name="line-41"></a>  <font color=Green><u>where</u></font> forcep <font color=Cyan>(</font>Pn n<font color=Cyan>)</font> <font color=Red>=</font> n-<a name="line-42"></a>-<a name="line-43"></a><a name="lexerror"></a><font color=Blue>lexerror</font> <font color=Red>::</font> String <font color=Red>-&gt;</font> Posn <font color=Red>-&gt;</font> <font color=Red>[</font>Token<font color=Red>]</font>-<a name="line-44"></a><font color=Blue>lexerror</font> s p <font color=Red>=</font> <font color=Red>[</font>Left <font color=Cyan>(</font><font color=Magenta>"Lexical error in selection pattern at "</font><font color=Cyan>++</font>show p<font color=Cyan>++</font><font color=Magenta>": "</font>-<a name="line-45"></a>                       <font color=Cyan>++</font>s<font color=Cyan>++</font><font color=Magenta>"\n"</font><font color=Cyan>)</font><font color=Red>]</font>-<a name="line-46"></a>-<a name="line-47"></a><a name="addcol"></a><font color=Blue>addcol</font> <font color=Red>::</font> Int <font color=Red>-&gt;</font> Posn <font color=Red>-&gt;</font> Posn-<a name="line-48"></a><font color=Blue>addcol</font> n <font color=Cyan>(</font>Pn c<font color=Cyan>)</font> <font color=Red>=</font> Pn <font color=Cyan>(</font>c<font color=Cyan>+</font>n<font color=Cyan>)</font>-<a name="line-49"></a>-<a name="line-50"></a><a name="newline"></a><font color=Blue>newline</font><font color=Cyan>,</font> tab <font color=Red>::</font> Posn <font color=Red>-&gt;</font> Posn-<a name="line-51"></a><font color=Blue>newline</font> <font color=Cyan>(</font>Pn c<font color=Cyan>)</font> <font color=Red>=</font> Pn <font color=Cyan>(</font>c<font color=Cyan>+</font><font color=Magenta>1</font><font color=Cyan>)</font>-<a name="line-52"></a><a name="tab"></a><font color=Blue>tab</font>     <font color=Cyan>(</font>Pn c<font color=Cyan>)</font> <font color=Red>=</font> Pn <font color=Cyan>(</font><font color=Cyan>(</font><font color=Cyan>(</font>c<font color=Cyan>`div`</font><font color=Magenta>8</font><font color=Cyan>)</font><font color=Cyan>+</font><font color=Magenta>1</font><font color=Cyan>)</font><font color=Cyan>*</font><font color=Magenta>8</font><font color=Cyan>)</font>-<a name="line-53"></a>-<a name="line-54"></a><a name="white"></a><font color=Blue>white</font> <font color=Red>::</font> Char <font color=Red>-&gt;</font> Posn <font color=Red>-&gt;</font> Posn-<a name="line-55"></a><font color=Blue>white</font> <font color=Magenta>'\t'</font> <font color=Red>=</font> tab-<a name="line-56"></a><font color=Blue>white</font> <font color=Magenta>' '</font>  <font color=Red>=</font> addcol <font color=Magenta>1</font>-<a name="line-57"></a><font color=Blue>white</font> <font color=Magenta>'\n'</font> <font color=Red>=</font> addcol <font color=Magenta>1</font>-<a name="line-58"></a><font color=Blue>white</font> <font color=Magenta>'\r'</font> <font color=Red>=</font> addcol <font color=Magenta>1</font>-<a name="line-59"></a><font color=Blue>white</font> <font color=Magenta>'\xa0'</font> <font color=Red>=</font> addcol <font color=Magenta>1</font>-<a name="line-60"></a>-<a name="line-61"></a><a name="blank"></a><font color=Blue>blank</font> <font color=Red>::</font> <font color=Cyan>(</font>Posn<font color=Red>-&gt;</font>String<font color=Red>-&gt;</font><font color=Red>[</font>Token<font color=Red>]</font><font color=Cyan>)</font> <font color=Red>-&gt;</font> Posn<font color=Red>-&gt;</font> String<font color=Red>-&gt;</font> <font color=Red>[</font>Token<font color=Red>]</font>-<a name="line-62"></a><font color=Blue>blank</font> k p []       <font color=Red>=</font> []-<a name="line-63"></a><font color=Blue>blank</font> k p <font color=Cyan>(</font><font color=Magenta>' '</font><font color=Red><b>:</b></font> s<font color=Cyan>)</font> <font color=Red>=</font> blank k <font color=Cyan>(</font>addcol <font color=Magenta>1</font> p<font color=Cyan>)</font> s-<a name="line-64"></a><font color=Blue>blank</font> k p <font color=Cyan>(</font><font color=Magenta>'\t'</font><font color=Red><b>:</b></font>s<font color=Cyan>)</font> <font color=Red>=</font> blank k <font color=Cyan>(</font>tab p<font color=Cyan>)</font> s-<a name="line-65"></a><font color=Blue>blank</font> k p <font color=Cyan>(</font><font color=Magenta>'\n'</font><font color=Red><b>:</b></font>s<font color=Cyan>)</font> <font color=Red>=</font> blank k <font color=Cyan>(</font>newline p<font color=Cyan>)</font> s-<a name="line-66"></a><font color=Blue>blank</font> k p <font color=Cyan>(</font><font color=Magenta>'\r'</font><font color=Red><b>:</b></font>s<font color=Cyan>)</font> <font color=Red>=</font> blank k p s-<a name="line-67"></a><font color=Blue>blank</font> k p <font color=Cyan>(</font><font color=Magenta>'\xa0'</font><font color=Red><b>:</b></font> s<font color=Cyan>)</font> <font color=Red>=</font> blank k <font color=Cyan>(</font>addcol <font color=Magenta>1</font> p<font color=Cyan>)</font> s-<a name="line-68"></a><font color=Blue>blank</font> k p    s     <font color=Red>=</font> k p s-<a name="line-69"></a>-<a name="line-70"></a><a name="lexXtract"></a><font color=Blue>----</font>-<a name="line-71"></a><font color=Blue>-- | First argument is a transformer for pattern strings, e.g. map toLower,</font>-<a name="line-72"></a><font color=Blue>--   but only applying to parts of the pattern not in quotation marks.</font>-<a name="line-73"></a><font color=Blue>--   (Needed to canonicalise HTML where tags are case-insensitive, but</font>-<a name="line-74"></a><font color=Blue>--   attribute values are case sensitive.)</font>-<a name="line-75"></a><font color=Blue>lexXtract</font> <font color=Red>::</font> <font color=Cyan>(</font>String<font color=Red>-&gt;</font>String<font color=Cyan>)</font> <font color=Red>-&gt;</font> String <font color=Red>-&gt;</font> <font color=Red>[</font>Token<font color=Red>]</font>-<a name="line-76"></a><font color=Blue>lexXtract</font> f <font color=Red>=</font> selAny f <font color=Cyan>(</font>Pn <font color=Magenta>1</font><font color=Cyan>)</font>-<a name="line-77"></a>-<a name="line-78"></a><a name="syms"></a><font color=Blue>syms</font> <font color=Red>=</font> <font color=Magenta>"/[]()@,=*&amp;|~$+-&lt;&gt;"</font>-<a name="line-79"></a>-<a name="line-80"></a><a name="selAny"></a><font color=Blue>selAny</font> <font color=Red>::</font> <font color=Cyan>(</font>String<font color=Red>-&gt;</font>String<font color=Cyan>)</font> <font color=Red>-&gt;</font> Posn <font color=Red>-&gt;</font> String <font color=Red>-&gt;</font> <font color=Red>[</font>Token<font color=Red>]</font>-<a name="line-81"></a><font color=Blue>selAny</font> f p [] <font color=Red>=</font> []-<a name="line-82"></a><font color=Blue>selAny</font> f p <font color=Cyan>(</font><font color=Magenta>'/'</font><font color=Red><b>:</b></font><font color=Magenta>'/'</font><font color=Red><b>:</b></font>ss<font color=Cyan>)</font> <font color=Red>=</font> emit <font color=Cyan>(</font>Symbol <font color=Magenta>"//"</font><font color=Cyan>)</font> p<font color=Red><b>:</b></font>  selAny f <font color=Cyan>(</font>addcol <font color=Magenta>2</font> p<font color=Cyan>)</font> ss-<a name="line-83"></a><font color=Blue>selAny</font> f p <font color=Cyan>(</font><font color=Magenta>'!'</font><font color=Red><b>:</b></font><font color=Magenta>'='</font><font color=Red><b>:</b></font>ss<font color=Cyan>)</font> <font color=Red>=</font> emit <font color=Cyan>(</font>Symbol <font color=Magenta>"!="</font><font color=Cyan>)</font> p<font color=Red><b>:</b></font>  selAny f <font color=Cyan>(</font>addcol <font color=Magenta>2</font> p<font color=Cyan>)</font> ss-<a name="line-84"></a><font color=Blue>selAny</font> f p <font color=Cyan>(</font><font color=Magenta>'&lt;'</font><font color=Red><b>:</b></font><font color=Magenta>'='</font><font color=Red><b>:</b></font>ss<font color=Cyan>)</font> <font color=Red>=</font> emit <font color=Cyan>(</font>Symbol <font color=Magenta>"&lt;="</font><font color=Cyan>)</font> p<font color=Red><b>:</b></font>  selAny f <font color=Cyan>(</font>addcol <font color=Magenta>2</font> p<font color=Cyan>)</font> ss-<a name="line-85"></a><font color=Blue>selAny</font> f p <font color=Cyan>(</font><font color=Magenta>'&gt;'</font><font color=Red><b>:</b></font><font color=Magenta>'='</font><font color=Red><b>:</b></font>ss<font color=Cyan>)</font> <font color=Red>=</font> emit <font color=Cyan>(</font>Symbol <font color=Magenta>"&gt;="</font><font color=Cyan>)</font> p<font color=Red><b>:</b></font>  selAny f <font color=Cyan>(</font>addcol <font color=Magenta>2</font> p<font color=Cyan>)</font> ss-<a name="line-86"></a><font color=Blue>selAny</font> f p <font color=Cyan>(</font><font color=Magenta>'\''</font><font color=Red><b>:</b></font>ss<font color=Cyan>)</font>    <font color=Red>=</font> emit <font color=Cyan>(</font>Symbol <font color=Magenta>"'"</font><font color=Cyan>)</font> p<font color=Red><b>:</b></font>-<a name="line-87"></a>                          accumulateUntil <font color=Magenta>'\''</font> <font color=Cyan>(</font>Symbol <font color=Magenta>"'"</font><font color=Cyan>)</font> [] p <font color=Cyan>(</font>addcol <font color=Magenta>1</font> p<font color=Cyan>)</font> ss-<a name="line-88"></a>                                          <font color=Cyan>(</font>selAny f<font color=Cyan>)</font>-<a name="line-89"></a><font color=Blue>selAny</font> f p <font color=Cyan>(</font><font color=Magenta>'"'</font><font color=Red><b>:</b></font>ss<font color=Cyan>)</font>     <font color=Red>=</font> emit <font color=Cyan>(</font>Symbol <font color=Magenta>"\""</font><font color=Cyan>)</font> p<font color=Red><b>:</b></font>-<a name="line-90"></a>                          accumulateUntil <font color=Magenta>'"'</font> <font color=Cyan>(</font>Symbol <font color=Magenta>"\""</font><font color=Cyan>)</font> [] p <font color=Cyan>(</font>addcol <font color=Magenta>1</font> p<font color=Cyan>)</font> ss-<a name="line-91"></a>                                          <font color=Cyan>(</font>selAny f<font color=Cyan>)</font>-<a name="line-92"></a><font color=Blue>selAny</font> f p <font color=Cyan>(</font><font color=Magenta>'_'</font><font color=Red><b>:</b></font>ss<font color=Cyan>)</font>     <font color=Red>=</font> gatherName f <font color=Magenta>"_"</font> p <font color=Cyan>(</font>addcol <font color=Magenta>1</font> p<font color=Cyan>)</font> ss <font color=Cyan>(</font>blank <font color=Cyan>(</font>selAny f<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-93"></a><font color=Blue>selAny</font> f p <font color=Cyan>(</font><font color=Magenta>':'</font><font color=Red><b>:</b></font>ss<font color=Cyan>)</font>     <font color=Red>=</font> gatherName f <font color=Magenta>":"</font> p <font color=Cyan>(</font>addcol <font color=Magenta>1</font> p<font color=Cyan>)</font> ss <font color=Cyan>(</font>blank <font color=Cyan>(</font>selAny f<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-94"></a><font color=Blue>selAny</font> f p <font color=Cyan>(</font><font color=Magenta>'.'</font><font color=Red><b>:</b></font><font color=Magenta>'='</font><font color=Red><b>:</b></font><font color=Magenta>'.'</font><font color=Red><b>:</b></font>ss<font color=Cyan>)</font> <font color=Red>=</font> emit <font color=Cyan>(</font>Symbol <font color=Magenta>".=."</font><font color=Cyan>)</font> p<font color=Red><b>:</b></font>  selAny f <font color=Cyan>(</font>addcol <font color=Magenta>3</font> p<font color=Cyan>)</font> ss-<a name="line-95"></a><font color=Blue>selAny</font> f p <font color=Cyan>(</font><font color=Magenta>'.'</font><font color=Red><b>:</b></font><font color=Magenta>'!'</font><font color=Red><b>:</b></font><font color=Magenta>'='</font><font color=Red><b>:</b></font><font color=Magenta>'.'</font><font color=Red><b>:</b></font>ss<font color=Cyan>)</font>-<a name="line-96"></a>                            <font color=Red>=</font> emit <font color=Cyan>(</font>Symbol <font color=Magenta>".!=."</font><font color=Cyan>)</font> p<font color=Red><b>:</b></font> selAny f <font color=Cyan>(</font>addcol <font color=Magenta>4</font> p<font color=Cyan>)</font> ss-<a name="line-97"></a><font color=Blue>selAny</font> f p <font color=Cyan>(</font><font color=Magenta>'.'</font><font color=Red><b>:</b></font><font color=Magenta>'&lt;'</font><font color=Red><b>:</b></font><font color=Magenta>'.'</font><font color=Red><b>:</b></font>ss<font color=Cyan>)</font> <font color=Red>=</font> emit <font color=Cyan>(</font>Symbol <font color=Magenta>".&lt;."</font><font color=Cyan>)</font> p<font color=Red><b>:</b></font>  selAny f <font color=Cyan>(</font>addcol <font color=Magenta>3</font> p<font color=Cyan>)</font> ss-<a name="line-98"></a><font color=Blue>selAny</font> f p <font color=Cyan>(</font><font color=Magenta>'.'</font><font color=Red><b>:</b></font><font color=Magenta>'&lt;'</font><font color=Red><b>:</b></font><font color=Magenta>'='</font><font color=Red><b>:</b></font><font color=Magenta>'.'</font><font color=Red><b>:</b></font>ss<font color=Cyan>)</font>-<a name="line-99"></a>                            <font color=Red>=</font> emit <font color=Cyan>(</font>Symbol <font color=Magenta>".&lt;=."</font><font color=Cyan>)</font> p<font color=Red><b>:</b></font> selAny f <font color=Cyan>(</font>addcol <font color=Magenta>4</font> p<font color=Cyan>)</font> ss-<a name="line-100"></a><font color=Blue>selAny</font> f p <font color=Cyan>(</font><font color=Magenta>'.'</font><font color=Red><b>:</b></font><font color=Magenta>'&gt;'</font><font color=Red><b>:</b></font><font color=Magenta>'.'</font><font color=Red><b>:</b></font>ss<font color=Cyan>)</font> <font color=Red>=</font> emit <font color=Cyan>(</font>Symbol <font color=Magenta>".&gt;."</font><font color=Cyan>)</font> p<font color=Red><b>:</b></font>  selAny f <font color=Cyan>(</font>addcol <font color=Magenta>3</font> p<font color=Cyan>)</font> ss-<a name="line-101"></a><font color=Blue>selAny</font> f p <font color=Cyan>(</font><font color=Magenta>'.'</font><font color=Red><b>:</b></font><font color=Magenta>'&gt;'</font><font color=Red><b>:</b></font><font color=Magenta>'='</font><font color=Red><b>:</b></font><font color=Magenta>'.'</font><font color=Red><b>:</b></font>ss<font color=Cyan>)</font>-<a name="line-102"></a>                            <font color=Red>=</font> emit <font color=Cyan>(</font>Symbol <font color=Magenta>".&gt;=."</font><font color=Cyan>)</font> p<font color=Red><b>:</b></font> selAny f <font color=Cyan>(</font>addcol <font color=Magenta>4</font> p<font color=Cyan>)</font> ss-<a name="line-103"></a><font color=Blue>selAny</font> f p <font color=Cyan>(</font><font color=Magenta>'.'</font><font color=Red><b>:</b></font><font color=Magenta>'/'</font><font color=Red><b>:</b></font>ss<font color=Cyan>)</font>     <font color=Red>=</font> emit <font color=Cyan>(</font>Symbol <font color=Magenta>"./"</font><font color=Cyan>)</font> p<font color=Red><b>:</b></font>  selAny f <font color=Cyan>(</font>addcol <font color=Magenta>2</font> p<font color=Cyan>)</font> ss-<a name="line-104"></a><font color=Blue>selAny</font> f p <font color=Cyan>(</font>s<font color=Red><b>:</b></font>ss<font color=Cyan>)</font>-<a name="line-105"></a>    <font color=Red>|</font> s <font color=Cyan>`elem`</font> syms   <font color=Red>=</font> emit <font color=Cyan>(</font>Symbol <font color=Red>[</font>s<font color=Red>]</font><font color=Cyan>)</font> p<font color=Red><b>:</b></font>     selAny f <font color=Cyan>(</font>addcol <font color=Magenta>1</font> p<font color=Cyan>)</font> ss-<a name="line-106"></a>    <font color=Red>|</font> isSpace s       <font color=Red>=</font> blank <font color=Cyan>(</font>selAny f<font color=Cyan>)</font> p <font color=Cyan>(</font>s<font color=Red><b>:</b></font>ss<font color=Cyan>)</font>-<a name="line-107"></a>    <font color=Red>|</font> isAlpha s       <font color=Red>=</font> gatherName f <font color=Red>[</font>s<font color=Red>]</font> p <font color=Cyan>(</font>addcol <font color=Magenta>1</font> p<font color=Cyan>)</font> ss <font color=Cyan>(</font>blank <font color=Cyan>(</font>selAny f<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-108"></a>    <font color=Red>|</font> isDigit s       <font color=Red>=</font> gatherNum    <font color=Red>[</font>s<font color=Red>]</font> p <font color=Cyan>(</font>addcol <font color=Magenta>1</font> p<font color=Cyan>)</font> ss <font color=Cyan>(</font>blank <font color=Cyan>(</font>selAny f<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-109"></a>    <font color=Red>|</font> otherwise       <font color=Red>=</font> lexerror <font color=Magenta>"unrecognised pattern"</font> p-<a name="line-110"></a>-<a name="line-111"></a><a name="gatherName"></a><font color=Blue>gatherName</font> f acc pos p <font color=Cyan>(</font>s<font color=Red><b>:</b></font>ss<font color=Cyan>)</font> k-<a name="line-112"></a>  <font color=Red>|</font> isAlphaNum s <font color=Cyan>||</font> s <font color=Cyan>`elem`</font> <font color=Magenta>"-_:"</font> <font color=Red>=</font> gatherName f <font color=Cyan>(</font>s<font color=Red><b>:</b></font>acc<font color=Cyan>)</font> pos <font color=Cyan>(</font>addcol <font color=Magenta>1</font> p<font color=Cyan>)</font> ss k-<a name="line-113"></a><font color=Blue>gatherName</font> f acc pos p ss k <font color=Red>=</font>-<a name="line-114"></a>  emit <font color=Cyan>(</font>TokString <font color=Cyan>(</font>f <font color=Cyan>(</font>reverse acc<font color=Cyan>)</font><font color=Cyan>)</font><font color=Cyan>)</font> pos<font color=Red><b>:</b></font> k p ss-<a name="line-115"></a>-<a name="line-116"></a><a name="gatherNum"></a><font color=Blue>gatherNum</font> acc pos p <font color=Cyan>(</font>s<font color=Red><b>:</b></font>ss<font color=Cyan>)</font> k-<a name="line-117"></a>  <font color=Red>|</font> isHexDigit s <font color=Red>=</font> gatherNum <font color=Cyan>(</font>s<font color=Red><b>:</b></font>acc<font color=Cyan>)</font> pos <font color=Cyan>(</font>addcol <font color=Magenta>1</font> p<font color=Cyan>)</font> ss k-<a name="line-118"></a><font color=Blue>gatherNum</font> acc pos p ss k <font color=Red>=</font>-<a name="line-119"></a>  emit <font color=Cyan>(</font>TokNum <font color=Cyan>(</font>read <font color=Cyan>(</font>reverse acc<font color=Cyan>)</font><font color=Cyan>)</font><font color=Cyan>)</font> pos<font color=Red><b>:</b></font> k p ss-<a name="line-120"></a>-<a name="line-121"></a><a name="accumulateUntil"></a><font color=Blue>accumulateUntil</font> c tok acc pos  p  [] k <font color=Red>=</font>-<a name="line-122"></a>    lexerror <font color=Cyan>(</font><font color=Magenta>"found end of pattern while looking for "</font><font color=Cyan>++</font>c-<a name="line-123"></a>              <font color=Red><b>:</b></font><font color=Magenta>" to match opening quote at "</font><font color=Cyan>++</font>show pos<font color=Cyan>)</font> p-<a name="line-124"></a><font color=Blue>accumulateUntil</font> c tok acc pos  p <font color=Cyan>(</font>s<font color=Red><b>:</b></font>ss<font color=Cyan>)</font> k-<a name="line-125"></a>    <font color=Red>|</font> c<font color=Cyan>==</font>s       <font color=Red>=</font> emit <font color=Cyan>(</font>TokString <font color=Cyan>(</font>reverse acc<font color=Cyan>)</font><font color=Cyan>)</font> pos<font color=Red><b>:</b></font>-<a name="line-126"></a>                                  emit tok p<font color=Red><b>:</b></font> k <font color=Cyan>(</font>addcol <font color=Magenta>1</font> p<font color=Cyan>)</font> ss-<a name="line-127"></a>    <font color=Red>|</font> isSpace s  <font color=Red>=</font> accumulateUntil c tok <font color=Cyan>(</font>s<font color=Red><b>:</b></font>acc<font color=Cyan>)</font> pos <font color=Cyan>(</font>white s p<font color=Cyan>)</font> ss k-<a name="line-128"></a>    <font color=Red>|</font> otherwise  <font color=Red>=</font> accumulateUntil c tok <font color=Cyan>(</font>s<font color=Red><b>:</b></font>acc<font color=Cyan>)</font> pos <font color=Cyan>(</font>addcol <font color=Magenta>1</font> p<font color=Cyan>)</font> ss k-</pre>-</body>-</html>
− docs/HaXml/src/Text/XML/HaXml/Xtract/Parse.html
@@ -1,427 +0,0 @@-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">-<html>-<head>-<!-- Generated by HsColour, http://www.cs.york.ac.uk/fp/darcs/hscolour/ -->-<title>src/Text/XML/HaXml/Xtract/Parse.hs</title>-</head>-<body>-<pre><a name="line-1"></a><font color=Blue>-- | A parser for the Xtract command-language.  (The string input is</font>-<a name="line-2"></a><font color=Blue>--   tokenised internally by the lexer 'lexXtract'.)</font>-<a name="line-3"></a><font color=Blue>--   See &lt;<a href="http://www.haskell.org/HaXml/Xtract.html">http://www.haskell.org/HaXml/Xtract.html</a>&gt; for the grammar that</font>-<a name="line-4"></a><font color=Blue>--   is accepted.</font>-<a name="line-5"></a>-<a name="line-6"></a><font color=Blue>--   Because the original Xtract grammar was left-recursive, we have</font>-<a name="line-7"></a><font color=Blue>--   transformed it into a non-left-recursive form.</font>-<a name="line-8"></a><font color=Green><u>module</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Xtract<font color=Cyan>.</font>Parse <font color=Cyan>(</font>parseXtract<font color=Cyan>,</font>xtract<font color=Cyan>)</font> <font color=Green><u>where</u></font>-<a name="line-9"></a>-<a name="line-10"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>ParserCombinators<font color=Cyan>.</font>Poly hiding <font color=Cyan>(</font>bracket<font color=Cyan>)</font>-<a name="line-11"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Xtract<font color=Cyan>.</font>Lex-<a name="line-12"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Xtract<font color=Cyan>.</font>Combinators <font color=Green><u>as</u></font> D-<a name="line-13"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Combinators <font color=Green><u>as</u></font> C-<a name="line-14"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Types <font color=Cyan>(</font>Content<font color=Cyan>)</font>-<a name="line-15"></a><font color=Green><u>import</u></font> List<font color=Cyan>(</font>isPrefixOf<font color=Cyan>)</font>-<a name="line-16"></a><font color=Green><u>import</u></font> Text<font color=Cyan>.</font>XML<font color=Cyan>.</font>HaXml<font color=Cyan>.</font>Escape <font color=Cyan>(</font>xmlUnEscapeContent<font color=Cyan>,</font>stdXmlEscaper<font color=Cyan>)</font>-<a name="line-17"></a>-<a name="line-18"></a><a name="unescape"></a><font color=Blue>-- output transformer - to ensure that text/references are glued together</font>-<a name="line-19"></a><font color=Blue>unescape</font> <font color=Red>=</font> xmlUnEscapeContent stdXmlEscaper-<a name="line-20"></a>-<a name="line-21"></a>-<a name="line-22"></a><a name="xtract"></a><font color=Blue>-- | To convert an Xtract query into an ordinary HaXml combinator expression.</font>-<a name="line-23"></a><font color=Blue>--   First arg is a tag-transformation function (e.g. map toLower) applied</font>-<a name="line-24"></a><font color=Blue>---  before matching.  Second arg is the query string.</font>-<a name="line-25"></a><font color=Blue>xtract</font> <font color=Red>::</font> <font color=Cyan>(</font>String<font color=Red>-&gt;</font>String<font color=Cyan>)</font> <font color=Red>-&gt;</font> String <font color=Red>-&gt;</font> CFilter i-<a name="line-26"></a><font color=Blue>xtract</font> f query-<a name="line-27"></a>    <font color=Red>|</font> interiorRef lexedQ <font color=Red>=</font> dfilter <font color=Cyan>(</font>parseXtract lexedQ<font color=Cyan>)</font>-<a name="line-28"></a>    <font color=Red>|</font> otherwise          <font color=Red>=</font> cfilter <font color=Cyan>(</font>parseXtract lexedQ<font color=Cyan>)</font>-<a name="line-29"></a>  <font color=Green><u>where</u></font>-<a name="line-30"></a>    lexedQ <font color=Red>=</font> lexXtract f query-<a name="line-31"></a>    <font color=Blue>-- test whether query has interior reference to doc root</font>-<a name="line-32"></a>    interiorRef <font color=Cyan>(</font>Right <font color=Cyan>(</font><font color=Green><u>_</u></font><font color=Cyan>,</font>Symbol s<font color=Cyan>)</font><font color=Red><b>:</b></font> Right <font color=Cyan>(</font><font color=Green><u>_</u></font><font color=Cyan>,</font>Symbol <font color=Magenta>"//"</font><font color=Cyan>)</font><font color=Red><b>:</b></font> <font color=Green><u>_</u></font><font color=Cyan>)</font>-<a name="line-33"></a>                                          <font color=Red>|</font> s <font color=Cyan>`elem`</font> predicateIntro <font color=Red>=</font> True-<a name="line-34"></a>    interiorRef <font color=Cyan>(</font>Right <font color=Cyan>(</font><font color=Green><u>_</u></font><font color=Cyan>,</font>Symbol s<font color=Cyan>)</font><font color=Red><b>:</b></font> Right <font color=Cyan>(</font><font color=Green><u>_</u></font><font color=Cyan>,</font>Symbol <font color=Magenta>"/"</font><font color=Cyan>)</font><font color=Red><b>:</b></font> <font color=Green><u>_</u></font><font color=Cyan>)</font>-<a name="line-35"></a>                                          <font color=Red>|</font> s <font color=Cyan>`elem`</font> predicateIntro <font color=Red>=</font> True-<a name="line-36"></a>    interiorRef <font color=Cyan>(</font><font color=Green><u>_</u></font> <font color=Red><b>:</b></font> rest<font color=Cyan>)</font> <font color=Red>=</font> interiorRef rest-<a name="line-37"></a>    interiorRef [] <font color=Red>=</font> False-<a name="line-38"></a>    predicateIntro <font color=Red>=</font> <font color=Red>[</font> <font color=Magenta>"["</font><font color=Cyan>,</font> <font color=Magenta>"("</font>-<a name="line-39"></a>                     <font color=Cyan>,</font>  <font color=Magenta>"&amp;"</font><font color=Cyan>,</font>   <font color=Magenta>"|"</font><font color=Cyan>,</font>  <font color=Magenta>"~"</font>-<a name="line-40"></a>                     <font color=Cyan>,</font>  <font color=Magenta>"="</font><font color=Cyan>,</font>  <font color=Magenta>"!="</font><font color=Cyan>,</font>  <font color=Magenta>"&lt;"</font><font color=Cyan>,</font>  <font color=Magenta>"&lt;="</font><font color=Cyan>,</font>  <font color=Magenta>"&gt;"</font><font color=Cyan>,</font>  <font color=Magenta>"&gt;="</font>-<a name="line-41"></a>                     <font color=Cyan>,</font> <font color=Magenta>".=."</font><font color=Cyan>,</font><font color=Magenta>".!=."</font><font color=Cyan>,</font><font color=Magenta>".&lt;."</font><font color=Cyan>,</font><font color=Magenta>".&lt;=."</font><font color=Cyan>,</font><font color=Magenta>".&gt;."</font><font color=Cyan>,</font><font color=Magenta>".&gt;=."</font> <font color=Red>]</font>-<a name="line-42"></a>-<a name="line-43"></a><a name="parseXtract"></a><font color=Blue>-- | The cool thing is that the Xtract command parser directly builds</font>-<a name="line-44"></a><font color=Blue>--   a higher-order 'DFilter' (see "Text.XML.HaXml.Xtract.Combinators")</font>-<a name="line-45"></a><font color=Blue>--   which can be applied to an XML document without further ado.</font>-<a name="line-46"></a><font color=Blue>--   (@parseXtract@ halts the program if a parse error is found.)</font>-<a name="line-47"></a><font color=Blue>parseXtract</font> <font color=Red>::</font> <font color=Red>[</font>Token<font color=Red>]</font> <font color=Red>-&gt;</font> DFilter i-<a name="line-48"></a><font color=Blue>parseXtract</font> <font color=Red>=</font> either error id <font color=Cyan>.</font> parseXtract'-<a name="line-49"></a>-<a name="line-50"></a><a name="parseXtract'"></a><font color=Blue>-- | @parseXtract'@ returns error messages through the Either type.</font>-<a name="line-51"></a><font color=Blue>parseXtract'</font> <font color=Red>::</font> <font color=Red>[</font>Token<font color=Red>]</font> <font color=Red>-&gt;</font> Either String <font color=Cyan>(</font>DFilter i<font color=Cyan>)</font>-<a name="line-52"></a><font color=Blue>parseXtract'</font> <font color=Red>=</font> fst <font color=Cyan>.</font> runParser <font color=Cyan>(</font>aquery liftLocal<font color=Cyan>)</font>-<a name="line-53"></a>-<a name="line-54"></a><a name="XParser"></a><font color=Blue>---- Auxiliary Parsing Functions ----</font>-<a name="line-55"></a><a name="XParser"></a><font color=Green><u>type</u></font> XParser a <font color=Red>=</font> Parser <font color=Cyan>(</font>Either String <font color=Cyan>(</font>Posn<font color=Cyan>,</font>TokenT<font color=Cyan>)</font><font color=Cyan>)</font> a-<a name="line-56"></a>-<a name="line-57"></a><a name="string"></a><font color=Blue>string</font> <font color=Red>::</font> XParser String-<a name="line-58"></a><font color=Blue>string</font> <font color=Red>=</font> P <font color=Cyan>(</font><font color=Red>\</font>inp <font color=Red>-&gt;</font> <font color=Green><u>case</u></font> inp <font color=Green><u>of</u></font>-<a name="line-59"></a>                <font color=Cyan>(</font>Left err<font color=Red><b>:</b></font> <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red>-&gt;</font> Failure inp err-<a name="line-60"></a>                <font color=Cyan>(</font>Right <font color=Cyan>(</font>p<font color=Cyan>,</font>TokString n<font color=Cyan>)</font><font color=Red><b>:</b></font>ts<font color=Cyan>)</font> <font color=Red>-&gt;</font> Success ts n-<a name="line-61"></a>                ts <font color=Red>-&gt;</font> Failure ts <font color=Magenta>"expected a string"</font> <font color=Cyan>)</font>-<a name="line-62"></a><a name="number"></a><font color=Blue>number</font> <font color=Red>::</font> XParser Integer-<a name="line-63"></a><font color=Blue>number</font> <font color=Red>=</font> P <font color=Cyan>(</font><font color=Red>\</font>inp <font color=Red>-&gt;</font> <font color=Green><u>case</u></font> inp <font color=Green><u>of</u></font>-<a name="line-64"></a>                <font color=Cyan>(</font>Left err<font color=Red><b>:</b></font> <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red>-&gt;</font> Failure inp err-<a name="line-65"></a>                <font color=Cyan>(</font>Right <font color=Cyan>(</font>p<font color=Cyan>,</font>TokNum n<font color=Cyan>)</font><font color=Red><b>:</b></font>ts<font color=Cyan>)</font> <font color=Red>-&gt;</font> Success ts n-<a name="line-66"></a>                ts <font color=Red>-&gt;</font> Failure ts <font color=Magenta>"expected a number"</font> <font color=Cyan>)</font>-<a name="line-67"></a><a name="symbol"></a><font color=Blue>symbol</font> <font color=Red>::</font> String <font color=Red>-&gt;</font> XParser ()-<a name="line-68"></a><font color=Blue>symbol</font> s <font color=Red>=</font> P <font color=Cyan>(</font><font color=Red>\</font>inp <font color=Red>-&gt;</font> <font color=Green><u>case</u></font> inp <font color=Green><u>of</u></font>-<a name="line-69"></a>                <font color=Cyan>(</font>Left err<font color=Red><b>:</b></font> <font color=Green><u>_</u></font><font color=Cyan>)</font> <font color=Red>-&gt;</font> Failure inp err-<a name="line-70"></a>                <font color=Cyan>(</font>Right <font color=Cyan>(</font>p<font color=Cyan>,</font> Symbol n<font color=Cyan>)</font><font color=Red><b>:</b></font>ts<font color=Cyan>)</font> <font color=Red>|</font> n<font color=Cyan>==</font>s <font color=Red>-&gt;</font> Success ts ()-<a name="line-71"></a>                ts <font color=Red>-&gt;</font> Failure ts <font color=Cyan>(</font><font color=Magenta>"expected symbol "</font><font color=Cyan>++</font>s<font color=Cyan>)</font> <font color=Cyan>)</font>-<a name="line-72"></a>-<a name="line-73"></a><a name="quote"></a><font color=Blue>quote</font> <font color=Red>=</font> oneOf <font color=Red>[</font> symbol <font color=Magenta>"'"</font><font color=Cyan>,</font>  symbol <font color=Magenta>"\""</font> <font color=Red>]</font>-<a name="line-74"></a>-<a name="line-75"></a><a name="pam"></a><font color=Blue>pam</font> fs x <font color=Red>=</font> <font color=Red>[</font> f x <font color=Red>|</font> f <font color=Red>&lt;-</font> fs <font color=Red>]</font>-<a name="line-76"></a>-<a name="line-77"></a>-<a name="line-78"></a><font color=Blue>{--- original Xtract grammar -----<a name="line-79"></a>      query     = string			tagname-<a name="line-80"></a>                | string *			tagname prefix-<a name="line-81"></a>                | * string			tagname suffix-<a name="line-82"></a>                | *				any element-<a name="line-83"></a>                | -				chardata-<a name="line-84"></a>                | ( query )-<a name="line-85"></a>                | query / query			parent/child relationship-<a name="line-86"></a>                | query // query		deep inside-<a name="line-87"></a>                | query + query			union of queries-<a name="line-88"></a>                | query [predicate]-<a name="line-89"></a>                | query [positions]-<a name="line-90"></a>-<a name="line-91"></a>      predicate = quattr			has attribute-<a name="line-92"></a>                | quattr op ' string '		attribute has value-<a name="line-93"></a>                | quattr op " string "		attribute has value-<a name="line-94"></a>                | quattr op  quattr		attribute value comparison (lexical)-<a name="line-95"></a>                | quattr nop integer  		attribute has value (numerical)-<a name="line-96"></a>                | quattr nop quattr		attribute value comparison (numerical)-<a name="line-97"></a>                | ( predicate )			bracketting-<a name="line-98"></a>                | predicate &amp; predicate		logical and-<a name="line-99"></a>                | predicate | predicate		logical or-<a name="line-100"></a>                | ~ predicate			logical not-<a name="line-101"></a>-<a name="line-102"></a>      attribute = @ string			has attribute-<a name="line-103"></a>                | query / @ string		child has attribute-<a name="line-104"></a>                | -				has textual content-<a name="line-105"></a>                | query / -			child has textual content-<a name="line-106"></a>-<a name="line-107"></a>      quattr    = query-<a name="line-108"></a>                | attribute-<a name="line-109"></a>-<a name="line-110"></a>      op        =  =				equal to-<a name="line-111"></a>                |  !=				not equal to-<a name="line-112"></a>                |  &lt;				less than-<a name="line-113"></a>                |  &lt;=				less than or equal to-<a name="line-114"></a>                |  &gt;				greater than-<a name="line-115"></a>                |  &gt;=				greater than or equal to-<a name="line-116"></a>-<a name="line-117"></a>      nop       =  .=.				equal to-<a name="line-118"></a>                |  .!=.				not equal to-<a name="line-119"></a>                |  .&lt;.				less than-<a name="line-120"></a>                |  .&lt;=.				less than or equal to-<a name="line-121"></a>                |  .&gt;.				greater than-<a name="line-122"></a>                |  .&gt;=.				greater than or equal to-<a name="line-123"></a>-<a name="line-124"></a>      positions = position {, positions}	multiple positions-<a name="line-125"></a>                | position - position		ranges-<a name="line-126"></a>-<a name="line-127"></a>      position  = integer			numbering is from 0 upwards-<a name="line-128"></a>                | $				last-<a name="line-129"></a>-<a name="line-130"></a>-<a name="line-131"></a>---- transformed grammar (removing left recursion)-<a name="line-132"></a>      aquery = ./ tquery	-- current context-<a name="line-133"></a>             | tquery		-- also current context-<a name="line-134"></a>             | / tquery		-- root context-<a name="line-135"></a>             | // tquery	-- deep context from root-<a name="line-136"></a>-<a name="line-137"></a>      tquery = ( tquery ) xquery-<a name="line-138"></a>             | tag xquery-<a name="line-139"></a>             | -		-- fixes original grammar ("-/*" is incorrect)-<a name="line-140"></a>      -<a name="line-141"></a>      tag    = string *-<a name="line-142"></a>             | string-<a name="line-143"></a>             | * string-<a name="line-144"></a>             | *-<a name="line-145"></a>      -<a name="line-146"></a>      xquery = / tquery-<a name="line-147"></a>             | // tquery-<a name="line-148"></a>             | / @ string	-- new: print attribute value-<a name="line-149"></a>             | + tquery-<a name="line-150"></a>             | [ tpredicate ] xquery-<a name="line-151"></a>             | [ positions ] xquery-<a name="line-152"></a>             | lambda-<a name="line-153"></a>-<a name="line-154"></a>      tpredicate = vpredicate upredicate-<a name="line-155"></a>      upredicate = &amp; tpredicate-<a name="line-156"></a>                 | | tpredicate-<a name="line-157"></a>                 | lambda-<a name="line-158"></a>      vpredicate = ( tpredicate )-<a name="line-159"></a>                 | ~ tpredicate-<a name="line-160"></a>                 | tattribute-<a name="line-161"></a>-<a name="line-162"></a>      tattribute = aquery uattribute-<a name="line-163"></a>                 | @ string vattribute-<a name="line-164"></a>      uattribute = / @ string vattribute-<a name="line-165"></a>                 | vattribute-<a name="line-166"></a>      vattribute = op wattribute-<a name="line-167"></a>                 | op ' string '-<a name="line-168"></a>                 | nop wattribute-<a name="line-169"></a>                 | nop integer-<a name="line-170"></a>                 | lambda-<a name="line-171"></a>      wattribute = @ string-<a name="line-172"></a>                 | aquery / @ string-<a name="line-173"></a>                 | aquery-<a name="line-174"></a>-<a name="line-175"></a>      positions  = simplepos commapos-<a name="line-176"></a>      simplepos  = integer range-<a name="line-177"></a>                 | $-<a name="line-178"></a>      range      = - integer-<a name="line-179"></a>                 | - $-<a name="line-180"></a>                 | lambda-<a name="line-181"></a>      commapos   = , simplepos commapos-<a name="line-182"></a>                 | lambda-<a name="line-183"></a>-<a name="line-184"></a>      op         =  =-<a name="line-185"></a>                 |  !=-<a name="line-186"></a>                 |  &lt;-<a name="line-187"></a>                 |  &lt;=-<a name="line-188"></a>                 |  &gt;-<a name="line-189"></a>                 |  &gt;=-<a name="line-190"></a>-<a name="line-191"></a>      nop        =  .=.-<a name="line-192"></a>                 |  .!=.-<a name="line-193"></a>                 |  .&lt;.-<a name="line-194"></a>                 |  .&lt;=.-<a name="line-195"></a>                 |  .&gt;.-<a name="line-196"></a>                 |  .&gt;=.-<a name="line-197"></a>-}</font>-<a name="line-198"></a>-<a name="line-199"></a><a name="bracket"></a><font color=Blue>bracket</font> <font color=Red>::</font> XParser a <font color=Red>-&gt;</font> XParser a-<a name="line-200"></a><font color=Blue>bracket</font> p <font color=Red>=</font>-<a name="line-201"></a>  <font color=Green><u>do</u></font> symbol <font color=Magenta>"("</font>-<a name="line-202"></a>     x <font color=Red>&lt;-</font> p-<a name="line-203"></a>     symbol <font color=Magenta>")"</font>-<a name="line-204"></a>     return x-<a name="line-205"></a>-<a name="line-206"></a>-<a name="line-207"></a><font color=Blue>---- Xtract parsers ----</font>-<a name="line-208"></a>-<a name="line-209"></a><a name="aquery"></a><font color=Blue>-- aquery chooses to search from the root, or only in local context</font>-<a name="line-210"></a><font color=Blue>aquery</font> <font color=Red>::</font>  <font color=Cyan>(</font><font color=Cyan>(</font>CFilter i<font color=Red>-&gt;</font>CFilter i<font color=Cyan>)</font> <font color=Red>-&gt;</font> <font color=Cyan>(</font>DFilter i<font color=Red>-&gt;</font>DFilter i<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-211"></a>           <font color=Red>-&gt;</font> XParser <font color=Cyan>(</font>DFilter i<font color=Cyan>)</font>-<a name="line-212"></a><font color=Blue>aquery</font> lift <font color=Red>=</font> oneOf-<a name="line-213"></a>    <font color=Red>[</font> <font color=Green><u>do</u></font> symbol <font color=Magenta>"//"</font>-<a name="line-214"></a>         tquery <font color=Red>[</font>lift C<font color=Cyan>.</font>multi<font color=Red>]</font>-<a name="line-215"></a>    <font color=Cyan>,</font> <font color=Green><u>do</u></font> symbol <font color=Magenta>"/"</font>-<a name="line-216"></a>         tquery <font color=Red>[</font>lift id<font color=Red>]</font>-<a name="line-217"></a>    <font color=Cyan>,</font> <font color=Green><u>do</u></font> symbol <font color=Magenta>"./"</font>-<a name="line-218"></a>         tquery <font color=Red>[</font><font color=Cyan>(</font>local C<font color=Cyan>.</font>keep D<font color=Cyan>./&gt;</font><font color=Cyan>)</font><font color=Red>]</font>-<a name="line-219"></a>    <font color=Cyan>,</font> <font color=Green><u>do</u></font> tquery <font color=Red>[</font><font color=Cyan>(</font>local C<font color=Cyan>.</font>keep D<font color=Cyan>./&gt;</font><font color=Cyan>)</font><font color=Red>]</font>-<a name="line-220"></a>    <font color=Red>]</font>-<a name="line-221"></a>-<a name="line-222"></a><a name="tquery"></a><font color=Blue>tquery</font> <font color=Red>::</font> <font color=Red>[</font>DFilter i<font color=Red>-&gt;</font>DFilter i<font color=Red>]</font> <font color=Red>-&gt;</font> XParser <font color=Cyan>(</font>DFilter i<font color=Cyan>)</font>-<a name="line-223"></a><font color=Blue>tquery</font> [] <font color=Red>=</font> tquery <font color=Red>[</font>id<font color=Red>]</font>-<a name="line-224"></a><font color=Blue>tquery</font> <font color=Cyan>(</font>qf<font color=Red><b>:</b></font>cxt<font color=Cyan>)</font> <font color=Red>=</font> oneOf-<a name="line-225"></a>    <font color=Red>[</font> <font color=Green><u>do</u></font> q <font color=Red>&lt;-</font> bracket <font color=Cyan>(</font>tquery <font color=Cyan>(</font>qf<font color=Red><b>:</b></font>qf<font color=Red><b>:</b></font>cxt<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-226"></a>         xquery cxt q-<a name="line-227"></a>    <font color=Cyan>,</font> <font color=Green><u>do</u></font> q <font color=Red>&lt;-</font> xtag-<a name="line-228"></a>         xquery cxt <font color=Cyan>(</font>qf <font color=Cyan>(</font><font color=Cyan>(</font>unescape <font color=Cyan>.</font><font color=Cyan>)</font><font color=Cyan>.</font>q<font color=Cyan>)</font><font color=Cyan>)</font>	<font color=Blue>-- glue inners texts together</font>-<a name="line-229"></a>    <font color=Cyan>,</font> <font color=Green><u>do</u></font> symbol <font color=Magenta>"-"</font>-<a name="line-230"></a>         return <font color=Cyan>(</font>qf <font color=Cyan>(</font>local C<font color=Cyan>.</font>txt<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-231"></a>    <font color=Red>]</font>-<a name="line-232"></a>-<a name="line-233"></a><a name="xtag"></a><font color=Blue>xtag</font> <font color=Red>::</font> XParser <font color=Cyan>(</font>DFilter i<font color=Cyan>)</font>-<a name="line-234"></a><font color=Blue>xtag</font> <font color=Red>=</font> oneOf-<a name="line-235"></a>    <font color=Red>[</font> <font color=Green><u>do</u></font> s <font color=Red>&lt;-</font> string-<a name="line-236"></a>         symbol <font color=Magenta>"*"</font>-<a name="line-237"></a>         return <font color=Cyan>(</font>local <font color=Cyan>(</font>C<font color=Cyan>.</font>tagWith <font color=Cyan>(</font>s <font color=Cyan>`isPrefixOf`</font><font color=Cyan>)</font><font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-238"></a>    <font color=Cyan>,</font> <font color=Green><u>do</u></font> s <font color=Red>&lt;-</font> string-<a name="line-239"></a>         return <font color=Cyan>(</font>local <font color=Cyan>(</font>C<font color=Cyan>.</font>tag s<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-240"></a>    <font color=Cyan>,</font> <font color=Green><u>do</u></font> symbol <font color=Magenta>"*"</font>-<a name="line-241"></a>         s <font color=Red>&lt;-</font> string-<a name="line-242"></a>         return <font color=Cyan>(</font>local <font color=Cyan>(</font>C<font color=Cyan>.</font>tagWith <font color=Cyan>(</font><font color=Cyan>(</font><font color=Cyan>(</font>reverse s<font color=Cyan>)</font> <font color=Cyan>`isPrefixOf`</font><font color=Cyan>)</font> <font color=Cyan>.</font> reverse<font color=Cyan>)</font><font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-243"></a>    <font color=Cyan>,</font> <font color=Green><u>do</u></font> symbol <font color=Magenta>"*"</font>-<a name="line-244"></a>         return <font color=Cyan>(</font>local C<font color=Cyan>.</font>elm<font color=Cyan>)</font>-<a name="line-245"></a>    <font color=Red>]</font>-<a name="line-246"></a>-<a name="line-247"></a>-<a name="line-248"></a><a name="xquery"></a><font color=Blue>xquery</font> <font color=Red>::</font> <font color=Red>[</font>DFilter i<font color=Red>-&gt;</font>DFilter i<font color=Red>]</font> <font color=Red>-&gt;</font> DFilter i <font color=Red>-&gt;</font> XParser <font color=Cyan>(</font>DFilter i<font color=Cyan>)</font>-<a name="line-249"></a><font color=Blue>xquery</font> cxt q1 <font color=Red>=</font> oneOf-<a name="line-250"></a>    <font color=Red>[</font> <font color=Green><u>do</u></font> symbol <font color=Magenta>"/"</font>-<a name="line-251"></a>         <font color=Cyan>(</font> <font color=Green><u>do</u></font> symbol <font color=Magenta>"@"</font>-<a name="line-252"></a>              attr <font color=Red>&lt;-</font> string-<a name="line-253"></a>              return <font color=Cyan>(</font>D<font color=Cyan>.</font>iffind attr <font color=Cyan>(</font><font color=Red>\</font>s<font color=Red>-&gt;</font>local <font color=Cyan>(</font>C<font color=Cyan>.</font>literal s<font color=Cyan>)</font><font color=Cyan>)</font> D<font color=Cyan>.</font>none <font color=Cyan>`</font>D<font color=Cyan>.</font>o<font color=Cyan>`</font> q1<font color=Cyan>)</font>-<a name="line-254"></a>           <font color=Cyan>`onFail`</font>-<a name="line-255"></a>           tquery <font color=Cyan>(</font><font color=Cyan>(</font>q1 D<font color=Cyan>./&gt;</font><font color=Cyan>)</font><font color=Red><b>:</b></font>cxt<font color=Cyan>)</font> <font color=Cyan>)</font>-<a name="line-256"></a>    <font color=Cyan>,</font> <font color=Green><u>do</u></font> symbol <font color=Magenta>"//"</font>-<a name="line-257"></a>         tquery <font color=Cyan>(</font><font color=Cyan>(</font><font color=Red>\</font>q2<font color=Red>-&gt;</font> <font color=Cyan>(</font>liftLocal C<font color=Cyan>.</font>multi<font color=Cyan>)</font> q2-<a name="line-258"></a>                            <font color=Cyan>`</font>D<font color=Cyan>.</font>o<font color=Cyan>`</font> local C<font color=Cyan>.</font>children <font color=Cyan>`</font>D<font color=Cyan>.</font>o<font color=Cyan>`</font> q1<font color=Cyan>)</font><font color=Red><b>:</b></font>cxt<font color=Cyan>)</font>-<a name="line-259"></a>    <font color=Cyan>,</font> <font color=Green><u>do</u></font> symbol <font color=Magenta>"+"</font>-<a name="line-260"></a>         q2 <font color=Red>&lt;-</font> tquery cxt-<a name="line-261"></a>         return <font color=Cyan>(</font>D<font color=Cyan>.</font>cat <font color=Red>[</font>q1<font color=Cyan>,</font>q2<font color=Red>]</font><font color=Cyan>)</font>-<a name="line-262"></a>    <font color=Cyan>,</font> <font color=Green><u>do</u></font> symbol <font color=Magenta>"["</font>-<a name="line-263"></a>         is <font color=Red>&lt;-</font> iindex	<font color=Blue>-- now extended to multiple indexes</font>-<a name="line-264"></a>         symbol <font color=Magenta>"]"</font>-<a name="line-265"></a>         xquery cxt <font color=Cyan>(</font><font color=Red>\</font>xml<font color=Red>-&gt;</font> concat <font color=Cyan>.</font> pam is <font color=Cyan>.</font> q1 xml<font color=Cyan>)</font>-<a name="line-266"></a>    <font color=Cyan>,</font> <font color=Green><u>do</u></font> symbol <font color=Magenta>"["</font>-<a name="line-267"></a>         p <font color=Red>&lt;-</font> tpredicate-<a name="line-268"></a>         symbol <font color=Magenta>"]"</font>-<a name="line-269"></a>         xquery cxt <font color=Cyan>(</font>q1 <font color=Cyan>`</font>D<font color=Cyan>.</font>with<font color=Cyan>`</font> p<font color=Cyan>)</font>-<a name="line-270"></a>    <font color=Cyan>,</font> return q1-<a name="line-271"></a>    <font color=Red>]</font>-<a name="line-272"></a>-<a name="line-273"></a><a name="tpredicate"></a><font color=Blue>tpredicate</font> <font color=Red>::</font> XParser <font color=Cyan>(</font>DFilter i<font color=Cyan>)</font>-<a name="line-274"></a><font color=Blue>tpredicate</font> <font color=Red>=</font>-<a name="line-275"></a>  <font color=Green><u>do</u></font> p <font color=Red>&lt;-</font> vpredicate-<a name="line-276"></a>     f <font color=Red>&lt;-</font> upredicate-<a name="line-277"></a>     return <font color=Cyan>(</font>f p<font color=Cyan>)</font>-<a name="line-278"></a>-<a name="line-279"></a><a name="upredicate"></a><font color=Blue>upredicate</font> <font color=Red>::</font> XParser <font color=Cyan>(</font>DFilter i<font color=Red>-&gt;</font>DFilter i<font color=Cyan>)</font>-<a name="line-280"></a><font color=Blue>upredicate</font> <font color=Red>=</font> oneOf-<a name="line-281"></a>    <font color=Red>[</font> <font color=Green><u>do</u></font> symbol <font color=Magenta>"&amp;"</font>-<a name="line-282"></a>         p2 <font color=Red>&lt;-</font> tpredicate-<a name="line-283"></a>         return <font color=Cyan>(</font><font color=Cyan>`</font>D<font color=Cyan>.</font>o<font color=Cyan>`</font> p2<font color=Cyan>)</font>-<a name="line-284"></a>    <font color=Cyan>,</font> <font color=Green><u>do</u></font> symbol <font color=Magenta>"|"</font>-<a name="line-285"></a>         p2 <font color=Red>&lt;-</font> tpredicate-<a name="line-286"></a>         return <font color=Cyan>(</font>D<font color=Cyan>.|&gt;|</font> p2<font color=Cyan>)</font>-<a name="line-287"></a>    <font color=Cyan>,</font> return id-<a name="line-288"></a>    <font color=Red>]</font>-<a name="line-289"></a>-<a name="line-290"></a><a name="vpredicate"></a><font color=Blue>vpredicate</font> <font color=Red>::</font> XParser <font color=Cyan>(</font>DFilter i<font color=Cyan>)</font>-<a name="line-291"></a><font color=Blue>vpredicate</font> <font color=Red>=</font> oneOf-<a name="line-292"></a>    <font color=Red>[</font> <font color=Green><u>do</u></font> bracket tpredicate-<a name="line-293"></a>    <font color=Cyan>,</font> <font color=Green><u>do</u></font> symbol <font color=Magenta>"~"</font>-<a name="line-294"></a>         p <font color=Red>&lt;-</font> tpredicate-<a name="line-295"></a>         return <font color=Cyan>(</font>local C<font color=Cyan>.</font>keep <font color=Cyan>`</font>D<font color=Cyan>.</font>without<font color=Cyan>`</font> p<font color=Cyan>)</font>-<a name="line-296"></a>    <font color=Cyan>,</font> <font color=Green><u>do</u></font> tattribute-<a name="line-297"></a>    <font color=Red>]</font>-<a name="line-298"></a>-<a name="line-299"></a><a name="tattribute"></a><font color=Blue>tattribute</font> <font color=Red>::</font> XParser <font color=Cyan>(</font>DFilter i<font color=Cyan>)</font>-<a name="line-300"></a><font color=Blue>tattribute</font> <font color=Red>=</font> oneOf-<a name="line-301"></a>    <font color=Red>[</font> <font color=Green><u>do</u></font> q <font color=Red>&lt;-</font> aquery liftGlobal-<a name="line-302"></a>         uattribute q-<a name="line-303"></a>    <font color=Cyan>,</font> <font color=Green><u>do</u></font> symbol <font color=Magenta>"@"</font>-<a name="line-304"></a>         s <font color=Red>&lt;-</font> string-<a name="line-305"></a>         vattribute <font color=Cyan>(</font>local C<font color=Cyan>.</font>keep<font color=Cyan>,</font> local <font color=Cyan>(</font>C<font color=Cyan>.</font>attr s<font color=Cyan>)</font><font color=Cyan>,</font> D<font color=Cyan>.</font>iffind s<font color=Cyan>)</font>-<a name="line-306"></a>    <font color=Red>]</font>-<a name="line-307"></a>-<a name="line-308"></a><a name="uattribute"></a><font color=Blue>uattribute</font> <font color=Red>::</font> DFilter i <font color=Red>-&gt;</font> XParser <font color=Cyan>(</font>DFilter i<font color=Cyan>)</font>-<a name="line-309"></a><font color=Blue>uattribute</font> q <font color=Red>=</font> oneOf-<a name="line-310"></a>    <font color=Red>[</font> <font color=Green><u>do</u></font> symbol <font color=Magenta>"/"</font>-<a name="line-311"></a>         symbol <font color=Magenta>"@"</font>-<a name="line-312"></a>         s <font color=Red>&lt;-</font> string-<a name="line-313"></a>         vattribute <font color=Cyan>(</font>q<font color=Cyan>,</font> local <font color=Cyan>(</font>C<font color=Cyan>.</font>attr s<font color=Cyan>)</font><font color=Cyan>,</font> D<font color=Cyan>.</font>iffind s<font color=Cyan>)</font>-<a name="line-314"></a>    <font color=Cyan>,</font> <font color=Green><u>do</u></font> vattribute <font color=Cyan>(</font>q<font color=Cyan>,</font> local C<font color=Cyan>.</font>keep<font color=Cyan>,</font>     D<font color=Cyan>.</font>ifTxt<font color=Cyan>)</font>-<a name="line-315"></a>    <font color=Red>]</font>-<a name="line-316"></a>-<a name="line-317"></a><a name="vattribute"></a><font color=Blue>vattribute</font> <font color=Red>::</font> <font color=Cyan>(</font>DFilter i<font color=Cyan>,</font> DFilter i<font color=Cyan>,</font> <font color=Cyan>(</font>String<font color=Red>-&gt;</font>DFilter i<font color=Cyan>)</font><font color=Red>-&gt;</font>DFilter i<font color=Red>-&gt;</font>DFilter i<font color=Cyan>)</font>-<a name="line-318"></a>              <font color=Red>-&gt;</font> XParser <font color=Cyan>(</font>DFilter i<font color=Cyan>)</font>-<a name="line-319"></a><font color=Blue>vattribute</font> <font color=Cyan>(</font>q<font color=Cyan>,</font>a<font color=Cyan>,</font>iffn<font color=Cyan>)</font> <font color=Red>=</font> oneOf-<a name="line-320"></a>  <font color=Red>[</font> <font color=Green><u>do</u></font> cmp <font color=Red>&lt;-</font> op-<a name="line-321"></a>       quote-<a name="line-322"></a>       s2 <font color=Red>&lt;-</font> string-<a name="line-323"></a>       quote-<a name="line-324"></a>       return <font color=Cyan>(</font><font color=Cyan>(</font>iffn <font color=Cyan>(</font><font color=Red>\</font>s1<font color=Red>-&gt;</font><font color=Green><u>if</u></font> cmp s1 s2 <font color=Green><u>then</u></font> D<font color=Cyan>.</font>keep <font color=Green><u>else</u></font> D<font color=Cyan>.</font>none<font color=Cyan>)</font> D<font color=Cyan>.</font>none<font color=Cyan>)</font>-<a name="line-325"></a>               <font color=Cyan>`</font>D<font color=Cyan>.</font>o<font color=Cyan>`</font> q<font color=Cyan>)</font>-<a name="line-326"></a>  <font color=Cyan>,</font> <font color=Green><u>do</u></font> cmp <font color=Red>&lt;-</font> op-<a name="line-327"></a>       <font color=Cyan>(</font>q2<font color=Cyan>,</font>iffn2<font color=Cyan>)</font> <font color=Red>&lt;-</font> wattribute-<a name="line-328"></a>       return <font color=Cyan>(</font><font color=Cyan>(</font>iffn <font color=Cyan>(</font><font color=Red>\</font>s1<font color=Red>-&gt;</font> iffn2 <font color=Cyan>(</font><font color=Red>\</font>s2<font color=Red>-&gt;</font> <font color=Green><u>if</u></font> cmp s1 s2 <font color=Green><u>then</u></font> D<font color=Cyan>.</font>keep <font color=Green><u>else</u></font> D<font color=Cyan>.</font>none<font color=Cyan>)</font>-<a name="line-329"></a>                                  D<font color=Cyan>.</font>none<font color=Cyan>)</font>-<a name="line-330"></a>                     D<font color=Cyan>.</font>none<font color=Cyan>)</font> <font color=Cyan>`</font>D<font color=Cyan>.</font>o<font color=Cyan>`</font> q<font color=Cyan>)</font>-<a name="line-331"></a>  <font color=Cyan>,</font> <font color=Green><u>do</u></font> cmp <font color=Red>&lt;-</font> nop-<a name="line-332"></a>       n <font color=Red>&lt;-</font> number-<a name="line-333"></a>       return <font color=Cyan>(</font><font color=Cyan>(</font>iffn <font color=Cyan>(</font><font color=Red>\</font>s<font color=Red>-&gt;</font><font color=Green><u>if</u></font> cmp <font color=Cyan>(</font>read s<font color=Cyan>)</font> n <font color=Green><u>then</u></font> D<font color=Cyan>.</font>keep <font color=Green><u>else</u></font> D<font color=Cyan>.</font>none<font color=Cyan>)</font> D<font color=Cyan>.</font>none<font color=Cyan>)</font>-<a name="line-334"></a>               <font color=Cyan>`</font>D<font color=Cyan>.</font>o<font color=Cyan>`</font> q<font color=Cyan>)</font>-<a name="line-335"></a>  <font color=Cyan>,</font> <font color=Green><u>do</u></font> cmp <font color=Red>&lt;-</font> nop-<a name="line-336"></a>       <font color=Cyan>(</font>q2<font color=Cyan>,</font>iffn2<font color=Cyan>)</font> <font color=Red>&lt;-</font> wattribute-<a name="line-337"></a>       return <font color=Cyan>(</font><font color=Cyan>(</font>iffn <font color=Cyan>(</font><font color=Red>\</font>s1<font color=Red>-&gt;</font> iffn2 <font color=Cyan>(</font><font color=Red>\</font>s2<font color=Red>-&gt;</font> <font color=Green><u>if</u></font> cmp <font color=Cyan>(</font>read s1<font color=Cyan>)</font> <font color=Cyan>(</font>read s2<font color=Cyan>)</font> <font color=Green><u>then</u></font> D<font color=Cyan>.</font>keep-<a name="line-338"></a>                                                                    <font color=Green><u>else</u></font> D<font color=Cyan>.</font>none<font color=Cyan>)</font>-<a name="line-339"></a>                                  D<font color=Cyan>.</font>none<font color=Cyan>)</font>-<a name="line-340"></a>                     D<font color=Cyan>.</font>none<font color=Cyan>)</font> <font color=Cyan>`</font>D<font color=Cyan>.</font>o<font color=Cyan>`</font> q<font color=Cyan>)</font>-<a name="line-341"></a>  <font color=Cyan>,</font> <font color=Green><u>do</u></font> return <font color=Cyan>(</font><font color=Cyan>(</font>a <font color=Cyan>`</font>D<font color=Cyan>.</font>o<font color=Cyan>`</font> q<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-342"></a>  <font color=Red>]</font>-<a name="line-343"></a>-<a name="line-344"></a><a name="wattribute"></a><font color=Blue>wattribute</font> <font color=Red>::</font> XParser <font color=Cyan>(</font>DFilter i<font color=Cyan>,</font> <font color=Cyan>(</font>String<font color=Red>-&gt;</font>DFilter i<font color=Cyan>)</font><font color=Red>-&gt;</font>DFilter i<font color=Red>-&gt;</font>DFilter i<font color=Cyan>)</font>-<a name="line-345"></a><font color=Blue>wattribute</font> <font color=Red>=</font> oneOf-<a name="line-346"></a>    <font color=Red>[</font> <font color=Green><u>do</u></font> symbol <font color=Magenta>"@"</font>-<a name="line-347"></a>         s <font color=Red>&lt;-</font> string-<a name="line-348"></a>         return <font color=Cyan>(</font>D<font color=Cyan>.</font>keep<font color=Cyan>,</font> D<font color=Cyan>.</font>iffind s<font color=Cyan>)</font>-<a name="line-349"></a>    <font color=Cyan>,</font> <font color=Green><u>do</u></font> q <font color=Red>&lt;-</font> aquery liftGlobal-<a name="line-350"></a>         symbol <font color=Magenta>"/"</font>-<a name="line-351"></a>         symbol <font color=Magenta>"@"</font>-<a name="line-352"></a>         s <font color=Red>&lt;-</font> string-<a name="line-353"></a>         return <font color=Cyan>(</font>q<font color=Cyan>,</font> D<font color=Cyan>.</font>iffind s<font color=Cyan>)</font>-<a name="line-354"></a>    <font color=Cyan>,</font> <font color=Green><u>do</u></font> q <font color=Red>&lt;-</font> aquery liftGlobal-<a name="line-355"></a>         return <font color=Cyan>(</font>q<font color=Cyan>,</font> D<font color=Cyan>.</font>ifTxt<font color=Cyan>)</font>-<a name="line-356"></a>    <font color=Red>]</font>-<a name="line-357"></a>-<a name="line-358"></a>-<a name="line-359"></a><a name="iindex"></a><font color=Blue>iindex</font> <font color=Red>::</font> XParser <font color=Red>[</font><font color=Red>[</font>a<font color=Red>]</font><font color=Red>-&gt;</font><font color=Red>[</font>a<font color=Red>]</font><font color=Red>]</font>-<a name="line-360"></a><font color=Blue>iindex</font> <font color=Red>=</font>-<a name="line-361"></a>    <font color=Green><u>do</u></font> i <font color=Red>&lt;-</font> simpleindex-<a name="line-362"></a>       is <font color=Red>&lt;-</font> idxcomma-<a name="line-363"></a>       return <font color=Cyan>(</font>i<font color=Red><b>:</b></font>is<font color=Cyan>)</font>-<a name="line-364"></a>-<a name="line-365"></a><a name="simpleindex"></a><font color=Blue>simpleindex</font> <font color=Red>::</font> XParser <font color=Cyan>(</font><font color=Red>[</font>a<font color=Red>]</font><font color=Red>-&gt;</font><font color=Red>[</font>a<font color=Red>]</font><font color=Cyan>)</font>-<a name="line-366"></a><font color=Blue>simpleindex</font> <font color=Red>=</font> oneOf-<a name="line-367"></a>    <font color=Red>[</font> <font color=Green><u>do</u></font> n <font color=Red>&lt;-</font> number-<a name="line-368"></a>         r <font color=Red>&lt;-</font> rrange n-<a name="line-369"></a>         return r-<a name="line-370"></a>    <font color=Cyan>,</font> <font color=Green><u>do</u></font> symbol <font color=Magenta>"$"</font>-<a name="line-371"></a>         return <font color=Cyan>(</font>C<font color=Cyan>.</font>keep <font color=Cyan>.</font> last<font color=Cyan>)</font>-<a name="line-372"></a>    <font color=Red>]</font>-<a name="line-373"></a>-<a name="line-374"></a><a name="rrange"></a><font color=Blue>rrange</font><font color=Cyan>,</font> numberdollar <font color=Red>::</font> Integer <font color=Red>-&gt;</font> XParser <font color=Cyan>(</font><font color=Red>[</font>a<font color=Red>]</font><font color=Red>-&gt;</font><font color=Red>[</font>a<font color=Red>]</font><font color=Cyan>)</font>-<a name="line-375"></a><font color=Blue>rrange</font> n1 <font color=Red>=</font> oneOf-<a name="line-376"></a>    <font color=Red>[</font> <font color=Green><u>do</u></font> symbol <font color=Magenta>"-"</font>-<a name="line-377"></a>         numberdollar n1-<a name="line-378"></a>    <font color=Cyan>,</font> return <font color=Cyan>(</font>C<font color=Cyan>.</font>keep<font color=Cyan>.</font><font color=Cyan>(</font><font color=Cyan>!!</font><font color=Cyan>(</font>fromInteger n1<font color=Cyan>)</font><font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-379"></a>    <font color=Red>]</font>-<a name="line-380"></a>-<a name="line-381"></a><a name="numberdollar"></a><font color=Blue>numberdollar</font> n1 <font color=Red>=</font> oneOf-<a name="line-382"></a>    <font color=Red>[</font> <font color=Green><u>do</u></font> n2 <font color=Red>&lt;-</font> number-<a name="line-383"></a>         return <font color=Cyan>(</font>take <font color=Cyan>(</font>fromInteger <font color=Cyan>(</font><font color=Magenta>1</font><font color=Cyan>+</font>n2<font color=Blue>-</font>n1<font color=Cyan>)</font><font color=Cyan>)</font> <font color=Cyan>.</font> drop <font color=Cyan>(</font>fromInteger n1<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-384"></a>    <font color=Cyan>,</font> <font color=Green><u>do</u></font> symbol <font color=Magenta>"$"</font>-<a name="line-385"></a>         return <font color=Cyan>(</font>drop <font color=Cyan>(</font>fromInteger n1<font color=Cyan>)</font><font color=Cyan>)</font>-<a name="line-386"></a>    <font color=Red>]</font>-<a name="line-387"></a>-<a name="line-388"></a><a name="idxcomma"></a><font color=Blue>idxcomma</font> <font color=Red>::</font> XParser <font color=Red>[</font><font color=Red>[</font>a<font color=Red>]</font><font color=Red>-&gt;</font><font color=Red>[</font>a<font color=Red>]</font><font color=Red>]</font>-<a name="line-389"></a><font color=Blue>idxcomma</font> <font color=Red>=</font> oneOf-<a name="line-390"></a>    <font color=Red>[</font> <font color=Green><u>do</u></font> symbol <font color=Magenta>","</font>-<a name="line-391"></a>         r <font color=Red>&lt;-</font> simpleindex-<a name="line-392"></a>         rs <font color=Red>&lt;-</font> idxcomma-<a name="line-393"></a>         return <font color=Cyan>(</font>r<font color=Red><b>:</b></font>rs<font color=Cyan>)</font>-<a name="line-394"></a>    <font color=Cyan>,</font> return []-<a name="line-395"></a>    <font color=Red>]</font>-<a name="line-396"></a>-<a name="line-397"></a>-<a name="line-398"></a><a name="op"></a><font color=Blue>op</font> <font color=Red>::</font> XParser <font color=Cyan>(</font>String<font color=Red>-&gt;</font>String<font color=Red>-&gt;</font>Bool<font color=Cyan>)</font>-<a name="line-399"></a><font color=Blue>op</font> <font color=Red>=</font> oneOf-<a name="line-400"></a>    <font color=Red>[</font> <font color=Green><u>do</u></font> symbol <font color=Magenta>"="</font><font color=Cyan>;</font>  return <font color=Cyan>(</font><font color=Cyan>==</font><font color=Cyan>)</font>-<a name="line-401"></a>    <font color=Cyan>,</font> <font color=Green><u>do</u></font> symbol <font color=Magenta>"!="</font><font color=Cyan>;</font> return <font color=Cyan>(</font><font color=Cyan>/=</font><font color=Cyan>)</font>-<a name="line-402"></a>    <font color=Cyan>,</font> <font color=Green><u>do</u></font> symbol <font color=Magenta>"&lt;"</font><font color=Cyan>;</font>  return <font color=Cyan>(</font><font color=Cyan>&lt;</font><font color=Cyan>)</font>-<a name="line-403"></a>    <font color=Cyan>,</font> <font color=Green><u>do</u></font> symbol <font color=Magenta>"&lt;="</font><font color=Cyan>;</font> return <font color=Cyan>(</font><font color=Cyan>&lt;=</font><font color=Cyan>)</font>-<a name="line-404"></a>    <font color=Cyan>,</font> <font color=Green><u>do</u></font> symbol <font color=Magenta>"&gt;"</font><font color=Cyan>;</font>  return <font color=Cyan>(</font><font color=Cyan>&gt;</font><font color=Cyan>)</font>-<a name="line-405"></a>    <font color=Cyan>,</font> <font color=Green><u>do</u></font> symbol <font color=Magenta>"&gt;="</font><font color=Cyan>;</font> return <font color=Cyan>(</font><font color=Cyan>&gt;=</font><font color=Cyan>)</font>-<a name="line-406"></a>    <font color=Red>]</font>-<a name="line-407"></a>-<a name="line-408"></a><a name="nop"></a><font color=Blue>nop</font> <font color=Red>::</font> XParser <font color=Cyan>(</font>Integer<font color=Red>-&gt;</font>Integer<font color=Red>-&gt;</font>Bool<font color=Cyan>)</font>-<a name="line-409"></a><font color=Blue>nop</font> <font color=Red>=</font> oneOf-<a name="line-410"></a>    <font color=Red>[</font> <font color=Green><u>do</u></font> symbol <font color=Magenta>".=."</font><font color=Cyan>;</font>  return <font color=Cyan>(</font><font color=Cyan>==</font><font color=Cyan>)</font>-<a name="line-411"></a>    <font color=Cyan>,</font> <font color=Green><u>do</u></font> symbol <font color=Magenta>".!=."</font><font color=Cyan>;</font> return <font color=Cyan>(</font><font color=Cyan>/=</font><font color=Cyan>)</font>-<a name="line-412"></a>    <font color=Cyan>,</font> <font color=Green><u>do</u></font> symbol <font color=Magenta>".&lt;."</font><font color=Cyan>;</font>  return <font color=Cyan>(</font><font color=Cyan>&lt;</font><font color=Cyan>)</font>-<a name="line-413"></a>    <font color=Cyan>,</font> <font color=Green><u>do</u></font> symbol <font color=Magenta>".&lt;=."</font><font color=Cyan>;</font> return <font color=Cyan>(</font><font color=Cyan>&lt;=</font><font color=Cyan>)</font>-<a name="line-414"></a>    <font color=Cyan>,</font> <font color=Green><u>do</u></font> symbol <font color=Magenta>".&gt;."</font><font color=Cyan>;</font>  return <font color=Cyan>(</font><font color=Cyan>&gt;</font><font color=Cyan>)</font>-<a name="line-415"></a>    <font color=Cyan>,</font> <font color=Green><u>do</u></font> symbol <font color=Magenta>".&gt;=."</font><font color=Cyan>;</font> return <font color=Cyan>(</font><font color=Cyan>&gt;=</font><font color=Cyan>)</font>-<a name="line-416"></a>    <font color=Red>]</font>-<a name="line-417"></a>-</pre>-</body>-</html>
− docs/Haskell2Xml.html
@@ -1,80 +0,0 @@-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">-<html> <head> <title> HaXml: Haskell and XML </title> </head>--<body bgcolor='#ffffff'>--<center>-<h2>Haskell2Xml</h2>-</center>-<hr>--<p>-<b>Text.XML.HaXml.Haskell2Xml</b> is a library for translating Haskell-data from any program into a valid XML document (and back again), by-generating a DTD and the appropriate functions to write and write the-XML format.  In principle, it gives an alternative to the standard Read-and Show classes, and allows you to use other standard XML-processing-tools on your Haskell datafiles.--<p>-<b>Usage.</b>-It works rather like the existing <em>Read</em> and <em>Show</em>-classes: you must create an instance of the <em>Haskell2Xml</em>-class for every datatype you wish to use for I/O.  However, because-this class is not a standard one, no Haskell compilers support-the <tt>deriving</tt> clause for it yet.  Fear not!  There is a-pre-processor tool called-<a href="http://repetae.net/~john/computer/haskell/DrIFT/"><b>DrIFT</b></a>-which derives class instances automatically.  We have extended-DrIFT's ruleset to include the <em>Haskell2Xml</em> class.-The only remaining thing is to ensure that you import the-<b>Text.XML.HaXml.Haskell2Xml</b> module everywhere you use it.--<p>-(Please note that DrIFT is sometimes a bit fragile when parsing Haskell-sources - it occasionally fails to recognise the <em>derive</em>-command.  We have found a workaround: isolate just the <tt>data</tt>-type declarations that are of interest, and run DrIFT on them-separately.)  The syntax required is like this example:-<pre>-  data MyType a = A a | B String deriving (Eq, Show)-      {-! derive : Haskell2Xml !-}	-- this line is for DrIFT-</pre>--<p>-To read and write Haskell data values as XML files, you-have a choice of function pairs:  <tt>toXML/fromXML</tt>-convert between typed Haskell values and the generic internal-XML representation; <tt>showXml/readXml</tt> convert to/from-Strings; <tt>fWriteXml/fReadXml</tt> convert to/from named files;-<tt>hPutXml/hGetXml</tt> convert to/from file Handles.--<pre>-    toXml     :: Haskell2Xml a =&gt; a        -&gt; Document-    fromXml   :: Haskell2Xml a =&gt; Document -&gt; a--    readXml   :: Haskell2Xml a =&gt; String   -&gt; Maybe a-    showXml   :: Haskell2Xml a =&gt; a        -&gt; String--    fReadXml  :: Haskell2Xml a =&gt; FilePath -&gt; IO a-    fWriteXml :: Haskell2Xml a =&gt; FilePath -&gt; a -&gt; IO ()--    hGetXml   :: Haskell2Xml a =&gt; Handle   -&gt; IO a-    hPutXml   :: Haskell2Xml a =&gt; Handle   -&gt; a -&gt; IO ()-</pre>--<p>-(These signatures are extremely similar to those in-<a href="Xml2Haskell.html">Xml2Haskell</a> - the only difference is-the class context, indicating how the types have been derived.)--<p>-Do not forget to resolve the overloading in one of the usual ways-(e.g. by implicit context at point of use, by explicit type signatures-on values, use value as an argument to a function with an explicit-signature, use <tt>`asTypeOf`</tt>, etc.)--<hr>--</body>-</html>
− docs/Xml2Haskell.html
@@ -1,104 +0,0 @@-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">-<html>-<head>-<title>-  HaXml: Haskell and XML-</title>-</head>--<body bgcolor='#ffffff'>--<center>-<h2>DtdToHaskell tool</h2>-</center>-<hr>--<p>-<b>DtdToHaskell</b> is a tool (and <b>Text.XML.HaXml.Xml2Haskell</b>-provides the class framework) for translating any valid XML DTD-into equivalent Haskell types.  This allows you to generate, edit,-and transform documents as normal typed values in programs, and to-read and write them as human-readable XML documents.--<p>-Usage: <tt>DtdToHaskell [dtdfile [outfile]]</tt><br>-(Missing file arguments or dashes (<tt>-</tt>) indicate stdin- or stdout respectively.)--<p>-The program reads and parses a DTD from <tt>dtdfile</tt> (which may be-either just a DTD, or a full XML document containing an internal DTD).-It generates into <tt>outfile</tt> a Haskell module containing a-collection of type definitions plus some class instance declarations-for I/O.--<p>-In order to use the resulting module, you need to import it, and also-to <tt>import Text.XML.HaXml.Xml2Haskell</tt>.  To read and write-XML files as values of the declared types, use some of the following-convenience functions:-<pre>-    readXml   :: XmlContent a =&gt; String -&gt; Maybe a-    showXml   :: XmlContent a =&gt; a -&gt; String--    hGetXml   :: XmlContent a =&gt; Handle -&gt; IO a-    hPutXml   :: XmlContent a =&gt; Handle -&gt; a -&gt; IO ()--    fReadXml  :: XmlContent a =&gt; FilePath -&gt; IO a-    fWriteXml :: XmlContent a =&gt; FilePath -&gt; a -&gt; IO ()-</pre>-not forgetting to resolve the overloading in one of the usual-ways (e.g. by implicit context at point of use, by explicit type-signatures on values, use value as an argument to a function with-an explicit signature, use <tt>`asTypeOf`</tt>, etc.)  (Also, note-the similarity between these signatures and those provided by the-<a href="Haskell2Xml.html">Haskell2Xml</a> library.)--<p>-You will need to study the automatically-generated type declarations to-write your own transformation scripts - most things are pretty obvious-parallels to the DTD structure.--<p>-<b>Limitations</b><br>-The generated Haskell contains references to types like <tt>OneOf3</tt>-where there is a choice between <em>n</em> (in this case 3) different-tags.  Currently, the module <b>Text.XML.HaXml.OneOfN</b> defines-these types up to <em>n</em>=20.  If your DTD requires larger choices,-then use the tool <b>MkOneOf</b> to generate the extra size or range-of sizes you need.-<p>-We mangle tag names and attribute names to ensure that they have the-correct lexical form in Haskell, but this means that (for instance) we-can't distinguish <tt>Myname</tt> and <tt>myname</tt>, which are-different names in XML but translate to overlapping types in Haskell-(and hence probably won't compile).-<p>-Attribute names translate into named fields: but because Haskell doesn't-allow different types to have the same named field, this means your XML-document which uses the same name for similar attributes on different-tags would crash and burn.  We have fixed this by incorporating the-tagname into the named field in addition to the attribute name, e.g.-<tt>tagAttr</tt> instead of just <tt>attr</tt>.  Uglier, but more-portable.-<p>-XML namespaces.  Currently, we just mangle the namespace identifier into-any tag name which uses it.  Probably the right way to do it is to-regard the namespace as a separate imported module, and hence translate-the namespace prefix into a module qualifier.  Does this sound about-right?  (It isn't implemented yet.)-<p>-External subset.  Since HaXml release 1.00, we support the-XML DTD external subset.  This means we can read and parse a whole-bunch of files as part of the same DTD, and we respect INCLUDE and-IGNORE conditional sections.-<p>-There are some fringe parts of the DTD we are not entirely sure-about - Tokenised Types and Notation Types.  In particular, there-is no validity checking of these external references.  If you find-a problem, mail us: <tt>Malcolm.Wallace@cs.york.ac.uk</tt>--<hr>--</body>-</html>
− docs/XmlContent.html
@@ -1,88 +0,0 @@-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">-<html> <head> <title> HaXml: Haskell and XML </title> </head>--<body bgcolor='#ffffff'>--<center>-<h2>XmlContent</h2>-</center>-<hr>--<p>-<b>Text.XML.HaXml.XmlContent</b> is a library/class for translating-Haskell data from any program into a valid XML document (and back-again).  In principle, it gives an alternative to the standard Read and-Show classes, allowing you to use fully typed data in Haskell rather-than the generic XML tree representation.--<p>-<b>Usage 1.</b>-It works rather like the existing <em>Read</em> and <em>Show</em>-classes: you must create an instance of the <em>XmlContent</em>-class for every datatype you wish to use for I/O.  However, because-this class is not a standard one, no Haskell compilers support-the <tt>deriving</tt> clause for it yet.  Fear not!  There is a-pre-processor tool called-<a href="http://repetae.net/~john/computer/haskell/DrIFT/"><b>DrIFT</b></a>-which derives class instances automatically.  We have extended-DrIFT's ruleset to include the <em>XmlContent</em> class.--<p>-(Please note that DrIFT is sometimes a bit fragile when parsing Haskell-sources - it occasionally fails to recognise the <em>derive</em>-command.  We have found a workaround: isolate just the <tt>data</tt>-type declarations that are of interest, and run DrIFT on them-separately.)  The syntax required is like this example:-<pre>-  data MyType a = A a | B String deriving (Eq, Show)-      {-! derive : XmlContent !-}	-- this line is for DrIFT-</pre>--<p>-<b>Usage 2.</b>-Alternatively, you may start by having XML documents with a standard DTD-defined elsewhere, e.g. SVG, SMIL, MathML etc.  You can convert the DTD-into an isomorphic collection of Haskell datatypes, including all the-requisite instances of <em>XmlContent</em>, with the tool-<em>DtdToHaskell</em> included in HaXml.---<p>-<b>API</b>-To read and write Haskell data values as XML files, you-have a choice of function pairs:  <tt>toXML/fromXML</tt>-convert between typed Haskell values and the generic internal-XML representation; <tt>showXml/readXml</tt> convert to/from-Strings; <tt>fWriteXml/fReadXml</tt> convert to/from named files;-<tt>hPutXml/hGetXml</tt> convert to/from file Handles.--<pre>-    toXml     :: XmlContent a =&gt; Bool -&gt; a  -&gt; Document ()-    fromXml   :: XmlContent a =&gt; Document Posn -&gt; Either String a--    readXml   :: XmlContent a =&gt; String        -&gt; Either String a-    showXml   :: XmlContent a =&gt; Bool -&gt; a  -&gt; String--    fReadXml  :: XmlContent a =&gt; FilePath -&gt; IO a-    fWriteXml :: XmlContent a =&gt; FilePath -&gt; a -&gt; IO ()--    hGetXml   :: XmlContent a =&gt; Handle   -&gt; IO a-    hPutXml   :: XmlContent a =&gt; Handle   -&gt; Bool -&gt; a -&gt; IO ()-</pre>--Because parsing the document might fail, some of these functions return-an Either String, where the string contains an error message.  Boolean-arguments to output-writing functions indicate whether or not to include-a DTD in the output.--<p>-Particularly when you read from XML, you may need to resolve the-overloading of the result value in one of the usual ways (e.g. by-implicit context at point of use, by explicit type signatures on values,-use value as an argument to a function with an explicit signature, use-<tt>`asTypeOf`</tt>, etc.)--<hr>--</body>-</html>
− docs/Xtract.html
@@ -1,451 +0,0 @@-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">-<HTML>-    <HEAD>-	<TITLE>Xtract: a query language for XML documents</TITLE>-    </HEAD>-    <BODY>-	<CENTER>-	    <H1><EM>Xtract</EM>: a query language for XML documents</H1>-	</CENTER>-	<CENTER>-	    <EM>Malcolm Wallace, </EM>-	    <EM>Colin Runciman</EM>-	    <BR />-	    University of York-	</CENTER>-	<CENTER><B>December 1998,<BR />-                updated June, August 1999, February 2000</B></CENTER>-	<H2>Introduction</H2>-	<P> <EM>Xtract</EM>-	    is a query language based originally on XQL, which was a-	    W3C proposal that eventually mutated into XPath and XQuery.-	    The syntax of Xtract is very similar to XPath, although-	    not completely conformant.-	</P>-	<P> The idea of -	    <EM>Xtract</EM>-	    is that it can be used as a kind of XML-grep at the -	    command-line, but it could also be used within a scripting -	    language (such as the Haskell XML combinator library) as a -	    shorthand for a complicated selection filter. -	</P>-	<P> All queries return a sequence of XML document fragments-            (either whole tagged elements or text contained inside an -	    element): for our purposes, we also treat attribute -	    values as document fragments. -	</P>-	<P>This document describes the expression language for queries. -    </P>-	<H2>Queries</H2>-	<P> Just as in XPath, a query looks rather like a Unix file path, -	    where the ``directories'' are tags of parent nodes, and the -	    <TT>/</TT>-	    separator indicates a parent/child relationship. Hence, -	    <PRE>    matches/match/player </PRE>-	    selects the -	    <TT>player</TT>-	    elements inside -	    <TT>match</TT>-	    elements inside a -	    <TT>matches</TT>-	    element. The star -	    <TT>*</TT>-	    can be used as a wildcard meaning any tagged element, thus: -	    <PRE>    matches/*/player </PRE>-	    means the -	    <TT>player</TT>-	    elements inside -	    <EM>any</EM>-	    element within a -	    <TT>matches</TT>-	    element. The star can also be used as a suffix or prefix to -	    match a range of tags: -	    [-	    Note that this is -	    <EM>not</EM>-	    a full regular expression language: we just provide for the -	    common cases of wildcards.-	    ]-	    <PRE>    html/h* </PRE>-	    means all the headings (-	    <TT>&lt;H1&gt;</TT>-	    to -	    <TT>&lt;H6&gt;</TT>-	    ) within an HTML document (and HR too!). A double slash-            indicates a recursive search for an element tag, so -	    <PRE>    matches//player </PRE>-	    means all -	    <TT>player</TT>-	    elements found at any depth within a -	    <TT>matches</TT>-	    element. The plain text enclosed within a tagged element is -	    expressed with a dash symbol: -	    <PRE>    matches/location/- </PRE>-	    means the plain text of the location, without any surrounding -	    <TT>&lt;location&gt;</TT>-	    tags. Likewise, -	    <PRE>    *//- </PRE>-	    simply means to flatten the text of the document at all -	    levels, removing all tagged element structure. The union of -	    two queries is expressed with the -	    <TT>+</TT>-	    operator and parentheses if required: -	    <PRE>    matches/match/(player + spectators) </PRE>-	    gives both the players and spectators at a match.-            Finally, -	    <PRE>    matches//player/@goals </PRE>-            returns the value of the attribute `goals' on the selected-            player elements, if the attribute appears.-	<H2>Predicates</H2>-	There is a notion of a predicate on an element. The square -	bracket notation is used: -	<PRE>    matches/match[player] </PRE>-	means all -	<TT>match</TT>-	elements which contain at least one -	<TT>player</TT>-	element. It is the match elements that are returned, not -	the players they contain. One can also ask for the presence -	of a particular attribute: -	<PRE>    *//player[@goals] </PRE>-	means those players (found anywhere within the tree) who -	scored any goals. You can compare attribute values using -	any of the operators -	<TT>=</TT>-	, -	<TT>!=</TT>-	, -	<TT>&lt;</TT>-	, -	<TT>&lt;=</TT>-	, -	<TT>&gt;</TT>-	, -	<TT>&gt;=</TT>-	all of which use -	<EM>lexicographical</EM>-	ordering. In this example: -	<PRE>    */match[player/@surname!=referee/@surname] </PRE>-	we only want those matches in which the referee does not -	have the same surname as any of the players. A comparison -	may be either against another attribute value, or against a -	literal string; however a literal string may only appear to -	the -	<EM>right</EM>-	of the operator symbol. For instance, -	<PRE>    */match[player/@name='colin'] </PRE>-	asks for only those matches in which the player named -	``colin'' participated. If lexicographical comparison is -	inappropriate, numeric comparisons are also possible: these -	comparison operators are surrounded by dots: -	<TT>.=.</TT>-	, -	<TT>.!=.</TT>-	, -	<TT>.&lt;.</TT>-	, -	<TT>.&lt;=.</TT>-	, -	<TT>.&gt;.</TT>-	, -	<TT>.&gt;=.</TT>-	Again, either two attribute values are compared, or one -	attribute value is compared with a literal integer. For -	instance -	<PRE>    */match[@ourgoals .&gt;. @theirgoals] </PRE>-	asks for the matches we won, while -	<PRE>    */match[@ourgoals .&lt;=. 3] </PRE>-	asks for the matches in which we scored three or fewer -	goals. (Note that the literal integer is not surrounded by -	quote marks.) -        <P>-          In addition to comparing attribute values, you can also-          compare the textual content of elements.  For instance,-	  <PRE>    */match[player/- = 'Colin'] </PRE>-          asks for the matches in which ``Colin'' participated,-          where the name is recorded between the player tags, rather-          than as an attribute.  All the same conditions and operations-          apply as for attribute value comparisons.  Note however that-          you can only compare texts, not whole structures.--	<H2>Combining predicates</H2>-	Predicates can be combined using the common Boolean operations -	<TT>&amp;</TT>-	<TT>|</TT>-	and -	<TT>~</TT>-	, with parentheses for disambiguation if they are required: -	<PRE>-	        -	    */match/[@ourgoals .=. @theirgoals | (player/@name='colin' -	    &amp; ~(@opposition='city'))] -	</PRE>-	means the matches which either ended in a draw, or in which -	``colin'' played but the opposition was not ``city''. -	<H2>Positional selection</H2>-	The final feature of -	<EM>Xtract</EM>-	is that the square bracket notation is overloaded to allow -	the selection of elements by position: -	<PRE>    */match[3] </PRE>-	means the fourth match in the sequence (numbering starts at -	zero). You can have a series of indexes, separated by -	commas, and ranges are indicated with a dash. The dollar -	symbol means the last in the sequence. For example: -	<PRE>    */match[0,2-$,1] </PRE>-	reorders the matches to place the second one last. -	<H2>Complex queries</H2>-	The full expression language is highly recursive, -	permitting you to build arbitrarily complex queries. For -	instance: -	<PRE>    */match[player/@name='colin'][5-$]/referee[@age.&gt;=.34] -    </PRE>-	means: from the sixth onwards, of those matches in which -	``colin'' was a player, select those referees who are older -	than 34. -	<H2>Grammar</H2>-	<P>We give a full grammar for <EM>Xtract</EM>. </P>-	<TABLE>-	    <TR>-		<TD><EM>textquery</EM></TD>-		<TD>= </TD>-		<TD><EM>query</EM></TD>-		<TD>elements</TD>-	    </TR>-	    <TR><TD /><TD>| </TD><TD><TT>-</TT></TD><TD>plain text</TD></TR>-	    <TR></TR>-	    <TR>-		<TD><EM>query</EM></TD>-		<TD>= </TD>-		<TD><EM>string</EM></TD>-		<TD>tagged element</TD>-	    </TR>-	    <TR>-		<TD />-		<TD>| </TD>-		<TD><EM>string</EM><TT>*</TT></TD>-		<TD>prefix of tag</TD>-	    </TR>-	    <TR>-		<TD />-		<TD>| </TD>-		<TD><TT>*</TT><EM>string</EM></TD>-		<TD>suffix of tag</TD>-	    </TR>-	    <TR><TD /><TD>| </TD><TD><TT>*</TT></TD><TD>any element</TD></TR>-	    <TR>-		<TD />-		<TD>| </TD>-		<TD><TT>( </TT><EM>textquery </EM><TT>)</TT></TD>-		<TD>grouping</TD>-	    </TR>-	    <TR>-		<TD />-		<TD>| </TD>-		<TD><EM>query</EM><TT>/</TT><EM>textquery</EM></TD>-		<TD>direct descendant</TD>-	    </TR>-	    <TR>-		<TD />-		<TD>| </TD>-		<TD><EM>query</EM><TT>//</TT><EM>textquery</EM></TD>-		<TD>deep descendant</TD>-	    </TR>-	    <TR>-		<TD />-		<TD>| </TD>-		<TD><EM>query</EM><TT>/@</TT><EM>string</EM></TD>-		<TD>value of attribute</TD>-	    </TR>-	    <TR>-		<TD />-		<TD>| </TD>-		<TD><EM>query </EM><TT>+ </TT><EM>textquery</EM></TD>-		<TD>union</TD>-	    </TR>-	    <TR>-		<TD />-		<TD>| </TD>-		<TD><EM>query</EM><TT>[</TT><EM>predicate</EM><TT>] </TT></TD>-		<TD>predicates</TD>-	    </TR>-	    <TR>-		<TD />-		<TD>| </TD>-		<TD><EM>query</EM><TT>[</TT><EM>positions</EM><TT>] </TT></TD>-		<TD>indexing</TD>-	    </TR>-	    <TR></TR>-	    <TR>-		<TD><EM>qa</EM></TD>-		<TD>= </TD>-		<TD><EM>textquery</EM></TD>-		<TD>has tagged element</TD>-	    </TR>-	    <TR>-		<TD /><TD>| </TD><TD><EM>attribute</EM></TD><TD>has attribute</TD>-	    </TR>-	    <TR></TR>-	    <TR>-		<TD><EM>predicate</EM></TD>-		<TD>= </TD>-		<TD><EM>qa</EM></TD>-		<TD>has tagged element or attribute</TD>-	    </TR>-	    <TR>-		<TD />-		<TD>| </TD>-		<TD><EM>qa </EM><EM>op </EM><EM>qa</EM></TD>-		<TD>lexical comparison of attribute values or element texts</TD>-	    </TR>-	    <TR>-		<TD />-		<TD>| </TD>-		<TD>-		    <EM>qa </EM><EM>op </EM><TT>'</TT><EM>string</EM><TT>'</TT>-		</TD>-		<TD>lexical comparison of attribute value or element text</TD>-	    </TR>-	    <TR>-		<TD />-		<TD>| </TD>-		<TD>-		    <EM>qa </EM><EM>op </EM><TT>"</TT><EM>string</EM><TT>"</TT>-		</TD>-		<TD>lexical comparison of attribute value or element text </TD>-	    </TR>-	    <TR>-		<TD />-		<TD>| </TD>-		<TD><EM>qa </EM><EM>nop </EM><EM>qa</EM></TD>-		<TD>numeric comparison of attribute values or element texts</TD>-	    </TR>-	    <TR>-		<TD />-		<TD>| </TD>-		<TD><EM>qa </EM><EM>nop </EM><EM>integer</EM></TD>-		<TD>numeric comparison of attribute value or element text</TD>-	    </TR>-	    <TR>-		<TD />-		<TD>| </TD>-		<TD><TT>( </TT><EM>predicate </EM><TT>)</TT></TD>-		<TD>grouping</TD>-	    </TR>-	    <TR>-		<TD />-		<TD>| </TD>-		<TD><EM>predicate </EM><TT>&amp; </TT><EM>predicate</EM></TD>-		<TD>logical and</TD>-	    </TR>-	    <TR>-		<TD />-		<TD>| </TD>-		<TD><EM>predicate </EM><TT>| </TT><EM>predicate</EM></TD>-		<TD>logical or</TD>-	    </TR>-	    <TR>-		<TD />-		<TD>| </TD>-		<TD><TT>~ </TT><EM>predicate</EM></TD>-		<TD>logical not</TD>-	    </TR>-	    <TR></TR>-	    <TR>-		<TD><EM>attribute</EM></TD>-		<TD>= </TD>-		<TD><TT>@</TT><EM>string</EM></TD>-		<TD>attribute of this element</TD>-	    </TR>-	    <TR>-		<TD />-		<TD>| </TD>-		<TD><EM>query</EM><TT>/@</TT><EM>string</EM></TD>-		<TD>attribute of descendant</TD>-	    </TR>-	    <TR></TR>-	    <TR>-		<TD><EM>positions</EM></TD>-		<TD>= </TD>-		<TD><EM>position </EM>{ <TT>, </TT><EM>positions</EM>} </TD>-		<TD>comma-separated sequence</TD>-	    </TR>-	    <TR>-		<TD />-		<TD>| </TD>-		<TD><EM>position </EM><TT>- </TT><EM>position</EM></TD>-		<TD>range</TD>-	    </TR>-	    <TR></TR>-	    <TR>-		<TD><EM>position</EM></TD>-		<TD>= </TD>-		<TD><EM>integer</EM></TD>-		<TD>positions start at zero</TD>-	    </TR>-	    <TR><TD /><TD>| </TD><TD><TT>$</TT></TD><TD>last element</TD></TR>-	    <TR></TR>-	    <TR>-		<TD><EM>op</EM></TD>-		<TD>= </TD>-		<TD><TT>=</TT></TD>-		<TD>lexical equality</TD>-	    </TR>-	    <TR>-		<TD /><TD>| </TD><TD><TT>!=</TT></TD><TD>lexical inequality</TD>-	    </TR>-	    <TR>-		<TD /><TD>| </TD><TD><TT>&lt;</TT></TD><TD>lexically less than</TD>-	    </TR>-	    <TR>-		<TD />-		<TD>| </TD>-		<TD><TT>&lt;=</TT></TD>-		<TD>lexically less than or equal</TD>-	    </TR>-	    <TR>-		<TD />-		<TD>| </TD>-		<TD><TT>&gt;</TT></TD>-		<TD>lexically greater than</TD>-	    </TR>-	    <TR>-		<TD />-		<TD>| </TD>-		<TD><TT>&gt;=</TT></TD>-		<TD>lexically greater than or equal</TD>-	    </TR>-	    <TR></TR>-	    <TR>-		<TD><EM>nop</EM></TD>-		<TD>= </TD>-		<TD><TT>.=.</TT></TD>-		<TD>numeric equality</TD>-	    </TR>-	    <TR>-		<TD /><TD>| </TD><TD><TT>.!=.</TT></TD><TD>numeric inequality</TD>-	    </TR>-	    <TR>-		<TD /><TD>| </TD><TD><TT>.&lt;.</TT></TD><TD>numeric less than</TD>-	    </TR>-	    <TR>-		<TD />-		<TD>| </TD>-		<TD><TT>.&lt;=.</TT></TD>-		<TD>numeric less than or equal</TD>-	    </TR>-	    <TR>-		<TD />-		<TD>| </TD>-		<TD><TT>.&gt;.</TT></TD>-		<TD>numeric greater than</TD>-	    </TR>-	    <TR>-		<TD />-		<TD>| </TD>-		<TD><TT>.&gt;=.</TT></TD>-		<TD>numeric greater than or equal</TD>-	    </TR>-	</TABLE>-    </BODY>-</HTML>
− docs/brubeck.gif

binary file changed (9688 → absent bytes)

− docs/changelog.html
@@ -1,413 +0,0 @@-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">-<html>-<head>-<title>-  HaXml change log-</title>-</head>--<body bgcolor='#ffffff'>--<center>-<h1>HaXml change log</h1>-</center>-<hr>--<h3>Changes in 1.19</h3>-<p>-<ul>-<li> Improved the lazy XML parsing, and fixed some space leaks-     in the XtractLazy tool.-<li> Version 1.19.2 updates the Cabal file to enable HaXml to build with both-     ghc-6.6.x and ghc-6.8.x.-<li> Version 1.19.4 fixes an incompatibility with some versions of the-     Bytestring package.  Also has a bugfix in the DTD validator, and-     adds some new utility functions in Text.XML.HaXml.Util.-<li> Version 1.19.5 adds XmlContent instances for larger (up to 15-) tuples.-     It also fixes a couple of bugs in DtdToHaskell, when dealing with-     larger datatypes (more than 26 components) and duplicate ATTLIST-     specifications.-<li> Version 1.19.6 fixes some tag-name bugs when converting datatypes-     generated by DtdToHaskell back into an XML file value.-<li> Version 1.19.7 requires package polyparse-1.2 (earlier versions-     require polyparse-1.1).- </ul>--<h3>Changes in 1.18</h3>-<p>-<ul>-<li> Removed all the Text.ParserCombinator.* libraries into a separate-     package <a href="http://www.cs.york.ac.uk/fp/polyparse">polyparse</a>,-     which must now be installed prior to HaXml.-<li> New Feature: functions for pretty-printing to Data.ByteString.-<li> Bugfix: Xtract on HTML documents used to downcase both the-     document tags and the query string.  But in fact only the-     tag-matching parts of the query should be downcased.  In-     particular, attribute values now remain case-sensitive.-<li> Bugfix: Xtract did not match attribute values that contained any-     kind of entity reference (general or character).  Now matches-     correctly.-<li> More fixes to the non-Cabal route for building/installing with ghc-6.6.-<li> Changed the name of the Xtract combinators to match the ordinary-     combinators.-<li>-</ul>--<h3>Changes in 1.17</h3>-<p>-<ul>-<li> New: lazier pretty-printer-     <ul>-     <li> <tt>Text.XML.HaXml.ShowXmlLazy</tt>-     </ul>-<li> Works with ghc-6.6 (changed uses of Data.FiniteMap to Data.Map).-<li> A bunch of minor bugfixes.-<li>-</ul>--<h3>Changes in 1.16</h3>-<p>-<ul>-<li> New: lazier parsers-     <ul>-     <li> <tt>Text.XML.HaXml.ParseLazy</tt>-     <li> <tt>Text.XML.HaXml.Html.ParseLazy</tt>-     <li> <tt>Text.ParserCombinators.PolyLazy</tt>-     <li> <tt>Text.ParserCombinators.PolyStateLazy</tt>-     </ul>-<li> New: lazier tools-     <ul>-     <li> <tt>CanonicaliseLazy</tt>-     <li> <tt>XtractLazy</tt>-     </ul>-<li> New: API call "xmlParseWith"-<li> Bugfix: to permit percent character in attribute values.-<li> Bugfix: to parse unquoted attribute values starting '+' or '#' in HTML.-<li> Bugfix: to keep the original DTD in output of 'processXmlWith'.-<li> Bugfixes: to configuration/build systems.-<li> Bugfix: DtdToHaskell nows avoids generating types whose names clash-             with existing (Prelude,HaXml) types-<li>-</ul>--<h3>Changes in 1.15</h3>-<p>-<ul>-<li> New: DrIFT and DtdToHaskell have now both been fully updated to-     produce instances of XmlContent.-<li> New: the parser combinator library Poly has been split into two-     variations, Poly and PolyState.  They have almost the same API,-     only the latter includes a running state where the former does not.-<li> The TextParser library (a replacement for the Haskell'98 Read class)-     has also been improved with more new combinators.  Really, these-     parser combinator experiments do not belong in HaXml, and will-     eventually be split out into a separate package.-</ul>--<h3>Changes in 1.14</h3>-<p>-<ul>-<li> New: Completely replace the Xml2Haskell and Haskell2Xml modules.-     They are now combined into a single class called XmlContent.-     This makes the secondary parsing of generic XML trees-     to typed values more robust, with better error messages, etc.-     DrIFT and DtdToHaskell are being updated to both produce instances-     of XmlContent, depending on whether you start from Haskell or from-     the DTD.  (not yet complete)-<li> New: a SAX-like stream parser for XML events.-<li> Improve the content handling that corresponds to an ANY contentspec.-     (Now represented as an existential type.)-<li> Bugfix: accept attribute values containing the % character, without-     starting a PERef.-<li> Bugfix: for expanding PERefs correctly in entity values.-<li> The DTD for SVG (Scalable Vector Graphics) now goes through DtdToHaskell-     successfully.-</ul>--<h3>Changes for 1.13.1 </h3>-<p>-<ul>-<li> Bugfix: to permit percent character in attribute values.-<li> Bugfix: to parse unquoted attribute values starting '+' or '#' in HTML.-<li> Bugfix: to keep the original DTD in output of 'processXmlWith'.-</ul>--<h3>Changes for 1.13 </h3>-<p>-<ul>-<li> Bugfixes to the document validator: no more infinite loops.-<li> Bugfixes to lexing mixed text and references between quote chars.-<li> Support for building with Cabal, and for ghc-6.4's new package format.-</ul>--<h3>Changes for 1.12</h3>-<p>-<ul>-<li> The licence has changed.  Previously covered by the Artistic Licence,-     we have now converted to the LGPL for all the library code, and GPL-     for the standalone tools.-<li> Now includes a minimal Build.bat script for Windows, so you can-     avoid any need for Cygwin utilities and get by with just GHC-     and Mingw.-<li> Fix a bug in DtdToHaskell, whereby an auxiliary datatype introduced-     by the translation into Haskell could (in certain circumstances)-     cause an extra layer of element tag nesting on the output (via the-     'toElem' method).-<li> Fixed the parsing of entity/character references in the error-correcting-     HTML parser.-<li> Changes in the signatures of Xml2Haskell (made in version 1.09)-     have now been mirrored in the converse library, Haskell2Xml.-     Thus, there are new functions <tt>readXml</tt> and-     <tt>showXml</tt> converting to/from Strings, <tt>hGetXml</tt>-     and <tt>hPutXml</tt> use file Handles, and the old functions using-     filenames are renamed to <tt>fReadXml</tt> and <tt>fWriteXml</tt>.-</ul>--<h3>Changes for 1.11</h3>-<p>-<ul>-<li> Fix a tiny but embarrassing bug in the previous fix for complex-     DTDs being translated by DtdToHaskell.  It broke on a very simple-     DTD like<br>-     &nbsp;&nbsp;&nbsp;&nbsp;<tt>&lt;!ELEMENT A (B|C)&gt;</tt><br>-     which became sequence<br>-     &nbsp;&nbsp;&nbsp;&nbsp;<tt>data A = A B C</tt><br>-     instead of choice<br>-     &nbsp;&nbsp;&nbsp;&nbsp;<tt>data A = AB B | AC C</tt><br>-</ul>--<h3>Changes for 1.10</h3>-<p>-<ul>-<li> All being well, HaXml now works again for Hugs (versions &ge;-     September 2003).  The library sources are installed using-     <em>hugs-package</em>, and the tools are installed as scripts-     for <em>runhugs</em>.-<li> Fixed the internal (and external) representations of XML character-     references.-<li> New combinators to `escape' and `unescape' reserved XML characters in-     text and attribute values has been contributed by George Russell.-     (e.g. to convert "&lt;" into "&amp;lt;".)-<li> Bugfixes to DtdToHaskell: A DTD content specification of the form<br>-    &nbsp;&nbsp;&nbsp;&nbsp;<tt>&lt;!ELEMENT A (B*,(C|(D?,E*)))&gt;</tt><br>-     was incorrectly translated to the Haskell<br>-    &nbsp;&nbsp;&nbsp;&nbsp;<tt>data A = A [B] (OneOf3 C (Maybe D) [E])</tt><br>-     but the new (correct) translation is<br>-    &nbsp;&nbsp;&nbsp;&nbsp;<tt>data A = A [B] (OneOf2 C (Maybe D,[E]))</tt><br>-</ul>--<h3>Changes for 1.09</h3>-<p>-<ul>-<li> <em>ghc-6.0</em> (and newer) are supported.-<li> <em>hmake</em> is no longer required to build HaXml, provided you-     have <em>ghc --make</em>.-<li> A new combinator <tt>path</tt> has been added to-     Text.XML.HaXml.Combinators, allowing queries to be expressed in the-     style of XPath.-<li> Some of the signatures in Text.XML.HaXml.Xml2Haskell have changed,-     in particular, there are new functions <tt>readXml</tt> and-     <tt>showXml</tt> that convert to/from Strings, <tt>hGetXml</tt> and-     <tt>hPutXml</tt> that use file Handles, and the old functions that-     use filenames are renamed to <tt>fReadXml</tt> and <tt>fWriteXml</tt>.-<li> DtdToHaskell previously generated incorrect code for reading an XML element-     given the following DTD fragment: <pre>&lt;!ELEMENT foo (a,b)+ &gt;</pre>-<li> The parser had a fault when reading conditional sections nested inside an-     IGNORE section in a DTD.-<li> In Text.XML.HaXml.Html.Generate, all functions now generate HTML tags-     in lower-case rather than upper-case, to conform to the XHTML standard.-<li> DtdToHaskell now accepts NOTATION types for attributes.  They are-     treated just like enumeration types.-<li> If you give an output filename as a command-line argument to DtdToHaskell,-     it now uses the filename as the basis for the generated module name.-<li> Fixed a configuration bug on the Cygwin platform with ghc-5.04.x.-<li> <em>make install</em> now places the executables (DtdToHaskell, Xtract,-     Validate, MkOneOf, Canonicalise) into the directory specified by-     <tt>./configure --prefix=...</tt>-</ul>--<h3>Changes for 1.08a</h3>-<p>-<ul>-<li> There were some simple import naming problems in some of the-     demonstration files in the examples/ directory.-<li> Embarrassingly, the string value of Text.XML.HaXml.version, previously-     "1.07", is only now updated to "1.08".-</ul>--<h3>Changes for 1.08</h3>-<p>-<ul>-<li> A new and highly useful function, Text.XML.HaXml.Validate.partialValidate,-     does validation except for checking whether the root element type matches-     that of the DTD's root element.  This is just what you need in order to-     validate any partial document or sub-document.-<li> The function Text.XML.HaXml.Html.Generate.htmlprint had a little-     bug which caused it to loop infinitely if some text was longer-     than 60 characters without a space.-<li> The Xtract parser and combinators are now included in the HaXml-     library package, rather than existing solely for the Xtract-     command-line tool.-<li> Dependencies in ghc-5.04.x are fixed.  You can now build HaXml for a-     specific compiler version, using e.g.-     <em>configure --buildwith=ghc-5.0x.x</em>.-</ul>--<h3>Changes for 1.07b</h3>-<p>-<ul>-<li> The code generated by DtdToHaskell had a minor cut-and-paste error.-</ul>--<h3>Changes for 1.07a</h3>-<p>-<ul>-<li> The file `script/echo.c' was missing from the distribution.-     This only affected the configuration step on systems where-     `echo -n' is not recognised (e.g. Solaris).-</ul>--<h3>Changes for 1.07</h3>-<p>-<ul>-<li> The hierarchical namespace <tt>Text.Xml</tt> was incorrect.-     It should be <tt>Text.XML</tt>-<li> The ghc package now also works in GHCi (but only for ghci-5.02.3-     and later).-<li> If you have both ghc and nhc98 compilers available, the package-     is built for both.  However, now the <em>configure --buildwith=</em>-     option is available to choose to build for only one of them.-</ul>--<h3>Changes for 1.06</h3>-<p>-<ul>-<li> HaXml now uses the new hierarchical namespace for modules,-     specifically under the tree <tt>Text.Xml.HaXml</tt>.-<li> The HaXml libraries now install as a separate `package' in both ghc-     and nhc98.  Use <em>-package HaXml</em> to access them.-<li> The library APIs are now documented using Haddock.-<li> Due to popular request, we have added a new validator for checking-     generic document content against a DTD.   This is available both as-     a library function, and as a command-line tool.-<li> DrIFT is now distributed separately by John Meacham, with much better-     configuration and build support.  You still only need it if you-     want to derive the <tt>Haskell2Xml</tt> class.-<li> Bugfix: the lexer and parser now accept NOTATION declarations in the DTD.-<li> Bugfix: a PublicId in a NOTATION decl is now correctly recognised by the-             keyword PUBLIC, not PUBLICID.-<li> Bugfix: the HTML parser now correctly accepts stand-alone tags like IMG.-<li> Bugfix: instances of XmlContent now accept an empty string where #PCDATA-             is expected.  Likewise, comments, processing instructions, and-             character/entity references are now permitted to be scattered-             thoughout some #PCDATA text.-<li> Bugfix: the OneOfN types used in code generated by DtdToHaskell are-             now supplied by default up to size 20, and a utility for-             automatically generating larger sizes is included.-</ul>--<hr>-<p>-I didn't keep detailed changelogs for versions before 1.06, but-here are the highlights.--<h3>Changes for 1.05</h3>-<ul>-<li> In DtdToHaskell, fix some more bugs with empty PE References at the-     end of an element content specification.-</ul>--<h3>Changes for 1.04</h3>-<ul>-<li> In DtdToHaskell, fix a bug whereby an empty PE Reference at the end-     of an element content specification caused a parse error - the DTD-     is now accepted.-</ul>--<h3>Changes for 1.03</h3>-<ul>-<li> In DtdToHaskell, added tagname prefixes to the attribute names of-     enumeration types, to disambiguate when attributes of the same name-     have different value-sets within different tags.-<li> DtdToHaskell also now accepts Tokenized and Notation types, mapping-     them to Strings.-<li> Added an instance of Xml2Haskell for the Maybe type.-</ul>--<h3>Changes for 1.02</h3>-<ul>-<li> Added instances of Haskell2Xml for Float and Double.-<li> Fixed a fault in DtdToHaskell's treatment of default attribute values.-<li> Dtd parser now accepts (#PCDATA)* as a valid element content specification.-</ul>--<h3>Changes for 1.01</h3>-<ul>-<li> Fixed DtdToHaskell's treatment of default values for attributes.-</ul>--<h3>Changes for 1.00</h3>-<ul>-<li> Finally added support for the external subset of DTDs.-</ul>--<h3>Changes for 0.9</h3>-<ul>-<li> Reworked the Haskell2Xml and Xml2Haskell modules.-</ul>--<h3>Changes for 0.8b</h3>-<ul>-<li> Some minor bugfixes to DrIFT, ensuring H'98 compatibility.-</ul>--<h3>Changes for 0.8a</h3>-<ul>-<li> No code changes - just some restructuring of the build tree.-</ul>--<h3>Changes for 0.8</h3>-<ul>-<li> Bugfix: some PERefs didn't work.-</ul>--<h3>Changes for 0.7</h3>-<ul>-<li> Fixed imports for GHC.-</ul>--<h3>Changes for 0.6</h3>-<ul>-<li> Fixed preprocessor symbols to use the new standard __HASKELL98__.-</ul>--<h3>Changes for 0.5</h3>-<ul>-<li> Added GE entity reference-handling to parser.-<li> Tweaked the pretty-printer.-<li> Ensured Haskell'98 compliance.-</ul>--<h3>Changes for 0.4</h3>-<ul>-<li> Added separate HTML parser, some other bugfixes.-</ul>--<h3>Changes for 0.3</h3>-<ul>-<li> Bugfix release.-</ul>--<h3>Changes for 0.2</h3>-<ul>-<li> Added Haskell2Xml and Xml2Haskell.-<li> Improved XML parser and printer.-</ul>--<h3>Release 0.1</h3>-<ul>-<li> Initial release.-</ul>--</body>-</html>
− docs/developerworks.patch
@@ -1,11 +0,0 @@---- process.hs.orig     2006-12-11 16:50:45.000000000 +0900-+++ process.hs  2006-12-11 16:41:50.000000000 +0900-@@ -1,5 +1,7 @@- module Main where--import XmlLib-+import Data.Char-+import Text.XML.HaXml-+- -- Concise XSLT-like specification of output- main = processXmlWith (hexagrams `o` tag "IChing")- hexagrams =
− docs/icfp99.dvi

binary file changed (85688 → absent bytes)

− docs/icfp99.html
@@ -1,2215 +0,0 @@-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">-<HTML>-<HEAD><TITLE>Haskell and XML: Generic Combinators or Type-Based Translation?</TITLE></HEAD>-<BODY BGCOLOR=white TEXT=black>-<!--HTMLHEAD-->-<!--ENDHTML-->-<!--CUT DEF section 1 -->--<H1 ALIGN=center>Haskell and XML: Generic Combinators or Type-Based Translation?</H1>-<H3 ALIGN=center>Malcolm Wallace and Colin Runciman<BR>-<BR>--</H3><BR><BR><BR><BR>-<BR>-<BLOCKQUOTE><B>Abstract: </B>We present two complementary approaches to writing XML-document-processing applications in a functional language.<BR>-<BR>-In the first approach, the generic tree structure of XML documents is-used as the basis for the design of a library of combinators for generic-processing: selection, generation, and transformation of XML trees.<BR>-<BR>-The second approach is to use a type-translation framework for-treating XML document type definitions (DTDs) as declarations of algebraic-data types, and a derivation of the corresponding functions for reading-and writing documents as typed values in Haskell.<BR>-<BR>-Published in the Proceedings of the International Conference-on Functional Programming, Paris, Sept 1999. ACM Copyright.</BLOCKQUOTE>-<!--TOC section Introduction-->--<H2>1&nbsp;&nbsp;Introduction</H2><!--TOC subsection Document markup languages-->--<H3>1.1&nbsp;&nbsp;Document markup languages</H3>-XML (Extensible Markup Language) [<CITE><A HREF="#xml"><CITE>1</CITE></A></CITE>] is a recent simplification-of the older SGML (Standardised Generalised Markup Language) standard-that is widely used in the publishing industry. It is a markup-language, meaning that it adds structural information around the text-of a document. It is extensible, meaning that the vocabulary of the-markup is not fixed -- each document can contain or reference a-meta-document, called a DTD (Document Type Definition), which describes-the particular markup capabilities used.<BR>-<BR>-The use of XML is not however restricted to the traditional idea of a-document. Many organisations are proposing to use XML as an interchange-format for pure data produced by applications like graph-plotters,-spreadsheets, and relational databases.<BR>-<BR>-HTML (Hyper-Text Markup Language) is one well-known example of an-instance of SGML -- every HTML document is an SGML document conforming-to a particular DTD. Where XML improves over SGML is in removing-shorthand forms that require an application to have knowledge of a-document's DTD. For instance, in HTML some markup (such as a numbered-list) requires an end marker; other forms (such as paragraphs) have-implicit end markers understood when the next similar form starts; and-yet other markup (such as in-line images) is self-contained and needs-no end marker. An HTML application needs to be aware of the specific-kind of markup in order to do the right thing.<BR>-<BR>-<!--TOC subsection XML document structure-->--<H3>1.2&nbsp;&nbsp;XML document structure</H3>XML is more regular. All markup has an explicit end marker-without exception: every document is <EM>well-formed</EM>; its nesting-structure is syntactically clear. One important consequence is that-an XML application does not need to know the meaning or interpretation-of all markup expressions -- parts of the document can be selected,-re-arranged, transformed, by structure alone rather than by meaning.<BR>-<BR>-An XML document is essentially a tree structure.-There are two basic `types' of content in a document: tagged elements,-and plain text. A tagged element consists of a start tag and an end-tag, which may enclose any sequence of other content (elements or text-fragments). Tagged elements can be nested to any depth, and the-document is well-formed if it consists of a single top-level element-containing other properly nested elements.-Start tags have the syntax <CODE>&lt;tag&gt;</CODE>, and end tags <CODE>&lt;/tag&gt;</CODE>,-where <TT>tag</TT> is an arbitrary name. There is special syntax for an-empty element: <CODE>&lt;tag/&gt;</CODE> is exactly equivalent to-<CODE>&lt;tag&gt;&lt;/tag&gt;</CODE>.-The start and end tags for each element contain a tag name, which-identifies semantic information about the structure, indicating how the-enclosed content should be interpreted. The start tag may also contain-attributes, which are simple name/value bindings, providing further-information about the element.-Figure <A HREF="#exampledoc">1</A> shows an example XML document, illustrating-all these components.<BR>-<BR>-<BLOCKQUOTE><HR><PRE>-&lt;?xml version='1.0'?&gt;-&lt;!DOCTYPE album SYSTEM "album.dtd"&gt;-&lt;album&gt;-  &lt;title&gt;Time Out&lt;/title&gt;-  &lt;artist&gt;Dave Brubeck Quartet&lt;/artist&gt;-  &lt;coverart style='abstract'&gt;-    &lt;location thumbnail='pix/small/timeout.jpg'-              fullsize='pix/covers/timeout.jpg'/&gt;-  &lt;/coverart&gt;--  &lt;catalogno label='Columbia' number='CL 1397'-             format='LP'/&gt;-  &lt;catalogno label='Columbia' number='CS 8192'-             format='LP'/&gt;-  &lt;catalogno label='Columbia' number='CPK 1181'-             format='LP' country='Korea'/&gt;-  &lt;catalogno label='Sony/CBS' number='Legacy CK 40585'-             format='CD'/&gt;--  &lt;personnel&gt;-    &lt;player name='Dave Brubeck' instrument='piano'/&gt;-    &lt;player name='Paul Desmond' instrument='alto sax'/&gt;-    &lt;player name='Eugene Wright' instrument='bass'/&gt;-    &lt;player name='Joe Morello' instrument='drums'/&gt;-  &lt;/personnel&gt;--  &lt;tracks&gt;-    &lt;track title='Blue Rondo &amp;agrave; la Turk'-           credit='Brubeck' timing='6m42s'/&gt;-    &lt;track title='Strange Meadow Lark'-           credit='Brubeck'  timing='7m20s' /&gt;-    &lt;track title='Take Five'-           credit='Desmond'  timing='5m24s' /&gt;-    &lt;track title='Three To Get Ready'-           credit='Brubeck'  timing='5m21s' /&gt;-    &lt;track title="Kathy's Waltz"-           credit='Brubeck'  timing='4m48s' /&gt;-    &lt;track title="Everybody's Jumpin'"-           credit='Brubeck'  timing='4m22s' /&gt;-    &lt;track title='Pick Up Sticks'-           credit='Brubeck'  timing='4m16s' /&gt;-  &lt;/tracks&gt;--  &lt;notes author="unknown"&gt;-    Possibly the DBQ's most famous album,-    this contains-    &lt;trackref link='#3'&gt;Take Five&lt;/trackref&gt;,-    the most famous jazz track of that period.-    These experiments in different time-    signatures are what Dave Brubeck is most-    remembered for.  Recorded Jun-Aug 1959-    in NYC.  See also the sequel,-      &lt;albumref link='cbs-timefurthout'&gt;-        Time Further Out&lt;/albumref&gt;.-  &lt;/notes&gt;-&lt;/album&gt;-</PRE>-<DIV ALIGN=center>Figure 1: An example XML document.-<A NAME="exampledoc"></A></DIV>-<HR></BLOCKQUOTE><!--TOC subsection Representing XML in Haskell-->--<H3>1.3&nbsp;&nbsp;Representing XML in Haskell</H3>This paper is about processing XML using the functional-language Haskell.<A NAME="text1"></A><A HREF="#note1"><SUP><FONT SIZE=2>1</FONT></SUP></A>--Modern functional languages are well-equipped to deal-with tree-structured data, so one expects the-language to be a good fit for the application.-Even so, a key issue is just how to represent documents, and in-particular how to reconcile the DTD datatype definitions-included in XML documents with the data types that can be-defined in Haskell. -We have investigated two complementary approaches:-<UL>-<LI>(1)-Define an internal data structure that represents contents-of <EM>any</EM> XML document, independent of all DTDs.--<LI>(2)-Given the DTD for some XML documents of interest, systematically-<EM>derive</EM> definitions for internal Haskell data types to represent them.-These definitions are closely based on the specific DTD.-</UL>Advantages of (1) include <EM>genericity</EM> and <EM>function-level scripting</EM>.-Generic applications handle a wide class of XML documents, not just-those sharing a specific DTD.-One example of a completely generic application is searching documents-to extract contents matching some pattern.-Our <EM>Xtract</EM><A NAME="text2"></A><A HREF="#note2"><SUP><FONT SIZE=2>2</FONT></SUP></A>- is-an interpreter for a regular XML query language.<BR>-<BR>-The term `generic' also applies to applications that make <EM>some</EM>-assumptions about a document's structure but need not know the full-DTD,<A NAME="text3"></A><A HREF="#note3"><SUP><FONT SIZE=2>3</FONT></SUP></A>--for example, a small script to add a ``total'' column to the end of every-table (recognised by a particular markup tag) without altering any of-the surrounding structure.<BR>-<BR>-By <EM>function-level scripting</EM> we mean that the programmer does not have-to be concerned with details of programming over data structures.-All details of data structure manipulation can be hidden in a library of-high-level combinators. In effect, combinatory expressions serve as-an extensible domain-specific language.<BR>-<BR>-Advantages of (2) include <EM>stronger typing</EM> and <EM>fuller control</EM>.-A well-formed XML document is further said to be <EM>valid</EM> if it-conforms to a stated DTD. By establishing a correspondence between-DTDs and Haskell types, the concept of validity can be extended to-include applications that process documents.-Not only is there a static guarantee that applications cannot fail-in respect of-document structure if the input XML conforms to the stated DTD;-any XML output produced via a DTD-derived type is guaranteed to be valid.-With direct access to the DTD-specific data structure, the programmer has-fuller control over how computation is done.-They can use a full repertoire of programming techniques with the safeguard-that type-checked Haskell will automatically produce XML that is valid-in respect of a specified DTD.<BR>-<BR>-Both approaches rely on a toolkit of more basic components for processing-XML documents in Haskell: for instance, a parser and pretty-printer.-These supporting components are implemented using existing combinator-libraries [<CITE><A HREF="#Hughes95"><CITE>7</CITE></A>, </CITE><CITE><A HREF="#HuttonMeijer98"><CITE>8</CITE></A></CITE>].<BR>-<BR>-<!--TOC subsection Sections following-->--<H3>1.4&nbsp;&nbsp;Sections following</H3>§<A HREF="#combinators">2</A> develops the approach using a generic representation-and a combinator library, including an illustrative application.-§<A HREF="#translation">3</A> develops the alternative based on translation between-DTDs and Haskell data types.-§<A HREF="#evaluation">4</A> discusses some pros and cons of the two approaches-based on our experience implementing and using both.-§<A HREF="#related">5</A> discusses related work; §<A HREF="#furtherwork">6</A> offers some-conclusions and suggestions for further work.---<!--TOC section Generic combinators-->--<H2>2&nbsp;&nbsp;Generic combinators</H2>-<A NAME="combinators"></A>In this section, we begin with a generic representation for the contents-of XML documents, excluding any DTD. We introduce <EM>content filters</EM>-as a suitable basic type for functions processing this representation,-and combinators for putting such filters together.-A complete table of basic-filters is given in Figure <A HREF="#basicdefs">2</A>, and of combinators and-their definitions in Figure <A HREF="#combinatordefs">3</A>. An example program-is shown in Figure <A HREF="#examplescript">4</A>.-One expected property of a fitting set of combinators is that they-satisfy algebraic laws; a table of laws satisfied by our combinators-is given in Figure <A HREF="#tablelaws">6</A>.<BR>-<BR>-<!--TOC subsection Documents and transformations-->--<H3>2.1&nbsp;&nbsp;Documents and transformations</H3>--<H5>Data modelling</H5>-<PRE>-    data Element = Elem Name [Attribute] [Content]-    data Content = CElem Element-                 | CText String-</PRE>Because functional languages are good at processing tree-structured data,-there is a natural fit between the XML document domain and Haskell tree-datatypes. In simplified form, the main datatypes which model an XML-document are <TT>Element</TT> and <TT>Content</TT>, whose definitions are-mutually recursive, together forming a multi-branch tree structure.<BR>-<BR>--<H5>The filter type</H5>-<PRE>-    type CFilter = Content -&gt; [Content]-</PRE>Our basic type for all document processing functions is the <EM>content-filter</EM>, which takes a fragment of the content of an XML document-(whether that be some text, or a complete tagged element), and-returns some sequence of content. The result list might be empty, it-might contain a single item, or it could contain a large collection of-items.<BR>-<BR>-Some filters are used to select parts of the input document, and others-are used to construct parts of the output document. They all share the-same basic type, because when building a new document, the intention is-to re-use or extract information from parts of the old document. Where-the result of a filter is either empty or a singleton, the filter can-sometimes be thought of as a <EM>predicate</EM>, deciding whether or not to-keep its input.<BR>-<BR>--<H5>Program wrapper</H5>-<PRE>-    processXmlWith :: CFilter -&gt; IO ()-</PRE>We assume a top-level wrapper function, which gets command-line-arguments, parses an XML file into the <TT>Content</TT> type, applies a-filter, and pretty-prints the output document. The given filter is-applied to the top-level enclosing element of the document.<BR>-<BR>--<H5>Basic filters</H5>-A complete list of predefined filters is shown in Figure <A HREF="#basicdefs">2</A>.-The simplest possible filters: <TT>none</TT> takes-any content and returns nothing; <TT>keep</TT> takes any content and-returns just that item. Algebraically, these are the zero and unit filters.<BR>-<BR>-<BLOCKQUOTE><HR>-<TABLE CELLSPACING=0 CELLPADDING=0>-<TR><TD><B>Predicates</B></TD>-</TR>-<TR><TD>&nbsp;</TD>-<TD><CODE>none,   </CODE>	</TD>-<TD>&nbsp;</TD>-<TD><EM>zero/failure </EM></TD>-</TR>-<TR><TD>&nbsp;</TD>-<TD><CODE>keep,   </CODE>	</TD>-<TD>&nbsp;</TD>-<TD><EM>identity/success </EM></TD>-</TR>-<TR><TD>&nbsp;</TD>-<TD><CODE>elm,    </CODE>	</TD>-<TD>&nbsp;</TD>-<TD><EM>tagged element? </EM></TD>-</TR>-<TR><TD>&nbsp;</TD>-<TD><CODE>txt     </CODE>	</TD>-<TD>&nbsp;</TD>-<TD><EM>plain text? </EM></TD>-</TR>-<TR><TD>&nbsp;</TD>-<TD>&nbsp;</TD>-<TD><CODE>:: CFilter</CODE></TD>-</TR>-<TR><TD>&nbsp;</TD>-<TD><CODE>tag,    </CODE>	</TD>-<TD>&nbsp;</TD>-<TD><EM>named element? </EM></TD>-</TR>-<TR><TD>&nbsp;</TD>-<TD><CODE>attr    </CODE>	</TD>-<TD>&nbsp;</TD>-<TD><EM>element has attribute? </EM></TD>-</TR>-<TR><TD>&nbsp;</TD>-<TD>&nbsp;</TD>-<TD><CODE>:: String -&gt; CFilter</CODE></TD>-</TR>-<TR><TD>&nbsp;</TD>-<TD><CODE>attrval </CODE>	</TD>-<TD>&nbsp;</TD>-<TD><EM>element has attribute/value? </EM></TD>-</TR>-<TR><TD>&nbsp;</TD>-<TD>&nbsp;</TD>-<TD><CODE>:: (String,String) -&gt; CFilter</CODE></TD>-</TR>-<TR><TD>&nbsp;</TD>-</TR>-<TR><TD><B>Selection</B></TD>-</TR>-<TR><TD>&nbsp;</TD>-<TD><CODE>children </CODE></TD>-<TD>&nbsp;</TD>-<TD><EM>children of element </EM></TD>-</TR>-<TR><TD>&nbsp;</TD>-<TD>&nbsp;</TD>-<TD><CODE>:: CFilter</CODE></TD>-</TR>-<TR><TD>&nbsp;</TD>-<TD><CODE>showAttr,</CODE></TD>-<TD>&nbsp;</TD>-<TD><EM>value of attribute </EM></TD>-</TR>-<TR><TD>&nbsp;</TD>-<TD><CODE>(?)      </CODE></TD>-<TD>&nbsp;</TD>-<TD><EM>synonym for showAttr </EM></TD>-</TR>-<TR><TD>&nbsp;</TD>-<TD>&nbsp;</TD>-<TD><CODE>:: String -&gt; CFilter</CODE></TD>-</TR>-<TR><TD>&nbsp;</TD>-</TR>-<TR><TD><B>Construction</B></TD>-</TR>-<TR><TD>&nbsp;</TD>-<TD><CODE>literal,</CODE></TD>-<TD>&nbsp;</TD>-<TD><EM>build plain text </EM></TD>-</TR>-<TR><TD>&nbsp;</TD>-<TD><CODE>(!)     </CODE></TD>-<TD>&nbsp;</TD>-<TD><EM>synonym for literal </EM></TD>-</TR>-<TR><TD>&nbsp;</TD>-<TD>&nbsp;</TD>-<TD><CODE>:: String -&gt; CFilter</CODE></TD>-</TR>-<TR><TD>&nbsp;</TD>-<TD><CODE>mkElem  </CODE></TD>-<TD>&nbsp;</TD>-<TD><EM>build element </EM></TD>-</TR>-<TR><TD>&nbsp;</TD>-<TD>&nbsp;</TD>-<TD><CODE>:: String -&gt; [CFilter] -&gt; CFilter</CODE></TD>-</TR>-<TR><TD>&nbsp;</TD>-<TD><CODE>mkElemAttrs</CODE></TD>-<TD>&nbsp;</TD>-<TD><EM>build element with attributes </EM></TD>-</TR>-<TR><TD>&nbsp;</TD>-<TD>&nbsp;</TD>-<TD><CODE>:: String -&gt; [(String,CFilter)]</CODE></TD>-</TR>-<TR><TD>&nbsp;</TD>-<TD>&nbsp;</TD>-<TD><CODE>       -&gt; [CFilter] -&gt; CFilter</CODE></TD>-</TR>-<TR><TD>&nbsp;</TD>-<TD><CODE>replaceTag</CODE></TD>-<TD>&nbsp;</TD>-<TD><EM>replace element's tag </EM></TD>-</TR>-<TR><TD>&nbsp;</TD>-<TD>&nbsp;</TD>-<TD><CODE>:: String -&gt; CFilter</CODE></TD>-</TR>-<TR><TD>&nbsp;</TD>-<TD><CODE>replaceAttrs</CODE></TD>-<TD>&nbsp;</TD>-<TD><EM>replace element's attributes </EM></TD>-</TR>-<TR><TD>&nbsp;</TD>-<TD>&nbsp;</TD>-<TD><CODE>:: [(String,CFilter)] -&gt; CFilter</CODE></TD>-</TR></TABLE>---<BR>-<DIV ALIGN=center>Figure 2: Basic content filters.-<A NAME="basicdefs"></A></DIV>-<HR></BLOCKQUOTE><UL>-<LI>-<EM>Predicate and selection filters</EM>. The filter <TT>elm</TT> is a-predicate, returning just this item if it is an element, or nothing-otherwise.<A NAME="text4"></A><A HREF="#note4"><SUP><FONT SIZE=2>4</FONT></SUP></A>--Conversely, <TT>txt</TT> returns this item only if is plain-text,<A NAME="text5"></A><A HREF="#note5"><SUP><FONT SIZE=2>5</FONT></SUP></A>--and nothing otherwise. The filter-<TT>children</TT> returns the immediate children of an element if it has-any, or nothing if this content-item is not an element. The filter-<TT>tag t</TT> returns this item only if it is an element whose tag name-is the string <TT>t</TT>. The filter <TT>attr a</TT> returns this item only-if it is an element containing the attribute name <TT>a</TT>. The filter-<TT>attrval (a,v)</TT> returns this item only if is an element containing-the attribute <TT>a</TT> with the value <TT>v</TT>.<BR>-<BR>--<LI>-<EM>Construction filters</EM>. The function <TT>literal s</TT>-makes a text content containing just the string <TT>s</TT>. The function-<TT>mkElem t fs</TT> builds a content element with the tag <TT>t</TT>; the-argument <TT>fs</TT> is a list of filters, each of which is applied-to the current item, and all their results are collected to become-the children of the new element. The function <TT>mkElemAttrs t avs fs</TT>-is just like <TT>mkElem</TT> except that its extra parameter <TT>avs</TT>-is a list of attribute values<A NAME="text6"></A><A HREF="#note6"><SUP><FONT SIZE=2>6</FONT></SUP></A>- to be attached to the tag.</UL>A useful filter which involves both selection and construction is <TT>showAttr a</TT>, which extracts the value of the attribute <TT>a</TT> from the-current element and returns just that string as a piece of content.<BR>-<BR>-When constructing a new document (e.g. the script in Figure-<A HREF="#examplescript">4</A> which generates HTML), the <TT>mkElem</TT> function-occurs repeatedly. We define and use a small library of functions such-as <TT>htable</TT>, <TT>hrow</TT>, and <TT>hcol</TT> which are just synonyms for-particular applications of <TT>mkElem</TT> and <TT>mkElemAttrs</TT> to-different tagnames, reducing verbosity and making the syntax rather more-readable.<BR>-<BR>-Also for convenience, we define the new operators <TT>?</TT> and <TT>!</TT> as-synonyms for <TT>showAttr</TT> and <TT>literal</TT> respectively: they are-used in a bracketed postfix notation,<A NAME="text7"></A><A HREF="#note7"><SUP><FONT SIZE=2>7</FONT></SUP></A>--a style some programmers prefer.<BR>-<BR>-<!--TOC subsection Combinators-->--<H3>2.2&nbsp;&nbsp;Combinators</H3>-The combinators used as intermediate code in compilers-can render programs `totally unfit for human consumption' [<CITE><A HREF="#Turner79"><CITE>11</CITE></A></CITE>]!-However, the idea of a combinator library for a specific class of applications-is to achieve a form of expression that is natural for the problem.-A combinator library should be like a language extension-tailored to the problem domain [<CITE><A HREF="#Fairbairn87"><CITE>4</CITE></A></CITE>]. -In this-sense, functional languages are extensible, just as XML itself is-extensible.-The combinators are higher-order operators serving as `glue'[<CITE><A HREF="#Hughes89"><CITE>6</CITE></A></CITE>]-to assemble functions into more powerful combinations.-We aim to keep the types of component functions as uniform as possible-so that any function can be composed with any other.-Within the lexical limits of the host language, choice of notation-should follow application conventions:-in Haskell we can, where appropriate, define new infix operator symbols-for combinators.<BR>-<BR>-So, having defined some basic filters already, in what ways can these usefully-be combined into more interesting and complex filters?-(See Figure <A HREF="#combinatordefs">3</A>.)<BR>-<BR>--<BLOCKQUOTE><HR>--<TABLE CELLSPACING=0 CELLPADDING=0>-<TR><TD>&nbsp;</TD>-<TD><CODE>o,      </CODE>	</TD>-<TD>&nbsp;</TD>-<TD><EM>Irish composition </EM></TD>-</TR>-<TR><TD>&nbsp;</TD>-<TD><CODE>(|||),  </CODE>	</TD>-<TD>&nbsp;</TD>-<TD><EM>append results </EM></TD>-</TR>-<TR><TD>&nbsp;</TD>-<TD><CODE>with,   </CODE>	</TD>-<TD>&nbsp;</TD>-<TD><EM>guard </EM></TD>-</TR>-<TR><TD>&nbsp;</TD>-<TD><CODE>without,</CODE>	</TD>-<TD>&nbsp;</TD>-<TD><EM>negative guard </EM></TD>-</TR>-<TR><TD>&nbsp;</TD>-<TD><CODE>(/&gt;),   </CODE>	</TD>-<TD>&nbsp;</TD>-<TD><EM>interior search </EM></TD>-</TR>-<TR><TD>&nbsp;</TD>-<TD><CODE>(&lt;/),   </CODE>	</TD>-<TD>&nbsp;</TD>-<TD><EM>exterior search </EM></TD>-</TR>-<TR><TD>&nbsp;</TD>-<TD><CODE>(|&gt;|)   </CODE>	</TD>-<TD>&nbsp;</TD>-<TD><EM>directed choice </EM></TD>-</TR>-<TR><TD>&nbsp;</TD>-<TD>&nbsp;</TD>-<TD><CODE>:: CFilter -&gt; CFilter -&gt; CFilter</CODE></TD>-</TR>-<TR><TD>&nbsp;</TD>-</TR>-<TR><TD>&nbsp;</TD>-<TD><CODE>f `o` g        = concat . map f . g </CODE></TD>-</TR>-<TR><TD>&nbsp;</TD>-<TD><CODE>f ||| g        = \c-&gt; f c ++ g c </CODE></TD>-</TR>-<TR><TD>&nbsp;</TD>-<TD><CODE>f `with` g     = filter (not.null.g) . f </CODE></TD>-</TR>-<TR><TD>&nbsp;</TD>-<TD><CODE>f `without` g  = filter (null.g) . f </CODE></TD>-</TR>-<TR><TD>&nbsp;</TD>-<TD><CODE>f /&gt; g         = g `o` children `o` f </CODE></TD>-</TR>-<TR><TD>&nbsp;</TD>-<TD><CODE>f &lt;/ g         = f `with` (g `o` children) </CODE></TD>-</TR>-<TR><TD>&nbsp;</TD>-<TD><CODE>f |&gt;| g        = f ?&gt; f :&gt; g </CODE></TD>-</TR>-<TR><TD>&nbsp;</TD>-</TR>-<TR><TD>&nbsp;</TD>-<TD><CODE>cat    </CODE>	</TD>-<TD>&nbsp;</TD>-<TD><EM>concatenate results </EM></TD>-</TR>-<TR><TD>&nbsp;</TD>-<TD>&nbsp;</TD>-<TD><CODE>:: [CFilter] -&gt; CFilter</CODE></TD>-</TR>-<TR><TD>&nbsp;</TD>-</TR>-<TR><TD>&nbsp;</TD>-<TD><CODE>cat fs    = \c-&gt; concat. map (\f-&gt;f c) fs </CODE></TD>-</TR>-<TR><TD>&nbsp;</TD>-</TR>-<TR><TD>&nbsp;</TD>-<TD><CODE>et     </CODE>	</TD>-<TD>&nbsp;</TD>-<TD><EM>disjoint union </EM></TD>-</TR>-<TR><TD>&nbsp;</TD>-<TD>&nbsp;</TD>-<TD><CODE>:: (String-&gt;CFilter) -&gt; CFilter -&gt; CFilter</CODE></TD>-</TR>-<TR><TD>&nbsp;</TD>-</TR>-<TR><TD>&nbsp;</TD>-<TD><CODE>f `et` g  = (f `oo` tagged elm)</CODE></TD>-</TR>-<TR><TD>&nbsp;</TD>-<TD><CODE>            |&gt;| (g `o` txt) </CODE></TD>-</TR>-<TR><TD>&nbsp;</TD>-</TR>-<TR><TD>&nbsp;</TD>-<TD><CODE>(?&gt;)   </CODE>	</TD>-<TD>&nbsp;</TD>-<TD><EM>if-then-else choice </EM></TD>-</TR>-<TR><TD>&nbsp;</TD>-<TD>&nbsp;</TD>-<TD><CODE>:: CFilter -&gt; ThenElse CFilter -&gt; CFilter</CODE></TD>-</TR>-<TR><TD>&nbsp;</TD>-</TR>-<TR><TD>&nbsp;</TD>-<TD><CODE>data ThenElse a = a :&gt; a </CODE></TD>-</TR>-<TR><TD>&nbsp;</TD>-<TD><CODE>p ?&gt; f :&gt; g = \c-&gt; if (not.null.p) c</CODE></TD>-</TR>-<TR><TD>&nbsp;</TD>-<TD><CODE>                   then f c else g c</CODE></TD>-</TR>-<TR><TD>&nbsp;</TD>-</TR>-<TR><TD>&nbsp;</TD>-<TD><CODE>chip,   </CODE>	</TD>-<TD>&nbsp;</TD>-<TD><EM>``in-place'' application to children </EM></TD>-</TR>-<TR><TD>&nbsp;</TD>-<TD><CODE>deep,   </CODE>	</TD>-<TD>&nbsp;</TD>-<TD><EM>recursive search (topmost) </EM></TD>-</TR>-<TR><TD>&nbsp;</TD>-<TD><CODE>deepest,</CODE>	</TD>-<TD>&nbsp;</TD>-<TD><EM>recursive search (deepest) </EM></TD>-</TR>-<TR><TD>&nbsp;</TD>-<TD><CODE>multi,  </CODE>	</TD>-<TD>&nbsp;</TD>-<TD><EM>recursive search (all) </EM></TD>-</TR>-<TR><TD>&nbsp;</TD>-<TD><CODE>foldXml </CODE>	</TD>-<TD>&nbsp;</TD>-<TD><EM>recursive application </EM></TD>-</TR>-<TR><TD>&nbsp;</TD>-<TD>&nbsp;</TD>-<TD><CODE>:: CFilter -&gt; CFilter</CODE></TD>-</TR>-<TR><TD>&nbsp;</TD>-</TR>-<TR><TD>&nbsp;</TD>-<TD><CODE>deep f    = f |&gt;| (deep f `o` children) </CODE></TD>-</TR>-<TR><TD>&nbsp;</TD>-<TD><CODE>deepest f = (deepest f `o` children) |&gt;| f </CODE></TD>-</TR>-<TR><TD>&nbsp;</TD>-<TD><CODE>multi f   = f ||| (multi f `o` children) </CODE></TD>-</TR>-<TR><TD>&nbsp;</TD>-<TD><CODE>foldXml f = f `o` (chip (foldXml f)) </CODE></TD>-</TR></TABLE>---<BR>-<DIV ALIGN=center>Figure 3: Filter combinators and their definitions.-<A NAME="combinatordefs"></A></DIV>-<HR></BLOCKQUOTE>The most important and useful filter combinator is <CODE>`o`</CODE>.-We call this operator Irish composition, for reasons which should be-obvious. It plugs two filters together: the left filter is applied to-the results of the right filter. So, for instance, the expression-<PRE>-    text `o` children `o` tag "title"-</PRE>means ``only the plain-text children of the current element, provided the-current element has the <TT>title</TT> tag name''.<BR>-<BR>-Some other combinators are as follows.-<TT>f ||| g</TT> is an append operator: it joins the results of <TT>f</TT> and-<TT>g</TT> sequentially.-<TT>cat fs</TT> is the list generalisation of <TT>|||</TT>; it concatenates-the results of each of the filters from the <TT>fs</TT> list.-<TT>f `with` g</TT> acts as a guard on the results of <TT>f</TT>, pruning to-include only those which are productive under <TT>g</TT>.-The dual, <TT>f `without` g</TT>, excludes those results of <TT>f</TT> which-are productive under <TT>g</TT>.-The expression <TT>p ?&gt; f :&gt; g</TT> is a functional choice operator; if-the (predicate) filter <TT>p</TT> is productive, then the filter <TT>f</TT>-is applied, otherwise <TT>g</TT> is applied.-From this is derived a directed choice operator: <TT>f |&gt;| g</TT> gives-either the results of <TT>f</TT>, or those of <TT>g</TT> only if <TT>f</TT> is-unproductive.<BR>-<BR>--<H5>Generalised Path Selectors</H5>-Selection of subtrees by <EM>path patterns</EM> is familiar to users of-the Unix file-system, where such patterns are used to access directory-structure, using a <TT>/</TT> notation to indicate the `containing'-relation. Similar patterns are used in XSLT, an XML transformation-language [<CITE><A HREF="#xslt"><CITE>3</CITE></A></CITE>]. In this connection, we define two path selection-combinators <TT>/&gt;</TT> and <TT>&lt;/</TT>. Both combinators choose subtrees-to return based on whether the results of the left filter contain the-results of the right filter as children: <TT>/&gt;</TT> is an `interior'-selector, returning the inner structure; <TT>&lt;/</TT> is an `exterior'-selector, returning the outer structure.<BR>-<BR>--<H5>An editing combinator</H5>-Aside from predicates, selectors, choice, and constructive filters,-there is one very useful combinator which stands in its own category ---an editing combinator. <TT>chip f</TT> processes the children of an-element in-place: the filter <TT>f</TT> is applied to its-children; the results are rebuilt as the new children of that-same element.<BR>-<BR>--<H5>Recursion</H5>-It is often useful to express recursive transformations on XML-documents: transformations which can be applied at many different-levels of the document tree.<BR>-<BR>-One family of such expressions is useful primarily in selecting a-subtree from an arbitrarily deep location, although they can of course-be used for editing and filtering as well as selection. The recursive-combinator <CODE>deep f</CODE> <EM>potentially</EM> pushes the action of filter-<TT>f</TT> deep inside the document sub-tree. It first tries the given-filter on the current item: if it is productive then it stops here, but-if no results are returned, then it moves to the children and tries-again recursively. When used with a predicate, this strategy searches-for the topmost matching elements in the tree. There are variations:-<CODE>deepest</CODE> searches for the bottommost matching elements; <TT>multi</TT> returns all matches, even those which are sub-trees of other-matches. However, as already noted, the action of these combinators is-not restricted to predicates or selectors.<BR>-<BR>-Another powerful recursion combinator is <TT>foldXml</TT>: the expression-<TT>foldXml f</TT> applies the filter <TT>f</TT> to every level of the tree,-from the leaves upwards to the root (at least conceptually -- of course-lazy evaluation makes this more efficient).<BR>-<BR>-<!--TOC subsection Example-->--<H3>2.3&nbsp;&nbsp;Example</H3>-The use of these filters and combinators is illustrated in an example-script in Figure <A HREF="#examplescript">4</A>. This program transforms an-<TT>&lt;album&gt;</TT> element into an HTML document that provides a formatted-summary. The HTML output, rendered by the Netscape browser, is-illustrated in Figure <A HREF="#netscape">5</A>. Such a task might be fairly-common in e-commerce applications.<BR>-<BR>-We now describe some of the salient features of the example.<BR>-<BR>-<PRE>-    (albumf `o` deep (tag "album"))-</PRE>The script first searches recursively for the topmost element tagged-<TT>&lt;album&gt;</TT>, before applying the filter <TT>albumf</TT> to it. Thus, it works-equally well with any XML source document that contains an <TT>&lt;album&gt;</TT>-element anywhere within it, and (correctly) produces no output for-documents which do not contain album data.<BR>-<BR>-The output document's <TT>&lt;HEAD&gt;</TT> section contains the artist name and-album title separated by a colon. We note that the expression,-<PRE>-    txt `o` children `o` tag "artist"-        `o` children `o` tag "album"-</PRE>which grabs the textual content of the <TT>&lt;artist&gt;</TT> element within the-<TT>&lt;album&gt;</TT> element, is somewhat unwieldy. Moreover its trailing test-for the <TT>&lt;album&gt;</TT> tag is redundant, since the calling filter has-already performed that match. The expression can be simplified by-using path selectors to:-<PRE>-    keep /&gt; tag "artist" /&gt; txt-</PRE>and this style is used elsewhere in the example. (The-algebraic laws in Section <A HREF="#laws">2.5</A> guarantee that this rewriting-is safe.)<BR>-<BR>-Such expressions make some assumptions about the structure of the data-within the <TT>&lt;album&gt;</TT> element. In this instance, the assumption is-that an <TT>&lt;artist&gt;</TT> element is an immediate child,-and that <EM>its</EM> immediate children include text. If such-assumptions prove incorrect for a particular document, the filter-is simply unproductive; no error is flagged.<BR>-<BR>-With a suitable definition, <TT>hbody = mkElemAttr "BODY"</TT>-the expression-<PRE>-    hbody  [("bgcolor",("white"!))]   [...]-</PRE>can be understood to set the background colour attribute of-the <TT>&lt;BODY&gt;</TT> tag to the literal value <TT>white</TT>. Notice how the-attribute value is itself described by a filter. In this case, the-filter is not very exciting, but the later definition of-<TT>mkLink</TT> illustrates the generation of an HTML reference-by looking up the value of a supplied <TT>link</TT> attribute (using the-<TT>?</TT> filter).<BR>-<BR>-When the script is used on the particular document from Figure-<A HREF="#exampledoc">1</A>, the output is a re-ordering of the internal-components of the input: in the <TT>&lt;BODY&gt;</TT> part of the output, the-<TT>&lt;notes&gt;</TT> section is selected and transformed by <TT>notesf</TT> before-the <TT>&lt;catalogno&gt;</TT> elements are processed by the <TT>summaryf</TT> filter.-Although in the absence of a DTD it is impossible to be sure of any-input ordering, the script here ensures that the output ordering is-consistent.<BR>-<BR>-The definition of the <TT>notesf</TT> filter is interesting because it-makes fewer assumptions about the content of a <TT>&lt;notes&gt;</TT> structure, and-in addition it preserves the input ordering.-The chained if-then-else choice within the recursive <TT>foldXml</TT>-combinator causes all internal structure of the <TT>&lt;notes&gt;</TT> element to be-retained except for the replacement of <TT>&lt;trackref&gt;</TT>s by emphasised-text, and <TT>&lt;albumref&gt;</TT>s by HTML links.<BR>-<BR>-One of the most striking features of the example as a whole is how-selection and testing of old content and construction of new content are-uniform, and can be combined almost interchangeably.<BR>-<BR>-We will return to the treatment of <TT>&lt;catalogno&gt;</TT> elements in Section-<A HREF="#labelling">2.4</A> after introducing some extra <EM>labelling</EM> combinators.<BR>-<BR>-<BLOCKQUOTE><HR>-<PRE>-module Main where-import Xml-main =-  processXmlWith (albumf `o` deep (tag "album"))-albumf =-  html-    [ hhead-      [ htitle-        [ txt `o` children `o` tag "artist"-              `o` children `o` tag "album"-        , literal ": "-        , keep /&gt; tag "title" /&gt; txt-        ]-      ]-    , hbody [("bgcolor",("white"!))]-      [ hcenter-          [ h1 [ keep /&gt; tag "title" /&gt; txt ] ]-      , h2 [ ("Notes"!) ]-      , hpara [ notesf `o` (keep /&gt; tag "notes") ]-      , summaryf-      ]-    ]-notesf =-  foldXml (txt            ?&gt; keep            :&gt;-           tag "trackref" ?&gt; replaceTag "EM" :&gt;-           tag "albumref" ?&gt; mkLink          :&gt;-           children)-summaryf =-  htable [("BORDER",("1"!))]-    [ hrow [ hcol [ ("Album title"!) ]-           , hcol [ keep /&gt; tag "title" /&gt; txt ]-           ]-    , hrow [ hcol [ ("Artist"!) ]-           , hcol [ keep /&gt; tag "artist" /&gt; txt ]-           ]-    , hrow [ hcol [ ("Recording date"!) ]-           , hcol [ keep /&gt;-                       tag "recordingdate" /&gt; txt ]-           ]-    , hrow [ hcola [ ("VALIGN",("top"!)) ]-                   [ ("Catalog numbers"!) ]-           , hcol-             [ hlist-               [ catno `oo`-                  numbered (deep (tag "catalogno"))-               ]-             ]-           ]-    ]-catno n =-  mkElem "LI"-    [ ((show n++". ")!),  ("label"?),  ("number"?)-    , (" ("!),  ("format"?),  (")"!) ]-mkLink =-  mkElemAttr "A" [ ("HREF",("link"?)) ]-    [ children ]-</PRE>--<DIV ALIGN=center>Figure 4: An example document-processing script using the generic filter- combinators.-<A NAME="examplescript"></A></DIV>-<HR></BLOCKQUOTE><BLOCKQUOTE><HR>--<img src="brubeck.gif" alt="picture of browser">---<BR>-<BR>-<DIV ALIGN=center>Figure 5: The HTML results of the example script, rendered by a browser.-<A NAME="netscape"></A></DIV>-<HR></BLOCKQUOTE><!--TOC subsection Labellings-->--<H3>2.4&nbsp;&nbsp;Labellings</H3>-<A NAME="labelling"></A>-One feature that is occasionally useful is the ability to attach labels-to items in a sequence, for instance, to number a list of items, or to-treat the first/last item of a list differently from the other items.-For this purpose, the library provides special labelling combinators.-We choose to introduce a new type:-<PRE>-  type LabelFilter a = Content -&gt; [ (a,Content) ]-</PRE>A <TT>LabelFilter</TT> is like a <TT>CFilter</TT> except it attaches a label-to each of its results. We might have chosen to fold label-values inside the <TT>Content</TT> type, to yield a uniform <TT>CFilter</TT>-type, but keeping the labels separate allows them to be of-completely polymorphic type: a label could even be another filter-for example. <BR>-<BR>-There are several common labelling functions:-<PRE>-  numbered     :: CFilter -&gt; LabelFilter Int-  interspersed :: a -&gt; CFilter -&gt; a-                                 -&gt; LabelFilter a-  tagged       :: CFilter -&gt; LabelFilter String-  attributed   :: CFilter -&gt;-                    LabelFilter [(String,String)]-</PRE>These labelling functions lift a <TT>CFilter</TT> to the <TT>LabelFilter</TT> type:-<TT>numbered f</TT> transforms the ordinary filter <TT>f</TT>-into a new filter that attaches integers (from 1 upwards)-to the results of <TT>f</TT>;-<TT>interspersed a f z</TT> attaches the label <TT>a</TT> to all of the-results of <TT>f</TT> except the last, which gets the label <TT>z</TT>;-<TT>tagged f</TT> labels every tagged element with its tag name (and-non-elements with the empty string); <TT>attributed f</TT>-labels every tagged element with its attribute/value pairs (and-non-elements with the empty list).<BR>-<BR>-<PRE>-  `oo` :: (a-&gt;CFilter) -&gt; LabelFilter a -&gt; CFilter-</PRE>The combinator <TT>`oo`</TT> is a new form of composition which drops a-<TT>LabelFilter</TT> back to the <TT>CFilter</TT> type by application of-another filter that consumes the label.<BR>-<BR>-The use of this form of labelling is illustrated by the treatment of-<TT>&lt;catalogno&gt;</TT>s in the example of Figure <A HREF="#examplescript">4</A>:-<PRE>-  catno `oo` numbered (deep (tag "catalogno"))-</PRE>First, the desired elements are extracted from their topmost positions-in the tree, then they are given numeric labels, and finally the-<TT>catno</TT> filter incorporates the label into some generated text.-Another example can be seen in the definition of the <TT>`et`</TT>-combinator in Figure <A HREF="#combinatordefs">3</A>.-(<TT>`et`</TT> combines a filter <TT>f</TT> on elements with a filter <TT>g</TT>-on text. <TT>f</TT> pattern-matches against tagnames ---the tagnames are extracted by the labelling function <TT>tagged</TT>.)<BR>-<BR>-Furthermore, it is possible to combine labellings. The <TT>`x`</TT>-combinator glues two labelling functions together, pairing the-labels they produce.-<PRE>-  `x` :: (CFilter-&gt;LabelFilter a)-           -&gt; (CFilter-&gt;LabelFilter b)-           -&gt; (CFilter-&gt;LabelFilter (a,b))-</PRE><!--TOC subsection Algebraic laws of combinators-->--<H3>2.5&nbsp;&nbsp;Algebraic laws of combinators</H3>-<A NAME="laws"></A>-We briefly show how combinators are defined in such a way that-various algebraic laws hold. The complete set of laws is given in-Figure <A HREF="#tablelaws">6</A>.<BR>-<BR>-<BLOCKQUOTE><HR>--<TABLE CELLSPACING=0 CELLPADDING=0>-<TR><TD>&nbsp;</TD>-<TD><B>Irish composition</B></TD>-</TR>-<TR><TD><CODE>f `o` (g `o` h)  =  (f `o` g) `o` h</CODE>	</TD>-<TD>&nbsp;</TD>-<TD><EM>associativity </EM></TD>-</TR>-<TR><TD><CODE>none `o` f       =  f `o` none  =  none</CODE>	</TD>-<TD>&nbsp;</TD>-<TD><EM>zero </EM></TD>-</TR>-<TR><TD><CODE>keep `o` f       =  f `o` keep  =  f</CODE>	</TD>-<TD>&nbsp;</TD>-<TD><EM>identity </EM></TD>-</TR>-<TR><TD>&nbsp;</TD>-</TR>-<TR><TD>&nbsp;</TD>-<TD><B>Guards </B></TD>-</TR>-<TR><TD><CODE>f `with` keep  =  f</CODE> 			</TD>-<TD>&nbsp;</TD>-<TD><EM>identity </EM></TD>-</TR>-<TR><TD><CODE>f `with` none  =  none `with` f = none</CODE>	</TD>-<TD>&nbsp;</TD>-<TD><EM>zero </EM></TD>-</TR>-<TR><TD><CODE>(f `with` g) `with` g  =  f `with` g</CODE>	</TD>-<TD>&nbsp;</TD>-<TD><EM>idempotence </EM></TD>-</TR>-<TR><TD><CODE>(f `with` g) `with` h</CODE></TD>-</TR>-<TR><TD><CODE>            =  (f `with` h) `with` g</CODE>	</TD>-<TD>&nbsp;</TD>-<TD><EM>promotion </EM></TD>-</TR>-<TR><TD><CODE>(f `o` g) `with` h</CODE></TD>-</TR>-<TR><TD><CODE>            =  (f `with` h) `o` g</CODE>	</TD>-<TD>&nbsp;</TD>-<TD><EM>promotion </EM></TD>-</TR>-<TR><TD>&nbsp;</TD>-</TR>-<TR><TD><CODE>f `without` keep  =  none `without` f</CODE></TD>-</TR>-<TR><TD><CODE>                  =  none</CODE>		</TD>-<TD>&nbsp;</TD>-<TD><EM>zero </EM></TD>-</TR>-<TR><TD><CODE>f `without` none  =  keep</CODE>		</TD>-<TD>&nbsp;</TD>-<TD><EM>identity </EM></TD>-</TR>-<TR><TD><CODE>(f `without` g) `without` g</CODE></TD>-</TR>-<TR><TD><CODE>        =  f `without` g</CODE>		</TD>-<TD>&nbsp;</TD>-<TD><EM>idempotence </EM></TD>-</TR>-<TR><TD><CODE>(f `without` g) `without` h</CODE></TD>-</TR>-<TR><TD><CODE>        =  (f `without` h) `without` g</CODE>	</TD>-<TD>&nbsp;</TD>-<TD><EM>promotion </EM></TD>-</TR>-<TR><TD><CODE>(f `o` g) `without` h</CODE></TD>-</TR>-<TR><TD><CODE>        =  (f `without` h) `o` g</CODE>	</TD>-<TD>&nbsp;</TD>-<TD><EM>promotion </EM></TD>-</TR>-<TR><TD>&nbsp;</TD>-</TR>-<TR><TD>&nbsp;</TD>-<TD><B>Path selectors </B></TD>-</TR>-<TR><TD><CODE>f /&gt; (g /&gt; h)  =  (f /&gt; g) /&gt; h</CODE>	</TD>-<TD>&nbsp;</TD>-<TD><EM>associativity </EM></TD>-</TR>-<TR><TD><CODE>none /&gt; f      =  f /&gt; none  =  none</CODE>	</TD>-<TD>&nbsp;</TD>-<TD><EM>zero </EM></TD>-</TR>-<TR><TD><CODE>keep /&gt; f      =  f `o` children</CODE>		</TD>-<TD>&nbsp;</TD>-<TD>&nbsp;</TD>-</TR>-<TR><TD><CODE>f /&gt; keep      =  children `o` f</CODE>		</TD>-<TD>&nbsp;</TD>-<TD>&nbsp;</TD>-</TR>-<TR><TD><CODE>keep /&gt; keep   =  children</CODE>		</TD>-<TD>&nbsp;</TD>-<TD>&nbsp;</TD>-</TR>-<TR><TD><CODE>none &lt;/ f      =  f &lt;/ none  =  none</CODE>	</TD>-<TD>&nbsp;</TD>-<TD><EM>zero </EM></TD>-</TR>-<TR><TD><CODE>f &lt;/ keep      =  f `with` children</CODE>	</TD>-<TD>&nbsp;</TD>-<TD>&nbsp;</TD>-</TR>-<TR><TD><CODE>(f &lt;/ g) &lt;/ g  =  f &lt;/ g</CODE>		</TD>-<TD>&nbsp;</TD>-<TD><EM>idempotence </EM></TD>-</TR>-<TR><TD><CODE>(f &lt;/ g) /&gt; g  =  f /&gt; g</CODE>		</TD>-<TD>&nbsp;</TD>-<TD><EM>idempotence </EM></TD>-</TR>-<TR><TD>&nbsp;</TD>-</TR>-<TR><TD><CODE>(f /&gt; g) &lt;/ h      =  f /&gt; (g &lt;/ h)</CODE>	</TD>-<TD>&nbsp;</TD>-<TD><EM>promotion </EM></TD>-</TR>-<TR><TD><CODE>(f &lt;/ g) &lt;/ h      =  (f &lt;/ h) &lt;/ g </CODE>	</TD>-<TD>&nbsp;</TD>-<TD><EM>promotion </EM></TD>-</TR>-<TR><TD><CODE>f `o` (g /&gt; h)     =  g /&gt; (f `o` h)</CODE>	</TD>-<TD>&nbsp;</TD>-<TD><EM>promotion </EM></TD>-</TR>-<TR><TD><CODE>(f /&gt; g) `o` h     =  (f `o` h) /&gt; g</CODE>	</TD>-<TD>&nbsp;</TD>-<TD><EM>promotion </EM></TD>-</TR>-<TR><TD><CODE>(f /&gt; g) `with` h  =  f /&gt; (g `with` h)</CODE></TD>-<TD>&nbsp;</TD>-<TD><EM>promotion </EM></TD>-</TR>-<TR><TD><CODE>(f &lt;/ g) `with` h  =  (f `with` h) &lt;/ g</CODE></TD>-<TD>&nbsp;</TD>-<TD><EM>promotion </EM></TD>-</TR>-<TR><TD>&nbsp;</TD>-</TR>-<TR><TD>&nbsp;</TD>-<TD><B>Directed choice </B></TD>-</TR>-<TR><TD><CODE>(f |&gt;| g) |&gt;| h  =  f |&gt;| (g |&gt;| h)</CODE>	</TD>-<TD>&nbsp;</TD>-<TD><EM>associativity </EM></TD>-</TR>-<TR><TD><CODE>keep |&gt;| f       =  keep</CODE>		</TD>-<TD>&nbsp;</TD>-<TD>&nbsp;</TD>-</TR>-<TR><TD><CODE>none |&gt;| f       =  f |&gt;| none  =  f</CODE>	</TD>-<TD>&nbsp;</TD>-<TD><EM>identity </EM></TD>-</TR>-<TR><TD><CODE>f    |&gt;| f       =  f</CODE>			</TD>-<TD>&nbsp;</TD>-<TD><EM>idempotence </EM></TD>-</TR>-<TR><TD>&nbsp;</TD>-</TR>-<TR><TD>&nbsp;</TD>-<TD><B>Recursion </B></TD>-</TR>-<TR><TD><CODE>deep keep      =  keep</CODE>			</TD>-<TD>&nbsp;</TD>-<TD><EM>simplification </EM></TD>-</TR>-<TR><TD><CODE>deep none      =  none</CODE>			</TD>-<TD>&nbsp;</TD>-<TD><EM>simplification </EM></TD>-</TR>-<TR><TD><CODE>deep children  =  children</CODE>		</TD>-<TD>&nbsp;</TD>-<TD><EM>simplification </EM></TD>-</TR>-<TR><TD><CODE>deep (deep f)  =  deep f</CODE>		</TD>-<TD>&nbsp;</TD>-<TD><EM>depth law </EM></TD>-</TR>-<TR><TD>&nbsp;</TD>-</TR>-<TR><TD>&nbsp;</TD>-<TD><B>Misc </B></TD>-</TR>-<TR><TD><CODE>elm |&gt;| txt = txt |&gt;| elm = keep</CODE>	</TD>-<TD>&nbsp;</TD>-<TD><EM>completeness </EM></TD>-</TR>-<TR><TD><CODE>elm `o` txt = txt `o` elm = none</CODE>	</TD>-<TD>&nbsp;</TD>-<TD><EM>excl. middle </EM></TD>-</TR>-<TR><TD><CODE>children `o` elm  =  children</CODE>		</TD>-<TD>&nbsp;</TD>-<TD>&nbsp;</TD>-</TR>-<TR><TD><CODE>children `o` txt  =  none</CODE>		</TD>-<TD>&nbsp;</TD>-<TD>-</TD>-</TR></TABLE>---<BR>-<DIV ALIGN=center>Figure 6: Algebraic laws of combinators.-<A NAME="tablelaws"></A></DIV>-<HR></BLOCKQUOTE>Giving all content filters the same type maximises the usefulness of-combinators for plugging together functions of this type. However, it-is still helpful to identify subclasses of content filters that offer-extra guarantees. Two examples of such classes are:-<OL>-<LI>-A <EM>predicate</EM> <TT>p</TT> has the property that <TT>p c</TT>-always gives as result either <TT>[c]</TT> or <TT>[]</TT>.--<LI>-A <EM>selector</EM> <TT>s</TT> has the property that <TT>s c</TT>-always gives as result a sequence of contents taken from-<TT>c</TT>.-Resulting items do not overlap, and-the result sequence respects the order in which the contents-were found in <TT>c</TT>.-</OL>-So a predicate is a selector, but a selector is not necessarily-a predicate.<BR>-<BR>-The <TT>`o`</TT> form of filter composition-could be defined using a Haskell <EM>list comprehension</EM>-<PRE>-    (f `o` g) c = [c'' | c' &lt;- g c, c'' &lt;- f c']-</PRE>However, we prefer the equivalent higher-order definition-<CODE> f `o` g = concat . map f . g </CODE>-because it is more convenient in algebraic-calculation.<A NAME="text8"></A><A HREF="#note8"><SUP><FONT SIZE=2>8</FONT></SUP></A>--Composition is associative, with <TT>none</TT> as zero, and <TT>keep</TT> as-identity.<BR>-<BR>-The <TT>`with`</TT> form of guarded composition is <EM>not</EM> associative,-but we do have some laws, particularly idempotence. We also have a-promotion law about combined uses of <TT>`with`</TT> and <TT>`o`</TT>.-The dual operator, <TT>`without`</TT> has parallel laws.<BR>-<BR>-The <TT>/&gt;</TT> path selector is associative but <TT>&lt;/</TT> is not, and there-are some idempotence laws for both. Most important however, are the-various promotion laws for changing the order of application of <TT>/&gt;</TT>,-<TT>&lt;/</TT>, and <TT>with</TT>.<BR>-<BR>-The directed choice operator <TT>|&gt;|</TT> viewed by itself appears to be-algebraically sensible, but it does not seem to have useful algebraic-properties in connection with other combinators because of its bias-towards the left operand. The simpler result-appending combinator <TT>|||</TT> could be an alternative to the directed choice operator, and would-probably lead to more laws, but it has less `application bite'. A-potentially serious problem is that the <TT>|||</TT>-combination of two-selectors is not necessarily a selector.<BR>-<BR>-The recursion operator <TT>deep</TT> has some minor laws, one of which,-the depth law, is more profound. We have not yet fully investigated-the properties of <TT>deepest</TT>, <TT>multi</TT>, and <TT>foldXml</TT>.<BR>-<BR>--<BR>-<BR>-<!--TOC section Translation of DTDs to Types-->--<H2>3&nbsp;&nbsp;Translation of DTDs to Types</H2>-<A NAME="translation"></A><!--TOC subsection DTDs-->--<H3>3.1&nbsp;&nbsp;DTDs</H3>-So far we have considered document-processing by generic tree-transformations, where markup is matched textually at runtime, and-no account is taken of any deeper meaning of tags.<BR>-<BR>-However, when the DTD for a document is available, the meaning it-defines for markup tags can be used to powerful effect. The most basic-use is to confirm semantic <EM>validity</EM>: a stronger notion than mere-syntactic well-formedness. A DTD defines a grammar for document-content: it specifies a vocabulary of markup tags, and the allowed-content and attributes for each tag. Document validation is therefore a-straightforward check that the document's structure conforms to the-vocabulary and grammar given in the DTD.<BR>-<BR>-XML document validators are readily available. However, we go further-and define the idea of <EM>valid document processing</EM>. A valid-processing script is one which produces a valid document as output,-given a valid document as input. We achieve this by demonstrating a-correspondence-between the DTD of a document and the-definition of a set of algebraic types in Haskell, and the consequent-correspondence between the document's content and a structured Haskell-value. Hence, by writing document processing scripts to manipulate the-typed Haskell value, the script validation problem is just an instance-of normal Haskell type inference.<A NAME="text9"></A><A HREF="#note9"><SUP><FONT SIZE=2>9</FONT></SUP></A>-<BR>-<BR>-<BLOCKQUOTE><HR>-<PRE>-&lt;?xml version='1.0'?&gt;-&lt;!DOCTYPE album SYSTEM "album.dtd" [-&lt;!ELEMENT album (title, artist, recordingdate?,-                 coverart, (catalogno)+,-                 personnel, tracks, notes) &gt;-&lt;!ELEMENT title #PCDATA&gt;-&lt;!ELEMENT artist #PCDATA&gt;-&lt;!ELEMENT recordingdate EMPTY&gt;-    &lt;!ATTLIST recordingdate date CDATA #IMPLIED-                            place CDATA #IMPLIED&gt;-&lt;!ELEMENT coverart (location)? &gt;-    &lt;!ATTLIST coverart style CDATA #REQUIRED&gt;-&lt;!ELEMENT location EMPTY &gt;-    &lt;!ATTLIST location thumbnail CDATA #IMPLIED-                       fullsize CDATA #IMPLIED&gt;-&lt;!ELEMENT catalogno EMPTY &gt;-    &lt;!ATTLIST-          catalogno-              label CDATA #REQUIRED-              number CDATA #REQUIRED-              format (CD | LP | MiniDisc) #IMPLIED-              releasedate CDATA #IMPLIED-              country CDATA #IMPLIED&gt;-&lt;!ELEMENT personnel (player)+ &gt;-&lt;!ELEMENT player EMPTY &gt;-    &lt;!ATTLIST player name CDATA #REQUIRED-                      instrument CDATA #REQUIRED&gt;-&lt;!ELEMENT tracks (track)* &gt;-&lt;!ELEMENT track EMPTY&gt;-    &lt;!ATTLIST track title CDATA #REQUIRED-                    credit CDATA #IMPLIED-                    timing CDATA #IMPLIED&gt;-&lt;!ELEMENT notes (#PCDATA | albumref | trackref)* &gt;-    &lt;!ATTLIST notes author CDATA #IMPLIED&gt;-&lt;!ELEMENT albumref #PCDATA&gt;-    &lt;!ATTLIST albumref link CDATA #REQUIRED&gt;-&lt;!ELEMENT trackref #PCDATA&gt;-    &lt;!ATTLIST trackref link CDATA #IMPLIED&gt;-]&gt;-</PRE>--<DIV ALIGN=center>Figure 7: An example DTD.-<A NAME="exampledtd"></A></DIV>-<HR></BLOCKQUOTE><BLOCKQUOTE><HR>-<PRE>-module AlbumDTD where--data Album = -    Album Title Artist (Maybe Recordingdate)-          Coverart [Catalogno] Personnel-          Tracks Notes-newtype Title = Title String-newtype Artist = Artist String-newtype Recordingdate =-                Recordingdate Recordingdate_Attrs-data Recordingdate_Attrs = Recordingdate_Attrs {-    date :: Maybe String,-    place :: Maybe String }-newtype Coverart = Coverart (String, Maybe Location)-newtype Location = Location Location_Attrs-data Location_Attrs = Location_Attrs {-    thumbnail :: Maybe String,-    fullsize  :: Maybe String }-newtype Catalogno = Catalogno Catalogno_Attrs-data Catalogno_Attrs = Catalogno_Attrs {-    label :: String,-    number :: String,-    format :: Maybe Format,-    releasedate :: Maybe String,-    country :: Maybe String }-data Format = CD | LP | MiniDisc-newtype Personnel = Personnel [Player]-newtype Player = Player Player_Attrs-data Player_Attrs = Player_Attrs {-    name :: String,-    instrument :: String }-newtype Tracks = Tracks [Track]-newtype Track = Track Track_Attrs-data Track_Attrs = Track_Attrs {-    title :: String,-    credit :: Maybe String,-    timing :: Maybe String }-newtype Notes = Notes (Maybe String, [Notes_])-data Notes_ = -    Notes_Str String-  | Notes_Albumref Albumref-  | Notes_Trackref Trackref-newtype Albumref = Albumref (String,String)-newtype Trackref = Trackref (Maybe String,String)-</PRE>--<DIV ALIGN=center>Figure 8: The example DTD translated to Haskell types.-<A NAME="haskelldtd"></A></DIV>-<HR></BLOCKQUOTE><!--TOC subsection DTD translations.-->--<H3>3.2&nbsp;&nbsp;DTD translations.</H3>An example DTD for the document shown earlier is given in-Figure <A HREF="#exampledtd">7</A>. The immediate features to note are:-(1) For every element, there is a specification of allowed inner elements- (<CODE>ELEMENT</CODE> declaration), and possibly also a specification of allowed- attribute values (<CODE>ATTLIST</CODE> declaration).-(2) For inner content, the grammar allows sequence (commas), choice- (vertical bar), optionality (question mark), and repetition (star or plus).-(3) Where the inner content declaration allows free text (<CODE>#PCDATA</CODE>),- choice between text and other elements is permitted, but sequencing of- those elements is not permitted.-(4) In attribute lists, some values are mandatory (<CODE>#REQUIRED</CODE>) and- some are optional (<CODE>#IMPLIED</CODE>); attribute values can either be- unconstrained strings (<CODE>CDATA</CODE>) or a member of some pre-defined- set of string values.<BR>-<BR>-There seem to be some obvious correspondences between this very-restricted form of type language and the richer type language of-Haskell. Each element declaration is roughly speaking a new datatype-declaration. Sequence is like product types (i.e. single-constructor-values). Choice is like sum types (i.e. multi-constructor values).-Optionality is just a <TT>Maybe</TT> type. Repetition is lists.<BR>-<BR>-Attribute lists also have a translation: because they are unordered and-accessed by name, Haskell named-fields look like a good-representation. Optionality can again be expressed as <TT>Maybe</TT>-types. Attribute values that are constrained to a particular value-set-can be modelled by defining a new enumeration type encompassing the-permitted strings.<BR>-<BR>-<!--TOC subsection Implementation-->--<H3>3.3&nbsp;&nbsp;Implementation</H3>-These rules are formalised in the appendix (Figure <A HREF="#DTDrules">9</A>).-An implementation of these rules (with some additional rules to-eliminate redundancy) translated the DTD in Figure <A HREF="#exampledtd">7</A>-into the Haskell type declarations shown in Figure <A HREF="#haskelldtd">8</A>.<BR>-<BR>-Also needed, along with the type declarations, are functions which read-and write values of these types to and from actual XML documents.-These are generated automatically from the type declarations alone.-Using an appropriate set of pre-defined type classes, we derive a new-instance for each generated type using a tool like DrIFT [<CITE><A HREF="#DRiFT"><CITE>16</CITE></A></CITE>].<BR>-<BR>-<!--TOC subsection Discussion-->--<H3>3.4&nbsp;&nbsp;Discussion</H3>-Although this type-based translation looks straightforward, it turns-out that there are several tricky issues.<BR>-<BR>-First, the type translation may only use datatypes and newtypes, never-type synonyms. This is a result of needing to write values out as XML--- a type synonym in Haskell is indistinguishable from the type it-abbreviates, but the generated types must be distinct in order to be-able to re-introduce enclosing start and end tags with the correct-markup.<BR>-<BR>-A separate type is introduced for each collection of attributes.-Hence, an element is represented by a pairing of the attributes-and the content. Where a tagged element directly contains an optional-type or a sequence of types which are themselves sum-types, it is-necessary to interpose a separate Haskell type, e.g. <CODE>Notes</CODE>-contains a <CODE>[Notes_]</CODE> where the auxiliary type <CODE>Notes_</CODE> has-three alternatives.<BR>-<BR>-Naming is a big issue. Case matters in XML, so a <TT>&lt;tag&gt;</TT> differs-from a <TT>&lt;TAG&gt;</TT> and attribute <TT>attr</TT> differs from <TT>Attr</TT>.-In Haskell however, types must begin with upper-case, and field-names-must begin with lower-case. Where auxiliary types are necessary,-we have chosen to append an underscore character to the name. All-of these factors impose restrictions on the use of this-translation, due to the potential name conflicts.<BR>-<BR>-Furthermore, there is a mismatch between Haskell's named fields and the-attribute naming/scoping rules in XML. In XML, different elements may-have attributes of the same name and type, whereas Haskell's named-fields are restricted to use within a single type. A system of typed-extensible records [<CITE><A HREF="#Gaster98"><CITE>5</CITE></A></CITE>] would be a much better fit.<BR>-<BR>-Despite these problems in expressing DTDs within the Haskell-typesystem, the latter is very much more powerful than DTDs -- for-instance, DTDs have no notion of polymorphism. Indeed, there are-frequent occasions when DTD writers resort to textual-macros<A NAME="text10"></A><A HREF="#note10"><SUP><FONT SIZE=2>10</FONT></SUP></A>- to indicate more-detailed structuring than DTDs permit (including polymorphism and-qualified typing), even though such implicit structuring cannot be-validated by XML tools. It is significant to note the XML community's-recognition of these limitations of DTDs -- recent proposals for <EM>schemas</EM><A NAME="text11"></A><A HREF="#note11"><SUP><FONT SIZE=2>11</FONT></SUP></A>--address the question of richer-typing in a more disciplined manner.<BR>-<BR>-One area in which the type system of Haskell in particular (as opposed-to other functional languages) is exploited is type classes. This-systematic overloading mechanism is very useful for codifying the I/O-conversions.<BR>-<BR>--<!--TOC section Pros and cons of the two schemes-->--<H2>4&nbsp;&nbsp;Pros and cons of the two schemes</H2>-<A NAME="evaluation"></A><!--TOC subsection Combinators-->--<H3>4.1&nbsp;&nbsp;Combinators</H3>--Compared with the mainstream solution for XML processing,-namely new domain-specific languages for expressing and scripting-transformations, the combinator approach has several advantages:<BR>-<BR>--<H5>Ease of extension and variation</H5>- Scripting languages sometimes lack useful facilities, or provide- them in convoluted ways. Extending the language is difficult. A- combinator library, however, can be enlarged comparatively- straightforwardly -- the definitions are accessible, and most are- short and simple.<BR>-<BR>--<H5>Computational power</H5>- Scripting languages tend to offer either a- very limited expression language, or a hook into a programming- system at a completely different level of abstraction. But if XML- scripts are programs in a language such as Haskell, the full power- of the native language is immediately available.<BR>-<BR>--<H5>Abstraction, generality and reuse</H5>- Almost any pattern occurring in a combinator program can be isolated- and defined as a separate re-usable idea [<CITE><A HREF="#Hughes89"><CITE>6</CITE></A></CITE>]. This also- applies at the application level, where common ideas from similar- applications might easily be defined in a higher-level library.- This form of re-use makes program development much quicker and less- error-prone.<BR>-<BR>--<H5>Laws for reasoning about scripts</H5>- The semantics of a scripting language are often defined by- illustration. So it is hard to reason with confidence about the- meanings of scripts. Is <I>A</I> just a stylistic variation of <I>B</I> or- are there inputs for which the two could give different results?- But when the semantics of scripts can be defined in terms of the- equations for the combinators, properties such as associativity and- distribution can often be demonstrated simply.<BR>-<BR>--<H5>Implementation for free</H5>- Does a scripting language have an interactive interpreter? A- compiler? A type-checker? A profiler? All these things are- immediately available to XML scripts directly expressed as Haskell- programs.<BR>-<BR>--Of course, there are disadvantages too.<BR>-<BR>--<H5>Distance from target language</H5>- XSLT [<CITE><A HREF="#xslt"><CITE>3</CITE></A></CITE>] has the property that a script is an expression in- the target language: it uses exactly the XML syntax for- building new content. Combinator-based scripts must- use a different syntax due to the underlying language.- The linguistic gap might cause confusion and increase learning costs.<BR>-<BR>--<H5>Living in an unfamiliar world</H5>- Combinator programs <EM>look like</EM> scripts in a small- domain-specific language. Writers may be beguiled by this apparent- simplicity, make a small error, and drop into an unknown corner of- Haskell. Error messages may be incomprehensible, or worse,- the script might work but do something utterly strange.<BR>-<BR>-<!--TOC subsection Type-based translation-->--<H3>4.2&nbsp;&nbsp;Type-based translation</H3>-Some of the advantages of the fully-typed representation of XML-documents have already been mentioned.<BR>-<BR>--<H5>Validity</H5>- The ability for the system to spot errors automatically, not just- in the data, but in the program, and also to prevent the generation- of incorrect document markup.<BR>-<BR>--<H5>Direct programming style</H5>- Functional languages encourage the use of pattern-matching (binding- values to variables) on the left-hand-side of equations. However,- using higher-order combinators, data structures tend not to be- mentioned in equations at all. The DTD translation approach is- much more in keeping with the pattern-binding style, which- sometimes leads to shorter programs! Whereas with combinators, it- is sometimes necessary to re-traverse the same selection path with- slight variations, the pattern-binding gives direct access for- free.<BR>-<BR>-<BR>--Disadvantages are:<BR>-<BR>--<H5>High startup cost</H5>- Before scripting document transformations, it is necessary to- acquire, check, and process the DTD. Although the generation of- Haskell types is automated, few people are familiar enough with- DTDs to be able to start using them immediately. They require- careful study and understanding before correct scripts can be written- and the initial investment of effort pays off.<BR>-<BR>--<H5>Incomplete type model</H5>- The grammar of DTDs is small and restrictive compared to the- sophisticated type systems available in functional languages.- Better means of type-specification in XML are still under- development. In the meantime, there is little scope for using- the full power of features like polymorphism.<BR>-<BR>--<!--TOC section Related Work-->--<H2>5&nbsp;&nbsp;Related Work</H2>-<A NAME="related"></A>-<H5>XML Processing</H5>-There are infant processing languages surrounding XML. Of most-interest here are:<BR>-<BR>-<UL>-<LI>XSLT [<CITE><A HREF="#xslt"><CITE>3</CITE></A></CITE>]- (eXtensible Style Language for Transformation) is a W3C-proposed- declarative language for expressing a limited form of transformations- on XML documents, originally intended for rendering to a layout-based- format, e.g. HTML, PostScript, etc., but now widely used for- XML-&gt;XML transformations.--<LI>DSSSL [<CITE><A HREF="#dsssl"><CITE>12</CITE></A></CITE>]- (Document Style Semantics and Specification Language) is a mature ISO- standard with no complete implementations. It is similar in essence- to XSLT, but deals with full SGML input, and is based on Scheme.-</UL>Not many functional language researchers are visibly engaged in-XML-related work, but-two other toolkits for XML-processing are Christian Lindig's XML-parser in-O'Caml<A NAME="text12"></A><A HREF="#note12"><SUP><FONT SIZE=2>12</FONT></SUP></A>--and Andreas Neumann's validating XML parser in-SML<A NAME="text13"></A><A HREF="#note13"><SUP><FONT SIZE=2>13</FONT></SUP></A>-.-To our knowledge, neither of these provides transformation capabilities-in either a combinator style or a type-translation style. Philip-Wadler has written a short formal semantics of XSL selection patterns-[<CITE><A HREF="#WadlerXSL"><CITE>15</CITE></A></CITE>].<BR>-<BR>--<H5>Application-based combinators</H5>-Parsing is the most extensively studied application for combinator-libraries. Since the original treatment by Burge [<CITE><A HREF="#Burge75"><CITE>2</CITE></A></CITE>], there-have been many variations on the theme. Swierstra and Duponcheel's-method incorporating on-the-fly grammar analysis and error-correction-is a notable recent example [<CITE><A HREF="#SwierstraDuponcheel96"><CITE>10</CITE></A></CITE>]. We hope it-may be possible to incorporate DTD-analysis in our combinators in a-similar style.<BR>-<BR>-Although many other libraries of application combinators have been-devised, the general design principles for such libraries are scarcely-referred to in the literature. Hughes' exposition of a design for-pretty-printing combinators [<CITE><A HREF="#Hughes95"><CITE>7</CITE></A></CITE>] is a unique resource in-this respect, and we have yet to exploit it fully.<BR>-<BR>--<H5>Tree-processing operators</H5>An earlier version of this paper prompted more than one-pointer to the work of Eelco Visser and colleagues [<CITE><A HREF="#Visser98"><CITE>13</CITE></A></CITE>].-Their motivating application is specification of strategies for program-optimisation, treated as rewriting over expression trees.-The result of applying a strategy is either a single term or failure:-non-determinism is achieved by backtracking but only the first success-is computed, whereas we deal in `lists of successes' [<CITE><A HREF="#Wadler85"><CITE>14</CITE></A></CITE>].-Their operators for combining strategies include composition,-directed choice, and an explicit µ operator for recursion.-They have several operators for specifying transformation of-child subterms: some are not so relevant to XML where-subtree position and arity are less often fixed than in program-syntax; however, one of the most frequently-applied operators is close to our <CODE>foldXml</CODE>.-Most significantly, Visser et. al. achieve great expressive-power by decomposing the match/re-build stages of rewriting,-and introducing <EM>explicit environments</EM> by which these stages-communicate. This makes it possible to-deal with subtleties such as variable bindings-in the program terms under transformation.-Although the structure of XML is simpler than the structure of-a programming language, our library could benefit from the addition-of support for binding variables when matching subtrees.<BR>-<BR>-Programming functions explicitly over the XML data-structure,-without the abstraction of combinators, Haskell pattern matching-provides bindings for subtrees. But only at a fixed (small) depth-from the root, beneath an explicitly stated pattern of constructors.-Mohnen [<CITE><A HREF="#Mohnen96"><CITE>9</CITE></A></CITE>] defines an extension of the pattern language-for deep matching: variables in a pattern can be bound to subterms-at arbitrary depth inside the original term. -The result of the match includes a <EM>context function</EM> representing-the original subject term with `holes' at the sites of matching;-subterms for these holes are supplied by arguments to the function.-So contexts are the complements of environments.-Mohnen shows how his matching extension simplifies various-tree-processing tasks, and also how it can be translated into-standard Haskell.-This work could provide one component of a hybrid solution,-with DTD-specific representation <EM>and</EM> generic forms of-traversal and matching.<BR>-<BR>-Visser et. al. [<CITE><A HREF="#Visser98"><CITE>13</CITE></A></CITE>] also discuss several other approaches-to the tree transformation problem.<BR>-<BR>--<!--TOC section Conclusions and Future Work-->--<H2>6&nbsp;&nbsp;Conclusions and Future Work</H2>-<A NAME="furtherwork"></A>In our experience, Haskell is a very suitable language for-XML processing.-For generic applications, a small set of combinators-designed with algebraic properties in mind can be powerful enough and-flexible enough to describe a full range of selection, testing, and-construction operations in a uniform framework.-For applications where the DTD is fixed, a tool deriving corresponding-types and associated I/O routines turns XML processing into Haskell-programming over typed data structures, and the Haskell typechecker-validates scripts.<BR>-<BR>-However, there is plenty of scope for further work, in several directions:<BR>-<BR>--<H5>Generality of combinators</H5>Though we have had generality as a design aim for our present combinator-library there is scope for generalising it further.<BR>-<BR>-<UL>-<LI>-<EM>Wider functionality.</EM>-Most content filters in our current library-are either pure selectors (with results that are sequences-of sub-trees from the full document tree) or pure constructors-(creating document content from values of other types).-The design could usefully be extended to include a more general class-of <EM>deletion</EM> operations in which sub-trees can be-thinned and pruned in various ways.-More general still are combinators for <EM>editing and transforming</EM>,-where some of the ideas in Visser's work could usefully be-transferred.--<LI>-<EM>Multiple inputs and outputs.</EM>-An interesting extension of single-document scripting is the handling-of multiple documents. Producing more than one output document-is no great problem.-But it is far more challenging to design appropriate combinators-for dealing with several inputs.--<LI>-<EM>More general types.</EM>-The labelling scheme has proved useful for some applications,-but the need for a separate <TT>LabelFilter</TT> type is a blemish.-We hope to generalise the <TT>CFilter</TT> type to incorporate <TT>LabelFilter</TT>-as a special case.-By making the <TT>CFilter</TT> type parametric it might even be possible-to incorporate the type-translation of DTDs within the combinator framework.-</UL>-<H5>Efficiency of combinators</H5>The current combinator library is quite usable, but here-are some possible routes to greater efficiency.-<UL>-<LI>-<EM>Algebraic normalisation</EM>-So far we have merely established that laws hold, and occasionally-appealed to them when writing scripts. -The implementation simply defines the combinators by their-specifying equations.-Instead, laws could be exploited at the implementation level.-Following Hughes [<CITE><A HREF="#Hughes95"><CITE>7</CITE></A></CITE>], we have in mind an implementation-that automatically reduces all combinations to a <EM>normal form</EM>,-that is the least expensive equivalent computationally. --<LI>-<EM>Space-efficient formulation</EM>-Some lazy functional programs that process trees in pre-order-left-to-right fashion can be formulated to run in log(N) space.-The part of the tree that is held in memory corresponds to -a path from the root to some node that is currently the focus-of computation: to the left are `garbage' subtrees already processed,-to the right are subtrees not yet evaluated.-However, our current combinators have not been formulated-to guarantee this sort of space behaviour, even in favourable cases.-This problem might be tackled by the normalisation approach.--<LI>-<EM>DTD-aware combinators</EM>-The current combinator library just ignores DTDs. Combinators that-maintain DTD information might, for example, achieve far more-efficient search in some cases by pruning branches bound to fail.-They could also be used to produce-first-class XML documents as the results of queries, not just-raw extracts of unknown type.-As we have already noted,-DTDs could perhaps be attached as labels in the sense of §<A HREF="#labelling">2.4</A>:-either as explicit values or implicitly in type information.-</UL>--<H5>Relations between DTDs</H5>As we have seen, in the DTD-directed approach with known fixed DTDs for -input and output, validation translates to static type-checking;-whereas generic combinators could in principle acquire-and compute DTDs dynamically.-These represent extremes with disadvantages of inflexibility-on the one hand and some insecurity on the other.-There are many other ways of handling -relations between DTDs.-For example:<BR>-<BR>-<UL>-<LI>-<EM>Polymorphic and higher-order scripts.</EM> -The generic approach would gain security if one could-<EM>infer</EM> a DTD-&gt;DTD function.-By analogy with functional programs-it is then natural to assign scripts polymorphic-and higher-order DTDs, making explicit their-degree of genericity.<BR>-<BR>--<LI>-<EM>Inclusion between DTDs.</EM>-This has been implicitly assumed already, but has practical-importance in its own right. As stock DTDs are-refined, XML documents will inhabit a hierarchy of-specialisation. Given several similar DTDs,-one would like to derive a DTD for a virtual common root-(intersection) or common descendent (union).-This goes well beyond the abilities of current type-inference-systems, but would make a useful addition to our functional-toolkit for XML processing.-</UL>-<!--TOC section Acknowledgements-->--<H2>Acknowledgements</H2>-Canon Research Centre (Europe) Ltd. suggested this line of work and-funded it. Philip Wadler, Christian Lindig, and Joe English gave very-helpful comments on an earlier draft of this paper and software.-Several anonymous referees also gave useful advice.<BR>-<BR>-<!--TOC section References-->--<H2>References</H2><DL COMPACT>-<DT><FONT COLOR=purple>[1]<A NAME="xml"></A></FONT><DD>-Tim Bray, Jean Paoli, and C.M. Sperberg-Macqueen.- Extensible Markup Language (XML) 1.0 (W3C- Recommendation).- <CODE>http://www.w3.org/TR/REC-xml</CODE>, WWW Consortium,- February 1998.<BR>-<BR>--<DT><FONT COLOR=purple>[2]<A NAME="Burge75"></A></FONT><DD>-W&nbsp;H Burge.- <EM>Recursive Programming Techniques</EM>.- Addison-Wesley, 1975.<BR>-<BR>--<DT><FONT COLOR=purple>[3]<A NAME="xslt"></A></FONT><DD>-James&nbsp;Clark (ed).- XSL Transformations (Working Draft).- <CODE>http://www.w3.org/TR/WD-xslt</CODE>, WWW Consortium,- April 1999.<BR>-<BR>--<DT><FONT COLOR=purple>[4]<A NAME="Fairbairn87"></A></FONT><DD>-Jon Fairbairn.- Making form follow function: An exercise in functional programming- style.- <EM>Software -- Practice and Experience</EM>, 17(6):379--386, June 1987.<BR>-<BR>--<DT><FONT COLOR=purple>[5]<A NAME="Gaster98"></A></FONT><DD>-Benedict&nbsp;R Gaster.- <EM>Records, Variants, and Qualified Types</EM>.- Dept of Computer Science, University of Nottingham,- <EM>PhD Thesis</EM>, 1998.<BR>-<BR>--<DT><FONT COLOR=purple>[6]<A NAME="Hughes89"></A></FONT><DD>-John Hughes.- Why functional programming matters.- <EM>Computer Journal</EM>, 32(2), April 1989.<BR>-<BR>--<DT><FONT COLOR=purple>[7]<A NAME="Hughes95"></A></FONT><DD>-John Hughes.- The design of a pretty-printing library.- In <EM>1st </EM><EM>I</EM><EM>ntl. </EM><EM>S</EM><EM>chool on </EM><EM>A</EM><EM>dvanced </EM><EM>F</EM><EM>unctional- </EM><EM>P</EM><EM>rogramming</EM>, pages 53--96. Springer LNCS Vol. 925, 1995.<BR>-<BR>--<DT><FONT COLOR=purple>[8]<A NAME="HuttonMeijer98"></A></FONT><DD>-Graham Hutton and Erik Meijer.- Monadic parsing in Haskell.- <EM>Journal of Functional Programming</EM>, 8(4), July 1998.<BR>-<BR>--<DT><FONT COLOR=purple>[9]<A NAME="Mohnen96"></A></FONT><DD>-Markus Mohnen.- Context patterns in Haskell.- In <EM>W</EM><EM>orkshop on </EM><EM>I</EM><EM>mplementation of </EM><EM>F</EM><EM>unctional </EM><EM>L</EM><EM>anguages</EM>,- pages 41--57. Springer LNCS Vol 1268, September 1996.<BR>-<BR>--<DT><FONT COLOR=purple>[10]<A NAME="SwierstraDuponcheel96"></A></FONT><DD>-Doaitse Swierstra and Luc Duponcheel.- Deterministic error-correcting combinator parsers.- In <EM>2nd </EM><EM>I</EM><EM>ntl. </EM><EM>S</EM><EM>chool on </EM><EM>A</EM><EM>dvanced </EM><EM>F</EM><EM>unctional- </EM><EM>P</EM><EM>rogramming</EM>, pages 184--207. Springer LNCS Vol 1129, August 1996.<BR>-<BR>--<DT><FONT COLOR=purple>[11]<A NAME="Turner79"></A></FONT><DD>-David&nbsp;A Turner.- A new implementation technique for applicative languages.- <EM>Software -- Practice and Experience</EM>, 9(1):31--50, January 1979.<BR>-<BR>--<DT><FONT COLOR=purple>[12]<A NAME="dsssl"></A></FONT><DD>-Unknown.- Document Style Semantics and Specification Language- (DSSSL) (Final Draft).- <CODE>http://occam.sjf.novell.com/dsssl/dsssl96/</CODE>,- Novell Publications, 1996.<BR>-<BR>--<DT><FONT COLOR=purple>[13]<A NAME="Visser98"></A></FONT><DD>-Eelco Visser, Zine el&nbsp;Abidine&nbsp;Benaissa, and Andrew Tolmach.- Building program optimisers with rewrite strategies.- In <EM>I</EM><EM>nternational </EM><EM>C</EM><EM>onference on </EM><EM>F</EM><EM>unctional </EM><EM>P</EM><EM>rogramming</EM>,- pages 13--26. ACM Press, September 1998.<BR>-<BR>--<DT><FONT COLOR=purple>[14]<A NAME="Wadler85"></A></FONT><DD>-Philip Wadler.- How to replace failure by a list of successes.- In <EM>F</EM><EM>unctional </EM><EM>P</EM><EM>rogramming </EM><EM>L</EM><EM>anguages and </EM><EM>C</EM><EM>omputer- </EM><EM>A</EM><EM>rchitecture</EM>, pages 113--128. Springer LNCS Vol 201, September 1985.<BR>-<BR>--<DT><FONT COLOR=purple>[15]<A NAME="WadlerXSL"></A></FONT><DD>-Philip Wadler.- A formal model of pattern matching in XSL.- Technical Report <CODE>http://www.cs.bell-labs.com/~wadler/xsl/</CODE>,- Bell Labs, January 1999.<BR>-<BR>--<DT><FONT COLOR=purple>[16]<A NAME="DRiFT"></A></FONT><DD>-Noel Winstanley.- Reflections on instance derivation.- In <EM>1997 </EM><EM>G</EM><EM>lasgow </EM><EM>F</EM><EM>unctional </EM><EM>P</EM><EM>rogramming </EM><EM>W</EM><EM>orkshop</EM>. BCS- Workshops in Computer Science, September 1997.</DL>---<BLOCKQUOTE><HR><!--TOC section Appendix: DTD translation rules-->--<H2>Appendix: DTD translation rules</H2>---<TABLE CELLSPACING=2 CELLPADDING=0>-<TR><TD  ALIGN=center NOWRAP COLSPAN=3><B>Type declarations</B></TD>-</TR>-<TR><TD  ALIGN=left NOWRAP><FONT COLOR=red><I>T</I></FONT>[[<TT>&lt;ELEMENT n </TT><TT><EM>spec</EM></TT><TT>&gt;</TT>]]</TD>-<TD  ALIGN=center NOWRAP>=</TD>-<TD  ALIGN=left NOWRAP><TT>newtype </TT><TT><EM>m</EM></TT><TT> =</TT></TD>-</TR>-<TR><TD  ALIGN=left NOWRAP>&nbsp;</TD>-<TD  ALIGN=center NOWRAP>&nbsp;</TD>-<TD  ALIGN=left NOWRAP><CODE>    </CODE><TT><EM>m</EM></TT><TT> (</TT><TT><EM>m</EM></TT><TT>_Attrs, </TT><TT><EM>m</EM></TT><TT>_)</TT></TD>-</TR>-<TR><TD  ALIGN=left NOWRAP>&nbsp;</TD>-<TD  ALIGN=center NOWRAP>&nbsp;</TD>-<TD  ALIGN=left NOWRAP><TT>newtype </TT><TT><EM>m</EM></TT><TT>_ = </TT><TT><FONT COLOR=red><I>D</I></FONT></TT><TT>[[</TT><TT><EM>spec</EM></TT><TT>]]</TT><TT> </TT><TT><EM>m</EM></TT><TT> </TT></TD>-</TR>-<TR><TD  ALIGN=left NOWRAP>&nbsp;</TD>-<TD  ALIGN=center NOWRAP>&nbsp;</TD>-<TD  ALIGN=right NOWRAP>where <TT><EM>m</EM></TT><TT> </TT><TT>=</TT><TT> </TT><TT><FONT COLOR=red><I>M</I></FONT></TT><TT>[[</TT><TT>n</TT><TT>]]</TT></TD>-</TR>-<TR><TD  ALIGN=left NOWRAP><FONT COLOR=red><I>T</I></FONT>[[<TT>&lt;ATTLIST n</TT></TD>-</TR>-<TR><TD  ALIGN=left NOWRAP><CODE>     </CODE><TT><I><I>decl</I><SUB><FONT SIZE=2>0</FONT></SUB></I></TT><TT> ... </TT><TT><I><I>decl</I><SUB><FONT SIZE=2><I>k</I></FONT></SUB></I></TT><TT><TT>&gt;</TT></TT>]]</TD>-<TD  ALIGN=center NOWRAP>=</TD>-<TD  ALIGN=left NOWRAP><TT>data </TT><TT><EM>m</EM></TT><TT>_Attrs = </TT></TD>-</TR>-<TR><TD  ALIGN=left NOWRAP>&nbsp;</TD>-<TD  ALIGN=center NOWRAP>&nbsp;</TD>-<TD  ALIGN=left NOWRAP><CODE>  </CODE><TT><EM>m</EM></TT><TT>_Attrs {</TT><TT><FONT COLOR=red><I>F</I></FONT></TT><TT>[[</TT><TT><I><I>decl</I><SUB><FONT SIZE=2>0</FONT></SUB></I></TT><TT>]]</TT></TD>-</TR>-<TR><TD  ALIGN=left NOWRAP>&nbsp;</TD>-<TD  ALIGN=center NOWRAP>&nbsp;</TD>-<TD  ALIGN=left NOWRAP><CODE>          ,</CODE> ...</TD>-</TR>-<TR><TD  ALIGN=left NOWRAP>&nbsp;</TD>-<TD  ALIGN=center NOWRAP>&nbsp;</TD>-<TD  ALIGN=left NOWRAP><CODE>          ,</CODE><TT><FONT COLOR=red><I>F</I></FONT></TT><TT>[[ </TT><TT><I><I>decl</I><SUB><FONT SIZE=2><I>k</I></FONT></SUB></I></TT><TT>]]</TT><TT> }</TT></TD>-</TR>-<TR><TD  ALIGN=left NOWRAP>&nbsp;</TD>-<TD  ALIGN=center NOWRAP>&nbsp;</TD>-<TD  ALIGN=right NOWRAP>where <TT><EM>m</EM></TT><TT> </TT><TT>=</TT><TT> </TT><TT><FONT COLOR=red><I>M</I></FONT></TT><TT>[[</TT><TT>n</TT><TT>]]</TT></TD>-</TR>-<TR><TD  ALIGN=left NOWRAP>&nbsp;</TD>-<TD  ALIGN=center NOWRAP>&nbsp;</TD>-<TD  ALIGN=left NOWRAP><FONT COLOR=red><I>A</I></FONT>[[<I><I>decl</I><SUB><FONT SIZE=2>0</FONT></SUB></I>]]</TD>-</TR>-<TR><TD  ALIGN=left NOWRAP>&nbsp;</TD>-<TD  ALIGN=center NOWRAP>&nbsp;</TD>-<TD  ALIGN=left NOWRAP>...</TD>-</TR>-<TR><TD  ALIGN=left NOWRAP>&nbsp;</TD>-<TD  ALIGN=center NOWRAP>&nbsp;</TD>-<TD  ALIGN=left NOWRAP><FONT COLOR=red><I>A</I></FONT>[[ <I><I>decl</I><SUB><FONT SIZE=2><I>k</I></FONT></SUB></I>]]</TD>-</TR>-<TR><TD  ALIGN=left NOWRAP>&nbsp;</TD>-</TR>-<TR><TD  ALIGN=center NOWRAP COLSPAN=3><B>RHS of type declarations</B></TD>-</TR>-<TR><TD  ALIGN=left NOWRAP><FONT COLOR=red><I>D</I></FONT>[[ ( <I>x</I><SUB><FONT SIZE=2>0</FONT></SUB>, <I>x</I><SUB><FONT SIZE=2>1</FONT></SUB>, ..., <I>x</I><SUB><FONT SIZE=2><I>k</I></FONT></SUB> ) ]] <I>m</I></TD>-<TD  ALIGN=center NOWRAP>=</TD>-<TD  ALIGN=left NOWRAP><FONT COLOR=red><I>C</I></FONT>[[ <I>m</I> <I>x</I><SUB><FONT SIZE=2>0</FONT></SUB> ... <I>x</I><SUB><FONT SIZE=2><I>k</I></FONT></SUB> ]]</TD>-</TR>-<TR><TD  ALIGN=left NOWRAP>&nbsp;</TD>-<TD  ALIGN=center NOWRAP>&nbsp;</TD>-<TD  ALIGN=left NOWRAP><CODE>  </CODE> <FONT COLOR=red><I>D</I></FONT>'[[ <I>x</I><SUB><FONT SIZE=2>0</FONT></SUB> ]]-   <FONT COLOR=red><I>D</I></FONT>'[[ <I>x</I><SUB><FONT SIZE=2>1</FONT></SUB> ]]-  ...   <FONT COLOR=red><I>D</I></FONT>'[[ <I>x</I><SUB><FONT SIZE=2><I>k</I></FONT></SUB> ]]</TD>-</TR>-<TR><TD  ALIGN=left NOWRAP><FONT COLOR=red><I>D</I></FONT>[[ ( <I>x</I><SUB><FONT SIZE=2>0</FONT></SUB> | <I>x</I><SUB><FONT SIZE=2>1</FONT></SUB> | ... | <I>x</I><SUB><FONT SIZE=2><I>k</I></FONT></SUB> ) ]] <I>m</I></TD>-<TD  ALIGN=center NOWRAP>=</TD>-<TD  ALIGN=left NOWRAP>   <FONT COLOR=red><I>C</I></FONT>[[ <I>m</I> <I>x</I><SUB><FONT SIZE=2>0</FONT></SUB> ]] <FONT COLOR=red><I>D</I></FONT>'[[ <I>x</I><SUB><FONT SIZE=2>0</FONT></SUB> ]]</TD>-</TR>-<TR><TD  ALIGN=left NOWRAP>&nbsp;</TD>-<TD  ALIGN=center NOWRAP>&nbsp;</TD>-<TD  ALIGN=left NOWRAP><CODE>|</CODE> <FONT COLOR=red><I>C</I></FONT>[[ <I>m</I> <I>x</I><SUB><FONT SIZE=2>1</FONT></SUB> ]] <FONT COLOR=red><I>D</I></FONT>'[[ <I>x</I><SUB><FONT SIZE=2>1</FONT></SUB> ]]</TD>-</TR>-<TR><TD  ALIGN=left NOWRAP>&nbsp;</TD>-<TD  ALIGN=center NOWRAP>&nbsp;</TD>-<TD  ALIGN=left NOWRAP><CODE>|</CODE> ...</TD>-</TR>-<TR><TD  ALIGN=left NOWRAP>&nbsp;</TD>-<TD  ALIGN=center NOWRAP>&nbsp;</TD>-<TD  ALIGN=left NOWRAP><CODE>|</CODE> <FONT COLOR=red><I>C</I></FONT>[[ <I>m</I> <I>x</I><SUB><FONT SIZE=2><I>k</I></FONT></SUB> ]] <FONT COLOR=red><I>D</I></FONT>'[[ <I>x</I><SUB><FONT SIZE=2><I>k</I></FONT></SUB> ]]</TD>-</TR>-<TR><TD  ALIGN=left NOWRAP><FONT COLOR=red><I>D</I></FONT>[[ (<I>x</I>)? ]] <I>m</I></TD>-<TD  ALIGN=center NOWRAP>=</TD>-<TD  ALIGN=left NOWRAP><TT>Maybe</TT> <FONT COLOR=red><I>D</I></FONT>'[[ <I>x</I> ]]</TD>-</TR>-<TR><TD  ALIGN=left NOWRAP><FONT COLOR=red><I>D</I></FONT>[[ (<I>x</I>)+ ]] <I>m</I></TD>-<TD  ALIGN=center NOWRAP>=</TD>-<TD  ALIGN=left NOWRAP><TT>List1</TT> <FONT COLOR=red><I>D</I></FONT>'[[ <I>x</I> ]]</TD>-</TR>-<TR><TD  ALIGN=left NOWRAP><FONT COLOR=red><I>D</I></FONT>[[ (<I>x</I>)* ]] <I>m</I></TD>-<TD  ALIGN=center NOWRAP>=</TD>-<TD  ALIGN=left NOWRAP><CODE>[</CODE> <FONT COLOR=red><I>D</I></FONT>'[[ <I>x</I> ]] <CODE>]</CODE></TD>-</TR>-<TR><TD  ALIGN=left NOWRAP><FONT COLOR=red><I>D</I></FONT>[[ <I>x</I> ]] <I>m</I></TD>-<TD  ALIGN=center NOWRAP>=</TD>-<TD  ALIGN=left NOWRAP><FONT COLOR=red><I>C</I></FONT>[[ <I>m</I> <I>x</I> ]]</TD>-</TR>-<TR><TD  ALIGN=left NOWRAP>&nbsp;</TD>-</TR>-<TR><TD  ALIGN=center NOWRAP COLSPAN=3><B>Inner type expressions</B></TD>-</TR>-<TR><TD  ALIGN=left NOWRAP><FONT COLOR=red><I>D</I></FONT>'[[ ( <I>x</I><SUB><FONT SIZE=2>0</FONT></SUB>, <I>x</I><SUB><FONT SIZE=2>1</FONT></SUB>, ..., <I>x</I><SUB><FONT SIZE=2><I>k</I></FONT></SUB> ) ]]</TD>-<TD  ALIGN=center NOWRAP>=</TD>-<TD  ALIGN=left NOWRAP><TT>(</TT>  <FONT COLOR=red><I>D</I></FONT>'[[ <I>x</I><SUB><FONT SIZE=2>0</FONT></SUB> ]]- <TT>,</TT>  <FONT COLOR=red><I>D</I></FONT>'[[ <I>x</I><SUB><FONT SIZE=2>1</FONT></SUB> ]]</TD>-</TR>-<TR><TD  ALIGN=left NOWRAP>&nbsp;</TD>-<TD  ALIGN=center NOWRAP>&nbsp;</TD>-<TD  ALIGN=left NOWRAP><CODE>  </CODE>- <TT>,</TT> ... <FONT COLOR=red><I>D</I></FONT>'[[ <I>x</I><SUB><FONT SIZE=2><I>k</I></FONT></SUB> ]]- <TT>)</TT></TD>-</TR>-<TR><TD  ALIGN=left NOWRAP><FONT COLOR=red><I>D</I></FONT>'[[ ( <I>x</I><SUB><FONT SIZE=2>0</FONT></SUB> | <I>x</I><SUB><FONT SIZE=2>1</FONT></SUB> | ... | <I>x</I><SUB><FONT SIZE=2><I>k</I></FONT></SUB> ) ]]</TD>-<TD  ALIGN=center NOWRAP>=</TD>-<TD  ALIGN=left NOWRAP><TT>(OneOf</TT><TT><SUB><FONT SIZE=2><I>n</I></FONT></SUB></TT>-  <FONT COLOR=red><I>D</I></FONT>'[[ <I>x</I><SUB><FONT SIZE=2>0</FONT></SUB> ]]-  <FONT COLOR=red><I>D</I></FONT>'[[ <I>x</I><SUB><FONT SIZE=2>1</FONT></SUB> ]]</TD>-</TR>-<TR><TD  ALIGN=left NOWRAP>&nbsp;</TD>-<TD  ALIGN=center NOWRAP>&nbsp;</TD>-<TD  ALIGN=left NOWRAP><CODE>         </CODE>-  ...-  <FONT COLOR=red><I>D</I></FONT>'[[ <I>x</I><SUB><FONT SIZE=2><I>k</I></FONT></SUB> ]] <TT>)</TT></TD>-</TR>-<TR><TD  ALIGN=left NOWRAP><FONT COLOR=red><I>D</I></FONT>'[[ (<I>x</I>)? ]]</TD>-<TD  ALIGN=center NOWRAP>=</TD>-<TD  ALIGN=left NOWRAP><TT>(Maybe</TT> <FONT COLOR=red><I>D</I></FONT>'[[ <I>x</I> ]] <TT>)</TT></TD>-</TR>-<TR><TD  ALIGN=left NOWRAP><FONT COLOR=red><I>D</I></FONT>'[[ (<I>x</I>)+ ]]</TD>-<TD  ALIGN=center NOWRAP>=</TD>-<TD  ALIGN=left NOWRAP><TT>(List1</TT> <FONT COLOR=red><I>D</I></FONT>'[[ <I>x</I> ]] <TT>)</TT></TD>-</TR>-<TR><TD  ALIGN=left NOWRAP><FONT COLOR=red><I>D</I></FONT>'[[ (<I>x</I>)* ]]</TD>-<TD  ALIGN=center NOWRAP>=</TD>-<TD  ALIGN=left NOWRAP><CODE>[</CODE> <FONT COLOR=red><I>D</I></FONT>'[[ <I>x</I> ]] <CODE>]</CODE></TD>-</TR>-<TR><TD  ALIGN=left NOWRAP><FONT COLOR=red><I>D</I></FONT>'[[ <I>x</I> ]]</TD>-<TD  ALIGN=center NOWRAP>=</TD>-<TD  ALIGN=left NOWRAP><FONT COLOR=red><I>C</I></FONT>[[ <I>x</I> ]]</TD>-</TR>-<TR><TD  ALIGN=left NOWRAP>&nbsp;</TD>-</TR>-<TR><TD  ALIGN=center NOWRAP COLSPAN=3><B>Name mangling</B></TD>-</TR>-<TR><TD  ALIGN=left NOWRAP><FONT COLOR=red><I>C</I></FONT>[[ <I>m</I> <I>x</I><SUB><FONT SIZE=2>0</FONT></SUB> <I>x</I><SUB><FONT SIZE=2>1</FONT></SUB> ... <I>x</I><SUB><FONT SIZE=2><I>k</I></FONT></SUB> ]]</TD>-<TD  ALIGN=center NOWRAP>=</TD>-<TD  ALIGN=left NOWRAP>... <EM>unique constructor name</EM></TD>-</TR>-<TR><TD  ALIGN=left NOWRAP>&nbsp;</TD>-<TD  ALIGN=center NOWRAP>&nbsp;</TD>-<TD  ALIGN=left NOWRAP><CODE>        </CODE><EM>based on </EM><EM><TT>m</TT></EM></TD>-</TR>-<TR><TD  ALIGN=left NOWRAP><FONT COLOR=red><I>M</I></FONT>[[ <I>n</I> ]]</TD>-<TD  ALIGN=center NOWRAP>=</TD>-<TD  ALIGN=left NOWRAP>... <EM>ensure initial upper-case</EM></TD>-</TR>-<TR><TD  ALIGN=left NOWRAP><FONT COLOR=red><I>M</I></FONT>'[[ <I>n</I> ]]</TD>-<TD  ALIGN=center NOWRAP>=</TD>-<TD  ALIGN=left NOWRAP>... <EM>ensure initial lower-case</EM></TD>-</TR>-<TR><TD  ALIGN=left NOWRAP>&nbsp;</TD>-</TR>-<TR><TD  ALIGN=center NOWRAP COLSPAN=3><B>Named fields</B></TD>-</TR>-<TR><TD  ALIGN=left NOWRAP COLSPAN=3><FONT COLOR=red><I>F</I></FONT>[[ <TT>n CDATA #REQUIRED</TT> ]]</TD>-</TR>-<TR><TD  ALIGN=left NOWRAP>&nbsp;</TD>-<TD  ALIGN=center NOWRAP>=</TD>-<TD  ALIGN=left NOWRAP><FONT COLOR=red><I>M</I></FONT>'[[ <I>n</I> ]]  <TT>:: String</TT></TD>-</TR>-<TR><TD  ALIGN=left NOWRAP COLSPAN=3><FONT COLOR=red><I>F</I></FONT>[[ <TT>n CDATA #IMPLIED</TT> ]]</TD>-</TR>-<TR><TD  ALIGN=left NOWRAP>&nbsp;</TD>-<TD  ALIGN=center NOWRAP>=</TD>-<TD  ALIGN=left NOWRAP><FONT COLOR=red><I>M</I></FONT>'[[ <I>n</I> ]]  <TT>:: Maybe String</TT></TD>-</TR>-<TR><TD  ALIGN=left NOWRAP COLSPAN=3><FONT COLOR=red><I>F</I></FONT>[[ <TT>n (</TT><TT><I>s</I><SUB><FONT SIZE=2>0</FONT></SUB>|<I>s</I><SUB><FONT SIZE=2>1</FONT></SUB>|...|<I>s</I><SUB><FONT SIZE=2><I>k</I></FONT></SUB></TT><TT>) #REQUIRED</TT> ]]</TD>-</TR>-<TR><TD  ALIGN=left NOWRAP>&nbsp;</TD>-<TD  ALIGN=center NOWRAP>=</TD>-<TD  ALIGN=left NOWRAP><FONT COLOR=red><I>M</I></FONT>'[[ <I>n</I> ]]  <TT>::</TT> <FONT COLOR=red><I>M</I></FONT>[[ <I>n</I> ]]</TD>-</TR>-<TR><TD  ALIGN=left NOWRAP COLSPAN=3><FONT COLOR=red><I>F</I></FONT>[[ <TT>n (</TT><TT><I>s</I><SUB><FONT SIZE=2>0</FONT></SUB>|<I>s</I><SUB><FONT SIZE=2>1</FONT></SUB>|...|<I>s</I><SUB><FONT SIZE=2><I>k</I></FONT></SUB></TT><TT>) #IMPLIED</TT> ]]</TD>-</TR>-<TR><TD  ALIGN=left NOWRAP>&nbsp;</TD>-<TD  ALIGN=center NOWRAP>=</TD>-<TD  ALIGN=left NOWRAP><FONT COLOR=red><I>M</I></FONT>'[[ <I>n</I> ]]  <TT>:: Maybe </TT> <FONT COLOR=red><I>M</I></FONT>[[ <I>n</I> ]]</TD>-</TR>-<TR><TD  ALIGN=left NOWRAP>&nbsp;</TD>-</TR>-<TR><TD  ALIGN=center NOWRAP COLSPAN=3><B>Constrained attributes</B></TD>-</TR>-<TR><TD  ALIGN=left NOWRAP><FONT COLOR=red><I>A</I></FONT>[[ <TT>n CDATA ...</TT> ]]</TD>-<TD  ALIGN=center NOWRAP>=</TD>-<TD  ALIGN=left NOWRAP>0</TD>-</TR>-<TR><TD  ALIGN=left NOWRAP COLSPAN=3><FONT COLOR=red><I>A</I></FONT>[[ <TT>n (</TT><TT><I>s</I><SUB><FONT SIZE=2>0</FONT></SUB>|<I>s</I><SUB><FONT SIZE=2>1</FONT></SUB>|...|<I>s</I><SUB><FONT SIZE=2><I>k</I></FONT></SUB></TT><TT>) ...</TT> ]]</TD>-</TR>-<TR><TD  ALIGN=left NOWRAP>&nbsp;</TD>-<TD  ALIGN=center NOWRAP>=</TD>-<TD  ALIGN=left NOWRAP><TT>data </TT> <FONT COLOR=red><I>M</I></FONT>[[ <I>n</I> ]]  <TT>=</TT></TD>-</TR>-<TR><TD  ALIGN=left NOWRAP>&nbsp;</TD>-<TD  ALIGN=center NOWRAP>&nbsp;</TD>-<TD  ALIGN=left NOWRAP><CODE>    </CODE>- <FONT COLOR=red><I>M</I></FONT>[[ <I>s</I><SUB><FONT SIZE=2>0</FONT></SUB> ]] <TT>|</TT>- <FONT COLOR=red><I>M</I></FONT>[[ <I>s</I><SUB><FONT SIZE=2>1</FONT></SUB> ]]</TD>-</TR>-<TR><TD  ALIGN=left NOWRAP>&nbsp;</TD>-<TD  ALIGN=center NOWRAP>&nbsp;</TD>-<TD  ALIGN=left NOWRAP><CODE>    </CODE> <TT>|</TT> ... <TT>|</TT>- <FONT COLOR=red><I>M</I></FONT>[[ <I>s</I><SUB><FONT SIZE=2><I>k</I></FONT></SUB> ]]</TD>-</TR></TABLE>---<BR>-<DIV ALIGN=center>Figure 9: DTD translation rules.-<A NAME="DTDrules"></A></DIV>-<HR></BLOCKQUOTE><!--BEGIN NOTES document-->-<HR ALIGN=left WIDTH="50%">-<DL>-<DT><A NAME="note1"></A><A HREF="#text1"><FONT SIZE=5>1</FONT></A>-<DD>The XML toolkit from this paper is available-on the WWW at <TT>http://www.cs.york.ac.uk/fp/HaXml/</TT>--<DT><A NAME="note2"></A><A HREF="#text2"><FONT SIZE=5>2</FONT></A>-<DD><EM>Xtract: a `grep'-like tool-for XML documents.</EM> -<TT>http://www.cs.york.ac.uk/fp/Xtract/</TT>--<DT><A NAME="note3"></A><A HREF="#text3"><FONT SIZE=5>3</FONT></A>-<DD>In light of the ``XML Namespaces'' recommendation,-in effect a mechanism for permitting multiple DTDs, such-facilities could be particularly useful. See-<TT>http://www.w3.org/TR/REC-xml-names</TT>--<DT><A NAME="note4"></A><A HREF="#text4"><FONT SIZE=5>4</FONT></A>-<DD>The shortened name <TT>elm</TT> was chosen to avoid a-clash with the Standard Prelude function <TT>elem</TT>.--<DT><A NAME="note5"></A><A HREF="#text5"><FONT SIZE=5>5</FONT></A>-<DD>For those familiar with the detail of XML, entity-references within the document are treated as plain text.--<DT><A NAME="note6"></A><A HREF="#text6"><FONT SIZE=5>6</FONT></A>-<DD>Actually, a list of-attribute/filter pairs. Each filter is applied to the current element-and the resultant content is flattened to a string value which is-assigned to the named attribute.--<DT><A NAME="note7"></A><A HREF="#text7"><FONT SIZE=5>7</FONT></A>-<DD>Actually a left-section-of the infix operator. Because filters are higher-order, their use is-eta-reduced and the rightmost argument disappears from view.--<DT><A NAME="note8"></A><A HREF="#text8"><FONT SIZE=5>8</FONT></A>-<DD>Irish composition is in fact just the flipped-argument-version of the Kleisi composition operator in the list monad.--<DT><A NAME="note9"></A><A HREF="#text9"><FONT SIZE=5>9</FONT></A>-<DD>Well, nearly!-Validity also encompasses some other minor checks, for-instance that IDREF attributes must be globally unique.--<DT><A NAME="note10"></A><A HREF="#text10"><FONT SIZE=5>10</FONT></A>-<DD>That is, parameter entity references.--<DT><A NAME="note11"></A><A HREF="#text11"><FONT SIZE=5>11</FONT></A>-<DD><TT>http://www.w3.org/TR/xmlschema-1</TT> for structures,--and <TT>http://www.w3.org/TR/xmlschema-2</TT> for datatypes.--<DT><A NAME="note12"></A><A HREF="#text12"><FONT SIZE=5>12</FONT></A>-<DD><TT>http://www.cs.tu-bs.de/softech/people/lindig/tony.html</TT>--<DT><A NAME="note13"></A><A HREF="#text13"><FONT SIZE=5>13</FONT></A>-<DD><TT>http://www.informatik.uni-trier.de/&nbsp;neumann/Fxp/</TT>-</DL><!--END NOTES--><!--HTMLFOOT-->-<!--ENDHTML-->--<!--FOOTER-->-<HR>--<BLOCKQUOTE><EM>This document was translated from L<sup>A</sup>T<sub>E</sub>X by </EM><A HREF="http://para.inria.fr/~maranget/hevea/index.html"><EM>H</EM><EM><FONT SIZE=2><sup>E</sup></FONT></EM><EM>V</EM><EM><FONT SIZE=2><sup>E</sup></FONT></EM><EM>A</EM></A><EM>.-</EM></BLOCKQUOTE></BODY>-</HTML>-
− docs/icfp99.ps.gz

binary file changed (106885 → absent bytes)

− docs/index.html
@@ -1,377 +0,0 @@-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">-<html>-<head>-<title>-  HaXml: Haskell and XML-</title>-</head>--<body bgcolor='#ffffff'>--<center>-<h1>HaXml</h1>-<table><tr><td width=200 align=center>-<a href="#what">What is HaXml?</a><br>-<a href="#how">How do I use it?</a><br>-<a href="#download">Downloads</a><br>-</td><td width=200 align=center>-<a href="#news">Recent news</a><br>-<a href="#who">Contacts</a><br>-<a href="#related">Related Work</a><br>-</td></tr></table>-</center>-<hr>--<p>-<font color="red">-<b>Warning!</b> The development versions (1.14 upwards) significantly-change the API of some modules!  They may be incomplete, inconsistent,-and liable to change before the next release!  Do not expect code-written against an earlier API to be compatible!  DtdToHaskell has only-recently been fixed to work with the new APIs! <b>Warning!</b>-</font>--<a href="migrate.html">Notes for migrating code from the 1.13 version of-HaXml to the development version.</a>--<hr>-<center><h3><a name="what">What is HaXml?</a></h3></center>-<p>-<b>HaXml</b> is a collection of utilities for parsing, filtering,-transforming, and generating-<a href="http://www.w3.org/TR/REC-xml">XML</a> documents using-<a href="http://www.haskell.org">Haskell</a>.  Its basic facilities-include:-<ul>-<li> a parser for XML,-<li> a separate error-correcting parser for HTML,-<li> a SAX-like stream parser for XML events,-<li> an XML validator,-<li> pretty-printers for XML and HTML.-</ul>--<p>-For processing XML documents, the following components are also provided:-<ul>-<li><em>Combinators</em> is a combinator library for generic XML document-    processing, including transformation, editing, and generation.-<li><em>XmlContent</em> is a replacement class for Haskell's Show/Read-    classes: it allows you to read and write ordinary Haskell data as XML-    documents (and vice versa).  The <em>DrIFT</em> tool (available from-    <a href="http://repetae.net/~john/computer/haskell/DrIFT/">-    <tt>http://repetae.net/~john/computer/haskell/DrIFT/</tt></a>)-    can automatically derive this class for you.-<li><em>DtdToHaskell</em> is a tool for translating any valid XML DTD-    into equivalent Haskell types, together with <em>XmlContent</em> instances.-<li>Finally, <em>Xtract</em> is a <em>grep</em>-like tool for XML documents,-    loosely based on the XPath and XQL query languages.  It can be used-    either from the command-line, or within your own code as part of the-    library.-</ul>--<hr>-<center><h3><a name="how">How do I use it?</a></h3></center>-<p>-<a href="HaXml/index.html">Detailed documentation of the HaXml APIs</a>-is generated automatically by Haddock directly from the source code.-<a href="http://haskell.org/HaXml/index.html">Documentation for the-previous (stable) version, HaXml-1.13.2</a>.--<p>-An introduction to HaXml for people who know more about XML than-about Haskell can be found at-<a href="http://www-106.ibm.com/developerworks/xml/library/x-matters14.html">-IBM DeveloperWorks</a>.-Please note that the DeveloperWorks article was based on an older-version of HaXml.  If you try to use the examples given there, you-will need a couple of minor but important edits, given as a-<a href="developerworks.patch">diff patch here</a>.--<p>-Koen Roelandt has written a more recent tutorial about using HaXml-to clean up some ugly HTML pages.-<a href="http://www.krowland.net/tutorials/haxml_tutorial.html">-http://www.krowland.net/tutorials/haxml_tutorial.html</a>--<p>-A paper describing and comparing the generic Combinators with-the typed representation (DtdToHaskell/XmlContent) is available here:-(12 pages of double-column A4)-<ul>-<li> <a href="icfp99.dvi">icfp99.dvi</a>     (LaTeX dvi format)-<li> <a href="icfp99.ps.gz">icfp99.ps.gz</a> (PostScript format - gzipped)-<li> <a href="icfp99.html">icfp99.html</a>   (HTML format)-</ul>--<p>-Some additional info about using the various facilities is here:-<ul>-<li> <a href="Combinators.html">Combinators</a>       (HTML format)-<li> <a href="XmlContent.html">XmlContent class</a>   (HTML format)-<li> <a href="DtdToHaskell.html">DtdToHaskell tool</a> (HTML format)-<li> <a href="Xtract.html">Xtract tool</a>            (HTML format)-</ul>--<p>-<b>Known problems:</b>-<ul>-<li> To use <em>-package HaXml</em> interactively with GHCi, you need-     at least ghci-5.02.3.-<li> The function toDTD generates Parameter Entity Declarations in the internal-     subset of the DTD, which don't conform to the strict well-formedness-     conditions of XML.  We think the constraint in question is spurious,-     and any reasonable XML tool ought to deal adequately with full PEs.-     Nevertheless, many standard XML processors reject these auto-generated-     DTDs.  The solution is easy - just write the DTD into a separate file!-<li> DtdToHaskell generates the Haskell String type for DTD attributes-     that are of Tokenized or Notation Types in XML.  This may not be-     entirely accurate.-</ul>--<hr>-<center><h3><a name="download">Downloads</a></h3></center>-<p>-<b>Development versions:</b><br>-HaXml-1.19.7, release date 2009.03.05<br>-From <a href="http://hackage.haskell.org/cgi-bin/hackage-scripts/package/HaXml">Hackage</a><br>-By HTTP:-<a href="http://www.cs.york.ac.uk/fp/HaXml-devel/HaXml-1.19.7.tar.gz">.tar.gz</a>,-<a href="http://www.cs.york.ac.uk/fp/HaXml-devel/HaXml-1.19.7.zip">.zip</a>.-<br>-By FTP: -<a href="ftp://ftp.cs.york.ac.uk/pub/haskell/HaXml/">-ftp://ftp.cs.york.ac.uk/pub/haskell/HaXml/</a>--<p>-<b>Ongoing development:</b>-The development version of HaXml is also available through-<br><tt><a href="http://darcs.net/">darcs</a> get-    http://www.cs.york.ac.uk/fp/darcs/HaXml</tt>--<p>-<b>Older versions:</b><br>-Stable version: for 1.13.3 see-<a href="http://haskell.org/HaXml/">-http://haskell.org/HaXml/</a>-<br>-By FTP: -<a href="ftp://ftp.cs.york.ac.uk/pub/haskell/HaXml/">-ftp://ftp.cs.york.ac.uk/pub/haskell/HaXml/</a>-<br>-FreeBSD port:-<a href="http://freshports.org/textproc/hs-haxml/">-http://freshports.org/textproc/haxml/</a>--<center><h3><a name="install">Installation</a></h3></center>-<p>-To install HaXml, you must have a Haskell compiler: <em>ghc-6.2</em>-or later, and/or <em>nhc98-1.16/hmake-3.06</em> or later, and/or-<em>Hugs98 (Sept 2003)</em> or later.  You must also first download and-install the <a href="http://www.cs.york.ac.uk/fp/polyparse">polyparse</a>-package as a pre-requisite.-<p>-Then, for more recent compilers,-use the standard Cabal method of installation:-<pre>-    runhaskell Setup.hs configure [--prefix=...] [--buildwith=...]-    runhaskell Setup.hs build-    runhaskell Setup.hs install-</pre>--For older compilers, use:-<pre>-    ./configure [--prefix=...] [--buildwith=...]-    make-    make install-</pre>-to configure, build, and install HaXml as a package for your-compiler(s).  You need write permission on the library installation-directories of your compiler(s).  Afterwards, to gain access to-the HaXml libraries, you only need to add the option <tt>-package-HaXml</tt> to your compiler commandline (no option required for Hugs).-Various stand-alone tools are also built - DtdToHaskell, Xtract,-Validate, MkOneOf - and copied to the final installation location-specified by the <tt>--prefix=...</tt> option to <tt>configure</tt>.--<p>-To build/install on a Windows system without the Cygwin shell and-utilities, you can avoid the configure/make steps by simply using the-minimal <em>Build.bat</em> script.  Edit it first for the location-of your compiler etc.--<hr>-<center><h3><a name="news">Recent news</a></h3></center>--<p>-Version 1.19.7 requires package polyparse-1.2 (previous versions require-polyparse-1.1).<br>-Version 1.19.6 has some bugfixes to XmlContent, to ensure that types-created via DtdToHaskell get converted back to XML correctly.<br>-Version 1.19.5 has some bugfixes to DtdToHaskell, to cope with especially-large datatypes.<br>-Version 1.19.4 has some minor bugfixes to increase compatibility with the-ByteString package.<br>-Version 1.19.2 updates the Cabal file to enable HaXml to build with both-ghc-6.6.x and ghc-6.8.x.<br>-Version 1.19.1 fixes a build error in 1.19.<br>-Version 1.19 improved the lazy XML parsing, and fixed some space leaks-in the XtractLazy tool.--<p>-Version 1.18 pulled out the parser combinator libraries as a separate-package (called polyparse), which must now be downloaded and installed-before installing HaXml.--<p>-Version 1.17 essentially just fixes compatibility with ghc-6.6.-However, it also include a lazier pretty-printer to use in conjunction-with the lazy parser, to save running out of memory on large datasets.--<p>-Version 1.16 adds laziness to the parser combinator libraries, such that-they can start to return partial results before a whole entity has been-parsed.  Partial is also used in the sense that the returned value can-contain bottom - an error which gets thrown as an exception when you try-to explore the inner regions of the value.  In terms of XML, it means you-get an element back as soon as its start-tag has been consumed, but if-there are parse errors later on, BOOM.  However, if there are no errors,-it does mean that your processing will be (a) faster and (b) less memory-hungry.  Another cool thing is that, even in the presence of errors, you-still might get enough output to satisfy your processing task before the-error is noticed.--<p>-Use <tt>Text.XML.HaXml.ParseLazy</tt> and-<tt>Text.XML.HaXml.Html.ParseLazy</tt> to try it out.  There are also-lazy versions of the supplied demo programs: <tt>CanonicaliseLazy</tt>-and <tt>XtractLazy</tt>.--<p>-Version 1.15 is essentially 1.14 with some bugfixes, and some new-functionality, especially in the parser combinator libraries.  DrIFT now-supports deriving the XmlContent class, and DtdToHaskell now also-derives the XmlContent class, in addition to determining a collection of-Haskell datatypes equivalent to a given DTD.--<p>-Error messages from parsing are much improved in 1.15 - they should-locate any error far more specifically and accurately.  Let me know-about examples which do not report correctly.--<p>-Prior to 1.14, there were two separate classes, Xml2Haskell and-Haskell2Xml.  They are now combined into the single class XmlContent.-Make sure you get a recent version of DrIFT if you want to derive this-class from Haskell datatypes - the included version of DtdToHaskell has-not yet been updated for deriving the class the other way, from an XML DTD.--<p>-Version 1.14 also contains a new SAX-like stream parser.--<p>-A while back, Graham Klyne extended the 1.12 version of HaXml-significantly, in particular to ensure that the parser passes a large-XML acceptance test suite, and to deal more correctly with Unicode,-namespaces, and parameter entity expansion.  His modifications will-eventually be merged back in to the main CVS tree, but in the meantime,-you can get his version here:-<a href="http://www.ninebynine.org/Software/HaskellUtils/">-<tt>http://www.ninebynine.org/Software/HaskellUtils/</tt></a>--<p>-The previous stable version (1.13) had the following features and fixes:<br>-<ul>-<li> Bugfixes to the document validator: no more infinite loops.-<li> Bugfixes to lexing mixed text and references between quote chars.-<li> Updated to work with ghc-6.4's new package mechanism.-</ul>--<br>-<a href="changelog.html">Complete Changelog</a><br>--<hr>-<center><h3><a name="who">Contacts</a></h3></center>-<p>-We are interested in hearing your feedback on these XML facilities --suggestions for improvements, comments, criticisms, bug reports.  Please mail-<ul>-<li>    <a href="mailto:Malcolm.Wallace@cs.york.ac.uk">-        Malcolm.Wallace@cs.york.ac.uk</a>  (implementation &amp; design)-</ul>--<p>-Development of these XML libraries was originally funded by Canon-Research Europe Ltd..  Subsequent maintenance and development has-been partially supported by the EPSRC, and the University of York.--<p><b>Licence:</b> The library is Free and Open Source Software,-i.e., the bits we wrote are copyright to us, but freely licensed-for your use, modification, and re-distribution, provided you don't-restrict anyone else's use of it.  The HaXml library is distributed-under the GNU Lesser General Public Licence (LGPL) - see file-<a href="LICENCE-LGPL">LICENCE-LGPL</a> for more details.  We allow one-special exception to the LGPL - see <a href="COPYRIGHT">COPYRIGHT</a>.-The HaXml tools are distributed under the GNU General Public Licence-(GPL) - see <a href="LICENCE-GPL">LICENCE-GPL</a>.  (If you don't-like any of these licensing conditions, please contact us to discuss-your requirements.)--<hr>-<p>-<center><h3><a name="related">Related work</a></h3></center>-<ul>-<li>Joe English has written a more space-efficient parser for XML-    in Haskell, called hxml.  What is more, it can be used as a simple-    drop-in replacement for the HaXml parser!-    <a href="http://www.flightlab.com/~joe/hxml/">Available here</a>.-<li>Uwe Schmidt designed another-    <a href="http://www.fh-wedel.de/~si/HXmlToolbox/">Haskell XML Toolbox</a>-    based on the ideas of HaXml and hxml.  It is well-maintained, and has-    recently been updated to use arrow-based combinators rather than filters-    as in HaXml.-<li>To use HaXml and HXT together, Henning Thielemann has put together-    <a href="http://darcs.haskell.org/wraxml/README">WraXML</a>,-    a wrapper using an alternative tree data structure, together with-    conversions to/from HaXml and HXT.-<li>Some comparisons between functional language approaches to processing-    XML can be found in-    <a href="http://www.xml.com/pub/a/2001/02/14/functional.html">-    Bijan Parsia's article on xml.com</a>-<li>Christian Lindig has written an XML parser in O'Caml:-    <a href="http://www.cs.tu-bs.de/softech/people/lindig/software/tony.html">-    here</a>.-<li>Andreas Neumann of the University of Trier has written a-    validating XML parser in Standard ML:-    <a href="http://www.informatik.uni-trier.de/~neumann/Fxp">here</a>.-<li>Erik Meijer and Mark Shields have a design for a functional programming-    language that treats XML documents as basic data types:-    <a href="http://www.cse.ogi.edu/~mbs/pub/xmlambda">XMLambda</a>.-<li>Benjamin Pierce and Haruo Hosoya have a different but similar design in-    <a href="http://xduce.sourceforge.net/">XDuce</a>, which is-    also implemented.-<li>Taking XDuce's approach further, is the very cool-    <a href="http://www.cduce.org/">CDuce</a> by Véronique Benzaken,-    Guiseppe Castagna, and Alain Frisch.  The CDuce language does-    fully statically-typed transformation of XML documents, thus-    guaranteeing correctness, and what is more, it is also faster-    than the untyped XSLT!-<li>The <a href="http://www.xcerpt.org/">Xcerpt project</a> uses HaXml-    to create another rule-based query and transformation language for XML,-    inspired by logic programming, and based on positional selection rather-    than navigational selection.-<li>Ulf Wiger describes an Erlang toolkit for XML:-    <a href="http://www.erlang.se/euc/00/">XMerL</a>-<li>The Java world has adopted the ideas from <em>DtdToHaskell</em> into-    the Java Architecture for XML Binding-    (<a href="http://java.sun.com/xml/jaxb/">JAXB</a>).  JAXB translates-    an XML Schema Definition into a set of Java classes, and provides-    the runtime machinery (like <em>XmlContent</em>) for reading and-    writing objects of those classes to/from XML files.-<li>There is a comprehensive reading list for XML and web programming in-    functional languages <a href="http://readscheme.org/xml-web/">here</a>.-</ul>--<hr>--</body>-</html>
− docs/migrate.html
@@ -1,67 +0,0 @@-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">-<html> <head> <title> HaXml: Haskell and XML </title> </head>--<body bgcolor='#ffffff'>--<center>-<h2>Migrating from HaXml 1.13 to HaXml >= 1.17</h2>-</center>-<hr>--<p>-There are 3 main changes between 1.13 and 1.17:--<h3>More info fields in the generic document tree</h3>-Content items in the generic document representation now have an-extra polymorphic component field.  This can be used for-propagating information throughout the document tree, like-namespace scopes.  However, if you simply want to change some old-code to use the new types, essentially you can just use unit-() values as dummies to fill in this field.--<p>-<tt>data Document</tt>  --&gt;  <tt>data Document i</tt>--<p>-<tt>data Element</tt>  --&gt;  <tt>data Element i</tt>--<p>-<tt>data Content</tt>  --&gt;  <tt>data Content i</tt>--<h3>New XmlContent class, replaces old classes</h3>-The <i>Haskell2Xml</i> and <i>Xml2Haskell</i> classes have been-merged into a single new class: <b>XmlContent</b>.  Because the new-class is based on combinator parsers that return good error-messages, some of the signatures of user-accessible I/O routines -have changed to enable the possibility of reporting parse errors.-See <a href="XmlContent.html">this page</a> for details.--If you are playing with the class methods themselves, then the-translation from old-style to new-style is more-or-less like this:-<pre>-    class XmlContent a where	-- old-      fromElem :: [Content] -&gt; (Maybe a, [Content])-      toElem :: a -&gt; [Content]-</pre>-becomes-<pre>-    class XMLContent a where	--new-      parseContents :: XMLParser a-      toContents    :: a -&gt; [Content ()]-</pre>--<h3>Lazy parsing</h3>-Parsing of generic XML documents can now be lazy, that is, it can-start returning part of the document tree, before seeing the end of-it.  However, this does mean that parse errors can be discovered-too late to do anything sensible with them - your program will-likely just stop with the error message.  To use the lazy parser,--     <p>-<tt>import Text.XML.HaXml.Parse<tt> --&gt; <tt>import Text.XML.HaXml.ParseLazy</tt>---<hr>--</body>-</html>
− examples/AlbumDTD.hs
@@ -1,313 +0,0 @@-module AlbumDTD where--import Text.XML.HaXml.XmlContent-import Text.XML.HaXml.OneOfN---{-Type decls-}--data Album = Album Title Artist (Maybe Recording) Coverart-		   [Catalogno] Personnel [Track] Notes-	   deriving (Eq,Show)-newtype Title = Title String 		deriving (Eq,Show)-newtype Artist = Artist String 		deriving (Eq,Show)-data Recording = Recording-    { recordingDate :: (Maybe String)-    , recordingPlace :: (Maybe String)-    } deriving (Eq,Show)-data Coverart = Coverart Coverart_Attrs (Maybe Location)-	      deriving (Eq,Show)-data Coverart_Attrs = Coverart_Attrs-    { coverartStyle :: String-    } deriving (Eq,Show)-data Location = Location-    { locationThumbnail :: (Maybe String)-    , locationFullsize :: (Maybe String)-    } deriving (Eq,Show)-data Catalogno = Catalogno-    { catalognoLabel :: String-    , catalognoNumber :: String-    , catalognoFormat :: (Maybe Catalogno_Format)-    , catalognoReleasedate :: (Maybe String)-    , catalognoCountry :: (Maybe String)-    } deriving (Eq,Show)-data Catalogno_Format = Catalogno_Format_CD  |  Catalogno_Format_LP-			 |  Catalogno_Format_MiniDisc-		      deriving (Eq,Show)-newtype Personnel = Personnel [Player] 		deriving (Eq,Show)-data Player = Player-    { playerName :: String-    , playerInstrument :: String-    } deriving (Eq,Show)-data Track = Track-    { trackTitle :: String-    , trackCredit :: (Maybe String)-    , trackTiming :: (Maybe String)-    } deriving (Eq,Show)-data Notes = Notes Notes_Attrs [Notes_]-	   deriving (Eq,Show)-data Notes_Attrs = Notes_Attrs-    { notesAuthor :: (Maybe String)-    } deriving (Eq,Show)-data Notes_ = Notes_Str String-	    | Notes_Albumref Albumref-	    | Notes_Trackref Trackref-	    deriving (Eq,Show)-data Albumref = Albumref Albumref_Attrs String-	      deriving (Eq,Show)-data Albumref_Attrs = Albumref_Attrs-    { albumrefLink :: String-    } deriving (Eq,Show)-data Trackref = Trackref Trackref_Attrs String-	      deriving (Eq,Show)-data Trackref_Attrs = Trackref_Attrs-    { trackrefLink :: (Maybe String)-    } deriving (Eq,Show)---{-Instance decls-}--instance XmlContent Album where-    fromElem (CElem (Elem "album" [] c0):rest) =-	(\(a,ca)->-	   (\(b,cb)->-	      (\(c,cc)->-		 (\(d,cd)->-		    (\(e,ce)->-		       (\(f,cf)->-			  (\(g,cg)->-			     (\(h,ch)->-				(Just (Album a b c d e f g h), rest))-			     (definite fromElem "<notes>" "album" cg))-			  (many fromElem cf))-		       (definite fromElem "<personnel>" "album" ce))-		    (many fromElem cd))-		 (definite fromElem "<coverart>" "album" cc))-	      (fromElem cb))-	   (definite fromElem "<artist>" "album" ca))-	(definite fromElem "<title>" "album" c0)-    fromElem (CMisc _:rest) = fromElem rest-    fromElem rest = (Nothing, rest)-    toElem (Album a b c d e f g h) =-	[CElem (Elem "album" [] (toElem a ++ toElem b ++ maybe [] toElem c-				 ++ toElem d ++ concatMap toElem e ++ toElem f ++ concatMap toElem g-				 ++ toElem h))]-instance XmlContent Title where-    fromElem (CElem (Elem "title" [] c0):rest) =-	(\(a,ca)->-	   (Just (Title a), rest))-	(definite fromText "text" "title" c0)-    fromElem (CMisc _:rest) = fromElem rest-    fromElem rest = (Nothing, rest)-    toElem (Title a) =-	[CElem (Elem "title" [] (toText a))]-instance XmlContent Artist where-    fromElem (CElem (Elem "artist" [] c0):rest) =-	(\(a,ca)->-	   (Just (Artist a), rest))-	(definite fromText "text" "artist" c0)-    fromElem (CMisc _:rest) = fromElem rest-    fromElem rest = (Nothing, rest)-    toElem (Artist a) =-	[CElem (Elem "artist" [] (toText a))]-instance XmlContent Recording where-    fromElem (CElem (Elem "recording" as []):rest) =-	(Just (fromAttrs as), rest)-    fromElem (CMisc _:rest) = fromElem rest-    fromElem rest = (Nothing, rest)-    toElem as =-	[CElem (Elem "recording" (toAttrs as) [])]-instance XmlAttributes Recording where-    fromAttrs as =-	Recording-	  { recordingDate = possibleA fromAttrToStr "date" as-	  , recordingPlace = possibleA fromAttrToStr "place" as-	  }-    toAttrs v = catMaybes -	[ maybeToAttr toAttrFrStr "date" (recordingDate v)-	, maybeToAttr toAttrFrStr "place" (recordingPlace v)-	]-instance XmlContent Coverart where-    fromElem (CElem (Elem "coverart" as c0):rest) =-	(\(a,ca)->-	   (Just (Coverart (fromAttrs as) a), rest))-	(fromElem c0)-    fromElem (CMisc _:rest) = fromElem rest-    fromElem rest = (Nothing, rest)-    toElem (Coverart as a) =-	[CElem (Elem "coverart" (toAttrs as) (maybe [] toElem a))]-instance XmlAttributes Coverart_Attrs where-    fromAttrs as =-	Coverart_Attrs-	  { coverartStyle = definiteA fromAttrToStr "coverart" "style" as-	  }-    toAttrs v = catMaybes -	[ toAttrFrStr "style" (coverartStyle v)-	]-instance XmlContent Location where-    fromElem (CElem (Elem "location" as []):rest) =-	(Just (fromAttrs as), rest)-    fromElem (CMisc _:rest) = fromElem rest-    fromElem rest = (Nothing, rest)-    toElem as =-	[CElem (Elem "location" (toAttrs as) [])]-instance XmlAttributes Location where-    fromAttrs as =-	Location-	  { locationThumbnail = possibleA fromAttrToStr "thumbnail" as-	  , locationFullsize = possibleA fromAttrToStr "fullsize" as-	  }-    toAttrs v = catMaybes -	[ maybeToAttr toAttrFrStr "thumbnail" (locationThumbnail v)-	, maybeToAttr toAttrFrStr "fullsize" (locationFullsize v)-	]-instance XmlContent Catalogno where-    fromElem (CElem (Elem "catalogno" as []):rest) =-	(Just (fromAttrs as), rest)-    fromElem (CMisc _:rest) = fromElem rest-    fromElem rest = (Nothing, rest)-    toElem as =-	[CElem (Elem "catalogno" (toAttrs as) [])]-instance XmlAttributes Catalogno where-    fromAttrs as =-	Catalogno-	  { catalognoLabel = definiteA fromAttrToStr "catalogno" "label" as-	  , catalognoNumber = definiteA fromAttrToStr "catalogno" "number" as-	  , catalognoFormat = possibleA fromAttrToTyp "format" as-	  , catalognoReleasedate = possibleA fromAttrToStr "releasedate" as-	  , catalognoCountry = possibleA fromAttrToStr "country" as-	  }-    toAttrs v = catMaybes -	[ toAttrFrStr "label" (catalognoLabel v)-	, toAttrFrStr "number" (catalognoNumber v)-	, maybeToAttr toAttrFrTyp "format" (catalognoFormat v)-	, maybeToAttr toAttrFrStr "releasedate" (catalognoReleasedate v)-	, maybeToAttr toAttrFrStr "country" (catalognoCountry v)-	]-instance XmlAttrType Catalogno_Format where-    fromAttrToTyp n (n',v)-	| n==n'     = translate (attr2str v)-	| otherwise = Nothing-      where translate "CD" = Just Catalogno_Format_CD-	    translate "LP" = Just Catalogno_Format_LP-	    translate "MiniDisc" = Just Catalogno_Format_MiniDisc-	    translate _ = Nothing-    toAttrFrTyp n Catalogno_Format_CD = Just (n, str2attr "CD")-    toAttrFrTyp n Catalogno_Format_LP = Just (n, str2attr "LP")-    toAttrFrTyp n Catalogno_Format_MiniDisc = Just (n, str2attr "MiniDisc")-instance XmlContent Personnel where-    fromElem (CElem (Elem "personnel" [] c0):rest) =-	(\(a,ca)->-	   (Just (Personnel a), rest))-	(many fromElem c0)-    fromElem (CMisc _:rest) = fromElem rest-    fromElem rest = (Nothing, rest)-    toElem (Personnel a) =-	[CElem (Elem "personnel" [] (concatMap toElem a))]-instance XmlContent Player where-    fromElem (CElem (Elem "player" as []):rest) =-	(Just (fromAttrs as), rest)-    fromElem (CMisc _:rest) = fromElem rest-    fromElem rest = (Nothing, rest)-    toElem as =-	[CElem (Elem "player" (toAttrs as) [])]-instance XmlAttributes Player where-    fromAttrs as =-	Player-	  { playerName = definiteA fromAttrToStr "player" "name" as-	  , playerInstrument = definiteA fromAttrToStr "player" "instrument" as-	  }-    toAttrs v = catMaybes -	[ toAttrFrStr "name" (playerName v)-	, toAttrFrStr "instrument" (playerInstrument v)-	]-instance XmlContent Track where-    fromElem (CElem (Elem "track" as []):rest) =-	(Just (fromAttrs as), rest)-    fromElem (CMisc _:rest) = fromElem rest-    fromElem rest = (Nothing, rest)-    toElem as =-	[CElem (Elem "track" (toAttrs as) [])]-instance XmlAttributes Track where-    fromAttrs as =-	Track-	  { trackTitle = definiteA fromAttrToStr "track" "title" as-	  , trackCredit = possibleA fromAttrToStr "credit" as-	  , trackTiming = possibleA fromAttrToStr "timing" as-	  }-    toAttrs v = catMaybes -	[ toAttrFrStr "title" (trackTitle v)-	, maybeToAttr toAttrFrStr "credit" (trackCredit v)-	, maybeToAttr toAttrFrStr "timing" (trackTiming v)-	]-instance XmlContent Notes where-    fromElem (CElem (Elem "notes" as c0):rest) =-	(\(a,ca)->-	   (Just (Notes (fromAttrs as) a), rest))-	(many fromElem c0)-    fromElem (CMisc _:rest) = fromElem rest-    fromElem rest = (Nothing, rest)-    toElem (Notes as a) =-	[CElem (Elem "notes" (toAttrs as) (concatMap toElem a))]-instance XmlAttributes Notes_Attrs where-    fromAttrs as =-	Notes_Attrs-	  { notesAuthor = possibleA fromAttrToStr "author" as-	  }-    toAttrs v = catMaybes -	[ maybeToAttr toAttrFrStr "author" (notesAuthor v)-	]-instance XmlContent Notes_ where-    fromElem c0 =-	case (fromText c0) of-	(Just a,rest) -> (Just (Notes_Str a), rest)-	(Nothing,_) ->-		case (fromElem c0) of-		(Just a,rest) -> (Just (Notes_Albumref a), rest)-		(Nothing,_) ->-			case (fromElem c0) of-			(Just a,rest) -> (Just (Notes_Trackref a), rest)-			(Nothing,_) ->-			    (Nothing, c0)-    fromElem (CMisc _:rest) = fromElem rest-    fromElem rest = (Nothing, rest)-    toElem (Notes_Str a) = toText a-    toElem (Notes_Albumref a) = toElem a-    toElem (Notes_Trackref a) = toElem a-instance XmlContent Albumref where-    fromElem (CElem (Elem "albumref" as c0):rest) =-	(\(a,ca)->-	   (Just (Albumref (fromAttrs as) a), rest))-	(definite fromText "text" "albumref" c0)-    fromElem (CMisc _:rest) = fromElem rest-    fromElem rest = (Nothing, rest)-    toElem (Albumref as a) =-	[CElem (Elem "albumref" (toAttrs as) (toText a))]-instance XmlAttributes Albumref_Attrs where-    fromAttrs as =-	Albumref_Attrs-	  { albumrefLink = definiteA fromAttrToStr "albumref" "link" as-	  }-    toAttrs v = catMaybes -	[ toAttrFrStr "link" (albumrefLink v)-	]-instance XmlContent Trackref where-    fromElem (CElem (Elem "trackref" as c0):rest) =-	(\(a,ca)->-	   (Just (Trackref (fromAttrs as) a), rest))-	(definite fromText "text" "trackref" c0)-    fromElem (CMisc _:rest) = fromElem rest-    fromElem rest = (Nothing, rest)-    toElem (Trackref as a) =-	[CElem (Elem "trackref" (toAttrs as) (toText a))]-instance XmlAttributes Trackref_Attrs where-    fromAttrs as =-	Trackref_Attrs-	  { trackrefLink = possibleA fromAttrToStr "link" as-	  }-    toAttrs v = catMaybes -	[ maybeToAttr toAttrFrStr "link" (trackrefLink v)-	]---{-Done-}
− examples/App.hs
@@ -1,22 +0,0 @@-module Main where--import System (getArgs)-import IO--import Text.XML.HaXml.Wrappers (fix2Args)-import Text.XML.HaXml.XmlContent (fReadXml, fWriteXml)-import AlbumDTD--main =-  fix2Args >>= \(infile,outfile)->-  do putStrLn ("reading "++infile)-     value <- fReadXml infile-     putStrLn ("checking value's type and album title")-     putStrLn (let (Album title _ _ _ _ _ _ _) = value in-               if title==(Title "Time Out") then "ok" else "failed")-     putStrLn ("writing "++outfile)-     v <- (let (Album _ b c d e f g h) = value in-           return (Album (Title "unknown") b c d e f g h))-     fWriteXml outfile v-     putStrLn ("Done.")-
− examples/DTDpp.hs
@@ -1,32 +0,0 @@-module Main where--import System (getArgs)-import IO-import Maybe-import List   (isSuffixOf)--import Text.XML.HaXml.Types      (DocTypeDecl(..))-import Text.XML.HaXml.Parse      (dtdParse)-import Text.XML.HaXml.Pretty     (markupdecl)-import Text.XML.HaXml.Wrappers   (fix2Args)-import Text.PrettyPrint.HughesPJ (render,vcat)---- This is another trivial application that reads an XML DTD from--- a file (or stdin) and writes it back to another file (or stdout).--- It should deal with the external subset fully, collecting and--- in-lining all the individual files associated with the DTD.--- Note that PE references used in definitions are also expanded--- fully in the output.--main =-  fix2Args >>= \(inf,outf)->-  ( if inf=="-" then getContents-    else readFile inf )            >>= \content->-  ( if outf=="-" then return stdout-    else openFile outf WriteMode ) >>= \o->-  ( hPutStrLn o . render . vcat . map markupdecl . fromDTD . dtdParse inf)-        content--fromDTD Nothing = error "no DTD found"-fromDTD (Just (DTD _ _ ds)) = ds-
− examples/DTypes.hs
@@ -1,165 +0,0 @@-{- Generated by DrIFT (Automatic class derivations for Haskell) -}-{-# LINE 1 "DTypes.hs" #-}-module DTypes where--import Text.XML.HaXml.XmlContent hiding (Name)---- data types for a simple test program--data Person = Person Name Email [Rating] Version {-! derive : XmlContent !-}--newtype Name = Name String {-! derive : XmlContent !-}-newtype Email = Email String {-! derive : XmlContent !-}-newtype Version = Version Int {-! derive : XmlContent !-}--data Rating = Rating SubjectID Interest Skill {-! derive : XmlContent !-}--newtype SubjectID = SubjectID Int {-! derive : XmlContent !-}-newtype Interest = Interest Score {-! derive : XmlContent !-}-newtype Skill = Skill Score {-! derive : XmlContent !-}--data Score = ScoreNone | ScoreLow | ScoreMedium | ScoreHigh {-! derive : XmlContent !-}--{-* Generated by DrIFT : Look, but Don't Touch. *-}-instance Haskell2XmlNew Person where-    toHType v =-	Defined "Person" []-		[Constr "Person" [] [toHType aa,toHType ab,toHType ac,toHType ad]]-      where-	(Person aa ab ac ad) = v-    parseContents = do-	{ e@(Elem t _ _) <- element  ["Person"]-	; case t of-	  _ | "Person" `isPrefixOf` t -> interior e $-		do { aa <- parseContents-		   ; ab <- parseContents-		   ; ac <- parseContents-		   ; ad <- parseContents-		   ; return (Person aa ab ac ad)-		   }-	}-    toContents v@(Person aa ab ac ad) =-	[mkElemC (showConstr 0 (toHType v)) (concat [toContents aa,-						     toContents ab,toContents ac,toContents ad])]--instance Haskell2XmlNew Name where-    toHType v =-	Defined "Name" [] [Constr "Name" [] [toHType aa]]-      where-	(Name aa) = v-    parseContents = do-	{ e@(Elem t _ _) <- element  ["Name"]-	; case t of-	  _ | "Name" `isPrefixOf` t -> interior e $ fmap Name parseContents-	}-    toContents v@(Name aa) =-	[mkElemC (showConstr 0 (toHType v)) (toContents aa)]--instance Haskell2XmlNew Email where-    toHType v =-	Defined "Email" [] [Constr "Email" [] [toHType aa]]-      where-	(Email aa) = v-    parseContents = do-	{ e@(Elem t _ _) <- element  ["Email"]-	; case t of-	  _ | "Email" `isPrefixOf` t -> interior e $ fmap Email parseContents-	}-    toContents v@(Email aa) =-	[mkElemC (showConstr 0 (toHType v)) (toContents aa)]--instance Haskell2XmlNew Version where-    toHType v =-	Defined "Version" [] [Constr "Version" [] [toHType aa]]-      where-	(Version aa) = v-    parseContents = do-	{ e@(Elem t _ _) <- element  ["Version"]-	; case t of-	  _ | "Version" `isPrefixOf` t -> interior e $ fmap Version parseContents-	}-    toContents v@(Version aa) =-	[mkElemC (showConstr 0 (toHType v)) (toContents aa)]--instance Haskell2XmlNew Rating where-    toHType v =-	Defined "Rating" []-		[Constr "Rating" [] [toHType aa,toHType ab,toHType ac]]-      where-	(Rating aa ab ac) = v-    parseContents = do-	{ e@(Elem t _ _) <- element  ["Rating"]-	; case t of-	  _ | "Rating" `isPrefixOf` t -> interior e $-		do { aa <- parseContents-		   ; ab <- parseContents-		   ; ac <- parseContents-		   ; return (Rating aa ab ac)-		   }-	}-    toContents v@(Rating aa ab ac) =-	[mkElemC (showConstr 0 (toHType v)) (concat [toContents aa,-						     toContents ab,toContents ac])]--instance Haskell2XmlNew SubjectID where-    toHType v =-	Defined "SubjectID" [] [Constr "SubjectID" [] [toHType aa]]-      where-	(SubjectID aa) = v-    parseContents = do-	{ e@(Elem t _ _) <- element  ["SubjectID"]-	; case t of-	  _ | "SubjectID" `isPrefixOf` t -> interior e $ fmap SubjectID parseContents-	}-    toContents v@(SubjectID aa) =-	[mkElemC (showConstr 0 (toHType v)) (toContents aa)]--instance Haskell2XmlNew Interest where-    toHType v =-	Defined "Interest" [] [Constr "Interest" [] [toHType aa]]-      where-	(Interest aa) = v-    parseContents = do-	{ e@(Elem t _ _) <- element  ["Interest"]-	; case t of-	  _ | "Interest" `isPrefixOf` t -> interior e $ fmap Interest parseContents-	}-    toContents v@(Interest aa) =-	[mkElemC (showConstr 0 (toHType v)) (toContents aa)]--instance Haskell2XmlNew Skill where-    toHType v =-	Defined "Skill" [] [Constr "Skill" [] [toHType aa]]-      where-	(Skill aa) = v-    parseContents = do-	{ e@(Elem t _ _) <- element  ["Skill"]-	; case t of-	  _ | "Skill" `isPrefixOf` t -> interior e $ fmap Skill parseContents-	}-    toContents v@(Skill aa) =-	[mkElemC (showConstr 0 (toHType v)) (toContents aa)]--instance Haskell2XmlNew Score where-    toHType v =-	Defined "Score" []-		[Constr "ScoreNone" [] [],Constr "ScoreLow" [] [],-		 Constr "ScoreMedium" [] [],Constr "ScoreHigh" [] []]-    parseContents = do-	{ e@(Elem t _ _) <- element  ["ScoreNone","ScoreLow","ScoreMedium","ScoreHigh"]-	; case t of-	  _ | "ScoreNone" `isPrefixOf` t -> interior e $ return ScoreNone-	    | "ScoreMedium" `isPrefixOf` t -> interior e $ return ScoreMedium-	    | "ScoreLow" `isPrefixOf` t -> interior e $ return ScoreLow-	    | "ScoreHigh" `isPrefixOf` t -> interior e $ return ScoreHigh-	}-    toContents v@ScoreNone =-	[mkElemC (showConstr 0 (toHType v)) []]-    toContents v@ScoreLow =-	[mkElemC (showConstr 1 (toHType v)) []]-    toContents v@ScoreMedium =-	[mkElemC (showConstr 2 (toHType v)) []]-    toContents v@ScoreHigh =-	[mkElemC (showConstr 3 (toHType v)) []]----  Imported from other files :-
− examples/DebugLex.hs
@@ -1,17 +0,0 @@-module Main where--import System (getArgs)-import IO--import Text.XML.HaXml.Lex      (xmlLex)-import Text.XML.HaXml.Wrappers (fix2Args)---- Debug the HaXml library by showing what the lexer generates.-main =-  fix2Args >>= \(inf,outf)->-  ( if inf=="-" then getContents-    else readFile inf )            >>= \content->-  ( if outf=="-" then return stdout-    else openFile outf WriteMode ) >>= \o->-  mapM_ ( hPutStrLn o . show ) (xmlLex inf content)-
− examples/Example.hs
@@ -1,14 +0,0 @@-module Main where--import IO-import Text.XML.HaXml.XmlContent (fWriteXml)-import DTypes--rjn = Person (Name "Rob Noble") (Email "rjn") [-    Rating (SubjectID 1) (Interest ScoreNone) (Skill ScoreLow),-    Rating (SubjectID 2) (Interest ScoreMedium) (Skill ScoreHigh)]-    (Version 1)--main :: IO ()-main =-    fWriteXml "subjdb.xml" rjn
− examples/OpenOffice.org/Blocklist.dtd
@@ -1,62 +0,0 @@-<!---	$Id: Blocklist.dtd,v 1.1 2003/05/13 13:07:49 malcolm Exp $--   The Contents of this file are made available subject to the terms of-   either of the following licenses--          - GNU Lesser General Public License Version 2.1-          - Sun Industry Standards Source License Version 1.1--   Sun Microsystems Inc., October, 2000--   GNU Lesser General Public License Version 2.1-   =============================================-   Copyright 2000 by Sun Microsystems, Inc.-   901 San Antonio Road, Palo Alto, CA 94303, USA--   This library is free software; you can redistribute it and/or-   modify it under the terms of the GNU Lesser General Public-   License version 2.1, as published by the Free Software Foundation.--   This library is distributed in the hope that it will be useful,-   but WITHOUT ANY WARRANTY; without even the implied warranty of-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU-   Lesser General Public License for more details.--   You should have received a copy of the GNU Lesser General Public-   License along with this library; if not, write to the Free Software-   Foundation, Inc., 59 Temple Place, Suite 330, Boston,-   MA  02111-1307  USA---   Sun Industry Standards Source License Version 1.1-   =================================================-   The contents of this file are subject to the Sun Industry Standards-   Source License Version 1.1 (the "License"); You may not use this file-   except in compliance with the License. You may obtain a copy of the-   License at http://www.openoffice.org/license.html.--   Software provided under this License is provided on an "AS IS" basis,-   WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING,-   WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,-   MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.-   See the License for the specific provisions governing your rights and-   obligations concerning the Software.--   The Initial Developer of the Original Code is: Sun Microsystems, Inc.--   Copyright: 2000 by Sun Microsystems, Inc.--   All Rights Reserved.--   Contributor(s): Martin Gallwey (gallwey@Sun.COM)---->-<!ELEMENT block-list:block-list (block-list:block*) >-<!ATTLIST block-list:block-list-		  block-list:list-name CDATA #REQUIRED>-<!ELEMENT block-list:block EMPTY>-<!ATTLIST block-list:block -		  block-list:abbreviated-name CDATA #REQUIRED-		  block-list:package-name CDATA #REQUIRED-		  block-list:name CDATA #REQUIRED>
− examples/OpenOffice.org/chart.mod
@@ -1,290 +0,0 @@-<!---	$Id: chart.mod,v 1.1 2003/05/13 13:07:49 malcolm Exp $--   The Contents of this file are made available subject to the terms of-   either of the following licenses--          - GNU Lesser General Public License Version 2.1-          - Sun Industry Standards Source License Version 1.1--   Sun Microsystems Inc., October, 2000--   GNU Lesser General Public License Version 2.1-   =============================================-   Copyright 2000 by Sun Microsystems, Inc.-   901 San Antonio Road, Palo Alto, CA 94303, USA--   This library is free software; you can redistribute it and/or-   modify it under the terms of the GNU Lesser General Public-   License version 2.1, as published by the Free Software Foundation.--   This library is distributed in the hope that it will be useful,-   but WITHOUT ANY WARRANTY; without even the implied warranty of-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU-   Lesser General Public License for more details.--   You should have received a copy of the GNU Lesser General Public-   License along with this library; if not, write to the Free Software-   Foundation, Inc., 59 Temple Place, Suite 330, Boston,-   MA  02111-1307  USA---   Sun Industry Standards Source License Version 1.1-   =================================================-   The contents of this file are subject to the Sun Industry Standards-   Source License Version 1.1 (the "License"); You may not use this file-   except in compliance with the License. You may obtain a copy of the-   License at http://www.openoffice.org/license.html.--   Software provided under this License is provided on an "AS IS" basis,-   WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING,-   WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,-   MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.-   See the License for the specific provisions governing your rights and-   obligations concerning the Software.--   The Initial Developer of the Original Code is: Sun Microsystems, Inc.--   Copyright: 2000 by Sun Microsystems, Inc.--   All Rights Reserved.--   Contributor(s): _______________________________________---->---<!ENTITY % chart-class "(line|area|circle|ring|scatter|radar|bar|stock|add-in)">-<!ENTITY % chart-solid-type "(cuboid|cylinder|cone|pyramid)">--<!-- Chart element -->-<!ELEMENT chart:chart ( chart:title?, chart:subtitle?, chart:legend?,-					    chart:plot-area,-						table:table? )>-<!ATTLIST chart:chart-		  chart:class %chart-class; #REQUIRED-		  chart:add-in-name %string; #IMPLIED-		  chart:table-number-list %string; #IMPLIED-		  draw:name %string; #IMPLIED-		  %draw-position;-		  %draw-size;-		  %draw-style-name;-		  chart:column-mapping %string; #IMPLIED-		  chart:row-mapping %string; #IMPLIED-		  chart:style-name %styleName; #IMPLIED>--<!ATTLIST chart:chart %presentation-class; >-<!ATTLIST chart:chart %zindex;>-<!ATTLIST chart:chart %draw-end-position; >-<!ATTLIST chart:chart draw:id %draw-shape-id; >-<!ATTLIST chart:chart draw:layer %layerName; #IMPLIED>--<!ATTLIST style:properties-		  chart:scale-text %boolean; "true"-		  chart:stock-updown-bars %boolean; "false"-		  chart:stock-with-volume %boolean; "false"-		  chart:three-dimensional %boolean; "false"-		  chart:deep %boolean; "false"-		  chart:lines %boolean; "false"-		  chart:percentage %boolean; "false"-		  chart:solid-type %chart-solid-type; "cuboid"-		  chart:splines %nonNegativeInteger; "0"-		  chart:stacked %boolean; "false"-		  chart:symbol %integer; "-1"-		  chart:vertical %boolean; "false"-		  chart:lines-used %nonNegativeInteger; "0"-		  chart:connect-bars %boolean; "false"-		  chart:spline-order %nonNegativeInteger; "2"-		  chart:spline-resolution %nonNegativeInteger; "20"-          chart:pie-offset %nonNegativeInteger; "0">--<!-- Main/Sub Title -->-<!-- the cell-address attribute is currently not supported for titles -->-<!ELEMENT chart:title (text:p)?>-<!ATTLIST chart:title-		  table:cell-range %cell-address; #IMPLIED-		  svg:x %coordinate; #IMPLIED-		  svg:y %coordinate; #IMPLIED-		  chart:style-name %styleName; #IMPLIED >--<!ELEMENT chart:subtitle (text:p)?>-<!ATTLIST chart:subtitle-		  table:cell-range %cell-address; #IMPLIED-		  svg:x %coordinate; #IMPLIED-		  svg:y %coordinate; #IMPLIED-		  chart:style-name %styleName; #IMPLIED >--<!-- you must specify either a legend-position or both, x and y coordinates -->-<!ELEMENT chart:legend EMPTY>-<!ATTLIST chart:legend-		  chart:legend-position (top|left|bottom|right) "right"-		  svg:x %coordinate; #IMPLIED-		  svg:y %coordinate; #IMPLIED-		  chart:style-name %styleName; #IMPLIED >--<!-- Plot-Area specification -->--<!ELEMENT chart:plot-area (dr3d:light*,-						   chart:axis*,-						   chart:categories?,-						   chart:series*,-						   chart:stock-gain-marker?,-						   chart:stock-loss-marker?,-						   chart:stock-range-line?,-						   chart:wall?,-						   chart:floor?) >--<!ATTLIST chart:plot-area-		  svg:x %coordinate; #IMPLIED-		  svg:y %coordinate; #IMPLIED-		  svg:width %length; #IMPLIED-		  svg:height %length; #IMPLIED-		  chart:style-name %styleName; #IMPLIED-		  table:cell-range-address %cell-range-address; #IMPLIED-		  chart:table-number-list %string; #IMPLIED-		  chart:data-source-has-labels (none|row|column|both) "none" >--<!-- 3d scene attributes on plot-area -->-<!ATTLIST chart:plot-area-		  dr3d:vrp %vector3D; #IMPLIED-		  dr3d:vpn %vector3D; #IMPLIED-		  dr3d:vup %vector3D; #IMPLIED-		  dr3d:projection (parallel|perspective) #IMPLIED-		  dr3d:transform CDATA #IMPLIED-		  dr3d:distance %length; #IMPLIED-		  dr3d:focal-length %length; #IMPLIED-		  dr3d:shadow-slant %nonNegativeInteger; #IMPLIED-		  dr3d:shade-mode (flat|phong|gouraud|draft) #IMPLIED-		  dr3d:ambient-color %color; #IMPLIED-		  dr3d:lighting-mode %boolean; #IMPLIED >--<!ATTLIST style:properties-		  chart:series-source (columns|rows) "columns" >--<!ELEMENT chart:wall EMPTY>-<!ATTLIST chart:wall-		  svg:width %length; #IMPLIED-		  chart:style-name %styleName; #IMPLIED >--<!ELEMENT chart:floor EMPTY>-<!ATTLIST chart:floor-		  svg:width %length; #IMPLIED-		  chart:style-name %styleName; #IMPLIED >--<!-- Stock chart elements -->--<!ELEMENT chart:stock-gain-marker EMPTY>-<!ATTLIST chart:stock-gain-marker-		  chart:style-name %styleName; #IMPLIED >--<!ELEMENT chart:stock-loss-marker EMPTY>-<!ATTLIST chart:stock-loss-marker-		  chart:style-name %styleName; #IMPLIED >--<!ELEMENT chart:stock-range-line EMPTY>-<!ATTLIST chart:stock-range-line-		  chart:style-name %styleName; #IMPLIED >--<!-- Axis -->--<!ELEMENT chart:axis (chart:title?, chart:grid*)>-<!ATTLIST chart:axis-		  chart:class (category|value|series|domain) #REQUIRED-		  chart:name %string; #IMPLIED-		  chart:style-name %styleName; #IMPLIED >--<!ATTLIST style:properties-		  chart:tick-marks-major-inner %boolean; "false"-		  chart:tick-marks-major-outer %boolean; "true"-		  chart:tick-marks-minor-inner %boolean; "false"-		  chart:tick-marks-minor-outer %boolean; "false"-		  chart:logarithmic %boolean; "false"-		  chart:maximum %float; #IMPLIED-		  chart:minimum %float; #IMPLIED-		  chart:origin %float; #IMPLIED-		  chart:interval-major %float; #IMPLIED-		  chart:interval-minor %float; #IMPLIED-		  chart:gap-width %integer; #IMPLIED-		  chart:overlap %integer; #IMPLIED-		  text:line-break %boolean; "true"-		  chart:display-label %boolean; "true"-		  chart:label-arrangement (side-by-side|stagger-even|stagger-odd) "side-by-side"-		  chart:text-overlap %boolean; "false"-		  chart:visible %boolean; "true" -		  chart:link-data-style-to-source %boolean; "true" >--<!ELEMENT chart:grid EMPTY>-<!ATTLIST chart:grid-		  chart:class (major|minor) "major"-		  chart:style-name %styleName; #IMPLIED >---<!ELEMENT chart:categories EMPTY>-<!ATTLIST chart:categories-		  table:cell-range-address %cell-range-address; #IMPLIED >--<!---	each series element must have an cell-range-address element that points-	to the underlying table data.-	Impl. Note: Internally all href elements are merged to one table range-	that represents the data for the whole chart--->-<!ELEMENT chart:series ( chart:domain*,-                         chart:mean-value?,-						 chart:regression-curve?,-						 chart:error-indicator?,-						 chart:data-point* )>-<!ATTLIST chart:series-		  chart:values-cell-range-address %cell-range-address; #IMPLIED-		  chart:label-cell-address %cell-address; #IMPLIED-		  chart:class %chart-class; #IMPLIED-		  chart:attached-axis %string; #IMPLIED-		  chart:style-name %styleName; #IMPLIED >--<!ELEMENT chart:domain EMPTY>-<!ATTLIST chart:domain-		  table:cell-range-address %cell-range-address; #IMPLIED >--<!ELEMENT chart:data-point EMPTY>-<!ATTLIST chart:data-point-		  chart:repeated %nonNegativeInteger; #IMPLIED-		  chart:style-name %styleName; #IMPLIED >--<!-- statistical properties -->--<!ELEMENT chart:mean-value EMPTY>-<!ELEMENT chart:regression-curve EMPTY >-<!ELEMENT chart:error-indicator EMPTY >-<!ATTLIST chart:mean-value chart:style-name %styleName; #IMPLIED >-<!ATTLIST chart:regression-curve chart:style-name %styleName; #IMPLIED >-<!ATTLIST chart:error-indicator chart:style-name %styleName; #IMPLIED >--<!ATTLIST style:properties-		  chart:mean-value %boolean; #IMPLIED-		  chart:error-category (none|variance|standard-deviation|percentage|error-margin|constant) "none"-		  chart:error-percentage %float; #IMPLIED-		  chart:error-margin %float; #IMPLIED-		  chart:error-lower-limit %float; #IMPLIED-		  chart:error-upper-limit %float; #IMPLIED-		  chart:error-upper-indicator %boolean; #IMPLIED-		  chart:error-lower-indicator %boolean; #IMPLIED-		  chart:regression-type (none|linear|logarithmic|exponential|power) "none" >--<!-- data label properties -->--<!ATTLIST style:properties-		  chart:data-label-number (none|value|percentage) "none"-		  chart:data-label-text %boolean; "false"-		  chart:data-label-symbol %boolean; "false" >--<!-- general text properties -->--<!ATTLIST style:properties -		  text:rotation-angle %integer; "0" >--<!-- symbol properties -->--<!ATTLIST style:properties-		  chart:symbol-width %nonNegativeLength; #IMPLIED-		  chart:symbol-height %nonNegativeLength; #IMPLIED-		  chart:symbol-image-name %string; #IMPLIED >
− examples/OpenOffice.org/datastyl.mod
@@ -1,234 +0,0 @@-<!----   $Id: datastyl.mod,v 1.1 2003/05/13 13:07:49 malcolm Exp $--   The Contents of this file are made available subject to the terms of-   either of the following licenses--          - GNU Lesser General Public License Version 2.1-          - Sun Industry Standards Source License Version 1.1--   Sun Microsystems Inc., October, 2000--   GNU Lesser General Public License Version 2.1-   =============================================-   Copyright 2000 by Sun Microsystems, Inc.-   901 San Antonio Road, Palo Alto, CA 94303, USA--   This library is free software; you can redistribute it and/or-   modify it under the terms of the GNU Lesser General Public-   License version 2.1, as published by the Free Software Foundation.--   This library is distributed in the hope that it will be useful,-   but WITHOUT ANY WARRANTY; without even the implied warranty of-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU-   Lesser General Public License for more details.--   You should have received a copy of the GNU Lesser General Public-   License along with this library; if not, write to the Free Software-   Foundation, Inc., 59 Temple Place, Suite 330, Boston,-   MA  02111-1307  USA---   Sun Industry Standards Source License Version 1.1-   =================================================-   The contents of this file are subject to the Sun Industry Standards-   Source License Version 1.1 (the "License"); You may not use this file-   except in compliance with the License. You may obtain a copy of the-   License at http://www.openoffice.org/license.html.--   Software provided under this License is provided on an "AS IS" basis,-   WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING,-   WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,-   MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.-   See the License for the specific provisions governing your rights and-   obligations concerning the Software.--   The Initial Developer of the Original Code is: Sun Microsystems, Inc.--   Copyright: 2000 by Sun Microsystems, Inc.--   All Rights Reserved.--   Contributor(s): _______________________________________---->--<!-- data styles -->-<!ENTITY % any-number "( number:number | number:scientific-number | number:fraction )">-<!ENTITY % number-style-content "( (number:text,(%any-number;,number:text?)?) | (%any-number;,number:text?) )">-<!ELEMENT number:number-style ( style:properties?, %number-style-content;, style:map* )>-<!ELEMENT number:number ( number:embedded-text* )>-<!ELEMENT number:scientific-number EMPTY>-<!ELEMENT number:fraction EMPTY>--<!ELEMENT number:embedded-text (#PCDATA)>-<!ATTLIST number:embedded-text number:position %integer; #REQUIRED>--<!ENTITY % currency-symbol-and-text "number:currency-symbol,number:text?">-<!ENTITY % number-and-text "number:number,number:text?">-<!ENTITY % currency-symbol-and-number "((%number-and-text;),(%currency-symbol-and-text;)?) | ((%currency-symbol-and-text;),(%number-and-text;)?)">-<!ENTITY % currency-style-content "number:text?, (%currency-symbol-and-number;)?">--<!ELEMENT number:currency-style ( style:properties?, (%currency-style-content;), style:map* )>-<!ELEMENT number:currency-symbol (#PCDATA)>-<!ATTLIST number:currency-symbol number:language CDATA #IMPLIED>-<!ATTLIST number:currency-symbol number:country CDATA #IMPLIED>--<!ENTITY % percentage-style-content "( (number:text,(%number-and-text;)?) | (%number-and-text;) )">-<!ELEMENT number:percentage-style ( style:properties?, %percentage-style-content;, style:map* )>--<!ENTITY % any-date "( number:day | number:month | number:year | number:era | number:day-of-week | number:week-of-year | number:quarter| number:hours | number:am-pm | number:minutes | number:seconds )">-<!ENTITY % date-style-content "( (number:text,(%any-date;,number:text?)+) | (%any-date;,number:text?)+ )">-<!ELEMENT number:date-style ( style:properties?, %date-style-content;, style:map* )>-<!ELEMENT number:day EMPTY>-<!ATTLIST number:day number:style (short|long) "short">-<!ATTLIST number:day number:calendar CDATA #IMPLIED>-<!ELEMENT number:month EMPTY>-<!ATTLIST number:month number:textual %boolean; "false">-<!ATTLIST number:month number:style (short|long) "short">-<!ATTLIST number:month number:calendar CDATA #IMPLIED>-<!ELEMENT number:year EMPTY>-<!ATTLIST number:year number:style (short|long) "short">-<!ATTLIST number:year number:calendar CDATA #IMPLIED>-<!ELEMENT number:era EMPTY>-<!ATTLIST number:era number:style (short|long) "short">-<!ATTLIST number:era number:calendar CDATA #IMPLIED>-<!ELEMENT number:day-of-week EMPTY>-<!ATTLIST number:day-of-week number:style (short|long) "short">-<!ATTLIST number:day-of-week number:calendar CDATA #IMPLIED>-<!ELEMENT number:week-of-year EMPTY>-<!ATTLIST number:week-of-year number:calendar CDATA #IMPLIED>-<!ELEMENT number:quarter EMPTY>-<!ATTLIST number:quarter number:style (short|long) "short">-<!ATTLIST number:quarter number:calendar CDATA #IMPLIED>--<!ENTITY % any-time "( number:hours | number:am-pm | number:minutes | number:seconds )">-<!ENTITY % time-style-content "( (number:text,(%any-time;,number:text?)+) | (%any-time;,number:text?)+)">-<!ELEMENT number:time-style ( style:properties?, %time-style-content;, style:map* )>-<!ELEMENT number:hours EMPTY>-<!ATTLIST number:hours number:style (short|long) "short">-<!ELEMENT number:minutes EMPTY>-<!ATTLIST number:minutes number:style (short|long) "short">-<!ELEMENT number:seconds EMPTY>-<!ATTLIST number:seconds number:style (short|long) "short">-<!ATTLIST number:seconds number:decimal-places %integer; "0">-<!ELEMENT number:am-pm EMPTY>--<!ENTITY % boolean-style-content "( (number:text,(number:boolean,number:text?)?) | (number:boolean,number:text?) )">-<!ELEMENT number:boolean-style ( style:properties?,%boolean-style-content;, style:map* )>-<!ELEMENT number:boolean EMPTY>--<!ENTITY % text-style-content "( (number:text,(number:text-content,number:text?)?) | (number:text-content,number:text?) )">-<!ELEMENT number:text-style ( style:properties?,%text-style-content;, style:map* )>-<!ELEMENT number:text (#PCDATA)>-<!ELEMENT number:text-content EMPTY>--<!ATTLIST number:number-style style:name %styleName; #REQUIRED>-<!ATTLIST number:currency-style style:name %styleName; #REQUIRED>-<!ATTLIST number:percentage-style style:name %styleName; #REQUIRED>-<!ATTLIST number:date-style style:name %styleName; #REQUIRED>-<!ATTLIST number:time-style style:name %styleName; #REQUIRED>-<!ATTLIST number:boolean-style style:name %styleName; #REQUIRED>-<!ATTLIST number:text-style style:name %styleName; #REQUIRED>--<!ATTLIST number:number-style style:family CDATA #REQUIRED>-<!ATTLIST number:currency-style style:family CDATA #REQUIRED>-<!ATTLIST number:percentage-style style:family CDATA #REQUIRED>-<!ATTLIST number:date-style style:family CDATA #REQUIRED>-<!ATTLIST number:time-style style:family CDATA #REQUIRED>-<!ATTLIST number:boolean-style style:family CDATA #REQUIRED>-<!ATTLIST number:text-style style:family CDATA #REQUIRED>--<!ATTLIST number:number-style number:language CDATA #IMPLIED>-<!ATTLIST number:currency-style number:language CDATA #IMPLIED>-<!ATTLIST number:percentage-style number:language CDATA #IMPLIED>-<!ATTLIST number:date-style number:language CDATA #IMPLIED>-<!ATTLIST number:time-style number:language CDATA #IMPLIED>-<!ATTLIST number:boolean-style number:language CDATA #IMPLIED>-<!ATTLIST number:text-style number:language CDATA #IMPLIED>--<!ATTLIST number:number-style number:country CDATA #IMPLIED>-<!ATTLIST number:currency-style number:country CDATA #IMPLIED>-<!ATTLIST number:percentage-style number:country CDATA #IMPLIED>-<!ATTLIST number:date-style number:country CDATA #IMPLIED>-<!ATTLIST number:time-style number:country CDATA #IMPLIED>-<!ATTLIST number:boolean-style number:country CDATA #IMPLIED>-<!ATTLIST number:text-style number:country CDATA #IMPLIED>--<!ATTLIST number:number-style number:title CDATA #IMPLIED>-<!ATTLIST number:currency-style number:title CDATA #IMPLIED>-<!ATTLIST number:percentage-style number:title CDATA #IMPLIED>-<!ATTLIST number:date-style number:title CDATA #IMPLIED>-<!ATTLIST number:time-style number:title CDATA #IMPLIED>-<!ATTLIST number:boolean-style number:title CDATA #IMPLIED>-<!ATTLIST number:text-style number:title CDATA #IMPLIED>--<!ATTLIST number:number-style style:volatile %boolean; #IMPLIED>-<!ATTLIST number:currency-style style:volatile %boolean; #IMPLIED>-<!ATTLIST number:percentage-style style:volatile %boolean; #IMPLIED>-<!ATTLIST number:date-style style:volatile %boolean; #IMPLIED>-<!ATTLIST number:time-style style:volatile %boolean; #IMPLIED>-<!ATTLIST number:boolean-style style:volatile %boolean; #IMPLIED>-<!ATTLIST number:text-style style:volatile %boolean; #IMPLIED>--<!ATTLIST number:number-style number:transliteration-format CDATA "1">-<!ATTLIST number:currency-style number:transliteration-format CDATA "1">-<!ATTLIST number:percentage-style number:transliteration-format CDATA "1">-<!ATTLIST number:date-style number:transliteration-format CDATA "1">-<!ATTLIST number:time-style number:transliteration-format CDATA "1">-<!ATTLIST number:boolean-style number:transliteration-format CDATA "1">-<!ATTLIST number:text-style number:transliteration-format CDATA "1">--<!ATTLIST number:number-style number:transliteration-language CDATA #IMPLIED>-<!ATTLIST number:currency-style number:transliteration-language CDATA #IMPLIED>-<!ATTLIST number:percentage-style number:transliteration-language CDATA #IMPLIED>-<!ATTLIST number:date-style number:transliteration-language CDATA #IMPLIED>-<!ATTLIST number:time-style number:transliteration-language CDATA #IMPLIED>-<!ATTLIST number:boolean-style number:transliteration-language CDATA #IMPLIED>-<!ATTLIST number:text-style number:transliteration-language CDATA #IMPLIED>--<!ATTLIST number:number-style number:transliteration-country CDATA #IMPLIED>-<!ATTLIST number:currency-style number:transliteration-country CDATA #IMPLIED>-<!ATTLIST number:percentage-style number:transliteration-country CDATA #IMPLIED>-<!ATTLIST number:date-style number:transliteration-country CDATA #IMPLIED>-<!ATTLIST number:time-style number:transliteration-country CDATA #IMPLIED>-<!ATTLIST number:boolean-style number:transliteration-country CDATA #IMPLIED>-<!ATTLIST number:text-style number:transliteration-country CDATA #IMPLIED>--<!ATTLIST number:number-style number:transliteration-style (short|medium|long) "short">-<!ATTLIST number:currency-style number:transliteration-style (short|medium|long) "short">-<!ATTLIST number:percentage-style number:transliteration-style (short|medium|long) "short">-<!ATTLIST number:date-style number:transliteration-style (short|medium|long) "short">-<!ATTLIST number:time-style number:transliteration-style (short|medium|long) "short">-<!ATTLIST number:boolean-style number:transliteration-style (short|medium|long) "short">-<!ATTLIST number:text-style number:transliteration-style (short|medium|long) "short">--<!ATTLIST number:currency-style number:automatic-order %boolean; "false">-<!ATTLIST number:date-style number:automatic-order %boolean; "false">--<!ATTLIST number:date-style number:format-source (fixed|language) "fixed">-<!ATTLIST number:time-style number:format-source (fixed|language) "fixed">--<!ATTLIST number:time-style number:truncate-on-overflow %boolean; "true">--<!ATTLIST number:number number:decimal-places %integer; #IMPLIED>-<!ATTLIST number:scientific-number number:decimal-places %integer; #IMPLIED>--<!ATTLIST number:number number:min-integer-digits %integer; #IMPLIED>-<!ATTLIST number:scientific-number number:min-integer-digits %integer; #IMPLIED>-<!ATTLIST number:fraction number:min-integer-digits %integer; #IMPLIED>--<!ATTLIST number:number number:grouping %boolean; "false">-<!ATTLIST number:scientific-number number:grouping %boolean; "false">-<!ATTLIST number:fraction number:grouping %boolean; "false">--<!ATTLIST number:number number:decimal-replacement CDATA #IMPLIED>--<!ATTLIST number:number number:display-factor %float; "1">--<!ATTLIST number:scientific-number number:min-exponent-digits %integer; #IMPLIED>--<!ATTLIST number:fraction number:min-numerator-digits %integer; #IMPLIED>--<!ATTLIST number:fraction number:min-denominator-digits %integer; #IMPLIED>
− examples/OpenOffice.org/defs.mod
@@ -1,84 +0,0 @@-<!---	$Id: defs.mod,v 1.1 2003/05/13 13:07:51 malcolm Exp $--   The Contents of this file are made available subject to the terms of-   either of the following licenses- -          - GNU Lesser General Public License Version 2.1-          - Sun Industry Standards Source License Version 1.1- -   Sun Microsystems Inc., October, 2000- -   GNU Lesser General Public License Version 2.1-   =============================================-   Copyright 2000 by Sun Microsystems, Inc.-   901 San Antonio Road, Palo Alto, CA 94303, USA- -   This library is free software; you can redistribute it and/or-   modify it under the terms of the GNU Lesser General Public-   License version 2.1, as published by the Free Software Foundation.- -   This library is distributed in the hope that it will be useful,-   but WITHOUT ANY WARRANTY; without even the implied warranty of-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU-   Lesser General Public License for more details.- -   You should have received a copy of the GNU Lesser General Public-   License along with this library; if not, write to the Free Software-   Foundation, Inc., 59 Temple Place, Suite 330, Boston,-   MA  02111-1307  USA- - -   Sun Industry Standards Source License Version 1.1-   =================================================-   The contents of this file are subject to the Sun Industry Standards-   Source License Version 1.1 (the "License"); You may not use this file-   except in compliance with the License. You may obtain a copy of the-   License at http://www.openoffice.org/license.html.- -   Software provided under this License is provided on an "AS IS" basis,-   WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING,-   WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,-   MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.-   See the License for the specific provisions governing your rights and-   obligations concerning the Software.- -   The Initial Developer of the Original Code is: Sun Microsystems, Inc.- -   Copyright: 2000 by Sun Microsystems, Inc.- -   All Rights Reserved.- -   Contributor(s): _______________________________________---->--<!-- This module should contain entities intended for content definitions-     in several other modules. Putting all of them here should remove-     (some) order dependencies of the other module files--->---<!-- text marks for tracking changes; usually used inside of paragraphs -->-<!ENTITY % change-marks "text:change | text:change-start | text:change-end">--<!-- (optional) text declarations; used before the first paragraph -->-<!ENTITY % text-decls "text:variable-decls?, text:sequence-decls?,-					   text:user-field-decls?, text:dde-connection-decls?, -					   text:alphabetical-index-auto-mark-file?" >--<!-- define the types of text which may occur inside of sections -->-<!ENTITY % sectionText "(text:h|text:p|text:ordered-list|-						text:unordered-list|table:table|text:section|-						text:table-of-content|text:illustration-index|-						text:table-index|text:object-index|text:user-index|-						text:alphabetical-index|text:bibliography|-						text:index-title|%change-marks;)*">--<!ENTITY % headerText "(%text-decls;, (text:h|text:p|text:ordered-list|-						text:unordered-list|table:table|text:section|-						text:table-of-content|text:illustration-index|-						text:table-index|text:object-index|text:user-index|-						text:alphabetical-index|text:bibliography|-						text:index-title|%change-marks;)* )">-
− examples/OpenOffice.org/drawing.mod
@@ -1,886 +0,0 @@-<!---	$Id: drawing.mod,v 1.1 2003/05/13 13:07:51 malcolm Exp $--   The Contents of this file are made available subject to the terms of-   either of the following licenses--          - GNU Lesser General Public License Version 2.1-          - Sun Industry Standards Source License Version 1.1--   Sun Microsystems Inc., October, 2000--   GNU Lesser General Public License Version 2.1-   =============================================-   Copyright 2000 by Sun Microsystems, Inc.-   901 San Antonio Road, Palo Alto, CA 94303, USA--   This library is free software; you can redistribute it and/or-   modify it under the terms of the GNU Lesser General Public-   License version 2.1, as published by the Free Software Foundation.--   This library is distributed in the hope that it will be useful,-   but WITHOUT ANY WARRANTY; without even the implied warranty of-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU-   Lesser General Public License for more details.--   You should have received a copy of the GNU Lesser General Public-   License along with this library; if not, write to the Free Software-   Foundation, Inc., 59 Temple Place, Suite 330, Boston,-   MA  02111-1307  USA---   Sun Industry Standards Source License Version 1.1-   =================================================-   The contents of this file are subject to the Sun Industry Standards-   Source License Version 1.1 (the "License"); You may not use this file-   except in compliance with the License. You may obtain a copy of the-   License at http://www.openoffice.org/license.html.--   Software provided under this License is provided on an "AS IS" basis,-   WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING,-   WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,-   MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.-   See the License for the specific provisions governing your rights and-   obligations concerning the Software.--   The Initial Developer of the Original Code is: Sun Microsystems, Inc.--   Copyright: 2000 by Sun Microsystems, Inc.--   All Rights Reserved.--   Contributor(s): _______________________________________---->--<!ENTITY % points "CDATA" >-<!ENTITY % pathData "CDATA" >-<!ENTITY % gradient-style "(linear|axial|radial|ellipsoid|square|rectangular)" >-<!ENTITY % draw-position "svg:x %coordinate; #IMPLIED svg:y %coordinate; #IMPLIED">-<!ENTITY % draw-end-position "table:end-cell-address %cell-address; #IMPLIED table:end-x %coordinate; #IMPLIED table:end-y %coordinate; #IMPLIED">-<!ENTITY % draw-size "svg:width %coordinate; #IMPLIED svg:height %coordinate; #IMPLIED">-<!ENTITY % draw-transform "draw:transform CDATA #IMPLIED">-<!ENTITY % draw-viewbox "svg:viewBox CDATA #REQUIRED">-<!ENTITY % draw-style-name "draw:style-name %styleName; #IMPLIED presentation:style-name %styleName; #IMPLIED draw:text-style-name %styleName; #IMPLIED">-<!ENTITY % draw-shape-id "CDATA #IMPLIED" >-<!ENTITY % draw-text "(text:p|text:unordered-list|text:ordered-list)*">-<!ENTITY % zindex "draw:z-index %nonNegativeInteger; #IMPLIED">-<!ENTITY % distance "CDATA">-<!ENTITY % rectanglePoint "(top-left|top|top-right|left|center|right|bottom-left|bottom|bottom-right)">-<!ENTITY % vector3D "CDATA">-<!ENTITY % text-anchor "text:anchor-type %anchorType; #IMPLIED text:anchor-page-number %positiveInteger; #IMPLIED">-<!ENTITY % layerName "CDATA">-<!ENTITY % table-background "table:table-background (true | false) #IMPLIED">--<!-- commont presentation shape attributes -->-<!ENTITY % presentation-style-name "presentation:style-name %styleName; #IMPLIED">-<!ENTITY % presentation-classes "(title|outline|subtitle|text|graphic|object|chart|table|orgchart|page|notes)" >-<!-- ENTITY % presentation-class "presentation:class %presentation-classes; #IMPLIED" -->-<!ENTITY % presentation-class "presentation:class %presentation-classes; #IMPLIED presentation:placeholder (true|false) #IMPLIED presentation:user-transformed (true|false) #IMPLIED">-<!ENTITY % presentationEffects "(none|fade|move|stripes|open|close|dissolve|wavyline|random|lines|laser|appear|hide|move-short|checkerboard|rotate|stretch)" >-<!ENTITY % presentationEffectDirections "(none|from-left|from-top|from-right|from-bottom|from-center|from-upper-left|from-upper-right|from-lower-left|from-lower-right|to-left|to-top|to-right|to-bottom|to-upper-left|to-upper-right|to-lower-right|to-lower-left|path|spiral-inward-left|spiral-inward-right|spiral-outward-left|spiral-outward-right|vertical|horizontal|to-center|clockwise|counter-clockwise)" >-<!ENTITY % presentationSpeeds "(slow|medium|fast)" >--<!-- Drawing shapes -->-<!ELEMENT draw:rect ( office:events?, %draw-text; )>-<!ATTLIST draw:rect %draw-position; >-<!ATTLIST draw:rect %draw-end-position; >-<!ATTLIST draw:rect %table-background; >-<!ATTLIST draw:rect %draw-size; >-<!ATTLIST draw:rect %draw-style-name; >-<!ATTLIST draw:rect %draw-transform; >-<!ATTLIST draw:rect draw:corner-radius %nonNegativeLength; #IMPLIED>-<!ATTLIST draw:rect %zindex;>-<!ATTLIST draw:rect draw:id %draw-shape-id;>-<!ATTLIST draw:rect %text-anchor;>-<!ATTLIST draw:rect draw:layer %layerName; #IMPLIED>--<!ELEMENT draw:line ( office:events?, %draw-text; )>-<!ATTLIST draw:line svg:x1 %length; #IMPLIED>-<!ATTLIST draw:line svg:y1 %length; #IMPLIED>-<!ATTLIST draw:line svg:x2 %length; #REQUIRED>-<!ATTLIST draw:line svg:y2 %length; #REQUIRED>-<!ATTLIST draw:line svg:y %coordinate; #IMPLIED>-<!ATTLIST draw:line %draw-style-name; >-<!ATTLIST draw:line %draw-transform; >-<!ATTLIST draw:line %zindex;>-<!ATTLIST draw:line %draw-end-position; >-<!ATTLIST draw:line %table-background; >-<!ATTLIST draw:line draw:id %draw-shape-id;>-<!ATTLIST draw:line %text-anchor;>-<!ATTLIST draw:line draw:layer %layerName; #IMPLIED>--<!ELEMENT draw:polyline ( office:events?, %draw-text; )>-<!ATTLIST draw:polyline %draw-position; >-<!ATTLIST draw:polyline %draw-size; >-<!ATTLIST draw:polyline %draw-viewbox; >-<!ATTLIST draw:polyline draw:points %points; #REQUIRED>-<!ATTLIST draw:polyline %draw-style-name; >-<!ATTLIST draw:polyline %draw-transform; >-<!ATTLIST draw:polyline %zindex;>-<!ATTLIST draw:polyline %draw-end-position; >-<!ATTLIST draw:polyline %table-background; >-<!ATTLIST draw:polyline draw:id %draw-shape-id;>-<!ATTLIST draw:polyline %text-anchor;>-<!ATTLIST draw:polyline draw:layer %layerName; #IMPLIED>--<!ELEMENT draw:polygon ( office:events?, %draw-text; )>-<!ATTLIST draw:polygon %draw-position; >-<!ATTLIST draw:polygon %draw-end-position; >-<!ATTLIST draw:polygon %table-background; >-<!ATTLIST draw:polygon %draw-size; >-<!ATTLIST draw:polygon %draw-viewbox; >-<!ATTLIST draw:polygon draw:points %points; #REQUIRED >-<!ATTLIST draw:polygon %draw-style-name; >-<!ATTLIST draw:polygon %draw-transform; >-<!ATTLIST draw:polygon %zindex;>-<!ATTLIST draw:polygon draw:id %draw-shape-id;>-<!ATTLIST draw:polygon %text-anchor;>-<!ATTLIST draw:polygon draw:layer %layerName; #IMPLIED>--<!ELEMENT draw:path ( office:events?, %draw-text; )>-<!ATTLIST draw:path %draw-position;>-<!ATTLIST draw:path %draw-end-position; >-<!ATTLIST draw:path %table-background; >-<!ATTLIST draw:path %draw-size; >-<!ATTLIST draw:path %draw-viewbox; >-<!ATTLIST draw:path svg:d %pathData; #REQUIRED >-<!ATTLIST draw:path %draw-style-name; >-<!ATTLIST draw:path %draw-transform; >-<!ATTLIST draw:path %zindex;>-<!ATTLIST draw:path draw:id %draw-shape-id;>-<!ATTLIST draw:path %text-anchor;>-<!ATTLIST draw:path draw:layer %layerName; #IMPLIED>--<!ELEMENT draw:circle ( office:events?, %draw-text; )>-<!ATTLIST draw:circle %draw-position; >-<!ATTLIST draw:circle %draw-size; >-<!ATTLIST draw:circle %draw-style-name; >-<!ATTLIST draw:circle %draw-transform; >-<!ATTLIST draw:circle %zindex;>-<!ATTLIST draw:circle %draw-end-position; >-<!ATTLIST draw:circle %table-background; >-<!ATTLIST draw:circle draw:id %draw-shape-id;>-<!ATTLIST draw:circle draw:kind (full|section|cut|arc) "full">-<!ATTLIST draw:circle draw:start-angle %nonNegativeInteger; #IMPLIED>-<!ATTLIST draw:circle draw:end-angle %nonNegativeInteger; #IMPLIED>-<!ATTLIST draw:circle %text-anchor;>-<!ATTLIST draw:circle draw:layer %layerName; #IMPLIED>--<!ELEMENT draw:ellipse ( office:events?, %draw-text; )>-<!ATTLIST draw:ellipse %draw-position; >-<!ATTLIST draw:ellipse %draw-size; >-<!ATTLIST draw:ellipse %draw-style-name; >-<!ATTLIST draw:ellipse %draw-transform; >-<!ATTLIST draw:ellipse %zindex;>-<!ATTLIST draw:ellipse %draw-end-position; >-<!ATTLIST draw:ellipse %table-background; >-<!ATTLIST draw:ellipse draw:id %draw-shape-id;>-<!ATTLIST draw:ellipse draw:kind (full|section|cut|arc) "full">-<!ATTLIST draw:ellipse draw:start-angle %nonNegativeInteger; #IMPLIED>-<!ATTLIST draw:ellipse draw:end-angle %nonNegativeInteger; #IMPLIED>-<!ATTLIST draw:ellipse  %text-anchor;>-<!ATTLIST draw:ellipse draw:layer %layerName; #IMPLIED>--<!ELEMENT draw:connector ( office:events?, %draw-text;)>-<!ATTLIST draw:connector draw:type (standard|lines|line|curve) "standard">-<!ATTLIST draw:connector draw:line-skew CDATA #IMPLIED>-<!ATTLIST draw:connector %draw-style-name;>-<!ATTLIST draw:connector svg:x1 %coordinate; #REQUIRED>-<!ATTLIST draw:connector svg:y1 %coordinate; #REQUIRED>-<!ATTLIST draw:connector svg:x2 %coordinate; #REQUIRED>-<!ATTLIST draw:connector svg:y2 %coordinate; #REQUIRED>-<!ATTLIST draw:connector draw:start-shape %draw-shape-id;>-<!ATTLIST draw:connector draw:start-glue-point %integer; #IMPLIED>-<!ATTLIST draw:connector draw:end-shape %draw-shape-id;>-<!ATTLIST draw:connector draw:end-glue-point %integer; #IMPLIED>-<!ATTLIST draw:connector %zindex;>-<!ATTLIST draw:connector %draw-end-position; >-<!ATTLIST draw:connector %table-background; >-<!ATTLIST draw:connector draw:id %draw-shape-id;>-<!ATTLIST draw:connector %text-anchor;>-<!ATTLIST draw:connector draw:layer %layerName; #IMPLIED>--<!ELEMENT draw:control EMPTY>-<!ATTLIST draw:control %draw-style-name;>-<!ATTLIST draw:control %draw-position; >-<!ATTLIST draw:control %draw-size; >-<!ATTLIST draw:control %control-id; >-<!ATTLIST draw:control %zindex;>-<!ATTLIST draw:control %draw-end-position; >-<!ATTLIST draw:control %table-background; >-<!ATTLIST draw:control draw:id %draw-shape-id;>-<!ATTLIST draw:control %text-anchor;>-<!ATTLIST draw:control draw:layer %layerName; #IMPLIED>--<!ELEMENT draw:g ( office:events?, (%shapes;)* ) >-<!ATTLIST draw:g svg:y %coordinate; #IMPLIED>-<!ATTLIST draw:g %draw-transform; >-<!ATTLIST draw:g draw:name %string; #IMPLIED>-<!ATTLIST draw:g %draw-style-name; >-<!ATTLIST draw:g %zindex;>-<!ATTLIST draw:g %draw-end-position; >-<!ATTLIST draw:g %table-background; >-<!ATTLIST draw:g draw:id %draw-shape-id;>-<!ATTLIST draw:g %text-anchor;>-<!ATTLIST draw:g draw:layer %layerName; #IMPLIED>--<!ELEMENT draw:page-thumbnail EMPTY>-<!ATTLIST draw:page-thumbnail draw:page-number %positiveInteger; #IMPLIED>-<!ATTLIST draw:page-thumbnail %draw-position; >-<!ATTLIST draw:page-thumbnail %draw-size; >-<!ATTLIST draw:page-thumbnail %draw-style-name; >-<!ATTLIST draw:page-thumbnail %presentation-class; >-<!ATTLIST draw:page-thumbnail %zindex;>-<!ATTLIST draw:page-thumbnail %draw-end-position; >-<!ATTLIST draw:page-thumbnail %table-background; >-<!ATTLIST draw:page-thumbnail draw:id %draw-shape-id;>-<!ATTLIST draw:page-thumbnail %text-anchor;>-<!ATTLIST draw:page-thumbnail draw:layer %layerName; #IMPLIED>--<!ELEMENT draw:caption ( office:events?, %draw-text;)>-<!ATTLIST draw:caption %draw-position; >-<!ATTLIST draw:caption %draw-end-position; >-<!ATTLIST draw:caption %table-background; >-<!ATTLIST draw:caption %draw-size; >-<!ATTLIST draw:caption %draw-style-name; >-<!ATTLIST draw:caption %draw-transform; >-<!ATTLIST draw:caption draw:caption-point-x %coordinate; #IMPLIED>-<!ATTLIST draw:caption draw:caption-point-y %coordinate; #IMPLIED>-<!ATTLIST draw:caption %zindex;>-<!ATTLIST draw:caption draw:id %draw-shape-id;>-<!ATTLIST draw:caption  %text-anchor;>-<!ATTLIST draw:caption draw:layer %layerName; #IMPLIED>-<!ATTLIST draw:caption draw:corner-radius %nonNegativeLength; #IMPLIED>--<!ELEMENT draw:measure ( office:events?, %draw-text;)>-<!ATTLIST draw:measure svg:x1 %coordinate; #REQUIRED>-<!ATTLIST draw:measure svg:y1 %coordinate; #REQUIRED>-<!ATTLIST draw:measure svg:x2 %coordinate; #REQUIRED>-<!ATTLIST draw:measure svg:y2 %coordinate; #REQUIRED>-<!ATTLIST draw:measure %draw-end-position; >-<!ATTLIST draw:measure %table-background; >-<!ATTLIST draw:measure %draw-style-name; >-<!ATTLIST draw:measure %draw-transform; >-<!ATTLIST draw:measure %zindex;>-<!ATTLIST draw:measure draw:id %draw-shape-id;>-<!ATTLIST draw:measure %text-anchor;>-<!ATTLIST draw:measure draw:layer %layerName; #IMPLIED>--<!-- graphic style elements -->-<!ELEMENT draw:gradient EMPTY >-<!ATTLIST draw:gradient draw:name %styleName; #REQUIRED>-<!ATTLIST draw:gradient draw:style %gradient-style; #REQUIRED>-<!ATTLIST draw:gradient draw:cx %coordinate; #IMPLIED>-<!ATTLIST draw:gradient draw:cy %coordinate; #IMPLIED>-<!ATTLIST draw:gradient draw:start-color %color; #IMPLIED>-<!ATTLIST draw:gradient draw:end-color %color; #IMPLIED>-<!ATTLIST draw:gradient draw:start-intensity %percentage; #IMPLIED>-<!ATTLIST draw:gradient draw:end-intensity %percentage; #IMPLIED>-<!ATTLIST draw:gradient draw:angle %integer; #IMPLIED>-<!ATTLIST draw:gradient draw:border %percentage; #IMPLIED>--<!ELEMENT draw:hatch EMPTY >-<!ATTLIST draw:hatch draw:name %styleName; #REQUIRED>-<!ATTLIST draw:hatch draw:style (single|double|triple) #REQUIRED >-<!ATTLIST draw:hatch draw:color %color; #IMPLIED>-<!ATTLIST draw:hatch draw:distance %length; #IMPLIED>-<!ATTLIST draw:hatch draw:rotation %integer; #IMPLIED>---<!ELEMENT draw:fill-image EMPTY >-<!ATTLIST draw:fill-image draw:name %styleName; #REQUIRED>-<!ATTLIST draw:fill-image xlink:href %uriReference; #REQUIRED>-<!ATTLIST draw:fill-image xlink:type (simple) #IMPLIED>-<!ATTLIST draw:fill-image xlink:show (embed) #IMPLIED>-<!ATTLIST draw:fill-image xlink:actuate (onLoad) #IMPLIED>-<!ATTLIST draw:fill-image svg:width %length; #IMPLIED>-<!ATTLIST draw:fill-image svg:height %length; #IMPLIED>--<!ELEMENT draw:transparency EMPTY>-<!ATTLIST draw:transparency draw:name %styleName; #REQUIRED>-<!ATTLIST draw:transparency draw:style %gradient-style; #REQUIRED>-<!ATTLIST draw:transparency draw:cx %coordinate; #IMPLIED>-<!ATTLIST draw:transparency draw:cy %coordinate; #IMPLIED>-<!ATTLIST draw:transparency draw:start %percentage; #IMPLIED>-<!ATTLIST draw:transparency draw:end %percentage; #IMPLIED>-<!ATTLIST draw:transparency draw:angle %integer; #IMPLIED>-<!ATTLIST draw:transparency draw:border %percentage; #IMPLIED>--<!ELEMENT draw:marker EMPTY>-<!ATTLIST draw:marker draw:name %styleName; #REQUIRED>-<!ATTLIST draw:marker %draw-viewbox; >-<!ATTLIST draw:marker svg:d %pathData; #REQUIRED>--<!ELEMENT draw:stroke-dash EMPTY>-<!ATTLIST draw:stroke-dash draw:name %styleName; #REQUIRED>-<!ATTLIST draw:stroke-dash draw:style (rect|round) #IMPLIED>-<!ATTLIST draw:stroke-dash draw:dots1 %integer; #IMPLIED>-<!ATTLIST draw:stroke-dash draw:dots1-length %length; #IMPLIED>-<!ATTLIST draw:stroke-dash draw:dots2 %integer; #IMPLIED>-<!ATTLIST draw:stroke-dash draw:dots2-length %length; #IMPLIED>-<!ATTLIST draw:stroke-dash draw:distance %length; #IMPLIED>--<!-- stroke attributes -->-<!ATTLIST style:properties draw:stroke (none|dash|solid) #IMPLIED>-<!ATTLIST style:properties draw:stroke-dash CDATA #IMPLIED>-<!ATTLIST style:properties svg:stroke-width %length; #IMPLIED>-<!ATTLIST style:properties svg:stroke-color %color; #IMPLIED>-<!ATTLIST style:properties draw:marker-start %styleName; #IMPLIED>-<!ATTLIST style:properties draw:marker-end %styleName; #IMPLIED>-<!ATTLIST style:properties draw:marker-start-width %length; #IMPLIED>-<!ATTLIST style:properties draw:marker-end-width %length; #IMPLIED>-<!ATTLIST style:properties draw:marker-start-center %boolean; #IMPLIED>-<!ATTLIST style:properties draw:marker-end-center %boolean; #IMPLIED>-<!ATTLIST style:properties svg:stroke-opacity %floatOrPercentage; #IMPLIED>-<!ATTLIST style:properties svg:stroke-linejoin (miter|round|bevel|middle|none|inherit) #IMPLIED>--<!-- text attributes -->-<!ATTLIST style:properties draw:auto-grow-width %boolean; #IMPLIED>-<!ATTLIST style:properties draw:auto-grow-height %boolean; #IMPLIED>-<!ATTLIST style:properties draw:fit-to-size %boolean; #IMPLIED>-<!ATTLIST style:properties draw:fit-to-contour %boolean; #IMPLIED>-<!ATTLIST style:properties draw:textarea-horizontal-align ( left | center | right | justify ) #IMPLIED>-<!ATTLIST style:properties draw:textarea-vertical-align ( top | middle | bottom | justify ) #IMPLIED>-<!ATTLIST style:properties draw:writing-mode (lr-tb|tb-rl) "lr-tb">--<!-- fill attributes -->-<!ATTLIST style:properties draw:fill (none|solid|bitmap|gradient|hatch) #IMPLIED>-<!ATTLIST style:properties draw:fill-color %color; #IMPLIED>-<!ATTLIST style:properties draw:fill-gradient-name %styleName; #IMPLIED>-<!ATTLIST style:properties draw:gradient-step-count CDATA #IMPLIED>-<!ATTLIST style:properties draw:fill-hatch-name %styleName; #IMPLIED>-<!ATTLIST style:properties draw:fill-hatch-solid %boolean; #IMPLIED>-<!ATTLIST style:properties draw:fill-image-name %styleName; #IMPLIED>-<!ATTLIST style:properties style:repeat (no-repeat|repeat|stretch) #IMPLIED>-<!ATTLIST style:properties draw:fill-image-width %lengthOrPercentage; #IMPLIED>-<!ATTLIST style:properties draw:fill-image-height %lengthOrPercentage; #IMPLIED>-<!ATTLIST style:properties draw:fill-image-ref-point-x %percentage; #IMPLIED>-<!ATTLIST style:properties draw:fill-image-ref-point-y %percentage; #IMPLIED>-<!ATTLIST style:properties draw:fill-image-ref-point %rectanglePoint; #IMPLIED>-<!ATTLIST style:properties draw:tile-repeat-offset CDATA #IMPLIED>-<!ATTLIST style:properties draw:transparency %percentage; #IMPLIED>-<!ATTLIST style:properties draw:transparency-name %styleName; #IMPLIED>--<!-- graphic attributes -->-<!ATTLIST style:properties draw:color-mode (greyscale|mono|watermark|standard) #IMPLIED>-<!ATTLIST style:properties draw:luminance %percentage; #IMPLIED>-<!ATTLIST style:properties draw:contrast %percentage; #IMPLIED>-<!ATTLIST style:properties draw:gamma %percentage; #IMPLIED>-<!ATTLIST style:properties draw:red %percentage; #IMPLIED>-<!ATTLIST style:properties draw:green %percentage; #IMPLIED>-<!ATTLIST style:properties draw:blue %percentage; #IMPLIED>-<!ATTLIST style:properties draw:color-inversion %boolean; #IMPLIED>-<!ATTLIST style:properties draw:mirror %boolean; #IMPLIED>--<!-- shadow attributes -->-<!ATTLIST style:properties draw:shadow (visible|hidden) #IMPLIED>-<!ATTLIST style:properties draw:shadow-offset-x %length; #IMPLIED>-<!ATTLIST style:properties draw:shadow-offset-y %length; #IMPLIED>-<!ATTLIST style:properties draw:shadow-color %color; #IMPLIED>-<!ATTLIST style:properties draw:shadow-transparency CDATA #IMPLIED>--<!-- connector attributes -->-<!ATTLIST style:properties draw:start-line-spacing-horizontal %distance; #IMPLIED>-<!ATTLIST style:properties draw:start-line-spacing-vertical %distance; #IMPLIED>-<!ATTLIST style:properties draw:end-line-spacing-horizontal %distance; #IMPLIED>-<!ATTLIST style:properties draw:end-line-spacing-vertical %distance; #IMPLIED>--<!-- measure attributes -->-<!ATTLIST style:properties draw:line-distance %distance; #IMPLIED>-<!ATTLIST style:properties draw:guide-overhang %distance; #IMPLIED>-<!ATTLIST style:properties draw:guide-distance %distance; #IMPLIED>-<!ATTLIST style:properties draw:start-guide %distance; #IMPLIED>-<!ATTLIST style:properties draw:end-guide %distance; #IMPLIED>-<!ATTLIST style:properties draw:measure-align (automatic|left-outside|inside|right-outside) #IMPLIED>-<!ATTLIST style:properties draw:measure-vertical-align (automatic|above|below|center) #IMPLIED>-<!ATTLIST style:properties draw:unit (automatic|mm|cm|m|km|pt|pc|inch|ft|mi) #IMPLIED>-<!ATTLIST style:properties draw:show-unit %boolean; #IMPLIED>-<!ATTLIST style:properties draw:placing (below|above) #IMPLIED>-<!ATTLIST style:properties draw:parallel %boolean; #IMPLIED>-<!ATTLIST style:properties draw:decimal-places %nonNegativeLength; #IMPLIED>--<!-- frame attributes -->-<!ATTLIST style:properties draw:frame-display-scrollbar %boolean; #IMPLIED>-<!ATTLIST style:properties draw:frame-display-border %boolean; #IMPLIED>-<!ATTLIST style:properties draw:frame-margin-horizontal %nonNegativePixelLength; #IMPLIED>-<!ATTLIST style:properties draw:frame-margin-vertical %nonNegativePixelLength; #IMPLIED>-<!ATTLIST style:properties draw:size-protect %boolean; #IMPLIED>-<!ATTLIST style:properties draw:move-protect %boolean; #IMPLIED>--<!-- ole object attributes -->-<!ATTLIST style:properties draw:visible-area-left %nonNegativeLength; #IMPLIED>-<!ATTLIST style:properties draw:visible-area-top %nonNegativeLength; #IMPLIED>-<!ATTLIST style:properties draw:visible-area-width %positiveLength; #IMPLIED>-<!ATTLIST style:properties draw:visible-area-height %positiveLength; #IMPLIED>--<!-- fontwork attributes -->-<!ATTLIST style:properties draw:fontwork-style (rotate|upright|slant-x|slant-y|none) #IMPLIED>-<!ATTLIST style:properties draw:fontwork-adjust (left|right|autosize|center) #IMPLIED>-<!ATTLIST style:properties draw:fontwork-distance %distance; #IMPLIED>-<!ATTLIST style:properties draw:fontwork-start %distance; #IMPLIED>-<!ATTLIST style:properties draw:fontwork-mirror %boolean; #IMPLIED>-<!ATTLIST style:properties draw:fontwork-outline %boolean; #IMPLIED>-<!ATTLIST style:properties draw:fontwork-shadow (normal|slant|none) #IMPLIED>-<!ATTLIST style:properties draw:fontwork-shadow-color %color; #IMPLIED>-<!ATTLIST style:properties draw:fontwork-shadow-offset-x %distance; #IMPLIED>-<!ATTLIST style:properties draw:fontwork-shadow-offset-y %distance; #IMPLIED>-<!ATTLIST style:properties draw:fontwork-form (none|top-circle|bottom-circle|left-circle|right-circle|top-arc|bottom-arc|left-arc|right-arc|button1|button2|button3|button4) #IMPLIED>-<!ATTLIST style:properties draw:fontwork-hide-form %boolean; #IMPLIED>-<!ATTLIST style:properties draw:fontwork-shadow-transparence %percentage; #IMPLIED>--<!-- caption attributes -->-<!ATTLIST style:properties draw:caption-type (straight-line|angled-line|angled-connector-line) #IMPLIED>-<!ATTLIST style:properties draw:caption-angle-type (fixed|free) #IMPLIED>-<!ATTLIST style:properties draw:caption-angle %nonNegativeInteger; #IMPLIED>-<!ATTLIST style:properties draw:caption-gap %distance; #IMPLIED>-<!ATTLIST style:properties draw:caption-escape-direction (horizontal|vertical|auto) #IMPLIED>-<!ATTLIST style:properties draw:caption-escape %lengthOrPercentage; #IMPLIED>-<!ATTLIST style:properties draw:caption-line-length %distance; #IMPLIED>-<!ATTLIST style:properties draw:caption-fit-line-length %boolean; #IMPLIED>--<!-- Animations -->-<!ELEMENT presentation:sound EMPTY>-<!ATTLIST presentation:sound xlink:href %uriReference; #REQUIRED>-<!ATTLIST presentation:sound xlink:type (simple) #FIXED "simple">-<!ATTLIST presentation:sound xlink:show (new|replace) #IMPLIED>-<!ATTLIST presentation:sound xlink:actuate (onRequest) "onRequest">-<!ATTLIST presentation:sound presentation:play-full %boolean; #IMPLIED>--<!ELEMENT presentation:show-shape (presentation:sound)?>-<!ATTLIST presentation:show-shape draw:shape-id CDATA #REQUIRED>-<!ATTLIST presentation:show-shape presentation:effect %presentationEffects; "none">-<!ATTLIST presentation:show-shape presentation:direction %presentationEffectDirections; "none">-<!ATTLIST presentation:show-shape presentation:speed %presentationSpeeds; "medium">-<!ATTLIST presentation:show-shape presentation:start-scale %percentage; "100%">-<!ATTLIST presentation:show-shape presentation:path-id CDATA #IMPLIED >--<!ELEMENT presentation:show-text (presentation:sound)?>-<!ATTLIST presentation:show-text draw:shape-id CDATA #REQUIRED>-<!ATTLIST presentation:show-text presentation:effect %presentationEffects; "none">-<!ATTLIST presentation:show-text presentation:direction %presentationEffectDirections; "none">-<!ATTLIST presentation:show-text presentation:speed %presentationSpeeds; "medium">-<!ATTLIST presentation:show-text presentation:start-scale %percentage; "100%">-<!ATTLIST presentation:show-text presentation:path-id CDATA #IMPLIED >--<!ELEMENT presentation:hide-shape (presentation:sound)?>-<!ATTLIST presentation:hide-shape draw:shape-id CDATA #REQUIRED>-<!ATTLIST presentation:hide-shape presentation:effect %presentationEffects; "none">-<!ATTLIST presentation:hide-shape presentation:direction %presentationEffectDirections; "none">-<!ATTLIST presentation:hide-shape presentation:speed %presentationSpeeds; "medium">-<!ATTLIST presentation:hide-shape presentation:start-scale %percentage; "100%">-<!ATTLIST presentation:hide-shape presentation:path-id CDATA #IMPLIED >--<!ELEMENT presentation:hide-text (presentation:sound)?>-<!ATTLIST presentation:hide-text draw:shape-id CDATA #REQUIRED>-<!ATTLIST presentation:hide-text presentation:effect %presentationEffects; "none">-<!ATTLIST presentation:hide-text presentation:direction %presentationEffectDirections; "none">-<!ATTLIST presentation:hide-text presentation:speed %presentationSpeeds; "medium">-<!ATTLIST presentation:hide-text presentation:start-scale %percentage; "100%">-<!ATTLIST presentation:hide-text presentation:path-id CDATA #IMPLIED >--<!ELEMENT presentation:dim (presentation:sound)?>-<!ATTLIST presentation:dim draw:shape-id CDATA #REQUIRED>-<!ATTLIST presentation:dim draw:color %color; #REQUIRED>--<!ELEMENT presentation:play EMPTY>-<!ATTLIST presentation:play draw:shape-id CDATA #REQUIRED>-<!ATTLIST presentation:play presentation:speed %presentationSpeeds; "medium">--<!ELEMENT presentation:animations (presentation:show-shape|presentation:show-text|presentation:hide-shape|presentation:hide-text|presentation:dim|presentation:play)*>--<!ELEMENT presentation:show EMPTY>-<!ATTLIST presentation:show presentation:name %styleName; #REQUIRED>-<!ATTLIST presentation:show presentation:pages CDATA #REQUIRED>--<!ELEMENT presentation:settings (presentation:show)*>-<!ATTLIST presentation:settings presentation:start-page %styleName; #IMPLIED>-<!ATTLIST presentation:settings presentation:show %styleName; #IMPLIED>-<!ATTLIST presentation:settings presentation:full-screen %boolean; "true">-<!ATTLIST presentation:settings presentation:endless %boolean; "false">-<!ATTLIST presentation:settings presentation:pause %timeDuration; #IMPLIED>-<!ATTLIST presentation:settings presentation:show-logo %boolean; "false">-<!ATTLIST presentation:settings presentation:force-manual %boolean; "false">-<!ATTLIST presentation:settings presentation:mouse-visible %boolean; "true">-<!ATTLIST presentation:settings presentation:mouse-as-pen %boolean; "false">-<!ATTLIST presentation:settings presentation:start-with-navigator %boolean; "false">-<!ATTLIST presentation:settings presentation:animations (enabled|disabled) "enabled">-<!ATTLIST presentation:settings presentation:stay-on-top %boolean; "false">-<!ATTLIST presentation:settings presentation:transition-on-click (enabled|disabled) "enabled">--<!-- Drawing page -->-<!ELEMENT draw:page (office:forms?,(%shapes;)*,presentation:animations?,presentation:notes?)>-<!ATTLIST draw:page draw:name %string; #IMPLIED>-<!ATTLIST draw:page draw:style-name %styleName; #IMPLIED>-<!ATTLIST draw:page draw:master-page-name %styleName; #REQUIRED>-<!ATTLIST draw:page presentation:presentation-page-layout-name %styleName; #IMPLIED>-<!ATTLIST draw:page draw:id %nonNegativeInteger; #IMPLIED>-<!ATTLIST draw:page xlink:href %uriReference; #IMPLIED>-<!ATTLIST draw:page xlink:type (simple) #IMPLIED>-<!ATTLIST draw:page xlink:show (replace) #IMPLIED>-<!ATTLIST draw:page xlink:actuate (onRequest) #IMPLIED>--<!-- Presentation notes -->-<!ELEMENT presentation:notes (%shapes;)*>-<!ATTLIST presentation:notes style:page-master-name %styleName; #IMPLIED>--<!-- presentation page layouts -->-<!ELEMENT style:presentation-page-layout (presentation:placeholder)* >-<!ATTLIST style:presentation-page-layout style:name %styleName; #REQUIRED>-<!ELEMENT presentation:placeholder EMPTY >-<!ATTLIST presentation:placeholder presentation:object (title|outline|subtitle|text|graphic|object|chart|orgchart|page|notes|handout) #REQUIRED>-<!ATTLIST presentation:placeholder svg:x %coordinateOrPercentage; #REQUIRED>-<!ATTLIST presentation:placeholder svg:y %coordinateOrPercentage; #REQUIRED>-<!ATTLIST presentation:placeholder svg:width %lengthOrPercentage; #REQUIRED>-<!ATTLIST presentation:placeholder svg:height %lengthOrPercentage; #REQUIRED>--<!-- presentation page attributes -->-<!ATTLIST style:properties presentation:transition-type (manual|automatic|semi-automatic) #IMPLIED >-<!ATTLIST style:properties presentation:transition-style (none|fade-from-left|fade-from-top|fade-from-right|fade-from-bottom|fade-to-center|fade-from-center|move-from-left|move-from-top|move-from-right|move-from-bottom|roll-from-top|roll-from-left|roll-from-right|roll-from-bottom|vertical-stripes|horizontal-stripes|clockwise|counterclockwise|fade-from-upperleft|fade-from-upperright|fade-from-lowerleft|fade-from-lowerright|close-vertical|close-horizontal|open-vertical|open-horizontal|spiralin-left|spiralin-right|spiralout-left|spiralout-right|dissolve|wavyline-from-left|wavyline-from-top|wavyline-from-right|wavyline-from-bottom|random|stretch-from-left|stretch-from-top|stretch-from-right|stretch-from-bottom|vertical-lines|horizontal-lines) #IMPLIED >-<!ATTLIST style:properties presentation:transition-speed %presentationSpeeds; #IMPLIED >-<!ATTLIST style:properties presentation:duration %timeDuration; #IMPLIED>-<!ATTLIST style:properties presentation:visibility (visible|hidden) #IMPLIED>-<!ATTLIST style:properties draw:background-size (full|border) #IMPLIED>-<!ATTLIST style:properties presentation:background-objects-visible %boolean; #IMPLIED>-<!ATTLIST style:properties presentation:background-visible %boolean; #IMPLIED>---<!-- text boxes -->-<!ELEMENT draw:text-box (office:events?,draw:image-map?,-		%sectionText;)>-<!ATTLIST draw:text-box %draw-style-name;>-<!ATTLIST draw:text-box %draw-transform; >-<!ATTLIST draw:text-box draw:name %string; #IMPLIED>-<!ATTLIST draw:text-box draw:chain-next-name %string; #IMPLIED>--<!ATTLIST draw:text-box %text-anchor;>-<!ATTLIST draw:text-box %draw-position;>-<!ATTLIST draw:text-box %draw-end-position; >-<!ATTLIST draw:text-box %table-background; >-<!ATTLIST draw:text-box svg:width %lengthOrPercentage; #IMPLIED>-<!ATTLIST draw:text-box svg:height %lengthOrPercentage; #IMPLIED>-<!ATTLIST draw:text-box style:rel-width %percentage; #IMPLIED>-<!ATTLIST draw:text-box style:rel-height %percentage; #IMPLIED>-<!ATTLIST draw:text-box fo:min-height %lengthOrPercentage; #IMPLIED>-<!ATTLIST draw:text-box %zindex;>-<!ATTLIST draw:text-box %presentation-class; >-<!ATTLIST draw:text-box draw:id %draw-shape-id;>-<!ATTLIST draw:text-box draw:layer %layerName; #IMPLIED>-<!ATTLIST draw:text-box draw:corner-radius %nonNegativeLength; #IMPLIED>--<!-- image -->-<!ELEMENT draw:image (office:binary-data?,office:events?,draw:image-map?,svg:desc?,(draw:contour-polygon|draw:contour-path)?)>-<!ATTLIST draw:image %draw-transform; >-<!ATTLIST draw:image %draw-style-name;>-<!ATTLIST draw:image draw:name %string; #IMPLIED>-<!ATTLIST draw:image xlink:href %uriReference; #IMPLIED>-<!ATTLIST draw:image xlink:type (simple) #IMPLIED>-<!ATTLIST draw:image xlink:show (embed) #IMPLIED>-<!ATTLIST draw:image xlink:actuate (onLoad) #IMPLIED>-<!ATTLIST draw:image draw:filter-name %string; #IMPLIED>-<!ATTLIST draw:image %text-anchor;>-<!ATTLIST draw:image %draw-position;>-<!ATTLIST draw:image %draw-end-position; >-<!ATTLIST draw:image %table-background; >-<!ATTLIST draw:image svg:width %lengthOrPercentage; #IMPLIED>-<!ATTLIST draw:image svg:height %lengthOrPercentage; #IMPLIED>-<!ATTLIST draw:image %presentation-class; >-<!ATTLIST draw:image %zindex;>-<!ATTLIST draw:image draw:id %draw-shape-id;>-<!ATTLIST draw:image draw:layer %layerName; #IMPLIED>-<!ATTLIST draw:image style:rel-width %percentage; #IMPLIED>-<!ATTLIST draw:image style:rel-height %percentage; #IMPLIED>--<!-- objects -->-<!ELEMENT draw:thumbnail EMPTY>-<!ATTLIST draw:thumbnail xlink:href %uriReference; #REQUIRED>-<!ATTLIST draw:thumbnail xlink:type (simple) #IMPLIED>-<!ATTLIST draw:thumbnail xlink:show (embed) #IMPLIED>-<!ATTLIST draw:thumbnail xlink:actuate (onLoad) #IMPLIED>--<!ELEMENT math:math ANY> <!-- dummy (we have no MathML DTD currently)-->-<!ELEMENT draw:object (draw:thumbnail?,(office:document|math:math)?,office:events?, draw:image-map?, svg:desc?,(draw:contour-polygon|draw:contour-path)?)>-<!ATTLIST draw:object %draw-style-name;>-<!ATTLIST draw:object draw:name %string; #IMPLIED>-<!ATTLIST draw:object xlink:href %uriReference; #IMPLIED>-<!ATTLIST draw:object xlink:type (simple) #IMPLIED>-<!ATTLIST draw:object xlink:show (embed) #IMPLIED>-<!ATTLIST draw:object xlink:actuate (onLoad) #IMPLIED>-<!ATTLIST draw:object %text-anchor;>-<!ATTLIST draw:object %draw-position;>-<!ATTLIST draw:object %draw-end-position; >-<!ATTLIST draw:object %table-background; >-<!ATTLIST draw:object svg:width %lengthOrPercentage; #IMPLIED>-<!ATTLIST draw:object svg:height %lengthOrPercentage; #IMPLIED>-<!ATTLIST draw:object %presentation-class; >-<!ATTLIST draw:object %zindex;>-<!ATTLIST draw:object draw:id %draw-shape-id;>-<!ATTLIST draw:object draw:layer %layerName; #IMPLIED>-<!ATTLIST draw:object draw:notify-on-update-of-ranges %string; #IMPLIED>-<!ATTLIST draw:object style:rel-width %percentage; #IMPLIED>-<!ATTLIST draw:object style:rel-height %percentage; #IMPLIED>--<!ELEMENT draw:object-ole (office:binary-data?|office:events?|draw:image-map?|svg:desc?|draw:contour-polygon?|draw:contour-path?|draw:thumbnail?)>-<!ATTLIST draw:object-ole draw:class-id CDATA #IMPLIED>-<!ATTLIST draw:object-ole %draw-style-name;>-<!ATTLIST draw:object-ole draw:name %string; #IMPLIED>-<!ATTLIST draw:object-ole xlink:href %uriReference; #IMPLIED>-<!ATTLIST draw:object-ole xlink:type (simple) #IMPLIED>-<!ATTLIST draw:object-ole xlink:show (embed) #IMPLIED>-<!ATTLIST draw:object-ole xlink:actuate (onLoad) #IMPLIED>-<!ATTLIST draw:object-ole %text-anchor;>-<!ATTLIST draw:object-ole %draw-position;>-<!ATTLIST draw:object-ole %draw-end-position; >-<!ATTLIST draw:object-ole %table-background; >-<!ATTLIST draw:object-ole svg:width %lengthOrPercentage; #IMPLIED>-<!ATTLIST draw:object-ole svg:height %lengthOrPercentage; #IMPLIED>-<!ATTLIST draw:object-ole %presentation-class; >-<!ATTLIST draw:object-ole %zindex;>-<!ATTLIST draw:object-ole draw:id %draw-shape-id;>-<!ATTLIST draw:object-ole draw:layer %layerName; #IMPLIED>-<!ATTLIST draw:object-ole style:rel-width %percentage; #IMPLIED>-<!ATTLIST draw:object-ole style:rel-height %percentage; #IMPLIED>--<!ELEMENT svg:desc (#PCDATA)>--<!ELEMENT draw:contour-polygon EMPTY>-<!ATTLIST draw:contour-polygon svg:width %coordinate; #REQUIRED>-<!ATTLIST draw:contour-polygon svg:height %coordinate; #REQUIRED>-<!ATTLIST draw:contour-polygon %draw-viewbox;>-<!ATTLIST draw:contour-polygon draw:points %points; #REQUIRED>-<!ATTLIST draw:contour-polygon draw:recreate-on-edit %boolean; #IMPLIED>--<!ELEMENT draw:contour-path EMPTY>-<!ATTLIST draw:contour-path svg:width %coordinate; #REQUIRED>-<!ATTLIST draw:contour-path svg:height %coordinate; #REQUIRED>-<!ATTLIST draw:contour-path %draw-viewbox;>-<!ATTLIST draw:contour-path svg:d %pathData; #REQUIRED>-<!ATTLIST draw:contour-path draw:recreate-on-edit %boolean; #IMPLIED>--<!-- hyperlink -->-<!ELEMENT draw:a (draw:image|draw:text-box)>-<!ATTLIST draw:a xlink:href %uriReference; #REQUIRED>-<!ATTLIST draw:a xlink:type (simple) #FIXED "simple">-<!ATTLIST draw:a xlink:show (new|replace) #IMPLIED>-<!ATTLIST draw:a xlink:actuate (onRequest) "onRequest">-<!ATTLIST draw:a office:name %string; #IMPLIED>-<!ATTLIST draw:a office:target-frame-name %string; #IMPLIED>-<!ATTLIST draw:a office:server-map %boolean; "false">--<!-- 3d properties -->-<!ATTLIST style:properties dr3d:horizontal-segments %nonNegativeInteger; #IMPLIED>-<!ATTLIST style:properties dr3d:vertical-segments %nonNegativeInteger; #IMPLIED>-<!ATTLIST style:properties dr3d:edge-rounding %percentage; #IMPLIED>-<!ATTLIST style:properties dr3d:edge-rounding-mode (correct|attractive) #IMPLIED>-<!ATTLIST style:properties dr3d:back-scale %percentage; #IMPLIED>-<!ATTLIST style:properties dr3d:end-angle %nonNegativeInteger; #IMPLIED>-<!ATTLIST style:properties dr3d:depth %length; #IMPLIED>-<!ATTLIST style:properties dr3d:backface-culling (enabled|disabled) #IMPLIED>-<!ATTLIST style:properties dr3d:lighting-mode (standard|double-sided) #IMPLIED>-<!ATTLIST style:properties dr3d:normals-kind (object|flat|sphere) #IMPLIED>-<!ATTLIST style:properties dr3d:normals-direction (normal|inverse) #IMPLIED>-<!ATTLIST style:properties dr3d:texture-generation-mode-x (object|parallel|sphere) #IMPLIED>-<!ATTLIST style:properties dr3d:texture-generation-mode-y (object|parallel|sphere) #IMPLIED>-<!ATTLIST style:properties dr3d:texture-kind (luminance|intesity|color) #IMPLIED>-<!ATTLIST style:properties dr3d:texture-filter (enabled|disabled) #IMPLIED>-<!ATTLIST style:properties dr3d:texture-mode (replace|modulate|blend) #IMPLIED>-<!ATTLIST style:properties dr3d:ambient-color %color; #IMPLIED>-<!ATTLIST style:properties dr3d:emissive-color %color; #IMPLIED>-<!ATTLIST style:properties dr3d:specular-color %color; #IMPLIED>-<!ATTLIST style:properties dr3d:diffuse-color %color; #IMPLIED>-<!ATTLIST style:properties dr3d:shininess %percentage; #IMPLIED>-<!ATTLIST style:properties dr3d:shadow (visible|hidden) #IMPLIED>-<!ATTLIST style:properties dr3d:close-front %boolean; #IMPLIED>-<!ATTLIST style:properties dr3d:close-back %boolean; #IMPLIED>--<!ELEMENT dr3d:light EMPTY>-<!ATTLIST dr3d:light dr3d:diffuse-color %color; #IMPLIED>-<!ATTLIST dr3d:light dr3d:direction %vector3D; #REQUIRED>-<!ATTLIST dr3d:light dr3d:enabled %boolean; #IMPLIED>-<!ATTLIST dr3d:light dr3d:specular %boolean; #IMPLIED>--<!ENTITY % shapes3d "(dr3d:scene|dr3d:extrude|dr3d:sphere|dr3d:rotate|dr3d:cube)">--<!ELEMENT dr3d:cube EMPTY>-<!ATTLIST dr3d:cube dr3d:transform CDATA #IMPLIED>-<!ATTLIST dr3d:cube dr3d:min-edge %vector3D; #IMPLIED>-<!ATTLIST dr3d:cube dr3d:max-edge %vector3D; #IMPLIED>-<!ATTLIST dr3d:cube %zindex;>-<!ATTLIST dr3d:cube draw:id %draw-shape-id;>-<!ATTLIST dr3d:cube %draw-end-position; >-<!ATTLIST dr3d:cube %table-background; >-<!ATTLIST dr3d:cube %draw-style-name; >-<!ATTLIST dr3d:cube draw:layer %layerName; #IMPLIED>--<!ELEMENT dr3d:sphere EMPTY>-<!ATTLIST dr3d:sphere dr3d:transform CDATA #IMPLIED>-<!ATTLIST dr3d:sphere dr3d:center %vector3D; #IMPLIED>-<!ATTLIST dr3d:sphere dr3d:size %vector3D; #IMPLIED>-<!ATTLIST dr3d:sphere %zindex;>-<!ATTLIST dr3d:sphere draw:id %draw-shape-id;>-<!ATTLIST dr3d:sphere %draw-end-position; >-<!ATTLIST dr3d:sphere %table-background; >-<!ATTLIST dr3d:sphere %draw-style-name; >-<!ATTLIST dr3d:sphere draw:layer %layerName; #IMPLIED>--<!ELEMENT dr3d:extrude EMPTY>-<!ATTLIST dr3d:extrude dr3d:transform CDATA #IMPLIED>-<!ATTLIST dr3d:extrude %draw-viewbox;>-<!ATTLIST dr3d:extrude svg:d %pathData; #REQUIRED >-<!ATTLIST dr3d:extrude %zindex;>-<!ATTLIST dr3d:extrude draw:id %draw-shape-id;>-<!ATTLIST dr3d:extrude %draw-end-position; >-<!ATTLIST dr3d:extrude %table-background; >-<!ATTLIST dr3d:extrude %draw-style-name; >-<!ATTLIST dr3d:extrude draw:layer %layerName; #IMPLIED>--<!ELEMENT dr3d:rotate EMPTY>-<!ATTLIST dr3d:rotate dr3d:transform CDATA #IMPLIED>-<!ATTLIST dr3d:rotate %draw-viewbox;>-<!ATTLIST dr3d:rotate svg:d %pathData; #REQUIRED >-<!ATTLIST dr3d:rotate %zindex;>-<!ATTLIST dr3d:rotate draw:id %draw-shape-id;>-<!ATTLIST dr3d:rotate %draw-end-position; >-<!ATTLIST dr3d:rotate %table-background; >-<!ATTLIST dr3d:rotate %draw-style-name; >-<!ATTLIST dr3d:rotate draw:layer %layerName; #IMPLIED>--<!ELEMENT dr3d:scene (dr3d:light*,(%shapes3d;)*)>-<!ATTLIST dr3d:scene %draw-style-name; >-<!ATTLIST dr3d:scene svg:x %coordinate; #IMPLIED>-<!ATTLIST dr3d:scene svg:y %coordinate; #IMPLIED>-<!ATTLIST dr3d:scene svg:width %length; #IMPLIED>-<!ATTLIST dr3d:scene svg:height %length; #IMPLIED>-<!ATTLIST dr3d:scene dr3d:vrp %vector3D; #IMPLIED>-<!ATTLIST dr3d:scene dr3d:vpn %vector3D; #IMPLIED>-<!ATTLIST dr3d:scene dr3d:vup %vector3D; #IMPLIED>-<!ATTLIST dr3d:scene dr3d:projection (parallel|perspective) #IMPLIED>-<!ATTLIST dr3d:scene dr3d:transform CDATA #IMPLIED>-<!ATTLIST dr3d:scene dr3d:distance %length; #IMPLIED>-<!ATTLIST dr3d:scene dr3d:focal-length %length; #IMPLIED>-<!ATTLIST dr3d:scene dr3d:shadow-slant %nonNegativeInteger; #IMPLIED>-<!ATTLIST dr3d:scene dr3d:shade-mode (flat|phong|gouraud|draft) #IMPLIED>-<!ATTLIST dr3d:scene dr3d:ambient-color %color; #IMPLIED>-<!ATTLIST dr3d:scene dr3d:lighting-mode %boolean; #IMPLIED>-<!ATTLIST dr3d:scene %zindex;>-<!ATTLIST dr3d:scene draw:id %draw-shape-id;>-<!ATTLIST dr3d:scene %draw-end-position; >-<!ATTLIST dr3d:scene %table-background; >--<!-- layer -->--<!ELEMENT draw:layer-set (draw:layer*)>--<!ELEMENT draw:layer EMPTY>-<!ATTLIST draw:layer draw:name %layerName; #REQUIRED>--<!-- events -->-<!ELEMENT presentation:event (presentation:sound)?>-<!ATTLIST presentation:event %event-name;>-<!ATTLIST presentation:event presentation:action (none|previous-page|next-page|first-page|last-page|hide|stop|execute|show|verb|fade-out|sound) #REQUIRED>-<!ATTLIST presentation:event presentation:effect %presentationEffects; "none">-<!ATTLIST presentation:event presentation:direction %presentationEffectDirections; "none">-<!ATTLIST presentation:event presentation:speed %presentationSpeeds; "medium">-<!ATTLIST presentation:event presentation:start-scale %percentage; "100%">-<!ATTLIST presentation:event xlink:href %uriReference; #IMPLIED>-<!ATTLIST presentation:event xlink:type (simple) #IMPLIED>-<!ATTLIST presentation:event xlink:show (embed) #IMPLIED>-<!ATTLIST presentation:event xlink:actuate (onRequest) #IMPLIED>-<!ATTLIST presentation:event presentation:verb %nonNegativeInteger; #IMPLIED>--<!-- applets -->-<!ELEMENT draw:applet (draw:thumbnail?, draw:param*, svg:desc?)>-<!ATTLIST draw:applet xlink:href %uriReference; #IMPLIED>-<!ATTLIST draw:applet xlink:type (simple) #IMPLIED>-<!ATTLIST draw:applet xlink:show (embed) #IMPLIED>-<!ATTLIST draw:applet xlink:actuate (onLoad) #IMPLIED>-<!ATTLIST draw:applet draw:code CDATA #REQUIRED>-<!ATTLIST draw:applet draw:object CDATA #IMPLIED>-<!ATTLIST draw:applet draw:archive CDATA #IMPLIED>-<!ATTLIST draw:applet draw:may-script %boolean; "false">-<!ATTLIST draw:applet draw:name CDATA #IMPLIED>-<!ATTLIST draw:applet %draw-style-name;>-<!ATTLIST draw:applet svg:width %lengthOrPercentage; #IMPLIED>-<!ATTLIST draw:applet svg:height %lengthOrPercentage; #IMPLIED>-<!ATTLIST draw:applet %zindex;>-<!ATTLIST draw:applet draw:layer %layerName; #IMPLIED>-<!ATTLIST draw:applet %draw-position;>-<!ATTLIST draw:applet %draw-end-position; >--<!-- plugins -->-<!ELEMENT draw:plugin (draw:thumbnail?, draw:param*, svg:desc?)>-<!ATTLIST draw:plugin xlink:href %uriReference; #IMPLIED>-<!ATTLIST draw:plugin xlink:type (simple) #IMPLIED>-<!ATTLIST draw:plugin xlink:show (embed) #IMPLIED>-<!ATTLIST draw:plugin xlink:actuate (onLoad) #IMPLIED>-<!ATTLIST draw:plugin draw:mime-type CDATA #IMPLIED>-<!ATTLIST draw:plugin draw:name CDATA #IMPLIED>-<!ATTLIST draw:plugin %draw-style-name;>-<!ATTLIST draw:plugin svg:width %lengthOrPercentage; #IMPLIED>-<!ATTLIST draw:plugin svg:height %lengthOrPercentage; #IMPLIED>-<!ATTLIST draw:plugin %zindex;>-<!ATTLIST draw:plugin draw:layer %layerName; #IMPLIED>-<!ATTLIST draw:plugin %draw-position;>-<!ATTLIST draw:plugin %draw-end-position; >--<!-- Paramaters -->-<!ELEMENT draw:param EMPTY>-<!ATTLIST draw:param draw:name CDATA #IMPLIED>-<!ATTLIST draw:param draw:value CDATA #IMPLIED>--<!-- Floating Frames -->-<!ELEMENT draw:floating-frame (draw:thumbnail?, svg:desc?)>-<!ATTLIST draw:floating-frame xlink:href %uriReference; #IMPLIED>-<!ATTLIST draw:floating-frame xlink:type (simple) #IMPLIED>-<!ATTLIST draw:floating-frame xlink:show (embed) #IMPLIED>-<!ATTLIST draw:floating-frame xlink:actuate (onLoad) #IMPLIED>-<!ATTLIST draw:floating-frame draw:name CDATA #IMPLIED>-<!ATTLIST draw:floating-frame draw:frame-name CDATA #IMPLIED>-<!ATTLIST draw:floating-frame %draw-style-name;>-<!ATTLIST draw:floating-frame svg:width %lengthOrPercentage; #IMPLIED>-<!ATTLIST draw:floating-frame svg:height %lengthOrPercentage; #IMPLIED>-<!ATTLIST draw:floating-frame %zindex;>-<!ATTLIST draw:floating-frame draw:layer %layerName; #IMPLIED>-<!ATTLIST draw:floating-frame %draw-position;>-<!ATTLIST draw:floating-frame %draw-end-position; >--<!-- Image Maps -->-<!ELEMENT draw:image-map-	(draw:area-rectangle|draw:area-circle|draw:area-polygon)*>--<!ELEMENT draw:area-rectangle (svg:desc?,office:events?)>-<!ATTLIST draw:area-rectangle xlink:href %uriReference; #IMPLIED>-<!ATTLIST draw:area-rectangle xlink:type (simple) #IMPLIED>-<!ATTLIST draw:area-rectangle office:target-frame-name CDATA #IMPLIED>-<!ATTLIST draw:area-rectangle xlink:show (new|replace) #IMPLIED>-<!ATTLIST draw:area-rectangle office:name CDATA #IMPLIED>-<!ATTLIST draw:area-rectangle draw:nohref (nohref) #IMPLIED>-<!ATTLIST draw:area-rectangle svg:x %coordinate; #REQUIRED>-<!ATTLIST draw:area-rectangle svg:y %coordinate; #REQUIRED>-<!ATTLIST draw:area-rectangle svg:width %coordinate; #REQUIRED>-<!ATTLIST draw:area-rectangle svg:height %coordinate; #REQUIRED>--<!ELEMENT draw:area-circle (svg:desc?,office:events?)>-<!ATTLIST draw:area-circle xlink:href %uriReference; #IMPLIED>-<!ATTLIST draw:area-circle xlink:type (simple) #IMPLIED>-<!ATTLIST draw:area-circle office:target-frame-name CDATA #IMPLIED>-<!ATTLIST draw:area-circle xlink:show (new|replace) #IMPLIED>-<!ATTLIST draw:area-circle office:name CDATA #IMPLIED>-<!ATTLIST draw:area-circle draw:nohref (nohref) #IMPLIED>-<!ATTLIST draw:area-circle svg:cx %coordinate; #REQUIRED>-<!ATTLIST draw:area-circle svg:cy %coordinate; #REQUIRED>-<!ATTLIST draw:area-circle svg:r %coordinate; #REQUIRED>--<!ELEMENT draw:area-polygon (svg:desc?,office:events?)>-<!ATTLIST draw:area-polygon xlink:href %uriReference; #IMPLIED>-<!ATTLIST draw:area-polygon xlink:type (simple) #IMPLIED>-<!ATTLIST draw:area-polygon office:target-frame-name CDATA #IMPLIED>-<!ATTLIST draw:area-polygon xlink:show (new|replace) #IMPLIED>-<!ATTLIST draw:area-polygon office:name CDATA #IMPLIED>-<!ATTLIST draw:area-polygon draw:nohref (nohref) #IMPLIED>-<!ATTLIST draw:area-polygon svg:x %coordinate; #REQUIRED>-<!ATTLIST draw:area-polygon svg:y %coordinate; #REQUIRED>-<!ATTLIST draw:area-polygon svg:width %coordinate; #REQUIRED>-<!ATTLIST draw:area-polygon svg:height %coordinate; #REQUIRED>-<!ATTLIST draw:area-polygon svg:points %points; #REQUIRED>-<!ATTLIST draw:area-polygon svg:viewBox CDATA #REQUIRED>
− examples/OpenOffice.org/dtypes.mod
@@ -1,171 +0,0 @@-<!---	$Id: dtypes.mod,v 1.1 2003/05/13 13:07:51 malcolm Exp $--   The Contents of this file are made available subject to the terms of-   either of the following licenses--          - GNU Lesser General Public License Version 2.1-          - Sun Industry Standards Source License Version 1.1--   Sun Microsystems Inc., October, 2000--   GNU Lesser General Public License Version 2.1-   =============================================-   Copyright 2000 by Sun Microsystems, Inc.-   901 San Antonio Road, Palo Alto, CA 94303, USA--   This library is free software; you can redistribute it and/or-   modify it under the terms of the GNU Lesser General Public-   License version 2.1, as published by the Free Software Foundation.--   This library is distributed in the hope that it will be useful,-   but WITHOUT ANY WARRANTY; without even the implied warranty of-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU-   Lesser General Public License for more details.--   You should have received a copy of the GNU Lesser General Public-   License along with this library; if not, write to the Free Software-   Foundation, Inc., 59 Temple Place, Suite 330, Boston,-   MA  02111-1307  USA---   Sun Industry Standards Source License Version 1.1-   =================================================-   The contents of this file are subject to the Sun Industry Standards-   Source License Version 1.1 (the "License"); You may not use this file-   except in compliance with the License. You may obtain a copy of the-   License at http://www.openoffice.org/license.html.--   Software provided under this License is provided on an "AS IS" basis,-   WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING,-   WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,-   MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.-   See the License for the specific provisions governing your rights and-   obligations concerning the Software.--   The Initial Developer of the Original Code is: Sun Microsystems, Inc.--   Copyright: 2000 by Sun Microsystems, Inc.--   All Rights Reserved.--   Contributor(s): _______________________________________---->--<!-- datatypes corresponding to XML Schema Part 2 W3C Working draft of	-->-<!-- 07 April 2000														-->--<!-- string -->-<!ENTITY % string				"CDATA">-<!ENTITY % cString				"#PCDATA">--<!-- boolean (values are "true" and "false" -->-<!ENTITY % boolean				"CDATA">--<!-- integer ( ..., -2, -1, 0, 1, 2, ...) -->-<!ENTITY % integer				"CDATA">--<!-- non negative integer ( 0, 1, 2, ...) -->-<!ENTITY % nonNegativeInteger	"CDATA">--<!-- positive integer ( 1, 2, ...) -->-<!ENTITY % positiveInteger		"CDATA">-<!ENTITY % cPositiveInteger		"#PCDATA">--<!ENTITY % positiveNumberOrDefault "CDATA">--<!-- time duration as specified by ISO8601, section 5.5.3.2 -->-<!ENTITY % timeDuration			"CDATA">-<!ENTITY % cTimeDuration		"#PCDATA">--<!-- time instance as specified by ISO8601, section 5.4 -->-<!ENTITY % timeInstance			"CDATA">-<!ENTITY % cTimeInstance		"#PCDATA">--<!-- date instance as specified by ISO8601, section 5.2.1.1, extended format-->-<!ENTITY % date					"CDATA">-<!ENTITY % cDate				"#PCDATA">--<!-- date duration, like timDuration but truncated to full dates -->-<!ENTITY % dateDuration			"CDATA">-<!ENTITY % cDateDuration		"#PCDATA">--<!-- URI reference -->-<!ENTITY % uriReference			"CDATA">--<!-- language code as specified by RFC1766 -->-<!ENTITY % language				"CDATA">-<!ENTITY % cLanguage			"#PCDATA">--<!-- float -->-<!ENTITY % float "CDATA">--<!-- Some other common used data types -->--<!-- a single UNICODE character -->-<!ENTITY % character			"CDATA">--<!-- a style name -->-<!ENTITY % styleName			"CDATA">--<!-- a target frame mame -->-<!ENTITY % targetFrameName			"CDATA">--<!-- a language without a country as specified by ISO639 -->-<!ENTITY % languageOnly			"CDATA">--<!-- a country as specified by ISO3166 -->-<!ENTITY % country				"CDATA">--<!-- a color value having the format #rrggbb -->-<!ENTITY % color				"CDATA">-<!-- a color value having the format #rrggbb or "transparent" -->-<!ENTITY % transparentOrColor			"CDATA">--<!-- a percentage -->-<!ENTITY % percentage 			"CDATA">--<!-- a length (i.e. 1cm or .6inch) -->-<!ENTITY % length				"CDATA">-<!ENTITY % positiveLength		"CDATA">-<!ENTITY % nonNegativeLength	"CDATA">-<!ENTITY % lengthOrNoLimit "CDATA">--<!-- a length or a percentage -->-<!ENTITY % lengthOrPercentage	"CDATA">-<!ENTITY % positiveLengthOrPercentage	"CDATA">--<!-- a pixel length (i.e. 2px) -->-<!ENTITY % nonNegativePixelLength	"CDATA">--<!-- a float or a percentage -->-<!ENTITY % floatOrPercentage	"CDATA">--<!-- a text encoding -->-<!ENTITY % textEncoding	"CDATA">--<!-- cell address and cell range address -->-<!ENTITY % cell-address "CDATA">-<!ENTITY % cell-range-address "CDATA">-<!ENTITY % cell-range-address-list "CDATA">--<!-- value types -->-<!ENTITY % valueType "(float|time|date|percentage|currency|boolean|string)">--<!-- an svg coordinate in different distance formats -->-<!ENTITY % coordinate "CDATA">--<!ENTITY % coordinateOrPercentage	"CDATA">--<!ENTITY % shape "draw:rect|draw:line|draw:polyline|draw:polygon|draw:path|-				   draw:circle|draw:ellipse|draw:g|draw:page-thumbnail|-				   draw:text-box|draw:image|draw:object|draw:object-ole|-				   draw:applet|draw:floating-frame|draw:plugin|-				   draw:measure|draw:caption|draw:connector|chart:chart|-				   dr3d:scene|draw:control" >-<!ENTITY % shapes "(%shape;)" >--<!ENTITY % anchorType "(page|frame|paragraph|char|as-char)">--<!ENTITY % control-id "form:id CDATA #REQUIRED">
− examples/OpenOffice.org/form.mod
@@ -1,340 +0,0 @@-<!---	$Id: form.mod,v 1.1 2003/05/13 13:07:51 malcolm Exp $--   The Contents of this file are made available subject to the terms of-   either of the following licenses--          - GNU Lesser General Public License Version 2.1-          - Sun Industry Standards Source License Version 1.1--   Sun Microsystems Inc., October, 2000--   GNU Lesser General Public License Version 2.1-   =============================================-   Copyright 2000 by Sun Microsystems, Inc.-   901 San Antonio Road, Palo Alto, CA 94303, USA--   This library is free software; you can redistribute it and/or-   modify it under the terms of the GNU Lesser General Public-   License version 2.1, as published by the Free Software Foundation.--   This library is distributed in the hope that it will be useful,-   but WITHOUT ANY WARRANTY; without even the implied warranty of-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU-   Lesser General Public License for more details.--   You should have received a copy of the GNU Lesser General Public-   License along with this library; if not, write to the Free Software-   Foundation, Inc., 59 Temple Place, Suite 330, Boston,-   MA  02111-1307  USA---   Sun Industry Standards Source License Version 1.1-   =================================================-   The contents of this file are subject to the Sun Industry Standards-   Source License Version 1.1 (the "License"); You may not use this file-   except in compliance with the License. You may obtain a copy of the-   License at http://www.openoffice.org/license.html.--   Software provided under this License is provided on an "AS IS" basis,-   WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING,-   WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,-   MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.-   See the License for the specific provisions governing your rights and-   obligations concerning the Software.--   The Initial Developer of the Original Code is: Sun Microsystems, Inc.--   Copyright: 2000 by Sun Microsystems, Inc.--   All Rights Reserved.--   Contributor(s): _______________________________________---->--<!ENTITY % controls	"form:text|form:textarea|form:fixed-text|form:file|-					 form:password|form:formatted-text|form:button|form:image|-					 form:checkbox|form:radio|form:listbox|form:combobox|form:frame|-					 form:hidden|form:image-frame|form:grid|form:generic-control">--<!ENTITY % name "form:name CDATA #IMPLIED">-<!ENTITY % service-name "form:service-name CDATA #IMPLIED">--<!ENTITY % navigation "(none|current|parent)">-<!ENTITY % cycles "(records|current|page)">-<!ENTITY % url "CDATA">---<!ENTITY % types "(submit|reset|push|url)">-<!ENTITY % button-type "form:button-type %types; 'push'">-<!ENTITY % current-selected "form:current-selected %boolean; 'false'">-<!ENTITY % current-value "form:current-value CDATA #IMPLIED">-<!ENTITY % value "form:value CDATA #IMPLIED">-<!ENTITY % disabled "form:disabled %boolean; 'false'">-<!ENTITY % dropdown "form:dropdown %boolean; 'false'">-<!ENTITY % for "form:for CDATA #IMPLIED">-<!ENTITY % image-data "form:image-data %url; #IMPLIED">-<!ENTITY % label "form:label CDATA #IMPLIED">-<!ENTITY % max-length "form:max-length CDATA #IMPLIED">-<!ENTITY % printable "form:printable %boolean; 'true'">-<!ENTITY % readonly "form:readonly %boolean; 'false'">-<!ENTITY % size "form:size CDATA #IMPLIED">-<!ENTITY % selected "form:selected %boolean; 'false'">-<!ENTITY % size "form:size CDATA #IMPLIED">-<!ENTITY % tab-index "form:tab-index CDATA #IMPLIED">-<!ENTITY % target-frame "office:target-frame CDATA '_blank'">-<!ENTITY % target-location "xlink:href %url; #IMPLIED">-<!ENTITY % tab-stop "form:tab-stop %boolean; 'true'">-<!ENTITY % title "form:title CDATA #IMPLIED">-<!ENTITY % default-value "form:default-value CDATA #IMPLIED">-<!ENTITY % bound-column "form:bound-column CDATA #IMPLIED">-<!ENTITY % convert-empty "form:convert-empty-to-null  %boolean; 'false'">-<!ENTITY % data-field "form:data-field CDATA #IMPLIED">-<!ENTITY % list-source "form:list-source CDATA #IMPLIED">-<!ENTITY % list-source-types "(table|query|sql|sql-pass-through|value-list|table-fields)">-<!ENTITY % list-source-type "form:list-source-type %list-source-types; #IMPLIED">-<!ENTITY % column-style-name "form:column-style-name %styleName; #IMPLIED">---<!ELEMENT form:control (%controls;)+>-<!ATTLIST form:control %name;-                       %service-name;-                       %control-id;>--<!ELEMENT form:form (form:properties?, office:events?, (form:control|form:form)*)>-<!ATTLIST form:form %name; %service-name;>-<!ATTLIST form:form xlink:href %url; #IMPLIED>-<!ATTLIST form:form form:enctype CDATA "application/x-www-form-urlencoded">-<!ATTLIST form:form form:method CDATA "get">-<!ATTLIST form:form office:target-frame CDATA "_blank">-<!ATTLIST form:form form:allow-deletes %boolean; "true">-<!ATTLIST form:form form:allow-inserts %boolean; "true">-<!ATTLIST form:form form:allow-updates %boolean; "true">-<!ATTLIST form:form form:apply-filter %boolean; "false">-<!ATTLIST form:form form:command CDATA #IMPLIED>-<!ATTLIST form:form form:command-type (table|query|command) "command">-<!ATTLIST form:form form:datasource CDATA #IMPLIED>-<!ATTLIST form:form form:detail-fields CDATA #IMPLIED>-<!ATTLIST form:form form:escape-processing %boolean; "true">-<!ATTLIST form:form form:filter CDATA #IMPLIED>-<!ATTLIST form:form form:ignore-result %boolean; "false">-<!ATTLIST form:form form:master-fields CDATA #IMPLIED>-<!ATTLIST form:form form:navigation-mode %navigation; #IMPLIED>-<!ATTLIST form:form form:order CDATA #IMPLIED>-<!ATTLIST form:form form:tab-cycle %cycles; #IMPLIED>--<!ELEMENT office:forms (form:form*)>-<!ATTLIST office:forms form:automatic-focus %boolean; "false">-<!ATTLIST office:forms form:apply-design-mode %boolean; "true">--<!ELEMENT form:text (form:properties?, office:events?)>-<!ATTLIST form:text %current-value;-                    %disabled;-                    %max-length;-                    %printable;-                    %readonly;-                    %tab-index;-                    %tab-stop;-                    %title;-                    %value;-                    %convert-empty;-                    %data-field;>--<!ELEMENT form:textarea (form:properties?, office:events?)>-<!ATTLIST form:textarea %current-value;-                        %disabled;-                        %max-length;-                        %printable;-                        %readonly;-                        %tab-index;-                        %tab-stop;-                        %title;-                        %value;-                        %convert-empty;-                        %data-field;>--<!ELEMENT form:password (form:properties?, office:events?)>-<!ATTLIST form:password %disabled;-                        %max-length;-                        %printable;-                        %tab-index;-                        %tab-stop;-                        %title;-                        %value;-						%convert-empty;>--<!ATTLIST form:password form:echo-char CDATA "*">--<!ELEMENT form:file (form:properties?, office:events?)>-<!ATTLIST form:file %current-value;-                    %disabled;-                    %max-length;-                    %printable;-                    %readonly;-                    %tab-index;-                    %tab-stop;-                    %title;-                    %value;>--<!ELEMENT form:formatted-text (form:properties?, office:events?)>-<!ATTLIST form:formatted-text %current-value;-                              %disabled;-                              %max-length;-                              %printable;-                              %readonly;-                              %tab-index;-                              %tab-stop;-                              %title;-                              %value;-                              %convert-empty;-                              %data-field;>-<!ATTLIST form:formatted-text form:max-value CDATA #IMPLIED>-<!ATTLIST form:formatted-text form:min-value CDATA #IMPLIED>-<!ATTLIST form:formatted-text form:validation %boolean; "false">--<!ELEMENT form:fixed-text (form:properties?, office:events?)>-<!ATTLIST form:fixed-text %for;-                          %disabled;-                          %label;-                          %printable;-                          %title;>-<!ATTLIST form:fixed-text form:multi-line %boolean; "false">--<!ELEMENT form:combobox (form:properties?, office:events?, form:item*)>-<!ATTLIST form:combobox %current-value;-                        %disabled;-                        %dropdown;-                        %max-length;-                        %printable;-                        %readonly;-                        %size;-                        %tab-index;-                        %tab-stop;-                        %title;-                        %value;-                        %convert-empty;-                        %data-field;-                        %list-source;-                        %list-source-type;>-<!ATTLIST form:combobox form:auto-complete %boolean; #IMPLIED>--<!ELEMENT form:item (#PCDATA)>-<!ATTLIST form:item %label;>--<!ELEMENT form:listbox (form:properties?, office:events?, form:option*)>-<!ATTLIST form:listbox %disabled;-                       %dropdown;-                       %printable;-                       %size;-                       %tab-index;-                       %tab-stop;-                       %title;-                       %bound-column;-                       %data-field;-                       %list-source;-                       %list-source-type;>-<!ATTLIST form:listbox form:multiple %boolean; "false">--<!ELEMENT form:option (#PCDATA)>-<!ATTLIST form:option %current-selected;-                      %selected;-                      %label;-                      %value;>--<!ELEMENT form:button (form:properties?, office:events?)>-<!ATTLIST form:button %button-type;-                      %disabled;-                      %label;-                      %image-data;-                      %printable;-                      %tab-index;-                      %tab-stop;-                      %target-frame;-                      %target-location;-                      %title;-                      %value;>-<!ATTLIST form:button form:default-button %boolean; "false">--<!ELEMENT form:image (form:properties?, office:events?)>-<!ATTLIST form:image %button-type;-                     %disabled;-                     %image-data;-                     %printable;-                     %tab-index;-                     %tab-stop;-                     %target-frame;-                     %target-location;-                     %title;-                     %value;>--<!ELEMENT form:checkbox (form:properties?, office:events?)>-<!ATTLIST form:checkbox %disabled;-                        %label;-                        %printable;-                        %tab-index;-                        %tab-stop;-                        %title;-                        %value;-                        %data-field;>-<!ENTITY % states "(unchecked|checked|unknown)">-<!ATTLIST form:checkbox form:current-state %states; #IMPLIED>-<!ATTLIST form:checkbox form:is-tristate %boolean; "false">-<!ATTLIST form:checkbox form:state %states; "unchecked">--<!ELEMENT form:radio (form:properties?, office:events?)>-<!ATTLIST form:radio %current-selected;-                     %disabled;-                     %label;-                     %printable;-                     %selected;-                     %tab-index;-                     %tab-stop;-                     %title;-                     %value;-                     %data-field;>--<!ELEMENT form:frame (form:properties?, office:events?)>-<!ATTLIST form:frame %disabled;-                     %for;-                     %label;-                     %printable;-                     %title;>--<!ELEMENT form:image-frame (form:properties?, office:events?)>-<!ATTLIST form:image-frame %disabled;-                           %image-data;-                           %printable;-                           %readonly;-                           %title;-                           %data-field;>--<!ELEMENT form:hidden (form:properties?, office:events?)>-<!ATTLIST form:hidden %name;-                      %service-name;-                      %value;>--<!ELEMENT form:grid (form:properties?, office:events?, form:column*)>-<!ATTLIST form:grid %disabled;-                    %printable;-                    %tab-index;-                    %tab-stop;-                    %title;>--<!ENTITY % column-type "form:text| form:textarea| form:formatted-text|form:checkbox| form:listbox| form:combobox">-<!ELEMENT form:column (%column-type;)+>-<!ATTLIST form:column %name;-                      %service-name;-                      %label;-					  %column-style-name;>--<!ELEMENT form:generic-control (form:properties?, office:events?)>---<!ELEMENT form:properties (form:property+)>-<!ELEMENT form:property (form:property-value*)>-<!ATTLIST form:property form:property-is-list %boolean; #IMPLIED>-<!ATTLIST form:property form:property-name CDATA #REQUIRED>-<!ATTLIST form:property form:property-type (boolean|short|int|long|double|string)  #REQUIRED>-<!ELEMENT form:property-value (#PCDATA)>-<!ATTLIST form:property-value form:property-is-void %boolean; #IMPLIED>
− examples/OpenOffice.org/meta.mod
@@ -1,118 +0,0 @@-<!---	$Id: meta.mod,v 1.1 2003/05/13 13:07:51 malcolm Exp $--   The Contents of this file are made available subject to the terms of-   either of the following licenses--          - GNU Lesser General Public License Version 2.1-          - Sun Industry Standards Source License Version 1.1--   Sun Microsystems Inc., October, 2000--   GNU Lesser General Public License Version 2.1-   =============================================-   Copyright 2000 by Sun Microsystems, Inc.-   901 San Antonio Road, Palo Alto, CA 94303, USA--   This library is free software; you can redistribute it and/or-   modify it under the terms of the GNU Lesser General Public-   License version 2.1, as published by the Free Software Foundation.--   This library is distributed in the hope that it will be useful,-   but WITHOUT ANY WARRANTY; without even the implied warranty of-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU-   Lesser General Public License for more details.--   You should have received a copy of the GNU Lesser General Public-   License along with this library; if not, write to the Free Software-   Foundation, Inc., 59 Temple Place, Suite 330, Boston,-   MA  02111-1307  USA---   Sun Industry Standards Source License Version 1.1-   =================================================-   The contents of this file are subject to the Sun Industry Standards-   Source License Version 1.1 (the "License"); You may not use this file-   except in compliance with the License. You may obtain a copy of the-   License at http://www.openoffice.org/license.html.--   Software provided under this License is provided on an "AS IS" basis,-   WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING,-   WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,-   MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.-   See the License for the specific provisions governing your rights and-   obligations concerning the Software.--   The Initial Developer of the Original Code is: Sun Microsystems, Inc.--   Copyright: 2000 by Sun Microsystems, Inc.--   All Rights Reserved.--   Contributor(s): _______________________________________---->---<!ELEMENT meta:generator (%cString;)>--<!ELEMENT dc:title (%cString;)>--<!ELEMENT dc:description (%cString;)>--<!ELEMENT dc:subject (%cString;)>--<!ELEMENT meta:keywords (meta:keyword)*>-<!ELEMENT meta:keyword (%cString;)>--<!ELEMENT meta:initial-creator (%cString;)>--<!ELEMENT dc:creator (%cString;)>--<!ELEMENT meta:printed-by (%cString;)>--<!ELEMENT meta:creation-date (%cTimeInstance;)>--<!ELEMENT dc:date (%cTimeInstance;)>--<!ELEMENT meta:print-date (%cTimeInstance;)>--<!ELEMENT meta:template EMPTY>-<!ATTLIST meta:template xlink:type (simple) #FIXED "simple">-<!ATTLIST meta:template xlink:actuate (onRequest) "onRequest">-<!ATTLIST meta:template xlink:href %uriReference; #REQUIRED>-<!ATTLIST meta:template xlink:title %string; #IMPLIED>-<!ATTLIST meta:template meta:date %timeInstance; #IMPLIED>--<!ELEMENT meta:auto-reload EMPTY>-<!ATTLIST meta:auto-reload xlink:type (simple) #IMPLIED>-<!ATTLIST meta:auto-reload xlink:show (replace) #IMPLIED>-<!ATTLIST meta:auto-reload xlink:actuate (onLoad) #IMPLIED>-<!ATTLIST meta:auto-reload xlink:href %uriReference; #IMPLIED>-<!ATTLIST meta:auto-reload meta:delay %timeDuration; "P0S">--<!ELEMENT meta:hyperlink-behaviour EMPTY>-<!ATTLIST meta:hyperlink-behaviour office:target-frame-name %targetFrameName; #IMPLIED>-<!ATTLIST meta:hyperlink-behaviour xlink:show (new|replace) #IMPLIED>--<!ELEMENT dc:language (%cLanguage;)>--<!ELEMENT meta:editing-cycles (%cPositiveInteger;)>--<!ELEMENT meta:editing-duration (%cTimeDuration;)>--<!ELEMENT meta:user-defined (%cString;)>-<!ATTLIST meta:user-defined meta:name %string; #REQUIRED>--<!ELEMENT meta:document-statistic EMPTY>-<!ATTLIST meta:document-statistic meta:page-count %positiveInteger; #IMPLIED-	meta:table-count %nonNegativeInteger; #IMPLIED-	meta:draw-count %nonNegativeInteger; #IMPLIED-	meta:image-count %nonNegativeInteger; #IMPLIED-	meta:ole-object-count %nonNegativeInteger; #IMPLIED-	meta:paragraph-count %nonNegativeInteger; #IMPLIED-	meta:word-count %nonNegativeInteger; #IMPLIED-	meta:character-count %nonNegativeInteger; #IMPLIED-	meta:row-count %nonNegativeInteger; #IMPLIED-	meta:cell-count %nonNegativeInteger; #IMPLIED-	meta:object-count %positiveInteger; #IMPLIED>
− examples/OpenOffice.org/nmspace.mod
@@ -1,80 +0,0 @@-<!---	$Id: nmspace.mod,v 1.1 2003/05/13 13:07:51 malcolm Exp $--   The Contents of this file are made available subject to the terms of-   either of the following licenses--          - GNU Lesser General Public License Version 2.1-          - Sun Industry Standards Source License Version 1.1--   Sun Microsystems Inc., October, 2000--   GNU Lesser General Public License Version 2.1-   =============================================-   Copyright 2000 by Sun Microsystems, Inc.-   901 San Antonio Road, Palo Alto, CA 94303, USA--   This library is free software; you can redistribute it and/or-   modify it under the terms of the GNU Lesser General Public-   License version 2.1, as published by the Free Software Foundation.--   This library is distributed in the hope that it will be useful,-   but WITHOUT ANY WARRANTY; without even the implied warranty of-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU-   Lesser General Public License for more details.--   You should have received a copy of the GNU Lesser General Public-   License along with this library; if not, write to the Free Software-   Foundation, Inc., 59 Temple Place, Suite 330, Boston,-   MA  02111-1307  USA---   Sun Industry Standards Source License Version 1.1-   =================================================-   The contents of this file are subject to the Sun Industry Standards-   Source License Version 1.1 (the "License"); You may not use this file-   except in compliance with the License. You may obtain a copy of the-   License at http://www.openoffice.org/license.html.--   Software provided under this License is provided on an "AS IS" basis,-   WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING,-   WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,-   MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.-   See the License for the specific provisions governing your rights and-   obligations concerning the Software.--   The Initial Developer of the Original Code is: Sun Microsystems, Inc.--   Copyright: 2000 by Sun Microsystems, Inc.--   All Rights Reserved.--   Contributor(s): _______________________________________---->--<!ENTITY nFO "http://www.w3.org/1999/XSL/Format">-<!ENTITY nXLink "http://www.w3.org/1999/xlink">-<!ENTITY nSVG "http://www.w3.org/2000/svg">-<!ENTITY nMath "http://www.w3.org/1998/Math/MathML">--<!-- StarOffice namespace names and prefixes -->--<!ENTITY nOpenOffice "http://openoffice.org/2000">-<!ENTITY nOpenOffice2001 "http://openoffice.org/2001">--<!ENTITY nOffice "&nOpenOffice;/office">-<!ENTITY nStyle "&nOpenOffice;/style">-<!ENTITY nText "&nOpenOffice;/text">-<!ENTITY nTable "&nOpenOffice;/table">-<!ENTITY nMeta "&nOpenOffice;/meta">-<!ENTITY nScript "&nOpenOffice;/script">-<!ENTITY nDraw "&nOpenOffice;/drawing">-<!ENTITY nChart "&nOpenOffice;/chart">-<!ENTITY nNumber "&nOpenOffice;/datastyle">-<!ENTITY nDr3D "&nOpenOffice;/dr3d">-<!ENTITY nForm "&nOpenOffice;/form">-<!ENTITY nConfig "&nOpenOffice2001;/config">--<!-- dublin core namespace name and prefic -->-<!ENTITY nDC "http://purl.org/dc/elements/1.1/">
− examples/OpenOffice.org/office.dtd
@@ -1,83 +0,0 @@-<?xml version="1.0" encoding="UTF-8"?>-<!---	$Id: office.dtd,v 1.1 2003/05/13 13:07:51 malcolm Exp $--   The Contents of this file are made available subject to the terms of-   either of the following licenses--          - GNU Lesser General Public License Version 2.1-          - Sun Industry Standards Source License Version 1.1--   Sun Microsystems Inc., October, 2000--   GNU Lesser General Public License Version 2.1-   =============================================-   Copyright 2000 by Sun Microsystems, Inc.-   901 San Antonio Road, Palo Alto, CA 94303, USA--   This library is free software; you can redistribute it and/or-   modify it under the terms of the GNU Lesser General Public-   License version 2.1, as published by the Free Software Foundation.--   This library is distributed in the hope that it will be useful,-   but WITHOUT ANY WARRANTY; without even the implied warranty of-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU-   Lesser General Public License for more details.--   You should have received a copy of the GNU Lesser General Public-   License along with this library; if not, write to the Free Software-   Foundation, Inc., 59 Temple Place, Suite 330, Boston,-   MA  02111-1307  USA---   Sun Industry Standards Source License Version 1.1-   =================================================-   The contents of this file are subject to the Sun Industry Standards-   Source License Version 1.1 (the "License"); You may not use this file-   except in compliance with the License. You may obtain a copy of the-   License at http://www.openoffice.org/license.html.--   Software provided under this License is provided on an "AS IS" basis,-   WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING,-   WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,-   MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.-   See the License for the specific provisions governing your rights and-   obligations concerning the Software.--   The Initial Developer of the Original Code is: Sun Microsystems, Inc.--   Copyright: 2000 by Sun Microsystems, Inc.--   All Rights Reserved.--   Contributor(s): _______________________________________---->-<!ENTITY % dtypes-mod SYSTEM "dtypes.mod">-%dtypes-mod;-<!ENTITY % nmspace-mod SYSTEM "nmspace.mod">-%nmspace-mod;-<!ENTITY % defs-mod SYSTEM "defs.mod">-%defs-mod;-<!ENTITY % office-mod SYSTEM "office.mod">-%office-mod;-<!ENTITY % style-mod SYSTEM "style.mod">-%style-mod;-<!ENTITY % meta-mod SYSTEM "meta.mod">-%meta-mod;-<!ENTITY % script-mod SYSTEM "script.mod">-%script-mod;-<!ENTITY % drawing-mod SYSTEM "drawing.mod">-%drawing-mod;-<!ENTITY % text-mod SYSTEM "text.mod">-%text-mod;-<!ENTITY % table-mod SYSTEM "table.mod">-%table-mod;-<!ENTITY % chart-mod SYSTEM "chart.mod">-%chart-mod;-<!ENTITY % datastyl-mod SYSTEM "datastyl.mod">-%datastyl-mod;-<!ENTITY % form-mod SYSTEM "form.mod">-%form-mod;-<!ENTITY % settings-mod SYSTEM "settings.mod">-%settings-mod;
− examples/OpenOffice.org/office.mod
@@ -1,270 +0,0 @@-<!---	$Id: office.mod,v 1.1 2003/05/13 13:07:51 malcolm Exp $--   The Contents of this file are made available subject to the terms of-   either of the following licenses--          - GNU Lesser General Public License Version 2.1-          - Sun Industry Standards Source License Version 1.1--   Sun Microsystems Inc., October, 2000--   GNU Lesser General Public License Version 2.1-   =============================================-   Copyright 2000 by Sun Microsystems, Inc.-   901 San Antonio Road, Palo Alto, CA 94303, USA--   This library is free software; you can redistribute it and/or-   modify it under the terms of the GNU Lesser General Public-   License version 2.1, as published by the Free Software Foundation.--   This library is distributed in the hope that it will be useful,-   but WITHOUT ANY WARRANTY; without even the implied warranty of-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU-   Lesser General Public License for more details.--   You should have received a copy of the GNU Lesser General Public-   License along with this library; if not, write to the Free Software-   Foundation, Inc., 59 Temple Place, Suite 330, Boston,-   MA  02111-1307  USA---   Sun Industry Standards Source License Version 1.1-   =================================================-   The contents of this file are subject to the Sun Industry Standards-   Source License Version 1.1 (the "License"); You may not use this file-   except in compliance with the License. You may obtain a copy of the-   License at http://www.openoffice.org/license.html.--   Software provided under this License is provided on an "AS IS" basis,-   WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING,-   WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,-   MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.-   See the License for the specific provisions governing your rights and-   obligations concerning the Software.--   The Initial Developer of the Original Code is: Sun Microsystems, Inc.--   Copyright: 2000 by Sun Microsystems, Inc.--   All Rights Reserved.--   Contributor(s): _______________________________________---->--<!ELEMENT office:document ( office:meta?,-							office:settings?,-							office:script?,-							office:font-decls?,-							office:styles?,-							office:automatic-styles?,-							office:master-styles?,-							office:body ) >--<!ATTLIST office:document xmlns:office	CDATA #FIXED "&nOffice;">-<!ATTLIST office:document xmlns:meta	CDATA #FIXED "&nMeta;">-<!ATTLIST office:document xmlns:script	CDATA #FIXED "&nScript;">-<!ATTLIST office:document xmlns:style	CDATA #FIXED "&nStyle;">-<!ATTLIST office:document xmlns:text	CDATA #FIXED "&nText;">-<!ATTLIST office:document xmlns:table	CDATA #FIXED "&nTable;">-<!ATTLIST office:document xmlns:draw	CDATA #FIXED "&nDraw;">-<!ATTLIST office:document xmlns:chart	CDATA #FIXED "&nChart;">-<!ATTLIST office:document xmlns:number	CDATA #FIXED "&nNumber;">-<!ATTLIST office:document xmlns:fo		CDATA #FIXED "&nFO;">-<!ATTLIST office:document xmlns:xlink	CDATA #FIXED "&nXLink;">-<!ATTLIST office:document xmlns:svg		CDATA #FIXED "&nSVG;">-<!ATTLIST office:document xmlns:dc		CDATA #FIXED "&nDC;">-<!ATTLIST office:document xmlns:dr3d	CDATA #FIXED "&nDr3D;">-<!ATTLIST office:document xmlns:math	CDATA #FIXED "&nMath;">-<!ATTLIST office:document xmlns:form	CDATA #FIXED "&nForm;">-<!ATTLIST office:document xmlns:config	CDATA #FIXED "&nConfig;">--<!ATTLIST office:document office:class-						  (text|text-global|-						   drawing|presentation|-						   spreadsheet|chart) #REQUIRED>--<!ATTLIST office:document office:version	%string; #IMPLIED>--<!-- document-styles -->-<!ELEMENT office:document-styles (-							office:font-decls?,-							office:styles?,-							office:automatic-styles?,-							office:master-styles? ) >--<!ATTLIST office:document-styles xmlns:office	CDATA #FIXED "&nOffice;">-<!ATTLIST office:document-styles xmlns:meta	CDATA #FIXED "&nMeta;">-<!ATTLIST office:document-styles xmlns:script	CDATA #FIXED "&nScript;">-<!ATTLIST office:document-styles xmlns:style	CDATA #FIXED "&nStyle;">-<!ATTLIST office:document-styles xmlns:text	CDATA #FIXED "&nText;">-<!ATTLIST office:document-styles xmlns:table	CDATA #FIXED "&nTable;">-<!ATTLIST office:document-styles xmlns:draw	CDATA #FIXED "&nDraw;">-<!ATTLIST office:document-styles xmlns:chart	CDATA #FIXED "&nChart;">-<!ATTLIST office:document-styles xmlns:number	CDATA #FIXED "&nNumber;">-<!ATTLIST office:document-styles xmlns:fo		CDATA #FIXED "&nFO;">-<!ATTLIST office:document-styles xmlns:xlink	CDATA #FIXED "&nXLink;">-<!ATTLIST office:document-styles xmlns:svg		CDATA #FIXED "&nSVG;">-<!ATTLIST office:document-styles xmlns:dc		CDATA #FIXED "&nDC;">-<!ATTLIST office:document-styles xmlns:dr3d		CDATA #FIXED "&nDr3D;">-<!ATTLIST office:document-styles xmlns:math		CDATA #FIXED "&nMath;">-<!ATTLIST office:document-styles xmlns:form		CDATA #FIXED "&nForm;">--<!ATTLIST office:document-styles office:version	%string; #IMPLIED>--<!-- document-content -->--<!ELEMENT office:document-content (-							office:script?,-							office:font-decls?,-							office:automatic-styles?,-							office:body ) >--<!ATTLIST office:document-content xmlns:office	CDATA #FIXED "&nOffice;">-<!ATTLIST office:document-content xmlns:meta	CDATA #FIXED "&nMeta;">-<!ATTLIST office:document-content xmlns:script	CDATA #FIXED "&nScript;">-<!ATTLIST office:document-content xmlns:style	CDATA #FIXED "&nStyle;">-<!ATTLIST office:document-content xmlns:text	CDATA #FIXED "&nText;">-<!ATTLIST office:document-content xmlns:table	CDATA #FIXED "&nTable;">-<!ATTLIST office:document-content xmlns:draw	CDATA #FIXED "&nDraw;">-<!ATTLIST office:document-content xmlns:chart	CDATA #FIXED "&nChart;">-<!ATTLIST office:document-content xmlns:number	CDATA #FIXED "&nNumber;">-<!ATTLIST office:document-content xmlns:fo		CDATA #FIXED "&nFO;">-<!ATTLIST office:document-content xmlns:xlink	CDATA #FIXED "&nXLink;">-<!ATTLIST office:document-content xmlns:svg		CDATA #FIXED "&nSVG;">-<!ATTLIST office:document-content xmlns:dc		CDATA #FIXED "&nDC;">-<!ATTLIST office:document-content xmlns:dr3d	CDATA #FIXED "&nDr3D;">-<!ATTLIST office:document-content xmlns:math	CDATA #FIXED "&nMath;">-<!ATTLIST office:document-content xmlns:form	CDATA #FIXED "&nForm;">--<!ATTLIST office:document-content office:class-						  (text|text-global|-						   drawing|presentation|-						   spreadsheet|chart) #REQUIRED>--<!ATTLIST office:document-content office:version	%string; #IMPLIED>--<!-- document-content -->--<!ELEMENT office:document-meta ( office:meta? ) >--<!ATTLIST office:document-meta xmlns:office	CDATA #FIXED "&nOffice;">-<!ATTLIST office:document-meta xmlns:meta	CDATA #FIXED "&nMeta;">-<!ATTLIST office:document-meta xmlns:script	CDATA #FIXED "&nScript;">-<!ATTLIST office:document-meta xmlns:style	CDATA #FIXED "&nStyle;">-<!ATTLIST office:document-meta xmlns:text	CDATA #FIXED "&nText;">-<!ATTLIST office:document-meta xmlns:table	CDATA #FIXED "&nTable;">-<!ATTLIST office:document-meta xmlns:draw	CDATA #FIXED "&nDraw;">-<!ATTLIST office:document-meta xmlns:chart	CDATA #FIXED "&nChart;">-<!ATTLIST office:document-meta xmlns:number	CDATA #FIXED "&nNumber;">-<!ATTLIST office:document-meta xmlns:fo		CDATA #FIXED "&nFO;">-<!ATTLIST office:document-meta xmlns:xlink	CDATA #FIXED "&nXLink;">-<!ATTLIST office:document-meta xmlns:svg		CDATA #FIXED "&nSVG;">-<!ATTLIST office:document-meta xmlns:dc		CDATA #FIXED "&nDC;">-<!ATTLIST office:document-meta xmlns:dr3d	CDATA #FIXED "&nDr3D;">-<!ATTLIST office:document-meta xmlns:math	CDATA #FIXED "&nMath;">-<!ATTLIST office:document-meta xmlns:form	CDATA #FIXED "&nForm;">--<!ATTLIST office:document-meta office:version	%string; #IMPLIED>--<!ELEMENT office:document-settings (office:settings) >-<!ATTLIST office:document-settings xmlns:office	CDATA #FIXED "&nOffice;">-<!ATTLIST office:document-settings xmlns:xlink	CDATA #FIXED "&nXLink;">-<!ATTLIST office:document-settings xmlns:config	CDATA #FIXED "&nConfig;">--<!ATTLIST office:document-settings office:version	%string; #IMPLIED>--<!ENTITY % meta "(meta:generator?,-				  dc:title?,-				  dc:description?,-				  dc:subject?,-				  meta:initial-creator?,-				  meta:creation-date?,-				  dc:creator?,-				  dc:date?,-				  meta:printed-by?,-				  meta:print-date?,-				  meta:keywords?,-				  dc:language?,-				  meta:editing-cycles?,-				  meta:editing-duration?,-				  meta:hyperlink-behaviour?,-				  meta:auto-reload?,-				  meta:template?,-				  meta:user-defined*,-				  meta:document-statistic?)">-<!ELEMENT office:meta %meta;>--<!ENTITY % script	"(script:library-embedded |-					  script:library-linked)*,office:events?">-<!ELEMENT office:script (%script;)>--<!ELEMENT office:font-decls (style:font-decl)*>--<!ENTITY % styles "(style:default-style|style:style|text:list-style|-		number:number-style|number:currency-style|number:percentage-style|-		number:date-style|number:time-style|number:boolean-style|-		number:text-style|-		draw:gradient|draw:hatch|draw:fill-image|draw:marker|draw:stroke-dash|-		style:presentation-page-layout|draw:transparency)">--<!-- Validity constraint: The elements-		text:outline-style,-		text:footnotes-configuration,-		text:endnotes-configuration,-		text:bibliography-configuration and-		text:linenumbering-configuration-	may appear only once!-	Unfortunatetly, this constraint cannot be easily specified in the DTD.--->-<!ELEMENT office:styles (%styles;|text:outline-style|-		text:footnotes-configuration|text:endnotes-configuration|-		text:bibliography-configuration|text:linenumbering-configuration)*>--<!ELEMENT office:automatic-styles (%styles;|style:page-master)*>--<!ELEMENT office:master-styles (draw:layer-set?,style:handout-master?,style:master-page*) >---<!ENTITY % body "(office:forms?,(text:tracked-changes|table:tracked-changes)?,%text-decls;,table:calculation-settings?,table:content-validations?,table:label-ranges?,-		(text:h|text:p|text:ordered-list|-		text:unordered-list|table:table|draw:page|-		draw:a|%shape;|text:section|text:table-of-content|-		text:illustration-index|text:table-index|text:object-index|-		text:user-index|text:alphabetical-index|text:bibliography|-		%change-marks;)*,-		table:named-expressions?,-		table:database-ranges?,table:data-pilot-tables?,-		table:consolidation?,-		table:dde-links?,-		presentation:settings?)">-<!ELEMENT office:body %body;>-<!ATTLIST office:body table:structure-protected %boolean; "false"-			table:protection-key CDATA #IMPLIED>--<!ELEMENT office:events (script:event|presentation:event)*>--<!-- DDE source: for text sections and tables -->-<!ELEMENT office:dde-source EMPTY>-<!ATTLIST office:dde-source office:dde-application CDATA #IMPLIED>-<!ATTLIST office:dde-source office:dde-topic CDATA #IMPLIED>-<!ATTLIST office:dde-source office:dde-item CDATA #IMPLIED>-<!ATTLIST office:dde-source office:automatic-update %boolean; "false">-<!ATTLIST office:dde-source office:name CDATA #IMPLIED>-<!ATTLIST office:dde-source table:conversion-mode (into-default-style-data-style|into-english-number|let-text) "into-default-style-data-style" >--<!-- annotations -->-<!-- limitation: in the current implementation, only plain text inside of-     paragraphs is supported -->-<!ELEMENT office:annotation (text:p)*>-<!ATTLIST office:annotation office:author %string; #IMPLIED>-<!ATTLIST office:annotation office:create-date %date; #IMPLIED>-<!ATTLIST office:annotation office:create-date-string %string; #IMPLIED>-<!ATTLIST office:annotation office:display %boolean; "false">--<!ELEMENT office:change-info (text:p)*>-<!ATTLIST office:change-info office:chg-author %string; #REQUIRED>-<!ATTLIST office:change-info office:chg-date-time %timeInstance; #REQUIRED>--<!ELEMENT office:binary-data (#PCDATA)>
− examples/OpenOffice.org/office2.dtd
@@ -1,4010 +0,0 @@-<?xml version="1.0" encoding="UTF-8"?>-<!---	$Id: office2.dtd,v 1.1 2003/05/13 13:07:51 malcolm Exp $--   The Contents of this file are made available subject to the terms of-   either of the following licenses--          - GNU Lesser General Public License Version 2.1-          - Sun Industry Standards Source License Version 1.1--   Sun Microsystems Inc., October, 2000--   GNU Lesser General Public License Version 2.1-   =============================================-   Copyright 2000 by Sun Microsystems, Inc.-   901 San Antonio Road, Palo Alto, CA 94303, USA--   This library is free software; you can redistribute it and/or-   modify it under the terms of the GNU Lesser General Public-   License version 2.1, as published by the Free Software Foundation.--   This library is distributed in the hope that it will be useful,-   but WITHOUT ANY WARRANTY; without even the implied warranty of-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU-   Lesser General Public License for more details.--   You should have received a copy of the GNU Lesser General Public-   License along with this library; if not, write to the Free Software-   Foundation, Inc., 59 Temple Place, Suite 330, Boston,-   MA  02111-1307  USA---   Sun Industry Standards Source License Version 1.1-   =================================================-   The contents of this file are subject to the Sun Industry Standards-   Source License Version 1.1 (the "License"); You may not use this file-   except in compliance with the License. You may obtain a copy of the-   License at http://www.openoffice.org/license.html.--   Software provided under this License is provided on an "AS IS" basis,-   WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING,-   WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,-   MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.-   See the License for the specific provisions governing your rights and-   obligations concerning the Software.--   The Initial Developer of the Original Code is: Sun Microsystems, Inc.--   Copyright: 2000 by Sun Microsystems, Inc.--   All Rights Reserved.--   Contributor(s): _______________________________________---->--<!-- string -->-<!ENTITY % string				"CDATA">-<!ENTITY % cString				"#PCDATA">--<!-- boolean (values are "true" and "false" -->-<!ENTITY % boolean				"CDATA">--<!-- integer ( ..., -2, -1, 0, 1, 2, ...) -->-<!ENTITY % integer				"CDATA">--<!-- non negative integer ( 0, 1, 2, ...) -->-<!ENTITY % nonNegativeInteger	"CDATA">--<!-- positive integer ( 1, 2, ...) -->-<!ENTITY % positiveInteger		"CDATA">-<!ENTITY % cPositiveInteger		"#PCDATA">--<!ENTITY % positiveNumberOrDefault "CDATA">--<!-- time duration as specified by ISO8601, section 5.5.3.2 -->-<!ENTITY % timeDuration			"CDATA">-<!ENTITY % cTimeDuration		"#PCDATA">--<!-- time instance as specified by ISO8601, section 5.4 -->-<!ENTITY % timeInstance			"CDATA">-<!ENTITY % cTimeInstance		"#PCDATA">--<!-- date instance as specified by ISO8601, section 5.2.1.1, extended format-->-<!ENTITY % date					"CDATA">-<!ENTITY % cDate				"#PCDATA">--<!-- date duration, like timDuration but truncated to full dates -->-<!ENTITY % dateDuration			"CDATA">-<!ENTITY % cDateDuration		"#PCDATA">--<!-- URI reference -->-<!ENTITY % uriReference			"CDATA">--<!-- language code as specified by RFC1766 -->-<!ENTITY % language				"CDATA">-<!ENTITY % cLanguage			"#PCDATA">--<!-- float -->-<!ENTITY % float "CDATA">--<!-- Some other common used data types -->--<!-- a single UNICODE character -->-<!ENTITY % character			"CDATA">--<!-- a style name -->-<!ENTITY % styleName			"CDATA">--<!-- a target frame mame -->-<!ENTITY % targetFrameName			"CDATA">--<!-- a language without a country as specified by ISO639 -->-<!ENTITY % languageOnly			"CDATA">--<!-- a country as specified by ISO3166 -->-<!ENTITY % country				"CDATA">--<!-- a color value having the format #rrggbb -->-<!ENTITY % color				"CDATA">-<!-- a color value having the format #rrggbb or "transparent" -->-<!ENTITY % transparentOrColor			"CDATA">--<!-- a percentage -->-<!ENTITY % percentage 			"CDATA">--<!-- a length (i.e. 1cm or .6inch) -->-<!ENTITY % length				"CDATA">-<!ENTITY % positiveLength		"CDATA">-<!ENTITY % nonNegativeLength	"CDATA">-<!ENTITY % lengthOrNoLimit "CDATA">--<!-- a length or a percentage -->-<!ENTITY % lengthOrPercentage	"CDATA">-<!ENTITY % positiveLengthOrPercentage	"CDATA">--<!-- a pixel length (i.e. 2px) -->-<!ENTITY % nonNegativePixelLength	"CDATA">--<!-- a float or a percentage -->-<!ENTITY % floatOrPercentage	"CDATA">--<!-- a text encoding -->-<!ENTITY % textEncoding	"CDATA">--<!-- cell address and cell range address -->-<!ENTITY % cell-address "CDATA">-<!ENTITY % cell-range-address "CDATA">-<!ENTITY % cell-range-address-list "CDATA">--<!-- value types -->-<!ENTITY % valueType "(float|time|date|percentage|currency|boolean|string)">--<!-- an svg coordinate in different distance formats -->-<!ENTITY % coordinate "CDATA">--<!ENTITY % coordinateOrPercentage	"CDATA">--<!ENTITY % shape "draw:rect|draw:line|draw:polyline|draw:polygon|draw:path|-				   draw:circle|draw:ellipse|draw:g|draw:page-thumbnail|-				   draw:text-box|draw:image|draw:object|draw:object-ole|-				   draw:applet|draw:floating-frame|draw:plugin|-				   draw:measure|draw:caption|draw:connector|chart:chart|-				   dr3d:scene|draw:control" >-<!ENTITY % shapes "(%shape;)" >--<!ENTITY % anchorType "(page|frame|paragraph|char|as-char)">--<!ENTITY % control-id "form:id CDATA #REQUIRED">--<!ENTITY nFO "http://www.w3.org/1999/XSL/Format">-<!ENTITY nXLink "http://www.w3.org/1999/xlink">-<!ENTITY nSVG "http://www.w3.org/2000/svg">-<!ENTITY nMath "http://www.w3.org/1998/Math/MathML">--<!-- StarOffice namespace names and prefixes -->--<!ENTITY nOpenOffice "http://openoffice.org/2000">-<!ENTITY nOpenOffice2001 "http://openoffice.org/2001">--<!ENTITY nOffice "&nOpenOffice;/office">-<!ENTITY nStyle "&nOpenOffice;/style">-<!ENTITY nText "&nOpenOffice;/text">-<!ENTITY nTable "&nOpenOffice;/table">-<!ENTITY nMeta "&nOpenOffice;/meta">-<!ENTITY nScript "&nOpenOffice;/script">-<!ENTITY nDraw "&nOpenOffice;/drawing">-<!ENTITY nChart "&nOpenOffice;/chart">-<!ENTITY nNumber "&nOpenOffice;/datastyle">-<!ENTITY nDr3D "&nOpenOffice;/dr3d">-<!ENTITY nForm "&nOpenOffice;/form">-<!ENTITY nConfig "&nOpenOffice2001;/config">--<!-- dublin core namespace name and prefic -->-<!ENTITY nDC "http://purl.org/dc/elements/1.1/">--<!-- text marks for tracking changes; usually used inside of paragraphs -->-<!ENTITY % change-marks "text:change | text:change-start | text:change-end">--<!-- (optional) text declarations; used before the first paragraph -->-<!ENTITY % text-decls "text:variable-decls?, text:sequence-decls?,-					   text:user-field-decls?, text:dde-connection-decls?, -					   text:alphabetical-index-auto-mark-file?" >--<!-- define the types of text which may occur inside of sections -->-<!ENTITY % sectionText "(text:h|text:p|text:ordered-list|-						text:unordered-list|table:table|text:section|-						text:table-of-content|text:illustration-index|-						text:table-index|text:object-index|text:user-index|-						text:alphabetical-index|text:bibliography|-						text:index-title|%change-marks;)*">--<!ENTITY % headerText "(%text-decls;, (text:h|text:p|text:ordered-list|-						text:unordered-list|table:table|text:section|-						text:table-of-content|text:illustration-index|-						text:table-index|text:object-index|text:user-index|-						text:alphabetical-index|text:bibliography|-						text:index-title|%change-marks;)* )">---<!ELEMENT office:document ( office:meta?,-							office:settings?,-							office:script?,-							office:font-decls?,-							office:styles?,-							office:automatic-styles?,-							office:master-styles?,-							office:body ) >--<!ATTLIST office:document xmlns:office	CDATA #FIXED "&nOffice;">-<!ATTLIST office:document xmlns:meta	CDATA #FIXED "&nMeta;">-<!ATTLIST office:document xmlns:script	CDATA #FIXED "&nScript;">-<!ATTLIST office:document xmlns:style	CDATA #FIXED "&nStyle;">-<!ATTLIST office:document xmlns:text	CDATA #FIXED "&nText;">-<!ATTLIST office:document xmlns:table	CDATA #FIXED "&nTable;">-<!ATTLIST office:document xmlns:draw	CDATA #FIXED "&nDraw;">-<!ATTLIST office:document xmlns:chart	CDATA #FIXED "&nChart;">-<!ATTLIST office:document xmlns:number	CDATA #FIXED "&nNumber;">-<!ATTLIST office:document xmlns:fo		CDATA #FIXED "&nFO;">-<!ATTLIST office:document xmlns:xlink	CDATA #FIXED "&nXLink;">-<!ATTLIST office:document xmlns:svg		CDATA #FIXED "&nSVG;">-<!ATTLIST office:document xmlns:dc		CDATA #FIXED "&nDC;">-<!ATTLIST office:document xmlns:dr3d	CDATA #FIXED "&nDr3D;">-<!ATTLIST office:document xmlns:math	CDATA #FIXED "&nMath;">-<!ATTLIST office:document xmlns:form	CDATA #FIXED "&nForm;">--<!ATTLIST office:document office:class-						  (text|text-global|-						   drawing|presentation|-						   spreadsheet|chart) #REQUIRED>--<!ATTLIST office:document office:version	%string; #IMPLIED>--<!-- document-styles -->-<!ELEMENT office:document-styles (-							office:font-decls?,-							office:styles?,-							office:automatic-styles?,-							office:master-styles? ) >--<!ATTLIST office:document-styles xmlns:office	CDATA #FIXED "&nOffice;">-<!ATTLIST office:document-styles xmlns:meta	CDATA #FIXED "&nMeta;">-<!ATTLIST office:document-styles xmlns:script	CDATA #FIXED "&nScript;">-<!ATTLIST office:document-styles xmlns:style	CDATA #FIXED "&nStyle;">-<!ATTLIST office:document-styles xmlns:text	CDATA #FIXED "&nText;">-<!ATTLIST office:document-styles xmlns:table	CDATA #FIXED "&nTable;">-<!ATTLIST office:document-styles xmlns:draw	CDATA #FIXED "&nDraw;">-<!ATTLIST office:document-styles xmlns:chart	CDATA #FIXED "&nChart;">-<!ATTLIST office:document-styles xmlns:number	CDATA #FIXED "&nNumber;">-<!ATTLIST office:document-styles xmlns:fo		CDATA #FIXED "&nFO;">-<!ATTLIST office:document-styles xmlns:xlink	CDATA #FIXED "&nXLink;">-<!ATTLIST office:document-styles xmlns:svg		CDATA #FIXED "&nSVG;">-<!ATTLIST office:document-styles xmlns:dc		CDATA #FIXED "&nDC;">-<!ATTLIST office:document-styles xmlns:dr3d		CDATA #FIXED "&nDr3D;">-<!ATTLIST office:document-styles xmlns:math		CDATA #FIXED "&nMath;">-<!ATTLIST office:document-styles xmlns:form		CDATA #FIXED "&nForm;">--<!ATTLIST office:document-styles office:version	%string; #IMPLIED>--<!-- document-content -->--<!ELEMENT office:document-content (-							office:script?,-							office:font-decls?,-							office:automatic-styles?,-							office:body ) >--<!ATTLIST office:document-content xmlns:office	CDATA #FIXED "&nOffice;">-<!ATTLIST office:document-content xmlns:meta	CDATA #FIXED "&nMeta;">-<!ATTLIST office:document-content xmlns:script	CDATA #FIXED "&nScript;">-<!ATTLIST office:document-content xmlns:style	CDATA #FIXED "&nStyle;">-<!ATTLIST office:document-content xmlns:text	CDATA #FIXED "&nText;">-<!ATTLIST office:document-content xmlns:table	CDATA #FIXED "&nTable;">-<!ATTLIST office:document-content xmlns:draw	CDATA #FIXED "&nDraw;">-<!ATTLIST office:document-content xmlns:chart	CDATA #FIXED "&nChart;">-<!ATTLIST office:document-content xmlns:number	CDATA #FIXED "&nNumber;">-<!ATTLIST office:document-content xmlns:fo		CDATA #FIXED "&nFO;">-<!ATTLIST office:document-content xmlns:xlink	CDATA #FIXED "&nXLink;">-<!ATTLIST office:document-content xmlns:svg		CDATA #FIXED "&nSVG;">-<!ATTLIST office:document-content xmlns:dc		CDATA #FIXED "&nDC;">-<!ATTLIST office:document-content xmlns:dr3d	CDATA #FIXED "&nDr3D;">-<!ATTLIST office:document-content xmlns:math	CDATA #FIXED "&nMath;">-<!ATTLIST office:document-content xmlns:form	CDATA #FIXED "&nForm;">--<!ATTLIST office:document-content office:class-						  (text|text-global|-						   drawing|presentation|-						   spreadsheet|chart) #REQUIRED>--<!ATTLIST office:document-content office:version	%string; #IMPLIED>--<!-- document-content -->--<!ELEMENT office:document-meta ( office:meta? ) >--<!ATTLIST office:document-meta xmlns:office	CDATA #FIXED "&nOffice;">-<!ATTLIST office:document-meta xmlns:meta	CDATA #FIXED "&nMeta;">-<!ATTLIST office:document-meta xmlns:script	CDATA #FIXED "&nScript;">-<!ATTLIST office:document-meta xmlns:style	CDATA #FIXED "&nStyle;">-<!ATTLIST office:document-meta xmlns:text	CDATA #FIXED "&nText;">-<!ATTLIST office:document-meta xmlns:table	CDATA #FIXED "&nTable;">-<!ATTLIST office:document-meta xmlns:draw	CDATA #FIXED "&nDraw;">-<!ATTLIST office:document-meta xmlns:chart	CDATA #FIXED "&nChart;">-<!ATTLIST office:document-meta xmlns:number	CDATA #FIXED "&nNumber;">-<!ATTLIST office:document-meta xmlns:fo		CDATA #FIXED "&nFO;">-<!ATTLIST office:document-meta xmlns:xlink	CDATA #FIXED "&nXLink;">-<!ATTLIST office:document-meta xmlns:svg		CDATA #FIXED "&nSVG;">-<!ATTLIST office:document-meta xmlns:dc		CDATA #FIXED "&nDC;">-<!ATTLIST office:document-meta xmlns:dr3d	CDATA #FIXED "&nDr3D;">-<!ATTLIST office:document-meta xmlns:math	CDATA #FIXED "&nMath;">-<!ATTLIST office:document-meta xmlns:form	CDATA #FIXED "&nForm;">--<!ATTLIST office:document-meta office:version	%string; #IMPLIED>--<!ELEMENT office:document-settings (office:settings) >-<!ATTLIST office:document-settings xmlns:office	CDATA #FIXED "&nOffice;">-<!ATTLIST office:document-settings xmlns:xlink	CDATA #FIXED "&nXLink;">-<!ATTLIST office:document-settings xmlns:config	CDATA #FIXED "&nConfig;">--<!ATTLIST office:document-settings office:version	%string; #IMPLIED>--<!ENTITY % meta "(meta:generator?,-				  dc:title?,-				  dc:description?,-				  dc:subject?,-				  meta:initial-creator?,-				  meta:creation-date?,-				  dc:creator?,-				  dc:date?,-				  meta:printed-by?,-				  meta:print-date?,-				  meta:keywords?,-				  dc:language?,-				  meta:editing-cycles?,-				  meta:editing-duration?,-				  meta:hyperlink-behaviour?,-				  meta:auto-reload?,-				  meta:template?,-				  meta:user-defined*,-				  meta:document-statistic?)">-<!ELEMENT office:meta %meta;>--<!ENTITY % script	"(script:library-embedded |-					  script:library-linked)*,office:events?">-<!ELEMENT office:script (%script;)>--<!ELEMENT office:font-decls (style:font-decl)*>--<!ENTITY % styles "(style:default-style|style:style|text:list-style|-		number:number-style|number:currency-style|number:percentage-style|-		number:date-style|number:time-style|number:boolean-style|-		number:text-style|-		draw:gradient|draw:hatch|draw:fill-image|draw:marker|draw:stroke-dash|-		style:presentation-page-layout|draw:transparency)">--<!-- Validity constraint: The elements-		text:outline-style,-		text:footnotes-configuration,-		text:endnotes-configuration,-		text:bibliography-configuration and-		text:linenumbering-configuration-	may appear only once!-	Unfortunatetly, this constraint cannot be easily specified in the DTD.--->-<!ELEMENT office:styles (%styles;|text:outline-style|-		text:footnotes-configuration|text:endnotes-configuration|-		text:bibliography-configuration|text:linenumbering-configuration)*>--<!ELEMENT office:automatic-styles (%styles;|style:page-master)*>--<!ELEMENT office:master-styles (draw:layer-set?,style:handout-master?,style:master-page*) >---<!ENTITY % body "(office:forms?,(text:tracked-changes|table:tracked-changes)?,%text-decls;,table:calculation-settings?,table:content-validations?,table:label-ranges?,-		(text:h|text:p|text:ordered-list|-		text:unordered-list|table:table|draw:page|-		draw:a|%shape;|text:section|text:table-of-content|-		text:illustration-index|text:table-index|text:object-index|-		text:user-index|text:alphabetical-index|text:bibliography|-		%change-marks;)*,-		table:named-expressions?,-		table:database-ranges?,table:data-pilot-tables?,-		table:consolidation?,-		table:dde-links?,-		presentation:settings?)">-<!ELEMENT office:body %body;>-<!ATTLIST office:body table:structure-protected %boolean; "false"-			table:protection-key CDATA #IMPLIED>--<!ELEMENT office:events (script:event|presentation:event)*>--<!-- DDE source: for text sections and tables -->-<!ELEMENT office:dde-source EMPTY>-<!ATTLIST office:dde-source office:dde-application CDATA #IMPLIED>-<!ATTLIST office:dde-source office:dde-topic CDATA #IMPLIED>-<!ATTLIST office:dde-source office:dde-item CDATA #IMPLIED>-<!ATTLIST office:dde-source office:automatic-update %boolean; "false">-<!ATTLIST office:dde-source office:name CDATA #IMPLIED>-<!ATTLIST office:dde-source table:conversion-mode (into-default-style-data-style|into-english-number|let-text) "into-default-style-data-style" >--<!-- annotations -->-<!-- limitation: in the current implementation, only plain text inside of-     paragraphs is supported -->-<!ELEMENT office:annotation (text:p)*>-<!ATTLIST office:annotation office:author %string; #IMPLIED>-<!ATTLIST office:annotation office:create-date %date; #IMPLIED>-<!ATTLIST office:annotation office:create-date-string %string; #IMPLIED>-<!ATTLIST office:annotation office:display %boolean; "false">--<!ELEMENT office:change-info (text:p)*>-<!ATTLIST office:change-info office:chg-author %string; #REQUIRED>-<!ATTLIST office:change-info office:chg-date-time %timeInstance; #REQUIRED>--<!ELEMENT office:binary-data (#PCDATA)>--<!ELEMENT style:font-decl EMPTY>-<!ATTLIST style:font-decl style:name %string; #REQUIRED>-<!ATTLIST style:font-decl fo:font-family %string; #REQUIRED>-<!ATTLIST style:font-decl style:font-style-name %string; #IMPLIED>-<!ENTITY % fontFamilyGeneric "(roman|swiss|modern|decorative|script|system)">-<!ATTLIST style:font-decl style:font-family-generic %fontFamilyGeneric;-						   #IMPLIED>-<!ENTITY % fontPitch "(fixed|variable)">-<!ATTLIST style:font-decl style:font-pitch %fontPitch; #IMPLIED>-<!ATTLIST style:font-decl style:font-charset %textEncoding; #IMPLIED>--<!ELEMENT style:style ( style:properties?,office:events?,style:map*)>--<!ATTLIST style:style style:name %styleName; #REQUIRED>--<!ENTITY % styleFamily "(paragraph|text|section|-						 table|table-column|table-row|table-cell|table-page|chart|graphics|default|drawing-page|presentation|control|ruby)">-<!ATTLIST style:style style:family %styleFamily; #REQUIRED>--<!ATTLIST style:style style:parent-style-name %styleName; #IMPLIED>-<!ATTLIST style:style style:master-page-name %styleName; #IMPLIED>-<!ATTLIST style:style style:next-style-name %styleName; #IMPLIED>-<!ATTLIST style:style style:list-style-name %styleName; #IMPLIED>-<!ATTLIST style:style style:data-style-name %styleName; #IMPLIED>--<!ATTLIST style:style style:auto-update %boolean; "false">--<!ATTLIST style:style style:class %string; #IMPLIED>--<!ELEMENT style:default-style (style:properties?)>-<!ATTLIST style:default-style style:family %styleFamily; #REQUIRED>--<!ELEMENT style:map EMPTY>--<!ATTLIST style:map style:condition %string; #REQUIRED>-<!ATTLIST style:map style:apply-style-name %styleName; #REQUIRED>-<!ATTLIST style:map style:base-cell-address %cell-address; #IMPLIED>--<!ELEMENT style:properties ANY>--<!-- number format properties -->-<!ATTLIST style:properties style:num-prefix %string; #IMPLIED>-<!ATTLIST style:properties style:num-suffix %string; #IMPLIED>-<!ATTLIST style:properties style:num-format %string; #IMPLIED>-<!ATTLIST style:properties style:num-letter-sync %boolean; #IMPLIED>--<!-- frame properties -->-<!ATTLIST style:properties fo:width %positiveLength; #IMPLIED>-<!ATTLIST style:properties fo:height %positiveLength; #IMPLIED>-<!ATTLIST style:properties style:vertical-pos (top|middle|bottom|from-top|below) #IMPLIED>-<!ATTLIST style:properties style:vertical-rel (page|page-content|-											   frame|frame-content|-											   paragraph|paragraph-content|char|-											   line|baseline|text) #IMPLIED>-<!ATTLIST style:properties style:horizontal-pos (left|center|right|from-left|inside|outside|from-inside) #IMPLIED>-<!ATTLIST style:properties style:horizontal-rel (page|page-content|-								 page-start-margin|page-end-margin|-								 frame|frame-content|-								 frame-start-margin|frame-end-margin|-								 paragraph|paragraph-content|-								 paragraph-start-margin|paragraph-end-margin|-								 char) #IMPLIED>-<!ATTLIST style:properties svg:width %lengthOrPercentage; #IMPLIED>-<!ATTLIST style:properties svg:height %lengthOrPercentage; #IMPLIED>-<!ATTLIST style:properties fo:min-height %lengthOrPercentage; #IMPLIED>-<!ATTLIST style:properties fo:min-width %lengthOrPercentage; #IMPLIED>-<!ATTLIST style:properties fo:max-height %lengthOrPercentage; #IMPLIED>-<!ATTLIST style:properties fo:max-width %lengthOrPercentage; #IMPLIED>-<!ATTLIST style:properties text:anchor-type %anchorType; #IMPLIED>-<!ATTLIST style:properties text:anchor-page-number %positiveInteger; #IMPLIED>-<!ATTLIST style:properties svg:x %coordinate; #IMPLIED>-<!ATTLIST style:properties svg:y %coordinate; #IMPLIED>-<!ATTLIST style:properties style:print-content %boolean; #IMPLIED>-<!ATTLIST style:properties style:protect %boolean; #IMPLIED>-<!ATTLIST style:properties style:wrap (none|left|right|parallel|dynamic|run-through) #IMPLIED>-<!ENTITY % noLimitOrPositiveInteger "CDATA">-<!ATTLIST style:properties style:number-wrapped-paragraphs %noLimitOrPositiveInteger; #IMPLIED>-<!ATTLIST style:properties style:wrap-contour %boolean; #IMPLIED>-<!ATTLIST style:properties style:wrap-contour-mode (full|outside) #IMPLIED>-<!ATTLIST style:properties style:run-through (foreground|background) #IMPLIED>-<!ATTLIST style:properties style:editable %boolean; #IMPLIED>-<!ATTLIST style:properties style:mirror CDATA #IMPLIED>-<!ATTLIST style:properties fo:clip CDATA #IMPLIED>-<!ATTLIST style:properties text:animation (none|scroll|alternate|slide) #IMPLIED>-<!ATTLIST style:properties text:animation-direction (left|right|up|down) #IMPLIED>-<!ATTLIST style:properties text:animation-start-inside %boolean; #IMPLIED>-<!ATTLIST style:properties text:animation-stop-inside %boolean; #IMPLIED>-<!ATTLIST style:properties text:animation-repeat %integer; #IMPLIED>-<!ATTLIST style:properties text:animation-delay %timeDuration; #IMPLIED>-<!ATTLIST style:properties text:animation-steps %length; #IMPLIED>--<!-- text properties -->-<!ATTLIST style:properties fo:font-variant (normal|small-caps) #IMPLIED>-<!ATTLIST style:properties fo:text-transform (none|lowercase|-											  uppercase|capitalize) #IMPLIED>-<!ATTLIST style:properties fo:color %color; #IMPLIED>-<!ATTLIST style:properties style:use-window-font-color %boolean; #IMPLIED>-<!ATTLIST style:properties style:text-outline %boolean; #IMPLIED>-<!ATTLIST style:properties style:text-crossing-out-						   (none|single-line|double-line|thick-line|slash|X)-						   #IMPLIED>-<!ATTLIST style:properties style:text-position CDATA #IMPLIED>-<!ATTLIST style:properties style:text-align (left|right|start|center|end|justify|justified) #IMPLIED>--<!ATTLIST style:properties style:font-name %string; #IMPLIED>-<!ATTLIST style:properties fo:font-family %string; #IMPLIED>-<!ATTLIST style:properties style:font-family-generic %fontFamilyGeneric;-						   #IMPLIED>-<!ATTLIST style:properties style:font-style-name %string; #IMPLIED>-<!ATTLIST style:properties style:font-pitch %fontPitch; #IMPLIED>-<!ATTLIST style:properties style:font-charset %textEncoding; #IMPLIED>-<!ATTLIST style:properties style:font-name-asian %string; #IMPLIED>-<!ATTLIST style:properties style:font-family-asian %string; #IMPLIED>-<!ATTLIST style:properties style:font-family-generic-asian %fontFamilyGeneric;-						   #IMPLIED>-<!ATTLIST style:properties style:font-style-name-asian %string; #IMPLIED>-<!ATTLIST style:properties style:font-pitch-asian %fontPitch; #IMPLIED>-<!ATTLIST style:properties style:font-charset-asian %textEncoding; #IMPLIED>-<!ATTLIST style:properties style:font-name-complex %string; #IMPLIED>-<!ATTLIST style:properties style:font-family-complex %string; #IMPLIED>-<!ATTLIST style:properties style:font-family-generic-complex %fontFamilyGeneric;-						   #IMPLIED>-<!ATTLIST style:properties style:font-style-name-complex %string; #IMPLIED>-<!ATTLIST style:properties style:font-pitch-complex %fontPitch; #IMPLIED>-<!ATTLIST style:properties style:font-charset-complex %textEncoding; #IMPLIED>--<!ATTLIST style:properties fo:font-size %positiveLengthOrPercentage; #IMPLIED>-<!ATTLIST style:properties style:font-size-rel %length; #IMPLIED>-<!ATTLIST style:properties style:font-size-asian %positiveLengthOrPercentage; #IMPLIED>-<!ATTLIST style:properties style:font-size-rel-asian %length; #IMPLIED>-<!ATTLIST style:properties style:font-size-complex %positiveLengthOrPercentage; #IMPLIED>-<!ATTLIST style:properties style:font-size-rel-complex %length; #IMPLIED>-<!ENTITY % normalOrLength "CDATA">-<!ATTLIST style:properties fo:letter-spacing %normalOrLength; #IMPLIED>-<!ATTLIST style:properties fo:language %languageOnly; #IMPLIED>-<!ATTLIST style:properties style:language-asian %languageOnly; #IMPLIED>-<!ATTLIST style:properties style:language-complex %languageOnly; #IMPLIED>-<!ATTLIST style:properties fo:country %country; #IMPLIED>-<!ATTLIST style:properties style:country-asian %country; #IMPLIED>-<!ATTLIST style:properties style:country-complex %country; #IMPLIED>-<!ENTITY % fontStyle "(normal|italic|oblique)">-<!ATTLIST style:properties fo:font-style %fontStyle; #IMPLIED>-<!ATTLIST style:properties style:font-style-asian %fontStyle; #IMPLIED>-<!ATTLIST style:properties style:font-style-complex %fontStyle; #IMPLIED>-<!ENTITY % fontRelief "(none|embossed|engraved)">-<!ATTLIST style:properties style:font-relief %fontRelief; #IMPLIED>-<!ATTLIST style:properties fo:text-shadow CDATA #IMPLIED>-<!ATTLIST style:properties style:text-underline-						   (none|single|double|dotted|dash|long-dash|dot-dash|-							dot-dot-dash|wave|bold|bold-dotted|bold-dash|-							bold-long-dash|bold-dot-dash|bold-dot-dot-dash|-							bold-wave|double-wave|small-wave) #IMPLIED>-<!ATTLIST style:properties style:text-autospace (none | ideograph-alpha) #IMPLIED>-<!ATTLIST style:properties style:punctuation-wrap (simple | hanging) #IMPLIED>-<!ATTLIST style:properties style:line-break (normal | strict) #IMPLIED>-<!ENTITY % fontColorOrColor "CDATA">-<!ATTLIST style:properties style:text-underline-color %fontColorOrColor;-						   #IMPLIED>-<!ATTLIST style:properties fo:font-weight CDATA #IMPLIED>-<!ATTLIST style:properties style:font-weight-asian CDATA #IMPLIED>-<!ATTLIST style:properties style:font-weight-complex CDATA #IMPLIED>-<!ATTLIST style:properties fo:score-spaces %boolean; #IMPLIED>-<!ATTLIST style:properties style:letter-kerning %boolean; #IMPLIED>-<!ATTLIST style:properties style:text-blinking %boolean; #IMPLIED>-<!ATTLIST style:properties style:text-background-color %transparentOrColor;-						   #IMPLIED>--<!ATTLIST style:properties style:text-combine (none|letters|lines) #IMPLIED>-<!ATTLIST style:properties style:text-combine-start-char %character; #IMPLIED>-<!ATTLIST style:properties style:text-combine-end-char %character; #IMPLIED>-<!ATTLIST style:properties style:text-emphasize CDATA #IMPLIED>-<!ATTLIST style:properties style:text-scale %percentage; #IMPLIED>-<!ATTLIST style:properties style:text-rotation-angle %integer; #IMPLIED>-<!ATTLIST style:properties style:text-rotation-scale (fixed|line-height) #IMPLIED>--<!-- paragraph properties -->-<!ENTITY % nonNegativeLengthOrPercentageOrNormal "CDATA">-<!ATTLIST style:properties fo:line-height-						   %nonNegativeLengthOrPercentageOrNormal; #IMPLIED>-<!ATTLIST style:properties style:line-height-at-least %nonNegativeLength;-						   #IMPLIED>-<!ATTLIST style:properties style:line-spacing %length; #IMPLIED>-<!ATTLIST style:properties fo:text-align (start|end|center|justify) #IMPLIED>-<!ATTLIST style:properties fo:text-align-last (start|center|justify) #IMPLIED>-<!ATTLIST style:properties style:text-align-source (fix|value-type) #IMPLIED>-<!ATTLIST style:properties style:justify-single-word %boolean; #IMPLIED>-<!ATTLIST style:properties style:break-inside (auto|avoid) #IMPLIED>-<!ATTLIST style:properties fo:widows %nonNegativeInteger; #IMPLIED>-<!ATTLIST style:properties fo:orphans %nonNegativeInteger; #IMPLIED>--<!ATTLIST style:properties fo:hyphenate %boolean; #IMPLIED>-<!ATTLIST style:properties fo:hyphenate-keep (none|page) #IMPLIED>-<!ATTLIST style:properties fo:hyphenation-remain-char-count %positiveInteger;-						   #IMPLIED>-<!ATTLIST style:properties fo:hyphenation-push-char-count %positiveInteger;-						   #IMPLIED>-<!ATTLIST style:properties fo:hyphenation-ladder-count-						   %noLimitOrPositiveInteger;  #IMPLIED>-<!ATTLIST style:properties style:page-number %positiveInteger; #IMPLIED>--<!ELEMENT style:tab-stops (style:tab-stop)*>-<!ELEMENT style:tab-stop EMPTY>-<!ATTLIST style:tab-stop style:position %nonNegativeLength; #REQUIRED>-<!ATTLIST style:tab-stop style:type (left|center|right|char|default) "left">-<!ATTLIST style:tab-stop style:char %character; #IMPLIED>-<!ATTLIST style:tab-stop style:leader-char %character; " ">--<!ELEMENT style:drop-cap EMPTY>-<!ENTITY % wordOrPositiveInteger "CDATA">-<!ATTLIST style:drop-cap style:length %wordOrPositiveInteger; "1">-<!ATTLIST style:drop-cap style:lines %positiveInteger; "1">-<!ATTLIST style:drop-cap style:distance %length; "0cm">-<!ATTLIST style:drop-cap style:style-name %styleName; #IMPLIED>--<!ATTLIST style:properties style:register-true %boolean; #IMPLIED>-<!ATTLIST style:properties style:register-truth-ref-style-name %styleName; #IMPLIED>-<!ATTLIST style:properties fo:margin-left %positiveLengthOrPercentage; #IMPLIED>-<!ATTLIST style:properties fo:margin-right %positiveLengthOrPercentage;-						   #IMPLIED>-<!ATTLIST style:properties fo:text-indent %lengthOrPercentage; #IMPLIED>-<!ATTLIST style:properties style:auto-text-indent %boolean; #IMPLIED>-<!ATTLIST style:properties fo:margin-top %positiveLengthOrPercentage; #IMPLIED>-<!ATTLIST style:properties fo:margin-bottom %positiveLengthOrPercentage; #IMPLIED>-<!ATTLIST style:properties fo:break-before (auto|column|page) #IMPLIED>-<!ATTLIST style:properties fo:break-after (auto|column|page) #IMPLIED>-<!ATTLIST style:properties fo:background-color %transparentOrColor; #IMPLIED>-<!ATTLIST style:properties style:background-transparency %percentage; #IMPLIED>-<!ATTLIST style:properties style:dynamic-spacing %boolean; #IMPLIED>--<!ELEMENT style:background-image (office:binary-data?)>-<!ATTLIST style:background-image xlink:type (simple) #IMPLIED>-<!ATTLIST style:background-image xlink:href %uriReference; #IMPLIED>-<!ATTLIST style:background-image xlink:show (embed) #IMPLIED>-<!ATTLIST style:background-image xlink:actuate (onLoad) #IMPLIED>-<!ATTLIST style:background-image style:repeat (no-repeat|repeat|stretch)-								 "repeat">-<!ATTLIST style:background-image style:position CDATA "center">-<!ATTLIST style:background-image style:filter-name %string; #IMPLIED>-<!ATTLIST style:background-image draw:transparency %percentage; #IMPLIED>--<!ELEMENT style:symbol-image (office:binary-data?)>-<!ATTLIST style:symbol-image xlink:type (simple) #IMPLIED>-<!ATTLIST style:symbol-image xlink:href %uriReference; #IMPLIED>-<!ATTLIST style:symbol-image xlink:show (embed) #IMPLIED>-<!ATTLIST style:symbol-image xlink:actuate (onLoad) #IMPLIED>--<!ATTLIST style:properties fo:border CDATA #IMPLIED>-<!ATTLIST style:properties fo:border-top CDATA #IMPLIED>-<!ATTLIST style:properties fo:border-bottom CDATA #IMPLIED>-<!ATTLIST style:properties fo:border-left CDATA #IMPLIED>-<!ATTLIST style:properties fo:border-right CDATA #IMPLIED>-<!ATTLIST style:properties style:border-line-width CDATA #IMPLIED>-<!ATTLIST style:properties style:border-line-width-top CDATA #IMPLIED>-<!ATTLIST style:properties style:border-line-width-bottom CDATA #IMPLIED>-<!ATTLIST style:properties style:border-line-width-left CDATA #IMPLIED>-<!ATTLIST style:properties style:border-line-width-right CDATA #IMPLIED>-<!ATTLIST style:properties fo:padding %nonNegativeLength; #IMPLIED>-<!ATTLIST style:properties fo:padding-top %nonNegativeLength; #IMPLIED>-<!ATTLIST style:properties fo:padding-bottom %nonNegativeLength; #IMPLIED>-<!ATTLIST style:properties fo:padding-left %nonNegativeLength; #IMPLIED>-<!ATTLIST style:properties fo:padding-right %nonNegativeLength; #IMPLIED>-<!ATTLIST style:properties style:shadow CDATA #IMPLIED>-<!ATTLIST style:properties fo:keep-with-next %boolean; #IMPLIED>--<!ATTLIST style:properties text:number-lines %boolean; "false">-<!ATTLIST style:properties text:line-number %nonNegativeInteger; #IMPLIED>--<!ATTLIST style:properties style:decimal-places %nonNegativeInteger; #IMPLIED>-<!ATTLIST style:properties style:tab-stop-distance %nonNegativeLength; #IMPLIED>--<!-- section properties -->-<!ATTLIST style:properties text:dont-balance-text-columns %boolean; #IMPLIED>--<!-- ruby properties -->-<!ATTLIST style:properties style:ruby-align (left|center|right|distribute-letter|distribute-space) #IMPLIED>-<!ATTLIST style:properties style:ruby-position (above|below) #IMPLIED>---<!-- table properties -->-<!ATTLIST style:properties style:width %positiveLength; #IMPLIED>-<!ATTLIST style:properties style:rel-width %percentage; #IMPLIED>-<!ATTLIST style:properties style:may-break-between-rows %boolean; #IMPLIED>-<!ATTLIST style:properties table:page-style-name %styleName; #IMPLIED>-<!ATTLIST style:properties table:display %boolean; #IMPLIED>--<!-- table column properties -->-<!ATTLIST style:properties style:column-width %positiveLength; #IMPLIED>-<!ENTITY % relWidth "CDATA">-<!ATTLIST style:properties style:rel-column-width %relWidth; #IMPLIED>-<!ATTLIST style:properties style:use-optimal-column-width %boolean; #IMPLIED>--<!-- table row properties -->-<!ATTLIST style:properties style:row-height %positiveLength; #IMPLIED>-<!ATTLIST style:properties style:min-row-height %nonNegativeLength; #IMPLIED>-<!ATTLIST style:properties style:use-optimal-row-height %boolean; #IMPLIED>--<!-- table cell properties -->-<!ATTLIST style:properties-	table:align (left | center | right | margins) #IMPLIED-	table:border-model (collapsing | separating) #IMPLIED-	fo:vertical-align (top | middle | bottom | automatic) #IMPLIED-	fo:direction (ltr | ttb) #IMPLIED-	style:glyph-orientation-vertical (auto | 0) #IMPLIED-	style:rotation-angle %nonNegativeInteger; #IMPLIED-	style:rotation-align (none | bottom | top | center) #IMPLIED-	style:cell-protect CDATA #IMPLIED-	fo:wrap-option (no-wrap | wrap) #IMPLIED->-<!ELEMENT style:columns (style:column-sep?,style:column*)>-<!ATTLIST style:columns fo:column-count %nonNegativeInteger; #IMPLIED>-<!ATTLIST style:columns fo:column-gap %positiveLength; #IMPLIED>--<!ELEMENT style:column EMPTY>-<!ATTLIST style:column style:rel-width CDATA #IMPLIED>-<!ATTLIST style:column fo:margin-left %positiveLength; #IMPLIED>-<!ATTLIST style:column fo:margin-right %positiveLength; #IMPLIED>--<!ELEMENT style:column-sep EMPTY>-<!ATTLIST style:column-sep style:style (none|solid|dotted|dashed|dot-dashed)-																	"solid">-<!ATTLIST style:column-sep style:width %length; #REQUIRED>-<!ATTLIST style:column-sep style:height %percentage; "100%">-<!ATTLIST style:column-sep style:vertical-align (top|middle|bottom) "top">-<!ATTLIST style:column-sep style:color %color; "#000000">--<!-- page master properties -->-<!ELEMENT style:page-master (style:properties?, style:header-style?, style:footer-style?)>-<!ATTLIST style:page-master style:name %styleName; #REQUIRED>-<!ATTLIST style:page-master style:page-usage (all|left|right|mirrored) "all">--<!ELEMENT style:header-style (style:properties?)>-<!ELEMENT style:footer-style (style:properties?)>--<!ATTLIST style:properties fo:page-width %length; #IMPLIED>-<!ATTLIST style:properties fo:page-height %length; #IMPLIED>-<!ATTLIST style:properties style:paper-tray-name %string; #IMPLIED>-<!ATTLIST style:properties style:print-orientation (portrait|landscape) #IMPLIED>-<!ATTLIST style:properties style:print CDATA #IMPLIED>-<!ATTLIST style:properties style:print-page-order (ttb|ltr) #IMPLIED>-<!ATTLIST style:properties style:first-page-number %positiveInteger; #IMPLIED>-<!ATTLIST style:properties style:scale-to %percentage; #IMPLIED>-<!ATTLIST style:properties style:scale-to-pages %positiveInteger; #IMPLIED>-<!ATTLIST style:properties style:table-centering (horizontal | vertical | both | none) #IMPLIED>--<!ATTLIST style:properties style:footnote-max-height %lengthOrNoLimit; #IMPLIED>-<!ATTLIST style:properties style:vertical-align (top|bottom|middle|basline|auto) #IMPLIED>-<!ATTLIST style:properties style:writing-mode (lr-tb|rl-tb|tb-rl|tb-lr|lr|rl|tb|page) "lr-tb">-<!ATTLIST style:properties style:layout-grid-mode (none|line|both) #IMPLIED>-<!ATTLIST style:properties style:layout-grid-base-height %length; #IMPLIED>-<!ATTLIST style:properties style:layout-grid-ruby-height %length; #IMPLIED>-<!ATTLIST style:properties style:layout-grid-lines %positiveInteger; #IMPLIED>-<!ATTLIST style:properties style:layout-grid-color %color; #IMPLIED>-<!ATTLIST style:properties style:layout-grid-ruby-below %boolean; #IMPLIED>-<!ATTLIST style:properties style:layout-grid-print %boolean; #IMPLIED>-<!ATTLIST style:properties style:layout-grid-display %boolean; #IMPLIED>-<!ATTLIST style:properties style:snap-to-layout-grid %boolean; #IMPLIED>--<!ELEMENT style:footnote-sep EMPTY>-<!ATTLIST style:footnote-sep style:width %length; #IMPLIED>-<!ATTLIST style:footnote-sep style:rel-width %percentage; #IMPLIED>-<!ATTLIST style:footnote-sep style:color %color; #IMPLIED>-<!ATTLIST style:footnote-sep style:adjustment (left|center|right) "left">-<!ATTLIST style:footnote-sep style:distance-before-sep %length; #IMPLIED>-<!ATTLIST style:footnote-sep style:distance-after-sep %length; #IMPLIED>--<!-- master page -->-<!ELEMENT style:master-page ( (style:header, style:header-left?)?, (style:footer, style:footer-left?)?,-								office:forms?,style:style*, (%shapes;)*, presentation:notes? )>-<!ATTLIST style:master-page style:name %styleName; #REQUIRED>-<!ATTLIST style:master-page style:page-master-name %styleName; #REQUIRED>-<!ATTLIST style:master-page style:next-style-name %styleName; #IMPLIED>-<!ATTLIST style:master-page draw:style-name %styleName; #IMPLIED>--<!-- handout master -->-<!ELEMENT style:handout-master (%shapes;)*>-<!ATTLIST style:handout-master presentation:presentation-page-layout-name %styleName; #IMPLIED>-<!ATTLIST style:handout-master style:page-master-name %styleName; #IMPLIED>---<!ENTITY % hd-ft-content "( %headerText; | (style:region-left?, style:region-center?, style:region-right?) )">-<!ELEMENT style:header %hd-ft-content;>-<!ATTLIST style:header style:display %boolean; "true">-<!ELEMENT style:footer %hd-ft-content;>-<!ATTLIST style:footer style:display %boolean; "true">-<!ELEMENT style:header-left %hd-ft-content;>-<!ATTLIST style:header-left style:display %boolean; "true">-<!ELEMENT style:footer-left %hd-ft-content;>-<!ATTLIST style:footer-left style:display %boolean; "true">--<!ENTITY % region-content "(text:p*)">-<!ELEMENT style:region-left %region-content;>-<!ELEMENT style:region-center %region-content;>-<!ELEMENT style:region-right %region-content;>--<!ELEMENT meta:generator (%cString;)>--<!ELEMENT dc:title (%cString;)>--<!ELEMENT dc:description (%cString;)>--<!ELEMENT dc:subject (%cString;)>--<!ELEMENT meta:keywords (meta:keyword)*>-<!ELEMENT meta:keyword (%cString;)>--<!ELEMENT meta:initial-creator (%cString;)>--<!ELEMENT dc:creator (%cString;)>--<!ELEMENT meta:printed-by (%cString;)>--<!ELEMENT meta:creation-date (%cTimeInstance;)>--<!ELEMENT dc:date (%cTimeInstance;)>--<!ELEMENT meta:print-date (%cTimeInstance;)>--<!ELEMENT meta:template EMPTY>-<!ATTLIST meta:template xlink:type (simple) #FIXED "simple">-<!ATTLIST meta:template xlink:actuate (onRequest) "onRequest">-<!ATTLIST meta:template xlink:href %uriReference; #REQUIRED>-<!ATTLIST meta:template xlink:title %string; #IMPLIED>-<!ATTLIST meta:template meta:date %timeInstance; #IMPLIED>--<!ELEMENT meta:auto-reload EMPTY>-<!ATTLIST meta:auto-reload xlink:type (simple) #IMPLIED>-<!ATTLIST meta:auto-reload xlink:show (replace) #IMPLIED>-<!ATTLIST meta:auto-reload xlink:actuate (onLoad) #IMPLIED>-<!ATTLIST meta:auto-reload xlink:href %uriReference; #IMPLIED>-<!ATTLIST meta:auto-reload meta:delay %timeDuration; "P0S">--<!ELEMENT meta:hyperlink-behaviour EMPTY>-<!ATTLIST meta:hyperlink-behaviour office:target-frame-name %targetFrameName; #IMPLIED>-<!ATTLIST meta:hyperlink-behaviour xlink:show (new|replace) #IMPLIED>--<!ELEMENT dc:language (%cLanguage;)>--<!ELEMENT meta:editing-cycles (%cPositiveInteger;)>--<!ELEMENT meta:editing-duration (%cTimeDuration;)>--<!ELEMENT meta:user-defined (%cString;)>-<!ATTLIST meta:user-defined meta:name %string; #REQUIRED>--<!ELEMENT meta:document-statistic EMPTY>-<!ATTLIST meta:document-statistic meta:page-count %positiveInteger; #IMPLIED-	meta:table-count %nonNegativeInteger; #IMPLIED-	meta:draw-count %nonNegativeInteger; #IMPLIED-	meta:image-count %nonNegativeInteger; #IMPLIED-	meta:ole-object-count %nonNegativeInteger; #IMPLIED-	meta:paragraph-count %nonNegativeInteger; #IMPLIED-	meta:word-count %nonNegativeInteger; #IMPLIED-	meta:character-count %nonNegativeInteger; #IMPLIED-	meta:row-count %nonNegativeInteger; #IMPLIED-	meta:cell-count %nonNegativeInteger; #IMPLIED-	meta:object-count %positiveInteger; #IMPLIED>--<!ELEMENT script:library-embedded (script:module*)>-<!ATTLIST script:library-embedded script:name %string; #REQUIRED>-<!ATTLIST script:library-embedded script:password %string; #IMPLIED>--<!ELEMENT script:library-linked EMPTY>-<!ATTLIST script:library-linked script:name %string; #REQUIRED>-<!ATTLIST script:library-linked xlink:href %string; #REQUIRED>-<!ATTLIST script:library-linked xlink:type (simple) #FIXED "simple">--<!ELEMENT script:module (#PCDATA)>-<!ATTLIST script:module script:name %string; #REQUIRED>-<!ATTLIST script:module script:language %string; #IMPLIED>---<!ENTITY % script-language "script:language %string; #REQUIRED">-<!ENTITY % event-name "script:event-name %string; #REQUIRED">-<!ENTITY % location "script:location (document|application) #REQUIRED">-<!ENTITY % macro-name "script:macro-name %string; #REQUIRED">--<!ELEMENT script:event (#PCDATA)>-<!ATTLIST script:event %script-language;-                       %event-name;-                       %location;-					   %macro-name;>--<!ENTITY % points "CDATA" >-<!ENTITY % pathData "CDATA" >-<!ENTITY % gradient-style "(linear|axial|radial|ellipsoid|square|rectangular)" >-<!ENTITY % draw-position "svg:x %coordinate; #IMPLIED svg:y %coordinate; #IMPLIED">-<!ENTITY % draw-end-position "table:end-cell-address %cell-address; #IMPLIED table:end-x %coordinate; #IMPLIED table:end-y %coordinate; #IMPLIED">-<!ENTITY % draw-size "svg:width %coordinate; #IMPLIED svg:height %coordinate; #IMPLIED">-<!ENTITY % draw-transform "draw:transform CDATA #IMPLIED">-<!ENTITY % draw-viewbox "svg:viewBox CDATA #REQUIRED">-<!ENTITY % draw-style-name "draw:style-name %styleName; #IMPLIED presentation:style-name %styleName; #IMPLIED draw:text-style-name %styleName; #IMPLIED">-<!ENTITY % draw-shape-id "CDATA #IMPLIED" >-<!ENTITY % draw-text "(text:p|text:unordered-list|text:ordered-list)*">-<!ENTITY % zindex "draw:z-index %nonNegativeInteger; #IMPLIED">-<!ENTITY % distance "CDATA">-<!ENTITY % rectanglePoint "(top-left|top|top-right|left|center|right|bottom-left|bottom|bottom-right)">-<!ENTITY % vector3D "CDATA">-<!ENTITY % text-anchor "text:anchor-type %anchorType; #IMPLIED text:anchor-page-number %positiveInteger; #IMPLIED">-<!ENTITY % layerName "CDATA">-<!ENTITY % table-background "table:table-background (true | false) #IMPLIED">--<!-- commont presentation shape attributes -->-<!ENTITY % presentation-style-name "presentation:style-name %styleName; #IMPLIED">-<!ENTITY % presentation-classes "(title|outline|subtitle|text|graphic|object|chart|table|orgchart|page|notes)" >-<!-- ENTITY % presentation-class "presentation:class %presentation-classes; #IMPLIED" -->-<!ENTITY % presentation-class "presentation:class %presentation-classes; #IMPLIED presentation:placeholder (true|false) #IMPLIED presentation:user-transformed (true|false) #IMPLIED">-<!ENTITY % presentationEffects "(none|fade|move|stripes|open|close|dissolve|wavyline|random|lines|laser|appear|hide|move-short|checkerboard|rotate|stretch)" >-<!ENTITY % presentationEffectDirections "(none|from-left|from-top|from-right|from-bottom|from-center|from-upper-left|from-upper-right|from-lower-left|from-lower-right|to-left|to-top|to-right|to-bottom|to-upper-left|to-upper-right|to-lower-right|to-lower-left|path|spiral-inward-left|spiral-inward-right|spiral-outward-left|spiral-outward-right|vertical|horizontal|to-center|clockwise|counter-clockwise)" >-<!ENTITY % presentationSpeeds "(slow|medium|fast)" >--<!-- Drawing shapes -->-<!ELEMENT draw:rect ( office:events?, %draw-text; )>-<!ATTLIST draw:rect %draw-position; >-<!ATTLIST draw:rect %draw-end-position; >-<!ATTLIST draw:rect %table-background; >-<!ATTLIST draw:rect %draw-size; >-<!ATTLIST draw:rect %draw-style-name; >-<!ATTLIST draw:rect %draw-transform; >-<!ATTLIST draw:rect draw:corner-radius %nonNegativeLength; #IMPLIED>-<!ATTLIST draw:rect %zindex;>-<!ATTLIST draw:rect draw:id %draw-shape-id;>-<!ATTLIST draw:rect %text-anchor;>-<!ATTLIST draw:rect draw:layer %layerName; #IMPLIED>--<!ELEMENT draw:line ( office:events?, %draw-text; )>-<!ATTLIST draw:line svg:x1 %length; #IMPLIED>-<!ATTLIST draw:line svg:y1 %length; #IMPLIED>-<!ATTLIST draw:line svg:x2 %length; #REQUIRED>-<!ATTLIST draw:line svg:y2 %length; #REQUIRED>-<!ATTLIST draw:line svg:y %coordinate; #IMPLIED>-<!ATTLIST draw:line %draw-style-name; >-<!ATTLIST draw:line %draw-transform; >-<!ATTLIST draw:line %zindex;>-<!ATTLIST draw:line %draw-end-position; >-<!ATTLIST draw:line %table-background; >-<!ATTLIST draw:line draw:id %draw-shape-id;>-<!ATTLIST draw:line %text-anchor;>-<!ATTLIST draw:line draw:layer %layerName; #IMPLIED>--<!ELEMENT draw:polyline ( office:events?, %draw-text; )>-<!ATTLIST draw:polyline %draw-position; >-<!ATTLIST draw:polyline %draw-size; >-<!ATTLIST draw:polyline %draw-viewbox; >-<!ATTLIST draw:polyline draw:points %points; #REQUIRED>-<!ATTLIST draw:polyline %draw-style-name; >-<!ATTLIST draw:polyline %draw-transform; >-<!ATTLIST draw:polyline %zindex;>-<!ATTLIST draw:polyline %draw-end-position; >-<!ATTLIST draw:polyline %table-background; >-<!ATTLIST draw:polyline draw:id %draw-shape-id;>-<!ATTLIST draw:polyline %text-anchor;>-<!ATTLIST draw:polyline draw:layer %layerName; #IMPLIED>--<!ELEMENT draw:polygon ( office:events?, %draw-text; )>-<!ATTLIST draw:polygon %draw-position; >-<!ATTLIST draw:polygon %draw-end-position; >-<!ATTLIST draw:polygon %table-background; >-<!ATTLIST draw:polygon %draw-size; >-<!ATTLIST draw:polygon %draw-viewbox; >-<!ATTLIST draw:polygon draw:points %points; #REQUIRED >-<!ATTLIST draw:polygon %draw-style-name; >-<!ATTLIST draw:polygon %draw-transform; >-<!ATTLIST draw:polygon %zindex;>-<!ATTLIST draw:polygon draw:id %draw-shape-id;>-<!ATTLIST draw:polygon %text-anchor;>-<!ATTLIST draw:polygon draw:layer %layerName; #IMPLIED>--<!ELEMENT draw:path ( office:events?, %draw-text; )>-<!ATTLIST draw:path %draw-position;>-<!ATTLIST draw:path %draw-end-position; >-<!ATTLIST draw:path %table-background; >-<!ATTLIST draw:path %draw-size; >-<!ATTLIST draw:path %draw-viewbox; >-<!ATTLIST draw:path svg:d %pathData; #REQUIRED >-<!ATTLIST draw:path %draw-style-name; >-<!ATTLIST draw:path %draw-transform; >-<!ATTLIST draw:path %zindex;>-<!ATTLIST draw:path draw:id %draw-shape-id;>-<!ATTLIST draw:path %text-anchor;>-<!ATTLIST draw:path draw:layer %layerName; #IMPLIED>--<!ELEMENT draw:circle ( office:events?, %draw-text; )>-<!ATTLIST draw:circle %draw-position; >-<!ATTLIST draw:circle %draw-size; >-<!ATTLIST draw:circle %draw-style-name; >-<!ATTLIST draw:circle %draw-transform; >-<!ATTLIST draw:circle %zindex;>-<!ATTLIST draw:circle %draw-end-position; >-<!ATTLIST draw:circle %table-background; >-<!ATTLIST draw:circle draw:id %draw-shape-id;>-<!ATTLIST draw:circle draw:kind (full|section|cut|arc) "full">-<!ATTLIST draw:circle draw:start-angle %nonNegativeInteger; #IMPLIED>-<!ATTLIST draw:circle draw:end-angle %nonNegativeInteger; #IMPLIED>-<!ATTLIST draw:circle %text-anchor;>-<!ATTLIST draw:circle draw:layer %layerName; #IMPLIED>--<!ELEMENT draw:ellipse ( office:events?, %draw-text; )>-<!ATTLIST draw:ellipse %draw-position; >-<!ATTLIST draw:ellipse %draw-size; >-<!ATTLIST draw:ellipse %draw-style-name; >-<!ATTLIST draw:ellipse %draw-transform; >-<!ATTLIST draw:ellipse %zindex;>-<!ATTLIST draw:ellipse %draw-end-position; >-<!ATTLIST draw:ellipse %table-background; >-<!ATTLIST draw:ellipse draw:id %draw-shape-id;>-<!ATTLIST draw:ellipse draw:kind (full|section|cut|arc) "full">-<!ATTLIST draw:ellipse draw:start-angle %nonNegativeInteger; #IMPLIED>-<!ATTLIST draw:ellipse draw:end-angle %nonNegativeInteger; #IMPLIED>-<!ATTLIST draw:ellipse  %text-anchor;>-<!ATTLIST draw:ellipse draw:layer %layerName; #IMPLIED>--<!ELEMENT draw:connector ( office:events?, %draw-text;)>-<!ATTLIST draw:connector draw:type (standard|lines|line|curve) "standard">-<!ATTLIST draw:connector draw:line-skew CDATA #IMPLIED>-<!ATTLIST draw:connector %draw-style-name;>-<!ATTLIST draw:connector svg:x1 %coordinate; #REQUIRED>-<!ATTLIST draw:connector svg:y1 %coordinate; #REQUIRED>-<!ATTLIST draw:connector svg:x2 %coordinate; #REQUIRED>-<!ATTLIST draw:connector svg:y2 %coordinate; #REQUIRED>-<!ATTLIST draw:connector draw:start-shape %draw-shape-id;>-<!ATTLIST draw:connector draw:start-glue-point %integer; #IMPLIED>-<!ATTLIST draw:connector draw:end-shape %draw-shape-id;>-<!ATTLIST draw:connector draw:end-glue-point %integer; #IMPLIED>-<!ATTLIST draw:connector %zindex;>-<!ATTLIST draw:connector %draw-end-position; >-<!ATTLIST draw:connector %table-background; >-<!ATTLIST draw:connector draw:id %draw-shape-id;>-<!ATTLIST draw:connector %text-anchor;>-<!ATTLIST draw:connector draw:layer %layerName; #IMPLIED>--<!ELEMENT draw:control EMPTY>-<!ATTLIST draw:control %draw-style-name;>-<!ATTLIST draw:control %draw-position; >-<!ATTLIST draw:control %draw-size; >-<!ATTLIST draw:control %control-id; >-<!ATTLIST draw:control %zindex;>-<!ATTLIST draw:control %draw-end-position; >-<!ATTLIST draw:control %table-background; >-<!ATTLIST draw:control draw:id %draw-shape-id;>-<!ATTLIST draw:control %text-anchor;>-<!ATTLIST draw:control draw:layer %layerName; #IMPLIED>--<!ELEMENT draw:g ( office:events?, (%shapes;)* ) >-<!ATTLIST draw:g svg:y %coordinate; #IMPLIED>-<!ATTLIST draw:g %draw-transform; >-<!ATTLIST draw:g draw:name %string; #IMPLIED>-<!ATTLIST draw:g %draw-style-name; >-<!ATTLIST draw:g %zindex;>-<!ATTLIST draw:g %draw-end-position; >-<!ATTLIST draw:g %table-background; >-<!ATTLIST draw:g draw:id %draw-shape-id;>-<!ATTLIST draw:g %text-anchor;>-<!ATTLIST draw:g draw:layer %layerName; #IMPLIED>--<!ELEMENT draw:page-thumbnail EMPTY>-<!ATTLIST draw:page-thumbnail draw:page-number %positiveInteger; #IMPLIED>-<!ATTLIST draw:page-thumbnail %draw-position; >-<!ATTLIST draw:page-thumbnail %draw-size; >-<!ATTLIST draw:page-thumbnail %draw-style-name; >-<!ATTLIST draw:page-thumbnail %presentation-class; >-<!ATTLIST draw:page-thumbnail %zindex;>-<!ATTLIST draw:page-thumbnail %draw-end-position; >-<!ATTLIST draw:page-thumbnail %table-background; >-<!ATTLIST draw:page-thumbnail draw:id %draw-shape-id;>-<!ATTLIST draw:page-thumbnail %text-anchor;>-<!ATTLIST draw:page-thumbnail draw:layer %layerName; #IMPLIED>--<!ELEMENT draw:caption ( office:events?, %draw-text;)>-<!ATTLIST draw:caption %draw-position; >-<!ATTLIST draw:caption %draw-end-position; >-<!ATTLIST draw:caption %table-background; >-<!ATTLIST draw:caption %draw-size; >-<!ATTLIST draw:caption %draw-style-name; >-<!ATTLIST draw:caption %draw-transform; >-<!ATTLIST draw:caption draw:caption-point-x %coordinate; #IMPLIED>-<!ATTLIST draw:caption draw:caption-point-y %coordinate; #IMPLIED>-<!ATTLIST draw:caption %zindex;>-<!ATTLIST draw:caption draw:id %draw-shape-id;>-<!ATTLIST draw:caption  %text-anchor;>-<!ATTLIST draw:caption draw:layer %layerName; #IMPLIED>-<!ATTLIST draw:caption draw:corner-radius %nonNegativeLength; #IMPLIED>--<!ELEMENT draw:measure ( office:events?, %draw-text;)>-<!ATTLIST draw:measure svg:x1 %coordinate; #REQUIRED>-<!ATTLIST draw:measure svg:y1 %coordinate; #REQUIRED>-<!ATTLIST draw:measure svg:x2 %coordinate; #REQUIRED>-<!ATTLIST draw:measure svg:y2 %coordinate; #REQUIRED>-<!ATTLIST draw:measure %draw-end-position; >-<!ATTLIST draw:measure %table-background; >-<!ATTLIST draw:measure %draw-style-name; >-<!ATTLIST draw:measure %draw-transform; >-<!ATTLIST draw:measure %zindex;>-<!ATTLIST draw:measure draw:id %draw-shape-id;>-<!ATTLIST draw:measure %text-anchor;>-<!ATTLIST draw:measure draw:layer %layerName; #IMPLIED>--<!-- graphic style elements -->-<!ELEMENT draw:gradient EMPTY >-<!ATTLIST draw:gradient draw:name %styleName; #REQUIRED>-<!ATTLIST draw:gradient draw:style %gradient-style; #REQUIRED>-<!ATTLIST draw:gradient draw:cx %coordinate; #IMPLIED>-<!ATTLIST draw:gradient draw:cy %coordinate; #IMPLIED>-<!ATTLIST draw:gradient draw:start-color %color; #IMPLIED>-<!ATTLIST draw:gradient draw:end-color %color; #IMPLIED>-<!ATTLIST draw:gradient draw:start-intensity %percentage; #IMPLIED>-<!ATTLIST draw:gradient draw:end-intensity %percentage; #IMPLIED>-<!ATTLIST draw:gradient draw:angle %integer; #IMPLIED>-<!ATTLIST draw:gradient draw:border %percentage; #IMPLIED>--<!ELEMENT draw:hatch EMPTY >-<!ATTLIST draw:hatch draw:name %styleName; #REQUIRED>-<!ATTLIST draw:hatch draw:style (single|double|triple) #REQUIRED >-<!ATTLIST draw:hatch draw:color %color; #IMPLIED>-<!ATTLIST draw:hatch draw:distance %length; #IMPLIED>-<!ATTLIST draw:hatch draw:rotation %integer; #IMPLIED>---<!ELEMENT draw:fill-image EMPTY >-<!ATTLIST draw:fill-image draw:name %styleName; #REQUIRED>-<!ATTLIST draw:fill-image xlink:href %uriReference; #REQUIRED>-<!ATTLIST draw:fill-image xlink:type (simple) #IMPLIED>-<!ATTLIST draw:fill-image xlink:show (embed) #IMPLIED>-<!ATTLIST draw:fill-image xlink:actuate (onLoad) #IMPLIED>-<!ATTLIST draw:fill-image svg:width %length; #IMPLIED>-<!ATTLIST draw:fill-image svg:height %length; #IMPLIED>--<!ELEMENT draw:transparency EMPTY>-<!ATTLIST draw:transparency draw:name %styleName; #REQUIRED>-<!ATTLIST draw:transparency draw:style %gradient-style; #REQUIRED>-<!ATTLIST draw:transparency draw:cx %coordinate; #IMPLIED>-<!ATTLIST draw:transparency draw:cy %coordinate; #IMPLIED>-<!ATTLIST draw:transparency draw:start %percentage; #IMPLIED>-<!ATTLIST draw:transparency draw:end %percentage; #IMPLIED>-<!ATTLIST draw:transparency draw:angle %integer; #IMPLIED>-<!ATTLIST draw:transparency draw:border %percentage; #IMPLIED>--<!ELEMENT draw:marker EMPTY>-<!ATTLIST draw:marker draw:name %styleName; #REQUIRED>-<!ATTLIST draw:marker %draw-viewbox; >-<!ATTLIST draw:marker svg:d %pathData; #REQUIRED>--<!ELEMENT draw:stroke-dash EMPTY>-<!ATTLIST draw:stroke-dash draw:name %styleName; #REQUIRED>-<!ATTLIST draw:stroke-dash draw:style (rect|round) #IMPLIED>-<!ATTLIST draw:stroke-dash draw:dots1 %integer; #IMPLIED>-<!ATTLIST draw:stroke-dash draw:dots1-length %length; #IMPLIED>-<!ATTLIST draw:stroke-dash draw:dots2 %integer; #IMPLIED>-<!ATTLIST draw:stroke-dash draw:dots2-length %length; #IMPLIED>-<!ATTLIST draw:stroke-dash draw:distance %length; #IMPLIED>--<!-- stroke attributes -->-<!ATTLIST style:properties draw:stroke (none|dash|solid) #IMPLIED>-<!ATTLIST style:properties draw:stroke-dash CDATA #IMPLIED>-<!ATTLIST style:properties svg:stroke-width %length; #IMPLIED>-<!ATTLIST style:properties svg:stroke-color %color; #IMPLIED>-<!ATTLIST style:properties draw:marker-start %styleName; #IMPLIED>-<!ATTLIST style:properties draw:marker-end %styleName; #IMPLIED>-<!ATTLIST style:properties draw:marker-start-width %length; #IMPLIED>-<!ATTLIST style:properties draw:marker-end-width %length; #IMPLIED>-<!ATTLIST style:properties draw:marker-start-center %boolean; #IMPLIED>-<!ATTLIST style:properties draw:marker-end-center %boolean; #IMPLIED>-<!ATTLIST style:properties svg:stroke-opacity %floatOrPercentage; #IMPLIED>-<!ATTLIST style:properties svg:stroke-linejoin (miter|round|bevel|middle|none|inherit) #IMPLIED>--<!-- text attributes -->-<!ATTLIST style:properties draw:auto-grow-width %boolean; #IMPLIED>-<!ATTLIST style:properties draw:auto-grow-height %boolean; #IMPLIED>-<!ATTLIST style:properties draw:fit-to-size %boolean; #IMPLIED>-<!ATTLIST style:properties draw:fit-to-contour %boolean; #IMPLIED>-<!ATTLIST style:properties draw:textarea-horizontal-align ( left | center | right | justify ) #IMPLIED>-<!ATTLIST style:properties draw:textarea-vertical-align ( top | middle | bottom | justify ) #IMPLIED>-<!ATTLIST style:properties draw:writing-mode (lr-tb|tb-rl) "lr-tb">--<!-- fill attributes -->-<!ATTLIST style:properties draw:fill (none|solid|bitmap|gradient|hatch) #IMPLIED>-<!ATTLIST style:properties draw:fill-color %color; #IMPLIED>-<!ATTLIST style:properties draw:fill-gradient-name %styleName; #IMPLIED>-<!ATTLIST style:properties draw:gradient-step-count CDATA #IMPLIED>-<!ATTLIST style:properties draw:fill-hatch-name %styleName; #IMPLIED>-<!ATTLIST style:properties draw:fill-hatch-solid %boolean; #IMPLIED>-<!ATTLIST style:properties draw:fill-image-name %styleName; #IMPLIED>-<!ATTLIST style:properties style:repeat (no-repeat|repeat|stretch) #IMPLIED>-<!ATTLIST style:properties draw:fill-image-width %lengthOrPercentage; #IMPLIED>-<!ATTLIST style:properties draw:fill-image-height %lengthOrPercentage; #IMPLIED>-<!ATTLIST style:properties draw:fill-image-ref-point-x %percentage; #IMPLIED>-<!ATTLIST style:properties draw:fill-image-ref-point-y %percentage; #IMPLIED>-<!ATTLIST style:properties draw:fill-image-ref-point %rectanglePoint; #IMPLIED>-<!ATTLIST style:properties draw:tile-repeat-offset CDATA #IMPLIED>-<!ATTLIST style:properties draw:transparency %percentage; #IMPLIED>-<!ATTLIST style:properties draw:transparency-name %styleName; #IMPLIED>--<!-- graphic attributes -->-<!ATTLIST style:properties draw:color-mode (greyscale|mono|watermark|standard) #IMPLIED>-<!ATTLIST style:properties draw:luminance %percentage; #IMPLIED>-<!ATTLIST style:properties draw:contrast %percentage; #IMPLIED>-<!ATTLIST style:properties draw:gamma %percentage; #IMPLIED>-<!ATTLIST style:properties draw:red %percentage; #IMPLIED>-<!ATTLIST style:properties draw:green %percentage; #IMPLIED>-<!ATTLIST style:properties draw:blue %percentage; #IMPLIED>-<!ATTLIST style:properties draw:color-inversion %boolean; #IMPLIED>-<!ATTLIST style:properties draw:mirror %boolean; #IMPLIED>--<!-- shadow attributes -->-<!ATTLIST style:properties draw:shadow (visible|hidden) #IMPLIED>-<!ATTLIST style:properties draw:shadow-offset-x %length; #IMPLIED>-<!ATTLIST style:properties draw:shadow-offset-y %length; #IMPLIED>-<!ATTLIST style:properties draw:shadow-color %color; #IMPLIED>-<!ATTLIST style:properties draw:shadow-transparency CDATA #IMPLIED>--<!-- connector attributes -->-<!ATTLIST style:properties draw:start-line-spacing-horizontal %distance; #IMPLIED>-<!ATTLIST style:properties draw:start-line-spacing-vertical %distance; #IMPLIED>-<!ATTLIST style:properties draw:end-line-spacing-horizontal %distance; #IMPLIED>-<!ATTLIST style:properties draw:end-line-spacing-vertical %distance; #IMPLIED>--<!-- measure attributes -->-<!ATTLIST style:properties draw:line-distance %distance; #IMPLIED>-<!ATTLIST style:properties draw:guide-overhang %distance; #IMPLIED>-<!ATTLIST style:properties draw:guide-distance %distance; #IMPLIED>-<!ATTLIST style:properties draw:start-guide %distance; #IMPLIED>-<!ATTLIST style:properties draw:end-guide %distance; #IMPLIED>-<!ATTLIST style:properties draw:measure-align (automatic|left-outside|inside|right-outside) #IMPLIED>-<!ATTLIST style:properties draw:measure-vertical-align (automatic|above|below|center) #IMPLIED>-<!ATTLIST style:properties draw:unit (automatic|mm|cm|m|km|pt|pc|inch|ft|mi) #IMPLIED>-<!ATTLIST style:properties draw:show-unit %boolean; #IMPLIED>-<!ATTLIST style:properties draw:placing (below|above) #IMPLIED>-<!ATTLIST style:properties draw:parallel %boolean; #IMPLIED>-<!ATTLIST style:properties draw:decimal-places %nonNegativeLength; #IMPLIED>--<!-- frame attributes -->-<!ATTLIST style:properties draw:frame-display-scrollbar %boolean; #IMPLIED>-<!ATTLIST style:properties draw:frame-display-border %boolean; #IMPLIED>-<!ATTLIST style:properties draw:frame-margin-horizontal %nonNegativePixelLength; #IMPLIED>-<!ATTLIST style:properties draw:frame-margin-vertical %nonNegativePixelLength; #IMPLIED>-<!ATTLIST style:properties draw:size-protect %boolean; #IMPLIED>-<!ATTLIST style:properties draw:move-protect %boolean; #IMPLIED>--<!-- ole object attributes -->-<!ATTLIST style:properties draw:visible-area-left %nonNegativeLength; #IMPLIED>-<!ATTLIST style:properties draw:visible-area-top %nonNegativeLength; #IMPLIED>-<!ATTLIST style:properties draw:visible-area-width %positiveLength; #IMPLIED>-<!ATTLIST style:properties draw:visible-area-height %positiveLength; #IMPLIED>--<!-- fontwork attributes -->-<!ATTLIST style:properties draw:fontwork-style (rotate|upright|slant-x|slant-y|none) #IMPLIED>-<!ATTLIST style:properties draw:fontwork-adjust (left|right|autosize|center) #IMPLIED>-<!ATTLIST style:properties draw:fontwork-distance %distance; #IMPLIED>-<!ATTLIST style:properties draw:fontwork-start %distance; #IMPLIED>-<!ATTLIST style:properties draw:fontwork-mirror %boolean; #IMPLIED>-<!ATTLIST style:properties draw:fontwork-outline %boolean; #IMPLIED>-<!ATTLIST style:properties draw:fontwork-shadow (normal|slant|none) #IMPLIED>-<!ATTLIST style:properties draw:fontwork-shadow-color %color; #IMPLIED>-<!ATTLIST style:properties draw:fontwork-shadow-offset-x %distance; #IMPLIED>-<!ATTLIST style:properties draw:fontwork-shadow-offset-y %distance; #IMPLIED>-<!ATTLIST style:properties draw:fontwork-form (none|top-circle|bottom-circle|left-circle|right-circle|top-arc|bottom-arc|left-arc|right-arc|button1|button2|button3|button4) #IMPLIED>-<!ATTLIST style:properties draw:fontwork-hide-form %boolean; #IMPLIED>-<!ATTLIST style:properties draw:fontwork-shadow-transparence %percentage; #IMPLIED>--<!-- caption attributes -->-<!ATTLIST style:properties draw:caption-type (straight-line|angled-line|angled-connector-line) #IMPLIED>-<!ATTLIST style:properties draw:caption-angle-type (fixed|free) #IMPLIED>-<!ATTLIST style:properties draw:caption-angle %nonNegativeInteger; #IMPLIED>-<!ATTLIST style:properties draw:caption-gap %distance; #IMPLIED>-<!ATTLIST style:properties draw:caption-escape-direction (horizontal|vertical|auto) #IMPLIED>-<!ATTLIST style:properties draw:caption-escape %lengthOrPercentage; #IMPLIED>-<!ATTLIST style:properties draw:caption-line-length %distance; #IMPLIED>-<!ATTLIST style:properties draw:caption-fit-line-length %boolean; #IMPLIED>--<!-- Animations -->-<!ELEMENT presentation:sound EMPTY>-<!ATTLIST presentation:sound xlink:href %uriReference; #REQUIRED>-<!ATTLIST presentation:sound xlink:type (simple) #FIXED "simple">-<!ATTLIST presentation:sound xlink:show (new|replace) #IMPLIED>-<!ATTLIST presentation:sound xlink:actuate (onRequest) "onRequest">-<!ATTLIST presentation:sound presentation:play-full %boolean; #IMPLIED>--<!ELEMENT presentation:show-shape (presentation:sound)?>-<!ATTLIST presentation:show-shape draw:shape-id CDATA #REQUIRED>-<!ATTLIST presentation:show-shape presentation:effect %presentationEffects; "none">-<!ATTLIST presentation:show-shape presentation:direction %presentationEffectDirections; "none">-<!ATTLIST presentation:show-shape presentation:speed %presentationSpeeds; "medium">-<!ATTLIST presentation:show-shape presentation:start-scale %percentage; "100%">-<!ATTLIST presentation:show-shape presentation:path-id CDATA #IMPLIED >--<!ELEMENT presentation:show-text (presentation:sound)?>-<!ATTLIST presentation:show-text draw:shape-id CDATA #REQUIRED>-<!ATTLIST presentation:show-text presentation:effect %presentationEffects; "none">-<!ATTLIST presentation:show-text presentation:direction %presentationEffectDirections; "none">-<!ATTLIST presentation:show-text presentation:speed %presentationSpeeds; "medium">-<!ATTLIST presentation:show-text presentation:start-scale %percentage; "100%">-<!ATTLIST presentation:show-text presentation:path-id CDATA #IMPLIED >--<!ELEMENT presentation:hide-shape (presentation:sound)?>-<!ATTLIST presentation:hide-shape draw:shape-id CDATA #REQUIRED>-<!ATTLIST presentation:hide-shape presentation:effect %presentationEffects; "none">-<!ATTLIST presentation:hide-shape presentation:direction %presentationEffectDirections; "none">-<!ATTLIST presentation:hide-shape presentation:speed %presentationSpeeds; "medium">-<!ATTLIST presentation:hide-shape presentation:start-scale %percentage; "100%">-<!ATTLIST presentation:hide-shape presentation:path-id CDATA #IMPLIED >--<!ELEMENT presentation:hide-text (presentation:sound)?>-<!ATTLIST presentation:hide-text draw:shape-id CDATA #REQUIRED>-<!ATTLIST presentation:hide-text presentation:effect %presentationEffects; "none">-<!ATTLIST presentation:hide-text presentation:direction %presentationEffectDirections; "none">-<!ATTLIST presentation:hide-text presentation:speed %presentationSpeeds; "medium">-<!ATTLIST presentation:hide-text presentation:start-scale %percentage; "100%">-<!ATTLIST presentation:hide-text presentation:path-id CDATA #IMPLIED >--<!ELEMENT presentation:dim (presentation:sound)?>-<!ATTLIST presentation:dim draw:shape-id CDATA #REQUIRED>-<!ATTLIST presentation:dim draw:color %color; #REQUIRED>--<!ELEMENT presentation:play EMPTY>-<!ATTLIST presentation:play draw:shape-id CDATA #REQUIRED>-<!ATTLIST presentation:play presentation:speed %presentationSpeeds; "medium">--<!ELEMENT presentation:animations (presentation:show-shape|presentation:show-text|presentation:hide-shape|presentation:hide-text|presentation:dim|presentation:play)*>--<!ELEMENT presentation:show EMPTY>-<!ATTLIST presentation:show presentation:name %styleName; #REQUIRED>-<!ATTLIST presentation:show presentation:pages CDATA #REQUIRED>--<!ELEMENT presentation:settings (presentation:show)*>-<!ATTLIST presentation:settings presentation:start-page %styleName; #IMPLIED>-<!ATTLIST presentation:settings presentation:show %styleName; #IMPLIED>-<!ATTLIST presentation:settings presentation:full-screen %boolean; "true">-<!ATTLIST presentation:settings presentation:endless %boolean; "false">-<!ATTLIST presentation:settings presentation:pause %timeDuration; #IMPLIED>-<!ATTLIST presentation:settings presentation:show-logo %boolean; "false">-<!ATTLIST presentation:settings presentation:force-manual %boolean; "false">-<!ATTLIST presentation:settings presentation:mouse-visible %boolean; "true">-<!ATTLIST presentation:settings presentation:mouse-as-pen %boolean; "false">-<!ATTLIST presentation:settings presentation:start-with-navigator %boolean; "false">-<!ATTLIST presentation:settings presentation:animations (enabled|disabled) "enabled">-<!ATTLIST presentation:settings presentation:stay-on-top %boolean; "false">-<!ATTLIST presentation:settings presentation:transition-on-click (enabled|disabled) "enabled">--<!-- Drawing page -->-<!ELEMENT draw:page (office:forms?,(%shapes;)*,presentation:animations?,presentation:notes?)>-<!ATTLIST draw:page draw:name %string; #IMPLIED>-<!ATTLIST draw:page draw:style-name %styleName; #IMPLIED>-<!ATTLIST draw:page draw:master-page-name %styleName; #REQUIRED>-<!ATTLIST draw:page presentation:presentation-page-layout-name %styleName; #IMPLIED>-<!ATTLIST draw:page draw:id %nonNegativeInteger; #IMPLIED>-<!ATTLIST draw:page xlink:href %uriReference; #IMPLIED>-<!ATTLIST draw:page xlink:type (simple) #IMPLIED>-<!ATTLIST draw:page xlink:show (replace) #IMPLIED>-<!ATTLIST draw:page xlink:actuate (onRequest) #IMPLIED>--<!-- Presentation notes -->-<!ELEMENT presentation:notes (%shapes;)*>-<!ATTLIST presentation:notes style:page-master-name %styleName; #IMPLIED>--<!-- presentation page layouts -->-<!ELEMENT style:presentation-page-layout (presentation:placeholder)* >-<!ATTLIST style:presentation-page-layout style:name %styleName; #REQUIRED>-<!ELEMENT presentation:placeholder EMPTY >-<!ATTLIST presentation:placeholder presentation:object (title|outline|subtitle|text|graphic|object|chart|orgchart|page|notes|handout) #REQUIRED>-<!ATTLIST presentation:placeholder svg:x %coordinateOrPercentage; #REQUIRED>-<!ATTLIST presentation:placeholder svg:y %coordinateOrPercentage; #REQUIRED>-<!ATTLIST presentation:placeholder svg:width %lengthOrPercentage; #REQUIRED>-<!ATTLIST presentation:placeholder svg:height %lengthOrPercentage; #REQUIRED>--<!-- presentation page attributes -->-<!ATTLIST style:properties presentation:transition-type (manual|automatic|semi-automatic) #IMPLIED >-<!ATTLIST style:properties presentation:transition-style (none|fade-from-left|fade-from-top|fade-from-right|fade-from-bottom|fade-to-center|fade-from-center|move-from-left|move-from-top|move-from-right|move-from-bottom|roll-from-top|roll-from-left|roll-from-right|roll-from-bottom|vertical-stripes|horizontal-stripes|clockwise|counterclockwise|fade-from-upperleft|fade-from-upperright|fade-from-lowerleft|fade-from-lowerright|close-vertical|close-horizontal|open-vertical|open-horizontal|spiralin-left|spiralin-right|spiralout-left|spiralout-right|dissolve|wavyline-from-left|wavyline-from-top|wavyline-from-right|wavyline-from-bottom|random|stretch-from-left|stretch-from-top|stretch-from-right|stretch-from-bottom|vertical-lines|horizontal-lines) #IMPLIED >-<!ATTLIST style:properties presentation:transition-speed %presentationSpeeds; #IMPLIED >-<!ATTLIST style:properties presentation:duration %timeDuration; #IMPLIED>-<!ATTLIST style:properties presentation:visibility (visible|hidden) #IMPLIED>-<!ATTLIST style:properties draw:background-size (full|border) #IMPLIED>-<!ATTLIST style:properties presentation:background-objects-visible %boolean; #IMPLIED>-<!ATTLIST style:properties presentation:background-visible %boolean; #IMPLIED>---<!-- text boxes -->-<!ELEMENT draw:text-box (office:events?,draw:image-map?,-		%sectionText;)>-<!ATTLIST draw:text-box %draw-style-name;>-<!ATTLIST draw:text-box %draw-transform; >-<!ATTLIST draw:text-box draw:name %string; #IMPLIED>-<!ATTLIST draw:text-box draw:chain-next-name %string; #IMPLIED>--<!ATTLIST draw:text-box %text-anchor;>-<!ATTLIST draw:text-box %draw-position;>-<!ATTLIST draw:text-box %draw-end-position; >-<!ATTLIST draw:text-box %table-background; >-<!ATTLIST draw:text-box svg:width %lengthOrPercentage; #IMPLIED>-<!ATTLIST draw:text-box svg:height %lengthOrPercentage; #IMPLIED>-<!ATTLIST draw:text-box style:rel-width %percentage; #IMPLIED>-<!ATTLIST draw:text-box style:rel-height %percentage; #IMPLIED>-<!ATTLIST draw:text-box fo:min-height %lengthOrPercentage; #IMPLIED>-<!ATTLIST draw:text-box %zindex;>-<!ATTLIST draw:text-box %presentation-class; >-<!ATTLIST draw:text-box draw:id %draw-shape-id;>-<!ATTLIST draw:text-box draw:layer %layerName; #IMPLIED>-<!ATTLIST draw:text-box draw:corner-radius %nonNegativeLength; #IMPLIED>--<!-- image -->-<!ELEMENT draw:image (office:binary-data?,office:events?,draw:image-map?,svg:desc?,(draw:contour-polygon|draw:contour-path)?)>-<!ATTLIST draw:image %draw-transform; >-<!ATTLIST draw:image %draw-style-name;>-<!ATTLIST draw:image draw:name %string; #IMPLIED>-<!ATTLIST draw:image xlink:href %uriReference; #IMPLIED>-<!ATTLIST draw:image xlink:type (simple) #IMPLIED>-<!ATTLIST draw:image xlink:show (embed) #IMPLIED>-<!ATTLIST draw:image xlink:actuate (onLoad) #IMPLIED>-<!ATTLIST draw:image draw:filter-name %string; #IMPLIED>-<!ATTLIST draw:image %text-anchor;>-<!ATTLIST draw:image %draw-position;>-<!ATTLIST draw:image %draw-end-position; >-<!ATTLIST draw:image %table-background; >-<!ATTLIST draw:image svg:width %lengthOrPercentage; #IMPLIED>-<!ATTLIST draw:image svg:height %lengthOrPercentage; #IMPLIED>-<!ATTLIST draw:image %presentation-class; >-<!ATTLIST draw:image %zindex;>-<!ATTLIST draw:image draw:id %draw-shape-id;>-<!ATTLIST draw:image draw:layer %layerName; #IMPLIED>-<!ATTLIST draw:image style:rel-width %percentage; #IMPLIED>-<!ATTLIST draw:image style:rel-height %percentage; #IMPLIED>--<!-- objects -->-<!ELEMENT draw:thumbnail EMPTY>-<!ATTLIST draw:thumbnail xlink:href %uriReference; #REQUIRED>-<!ATTLIST draw:thumbnail xlink:type (simple) #IMPLIED>-<!ATTLIST draw:thumbnail xlink:show (embed) #IMPLIED>-<!ATTLIST draw:thumbnail xlink:actuate (onLoad) #IMPLIED>--<!ELEMENT math:math ANY> <!-- dummy (we have no MathML DTD currently)-->-<!ELEMENT draw:object (draw:thumbnail?,(office:document|math:math)?,office:events?, draw:image-map?, svg:desc?,(draw:contour-polygon|draw:contour-path)?)>-<!ATTLIST draw:object %draw-style-name;>-<!ATTLIST draw:object draw:name %string; #IMPLIED>-<!ATTLIST draw:object xlink:href %uriReference; #IMPLIED>-<!ATTLIST draw:object xlink:type (simple) #IMPLIED>-<!ATTLIST draw:object xlink:show (embed) #IMPLIED>-<!ATTLIST draw:object xlink:actuate (onLoad) #IMPLIED>-<!ATTLIST draw:object %text-anchor;>-<!ATTLIST draw:object %draw-position;>-<!ATTLIST draw:object %draw-end-position; >-<!ATTLIST draw:object %table-background; >-<!ATTLIST draw:object svg:width %lengthOrPercentage; #IMPLIED>-<!ATTLIST draw:object svg:height %lengthOrPercentage; #IMPLIED>-<!ATTLIST draw:object %presentation-class; >-<!ATTLIST draw:object %zindex;>-<!ATTLIST draw:object draw:id %draw-shape-id;>-<!ATTLIST draw:object draw:layer %layerName; #IMPLIED>-<!ATTLIST draw:object draw:notify-on-update-of-ranges %string; #IMPLIED>-<!ATTLIST draw:object style:rel-width %percentage; #IMPLIED>-<!ATTLIST draw:object style:rel-height %percentage; #IMPLIED>--<!ELEMENT draw:object-ole (office:binary-data?|office:events?|draw:image-map?|svg:desc?|draw:contour-polygon?|draw:contour-path?|draw:thumbnail?)>-<!ATTLIST draw:object-ole draw:class-id CDATA #IMPLIED>-<!ATTLIST draw:object-ole %draw-style-name;>-<!ATTLIST draw:object-ole draw:name %string; #IMPLIED>-<!ATTLIST draw:object-ole xlink:href %uriReference; #IMPLIED>-<!ATTLIST draw:object-ole xlink:type (simple) #IMPLIED>-<!ATTLIST draw:object-ole xlink:show (embed) #IMPLIED>-<!ATTLIST draw:object-ole xlink:actuate (onLoad) #IMPLIED>-<!ATTLIST draw:object-ole %text-anchor;>-<!ATTLIST draw:object-ole %draw-position;>-<!ATTLIST draw:object-ole %draw-end-position; >-<!ATTLIST draw:object-ole %table-background; >-<!ATTLIST draw:object-ole svg:width %lengthOrPercentage; #IMPLIED>-<!ATTLIST draw:object-ole svg:height %lengthOrPercentage; #IMPLIED>-<!ATTLIST draw:object-ole %presentation-class; >-<!ATTLIST draw:object-ole %zindex;>-<!ATTLIST draw:object-ole draw:id %draw-shape-id;>-<!ATTLIST draw:object-ole draw:layer %layerName; #IMPLIED>-<!ATTLIST draw:object-ole style:rel-width %percentage; #IMPLIED>-<!ATTLIST draw:object-ole style:rel-height %percentage; #IMPLIED>--<!ELEMENT svg:desc (#PCDATA)>--<!ELEMENT draw:contour-polygon EMPTY>-<!ATTLIST draw:contour-polygon svg:width %coordinate; #REQUIRED>-<!ATTLIST draw:contour-polygon svg:height %coordinate; #REQUIRED>-<!ATTLIST draw:contour-polygon %draw-viewbox;>-<!ATTLIST draw:contour-polygon draw:points %points; #REQUIRED>-<!ATTLIST draw:contour-polygon draw:recreate-on-edit %boolean; #IMPLIED>--<!ELEMENT draw:contour-path EMPTY>-<!ATTLIST draw:contour-path svg:width %coordinate; #REQUIRED>-<!ATTLIST draw:contour-path svg:height %coordinate; #REQUIRED>-<!ATTLIST draw:contour-path %draw-viewbox;>-<!ATTLIST draw:contour-path svg:d %pathData; #REQUIRED>-<!ATTLIST draw:contour-path draw:recreate-on-edit %boolean; #IMPLIED>--<!-- hyperlink -->-<!ELEMENT draw:a (draw:image|draw:text-box)>-<!ATTLIST draw:a xlink:href %uriReference; #REQUIRED>-<!ATTLIST draw:a xlink:type (simple) #FIXED "simple">-<!ATTLIST draw:a xlink:show (new|replace) #IMPLIED>-<!ATTLIST draw:a xlink:actuate (onRequest) "onRequest">-<!ATTLIST draw:a office:name %string; #IMPLIED>-<!ATTLIST draw:a office:target-frame-name %string; #IMPLIED>-<!ATTLIST draw:a office:server-map %boolean; "false">--<!-- 3d properties -->-<!ATTLIST style:properties dr3d:horizontal-segments %nonNegativeInteger; #IMPLIED>-<!ATTLIST style:properties dr3d:vertical-segments %nonNegativeInteger; #IMPLIED>-<!ATTLIST style:properties dr3d:edge-rounding %percentage; #IMPLIED>-<!ATTLIST style:properties dr3d:edge-rounding-mode (correct|attractive) #IMPLIED>-<!ATTLIST style:properties dr3d:back-scale %percentage; #IMPLIED>-<!ATTLIST style:properties dr3d:end-angle %nonNegativeInteger; #IMPLIED>-<!ATTLIST style:properties dr3d:depth %length; #IMPLIED>-<!ATTLIST style:properties dr3d:backface-culling (enabled|disabled) #IMPLIED>-<!ATTLIST style:properties dr3d:lighting-mode (standard|double-sided) #IMPLIED>-<!ATTLIST style:properties dr3d:normals-kind (object|flat|sphere) #IMPLIED>-<!ATTLIST style:properties dr3d:normals-direction (normal|inverse) #IMPLIED>-<!ATTLIST style:properties dr3d:texture-generation-mode-x (object|parallel|sphere) #IMPLIED>-<!ATTLIST style:properties dr3d:texture-generation-mode-y (object|parallel|sphere) #IMPLIED>-<!ATTLIST style:properties dr3d:texture-kind (luminance|intesity|color) #IMPLIED>-<!ATTLIST style:properties dr3d:texture-filter (enabled|disabled) #IMPLIED>-<!ATTLIST style:properties dr3d:texture-mode (replace|modulate|blend) #IMPLIED>-<!ATTLIST style:properties dr3d:ambient-color %color; #IMPLIED>-<!ATTLIST style:properties dr3d:emissive-color %color; #IMPLIED>-<!ATTLIST style:properties dr3d:specular-color %color; #IMPLIED>-<!ATTLIST style:properties dr3d:diffuse-color %color; #IMPLIED>-<!ATTLIST style:properties dr3d:shininess %percentage; #IMPLIED>-<!ATTLIST style:properties dr3d:shadow (visible|hidden) #IMPLIED>--<!ELEMENT dr3d:light EMPTY>-<!ATTLIST dr3d:light dr3d:diffuse-color %color; #IMPLIED>-<!ATTLIST dr3d:light dr3d:direction %vector3D; #REQUIRED>-<!ATTLIST dr3d:light dr3d:enabled %boolean; #IMPLIED>-<!ATTLIST dr3d:light dr3d:specular %boolean; #IMPLIED>--<!ENTITY % shapes3d "(dr3d:scene|dr3d:extrude|dr3d:sphere|dr3d:rotate|dr3d:cube)">--<!ELEMENT dr3d:cube EMPTY>-<!ATTLIST dr3d:cube dr3d:transform CDATA #IMPLIED>-<!ATTLIST dr3d:cube dr3d:min-edge %vector3D; #IMPLIED>-<!ATTLIST dr3d:cube dr3d:max-edge %vector3D; #IMPLIED>-<!ATTLIST dr3d:cube %zindex;>-<!ATTLIST dr3d:cube draw:id %draw-shape-id;>-<!ATTLIST dr3d:cube %draw-end-position; >-<!ATTLIST dr3d:cube %table-background; >-<!ATTLIST dr3d:cube %draw-style-name; >-<!ATTLIST dr3d:cube draw:layer %layerName; #IMPLIED>--<!ELEMENT dr3d:sphere EMPTY>-<!ATTLIST dr3d:sphere dr3d:transform CDATA #IMPLIED>-<!ATTLIST dr3d:sphere dr3d:center %vector3D; #IMPLIED>-<!ATTLIST dr3d:sphere dr3d:size %vector3D; #IMPLIED>-<!ATTLIST dr3d:sphere %zindex;>-<!ATTLIST dr3d:sphere draw:id %draw-shape-id;>-<!ATTLIST dr3d:sphere %draw-end-position; >-<!ATTLIST dr3d:sphere %table-background; >-<!ATTLIST dr3d:sphere %draw-style-name; >-<!ATTLIST dr3d:sphere draw:layer %layerName; #IMPLIED>--<!ELEMENT dr3d:extrude EMPTY>-<!ATTLIST dr3d:extrude dr3d:transform CDATA #IMPLIED>-<!ATTLIST dr3d:extrude %draw-viewbox;>-<!ATTLIST dr3d:extrude svg:d %pathData; #REQUIRED >-<!ATTLIST dr3d:extrude %zindex;>-<!ATTLIST dr3d:extrude draw:id %draw-shape-id;>-<!ATTLIST dr3d:extrude %draw-end-position; >-<!ATTLIST dr3d:extrude %table-background; >-<!ATTLIST dr3d:extrude %draw-style-name; >-<!ATTLIST dr3d:extrude draw:layer %layerName; #IMPLIED>--<!ELEMENT dr3d:rotate EMPTY>-<!ATTLIST dr3d:rotate dr3d:transform CDATA #IMPLIED>-<!ATTLIST dr3d:rotate %draw-viewbox;>-<!ATTLIST dr3d:rotate svg:d %pathData; #REQUIRED >-<!ATTLIST dr3d:rotate %zindex;>-<!ATTLIST dr3d:rotate draw:id %draw-shape-id;>-<!ATTLIST dr3d:rotate %draw-end-position; >-<!ATTLIST dr3d:rotate %table-background; >-<!ATTLIST dr3d:rotate %draw-style-name; >-<!ATTLIST dr3d:rotate draw:layer %layerName; #IMPLIED>--<!ELEMENT dr3d:scene (dr3d:light*,(%shapes3d;)*)>-<!ATTLIST dr3d:scene %draw-style-name; >-<!ATTLIST dr3d:scene svg:x %coordinate; #IMPLIED>-<!ATTLIST dr3d:scene svg:y %coordinate; #IMPLIED>-<!ATTLIST dr3d:scene svg:width %length; #IMPLIED>-<!ATTLIST dr3d:scene svg:height %length; #IMPLIED>-<!ATTLIST dr3d:scene dr3d:vrp %vector3D; #IMPLIED>-<!ATTLIST dr3d:scene dr3d:vpn %vector3D; #IMPLIED>-<!ATTLIST dr3d:scene dr3d:vup %vector3D; #IMPLIED>-<!ATTLIST dr3d:scene dr3d:projection (parallel|perspective) #IMPLIED>-<!ATTLIST dr3d:scene dr3d:transform CDATA #IMPLIED>-<!ATTLIST dr3d:scene dr3d:distance %length; #IMPLIED>-<!ATTLIST dr3d:scene dr3d:focal-length %length; #IMPLIED>-<!ATTLIST dr3d:scene dr3d:shadow-slant %nonNegativeInteger; #IMPLIED>-<!ATTLIST dr3d:scene dr3d:shade-mode (flat|phong|gouraud|draft) #IMPLIED>-<!ATTLIST dr3d:scene dr3d:ambient-color %color; #IMPLIED>-<!ATTLIST dr3d:scene dr3d:lighting-mode %boolean; #IMPLIED>-<!ATTLIST dr3d:scene %zindex;>-<!ATTLIST dr3d:scene draw:id %draw-shape-id;>-<!ATTLIST dr3d:scene %draw-end-position; >-<!ATTLIST dr3d:scene %table-background; >--<!-- layer -->--<!ELEMENT draw:layer-set (draw:layer*)>--<!ELEMENT draw:layer EMPTY>-<!ATTLIST draw:layer draw:name %layerName; #REQUIRED>--<!-- events -->-<!ELEMENT presentation:event (presentation:sound)?>-<!ATTLIST presentation:event %event-name;>-<!ATTLIST presentation:event presentation:action (none|previous-page|next-page|first-page|last-page|hide|stop|execute|show|verb|fade-out|sound) #REQUIRED>-<!ATTLIST presentation:event presentation:effect %presentationEffects; "none">-<!ATTLIST presentation:event presentation:direction %presentationEffectDirections; "none">-<!ATTLIST presentation:event presentation:speed %presentationSpeeds; "medium">-<!ATTLIST presentation:event presentation:start-scale %percentage; "100%">-<!ATTLIST presentation:event xlink:href %uriReference; #IMPLIED>-<!ATTLIST presentation:event xlink:type (simple) #IMPLIED>-<!ATTLIST presentation:event xlink:show (embed) #IMPLIED>-<!ATTLIST presentation:event xlink:actuate (onRequest) #IMPLIED>-<!ATTLIST presentation:event presentation:verb %nonNegativeInteger; #IMPLIED>--<!-- applets -->-<!ELEMENT draw:applet (draw:thumbnail?, draw:param*, svg:desc?)>-<!ATTLIST draw:applet xlink:href %uriReference; #IMPLIED>-<!ATTLIST draw:applet xlink:type (simple) #IMPLIED>-<!ATTLIST draw:applet xlink:show (embed) #IMPLIED>-<!ATTLIST draw:applet xlink:actuate (onLoad) #IMPLIED>-<!ATTLIST draw:applet draw:code CDATA #REQUIRED>-<!ATTLIST draw:applet draw:object CDATA #IMPLIED>-<!ATTLIST draw:applet draw:archive CDATA #IMPLIED>-<!ATTLIST draw:applet draw:may-script %boolean; "false">-<!ATTLIST draw:applet draw:name CDATA #IMPLIED>-<!ATTLIST draw:applet %draw-style-name;>-<!ATTLIST draw:applet svg:width %lengthOrPercentage; #IMPLIED>-<!ATTLIST draw:applet svg:height %lengthOrPercentage; #IMPLIED>-<!ATTLIST draw:applet %zindex;>-<!ATTLIST draw:applet draw:layer %layerName; #IMPLIED>-<!ATTLIST draw:applet %draw-position;>-<!ATTLIST draw:applet %draw-end-position; >--<!-- plugins -->-<!ELEMENT draw:plugin (draw:thumbnail?, draw:param*, svg:desc?)>-<!ATTLIST draw:plugin xlink:href %uriReference; #IMPLIED>-<!ATTLIST draw:plugin xlink:type (simple) #IMPLIED>-<!ATTLIST draw:plugin xlink:show (embed) #IMPLIED>-<!ATTLIST draw:plugin xlink:actuate (onLoad) #IMPLIED>-<!ATTLIST draw:plugin draw:mime-type CDATA #IMPLIED>-<!ATTLIST draw:plugin draw:name CDATA #IMPLIED>-<!ATTLIST draw:plugin %draw-style-name;>-<!ATTLIST draw:plugin svg:width %lengthOrPercentage; #IMPLIED>-<!ATTLIST draw:plugin svg:height %lengthOrPercentage; #IMPLIED>-<!ATTLIST draw:plugin %zindex;>-<!ATTLIST draw:plugin draw:layer %layerName; #IMPLIED>-<!ATTLIST draw:plugin %draw-position;>-<!ATTLIST draw:plugin %draw-end-position; >--<!-- Paramaters -->-<!ELEMENT draw:param EMPTY>-<!ATTLIST draw:param draw:name CDATA #IMPLIED>-<!ATTLIST draw:param draw:value CDATA #IMPLIED>--<!-- Floating Frames -->-<!ELEMENT draw:floating-frame (draw:thumbnail?, svg:desc?)>-<!ATTLIST draw:floating-frame xlink:href %uriReference; #IMPLIED>-<!ATTLIST draw:floating-frame xlink:type (simple) #IMPLIED>-<!ATTLIST draw:floating-frame xlink:show (embed) #IMPLIED>-<!ATTLIST draw:floating-frame xlink:actuate (onLoad) #IMPLIED>-<!ATTLIST draw:floating-frame draw:name CDATA #IMPLIED>-<!ATTLIST draw:floating-frame draw:frame-name CDATA #IMPLIED>-<!ATTLIST draw:floating-frame %draw-style-name;>-<!ATTLIST draw:floating-frame svg:width %lengthOrPercentage; #IMPLIED>-<!ATTLIST draw:floating-frame svg:height %lengthOrPercentage; #IMPLIED>-<!ATTLIST draw:floating-frame %zindex;>-<!ATTLIST draw:floating-frame draw:layer %layerName; #IMPLIED>-<!ATTLIST draw:floating-frame %draw-position;>-<!ATTLIST draw:floating-frame %draw-end-position; >--<!-- Image Maps -->-<!ELEMENT draw:image-map-	(draw:area-rectangle|draw:area-circle|draw:area-polygon)*>--<!ELEMENT draw:area-rectangle (svg:desc?,office:events?)>-<!ATTLIST draw:area-rectangle xlink:href %uriReference; #IMPLIED>-<!ATTLIST draw:area-rectangle xlink:type (simple) #IMPLIED>-<!ATTLIST draw:area-rectangle office:target-frame-name CDATA #IMPLIED>-<!ATTLIST draw:area-rectangle xlink:show (new|replace) #IMPLIED>-<!ATTLIST draw:area-rectangle office:name CDATA #IMPLIED>-<!ATTLIST draw:area-rectangle draw:nohref (nohref) #IMPLIED>-<!ATTLIST draw:area-rectangle svg:x %coordinate; #REQUIRED>-<!ATTLIST draw:area-rectangle svg:y %coordinate; #REQUIRED>-<!ATTLIST draw:area-rectangle svg:width %coordinate; #REQUIRED>-<!ATTLIST draw:area-rectangle svg:height %coordinate; #REQUIRED>--<!ELEMENT draw:area-circle (svg:desc?,office:events?)>-<!ATTLIST draw:area-circle xlink:href %uriReference; #IMPLIED>-<!ATTLIST draw:area-circle xlink:type (simple) #IMPLIED>-<!ATTLIST draw:area-circle office:target-frame-name CDATA #IMPLIED>-<!ATTLIST draw:area-circle xlink:show (new|replace) #IMPLIED>-<!ATTLIST draw:area-circle office:name CDATA #IMPLIED>-<!ATTLIST draw:area-circle draw:nohref (nohref) #IMPLIED>-<!ATTLIST draw:area-circle svg:cx %coordinate; #REQUIRED>-<!ATTLIST draw:area-circle svg:cy %coordinate; #REQUIRED>-<!ATTLIST draw:area-circle svg:r %coordinate; #REQUIRED>--<!ELEMENT draw:area-polygon (svg:desc?,office:events?)>-<!ATTLIST draw:area-polygon xlink:href %uriReference; #IMPLIED>-<!ATTLIST draw:area-polygon xlink:type (simple) #IMPLIED>-<!ATTLIST draw:area-polygon office:target-frame-name CDATA #IMPLIED>-<!ATTLIST draw:area-polygon xlink:show (new|replace) #IMPLIED>-<!ATTLIST draw:area-polygon office:name CDATA #IMPLIED>-<!ATTLIST draw:area-polygon draw:nohref (nohref) #IMPLIED>-<!ATTLIST draw:area-polygon svg:x %coordinate; #REQUIRED>-<!ATTLIST draw:area-polygon svg:y %coordinate; #REQUIRED>-<!ATTLIST draw:area-polygon svg:width %coordinate; #REQUIRED>-<!ATTLIST draw:area-polygon svg:height %coordinate; #REQUIRED>-<!ATTLIST draw:area-polygon svg:points %points; #REQUIRED>-<!ATTLIST draw:area-polygon svg:viewBox CDATA #REQUIRED>--<!ENTITY % fields "text:date |-				   text:time |-				   text:page-number |-				   text:page-continuation |-				   text:sender-firstname |-				   text:sender-lastname |-				   text:sender-initials | -				   text:sender-title |-				   text:sender-position |-				   text:sender-email | -				   text:sender-phone-private |-				   text:sender-fax | -				   text:sender-company |-				   text:sender-phone-work |-				   text:sender-street |-				   text:sender-city |-				   text:sender-postal-code |-				   text:sender-country |-				   text:sender-state-or-province |-				   text:author-name |-				   text:author-initials |-				   text:placeholder |-				   text:variable-set | -				   text:variable-get | -				   text:variable-input | -				   text:user-field-get | -				   text:user-field-input | -				   text:sequence | -				   text:expression | -				   text:text-input |-				   text:database-display |-				   text:database-next |-				   text:database-row-select |-				   text:database-row-number |-				   text:database-name |-				   text:initial-creator |-				   text:creation-date |-				   text:creation-time |-				   text:description |-				   text:user-defined |-				   text:print-time |-				   text:print-date |-				   text:printed-by |-				   text:title |-				   text:subject |-				   text:keywords |-				   text:editing-cycles |-				   text:editing-duration |-				   text:modification-time |-				   text:modification-date |-				   text:creator |-				   text:conditional-text |-				   text:hidden-text |-				   text:hidden-paragraph |-				   text:chapter |-				   text:file-name |-				   text:template-name |-				   text:page-variable-set |-				   text:page-variable-get |-				   text:execute-macro |-				   text:dde-connection |-				   text:reference-ref |-				   text:sequence-ref |-				   text:bookmark-ref |-				   text:footnote-ref |-				   text:endnote-ref |-				   text:sheet-name |-				   text:bibliography-mark |-				   text:page-count |-				   text:paragraph-count |-				   text:word-count |-				   text:character-count |-				   text:table-count |-				   text:image-count |-				   text:object-count |-				   office:annotation |-				   text:script |-				   text:measure" >--<!ENTITY % inline-text-elements "-				 text:span|text:tab-stop|text:s|text:line-break|-				 text:footnote|text:endnote|text:a|-				 text:bookmark|text:bookmark-start|text:bookmark-end|-				 text:reference-mark|text:reference-mark-start|-				 text:reference-mark-end|%fields;|%shape;|-				 text:toc-mark-start | text:toc-mark-end | -				 text:toc-mark | text:user-index-mark-start |-				 text:user-index-mark-end | text:user-index-mark |-				 text:alphabetical-index-mark-start |-				 text:alphabetical-index-mark-end |-				 text:alphabetical-index-mark |-				 %change-marks; | draw:a | text:ruby">--<!ENTITY % inline-text "( #PCDATA | %inline-text-elements; )*">--<!ELEMENT text:p %inline-text;>-<!ELEMENT text:h %inline-text;>--<!ATTLIST text:p text:style-name %styleName; #IMPLIED>-<!ATTLIST text:p text:cond-style-name %styleName; #IMPLIED>--<!ATTLIST text:h text:style-name %styleName; #IMPLIED>-<!ATTLIST text:h text:cond-style-name %styleName; #IMPLIED>-<!ATTLIST text:h text:level %positiveInteger; "1">--<!ELEMENT text:span %inline-text;>-<!ATTLIST text:span text:style-name %styleName; #REQUIRED>--<!ELEMENT text:a (#PCDATA | office:events | %inline-text-elements;)*>-<!ATTLIST text:a xlink:href %uriReference; #REQUIRED>-<!ATTLIST text:a xlink:type (simple) #FIXED "simple">-<!ATTLIST text:a xlink:actuate (onRequest) "onRequest">-<!ATTLIST text:a xlink:show (new|replace) "replace">-<!ATTLIST text:a office:name %string; #IMPLIED>-<!ATTLIST text:a office:target-frame-name %string; #IMPLIED>-<!ATTLIST text:a text:style-name %styleName; #IMPLIED>-<!ATTLIST text:a text:visited-style-name %styleName; #IMPLIED>---<!ELEMENT text:s EMPTY>-<!ATTLIST text:s text:c %positiveInteger; "1">--<!ELEMENT text:tab-stop EMPTY>--<!ELEMENT text:line-break EMPTY>---<!ENTITY % list-items "((text:list-header,text:list-item*)|text:list-item+)">-<!ELEMENT text:ordered-list %list-items;>-<!ELEMENT text:unordered-list %list-items;>---<!ATTLIST text:ordered-list text:style-name %styleName; #IMPLIED>-<!ATTLIST text:unordered-list text:style-name %styleName; #IMPLIED>--<!ATTLIST text:ordered-list text:continue-numbering %boolean; "false">--<!ELEMENT text:list-header (text:p|text:h)+>-<!ELEMENT text:list-item (text:p|text:h|text:ordered-list|text:unordered-list)+>--<!ATTLIST text:list-item text:restart-numbering %boolean; "false">-<!ATTLIST text:list-item text:start-value %positiveInteger; #IMPLIED>--<!ELEMENT text:list-style (text:list-level-style-number|-     					   text:list-level-style-bullet|-     					   text:list-level-style-image)+>--<!ATTLIST text:list-style style:name %styleName; #IMPLIED>--<!ATTLIST text:list-style text:consecutive-numbering %boolean; "false">---<!ELEMENT text:list-level-style-number (style:properties?)>--<!ATTLIST text:list-level-style-number text:level %positiveInteger;-									     		 #REQUIRED>-<!ATTLIST text:list-level-style-number text:style-name %styleName; #IMPLIED>--<!ATTLIST text:list-level-style-number style:num-format %string; #REQUIRED>-<!ATTLIST text:list-level-style-number style:num-prefix %string; #IMPLIED>-<!ATTLIST text:list-level-style-number style:num-suffix %string; #IMPLIED>-<!ATTLIST text:list-level-style-number style:num-letter-sync %boolean;-									     					"false">-<!ATTLIST text:list-level-style-number text:display-levels %positiveInteger;-									     				  "1">-<!ATTLIST text:list-level-style-number text:start-value %positiveInteger;-														   "1">-<!ELEMENT text:list-level-style-bullet (style:properties?)>--<!ATTLIST text:list-level-style-bullet text:level %positiveInteger; #REQUIRED>-<!ATTLIST text:list-level-style-bullet text:style-name %styleName; #IMPLIED>-<!ATTLIST text:list-level-style-bullet text:bullet-char %character; #REQUIRED>-<!ATTLIST text:list-level-style-bullet style:num-prefix %string; #IMPLIED>-<!ATTLIST text:list-level-style-bullet style:num-suffix %string; #IMPLIED>--<!ELEMENT text:list-level-style-image (style:properties?,office:binary-data?)>--<!ATTLIST text:list-level-style-image text:level %positiveInteger; #REQUIRED>-<!ATTLIST text:list-level-style-image xlink:type (simple) #IMPLIED>-<!ATTLIST text:list-level-style-image xlink:href %uriReference; #IMPLIED>-<!ATTLIST text:list-level-style-image xlink:actuate (onLoad) #IMPLIED>-<!ATTLIST text:list-level-style-image xlink:show (embed) #IMPLIED>---<!-- list properties -->-<!ATTLIST style:properties text:space-before %nonNegativeLength; #IMPLIED>-<!ATTLIST style:properties text:min-label-width %nonNegativeLength; #IMPLIED>-<!ATTLIST style:properties text:min-label-distance %nonNegativeLength; #IMPLIED>-<!ATTLIST style:properties text:enable-numbering %boolean; #IMPLIED>-<!ATTLIST style:properties style:list-style-name %styleName; #IMPLIED>--<!ELEMENT text:outline-style (text:outline-level-style)+>--<!ELEMENT text:outline-level-style (style:properties?)>--<!ATTLIST text:outline-level-style text:level %positiveInteger;-													 #REQUIRED>-<!ATTLIST text:outline-level-style text:style-name %styleName; #IMPLIED>--<!ATTLIST text:outline-level-style style:num-format %string; #REQUIRED>-<!ATTLIST text:outline-level-style style:num-prefix %string; #IMPLIED>-<!ATTLIST text:outline-level-style style:num-suffix %string; #IMPLIED>-<!ATTLIST text:outline-level-style style:num-letter-sync %boolean;-																"false">-<!ATTLIST text:outline-level-style text:display-levels %positiveInteger;-															  "1">-<!ATTLIST text:outline-level-style text:start-value %positiveInteger;-														   "1">--<!ENTITY % field-declarations "text:variable-decls?, -							   text:user-field-decls?, -							   text:sequence-decls?">--<!ENTITY % variableName "CDATA">--<!ENTITY % formula "CDATA">--<!ENTITY % valueAttr "text:value-type %valueType; #IMPLIED-							 text:currency CDATA #IMPLIED" >--<!ENTITY % valueAndTypeAttr "%valueAttr;-		 					 text:value %float; #IMPLIED-							 text:date-value %date; #IMPLIED-							 text:time-value %timeInstance; #IMPLIED-							 text:boolean-value %boolean; #IMPLIED-							 text:string-value %string; #IMPLIED" >--<!ENTITY % numFormat 'style:num-format CDATA #IMPLIED -					   style:num-letter-sync %boolean; "false"'>---<!ELEMENT text:date (#PCDATA)>-<!ATTLIST text:date text:date-value %timeInstance; #IMPLIED>-<!ATTLIST text:date text:date-adjust %dateDuration; #IMPLIED>-<!ATTLIST text:date text:fixed %boolean; "false">-<!ATTLIST text:date style:data-style-name %styleName; #IMPLIED>--<!ELEMENT text:time (#PCDATA)>-<!ATTLIST text:time text:time-value %timeInstance; #IMPLIED>-<!ATTLIST text:time text:time-adjust %timeDuration; #IMPLIED>-<!ATTLIST text:time text:fixed %boolean; "false">-<!ATTLIST text:time style:data-style-name %styleName; #IMPLIED>--<!ELEMENT text:page-number (#PCDATA)>-<!ATTLIST text:page-number text:page-adjust %positiveInteger; #IMPLIED>-<!ATTLIST text:page-number text:select-page (previous|current|next) "current">-<!ATTLIST text:page-number %numFormat;>--<!ELEMENT text:page-continuation (#PCDATA)>-<!ATTLIST text:page-continuation text:select-page (previous|next) #REQUIRED>-<!ATTLIST text:page-continuation text:string-value %string; #IMPLIED>--<!ELEMENT text:sender-firstname (#PCDATA)>-<!ATTLIST text:sender-firstname text:fixed %boolean; "true">--<!ELEMENT text:sender-lastname (#PCDATA)>-<!ATTLIST text:sender-lastname text:fixed %boolean; "true">--<!ELEMENT text:sender-initials (#PCDATA)>-<!ATTLIST text:sender-initials text:fixed %boolean; "true">--<!ELEMENT text:sender-title (#PCDATA)>-<!ATTLIST text:sender-title text:fixed %boolean; "true">--<!ELEMENT text:sender-position (#PCDATA)>-<!ATTLIST text:sender-position text:fixed %boolean; "true">--<!ELEMENT text:sender-email (#PCDATA)>-<!ATTLIST text:sender-email text:fixed %boolean; "true">--<!ELEMENT text:sender-phone-private (#PCDATA)>-<!ATTLIST text:sender-phone-private text:fixed %boolean; "true">--<!ELEMENT text:sender-fax (#PCDATA)>-<!ATTLIST text:sender-fax text:fixed %boolean; "true">--<!ELEMENT text:sender-company (#PCDATA)>-<!ATTLIST text:sender-company text:fixed %boolean; "true">--<!ELEMENT text:sender-phone-work (#PCDATA)>-<!ATTLIST text:sender-phone-work text:fixed %boolean; "true">--<!ELEMENT text:sender-street (#PCDATA)>-<!ATTLIST text:sender-street text:fixed %boolean; "true">--<!ELEMENT text:sender-city (#PCDATA)>-<!ATTLIST text:sender-city text:fixed %boolean; "true">--<!ELEMENT text:sender-postal-code (#PCDATA)>-<!ATTLIST text:sender-postal-code text:fixed %boolean; "true">--<!ELEMENT text:sender-country (#PCDATA)>-<!ATTLIST text:sender-country text:fixed %boolean; "true">--<!ELEMENT text:sender-state-or-province (#PCDATA)>-<!ATTLIST text:sender-state-or-province text:fixed %boolean; "true">--<!ELEMENT text:author-name (#PCDATA)>-<!ATTLIST text:author-name text:fixed %boolean; "true">--<!ELEMENT text:author-initials (#PCDATA)>-<!ATTLIST text:author-initials text:fixed %boolean; "true">--<!ELEMENT text:placeholder (#PCDATA)>-<!ATTLIST text:placeholder text:placeholder-type (text|table|text-box|image|object) #REQUIRED>-<!ATTLIST text:placeholder text:description %string; #IMPLIED>--<!ELEMENT text:variable-decls (text:variable-decl)*>--<!ELEMENT text:variable-decl EMPTY>-<!ATTLIST text:variable-decl text:name %variableName; #REQUIRED>-<!ATTLIST text:variable-decl %valueAndTypeAttr;>--<!ELEMENT text:variable-set (#PCDATA)>-<!ATTLIST text:variable-set text:name %variableName; #REQUIRED>-<!ATTLIST text:variable-set text:formula %formula; #IMPLIED>-<!ATTLIST text:variable-set %valueAndTypeAttr;>-<!ATTLIST text:variable-set text:display (value|none) "value">-<!ATTLIST text:variable-set style:data-style-name %styleName; #IMPLIED>--<!ELEMENT text:variable-get (#PCDATA)>-<!ATTLIST text:variable-get text:name %variableName; #REQUIRED>-<!ATTLIST text:variable-get text:display (value|formula) "value">-<!ATTLIST text:variable-get style:data-style-name %styleName; #IMPLIED>-<!ATTLIST text:variable-get %valueAttr;>--<!ELEMENT text:variable-input (#PCDATA)>-<!ATTLIST text:variable-input text:name %variableName; #REQUIRED>-<!ATTLIST text:variable-input text:description %string; #IMPLIED>-<!ATTLIST text:variable-input %valueAndTypeAttr;>-<!ATTLIST text:variable-input text:display (value|none) "value">-<!ATTLIST text:variable-input style:data-style-name %styleName; #IMPLIED>--<!ELEMENT text:user-field-decls (text:user-field-decl)*>--<!ELEMENT text:user-field-decl EMPTY>-<!ATTLIST text:user-field-decl text:name %variableName; #REQUIRED>-<!ATTLIST text:user-field-decl text:formula %formula; #IMPLIED>-<!ATTLIST text:user-field-decl %valueAndTypeAttr;>--<!ELEMENT text:user-field-get (#PCDATA)>-<!ATTLIST text:user-field-get text:name %variableName; #REQUIRED>-<!ATTLIST text:user-field-get text:display (value|formula|none) "value">-<!ATTLIST text:user-field-get style:data-style-name %styleName; #IMPLIED>--<!ELEMENT text:user-field-input (#PCDATA)>-<!ATTLIST text:user-field-input text:name %variableName; #REQUIRED>-<!ATTLIST text:user-field-input text:description %string; #IMPLIED>-<!ATTLIST text:user-field-input style:data-style-name %styleName; #IMPLIED>--<!ELEMENT text:sequence-decls (text:sequence-decl)*>--<!ELEMENT text:sequence-decl EMPTY>-<!ATTLIST text:sequence-decl text:name %variableName; #REQUIRED>-<!ATTLIST text:sequence-decl text:display-outline-level %positiveInteger; "0">-<!ATTLIST text:sequence-decl text:separation-character %character; ".">--<!ELEMENT text:sequence (#PCDATA)>-<!ATTLIST text:sequence text:name %variableName; #REQUIRED>-<!ATTLIST text:sequence text:formula %formula; #IMPLIED>-<!ATTLIST text:sequence %numFormat;>-<!ATTLIST text:sequence text:ref-name ID #IMPLIED>--<!ELEMENT text:expression (#PCDATA)>-<!ATTLIST text:expression text:formula %formula; #IMPLIED>-<!ATTLIST text:expression text:display (value|formula ) "value">-<!ATTLIST text:expression %valueAndTypeAttr;>-<!ATTLIST text:expression style:data-style-name %styleName; #IMPLIED>--<!ELEMENT text:text-input (#PCDATA)>-<!ATTLIST text:text-input text:description %string; #IMPLIED>--<!ENTITY % database-table "text:database-name CDATA #REQUIRED -						   text:table-name CDATA #REQUIRED-						   text:table-type (table|query|command) #IMPLIED">--<!ELEMENT text:database-display (#PCDATA)>-<!ATTLIST text:database-display %database-table;>-<!ATTLIST text:database-display text:column-name %string; #REQUIRED>-<!ATTLIST text:database-display style:data-style-name %styleName; #IMPLIED>--<!ELEMENT text:database-next (#PCDATA)>-<!ATTLIST text:database-next %database-table;>-<!ATTLIST text:database-next text:condition %formula; #IMPLIED>--<!ELEMENT text:database-row-select (#PCDATA)>-<!ATTLIST text:database-row-select %database-table;>-<!ATTLIST text:database-row-select text:condition %formula; #IMPLIED>-<!ATTLIST text:database-row-select text:row-number %integer; #REQUIRED>--<!ELEMENT text:database-row-number (#PCDATA)>-<!ATTLIST text:database-row-number %database-table;>-<!ATTLIST text:database-row-number %numFormat;>-<!ATTLIST text:database-row-number text:value %integer; #IMPLIED>--<!ELEMENT text:database-name (#PCDATA)>-<!ATTLIST text:database-name %database-table;>--<!ELEMENT text:initial-creator (#PCDATA)>-<!ATTLIST text:initial-creator text:fixed %boolean; "false">--<!ELEMENT text:creation-date (#PCDATA)>-<!ATTLIST text:creation-date text:fixed %boolean; "false">-<!ATTLIST text:creation-date text:date-value %date; #IMPLIED>-<!ATTLIST text:creation-date style:data-style-name %styleName; #IMPLIED>--<!ELEMENT text:creation-time (#PCDATA)>-<!ATTLIST text:creation-time text:fixed %boolean; "false">-<!ATTLIST text:creation-time text:time-value %timeInstance; #IMPLIED>-<!ATTLIST text:creation-time style:data-style-name %styleName; #IMPLIED>--<!ELEMENT text:description (#PCDATA)>-<!ATTLIST text:description text:fixed %boolean; "false">--<!ELEMENT text:user-defined (#PCDATA)>-<!ATTLIST text:user-defined text:fixed %boolean; "false">-<!ATTLIST text:user-defined text:name %string; #REQUIRED>--<!ELEMENT text:print-time (#PCDATA)>-<!ATTLIST text:print-time text:fixed %boolean; "false">-<!ATTLIST text:print-time text:time-value %timeInstance; #IMPLIED>-<!ATTLIST text:print-time style:data-style-name %styleName; #IMPLIED>--<!ELEMENT text:print-date (#PCDATA)>-<!ATTLIST text:print-date text:fixed %boolean; "false">-<!ATTLIST text:print-date text:date-value %date; #IMPLIED>-<!ATTLIST text:print-date style:data-style-name %styleName; #IMPLIED>--<!ELEMENT text:printed-by (#PCDATA)>-<!ATTLIST text:printed-by text:fixed %boolean; "false">--<!ELEMENT text:title (#PCDATA)>-<!ATTLIST text:title text:fixed %boolean; "false">--<!ELEMENT text:subject (#PCDATA)>-<!ATTLIST text:subject text:fixed %boolean; "false">--<!ELEMENT text:keywords (#PCDATA)>-<!ATTLIST text:keywords text:fixed %boolean; "false">--<!ELEMENT text:editing-cycles (#PCDATA)>-<!ATTLIST text:editing-cycles text:fixed %boolean; "false">--<!ELEMENT text:editing-duration (#PCDATA)>-<!ATTLIST text:editing-duration text:fixed %boolean; "false">-<!ATTLIST text:editing-duration text:duration %timeDuration; #IMPLIED>-<!ATTLIST text:editing-duration style:data-style-name %styleName; #IMPLIED>--<!ELEMENT text:modification-time (#PCDATA)>-<!ATTLIST text:modification-time text:fixed %boolean; "false">-<!ATTLIST text:modification-time text:time-value %timeInstance; #IMPLIED>-<!ATTLIST text:modification-time style:data-style-name %styleName; #IMPLIED>--<!ELEMENT text:modification-date (#PCDATA)>-<!ATTLIST text:modification-date text:fixed %boolean; "false">-<!ATTLIST text:modification-date text:date-value %date; #IMPLIED>-<!ATTLIST text:modification-date style:data-style-name %styleName; #IMPLIED>--<!ELEMENT text:creator (#PCDATA)>-<!ATTLIST text:creator text:fixed %boolean; "false">--<!ELEMENT text:conditional-text (#PCDATA)>-<!ATTLIST text:conditional-text text:condition %formula; #REQUIRED>-<!ATTLIST text:conditional-text text:string-value-if-false %string; #REQUIRED>-<!ATTLIST text:conditional-text text:string-value-if-true %string; #REQUIRED>-<!ATTLIST text:conditional-text text:current-value %boolean; "false">--<!ELEMENT text:hidden-text (#PCDATA)>-<!ATTLIST text:hidden-text text:condition %formula; #REQUIRED>-<!ATTLIST text:hidden-text text:string-value %string; #REQUIRED>-<!ATTLIST text:hidden-text text:is-hidden %boolean; "false">--<!ELEMENT text:hidden-paragraph EMPTY>-<!ATTLIST text:hidden-paragraph text:condition %formula; #REQUIRED>-<!ATTLIST text:hidden-paragraph text:is-hidden %boolean; "false">--<!ELEMENT text:chapter (#PCDATA)>-<!ATTLIST text:chapter text:display (name|number|number-and-name|-									 plain-number-and-name|plain-number) -									 "number-and-name">-<!ATTLIST text:chapter text:outline-level %integer; "1">--<!ELEMENT text:file-name (#PCDATA)>-<!ATTLIST text:file-name text:display (full|path|name|name-and-extension) 	-									  "full">-<!ATTLIST text:file-name text:fixed %boolean; "false">--<!ELEMENT text:template-name (#PCDATA)>-<!ATTLIST text:template-name text:display (full|path|name|name-and-extension|-										  area|title) "full">--<!ELEMENT text:page-variable-set EMPTY>-<!ATTLIST text:page-variable-set text:active %boolean; "true">-<!ATTLIST text:page-variable-set text:page-adjust %integer; "0">--<!ELEMENT text:page-variable-get (#PCDATA)>-<!ATTLIST text:page-variable-get %numFormat;>--<!ELEMENT text:execute-macro (#PCDATA|office:events)* >-<!ATTLIST text:execute-macro text:description %string; #IMPLIED>---<!ELEMENT text:dde-connection-decls (text:dde-connection-decl)*>--<!ELEMENT text:dde-connection-decl EMPTY>-<!ATTLIST text:dde-connection-decl text:name %string; #REQUIRED>-<!ATTLIST text:dde-connection-decl office:dde-application %string; #REQUIRED>-<!ATTLIST text:dde-connection-decl office:dde-topic %string; #REQUIRED>-<!ATTLIST text:dde-connection-decl office:dde-item %string; #REQUIRED>-<!ATTLIST text:dde-connection-decl office:automatic-update %boolean; "false">--<!ELEMENT text:dde-connection (#PCDATA)>-<!ATTLIST text:dde-connection text:connection-name %string; #REQUIRED>--<!ELEMENT text:reference-ref (#PCDATA)>-<!ATTLIST text:reference-ref text:ref-name %string; #REQUIRED>-<!ATTLIST text:reference-ref text:reference-format (page|chapter|text|direction) #IMPLIED>--<!ELEMENT text:sequence-ref (#PCDATA)>-<!ATTLIST text:sequence-ref text:ref-name %string; #REQUIRED>-<!ATTLIST text:sequence-ref text:reference-format (page|chapter|text|direction|category-and-value|caption|value) #IMPLIED>--<!ELEMENT text:bookmark-ref (#PCDATA)>-<!ATTLIST text:bookmark-ref text:ref-name %string; #REQUIRED>-<!ATTLIST text:bookmark-ref text:reference-format (page|chapter|text|direction) #IMPLIED>--<!ELEMENT text:footnote-ref (#PCDATA)>-<!ATTLIST text:footnote-ref text:ref-name %string; #REQUIRED>-<!ATTLIST text:footnote-ref text:reference-format (page|chapter|text|direction) #IMPLIED>--<!ELEMENT text:endnote-ref (#PCDATA)>-<!ATTLIST text:endnote-ref text:ref-name %string; #REQUIRED>-<!ATTLIST text:endnote-ref text:reference-format (page|chapter|text|direction) #IMPLIED>--<!ELEMENT text:sheet-name (#PCDATA)>--<!ELEMENT text:page-count (#PCDATA)>-<!ATTLIST text:page-count style:num-format %string; #IMPLIED>-<!ATTLIST text:page-count style:num-letter-sync %boolean; "false">--<!ELEMENT text:paragraph-count (#PCDATA)>-<!ATTLIST text:paragraph-count style:num-format %string; #IMPLIED>-<!ATTLIST text:paragraph-count style:num-letter-sync %boolean; "false">--<!ELEMENT text:word-count (#PCDATA)>-<!ATTLIST text:word-count style:num-format %string; #IMPLIED>-<!ATTLIST text:word-count style:num-letter-sync %boolean; "false">--<!ELEMENT text:character-count (#PCDATA)>-<!ATTLIST text:character-count style:num-format %string; #IMPLIED>-<!ATTLIST text:character-count style:num-letter-sync %boolean; "false">--<!ELEMENT text:table-count (#PCDATA)>-<!ATTLIST text:table-count style:num-format %string; #IMPLIED>-<!ATTLIST text:table-count style:num-letter-sync %boolean; "false">--<!ELEMENT text:image-count (#PCDATA)>-<!ATTLIST text:image-count style:num-format %string; #IMPLIED>-<!ATTLIST text:image-count style:num-letter-sync %boolean; "false">--<!ELEMENT text:object-count (#PCDATA)>-<!ATTLIST text:object-count style:num-format %string; #IMPLIED>-<!ATTLIST text:object-count style:num-letter-sync %boolean; "false">--<!ELEMENT text:bibliography-mark (#PCDATA)>-<!ATTLIST text:bibliography-mark text:bibliography-type -	( article | book | booklet | conference | custom1 | custom2 | custom3 | -	  custom4 | custom5 | email | inbook | incollection | inproceedings | -	  journal | manual | mastersthesis | misc | phdthesis | proceedings | -	  techreport | unpublished | www ) #REQUIRED >-<!ATTLIST text:bibliography-mark text:identifier CDATA #IMPLIED>-<!ATTLIST text:bibliography-mark text:address CDATA #IMPLIED>-<!ATTLIST text:bibliography-mark text:annote CDATA #IMPLIED>-<!ATTLIST text:bibliography-mark text:author CDATA #IMPLIED>-<!ATTLIST text:bibliography-mark text:booktitle CDATA #IMPLIED>-<!ATTLIST text:bibliography-mark text:chapter CDATA #IMPLIED>-<!ATTLIST text:bibliography-mark text:edition CDATA #IMPLIED>-<!ATTLIST text:bibliography-mark text:editor CDATA #IMPLIED>-<!ATTLIST text:bibliography-mark text:howpublished CDATA #IMPLIED>-<!ATTLIST text:bibliography-mark text:institution CDATA #IMPLIED>-<!ATTLIST text:bibliography-mark text:journal CDATA #IMPLIED>-<!ATTLIST text:bibliography-mark text:month CDATA #IMPLIED>-<!ATTLIST text:bibliography-mark text:note CDATA #IMPLIED>-<!ATTLIST text:bibliography-mark text:number CDATA #IMPLIED>-<!ATTLIST text:bibliography-mark text:organizations CDATA #IMPLIED>-<!ATTLIST text:bibliography-mark text:pages CDATA #IMPLIED>-<!ATTLIST text:bibliography-mark text:publisher CDATA #IMPLIED>-<!ATTLIST text:bibliography-mark text:school CDATA #IMPLIED>-<!ATTLIST text:bibliography-mark text:series CDATA #IMPLIED>-<!ATTLIST text:bibliography-mark text:title CDATA #IMPLIED>-<!ATTLIST text:bibliography-mark text:report-type CDATA #IMPLIED>-<!ATTLIST text:bibliography-mark text:volume CDATA #IMPLIED>-<!ATTLIST text:bibliography-mark text:year CDATA #IMPLIED>-<!ATTLIST text:bibliography-mark text:url CDATA #IMPLIED>-<!ATTLIST text:bibliography-mark text:custom1 CDATA #IMPLIED>-<!ATTLIST text:bibliography-mark text:custom2 CDATA #IMPLIED>-<!ATTLIST text:bibliography-mark text:custom3 CDATA #IMPLIED>-<!ATTLIST text:bibliography-mark text:custom4 CDATA #IMPLIED>-<!ATTLIST text:bibliography-mark text:custom5 CDATA #IMPLIED>-<!ATTLIST text:bibliography-mark text:isbn CDATA #IMPLIED>---<!ELEMENT text:bookmark EMPTY>-<!ATTLIST text:bookmark text:name CDATA #REQUIRED>--<!ELEMENT text:bookmark-start EMPTY>-<!ATTLIST text:bookmark-start text:name CDATA #REQUIRED>--<!ELEMENT text:bookmark-end EMPTY>-<!ATTLIST text:bookmark-end text:name CDATA #REQUIRED>--<!ELEMENT text:reference-mark EMPTY>-<!ATTLIST text:reference-mark text:name CDATA #REQUIRED>--<!ELEMENT text:reference-mark-start EMPTY>-<!ATTLIST text:reference-mark-start text:name CDATA #REQUIRED>--<!ELEMENT text:reference-mark-end EMPTY>-<!ATTLIST text:reference-mark-end text:name CDATA #REQUIRED>--<!ELEMENT text:footnotes-configuration (text:footnote-continuation-notice-forward?,text:footnote-continuation-notice-backward?)>-<!ATTLIST text:footnotes-configuration style:num-prefix %string; #IMPLIED>-<!ATTLIST text:footnotes-configuration style:num-suffix %string; #IMPLIED>-<!ATTLIST text:footnotes-configuration style:num-format %string; #IMPLIED>-<!ATTLIST text:footnotes-configuration style:num-letter-sync %string; #IMPLIED>-<!ATTLIST text:footnotes-configuration text:citation-body-style-name %styleName; #IMPLIED>-<!ATTLIST text:footnotes-configuration text:citation-style-name %styleName; #IMPLIED>-<!ATTLIST text:footnotes-configuration text:default-style-name  %styleName; #IMPLIED>-<!ATTLIST text:footnotes-configuration text:master-page-name %styleName; #IMPLIED>-<!ATTLIST text:footnotes-configuration text:start-value %integer; #IMPLIED>-<!ATTLIST text:footnotes-configuration text:footnotes-position (document|page) "page">-<!ATTLIST text:footnotes-configuration text:start-numbering-at (document|chapter|page) "document">--<!ELEMENT text:footnote-continuation-notice-forward (#PCDATA)> -<!ELEMENT text:footnote-continuation-notice-backward (#PCDATA)>--<!ELEMENT text:endnotes-configuration EMPTY>-<!ATTLIST text:endnotes-configuration style:num-prefix %string; #IMPLIED>-<!ATTLIST text:endnotes-configuration style:num-suffix %string; #IMPLIED>-<!ATTLIST text:endnotes-configuration style:num-format %string; #IMPLIED>-<!ATTLIST text:endnotes-configuration style:num-letter-sync %string; #IMPLIED>-<!ATTLIST text:endnotes-configuration text:start-value %integer; #IMPLIED>-<!ATTLIST text:endnotes-configuration text:citation-style-name %styleName; #IMPLIED>-<!ATTLIST text:endnotes-configuration text:citation-body-style-name %styleName; #IMPLIED>-<!ATTLIST text:endnotes-configuration text:default-style-name %styleName; #IMPLIED>-<!ATTLIST text:endnotes-configuration text:master-page-name %styleName; #IMPLIED>--<!-- Validity constraint: text:footnote and text:endnote elements may not -	contain other text:footnote or text:endnote elements, even though the DTD-	allows this (via the %text; in the foot-/endnote-body).-	Unfortunatetly, this constraint cannot be easily specified in the DTD.--->-<!ELEMENT text:footnote (text:footnote-citation, text:footnote-body)>-<!ATTLIST text:footnote text:id ID #IMPLIED>--<!ELEMENT text:footnote-citation (#PCDATA)>-<!ATTLIST text:footnote-citation text:label %string; #IMPLIED>--<!ELEMENT text:footnote-body (text:h|text:p|-							  text:ordered-list|text:unordered-list)*>--<!ELEMENT text:endnote (text:endnote-citation, text:endnote-body)>-<!ATTLIST text:endnote text:id ID #IMPLIED>--<!ELEMENT text:endnote-citation (#PCDATA)>-<!ATTLIST text:endnote-citation text:label %string; #IMPLIED>--<!ELEMENT text:endnote-body (text:h|text:p|-							 text:ordered-list|text:unordered-list)*>--<!ENTITY % sectionAttr "text:name CDATA #REQUIRED-                        text:style-name %styleName; #IMPLIED-                        text:protected %boolean; 'false' ">---<!ELEMENT text:section ((text:section-source|office:dde-source)?,-						%sectionText;) >--<!ATTLIST text:section %sectionAttr;>-<!ATTLIST text:section text:display (true|none|condition) "true">-<!ATTLIST text:section text:condition %formula; #IMPLIED>-<!ATTLIST text:section text:protection-key CDATA #IMPLIED>-<!ATTLIST text:section text:is-hidden %boolean; #IMPLIED>--<!ELEMENT text:section-source EMPTY>-<!ATTLIST text:section-source xlink:href %string; #IMPLIED>-<!ATTLIST text:section-source xlink:type (simple) #FIXED "simple">-<!ATTLIST text:section-source xlink:show (embed) #FIXED "embed">-<!ATTLIST text:section-source text:section-name %string; #IMPLIED>-<!ATTLIST text:section-source text:filter-name %string; #IMPLIED>--<!ELEMENT text:table-of-content (text:table-of-content-source, -								 text:index-body)   >-<!ATTLIST text:table-of-content %sectionAttr;>--<!ELEMENT text:table-of-content-source (text:index-title-template? , -										text:table-of-content-entry-template*,-										text:index-source-styles* ) >-<!ATTLIST text:table-of-content-source text:outline-level %integer; #IMPLIED>-<!ATTLIST text:table-of-content-source text:use-index-marks %boolean; "true">-<!ATTLIST text:table-of-content-source text:use-index-source-styles -															%boolean; "false">-<!ATTLIST text:table-of-content-source text:index-scope (document|chapter) -														"document">-<!ATTLIST text:table-of-content-source text:relative-tab-stop-position -															%boolean; "true">-<!ATTLIST text:table-of-content-source fo:language %string; #IMPLIED>-<!ATTLIST text:table-of-content-source fo:country %string; #IMPLIED>-<!ATTLIST text:table-of-content-source text:sort-algorithm %string; #IMPLIED>--<!ELEMENT text:table-of-content-entry-template (text:index-entry-chapter-number |-												text:index-entry-page-number |-												text:index-entry-text |-												text:index-entry-span |-												text:index-entry-tab-stop |-												text:index-entry-link-start |-												text:index-entry-link-end)* >-<!ATTLIST text:table-of-content-entry-template text:outline-level -						%integer; #REQUIRED>-<!ATTLIST text:table-of-content-entry-template text:style-name -						%styleName; #REQUIRED>--<!ELEMENT text:illustration-index -			(text:illustration-index-source, text:index-body)>-<!ATTLIST text:illustration-index %sectionAttr;>--<!ELEMENT text:illustration-index-source (text:index-title-template?,-									text:illustration-index-entry-template?) >-<!ATTLIST text:illustration-index-source text:index-scope -									(document|chapter) "document">-<!ATTLIST text:illustration-index-source text:relative-tab-stop-position -									%boolean; "true">-<!ATTLIST text:illustration-index-source text:use-caption %boolean; "true">-<!ATTLIST text:illustration-index-source text:caption-sequence-name -									%string; #IMPLIED>-<!ATTLIST text:illustration-index-source text:caption-sequence-format -									(text|category-and-value|caption) "text">-<!ATTLIST text:illustration-index-source fo:language %string; #IMPLIED>-<!ATTLIST text:illustration-index-source fo:country %string; #IMPLIED>-<!ATTLIST text:illustration-index-source text:sort-algorithm %string; #IMPLIED>--<!ELEMENT text:illustration-index-entry-template -								( text:index-entry-page-number |-								  text:index-entry-text |-								  text:index-entry-span |-								  text:index-entry-tab-stop )* >-<!ATTLIST text:illustration-index-entry-template text:style-name -									%styleName; #REQUIRED>--<!ELEMENT text:table-index (text:table-index-source, text:index-body)>-<!ATTLIST text:table-index %sectionAttr;>--<!ELEMENT text:table-index-source (text:index-title-template?, -									text:table-index-entry-template?) >-<!ATTLIST text:table-index-source text:index-scope -									(document|chapter) "document">-<!ATTLIST text:table-index-source text:relative-tab-stop-position -									%boolean; "true">-<!ATTLIST text:table-index-source text:use-caption %boolean; "true">-<!ATTLIST text:table-index-source text:caption-sequence-name -									%string; #IMPLIED>-<!ATTLIST text:table-index-source text:caption-sequence-format -									(text|category-and-value|caption) "text">-<!ATTLIST text:table-index-source fo:language %string; #IMPLIED>-<!ATTLIST text:table-index-source fo:country %string; #IMPLIED>-<!ATTLIST text:table-index-source text:sort-algorithm %string; #IMPLIED>--<!ELEMENT text:table-index-entry-template ( text:index-entry-page-number |-											text:index-entry-text |-											text:index-entry-span |-											text:index-entry-tab-stop )* >-<!ATTLIST text:table-index-entry-template text:style-name -											%styleName; #REQUIRED>--<!ELEMENT text:object-index ( text:object-index-source, text:index-body ) >-<!ATTLIST text:object-index %sectionAttr;>--<!ELEMENT text:object-index-source ( text:index-title-template?,-									 text:object-index-entry-template? ) >-<!ATTLIST text:object-index-source text:index-scope -									(document|chapter) "document">-<!ATTLIST text:object-index-source text:relative-tab-stop-position -									%boolean; "true">-<!ATTLIST text:object-index-source text:use-spreadsheet-objects -									%boolean; "false">-<!ATTLIST text:object-index-source text:use-draw-objects %boolean; "false">-<!ATTLIST text:object-index-source text:use-chart-objects %boolean; "false">-<!ATTLIST text:object-index-source text:use-other-objects %boolean; "false">-<!ATTLIST text:object-index-source text:use-math-objects %boolean; "false">-<!ATTLIST text:object-index-source fo:language %string; #IMPLIED>-<!ATTLIST text:object-index-source fo:country %string; #IMPLIED>-<!ATTLIST text:object-index-source text:sort-algorithm %string; #IMPLIED>--<!ELEMENT text:object-index-entry-template ( text:index-entry-page-number |-											 text:index-entry-text |-											 text:index-entry-span |-											 text:index-entry-tab-stop )* >-<!ATTLIST text:object-index-entry-template text:style-name -											%styleName; #REQUIRED >--<!ELEMENT text:user-index (text:user-index-source, text:index-body) >-<!ATTLIST text:user-index %sectionAttr;>--<!ELEMENT text:user-index-source ( text:index-title-template?,-								   text:user-index-entry-template*,-								   text:index-source-styles* ) >-<!ATTLIST text:user-index-source text:index-scope -									(document|chapter) "document">-<!ATTLIST text:user-index-source text:relative-tab-stop-position-									%boolean; "true">-<!ATTLIST text:user-index-source text:use-index-marks %boolean; "false">-<!ATTLIST text:user-index-source text:use-graphics %boolean; "false">-<!ATTLIST text:user-index-source text:use-tables %boolean; "false">-<!ATTLIST text:user-index-source text:use-floating-frames %boolean; "false">-<!ATTLIST text:user-index-source text:use-objects %boolean; "false">-<!ATTLIST text:user-index-source text:use-index-source-styles -													%boolean; "false">-<!ATTLIST text:user-index-source text:copy-outline-levels %boolean; "false">-<!ATTLIST text:user-index-source fo:language %string; #IMPLIED>-<!ATTLIST text:user-index-source fo:country %string; #IMPLIED>-<!ATTLIST text:user-index-source text:sort-algorithm %string; #IMPLIED>-<!ATTLIST text:user-index-source text:index-name %string; #IMPLIED>--<!ELEMENT text:user-index-entry-template ( text:index-entry-chapter |-										   text:index-entry-page-number |-										   text:index-entry-text |-										   text:index-entry-span |-										   text:index-entry-tab-stop )* >-<!ATTLIST text:user-index-entry-template text:outline-level %integer; #REQUIRED>-<!ATTLIST text:user-index-entry-template text:style-name %styleName; #REQUIRED>--<!ELEMENT text:alphabetical-index (text:alphabetical-index-source, -									text:index-body)>-<!ATTLIST text:alphabetical-index %sectionAttr;>--<!ELEMENT text:alphabetical-index-source ( text:index-title-template?, -							text:alphabetical-index-entry-template* ) >-<!ATTLIST text:alphabetical-index-source text:index-scope -												(document|chapter) "document">-<!ATTLIST text:alphabetical-index-source text:relative-tab-stop-position-												%boolean; "true">-<!ATTLIST text:alphabetical-index-source text:ignore-case %boolean; "false">-<!ATTLIST text:alphabetical-index-source text:main-entry-style-name -												%styleName; #IMPLIED>-<!ATTLIST text:alphabetical-index-source text:alphabetical-separators -												%boolean; "false">-<!ATTLIST text:alphabetical-index-source text:combine-entries-												%boolean; "true">-<!ATTLIST text:alphabetical-index-source text:combine-entries-with-dash-												%boolean; "false">-<!ATTLIST text:alphabetical-index-source text:combine-entries-with-pp-												%boolean; "true">-<!ATTLIST text:alphabetical-index-source text:use-keys-as-entries -												%boolean; "false">-<!ATTLIST text:alphabetical-index-source text:capitalize-entries-												%boolean; "false">-<!ATTLIST text:alphabetical-index-source text:comma-separated-												%boolean; "false">-<!ATTLIST text:alphabetical-index-source fo:language %string; #IMPLIED>-<!ATTLIST text:alphabetical-index-source fo:country %string; #IMPLIED>-<!ATTLIST text:alphabetical-index-source text:sort-algorithm %string; #IMPLIED>--<!ELEMENT text:alphabetical-index-entry-template ( text:index-entry-chapter |-												text:index-entry-page-number |-												text:index-entry-text |-												text:index-entry-span |-												text:index-entry-tab-stop )* >-<!ATTLIST text:alphabetical-index-entry-template text:outline-level -												(1|2|3|separator) #REQUIRED>-<!ATTLIST text:alphabetical-index-entry-template text:style-name -												%styleName; #REQUIRED>--<!ELEMENT text:alphabetical-index-auto-mark-file EMPTY>-<!ATTLIST text:alphabetical-index-auto-mark-file xlink:href CDATA #IMPLIED>-<!ATTLIST text:alphabetical-index-auto-mark-file xlink:type (simple) #FIXED "simple">--<!ELEMENT text:bibliography (text:bibliography-source, text:index-body) >-<!ATTLIST text:bibliography %sectionAttr;>--<!ELEMENT text:bibliography-source ( text:index-title-template?,-									 text:bibliography-entry-template* ) >--<!ELEMENT text:bibliography-entry-template ( text:index-entry-span |-											 text:index-entry-tab-stop |-											 text:index-entry-bibliography )* >-<!ATTLIST text:bibliography-entry-template text:bibliography-type -				( article | book | booklet | conference | custom1 | custom2 | -				  custom3 | custom4 | custom5 | email | inbook | incollection |-				  inproceedings | journal | manual | mastersthesis | misc | -				  phdthesis | proceedings | techreport | unpublished | www ) -				#REQUIRED >-<!ATTLIST text:bibliography-entry-template text:style-name -													%styleName; #REQUIRED>--<!ELEMENT text:index-body %sectionText; >--<!-- -Validity constraint: text:index-title elements may appear only in-indices, and there may be only one text:index-title element.  --->-<!ELEMENT text:index-title %sectionText; >-<!ATTLIST text:index-title text:style-name %styleName; #IMPLIED>-<!ATTLIST text:index-title text:name %string; #IMPLIED>--<!ELEMENT text:index-title-template (#PCDATA)>-<!ATTLIST text:index-title-template text:style-name %styleName; #IMPLIED>--<!ELEMENT text:index-entry-chapter-number EMPTY>-<!ATTLIST text:index-entry-chapter-number text:style-name %styleName; #IMPLIED>--<!ELEMENT text:index-entry-chapter EMPTY>-<!ATTLIST text:index-entry-chapter text:style-name %styleName; #IMPLIED>-<!ATTLIST text:index-entry-chapter text:display (name|number|number-and-name) -															"number-and-name" >--<!ELEMENT text:index-entry-text EMPTY>-<!ATTLIST text:index-entry-text text:style-name %styleName; #IMPLIED>--<!ELEMENT text:index-entry-page-number EMPTY>-<!ATTLIST text:index-entry-page-number text:style-name %styleName; #IMPLIED>--<!ELEMENT text:index-entry-span (#PCDATA)>-<!ATTLIST text:index-entry-span text:style-name %styleName; #IMPLIED>--<!ELEMENT text:index-entry-bibliography EMPTY>-<!ATTLIST text:index-entry-bibliography text:style-name %styleName; #IMPLIED>-<!ATTLIST text:index-entry-bibliography text:bibliography-data-field-							( address | annote | author | bibliography-type |-							  booktitle | chapter | custom1 | custom2 | -							  custom3 | custom4 | custom5 | edition | editor |-							  howpublished | identifier | institution | isbn |-							  journal | month | note | number | organizations |-							  pages | publisher | report-type | school | -							  series | title | url | volume | year ) #REQUIRED>---<!ELEMENT text:index-entry-tab-stop EMPTY>-<!ATTLIST text:index-entry-tab-stop text:style-name %styleName; #IMPLIED>-<!ATTLIST text:index-entry-tab-stop style:leader-char %character; " ">-<!ATTLIST text:index-entry-tab-stop style:type (left|right) "left">-<!ATTLIST text:index-entry-tab-stop style:position %length; #IMPLIED>--<!ELEMENT text:index-entry-link-start EMPTY>-<!ATTLIST text:index-entry-link-start text:style-name %styleName; #IMPLIED>--<!ELEMENT text:index-entry-link-end EMPTY>-<!ATTLIST text:index-entry-link-end text:style-name %styleName; #IMPLIED>--<!ELEMENT text:index-source-styles (text:index-source-style)*>-<!ATTLIST text:index-source-styles text:outline-level %integer; #REQUIRED>--<!ELEMENT text:index-source-style EMPTY>-<!ATTLIST text:index-source-style text:style-name %styleName; #REQUIRED>--<!ELEMENT text:toc-mark-start EMPTY>-<!ATTLIST text:toc-mark-start text:id %string; #REQUIRED>-<!ATTLIST text:toc-mark-start text:outline-level %integer; #IMPLIED>--<!ELEMENT text:toc-mark-end EMPTY>-<!ATTLIST text:toc-mark-end text:id %string; #REQUIRED>--<!ELEMENT text:toc-mark EMPTY>-<!ATTLIST text:toc-mark text:string-value %string; #REQUIRED>-<!ATTLIST text:toc-mark text:outline-level %integer; #IMPLIED>--<!ELEMENT text:user-index-mark-start EMPTY>-<!ATTLIST text:user-index-mark-start text:id %string; #REQUIRED>-<!ATTLIST text:user-index-mark-start text:outline-level %integer; #IMPLIED>-<!ATTLIST text:user-index-mark-start text:index-name %string; #IMPLIED>--<!ELEMENT text:user-index-mark-end EMPTY>-<!ATTLIST text:user-index-mark-end text:id %string; #REQUIRED>--<!ELEMENT text:user-index-mark EMPTY>-<!ATTLIST text:user-index-mark text:string-value %string; #REQUIRED>-<!ATTLIST text:user-index-mark text:outline-level %integer; #IMPLIED>-<!ATTLIST text:user-index-mark text:index-name %string; #IMPLIED>--<!ELEMENT text:alphabetical-index-mark-start EMPTY>-<!ATTLIST text:alphabetical-index-mark-start text:id %string; #REQUIRED>-<!ATTLIST text:alphabetical-index-mark-start text:key1 %string; #IMPLIED>-<!ATTLIST text:alphabetical-index-mark-start text:key2 %string; #IMPLIED>-<!ATTLIST text:alphabetical-index-mark-start text:main-etry %boolean; "false">--<!ELEMENT text:alphabetical-index-mark-end EMPTY>-<!ATTLIST text:alphabetical-index-mark-end text:id %string; #REQUIRED>--<!ELEMENT text:alphabetical-index-mark EMPTY>-<!ATTLIST text:alphabetical-index-mark text:string-value %string; #REQUIRED>-<!ATTLIST text:alphabetical-index-mark text:key1 %string; #IMPLIED>-<!ATTLIST text:alphabetical-index-mark text:key2 %string; #IMPLIED>-<!ATTLIST text:alphabetical-index-mark text:main-etry %boolean; "false">--<!ELEMENT text:bibliography-configuration (text:sort-key)*>-<!ATTLIST text:bibliography-configuration text:prefix %string; #IMPLIED>-<!ATTLIST text:bibliography-configuration text:suffix %string; #IMPLIED>-<!ATTLIST text:bibliography-configuration text:sort-by-position %boolean; "true">-<!ATTLIST text:bibliography-configuration text:numbered-entries %boolean; "false">-<!ATTLIST text:bibliography-configuration fo:language %string; #IMPLIED>-<!ATTLIST text:bibliography-configuration fo:country %string; #IMPLIED>-<!ATTLIST text:bibliography-configuration text:sort-algorithm %string; #IMPLIED>--<!ELEMENT text:sort-key EMPTY>-<!ATTLIST text:sort-key text:key ( address | annote | author | -	bibliography-type | booktitle | chapter | custom1 | custom2 | -	custom3 | custom4 | custom5 | edition | editor | howpublished | -	identifier | institution | isbn | journal | month | note | number | -	organizations | pages | publisher | report-type | school | series | -	title | url | volume | year ) #REQUIRED>-<!ATTLIST text:sort-key text:sort-ascending %boolean; "true">--<!ELEMENT text:linenumbering-configuration (text:linenumbering-separator?)>-<!ATTLIST text:linenumbering-configuration text:style-name %styleName; #IMPLIED>-<!ATTLIST text:linenumbering-configuration text:number-lines %boolean; "true">-<!ATTLIST text:linenumbering-configuration text:count-empty-lines %boolean; "true">-<!ATTLIST text:linenumbering-configuration text:count-in-floating-frames %boolean; "false">-<!ATTLIST text:linenumbering-configuration text:restart-numbering %boolean; "false">-<!ATTLIST text:linenumbering-configuration text:offset %nonNegativeLength; #IMPLIED>-<!ATTLIST text:linenumbering-configuration style:num-format (1|a|A|i|I) "1">-<!ATTLIST text:linenumbering-configuration style:num-letter-sync %boolean; "false">-<!ATTLIST text:linenumbering-configuration text:number-position (left|rigth|inner|outer) "left">-<!ATTLIST text:linenumbering-configuration text:increment %nonNegativeInteger; #IMPLIED>--<!ELEMENT text:linenumbering-separator (#PCDATA)>-<!ATTLIST text:linenumbering-separator text:increment %nonNegativeInteger; #IMPLIED>--<!ELEMENT text:script (#PCDATA)>-<!ATTLIST text:script script:language CDATA #REQUIRED>-<!ATTLIST text:script xlink:href CDATA #IMPLIED>-<!ATTLIST text:script xlink:type (simple) #FIXED "simple">--<!ELEMENT text:measure (#PCDATA)>-<!ATTLIST text:measure text:kind (value|unit|gap) #REQUIRED>--<!ELEMENT text:ruby (text:ruby-base, text:ruby-text)>-<!ATTLIST text:ruby text:style-name %styleName; #IMPLIED>--<!ELEMENT text:ruby-base %inline-text;>--<!ELEMENT text:ruby-text (#PCDATA)>-<!ATTLIST text:ruby-text text:style-name %styleName; #IMPLIED>--<!-- elements for change tracking -->--<!ELEMENT text:change EMPTY>-<!ATTLIST text:change text:change-id CDATA #REQUIRED>--<!ELEMENT text:change-start EMPTY>-<!ATTLIST text:change-start text:change-id CDATA #REQUIRED>--<!ELEMENT text:change-end EMPTY>-<!ATTLIST text:change-end text:change-id CDATA #REQUIRED>--<!ELEMENT text:tracked-changes (text:changed-region)*>-<!ATTLIST text:tracked-changes text:track-changes %boolean; "true">-<!ATTLIST text:tracked-changes text:protection-key CDATA #IMPLIED>--<!ELEMENT text:changed-region (text:insertion | -							   (text:deletion, text:insertion?) | -                               text:format-change) >-<!ATTLIST text:changed-region text:id ID #REQUIRED>-<!ATTLIST text:changed-region text:merge-last-paragraph %boolean; "true">--<!ELEMENT text:insertion (office:change-info, %sectionText;)>-<!ELEMENT text:deletion (office:change-info, %sectionText;)>-<!ELEMENT text:format-change (office:change-info)>----<!ELEMENT table:calculation-settings (table:null-date?, table:iteration?)>-<!ATTLIST table:calculation-settings-	table:case-sensitive %boolean; "true"-	table:precision-as-shown %boolean; "false"-	table:search-criteria-must-apply-to-whole-cell %boolean; "true"-	table:automatic-find-labels %boolean; "true"-	table:use-regular-expressions %boolean; "true"-	table:null-year %positiveInteger; "1930"->-<!ELEMENT table:null-date EMPTY>-<!ATTLIST table:null-date-	table:value-type %valueType; #FIXED "date"-	table:date-value %date; "1899-12-30"->-<!ELEMENT table:iteration EMPTY>-<!ATTLIST table:iteration-	table:status (enable | disable) "disable"-	table:steps %positiveInteger; "100"-	table:maximum-difference %float; "0.001"->--<!ELEMENT table:tracked-changes (table:cell-content-change | table:insertion | table:deletion | table:movement | table:rejection)*>-<!ATTLIST table:tracked-changes table:track-changes %boolean; "true"-				table:protected %boolean; "false"-				table:protection-key CDATA #IMPLIED->--<!ELEMENT table:dependences (table:dependence)+>-<!ELEMENT table:dependence EMPTY>-<!ATTLIST table:dependence-	table:id CDATA #REQUIRED->-<!ELEMENT table:deletions (table:cell-content-deletion | table:change-deletion)+>-<!ELEMENT table:cell-content-deletion (table:cell-address?, table:change-track-table-cell?)>-<!ATTLIST table:cell-content-deletion-	table:id CDATA #IMPLIED->-<!ELEMENT table:change-deletion EMPTY>-<!ATTLIST table:change-deletion-	table:id CDATA #IMPLIED->-<!ELEMENT table:insertion (office:change-info, table:dependences?, table:deletions?)>-<!ATTLIST table:insertion-	table:id CDATA #REQUIRED-	table:acceptance-state (accepted | rejected | pending) "pending"-	table:rejecting-change-id %positiveInteger; #IMPLIED-	table:type (row | column | table) #REQUIRED-	table:position %integer; #REQUIRED-	table:count %positiveInteger; "1"-	table:table %integer; #IMPLIED->-<!ELEMENT table:deletion (office:change-info, table:dependences?, table:deletions?, table:cut-offs?)>-<!ATTLIST table:deletion-	table:id CDATA #REQUIRED-	table:acceptance-state (accepted | rejected | pending) "pending"-	table:rejecting-change-id %positiveInteger; #IMPLIED-	table:type (row | column | table) #REQUIRED-	table:position %integer; #REQUIRED-	table:count %positiveInteger; "1"-	table:table %integer; #IMPLIED-	table:multi-deletion-spanned %integer; #IMPLIED->-<!ELEMENT table:cut-offs (table:movement-cut-off+ | (table:insertion-cut-off, table:movement-cut-off*))>-<!ELEMENT table:insertion-cut-off EMPTY>-<!ATTLIST table:insertion-cut-off-	table:id CDATA #REQUIRED-	table:position %integer; #REQUIRED->-<!ELEMENT table:movement-cut-off EMPTY>-<!ATTLIST table:movement-cut-off-	table:id CDATA #REQUIRED-	table:start-position %integer; #IMPLIED-	table:end-position %integer; #IMPLIED-	table:position %integer; #IMPLIED->-<!ELEMENT table:movement (table:source-range-address, table:target-range-address, office:change-info, table:dependences?, table:deletions?)>-<!ATTLIST table:movement-	table:id CDATA #REQUIRED-	table:acceptance-state (accepted | rejected | pending) "pending"-	table:rejecting-change-id %positiveInteger; #IMPLIED->-<!ELEMENT table:target-range-address EMPTY>-<!ATTLIST table:target-range-address-	table:column %integer; #IMPLIED-	table:row %integer; #IMPLIED-	table:table %integer; #IMPLIED-	table:start-column %integer; #IMPLIED-	table:start-row %integer; #IMPLIED-	table:start-table %integer; #IMPLIED-	table:end-column %integer; #IMPLIED-	table:end-row %integer; #IMPLIED-	table:end-table %integer; #IMPLIED->-<!ELEMENT table:source-range-address EMPTY>-<!ATTLIST table:source-range-address-	table:column %integer; #IMPLIED-	table:row %integer; #IMPLIED-	table:table %integer; #IMPLIED-	table:start-column %integer; #IMPLIED-	table:start-row %integer; #IMPLIED-	table:start-table %integer; #IMPLIED-	table:end-column %integer; #IMPLIED-	table:end-row %integer; #IMPLIED-	table:end-table %integer; #IMPLIED->-<!ELEMENT table:change-track-table-cell (text:p*)>-<!ATTLIST table:change-track-table-cell-	table:cell-address %cell-address; #IMPLIED-	table:matrix-covered (true | false) "false"-	table:formula %string; #IMPLIED-	table:number-matrix-rows-spanned %positiveInteger; #IMPLIED-	table:number-matrix-columns-spanned %positiveInteger; #IMPLIED-	table:value-type %valueType; "string"-	table:value %float; #IMPLIED-	table:date-value %date; #IMPLIED-	table:time-value %timeInstance; #IMPLIED-	table:string-value %string; #IMPLIED->-<!ELEMENT table:cell-content-change (table:cell-address, office:change-info, table:dependences?, table:deletions?, table:previous)>-<!ATTLIST table:cell-content-change-	table:id CDATA #REQUIRED-	table:acceptance-state (accepted | rejected | pending) "pending"-	table:rejecting-change-id %positiveInteger; #IMPLIED->-<!ELEMENT table:cell-address EMPTY>-<!ATTLIST table:cell-address-	table:column %integer; #IMPLIED-	table:row %integer; #IMPLIED-	table:table %integer; #IMPLIED->-<!ELEMENT table:previous (table:change-track-table-cell)>-<!ATTLIST table:previous-	table:id CDATA #IMPLIED->-<!ELEMENT table:rejection (office:change-info, table:dependences?, table:deletions?)>-<!ATTLIST table:rejection-	table:id CDATA #REQUIRED-	table:acceptance-state (accepted | rejected | pending) "pending"-	table:rejecting-change-id %positiveInteger; #IMPLIED->--<!ENTITY % table-columns "table:table-columns | ( table:table-column | table:table-column-group )+">-<!ENTITY % table-header-columns "table:table-header-columns">-<!ENTITY % table-rows "table:table-rows | ( table:table-row | table:table-row-group )+">-<!ENTITY % table-header-rows "table:table-header-rows">-<!ENTITY % table-column-groups "((%table-columns;),(%table-header-columns;,(%table-columns;)?)?) | (%table-header-columns;,(%table-columns;)?)">-<!ENTITY % table-row-groups "((%table-rows;),(%table-header-rows;,(%table-rows;)?)?) | (%table-header-rows;,(%table-rows;)?)">-<!ELEMENT table:table (table:table-source?, table:scenario?, office:forms?, table:shapes?, (%table-column-groups;), (%table-row-groups;))>-<!ATTLIST table:table-	table:name %string; #IMPLIED-	table:style-name %styleName; #IMPLIED-	table:protected %boolean; "false"-	table:protection-key CDATA #IMPLIED-	table:print-ranges %cell-range-address-list; #IMPLIED->-<!ELEMENT table:table-source EMPTY>-<!ATTLIST table:table-source-	table:mode (copy-all | copy-results-only) "copy-all"-	xlink:type (simple) #FIXED "simple"-	xlink:actuate (onRequest) "onRequest"-	xlink:href %uriReference; #REQUIRED-	table:filter-name CDATA #IMPLIED-	table:table-name CDATA #IMPLIED-	table:filter-options CDATA #IMPLIED-	table:refresh-delay %timeDuration; #IMPLIED->-<!ELEMENT table:scenario EMPTY>-<!ATTLIST table:scenario-	table:display-border %boolean; "true"-	table:border-color %color; #IMPLIED-	table:copy-back %boolean; "true"-	table:copy-styles %boolean; "true"-	table:copy-formulas %boolean; "true"-	table:is-active %boolean; #REQUIRED-	table:scenario-ranges %cell-range-address-list; #REQUIRED-	table:comment CDATA #IMPLIED->-<!ELEMENT table:shapes %shapes;>-<!ELEMENT table:table-column-group (table:table-header-columns | table:table-column | table:table-column-group)+>-<!ATTLIST table:table-column-group-	table:display %boolean; "true"->-<!ELEMENT table:table-header-columns (table:table-column | table:table-column-group)+>-<!ELEMENT table:table-columns (table:table-column | table:table-column-group)+>-<!ELEMENT table:table-column EMPTY>-<!ATTLIST table:table-column-	table:number-columns-repeated %positiveInteger; "1"-	table:style-name %styleName; #IMPLIED-	table:visibility (visible | collapse | filter) "visible"-	table:default-cell-style-name %styleName; #IMPLIED->-<!ELEMENT table:table-row-group (table:table-header-rows | table:table-row | table:table-row-group)+>-<!ATTLIST table:table-row-group-	table:display %boolean; "true"->-<!ELEMENT table:table-header-rows (table:table-row | table:table-row-group)+>-<!ELEMENT table:table-rows (table:table-row | table:table-row-group)+>-<!ENTITY % table-cells "(table:table-cell|table:covered-table-cell)+">-<!ELEMENT table:table-row %table-cells;>-<!ATTLIST table:table-row-	table:number-rows-repeated %positiveInteger; "1"-	table:style-name %styleName; #IMPLIED-	table:visibility (visible | collapse | filter) "visible"-	table:default-cell-style-name %styleName; #IMPLIED->--<!ENTITY % text-wo-table "(text:h|text:p|text:ordered-list|text:unordered-list|%shapes;)*">-<!ENTITY % cell-content "(table:cell-range-source?,office:annotation?,table:detective?,(table:sub-table|%text-wo-table;))">-<!ELEMENT table:table-cell %cell-content;>-<!ELEMENT table:covered-table-cell %cell-content;>-<!ATTLIST table:table-cell-	table:number-columns-repeated %positiveInteger; "1"-	table:number-rows-spanned %positiveInteger; "1"-	table:number-columns-spanned %positiveInteger; "1"-	table:style-name %styleName; #IMPLIED-	table:validation-name CDATA #IMPLIED-	table:formula %string; #IMPLIED-	table:number-matrix-rows-spanned %positiveInteger; #IMPLIED-	table:number-matrix-columns-spanned %positiveInteger; #IMPLIED-	table:value-type %valueType; "string"-	table:value %float; #IMPLIED-	table:date-value %date; #IMPLIED-	table:time-value %timeInstance; #IMPLIED-	table:boolean-value %boolean; #IMPLIED-	table:string-value %string; #IMPLIED-	table:currency %string; #IMPLIED->-<!ATTLIST table:covered-table-cell-	table:number-columns-repeated %positiveInteger; "1"-	table:style-name %styleName; #IMPLIED-	table:validation-name CDATA #IMPLIED-	table:formula %string; #IMPLIED-	table:number-matrix-rows-spanned %positiveInteger; #IMPLIED-	table:number-matrix-columns-spanned %positiveInteger; #IMPLIED-	table:value-type %valueType; "string"-	table:value %float; #IMPLIED-	table:date-value %date; #IMPLIED-	table:time-value %timeInstance; #IMPLIED-	table:boolean-value %boolean; #IMPLIED-	table:string-value %string; #IMPLIED-	table:currency %string; #IMPLIED->-<!-- cell protection in writer: cell attribute; calc uses format -->-<!ATTLIST table:table-cell table:protected %boolean; "false">--<!ELEMENT table:cell-range-source EMPTY>-<!ATTLIST table:cell-range-source-	table:name %string; #REQUIRED-	xlink:type (simple) #FIXED "simple"-	xlink:actuate (onRequest) #FIXED "onRequest"-	xlink:href %uriReference; #REQUIRED-	table:filter-name %string; #REQUIRED-	table:filter-options %string; #IMPLIED-	table:last-column-spanned %positiveInteger; #REQUIRED-	table:last-row-spanned %positiveInteger; #REQUIRED-	table:refresh-delay %timeDuration; #IMPLIED->--<!ELEMENT table:detective (table:highlighted-range*, table:operation*)>-<!ELEMENT table:highlighted-range EMPTY>-<!ATTLIST table:highlighted-range-	table:cell-range-address %cell-range-address; #IMPLIED-	table:direction (from-another-table | to-another-table | from-same-table | to-same-table) #IMPLIED-	table:contains-error %boolean; #IMPLIED-	table:marked-invalid %boolean; #IMPLIED->-<!ELEMENT table:operation EMPTY>-<!ATTLIST table:operation-	table:name (trace-dependents | remove-dependents | trace-precedents | remove-precedents | trace-errors) #REQUIRED-	table:index %nonNegativeInteger; #REQUIRED->--<!ELEMENT table:content-validations (table:content-validation)+>-<!ELEMENT table:content-validation (table:help-message?, (table:error-message | (table:error-macro, office:events?))?)>-<!ATTLIST table:content-validation-	table:name CDATA #REQUIRED-	table:condition CDATA #IMPLIED-	table:base-cell-address %cell-address; #IMPLIED-	table:allow-empty-cell %boolean; #IMPLIED->-<!ELEMENT table:help-message (text:p*)>-<!ATTLIST table:help-message-	table:title CDATA #IMPLIED-	table:display %boolean; #IMPLIED->-<!ELEMENT table:error-message (text:p*)>-<!ATTLIST table:error-message-	table:title CDATA #IMPLIED-	table:message-type (stop | warning | information) #IMPLIED-	table:display %boolean; #IMPLIED->-<!ELEMENT table:error-macro EMPTY>-<!ATTLIST table:error-macro-	table:name CDATA #IMPLIED-	table:execute %boolean; #IMPLIED->--<!ELEMENT table:sub-table ((%table-column-groups;) , (%table-row-groups;))>--<!ELEMENT table:label-ranges (table:label-range)*>-<!ELEMENT table:label-range EMPTY>-<!ATTLIST table:label-range-	table:label-cell-range-address %cell-range-address; #REQUIRED-	table:data-cell-range-address %cell-range-address; #REQUIRED-	table:orientation (column | row) #REQUIRED->--<!ELEMENT table:named-expressions (table:named-range | table:named-expression)*>-<!ELEMENT table:named-range EMPTY>-<!ATTLIST table:named-range-	table:name CDATA #REQUIRED-	table:cell-range-address %cell-range-address; #REQUIRED-	table:base-cell-address %cell-address; #IMPLIED-	table:range-usable-as CDATA "none"->-<!ELEMENT table:named-expression EMPTY>-<!ATTLIST table:named-expression-	table:name CDATA #REQUIRED-	table:expression CDATA #REQUIRED-	table:base-cell-address %cell-address; #IMPLIED->--<!ELEMENT table:filter (table:filter-condition | table:filter-and | table:filter-or)>-<!ATTLIST table:filter-	table:target-range-address %cell-range-address; #IMPLIED-	table:condition-source-range-address %cell-range-address; #IMPLIED-	table:condition-source (self | cell-range) "self"-	table:display-duplicates %boolean; "true"->-<!ELEMENT table:filter-and (table:filter-or | table:filter-condition)+>-<!ELEMENT table:filter-or (table:filter-and | table:filter-condition)+>-<!ELEMENT table:filter-condition EMPTY>-<!ATTLIST table:filter-condition-	table:field-number %nonNegativeInteger; #REQUIRED-	table:case-sensitive %boolean; "false"-	table:data-type (text | number) "text"-	table:value CDATA #REQUIRED-	table:operator CDATA #REQUIRED->--<!ELEMENT table:database-ranges (table:database-range)*>-<!ELEMENT table:database-range ((table:database-source-sql | table:database-source-table | table:database-source-query)?, table:filter?, table:sort?, table:subtotal-rules?)>-<!ATTLIST table:database-range-	table:name CDATA #IMPLIED-	table:is-selection %boolean; "false"-	table:on-update-keep-styles %boolean; "false"-	table:on-update-keep-size %boolean; "true"-	table:has-persistant-data %boolean; "true"-	table:orientation (row | column) "row"-	table:contains-header %boolean; "true"-	table:display-filter-buttons %boolean; "false"-	table:target-range-address %cell-range-address; #REQUIRED-	table:refresh-delay %timeDuration; #IMPLIED->-<!ELEMENT table:database-source-sql EMPTY>-<!ATTLIST table:database-source-sql-	table:database-name CDATA #REQUIRED-	table:sql-statement CDATA #REQUIRED-	table:parse-sql-statements %boolean; "false"->-<!ELEMENT table:database-source-table EMPTY>-<!ATTLIST table:database-source-table-	table:database-name CDATA #REQUIRED-	table:table-name CDATA #REQUIRED->-<!ELEMENT table:database-source-query EMPTY>-<!ATTLIST table:database-source-query-	table:database-name CDATA #REQUIRED-	table:query-name CDATA #REQUIRED->--<!ELEMENT table:sort (table:sort-by)+>-<!ATTLIST table:sort-	table:bind-styles-to-content %boolean; "true"-	table:target-range-address %cell-range-address; #IMPLIED-	table:case-sensitive %boolean; "false"-	table:language CDATA #IMPLIED-	table:country CDATA #IMPLIED-	table:algorithm CDATA #IMPLIED->-<!ELEMENT table:sort-by EMPTY>-<!ATTLIST table:sort-by-	table:field-number %nonNegativeInteger; #REQUIRED-	table:data-type CDATA "automatic"-	table:order (ascending | descending) "ascending"->--<!ELEMENT table:subtotal-rules (table:sort-groups? | table:subtotal-rule*)?>-<!ATTLIST table:subtotal-rules-	table:bind-styles-to-content %boolean; "true"-	table:case-sensitive %boolean; "false"-	table:page-breaks-on-group-change %boolean; "false"->-<!ELEMENT table:sort-groups EMPTY>-<!ATTLIST table:sort-groups-	table:data-type CDATA "automatic"-	table:order (ascending | descending) "ascending"->-<!ELEMENT table:subtotal-rule (table:subtotal-field)*>-<!ATTLIST table:subtotal-rule-	table:group-by-field-number %nonNegativeInteger; #REQUIRED->-<!ELEMENT table:subtotal-field EMPTY>-<!ATTLIST table:subtotal-field-	table:field-number %nonNegativeInteger; #REQUIRED-	table:function CDATA #REQUIRED->--<!ELEMENT table:data-pilot-tables (table:data-pilot-table)*>-<!ELEMENT table:data-pilot-table ((table:database-source-sql | table:database-source-table | table:database-source-query | table:source-service | table:source-cell-range)?, table:data-pilot-field+)>-<!ATTLIST table:data-pilot-table-	table:name CDATA #REQUIRED-	table:application-data CDATA #IMPLIED-	table:grand-total (none | row | column | both) "both"-	table:ignore-empty-rows %boolean; "false"-	table:identify-categories %boolean; "false"-	table:target-range-address %cell-range-address; #REQUIRED-	table:buttons %cell-range-address-list; #REQUIRED->-<!ELEMENT table:source-service EMPTY>-<!ATTLIST table:source-service-	table:name CDATA #REQUIRED-	table:source-name CDATA #REQUIRED-	table:object-name CDATA #REQUIRED-	table:username CDATA #IMPLIED-	table:password CDATA #IMPLIED->-<!ELEMENT table:source-cell-range (table:filter)?>-<!ATTLIST table:source-cell-range-	table:cell-range-address %cell-range-address; #REQUIRED->-<!ELEMENT table:data-pilot-field (table:data-pilot-level)?>-<!ATTLIST table:data-pilot-field-	table:source-field-name CDATA #REQUIRED-	table:is-data-layout-field %boolean; "false"-	table:function CDATA #REQUIRED-	table:orientation (row | column | data | page | hidden) #REQUIRED-	table:used-hierarchy %positiveInteger; "1"->-<!ELEMENT table:data-pilot-level (table:data-pilot-subtotals?, table:data-pilot-members?)>-<!ATTLIST table:data-pilot-level-	table:display-empty %boolean; #IMPLIED->-<!ELEMENT table:data-pilot-subtotals (table:data-pilot-subtotal)*>-<!ELEMENT table:data-pilot-subtotal EMPTY>-<!ATTLIST table:data-pilot-subtotal-	table:function CDATA #REQUIRED->-<!ELEMENT table:data-pilot-members (table:data-pilot-member)*>-<!ELEMENT table:data-pilot-member EMPTY>-<!ATTLIST table:data-pilot-member-	table:name CDATA #REQUIRED-	table:display %boolean; #IMPLIED-	table:display-details %boolean; #IMPLIED->--<!ELEMENT table:consolidation EMPTY>-<!ATTLIST table:consolidation-	table:function CDATA #REQUIRED-	table:source-cell-range-addresses %cell-range-address-list; #REQUIRED-	table:target-cell-address %cell-address; #REQUIRED-	table:use-label (none | column | row | both) "none"-	table:link-to-source-data %boolean; "false"->--<!ELEMENT table:dde-links (table:dde-link)+>-<!ELEMENT table:dde-link (office:dde-source, table:table)>---<!ENTITY % chart-class "(line|area|circle|ring|scatter|radar|bar|stock|add-in)">-<!ENTITY % chart-solid-type "(cuboid|cylinder|cone|pyramid)">--<!-- Chart element -->-<!ELEMENT chart:chart ( chart:title?, chart:subtitle?, chart:legend?,-					    chart:plot-area,-						table:table? )>-<!ATTLIST chart:chart-		  chart:class %chart-class; #REQUIRED-		  chart:add-in-name %string; #IMPLIED-		  chart:table-number-list %string; #IMPLIED-		  draw:name %string; #IMPLIED-		  %draw-position;-		  %draw-size;-		  %draw-style-name;-		  chart:column-mapping %string; #IMPLIED-		  chart:row-mapping %string; #IMPLIED-		  chart:style-name %styleName; #IMPLIED>--<!ATTLIST chart:chart %presentation-class; >-<!ATTLIST chart:chart %zindex;>-<!ATTLIST chart:chart %draw-end-position; >-<!ATTLIST chart:chart draw:id %draw-shape-id; >-<!ATTLIST chart:chart draw:layer %layerName; #IMPLIED>--<!ATTLIST style:properties-		  chart:scale-text %boolean; "true"-		  chart:stock-updown-bars %boolean; "false"-		  chart:stock-with-volume %boolean; "false"-		  chart:three-dimensional %boolean; "false"-		  chart:deep %boolean; "false"-		  chart:lines %boolean; "false"-		  chart:percentage %boolean; "false"-		  chart:solid-type %chart-solid-type; "cuboid"-		  chart:splines %nonNegativeInteger; "0"-		  chart:stacked %boolean; "false"-		  chart:symbol %integer; "-1"-		  chart:vertical %boolean; "false"-		  chart:lines-used %nonNegativeInteger; "0"-		  chart:connect-bars %boolean; "false"-		  chart:spline-order %nonNegativeInteger; "2"-		  chart:spline-resolution %nonNegativeInteger; "20"-          chart:pie-offset %nonNegativeInteger; "0">--<!-- Main/Sub Title -->-<!-- the cell-address attribute is currently not supported for titles -->-<!ELEMENT chart:title (text:p)?>-<!ATTLIST chart:title-		  table:cell-range %cell-address; #IMPLIED-		  svg:x %coordinate; #IMPLIED-		  svg:y %coordinate; #IMPLIED-		  chart:style-name %styleName; #IMPLIED >--<!ELEMENT chart:subtitle (text:p)?>-<!ATTLIST chart:subtitle-		  table:cell-range %cell-address; #IMPLIED-		  svg:x %coordinate; #IMPLIED-		  svg:y %coordinate; #IMPLIED-		  chart:style-name %styleName; #IMPLIED >--<!-- you must specify either a legend-position or both, x and y coordinates -->-<!ELEMENT chart:legend EMPTY>-<!ATTLIST chart:legend-		  chart:legend-position (top|left|bottom|right) "right"-		  svg:x %coordinate; #IMPLIED-		  svg:y %coordinate; #IMPLIED-		  chart:style-name %styleName; #IMPLIED >--<!-- Plot-Area specification -->--<!ELEMENT chart:plot-area (dr3d:light*,-						   chart:axis*,-						   chart:categories?,-						   chart:series*,-						   chart:stock-gain-marker?,-						   chart:stock-loss-marker?,-						   chart:stock-range-line?,-						   chart:wall?,-						   chart:floor?) >--<!ATTLIST chart:plot-area-		  svg:x %coordinate; #IMPLIED-		  svg:y %coordinate; #IMPLIED-		  svg:width %length; #IMPLIED-		  svg:height %length; #IMPLIED-		  chart:style-name %styleName; #IMPLIED-		  table:cell-range-address %cell-range-address; #IMPLIED-		  chart:table-number-list %string; #IMPLIED-		  chart:data-source-has-labels (none|row|column|both) "none" >--<!-- 3d scene attributes on plot-area -->-<!ATTLIST chart:plot-area-		  dr3d:vrp %vector3D; #IMPLIED-		  dr3d:vpn %vector3D; #IMPLIED-		  dr3d:vup %vector3D; #IMPLIED-		  dr3d:projection (parallel|perspective) #IMPLIED-		  dr3d:transform CDATA #IMPLIED-		  dr3d:distance %length; #IMPLIED-		  dr3d:focal-length %length; #IMPLIED-		  dr3d:shadow-slant %nonNegativeInteger; #IMPLIED-		  dr3d:shade-mode (flat|phong|gouraud|draft) #IMPLIED-		  dr3d:ambient-color %color; #IMPLIED-		  dr3d:lighting-mode %boolean; #IMPLIED >--<!ATTLIST style:properties-		  chart:series-source (columns|rows) "columns" >--<!ELEMENT chart:wall EMPTY>-<!ATTLIST chart:wall-		  svg:width %length; #IMPLIED-		  chart:style-name %styleName; #IMPLIED >--<!ELEMENT chart:floor EMPTY>-<!ATTLIST chart:floor-		  svg:width %length; #IMPLIED-		  chart:style-name %styleName; #IMPLIED >--<!-- Stock chart elements -->--<!ELEMENT chart:stock-gain-marker EMPTY>-<!ATTLIST chart:stock-gain-marker-		  chart:style-name %styleName; #IMPLIED >--<!ELEMENT chart:stock-loss-marker EMPTY>-<!ATTLIST chart:stock-loss-marker-		  chart:style-name %styleName; #IMPLIED >--<!ELEMENT chart:stock-range-line EMPTY>-<!ATTLIST chart:stock-range-line-		  chart:style-name %styleName; #IMPLIED >--<!-- Axis -->--<!ELEMENT chart:axis (chart:title?, chart:grid*)>-<!ATTLIST chart:axis-		  chart:class (category|value|series|domain) #REQUIRED-		  chart:name %string; #IMPLIED-		  chart:style-name %styleName; #IMPLIED >--<!ATTLIST style:properties-		  chart:tick-marks-major-inner %boolean; "false"-		  chart:tick-marks-major-outer %boolean; "true"-		  chart:tick-marks-minor-inner %boolean; "false"-		  chart:tick-marks-minor-outer %boolean; "false"-		  chart:logarithmic %boolean; "false"-		  chart:maximum %float; #IMPLIED-		  chart:minimum %float; #IMPLIED-		  chart:origin %float; #IMPLIED-		  chart:interval-major %float; #IMPLIED-		  chart:interval-minor %float; #IMPLIED-		  chart:gap-width %integer; #IMPLIED-		  chart:overlap %integer; #IMPLIED-		  text:line-break %boolean; "true"-		  chart:display-label %boolean; "true"-		  chart:label-arrangement (side-by-side|stagger-even|stagger-odd) "side-by-side"-		  chart:text-overlap %boolean; "false"-		  chart:visible %boolean; "true" -		  chart:link-data-style-to-source %boolean; "true" >--<!ELEMENT chart:grid EMPTY>-<!ATTLIST chart:grid-		  chart:class (major|minor) "major"-		  chart:style-name %styleName; #IMPLIED >---<!ELEMENT chart:categories EMPTY>-<!ATTLIST chart:categories-		  table:cell-range-address %cell-range-address; #IMPLIED >--<!---	each series element must have an cell-range-address element that points-	to the underlying table data.-	Impl. Note: Internally all href elements are merged to one table range-	that represents the data for the whole chart--->-<!ELEMENT chart:series ( chart:domain*,-                         chart:mean-value?,-						 chart:regression-curve?,-						 chart:error-indicator?,-						 chart:data-point* )>-<!ATTLIST chart:series-		  chart:values-cell-range-address %cell-range-address; #IMPLIED-		  chart:label-cell-address %cell-address; #IMPLIED-		  chart:class %chart-class; #IMPLIED-		  chart:attached-axis %string; #IMPLIED-		  chart:style-name %styleName; #IMPLIED >--<!ELEMENT chart:domain EMPTY>-<!ATTLIST chart:domain-		  table:cell-range-address %cell-range-address; #IMPLIED >--<!ELEMENT chart:data-point EMPTY>-<!ATTLIST chart:data-point-		  chart:repeated %nonNegativeInteger; #IMPLIED-		  chart:style-name %styleName; #IMPLIED >--<!-- statistical properties -->--<!ELEMENT chart:mean-value EMPTY>-<!ELEMENT chart:regression-curve EMPTY >-<!ELEMENT chart:error-indicator EMPTY >-<!ATTLIST chart:mean-value chart:style-name %styleName; #IMPLIED >-<!ATTLIST chart:regression-curve chart:style-name %styleName; #IMPLIED >-<!ATTLIST chart:error-indicator chart:style-name %styleName; #IMPLIED >--<!ATTLIST style:properties-		  chart:mean-value %boolean; #IMPLIED-		  chart:error-category (none|variance|standard-deviation|percentage|error-margin|constant) "none"-		  chart:error-percentage %float; #IMPLIED-		  chart:error-margin %float; #IMPLIED-		  chart:error-lower-limit %float; #IMPLIED-		  chart:error-upper-limit %float; #IMPLIED-		  chart:error-upper-indicator %boolean; #IMPLIED-		  chart:error-lower-indicator %boolean; #IMPLIED-		  chart:regression-type (none|linear|logarithmic|exponential|power) "none" >--<!-- data label properties -->--<!ATTLIST style:properties-		  chart:data-label-number (none|value|percentage) "none"-		  chart:data-label-text %boolean; "false"-		  chart:data-label-symbol %boolean; "false" >--<!-- general text properties -->--<!ATTLIST style:properties -		  text:rotation-angle %integer; "0" >--<!-- symbol properties -->--<!ATTLIST style:properties-		  chart:symbol-width %nonNegativeLength; #IMPLIED-		  chart:symbol-height %nonNegativeLength; #IMPLIED-		  chart:symbol-image-name %string; #IMPLIED >--<!-- data styles -->-<!ENTITY % any-number "( number:number | number:scientific-number | number:fraction )">-<!ENTITY % number-style-content "( (number:text,(%any-number;,number:text?)?) | (%any-number;,number:text?) )">-<!ELEMENT number:number-style ( style:properties?, %number-style-content;, style:map* )>-<!ELEMENT number:number ( number:embedded-text* )>-<!ELEMENT number:scientific-number EMPTY>-<!ELEMENT number:fraction EMPTY>--<!ELEMENT number:embedded-text (#PCDATA)>-<!ATTLIST number:embedded-text number:position %integer; #REQUIRED>--<!ENTITY % currency-symbol-and-text "number:currency-symbol,number:text?">-<!ENTITY % number-and-text "number:number,number:text?">-<!ENTITY % currency-symbol-and-number "((%number-and-text;),(%currency-symbol-and-text;)?) | ((%currency-symbol-and-text;),(%number-and-text;)?)">-<!ENTITY % currency-style-content "number:text?, (%currency-symbol-and-number;)?">--<!ELEMENT number:currency-style ( style:properties?, (%currency-style-content;), style:map* )>-<!ELEMENT number:currency-symbol (#PCDATA)>-<!ATTLIST number:currency-symbol number:language CDATA #IMPLIED>-<!ATTLIST number:currency-symbol number:country CDATA #IMPLIED>--<!ENTITY % percentage-style-content "( (number:text,(%number-and-text;)?) | (%number-and-text;) )">-<!ELEMENT number:percentage-style ( style:properties?, %percentage-style-content;, style:map* )>--<!ENTITY % any-date "( number:day | number:month | number:year | number:era | number:day-of-week | number:week-of-year | number:quarter| number:hours | number:am-pm | number:minutes | number:seconds )">-<!ENTITY % date-style-content "( (number:text,(%any-date;,number:text?)+) | (%any-date;,number:text?)+ )">-<!ELEMENT number:date-style ( style:properties?, %date-style-content;, style:map* )>-<!ELEMENT number:day EMPTY>-<!ATTLIST number:day number:style (short|long) "short">-<!ATTLIST number:day number:calendar CDATA #IMPLIED>-<!ELEMENT number:month EMPTY>-<!ATTLIST number:month number:textual %boolean; "false">-<!ATTLIST number:month number:style (short|long) "short">-<!ATTLIST number:month number:calendar CDATA #IMPLIED>-<!ELEMENT number:year EMPTY>-<!ATTLIST number:year number:style (short|long) "short">-<!ATTLIST number:year number:calendar CDATA #IMPLIED>-<!ELEMENT number:era EMPTY>-<!ATTLIST number:era number:style (short|long) "short">-<!ATTLIST number:era number:calendar CDATA #IMPLIED>-<!ELEMENT number:day-of-week EMPTY>-<!ATTLIST number:day-of-week number:style (short|long) "short">-<!ATTLIST number:day-of-week number:calendar CDATA #IMPLIED>-<!ELEMENT number:week-of-year EMPTY>-<!ATTLIST number:week-of-year number:calendar CDATA #IMPLIED>-<!ELEMENT number:quarter EMPTY>-<!ATTLIST number:quarter number:style (short|long) "short">-<!ATTLIST number:quarter number:calendar CDATA #IMPLIED>--<!ENTITY % any-time "( number:hours | number:am-pm | number:minutes | number:seconds )">-<!ENTITY % time-style-content "( (number:text,(%any-time;,number:text?)+) | (%any-time;,number:text?)+)">-<!ELEMENT number:time-style ( style:properties?, %time-style-content;, style:map* )>-<!ELEMENT number:hours EMPTY>-<!ATTLIST number:hours number:style (short|long) "short">-<!ELEMENT number:minutes EMPTY>-<!ATTLIST number:minutes number:style (short|long) "short">-<!ELEMENT number:seconds EMPTY>-<!ATTLIST number:seconds number:style (short|long) "short">-<!ATTLIST number:seconds number:decimal-places %integer; "0">-<!ELEMENT number:am-pm EMPTY>--<!ENTITY % boolean-style-content "( (number:text,(number:boolean,number:text?)?) | (number:boolean,number:text?) )">-<!ELEMENT number:boolean-style ( style:properties?,%boolean-style-content;, style:map* )>-<!ELEMENT number:boolean EMPTY>--<!ENTITY % text-style-content "( (number:text,(number:text-content,number:text?)?) | (number:text-content,number:text?) )">-<!ELEMENT number:text-style ( style:properties?,%text-style-content;, style:map* )>-<!ELEMENT number:text (#PCDATA)>-<!ELEMENT number:text-content EMPTY>--<!ATTLIST number:number-style style:name %styleName; #REQUIRED>-<!ATTLIST number:currency-style style:name %styleName; #REQUIRED>-<!ATTLIST number:percentage-style style:name %styleName; #REQUIRED>-<!ATTLIST number:date-style style:name %styleName; #REQUIRED>-<!ATTLIST number:time-style style:name %styleName; #REQUIRED>-<!ATTLIST number:boolean-style style:name %styleName; #REQUIRED>-<!ATTLIST number:text-style style:name %styleName; #REQUIRED>--<!ATTLIST number:number-style style:family CDATA #REQUIRED>-<!ATTLIST number:currency-style style:family CDATA #REQUIRED>-<!ATTLIST number:percentage-style style:family CDATA #REQUIRED>-<!ATTLIST number:date-style style:family CDATA #REQUIRED>-<!ATTLIST number:time-style style:family CDATA #REQUIRED>-<!ATTLIST number:boolean-style style:family CDATA #REQUIRED>-<!ATTLIST number:text-style style:family CDATA #REQUIRED>--<!ATTLIST number:number-style number:language CDATA #IMPLIED>-<!ATTLIST number:currency-style number:language CDATA #IMPLIED>-<!ATTLIST number:percentage-style number:language CDATA #IMPLIED>-<!ATTLIST number:date-style number:language CDATA #IMPLIED>-<!ATTLIST number:time-style number:language CDATA #IMPLIED>-<!ATTLIST number:boolean-style number:language CDATA #IMPLIED>-<!ATTLIST number:text-style number:language CDATA #IMPLIED>--<!ATTLIST number:number-style number:country CDATA #IMPLIED>-<!ATTLIST number:currency-style number:country CDATA #IMPLIED>-<!ATTLIST number:percentage-style number:country CDATA #IMPLIED>-<!ATTLIST number:date-style number:country CDATA #IMPLIED>-<!ATTLIST number:time-style number:country CDATA #IMPLIED>-<!ATTLIST number:boolean-style number:country CDATA #IMPLIED>-<!ATTLIST number:text-style number:country CDATA #IMPLIED>--<!ATTLIST number:number-style number:title CDATA #IMPLIED>-<!ATTLIST number:currency-style number:title CDATA #IMPLIED>-<!ATTLIST number:percentage-style number:title CDATA #IMPLIED>-<!ATTLIST number:date-style number:title CDATA #IMPLIED>-<!ATTLIST number:time-style number:title CDATA #IMPLIED>-<!ATTLIST number:boolean-style number:title CDATA #IMPLIED>-<!ATTLIST number:text-style number:title CDATA #IMPLIED>--<!ATTLIST number:number-style style:volatile %boolean; #IMPLIED>-<!ATTLIST number:currency-style style:volatile %boolean; #IMPLIED>-<!ATTLIST number:percentage-style style:volatile %boolean; #IMPLIED>-<!ATTLIST number:date-style style:volatile %boolean; #IMPLIED>-<!ATTLIST number:time-style style:volatile %boolean; #IMPLIED>-<!ATTLIST number:boolean-style style:volatile %boolean; #IMPLIED>-<!ATTLIST number:text-style style:volatile %boolean; #IMPLIED>--<!ATTLIST number:number-style number:transliteration-format CDATA "1">-<!ATTLIST number:currency-style number:transliteration-format CDATA "1">-<!ATTLIST number:percentage-style number:transliteration-format CDATA "1">-<!ATTLIST number:date-style number:transliteration-format CDATA "1">-<!ATTLIST number:time-style number:transliteration-format CDATA "1">-<!ATTLIST number:boolean-style number:transliteration-format CDATA "1">-<!ATTLIST number:text-style number:transliteration-format CDATA "1">--<!ATTLIST number:number-style number:transliteration-language CDATA #IMPLIED>-<!ATTLIST number:currency-style number:transliteration-language CDATA #IMPLIED>-<!ATTLIST number:percentage-style number:transliteration-language CDATA #IMPLIED>-<!ATTLIST number:date-style number:transliteration-language CDATA #IMPLIED>-<!ATTLIST number:time-style number:transliteration-language CDATA #IMPLIED>-<!ATTLIST number:boolean-style number:transliteration-language CDATA #IMPLIED>-<!ATTLIST number:text-style number:transliteration-language CDATA #IMPLIED>--<!ATTLIST number:number-style number:transliteration-country CDATA #IMPLIED>-<!ATTLIST number:currency-style number:transliteration-country CDATA #IMPLIED>-<!ATTLIST number:percentage-style number:transliteration-country CDATA #IMPLIED>-<!ATTLIST number:date-style number:transliteration-country CDATA #IMPLIED>-<!ATTLIST number:time-style number:transliteration-country CDATA #IMPLIED>-<!ATTLIST number:boolean-style number:transliteration-country CDATA #IMPLIED>-<!ATTLIST number:text-style number:transliteration-country CDATA #IMPLIED>--<!ATTLIST number:number-style number:transliteration-style (short|medium|long) "short">-<!ATTLIST number:currency-style number:transliteration-style (short|medium|long) "short">-<!ATTLIST number:percentage-style number:transliteration-style (short|medium|long) "short">-<!ATTLIST number:date-style number:transliteration-style (short|medium|long) "short">-<!ATTLIST number:time-style number:transliteration-style (short|medium|long) "short">-<!ATTLIST number:boolean-style number:transliteration-style (short|medium|long) "short">-<!ATTLIST number:text-style number:transliteration-style (short|medium|long) "short">--<!ATTLIST number:currency-style number:automatic-order %boolean; "false">-<!ATTLIST number:date-style number:automatic-order %boolean; "false">--<!ATTLIST number:date-style number:format-source (fixed|language) "fixed">-<!ATTLIST number:time-style number:format-source (fixed|language) "fixed">--<!ATTLIST number:time-style number:truncate-on-overflow %boolean; "true">--<!ATTLIST number:number number:decimal-places %integer; #IMPLIED>-<!ATTLIST number:scientific-number number:decimal-places %integer; #IMPLIED>--<!ATTLIST number:number number:min-integer-digits %integer; #IMPLIED>-<!ATTLIST number:scientific-number number:min-integer-digits %integer; #IMPLIED>-<!ATTLIST number:fraction number:min-integer-digits %integer; #IMPLIED>--<!ATTLIST number:number number:grouping %boolean; "false">-<!ATTLIST number:scientific-number number:grouping %boolean; "false">-<!ATTLIST number:fraction number:grouping %boolean; "false">--<!ATTLIST number:number number:decimal-replacement CDATA #IMPLIED>--<!ATTLIST number:number number:display-factor %float; "1">--<!ATTLIST number:scientific-number number:min-exponent-digits %integer; #IMPLIED>--<!ATTLIST number:fraction number:min-numerator-digits %integer; #IMPLIED>--<!ATTLIST number:fraction number:min-denominator-digits %integer; #IMPLIED>---<!ENTITY % controls	"form:text|form:textarea|form:fixed-text|form:file|-					 form:password|form:formatted-text|form:button|form:image|-					 form:checkbox|form:radio|form:listbox|form:combobox|form:frame|-					 form:hidden|form:image-frame|form:grid|form:generic-control">--<!ENTITY % name "form:name CDATA #IMPLIED">-<!ENTITY % service-name "form:service-name CDATA #IMPLIED">--<!ENTITY % navigation "(none|current|parent)">-<!ENTITY % cycles "(records|current|page)">-<!ENTITY % url "CDATA">---<!ENTITY % types "(submit|reset|push|url)">-<!ENTITY % button-type "form:button-type %types; 'push'">-<!ENTITY % current-selected "form:current-selected %boolean; 'false'">-<!ENTITY % current-value "form:current-value CDATA #IMPLIED">-<!ENTITY % value "form:value CDATA #IMPLIED">-<!ENTITY % disabled "form:disabled %boolean; 'false'">-<!ENTITY % dropdown "form:dropdown %boolean; 'false'">-<!ENTITY % for "form:for CDATA #IMPLIED">-<!ENTITY % image-data "form:image-data %url; #IMPLIED">-<!ENTITY % label "form:label CDATA #IMPLIED">-<!ENTITY % max-length "form:max-length CDATA #IMPLIED">-<!ENTITY % printable "form:printable %boolean; 'true'">-<!ENTITY % readonly "form:readonly %boolean; 'false'">-<!ENTITY % size "form:size CDATA #IMPLIED">-<!ENTITY % selected "form:selected %boolean; 'false'">-<!ENTITY % size "form:size CDATA #IMPLIED">-<!ENTITY % tab-index "form:tab-index CDATA #IMPLIED">-<!ENTITY % target-frame "office:target-frame CDATA '_blank'">-<!ENTITY % target-location "xlink:href %url; #IMPLIED">-<!ENTITY % tab-stop "form:tab-stop %boolean; 'true'">-<!ENTITY % title "form:title CDATA #IMPLIED">-<!ENTITY % default-value "form:default-value CDATA #IMPLIED">-<!ENTITY % bound-column "form:bound-column CDATA #IMPLIED">-<!ENTITY % convert-empty "form:convert-empty-to-null  %boolean; 'false'">-<!ENTITY % data-field "form:data-field CDATA #IMPLIED">-<!ENTITY % list-source "form:list-source CDATA #IMPLIED">-<!ENTITY % list-source-types "(table|query|sql|sql-pass-through|value-list|table-fields)">-<!ENTITY % list-source-type "form:list-source-type %list-source-types; #IMPLIED">-<!ENTITY % column-style-name "form:column-style-name %styleName; #IMPLIED">---<!ELEMENT form:control (%controls;)+>-<!ATTLIST form:control %name;-                       %service-name;-                       %control-id;>--<!ELEMENT form:form (form:properties?, office:events?, (form:control|form:form)*)>-<!ATTLIST form:form %name; %service-name;>-<!ATTLIST form:form xlink:href %url; #IMPLIED>-<!ATTLIST form:form form:enctype CDATA "application/x-www-form-urlencoded">-<!ATTLIST form:form form:method CDATA "get">-<!ATTLIST form:form office:target-frame CDATA "_blank">-<!ATTLIST form:form form:allow-deletes %boolean; "true">-<!ATTLIST form:form form:allow-inserts %boolean; "true">-<!ATTLIST form:form form:allow-updates %boolean; "true">-<!ATTLIST form:form form:apply-filter %boolean; "false">-<!ATTLIST form:form form:command CDATA #IMPLIED>-<!ATTLIST form:form form:command-type (table|query|command) "command">-<!ATTLIST form:form form:datasource CDATA #IMPLIED>-<!ATTLIST form:form form:detail-fields CDATA #IMPLIED>-<!ATTLIST form:form form:escape-processing %boolean; "true">-<!ATTLIST form:form form:filter CDATA #IMPLIED>-<!ATTLIST form:form form:ignore-result %boolean; "false">-<!ATTLIST form:form form:master-fields CDATA #IMPLIED>-<!ATTLIST form:form form:navigation-mode %navigation; #IMPLIED>-<!ATTLIST form:form form:order CDATA #IMPLIED>-<!ATTLIST form:form form:tab-cycle %cycles; #IMPLIED>--<!ELEMENT office:forms (form:form*)>-<!ATTLIST office:forms form:automatic-focus %boolean; "false">-<!ATTLIST office:forms form:apply-design-mode %boolean; "true">--<!ELEMENT form:text (form:properties?, office:events?)>-<!ATTLIST form:text %current-value;-                    %disabled;-                    %max-length;-                    %printable;-                    %readonly;-                    %tab-index;-                    %tab-stop;-                    %title;-                    %value;-                    %convert-empty;-                    %data-field;>--<!ELEMENT form:textarea (form:properties?, office:events?)>-<!ATTLIST form:textarea %current-value;-                        %disabled;-                        %max-length;-                        %printable;-                        %readonly;-                        %tab-index;-                        %tab-stop;-                        %title;-                        %value;-                        %convert-empty;-                        %data-field;>--<!ELEMENT form:password (form:properties?, office:events?)>-<!ATTLIST form:password %disabled;-                        %max-length;-                        %printable;-                        %tab-index;-                        %tab-stop;-                        %title;-                        %value;-						%convert-empty;>--<!ATTLIST form:password form:echo-char CDATA "*">--<!ELEMENT form:file (form:properties?, office:events?)>-<!ATTLIST form:file %current-value;-                    %disabled;-                    %max-length;-                    %printable;-                    %readonly;-                    %tab-index;-                    %tab-stop;-                    %title;-                    %value;>--<!ELEMENT form:formatted-text (form:properties?, office:events?)>-<!ATTLIST form:formatted-text %current-value;-                              %disabled;-                              %max-length;-                              %printable;-                              %readonly;-                              %tab-index;-                              %tab-stop;-                              %title;-                              %value;-                              %convert-empty;-                              %data-field;>-<!ATTLIST form:formatted-text form:max-value CDATA #IMPLIED>-<!ATTLIST form:formatted-text form:min-value CDATA #IMPLIED>-<!ATTLIST form:formatted-text form:validation %boolean; "false">--<!ELEMENT form:fixed-text (form:properties?, office:events?)>-<!ATTLIST form:fixed-text %for;-                          %disabled;-                          %label;-                          %printable;-                          %title;>-<!ATTLIST form:fixed-text form:multi-line %boolean; "false">--<!ELEMENT form:combobox (form:properties?, office:events?, form:item*)>-<!ATTLIST form:combobox %current-value;-                        %disabled;-                        %dropdown;-                        %max-length;-                        %printable;-                        %readonly;-                        %size;-                        %tab-index;-                        %tab-stop;-                        %title;-                        %value;-                        %convert-empty;-                        %data-field;-                        %list-source;-                        %list-source-type;>-<!ATTLIST form:combobox form:auto-complete %boolean; #IMPLIED>--<!ELEMENT form:item (#PCDATA)>-<!ATTLIST form:item %label;>--<!ELEMENT form:listbox (form:properties?, office:events?, form:option*)>-<!ATTLIST form:listbox %disabled;-                       %dropdown;-                       %printable;-                       %size;-                       %tab-index;-                       %tab-stop;-                       %title;-                       %bound-column;-                       %data-field;-                       %list-source;-                       %list-source-type;>-<!ATTLIST form:listbox form:multiple %boolean; "false">--<!ELEMENT form:option (#PCDATA)>-<!ATTLIST form:option %current-selected;-                      %selected;-                      %label;-                      %value;>--<!ELEMENT form:button (form:properties?, office:events?)>-<!ATTLIST form:button %button-type;-                      %disabled;-                      %label;-                      %image-data;-                      %printable;-                      %tab-index;-                      %tab-stop;-                      %target-frame;-                      %target-location;-                      %title;-                      %value;>-<!ATTLIST form:button form:default-button %boolean; "false">--<!ELEMENT form:image (form:properties?, office:events?)>-<!ATTLIST form:image %button-type;-                     %disabled;-                     %image-data;-                     %printable;-                     %tab-index;-                     %tab-stop;-                     %target-frame;-                     %target-location;-                     %title;-                     %value;>--<!ELEMENT form:checkbox (form:properties?, office:events?)>-<!ATTLIST form:checkbox %disabled;-                        %label;-                        %printable;-                        %tab-index;-                        %tab-stop;-                        %title;-                        %value;-                        %data-field;>-<!ENTITY % states "(unchecked|checked|unknown)">-<!ATTLIST form:checkbox form:current-state %states; #IMPLIED>-<!ATTLIST form:checkbox form:is-tristate %boolean; "false">-<!ATTLIST form:checkbox form:state %states; "unchecked">--<!ELEMENT form:radio (form:properties?, office:events?)>-<!ATTLIST form:radio %current-selected;-                     %disabled;-                     %label;-                     %printable;-                     %selected;-                     %tab-index;-                     %tab-stop;-                     %title;-                     %value;-                     %data-field;>--<!ELEMENT form:frame (form:properties?, office:events?)>-<!ATTLIST form:frame %disabled;-                     %for;-                     %label;-                     %printable;-                     %title;>--<!ELEMENT form:image-frame (form:properties?, office:events?)>-<!ATTLIST form:image-frame %disabled;-                           %image-data;-                           %printable;-                           %readonly;-                           %title;-                           %data-field;>--<!ELEMENT form:hidden (form:properties?, office:events?)>-<!ATTLIST form:hidden %name;-                      %service-name;-                      %value;>--<!ELEMENT form:grid (form:properties?, office:events?, form:column*)>-<!ATTLIST form:grid %disabled;-                    %printable;-                    %tab-index;-                    %tab-stop;-                    %title;>--<!ENTITY % column-type "form:text| form:textarea| form:formatted-text|form:checkbox| form:listbox| form:combobox">-<!ELEMENT form:column (%column-type;)+>-<!ATTLIST form:column %name;-                      %service-name;-                      %label;-					  %column-style-name;>--<!ELEMENT form:generic-control (form:properties?, office:events?)>---<!ELEMENT form:properties (form:property+)>-<!ELEMENT form:property (form:property-value*)>-<!ATTLIST form:property form:property-is-list %boolean; #IMPLIED>-<!ATTLIST form:property form:property-name CDATA #REQUIRED>-<!ATTLIST form:property form:property-type (boolean|short|int|long|double|string)  #REQUIRED>-<!ELEMENT form:property-value (#PCDATA)>-<!ATTLIST form:property-value form:property-is-void %boolean; #IMPLIED>---<!ELEMENT office:settings (config:config-item-set+)>--<!ENTITY % items	"(config:config-item |-			config:config-item-set |-			config:config-item-map-named |-			config:config-item-map-indexed)+">--<!ELEMENT config:config-item-set %items;>-<!ATTLIST config:config-item-set config:name CDATA #REQUIRED>--<!ELEMENT config:config-item (#PCDATA)>-<!ATTLIST config:config-item config:name CDATA #REQUIRED-			config:type (boolean | short | int | long | double | string | datetime | base64Binary) #REQUIRED>--<!ELEMENT config:config-item-map-named (config:config-item-map-entry)+>-<!ATTLIST config:config-item-map-named config:name CDATA #REQUIRED>--<!ELEMENT config:config-item-map-indexed (config:config-item-map-entry)+>-<!ATTLIST config:config-item-map-indexed config:name CDATA #REQUIRED>--<!ELEMENT config:config-item-map-entry %items;>-<!ATTLIST config:config-item-map-entry config:name CDATA #IMPLIED>-
− examples/OpenOffice.org/script.mod
@@ -1,79 +0,0 @@-<!---	$Id: script.mod,v 1.1 2003/05/13 13:07:54 malcolm Exp $--   The Contents of this file are made available subject to the terms of-   either of the following licenses--          - GNU Lesser General Public License Version 2.1-          - Sun Industry Standards Source License Version 1.1--   Sun Microsystems Inc., October, 2000--   GNU Lesser General Public License Version 2.1-   =============================================-   Copyright 2000 by Sun Microsystems, Inc.-   901 San Antonio Road, Palo Alto, CA 94303, USA--   This library is free software; you can redistribute it and/or-   modify it under the terms of the GNU Lesser General Public-   License version 2.1, as published by the Free Software Foundation.--   This library is distributed in the hope that it will be useful,-   but WITHOUT ANY WARRANTY; without even the implied warranty of-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU-   Lesser General Public License for more details.--   You should have received a copy of the GNU Lesser General Public-   License along with this library; if not, write to the Free Software-   Foundation, Inc., 59 Temple Place, Suite 330, Boston,-   MA  02111-1307  USA---   Sun Industry Standards Source License Version 1.1-   =================================================-   The contents of this file are subject to the Sun Industry Standards-   Source License Version 1.1 (the "License"); You may not use this file-   except in compliance with the License. You may obtain a copy of the-   License at http://www.openoffice.org/license.html.--   Software provided under this License is provided on an "AS IS" basis,-   WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING,-   WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,-   MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.-   See the License for the specific provisions governing your rights and-   obligations concerning the Software.--   The Initial Developer of the Original Code is: Sun Microsystems, Inc.--   Copyright: 2000 by Sun Microsystems, Inc.--   All Rights Reserved.--   Contributor(s): _______________________________________---->--<!ELEMENT script:library-embedded (script:module*)>-<!ATTLIST script:library-embedded script:name %string; #REQUIRED>-<!ATTLIST script:library-embedded script:password %string; #IMPLIED>--<!ELEMENT script:library-linked EMPTY>-<!ATTLIST script:library-linked script:name %string; #REQUIRED>-<!ATTLIST script:library-linked xlink:href %string; #REQUIRED>-<!ATTLIST script:library-linked xlink:type (simple) #FIXED "simple">--<!ELEMENT script:module (#PCDATA)>-<!ATTLIST script:module script:name %string; #REQUIRED>-<!ATTLIST script:module script:language %string; #IMPLIED>---<!ENTITY % script-language "script:language %string; #REQUIRED">-<!ENTITY % event-name "script:event-name %string; #REQUIRED">-<!ENTITY % location "script:location (document|application) #REQUIRED">-<!ENTITY % macro-name "script:macro-name %string; #REQUIRED">--<!ELEMENT script:event (#PCDATA)>-<!ATTLIST script:event %script-language;-                       %event-name;-                       %location;-					   %macro-name;>
− examples/OpenOffice.org/settings.mod
@@ -1,77 +0,0 @@-<!---	$Id: settings.mod,v 1.1 2003/05/13 13:07:54 malcolm Exp $--   The Contents of this file are made available subject to the terms of-   either of the following licenses--          - GNU Lesser General Public License Version 2.1-          - Sun Industry Standards Source License Version 1.1--   Sun Microsystems Inc., October, 2000--   GNU Lesser General Public License Version 2.1-   =============================================-   Copyright 2000 by Sun Microsystems, Inc.-   901 San Antonio Road, Palo Alto, CA 94303, USA--   This library is free software; you can redistribute it and/or-   modify it under the terms of the GNU Lesser General Public-   License version 2.1, as published by the Free Software Foundation.--   This library is distributed in the hope that it will be useful,-   but WITHOUT ANY WARRANTY; without even the implied warranty of-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU-   Lesser General Public License for more details.--   You should have received a copy of the GNU Lesser General Public-   License along with this library; if not, write to the Free Software-   Foundation, Inc., 59 Temple Place, Suite 330, Boston,-   MA  02111-1307  USA---   Sun Industry Standards Source License Version 1.1-   =================================================-   The contents of this file are subject to the Sun Industry Standards-   Source License Version 1.1 (the "License"); You may not use this file-   except in compliance with the License. You may obtain a copy of the-   License at http://www.openoffice.org/license.html.--   Software provided under this License is provided on an "AS IS" basis,-   WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING,-   WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,-   MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.-   See the License for the specific provisions governing your rights and-   obligations concerning the Software.--   The Initial Developer of the Original Code is: Sun Microsystems, Inc.--   Copyright: 2000 by Sun Microsystems, Inc.--   All Rights Reserved.--   Contributor(s): _______________________________________---->--<!ELEMENT office:settings (config:config-item-set+)>--<!ENTITY % items	"(config:config-item |-			config:config-item-set |-			config:config-item-map-named |-			config:config-item-map-indexed)+">--<!ELEMENT config:config-item-set %items;>-<!ATTLIST config:config-item-set config:name CDATA #REQUIRED>--<!ELEMENT config:config-item (#PCDATA)>-<!ATTLIST config:config-item config:name CDATA #REQUIRED-			config:type (boolean | short | int | long | double | string | datetime | base64Binary) #REQUIRED>--<!ELEMENT config:config-item-map-named (config:config-item-map-entry)+>-<!ATTLIST config:config-item-map-named config:name CDATA #REQUIRED>--<!ELEMENT config:config-item-map-indexed (config:config-item-map-entry)+>-<!ATTLIST config:config-item-map-indexed config:name CDATA #REQUIRED>--<!ELEMENT config:config-item-map-entry %items;>-<!ATTLIST config:config-item-map-entry config:name CDATA #IMPLIED>
− examples/OpenOffice.org/style.mod
@@ -1,448 +0,0 @@-<!---	$Id: style.mod,v 1.1 2003/05/13 13:07:54 malcolm Exp $--   The Contents of this file are made available subject to the terms of-   either of the following licenses--          - GNU Lesser General Public License Version 2.1-          - Sun Industry Standards Source License Version 1.1--   Sun Microsystems Inc., October, 2000--   GNU Lesser General Public License Version 2.1-   =============================================-   Copyright 2000 by Sun Microsystems, Inc.-   901 San Antonio Road, Palo Alto, CA 94303, USA--   This library is free software; you can redistribute it and/or-   modify it under the terms of the GNU Lesser General Public-   License version 2.1, as published by the Free Software Foundation.--   This library is distributed in the hope that it will be useful,-   but WITHOUT ANY WARRANTY; without even the implied warranty of-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU-   Lesser General Public License for more details.--   You should have received a copy of the GNU Lesser General Public-   License along with this library; if not, write to the Free Software-   Foundation, Inc., 59 Temple Place, Suite 330, Boston,-   MA  02111-1307  USA---   Sun Industry Standards Source License Version 1.1-   =================================================-   The contents of this file are subject to the Sun Industry Standards-   Source License Version 1.1 (the "License"); You may not use this file-   except in compliance with the License. You may obtain a copy of the-   License at http://www.openoffice.org/license.html.--   Software provided under this License is provided on an "AS IS" basis,-   WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING,-   WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,-   MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.-   See the License for the specific provisions governing your rights and-   obligations concerning the Software.--   The Initial Developer of the Original Code is: Sun Microsystems, Inc.--   Copyright: 2000 by Sun Microsystems, Inc.--   All Rights Reserved.--   Contributor(s): _______________________________________---->--<!ELEMENT style:font-decl EMPTY>-<!ATTLIST style:font-decl style:name %string; #REQUIRED>-<!ATTLIST style:font-decl fo:font-family %string; #REQUIRED>-<!ATTLIST style:font-decl style:font-style-name %string; #IMPLIED>-<!ENTITY % fontFamilyGeneric "(roman|swiss|modern|decorative|script|system)">-<!ATTLIST style:font-decl style:font-family-generic %fontFamilyGeneric;-						   #IMPLIED>-<!ENTITY % fontPitch "(fixed|variable)">-<!ATTLIST style:font-decl style:font-pitch %fontPitch; #IMPLIED>-<!ATTLIST style:font-decl style:font-charset %textEncoding; #IMPLIED>--<!ELEMENT style:style ( style:properties?,office:events?,style:map*)>--<!ATTLIST style:style style:name %styleName; #REQUIRED>--<!ENTITY % styleFamily "(paragraph|text|section|-						 table|table-column|table-row|table-cell|table-page|chart|graphics|default|drawing-page|presentation|control|ruby)">-<!ATTLIST style:style style:family %styleFamily; #REQUIRED>--<!ATTLIST style:style style:parent-style-name %styleName; #IMPLIED>-<!ATTLIST style:style style:master-page-name %styleName; #IMPLIED>-<!ATTLIST style:style style:next-style-name %styleName; #IMPLIED>-<!ATTLIST style:style style:list-style-name %styleName; #IMPLIED>-<!ATTLIST style:style style:data-style-name %styleName; #IMPLIED>--<!ATTLIST style:style style:auto-update %boolean; "false">--<!ATTLIST style:style style:class %string; #IMPLIED>--<!ELEMENT style:default-style (style:properties?)>-<!ATTLIST style:default-style style:family %styleFamily; #REQUIRED>--<!ELEMENT style:map EMPTY>--<!ATTLIST style:map style:condition %string; #REQUIRED>-<!ATTLIST style:map style:apply-style-name %styleName; #REQUIRED>-<!ATTLIST style:map style:base-cell-address %cell-address; #IMPLIED>--<!ELEMENT style:properties ANY>--<!-- number format properties -->-<!ATTLIST style:properties style:num-prefix %string; #IMPLIED>-<!ATTLIST style:properties style:num-suffix %string; #IMPLIED>-<!ATTLIST style:properties style:num-format %string; #IMPLIED>-<!ATTLIST style:properties style:num-letter-sync %boolean; #IMPLIED>--<!-- frame properties -->-<!ATTLIST style:properties fo:width %positiveLength; #IMPLIED>-<!ATTLIST style:properties fo:height %positiveLength; #IMPLIED>-<!ATTLIST style:properties style:vertical-pos (top|middle|bottom|from-top|below) #IMPLIED>-<!ATTLIST style:properties style:vertical-rel (page|page-content|-											   frame|frame-content|-											   paragraph|paragraph-content|char|-											   line|baseline|text) #IMPLIED>-<!ATTLIST style:properties style:horizontal-pos (left|center|right|from-left|inside|outside|from-inside) #IMPLIED>-<!ATTLIST style:properties style:horizontal-rel (page|page-content|-								 page-start-margin|page-end-margin|-								 frame|frame-content|-								 frame-start-margin|frame-end-margin|-								 paragraph|paragraph-content|-								 paragraph-start-margin|paragraph-end-margin|-								 char) #IMPLIED>-<!ATTLIST style:properties svg:width %lengthOrPercentage; #IMPLIED>-<!ATTLIST style:properties svg:height %lengthOrPercentage; #IMPLIED>-<!ATTLIST style:properties fo:min-height %lengthOrPercentage; #IMPLIED>-<!ATTLIST style:properties fo:min-width %lengthOrPercentage; #IMPLIED>-<!ATTLIST style:properties fo:max-height %lengthOrPercentage; #IMPLIED>-<!ATTLIST style:properties fo:max-width %lengthOrPercentage; #IMPLIED>-<!ATTLIST style:properties text:anchor-type %anchorType; #IMPLIED>-<!ATTLIST style:properties text:anchor-page-number %positiveInteger; #IMPLIED>-<!ATTLIST style:properties svg:x %coordinate; #IMPLIED>-<!ATTLIST style:properties svg:y %coordinate; #IMPLIED>-<!ATTLIST style:properties style:print-content %boolean; #IMPLIED>-<!ATTLIST style:properties style:protect %boolean; #IMPLIED>-<!ATTLIST style:properties style:wrap (none|left|right|parallel|dynamic|run-through) #IMPLIED>-<!ENTITY % noLimitOrPositiveInteger "CDATA">-<!ATTLIST style:properties style:number-wrapped-paragraphs %noLimitOrPositiveInteger; #IMPLIED>-<!ATTLIST style:properties style:wrap-contour %boolean; #IMPLIED>-<!ATTLIST style:properties style:wrap-contour-mode (full|outside) #IMPLIED>-<!ATTLIST style:properties style:run-through (foreground|background) #IMPLIED>-<!ATTLIST style:properties style:editable %boolean; #IMPLIED>-<!ATTLIST style:properties style:mirror CDATA #IMPLIED>-<!ATTLIST style:properties fo:clip CDATA #IMPLIED>-<!ATTLIST style:properties text:animation (none|scroll|alternate|slide) #IMPLIED>-<!ATTLIST style:properties text:animation-direction (left|right|up|down) #IMPLIED>-<!ATTLIST style:properties text:animation-start-inside %boolean; #IMPLIED>-<!ATTLIST style:properties text:animation-stop-inside %boolean; #IMPLIED>-<!ATTLIST style:properties text:animation-repeat %integer; #IMPLIED>-<!ATTLIST style:properties text:animation-delay %timeDuration; #IMPLIED>-<!ATTLIST style:properties text:animation-steps %length; #IMPLIED>--<!-- text properties -->-<!ATTLIST style:properties fo:font-variant (normal|small-caps) #IMPLIED>-<!ATTLIST style:properties fo:text-transform (none|lowercase|-											  uppercase|capitalize) #IMPLIED>-<!ATTLIST style:properties fo:color %color; #IMPLIED>-<!ATTLIST style:properties style:use-window-font-color %boolean; #IMPLIED>-<!ATTLIST style:properties style:text-outline %boolean; #IMPLIED>-<!ATTLIST style:properties style:text-crossing-out-						   (none|single-line|double-line|thick-line|slash|X)-						   #IMPLIED>-<!ATTLIST style:properties style:text-position CDATA #IMPLIED>-<!ATTLIST style:properties style:text-align (left|right|start|center|end|justify|justified) #IMPLIED>--<!ATTLIST style:properties style:font-name %string; #IMPLIED>-<!ATTLIST style:properties fo:font-family %string; #IMPLIED>-<!ATTLIST style:properties style:font-family-generic %fontFamilyGeneric;-						   #IMPLIED>-<!ATTLIST style:properties style:font-style-name %string; #IMPLIED>-<!ATTLIST style:properties style:font-pitch %fontPitch; #IMPLIED>-<!ATTLIST style:properties style:font-charset %textEncoding; #IMPLIED>-<!ATTLIST style:properties style:font-name-asian %string; #IMPLIED>-<!ATTLIST style:properties style:font-family-asian %string; #IMPLIED>-<!ATTLIST style:properties style:font-family-generic-asian %fontFamilyGeneric;-						   #IMPLIED>-<!ATTLIST style:properties style:font-style-name-asian %string; #IMPLIED>-<!ATTLIST style:properties style:font-pitch-asian %fontPitch; #IMPLIED>-<!ATTLIST style:properties style:font-charset-asian %textEncoding; #IMPLIED>-<!ATTLIST style:properties style:font-name-complex %string; #IMPLIED>-<!ATTLIST style:properties style:font-family-complex %string; #IMPLIED>-<!ATTLIST style:properties style:font-family-generic-complex %fontFamilyGeneric;-						   #IMPLIED>-<!ATTLIST style:properties style:font-style-name-complex %string; #IMPLIED>-<!ATTLIST style:properties style:font-pitch-complex %fontPitch; #IMPLIED>-<!ATTLIST style:properties style:font-charset-complex %textEncoding; #IMPLIED>--<!ATTLIST style:properties fo:font-size %positiveLengthOrPercentage; #IMPLIED>-<!ATTLIST style:properties style:font-size-rel %length; #IMPLIED>-<!ATTLIST style:properties style:font-size-asian %positiveLengthOrPercentage; #IMPLIED>-<!ATTLIST style:properties style:font-size-rel-asian %length; #IMPLIED>-<!ATTLIST style:properties style:font-size-complex %positiveLengthOrPercentage; #IMPLIED>-<!ATTLIST style:properties style:font-size-rel-complex %length; #IMPLIED>-<!ENTITY % normalOrLength "CDATA">-<!ATTLIST style:properties fo:letter-spacing %normalOrLength; #IMPLIED>-<!ATTLIST style:properties fo:language %languageOnly; #IMPLIED>-<!ATTLIST style:properties style:language-asian %languageOnly; #IMPLIED>-<!ATTLIST style:properties style:language-complex %languageOnly; #IMPLIED>-<!ATTLIST style:properties fo:country %country; #IMPLIED>-<!ATTLIST style:properties style:country-asian %country; #IMPLIED>-<!ATTLIST style:properties style:country-complex %country; #IMPLIED>-<!ENTITY % fontStyle "(normal|italic|oblique)">-<!ATTLIST style:properties fo:font-style %fontStyle; #IMPLIED>-<!ATTLIST style:properties style:font-style-asian %fontStyle; #IMPLIED>-<!ATTLIST style:properties style:font-style-complex %fontStyle; #IMPLIED>-<!ENTITY % fontRelief "(none|embossed|engraved)">-<!ATTLIST style:properties style:font-relief %fontRelief; #IMPLIED>-<!ATTLIST style:properties fo:text-shadow CDATA #IMPLIED>-<!ATTLIST style:properties style:text-underline-						   (none|single|double|dotted|dash|long-dash|dot-dash|-							dot-dot-dash|wave|bold|bold-dotted|bold-dash|-							bold-long-dash|bold-dot-dash|bold-dot-dot-dash|-							bold-wave|double-wave|small-wave) #IMPLIED>-<!ATTLIST style:properties style:text-autospace (none | ideograph-alpha) #IMPLIED>-<!ATTLIST style:properties style:punctuation-wrap (simple | hanging) #IMPLIED>-<!ATTLIST style:properties style:line-break (normal | strict) #IMPLIED>-<!ENTITY % fontColorOrColor "CDATA">-<!ATTLIST style:properties style:text-underline-color %fontColorOrColor;-						   #IMPLIED>-<!ATTLIST style:properties fo:font-weight CDATA #IMPLIED>-<!ATTLIST style:properties style:font-weight-asian CDATA #IMPLIED>-<!ATTLIST style:properties style:font-weight-complex CDATA #IMPLIED>-<!ATTLIST style:properties fo:score-spaces %boolean; #IMPLIED>-<!ATTLIST style:properties style:letter-kerning %boolean; #IMPLIED>-<!ATTLIST style:properties style:text-blinking %boolean; #IMPLIED>-<!ATTLIST style:properties style:text-background-color %transparentOrColor;-						   #IMPLIED>--<!ATTLIST style:properties style:text-combine (none|letters|lines) #IMPLIED>-<!ATTLIST style:properties style:text-combine-start-char %character; #IMPLIED>-<!ATTLIST style:properties style:text-combine-end-char %character; #IMPLIED>-<!ATTLIST style:properties style:text-emphasize CDATA #IMPLIED>-<!ATTLIST style:properties style:text-scale %percentage; #IMPLIED>-<!ATTLIST style:properties style:text-rotation-angle %integer; #IMPLIED>-<!ATTLIST style:properties style:text-rotation-scale (fixed|line-height) #IMPLIED>--<!-- paragraph properties -->-<!ENTITY % nonNegativeLengthOrPercentageOrNormal "CDATA">-<!ATTLIST style:properties fo:line-height-						   %nonNegativeLengthOrPercentageOrNormal; #IMPLIED>-<!ATTLIST style:properties style:line-height-at-least %nonNegativeLength;-						   #IMPLIED>-<!ATTLIST style:properties style:line-spacing %length; #IMPLIED>-<!ATTLIST style:properties fo:text-align (start|end|center|justify) #IMPLIED>-<!ATTLIST style:properties fo:text-align-last (start|center|justify) #IMPLIED>-<!ATTLIST style:properties style:text-align-source (fix|value-type) #IMPLIED>-<!ATTLIST style:properties style:justify-single-word %boolean; #IMPLIED>-<!ATTLIST style:properties style:break-inside (auto|avoid) #IMPLIED>-<!ATTLIST style:properties fo:widows %nonNegativeInteger; #IMPLIED>-<!ATTLIST style:properties fo:orphans %nonNegativeInteger; #IMPLIED>--<!ATTLIST style:properties fo:hyphenate %boolean; #IMPLIED>-<!ATTLIST style:properties fo:hyphenate-keep (none|page) #IMPLIED>-<!ATTLIST style:properties fo:hyphenation-remain-char-count %positiveInteger;-						   #IMPLIED>-<!ATTLIST style:properties fo:hyphenation-push-char-count %positiveInteger;-						   #IMPLIED>-<!ATTLIST style:properties fo:hyphenation-ladder-count-						   %noLimitOrPositiveInteger;  #IMPLIED>-<!ATTLIST style:properties style:page-number %positiveInteger; #IMPLIED>--<!ELEMENT style:tab-stops (style:tab-stop)*>-<!ELEMENT style:tab-stop EMPTY>-<!ATTLIST style:tab-stop style:position %nonNegativeLength; #REQUIRED>-<!ATTLIST style:tab-stop style:type (left|center|right|char|default) "left">-<!ATTLIST style:tab-stop style:char %character; #IMPLIED>-<!ATTLIST style:tab-stop style:leader-char %character; " ">--<!ELEMENT style:drop-cap EMPTY>-<!ENTITY % wordOrPositiveInteger "CDATA">-<!ATTLIST style:drop-cap style:length %wordOrPositiveInteger; "1">-<!ATTLIST style:drop-cap style:lines %positiveInteger; "1">-<!ATTLIST style:drop-cap style:distance %length; "0cm">-<!ATTLIST style:drop-cap style:style-name %styleName; #IMPLIED>--<!ATTLIST style:properties style:register-true %boolean; #IMPLIED>-<!ATTLIST style:properties style:register-truth-ref-style-name %styleName; #IMPLIED>-<!ATTLIST style:properties fo:margin-left %positiveLengthOrPercentage; #IMPLIED>-<!ATTLIST style:properties fo:margin-right %positiveLengthOrPercentage;-						   #IMPLIED>-<!ATTLIST style:properties fo:text-indent %lengthOrPercentage; #IMPLIED>-<!ATTLIST style:properties style:auto-text-indent %boolean; #IMPLIED>-<!ATTLIST style:properties fo:margin-top %positiveLengthOrPercentage; #IMPLIED>-<!ATTLIST style:properties fo:margin-bottom %positiveLengthOrPercentage; #IMPLIED>-<!ATTLIST style:properties fo:break-before (auto|column|page) #IMPLIED>-<!ATTLIST style:properties fo:break-after (auto|column|page) #IMPLIED>-<!ATTLIST style:properties fo:background-color %transparentOrColor; #IMPLIED>-<!ATTLIST style:properties style:background-transparency %percentage; #IMPLIED>-<!ATTLIST style:properties style:dynamic-spacing %boolean; #IMPLIED>--<!ELEMENT style:background-image (office:binary-data?)>-<!ATTLIST style:background-image xlink:type (simple) #IMPLIED>-<!ATTLIST style:background-image xlink:href %uriReference; #IMPLIED>-<!ATTLIST style:background-image xlink:show (embed) #IMPLIED>-<!ATTLIST style:background-image xlink:actuate (onLoad) #IMPLIED>-<!ATTLIST style:background-image style:repeat (no-repeat|repeat|stretch)-								 "repeat">-<!ATTLIST style:background-image style:position CDATA "center">-<!ATTLIST style:background-image style:filter-name %string; #IMPLIED>-<!ATTLIST style:background-image draw:transparency %percentage; #IMPLIED>--<!ELEMENT style:symbol-image (office:binary-data?)>-<!ATTLIST style:symbol-image xlink:type (simple) #IMPLIED>-<!ATTLIST style:symbol-image xlink:href %uriReference; #IMPLIED>-<!ATTLIST style:symbol-image xlink:show (embed) #IMPLIED>-<!ATTLIST style:symbol-image xlink:actuate (onLoad) #IMPLIED>--<!ATTLIST style:properties fo:border CDATA #IMPLIED>-<!ATTLIST style:properties fo:border-top CDATA #IMPLIED>-<!ATTLIST style:properties fo:border-bottom CDATA #IMPLIED>-<!ATTLIST style:properties fo:border-left CDATA #IMPLIED>-<!ATTLIST style:properties fo:border-right CDATA #IMPLIED>-<!ATTLIST style:properties style:border-line-width CDATA #IMPLIED>-<!ATTLIST style:properties style:border-line-width-top CDATA #IMPLIED>-<!ATTLIST style:properties style:border-line-width-bottom CDATA #IMPLIED>-<!ATTLIST style:properties style:border-line-width-left CDATA #IMPLIED>-<!ATTLIST style:properties style:border-line-width-right CDATA #IMPLIED>-<!ATTLIST style:properties fo:padding %nonNegativeLength; #IMPLIED>-<!ATTLIST style:properties fo:padding-top %nonNegativeLength; #IMPLIED>-<!ATTLIST style:properties fo:padding-bottom %nonNegativeLength; #IMPLIED>-<!ATTLIST style:properties fo:padding-left %nonNegativeLength; #IMPLIED>-<!ATTLIST style:properties fo:padding-right %nonNegativeLength; #IMPLIED>-<!ATTLIST style:properties style:shadow CDATA #IMPLIED>-<!ATTLIST style:properties fo:keep-with-next %boolean; #IMPLIED>--<!ATTLIST style:properties text:number-lines %boolean; "false">-<!ATTLIST style:properties text:line-number %nonNegativeInteger; #IMPLIED>--<!ATTLIST style:properties style:decimal-places %nonNegativeInteger; #IMPLIED>-<!ATTLIST style:properties style:tab-stop-distance %nonNegativeLength; #IMPLIED>--<!-- section properties -->-<!ATTLIST style:properties text:dont-balance-text-columns %boolean; #IMPLIED>--<!-- ruby properties -->-<!ATTLIST style:properties style:ruby-align (left|center|right|distribute-letter|distribute-space) #IMPLIED>-<!ATTLIST style:properties style:ruby-position (above|below) #IMPLIED>---<!-- table properties -->-<!ATTLIST style:properties style:width %positiveLength; #IMPLIED>-<!ATTLIST style:properties style:rel-width %percentage; #IMPLIED>-<!ATTLIST style:properties style:may-break-between-rows %boolean; #IMPLIED>-<!ATTLIST style:properties table:page-style-name %styleName; #IMPLIED>-<!ATTLIST style:properties table:display %boolean; #IMPLIED>--<!-- table column properties -->-<!ATTLIST style:properties style:column-width %positiveLength; #IMPLIED>-<!ENTITY % relWidth "CDATA">-<!ATTLIST style:properties style:rel-column-width %relWidth; #IMPLIED>-<!ATTLIST style:properties style:use-optimal-column-width %boolean; #IMPLIED>--<!-- table row properties -->-<!ATTLIST style:properties style:row-height %positiveLength; #IMPLIED>-<!ATTLIST style:properties style:min-row-height %nonNegativeLength; #IMPLIED>-<!ATTLIST style:properties style:use-optimal-row-height %boolean; #IMPLIED>--<!-- table cell properties -->-<!ATTLIST style:properties-	table:align (left | center | right | margins) #IMPLIED-	table:border-model (collapsing | separating) #IMPLIED-	fo:vertical-align (top | middle | bottom | automatic) #IMPLIED-	fo:direction (ltr | ttb) #IMPLIED-	style:glyph-orientation-vertical (auto | 0) #IMPLIED-	style:rotation-angle %nonNegativeInteger; #IMPLIED-	style:rotation-align (none | bottom | top | center) #IMPLIED-	style:cell-protect CDATA #IMPLIED-	fo:wrap-option (no-wrap | wrap) #IMPLIED->-<!ELEMENT style:columns (style:column-sep?,style:column*)>-<!ATTLIST style:columns fo:column-count %nonNegativeInteger; #IMPLIED>-<!ATTLIST style:columns fo:column-gap %positiveLength; #IMPLIED>--<!ELEMENT style:column EMPTY>-<!ATTLIST style:column style:rel-width CDATA #IMPLIED>-<!ATTLIST style:column fo:margin-left %positiveLength; #IMPLIED>-<!ATTLIST style:column fo:margin-right %positiveLength; #IMPLIED>--<!ELEMENT style:column-sep EMPTY>-<!ATTLIST style:column-sep style:style (none|solid|dotted|dashed|dot-dashed)-																	"solid">-<!ATTLIST style:column-sep style:width %length; #REQUIRED>-<!ATTLIST style:column-sep style:height %percentage; "100%">-<!ATTLIST style:column-sep style:vertical-align (top|middle|bottom) "top">-<!ATTLIST style:column-sep style:color %color; "#000000">--<!-- page master properties -->-<!ELEMENT style:page-master (style:properties?, style:header-style?, style:footer-style?)>-<!ATTLIST style:page-master style:name %styleName; #REQUIRED>-<!ATTLIST style:page-master style:page-usage (all|left|right|mirrored) "all">--<!ELEMENT style:header-style (style:properties?)>-<!ELEMENT style:footer-style (style:properties?)>--<!ATTLIST style:properties fo:page-width %length; #IMPLIED>-<!ATTLIST style:properties fo:page-height %length; #IMPLIED>-<!ATTLIST style:properties style:paper-tray-name %string; #IMPLIED>-<!ATTLIST style:properties style:print-orientation (portrait|landscape) #IMPLIED>-<!ATTLIST style:properties style:print CDATA #IMPLIED>-<!ATTLIST style:properties style:print-page-order (ttb|ltr) #IMPLIED>-<!ATTLIST style:properties style:first-page-number %positiveInteger; #IMPLIED>-<!ATTLIST style:properties style:scale-to %percentage; #IMPLIED>-<!ATTLIST style:properties style:scale-to-pages %positiveInteger; #IMPLIED>-<!ATTLIST style:properties style:table-centering (horizontal | vertical | both | none) #IMPLIED>--<!ATTLIST style:properties style:footnote-max-height %lengthOrNoLimit; #IMPLIED>-<!ATTLIST style:properties style:vertical-align (top|bottom|middle|basline|auto) #IMPLIED>-<!ATTLIST style:properties style:writing-mode (lr-tb|rl-tb|tb-rl|tb-lr|lr|rl|tb|page) "lr-tb">-<!ATTLIST style:properties style:layout-grid-mode (none|line|both) #IMPLIED>-<!ATTLIST style:properties style:layout-grid-base-height %length; #IMPLIED>-<!ATTLIST style:properties style:layout-grid-ruby-height %length; #IMPLIED>-<!ATTLIST style:properties style:layout-grid-lines %positiveInteger; #IMPLIED>-<!ATTLIST style:properties style:layout-grid-color %color; #IMPLIED>-<!ATTLIST style:properties style:layout-grid-ruby-below %boolean; #IMPLIED>-<!ATTLIST style:properties style:layout-grid-print %boolean; #IMPLIED>-<!ATTLIST style:properties style:layout-grid-display %boolean; #IMPLIED>-<!ATTLIST style:properties style:snap-to-layout-grid %boolean; #IMPLIED>--<!ELEMENT style:footnote-sep EMPTY>-<!ATTLIST style:footnote-sep style:width %length; #IMPLIED>-<!ATTLIST style:footnote-sep style:rel-width %percentage; #IMPLIED>-<!ATTLIST style:footnote-sep style:color %color; #IMPLIED>-<!ATTLIST style:footnote-sep style:adjustment (left|center|right) "left">-<!ATTLIST style:footnote-sep style:distance-before-sep %length; #IMPLIED>-<!ATTLIST style:footnote-sep style:distance-after-sep %length; #IMPLIED>--<!-- master page -->-<!ELEMENT style:master-page ( (style:header, style:header-left?)?, (style:footer, style:footer-left?)?,-								office:forms?,style:style*, (%shapes;)*, presentation:notes? )>-<!ATTLIST style:master-page style:name %styleName; #REQUIRED>-<!ATTLIST style:master-page style:page-master-name %styleName; #REQUIRED>-<!ATTLIST style:master-page style:next-style-name %styleName; #IMPLIED>-<!ATTLIST style:master-page draw:style-name %styleName; #IMPLIED>--<!-- handout master -->-<!ELEMENT style:handout-master (%shapes;)*>-<!ATTLIST style:handout-master presentation:presentation-page-layout-name %styleName; #IMPLIED>-<!ATTLIST style:handout-master style:page-master-name %styleName; #IMPLIED>---<!ENTITY % hd-ft-content "( %headerText; | (style:region-left?, style:region-center?, style:region-right?) )">-<!ELEMENT style:header %hd-ft-content;>-<!ATTLIST style:header style:display %boolean; "true">-<!ELEMENT style:footer %hd-ft-content;>-<!ATTLIST style:footer style:display %boolean; "true">-<!ELEMENT style:header-left %hd-ft-content;>-<!ATTLIST style:header-left style:display %boolean; "true">-<!ELEMENT style:footer-left %hd-ft-content;>-<!ATTLIST style:footer-left style:display %boolean; "true">--<!ENTITY % region-content "(text:p*)">-<!ELEMENT style:region-left %region-content;>-<!ELEMENT style:region-center %region-content;>-<!ELEMENT style:region-right %region-content;>
− examples/OpenOffice.org/table.mod
@@ -1,522 +0,0 @@-<!---	$Id: table.mod,v 1.1 2003/05/13 13:07:54 malcolm Exp $--   The Contents of this file are made available subject to the terms of-   either of the following licenses--          - GNU Lesser General Public License Version 2.1-          - Sun Industry Standards Source License Version 1.1--   Sun Microsystems Inc., October, 2000--   GNU Lesser General Public License Version 2.1-   =============================================-   Copyright 2000 by Sun Microsystems, Inc.-   901 San Antonio Road, Palo Alto, CA 94303, USA--   This library is free software; you can redistribute it and/or-   modify it under the terms of the GNU Lesser General Public-   License version 2.1, as published by the Free Software Foundation.--   This library is distributed in the hope that it will be useful,-   but WITHOUT ANY WARRANTY; without even the implied warranty of-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU-   Lesser General Public License for more details.--   You should have received a copy of the GNU Lesser General Public-   License along with this library; if not, write to the Free Software-   Foundation, Inc., 59 Temple Place, Suite 330, Boston,-   MA  02111-1307  USA---   Sun Industry Standards Source License Version 1.1-   =================================================-   The contents of this file are subject to the Sun Industry Standards-   Source License Version 1.1 (the "License"); You may not use this file-   except in compliance with the License. You may obtain a copy of the-   License at http://www.openoffice.org/license.html.--   Software provided under this License is provided on an "AS IS" basis,-   WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING,-   WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,-   MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.-   See the License for the specific provisions governing your rights and-   obligations concerning the Software.--   The Initial Developer of the Original Code is: Sun Microsystems, Inc.--   Copyright: 2000 by Sun Microsystems, Inc.--   All Rights Reserved.--   Contributor(s): _______________________________________---->--<!ELEMENT table:calculation-settings (table:null-date?, table:iteration?)>-<!ATTLIST table:calculation-settings-	table:case-sensitive %boolean; "true"-	table:precision-as-shown %boolean; "false"-	table:search-criteria-must-apply-to-whole-cell %boolean; "true"-	table:automatic-find-labels %boolean; "true"-	table:use-regular-expressions %boolean; "true"-	table:null-year %positiveInteger; "1930"->-<!ELEMENT table:null-date EMPTY>-<!ATTLIST table:null-date-	table:value-type %valueType; #FIXED "date"-	table:date-value %date; "1899-12-30"->-<!ELEMENT table:iteration EMPTY>-<!ATTLIST table:iteration-	table:status (enable | disable) "disable"-	table:steps %positiveInteger; "100"-	table:maximum-difference %float; "0.001"->--<!ELEMENT table:tracked-changes (table:cell-content-change | table:insertion | table:deletion | table:movement | table:rejection)*>-<!ATTLIST table:tracked-changes table:track-changes %boolean; "true"-				table:protected %boolean; "false"-				table:protection-key CDATA #IMPLIED->--<!ELEMENT table:dependences (table:dependence)+>-<!ELEMENT table:dependence EMPTY>-<!ATTLIST table:dependence-	table:id CDATA #REQUIRED->-<!ELEMENT table:deletions (table:cell-content-deletion | table:change-deletion)+>-<!ELEMENT table:cell-content-deletion (table:cell-address?, table:change-track-table-cell?)>-<!ATTLIST table:cell-content-deletion-	table:id CDATA #IMPLIED->-<!ELEMENT table:change-deletion EMPTY>-<!ATTLIST table:change-deletion-	table:id CDATA #IMPLIED->-<!ELEMENT table:insertion (office:change-info, table:dependences?, table:deletions?)>-<!ATTLIST table:insertion-	table:id CDATA #REQUIRED-	table:acceptance-state (accepted | rejected | pending) "pending"-	table:rejecting-change-id %positiveInteger; #IMPLIED-	table:type (row | column | table) #REQUIRED-	table:position %integer; #REQUIRED-	table:count %positiveInteger; "1"-	table:table %integer; #IMPLIED->-<!ELEMENT table:deletion (office:change-info, table:dependences?, table:deletions?, table:cut-offs?)>-<!ATTLIST table:deletion-	table:id CDATA #REQUIRED-	table:acceptance-state (accepted | rejected | pending) "pending"-	table:rejecting-change-id %positiveInteger; #IMPLIED-	table:type (row | column | table) #REQUIRED-	table:position %integer; #REQUIRED-	table:count %positiveInteger; "1"-	table:table %integer; #IMPLIED-	table:multi-deletion-spanned %integer; #IMPLIED->-<!ELEMENT table:cut-offs (table:movement-cut-off+ | (table:insertion-cut-off, table:movement-cut-off*))>-<!ELEMENT table:insertion-cut-off EMPTY>-<!ATTLIST table:insertion-cut-off-	table:id CDATA #REQUIRED-	table:position %integer; #REQUIRED->-<!ELEMENT table:movement-cut-off EMPTY>-<!ATTLIST table:movement-cut-off-	table:id CDATA #REQUIRED-	table:start-position %integer; #IMPLIED-	table:end-position %integer; #IMPLIED-	table:position %integer; #IMPLIED->-<!ELEMENT table:movement (table:source-range-address, table:target-range-address, office:change-info, table:dependences?, table:deletions?)>-<!ATTLIST table:movement-	table:id CDATA #REQUIRED-	table:acceptance-state (accepted | rejected | pending) "pending"-	table:rejecting-change-id %positiveInteger; #IMPLIED->-<!ELEMENT table:target-range-address EMPTY>-<!ATTLIST table:target-range-address-	table:column %integer; #IMPLIED-	table:row %integer; #IMPLIED-	table:table %integer; #IMPLIED-	table:start-column %integer; #IMPLIED-	table:start-row %integer; #IMPLIED-	table:start-table %integer; #IMPLIED-	table:end-column %integer; #IMPLIED-	table:end-row %integer; #IMPLIED-	table:end-table %integer; #IMPLIED->-<!ELEMENT table:source-range-address EMPTY>-<!ATTLIST table:source-range-address-	table:column %integer; #IMPLIED-	table:row %integer; #IMPLIED-	table:table %integer; #IMPLIED-	table:start-column %integer; #IMPLIED-	table:start-row %integer; #IMPLIED-	table:start-table %integer; #IMPLIED-	table:end-column %integer; #IMPLIED-	table:end-row %integer; #IMPLIED-	table:end-table %integer; #IMPLIED->-<!ELEMENT table:change-track-table-cell (text:p*)>-<!ATTLIST table:change-track-table-cell-	table:cell-address %cell-address; #IMPLIED-	table:matrix-covered (true | false) "false"-	table:formula %string; #IMPLIED-	table:number-matrix-rows-spanned %positiveInteger; #IMPLIED-	table:number-matrix-columns-spanned %positiveInteger; #IMPLIED-	table:value-type %valueType; "string"-	table:value %float; #IMPLIED-	table:date-value %date; #IMPLIED-	table:time-value %timeInstance; #IMPLIED-	table:string-value %string; #IMPLIED->-<!ELEMENT table:cell-content-change (table:cell-address, office:change-info, table:dependences?, table:deletions?, table:previous)>-<!ATTLIST table:cell-content-change-	table:id CDATA #REQUIRED-	table:acceptance-state (accepted | rejected | pending) "pending"-	table:rejecting-change-id %positiveInteger; #IMPLIED->-<!ELEMENT table:cell-address EMPTY>-<!ATTLIST table:cell-address-	table:column %integer; #IMPLIED-	table:row %integer; #IMPLIED-	table:table %integer; #IMPLIED->-<!ELEMENT table:previous (table:change-track-table-cell)>-<!ATTLIST table:previous-	table:id CDATA #IMPLIED->-<!ELEMENT table:rejection (office:change-info, table:dependences?, table:deletions?)>-<!ATTLIST table:rejection-	table:id CDATA #REQUIRED-	table:acceptance-state (accepted | rejected | pending) "pending"-	table:rejecting-change-id %positiveInteger; #IMPLIED->--<!ENTITY % table-columns "table:table-columns | ( table:table-column | table:table-column-group )+">-<!ENTITY % table-header-columns "table:table-header-columns">-<!ENTITY % table-rows "table:table-rows | ( table:table-row | table:table-row-group )+">-<!ENTITY % table-header-rows "table:table-header-rows">-<!ENTITY % table-column-groups "((%table-columns;),(%table-header-columns;,(%table-columns;)?)?) | (%table-header-columns;,(%table-columns;)?)">-<!ENTITY % table-row-groups "((%table-rows;),(%table-header-rows;,(%table-rows;)?)?) | (%table-header-rows;,(%table-rows;)?)">-<!ELEMENT table:table (table:table-source?, table:scenario?, office:forms?, table:shapes?, (%table-column-groups;), (%table-row-groups;))>-<!ATTLIST table:table-	table:name %string; #IMPLIED-	table:style-name %styleName; #IMPLIED-	table:protected %boolean; "false"-	table:protection-key CDATA #IMPLIED-	table:print-ranges %cell-range-address-list; #IMPLIED->-<!ELEMENT table:table-source EMPTY>-<!ATTLIST table:table-source-	table:mode (copy-all | copy-results-only) "copy-all"-	xlink:type (simple) #FIXED "simple"-	xlink:actuate (onRequest) "onRequest"-	xlink:href %uriReference; #REQUIRED-	table:filter-name CDATA #IMPLIED-	table:table-name CDATA #IMPLIED-	table:filter-options CDATA #IMPLIED-	table:refresh-delay %timeDuration; #IMPLIED->-<!ELEMENT table:scenario EMPTY>-<!ATTLIST table:scenario-	table:display-border %boolean; "true"-	table:border-color %color; #IMPLIED-	table:copy-back %boolean; "true"-	table:copy-styles %boolean; "true"-	table:copy-formulas %boolean; "true"-	table:is-active %boolean; #REQUIRED-	table:scenario-ranges %cell-range-address-list; #REQUIRED-	table:comment CDATA #IMPLIED->-<!ELEMENT table:shapes %shapes;>-<!ELEMENT table:table-column-group (table:table-header-columns | table:table-column | table:table-column-group)+>-<!ATTLIST table:table-column-group-	table:display %boolean; "true"->-<!ELEMENT table:table-header-columns (table:table-column | table:table-column-group)+>-<!ELEMENT table:table-columns (table:table-column | table:table-column-group)+>-<!ELEMENT table:table-column EMPTY>-<!ATTLIST table:table-column-	table:number-columns-repeated %positiveInteger; "1"-	table:style-name %styleName; #IMPLIED-	table:visibility (visible | collapse | filter) "visible"-	table:default-cell-style-name %styleName; #IMPLIED->-<!ELEMENT table:table-row-group (table:table-header-rows | table:table-row | table:table-row-group)+>-<!ATTLIST table:table-row-group-	table:display %boolean; "true"->-<!ELEMENT table:table-header-rows (table:table-row | table:table-row-group)+>-<!ELEMENT table:table-rows (table:table-row | table:table-row-group)+>-<!ENTITY % table-cells "(table:table-cell|table:covered-table-cell)+">-<!ELEMENT table:table-row %table-cells;>-<!ATTLIST table:table-row-	table:number-rows-repeated %positiveInteger; "1"-	table:style-name %styleName; #IMPLIED-	table:visibility (visible | collapse | filter) "visible"-	table:default-cell-style-name %styleName; #IMPLIED->--<!ENTITY % text-wo-table "(text:h|text:p|text:ordered-list|text:unordered-list|%shapes;)*">-<!ENTITY % cell-content "(table:cell-range-source?,office:annotation?,table:detective?,(table:sub-table|%text-wo-table;))">-<!ELEMENT table:table-cell %cell-content;>-<!ELEMENT table:covered-table-cell %cell-content;>-<!ATTLIST table:table-cell-	table:number-columns-repeated %positiveInteger; "1"-	table:number-rows-spanned %positiveInteger; "1"-	table:number-columns-spanned %positiveInteger; "1"-	table:style-name %styleName; #IMPLIED-	table:validation-name CDATA #IMPLIED-	table:formula %string; #IMPLIED-	table:number-matrix-rows-spanned %positiveInteger; #IMPLIED-	table:number-matrix-columns-spanned %positiveInteger; #IMPLIED-	table:value-type %valueType; "string"-	table:value %float; #IMPLIED-	table:date-value %date; #IMPLIED-	table:time-value %timeInstance; #IMPLIED-	table:boolean-value %boolean; #IMPLIED-	table:string-value %string; #IMPLIED-	table:currency %string; #IMPLIED->-<!ATTLIST table:covered-table-cell-	table:number-columns-repeated %positiveInteger; "1"-	table:style-name %styleName; #IMPLIED-	table:validation-name CDATA #IMPLIED-	table:formula %string; #IMPLIED-	table:number-matrix-rows-spanned %positiveInteger; #IMPLIED-	table:number-matrix-columns-spanned %positiveInteger; #IMPLIED-	table:value-type %valueType; "string"-	table:value %float; #IMPLIED-	table:date-value %date; #IMPLIED-	table:time-value %timeInstance; #IMPLIED-	table:boolean-value %boolean; #IMPLIED-	table:string-value %string; #IMPLIED-	table:currency %string; #IMPLIED->-<!-- cell protection in writer: cell attribute; calc uses format -->-<!ATTLIST table:table-cell table:protected %boolean; "false">--<!ELEMENT table:cell-range-source EMPTY>-<!ATTLIST table:cell-range-source-	table:name %string; #REQUIRED-	xlink:type (simple) #FIXED "simple"-	xlink:actuate (onRequest) #FIXED "onRequest"-	xlink:href %uriReference; #REQUIRED-	table:filter-name %string; #REQUIRED-	table:filter-options %string; #IMPLIED-	table:last-column-spanned %positiveInteger; #REQUIRED-	table:last-row-spanned %positiveInteger; #REQUIRED-	table:refresh-delay %timeDuration; #IMPLIED->--<!ELEMENT table:detective (table:highlighted-range*, table:operation*)>-<!ELEMENT table:highlighted-range EMPTY>-<!ATTLIST table:highlighted-range-	table:cell-range-address %cell-range-address; #IMPLIED-	table:direction (from-another-table | to-another-table | from-same-table | to-same-table) #IMPLIED-	table:contains-error %boolean; #IMPLIED-	table:marked-invalid %boolean; #IMPLIED->-<!ELEMENT table:operation EMPTY>-<!ATTLIST table:operation-	table:name (trace-dependents | remove-dependents | trace-precedents | remove-precedents | trace-errors) #REQUIRED-	table:index %nonNegativeInteger; #REQUIRED->--<!ELEMENT table:content-validations (table:content-validation)+>-<!ELEMENT table:content-validation (table:help-message?, (table:error-message | (table:error-macro, office:events?))?)>-<!ATTLIST table:content-validation-	table:name CDATA #REQUIRED-	table:condition CDATA #IMPLIED-	table:base-cell-address %cell-address; #IMPLIED-	table:allow-empty-cell %boolean; #IMPLIED->-<!ELEMENT table:help-message (text:p*)>-<!ATTLIST table:help-message-	table:title CDATA #IMPLIED-	table:display %boolean; #IMPLIED->-<!ELEMENT table:error-message (text:p*)>-<!ATTLIST table:error-message-	table:title CDATA #IMPLIED-	table:message-type (stop | warning | information) #IMPLIED-	table:display %boolean; #IMPLIED->-<!ELEMENT table:error-macro EMPTY>-<!ATTLIST table:error-macro-	table:name CDATA #IMPLIED-	table:execute %boolean; #IMPLIED->--<!ELEMENT table:sub-table ((%table-column-groups;) , (%table-row-groups;))>--<!ELEMENT table:label-ranges (table:label-range)*>-<!ELEMENT table:label-range EMPTY>-<!ATTLIST table:label-range-	table:label-cell-range-address %cell-range-address; #REQUIRED-	table:data-cell-range-address %cell-range-address; #REQUIRED-	table:orientation (column | row) #REQUIRED->--<!ELEMENT table:named-expressions (table:named-range | table:named-expression)*>-<!ELEMENT table:named-range EMPTY>-<!ATTLIST table:named-range-	table:name CDATA #REQUIRED-	table:cell-range-address %cell-range-address; #REQUIRED-	table:base-cell-address %cell-address; #IMPLIED-	table:range-usable-as CDATA "none"->-<!ELEMENT table:named-expression EMPTY>-<!ATTLIST table:named-expression-	table:name CDATA #REQUIRED-	table:expression CDATA #REQUIRED-	table:base-cell-address %cell-address; #IMPLIED->--<!ELEMENT table:filter (table:filter-condition | table:filter-and | table:filter-or)>-<!ATTLIST table:filter-	table:target-range-address %cell-range-address; #IMPLIED-	table:condition-source-range-address %cell-range-address; #IMPLIED-	table:condition-source (self | cell-range) "self"-	table:display-duplicates %boolean; "true"->-<!ELEMENT table:filter-and (table:filter-or | table:filter-condition)+>-<!ELEMENT table:filter-or (table:filter-and | table:filter-condition)+>-<!ELEMENT table:filter-condition EMPTY>-<!ATTLIST table:filter-condition-	table:field-number %nonNegativeInteger; #REQUIRED-	table:case-sensitive %boolean; "false"-	table:data-type (text | number) "text"-	table:value CDATA #REQUIRED-	table:operator CDATA #REQUIRED->--<!ELEMENT table:database-ranges (table:database-range)*>-<!ELEMENT table:database-range ((table:database-source-sql | table:database-source-table | table:database-source-query)?, table:filter?, table:sort?, table:subtotal-rules?)>-<!ATTLIST table:database-range-	table:name CDATA #IMPLIED-	table:is-selection %boolean; "false"-	table:on-update-keep-styles %boolean; "false"-	table:on-update-keep-size %boolean; "true"-	table:has-persistant-data %boolean; "true"-	table:orientation (row | column) "row"-	table:contains-header %boolean; "true"-	table:display-filter-buttons %boolean; "false"-	table:target-range-address %cell-range-address; #REQUIRED-	table:refresh-delay %timeDuration; #IMPLIED->-<!ELEMENT table:database-source-sql EMPTY>-<!ATTLIST table:database-source-sql-	table:database-name CDATA #REQUIRED-	table:sql-statement CDATA #REQUIRED-	table:parse-sql-statements %boolean; "false"->-<!ELEMENT table:database-source-table EMPTY>-<!ATTLIST table:database-source-table-	table:database-name CDATA #REQUIRED-	table:table-name CDATA #REQUIRED->-<!ELEMENT table:database-source-query EMPTY>-<!ATTLIST table:database-source-query-	table:database-name CDATA #REQUIRED-	table:query-name CDATA #REQUIRED->--<!ELEMENT table:sort (table:sort-by)+>-<!ATTLIST table:sort-	table:bind-styles-to-content %boolean; "true"-	table:target-range-address %cell-range-address; #IMPLIED-	table:case-sensitive %boolean; "false"-	table:language CDATA #IMPLIED-	table:country CDATA #IMPLIED-	table:algorithm CDATA #IMPLIED->-<!ELEMENT table:sort-by EMPTY>-<!ATTLIST table:sort-by-	table:field-number %nonNegativeInteger; #REQUIRED-	table:data-type CDATA "automatic"-	table:order (ascending | descending) "ascending"->--<!ELEMENT table:subtotal-rules (table:sort-groups? | table:subtotal-rule*)?>-<!ATTLIST table:subtotal-rules-	table:bind-styles-to-content %boolean; "true"-	table:case-sensitive %boolean; "false"-	table:page-breaks-on-group-change %boolean; "false"->-<!ELEMENT table:sort-groups EMPTY>-<!ATTLIST table:sort-groups-	table:data-type CDATA "automatic"-	table:order (ascending | descending) "ascending"->-<!ELEMENT table:subtotal-rule (table:subtotal-field)*>-<!ATTLIST table:subtotal-rule-	table:group-by-field-number %nonNegativeInteger; #REQUIRED->-<!ELEMENT table:subtotal-field EMPTY>-<!ATTLIST table:subtotal-field-	table:field-number %nonNegativeInteger; #REQUIRED-	table:function CDATA #REQUIRED->--<!ELEMENT table:data-pilot-tables (table:data-pilot-table)*>-<!ELEMENT table:data-pilot-table ((table:database-source-sql | table:database-source-table | table:database-source-query | table:source-service | table:source-cell-range)?, table:data-pilot-field+)>-<!ATTLIST table:data-pilot-table-	table:name CDATA #REQUIRED-	table:application-data CDATA #IMPLIED-	table:grand-total (none | row | column | both) "both"-	table:ignore-empty-rows %boolean; "false"-	table:identify-categories %boolean; "false"-	table:target-range-address %cell-range-address; #REQUIRED-	table:buttons %cell-range-address-list; #REQUIRED->-<!ELEMENT table:source-service EMPTY>-<!ATTLIST table:source-service-	table:name CDATA #REQUIRED-	table:source-name CDATA #REQUIRED-	table:object-name CDATA #REQUIRED-	table:username CDATA #IMPLIED-	table:password CDATA #IMPLIED->-<!ELEMENT table:source-cell-range (table:filter)?>-<!ATTLIST table:source-cell-range-	table:cell-range-address %cell-range-address; #REQUIRED->-<!ELEMENT table:data-pilot-field (table:data-pilot-level)?>-<!ATTLIST table:data-pilot-field-	table:source-field-name CDATA #REQUIRED-	table:is-data-layout-field %boolean; "false"-	table:function CDATA #REQUIRED-	table:orientation (row | column | data | page | hidden) #REQUIRED-	table:used-hierarchy %positiveInteger; "1"->-<!ELEMENT table:data-pilot-level (table:data-pilot-subtotals?, table:data-pilot-members?)>-<!ATTLIST table:data-pilot-level-	table:display-empty %boolean; #IMPLIED->-<!ELEMENT table:data-pilot-subtotals (table:data-pilot-subtotal)*>-<!ELEMENT table:data-pilot-subtotal EMPTY>-<!ATTLIST table:data-pilot-subtotal-	table:function CDATA #REQUIRED->-<!ELEMENT table:data-pilot-members (table:data-pilot-member)*>-<!ELEMENT table:data-pilot-member EMPTY>-<!ATTLIST table:data-pilot-member-	table:name CDATA #REQUIRED-	table:display %boolean; #IMPLIED-	table:display-details %boolean; #IMPLIED->--<!ELEMENT table:consolidation EMPTY>-<!ATTLIST table:consolidation-	table:function CDATA #REQUIRED-	table:source-cell-range-addresses %cell-range-address-list; #REQUIRED-	table:target-cell-address %cell-address; #REQUIRED-	table:use-label (none | column | row | both) "none"-	table:link-to-source-data %boolean; "false"->--<!ELEMENT table:dde-links (table:dde-link)+>-<!ELEMENT table:dde-link (office:dde-source, table:table)>
− examples/OpenOffice.org/text.mod
@@ -1,1126 +0,0 @@-<!---	$Id: text.mod,v 1.1 2003/05/13 13:07:54 malcolm Exp $--   The Contents of this file are made available subject to the terms of-   either of the following licenses- -          - GNU Lesser General Public License Version 2.1-          - Sun Industry Standards Source License Version 1.1- -   Sun Microsystems Inc., October, 2000- -   GNU Lesser General Public License Version 2.1-   =============================================-   Copyright 2000 by Sun Microsystems, Inc.-   901 San Antonio Road, Palo Alto, CA 94303, USA- -   This library is free software; you can redistribute it and/or-   modify it under the terms of the GNU Lesser General Public-   License version 2.1, as published by the Free Software Foundation.- -   This library is distributed in the hope that it will be useful,-   but WITHOUT ANY WARRANTY; without even the implied warranty of-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU-   Lesser General Public License for more details.- -   You should have received a copy of the GNU Lesser General Public-   License along with this library; if not, write to the Free Software-   Foundation, Inc., 59 Temple Place, Suite 330, Boston,-   MA  02111-1307  USA- - -   Sun Industry Standards Source License Version 1.1-   =================================================-   The contents of this file are subject to the Sun Industry Standards-   Source License Version 1.1 (the "License"); You may not use this file-   except in compliance with the License. You may obtain a copy of the-   License at http://www.openoffice.org/license.html.- -   Software provided under this License is provided on an "AS IS" basis,-   WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING,-   WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,-   MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.-   See the License for the specific provisions governing your rights and-   obligations concerning the Software.- -   The Initial Developer of the Original Code is: Sun Microsystems, Inc.- -   Copyright: 2000 by Sun Microsystems, Inc.- -   All Rights Reserved.- -   Contributor(s): _______________________________________---->--<!ENTITY % fields "text:date |-				   text:time |-				   text:page-number |-				   text:page-continuation |-				   text:sender-firstname |-				   text:sender-lastname |-				   text:sender-initials | -				   text:sender-title |-				   text:sender-position |-				   text:sender-email | -				   text:sender-phone-private |-				   text:sender-fax | -				   text:sender-company |-				   text:sender-phone-work |-				   text:sender-street |-				   text:sender-city |-				   text:sender-postal-code |-				   text:sender-country |-				   text:sender-state-or-province |-				   text:author-name |-				   text:author-initials |-				   text:placeholder |-				   text:variable-set | -				   text:variable-get | -				   text:variable-input | -				   text:user-field-get | -				   text:user-field-input | -				   text:sequence | -				   text:expression | -				   text:text-input |-				   text:database-display |-				   text:database-next |-				   text:database-select |-				   text:database-row-number |-				   text:database-name |-				   text:initial-creator |-				   text:creation-date |-				   text:creation-time |-				   text:description |-				   text:user-defined |-				   text:print-time |-				   text:print-date |-				   text:printed-by |-				   text:title |-				   text:subject |-				   text:keywords |-				   text:editing-cycles |-				   text:editing-duration |-				   text:modification-time |-				   text:modification-date |-				   text:creator |-				   text:conditional-text |-				   text:hidden-text |-				   text:hidden-paragraph |-				   text:chapter |-				   text:file-name |-				   text:template-name |-				   text:page-variable-set |-				   text:page-variable-get |-				   text:execute-macro |-				   text:dde-connection |-				   text:reference-ref |-				   text:sequence-ref |-				   text:bookmark-ref |-				   text:footnote-ref |-				   text:endnote-ref |-				   text:sheet-name |-				   text:bibliography-mark |-				   text:page-count |-				   text:paragraph-count |-				   text:word-count |-				   text:character-count |-				   text:table-count |-				   text:image-count |-				   text:object-count |-				   office:annotation |-				   text:script |-				   text:measure" >--<!ENTITY % inline-text-elements "-				 text:span|text:tab-stop|text:s|text:line-break|-				 text:footnote|text:endnote|text:a|-				 text:bookmark|text:bookmark-start|text:bookmark-end|-				 text:reference-mark|text:reference-mark-start|-				 text:reference-mark-end|%fields;|%shape;|-				 text:toc-mark-start | text:toc-mark-end | -				 text:toc-mark | text:user-index-mark-start |-				 text:user-index-mark-end | text:user-index-mark |-				 text:alphabetical-index-mark-start |-				 text:alphabetical-index-mark-end |-				 text:alphabetical-index-mark |-				 %change-marks; | draw:a | text:ruby">--<!ENTITY % inline-text "( #PCDATA | %inline-text-elements; )*">--<!ELEMENT text:p %inline-text;>-<!ELEMENT text:h %inline-text;>--<!ATTLIST text:p text:style-name %styleName; #IMPLIED>-<!ATTLIST text:p text:cond-style-name %styleName; #IMPLIED>--<!ATTLIST text:h text:style-name %styleName; #IMPLIED>-<!ATTLIST text:h text:cond-style-name %styleName; #IMPLIED>-<!ATTLIST text:h text:level %positiveInteger; "1">--<!ELEMENT text:span %inline-text;>-<!ATTLIST text:span text:style-name %styleName; #REQUIRED>--<!ELEMENT text:a (#PCDATA | office:events | %inline-text-elements;)*>-<!ATTLIST text:a xlink:href %uriReference; #REQUIRED>-<!ATTLIST text:a xlink:type (simple) #FIXED "simple">-<!ATTLIST text:a xlink:actuate (onRequest) "onRequest">-<!ATTLIST text:a xlink:show (new|replace) "replace">-<!ATTLIST text:a office:name %string; #IMPLIED>-<!ATTLIST text:a office:target-frame-name %string; #IMPLIED>-<!ATTLIST text:a text:style-name %styleName; #IMPLIED>-<!ATTLIST text:a text:visited-style-name %styleName; #IMPLIED>---<!ELEMENT text:s EMPTY>-<!ATTLIST text:s text:c %positiveInteger; "1">--<!ELEMENT text:tab-stop EMPTY>--<!ELEMENT text:line-break EMPTY>---<!ENTITY % list-items "((text:list-header,text:list-item*)|text:list-item+)">-<!ELEMENT text:ordered-list %list-items;>-<!ELEMENT text:unordered-list %list-items;>---<!ATTLIST text:ordered-list text:style-name %styleName; #IMPLIED>-<!ATTLIST text:unordered-list text:style-name %styleName; #IMPLIED>--<!ATTLIST text:ordered-list text:continue-numbering %boolean; "false">--<!ELEMENT text:list-header (text:p|text:h)+>-<!ELEMENT text:list-item (text:p|text:h|text:ordered-list|text:unordered-list)+>--<!ATTLIST text:list-item text:restart-numbering %boolean; "false">-<!ATTLIST text:list-item text:start-value %positiveInteger; #IMPLIED>--<!ELEMENT text:list-style (text:list-level-style-number|-     					   text:list-level-style-bullet|-     					   text:list-level-style-image)+>--<!ATTLIST text:list-style style:name %styleName; #IMPLIED>--<!ATTLIST text:list-style text:consecutive-numbering %boolean; "false">---<!ELEMENT text:list-level-style-number (style:properties?)>--<!ATTLIST text:list-level-style-number text:level %positiveInteger;-									     		 #REQUIRED>-<!ATTLIST text:list-level-style-number text:style-name %styleName; #IMPLIED>--<!ATTLIST text:list-level-style-number style:num-format %string; #REQUIRED>-<!ATTLIST text:list-level-style-number style:num-prefix %string; #IMPLIED>-<!ATTLIST text:list-level-style-number style:num-suffix %string; #IMPLIED>-<!ATTLIST text:list-level-style-number style:num-letter-sync %boolean;-									     					"false">-<!ATTLIST text:list-level-style-number text:display-levels %positiveInteger;-									     				  "1">-<!ATTLIST text:list-level-style-number text:start-value %positiveInteger;-														   "1">-<!ELEMENT text:list-level-style-bullet (style:properties?)>--<!ATTLIST text:list-level-style-bullet text:level %positiveInteger; #REQUIRED>-<!ATTLIST text:list-level-style-bullet text:style-name %styleName; #IMPLIED>-<!ATTLIST text:list-level-style-bullet text:bullet-char %character; #REQUIRED>-<!ATTLIST text:list-level-style-bullet style:num-prefix %string; #IMPLIED>-<!ATTLIST text:list-level-style-bullet style:num-suffix %string; #IMPLIED>--<!ELEMENT text:list-level-style-image (style:properties?,office:binary-data?)>--<!ATTLIST text:list-level-style-image text:level %positiveInteger; #REQUIRED>-<!ATTLIST text:list-level-style-image xlink:type (simple) #IMPLIED>-<!ATTLIST text:list-level-style-image xlink:href %uriReference; #IMPLIED>-<!ATTLIST text:list-level-style-image xlink:actuate (onLoad) #IMPLIED>-<!ATTLIST text:list-level-style-image xlink:show (embed) #IMPLIED>---<!-- list properties -->-<!ATTLIST style:properties text:space-before %nonNegativeLength; #IMPLIED>-<!ATTLIST style:properties text:min-label-width %nonNegativeLength; #IMPLIED>-<!ATTLIST style:properties text:min-label-distance %nonNegativeLength; #IMPLIED>-<!ATTLIST style:properties text:enable-numbering %boolean; #IMPLIED>-<!ATTLIST style:properties style:list-style-name %styleName; #IMPLIED>--<!ELEMENT text:outline-style (text:outline-level-style)+>--<!ELEMENT text:outline-level-style (style:properties?)>--<!ATTLIST text:outline-level-style text:level %positiveInteger;-													 #REQUIRED>-<!ATTLIST text:outline-level-style text:style-name %styleName; #IMPLIED>--<!ATTLIST text:outline-level-style style:num-format %string; #REQUIRED>-<!ATTLIST text:outline-level-style style:num-prefix %string; #IMPLIED>-<!ATTLIST text:outline-level-style style:num-suffix %string; #IMPLIED>-<!ATTLIST text:outline-level-style style:num-letter-sync %boolean;-																"false">-<!ATTLIST text:outline-level-style text:display-levels %positiveInteger;-															  "1">-<!ATTLIST text:outline-level-style text:start-value %positiveInteger;-														   "1">--<!ENTITY % field-declarations "text:variable-decls?, -							   text:user-field-decls?, -							   text:sequence-decls?">--<!ENTITY % variableName "CDATA">--<!ENTITY % formula "CDATA">--<!ENTITY % valueAttr "text:value-type %valueType; #IMPLIED-							 text:currency CDATA #IMPLIED" >--<!ENTITY % valueAndTypeAttr "%valueAttr;-		 					 text:value %float; #IMPLIED-							 text:date-value %date; #IMPLIED-							 text:time-value %timeInstance; #IMPLIED-							 text:boolean-value %boolean; #IMPLIED-							 text:string-value %string; #IMPLIED" >--<!ENTITY % numFormat 'style:num-format CDATA #IMPLIED -					   style:num-letter-sync %boolean; "false"'>---<!ELEMENT text:date (#PCDATA)>-<!ATTLIST text:date text:date-value %timeInstance; #IMPLIED>-<!ATTLIST text:date text:date-adjust %dateDuration; #IMPLIED>-<!ATTLIST text:date text:fixed %boolean; "false">-<!ATTLIST text:date style:data-style-name %styleName; #IMPLIED>--<!ELEMENT text:time (#PCDATA)>-<!ATTLIST text:time text:time-value %timeInstance; #IMPLIED>-<!ATTLIST text:time text:time-adjust %timeDuration; #IMPLIED>-<!ATTLIST text:time text:fixed %boolean; "false">-<!ATTLIST text:time style:data-style-name %styleName; #IMPLIED>--<!ELEMENT text:page-number (#PCDATA)>-<!ATTLIST text:page-number text:page-adjust %positiveInteger; #IMPLIED>-<!ATTLIST text:page-number text:select-page (previous|current|next) "current">-<!ATTLIST text:page-number %numFormat;>--<!ELEMENT text:page-continuation (#PCDATA)>-<!ATTLIST text:page-continuation text:select-page (previous|next) #REQUIRED>-<!ATTLIST text:page-continuation text:string-value %string; #IMPLIED>--<!ELEMENT text:sender-firstname (#PCDATA)>-<!ATTLIST text:sender-firstname text:fixed %boolean; "true">--<!ELEMENT text:sender-lastname (#PCDATA)>-<!ATTLIST text:sender-lastname text:fixed %boolean; "true">--<!ELEMENT text:sender-initials (#PCDATA)>-<!ATTLIST text:sender-initials text:fixed %boolean; "true">--<!ELEMENT text:sender-title (#PCDATA)>-<!ATTLIST text:sender-title text:fixed %boolean; "true">--<!ELEMENT text:sender-position (#PCDATA)>-<!ATTLIST text:sender-position text:fixed %boolean; "true">--<!ELEMENT text:sender-email (#PCDATA)>-<!ATTLIST text:sender-email text:fixed %boolean; "true">--<!ELEMENT text:sender-phone-private (#PCDATA)>-<!ATTLIST text:sender-phone-private text:fixed %boolean; "true">--<!ELEMENT text:sender-fax (#PCDATA)>-<!ATTLIST text:sender-fax text:fixed %boolean; "true">--<!ELEMENT text:sender-company (#PCDATA)>-<!ATTLIST text:sender-company text:fixed %boolean; "true">--<!ELEMENT text:sender-phone-work (#PCDATA)>-<!ATTLIST text:sender-phone-work text:fixed %boolean; "true">--<!ELEMENT text:sender-street (#PCDATA)>-<!ATTLIST text:sender-street text:fixed %boolean; "true">--<!ELEMENT text:sender-city (#PCDATA)>-<!ATTLIST text:sender-city text:fixed %boolean; "true">--<!ELEMENT text:sender-postal-code (#PCDATA)>-<!ATTLIST text:sender-postal-code text:fixed %boolean; "true">--<!ELEMENT text:sender-country (#PCDATA)>-<!ATTLIST text:sender-country text:fixed %boolean; "true">--<!ELEMENT text:sender-state-or-province (#PCDATA)>-<!ATTLIST text:sender-state-or-province text:fixed %boolean; "true">--<!ELEMENT text:author-name (#PCDATA)>-<!ATTLIST text:author-name text:fixed %boolean; "true">--<!ELEMENT text:author-initials (#PCDATA)>-<!ATTLIST text:author-initials text:fixed %boolean; "true">--<!ELEMENT text:placeholder (#PCDATA)>-<!ATTLIST text:placeholder text:placeholder-type (text|table|text-box|image|object) #REQUIRED>-<!ATTLIST text:placeholder text:description %string; #IMPLIED>--<!ELEMENT text:variable-decls (text:variable-decl)*>--<!ELEMENT text:variable-decl EMPTY>-<!ATTLIST text:variable-decl text:name %variableName; #REQUIRED>-<!ATTLIST text:variable-decl %valueAndTypeAttr;>--<!ELEMENT text:variable-set (#PCDATA)>-<!ATTLIST text:variable-set text:name %variableName; #REQUIRED>-<!ATTLIST text:variable-set text:formula %formula; #IMPLIED>-<!ATTLIST text:variable-set %valueAndTypeAttr;>-<!ATTLIST text:variable-set text:display (value|none) "value">-<!ATTLIST text:variable-set style:data-style-name %styleName; #IMPLIED>--<!ELEMENT text:variable-get (#PCDATA)>-<!ATTLIST text:variable-get text:name %variableName; #REQUIRED>-<!ATTLIST text:variable-get text:display (value|formula) "value">-<!ATTLIST text:variable-get style:data-style-name %styleName; #IMPLIED>-<!ATTLIST text:variable-get %valueAttr;>--<!ELEMENT text:variable-input (#PCDATA)>-<!ATTLIST text:variable-input text:name %variableName; #REQUIRED>-<!ATTLIST text:variable-input text:description %string; #IMPLIED>-<!ATTLIST text:variable-input %valueAndTypeAttr;>-<!ATTLIST text:variable-input text:display (value|none) "value">-<!ATTLIST text:variable-input style:data-style-name %styleName; #IMPLIED>--<!ELEMENT text:user-field-decls (text:user-field-decl)*>--<!ELEMENT text:user-field-decl EMPTY>-<!ATTLIST text:user-field-decl text:name %variableName; #REQUIRED>-<!ATTLIST text:user-field-decl text:formula %formula; #IMPLIED>-<!ATTLIST text:user-field-decl %valueAndTypeAttr;>--<!ELEMENT text:user-field-get (#PCDATA)>-<!ATTLIST text:user-field-get text:name %variableName; #REQUIRED>-<!ATTLIST text:user-field-get text:display (value|formula|none) "value">-<!ATTLIST text:user-field-get style:data-style-name %styleName; #IMPLIED>--<!ELEMENT text:user-field-input (#PCDATA)>-<!ATTLIST text:user-field-input text:name %variableName; #REQUIRED>-<!ATTLIST text:user-field-input text:description %string; #IMPLIED>-<!ATTLIST text:user-field-input style:data-style-name %styleName; #IMPLIED>--<!ELEMENT text:sequence-decls (text:sequence-decl)*>--<!ELEMENT text:sequence-decl EMPTY>-<!ATTLIST text:sequence-decl text:name %variableName; #REQUIRED>-<!ATTLIST text:sequence-decl text:display-outline-level %positiveInteger; "0">-<!ATTLIST text:sequence-decl text:separation-character %character; ".">--<!ELEMENT text:sequence (#PCDATA)>-<!ATTLIST text:sequence text:name %variableName; #REQUIRED>-<!ATTLIST text:sequence text:formula %formula; #IMPLIED>-<!ATTLIST text:sequence %numFormat;>-<!ATTLIST text:sequence text:ref-name ID #IMPLIED>--<!ELEMENT text:expression (#PCDATA)>-<!ATTLIST text:expression text:formula %formula; #IMPLIED>-<!ATTLIST text:expression text:display (value|formula ) "value">-<!ATTLIST text:expression %valueAndTypeAttr;>-<!ATTLIST text:expression style:data-style-name %styleName; #IMPLIED>--<!ELEMENT text:text-input (#PCDATA)>-<!ATTLIST text:text-input text:description %string; #IMPLIED>--<!ENTITY % database-table "text:database-name CDATA #REQUIRED -						   text:table-name CDATA #REQUIRED-						   text:table-type (table|query|command) #IMPLIED">--<!ELEMENT text:database-display (#PCDATA)>-<!ATTLIST text:database-display %database-table;>-<!ATTLIST text:database-display text:column-name %string; #REQUIRED>-<!ATTLIST text:database-display style:data-style-name %styleName; #IMPLIED>-<!ATTLIST text:database-display text:display (none|value) #IMPLIED>--<!ELEMENT text:database-next (#PCDATA)>-<!ATTLIST text:database-next %database-table;>-<!ATTLIST text:database-next text:condition %formula; #IMPLIED>--<!ELEMENT text:database-select (#PCDATA)>-<!ATTLIST text:database-select %database-table;>-<!ATTLIST text:database-select text:condition %formula; #IMPLIED>-<!ATTLIST text:database-select text:row-number %integer; #REQUIRED>--<!ELEMENT text:database-row-number (#PCDATA)>-<!ATTLIST text:database-row-number %database-table;>-<!ATTLIST text:database-row-number %numFormat;>-<!ATTLIST text:database-row-number text:value %integer; #IMPLIED>-<!ATTLIST text:database-row-number text:display (none|value) #IMPLIED>--<!ELEMENT text:database-name (#PCDATA)>-<!ATTLIST text:database-name %database-table;>-<!ATTLIST text:database-name text:display (none|value) #IMPLIED>--<!ELEMENT text:initial-creator (#PCDATA)>-<!ATTLIST text:initial-creator text:fixed %boolean; "false">--<!ELEMENT text:creation-date (#PCDATA)>-<!ATTLIST text:creation-date text:fixed %boolean; "false">-<!ATTLIST text:creation-date text:date-value %date; #IMPLIED>-<!ATTLIST text:creation-date style:data-style-name %styleName; #IMPLIED>--<!ELEMENT text:creation-time (#PCDATA)>-<!ATTLIST text:creation-time text:fixed %boolean; "false">-<!ATTLIST text:creation-time text:time-value %timeInstance; #IMPLIED>-<!ATTLIST text:creation-time style:data-style-name %styleName; #IMPLIED>--<!ELEMENT text:description (#PCDATA)>-<!ATTLIST text:description text:fixed %boolean; "false">--<!ELEMENT text:user-defined (#PCDATA)>-<!ATTLIST text:user-defined text:fixed %boolean; "false">-<!ATTLIST text:user-defined text:name %string; #REQUIRED>--<!ELEMENT text:print-time (#PCDATA)>-<!ATTLIST text:print-time text:fixed %boolean; "false">-<!ATTLIST text:print-time text:time-value %timeInstance; #IMPLIED>-<!ATTLIST text:print-time style:data-style-name %styleName; #IMPLIED>--<!ELEMENT text:print-date (#PCDATA)>-<!ATTLIST text:print-date text:fixed %boolean; "false">-<!ATTLIST text:print-date text:date-value %date; #IMPLIED>-<!ATTLIST text:print-date style:data-style-name %styleName; #IMPLIED>--<!ELEMENT text:printed-by (#PCDATA)>-<!ATTLIST text:printed-by text:fixed %boolean; "false">--<!ELEMENT text:title (#PCDATA)>-<!ATTLIST text:title text:fixed %boolean; "false">--<!ELEMENT text:subject (#PCDATA)>-<!ATTLIST text:subject text:fixed %boolean; "false">--<!ELEMENT text:keywords (#PCDATA)>-<!ATTLIST text:keywords text:fixed %boolean; "false">--<!ELEMENT text:editing-cycles (#PCDATA)>-<!ATTLIST text:editing-cycles text:fixed %boolean; "false">--<!ELEMENT text:editing-duration (#PCDATA)>-<!ATTLIST text:editing-duration text:fixed %boolean; "false">-<!ATTLIST text:editing-duration text:duration %timeDuration; #IMPLIED>-<!ATTLIST text:editing-duration style:data-style-name %styleName; #IMPLIED>--<!ELEMENT text:modification-time (#PCDATA)>-<!ATTLIST text:modification-time text:fixed %boolean; "false">-<!ATTLIST text:modification-time text:time-value %timeInstance; #IMPLIED>-<!ATTLIST text:modification-time style:data-style-name %styleName; #IMPLIED>--<!ELEMENT text:modification-date (#PCDATA)>-<!ATTLIST text:modification-date text:fixed %boolean; "false">-<!ATTLIST text:modification-date text:date-value %date; #IMPLIED>-<!ATTLIST text:modification-date style:data-style-name %styleName; #IMPLIED>--<!ELEMENT text:creator (#PCDATA)>-<!ATTLIST text:creator text:fixed %boolean; "false">--<!ELEMENT text:conditional-text (#PCDATA)>-<!ATTLIST text:conditional-text text:condition %formula; #REQUIRED>-<!ATTLIST text:conditional-text text:string-value-if-false %string; #REQUIRED>-<!ATTLIST text:conditional-text text:string-value-if-true %string; #REQUIRED>-<!ATTLIST text:conditional-text text:current-value %boolean; "false">--<!ELEMENT text:hidden-text (#PCDATA)>-<!ATTLIST text:hidden-text text:condition %formula; #REQUIRED>-<!ATTLIST text:hidden-text text:string-value %string; #REQUIRED>-<!ATTLIST text:hidden-text text:is-hidden %boolean; "false">--<!ELEMENT text:hidden-paragraph EMPTY>-<!ATTLIST text:hidden-paragraph text:condition %formula; #REQUIRED>-<!ATTLIST text:hidden-paragraph text:is-hidden %boolean; "false">--<!ELEMENT text:chapter (#PCDATA)>-<!ATTLIST text:chapter text:display (name|number|number-and-name|-									 plain-number-and-name|plain-number) -									 "number-and-name">-<!ATTLIST text:chapter text:outline-level %integer; "1">--<!ELEMENT text:file-name (#PCDATA)>-<!ATTLIST text:file-name text:display (full|path|name|name-and-extension) 	-									  "full">-<!ATTLIST text:file-name text:fixed %boolean; "false">--<!ELEMENT text:template-name (#PCDATA)>-<!ATTLIST text:template-name text:display (full|path|name|name-and-extension|-										  area|title) "full">--<!ELEMENT text:page-variable-set EMPTY>-<!ATTLIST text:page-variable-set text:active %boolean; "true">-<!ATTLIST text:page-variable-set text:page-adjust %integer; "0">--<!ELEMENT text:page-variable-get (#PCDATA)>-<!ATTLIST text:page-variable-get %numFormat;>--<!ELEMENT text:execute-macro (#PCDATA|office:events)* >-<!ATTLIST text:execute-macro text:description %string; #IMPLIED>---<!ELEMENT text:dde-connection-decls (text:dde-connection-decl)*>--<!ELEMENT text:dde-connection-decl EMPTY>-<!ATTLIST text:dde-connection-decl text:name %string; #REQUIRED>-<!ATTLIST text:dde-connection-decl office:dde-application %string; #REQUIRED>-<!ATTLIST text:dde-connection-decl office:dde-topic %string; #REQUIRED>-<!ATTLIST text:dde-connection-decl office:dde-item %string; #REQUIRED>-<!ATTLIST text:dde-connection-decl office:automatic-update %boolean; "false">--<!ELEMENT text:dde-connection (#PCDATA)>-<!ATTLIST text:dde-connection text:connection-name %string; #REQUIRED>--<!ELEMENT text:reference-ref (#PCDATA)>-<!ATTLIST text:reference-ref text:ref-name %string; #REQUIRED>-<!ATTLIST text:reference-ref text:reference-format (page|chapter|text|direction) #IMPLIED>--<!ELEMENT text:sequence-ref (#PCDATA)>-<!ATTLIST text:sequence-ref text:ref-name %string; #REQUIRED>-<!ATTLIST text:sequence-ref text:reference-format (page|chapter|text|direction|category-and-value|caption|value) #IMPLIED>--<!ELEMENT text:bookmark-ref (#PCDATA)>-<!ATTLIST text:bookmark-ref text:ref-name %string; #REQUIRED>-<!ATTLIST text:bookmark-ref text:reference-format (page|chapter|text|direction) #IMPLIED>--<!ELEMENT text:footnote-ref (#PCDATA)>-<!ATTLIST text:footnote-ref text:ref-name %string; #REQUIRED>-<!ATTLIST text:footnote-ref text:reference-format (page|chapter|text|direction) #IMPLIED>--<!ELEMENT text:endnote-ref (#PCDATA)>-<!ATTLIST text:endnote-ref text:ref-name %string; #REQUIRED>-<!ATTLIST text:endnote-ref text:reference-format (page|chapter|text|direction) #IMPLIED>--<!ELEMENT text:sheet-name (#PCDATA)>--<!ELEMENT text:page-count (#PCDATA)>-<!ATTLIST text:page-count style:num-format %string; #IMPLIED>-<!ATTLIST text:page-count style:num-letter-sync %boolean; "false">--<!ELEMENT text:paragraph-count (#PCDATA)>-<!ATTLIST text:paragraph-count style:num-format %string; #IMPLIED>-<!ATTLIST text:paragraph-count style:num-letter-sync %boolean; "false">--<!ELEMENT text:word-count (#PCDATA)>-<!ATTLIST text:word-count style:num-format %string; #IMPLIED>-<!ATTLIST text:word-count style:num-letter-sync %boolean; "false">--<!ELEMENT text:character-count (#PCDATA)>-<!ATTLIST text:character-count style:num-format %string; #IMPLIED>-<!ATTLIST text:character-count style:num-letter-sync %boolean; "false">--<!ELEMENT text:table-count (#PCDATA)>-<!ATTLIST text:table-count style:num-format %string; #IMPLIED>-<!ATTLIST text:table-count style:num-letter-sync %boolean; "false">--<!ELEMENT text:image-count (#PCDATA)>-<!ATTLIST text:image-count style:num-format %string; #IMPLIED>-<!ATTLIST text:image-count style:num-letter-sync %boolean; "false">--<!ELEMENT text:object-count (#PCDATA)>-<!ATTLIST text:object-count style:num-format %string; #IMPLIED>-<!ATTLIST text:object-count style:num-letter-sync %boolean; "false">--<!ELEMENT text:bibliography-mark (#PCDATA)>-<!ATTLIST text:bibliography-mark text:bibliography-type -	( article | book | booklet | conference | custom1 | custom2 | custom3 | -	  custom4 | custom5 | email | inbook | incollection | inproceedings | -	  journal | manual | mastersthesis | misc | phdthesis | proceedings | -	  techreport | unpublished | www ) #REQUIRED >-<!ATTLIST text:bibliography-mark text:identifier CDATA #IMPLIED>-<!ATTLIST text:bibliography-mark text:address CDATA #IMPLIED>-<!ATTLIST text:bibliography-mark text:annote CDATA #IMPLIED>-<!ATTLIST text:bibliography-mark text:author CDATA #IMPLIED>-<!ATTLIST text:bibliography-mark text:booktitle CDATA #IMPLIED>-<!ATTLIST text:bibliography-mark text:chapter CDATA #IMPLIED>-<!ATTLIST text:bibliography-mark text:edition CDATA #IMPLIED>-<!ATTLIST text:bibliography-mark text:editor CDATA #IMPLIED>-<!ATTLIST text:bibliography-mark text:howpublished CDATA #IMPLIED>-<!ATTLIST text:bibliography-mark text:institution CDATA #IMPLIED>-<!ATTLIST text:bibliography-mark text:journal CDATA #IMPLIED>-<!ATTLIST text:bibliography-mark text:month CDATA #IMPLIED>-<!ATTLIST text:bibliography-mark text:note CDATA #IMPLIED>-<!ATTLIST text:bibliography-mark text:number CDATA #IMPLIED>-<!ATTLIST text:bibliography-mark text:organizations CDATA #IMPLIED>-<!ATTLIST text:bibliography-mark text:pages CDATA #IMPLIED>-<!ATTLIST text:bibliography-mark text:publisher CDATA #IMPLIED>-<!ATTLIST text:bibliography-mark text:school CDATA #IMPLIED>-<!ATTLIST text:bibliography-mark text:series CDATA #IMPLIED>-<!ATTLIST text:bibliography-mark text:title CDATA #IMPLIED>-<!ATTLIST text:bibliography-mark text:report-type CDATA #IMPLIED>-<!ATTLIST text:bibliography-mark text:volume CDATA #IMPLIED>-<!ATTLIST text:bibliography-mark text:year CDATA #IMPLIED>-<!ATTLIST text:bibliography-mark text:url CDATA #IMPLIED>-<!ATTLIST text:bibliography-mark text:custom1 CDATA #IMPLIED>-<!ATTLIST text:bibliography-mark text:custom2 CDATA #IMPLIED>-<!ATTLIST text:bibliography-mark text:custom3 CDATA #IMPLIED>-<!ATTLIST text:bibliography-mark text:custom4 CDATA #IMPLIED>-<!ATTLIST text:bibliography-mark text:custom5 CDATA #IMPLIED>-<!ATTLIST text:bibliography-mark text:isbn CDATA #IMPLIED>---<!ELEMENT text:bookmark EMPTY>-<!ATTLIST text:bookmark text:name CDATA #REQUIRED>--<!ELEMENT text:bookmark-start EMPTY>-<!ATTLIST text:bookmark-start text:name CDATA #REQUIRED>--<!ELEMENT text:bookmark-end EMPTY>-<!ATTLIST text:bookmark-end text:name CDATA #REQUIRED>--<!ELEMENT text:reference-mark EMPTY>-<!ATTLIST text:reference-mark text:name CDATA #REQUIRED>--<!ELEMENT text:reference-mark-start EMPTY>-<!ATTLIST text:reference-mark-start text:name CDATA #REQUIRED>--<!ELEMENT text:reference-mark-end EMPTY>-<!ATTLIST text:reference-mark-end text:name CDATA #REQUIRED>--<!ELEMENT text:footnotes-configuration (text:footnote-continuation-notice-forward?,text:footnote-continuation-notice-backward?)>-<!ATTLIST text:footnotes-configuration style:num-prefix %string; #IMPLIED>-<!ATTLIST text:footnotes-configuration style:num-suffix %string; #IMPLIED>-<!ATTLIST text:footnotes-configuration style:num-format %string; #IMPLIED>-<!ATTLIST text:footnotes-configuration style:num-letter-sync %string; #IMPLIED>-<!ATTLIST text:footnotes-configuration text:citation-body-style-name %styleName; #IMPLIED>-<!ATTLIST text:footnotes-configuration text:citation-style-name %styleName; #IMPLIED>-<!ATTLIST text:footnotes-configuration text:default-style-name  %styleName; #IMPLIED>-<!ATTLIST text:footnotes-configuration text:master-page-name %styleName; #IMPLIED>-<!ATTLIST text:footnotes-configuration text:start-value %integer; #IMPLIED>-<!ATTLIST text:footnotes-configuration text:footnotes-position (document|page) "page">-<!ATTLIST text:footnotes-configuration text:start-numbering-at (document|chapter|page) "document">--<!ELEMENT text:footnote-continuation-notice-forward (#PCDATA)> -<!ELEMENT text:footnote-continuation-notice-backward (#PCDATA)>--<!ELEMENT text:endnotes-configuration EMPTY>-<!ATTLIST text:endnotes-configuration style:num-prefix %string; #IMPLIED>-<!ATTLIST text:endnotes-configuration style:num-suffix %string; #IMPLIED>-<!ATTLIST text:endnotes-configuration style:num-format %string; #IMPLIED>-<!ATTLIST text:endnotes-configuration style:num-letter-sync %string; #IMPLIED>-<!ATTLIST text:endnotes-configuration text:start-value %integer; #IMPLIED>-<!ATTLIST text:endnotes-configuration text:citation-style-name %styleName; #IMPLIED>-<!ATTLIST text:endnotes-configuration text:citation-body-style-name %styleName; #IMPLIED>-<!ATTLIST text:endnotes-configuration text:default-style-name %styleName; #IMPLIED>-<!ATTLIST text:endnotes-configuration text:master-page-name %styleName; #IMPLIED>--<!-- Validity constraint: text:footnote and text:endnote elements may not -	contain other text:footnote or text:endnote elements, even though the DTD-	allows this (via the %text; in the foot-/endnote-body).-	Unfortunatetly, this constraint cannot be easily specified in the DTD.--->-<!ELEMENT text:footnote (text:footnote-citation, text:footnote-body)>-<!ATTLIST text:footnote text:id ID #IMPLIED>--<!ELEMENT text:footnote-citation (#PCDATA)>-<!ATTLIST text:footnote-citation text:label %string; #IMPLIED>--<!ELEMENT text:footnote-body (text:h|text:p|-							  text:ordered-list|text:unordered-list)*>--<!ELEMENT text:endnote (text:endnote-citation, text:endnote-body)>-<!ATTLIST text:endnote text:id ID #IMPLIED>--<!ELEMENT text:endnote-citation (#PCDATA)>-<!ATTLIST text:endnote-citation text:label %string; #IMPLIED>--<!ELEMENT text:endnote-body (text:h|text:p|-							 text:ordered-list|text:unordered-list)*>--<!ENTITY % sectionAttr "text:name CDATA #REQUIRED-                        text:style-name %styleName; #IMPLIED-                        text:protected %boolean; 'false' ">---<!ELEMENT text:section ((text:section-source|office:dde-source)?,-						%sectionText;) >--<!ATTLIST text:section %sectionAttr;>-<!ATTLIST text:section text:display (true|none|condition) "true">-<!ATTLIST text:section text:condition %formula; #IMPLIED>-<!ATTLIST text:section text:protection-key CDATA #IMPLIED>-<!ATTLIST text:section text:is-hidden %boolean; #IMPLIED>--<!ELEMENT text:section-source EMPTY>-<!ATTLIST text:section-source xlink:href %string; #IMPLIED>-<!ATTLIST text:section-source xlink:type (simple) #FIXED "simple">-<!ATTLIST text:section-source xlink:show (embed) #FIXED "embed">-<!ATTLIST text:section-source text:section-name %string; #IMPLIED>-<!ATTLIST text:section-source text:filter-name %string; #IMPLIED>--<!ELEMENT text:table-of-content (text:table-of-content-source, -								 text:index-body)   >-<!ATTLIST text:table-of-content %sectionAttr;>--<!ELEMENT text:table-of-content-source (text:index-title-template? , -										text:table-of-content-entry-template*,-										text:index-source-styles* ) >-<!ATTLIST text:table-of-content-source text:outline-level %integer; #IMPLIED>-<!ATTLIST text:table-of-content-source text:use-outline-level %boolean; "true">-<!ATTLIST text:table-of-content-source text:use-index-marks %boolean; "true">-<!ATTLIST text:table-of-content-source text:use-index-source-styles -															%boolean; "false">-<!ATTLIST text:table-of-content-source text:index-scope (document|chapter) -														"document">-<!ATTLIST text:table-of-content-source text:relative-tab-stop-position -															%boolean; "true">-<!ATTLIST text:table-of-content-source fo:language %string; #IMPLIED>-<!ATTLIST text:table-of-content-source fo:country %string; #IMPLIED>-<!ATTLIST text:table-of-content-source text:sort-algorithm %string; #IMPLIED>--<!ELEMENT text:table-of-content-entry-template (text:index-entry-chapter-number |-												text:index-entry-page-number |-												text:index-entry-text |-												text:index-entry-span |-												text:index-entry-tab-stop |-												text:index-entry-link-start |-												text:index-entry-link-end)* >-<!ATTLIST text:table-of-content-entry-template text:outline-level -						%integer; #REQUIRED>-<!ATTLIST text:table-of-content-entry-template text:style-name -						%styleName; #REQUIRED>--<!ELEMENT text:illustration-index -			(text:illustration-index-source, text:index-body)>-<!ATTLIST text:illustration-index %sectionAttr;>--<!ELEMENT text:illustration-index-source (text:index-title-template?,-									text:illustration-index-entry-template?) >-<!ATTLIST text:illustration-index-source text:index-scope -									(document|chapter) "document">-<!ATTLIST text:illustration-index-source text:relative-tab-stop-position -									%boolean; "true">-<!ATTLIST text:illustration-index-source text:use-caption %boolean; "true">-<!ATTLIST text:illustration-index-source text:caption-sequence-name -									%string; #IMPLIED>-<!ATTLIST text:illustration-index-source text:caption-sequence-format -									(text|category-and-value|caption) "text">-<!ATTLIST text:illustration-index-source fo:language %string; #IMPLIED>-<!ATTLIST text:illustration-index-source fo:country %string; #IMPLIED>-<!ATTLIST text:illustration-index-source text:sort-algorithm %string; #IMPLIED>--<!ELEMENT text:illustration-index-entry-template -								( text:index-entry-page-number |-								  text:index-entry-text |-								  text:index-entry-span |-								  text:index-entry-tab-stop )* >-<!ATTLIST text:illustration-index-entry-template text:style-name -									%styleName; #REQUIRED>--<!ELEMENT text:table-index (text:table-index-source, text:index-body)>-<!ATTLIST text:table-index %sectionAttr;>--<!ELEMENT text:table-index-source (text:index-title-template?, -									text:table-index-entry-template?) >-<!ATTLIST text:table-index-source text:index-scope -									(document|chapter) "document">-<!ATTLIST text:table-index-source text:relative-tab-stop-position -									%boolean; "true">-<!ATTLIST text:table-index-source text:use-caption %boolean; "true">-<!ATTLIST text:table-index-source text:caption-sequence-name -									%string; #IMPLIED>-<!ATTLIST text:table-index-source text:caption-sequence-format -									(text|category-and-value|caption) "text">-<!ATTLIST text:table-index-source fo:language %string; #IMPLIED>-<!ATTLIST text:table-index-source fo:country %string; #IMPLIED>-<!ATTLIST text:table-index-source text:sort-algorithm %string; #IMPLIED>--<!ELEMENT text:table-index-entry-template ( text:index-entry-page-number |-											text:index-entry-text |-											text:index-entry-span |-											text:index-entry-tab-stop )* >-<!ATTLIST text:table-index-entry-template text:style-name -											%styleName; #REQUIRED>--<!ELEMENT text:object-index ( text:object-index-source, text:index-body ) >-<!ATTLIST text:object-index %sectionAttr;>--<!ELEMENT text:object-index-source ( text:index-title-template?,-									 text:object-index-entry-template? ) >-<!ATTLIST text:object-index-source text:index-scope -									(document|chapter) "document">-<!ATTLIST text:object-index-source text:relative-tab-stop-position -									%boolean; "true">-<!ATTLIST text:object-index-source text:use-spreadsheet-objects -									%boolean; "false">-<!ATTLIST text:object-index-source text:use-draw-objects %boolean; "false">-<!ATTLIST text:object-index-source text:use-chart-objects %boolean; "false">-<!ATTLIST text:object-index-source text:use-other-objects %boolean; "false">-<!ATTLIST text:object-index-source text:use-math-objects %boolean; "false">-<!ATTLIST text:object-index-source fo:language %string; #IMPLIED>-<!ATTLIST text:object-index-source fo:country %string; #IMPLIED>-<!ATTLIST text:object-index-source text:sort-algorithm %string; #IMPLIED>--<!ELEMENT text:object-index-entry-template ( text:index-entry-page-number |-											 text:index-entry-text |-											 text:index-entry-span |-											 text:index-entry-tab-stop )* >-<!ATTLIST text:object-index-entry-template text:style-name -											%styleName; #REQUIRED >--<!ELEMENT text:user-index (text:user-index-source, text:index-body) >-<!ATTLIST text:user-index %sectionAttr;>--<!ELEMENT text:user-index-source ( text:index-title-template?,-								   text:user-index-entry-template*,-								   text:index-source-styles* ) >-<!ATTLIST text:user-index-source text:index-scope -									(document|chapter) "document">-<!ATTLIST text:user-index-source text:relative-tab-stop-position-									%boolean; "true">-<!ATTLIST text:user-index-source text:use-index-marks %boolean; "false">-<!ATTLIST text:user-index-source text:use-graphics %boolean; "false">-<!ATTLIST text:user-index-source text:use-tables %boolean; "false">-<!ATTLIST text:user-index-source text:use-floating-frames %boolean; "false">-<!ATTLIST text:user-index-source text:use-objects %boolean; "false">-<!ATTLIST text:user-index-source text:use-index-source-styles -													%boolean; "false">-<!ATTLIST text:user-index-source text:copy-outline-levels %boolean; "false">-<!ATTLIST text:user-index-source fo:language %string; #IMPLIED>-<!ATTLIST text:user-index-source fo:country %string; #IMPLIED>-<!ATTLIST text:user-index-source text:sort-algorithm %string; #IMPLIED>-<!ATTLIST text:user-index-source text:index-name %string; #IMPLIED>--<!ELEMENT text:user-index-entry-template ( text:index-entry-chapter |-										   text:index-entry-page-number |-										   text:index-entry-text |-										   text:index-entry-span |-										   text:index-entry-tab-stop )* >-<!ATTLIST text:user-index-entry-template text:outline-level %integer; #REQUIRED>-<!ATTLIST text:user-index-entry-template text:style-name %styleName; #REQUIRED>--<!ELEMENT text:alphabetical-index (text:alphabetical-index-source, -									text:index-body)>-<!ATTLIST text:alphabetical-index %sectionAttr;>--<!ELEMENT text:alphabetical-index-source ( text:index-title-template?, -							text:alphabetical-index-entry-template* ) >-<!ATTLIST text:alphabetical-index-source text:index-scope -												(document|chapter) "document">-<!ATTLIST text:alphabetical-index-source text:relative-tab-stop-position-												%boolean; "true">-<!ATTLIST text:alphabetical-index-source text:ignore-case %boolean; "false">-<!ATTLIST text:alphabetical-index-source text:main-entry-style-name -												%styleName; #IMPLIED>-<!ATTLIST text:alphabetical-index-source text:alphabetical-separators -												%boolean; "false">-<!ATTLIST text:alphabetical-index-source text:combine-entries-												%boolean; "true">-<!ATTLIST text:alphabetical-index-source text:combine-entries-with-dash-												%boolean; "false">-<!ATTLIST text:alphabetical-index-source text:combine-entries-with-pp-												%boolean; "true">-<!ATTLIST text:alphabetical-index-source text:use-keys-as-entries -												%boolean; "false">-<!ATTLIST text:alphabetical-index-source text:capitalize-entries-												%boolean; "false">-<!ATTLIST text:alphabetical-index-source text:comma-separated-												%boolean; "false">-<!ATTLIST text:alphabetical-index-source fo:language %string; #IMPLIED>-<!ATTLIST text:alphabetical-index-source fo:country %string; #IMPLIED>-<!ATTLIST text:alphabetical-index-source text:sort-algorithm %string; #IMPLIED>--<!ELEMENT text:alphabetical-index-entry-template ( text:index-entry-chapter |-												text:index-entry-page-number |-												text:index-entry-text |-												text:index-entry-span |-												text:index-entry-tab-stop )* >-<!ATTLIST text:alphabetical-index-entry-template text:outline-level -												(1|2|3|separator) #REQUIRED>-<!ATTLIST text:alphabetical-index-entry-template text:style-name -												%styleName; #REQUIRED>--<!ELEMENT text:alphabetical-index-auto-mark-file EMPTY>-<!ATTLIST text:alphabetical-index-auto-mark-file xlink:href CDATA #IMPLIED>-<!ATTLIST text:alphabetical-index-auto-mark-file xlink:type (simple) #FIXED "simple">--<!ELEMENT text:bibliography (text:bibliography-source, text:index-body) >-<!ATTLIST text:bibliography %sectionAttr;>--<!ELEMENT text:bibliography-source ( text:index-title-template?,-									 text:bibliography-entry-template* ) >--<!ELEMENT text:bibliography-entry-template ( text:index-entry-span |-											 text:index-entry-tab-stop |-											 text:index-entry-bibliography )* >-<!ATTLIST text:bibliography-entry-template text:bibliography-type -				( article | book | booklet | conference | custom1 | custom2 | -				  custom3 | custom4 | custom5 | email | inbook | incollection |-				  inproceedings | journal | manual | mastersthesis | misc | -				  phdthesis | proceedings | techreport | unpublished | www ) -				#REQUIRED >-<!ATTLIST text:bibliography-entry-template text:style-name -													%styleName; #REQUIRED>--<!ELEMENT text:index-body %sectionText; >--<!-- -Validity constraint: text:index-title elements may appear only in-indices, and there may be only one text:index-title element.  --->-<!ELEMENT text:index-title %sectionText; >-<!ATTLIST text:index-title text:style-name %styleName; #IMPLIED>-<!ATTLIST text:index-title text:name %string; #IMPLIED>--<!ELEMENT text:index-title-template (#PCDATA)>-<!ATTLIST text:index-title-template text:style-name %styleName; #IMPLIED>--<!ELEMENT text:index-entry-chapter-number EMPTY>-<!ATTLIST text:index-entry-chapter-number text:style-name %styleName; #IMPLIED>--<!ELEMENT text:index-entry-chapter EMPTY>-<!ATTLIST text:index-entry-chapter text:style-name %styleName; #IMPLIED>-<!ATTLIST text:index-entry-chapter text:display (name|number|number-and-name) -															"number-and-name" >--<!ELEMENT text:index-entry-text EMPTY>-<!ATTLIST text:index-entry-text text:style-name %styleName; #IMPLIED>--<!ELEMENT text:index-entry-page-number EMPTY>-<!ATTLIST text:index-entry-page-number text:style-name %styleName; #IMPLIED>--<!ELEMENT text:index-entry-span (#PCDATA)>-<!ATTLIST text:index-entry-span text:style-name %styleName; #IMPLIED>--<!ELEMENT text:index-entry-bibliography EMPTY>-<!ATTLIST text:index-entry-bibliography text:style-name %styleName; #IMPLIED>-<!ATTLIST text:index-entry-bibliography text:bibliography-data-field-							( address | annote | author | bibliography-type |-							  booktitle | chapter | custom1 | custom2 | -							  custom3 | custom4 | custom5 | edition | editor |-							  howpublished | identifier | institution | isbn |-							  journal | month | note | number | organizations |-							  pages | publisher | report-type | school | -							  series | title | url | volume | year ) #REQUIRED>---<!ELEMENT text:index-entry-tab-stop EMPTY>-<!ATTLIST text:index-entry-tab-stop text:style-name %styleName; #IMPLIED>-<!ATTLIST text:index-entry-tab-stop style:leader-char %character; " ">-<!ATTLIST text:index-entry-tab-stop style:type (left|right) "left">-<!ATTLIST text:index-entry-tab-stop style:position %length; #IMPLIED>--<!ELEMENT text:index-entry-link-start EMPTY>-<!ATTLIST text:index-entry-link-start text:style-name %styleName; #IMPLIED>--<!ELEMENT text:index-entry-link-end EMPTY>-<!ATTLIST text:index-entry-link-end text:style-name %styleName; #IMPLIED>--<!ELEMENT text:index-source-styles (text:index-source-style)*>-<!ATTLIST text:index-source-styles text:outline-level %integer; #REQUIRED>--<!ELEMENT text:index-source-style EMPTY>-<!ATTLIST text:index-source-style text:style-name %styleName; #REQUIRED>--<!ELEMENT text:toc-mark-start EMPTY>-<!ATTLIST text:toc-mark-start text:id %string; #REQUIRED>-<!ATTLIST text:toc-mark-start text:outline-level %integer; #IMPLIED>--<!ELEMENT text:toc-mark-end EMPTY>-<!ATTLIST text:toc-mark-end text:id %string; #REQUIRED>--<!ELEMENT text:toc-mark EMPTY>-<!ATTLIST text:toc-mark text:string-value %string; #REQUIRED>-<!ATTLIST text:toc-mark text:outline-level %integer; #IMPLIED>--<!ELEMENT text:user-index-mark-start EMPTY>-<!ATTLIST text:user-index-mark-start text:id %string; #REQUIRED>-<!ATTLIST text:user-index-mark-start text:outline-level %integer; #IMPLIED>-<!ATTLIST text:user-index-mark-start text:index-name %string; #IMPLIED>--<!ELEMENT text:user-index-mark-end EMPTY>-<!ATTLIST text:user-index-mark-end text:id %string; #REQUIRED>--<!ELEMENT text:user-index-mark EMPTY>-<!ATTLIST text:user-index-mark text:string-value %string; #REQUIRED>-<!ATTLIST text:user-index-mark text:outline-level %integer; #IMPLIED>-<!ATTLIST text:user-index-mark text:index-name %string; #IMPLIED>--<!ELEMENT text:alphabetical-index-mark-start EMPTY>-<!ATTLIST text:alphabetical-index-mark-start text:id %string; #REQUIRED>-<!ATTLIST text:alphabetical-index-mark-start text:key1 %string; #IMPLIED>-<!ATTLIST text:alphabetical-index-mark-start text:key2 %string; #IMPLIED>-<!ATTLIST text:alphabetical-index-mark-start text:main-etry %boolean; "false">--<!ELEMENT text:alphabetical-index-mark-end EMPTY>-<!ATTLIST text:alphabetical-index-mark-end text:id %string; #REQUIRED>--<!ELEMENT text:alphabetical-index-mark EMPTY>-<!ATTLIST text:alphabetical-index-mark text:string-value %string; #REQUIRED>-<!ATTLIST text:alphabetical-index-mark text:key1 %string; #IMPLIED>-<!ATTLIST text:alphabetical-index-mark text:key2 %string; #IMPLIED>-<!ATTLIST text:alphabetical-index-mark text:main-etry %boolean; "false">--<!ELEMENT text:bibliography-configuration (text:sort-key)*>-<!ATTLIST text:bibliography-configuration text:prefix %string; #IMPLIED>-<!ATTLIST text:bibliography-configuration text:suffix %string; #IMPLIED>-<!ATTLIST text:bibliography-configuration text:sort-by-position %boolean; "true">-<!ATTLIST text:bibliography-configuration text:numbered-entries %boolean; "false">-<!ATTLIST text:bibliography-configuration fo:language %string; #IMPLIED>-<!ATTLIST text:bibliography-configuration fo:country %string; #IMPLIED>-<!ATTLIST text:bibliography-configuration text:sort-algorithm %string; #IMPLIED>--<!ELEMENT text:sort-key EMPTY>-<!ATTLIST text:sort-key text:key ( address | annote | author | -	bibliography-type | booktitle | chapter | custom1 | custom2 | -	custom3 | custom4 | custom5 | edition | editor | howpublished | -	identifier | institution | isbn | journal | month | note | number | -	organizations | pages | publisher | report-type | school | series | -	title | url | volume | year ) #REQUIRED>-<!ATTLIST text:sort-key text:sort-ascending %boolean; "true">--<!ELEMENT text:linenumbering-configuration (text:linenumbering-separator?)>-<!ATTLIST text:linenumbering-configuration text:style-name %styleName; #IMPLIED>-<!ATTLIST text:linenumbering-configuration text:number-lines %boolean; "true">-<!ATTLIST text:linenumbering-configuration text:count-empty-lines %boolean; "true">-<!ATTLIST text:linenumbering-configuration text:count-in-floating-frames %boolean; "false">-<!ATTLIST text:linenumbering-configuration text:restart-numbering %boolean; "false">-<!ATTLIST text:linenumbering-configuration text:offset %nonNegativeLength; #IMPLIED>-<!ATTLIST text:linenumbering-configuration style:num-format (1|a|A|i|I) "1">-<!ATTLIST text:linenumbering-configuration style:num-letter-sync %boolean; "false">-<!ATTLIST text:linenumbering-configuration text:number-position (left|rigth|inner|outer) "left">-<!ATTLIST text:linenumbering-configuration text:increment %nonNegativeInteger; #IMPLIED>--<!ELEMENT text:linenumbering-separator (#PCDATA)>-<!ATTLIST text:linenumbering-separator text:increment %nonNegativeInteger; #IMPLIED>--<!ELEMENT text:script (#PCDATA)>-<!ATTLIST text:script script:language CDATA #REQUIRED>-<!ATTLIST text:script xlink:href CDATA #IMPLIED>-<!ATTLIST text:script xlink:type (simple) #FIXED "simple">--<!ELEMENT text:measure (#PCDATA)>-<!ATTLIST text:measure text:kind (value|unit|gap) #REQUIRED>--<!ELEMENT text:ruby (text:ruby-base, text:ruby-text)>-<!ATTLIST text:ruby text:style-name %styleName; #IMPLIED>--<!ELEMENT text:ruby-base %inline-text;>--<!ELEMENT text:ruby-text (#PCDATA)>-<!ATTLIST text:ruby-text text:style-name %styleName; #IMPLIED>--<!-- elements for change tracking -->--<!ELEMENT text:change EMPTY>-<!ATTLIST text:change text:change-id CDATA #REQUIRED>--<!ELEMENT text:change-start EMPTY>-<!ATTLIST text:change-start text:change-id CDATA #REQUIRED>--<!ELEMENT text:change-end EMPTY>-<!ATTLIST text:change-end text:change-id CDATA #REQUIRED>--<!ELEMENT text:tracked-changes (text:changed-region)*>-<!ATTLIST text:tracked-changes text:track-changes %boolean; "true">-<!ATTLIST text:tracked-changes text:protection-key CDATA #IMPLIED>--<!ELEMENT text:changed-region (text:insertion | -							   (text:deletion, text:insertion?) | -                               text:format-change) >-<!ATTLIST text:changed-region text:id ID #REQUIRED>-<!ATTLIST text:changed-region text:merge-last-paragraph %boolean; "true">--<!ELEMENT text:insertion (office:change-info, %sectionText;)>-<!ELEMENT text:deletion (office:change-info, %sectionText;)>-<!ELEMENT text:format-change (office:change-info)>-
− examples/README
@@ -1,77 +0,0 @@-Please note:-The example code in this directory may not always work with the-current version of the the HaXml libraries.  What little time I have-for maintenance goes into the main HaXml facilites, not into testing-these small demonstration exercises.  Sorry.---Parse/Pretty-Print example  (Canonicalise.hs)----------------------------To demonstrate parsing and pretty-printing, I wrote a simple in-out-application:-    $ hmake Canonicalise -I../lib-Test it on some XML documents:-    $ ./Canonicalise album.xml-You will notice that it changes some parts of the document, for instance in-    $ ./Canonicalise subjdb.xml-all parameter entities are replaced with their expansion.---Xml2Haskell example  (album.dtd, AlbumDTD.hs, album.xml)---------------------In this example, I did the following:--Convert the XML DTD for an album into a Haskell module:-    $ DtdToHaskell album.dtd AlbumDtd.hs--Edit the generated file (just to change the module name to match!)-    $ vi AlbumDtd.hs--Wrote the test application (App.hs) using AlbumDTD.hs, and compiled it:-    $ hmake App -I../lib--Running the test displays some progress messages, and outputs the original-document again, only with the album title changed.-    $ ./App album.xml new.xml--And that's it.---Haskell2Xml example  (Types.hs, DTypes.hs, Example.hs, subjdb.xml)---------------------The file Types.hs defines some data types for a mini-database.-Derive the Haskell2Xml apparatus using DrIFT:-    $ DrIFT Types.hs >DTypes.hs--The example program in Example.hs just writes some Haskell data to-an XML file.-    $ hmake Example -I../lib-    $ ./Example-    $ less subjdb.xml--I hope that's reasonably clear.---Bigger DtdToHaskell example-----------------------------In directory SMIL, do-    $ DtdToHaskell SMIL20.dtd DTD_SMIL20.hs-and have a look at the resulting Haskell file.  This is a large-multi-part DTD for the Synchronised Multimedia Integration Language,-defined by the W3C.  As of 2000-11-16, our XML parser has been extended-to deal with the external subset as fully as possible.--DTDpp-------This little program is just a pretty-printer for an XML DTD - it-inlines any included files and expands all PE references.  Its main-use is to check that the HaXml parser can read a complicated DTD-without errors.--DebugLex----------Another little debugging program to help find errors in HaXml --this time in the lexer.  It prints a stream of lexed tokens (and-their source positions) to stdout, so you can examine whether-some complicated piece of syntax has confused the lexer.-
− examples/SMIL/DTD_SMIL20.hs
@@ -1,2446 +0,0 @@-module DTD_SMIL20 where--import Text.XML.HaXml.Xml2Haskell-import Text.XML.HaXml.OneOfN---{-Type decls-}--data Smil = Smil-    { smilId :: (Maybe String)-    , smilClass :: (Maybe String)-    , smilTitle :: (Maybe String)-    , smilXml'lang :: (Maybe String)-    , smilXmlns :: (Defaultable String)-    } deriving (Eq,Show)-data Head = Head-    { headId :: (Maybe String)-    , headClass :: (Maybe String)-    , headTitle :: (Maybe String)-    , headXml'lang :: (Maybe String)-    } deriving (Eq,Show)-data Body = Body-    { bodyId :: (Maybe String)-    , bodyClass :: (Maybe String)-    , bodyTitle :: (Maybe String)-    , bodyXml'lang :: (Maybe String)-    } deriving (Eq,Show)-data Animate = Animate-    { animateId :: (Maybe String)-    , animateClass :: (Maybe String)-    , animateTitle :: (Maybe String)-    , animateXml'lang :: (Maybe String)-    , animateCustomTest :: (Maybe String)-    , animateSystemBitrate :: (Maybe String)-    , animateSystemCaptions :: (Maybe Animate_SystemCaptions)-    , animateSystemLanguage :: (Maybe String)-    , animateSystemOverdubOrSubtitle :: (Maybe Animate_SystemOverdubOrSubtitle)-    , animateSystemRequired :: (Maybe String)-    , animateSystemScreenSize :: (Maybe String)-    , animateSystemScreenDepth :: (Maybe String)-    , animateSystemAudioDesc :: (Maybe Animate_SystemAudioDesc)-    , animateSystemOperatingSystem :: (Maybe String)-    , animateSystemCPU :: (Maybe String)-    , animateSystemComponent :: (Maybe String)-    , animateSystem_bitrate :: (Maybe String)-    , animateSystem_captions :: (Maybe Animate_System_captions)-    , animateSystem_language :: (Maybe String)-    , animateSystem_overdub_or_caption :: (Maybe Animate_System_overdub_or_caption)-    , animateSystem_required :: (Maybe String)-    , animateSystem_screen_size :: (Maybe String)-    , animateSystem_screen_depth :: (Maybe String)-    , animateDur :: (Maybe String)-    , animateRepeatCount :: (Maybe String)-    , animateRepeatDur :: (Maybe String)-    , animateBegin :: (Maybe String)-    , animateEnd :: (Maybe String)-    , animateAttributeName :: String-    , animateAttributeType :: (Maybe String)-    , animateValues :: (Maybe String)-    , animateFrom :: (Maybe String)-    , animateTo :: (Maybe String)-    , animateBy :: (Maybe String)-    , animateCalcMode :: (Defaultable Animate_CalcMode)-    , animateAdditive :: (Defaultable Animate_Additive)-    , animateAccumulate :: (Defaultable Animate_Accumulate)-    } deriving (Eq,Show)-data Animate_SystemCaptions = Animate_SystemCaptions_On  | -			      Animate_SystemCaptions_Off-			    deriving (Eq,Show)-data Animate_SystemOverdubOrSubtitle = Animate_SystemOverdubOrSubtitle_Overdub-				        |  Animate_SystemOverdubOrSubtitle_Subtitle-				     deriving (Eq,Show)-data Animate_SystemAudioDesc = Animate_SystemAudioDesc_On  | -			       Animate_SystemAudioDesc_Off-			     deriving (Eq,Show)-data Animate_System_captions = Animate_System_captions_On  | -			       Animate_System_captions_Off-			     deriving (Eq,Show)-data Animate_System_overdub_or_caption = Animate_System_overdub_or_caption_Overdub-					  |  Animate_System_overdub_or_caption_Caption-				       deriving (Eq,Show)-data Animate_CalcMode = Animate_CalcMode_Discrete  | -			Animate_CalcMode_Linear  |  Animate_CalcMode_Paced-		      deriving (Eq,Show)-data Animate_Additive = Animate_Additive_Replace  | -			Animate_Additive_Sum-		      deriving (Eq,Show)-data Animate_Accumulate = Animate_Accumulate_None  | -			  Animate_Accumulate_Sum-			deriving (Eq,Show)-data Set = Set-    { setId :: (Maybe String)-    , setClass :: (Maybe String)-    , setTitle :: (Maybe String)-    , setXml'lang :: (Maybe String)-    , setCustomTest :: (Maybe String)-    , setSystemBitrate :: (Maybe String)-    , setSystemCaptions :: (Maybe Set_SystemCaptions)-    , setSystemLanguage :: (Maybe String)-    , setSystemOverdubOrSubtitle :: (Maybe Set_SystemOverdubOrSubtitle)-    , setSystemRequired :: (Maybe String)-    , setSystemScreenSize :: (Maybe String)-    , setSystemScreenDepth :: (Maybe String)-    , setSystemAudioDesc :: (Maybe Set_SystemAudioDesc)-    , setSystemOperatingSystem :: (Maybe String)-    , setSystemCPU :: (Maybe String)-    , setSystemComponent :: (Maybe String)-    , setSystem_bitrate :: (Maybe String)-    , setSystem_captions :: (Maybe Set_System_captions)-    , setSystem_language :: (Maybe String)-    , setSystem_overdub_or_caption :: (Maybe Set_System_overdub_or_caption)-    , setSystem_required :: (Maybe String)-    , setSystem_screen_size :: (Maybe String)-    , setSystem_screen_depth :: (Maybe String)-    , setDur :: (Maybe String)-    , setRepeatCount :: (Maybe String)-    , setRepeatDur :: (Maybe String)-    , setBegin :: (Maybe String)-    , setEnd :: (Maybe String)-    , setAttributeName :: String-    , setAttributeType :: (Maybe String)-    , setTo :: (Maybe String)-    } deriving (Eq,Show)-data Set_SystemCaptions = Set_SystemCaptions_On  | -			  Set_SystemCaptions_Off-			deriving (Eq,Show)-data Set_SystemOverdubOrSubtitle = Set_SystemOverdubOrSubtitle_Overdub-				    |  Set_SystemOverdubOrSubtitle_Subtitle-				 deriving (Eq,Show)-data Set_SystemAudioDesc = Set_SystemAudioDesc_On  | -			   Set_SystemAudioDesc_Off-			 deriving (Eq,Show)-data Set_System_captions = Set_System_captions_On  | -			   Set_System_captions_Off-			 deriving (Eq,Show)-data Set_System_overdub_or_caption = Set_System_overdub_or_caption_Overdub-				      |  Set_System_overdub_or_caption_Caption-				   deriving (Eq,Show)-data AnimateMotion = AnimateMotion-    { animateMotionId :: (Maybe String)-    , animateMotionClass :: (Maybe String)-    , animateMotionTitle :: (Maybe String)-    , animateMotionXml'lang :: (Maybe String)-    , animateMotionCustomTest :: (Maybe String)-    , animateMotionSystemBitrate :: (Maybe String)-    , animateMotionSystemCaptions :: (Maybe AnimateMotion_SystemCaptions)-    , animateMotionSystemLanguage :: (Maybe String)-    , animateMotionSystemOverdubOrSubtitle :: (Maybe AnimateMotion_SystemOverdubOrSubtitle)-    , animateMotionSystemRequired :: (Maybe String)-    , animateMotionSystemScreenSize :: (Maybe String)-    , animateMotionSystemScreenDepth :: (Maybe String)-    , animateMotionSystemAudioDesc :: (Maybe AnimateMotion_SystemAudioDesc)-    , animateMotionSystemOperatingSystem :: (Maybe String)-    , animateMotionSystemCPU :: (Maybe String)-    , animateMotionSystemComponent :: (Maybe String)-    , animateMotionSystem_bitrate :: (Maybe String)-    , animateMotionSystem_captions :: (Maybe AnimateMotion_System_captions)-    , animateMotionSystem_language :: (Maybe String)-    , animateMotionSystem_overdub_or_caption :: (Maybe AnimateMotion_System_overdub_or_caption)-    , animateMotionSystem_required :: (Maybe String)-    , animateMotionSystem_screen_size :: (Maybe String)-    , animateMotionSystem_screen_depth :: (Maybe String)-    , animateMotionDur :: (Maybe String)-    , animateMotionRepeatCount :: (Maybe String)-    , animateMotionRepeatDur :: (Maybe String)-    , animateMotionBegin :: (Maybe String)-    , animateMotionEnd :: (Maybe String)-    , animateMotionValues :: (Maybe String)-    , animateMotionFrom :: (Maybe String)-    , animateMotionTo :: (Maybe String)-    , animateMotionBy :: (Maybe String)-    , animateMotionCalcMode :: (Defaultable AnimateMotion_CalcMode)-    , animateMotionAdditive :: (Defaultable AnimateMotion_Additive)-    , animateMotionAccumulate :: (Defaultable AnimateMotion_Accumulate)-    , animateMotionOrigin :: (Defaultable AnimateMotion_Origin)-    } deriving (Eq,Show)-data AnimateMotion_SystemCaptions = AnimateMotion_SystemCaptions_On-				     |  AnimateMotion_SystemCaptions_Off-				  deriving (Eq,Show)-data AnimateMotion_SystemOverdubOrSubtitle = AnimateMotion_SystemOverdubOrSubtitle_Overdub-					      |  AnimateMotion_SystemOverdubOrSubtitle_Subtitle-					   deriving (Eq,Show)-data AnimateMotion_SystemAudioDesc = AnimateMotion_SystemAudioDesc_On-				      |  AnimateMotion_SystemAudioDesc_Off-				   deriving (Eq,Show)-data AnimateMotion_System_captions = AnimateMotion_System_captions_On-				      |  AnimateMotion_System_captions_Off-				   deriving (Eq,Show)-data AnimateMotion_System_overdub_or_caption = AnimateMotion_System_overdub_or_caption_Overdub-					        |  AnimateMotion_System_overdub_or_caption_Caption-					     deriving (Eq,Show)-data AnimateMotion_CalcMode = AnimateMotion_CalcMode_Discrete  | -			      AnimateMotion_CalcMode_Linear  |  AnimateMotion_CalcMode_Paced-			    deriving (Eq,Show)-data AnimateMotion_Additive = AnimateMotion_Additive_Replace  | -			      AnimateMotion_Additive_Sum-			    deriving (Eq,Show)-data AnimateMotion_Accumulate = AnimateMotion_Accumulate_None  | -				AnimateMotion_Accumulate_Sum-			      deriving (Eq,Show)-data AnimateMotion_Origin = AnimateMotion_Origin_Default-			  deriving (Eq,Show)-data AnimateColor = AnimateColor-    { animateColorId :: (Maybe String)-    , animateColorClass :: (Maybe String)-    , animateColorTitle :: (Maybe String)-    , animateColorXml'lang :: (Maybe String)-    , animateColorCustomTest :: (Maybe String)-    , animateColorSystemBitrate :: (Maybe String)-    , animateColorSystemCaptions :: (Maybe AnimateColor_SystemCaptions)-    , animateColorSystemLanguage :: (Maybe String)-    , animateColorSystemOverdubOrSubtitle :: (Maybe AnimateColor_SystemOverdubOrSubtitle)-    , animateColorSystemRequired :: (Maybe String)-    , animateColorSystemScreenSize :: (Maybe String)-    , animateColorSystemScreenDepth :: (Maybe String)-    , animateColorSystemAudioDesc :: (Maybe AnimateColor_SystemAudioDesc)-    , animateColorSystemOperatingSystem :: (Maybe String)-    , animateColorSystemCPU :: (Maybe String)-    , animateColorSystemComponent :: (Maybe String)-    , animateColorSystem_bitrate :: (Maybe String)-    , animateColorSystem_captions :: (Maybe AnimateColor_System_captions)-    , animateColorSystem_language :: (Maybe String)-    , animateColorSystem_overdub_or_caption :: (Maybe AnimateColor_System_overdub_or_caption)-    , animateColorSystem_required :: (Maybe String)-    , animateColorSystem_screen_size :: (Maybe String)-    , animateColorSystem_screen_depth :: (Maybe String)-    , animateColorDur :: (Maybe String)-    , animateColorRepeatCount :: (Maybe String)-    , animateColorRepeatDur :: (Maybe String)-    , animateColorBegin :: (Maybe String)-    , animateColorEnd :: (Maybe String)-    , animateColorAttributeName :: String-    , animateColorAttributeType :: (Maybe String)-    , animateColorValues :: (Maybe String)-    , animateColorFrom :: (Maybe String)-    , animateColorTo :: (Maybe String)-    , animateColorBy :: (Maybe String)-    , animateColorCalcMode :: (Defaultable AnimateColor_CalcMode)-    , animateColorAdditive :: (Defaultable AnimateColor_Additive)-    , animateColorAccumulate :: (Defaultable AnimateColor_Accumulate)-    } deriving (Eq,Show)-data AnimateColor_SystemCaptions = AnimateColor_SystemCaptions_On-				    |  AnimateColor_SystemCaptions_Off-				 deriving (Eq,Show)-data AnimateColor_SystemOverdubOrSubtitle = AnimateColor_SystemOverdubOrSubtitle_Overdub-					     |  AnimateColor_SystemOverdubOrSubtitle_Subtitle-					  deriving (Eq,Show)-data AnimateColor_SystemAudioDesc = AnimateColor_SystemAudioDesc_On-				     |  AnimateColor_SystemAudioDesc_Off-				  deriving (Eq,Show)-data AnimateColor_System_captions = AnimateColor_System_captions_On-				     |  AnimateColor_System_captions_Off-				  deriving (Eq,Show)-data AnimateColor_System_overdub_or_caption = AnimateColor_System_overdub_or_caption_Overdub-					       |  AnimateColor_System_overdub_or_caption_Caption-					    deriving (Eq,Show)-data AnimateColor_CalcMode = AnimateColor_CalcMode_Discrete  | -			     AnimateColor_CalcMode_Linear  |  AnimateColor_CalcMode_Paced-			   deriving (Eq,Show)-data AnimateColor_Additive = AnimateColor_Additive_Replace  | -			     AnimateColor_Additive_Sum-			   deriving (Eq,Show)-data AnimateColor_Accumulate = AnimateColor_Accumulate_None  | -			       AnimateColor_Accumulate_Sum-			     deriving (Eq,Show)-data Switch = Switch-    { switchId :: (Maybe String)-    , switchClass :: (Maybe String)-    , switchTitle :: (Maybe String)-    , switchXml'lang :: (Maybe String)-    } deriving (Eq,Show)-data Meta = Meta-    { metaContent :: (Maybe String)-    , metaName :: String-    } deriving (Eq,Show)-data Metadata = Metadata-    { metadataId :: (Maybe String)-    , metadataClass :: (Maybe String)-    , metadataTitle :: (Maybe String)-    , metadataXml'lang :: (Maybe String)-    } deriving (Eq,Show)-data Layout = Layout-    { layoutId :: (Maybe String)-    , layoutClass :: (Maybe String)-    , layoutTitle :: (Maybe String)-    , layoutXml'lang :: (Maybe String)-    , layoutType :: (Defaultable String)-    } deriving (Eq,Show)-data Region = Region-    { regionId :: (Maybe String)-    , regionClass :: (Maybe String)-    , regionTitle :: (Maybe String)-    , regionXml'lang :: (Maybe String)-    , regionHeight :: (Defaultable String)-    , regionWidth :: (Defaultable String)-    , regionClose :: (Defaultable Region_Close)-    , regionOpen :: (Defaultable Region_Open)-    , regionBackgroundColor :: (Maybe String)-    , regionBackground_color :: (Maybe String)-    , regionBottom :: (Defaultable String)-    , regionLeft :: (Defaultable String)-    , regionRight :: (Defaultable String)-    , regionTop :: (Defaultable String)-    , regionZ_index :: (Maybe String)-    , regionShowBackground :: (Defaultable Region_ShowBackground)-    , regionFit :: (Defaultable Region_Fit)-    } deriving (Eq,Show)-data Region_Close = Region_Close_Never  | -		    Region_Close_WhenNotActive-		  deriving (Eq,Show)-data Region_Open = Region_Open_Always  |  Region_Open_WhenActive-		 deriving (Eq,Show)-data Region_ShowBackground = Region_ShowBackground_Always  | -			     Region_ShowBackground_WhenActive-			   deriving (Eq,Show)-data Region_Fit = Region_Fit_Hidden  |  Region_Fit_Fill  | -		  Region_Fit_Meet  |  Region_Fit_Scroll  |  Region_Fit_Slice-		deriving (Eq,Show)-data Root_layout = Root_layout-    { root_layoutId :: (Maybe String)-    , root_layoutClass :: (Maybe String)-    , root_layoutTitle :: (Maybe String)-    , root_layoutXml'lang :: (Maybe String)-    , root_layoutHeight :: (Defaultable String)-    , root_layoutWidth :: (Defaultable String)-    , root_layoutClose :: (Defaultable Root_layout_Close)-    , root_layoutOpen :: (Defaultable Root_layout_Open)-    , root_layoutBackgroundColor :: (Maybe String)-    , root_layoutBackground_color :: (Maybe String)-    } deriving (Eq,Show)-data Root_layout_Close = Root_layout_Close_Never  | -			 Root_layout_Close_WhenNotActive-		       deriving (Eq,Show)-data Root_layout_Open = Root_layout_Open_Always  | -			Root_layout_Open_WhenActive-		      deriving (Eq,Show)-data Ref = Ref-    { refId :: (Maybe String)-    , refClass :: (Maybe String)-    , refTitle :: (Maybe String)-    , refXml'lang :: (Maybe String)-    } deriving (Eq,Show)-data Audio = Audio-    { audioId :: (Maybe String)-    , audioClass :: (Maybe String)-    , audioTitle :: (Maybe String)-    , audioXml'lang :: (Maybe String)-    } deriving (Eq,Show)-data Img = Img-    { imgId :: (Maybe String)-    , imgClass :: (Maybe String)-    , imgTitle :: (Maybe String)-    , imgXml'lang :: (Maybe String)-    } deriving (Eq,Show)-data Video = Video-    { videoId :: (Maybe String)-    , videoClass :: (Maybe String)-    , videoTitle :: (Maybe String)-    , videoXml'lang :: (Maybe String)-    } deriving (Eq,Show)-data Text = Text-    { textId :: (Maybe String)-    , textClass :: (Maybe String)-    , textTitle :: (Maybe String)-    , textXml'lang :: (Maybe String)-    } deriving (Eq,Show)-data Textstream = Textstream-    { textstreamId :: (Maybe String)-    , textstreamClass :: (Maybe String)-    , textstreamTitle :: (Maybe String)-    , textstreamXml'lang :: (Maybe String)-    } deriving (Eq,Show)-data Animation = Animation-    { animationId :: (Maybe String)-    , animationClass :: (Maybe String)-    , animationTitle :: (Maybe String)-    , animationXml'lang :: (Maybe String)-    } deriving (Eq,Show)-data Transition = Transition-    { transitionId :: (Maybe String)-    , transitionClass :: (Maybe String)-    , transitionTitle :: (Maybe String)-    , transitionXml'lang :: (Maybe String)-    , transitionType :: (Maybe Transition_Type)-    , transitionSubtype :: (Maybe Transition_Subtype)-    , transitionHorzRepeat :: (Defaultable String)-    , transitionVertRepeat :: (Defaultable String)-    , transitionBorderWidth :: (Defaultable String)-    , transitionBorderColor :: (Defaultable String)-    , transitionFadeColor :: (Defaultable String)-    , transitionCoordinated :: (Defaultable Transition_Coordinated)-    , transitionClibBoundary :: (Defaultable Transition_ClibBoundary)-    , transitionDur :: (Maybe String)-    , transitionStartProgress :: (Defaultable String)-    , transitionEndProgress :: (Defaultable String)-    , transitionDirection :: (Defaultable Transition_Direction)-    } deriving (Eq,Show)-data Transition_Type = Transition_Type_BarWipe  | -		       Transition_Type_BoxWipe  |  Transition_Type_FourBoxWipe  | -		       Transition_Type_BarnDoorWipe  |  Transition_Type_DiagonalWipe  | -		       Transition_Type_BowTieWipe  |  Transition_Type_MiscDiagonalWipe  | -		       Transition_Type_VeeWipe  |  Transition_Type_BarnVeeWipe  | -		       Transition_Type_ZigZagWipe  |  Transition_Type_BarnZigZagWipe  | -		       Transition_Type_MiscShapeWipe  |  Transition_Type_TriangleWipe  | -		       Transition_Type_ArrowHeadWipe  |  Transition_Type_PentagonWipe  | -		       Transition_Type_HexagonWipe  |  Transition_Type_EllipseWipe  | -		       Transition_Type_EyeWipe  |  Transition_Type_RoundRectWipe  | -		       Transition_Type_StarWipe  |  Transition_Type_ClockWipe  | -		       Transition_Type_PinWheelWipe  |  Transition_Type_SingleSweepWipe-		        |  Transition_Type_FanWipe  |  Transition_Type_DoubleFanWipe  | -		       Transition_Type_DoubleSweepWipe  |  Transition_Type_SaloonDoorWipe-		        |  Transition_Type_WindshieldWipe  |  Transition_Type_SnakeWipe-		        |  Transition_Type_SpiralWipe  | -		       Transition_Type_ParallelSnakesWipe  | -		       Transition_Type_BoxSnakesWipe  |  Transition_Type_WaterfallWipe  | -		       Transition_Type_PushWipe  |  Transition_Type_SlideWipe  | -		       Transition_Type_Fade-		     deriving (Eq,Show)-data Transition_Subtype = Transition_Subtype_Bottom  | -			  Transition_Subtype_BottomCenter  |  Transition_Subtype_BottomLeft-			   |  Transition_Subtype_BottomLeftClockwise  | -			  Transition_Subtype_BottomLeftCounterClockwise  | -			  Transition_Subtype_BottomLeftDiagonal  | -			  Transition_Subtype_BottomRight  | -			  Transition_Subtype_BottomRightClockwise  | -			  Transition_Subtype_BottomRightCounterClockwise  | -			  Transition_Subtype_BottomRightDiagonal  | -			  Transition_Subtype_CenterRight  |  Transition_Subtype_CenterTop  | -			  Transition_Subtype_Circle  |  Transition_Subtype_ClockwiseBottom-			   |  Transition_Subtype_ClockwiseBottomRight  | -			  Transition_Subtype_ClockwiseLeft  | -			  Transition_Subtype_ClockwiseNine  | -			  Transition_Subtype_ClockwiseRight  | -			  Transition_Subtype_ClockwiseSix  | -			  Transition_Subtype_ClockwiseThree  | -			  Transition_Subtype_ClockwiseTop  | -			  Transition_Subtype_ClockwiseTopLeft  | -			  Transition_Subtype_ClockwiseTwelve  |  Transition_Subtype_CornersIn-			   |  Transition_Subtype_CornersOut  | -			  Transition_Subtype_CounterClockwiseBottomLeft  | -			  Transition_Subtype_CounterClockwiseTopRight  | -			  Transition_Subtype_Crossfade  | -			  Transition_Subtype_DiagonalBottomLeft  | -			  Transition_Subtype_DiagonalBottomLeftOpposite  | -			  Transition_Subtype_DiagonalTopLeft  | -			  Transition_Subtype_DiagonalTopLeftOpposite  | -			  Transition_Subtype_Diamond  |  Transition_Subtype_DoubleBarnDoor-			   |  Transition_Subtype_DoubleDiamond  |  Transition_Subtype_Down-			   |  Transition_Subtype_FadeFromColor  | -			  Transition_Subtype_FadeToColor  | -			  Transition_Subtype_FanInHorizontal  | -			  Transition_Subtype_FanInVertical  | -			  Transition_Subtype_FanOutHorizontal  | -			  Transition_Subtype_FanOutVertical  |  Transition_Subtype_FivePoint-			   |  Transition_Subtype_FourBlade  | -			  Transition_Subtype_FourBoxHorizontal  | -			  Transition_Subtype_FourBoxVertical  |  Transition_Subtype_FourPoint-			   |  Transition_Subtype_FromBottom  |  Transition_Subtype_FromLeft-			   |  Transition_Subtype_FromRight  |  Transition_Subtype_FromTop  | -			  Transition_Subtype_Heart  |  Transition_Subtype_Horizontal  | -			  Transition_Subtype_HorizontalLeft  | -			  Transition_Subtype_HorizontalLeftSame  | -			  Transition_Subtype_HorizontalRight  | -			  Transition_Subtype_HorizontalRightSame  | -			  Transition_Subtype_HorizontalTopLeftOpposite  | -			  Transition_Subtype_HorizontalTopRightOpposite  | -			  Transition_Subtype_Keyhole  |  Transition_Subtype_Left  | -			  Transition_Subtype_LeftCenter  |  Transition_Subtype_LeftToRight-			   |  Transition_Subtype_OppositeHorizontal  | -			  Transition_Subtype_OppositeVertical  | -			  Transition_Subtype_ParallelDiagonal  | -			  Transition_Subtype_ParallelDiagonalBottomLeft  | -			  Transition_Subtype_ParallelDiagonalTopLeft  | -			  Transition_Subtype_ParallelVertical  | -			  Transition_Subtype_Rectangle  |  Transition_Subtype_Right  | -			  Transition_Subtype_RightCenter  |  Transition_Subtype_SixPoint  | -			  Transition_Subtype_Top  |  Transition_Subtype_TopCenter  | -			  Transition_Subtype_TopLeft  |  Transition_Subtype_TopLeftClockwise-			   |  Transition_Subtype_TopLeftCounterClockwise  | -			  Transition_Subtype_TopLeftDiagonal  | -			  Transition_Subtype_TopLeftHorizontal  | -			  Transition_Subtype_TopLeftVertical  |  Transition_Subtype_TopRight-			   |  Transition_Subtype_TopRightClockwise  | -			  Transition_Subtype_TopRightCounterClockwise  | -			  Transition_Subtype_TopRightDiagonal  | -			  Transition_Subtype_TopToBottom  | -			  Transition_Subtype_TwoBladeHorizontal  | -			  Transition_Subtype_TwoBladeVertical  | -			  Transition_Subtype_TwoBoxBottom  |  Transition_Subtype_TwoBoxLeft-			   |  Transition_Subtype_TwoBoxRight  |  Transition_Subtype_TwoBoxTop-			   |  Transition_Subtype_Up  |  Transition_Subtype_Vertical  | -			  Transition_Subtype_VerticalBottomLeftOpposite  | -			  Transition_Subtype_VerticalBottomSame  | -			  Transition_Subtype_VerticalLeft  | -			  Transition_Subtype_VerticalRight  | -			  Transition_Subtype_VerticalTopLeftOpposite  | -			  Transition_Subtype_VerticalTopSame-			deriving (Eq,Show)-data Transition_Coordinated = Transition_Coordinated_True  | -			      Transition_Coordinated_False-			    deriving (Eq,Show)-data Transition_ClibBoundary = Transition_ClibBoundary_Parent  | -			       Transition_ClibBoundary_Children-			     deriving (Eq,Show)-data Transition_Direction = Transition_Direction_Forward  | -			    Transition_Direction_Reverse-			  deriving (Eq,Show)-data TransitionFilter = TransitionFilter-    { transitionFilterId :: (Maybe String)-    , transitionFilterClass :: (Maybe String)-    , transitionFilterTitle :: (Maybe String)-    , transitionFilterXml'lang :: (Maybe String)-    , transitionFilterType :: (Maybe TransitionFilter_Type)-    , transitionFilterSubtype :: (Maybe TransitionFilter_Subtype)-    , transitionFilterHorzRepeat :: (Defaultable String)-    , transitionFilterVertRepeat :: (Defaultable String)-    , transitionFilterBorderWidth :: (Defaultable String)-    , transitionFilterBorderColor :: (Defaultable String)-    , transitionFilterFadeColor :: (Defaultable String)-    , transitionFilterCoordinated :: (Defaultable TransitionFilter_Coordinated)-    , transitionFilterClibBoundary :: (Defaultable TransitionFilter_ClibBoundary)-    , transitionFilterDur :: (Maybe String)-    , transitionFilterRepeatCount :: (Maybe String)-    , transitionFilterRepeatDur :: (Maybe String)-    , transitionFilterBegin :: (Maybe String)-    , transitionFilterEnd :: (Maybe String)-    , transitionFilterValues :: (Maybe String)-    , transitionFilterFrom :: (Maybe String)-    , transitionFilterTo :: (Maybe String)-    , transitionFilterBy :: (Maybe String)-    , transitionFilterCalcMode :: (Defaultable TransitionFilter_CalcMode)-    } deriving (Eq,Show)-data TransitionFilter_Type = TransitionFilter_Type_BarWipe  | -			     TransitionFilter_Type_BoxWipe  |  TransitionFilter_Type_FourBoxWipe-			      |  TransitionFilter_Type_BarnDoorWipe  | -			     TransitionFilter_Type_DiagonalWipe  | -			     TransitionFilter_Type_BowTieWipe  | -			     TransitionFilter_Type_MiscDiagonalWipe  | -			     TransitionFilter_Type_VeeWipe  |  TransitionFilter_Type_BarnVeeWipe-			      |  TransitionFilter_Type_ZigZagWipe  | -			     TransitionFilter_Type_BarnZigZagWipe  | -			     TransitionFilter_Type_MiscShapeWipe  | -			     TransitionFilter_Type_TriangleWipe  | -			     TransitionFilter_Type_ArrowHeadWipe  | -			     TransitionFilter_Type_PentagonWipe  | -			     TransitionFilter_Type_HexagonWipe  | -			     TransitionFilter_Type_EllipseWipe  |  TransitionFilter_Type_EyeWipe-			      |  TransitionFilter_Type_RoundRectWipe  | -			     TransitionFilter_Type_StarWipe  |  TransitionFilter_Type_ClockWipe-			      |  TransitionFilter_Type_PinWheelWipe  | -			     TransitionFilter_Type_SingleSweepWipe  | -			     TransitionFilter_Type_FanWipe  | -			     TransitionFilter_Type_DoubleFanWipe  | -			     TransitionFilter_Type_DoubleSweepWipe  | -			     TransitionFilter_Type_SaloonDoorWipe  | -			     TransitionFilter_Type_WindshieldWipe  | -			     TransitionFilter_Type_SnakeWipe  | -			     TransitionFilter_Type_SpiralWipe  | -			     TransitionFilter_Type_ParallelSnakesWipe  | -			     TransitionFilter_Type_BoxSnakesWipe  | -			     TransitionFilter_Type_WaterfallWipe  | -			     TransitionFilter_Type_PushWipe  |  TransitionFilter_Type_SlideWipe-			      |  TransitionFilter_Type_Fade-			   deriving (Eq,Show)-data TransitionFilter_Subtype = TransitionFilter_Subtype_Bottom  | -				TransitionFilter_Subtype_BottomCenter  | -				TransitionFilter_Subtype_BottomLeft  | -				TransitionFilter_Subtype_BottomLeftClockwise  | -				TransitionFilter_Subtype_BottomLeftCounterClockwise  | -				TransitionFilter_Subtype_BottomLeftDiagonal  | -				TransitionFilter_Subtype_BottomRight  | -				TransitionFilter_Subtype_BottomRightClockwise  | -				TransitionFilter_Subtype_BottomRightCounterClockwise  | -				TransitionFilter_Subtype_BottomRightDiagonal  | -				TransitionFilter_Subtype_CenterRight  | -				TransitionFilter_Subtype_CenterTop  | -				TransitionFilter_Subtype_Circle  | -				TransitionFilter_Subtype_ClockwiseBottom  | -				TransitionFilter_Subtype_ClockwiseBottomRight  | -				TransitionFilter_Subtype_ClockwiseLeft  | -				TransitionFilter_Subtype_ClockwiseNine  | -				TransitionFilter_Subtype_ClockwiseRight  | -				TransitionFilter_Subtype_ClockwiseSix  | -				TransitionFilter_Subtype_ClockwiseThree  | -				TransitionFilter_Subtype_ClockwiseTop  | -				TransitionFilter_Subtype_ClockwiseTopLeft  | -				TransitionFilter_Subtype_ClockwiseTwelve  | -				TransitionFilter_Subtype_CornersIn  | -				TransitionFilter_Subtype_CornersOut  | -				TransitionFilter_Subtype_CounterClockwiseBottomLeft  | -				TransitionFilter_Subtype_CounterClockwiseTopRight  | -				TransitionFilter_Subtype_Crossfade  | -				TransitionFilter_Subtype_DiagonalBottomLeft  | -				TransitionFilter_Subtype_DiagonalBottomLeftOpposite  | -				TransitionFilter_Subtype_DiagonalTopLeft  | -				TransitionFilter_Subtype_DiagonalTopLeftOpposite  | -				TransitionFilter_Subtype_Diamond  | -				TransitionFilter_Subtype_DoubleBarnDoor  | -				TransitionFilter_Subtype_DoubleDiamond  | -				TransitionFilter_Subtype_Down  | -				TransitionFilter_Subtype_FadeFromColor  | -				TransitionFilter_Subtype_FadeToColor  | -				TransitionFilter_Subtype_FanInHorizontal  | -				TransitionFilter_Subtype_FanInVertical  | -				TransitionFilter_Subtype_FanOutHorizontal  | -				TransitionFilter_Subtype_FanOutVertical  | -				TransitionFilter_Subtype_FivePoint  | -				TransitionFilter_Subtype_FourBlade  | -				TransitionFilter_Subtype_FourBoxHorizontal  | -				TransitionFilter_Subtype_FourBoxVertical  | -				TransitionFilter_Subtype_FourPoint  | -				TransitionFilter_Subtype_FromBottom  | -				TransitionFilter_Subtype_FromLeft  | -				TransitionFilter_Subtype_FromRight  | -				TransitionFilter_Subtype_FromTop  |  TransitionFilter_Subtype_Heart-				 |  TransitionFilter_Subtype_Horizontal  | -				TransitionFilter_Subtype_HorizontalLeft  | -				TransitionFilter_Subtype_HorizontalLeftSame  | -				TransitionFilter_Subtype_HorizontalRight  | -				TransitionFilter_Subtype_HorizontalRightSame  | -				TransitionFilter_Subtype_HorizontalTopLeftOpposite  | -				TransitionFilter_Subtype_HorizontalTopRightOpposite  | -				TransitionFilter_Subtype_Keyhole  |  TransitionFilter_Subtype_Left-				 |  TransitionFilter_Subtype_LeftCenter  | -				TransitionFilter_Subtype_LeftToRight  | -				TransitionFilter_Subtype_OppositeHorizontal  | -				TransitionFilter_Subtype_OppositeVertical  | -				TransitionFilter_Subtype_ParallelDiagonal  | -				TransitionFilter_Subtype_ParallelDiagonalBottomLeft  | -				TransitionFilter_Subtype_ParallelDiagonalTopLeft  | -				TransitionFilter_Subtype_ParallelVertical  | -				TransitionFilter_Subtype_Rectangle  | -				TransitionFilter_Subtype_Right  | -				TransitionFilter_Subtype_RightCenter  | -				TransitionFilter_Subtype_SixPoint  |  TransitionFilter_Subtype_Top-				 |  TransitionFilter_Subtype_TopCenter  | -				TransitionFilter_Subtype_TopLeft  | -				TransitionFilter_Subtype_TopLeftClockwise  | -				TransitionFilter_Subtype_TopLeftCounterClockwise  | -				TransitionFilter_Subtype_TopLeftDiagonal  | -				TransitionFilter_Subtype_TopLeftHorizontal  | -				TransitionFilter_Subtype_TopLeftVertical  | -				TransitionFilter_Subtype_TopRight  | -				TransitionFilter_Subtype_TopRightClockwise  | -				TransitionFilter_Subtype_TopRightCounterClockwise  | -				TransitionFilter_Subtype_TopRightDiagonal  | -				TransitionFilter_Subtype_TopToBottom  | -				TransitionFilter_Subtype_TwoBladeHorizontal  | -				TransitionFilter_Subtype_TwoBladeVertical  | -				TransitionFilter_Subtype_TwoBoxBottom  | -				TransitionFilter_Subtype_TwoBoxLeft  | -				TransitionFilter_Subtype_TwoBoxRight  | -				TransitionFilter_Subtype_TwoBoxTop  |  TransitionFilter_Subtype_Up-				 |  TransitionFilter_Subtype_Vertical  | -				TransitionFilter_Subtype_VerticalBottomLeftOpposite  | -				TransitionFilter_Subtype_VerticalBottomSame  | -				TransitionFilter_Subtype_VerticalLeft  | -				TransitionFilter_Subtype_VerticalRight  | -				TransitionFilter_Subtype_VerticalTopLeftOpposite  | -				TransitionFilter_Subtype_VerticalTopSame-			      deriving (Eq,Show)-data TransitionFilter_Coordinated = TransitionFilter_Coordinated_True-				     |  TransitionFilter_Coordinated_False-				  deriving (Eq,Show)-data TransitionFilter_ClibBoundary = TransitionFilter_ClibBoundary_Parent-				      |  TransitionFilter_ClibBoundary_Children-				   deriving (Eq,Show)-data TransitionFilter_CalcMode = TransitionFilter_CalcMode_Discrete-				  |  TransitionFilter_CalcMode_Linear  | -				 TransitionFilter_CalcMode_Paced-			       deriving (Eq,Show)---{-Instance decls-}--instance XmlContent Smil where-    fromElem (CElem (Elem "smil" as []):rest) =-	(Just (fromAttrs as), rest)-    fromElem (CMisc _:rest) = fromElem rest-    fromElem rest = (Nothing, rest)-    toElem as =-	[CElem (Elem "smil" (toAttrs as) [])]-instance XmlAttributes Smil where-    fromAttrs as =-	Smil-	  { smilId = possibleA fromAttrToStr "id" as-	  , smilClass = possibleA fromAttrToStr "class" as-	  , smilTitle = possibleA fromAttrToStr "title" as-	  , smilXml'lang = possibleA fromAttrToStr "xml:lang" as-	  , smilXmlns = defaultA fromAttrToStr "http://www.w3.org/TR/REC-smil/SMIL20" "xmlns" as-	  }-    toAttrs v = catMaybes -	[ maybeToAttr toAttrFrStr "id" (smilId v)-	, maybeToAttr toAttrFrStr "class" (smilClass v)-	, maybeToAttr toAttrFrStr "title" (smilTitle v)-	, maybeToAttr toAttrFrStr "xml:lang" (smilXml'lang v)-	, defaultToAttr toAttrFrStr "xmlns" (smilXmlns v)-	]-instance XmlContent Head where-    fromElem (CElem (Elem "head" as []):rest) =-	(Just (fromAttrs as), rest)-    fromElem (CMisc _:rest) = fromElem rest-    fromElem rest = (Nothing, rest)-    toElem as =-	[CElem (Elem "head" (toAttrs as) [])]-instance XmlAttributes Head where-    fromAttrs as =-	Head-	  { headId = possibleA fromAttrToStr "id" as-	  , headClass = possibleA fromAttrToStr "class" as-	  , headTitle = possibleA fromAttrToStr "title" as-	  , headXml'lang = possibleA fromAttrToStr "xml:lang" as-	  }-    toAttrs v = catMaybes -	[ maybeToAttr toAttrFrStr "id" (headId v)-	, maybeToAttr toAttrFrStr "class" (headClass v)-	, maybeToAttr toAttrFrStr "title" (headTitle v)-	, maybeToAttr toAttrFrStr "xml:lang" (headXml'lang v)-	]-instance XmlContent Body where-    fromElem (CElem (Elem "body" as []):rest) =-	(Just (fromAttrs as), rest)-    fromElem (CMisc _:rest) = fromElem rest-    fromElem rest = (Nothing, rest)-    toElem as =-	[CElem (Elem "body" (toAttrs as) [])]-instance XmlAttributes Body where-    fromAttrs as =-	Body-	  { bodyId = possibleA fromAttrToStr "id" as-	  , bodyClass = possibleA fromAttrToStr "class" as-	  , bodyTitle = possibleA fromAttrToStr "title" as-	  , bodyXml'lang = possibleA fromAttrToStr "xml:lang" as-	  }-    toAttrs v = catMaybes -	[ maybeToAttr toAttrFrStr "id" (bodyId v)-	, maybeToAttr toAttrFrStr "class" (bodyClass v)-	, maybeToAttr toAttrFrStr "title" (bodyTitle v)-	, maybeToAttr toAttrFrStr "xml:lang" (bodyXml'lang v)-	]-instance XmlContent Animate where-    fromElem (CElem (Elem "animate" as []):rest) =-	(Just (fromAttrs as), rest)-    fromElem (CMisc _:rest) = fromElem rest-    fromElem rest = (Nothing, rest)-    toElem as =-	[CElem (Elem "animate" (toAttrs as) [])]-instance XmlAttributes Animate where-    fromAttrs as =-	Animate-	  { animateId = possibleA fromAttrToStr "id" as-	  , animateClass = possibleA fromAttrToStr "class" as-	  , animateTitle = possibleA fromAttrToStr "title" as-	  , animateXml'lang = possibleA fromAttrToStr "xml:lang" as-	  , animateCustomTest = possibleA fromAttrToStr "customTest" as-	  , animateSystemBitrate = possibleA fromAttrToStr "systemBitrate" as-	  , animateSystemCaptions = possibleA fromAttrToTyp "systemCaptions" as-	  , animateSystemLanguage = possibleA fromAttrToStr "systemLanguage" as-	  , animateSystemOverdubOrSubtitle = possibleA fromAttrToTyp "systemOverdubOrSubtitle" as-	  , animateSystemRequired = possibleA fromAttrToStr "systemRequired" as-	  , animateSystemScreenSize = possibleA fromAttrToStr "systemScreenSize" as-	  , animateSystemScreenDepth = possibleA fromAttrToStr "systemScreenDepth" as-	  , animateSystemAudioDesc = possibleA fromAttrToTyp "systemAudioDesc" as-	  , animateSystemOperatingSystem = possibleA fromAttrToStr "systemOperatingSystem" as-	  , animateSystemCPU = possibleA fromAttrToStr "systemCPU" as-	  , animateSystemComponent = possibleA fromAttrToStr "systemComponent" as-	  , animateSystem_bitrate = possibleA fromAttrToStr "system-bitrate" as-	  , animateSystem_captions = possibleA fromAttrToTyp "system-captions" as-	  , animateSystem_language = possibleA fromAttrToStr "system-language" as-	  , animateSystem_overdub_or_caption = possibleA fromAttrToTyp "system-overdub-or-caption" as-	  , animateSystem_required = possibleA fromAttrToStr "system-required" as-	  , animateSystem_screen_size = possibleA fromAttrToStr "system-screen-size" as-	  , animateSystem_screen_depth = possibleA fromAttrToStr "system-screen-depth" as-	  , animateDur = possibleA fromAttrToStr "dur" as-	  , animateRepeatCount = possibleA fromAttrToStr "repeatCount" as-	  , animateRepeatDur = possibleA fromAttrToStr "repeatDur" as-	  , animateBegin = possibleA fromAttrToStr "begin" as-	  , animateEnd = possibleA fromAttrToStr "end" as-	  , animateAttributeName = definiteA fromAttrToStr "animate" "attributeName" as-	  , animateAttributeType = possibleA fromAttrToStr "attributeType" as-	  , animateValues = possibleA fromAttrToStr "values" as-	  , animateFrom = possibleA fromAttrToStr "from" as-	  , animateTo = possibleA fromAttrToStr "to" as-	  , animateBy = possibleA fromAttrToStr "by" as-	  , animateCalcMode = defaultA fromAttrToTyp Animate_CalcMode_Linear "calcMode" as-	  , animateAdditive = defaultA fromAttrToTyp Animate_Additive_Replace "additive" as-	  , animateAccumulate = defaultA fromAttrToTyp Animate_Accumulate_None "accumulate" as-	  }-    toAttrs v = catMaybes -	[ maybeToAttr toAttrFrStr "id" (animateId v)-	, maybeToAttr toAttrFrStr "class" (animateClass v)-	, maybeToAttr toAttrFrStr "title" (animateTitle v)-	, maybeToAttr toAttrFrStr "xml:lang" (animateXml'lang v)-	, maybeToAttr toAttrFrStr "customTest" (animateCustomTest v)-	, maybeToAttr toAttrFrStr "systemBitrate" (animateSystemBitrate v)-	, maybeToAttr toAttrFrTyp "systemCaptions" (animateSystemCaptions v)-	, maybeToAttr toAttrFrStr "systemLanguage" (animateSystemLanguage v)-	, maybeToAttr toAttrFrTyp "systemOverdubOrSubtitle" (animateSystemOverdubOrSubtitle v)-	, maybeToAttr toAttrFrStr "systemRequired" (animateSystemRequired v)-	, maybeToAttr toAttrFrStr "systemScreenSize" (animateSystemScreenSize v)-	, maybeToAttr toAttrFrStr "systemScreenDepth" (animateSystemScreenDepth v)-	, maybeToAttr toAttrFrTyp "systemAudioDesc" (animateSystemAudioDesc v)-	, maybeToAttr toAttrFrStr "systemOperatingSystem" (animateSystemOperatingSystem v)-	, maybeToAttr toAttrFrStr "systemCPU" (animateSystemCPU v)-	, maybeToAttr toAttrFrStr "systemComponent" (animateSystemComponent v)-	, maybeToAttr toAttrFrStr "system-bitrate" (animateSystem_bitrate v)-	, maybeToAttr toAttrFrTyp "system-captions" (animateSystem_captions v)-	, maybeToAttr toAttrFrStr "system-language" (animateSystem_language v)-	, maybeToAttr toAttrFrTyp "system-overdub-or-caption" (animateSystem_overdub_or_caption v)-	, maybeToAttr toAttrFrStr "system-required" (animateSystem_required v)-	, maybeToAttr toAttrFrStr "system-screen-size" (animateSystem_screen_size v)-	, maybeToAttr toAttrFrStr "system-screen-depth" (animateSystem_screen_depth v)-	, maybeToAttr toAttrFrStr "dur" (animateDur v)-	, maybeToAttr toAttrFrStr "repeatCount" (animateRepeatCount v)-	, maybeToAttr toAttrFrStr "repeatDur" (animateRepeatDur v)-	, maybeToAttr toAttrFrStr "begin" (animateBegin v)-	, maybeToAttr toAttrFrStr "end" (animateEnd v)-	, toAttrFrStr "attributeName" (animateAttributeName v)-	, maybeToAttr toAttrFrStr "attributeType" (animateAttributeType v)-	, maybeToAttr toAttrFrStr "values" (animateValues v)-	, maybeToAttr toAttrFrStr "from" (animateFrom v)-	, maybeToAttr toAttrFrStr "to" (animateTo v)-	, maybeToAttr toAttrFrStr "by" (animateBy v)-	, defaultToAttr toAttrFrTyp "calcMode" (animateCalcMode v)-	, defaultToAttr toAttrFrTyp "additive" (animateAdditive v)-	, defaultToAttr toAttrFrTyp "accumulate" (animateAccumulate v)-	]-instance XmlAttrType Animate_SystemCaptions where-    fromAttrToTyp n (n',v)-	| n==n'     = translate (attr2str v)-	| otherwise = Nothing-      where translate "on" = Just Animate_SystemCaptions_On-	    translate "off" = Just Animate_SystemCaptions_Off-	    translate _ = Nothing-    toAttrFrTyp n Animate_SystemCaptions_On = Just (n, str2attr "on")-    toAttrFrTyp n Animate_SystemCaptions_Off = Just (n, str2attr "off")-instance XmlAttrType Animate_SystemOverdubOrSubtitle where-    fromAttrToTyp n (n',v)-	| n==n'     = translate (attr2str v)-	| otherwise = Nothing-      where translate "overdub" = Just Animate_SystemOverdubOrSubtitle_Overdub-	    translate "subtitle" = Just Animate_SystemOverdubOrSubtitle_Subtitle-	    translate _ = Nothing-    toAttrFrTyp n Animate_SystemOverdubOrSubtitle_Overdub = Just (n, str2attr "overdub")-    toAttrFrTyp n Animate_SystemOverdubOrSubtitle_Subtitle = Just (n, str2attr "subtitle")-instance XmlAttrType Animate_SystemAudioDesc where-    fromAttrToTyp n (n',v)-	| n==n'     = translate (attr2str v)-	| otherwise = Nothing-      where translate "on" = Just Animate_SystemAudioDesc_On-	    translate "off" = Just Animate_SystemAudioDesc_Off-	    translate _ = Nothing-    toAttrFrTyp n Animate_SystemAudioDesc_On = Just (n, str2attr "on")-    toAttrFrTyp n Animate_SystemAudioDesc_Off = Just (n, str2attr "off")-instance XmlAttrType Animate_System_captions where-    fromAttrToTyp n (n',v)-	| n==n'     = translate (attr2str v)-	| otherwise = Nothing-      where translate "on" = Just Animate_System_captions_On-	    translate "off" = Just Animate_System_captions_Off-	    translate _ = Nothing-    toAttrFrTyp n Animate_System_captions_On = Just (n, str2attr "on")-    toAttrFrTyp n Animate_System_captions_Off = Just (n, str2attr "off")-instance XmlAttrType Animate_System_overdub_or_caption where-    fromAttrToTyp n (n',v)-	| n==n'     = translate (attr2str v)-	| otherwise = Nothing-      where translate "overdub" = Just Animate_System_overdub_or_caption_Overdub-	    translate "caption" = Just Animate_System_overdub_or_caption_Caption-	    translate _ = Nothing-    toAttrFrTyp n Animate_System_overdub_or_caption_Overdub = Just (n, str2attr "overdub")-    toAttrFrTyp n Animate_System_overdub_or_caption_Caption = Just (n, str2attr "caption")-instance XmlAttrType Animate_CalcMode where-    fromAttrToTyp n (n',v)-	| n==n'     = translate (attr2str v)-	| otherwise = Nothing-      where translate "discrete" = Just Animate_CalcMode_Discrete-	    translate "linear" = Just Animate_CalcMode_Linear-	    translate "paced" = Just Animate_CalcMode_Paced-	    translate _ = Nothing-    toAttrFrTyp n Animate_CalcMode_Discrete = Just (n, str2attr "discrete")-    toAttrFrTyp n Animate_CalcMode_Linear = Just (n, str2attr "linear")-    toAttrFrTyp n Animate_CalcMode_Paced = Just (n, str2attr "paced")-instance XmlAttrType Animate_Additive where-    fromAttrToTyp n (n',v)-	| n==n'     = translate (attr2str v)-	| otherwise = Nothing-      where translate "replace" = Just Animate_Additive_Replace-	    translate "sum" = Just Animate_Additive_Sum-	    translate _ = Nothing-    toAttrFrTyp n Animate_Additive_Replace = Just (n, str2attr "replace")-    toAttrFrTyp n Animate_Additive_Sum = Just (n, str2attr "sum")-instance XmlAttrType Animate_Accumulate where-    fromAttrToTyp n (n',v)-	| n==n'     = translate (attr2str v)-	| otherwise = Nothing-      where translate "none" = Just Animate_Accumulate_None-	    translate "sum" = Just Animate_Accumulate_Sum-	    translate _ = Nothing-    toAttrFrTyp n Animate_Accumulate_None = Just (n, str2attr "none")-    toAttrFrTyp n Animate_Accumulate_Sum = Just (n, str2attr "sum")-instance XmlContent Set where-    fromElem (CElem (Elem "set" as []):rest) =-	(Just (fromAttrs as), rest)-    fromElem (CMisc _:rest) = fromElem rest-    fromElem rest = (Nothing, rest)-    toElem as =-	[CElem (Elem "set" (toAttrs as) [])]-instance XmlAttributes Set where-    fromAttrs as =-	Set-	  { setId = possibleA fromAttrToStr "id" as-	  , setClass = possibleA fromAttrToStr "class" as-	  , setTitle = possibleA fromAttrToStr "title" as-	  , setXml'lang = possibleA fromAttrToStr "xml:lang" as-	  , setCustomTest = possibleA fromAttrToStr "customTest" as-	  , setSystemBitrate = possibleA fromAttrToStr "systemBitrate" as-	  , setSystemCaptions = possibleA fromAttrToTyp "systemCaptions" as-	  , setSystemLanguage = possibleA fromAttrToStr "systemLanguage" as-	  , setSystemOverdubOrSubtitle = possibleA fromAttrToTyp "systemOverdubOrSubtitle" as-	  , setSystemRequired = possibleA fromAttrToStr "systemRequired" as-	  , setSystemScreenSize = possibleA fromAttrToStr "systemScreenSize" as-	  , setSystemScreenDepth = possibleA fromAttrToStr "systemScreenDepth" as-	  , setSystemAudioDesc = possibleA fromAttrToTyp "systemAudioDesc" as-	  , setSystemOperatingSystem = possibleA fromAttrToStr "systemOperatingSystem" as-	  , setSystemCPU = possibleA fromAttrToStr "systemCPU" as-	  , setSystemComponent = possibleA fromAttrToStr "systemComponent" as-	  , setSystem_bitrate = possibleA fromAttrToStr "system-bitrate" as-	  , setSystem_captions = possibleA fromAttrToTyp "system-captions" as-	  , setSystem_language = possibleA fromAttrToStr "system-language" as-	  , setSystem_overdub_or_caption = possibleA fromAttrToTyp "system-overdub-or-caption" as-	  , setSystem_required = possibleA fromAttrToStr "system-required" as-	  , setSystem_screen_size = possibleA fromAttrToStr "system-screen-size" as-	  , setSystem_screen_depth = possibleA fromAttrToStr "system-screen-depth" as-	  , setDur = possibleA fromAttrToStr "dur" as-	  , setRepeatCount = possibleA fromAttrToStr "repeatCount" as-	  , setRepeatDur = possibleA fromAttrToStr "repeatDur" as-	  , setBegin = possibleA fromAttrToStr "begin" as-	  , setEnd = possibleA fromAttrToStr "end" as-	  , setAttributeName = definiteA fromAttrToStr "set" "attributeName" as-	  , setAttributeType = possibleA fromAttrToStr "attributeType" as-	  , setTo = possibleA fromAttrToStr "to" as-	  }-    toAttrs v = catMaybes -	[ maybeToAttr toAttrFrStr "id" (setId v)-	, maybeToAttr toAttrFrStr "class" (setClass v)-	, maybeToAttr toAttrFrStr "title" (setTitle v)-	, maybeToAttr toAttrFrStr "xml:lang" (setXml'lang v)-	, maybeToAttr toAttrFrStr "customTest" (setCustomTest v)-	, maybeToAttr toAttrFrStr "systemBitrate" (setSystemBitrate v)-	, maybeToAttr toAttrFrTyp "systemCaptions" (setSystemCaptions v)-	, maybeToAttr toAttrFrStr "systemLanguage" (setSystemLanguage v)-	, maybeToAttr toAttrFrTyp "systemOverdubOrSubtitle" (setSystemOverdubOrSubtitle v)-	, maybeToAttr toAttrFrStr "systemRequired" (setSystemRequired v)-	, maybeToAttr toAttrFrStr "systemScreenSize" (setSystemScreenSize v)-	, maybeToAttr toAttrFrStr "systemScreenDepth" (setSystemScreenDepth v)-	, maybeToAttr toAttrFrTyp "systemAudioDesc" (setSystemAudioDesc v)-	, maybeToAttr toAttrFrStr "systemOperatingSystem" (setSystemOperatingSystem v)-	, maybeToAttr toAttrFrStr "systemCPU" (setSystemCPU v)-	, maybeToAttr toAttrFrStr "systemComponent" (setSystemComponent v)-	, maybeToAttr toAttrFrStr "system-bitrate" (setSystem_bitrate v)-	, maybeToAttr toAttrFrTyp "system-captions" (setSystem_captions v)-	, maybeToAttr toAttrFrStr "system-language" (setSystem_language v)-	, maybeToAttr toAttrFrTyp "system-overdub-or-caption" (setSystem_overdub_or_caption v)-	, maybeToAttr toAttrFrStr "system-required" (setSystem_required v)-	, maybeToAttr toAttrFrStr "system-screen-size" (setSystem_screen_size v)-	, maybeToAttr toAttrFrStr "system-screen-depth" (setSystem_screen_depth v)-	, maybeToAttr toAttrFrStr "dur" (setDur v)-	, maybeToAttr toAttrFrStr "repeatCount" (setRepeatCount v)-	, maybeToAttr toAttrFrStr "repeatDur" (setRepeatDur v)-	, maybeToAttr toAttrFrStr "begin" (setBegin v)-	, maybeToAttr toAttrFrStr "end" (setEnd v)-	, toAttrFrStr "attributeName" (setAttributeName v)-	, maybeToAttr toAttrFrStr "attributeType" (setAttributeType v)-	, maybeToAttr toAttrFrStr "to" (setTo v)-	]-instance XmlAttrType Set_SystemCaptions where-    fromAttrToTyp n (n',v)-	| n==n'     = translate (attr2str v)-	| otherwise = Nothing-      where translate "on" = Just Set_SystemCaptions_On-	    translate "off" = Just Set_SystemCaptions_Off-	    translate _ = Nothing-    toAttrFrTyp n Set_SystemCaptions_On = Just (n, str2attr "on")-    toAttrFrTyp n Set_SystemCaptions_Off = Just (n, str2attr "off")-instance XmlAttrType Set_SystemOverdubOrSubtitle where-    fromAttrToTyp n (n',v)-	| n==n'     = translate (attr2str v)-	| otherwise = Nothing-      where translate "overdub" = Just Set_SystemOverdubOrSubtitle_Overdub-	    translate "subtitle" = Just Set_SystemOverdubOrSubtitle_Subtitle-	    translate _ = Nothing-    toAttrFrTyp n Set_SystemOverdubOrSubtitle_Overdub = Just (n, str2attr "overdub")-    toAttrFrTyp n Set_SystemOverdubOrSubtitle_Subtitle = Just (n, str2attr "subtitle")-instance XmlAttrType Set_SystemAudioDesc where-    fromAttrToTyp n (n',v)-	| n==n'     = translate (attr2str v)-	| otherwise = Nothing-      where translate "on" = Just Set_SystemAudioDesc_On-	    translate "off" = Just Set_SystemAudioDesc_Off-	    translate _ = Nothing-    toAttrFrTyp n Set_SystemAudioDesc_On = Just (n, str2attr "on")-    toAttrFrTyp n Set_SystemAudioDesc_Off = Just (n, str2attr "off")-instance XmlAttrType Set_System_captions where-    fromAttrToTyp n (n',v)-	| n==n'     = translate (attr2str v)-	| otherwise = Nothing-      where translate "on" = Just Set_System_captions_On-	    translate "off" = Just Set_System_captions_Off-	    translate _ = Nothing-    toAttrFrTyp n Set_System_captions_On = Just (n, str2attr "on")-    toAttrFrTyp n Set_System_captions_Off = Just (n, str2attr "off")-instance XmlAttrType Set_System_overdub_or_caption where-    fromAttrToTyp n (n',v)-	| n==n'     = translate (attr2str v)-	| otherwise = Nothing-      where translate "overdub" = Just Set_System_overdub_or_caption_Overdub-	    translate "caption" = Just Set_System_overdub_or_caption_Caption-	    translate _ = Nothing-    toAttrFrTyp n Set_System_overdub_or_caption_Overdub = Just (n, str2attr "overdub")-    toAttrFrTyp n Set_System_overdub_or_caption_Caption = Just (n, str2attr "caption")-instance XmlContent AnimateMotion where-    fromElem (CElem (Elem "animateMotion" as []):rest) =-	(Just (fromAttrs as), rest)-    fromElem (CMisc _:rest) = fromElem rest-    fromElem rest = (Nothing, rest)-    toElem as =-	[CElem (Elem "animateMotion" (toAttrs as) [])]-instance XmlAttributes AnimateMotion where-    fromAttrs as =-	AnimateMotion-	  { animateMotionId = possibleA fromAttrToStr "id" as-	  , animateMotionClass = possibleA fromAttrToStr "class" as-	  , animateMotionTitle = possibleA fromAttrToStr "title" as-	  , animateMotionXml'lang = possibleA fromAttrToStr "xml:lang" as-	  , animateMotionCustomTest = possibleA fromAttrToStr "customTest" as-	  , animateMotionSystemBitrate = possibleA fromAttrToStr "systemBitrate" as-	  , animateMotionSystemCaptions = possibleA fromAttrToTyp "systemCaptions" as-	  , animateMotionSystemLanguage = possibleA fromAttrToStr "systemLanguage" as-	  , animateMotionSystemOverdubOrSubtitle = possibleA fromAttrToTyp "systemOverdubOrSubtitle" as-	  , animateMotionSystemRequired = possibleA fromAttrToStr "systemRequired" as-	  , animateMotionSystemScreenSize = possibleA fromAttrToStr "systemScreenSize" as-	  , animateMotionSystemScreenDepth = possibleA fromAttrToStr "systemScreenDepth" as-	  , animateMotionSystemAudioDesc = possibleA fromAttrToTyp "systemAudioDesc" as-	  , animateMotionSystemOperatingSystem = possibleA fromAttrToStr "systemOperatingSystem" as-	  , animateMotionSystemCPU = possibleA fromAttrToStr "systemCPU" as-	  , animateMotionSystemComponent = possibleA fromAttrToStr "systemComponent" as-	  , animateMotionSystem_bitrate = possibleA fromAttrToStr "system-bitrate" as-	  , animateMotionSystem_captions = possibleA fromAttrToTyp "system-captions" as-	  , animateMotionSystem_language = possibleA fromAttrToStr "system-language" as-	  , animateMotionSystem_overdub_or_caption = possibleA fromAttrToTyp "system-overdub-or-caption" as-	  , animateMotionSystem_required = possibleA fromAttrToStr "system-required" as-	  , animateMotionSystem_screen_size = possibleA fromAttrToStr "system-screen-size" as-	  , animateMotionSystem_screen_depth = possibleA fromAttrToStr "system-screen-depth" as-	  , animateMotionDur = possibleA fromAttrToStr "dur" as-	  , animateMotionRepeatCount = possibleA fromAttrToStr "repeatCount" as-	  , animateMotionRepeatDur = possibleA fromAttrToStr "repeatDur" as-	  , animateMotionBegin = possibleA fromAttrToStr "begin" as-	  , animateMotionEnd = possibleA fromAttrToStr "end" as-	  , animateMotionValues = possibleA fromAttrToStr "values" as-	  , animateMotionFrom = possibleA fromAttrToStr "from" as-	  , animateMotionTo = possibleA fromAttrToStr "to" as-	  , animateMotionBy = possibleA fromAttrToStr "by" as-	  , animateMotionCalcMode = defaultA fromAttrToTyp AnimateMotion_CalcMode_Linear "calcMode" as-	  , animateMotionAdditive = defaultA fromAttrToTyp AnimateMotion_Additive_Replace "additive" as-	  , animateMotionAccumulate = defaultA fromAttrToTyp AnimateMotion_Accumulate_None "accumulate" as-	  , animateMotionOrigin = defaultA fromAttrToTyp AnimateMotion_Origin_Default "origin" as-	  }-    toAttrs v = catMaybes -	[ maybeToAttr toAttrFrStr "id" (animateMotionId v)-	, maybeToAttr toAttrFrStr "class" (animateMotionClass v)-	, maybeToAttr toAttrFrStr "title" (animateMotionTitle v)-	, maybeToAttr toAttrFrStr "xml:lang" (animateMotionXml'lang v)-	, maybeToAttr toAttrFrStr "customTest" (animateMotionCustomTest v)-	, maybeToAttr toAttrFrStr "systemBitrate" (animateMotionSystemBitrate v)-	, maybeToAttr toAttrFrTyp "systemCaptions" (animateMotionSystemCaptions v)-	, maybeToAttr toAttrFrStr "systemLanguage" (animateMotionSystemLanguage v)-	, maybeToAttr toAttrFrTyp "systemOverdubOrSubtitle" (animateMotionSystemOverdubOrSubtitle v)-	, maybeToAttr toAttrFrStr "systemRequired" (animateMotionSystemRequired v)-	, maybeToAttr toAttrFrStr "systemScreenSize" (animateMotionSystemScreenSize v)-	, maybeToAttr toAttrFrStr "systemScreenDepth" (animateMotionSystemScreenDepth v)-	, maybeToAttr toAttrFrTyp "systemAudioDesc" (animateMotionSystemAudioDesc v)-	, maybeToAttr toAttrFrStr "systemOperatingSystem" (animateMotionSystemOperatingSystem v)-	, maybeToAttr toAttrFrStr "systemCPU" (animateMotionSystemCPU v)-	, maybeToAttr toAttrFrStr "systemComponent" (animateMotionSystemComponent v)-	, maybeToAttr toAttrFrStr "system-bitrate" (animateMotionSystem_bitrate v)-	, maybeToAttr toAttrFrTyp "system-captions" (animateMotionSystem_captions v)-	, maybeToAttr toAttrFrStr "system-language" (animateMotionSystem_language v)-	, maybeToAttr toAttrFrTyp "system-overdub-or-caption" (animateMotionSystem_overdub_or_caption v)-	, maybeToAttr toAttrFrStr "system-required" (animateMotionSystem_required v)-	, maybeToAttr toAttrFrStr "system-screen-size" (animateMotionSystem_screen_size v)-	, maybeToAttr toAttrFrStr "system-screen-depth" (animateMotionSystem_screen_depth v)-	, maybeToAttr toAttrFrStr "dur" (animateMotionDur v)-	, maybeToAttr toAttrFrStr "repeatCount" (animateMotionRepeatCount v)-	, maybeToAttr toAttrFrStr "repeatDur" (animateMotionRepeatDur v)-	, maybeToAttr toAttrFrStr "begin" (animateMotionBegin v)-	, maybeToAttr toAttrFrStr "end" (animateMotionEnd v)-	, maybeToAttr toAttrFrStr "values" (animateMotionValues v)-	, maybeToAttr toAttrFrStr "from" (animateMotionFrom v)-	, maybeToAttr toAttrFrStr "to" (animateMotionTo v)-	, maybeToAttr toAttrFrStr "by" (animateMotionBy v)-	, defaultToAttr toAttrFrTyp "calcMode" (animateMotionCalcMode v)-	, defaultToAttr toAttrFrTyp "additive" (animateMotionAdditive v)-	, defaultToAttr toAttrFrTyp "accumulate" (animateMotionAccumulate v)-	, defaultToAttr toAttrFrTyp "origin" (animateMotionOrigin v)-	]-instance XmlAttrType AnimateMotion_SystemCaptions where-    fromAttrToTyp n (n',v)-	| n==n'     = translate (attr2str v)-	| otherwise = Nothing-      where translate "on" = Just AnimateMotion_SystemCaptions_On-	    translate "off" = Just AnimateMotion_SystemCaptions_Off-	    translate _ = Nothing-    toAttrFrTyp n AnimateMotion_SystemCaptions_On = Just (n, str2attr "on")-    toAttrFrTyp n AnimateMotion_SystemCaptions_Off = Just (n, str2attr "off")-instance XmlAttrType AnimateMotion_SystemOverdubOrSubtitle where-    fromAttrToTyp n (n',v)-	| n==n'     = translate (attr2str v)-	| otherwise = Nothing-      where translate "overdub" = Just AnimateMotion_SystemOverdubOrSubtitle_Overdub-	    translate "subtitle" = Just AnimateMotion_SystemOverdubOrSubtitle_Subtitle-	    translate _ = Nothing-    toAttrFrTyp n AnimateMotion_SystemOverdubOrSubtitle_Overdub = Just (n, str2attr "overdub")-    toAttrFrTyp n AnimateMotion_SystemOverdubOrSubtitle_Subtitle = Just (n, str2attr "subtitle")-instance XmlAttrType AnimateMotion_SystemAudioDesc where-    fromAttrToTyp n (n',v)-	| n==n'     = translate (attr2str v)-	| otherwise = Nothing-      where translate "on" = Just AnimateMotion_SystemAudioDesc_On-	    translate "off" = Just AnimateMotion_SystemAudioDesc_Off-	    translate _ = Nothing-    toAttrFrTyp n AnimateMotion_SystemAudioDesc_On = Just (n, str2attr "on")-    toAttrFrTyp n AnimateMotion_SystemAudioDesc_Off = Just (n, str2attr "off")-instance XmlAttrType AnimateMotion_System_captions where-    fromAttrToTyp n (n',v)-	| n==n'     = translate (attr2str v)-	| otherwise = Nothing-      where translate "on" = Just AnimateMotion_System_captions_On-	    translate "off" = Just AnimateMotion_System_captions_Off-	    translate _ = Nothing-    toAttrFrTyp n AnimateMotion_System_captions_On = Just (n, str2attr "on")-    toAttrFrTyp n AnimateMotion_System_captions_Off = Just (n, str2attr "off")-instance XmlAttrType AnimateMotion_System_overdub_or_caption where-    fromAttrToTyp n (n',v)-	| n==n'     = translate (attr2str v)-	| otherwise = Nothing-      where translate "overdub" = Just AnimateMotion_System_overdub_or_caption_Overdub-	    translate "caption" = Just AnimateMotion_System_overdub_or_caption_Caption-	    translate _ = Nothing-    toAttrFrTyp n AnimateMotion_System_overdub_or_caption_Overdub = Just (n, str2attr "overdub")-    toAttrFrTyp n AnimateMotion_System_overdub_or_caption_Caption = Just (n, str2attr "caption")-instance XmlAttrType AnimateMotion_CalcMode where-    fromAttrToTyp n (n',v)-	| n==n'     = translate (attr2str v)-	| otherwise = Nothing-      where translate "discrete" = Just AnimateMotion_CalcMode_Discrete-	    translate "linear" = Just AnimateMotion_CalcMode_Linear-	    translate "paced" = Just AnimateMotion_CalcMode_Paced-	    translate _ = Nothing-    toAttrFrTyp n AnimateMotion_CalcMode_Discrete = Just (n, str2attr "discrete")-    toAttrFrTyp n AnimateMotion_CalcMode_Linear = Just (n, str2attr "linear")-    toAttrFrTyp n AnimateMotion_CalcMode_Paced = Just (n, str2attr "paced")-instance XmlAttrType AnimateMotion_Additive where-    fromAttrToTyp n (n',v)-	| n==n'     = translate (attr2str v)-	| otherwise = Nothing-      where translate "replace" = Just AnimateMotion_Additive_Replace-	    translate "sum" = Just AnimateMotion_Additive_Sum-	    translate _ = Nothing-    toAttrFrTyp n AnimateMotion_Additive_Replace = Just (n, str2attr "replace")-    toAttrFrTyp n AnimateMotion_Additive_Sum = Just (n, str2attr "sum")-instance XmlAttrType AnimateMotion_Accumulate where-    fromAttrToTyp n (n',v)-	| n==n'     = translate (attr2str v)-	| otherwise = Nothing-      where translate "none" = Just AnimateMotion_Accumulate_None-	    translate "sum" = Just AnimateMotion_Accumulate_Sum-	    translate _ = Nothing-    toAttrFrTyp n AnimateMotion_Accumulate_None = Just (n, str2attr "none")-    toAttrFrTyp n AnimateMotion_Accumulate_Sum = Just (n, str2attr "sum")-instance XmlAttrType AnimateMotion_Origin where-    fromAttrToTyp n (n',v)-	| n==n'     = translate (attr2str v)-	| otherwise = Nothing-      where translate "default" = Just AnimateMotion_Origin_Default-	    translate _ = Nothing-    toAttrFrTyp n AnimateMotion_Origin_Default = Just (n, str2attr "default")-instance XmlContent AnimateColor where-    fromElem (CElem (Elem "animateColor" as []):rest) =-	(Just (fromAttrs as), rest)-    fromElem (CMisc _:rest) = fromElem rest-    fromElem rest = (Nothing, rest)-    toElem as =-	[CElem (Elem "animateColor" (toAttrs as) [])]-instance XmlAttributes AnimateColor where-    fromAttrs as =-	AnimateColor-	  { animateColorId = possibleA fromAttrToStr "id" as-	  , animateColorClass = possibleA fromAttrToStr "class" as-	  , animateColorTitle = possibleA fromAttrToStr "title" as-	  , animateColorXml'lang = possibleA fromAttrToStr "xml:lang" as-	  , animateColorCustomTest = possibleA fromAttrToStr "customTest" as-	  , animateColorSystemBitrate = possibleA fromAttrToStr "systemBitrate" as-	  , animateColorSystemCaptions = possibleA fromAttrToTyp "systemCaptions" as-	  , animateColorSystemLanguage = possibleA fromAttrToStr "systemLanguage" as-	  , animateColorSystemOverdubOrSubtitle = possibleA fromAttrToTyp "systemOverdubOrSubtitle" as-	  , animateColorSystemRequired = possibleA fromAttrToStr "systemRequired" as-	  , animateColorSystemScreenSize = possibleA fromAttrToStr "systemScreenSize" as-	  , animateColorSystemScreenDepth = possibleA fromAttrToStr "systemScreenDepth" as-	  , animateColorSystemAudioDesc = possibleA fromAttrToTyp "systemAudioDesc" as-	  , animateColorSystemOperatingSystem = possibleA fromAttrToStr "systemOperatingSystem" as-	  , animateColorSystemCPU = possibleA fromAttrToStr "systemCPU" as-	  , animateColorSystemComponent = possibleA fromAttrToStr "systemComponent" as-	  , animateColorSystem_bitrate = possibleA fromAttrToStr "system-bitrate" as-	  , animateColorSystem_captions = possibleA fromAttrToTyp "system-captions" as-	  , animateColorSystem_language = possibleA fromAttrToStr "system-language" as-	  , animateColorSystem_overdub_or_caption = possibleA fromAttrToTyp "system-overdub-or-caption" as-	  , animateColorSystem_required = possibleA fromAttrToStr "system-required" as-	  , animateColorSystem_screen_size = possibleA fromAttrToStr "system-screen-size" as-	  , animateColorSystem_screen_depth = possibleA fromAttrToStr "system-screen-depth" as-	  , animateColorDur = possibleA fromAttrToStr "dur" as-	  , animateColorRepeatCount = possibleA fromAttrToStr "repeatCount" as-	  , animateColorRepeatDur = possibleA fromAttrToStr "repeatDur" as-	  , animateColorBegin = possibleA fromAttrToStr "begin" as-	  , animateColorEnd = possibleA fromAttrToStr "end" as-	  , animateColorAttributeName = definiteA fromAttrToStr "animateColor" "attributeName" as-	  , animateColorAttributeType = possibleA fromAttrToStr "attributeType" as-	  , animateColorValues = possibleA fromAttrToStr "values" as-	  , animateColorFrom = possibleA fromAttrToStr "from" as-	  , animateColorTo = possibleA fromAttrToStr "to" as-	  , animateColorBy = possibleA fromAttrToStr "by" as-	  , animateColorCalcMode = defaultA fromAttrToTyp AnimateColor_CalcMode_Linear "calcMode" as-	  , animateColorAdditive = defaultA fromAttrToTyp AnimateColor_Additive_Replace "additive" as-	  , animateColorAccumulate = defaultA fromAttrToTyp AnimateColor_Accumulate_None "accumulate" as-	  }-    toAttrs v = catMaybes -	[ maybeToAttr toAttrFrStr "id" (animateColorId v)-	, maybeToAttr toAttrFrStr "class" (animateColorClass v)-	, maybeToAttr toAttrFrStr "title" (animateColorTitle v)-	, maybeToAttr toAttrFrStr "xml:lang" (animateColorXml'lang v)-	, maybeToAttr toAttrFrStr "customTest" (animateColorCustomTest v)-	, maybeToAttr toAttrFrStr "systemBitrate" (animateColorSystemBitrate v)-	, maybeToAttr toAttrFrTyp "systemCaptions" (animateColorSystemCaptions v)-	, maybeToAttr toAttrFrStr "systemLanguage" (animateColorSystemLanguage v)-	, maybeToAttr toAttrFrTyp "systemOverdubOrSubtitle" (animateColorSystemOverdubOrSubtitle v)-	, maybeToAttr toAttrFrStr "systemRequired" (animateColorSystemRequired v)-	, maybeToAttr toAttrFrStr "systemScreenSize" (animateColorSystemScreenSize v)-	, maybeToAttr toAttrFrStr "systemScreenDepth" (animateColorSystemScreenDepth v)-	, maybeToAttr toAttrFrTyp "systemAudioDesc" (animateColorSystemAudioDesc v)-	, maybeToAttr toAttrFrStr "systemOperatingSystem" (animateColorSystemOperatingSystem v)-	, maybeToAttr toAttrFrStr "systemCPU" (animateColorSystemCPU v)-	, maybeToAttr toAttrFrStr "systemComponent" (animateColorSystemComponent v)-	, maybeToAttr toAttrFrStr "system-bitrate" (animateColorSystem_bitrate v)-	, maybeToAttr toAttrFrTyp "system-captions" (animateColorSystem_captions v)-	, maybeToAttr toAttrFrStr "system-language" (animateColorSystem_language v)-	, maybeToAttr toAttrFrTyp "system-overdub-or-caption" (animateColorSystem_overdub_or_caption v)-	, maybeToAttr toAttrFrStr "system-required" (animateColorSystem_required v)-	, maybeToAttr toAttrFrStr "system-screen-size" (animateColorSystem_screen_size v)-	, maybeToAttr toAttrFrStr "system-screen-depth" (animateColorSystem_screen_depth v)-	, maybeToAttr toAttrFrStr "dur" (animateColorDur v)-	, maybeToAttr toAttrFrStr "repeatCount" (animateColorRepeatCount v)-	, maybeToAttr toAttrFrStr "repeatDur" (animateColorRepeatDur v)-	, maybeToAttr toAttrFrStr "begin" (animateColorBegin v)-	, maybeToAttr toAttrFrStr "end" (animateColorEnd v)-	, toAttrFrStr "attributeName" (animateColorAttributeName v)-	, maybeToAttr toAttrFrStr "attributeType" (animateColorAttributeType v)-	, maybeToAttr toAttrFrStr "values" (animateColorValues v)-	, maybeToAttr toAttrFrStr "from" (animateColorFrom v)-	, maybeToAttr toAttrFrStr "to" (animateColorTo v)-	, maybeToAttr toAttrFrStr "by" (animateColorBy v)-	, defaultToAttr toAttrFrTyp "calcMode" (animateColorCalcMode v)-	, defaultToAttr toAttrFrTyp "additive" (animateColorAdditive v)-	, defaultToAttr toAttrFrTyp "accumulate" (animateColorAccumulate v)-	]-instance XmlAttrType AnimateColor_SystemCaptions where-    fromAttrToTyp n (n',v)-	| n==n'     = translate (attr2str v)-	| otherwise = Nothing-      where translate "on" = Just AnimateColor_SystemCaptions_On-	    translate "off" = Just AnimateColor_SystemCaptions_Off-	    translate _ = Nothing-    toAttrFrTyp n AnimateColor_SystemCaptions_On = Just (n, str2attr "on")-    toAttrFrTyp n AnimateColor_SystemCaptions_Off = Just (n, str2attr "off")-instance XmlAttrType AnimateColor_SystemOverdubOrSubtitle where-    fromAttrToTyp n (n',v)-	| n==n'     = translate (attr2str v)-	| otherwise = Nothing-      where translate "overdub" = Just AnimateColor_SystemOverdubOrSubtitle_Overdub-	    translate "subtitle" = Just AnimateColor_SystemOverdubOrSubtitle_Subtitle-	    translate _ = Nothing-    toAttrFrTyp n AnimateColor_SystemOverdubOrSubtitle_Overdub = Just (n, str2attr "overdub")-    toAttrFrTyp n AnimateColor_SystemOverdubOrSubtitle_Subtitle = Just (n, str2attr "subtitle")-instance XmlAttrType AnimateColor_SystemAudioDesc where-    fromAttrToTyp n (n',v)-	| n==n'     = translate (attr2str v)-	| otherwise = Nothing-      where translate "on" = Just AnimateColor_SystemAudioDesc_On-	    translate "off" = Just AnimateColor_SystemAudioDesc_Off-	    translate _ = Nothing-    toAttrFrTyp n AnimateColor_SystemAudioDesc_On = Just (n, str2attr "on")-    toAttrFrTyp n AnimateColor_SystemAudioDesc_Off = Just (n, str2attr "off")-instance XmlAttrType AnimateColor_System_captions where-    fromAttrToTyp n (n',v)-	| n==n'     = translate (attr2str v)-	| otherwise = Nothing-      where translate "on" = Just AnimateColor_System_captions_On-	    translate "off" = Just AnimateColor_System_captions_Off-	    translate _ = Nothing-    toAttrFrTyp n AnimateColor_System_captions_On = Just (n, str2attr "on")-    toAttrFrTyp n AnimateColor_System_captions_Off = Just (n, str2attr "off")-instance XmlAttrType AnimateColor_System_overdub_or_caption where-    fromAttrToTyp n (n',v)-	| n==n'     = translate (attr2str v)-	| otherwise = Nothing-      where translate "overdub" = Just AnimateColor_System_overdub_or_caption_Overdub-	    translate "caption" = Just AnimateColor_System_overdub_or_caption_Caption-	    translate _ = Nothing-    toAttrFrTyp n AnimateColor_System_overdub_or_caption_Overdub = Just (n, str2attr "overdub")-    toAttrFrTyp n AnimateColor_System_overdub_or_caption_Caption = Just (n, str2attr "caption")-instance XmlAttrType AnimateColor_CalcMode where-    fromAttrToTyp n (n',v)-	| n==n'     = translate (attr2str v)-	| otherwise = Nothing-      where translate "discrete" = Just AnimateColor_CalcMode_Discrete-	    translate "linear" = Just AnimateColor_CalcMode_Linear-	    translate "paced" = Just AnimateColor_CalcMode_Paced-	    translate _ = Nothing-    toAttrFrTyp n AnimateColor_CalcMode_Discrete = Just (n, str2attr "discrete")-    toAttrFrTyp n AnimateColor_CalcMode_Linear = Just (n, str2attr "linear")-    toAttrFrTyp n AnimateColor_CalcMode_Paced = Just (n, str2attr "paced")-instance XmlAttrType AnimateColor_Additive where-    fromAttrToTyp n (n',v)-	| n==n'     = translate (attr2str v)-	| otherwise = Nothing-      where translate "replace" = Just AnimateColor_Additive_Replace-	    translate "sum" = Just AnimateColor_Additive_Sum-	    translate _ = Nothing-    toAttrFrTyp n AnimateColor_Additive_Replace = Just (n, str2attr "replace")-    toAttrFrTyp n AnimateColor_Additive_Sum = Just (n, str2attr "sum")-instance XmlAttrType AnimateColor_Accumulate where-    fromAttrToTyp n (n',v)-	| n==n'     = translate (attr2str v)-	| otherwise = Nothing-      where translate "none" = Just AnimateColor_Accumulate_None-	    translate "sum" = Just AnimateColor_Accumulate_Sum-	    translate _ = Nothing-    toAttrFrTyp n AnimateColor_Accumulate_None = Just (n, str2attr "none")-    toAttrFrTyp n AnimateColor_Accumulate_Sum = Just (n, str2attr "sum")-instance XmlContent Switch where-    fromElem (CElem (Elem "switch" as []):rest) =-	(Just (fromAttrs as), rest)-    fromElem (CMisc _:rest) = fromElem rest-    fromElem rest = (Nothing, rest)-    toElem as =-	[CElem (Elem "switch" (toAttrs as) [])]-instance XmlAttributes Switch where-    fromAttrs as =-	Switch-	  { switchId = possibleA fromAttrToStr "id" as-	  , switchClass = possibleA fromAttrToStr "class" as-	  , switchTitle = possibleA fromAttrToStr "title" as-	  , switchXml'lang = possibleA fromAttrToStr "xml:lang" as-	  }-    toAttrs v = catMaybes -	[ maybeToAttr toAttrFrStr "id" (switchId v)-	, maybeToAttr toAttrFrStr "class" (switchClass v)-	, maybeToAttr toAttrFrStr "title" (switchTitle v)-	, maybeToAttr toAttrFrStr "xml:lang" (switchXml'lang v)-	]-instance XmlContent Meta where-    fromElem (CElem (Elem "meta" as []):rest) =-	(Just (fromAttrs as), rest)-    fromElem (CMisc _:rest) = fromElem rest-    fromElem rest = (Nothing, rest)-    toElem as =-	[CElem (Elem "meta" (toAttrs as) [])]-instance XmlAttributes Meta where-    fromAttrs as =-	Meta-	  { metaContent = possibleA fromAttrToStr "content" as-	  , metaName = definiteA fromAttrToStr "meta" "name" as-	  }-    toAttrs v = catMaybes -	[ maybeToAttr toAttrFrStr "content" (metaContent v)-	, toAttrFrStr "name" (metaName v)-	]-instance XmlContent Metadata where-    fromElem (CElem (Elem "metadata" as []):rest) =-	(Just (fromAttrs as), rest)-    fromElem (CMisc _:rest) = fromElem rest-    fromElem rest = (Nothing, rest)-    toElem as =-	[CElem (Elem "metadata" (toAttrs as) [])]-instance XmlAttributes Metadata where-    fromAttrs as =-	Metadata-	  { metadataId = possibleA fromAttrToStr "id" as-	  , metadataClass = possibleA fromAttrToStr "class" as-	  , metadataTitle = possibleA fromAttrToStr "title" as-	  , metadataXml'lang = possibleA fromAttrToStr "xml:lang" as-	  }-    toAttrs v = catMaybes -	[ maybeToAttr toAttrFrStr "id" (metadataId v)-	, maybeToAttr toAttrFrStr "class" (metadataClass v)-	, maybeToAttr toAttrFrStr "title" (metadataTitle v)-	, maybeToAttr toAttrFrStr "xml:lang" (metadataXml'lang v)-	]-instance XmlContent Layout where-    fromElem (CElem (Elem "layout" as []):rest) =-	(Just (fromAttrs as), rest)-    fromElem (CMisc _:rest) = fromElem rest-    fromElem rest = (Nothing, rest)-    toElem as =-	[CElem (Elem "layout" (toAttrs as) [])]-instance XmlAttributes Layout where-    fromAttrs as =-	Layout-	  { layoutId = possibleA fromAttrToStr "id" as-	  , layoutClass = possibleA fromAttrToStr "class" as-	  , layoutTitle = possibleA fromAttrToStr "title" as-	  , layoutXml'lang = possibleA fromAttrToStr "xml:lang" as-	  , layoutType = defaultA fromAttrToStr "text/smil-basic-layout" "type" as-	  }-    toAttrs v = catMaybes -	[ maybeToAttr toAttrFrStr "id" (layoutId v)-	, maybeToAttr toAttrFrStr "class" (layoutClass v)-	, maybeToAttr toAttrFrStr "title" (layoutTitle v)-	, maybeToAttr toAttrFrStr "xml:lang" (layoutXml'lang v)-	, defaultToAttr toAttrFrStr "type" (layoutType v)-	]-instance XmlContent Region where-    fromElem (CElem (Elem "region" as []):rest) =-	(Just (fromAttrs as), rest)-    fromElem (CMisc _:rest) = fromElem rest-    fromElem rest = (Nothing, rest)-    toElem as =-	[CElem (Elem "region" (toAttrs as) [])]-instance XmlAttributes Region where-    fromAttrs as =-	Region-	  { regionId = possibleA fromAttrToStr "id" as-	  , regionClass = possibleA fromAttrToStr "class" as-	  , regionTitle = possibleA fromAttrToStr "title" as-	  , regionXml'lang = possibleA fromAttrToStr "xml:lang" as-	  , regionHeight = defaultA fromAttrToStr "auto" "height" as-	  , regionWidth = defaultA fromAttrToStr "auto" "width" as-	  , regionClose = defaultA fromAttrToTyp Region_Close_Never "close" as-	  , regionOpen = defaultA fromAttrToTyp Region_Open_Always "open" as-	  , regionBackgroundColor = possibleA fromAttrToStr "backgroundColor" as-	  , regionBackground_color = possibleA fromAttrToStr "background-color" as-	  , regionBottom = defaultA fromAttrToStr "auto" "bottom" as-	  , regionLeft = defaultA fromAttrToStr "auto" "left" as-	  , regionRight = defaultA fromAttrToStr "auto" "right" as-	  , regionTop = defaultA fromAttrToStr "auto" "top" as-	  , regionZ_index = possibleA fromAttrToStr "z-index" as-	  , regionShowBackground = defaultA fromAttrToTyp Region_ShowBackground_Always "showBackground" as-	  , regionFit = defaultA fromAttrToTyp Region_Fit_Hidden "fit" as-	  }-    toAttrs v = catMaybes -	[ maybeToAttr toAttrFrStr "id" (regionId v)-	, maybeToAttr toAttrFrStr "class" (regionClass v)-	, maybeToAttr toAttrFrStr "title" (regionTitle v)-	, maybeToAttr toAttrFrStr "xml:lang" (regionXml'lang v)-	, defaultToAttr toAttrFrStr "height" (regionHeight v)-	, defaultToAttr toAttrFrStr "width" (regionWidth v)-	, defaultToAttr toAttrFrTyp "close" (regionClose v)-	, defaultToAttr toAttrFrTyp "open" (regionOpen v)-	, maybeToAttr toAttrFrStr "backgroundColor" (regionBackgroundColor v)-	, maybeToAttr toAttrFrStr "background-color" (regionBackground_color v)-	, defaultToAttr toAttrFrStr "bottom" (regionBottom v)-	, defaultToAttr toAttrFrStr "left" (regionLeft v)-	, defaultToAttr toAttrFrStr "right" (regionRight v)-	, defaultToAttr toAttrFrStr "top" (regionTop v)-	, maybeToAttr toAttrFrStr "z-index" (regionZ_index v)-	, defaultToAttr toAttrFrTyp "showBackground" (regionShowBackground v)-	, defaultToAttr toAttrFrTyp "fit" (regionFit v)-	]-instance XmlAttrType Region_Close where-    fromAttrToTyp n (n',v)-	| n==n'     = translate (attr2str v)-	| otherwise = Nothing-      where translate "never" = Just Region_Close_Never-	    translate "whenNotActive" = Just Region_Close_WhenNotActive-	    translate _ = Nothing-    toAttrFrTyp n Region_Close_Never = Just (n, str2attr "never")-    toAttrFrTyp n Region_Close_WhenNotActive = Just (n, str2attr "whenNotActive")-instance XmlAttrType Region_Open where-    fromAttrToTyp n (n',v)-	| n==n'     = translate (attr2str v)-	| otherwise = Nothing-      where translate "always" = Just Region_Open_Always-	    translate "whenActive" = Just Region_Open_WhenActive-	    translate _ = Nothing-    toAttrFrTyp n Region_Open_Always = Just (n, str2attr "always")-    toAttrFrTyp n Region_Open_WhenActive = Just (n, str2attr "whenActive")-instance XmlAttrType Region_ShowBackground where-    fromAttrToTyp n (n',v)-	| n==n'     = translate (attr2str v)-	| otherwise = Nothing-      where translate "always" = Just Region_ShowBackground_Always-	    translate "whenActive" = Just Region_ShowBackground_WhenActive-	    translate _ = Nothing-    toAttrFrTyp n Region_ShowBackground_Always = Just (n, str2attr "always")-    toAttrFrTyp n Region_ShowBackground_WhenActive = Just (n, str2attr "whenActive")-instance XmlAttrType Region_Fit where-    fromAttrToTyp n (n',v)-	| n==n'     = translate (attr2str v)-	| otherwise = Nothing-      where translate "hidden" = Just Region_Fit_Hidden-	    translate "fill" = Just Region_Fit_Fill-	    translate "meet" = Just Region_Fit_Meet-	    translate "scroll" = Just Region_Fit_Scroll-	    translate "slice" = Just Region_Fit_Slice-	    translate _ = Nothing-    toAttrFrTyp n Region_Fit_Hidden = Just (n, str2attr "hidden")-    toAttrFrTyp n Region_Fit_Fill = Just (n, str2attr "fill")-    toAttrFrTyp n Region_Fit_Meet = Just (n, str2attr "meet")-    toAttrFrTyp n Region_Fit_Scroll = Just (n, str2attr "scroll")-    toAttrFrTyp n Region_Fit_Slice = Just (n, str2attr "slice")-instance XmlContent Root_layout where-    fromElem (CElem (Elem "root-layout" as []):rest) =-	(Just (fromAttrs as), rest)-    fromElem (CMisc _:rest) = fromElem rest-    fromElem rest = (Nothing, rest)-    toElem as =-	[CElem (Elem "root-layout" (toAttrs as) [])]-instance XmlAttributes Root_layout where-    fromAttrs as =-	Root_layout-	  { root_layoutId = possibleA fromAttrToStr "id" as-	  , root_layoutClass = possibleA fromAttrToStr "class" as-	  , root_layoutTitle = possibleA fromAttrToStr "title" as-	  , root_layoutXml'lang = possibleA fromAttrToStr "xml:lang" as-	  , root_layoutHeight = defaultA fromAttrToStr "auto" "height" as-	  , root_layoutWidth = defaultA fromAttrToStr "auto" "width" as-	  , root_layoutClose = defaultA fromAttrToTyp Root_layout_Close_Never "close" as-	  , root_layoutOpen = defaultA fromAttrToTyp Root_layout_Open_Always "open" as-	  , root_layoutBackgroundColor = possibleA fromAttrToStr "backgroundColor" as-	  , root_layoutBackground_color = possibleA fromAttrToStr "background-color" as-	  }-    toAttrs v = catMaybes -	[ maybeToAttr toAttrFrStr "id" (root_layoutId v)-	, maybeToAttr toAttrFrStr "class" (root_layoutClass v)-	, maybeToAttr toAttrFrStr "title" (root_layoutTitle v)-	, maybeToAttr toAttrFrStr "xml:lang" (root_layoutXml'lang v)-	, defaultToAttr toAttrFrStr "height" (root_layoutHeight v)-	, defaultToAttr toAttrFrStr "width" (root_layoutWidth v)-	, defaultToAttr toAttrFrTyp "close" (root_layoutClose v)-	, defaultToAttr toAttrFrTyp "open" (root_layoutOpen v)-	, maybeToAttr toAttrFrStr "backgroundColor" (root_layoutBackgroundColor v)-	, maybeToAttr toAttrFrStr "background-color" (root_layoutBackground_color v)-	]-instance XmlAttrType Root_layout_Close where-    fromAttrToTyp n (n',v)-	| n==n'     = translate (attr2str v)-	| otherwise = Nothing-      where translate "never" = Just Root_layout_Close_Never-	    translate "whenNotActive" = Just Root_layout_Close_WhenNotActive-	    translate _ = Nothing-    toAttrFrTyp n Root_layout_Close_Never = Just (n, str2attr "never")-    toAttrFrTyp n Root_layout_Close_WhenNotActive = Just (n, str2attr "whenNotActive")-instance XmlAttrType Root_layout_Open where-    fromAttrToTyp n (n',v)-	| n==n'     = translate (attr2str v)-	| otherwise = Nothing-      where translate "always" = Just Root_layout_Open_Always-	    translate "whenActive" = Just Root_layout_Open_WhenActive-	    translate _ = Nothing-    toAttrFrTyp n Root_layout_Open_Always = Just (n, str2attr "always")-    toAttrFrTyp n Root_layout_Open_WhenActive = Just (n, str2attr "whenActive")-instance XmlContent Ref where-    fromElem (CElem (Elem "ref" as []):rest) =-	(Just (fromAttrs as), rest)-    fromElem (CMisc _:rest) = fromElem rest-    fromElem rest = (Nothing, rest)-    toElem as =-	[CElem (Elem "ref" (toAttrs as) [])]-instance XmlAttributes Ref where-    fromAttrs as =-	Ref-	  { refId = possibleA fromAttrToStr "id" as-	  , refClass = possibleA fromAttrToStr "class" as-	  , refTitle = possibleA fromAttrToStr "title" as-	  , refXml'lang = possibleA fromAttrToStr "xml:lang" as-	  }-    toAttrs v = catMaybes -	[ maybeToAttr toAttrFrStr "id" (refId v)-	, maybeToAttr toAttrFrStr "class" (refClass v)-	, maybeToAttr toAttrFrStr "title" (refTitle v)-	, maybeToAttr toAttrFrStr "xml:lang" (refXml'lang v)-	]-instance XmlContent Audio where-    fromElem (CElem (Elem "audio" as []):rest) =-	(Just (fromAttrs as), rest)-    fromElem (CMisc _:rest) = fromElem rest-    fromElem rest = (Nothing, rest)-    toElem as =-	[CElem (Elem "audio" (toAttrs as) [])]-instance XmlAttributes Audio where-    fromAttrs as =-	Audio-	  { audioId = possibleA fromAttrToStr "id" as-	  , audioClass = possibleA fromAttrToStr "class" as-	  , audioTitle = possibleA fromAttrToStr "title" as-	  , audioXml'lang = possibleA fromAttrToStr "xml:lang" as-	  }-    toAttrs v = catMaybes -	[ maybeToAttr toAttrFrStr "id" (audioId v)-	, maybeToAttr toAttrFrStr "class" (audioClass v)-	, maybeToAttr toAttrFrStr "title" (audioTitle v)-	, maybeToAttr toAttrFrStr "xml:lang" (audioXml'lang v)-	]-instance XmlContent Img where-    fromElem (CElem (Elem "img" as []):rest) =-	(Just (fromAttrs as), rest)-    fromElem (CMisc _:rest) = fromElem rest-    fromElem rest = (Nothing, rest)-    toElem as =-	[CElem (Elem "img" (toAttrs as) [])]-instance XmlAttributes Img where-    fromAttrs as =-	Img-	  { imgId = possibleA fromAttrToStr "id" as-	  , imgClass = possibleA fromAttrToStr "class" as-	  , imgTitle = possibleA fromAttrToStr "title" as-	  , imgXml'lang = possibleA fromAttrToStr "xml:lang" as-	  }-    toAttrs v = catMaybes -	[ maybeToAttr toAttrFrStr "id" (imgId v)-	, maybeToAttr toAttrFrStr "class" (imgClass v)-	, maybeToAttr toAttrFrStr "title" (imgTitle v)-	, maybeToAttr toAttrFrStr "xml:lang" (imgXml'lang v)-	]-instance XmlContent Video where-    fromElem (CElem (Elem "video" as []):rest) =-	(Just (fromAttrs as), rest)-    fromElem (CMisc _:rest) = fromElem rest-    fromElem rest = (Nothing, rest)-    toElem as =-	[CElem (Elem "video" (toAttrs as) [])]-instance XmlAttributes Video where-    fromAttrs as =-	Video-	  { videoId = possibleA fromAttrToStr "id" as-	  , videoClass = possibleA fromAttrToStr "class" as-	  , videoTitle = possibleA fromAttrToStr "title" as-	  , videoXml'lang = possibleA fromAttrToStr "xml:lang" as-	  }-    toAttrs v = catMaybes -	[ maybeToAttr toAttrFrStr "id" (videoId v)-	, maybeToAttr toAttrFrStr "class" (videoClass v)-	, maybeToAttr toAttrFrStr "title" (videoTitle v)-	, maybeToAttr toAttrFrStr "xml:lang" (videoXml'lang v)-	]-instance XmlContent Text where-    fromElem (CElem (Elem "text" as []):rest) =-	(Just (fromAttrs as), rest)-    fromElem (CMisc _:rest) = fromElem rest-    fromElem rest = (Nothing, rest)-    toElem as =-	[CElem (Elem "text" (toAttrs as) [])]-instance XmlAttributes Text where-    fromAttrs as =-	Text-	  { textId = possibleA fromAttrToStr "id" as-	  , textClass = possibleA fromAttrToStr "class" as-	  , textTitle = possibleA fromAttrToStr "title" as-	  , textXml'lang = possibleA fromAttrToStr "xml:lang" as-	  }-    toAttrs v = catMaybes -	[ maybeToAttr toAttrFrStr "id" (textId v)-	, maybeToAttr toAttrFrStr "class" (textClass v)-	, maybeToAttr toAttrFrStr "title" (textTitle v)-	, maybeToAttr toAttrFrStr "xml:lang" (textXml'lang v)-	]-instance XmlContent Textstream where-    fromElem (CElem (Elem "textstream" as []):rest) =-	(Just (fromAttrs as), rest)-    fromElem (CMisc _:rest) = fromElem rest-    fromElem rest = (Nothing, rest)-    toElem as =-	[CElem (Elem "textstream" (toAttrs as) [])]-instance XmlAttributes Textstream where-    fromAttrs as =-	Textstream-	  { textstreamId = possibleA fromAttrToStr "id" as-	  , textstreamClass = possibleA fromAttrToStr "class" as-	  , textstreamTitle = possibleA fromAttrToStr "title" as-	  , textstreamXml'lang = possibleA fromAttrToStr "xml:lang" as-	  }-    toAttrs v = catMaybes -	[ maybeToAttr toAttrFrStr "id" (textstreamId v)-	, maybeToAttr toAttrFrStr "class" (textstreamClass v)-	, maybeToAttr toAttrFrStr "title" (textstreamTitle v)-	, maybeToAttr toAttrFrStr "xml:lang" (textstreamXml'lang v)-	]-instance XmlContent Animation where-    fromElem (CElem (Elem "animation" as []):rest) =-	(Just (fromAttrs as), rest)-    fromElem (CMisc _:rest) = fromElem rest-    fromElem rest = (Nothing, rest)-    toElem as =-	[CElem (Elem "animation" (toAttrs as) [])]-instance XmlAttributes Animation where-    fromAttrs as =-	Animation-	  { animationId = possibleA fromAttrToStr "id" as-	  , animationClass = possibleA fromAttrToStr "class" as-	  , animationTitle = possibleA fromAttrToStr "title" as-	  , animationXml'lang = possibleA fromAttrToStr "xml:lang" as-	  }-    toAttrs v = catMaybes -	[ maybeToAttr toAttrFrStr "id" (animationId v)-	, maybeToAttr toAttrFrStr "class" (animationClass v)-	, maybeToAttr toAttrFrStr "title" (animationTitle v)-	, maybeToAttr toAttrFrStr "xml:lang" (animationXml'lang v)-	]-instance XmlContent Transition where-    fromElem (CElem (Elem "transition" as []):rest) =-	(Just (fromAttrs as), rest)-    fromElem (CMisc _:rest) = fromElem rest-    fromElem rest = (Nothing, rest)-    toElem as =-	[CElem (Elem "transition" (toAttrs as) [])]-instance XmlAttributes Transition where-    fromAttrs as =-	Transition-	  { transitionId = possibleA fromAttrToStr "id" as-	  , transitionClass = possibleA fromAttrToStr "class" as-	  , transitionTitle = possibleA fromAttrToStr "title" as-	  , transitionXml'lang = possibleA fromAttrToStr "xml:lang" as-	  , transitionType = possibleA fromAttrToTyp "type" as-	  , transitionSubtype = possibleA fromAttrToTyp "subtype" as-	  , transitionHorzRepeat = defaultA fromAttrToStr "0" "horzRepeat" as-	  , transitionVertRepeat = defaultA fromAttrToStr "0" "vertRepeat" as-	  , transitionBorderWidth = defaultA fromAttrToStr "0" "borderWidth" as-	  , transitionBorderColor = defaultA fromAttrToStr "black" "borderColor" as-	  , transitionFadeColor = defaultA fromAttrToStr "black" "fadeColor" as-	  , transitionCoordinated = defaultA fromAttrToTyp Transition_Coordinated_False "coordinated" as-	  , transitionClibBoundary = defaultA fromAttrToTyp Transition_ClibBoundary_Children "clibBoundary" as-	  , transitionDur = possibleA fromAttrToStr "dur" as-	  , transitionStartProgress = defaultA fromAttrToStr "0.0" "startProgress" as-	  , transitionEndProgress = defaultA fromAttrToStr "1.0" "endProgress" as-	  , transitionDirection = defaultA fromAttrToTyp Transition_Direction_Forward "direction" as-	  }-    toAttrs v = catMaybes -	[ maybeToAttr toAttrFrStr "id" (transitionId v)-	, maybeToAttr toAttrFrStr "class" (transitionClass v)-	, maybeToAttr toAttrFrStr "title" (transitionTitle v)-	, maybeToAttr toAttrFrStr "xml:lang" (transitionXml'lang v)-	, maybeToAttr toAttrFrTyp "type" (transitionType v)-	, maybeToAttr toAttrFrTyp "subtype" (transitionSubtype v)-	, defaultToAttr toAttrFrStr "horzRepeat" (transitionHorzRepeat v)-	, defaultToAttr toAttrFrStr "vertRepeat" (transitionVertRepeat v)-	, defaultToAttr toAttrFrStr "borderWidth" (transitionBorderWidth v)-	, defaultToAttr toAttrFrStr "borderColor" (transitionBorderColor v)-	, defaultToAttr toAttrFrStr "fadeColor" (transitionFadeColor v)-	, defaultToAttr toAttrFrTyp "coordinated" (transitionCoordinated v)-	, defaultToAttr toAttrFrTyp "clibBoundary" (transitionClibBoundary v)-	, maybeToAttr toAttrFrStr "dur" (transitionDur v)-	, defaultToAttr toAttrFrStr "startProgress" (transitionStartProgress v)-	, defaultToAttr toAttrFrStr "endProgress" (transitionEndProgress v)-	, defaultToAttr toAttrFrTyp "direction" (transitionDirection v)-	]-instance XmlAttrType Transition_Type where-    fromAttrToTyp n (n',v)-	| n==n'     = translate (attr2str v)-	| otherwise = Nothing-      where translate "barWipe" = Just Transition_Type_BarWipe-	    translate "boxWipe" = Just Transition_Type_BoxWipe-	    translate "fourBoxWipe" = Just Transition_Type_FourBoxWipe-	    translate "barnDoorWipe" = Just Transition_Type_BarnDoorWipe-	    translate "diagonalWipe" = Just Transition_Type_DiagonalWipe-	    translate "bowTieWipe" = Just Transition_Type_BowTieWipe-	    translate "miscDiagonalWipe" = Just Transition_Type_MiscDiagonalWipe-	    translate "veeWipe" = Just Transition_Type_VeeWipe-	    translate "barnVeeWipe" = Just Transition_Type_BarnVeeWipe-	    translate "zigZagWipe" = Just Transition_Type_ZigZagWipe-	    translate "barnZigZagWipe" = Just Transition_Type_BarnZigZagWipe-	    translate "miscShapeWipe" = Just Transition_Type_MiscShapeWipe-	    translate "triangleWipe" = Just Transition_Type_TriangleWipe-	    translate "arrowHeadWipe" = Just Transition_Type_ArrowHeadWipe-	    translate "pentagonWipe" = Just Transition_Type_PentagonWipe-	    translate "hexagonWipe" = Just Transition_Type_HexagonWipe-	    translate "ellipseWipe" = Just Transition_Type_EllipseWipe-	    translate "eyeWipe" = Just Transition_Type_EyeWipe-	    translate "roundRectWipe" = Just Transition_Type_RoundRectWipe-	    translate "starWipe" = Just Transition_Type_StarWipe-	    translate "clockWipe" = Just Transition_Type_ClockWipe-	    translate "pinWheelWipe" = Just Transition_Type_PinWheelWipe-	    translate "singleSweepWipe" = Just Transition_Type_SingleSweepWipe-	    translate "fanWipe" = Just Transition_Type_FanWipe-	    translate "doubleFanWipe" = Just Transition_Type_DoubleFanWipe-	    translate "doubleSweepWipe" = Just Transition_Type_DoubleSweepWipe-	    translate "saloonDoorWipe" = Just Transition_Type_SaloonDoorWipe-	    translate "windshieldWipe" = Just Transition_Type_WindshieldWipe-	    translate "snakeWipe" = Just Transition_Type_SnakeWipe-	    translate "spiralWipe" = Just Transition_Type_SpiralWipe-	    translate "parallelSnakesWipe" = Just Transition_Type_ParallelSnakesWipe-	    translate "boxSnakesWipe" = Just Transition_Type_BoxSnakesWipe-	    translate "waterfallWipe" = Just Transition_Type_WaterfallWipe-	    translate "pushWipe" = Just Transition_Type_PushWipe-	    translate "slideWipe" = Just Transition_Type_SlideWipe-	    translate "fade" = Just Transition_Type_Fade-	    translate _ = Nothing-    toAttrFrTyp n Transition_Type_BarWipe = Just (n, str2attr "barWipe")-    toAttrFrTyp n Transition_Type_BoxWipe = Just (n, str2attr "boxWipe")-    toAttrFrTyp n Transition_Type_FourBoxWipe = Just (n, str2attr "fourBoxWipe")-    toAttrFrTyp n Transition_Type_BarnDoorWipe = Just (n, str2attr "barnDoorWipe")-    toAttrFrTyp n Transition_Type_DiagonalWipe = Just (n, str2attr "diagonalWipe")-    toAttrFrTyp n Transition_Type_BowTieWipe = Just (n, str2attr "bowTieWipe")-    toAttrFrTyp n Transition_Type_MiscDiagonalWipe = Just (n, str2attr "miscDiagonalWipe")-    toAttrFrTyp n Transition_Type_VeeWipe = Just (n, str2attr "veeWipe")-    toAttrFrTyp n Transition_Type_BarnVeeWipe = Just (n, str2attr "barnVeeWipe")-    toAttrFrTyp n Transition_Type_ZigZagWipe = Just (n, str2attr "zigZagWipe")-    toAttrFrTyp n Transition_Type_BarnZigZagWipe = Just (n, str2attr "barnZigZagWipe")-    toAttrFrTyp n Transition_Type_MiscShapeWipe = Just (n, str2attr "miscShapeWipe")-    toAttrFrTyp n Transition_Type_TriangleWipe = Just (n, str2attr "triangleWipe")-    toAttrFrTyp n Transition_Type_ArrowHeadWipe = Just (n, str2attr "arrowHeadWipe")-    toAttrFrTyp n Transition_Type_PentagonWipe = Just (n, str2attr "pentagonWipe")-    toAttrFrTyp n Transition_Type_HexagonWipe = Just (n, str2attr "hexagonWipe")-    toAttrFrTyp n Transition_Type_EllipseWipe = Just (n, str2attr "ellipseWipe")-    toAttrFrTyp n Transition_Type_EyeWipe = Just (n, str2attr "eyeWipe")-    toAttrFrTyp n Transition_Type_RoundRectWipe = Just (n, str2attr "roundRectWipe")-    toAttrFrTyp n Transition_Type_StarWipe = Just (n, str2attr "starWipe")-    toAttrFrTyp n Transition_Type_ClockWipe = Just (n, str2attr "clockWipe")-    toAttrFrTyp n Transition_Type_PinWheelWipe = Just (n, str2attr "pinWheelWipe")-    toAttrFrTyp n Transition_Type_SingleSweepWipe = Just (n, str2attr "singleSweepWipe")-    toAttrFrTyp n Transition_Type_FanWipe = Just (n, str2attr "fanWipe")-    toAttrFrTyp n Transition_Type_DoubleFanWipe = Just (n, str2attr "doubleFanWipe")-    toAttrFrTyp n Transition_Type_DoubleSweepWipe = Just (n, str2attr "doubleSweepWipe")-    toAttrFrTyp n Transition_Type_SaloonDoorWipe = Just (n, str2attr "saloonDoorWipe")-    toAttrFrTyp n Transition_Type_WindshieldWipe = Just (n, str2attr "windshieldWipe")-    toAttrFrTyp n Transition_Type_SnakeWipe = Just (n, str2attr "snakeWipe")-    toAttrFrTyp n Transition_Type_SpiralWipe = Just (n, str2attr "spiralWipe")-    toAttrFrTyp n Transition_Type_ParallelSnakesWipe = Just (n, str2attr "parallelSnakesWipe")-    toAttrFrTyp n Transition_Type_BoxSnakesWipe = Just (n, str2attr "boxSnakesWipe")-    toAttrFrTyp n Transition_Type_WaterfallWipe = Just (n, str2attr "waterfallWipe")-    toAttrFrTyp n Transition_Type_PushWipe = Just (n, str2attr "pushWipe")-    toAttrFrTyp n Transition_Type_SlideWipe = Just (n, str2attr "slideWipe")-    toAttrFrTyp n Transition_Type_Fade = Just (n, str2attr "fade")-instance XmlAttrType Transition_Subtype where-    fromAttrToTyp n (n',v)-	| n==n'     = translate (attr2str v)-	| otherwise = Nothing-      where translate "bottom" = Just Transition_Subtype_Bottom-	    translate "bottomCenter" = Just Transition_Subtype_BottomCenter-	    translate "bottomLeft" = Just Transition_Subtype_BottomLeft-	    translate "bottomLeftClockwise" = Just Transition_Subtype_BottomLeftClockwise-	    translate "bottomLeftCounterClockwise" = Just Transition_Subtype_BottomLeftCounterClockwise-	    translate "bottomLeftDiagonal" = Just Transition_Subtype_BottomLeftDiagonal-	    translate "bottomRight" = Just Transition_Subtype_BottomRight-	    translate "bottomRightClockwise" = Just Transition_Subtype_BottomRightClockwise-	    translate "bottomRightCounterClockwise" = Just Transition_Subtype_BottomRightCounterClockwise-	    translate "bottomRightDiagonal" = Just Transition_Subtype_BottomRightDiagonal-	    translate "centerRight" = Just Transition_Subtype_CenterRight-	    translate "centerTop" = Just Transition_Subtype_CenterTop-	    translate "circle" = Just Transition_Subtype_Circle-	    translate "clockwiseBottom" = Just Transition_Subtype_ClockwiseBottom-	    translate "clockwiseBottomRight" = Just Transition_Subtype_ClockwiseBottomRight-	    translate "clockwiseLeft" = Just Transition_Subtype_ClockwiseLeft-	    translate "clockwiseNine" = Just Transition_Subtype_ClockwiseNine-	    translate "clockwiseRight" = Just Transition_Subtype_ClockwiseRight-	    translate "clockwiseSix" = Just Transition_Subtype_ClockwiseSix-	    translate "clockwiseThree" = Just Transition_Subtype_ClockwiseThree-	    translate "clockwiseTop" = Just Transition_Subtype_ClockwiseTop-	    translate "clockwiseTopLeft" = Just Transition_Subtype_ClockwiseTopLeft-	    translate "clockwiseTwelve" = Just Transition_Subtype_ClockwiseTwelve-	    translate "cornersIn" = Just Transition_Subtype_CornersIn-	    translate "cornersOut" = Just Transition_Subtype_CornersOut-	    translate "counterClockwiseBottomLeft" = Just Transition_Subtype_CounterClockwiseBottomLeft-	    translate "counterClockwiseTopRight" = Just Transition_Subtype_CounterClockwiseTopRight-	    translate "crossfade" = Just Transition_Subtype_Crossfade-	    translate "diagonalBottomLeft" = Just Transition_Subtype_DiagonalBottomLeft-	    translate "diagonalBottomLeftOpposite" = Just Transition_Subtype_DiagonalBottomLeftOpposite-	    translate "diagonalTopLeft" = Just Transition_Subtype_DiagonalTopLeft-	    translate "diagonalTopLeftOpposite" = Just Transition_Subtype_DiagonalTopLeftOpposite-	    translate "diamond" = Just Transition_Subtype_Diamond-	    translate "doubleBarnDoor" = Just Transition_Subtype_DoubleBarnDoor-	    translate "doubleDiamond" = Just Transition_Subtype_DoubleDiamond-	    translate "down" = Just Transition_Subtype_Down-	    translate "fadeFromColor" = Just Transition_Subtype_FadeFromColor-	    translate "fadeToColor" = Just Transition_Subtype_FadeToColor-	    translate "fanInHorizontal" = Just Transition_Subtype_FanInHorizontal-	    translate "fanInVertical" = Just Transition_Subtype_FanInVertical-	    translate "fanOutHorizontal" = Just Transition_Subtype_FanOutHorizontal-	    translate "fanOutVertical" = Just Transition_Subtype_FanOutVertical-	    translate "fivePoint" = Just Transition_Subtype_FivePoint-	    translate "fourBlade" = Just Transition_Subtype_FourBlade-	    translate "fourBoxHorizontal" = Just Transition_Subtype_FourBoxHorizontal-	    translate "fourBoxVertical" = Just Transition_Subtype_FourBoxVertical-	    translate "fourPoint" = Just Transition_Subtype_FourPoint-	    translate "fromBottom" = Just Transition_Subtype_FromBottom-	    translate "fromLeft" = Just Transition_Subtype_FromLeft-	    translate "fromRight" = Just Transition_Subtype_FromRight-	    translate "fromTop" = Just Transition_Subtype_FromTop-	    translate "heart" = Just Transition_Subtype_Heart-	    translate "horizontal" = Just Transition_Subtype_Horizontal-	    translate "horizontalLeft" = Just Transition_Subtype_HorizontalLeft-	    translate "horizontalLeftSame" = Just Transition_Subtype_HorizontalLeftSame-	    translate "horizontalRight" = Just Transition_Subtype_HorizontalRight-	    translate "horizontalRightSame" = Just Transition_Subtype_HorizontalRightSame-	    translate "horizontalTopLeftOpposite" = Just Transition_Subtype_HorizontalTopLeftOpposite-	    translate "horizontalTopRightOpposite" = Just Transition_Subtype_HorizontalTopRightOpposite-	    translate "keyhole" = Just Transition_Subtype_Keyhole-	    translate "left" = Just Transition_Subtype_Left-	    translate "leftCenter" = Just Transition_Subtype_LeftCenter-	    translate "leftToRight" = Just Transition_Subtype_LeftToRight-	    translate "oppositeHorizontal" = Just Transition_Subtype_OppositeHorizontal-	    translate "oppositeVertical" = Just Transition_Subtype_OppositeVertical-	    translate "parallelDiagonal" = Just Transition_Subtype_ParallelDiagonal-	    translate "parallelDiagonalBottomLeft" = Just Transition_Subtype_ParallelDiagonalBottomLeft-	    translate "parallelDiagonalTopLeft" = Just Transition_Subtype_ParallelDiagonalTopLeft-	    translate "parallelVertical" = Just Transition_Subtype_ParallelVertical-	    translate "rectangle" = Just Transition_Subtype_Rectangle-	    translate "right" = Just Transition_Subtype_Right-	    translate "rightCenter" = Just Transition_Subtype_RightCenter-	    translate "sixPoint" = Just Transition_Subtype_SixPoint-	    translate "top" = Just Transition_Subtype_Top-	    translate "topCenter" = Just Transition_Subtype_TopCenter-	    translate "topLeft" = Just Transition_Subtype_TopLeft-	    translate "topLeftClockwise" = Just Transition_Subtype_TopLeftClockwise-	    translate "topLeftCounterClockwise" = Just Transition_Subtype_TopLeftCounterClockwise-	    translate "topLeftDiagonal" = Just Transition_Subtype_TopLeftDiagonal-	    translate "topLeftHorizontal" = Just Transition_Subtype_TopLeftHorizontal-	    translate "topLeftVertical" = Just Transition_Subtype_TopLeftVertical-	    translate "topRight" = Just Transition_Subtype_TopRight-	    translate "topRightClockwise" = Just Transition_Subtype_TopRightClockwise-	    translate "topRightCounterClockwise" = Just Transition_Subtype_TopRightCounterClockwise-	    translate "topRightDiagonal" = Just Transition_Subtype_TopRightDiagonal-	    translate "topToBottom" = Just Transition_Subtype_TopToBottom-	    translate "twoBladeHorizontal" = Just Transition_Subtype_TwoBladeHorizontal-	    translate "twoBladeVertical" = Just Transition_Subtype_TwoBladeVertical-	    translate "twoBoxBottom" = Just Transition_Subtype_TwoBoxBottom-	    translate "twoBoxLeft" = Just Transition_Subtype_TwoBoxLeft-	    translate "twoBoxRight" = Just Transition_Subtype_TwoBoxRight-	    translate "twoBoxTop" = Just Transition_Subtype_TwoBoxTop-	    translate "up" = Just Transition_Subtype_Up-	    translate "vertical" = Just Transition_Subtype_Vertical-	    translate "verticalBottomLeftOpposite" = Just Transition_Subtype_VerticalBottomLeftOpposite-	    translate "verticalBottomSame" = Just Transition_Subtype_VerticalBottomSame-	    translate "verticalLeft" = Just Transition_Subtype_VerticalLeft-	    translate "verticalRight" = Just Transition_Subtype_VerticalRight-	    translate "verticalTopLeftOpposite" = Just Transition_Subtype_VerticalTopLeftOpposite-	    translate "verticalTopSame" = Just Transition_Subtype_VerticalTopSame-	    translate _ = Nothing-    toAttrFrTyp n Transition_Subtype_Bottom = Just (n, str2attr "bottom")-    toAttrFrTyp n Transition_Subtype_BottomCenter = Just (n, str2attr "bottomCenter")-    toAttrFrTyp n Transition_Subtype_BottomLeft = Just (n, str2attr "bottomLeft")-    toAttrFrTyp n Transition_Subtype_BottomLeftClockwise = Just (n, str2attr "bottomLeftClockwise")-    toAttrFrTyp n Transition_Subtype_BottomLeftCounterClockwise = Just (n, str2attr "bottomLeftCounterClockwise")-    toAttrFrTyp n Transition_Subtype_BottomLeftDiagonal = Just (n, str2attr "bottomLeftDiagonal")-    toAttrFrTyp n Transition_Subtype_BottomRight = Just (n, str2attr "bottomRight")-    toAttrFrTyp n Transition_Subtype_BottomRightClockwise = Just (n, str2attr "bottomRightClockwise")-    toAttrFrTyp n Transition_Subtype_BottomRightCounterClockwise = Just (n, str2attr "bottomRightCounterClockwise")-    toAttrFrTyp n Transition_Subtype_BottomRightDiagonal = Just (n, str2attr "bottomRightDiagonal")-    toAttrFrTyp n Transition_Subtype_CenterRight = Just (n, str2attr "centerRight")-    toAttrFrTyp n Transition_Subtype_CenterTop = Just (n, str2attr "centerTop")-    toAttrFrTyp n Transition_Subtype_Circle = Just (n, str2attr "circle")-    toAttrFrTyp n Transition_Subtype_ClockwiseBottom = Just (n, str2attr "clockwiseBottom")-    toAttrFrTyp n Transition_Subtype_ClockwiseBottomRight = Just (n, str2attr "clockwiseBottomRight")-    toAttrFrTyp n Transition_Subtype_ClockwiseLeft = Just (n, str2attr "clockwiseLeft")-    toAttrFrTyp n Transition_Subtype_ClockwiseNine = Just (n, str2attr "clockwiseNine")-    toAttrFrTyp n Transition_Subtype_ClockwiseRight = Just (n, str2attr "clockwiseRight")-    toAttrFrTyp n Transition_Subtype_ClockwiseSix = Just (n, str2attr "clockwiseSix")-    toAttrFrTyp n Transition_Subtype_ClockwiseThree = Just (n, str2attr "clockwiseThree")-    toAttrFrTyp n Transition_Subtype_ClockwiseTop = Just (n, str2attr "clockwiseTop")-    toAttrFrTyp n Transition_Subtype_ClockwiseTopLeft = Just (n, str2attr "clockwiseTopLeft")-    toAttrFrTyp n Transition_Subtype_ClockwiseTwelve = Just (n, str2attr "clockwiseTwelve")-    toAttrFrTyp n Transition_Subtype_CornersIn = Just (n, str2attr "cornersIn")-    toAttrFrTyp n Transition_Subtype_CornersOut = Just (n, str2attr "cornersOut")-    toAttrFrTyp n Transition_Subtype_CounterClockwiseBottomLeft = Just (n, str2attr "counterClockwiseBottomLeft")-    toAttrFrTyp n Transition_Subtype_CounterClockwiseTopRight = Just (n, str2attr "counterClockwiseTopRight")-    toAttrFrTyp n Transition_Subtype_Crossfade = Just (n, str2attr "crossfade")-    toAttrFrTyp n Transition_Subtype_DiagonalBottomLeft = Just (n, str2attr "diagonalBottomLeft")-    toAttrFrTyp n Transition_Subtype_DiagonalBottomLeftOpposite = Just (n, str2attr "diagonalBottomLeftOpposite")-    toAttrFrTyp n Transition_Subtype_DiagonalTopLeft = Just (n, str2attr "diagonalTopLeft")-    toAttrFrTyp n Transition_Subtype_DiagonalTopLeftOpposite = Just (n, str2attr "diagonalTopLeftOpposite")-    toAttrFrTyp n Transition_Subtype_Diamond = Just (n, str2attr "diamond")-    toAttrFrTyp n Transition_Subtype_DoubleBarnDoor = Just (n, str2attr "doubleBarnDoor")-    toAttrFrTyp n Transition_Subtype_DoubleDiamond = Just (n, str2attr "doubleDiamond")-    toAttrFrTyp n Transition_Subtype_Down = Just (n, str2attr "down")-    toAttrFrTyp n Transition_Subtype_FadeFromColor = Just (n, str2attr "fadeFromColor")-    toAttrFrTyp n Transition_Subtype_FadeToColor = Just (n, str2attr "fadeToColor")-    toAttrFrTyp n Transition_Subtype_FanInHorizontal = Just (n, str2attr "fanInHorizontal")-    toAttrFrTyp n Transition_Subtype_FanInVertical = Just (n, str2attr "fanInVertical")-    toAttrFrTyp n Transition_Subtype_FanOutHorizontal = Just (n, str2attr "fanOutHorizontal")-    toAttrFrTyp n Transition_Subtype_FanOutVertical = Just (n, str2attr "fanOutVertical")-    toAttrFrTyp n Transition_Subtype_FivePoint = Just (n, str2attr "fivePoint")-    toAttrFrTyp n Transition_Subtype_FourBlade = Just (n, str2attr "fourBlade")-    toAttrFrTyp n Transition_Subtype_FourBoxHorizontal = Just (n, str2attr "fourBoxHorizontal")-    toAttrFrTyp n Transition_Subtype_FourBoxVertical = Just (n, str2attr "fourBoxVertical")-    toAttrFrTyp n Transition_Subtype_FourPoint = Just (n, str2attr "fourPoint")-    toAttrFrTyp n Transition_Subtype_FromBottom = Just (n, str2attr "fromBottom")-    toAttrFrTyp n Transition_Subtype_FromLeft = Just (n, str2attr "fromLeft")-    toAttrFrTyp n Transition_Subtype_FromRight = Just (n, str2attr "fromRight")-    toAttrFrTyp n Transition_Subtype_FromTop = Just (n, str2attr "fromTop")-    toAttrFrTyp n Transition_Subtype_Heart = Just (n, str2attr "heart")-    toAttrFrTyp n Transition_Subtype_Horizontal = Just (n, str2attr "horizontal")-    toAttrFrTyp n Transition_Subtype_HorizontalLeft = Just (n, str2attr "horizontalLeft")-    toAttrFrTyp n Transition_Subtype_HorizontalLeftSame = Just (n, str2attr "horizontalLeftSame")-    toAttrFrTyp n Transition_Subtype_HorizontalRight = Just (n, str2attr "horizontalRight")-    toAttrFrTyp n Transition_Subtype_HorizontalRightSame = Just (n, str2attr "horizontalRightSame")-    toAttrFrTyp n Transition_Subtype_HorizontalTopLeftOpposite = Just (n, str2attr "horizontalTopLeftOpposite")-    toAttrFrTyp n Transition_Subtype_HorizontalTopRightOpposite = Just (n, str2attr "horizontalTopRightOpposite")-    toAttrFrTyp n Transition_Subtype_Keyhole = Just (n, str2attr "keyhole")-    toAttrFrTyp n Transition_Subtype_Left = Just (n, str2attr "left")-    toAttrFrTyp n Transition_Subtype_LeftCenter = Just (n, str2attr "leftCenter")-    toAttrFrTyp n Transition_Subtype_LeftToRight = Just (n, str2attr "leftToRight")-    toAttrFrTyp n Transition_Subtype_OppositeHorizontal = Just (n, str2attr "oppositeHorizontal")-    toAttrFrTyp n Transition_Subtype_OppositeVertical = Just (n, str2attr "oppositeVertical")-    toAttrFrTyp n Transition_Subtype_ParallelDiagonal = Just (n, str2attr "parallelDiagonal")-    toAttrFrTyp n Transition_Subtype_ParallelDiagonalBottomLeft = Just (n, str2attr "parallelDiagonalBottomLeft")-    toAttrFrTyp n Transition_Subtype_ParallelDiagonalTopLeft = Just (n, str2attr "parallelDiagonalTopLeft")-    toAttrFrTyp n Transition_Subtype_ParallelVertical = Just (n, str2attr "parallelVertical")-    toAttrFrTyp n Transition_Subtype_Rectangle = Just (n, str2attr "rectangle")-    toAttrFrTyp n Transition_Subtype_Right = Just (n, str2attr "right")-    toAttrFrTyp n Transition_Subtype_RightCenter = Just (n, str2attr "rightCenter")-    toAttrFrTyp n Transition_Subtype_SixPoint = Just (n, str2attr "sixPoint")-    toAttrFrTyp n Transition_Subtype_Top = Just (n, str2attr "top")-    toAttrFrTyp n Transition_Subtype_TopCenter = Just (n, str2attr "topCenter")-    toAttrFrTyp n Transition_Subtype_TopLeft = Just (n, str2attr "topLeft")-    toAttrFrTyp n Transition_Subtype_TopLeftClockwise = Just (n, str2attr "topLeftClockwise")-    toAttrFrTyp n Transition_Subtype_TopLeftCounterClockwise = Just (n, str2attr "topLeftCounterClockwise")-    toAttrFrTyp n Transition_Subtype_TopLeftDiagonal = Just (n, str2attr "topLeftDiagonal")-    toAttrFrTyp n Transition_Subtype_TopLeftHorizontal = Just (n, str2attr "topLeftHorizontal")-    toAttrFrTyp n Transition_Subtype_TopLeftVertical = Just (n, str2attr "topLeftVertical")-    toAttrFrTyp n Transition_Subtype_TopRight = Just (n, str2attr "topRight")-    toAttrFrTyp n Transition_Subtype_TopRightClockwise = Just (n, str2attr "topRightClockwise")-    toAttrFrTyp n Transition_Subtype_TopRightCounterClockwise = Just (n, str2attr "topRightCounterClockwise")-    toAttrFrTyp n Transition_Subtype_TopRightDiagonal = Just (n, str2attr "topRightDiagonal")-    toAttrFrTyp n Transition_Subtype_TopToBottom = Just (n, str2attr "topToBottom")-    toAttrFrTyp n Transition_Subtype_TwoBladeHorizontal = Just (n, str2attr "twoBladeHorizontal")-    toAttrFrTyp n Transition_Subtype_TwoBladeVertical = Just (n, str2attr "twoBladeVertical")-    toAttrFrTyp n Transition_Subtype_TwoBoxBottom = Just (n, str2attr "twoBoxBottom")-    toAttrFrTyp n Transition_Subtype_TwoBoxLeft = Just (n, str2attr "twoBoxLeft")-    toAttrFrTyp n Transition_Subtype_TwoBoxRight = Just (n, str2attr "twoBoxRight")-    toAttrFrTyp n Transition_Subtype_TwoBoxTop = Just (n, str2attr "twoBoxTop")-    toAttrFrTyp n Transition_Subtype_Up = Just (n, str2attr "up")-    toAttrFrTyp n Transition_Subtype_Vertical = Just (n, str2attr "vertical")-    toAttrFrTyp n Transition_Subtype_VerticalBottomLeftOpposite = Just (n, str2attr "verticalBottomLeftOpposite")-    toAttrFrTyp n Transition_Subtype_VerticalBottomSame = Just (n, str2attr "verticalBottomSame")-    toAttrFrTyp n Transition_Subtype_VerticalLeft = Just (n, str2attr "verticalLeft")-    toAttrFrTyp n Transition_Subtype_VerticalRight = Just (n, str2attr "verticalRight")-    toAttrFrTyp n Transition_Subtype_VerticalTopLeftOpposite = Just (n, str2attr "verticalTopLeftOpposite")-    toAttrFrTyp n Transition_Subtype_VerticalTopSame = Just (n, str2attr "verticalTopSame")-instance XmlAttrType Transition_Coordinated where-    fromAttrToTyp n (n',v)-	| n==n'     = translate (attr2str v)-	| otherwise = Nothing-      where translate "true" = Just Transition_Coordinated_True-	    translate "false" = Just Transition_Coordinated_False-	    translate _ = Nothing-    toAttrFrTyp n Transition_Coordinated_True = Just (n, str2attr "true")-    toAttrFrTyp n Transition_Coordinated_False = Just (n, str2attr "false")-instance XmlAttrType Transition_ClibBoundary where-    fromAttrToTyp n (n',v)-	| n==n'     = translate (attr2str v)-	| otherwise = Nothing-      where translate "parent" = Just Transition_ClibBoundary_Parent-	    translate "children" = Just Transition_ClibBoundary_Children-	    translate _ = Nothing-    toAttrFrTyp n Transition_ClibBoundary_Parent = Just (n, str2attr "parent")-    toAttrFrTyp n Transition_ClibBoundary_Children = Just (n, str2attr "children")-instance XmlAttrType Transition_Direction where-    fromAttrToTyp n (n',v)-	| n==n'     = translate (attr2str v)-	| otherwise = Nothing-      where translate "forward" = Just Transition_Direction_Forward-	    translate "reverse" = Just Transition_Direction_Reverse-	    translate _ = Nothing-    toAttrFrTyp n Transition_Direction_Forward = Just (n, str2attr "forward")-    toAttrFrTyp n Transition_Direction_Reverse = Just (n, str2attr "reverse")-instance XmlContent TransitionFilter where-    fromElem (CElem (Elem "transitionFilter" as []):rest) =-	(Just (fromAttrs as), rest)-    fromElem (CMisc _:rest) = fromElem rest-    fromElem rest = (Nothing, rest)-    toElem as =-	[CElem (Elem "transitionFilter" (toAttrs as) [])]-instance XmlAttributes TransitionFilter where-    fromAttrs as =-	TransitionFilter-	  { transitionFilterId = possibleA fromAttrToStr "id" as-	  , transitionFilterClass = possibleA fromAttrToStr "class" as-	  , transitionFilterTitle = possibleA fromAttrToStr "title" as-	  , transitionFilterXml'lang = possibleA fromAttrToStr "xml:lang" as-	  , transitionFilterType = possibleA fromAttrToTyp "type" as-	  , transitionFilterSubtype = possibleA fromAttrToTyp "subtype" as-	  , transitionFilterHorzRepeat = defaultA fromAttrToStr "0" "horzRepeat" as-	  , transitionFilterVertRepeat = defaultA fromAttrToStr "0" "vertRepeat" as-	  , transitionFilterBorderWidth = defaultA fromAttrToStr "0" "borderWidth" as-	  , transitionFilterBorderColor = defaultA fromAttrToStr "black" "borderColor" as-	  , transitionFilterFadeColor = defaultA fromAttrToStr "black" "fadeColor" as-	  , transitionFilterCoordinated = defaultA fromAttrToTyp TransitionFilter_Coordinated_False "coordinated" as-	  , transitionFilterClibBoundary = defaultA fromAttrToTyp TransitionFilter_ClibBoundary_Children "clibBoundary" as-	  , transitionFilterDur = possibleA fromAttrToStr "dur" as-	  , transitionFilterRepeatCount = possibleA fromAttrToStr "repeatCount" as-	  , transitionFilterRepeatDur = possibleA fromAttrToStr "repeatDur" as-	  , transitionFilterBegin = possibleA fromAttrToStr "begin" as-	  , transitionFilterEnd = possibleA fromAttrToStr "end" as-	  , transitionFilterValues = possibleA fromAttrToStr "values" as-	  , transitionFilterFrom = possibleA fromAttrToStr "from" as-	  , transitionFilterTo = possibleA fromAttrToStr "to" as-	  , transitionFilterBy = possibleA fromAttrToStr "by" as-	  , transitionFilterCalcMode = defaultA fromAttrToTyp TransitionFilter_CalcMode_Linear "calcMode" as-	  }-    toAttrs v = catMaybes -	[ maybeToAttr toAttrFrStr "id" (transitionFilterId v)-	, maybeToAttr toAttrFrStr "class" (transitionFilterClass v)-	, maybeToAttr toAttrFrStr "title" (transitionFilterTitle v)-	, maybeToAttr toAttrFrStr "xml:lang" (transitionFilterXml'lang v)-	, maybeToAttr toAttrFrTyp "type" (transitionFilterType v)-	, maybeToAttr toAttrFrTyp "subtype" (transitionFilterSubtype v)-	, defaultToAttr toAttrFrStr "horzRepeat" (transitionFilterHorzRepeat v)-	, defaultToAttr toAttrFrStr "vertRepeat" (transitionFilterVertRepeat v)-	, defaultToAttr toAttrFrStr "borderWidth" (transitionFilterBorderWidth v)-	, defaultToAttr toAttrFrStr "borderColor" (transitionFilterBorderColor v)-	, defaultToAttr toAttrFrStr "fadeColor" (transitionFilterFadeColor v)-	, defaultToAttr toAttrFrTyp "coordinated" (transitionFilterCoordinated v)-	, defaultToAttr toAttrFrTyp "clibBoundary" (transitionFilterClibBoundary v)-	, maybeToAttr toAttrFrStr "dur" (transitionFilterDur v)-	, maybeToAttr toAttrFrStr "repeatCount" (transitionFilterRepeatCount v)-	, maybeToAttr toAttrFrStr "repeatDur" (transitionFilterRepeatDur v)-	, maybeToAttr toAttrFrStr "begin" (transitionFilterBegin v)-	, maybeToAttr toAttrFrStr "end" (transitionFilterEnd v)-	, maybeToAttr toAttrFrStr "values" (transitionFilterValues v)-	, maybeToAttr toAttrFrStr "from" (transitionFilterFrom v)-	, maybeToAttr toAttrFrStr "to" (transitionFilterTo v)-	, maybeToAttr toAttrFrStr "by" (transitionFilterBy v)-	, defaultToAttr toAttrFrTyp "calcMode" (transitionFilterCalcMode v)-	]-instance XmlAttrType TransitionFilter_Type where-    fromAttrToTyp n (n',v)-	| n==n'     = translate (attr2str v)-	| otherwise = Nothing-      where translate "barWipe" = Just TransitionFilter_Type_BarWipe-	    translate "boxWipe" = Just TransitionFilter_Type_BoxWipe-	    translate "fourBoxWipe" = Just TransitionFilter_Type_FourBoxWipe-	    translate "barnDoorWipe" = Just TransitionFilter_Type_BarnDoorWipe-	    translate "diagonalWipe" = Just TransitionFilter_Type_DiagonalWipe-	    translate "bowTieWipe" = Just TransitionFilter_Type_BowTieWipe-	    translate "miscDiagonalWipe" = Just TransitionFilter_Type_MiscDiagonalWipe-	    translate "veeWipe" = Just TransitionFilter_Type_VeeWipe-	    translate "barnVeeWipe" = Just TransitionFilter_Type_BarnVeeWipe-	    translate "zigZagWipe" = Just TransitionFilter_Type_ZigZagWipe-	    translate "barnZigZagWipe" = Just TransitionFilter_Type_BarnZigZagWipe-	    translate "miscShapeWipe" = Just TransitionFilter_Type_MiscShapeWipe-	    translate "triangleWipe" = Just TransitionFilter_Type_TriangleWipe-	    translate "arrowHeadWipe" = Just TransitionFilter_Type_ArrowHeadWipe-	    translate "pentagonWipe" = Just TransitionFilter_Type_PentagonWipe-	    translate "hexagonWipe" = Just TransitionFilter_Type_HexagonWipe-	    translate "ellipseWipe" = Just TransitionFilter_Type_EllipseWipe-	    translate "eyeWipe" = Just TransitionFilter_Type_EyeWipe-	    translate "roundRectWipe" = Just TransitionFilter_Type_RoundRectWipe-	    translate "starWipe" = Just TransitionFilter_Type_StarWipe-	    translate "clockWipe" = Just TransitionFilter_Type_ClockWipe-	    translate "pinWheelWipe" = Just TransitionFilter_Type_PinWheelWipe-	    translate "singleSweepWipe" = Just TransitionFilter_Type_SingleSweepWipe-	    translate "fanWipe" = Just TransitionFilter_Type_FanWipe-	    translate "doubleFanWipe" = Just TransitionFilter_Type_DoubleFanWipe-	    translate "doubleSweepWipe" = Just TransitionFilter_Type_DoubleSweepWipe-	    translate "saloonDoorWipe" = Just TransitionFilter_Type_SaloonDoorWipe-	    translate "windshieldWipe" = Just TransitionFilter_Type_WindshieldWipe-	    translate "snakeWipe" = Just TransitionFilter_Type_SnakeWipe-	    translate "spiralWipe" = Just TransitionFilter_Type_SpiralWipe-	    translate "parallelSnakesWipe" = Just TransitionFilter_Type_ParallelSnakesWipe-	    translate "boxSnakesWipe" = Just TransitionFilter_Type_BoxSnakesWipe-	    translate "waterfallWipe" = Just TransitionFilter_Type_WaterfallWipe-	    translate "pushWipe" = Just TransitionFilter_Type_PushWipe-	    translate "slideWipe" = Just TransitionFilter_Type_SlideWipe-	    translate "fade" = Just TransitionFilter_Type_Fade-	    translate _ = Nothing-    toAttrFrTyp n TransitionFilter_Type_BarWipe = Just (n, str2attr "barWipe")-    toAttrFrTyp n TransitionFilter_Type_BoxWipe = Just (n, str2attr "boxWipe")-    toAttrFrTyp n TransitionFilter_Type_FourBoxWipe = Just (n, str2attr "fourBoxWipe")-    toAttrFrTyp n TransitionFilter_Type_BarnDoorWipe = Just (n, str2attr "barnDoorWipe")-    toAttrFrTyp n TransitionFilter_Type_DiagonalWipe = Just (n, str2attr "diagonalWipe")-    toAttrFrTyp n TransitionFilter_Type_BowTieWipe = Just (n, str2attr "bowTieWipe")-    toAttrFrTyp n TransitionFilter_Type_MiscDiagonalWipe = Just (n, str2attr "miscDiagonalWipe")-    toAttrFrTyp n TransitionFilter_Type_VeeWipe = Just (n, str2attr "veeWipe")-    toAttrFrTyp n TransitionFilter_Type_BarnVeeWipe = Just (n, str2attr "barnVeeWipe")-    toAttrFrTyp n TransitionFilter_Type_ZigZagWipe = Just (n, str2attr "zigZagWipe")-    toAttrFrTyp n TransitionFilter_Type_BarnZigZagWipe = Just (n, str2attr "barnZigZagWipe")-    toAttrFrTyp n TransitionFilter_Type_MiscShapeWipe = Just (n, str2attr "miscShapeWipe")-    toAttrFrTyp n TransitionFilter_Type_TriangleWipe = Just (n, str2attr "triangleWipe")-    toAttrFrTyp n TransitionFilter_Type_ArrowHeadWipe = Just (n, str2attr "arrowHeadWipe")-    toAttrFrTyp n TransitionFilter_Type_PentagonWipe = Just (n, str2attr "pentagonWipe")-    toAttrFrTyp n TransitionFilter_Type_HexagonWipe = Just (n, str2attr "hexagonWipe")-    toAttrFrTyp n TransitionFilter_Type_EllipseWipe = Just (n, str2attr "ellipseWipe")-    toAttrFrTyp n TransitionFilter_Type_EyeWipe = Just (n, str2attr "eyeWipe")-    toAttrFrTyp n TransitionFilter_Type_RoundRectWipe = Just (n, str2attr "roundRectWipe")-    toAttrFrTyp n TransitionFilter_Type_StarWipe = Just (n, str2attr "starWipe")-    toAttrFrTyp n TransitionFilter_Type_ClockWipe = Just (n, str2attr "clockWipe")-    toAttrFrTyp n TransitionFilter_Type_PinWheelWipe = Just (n, str2attr "pinWheelWipe")-    toAttrFrTyp n TransitionFilter_Type_SingleSweepWipe = Just (n, str2attr "singleSweepWipe")-    toAttrFrTyp n TransitionFilter_Type_FanWipe = Just (n, str2attr "fanWipe")-    toAttrFrTyp n TransitionFilter_Type_DoubleFanWipe = Just (n, str2attr "doubleFanWipe")-    toAttrFrTyp n TransitionFilter_Type_DoubleSweepWipe = Just (n, str2attr "doubleSweepWipe")-    toAttrFrTyp n TransitionFilter_Type_SaloonDoorWipe = Just (n, str2attr "saloonDoorWipe")-    toAttrFrTyp n TransitionFilter_Type_WindshieldWipe = Just (n, str2attr "windshieldWipe")-    toAttrFrTyp n TransitionFilter_Type_SnakeWipe = Just (n, str2attr "snakeWipe")-    toAttrFrTyp n TransitionFilter_Type_SpiralWipe = Just (n, str2attr "spiralWipe")-    toAttrFrTyp n TransitionFilter_Type_ParallelSnakesWipe = Just (n, str2attr "parallelSnakesWipe")-    toAttrFrTyp n TransitionFilter_Type_BoxSnakesWipe = Just (n, str2attr "boxSnakesWipe")-    toAttrFrTyp n TransitionFilter_Type_WaterfallWipe = Just (n, str2attr "waterfallWipe")-    toAttrFrTyp n TransitionFilter_Type_PushWipe = Just (n, str2attr "pushWipe")-    toAttrFrTyp n TransitionFilter_Type_SlideWipe = Just (n, str2attr "slideWipe")-    toAttrFrTyp n TransitionFilter_Type_Fade = Just (n, str2attr "fade")-instance XmlAttrType TransitionFilter_Subtype where-    fromAttrToTyp n (n',v)-	| n==n'     = translate (attr2str v)-	| otherwise = Nothing-      where translate "bottom" = Just TransitionFilter_Subtype_Bottom-	    translate "bottomCenter" = Just TransitionFilter_Subtype_BottomCenter-	    translate "bottomLeft" = Just TransitionFilter_Subtype_BottomLeft-	    translate "bottomLeftClockwise" = Just TransitionFilter_Subtype_BottomLeftClockwise-	    translate "bottomLeftCounterClockwise" = Just TransitionFilter_Subtype_BottomLeftCounterClockwise-	    translate "bottomLeftDiagonal" = Just TransitionFilter_Subtype_BottomLeftDiagonal-	    translate "bottomRight" = Just TransitionFilter_Subtype_BottomRight-	    translate "bottomRightClockwise" = Just TransitionFilter_Subtype_BottomRightClockwise-	    translate "bottomRightCounterClockwise" = Just TransitionFilter_Subtype_BottomRightCounterClockwise-	    translate "bottomRightDiagonal" = Just TransitionFilter_Subtype_BottomRightDiagonal-	    translate "centerRight" = Just TransitionFilter_Subtype_CenterRight-	    translate "centerTop" = Just TransitionFilter_Subtype_CenterTop-	    translate "circle" = Just TransitionFilter_Subtype_Circle-	    translate "clockwiseBottom" = Just TransitionFilter_Subtype_ClockwiseBottom-	    translate "clockwiseBottomRight" = Just TransitionFilter_Subtype_ClockwiseBottomRight-	    translate "clockwiseLeft" = Just TransitionFilter_Subtype_ClockwiseLeft-	    translate "clockwiseNine" = Just TransitionFilter_Subtype_ClockwiseNine-	    translate "clockwiseRight" = Just TransitionFilter_Subtype_ClockwiseRight-	    translate "clockwiseSix" = Just TransitionFilter_Subtype_ClockwiseSix-	    translate "clockwiseThree" = Just TransitionFilter_Subtype_ClockwiseThree-	    translate "clockwiseTop" = Just TransitionFilter_Subtype_ClockwiseTop-	    translate "clockwiseTopLeft" = Just TransitionFilter_Subtype_ClockwiseTopLeft-	    translate "clockwiseTwelve" = Just TransitionFilter_Subtype_ClockwiseTwelve-	    translate "cornersIn" = Just TransitionFilter_Subtype_CornersIn-	    translate "cornersOut" = Just TransitionFilter_Subtype_CornersOut-	    translate "counterClockwiseBottomLeft" = Just TransitionFilter_Subtype_CounterClockwiseBottomLeft-	    translate "counterClockwiseTopRight" = Just TransitionFilter_Subtype_CounterClockwiseTopRight-	    translate "crossfade" = Just TransitionFilter_Subtype_Crossfade-	    translate "diagonalBottomLeft" = Just TransitionFilter_Subtype_DiagonalBottomLeft-	    translate "diagonalBottomLeftOpposite" = Just TransitionFilter_Subtype_DiagonalBottomLeftOpposite-	    translate "diagonalTopLeft" = Just TransitionFilter_Subtype_DiagonalTopLeft-	    translate "diagonalTopLeftOpposite" = Just TransitionFilter_Subtype_DiagonalTopLeftOpposite-	    translate "diamond" = Just TransitionFilter_Subtype_Diamond-	    translate "doubleBarnDoor" = Just TransitionFilter_Subtype_DoubleBarnDoor-	    translate "doubleDiamond" = Just TransitionFilter_Subtype_DoubleDiamond-	    translate "down" = Just TransitionFilter_Subtype_Down-	    translate "fadeFromColor" = Just TransitionFilter_Subtype_FadeFromColor-	    translate "fadeToColor" = Just TransitionFilter_Subtype_FadeToColor-	    translate "fanInHorizontal" = Just TransitionFilter_Subtype_FanInHorizontal-	    translate "fanInVertical" = Just TransitionFilter_Subtype_FanInVertical-	    translate "fanOutHorizontal" = Just TransitionFilter_Subtype_FanOutHorizontal-	    translate "fanOutVertical" = Just TransitionFilter_Subtype_FanOutVertical-	    translate "fivePoint" = Just TransitionFilter_Subtype_FivePoint-	    translate "fourBlade" = Just TransitionFilter_Subtype_FourBlade-	    translate "fourBoxHorizontal" = Just TransitionFilter_Subtype_FourBoxHorizontal-	    translate "fourBoxVertical" = Just TransitionFilter_Subtype_FourBoxVertical-	    translate "fourPoint" = Just TransitionFilter_Subtype_FourPoint-	    translate "fromBottom" = Just TransitionFilter_Subtype_FromBottom-	    translate "fromLeft" = Just TransitionFilter_Subtype_FromLeft-	    translate "fromRight" = Just TransitionFilter_Subtype_FromRight-	    translate "fromTop" = Just TransitionFilter_Subtype_FromTop-	    translate "heart" = Just TransitionFilter_Subtype_Heart-	    translate "horizontal" = Just TransitionFilter_Subtype_Horizontal-	    translate "horizontalLeft" = Just TransitionFilter_Subtype_HorizontalLeft-	    translate "horizontalLeftSame" = Just TransitionFilter_Subtype_HorizontalLeftSame-	    translate "horizontalRight" = Just TransitionFilter_Subtype_HorizontalRight-	    translate "horizontalRightSame" = Just TransitionFilter_Subtype_HorizontalRightSame-	    translate "horizontalTopLeftOpposite" = Just TransitionFilter_Subtype_HorizontalTopLeftOpposite-	    translate "horizontalTopRightOpposite" = Just TransitionFilter_Subtype_HorizontalTopRightOpposite-	    translate "keyhole" = Just TransitionFilter_Subtype_Keyhole-	    translate "left" = Just TransitionFilter_Subtype_Left-	    translate "leftCenter" = Just TransitionFilter_Subtype_LeftCenter-	    translate "leftToRight" = Just TransitionFilter_Subtype_LeftToRight-	    translate "oppositeHorizontal" = Just TransitionFilter_Subtype_OppositeHorizontal-	    translate "oppositeVertical" = Just TransitionFilter_Subtype_OppositeVertical-	    translate "parallelDiagonal" = Just TransitionFilter_Subtype_ParallelDiagonal-	    translate "parallelDiagonalBottomLeft" = Just TransitionFilter_Subtype_ParallelDiagonalBottomLeft-	    translate "parallelDiagonalTopLeft" = Just TransitionFilter_Subtype_ParallelDiagonalTopLeft-	    translate "parallelVertical" = Just TransitionFilter_Subtype_ParallelVertical-	    translate "rectangle" = Just TransitionFilter_Subtype_Rectangle-	    translate "right" = Just TransitionFilter_Subtype_Right-	    translate "rightCenter" = Just TransitionFilter_Subtype_RightCenter-	    translate "sixPoint" = Just TransitionFilter_Subtype_SixPoint-	    translate "top" = Just TransitionFilter_Subtype_Top-	    translate "topCenter" = Just TransitionFilter_Subtype_TopCenter-	    translate "topLeft" = Just TransitionFilter_Subtype_TopLeft-	    translate "topLeftClockwise" = Just TransitionFilter_Subtype_TopLeftClockwise-	    translate "topLeftCounterClockwise" = Just TransitionFilter_Subtype_TopLeftCounterClockwise-	    translate "topLeftDiagonal" = Just TransitionFilter_Subtype_TopLeftDiagonal-	    translate "topLeftHorizontal" = Just TransitionFilter_Subtype_TopLeftHorizontal-	    translate "topLeftVertical" = Just TransitionFilter_Subtype_TopLeftVertical-	    translate "topRight" = Just TransitionFilter_Subtype_TopRight-	    translate "topRightClockwise" = Just TransitionFilter_Subtype_TopRightClockwise-	    translate "topRightCounterClockwise" = Just TransitionFilter_Subtype_TopRightCounterClockwise-	    translate "topRightDiagonal" = Just TransitionFilter_Subtype_TopRightDiagonal-	    translate "topToBottom" = Just TransitionFilter_Subtype_TopToBottom-	    translate "twoBladeHorizontal" = Just TransitionFilter_Subtype_TwoBladeHorizontal-	    translate "twoBladeVertical" = Just TransitionFilter_Subtype_TwoBladeVertical-	    translate "twoBoxBottom" = Just TransitionFilter_Subtype_TwoBoxBottom-	    translate "twoBoxLeft" = Just TransitionFilter_Subtype_TwoBoxLeft-	    translate "twoBoxRight" = Just TransitionFilter_Subtype_TwoBoxRight-	    translate "twoBoxTop" = Just TransitionFilter_Subtype_TwoBoxTop-	    translate "up" = Just TransitionFilter_Subtype_Up-	    translate "vertical" = Just TransitionFilter_Subtype_Vertical-	    translate "verticalBottomLeftOpposite" = Just TransitionFilter_Subtype_VerticalBottomLeftOpposite-	    translate "verticalBottomSame" = Just TransitionFilter_Subtype_VerticalBottomSame-	    translate "verticalLeft" = Just TransitionFilter_Subtype_VerticalLeft-	    translate "verticalRight" = Just TransitionFilter_Subtype_VerticalRight-	    translate "verticalTopLeftOpposite" = Just TransitionFilter_Subtype_VerticalTopLeftOpposite-	    translate "verticalTopSame" = Just TransitionFilter_Subtype_VerticalTopSame-	    translate _ = Nothing-    toAttrFrTyp n TransitionFilter_Subtype_Bottom = Just (n, str2attr "bottom")-    toAttrFrTyp n TransitionFilter_Subtype_BottomCenter = Just (n, str2attr "bottomCenter")-    toAttrFrTyp n TransitionFilter_Subtype_BottomLeft = Just (n, str2attr "bottomLeft")-    toAttrFrTyp n TransitionFilter_Subtype_BottomLeftClockwise = Just (n, str2attr "bottomLeftClockwise")-    toAttrFrTyp n TransitionFilter_Subtype_BottomLeftCounterClockwise = Just (n, str2attr "bottomLeftCounterClockwise")-    toAttrFrTyp n TransitionFilter_Subtype_BottomLeftDiagonal = Just (n, str2attr "bottomLeftDiagonal")-    toAttrFrTyp n TransitionFilter_Subtype_BottomRight = Just (n, str2attr "bottomRight")-    toAttrFrTyp n TransitionFilter_Subtype_BottomRightClockwise = Just (n, str2attr "bottomRightClockwise")-    toAttrFrTyp n TransitionFilter_Subtype_BottomRightCounterClockwise = Just (n, str2attr "bottomRightCounterClockwise")-    toAttrFrTyp n TransitionFilter_Subtype_BottomRightDiagonal = Just (n, str2attr "bottomRightDiagonal")-    toAttrFrTyp n TransitionFilter_Subtype_CenterRight = Just (n, str2attr "centerRight")-    toAttrFrTyp n TransitionFilter_Subtype_CenterTop = Just (n, str2attr "centerTop")-    toAttrFrTyp n TransitionFilter_Subtype_Circle = Just (n, str2attr "circle")-    toAttrFrTyp n TransitionFilter_Subtype_ClockwiseBottom = Just (n, str2attr "clockwiseBottom")-    toAttrFrTyp n TransitionFilter_Subtype_ClockwiseBottomRight = Just (n, str2attr "clockwiseBottomRight")-    toAttrFrTyp n TransitionFilter_Subtype_ClockwiseLeft = Just (n, str2attr "clockwiseLeft")-    toAttrFrTyp n TransitionFilter_Subtype_ClockwiseNine = Just (n, str2attr "clockwiseNine")-    toAttrFrTyp n TransitionFilter_Subtype_ClockwiseRight = Just (n, str2attr "clockwiseRight")-    toAttrFrTyp n TransitionFilter_Subtype_ClockwiseSix = Just (n, str2attr "clockwiseSix")-    toAttrFrTyp n TransitionFilter_Subtype_ClockwiseThree = Just (n, str2attr "clockwiseThree")-    toAttrFrTyp n TransitionFilter_Subtype_ClockwiseTop = Just (n, str2attr "clockwiseTop")-    toAttrFrTyp n TransitionFilter_Subtype_ClockwiseTopLeft = Just (n, str2attr "clockwiseTopLeft")-    toAttrFrTyp n TransitionFilter_Subtype_ClockwiseTwelve = Just (n, str2attr "clockwiseTwelve")-    toAttrFrTyp n TransitionFilter_Subtype_CornersIn = Just (n, str2attr "cornersIn")-    toAttrFrTyp n TransitionFilter_Subtype_CornersOut = Just (n, str2attr "cornersOut")-    toAttrFrTyp n TransitionFilter_Subtype_CounterClockwiseBottomLeft = Just (n, str2attr "counterClockwiseBottomLeft")-    toAttrFrTyp n TransitionFilter_Subtype_CounterClockwiseTopRight = Just (n, str2attr "counterClockwiseTopRight")-    toAttrFrTyp n TransitionFilter_Subtype_Crossfade = Just (n, str2attr "crossfade")-    toAttrFrTyp n TransitionFilter_Subtype_DiagonalBottomLeft = Just (n, str2attr "diagonalBottomLeft")-    toAttrFrTyp n TransitionFilter_Subtype_DiagonalBottomLeftOpposite = Just (n, str2attr "diagonalBottomLeftOpposite")-    toAttrFrTyp n TransitionFilter_Subtype_DiagonalTopLeft = Just (n, str2attr "diagonalTopLeft")-    toAttrFrTyp n TransitionFilter_Subtype_DiagonalTopLeftOpposite = Just (n, str2attr "diagonalTopLeftOpposite")-    toAttrFrTyp n TransitionFilter_Subtype_Diamond = Just (n, str2attr "diamond")-    toAttrFrTyp n TransitionFilter_Subtype_DoubleBarnDoor = Just (n, str2attr "doubleBarnDoor")-    toAttrFrTyp n TransitionFilter_Subtype_DoubleDiamond = Just (n, str2attr "doubleDiamond")-    toAttrFrTyp n TransitionFilter_Subtype_Down = Just (n, str2attr "down")-    toAttrFrTyp n TransitionFilter_Subtype_FadeFromColor = Just (n, str2attr "fadeFromColor")-    toAttrFrTyp n TransitionFilter_Subtype_FadeToColor = Just (n, str2attr "fadeToColor")-    toAttrFrTyp n TransitionFilter_Subtype_FanInHorizontal = Just (n, str2attr "fanInHorizontal")-    toAttrFrTyp n TransitionFilter_Subtype_FanInVertical = Just (n, str2attr "fanInVertical")-    toAttrFrTyp n TransitionFilter_Subtype_FanOutHorizontal = Just (n, str2attr "fanOutHorizontal")-    toAttrFrTyp n TransitionFilter_Subtype_FanOutVertical = Just (n, str2attr "fanOutVertical")-    toAttrFrTyp n TransitionFilter_Subtype_FivePoint = Just (n, str2attr "fivePoint")-    toAttrFrTyp n TransitionFilter_Subtype_FourBlade = Just (n, str2attr "fourBlade")-    toAttrFrTyp n TransitionFilter_Subtype_FourBoxHorizontal = Just (n, str2attr "fourBoxHorizontal")-    toAttrFrTyp n TransitionFilter_Subtype_FourBoxVertical = Just (n, str2attr "fourBoxVertical")-    toAttrFrTyp n TransitionFilter_Subtype_FourPoint = Just (n, str2attr "fourPoint")-    toAttrFrTyp n TransitionFilter_Subtype_FromBottom = Just (n, str2attr "fromBottom")-    toAttrFrTyp n TransitionFilter_Subtype_FromLeft = Just (n, str2attr "fromLeft")-    toAttrFrTyp n TransitionFilter_Subtype_FromRight = Just (n, str2attr "fromRight")-    toAttrFrTyp n TransitionFilter_Subtype_FromTop = Just (n, str2attr "fromTop")-    toAttrFrTyp n TransitionFilter_Subtype_Heart = Just (n, str2attr "heart")-    toAttrFrTyp n TransitionFilter_Subtype_Horizontal = Just (n, str2attr "horizontal")-    toAttrFrTyp n TransitionFilter_Subtype_HorizontalLeft = Just (n, str2attr "horizontalLeft")-    toAttrFrTyp n TransitionFilter_Subtype_HorizontalLeftSame = Just (n, str2attr "horizontalLeftSame")-    toAttrFrTyp n TransitionFilter_Subtype_HorizontalRight = Just (n, str2attr "horizontalRight")-    toAttrFrTyp n TransitionFilter_Subtype_HorizontalRightSame = Just (n, str2attr "horizontalRightSame")-    toAttrFrTyp n TransitionFilter_Subtype_HorizontalTopLeftOpposite = Just (n, str2attr "horizontalTopLeftOpposite")-    toAttrFrTyp n TransitionFilter_Subtype_HorizontalTopRightOpposite = Just (n, str2attr "horizontalTopRightOpposite")-    toAttrFrTyp n TransitionFilter_Subtype_Keyhole = Just (n, str2attr "keyhole")-    toAttrFrTyp n TransitionFilter_Subtype_Left = Just (n, str2attr "left")-    toAttrFrTyp n TransitionFilter_Subtype_LeftCenter = Just (n, str2attr "leftCenter")-    toAttrFrTyp n TransitionFilter_Subtype_LeftToRight = Just (n, str2attr "leftToRight")-    toAttrFrTyp n TransitionFilter_Subtype_OppositeHorizontal = Just (n, str2attr "oppositeHorizontal")-    toAttrFrTyp n TransitionFilter_Subtype_OppositeVertical = Just (n, str2attr "oppositeVertical")-    toAttrFrTyp n TransitionFilter_Subtype_ParallelDiagonal = Just (n, str2attr "parallelDiagonal")-    toAttrFrTyp n TransitionFilter_Subtype_ParallelDiagonalBottomLeft = Just (n, str2attr "parallelDiagonalBottomLeft")-    toAttrFrTyp n TransitionFilter_Subtype_ParallelDiagonalTopLeft = Just (n, str2attr "parallelDiagonalTopLeft")-    toAttrFrTyp n TransitionFilter_Subtype_ParallelVertical = Just (n, str2attr "parallelVertical")-    toAttrFrTyp n TransitionFilter_Subtype_Rectangle = Just (n, str2attr "rectangle")-    toAttrFrTyp n TransitionFilter_Subtype_Right = Just (n, str2attr "right")-    toAttrFrTyp n TransitionFilter_Subtype_RightCenter = Just (n, str2attr "rightCenter")-    toAttrFrTyp n TransitionFilter_Subtype_SixPoint = Just (n, str2attr "sixPoint")-    toAttrFrTyp n TransitionFilter_Subtype_Top = Just (n, str2attr "top")-    toAttrFrTyp n TransitionFilter_Subtype_TopCenter = Just (n, str2attr "topCenter")-    toAttrFrTyp n TransitionFilter_Subtype_TopLeft = Just (n, str2attr "topLeft")-    toAttrFrTyp n TransitionFilter_Subtype_TopLeftClockwise = Just (n, str2attr "topLeftClockwise")-    toAttrFrTyp n TransitionFilter_Subtype_TopLeftCounterClockwise = Just (n, str2attr "topLeftCounterClockwise")-    toAttrFrTyp n TransitionFilter_Subtype_TopLeftDiagonal = Just (n, str2attr "topLeftDiagonal")-    toAttrFrTyp n TransitionFilter_Subtype_TopLeftHorizontal = Just (n, str2attr "topLeftHorizontal")-    toAttrFrTyp n TransitionFilter_Subtype_TopLeftVertical = Just (n, str2attr "topLeftVertical")-    toAttrFrTyp n TransitionFilter_Subtype_TopRight = Just (n, str2attr "topRight")-    toAttrFrTyp n TransitionFilter_Subtype_TopRightClockwise = Just (n, str2attr "topRightClockwise")-    toAttrFrTyp n TransitionFilter_Subtype_TopRightCounterClockwise = Just (n, str2attr "topRightCounterClockwise")-    toAttrFrTyp n TransitionFilter_Subtype_TopRightDiagonal = Just (n, str2attr "topRightDiagonal")-    toAttrFrTyp n TransitionFilter_Subtype_TopToBottom = Just (n, str2attr "topToBottom")-    toAttrFrTyp n TransitionFilter_Subtype_TwoBladeHorizontal = Just (n, str2attr "twoBladeHorizontal")-    toAttrFrTyp n TransitionFilter_Subtype_TwoBladeVertical = Just (n, str2attr "twoBladeVertical")-    toAttrFrTyp n TransitionFilter_Subtype_TwoBoxBottom = Just (n, str2attr "twoBoxBottom")-    toAttrFrTyp n TransitionFilter_Subtype_TwoBoxLeft = Just (n, str2attr "twoBoxLeft")-    toAttrFrTyp n TransitionFilter_Subtype_TwoBoxRight = Just (n, str2attr "twoBoxRight")-    toAttrFrTyp n TransitionFilter_Subtype_TwoBoxTop = Just (n, str2attr "twoBoxTop")-    toAttrFrTyp n TransitionFilter_Subtype_Up = Just (n, str2attr "up")-    toAttrFrTyp n TransitionFilter_Subtype_Vertical = Just (n, str2attr "vertical")-    toAttrFrTyp n TransitionFilter_Subtype_VerticalBottomLeftOpposite = Just (n, str2attr "verticalBottomLeftOpposite")-    toAttrFrTyp n TransitionFilter_Subtype_VerticalBottomSame = Just (n, str2attr "verticalBottomSame")-    toAttrFrTyp n TransitionFilter_Subtype_VerticalLeft = Just (n, str2attr "verticalLeft")-    toAttrFrTyp n TransitionFilter_Subtype_VerticalRight = Just (n, str2attr "verticalRight")-    toAttrFrTyp n TransitionFilter_Subtype_VerticalTopLeftOpposite = Just (n, str2attr "verticalTopLeftOpposite")-    toAttrFrTyp n TransitionFilter_Subtype_VerticalTopSame = Just (n, str2attr "verticalTopSame")-instance XmlAttrType TransitionFilter_Coordinated where-    fromAttrToTyp n (n',v)-	| n==n'     = translate (attr2str v)-	| otherwise = Nothing-      where translate "true" = Just TransitionFilter_Coordinated_True-	    translate "false" = Just TransitionFilter_Coordinated_False-	    translate _ = Nothing-    toAttrFrTyp n TransitionFilter_Coordinated_True = Just (n, str2attr "true")-    toAttrFrTyp n TransitionFilter_Coordinated_False = Just (n, str2attr "false")-instance XmlAttrType TransitionFilter_ClibBoundary where-    fromAttrToTyp n (n',v)-	| n==n'     = translate (attr2str v)-	| otherwise = Nothing-      where translate "parent" = Just TransitionFilter_ClibBoundary_Parent-	    translate "children" = Just TransitionFilter_ClibBoundary_Children-	    translate _ = Nothing-    toAttrFrTyp n TransitionFilter_ClibBoundary_Parent = Just (n, str2attr "parent")-    toAttrFrTyp n TransitionFilter_ClibBoundary_Children = Just (n, str2attr "children")-instance XmlAttrType TransitionFilter_CalcMode where-    fromAttrToTyp n (n',v)-	| n==n'     = translate (attr2str v)-	| otherwise = Nothing-      where translate "discrete" = Just TransitionFilter_CalcMode_Discrete-	    translate "linear" = Just TransitionFilter_CalcMode_Linear-	    translate "paced" = Just TransitionFilter_CalcMode_Paced-	    translate _ = Nothing-    toAttrFrTyp n TransitionFilter_CalcMode_Discrete = Just (n, str2attr "discrete")-    toAttrFrTyp n TransitionFilter_CalcMode_Linear = Just (n, str2attr "linear")-    toAttrFrTyp n TransitionFilter_CalcMode_Paced = Just (n, str2attr "paced")---{-Done-}
− examples/SMIL/SMIL-anim.mod
@@ -1,175 +0,0 @@-<!-- ======================================================================= -->-<!-- SMIL Animation Module  ================================================ -->-<!-- file: SMIL-anim.mod--     This is SMIL 2.0.-     Copyright 2000 W3C (MIT, INRIA, Keio), All Rights Reserved.--        Author:     Patrick Schmitz, Ken Day, Jacco van Ossenbruggen-        Revision:   $Id: SMIL-anim.mod,v 1.1.1.1 2002/03/19 12:29:23 malcolm Exp $--     This DTD module is identified by the PUBLIC and SYSTEM identifiers:--     PUBLIC "-//W3C//ELEMENTS SMIL 2.0 Animation//EN"-     SYSTEM "SMIL-anim.mod"--     ======================================================================= -->---<!-- ============================= Dependencies ============================ -->-<!-- The integrating profile is expected to define the following entities,-     Unless the defaults provided are sufficient.- -->--<!-- SplineAnimation.module entity:  Define as "INCLUDE" if the integrating-     profile includes the SMIL 2.0 SplineAnimation Module, "IGNORE" if not.-     The default is "IGNORE", i.e. by default SplineAnimation is not included-     in the integrating language profile.- -->-<!ENTITY % SplineAnimation.module "IGNORE">--<!-- Animation depends on SMIL Timing, importing the attributes listed-     in the AnimationTime.attrib entity.  If the integrating profile does -     include the MinMaxTiming.module, its default value includes the -     attributes defined in BasicInlineTiming.attrib and inMaxTiming.attrib.-     Otherwise, it is defaulted to BasicInlineTiming.attrib, which is the -     minimum requirement.-     -     Note that the profile can override these defaults by redefining -     AnimationTime.attrib.  The profile is also expected to define -     Fill.attrib.- -->-<!ENTITY % MinMaxTiming.module "IGNORE">-<![%MinMaxTiming.module;[-  <!ENTITY % AnimationTime.attrib "-	%BasicInlineTiming.attrib;-	%MinMaxTiming.attrib;-  ">-]]>-<!ENTITY % AnimationTime.attrib "%BasicInlineTiming.attrib;">-<!ENTITY % Fill.attrib "">--<!ENTITY % animTimingAttrs "-  %AnimationTime.attrib;             -  %Fill.attrib;            -">--<!-- Language Designer chooses to integrate targetElement or xlink attributes.-     To integrate the targetElement attribute, define the entity-     animation-targetElement as "INCLUDE"; to integrate the XLink attributes,-     define animation-XLinkTarget as "INCLUDE".-     -     One or the other MUST be defined.  It is strongly recommended that only one-     of the two be defined.--->--<!ENTITY % animation-targetElement "IGNORE">-<![%animation-targetElement;[-  <!ENTITY % animTargetElementAttr-   "targetElement  IDREF  #IMPLIED"-  >-]]>-<!ENTITY % animTargetElementAttr "">--<!ENTITY % animation-XLinkTarget "IGNORE">-<![%animation-XLinkTarget;[-  <!ENTITY % animTargetElementXLink "-    actuate        (onRequest|onLoad)                  'onLoad' -    href           %URI;                               #IMPLIED-    show           (new | embed | replace)             #FIXED 'embed'-    type           (simple | extended | locator | arc) #FIXED 'simple'-">-]]>-<!ENTITY % animTargetElementXLink "">---<!-- ========================== Attribute Groups =========================== -->--<!-- All animation elements include these attributes -->-<!ENTITY % animAttrsCommon- "%Core.attrib;-  %I18n.attrib;-  %System.attrib;-  %animTimingAttrs;-  %animTargetElementAttr;-  %animTargetElementXLink;"->--<!-- All except animateMotion need an identified target attribute -->-<!ENTITY % animAttrsNamedTarget- "%animAttrsCommon;-  attributeName  CDATA  #REQUIRED-  attributeType  CDATA  #IMPLIED"->--<!-- All except set support the full animation-function specification,-     additive and cumulative animation.-     SplineAnimation adds the attributes keyTimes, keySplines and path,-	 and the calcMode value "spline", to those of BasicAnimation.- -->-<![%SplineAnimation.module;[-  <!ENTITY % splineAnimCalcModeValues "| spline">-  <!ENTITY % splineAnimValueAttrs-   "keyTimes CDATA #IMPLIED-    keySplines CDATA #IMPLIED"-  >-  <!ENTITY % splineAnimPathAttr-   "path CDATA #IMPLIED"-  >-]]>-<!ENTITY % splineAnimCalcModeValues "">-<!ENTITY % splineAnimValueAttrs "">-<!ENTITY % splineAnimPathAttr "">--<!ENTITY % animValueAttrs "-  %BasicAnimation.attrib;-  calcMode   (discrete|linear|paced %splineAnimCalcModeValues;) 'linear'-  %splineAnimValueAttrs;-  additive   (replace | sum) 'replace'-  accumulate (none | sum) 'none'"->---<!-- ========================== Animation Elements ========================= -->--<!ENTITY % animate.attrib  "">-<!ENTITY % animate.content "EMPTY">-<!ENTITY % animate.qname   "animate">-<!ELEMENT %animate.qname; %animate.content;>-<!ATTLIST %animate.qname; %animate.attrib;-  %animAttrsNamedTarget;-  %animValueAttrs;->--<!ENTITY % set.attrib  "">-<!ENTITY % set.content "EMPTY">-<!ENTITY % set.qname   "set">-<!ELEMENT %set.qname; %set.content;>-<!ATTLIST %set.qname; %set.attrib;-  %animAttrsNamedTarget;-  to  CDATA  #IMPLIED->--<!ENTITY % animateMotion.attrib  "">-<!ENTITY % animateMotion.content "EMPTY">-<!ENTITY % animateMotion.qname   "animateMotion">-<!ELEMENT %animateMotion.qname; %animateMotion.content;>-<!ATTLIST %animateMotion.qname; %animateMotion.attrib;-  %animAttrsCommon;-  %animValueAttrs;-  %splineAnimPathAttr;-  origin  (default)  "default"->---<!ENTITY % animateColor.attrib  "">-<!ENTITY % animateColor.content "EMPTY">-<!ENTITY % animateColor.qname   "animateColor">-<!ELEMENT %animateColor.qname; %animateColor.content;>-<!ATTLIST %animateColor.qname; %animateColor.attrib;-  %animAttrsNamedTarget;-  %animValueAttrs;->--<!-- ========================== End Animation ============================= -->-<!-- end of SMIL-anim.mod -->
− examples/SMIL/SMIL-control.mod
@@ -1,71 +0,0 @@-<!-- ================================================================= -->-<!-- SMIL Content Control Module  ==================================== -->-<!-- file: SMIL-control.mod--     This is SMIL 2.0.-     Copyright 2000 W3C (MIT, INRIA, Keio), All Rights Reserved.--     Author:     Jacco van Ossenbruggen, Aaron Cohen-     Revision:   $Id: SMIL-control.mod,v 1.1.1.1 2002/03/19 12:29:23 malcolm Exp $--     This DTD module is identified by the PUBLIC and SYSTEM identifiers:--     PUBLIC "-//W3C//ELEMENTS SMIL 2.0 Content Control//EN"-     SYSTEM "SMIL-control.mod"--     ================================================================= -->--<!ENTITY %  BasicContentControl.module "INCLUDE">-<![%BasicContentControl.module;[-  <!ENTITY % switch.attrib "">-  <!ENTITY % switch.content "EMPTY">-  <!ENTITY % switch.qname "switch">-  -  <!ELEMENT %switch.qname; %switch.content;>-  <!ATTLIST %switch.qname; %switch.attrib;-        %Core.attrib;-        %I18n.attrib;-  >-]]>--<!-- ========================= CustomTest Elements ========================= -->-<!ENTITY %  CustomTestAttributes.module "IGNORE">-<![%CustomTestAttributes.module;[--  <!ENTITY % customTest.attrib "">-  <!ENTITY % customTest.qname "customTest">-  <!ENTITY % customTest.content "EMPTY">-  <!ELEMENT %customTest.qname; %customTest.content;>-  <!ATTLIST %customTest.qname; %customTest.attrib;-	defaultState		(true|false)	      'false'-	override		(allowed|not-allowed) 'not-allowed'-	uid			%URI;                 #IMPLIED-        %Core.attrib;-        %I18n.attrib;-  >-  <!ENTITY % customAttributes.attrib "">-  <!ENTITY % customAttributes.qname "customAttributes">-  <!ENTITY % customAttributes.content "EMPTY">-  <!ELEMENT %customAttributes.qname; %customAttributes.content;>-  <!ATTLIST %customAttributes.qname; %customAttributes.attrib;-        %Core.attrib;-        %I18n.attrib;-  >--]]> <!-- end of CustomTestAttributes -->--<!-- ========================= PrefetchControl Elements ==================== -->-<!ENTITY % PrefetchControl.module "IGNORE">-<![%PrefetchControl.module;[-  <!ENTITY % prefetch.attrib "">-  <!ENTITY % prefetch.qname "prefetch">-  <!ENTITY % prefetch.content "EMPTY">-  <!ELEMENT %prefetch.qname; %prefetch.content;>-  <!ATTLIST %prefetch.qname; %prefetch.attrib;-	mediaSize		CDATA		#IMPLIED-	mediaTime		CDATA		#IMPLIED-	bandwidth		CDATA		#IMPLIED-        %Core.attrib;-        %I18n.attrib;-  >-]]>
− examples/SMIL/SMIL-layout.mod
@@ -1,134 +0,0 @@-<!-- ======================================================================= -->-<!-- SMIL 2.0 Layout Modules =============================================== -->-<!-- file: SMIL-layout.mod--        This is SMIL 2.0.-        Copyright 2000 W3C (MIT, INRIA, Keio), All Rights Reserved.--        Authors:  Jacco van Ossenbruggen, Aaron Cohen-        Revision: $Id: SMIL-layout.mod,v 1.1.1.1 2002/03/19 12:29:24 malcolm Exp $--        This DTD module is identified by the PUBLIC and SYSTEM identifiers:--        PUBLIC "-//W3C//ELEMENTS SMIL 2.0 Layout//EN"-        SYSTEM "SMIL-layout.mod"--        ==================================================================== -->--<!-- ================== BasicLayout ======================================== -->-<!-- ================== BasicLayout Profiling Entities ===================== -->-<!ENTITY % layout.attrib       "">-<!ENTITY % region.attrib       "">-<!ENTITY % rootlayout.attrib   "">-<!ENTITY % layout.content     "EMPTY">-<!ENTITY % region.content     "EMPTY">-<!ENTITY % rootlayout.content "EMPTY">--<!-- ================== BasicLayout Entities =============================== -->-<!ENTITY % viewport-attrs "-        height              CDATA    'auto'-        width               CDATA    'auto'-	close               (never|whenNotActive) 'never'-	open                (always|whenActive)   'always'-        %BackgroundColor.attrib;-        %BackgroundColor-deprecated.attrib;-">--<!ENTITY % region-attrs "-        bottom              CDATA    'auto'-        left                CDATA    'auto'-        right               CDATA    'auto'-        top                 CDATA    'auto'-        z-index             CDATA    #IMPLIED-	showBackground      (always|whenActive) 'always'-	%Fit.attrib;-">--<!-- ================== BasicLayout Elements =============================== -->-<!---     Layout contains the region and root-layout elements defined by-     smil-basic-layout or other elements defined an external layout-     mechanism.--->--<!ENTITY % layout.qname "layout">-<!ELEMENT %layout.qname; %layout.content;>-<!ATTLIST %layout.qname; %layout.attrib;-	%Core.attrib;-	%I18n.attrib;-        type CDATA 'text/smil-basic-layout'->--<!-- ================== Region Element ======================================-->-<!ENTITY % region.qname "region">-<!ELEMENT %region.qname; %region.content;>-<!ATTLIST %region.qname; %region.attrib;-	%Core.attrib;-	%I18n.attrib;-        %viewport-attrs;-        %region-attrs;->--<!-- ================== Root-layout Element =================================-->-<!ENTITY % root-layout.qname "root-layout">-<!ELEMENT %root-layout.qname; %rootlayout.content; >-<!ATTLIST %root-layout.qname; %rootlayout.attrib;-	%Core.attrib;-	%I18n.attrib;-        %viewport-attrs;->---<!-- ================== AudioLayout ======================================== -->-<!ENTITY % AudioLayout.module "IGNORE">-<![%AudioLayout.module;[-  <!-- ================== AudioLayout Entities ============================= -->-  <!ENTITY % audio-attrs "-        soundLevel                        CDATA    '100&#37;'-  ">--  <!-- ================ AudioLayout Elements =============================== -->-  <!-- ================ Add soundLevel to region element =================== -->-  <!ATTLIST %region.qname; %audio-attrs;>-]]> <!-- end AudioLayout.module -->---<!-- ================ MultiWindowLayout ==================================== -->-<!ENTITY % MultiWindowLayout.module "IGNORE">-<![%MultiWindowLayout.module;[-  <!-- ============== MultiWindowLayout Profiling Entities ================= -->-  <!ENTITY % viewport.attrib    "">-  <!ENTITY % viewport.content   "EMPTY">-  -  <!-- ============== MultiWindowLayout Elements =========================== -->-  <!--================= viewport element =================================== -->-  <!ENTITY % viewport.qname "viewport">-  <!ELEMENT %viewport.qname; %viewport.content;>-  <!ATTLIST %viewport.qname; %viewport.attrib;-	%Core.attrib;-	%I18n.attrib;-        %viewport-attrs;-  >-]]> <!-- end MultiWindowLayout.module -->---<!-- ====================== HierarchicalLayout ============================= -->-<!ENTITY % HierarchicalLayout.module "IGNORE">-<![%HierarchicalLayout.module;[-  <!-- ========== HierarchicalLayout Profiling Entities ==================== -->-  <!ENTITY % regPoint.attrib     "">-  <!ENTITY % regPoint.content   "EMPTY">--  <!-- ============ HierarchicalLayout Elements ============================ -->-  <!ENTITY % regPoint.qname "regPoint">-  <!ELEMENT %regPoint.qname; %regPoint.content;>-  <!ATTLIST %regPoint.qname; %regPoint.attrib;-	%Core.attrib;-	%I18n.attrib;-        %Sub-region.attrib;-        %RegistrationPoint.attrib;-  >-]]> <!-- end HierarchicalLayout.module -->---<!-- end of SMIL-layout.mod -->
− examples/SMIL/SMIL-link.mod
@@ -1,105 +0,0 @@-<!-- ======================================================================= -->-<!-- SMIL Linking Module  ================================================== -->-<!-- file: SMIL-link.mod--     This is SMIL 2.0.-     Copyright 2000 W3C (MIT, INRIA, Keio), All Rights Reserved.--        Author:     Jacco van Ossenbruggen, Lloyd Rutledge, Aaron Cohen-        Revision:   $Id: SMIL-link.mod,v 1.1.1.1 2002/03/19 12:29:24 malcolm Exp $--     This DTD module is identified by the PUBLIC and SYSTEM identifiers:--     PUBLIC "-//W3C//ELEMENTS SMIL 2.0 Linking//EN"-     SYSTEM "SMIL-link.mod"--     ======================================================================= -->--<!-- ======================== LinkingAttributes Entities =================== -->-<!ENTITY % linking-attrs "-	sourceLevel             CDATA               '100&#37;'-	destinationLevel        CDATA               '100&#37;'-	sourcePlaystate         (play|pause|stop)   #IMPLIED-	destinationPlaystate    (play|pause|stop)   'play'-	show                    (new|pause|replace) 'replace'-	accesskey               CDATA               #IMPLIED-	tabindex                CDATA               #IMPLIED-	target                  CDATA               #IMPLIED-	external                (true|false)        'false'-	actuate                 (onRequest|onLoad)  'onRequest'-">----<!-- ========================= BasicLinking Elements ======================= -->-<!ENTITY % BasicLinking.module "IGNORE">-<![%BasicLinking.module;[--  <!-- ======================= BasicLinking Entities ======================= -->-  <!ENTITY % Shape "(rect|circle|poly|default)">-  <!ENTITY % Coords "CDATA">-    <!-- comma separated list of lengths -->--  <!ENTITY % a.attrib  "">-  <!ENTITY % a.content "EMPTY">-  <!ENTITY % a.qname   "a">-  <!ELEMENT %a.qname; %a.content;>-  <!ATTLIST %a.qname; %a.attrib;-    %linking-attrs;-    href                      %URI;               #IMPLIED-    %Core.attrib;-    %I18n.attrib;-  >--  <!ENTITY % area.attrib  "">-  <!ENTITY % area.content "EMPTY">-  <!ENTITY % area.qname   "area">-  <!ELEMENT %area.qname; %area.content;>-  <!ATTLIST %area.qname; %area.attrib;-    %linking-attrs;-    shape                     %Shape;             'rect'-    coords                    %Coords;            #IMPLIED-    href                      %URI;               #IMPLIED-    nohref                    (nohref)            #IMPLIED-    alt                       %Text;              #IMPLIED-    %Core.attrib;-    %I18n.attrib;-  >--  <!ENTITY % anchor.attrib  "">-  <!ENTITY % anchor.content "EMPTY">-  <!ENTITY % anchor.qname  "anchor">-  <!ELEMENT %anchor.qname; %anchor.content;>-  <!ATTLIST %anchor.qname; %area.attrib;-    %linking-attrs;-    shape                     %Shape;             'rect'-    coords                    %Coords;            #IMPLIED-    href                      %URI;               #IMPLIED-    nohref                    (nohref)            #IMPLIED-    alt                       %Text;              #IMPLIED-    %Core.attrib;-    %I18n.attrib;-  >-]]> <!-- end of BasicLinking -->--<!-- ======================== ObjectLinking ================================ -->-<!ENTITY % ObjectLinking.module "IGNORE">-<![%ObjectLinking.module;[--  <!ENTITY % Fragment "-    fragment                  CDATA               #IMPLIED-  ">--  <!-- ====================== ObjectLinking Elements ======================= -->-  <!-- add fragment attribute to area, and anchor elements -->-  <!ATTLIST %area.qname;-      %Fragment;-  >--  <!ATTLIST %anchor.qname;-      %Fragment;-  >-]]>-<!-- ======================== End ObjectLinking ============================ -->--<!-- end of SMIL-link.mod -->
− examples/SMIL/SMIL-media.mod
@@ -1,179 +0,0 @@-<!-- ======================================================================= -->-<!-- SMIL 2.0 Media Objects Modules ======================================== -->-<!-- file: SMIL-media.mod--     This is SMIL 2.0.-     Copyright 2000 W3C (MIT, INRIA, Keio), All Rights Reserved.--     Author:     Rob Lanphier, Jacco van Ossenbruggen-     Revision:   $Id: SMIL-media.mod,v 1.1.1.1 2002/03/19 12:29:24 malcolm Exp $--     This DTD module is identified by the PUBLIC and SYSTEM identifiers:--     PUBLIC "-//W3C//ELEMENTS SMIL 2.0 Media Objects//EN"-     SYSTEM "SMIL-media.mod"--     ======================================================================= -->--<!-- ================== Profiling Entities ================================= -->--<!ENTITY % BasicMedia.module "INCLUDE">-<![%BasicMedia.module;[-  <!ENTITY % media-object.content "EMPTY">-  <!ENTITY % media-object.attrib "">--  <!-- ================ Media Objects Entities ============================= -->--  <!ENTITY % mo-attributes-BasicMedia "-        abstract        CDATA   #IMPLIED-        alt             CDATA   #IMPLIED-        author          CDATA   #IMPLIED-        copyright       CDATA   #IMPLIED-        longdesc        CDATA   #IMPLIED-        src             CDATA   #IMPLIED-        type            CDATA   #IMPLIED-  ">-]]>-<!ENTITY % mo-attributes-BasicMedia "">---<!ENTITY % MediaClipping.module "IGNORE">-<![%MediaClipping.module;[-  <!ENTITY % mo-attributes-MediaClipping "-        clipBegin      CDATA   #IMPLIED-        clipEnd        CDATA   #IMPLIED-  ">-]]>-<!ENTITY % mo-attributes-MediaClipping "">--<!ENTITY % MediaClipping.deprecated.module "IGNORE">-<![%MediaClipping.module;[-  <!ENTITY % mo-attributes-MediaClipping-deprecated "-       clip-begin      CDATA   #IMPLIED-        clip-end        CDATA   #IMPLIED-  ">-  ]]>-<!ENTITY % mo-attributes-MediaClipping-deprecated "">--<!ENTITY % MediaParam.module "IGNORE">-<![%MediaParam.module;[-  <!ENTITY % mo-attributes-MediaParam "-        erase        (whenDone|never)	'whenDone'-        mediaRepeat  (preserve|strip)	'preserve'-  ">-]]>-<!ENTITY % mo-attributes-MediaParam "">--<!ENTITY % MediaAccessibility.module "IGNORE">-<![%MediaAccessibility.module;[-  <!ENTITY % mo-attributes-MediaAccessibility "-        readIndex    CDATA           #IMPLIED-  ">-]]>-<!ENTITY % mo-attributes-MediaAccessibility "">---<!ENTITY % mo-attributes "-        %Core.attrib;-        %I18n.attrib;-        %mo-attributes-BasicMedia;-        %mo-attributes-MediaParam;-        %mo-attributes-MediaAccessibility;-        %media-object.attrib;-">--<!---     Most info is in the attributes, media objects are empty or-     have children defined at the language integration level:--->--<!ENTITY % mo-content "%media-object.content;">--<!-- ================== Media Objects Elements ============================= -->-<!-- BasicMedia -->-<!ENTITY % ref.qname        "ref">-<!ENTITY % audio.qname      "audio">-<!ENTITY % img.qname        "img">-<!ENTITY % video.qname      "video">-<!ENTITY % text.qname       "text">-<!ENTITY % textstream.qname "textstream">-<!ENTITY % animation.qname  "animation">--<!ENTITY % ref.content        "%mo-content;">-<!ENTITY % audio.content      "%mo-content;">-<!ENTITY % img.content        "%mo-content;">-<!ENTITY % video.content      "%mo-content;">-<!ENTITY % text.content       "%mo-content;">-<!ENTITY % textstream.content "%mo-content;">-<!ENTITY % animation.content  "%mo-content;">--<!ELEMENT %ref.qname;           %ref.content;>-<!ELEMENT %audio.qname;         %audio.content;>-<!ELEMENT %img.qname;           %img.content;>-<!ELEMENT %video.qname;         %video.content;>-<!ELEMENT %text.qname;          %text.content;>-<!ELEMENT %textstream.qname;    %textstream.content;>-<!ELEMENT %animation.qname;     %animation.content;>--<!ATTLIST %img.qname;           -	%mo-attributes;->-<!ATTLIST %text.qname;          -	%mo-attributes;->-<!ATTLIST %ref.qname;           -        %mo-attributes-MediaClipping;-        %mo-attributes-MediaClipping-deprecated;-	%mo-attributes;->-<!ATTLIST %audio.qname;         -        %mo-attributes-MediaClipping;-        %mo-attributes-MediaClipping-deprecated;-	%mo-attributes;->-<!ATTLIST %video.qname;         -        %mo-attributes-MediaClipping;-        %mo-attributes-MediaClipping-deprecated;-	%mo-attributes;->-<!ATTLIST %textstream.qname;    -        %mo-attributes-MediaClipping;-        %mo-attributes-MediaClipping-deprecated;-	%mo-attributes;->-<!ATTLIST %animation.qname;     -        %mo-attributes-MediaClipping;-        %mo-attributes-MediaClipping-deprecated;-	%mo-attributes;->--<!-- MediaParam -->-<![%MediaParam.module;[--  <!ENTITY % param.qname "param">-  <!ELEMENT %param.qname; EMPTY>--  <!ATTLIST %param.qname;-    %Core.attrib;-    %I18n.attrib;-    name        CDATA          #IMPLIED-    value       CDATA          #IMPLIED-    valuetype   (data|ref|object) "data"-    type        %ContentType;  #IMPLIED-  >-]]>--<!-- BrushMedia -->-<!ENTITY % BrushMedia.module "IGNORE">-<![%BrushMedia.module;[-  <!ENTITY % brush.attrib "">-  <!ENTITY % brush.content "%mo-content;">-  <!ENTITY % brush.qname "brush">-  <!ELEMENT %brush.qname; %brush.content;>-  <!ATTLIST %brush.qname; %brush.attrib; -	%mo-attributes; -        color        CDATA           #IMPLIED-  >-]]>--<!-- end of SMIL-media.mod -->
− examples/SMIL/SMIL-metainformation.mod
@@ -1,48 +0,0 @@-<!-- ================================================================ -->-<!-- SMIL Metainformation Module  =================================== -->-<!-- file: SMIL-metainformation.mod--     This is SMIL 2.0.-     Copyright 2000 W3C (MIT, INRIA, Keio), All Rights Reserved.--     This module declares the meta and metadata elements types and -     its attributes, used to provide declarative document metainformation.--     Author: Thierry Michel, Jacco van Ossenbruggen-     Revision: $Id: SMIL-metainformation.mod,v 1.1.1.1 2002/03/19 12:29:24 malcolm Exp $-   -     This DTD module is identified by the PUBLIC and SYSTEM identifiers:--     PUBLIC "-//W3C//ELEMENTS SMIL 2.0 Document Metadata//EN"-     SYSTEM "SMIL-metainformation.mod"--     ================================================================ -->---<!-- ================== Profiling Entities ========================== -->--<!ENTITY % meta.content     "EMPTY">-<!ENTITY % meta.attrib      "">-<!ENTITY % meta.qname       "meta">--<!ENTITY % metadata.content "EMPTY">-<!ENTITY % metadata.attrib  "">-<!ENTITY % metadata.qname   "metadata">--<!-- ================== meta element ================================ -->--<!ELEMENT %meta.qname; %meta.content;>-<!ATTLIST %meta.qname; %meta.attrib;-  content CDATA #IMPLIED-  name CDATA #REQUIRED        -  >--<!-- ================== metadata element ============================ -->--<!ELEMENT %metadata.qname; %metadata.content;>-<!ATTLIST %metadata.qname; %metadata.attrib;-  %Core.attrib;-  %I18n.attrib;->--<!-- end of SMIL-metadata.mod -->
− examples/SMIL/SMIL-struct.mod
@@ -1,51 +0,0 @@-<!-- ====================================================================== -->-<!-- SMIL Structure Module  =============================================== -->-<!-- file: SMIL-struct.mod--     This is SMIL 2.0.-     Copyright 2000 W3C (MIT, INRIA, Keio), All Rights Reserved.--     This DTD module is identified by the PUBLIC and SYSTEM identifiers:--     PUBLIC "-//W3C//ELEMENTS SMIL 2.0 Document Structure//EN"-     SYSTEM "SMIL-struct.mod"--     Author: Warner ten Kate, Jacco van Ossenbruggen-     Revision: $Id: SMIL-struct.mod,v 1.1.1.1 2002/03/19 12:29:24 malcolm Exp $--     ===================================================================== -->--<!-- ================== SMIL Document Root =============================== -->-<!ENTITY % smil.attrib  "" >-<!ENTITY % smil.content "EMPTY" >-<!ENTITY % smil.qname   "smil" >--<!ELEMENT %smil.qname; %smil.content;>-<!ATTLIST %smil.qname; %smil.attrib;-        %Core.attrib;-        %I18n.attrib;-        xmlns %URI; #FIXED %SMIL.ns;->--<!-- ================== The Document Head ================================ -->-<!ENTITY % head.content "EMPTY" >-<!ENTITY % head.attrib  "" >-<!ENTITY % head.qname   "head" >--<!ELEMENT %head.qname; %head.content;>-<!ATTLIST %head.qname; %head.attrib;-        %Core.attrib;-        %I18n.attrib;->--<!--=================== The Document Body - Timing Root ================== -->-<!ENTITY % body.content "EMPTY" >-<!ENTITY % body.attrib  "" >-<!ENTITY % body.qname   "body" >--<!ELEMENT %body.qname; %body.content;>-<!ATTLIST %body.qname; %body.attrib;-        %Core.attrib;-        %I18n.attrib;->-<!-- end of SMIL-struct.mod -->
− examples/SMIL/SMIL-timing.mod
@@ -1,80 +0,0 @@-<!-- ================================================================= -->-<!-- SMIL Timing and Synchronization Modules ========================= -->-<!-- file: SMIL-timing.mod--     This is SMIL 2.0.-     Copyright 2000 W3C (MIT, INRIA, Keio), All Rights Reserved.--     Author:     Jacco van Ossenbruggen.-     Revision:   $Id: SMIL-timing.mod,v 1.1.1.1 2002/03/19 12:29:24 malcolm Exp $--     This DTD module is identified by the PUBLIC and SYSTEM identifiers:--     PUBLIC "-//W3C//ELEMENTS SMIL 2.0 Timing//EN"-     SYSTEM "SMIL-timing.mod"--     ================================================================= -->---<!-- ================== Timing Elements ============================== -->--<!ENTITY % BasicTimeContainers.module "IGNORE">-<![%BasicTimeContainers.module;[-  <!ENTITY % par.content "EMPTY">-  <!ENTITY % seq.content "EMPTY">-  <!ENTITY % par.attrib  "">-  <!ENTITY % seq.attrib  "">-  <!ENTITY % seq.qname   "seq">-  <!ENTITY % par.qname   "par">--  <!ENTITY % description.attrib "-        abstract        CDATA   #IMPLIED-        author          CDATA   #IMPLIED-        copyright       CDATA   #IMPLIED-  ">--  <!ELEMENT %seq.qname; %seq.content;>-  <!ATTLIST %seq.qname; %seq.attrib;-   %Core.attrib;-   %I18n.attrib;-   %description.attrib;-  >--  <!ELEMENT %par.qname; %par.content;>-  <!ATTLIST %par.qname; %par.attrib;-   %Core.attrib;-   %I18n.attrib;-   %description.attrib;-  >-]]>  <!-- End of BasicTimeContainers.module -->---<!ENTITY % ExclTimeContainers.module "IGNORE">-<![%ExclTimeContainers.module;[-  <!ENTITY % excl.content          "EMPTY">-  <!ENTITY % priorityClass.content "EMPTY">-  <!ENTITY % excl.attrib           "">-  <!ENTITY % priorityClass.attrib  "">-  <!ENTITY % excl.qname            "excl">-  <!ENTITY % priorityClass.qname   "priorityClass">--  <!ELEMENT %excl.qname; %excl.content;>-  <!ATTLIST %excl.qname; %excl.attrib;-   %Core.attrib;-   %I18n.attrib;-   %description.attrib;-  >--  <!ELEMENT %priorityClass.qname; %priorityClass.content;>-  <!ATTLIST %priorityClass.qname; %priorityClass.attrib;-    peers	(stop|pause|defer|never) "stop"-    higher      (stop|pause)             "pause" -    lower       (defer|never)            "defer"-    pauseDisplay (disable|hide|show )    "show"-    %description.attrib;-    %Core.attrib;-    %I18n.attrib;-  >-]]>  <!-- End of ExclTimeContainers.module -->--<!-- end of SMIL-timing.mod -->
− examples/SMIL/SMIL-transition.mod
@@ -1,94 +0,0 @@-<!-- ====================================================================== -->-<!-- SMIL Transition Module  ============================================== -->-<!-- file: SMIL-transition.mod--     This is SMIL 2.0-     Copyright 2000 W3C (MIT, INRIA, Keio), All Rights Reserved.--     Revision:   $Id: SMIL-transition.mod,v 1.1.1.1 2002/03/19 12:29:24 malcolm Exp $--     This DTD module is identified by the PUBLIC and SYSTEM identifiers:--     PUBLIC "-//W3C//ELEMENTS SMIL 2.0 Transition//EN"-     SYSTEM "SMIL-transition.mod"--    --     ====================================================================== -->--<!ENTITY % transition-types "(barWipe|boxWipe|fourBoxWipe|barnDoorWipe|-diagonalWipe|bowTieWipe|miscDiagonalWipe|veeWipe|barnVeeWipe|zigZagWipe|-barnZigZagWipe|miscShapeWipe|triangleWipe|arrowHeadWipe|pentagonWipe|-hexagonWipe|ellipseWipe|eyeWipe|roundRectWipe|starWipe|clockWipe|-pinWheelWipe|singleSweepWipe|fanWipe|doubleFanWipe|doubleSweepWipe|-saloonDoorWipe|windshieldWipe|snakeWipe|spiralWipe|parallelSnakesWipe|-boxSnakesWipe|waterfallWipe|pushWipe|slideWipe|fade)"->--<!ENTITY % transition-subtypes "(bottom-|bottomCenter|bottomLeft|bottomLeftClockwise|bottomLeftCounterClockwise|-bottomLeftDiagonal|bottomRight|bottomRightClockwise|-bottomRightCounterClockwise|bottomRightDiagonal|centerRight|centerTop|-circle|clockwiseBottom|clockwiseBottomRight|clockwiseLeft|clockwiseNine|-clockwiseRight|clockwiseSix|clockwiseThree|clockwiseTop|clockwiseTopLeft|-clockwiseTwelve|cornersIn|cornersOut|counterClockwiseBottomLeft|-counterClockwiseTopRight|crossfade|diagonalBottomLeft|-diagonalBottomLeftOpposite|diagonalTopLeft|diagonalTopLeftOpposite|-diamond|doubleBarnDoor|doubleDiamond|down|fadeFromColor|fadeToColor|-fanInHorizontal|fanInVertical|fanOutHorizontal|fanOutVertical|fivePoint|-fourBlade|fourBoxHorizontal|fourBoxVertical|fourPoint|fromBottom|fromLeft|-fromRight|fromTop|heart|horizontal|horizontalLeft|horizontalLeftSame|-horizontalRight|horizontalRightSame|horizontalTopLeftOpposite|-horizontalTopRightOpposite|keyhole|left|leftCenter|leftToRight|-oppositeHorizontal|oppositeVertical|parallelDiagonal|-parallelDiagonalBottomLeft|parallelDiagonalTopLeft|-parallelVertical|rectangle|right|rightCenter|sixPoint|top|topCenter|-topLeft|topLeftClockwise|topLeftCounterClockwise|topLeftDiagonal|-topLeftHorizontal|topLeftVertical|topRight|topRightClockwise|-topRightCounterClockwise|topRightDiagonal|topToBottom|twoBladeHorizontal|-twoBladeVertical|twoBoxBottom|twoBoxLeft|twoBoxRight|twoBoxTop|up|-vertical|verticalBottomLeftOpposite|verticalBottomSame|verticalLeft|-verticalRight|verticalTopLeftOpposite|verticalTopSame)"->---<!ENTITY  % transition-attrs '-    type         %transition-types;     #IMPLIED-    subtype      %transition-subtypes;  #IMPLIED-    horzRepeat   CDATA                  "0"-    vertRepeat   CDATA                  "0"-    borderWidth  CDATA                  "0"-    borderColor  CDATA                  "black"-    fadeColor	 CDATA		        "black"-    coordinated  (true|false)           "false" -    clibBoundary (parent|children)      "children" -'>--<!ENTITY % transition.attrib  "">-<!ENTITY % transition.content "EMPTY">-<!ENTITY % transition.qname   "transition">-<!ELEMENT %transition.qname; %transition.content;>-<!ATTLIST %transition.qname; %transition.attrib;-    %Core.attrib;-    %I18n.attrib;-    %transition-attrs;-    dur           CDATA              #IMPLIED-    startProgress CDATA              "0.0"-    endProgress   CDATA              "1.0"-    direction     (forward|reverse)  "forward"->--<!ENTITY % transitionFilter.attrib  "">-<!ENTITY % transitionFilter.content "EMPTY">-<!ENTITY % transitionFilter.qname   "transitionFilter">-<!ELEMENT %transitionFilter.qname; %transitionFilter.content;>-<!ATTLIST %transitionFilter.qname; %transitionFilter.attrib;-    %Core.attrib;-    %I18n.attrib;-    %transition-attrs;-    %BasicInlineTiming.attrib;-    %BasicAnimation.attrib;-    calcMode   (discrete|linear|paced) 'linear'->-    -<!-- end of SMIL-transition.mod -->
− examples/SMIL/SMIL20.dtd
@@ -1,108 +0,0 @@-<!-- ....................................................................... -->-<!-- SMIL 2.0 DTD  ......................................................... -->-<!-- file: SMIL20.dtd                                                         --->-<!-- SMIL 2.0 DTD--     This is SMIL 2.0.--     Copyright 1998-2000 World Wide Web Consortium-        (Massachusetts Institute of Technology, Institut National de-         Recherche en Informatique et en Automatique, Keio University).-         All Rights Reserved.--     Permission to use, copy, modify and distribute the SMIL 2.0 DTD and-     its accompanying documentation for any purpose and without fee is-     hereby granted in perpetuity, provided that the above copyright notice-     and this paragraph appear in all copies.  The copyright holders make-     no representation about the suitability of the DTD for any purpose.--     It is provided "as is" without expressed or implied warranty.--        Author:     Jacco van Ossenbruggen-        Revision:   $Id: SMIL20.dtd,v 1.1.1.1 2002/03/19 12:29:24 malcolm Exp $---->-<!-- This is the driver file for the SMIL 2.0 DTD.--     Please use this formal public identifier to identify it:--         "-//W3C//DTD SMIL 2.0//EN"--->--<!ENTITY % NS.prefixed "IGNORE" >-<!ENTITY % SMIL.prefix "" >--<!-- Define the Content Model -->-<!ENTITY % smil-model.mod-    PUBLIC "-//W3C//ENTITIES SMIL 2.0 Document Model 1.0//EN"-           "smil-model-1.mod" >--<!-- Modular Framework Module  ................................... -->-<!ENTITY % smil-framework.module "INCLUDE" >-<![%smil-framework.module;[-<!ENTITY % smil-framework.mod-     PUBLIC "-//W3C//ENTITIES SMIL 2.0 Modular Framework 1.0//EN"-            "smil-framework-1.mod" >-%smil-framework.mod;]]>--<!-- The SMIL 2.0 Profile includes the following sections:-             C. The SMIL Animation Module -             D. The SMIL Content Control Module -             G. The SMIL Layout Module -             H. The SMIL Linking Module -             I. The SMIL Media Object Module -             J. The SMIL Metainformation Module -             K. The SMIL Structure Module -             L. The SMIL Timing and Synchronization Module -             M. Integrating SMIL Timing into other XML-Based Languages -             P. The SMIL Transition effects Module --             The SMIL Streaming Media Object Module is optional.--->--<!ENTITY % streamingmedia.model "IGNORE">-<![%streamingmedia.model;[-  <!ENTITY % streaming-mod  -    PUBLIC "-//W3C//ELEMENTS SMIL 2.0 Streaming Media Objects//EN" -    "SMIL-streamingmedia.mod">-  %streaming-mod;-]]>--<!ENTITY % anim-mod   -  PUBLIC "-//W3C//ELEMENTS SMIL 2.0 Animation//EN"  -  "SMIL-anim.mod">-<!ENTITY % control-mod -  PUBLIC "-//W3C//ELEMENTS SMIL 2.0 Content Control//EN" -  "SMIL-control.mod">-<!ENTITY % layout-mod -  PUBLIC "-//W3C//ELEMENTS SMIL 2.0 Layout//EN"  -  "SMIL-layout.mod">-<!ENTITY % link-mod   -  PUBLIC "-//W3C//ELEMENTS SMIL 2.0 Linking//EN"  -  "SMIL-link.mod">-<!ENTITY % media-mod  -  PUBLIC "-//W3C//ELEMENTS SMIL 2.0 Media Objects//EN" -  "SMIL-media.mod">-<!ENTITY % meta-mod   -  PUBLIC "-//W3C//ELEMENTS SMIL 2.0 Document Metainformation//EN" -  "SMIL-metainformation.mod">-<!ENTITY % struct-mod -  PUBLIC "-//W3C//ELEMENTS SMIL 2.0 Document Structure//EN" -  "SMIL-struct.mod">-<!ENTITY % timing-mod -  PUBLIC "-//W3C//ELEMENTS SMIL 2.0 Timing//EN" -  "SMIL-timing.mod">-<!ENTITY % transition-mod -  PUBLIC "-//W3C//ELEMENTS SMIL 2.0 Transition//EN"-  "SMIL-transition.mod">--%struct-mod;-%anim-mod;-%control-mod;-%meta-mod;-%layout-mod;-%link-mod;-%media-mod;-%timing-mod;-%transition-mod;
− examples/SMIL/smil-attribs-1.mod
@@ -1,205 +0,0 @@-<!-- ...................................................................... -->-<!-- SMIL 2.0 Common Attributes Module  ................................... -->-<!-- file: smil-attribs-1.mod--     This is SMIL 2.0.-     Copyright 1998-2000 W3C (MIT, INRIA, Keio), All Rights Reserved.-     Revision: $Id: smil-attribs-1.mod,v 1.1.1.1 2002/03/19 12:29:24 malcolm Exp $--     This DTD module is identified by the PUBLIC and SYSTEM identifiers:--     PUBLIC "-//W3C//ENTITIES SMIL 2.0 Common Attributes 1.0//EN"-     SYSTEM "smil-attribs-1.mod"--     ...................................................................... -->--<!-- Common Attributes--     This module declares the common attributes for the SMIL DTD Modules.--->--<!ENTITY % SMIL.pfx "">--<!ENTITY % Id.attrib- "%SMIL.pfx;id           ID                       #IMPLIED"->--<!ENTITY % Class.attrib- "%SMIL.pfx;class        CDATA                    #IMPLIED"->--<!ENTITY % Title.attrib- "%SMIL.pfx;title        %Text;                   #IMPLIED"->--<!ENTITY % Core.extra.attrib "" >--<!ENTITY % Core.attrib- "%Id.attrib;-  %Class.attrib;-  %Title.attrib;-  %Core.extra.attrib;"->--<!ENTITY % I18n.extra.attrib "" >-<!ENTITY % I18n.attrib "-  xml:lang %LanguageCode; #IMPLIED-  %I18n.extra.attrib;"->--<!-- ================== BasicLayout ======================================= -->-<!ENTITY % Region.attrib "- %SMIL.pfx;region         CDATA #IMPLIED-">--<!ENTITY % Fill.attrib "- %SMIL.pfx;fill         (remove|freeze|hold|transition) #IMPLIED-">--<!-- ================== HierarchicalLayout ======================================= -->-<!ENTITY % BackgroundColor.attrib "- %SMIL.pfx;backgroundColor     CDATA    #IMPLIED-">-<!ENTITY % BackgroundColor-deprecated.attrib "- %SMIL.pfx;background-color     CDATA    #IMPLIED-">--<!ENTITY % Sub-region.attrib "- %SMIL.pfx;top     CDATA    'auto'- %SMIL.pfx;bottom  CDATA    'auto'- %SMIL.pfx;left    CDATA    'auto'- %SMIL.pfx;right   CDATA    'auto'-">--<!ENTITY % Fit.attrib "- %SMIL.pfx;fit            (hidden|fill|meet|scroll|slice)    'hidden'-">--<!-- ================ Registration Point attribute for media elements ============ -->-<!-- integrating language using HierarchicalLayout must include regPoint   -->-<!-- attribute on media elements for regPoint elements to be useful        -->--<!ENTITY % RegistrationPoint.attrib "- %SMIL.pfx;regPoint  CDATA    #IMPLIED- %SMIL.pfx;regAlign  (topLeft|topMid|topRight|midLeft|center|-                     midRight|bottomLeft|bottomMid|bottomRight) #IMPLIED-">--<!--=================== Content Control =======================-->-<!-- customTest Attribute -->-<!ENTITY % CustomTest.attrib "-        %SMIL.pfx;customTest              IDREF           #IMPLIED-">--<!-- ========================= SkipContentControl Module ========================= -->-<!ENTITY % skipContent.attrib "-	%SMIL.pfx;skip-content		(true|false)	'true'-">--<!-- Switch Parameter Attributes --> --<!ENTITY % System.attrib "-        %CustomTest.attrib;-        %SMIL.pfx;systemBitrate                	CDATA		#IMPLIED-	%SMIL.pfx;systemCaptions		(on|off)	#IMPLIED-	%SMIL.pfx;systemLanguage		CDATA		#IMPLIED-	%SMIL.pfx;systemOverdubOrSubtitle	(overdub|subtitle) #IMPLIED-	%SMIL.pfx;systemRequired		NMTOKEN		#IMPLIED-	%SMIL.pfx;systemScreenSize		CDATA		#IMPLIED-	%SMIL.pfx;systemScreenDepth		CDATA		#IMPLIED-	%SMIL.pfx;systemAudioDesc		(on|off)	#IMPLIED-	%SMIL.pfx;systemOperatingSystem		NMTOKEN		#IMPLIED-	%SMIL.pfx;systemCPU			NMTOKEN		#IMPLIED-	%SMIL.pfx;systemComponent		CDATA		#IMPLIED--	%SMIL.pfx;system-bitrate		CDATA		#IMPLIED-	%SMIL.pfx;system-captions		(on|off)	#IMPLIED-	%SMIL.pfx;system-language		CDATA		#IMPLIED-	%SMIL.pfx;system-overdub-or-caption	(overdub|caption) #IMPLIED-	%SMIL.pfx;system-required		NMTOKEN		#IMPLIED-	%SMIL.pfx;system-screen-size		CDATA		#IMPLIED-	%SMIL.pfx;system-screen-depth		CDATA		#IMPLIED-">--<!-- SMIL Animation Module  ================================================ -->-<!ENTITY % BasicAnimation.attrib "-  %SMIL.pfx;values     CDATA #IMPLIED-  %SMIL.pfx;from       CDATA #IMPLIED-  %SMIL.pfx;to         CDATA #IMPLIED-  %SMIL.pfx;by         CDATA #IMPLIED-">--<!-- SMIL Timing Module  =================================================== -->-<!ENTITY % BasicInlineTiming.attrib "-  %SMIL.pfx;dur                       %TimeValue;                  #IMPLIED-  %SMIL.pfx;repeatCount               %TimeValue;                  #IMPLIED-  %SMIL.pfx;repeatDur                 %TimeValue;                  #IMPLIED-  %SMIL.pfx;begin                     %TimeValue;                  #IMPLIED-  %SMIL.pfx;end                       %TimeValue;                  #IMPLIED-">--<!ENTITY % MinMaxTiming.attrib "-  %SMIL.pfx;min                       %TimeValue;                  #IMPLIED-  %SMIL.pfx;max                       %TimeValue;                  #IMPLIED-">--<!ENTITY % BasicInlineTiming-deprecated.attrib "-  %SMIL.pfx;repeat                   %TimeValue;                   #IMPLIED-">--<!ENTITY % BasicTimeContainers.attrib "-  %SMIL.pfx;endsync                  (first|last|all|IDREF)        'last'-  %Fill.attrib;-">--<!ENTITY % TimeContainerAttributes.attrib "-  %SMIL.pfx;timeAction            CDATA                        #IMPLIED-  %SMIL.pfx;timeContainer         CDATA                        #IMPLIED-">--<!ENTITY % RestartTiming.attrib "-  %SMIL.pfx;restart               (always|whenNotActive|never) 'always'-">--<!ENTITY % RestartDefaultTiming.attrib "-  %SMIL.pfx;restartDefault        (inherit|always|never|whenNotActive) 'always'-">--<!ENTITY % SyncBehavior.attrib "-  %SMIL.pfx;syncBehavior  (canSlip|locked|independent) #IMPLIED-  %SMIL.pfx;syncTolerence %TimeValue;                  #IMPLIED-">--<!ENTITY % SyncBehaviorDefault.attrib "-  %SMIL.pfx;syncBehaviorDefault   (canSlip|locked|independent) #IMPLIED-  %SMIL.pfx;syncToleranceDefault  %TimeValue;                  #IMPLIED-">--<!ENTITY % SyncMaster.attrib "-  %SMIL.pfx;syncMaster    (true|false)                 'false'-">--<!-- ================== Time Manipulations ================================= -->-<!ENTITY % TimeManipulations.attrib "-  %SMIL.pfx;accelerate		%Number;	'0'-  %SMIL.pfx;decelerate		%Number;	'0'-  %SMIL.pfx;autoReverse         (true|false)    'false'-  %SMIL.pfx;speed		%Number;	'1.0'-">--<!-- ================== Streaming Media ==================================== -->-<!ENTITY % Streaming-media.attrib "-  %SMIL.pfx;port                  CDATA   #IMPLIED-  %SMIL.pfx;rtpformat             CDATA   #IMPLIED-  %SMIL.pfx;transport             CDATA   #IMPLIED-">--<!ENTITY % Streaming-timecontainer.attrib "-  %SMIL.pfx;control               CDATA   #IMPLIED-">--<!-- ================== Transitions Media ================================== -->-<!ENTITY % Transition.attrib "- %SMIL.pfx;transIn                IDREF        #IMPLIED- %SMIL.pfx;transOut               IDREF        #IMPLIED-">
− examples/SMIL/smil-datatypes-1.mod
@@ -1,41 +0,0 @@-<!-- ...................................................................... -->-<!-- SMIL 2.0 Datatypes Module  ........................................... -->-<!-- file: smil-datatypes-1.mod--     This is SMIL 2.0.-     Copyright 1998-2000 W3C (MIT, INRIA, Keio), All Rights Reserved.-     Revision: $Id: smil-datatypes-1.mod,v 1.1.1.1 2002/03/19 12:29:24 malcolm Exp $--     This DTD module is identified by the PUBLIC and SYSTEM identifiers:--     PUBLIC "-//W3C//ENTITIES SMIL 2.0 Datatypes 1.0//EN"-     SYSTEM "smil-datatypes-1.mod"--     ....................................................................... -->--<!-- Datatypes--     defines containers for the following datatypes, many of-     these imported from other specifications and standards.--->--<!ENTITY % Character "CDATA">-    <!-- a single character from [ISO10646] -->-<!ENTITY % ContentType "CDATA">-    <!-- media type, as per [RFC2045] -->-<!ENTITY % LanguageCode "NMTOKEN">-    <!-- a language code, as per [RFC1766] -->-<!ENTITY % LanguageCodes "CDATA">-    <!-- comma-separated list of language codes, as per [RFC1766] -->-<!ENTITY % Number "CDATA">-    <!-- one or more digits -->-<!ENTITY % Script "CDATA">-    <!-- script expression -->-<!ENTITY % Text "CDATA">-    <!-- used for titles etc. -->-<!ENTITY % TimeValue "CDATA">-    <!-- a Number, possibly with its dimension, or a reserved -         word like 'indefinite' -->-<!ENTITY % URI.datatype "CDATA" >-<!ENTITY % URI "CDATA" >-    <!-- used for URI references -->
− examples/SMIL/smil-framework-1.mod
@@ -1,67 +0,0 @@-<!-- ...................................................................... -->-<!-- SMIL 2.0 Modular Framework Module  ................................... -->-<!-- file: smil-framework-1.mod--     This is SMIL 2.0.-     Copyright 1998-2000 W3C (MIT, INRIA, Keio), All Rights Reserved.--     This DTD module is identified by the PUBLIC and SYSTEM identifiers:--     PUBLIC "-//W3C//ENTITIES SMIL 2.0 Modular Framework 1.0//EN"-     SYSTEM "smil-framework-1.mod"--     Revision: $Id: smil-framework-1.mod,v 1.1.1.1 2002/03/19 12:29:24 malcolm Exp $-     ....................................................................... -->--<!-- Modular Framework--     This required module instantiates the modules needed-     to support the SMIL 2.0 modularization model, including:--        +  datatypes-        +  namespace-qualified names-        +  common attributes-        +  document model--     The Intrinsic Events module is ignored by default but-     occurs in this module because it must be instantiated-     prior to Attributes but after Datatypes.--->--<!-- The (still to be determined) SMIL namespace: -->-<!ENTITY % SMIL.ns       "'http://www.w3.org/TR/REC-smil/SMIL20'">--<!ENTITY % smil-datatypes.module "INCLUDE" >-<![%smil-datatypes.module;[-<!ENTITY % smil-datatypes.mod-     PUBLIC "-//W3C//ENTITIES SMIL 2.0 Datatypes 1.0//EN"-            "smil-datatypes-1.mod" >-%smil-datatypes.mod;]]>--<!ENTITY % smil-qname.module "INCLUDE" >-<![%smil-qname.module;[-<!ENTITY % smil-qname.mod-     PUBLIC "-//W3C//ENTITIES SMIL 2.0 Qualified Names 1.0//EN"-            "smil-qname-1.mod" >-%smil-qname.mod;]]>--<!ENTITY % smil-events.module "IGNORE" >-<![%smil-events.module;[-<!ENTITY % smil-events.mod-     PUBLIC "-//W3C//ENTITIES SMIL 2.0 Intrinsic Events 1.0//EN"-            "smil-events-1.mod" >-%smil-events.mod;]]>--<!ENTITY % smil-attribs.module "INCLUDE" >-<![%smil-attribs.module;[-<!ENTITY % smil-attribs.mod-     PUBLIC "-//W3C//ENTITIES SMIL 2.0 Common Attributes 1.0//EN"-            "smil-attribs-1.mod" >-%smil-attribs.mod;]]>--<!ENTITY % smil-model.module "INCLUDE" >-<![%smil-model.module;[-<!-- A content model MUST be defined by the driver file -->-%smil-model.mod;]]>--<!-- end of smil-framework-1.mod -->
− examples/SMIL/smil-model-1.mod
@@ -1,223 +0,0 @@-<!-- .................................................................... -->-<!-- SMIL 2.0 Document Model Module ..................................... -->-<!-- file: smil-model-1.mod--     This is SMIL 2.0.-     Copyright 1998-2000 W3C (MIT, INRIA, Keio), All Rights Reserved.--     This DTD module is identified by the PUBLIC and SYSTEM identifiers:--     PUBLIC "-//W3C//ENTITIES SMIL 2.0 Document Model 1.0//EN"-     SYSTEM "smil-model-1.mod"--     Author: Warner ten Kate, Jacco van Ossenbruggen, Aaron Cohen-     Revision: $Id: smil-model-1.mod,v 1.1.1.1 2002/03/19 12:29:24 malcolm Exp $-     ....................................................................... -->--<!---        This file defines the SMIL 2.0 Language Document Model.-        All attributes and content models are defined in the second-        half of this file.  We first start with some utility definitions.-        These are mainly used to simplify the use of Modules in the-        second part of the file.---->-<!-- ================== Util: Head ========================================= -->-<!ENTITY % head-meta.content       "metadata?,meta*">-<!ENTITY % head-layout.content     "layout|switch">-<!ENTITY % head-control.content    "customAttributes">-<!ENTITY % head-transition.content "transition+, meta*">--<!--=================== Util: Body - Content Control ======================= -->-<!ENTITY % content-control "switch|prefetch">--<!--=================== Util: Body - Animation ========================= -->-<!ENTITY % animation.elements "animate|set|animateMotion|animateColor">--<!--=================== Util: Body - Media ========================= -->--<!ENTITY % media-object "audio|video|animation|text|img|textstream|ref|brush-                               |%animation.elements;">--<!--=================== Util: Body - Timing ================================ -->-<!ENTITY % BasicTimeContainers.class "par|seq">-<!ENTITY % ExclTimeContainers.class "excl">-<!ENTITY % timecontainer.class- "%BasicTimeContainers.class;|%ExclTimeContainers.class;">-<!ENTITY % timecontainer.content- "%timecontainer.class;|%media-object;|%content-control;|a">--<!ENTITY % smil-time.attrib "- %BasicInlineTiming.attrib;- %MinMaxTiming.attrib;- %RestartTiming.attrib;- %SyncBehavior.attrib;- %SyncBehaviorDefault.attrib;- %BasicInlineTiming-deprecated.attrib;- %Fill.attrib;-">--<!ENTITY % timecontainer.attrib "- %BasicInlineTiming.attrib;- %MinMaxTiming.attrib;- %BasicTimeContainers.attrib;- %RestartTiming.attrib;- %SyncBehavior.attrib;- %SyncBehaviorDefault.attrib;- %BasicInlineTiming-deprecated.attrib;- %System.attrib;-">--<!-- ====================================================================== -->-<!-- ====================================================================== -->-<!-- ====================================================================== -->--<!-- -     The actual content model and attribute definitions for each module -     sections follow below.--->--<!-- ================== Content Control =================================== -->-<!ENTITY % BasicContentControl.module  "INCLUDE">-<!ENTITY % CustomTestAttributes.module "INCLUDE">-<!ENTITY % PrefetchControl.module      "INCLUDE">-<!ENTITY % SkipContentControl.module   "INCLUDE">--<!ENTITY % switch.content "(layout|%timecontainer.class;|%media-object;|-			   %content-control;|a)*">-<!ENTITY % prefetch.content "%switch.content;">-<!ENTITY % customAttributes.content "(customTest)+">--<!ENTITY % switch.attrib            "%System.attrib; %skipContent.attrib;">-<!ENTITY % prefetch.attrib          "%timecontainer.attrib; %skipContent.attrib; ">-<!ENTITY % customAttributes.attrib  "%skipContent.attrib;">-<!ENTITY % customTest.attrib        "%skipContent.attrib;">--<!-- ================== Animation ========================================= -->-<!ENTITY % BasicAnimation.module "INCLUDE">--<!-- choose targetElement or XLink: -->-<!ENTITY % animation-targetElement "INCLUDE">-<!ENTITY % animation-XLinkTarget   "IGNORE">--<!ENTITY % animate.content "EMPTY">-<!ENTITY % animateColor.content "EMPTY">-<!ENTITY % animateMotion.content "EMPTY">-<!ENTITY % set.content "EMPTY">--<!ENTITY % animate.attrib        "%skipContent.attrib;">-<!ENTITY % animateColor.attrib   "%skipContent.attrib;">-<!ENTITY % animateMotion.attrib  "%skipContent.attrib;">-<!ENTITY % set.attrib            "%skipContent.attrib;">--<!-- ================== Layout ============================================ -->-<!ENTITY % BasicLayout.module        "INCLUDE">-<!ENTITY % AudioLayout.module        "INCLUDE">-<!ENTITY % MultiWindowLayout.module  "INCLUDE">-<!ENTITY % HierarchicalLayout.module "INCLUDE">--<!ENTITY % layout.content "(region|viewport|root-layout|regPoint)*">-<!ENTITY % region.content "(region)*">-<!ENTITY % rootlayout.content "(region)*">-<!ENTITY % viewport.content "(region)*">-<!ENTITY % regPoint.content "EMPTY">--<!ENTITY % rootlayout.attrib      "%skipContent.attrib;">-<!ENTITY % viewport.attrib        "%skipContent.attrib;">-<!ENTITY % region.attrib          "%skipContent.attrib;">-<!ENTITY % regPoint.attrib        "%skipContent.attrib;">--<!-- ================== Linking =========================================== -->-<!ENTITY % LinkingAttributes.module "INCLUDE">-<!ENTITY % BasicLinking.module      "INCLUDE">-<!ENTITY % ObjectLinking.module   "INCLUDE">--<!ENTITY % a.content      "(%timecontainer.class;|%media-object;|-                            %content-control;)*">-<!ENTITY % area.content	  "EMPTY">-<!ENTITY % anchor.content "EMPTY">--<!ENTITY % a.attrib      "%smil-time.attrib;">-<!ENTITY % area.attrib   "%smil-time.attrib; %skipContent.attrib;"> -<!ENTITY % anchor.attrib "%smil-time.attrib; %skipContent.attrib;"> --<!-- ================== Media  ============================================ -->-<!ENTITY % BasicMedia.module                     "INCLUDE">-<!ENTITY % MediaClipping.module                  "INCLUDE">-<!ENTITY % MediaClipping.deperecated.module      "INCLUDE">-<!ENTITY % MediaClipMarkers.module               "INCLUDE">-<!ENTITY % MediaParam.module                     "INCLUDE">-<!ENTITY % BrushMedia.module                     "INCLUDE">-<!ENTITY % MediaAccessibility.module             "INCLUDE">--<!ENTITY % media-object.content "(%animation.elements;|anchor|area-                                  |transitionFilter|param)*">-<!ENTITY % media-object.attrib "-  %smil-time.attrib;-  %System.attrib;-  %Region.attrib;-  %Transition.attrib;-  %BackgroundColor.attrib;-  %BackgroundColor-deprecated.attrib;-  %Sub-region.attrib;-  %RegistrationPoint.attrib;-  %Fit.attrib;-">--<!ENTITY % brush.attrib        "%skipContent.attrib;">--<!-- ================== Metadata ========================================== -->-<!ENTITY % meta.content     "EMPTY">-<!ENTITY % meta.attrib      "%skipContent.attrib;">--<!ENTITY % metadata.content "EMPTY">-<!ENTITY % metadata.attrib  "%skipContent.attrib;">--<!-- ================== Structure ========================================= -->-<!ENTITY % Structure.module "INCLUDE">-<!ENTITY % smil.content "(head?,body?)">-<!ENTITY % head.content "-	((%head-meta.content;)?,-	((%head-layout.content;),meta*)?,-	 (%head-transition.content;)?,-	((%head-control.content;),meta*)?)">-<!ENTITY % body.content "(%timecontainer.class;|%media-object;|-                          %content-control;|a)*">--<!ENTITY % body.attrib "%timecontainer.attrib; %Region.attrib;">--<!-- ================== Transitions ======================================= -->-<!ENTITY % BasicTransitions.module        "INCLUDE">-<!ENTITY % MultiElementTransitions.module "INCLUDE">--<!ENTITY % transition.content "(transitionFilter*)">-<!ENTITY % transition.attrib "%skipContent.attrib;">-<!ENTITY % transitionFilter.attrib "%skipContent.attrib;">--<!-- ================== Timing ============================================ -->-<!ENTITY % BasicInlineTiming.module      "INCLUDE">-<!ENTITY % SyncbaseTiming.module         "INCLUDE">-<!ENTITY % EventTiming.module            "INCLUDE">-<!ENTITY % WallclockTiming.module        "INCLUDE">-<!ENTITY % MultiSyncArcTiming.module     "INCLUDE">-<!ENTITY % MediaMarkerTiming.module      "INCLUDE">-<!ENTITY % MinMaxTiming.module           "INCLUDE">-<!ENTITY % BasicTimeContainers.module    "INCLUDE">-<!ENTITY % ExclTimeContainers.module     "INCLUDE">-<!ENTITY % PrevTiming.module             "INCLUDE">-<!ENTITY % RestartTiming.module          "INCLUDE">-<!ENTITY % SyncBehavior.module           "INCLUDE">-<!ENTITY % SyncBehaviorDefault.module    "INCLUDE">-<!ENTITY % RestartDefault.module         "INCLUDE">-<!ENTITY % FillDefault.module            "INCLUDE">--<!ENTITY %  par.attrib "%timecontainer.attrib; %Region.attrib;">-<!ENTITY %  seq.attrib "%timecontainer.attrib; %Region.attrib;">-<!ENTITY % excl.attrib "%timecontainer.attrib; %Region.attrib; %skipContent.attrib;">--<!ENTITY %  par.content "(%timecontainer.content;)*">-<!ENTITY %  seq.content "(%timecontainer.content;)*">-<!ENTITY % excl.content "((%timecontainer.content;)*|priorityClass+)">--<!ENTITY % priorityClass.attrib  "%skipContent.attrib;">-<!ENTITY % priorityClass.content "((%timecontainer.content;)*|priorityClass+)">
− examples/SMIL/smil-qname-1.mod
@@ -1,164 +0,0 @@-<!-- ....................................................................... -->-<!-- SMIL Qualified Names Module  .......................................... -->-<!-- file: smil-qname-1.mod--     This is SMIL.-     Copyright 1998-2000 W3C (MIT, INRIA, Keio), All Rights Reserved.-     Revision: $Id: smil-qname-1.mod,v 1.1.1.1 2002/03/19 12:29:24 malcolm Exp $ SMI--     This DTD module is identified by the PUBLIC and SYSTEM identifiers:--       PUBLIC "-//W3C//ENTITIES SMIL Qualified Names 1.0//EN"-       SYSTEM "smil-qname-1.mod"--     ....................................................................... -->--<!-- SMIL Qualified Names--     This module is contained in two parts, labeled Section 'A' and 'B':--       Section A declares parameter entities to support namespace--       qualified names, namespace declarations, and name prefixing -       for SMIL and extensions.-    -       Section B declares parameter entities used to provide-       namespace-qualified names for all SMIL element types:--         %animation.qname; the xmlns-qualified name for <animation>-         %video.qname;     the xmlns-qualified name for <video>-         ...--     SMIL extensions would create a module similar to this one, -     using the '%smil-qname-extra.mod;' parameter entity to insert -     it within Section A.  A template module suitable for this purpose -     ('template-qname-1.mod') is included in the XHTML distribution.--->--<!-- Section A: SMIL XML Namespace Framework :::::::::::::::::::: -->--<!-- 1. Declare the two parameter entities used to support XLink,-        first the parameter entity container for the URI used to-        identify the XLink namespace:--->-<!ENTITY % XLINK.xmlns "http://www.w3.org/1999/xlink" >--<!-- This contains the XLink namespace declaration attribute.--->-<!ENTITY % XLINK.xmlns.attrib-     "xmlns:xlink  %URI.datatype;           #FIXED '%XLINK.xmlns;'"->--<!-- 2. Declare parameter entities (eg., %SMIL.xmlns;) containing -        the namespace URI for the SMIL namespace, and any namespaces-        included by SMIL:--->--<!ENTITY % SMIL.xmlns  "http://www.w3.org/TR/REC-smil/SMIL20" >--<!-- 3. Declare parameter entities (eg., %SMIL.prefix;) containing-        the default namespace prefix string(s) to use when prefixing -        is enabled. This may be overridden in the DTD driver or the-        internal subset of an document instance.--     NOTE: As specified in [XMLNAMES], the namespace prefix serves -     as a proxy for the URI reference, and is not in itself significant.--->-<!ENTITY % SMIL.prefix  "" >--<!-- 4. Declare a %SMIL.prefixed; conditional section keyword, used-        to activate namespace prefixing. The default value should -        inherit '%NS.prefixed;' from the DTD driver, so that unless -        overridden, the default behaviour follows the overall DTD -        prefixing scheme.--->-<!ENTITY % NS.prefixed "IGNORE" >-<!ENTITY % SMIL.prefixed "%NS.prefixed;" >--<!-- 5. Declare parameter entities (eg., %SMIL.pfx;) containing the -        colonized prefix(es) (eg., '%SMIL.prefix;:') used when -        prefixing is active, an empty string when it is not.--->-<![%SMIL.prefixed;[-<!ENTITY % SMIL.pfx  "%SMIL.prefix;:" >-]]>-<!ENTITY % SMIL.pfx  "" >---<!-- declare qualified name extensions here -->-<!ENTITY % smil-qname-extra.mod "" >-%smil-qname-extra.mod;--<!-- 6. The parameter entity %SMIL.xmlns.extra.attrib; may be-        redeclared to contain any non-SMIL namespace declaration -        attributes for namespaces embedded in SMIL. The default -        is an empty string.  XLink should be included here if used -        in the DTD and not already included by a previously-declared -        %*.xmlns.extra.attrib;.--->-<!ENTITY % SMIL.xmlns.extra.attrib "" >--<!-- 7. The parameter entity %NS.prefixed.attrib; is defined to be-        the prefix for SMIL elements if any and whatever is in-		SMIL.xmlns.extra.attrib.--->-<![%SMIL.prefixed;[-<!ENTITY % NS.prefixed.attrib-	"xmlns:%SMIL.prefix;	%URI.datatype;	#FIXED	'%SMIL.xmlns;'-	 %SMIL.xmlns.extra.attrib; " >-]]>-<!ENTITY % NS.prefixed.attrib "%SMIL.xmlns.extra.attrib;" >---<!-- Section B: SMIL Qualified Names ::::::::::::::::::::::::::::: -->--<!-- This section declares parameter entities used to provide-     namespace-qualified names for all SMIL element types.--->--<!ENTITY % animate.qname "%SMIL.pfx;animate" >-<!ENTITY % set.qname "%SMIL.pfx;set" >-<!ENTITY % animateMotion.qname "%SMIL.pfx;animateMotion" >-<!ENTITY % animateColor.qname "%SMIL.pfx;animateColor" >--<!ENTITY % switch.qname "%SMIL.pfx;switch" >-<!ENTITY % customTest.qname "%SMIL.pfx;customTest" >-<!ENTITY % customAttributes.qname "%SMIL.pfx;customAttributes" >-<!ENTITY % prefetch.qname "%SMIL.pfx;prefetch" >--<!ENTITY % layout.qname "%SMIL.pfx;layout" >-<!ENTITY % region.qname "%SMIL.pfx;region" >-<!ENTITY % root-layout.qname "%SMIL.pfx;root-layout" >-<!ENTITY % viewport.qname "%SMIL.pfx;viewport" >-<!ENTITY % regPoint.qname "%SMIL.pfx;regPoint" >--<!ENTITY % a.qname "%SMIL.pfx;a" >-<!ENTITY % area.qname "%SMIL.pfx;area" >-<!ENTITY % anchor.qname "%SMIL.pfx;anchor" >--<!ENTITY % ref.qname "%SMIL.pfx;ref" >-<!ENTITY % audio.qname "%SMIL.pfx;audio" >-<!ENTITY % img.qname "%SMIL.pfx;img" >-<!ENTITY % video.qname "%SMIL.pfx;video" >-<!ENTITY % text.qname "%SMIL.pfx;text" >-<!ENTITY % textstream.qname "%SMIL.pfx;textstream" >-<!ENTITY % animation.qname "%SMIL.pfx;animation" >-<!ENTITY % param.qname "%SMIL.pfx;param" >-<!ENTITY % brush.qname "%SMIL.pfx;brush" >--<!ENTITY % meta.qname "%SMIL.pfx;meta" >-<!ENTITY % metadata.qname "%SMIL.pfx;metadata" >--<!ENTITY % rtpmap.qname "%SMIL.pfx;rtpmap" >--<!ENTITY % smil.qname "%SMIL.pfx;smil" >-<!ENTITY % head.qname "%SMIL.pfx;head" >-<!ENTITY % body.qname "%SMIL.pfx;body" >--<!ENTITY % seq.qname "%SMIL.pfx;seq" >-<!ENTITY % par.qname "%SMIL.pfx;par" >-<!ENTITY % excl.qname "%SMIL.pfx;excl" >--<!ENTITY % transition.qname "%SMIL.pfx;transition" >-<!ENTITY % transitionFilter.qname "%SMIL.pfx;transitionFilter" >--<!-- end of smil-qname-1.mod -->
− examples/SimpleTest.hs
@@ -1,43 +0,0 @@-module Main where--import List (isPrefixOf)-import Text.XML.HaXml.XmlContent-import Text.XML.HaXml.Types-import Text.PrettyPrint.HughesPJ (render)-import Text.XML.HaXml.Pretty     (document)---- Test stuff-value1 :: ([(Bool,Int)],(String,Maybe Char))-value1 = ([(True,42),(False,0)],("Hello World",Just 'x'))--data MyType a = ConsA Int a-              | ConsB String deriving Eq-              {-! derive : Haskell2Xml !-}---instance Haskell2Xml a => Haskell2Xml (MyType a) where-    toHType v = Defined "MyType" [toHType a]-                    [Constr "ConsA" [toHType a] [Prim "Int" "int", toHType a]-                    ,Constr "ConsB" [] [String]-                    ]-              where (ConsA _ a) = v-    toContents v@(ConsA n a) = [mkElemC (showConstr 0 (toHType v))-                                  (concat [toContents n, toContents a])]-    toContents v@(ConsB s) = [mkElemC (showConstr 1 (toHType v)) (toContents s)]-    fromContents (CElem (Elem constr [] cs) : etc)-      | "ConsA-" `isPrefixOf` constr =-        (\(i,cs')-> (\(a,_) -> (ConsA i a,etc))-          (fromContents cs')) (fromContents cs)-      | "ConsB" `isPrefixOf` constr =-        (\(s,_)-> (ConsB s, etc)) (fromContents cs)---value2 :: (MyType [Int], MyType ())-value2  = (ConsA 2 [42,0], ConsB "hello world")----main = do (putStrLn . render . document . toXml) value2--main = putStrLn-         (if value2 == (fst . fromContents . toContents) value2 then "success"-          else "failure")-        
− examples/SimpleTestBool.hs
@@ -1,16 +0,0 @@-module Main where--import List (isPrefixOf)-import Text.XML.HaXml.XmlContent-import Text.XML.HaXml.Types-import Text.PrettyPrint.HughesPJ (render)-import Text.XML.HaXml.Pretty     (document)---- Test stuff---value1 :: ([(Bool,Int)],(String,Maybe Char))-value1 = True----main = do (putStrLn . render . document . toXml) value2--main = fWriteXml "/dev/tty" value1-        
− examples/SimpleTestD.hs
@@ -1,103 +0,0 @@-module Main where--import IO-import System (getArgs)---import List (isPrefixOf)--import Text.XML.HaXml.XmlContent---- Test stuff-data MyType a = ConsA Int a-              | ConsB String-          {-! derive : XmlContent !-}--instance Eq a => Eq (MyType a) where-  (ConsA a b) == (ConsA c d) = a==c && b==d-  (ConsB e)   == (ConsB f)   = e `isPrefixOf` f || f `isPrefixOf` e-  _           == _           = False--{---- Hand-written example of preferred instance declaration.-instance Haskell2Xml a => Haskell2Xml (MyType a) where-    toHType v = Defined "MyType" [toHType a]-                    [Constr "ConsA" [toHType a] [Prim "Int" "int", toHType a]-                    ,Constr "ConsB" [] [String]-                    ]-              where (ConsA _ a) = v-    toContents v@(ConsA n a) = [mkElemC (showConstr 0 (toHType v))-                                  (concat [toContents n, toContents a])]-    toContents v@(ConsB s) = [mkElemC (showConstr 1 (toHType v)) (toContents s)]-    fromContents (CElem (Elem constr [] cs) : etc)-      | "ConsA-" `isPrefixOf` constr =-        (\(i,cs')-> (\(a,_) -> (ConsA i a,etc))-          (fromContents cs')) (fromContents cs)-      | "ConsB" `isPrefixOf` constr =-        (\(s,_)-> (ConsB s, etc)) (fromContents cs)--}--value1 :: Maybe ([(Bool,Int)],(String,Maybe Char))-value1 = Just ([(True,42),(False,0)],("Hello World",Nothing))--value2 :: (MyType [Int], MyType ())-value2  = (ConsA 2 [42,0], ConsB "hello world")--value3 :: MyType [Int]-value3  = ConsA 2 [42,0]---- Main wrapper-main =-  getArgs >>= \args->-  if length args /= 3 then-    putStrLn "Usage: <app> [1|2|3] [-w|-r] <xmlfile>"-  else-    let (arg0:arg1:arg2:_) = args in-    ( case arg1 of-         "-w"-> return (stdout,WriteMode)-         "-r"-> return (stdin,ReadMode)-         _   -> fail ("Usage: <app> [-r|-w] <xmlfile>") ) >>= \(std,mode)->-    ( if arg2=="-" then return std-      else openFile arg2 mode ) >>= \f->-    ( case arg0 of-         "1" -> checkValue f mode value1-         "2" -> checkValue f mode value2-         "3" -> checkValue f mode value3-         _   -> fail ("Usage: <app> [-r|-w] <xmlfile>") )--checkValue f mode value =-    case mode of-      WriteMode-> hPutXml f value-      ReadMode -> do ivalue <- hGetXml f-                     putStrLn (if ivalue==value then "success" else "failure")----    WriteMode-> (hPutStrLn f . render . document . toXml) value1---    ReadMode -> hGetContents f >>= \content ->---                let ivalue = (fromXml . xmlParse) content in---                (putStrLn . render . document . toXml) (ivalue `asTypeOf` value1) >>---                putStrLn (if ivalue == value1 then "success" else "failure")----- Machine generated stuff-{-* Generated by DrIFT-v1.0 : Look, but Don't Touch. *-}-instance (Haskell2Xml a) => Haskell2Xml (MyType a) where-    toHType v =-	Defined "MyType" [a]-		[Constr "ConsA" [a] [toHType aa,toHType ab],-		 Constr "ConsB" [] [toHType ac]]-      where-	(ConsA aa ab) = v-	(ConsB ac) = v-	(a) = toHType ab-    fromContents (CElem (Elem constr [] cs):etc)-	| "ConsA" `isPrefixOf` constr =-	    (\(aa,cs00)-> (\(ab,_)-> (ConsA aa ab, etc)) (fromContents cs00))-	    (fromContents cs)-	| "ConsB" `isPrefixOf` constr =-	    (\(ac,_)-> (ConsB ac, etc)) (fromContents cs)-    fromContents (CElem (Elem constr _ _):etc) =-        error ("expected ConsA or ConsB, got "++constr)-    toContents v@(ConsA aa ab) =-	[mkElemC (showConstr 0 (toHType v)) (concat [toContents aa,-						     toContents ab])]-    toContents v@(ConsB ac) =-	[mkElemC (showConstr 1 (toHType v)) (toContents ac)]-
− examples/Types.hs
@@ -1,20 +0,0 @@-module DTypes where--import Text.XML.HaXml.XmlContent hiding (Name)---- data types for a simple test program--data Person = Person Name Email [Rating] Version {-! derive : XmlContent !-}--newtype Name = Name String {-! derive : XmlContent !-}-newtype Email = Email String {-! derive : XmlContent !-}-newtype Version = Version Int {-! derive : XmlContent !-}--data Rating = Rating SubjectID Interest Skill {-! derive : XmlContent !-}--newtype SubjectID = SubjectID Int {-! derive : XmlContent !-}-newtype Interest = Interest Score {-! derive : XmlContent !-}-newtype Skill = Skill Score {-! derive : XmlContent !-}--data Score = ScoreNone | ScoreLow | ScoreMedium | ScoreHigh {-! derive : XmlContent !-}-
− examples/album.dtd
@@ -1,34 +0,0 @@-<!DOCTYPE album [-<!ELEMENT album (title, artist, recording?, coverart, catalogno*,-                 personnel, track*, notes) >-<!ELEMENT title (#PCDATA) >-<!ELEMENT artist (#PCDATA) >-<!ELEMENT recording EMPTY>-    <!ATTLIST recording date CDATA #IMPLIED-                        place CDATA #IMPLIED>-<!ELEMENT coverart (location)? >-    <!ATTLIST coverart style CDATA #REQUIRED>-<!ELEMENT location EMPTY >-    <!ATTLIST location thumbnail CDATA #IMPLIED-                       fullsize CDATA #IMPLIED>-<!ELEMENT catalogno EMPTY >-    <!ATTLIST catalogno label CDATA #REQUIRED-                        number CDATA #REQUIRED-                        format (CD | LP | MiniDisc) #IMPLIED-                        releasedate CDATA #IMPLIED-                        country CDATA #IMPLIED>-<!ELEMENT personnel (player)+ >-<!ELEMENT player EMPTY >-    <!ATTLIST player name CDATA #REQUIRED-                     instrument CDATA #REQUIRED>-<!ELEMENT track EMPTY>-    <!ATTLIST track title CDATA #REQUIRED-                    credit CDATA #IMPLIED-                    timing CDATA #IMPLIED>-<!ELEMENT notes (#PCDATA | albumref | trackref)* >-    <!ATTLIST notes author CDATA #IMPLIED>-<!ELEMENT albumref (#PCDATA)>-    <!ATTLIST albumref link CDATA #REQUIRED>-<!ELEMENT trackref (#PCDATA)>-    <!ATTLIST trackref link CDATA #IMPLIED>-]>
− examples/album.xml
@@ -1,40 +0,0 @@-<?xml version='1.0'?>-<!DOCTYPE album SYSTEM "album.dtd">-<album-  ><title>Time Out</title-  ><artist>Dave Brubeck Quartet</artist-  ><recording date="June-August 1959" place="NYC"-  /><coverart style='abstract'-    ><location thumbnail='pix/small/timeout.jpg'-              fullsize='pix/covers/timeout.jpg'-  /></coverart--  ><catalogno label='Columbia' number='CL 1397' format='mono'-  /><catalogno label='Columbia' number='CS 8192' format='stereo'-  /><catalogno label='Columbia' number='CPK 1181' format='LP' country='Korea'-  /><catalogno label='Sony/CBS' number='Legacy CK 40585' format='CD'--  /><personnel-    ><player name='Dave Brubeck' instrument='piano'-    /><player name='Paul Desmond' instrument='alto sax'-    /><player name='Eugene Wright' instrument='bass'-    /><player name='Joe Morello' instrument='drums'-  /></personnel--  ><track title='Blue Rondo &agrave; la Turk' credit='Brubeck' timing='6m42s'-  /><track title='Strange Meadow Lark' credit='Brubeck'  timing='7m20s'-  /><track title='Take Five' credit='Desmond'  timing='5m24s'-  /><track title='Three To Get Ready' credit='Brubeck'  timing='5m21s'-  /><track title="Kathy's Waltz" credit='Brubeck'  timing='4m48s'-  /><track title="'Everybody's Jumpin'" credit='Brubeck'  timing='4m22s'-  /><track title='Pick Up Sticks' credit='Brubeck'  timing='4m16s'--  /><notes-    >Possibly the DBQ's most famous album, this contains-    <trackref link='#3'>Take Five</trackref>, the most famous jazz track-    of that period.  These experiments in different time signatures are-    what Dave Brubeck is most remembered for.  Recorded Jun-Aug 1959 in-    NYC.  See also the sequel,-       <albumref link='cbs-timefurthout'>Time Further Out</albumref>.-  </notes-></album>
− examples/subjdb.xml
@@ -1,53 +0,0 @@-<!DOCTYPE Person-XML  [-<!ELEMENT Version (int)>-<!ENTITY %Version '(Version)'>-<!ELEMENT ScoreHigh EMPTY>-<!ELEMENT ScoreMedium EMPTY>-<!ELEMENT ScoreLow EMPTY>-<!ELEMENT ScoreNone EMPTY>-<!ENTITY %Score '(ScoreNone|ScoreLow|ScoreMedium|ScoreHigh)'>-<!ELEMENT Skill (%Score;)>-<!ENTITY %Skill '(Skill)'>-<!ELEMENT Interest (%Score;)>-<!ENTITY %Interest '(Interest)'>-<!ATTLIST int value CDATA #REQUIRED>-<!ELEMENT int EMPTY>-<!ELEMENT SubjectID (int)>-<!ENTITY %SubjectID '(SubjectID)'>-<!ELEMENT Rating (%SubjectID;,%Interest;,%Skill;)>-<!ENTITY %Rating '(Rating)'>-<!ELEMENT list-Rating %Rating;*>-<!ELEMENT Email (string)>-<!ENTITY %Email '(Email)'>-<!ELEMENT string (#PCDATA)>-<!ELEMENT Name (string)>-<!ENTITY %Name '(Name)'>-<!ELEMENT Person (%Name;,%Email;,list-Rating,%Version;)>-<!ENTITY %Person '(Person)'>-<!ELEMENT Person-XML %Person;>-]>-<Person-XML-  ><Person-    ><Name-      ><string-	>Rob Noble</string></Name-    ><Email-      ><string-	>rjn</string></Email-    ><list-Rating-      ><Rating-	><SubjectID-	  ><int value="1"/></SubjectID-	><Interest-	  ><ScoreNone/></Interest-	><Skill-	  ><ScoreLow/></Skill></Rating-      ><Rating-	><SubjectID-	  ><int value="2"/></SubjectID-	><Interest-	  ><ScoreMedium/></Interest-	><Skill-	  ><ScoreHigh/></Skill></Rating></list-Rating-    ><Version-      ><int value="1"/></Version></Person></Person-XML>
− rpm.spec
@@ -1,119 +0,0 @@-%define ghc_version 6.2--Summary: Haskell utilities for processing XML-Name: HaXml-Version: 1.19-Release: 1-License: GPL/LGPL-Group: Development/Languages/Haskell-URL: http://www.haskell.org/HaXml/-Source0: %{name}-%{version}.tar.gz-NoSource: 0-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot--%description-HaXml is a collection of utilities for parsing, filtering,-transforming, and generating XML documents using Haskell.-Its basic facilities include:--    * a parser for XML,-    * a separate error-correcting parser for HTML,-    * an XML validator,-    * pretty-printers for XML and HTML, -    * a combinator library for XML transformation,-    * a translator from DTD to Haskell datatypes.---%package ghc%{ghc_version}-Summary: Haskell library for processing XML-Group: Development/Languages/Haskell-Requires: ghc = %{ghc_version}-BuildRequires: ghc = %{ghc_version}--%description ghc%{ghc_version}-HaXml is a collection of utilities for using XML from Haskell.--This package contains the library built for ghc-%{ghc-version}.--%package doc-Summary: Haskell utilities for processing XML documentation-Group: Development/Languages/Haskell--%description doc-HaXml is a collection of utilities for using XML from Haskell.--This package contains the documentation.--%define ghclibdir %{_libdir}/ghc-%{ghc_version}--%prep-%setup -q--%build-./configure --buildwith=ghc-%{ghc_version} --prefix=%{buildroot}%{_bindir}-make--%install-rm -rf $RPM_BUILD_ROOT-perl -pi -e "s|^%{_prefix}|%{buildroot}%{_prefix}|" obj/ghc/{ghcincdir,ghclibdir}-mkdirhier %{buildroot}%{_bindir}-mkdirhier %{buildroot}%{ghclibdir}/imports/HaXml-make install-filesonly-cp -p obj/ghc/pkg.conf %{buildroot}%{ghclibdir}/imports/HaXml/package.conf--%clean-rm -rf $RPM_BUILD_ROOT--%post ghc%{ghc_version}-ghc-pkg-%{ghc_version} --update-package < %{ghclibdir}/imports/HaXml/package.conf--%preun ghc%{ghc_version}-ghc-pkg-%{ghc_version} --remove-package=%{name}--%files-%defattr(-,root,root,-)-%{_bindir}/*-%doc COPYRIGHT LICENCE-GPL LICENCE-LGPL README--%files ghc%{ghc_version}-%defattr(-,root,root,-)-%{ghclibdir}-%doc COPYRIGHT LICENCE-GPL LICENCE-LGPL README examples--%files doc-%defattr(-,root,root,-)-%doc docs--%changelog--* Tue Mar 16 2004 Malcolm Wallace <malcolm@cs.york.ac.uk> 1.12-1-- Updated to HaXml 1.14--* Tue Mar 16 2004 Malcolm Wallace <malcolm@cs.york.ac.uk> 1.12-1-- Updated to HaXml 1.12-- Licence has changed to GPL + LPGL--* Mon Mar 15 2004 Bjorn Bringert <bjorn@bringert.net> 1.11-1-- Updated to HaXml 1.11-- Removed newline that broke postinstall script--* Mon Dec 22 2003 Bjorn Bringert <bjorn@bringert.net> 1.09-5-- Updated to GHC 6.2--* Mon Dec  8 2003 Bjorn Bringert <bjorn@bringert.net> 1.09-4-- Updated to GHC 6.0.1-- Removed newline that broke install rule in spec--* Tue Jun 10 2003 Jens Petersen <petersen@haskell.org> - 1.09-3-- fix post script package location and preun script package name-- no need to make the ghci object file--* Tue Jun 10 2003 Jens Petersen <petersen@haskell.org> - 1.09-2-- add doc files-- include examples in lib package-- add doc package--* Tue Jun 10 2003 Jens Petersen <petersen@haskell.org> - 1.09-1-- Initial packaging.--
− script/echo.c
@@ -1,20 +0,0 @@-#include <stdio.h>--int main (int argc, char** argv) {-  int i=0;-  if (argc>1) {-    if (strcmp(argv[1],"-n")==0) {-      for (i=2; i<argc; i++) {-        fputs(argv[i],stdout);-        if (i+1!=argc) putchar(' ');-      }-    } else {-      for (i=1; i<argc; i++) {-        fputs(argv[i],stdout);-        if (i+1!=argc) putchar(' ');-      }-      putchar('\n');-    }-  } else putchar('\n');-  exit(0);-}
− src/Makefile
@@ -1,129 +0,0 @@-SOFTWARE = HaXml-VERSION = 1.19.7--LIBSRCS = \-	Text/XML/HaXml.hs Text/XML/HaXml/Combinators.hs Text/XML/HaXml/Lex.hs \-	Text/XML/HaXml/Posn.hs \-	Text/XML/HaXml/Parse.hs Text/XML/HaXml/Pretty.hs \-	Text/XML/HaXml/Types.hs Text/XML/HaXml/Validate.hs \-	Text/XML/HaXml/Wrappers.hs \-	Text/XML/HaXml/OneOfN.hs \-	Text/XML/HaXml/ParseLazy.hs \-	Text/XML/HaXml/ByteStringPP.hs \-	Text/XML/HaXml/TypeMapping.hs \-	Text/XML/HaXml/XmlContent.hs \-	Text/XML/HaXml/XmlContent/Parser.hs \-	Text/XML/HaXml/XmlContent/Haskell.hs \-	Text/XML/HaXml/Verbatim.hs Text/XML/HaXml/Escape.hs \-	Text/XML/HaXml/SAX.hs \-	Text/XML/HaXml/ShowXmlLazy.hs \-	Text/XML/HaXml/Html/Generate.hs Text/XML/HaXml/Html/Parse.hs \-	Text/XML/HaXml/Html/Pretty.hs \-	Text/XML/HaXml/Html/ParseLazy.hs \-	Text/XML/HaXml/Xtract/Combinators.hs \-	Text/XML/HaXml/Xtract/Lex.hs \-	Text/XML/HaXml/Xtract/Parse.hs \--LIBOBJS = $(patsubst %.hs, %.o, $(LIBSRCS))--TOOLSRCS = \-	Text/XML/HaXml/DtdToHaskell/TypeDef.hs \-	Text/XML/HaXml/DtdToHaskell/Convert.hs \-	Text/XML/HaXml/DtdToHaskell/Instance.hs \-	tools/DtdToHaskell.hs tools/Xtract.hs tools/Validate.hs \- 	tools/Canonicalise.hs tools/MkOneOf.hs \- 	tools/CanonicaliseLazy.hs tools/XtractLazy.hs--TOOLSET = \-	../../DtdToHaskell$(EXE) ../../Xtract$(EXE) ../../Validate$(EXE) \-	../../Canonicalise$(EXE) ../../MkOneOf$(EXE) \-	../../CanonicaliseLazy$(EXE) ../../XtractLazy$(EXE)--EXE = $(shell cat ../exe)-INSTALLDIR = $(shell cat ../prefix)-WHOLEARCHIVE = $(shell cat ../ldopt)--# The caller *must* set the HC variable.-COMPILER := $(findstring ghc, $(HC))-ifeq "$(COMPILER)" "ghc"-COMPILEXEC = $(HC) --make -cpp -i. $(shell cat ghcpkgs) \-		-package polyparse -DVERSION=$(VERSION)-COMPILE  = $(COMPILEXEC) -package-name HaXml-$(VERSION)-RENAME   = $(shell cat ../out)-endif-COMPILER := $(findstring nhc98, $(HC))-ifeq "$(COMPILER)" "nhc98"-COMPILEXEC = hmake -hc=$(HC) -I. -K4M +CTS -H8M -CTS -package base \-		-package polyparse -package fps -DVERSION=$(VERSION)-COMPILE  = $(COMPILEXEC)-RENAME   = echo Built-endif--.PHONY: all libs toolset--all: libs toolset-libs: libHSHaXml.a-toolset: $(TOOLSET)-install-filesonly-ghc: libs $(INSTALLDIR)-	cp libHSHaXml.a `cat ghclibdir`-	-ranlib `cat ghclibdir`/libHSHaXml.a	# ignore if fails on Linux-	-cp HSHaXml.o `cat ghclibdir`		# file may not exist on MacOS X-	rm -rf `cat ghcincdir`/HaXml-	mkdir -p `cat ghcincdir`/HaXml-	cp interfaces.tar `cat ghcincdir`/HaXml-	cd `cat ghcincdir`/HaXml; tar xf interfaces.tar; rm interfaces.tar-	cp $(TOOLSET) $(INSTALLDIR)-install-filesonly-nhc98: libs $(INSTALLDIR)-	cp libHSHaXml.a `cat nhc98libdir`/`harch`-	-ranlib `cat nhc98libdir`/`harch`/libHSHaXml.a-	rm -rf `cat nhc98incdir`/HaXml-	mkdir -p `cat nhc98incdir`/HaXml-	cp interfaces.tar `cat nhc98incdir`/packages/HaXml-	cd `cat nhc98incdir`/packages/HaXml; tar xf interfaces.tar; rm interfaces.tar-	cp $(TOOLSET) $(INSTALLDIR)-install-ghc: install-filesonly-ghc HaXml.pkgconf-	`cat ghcpkgcmd` --remove-package=HaXml || true	# ignore any error-	`cat ghcpkgcmd` --add-package <pkg.conf || \-	`cat ghcpkgcmd` register HaXml.pkgconf-	echo "you can safely ignore any errors from --add-package"-install-nhc98: install-filesonly-nhc98-install-tools-hugs: toolset-hugs $(INSTALLDIR)-	cp $(patsubst ../../%, %, ${TOOLSET}) $(INSTALLDIR)--# update the sources if necessary-$(LIBSRCS) $(TOOLSRCS) Makefile: %: ../../src/%-	cp $< $@-HaXml.pkgconf: ../../HaXml.cabal ghcincdirraw ghclibdirraw-	cp ../../HaXml.cabal $@-	echo "import-dirs:	`cat ghcincdirraw`HaXml" >>$@-	echo "library-dirs:	`cat ghclibdirraw`" >>$@-	echo "depends:		base, haskell98, polyparse" >>$@-	echo "hs-libraries:	HS$(SOFTWARE)" >>$@----# packaged library-libHSHaXml.a: $(LIBSRCS)-	$(COMPILE) $(LIBSRCS)-	ar r libHSHaXml.a $(LIBOBJS)-	-ld -r $(WHOLEARCHIVE) -o HSHaXml.o libHSHaXml.a	# for GHCi only-	tar cf interfaces.tar `find Text -name *.hi -print`---# standalone tools-$(TOOLSET): $(LIBSRCS) $(TOOLSRCS)-	cd tools; $(COMPILEXEC) -i.. $(patsubst ../../%${EXE}, %, $@)-	cd tools; $(RENAME) $(patsubst ../../%, %, $@)-	mv $(patsubst ../../%, tools/%, $@) ../..--toolset-hugs:-	for file in tools/*.hs ;\-	do tool=`basename $$file .hs` ;\-	   echo '#!'`which runhugs` >$$tool ;\-	   cat $$file >>$$tool ;\-	   chmod +x $$tool ;\-	done--$(INSTALLDIR):-	if [ ! -d $(INSTALLDIR) ] ; then mkdir -p $(INSTALLDIR); fi-
src/Text/XML/HaXml.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE CPP #-} #define dummy	-- just to ensure cpp gets called on this file -- | This is just a convenient way of bunching the XML combinators --   together with some other things you are likely to want at the@@ -27,10 +28,7 @@ import Text.XML.HaXml.Wrappers    (fix2Args,processXmlWith) import Text.XML.HaXml.Verbatim import Text.XML.HaXml.Escape+import Text.XML.HaXml.Version  import Text.PrettyPrint.HughesPJ  (render) --- | The version of the library.-version :: String-version  = "VERSION"-		-- expect cpp to fill in value
src/Text/XML/HaXml/ByteStringPP.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE CPP #-} -- | This is a fast non-pretty-printer for turning the internal representation --   of generic structured XML documents into Lazy ByteStrings. --   Like in Text.Xml.HaXml.Pretty, there is one pp function for each type in@@ -20,13 +21,19 @@   ,   cp   ) where +#if MIN_VERSION_base(4,11,0)+import Prelude hiding (maybe,either,elem,concat,(<>))+#else import Prelude hiding (maybe,either,elem,concat)-import Maybe hiding (maybe)+#endif++import Data.Maybe hiding (maybe) import Data.List (intersperse) --import Data.ByteString.Lazy hiding (pack,map,head,any,singleton,intersperse,join)-import Data.ByteString.Lazy.Char8 (ByteString(), concat, pack, singleton, intercalate-                                  , append, elem, empty)+import Data.ByteString.Lazy.Char8 (ByteString(), concat, pack, singleton+                                  , intercalate, append, elem, empty) import Text.XML.HaXml.Types+import Text.XML.HaXml.Namespaces  either :: (t -> t1) -> (t2 -> t1) -> Either t t2 -> t1 either f _ (Left x)  = f x@@ -43,15 +50,15 @@ infixl 6 <+> infixl 5 $$ (<>)   :: ByteString   -> ByteString -> ByteString -- Beside-hcat   :: [ByteString] -> ByteString                 -- List version of <>+hcat   :: [ByteString] -> ByteString               -- List version of <> (<+>)  :: ByteString   -> ByteString -> ByteString -- Beside, separated by space-hsep   :: [ByteString] -> ByteString                 -- List version of <+>+hsep   :: [ByteString] -> ByteString               -- List version of <+> ($$)   :: ByteString   -> ByteString -> ByteString -- Above; if there is no                                                    -- overlap, it "dovetails" vcat   :: [ByteString] -> ByteString       -- List version of $$--- cat    :: [ByteString] -> ByteString       -- Either hcat or vcat+-- cat    :: [ByteString] -> ByteString    -- Either hcat or vcat sep    :: [ByteString] -> ByteString       -- Either hsep or vcat--- fcat   :: [ByteString] -> ByteString       -- ``Paragraph fill'' version of cat+-- fcat   :: [ByteString] -> ByteString    -- ``Paragraph fill'' version of cat fsep   :: [ByteString] -> ByteString       -- ``Paragraph fill'' version of sep nest   :: Int -> ByteString -> ByteString  -- Nested @@ -63,11 +70,11 @@ hcat = Data.ByteString.Lazy.Char8.concat hsep = Data.ByteString.Lazy.Char8.intercalate (singleton ' ') vcat = Data.ByteString.Lazy.Char8.intercalate (singleton '\n')-_  = hcat+-- cat  = hcat sep  = hsep text :: [Char] -> ByteString text = pack--- _ = cat+-- fsep = cat fsep = sep nest _ b = pack " " <> b parens :: ByteString -> ByteString@@ -113,7 +120,7 @@                                   hd <> text ">"                              else hd <+> text " [" $$                                   vcat (Prelude.map markupdecl ds) $$ text "]>"-                           where hd = text "<!DOCTYPE" <+> text n <+>+                           where hd = text "<!DOCTYPE" <+> qname n <+>                                       maybe externalid eid markupdecl (Element e)     = elementdecl e markupdecl (AttList a)     = attlistdecl a@@ -127,18 +134,23 @@ -- extsubsetdecl (ExtConditionalSect c) = conditionalsect c --extsubsetdecl (ExtPEReference p e)   = peref p -element (Elem n as []) = text "<" <> text n <+>+element (Elem n as []) = text "<" <> qname n <+>                          fsep (Prelude.map attribute as) <> text "/>" element e@(Elem n as cs) --  | any isText cs    = text "<" <> text n <+> fsep (map attribute as) <> --                       text ">" <> hcat (map content cs) <>---                       text "</" <> text n <> text ">"-    | isText (head cs) = text "<" <> text n <+> fsep (Prelude.map attribute as) <>+--                       text "</" <> qname n <> text ">"+    | isText (head cs) = text "<" <> qname n <> attributes as <>                          text ">" <> hcat (Prelude.map content cs) <>-                         text "</" <> text n <> text ">"-    | otherwise        = let (d,c) = carryelem e empty-                         in d <> c+                         text "</" <> qname n <> text ">"+    | otherwise        = vcat [ text "<" <> qname n <> attributes as <> text ">"+                              , nest 2 (vcat (Prelude.map content cs))+                              , text "</" <> qname n <> text ">"+                              ] +attributes [] = empty+attributes as@(_:_) = text " " <> fsep (Prelude.map attribute as)+ isText :: Content t -> Bool isText (CString _ _ _) = True isText (CRef _ _)      = True@@ -147,16 +159,17 @@ carryelem :: Element t -> ByteString -> (ByteString, ByteString) carryelem (Elem n as []) c                        = ( c <>-                           text "<" <> text n <+> fsep (Prelude.map attribute as)+                           text "<" <> qname n <+> fsep (Prelude.map attribute as)                          , text "/>") carryelem (Elem n as cs) c---  | any isText cs    =  ( c <> element e, empty)-    | otherwise        =  let (cs0,d0) = carryscan carrycontent cs (text ">")+{-  | any isText cs    =  ( c <> element e, empty)+    | otherwise -}     =  let (cs0,d0) = carryscan carrycontent cs empty                           in                           ( c <>-                            text "<" <> text n <+> fsep (Prelude.map attribute as) $$+                            text "<" <> qname n <+> fsep (Prelude.map attribute as) <> text ">" $$+                            -- This is wrong. It includes the close tag of the previous one                             nest 2 (vcat cs0) <> --- $$-                            d0 <> text "</" <> text n+                            d0 <> text "</" <> qname n                           , text ">") carrycontent :: Content t -> ByteString -> (ByteString, ByteString) carrycontent (CElem e _) c   = carryelem e c@@ -189,7 +202,7 @@ --carrycontent (d,c) (CMisc m)   = (d $$ c <> misc m,     empty)  -attribute (n,v)             = text n <> text "=" <> attvalue v+attribute (n,v)             = text (printableName n) <> text "=" <> attvalue v content (CElem e _)         = element e content (CString False s _) = chardata s content (CString True s _)  = cdsect s@@ -197,7 +210,7 @@ content (CMisc m _)         = misc m  elementdecl :: ElementDecl -> ByteString-elementdecl (ElementDecl n cs) = text "<!ELEMENT" <+> text n <+>+elementdecl (ElementDecl n cs) = text "<!ELEMENT" <+> qname n <+>                                  contentspec cs <> text ">" contentspec :: ContentSpec -> ByteString contentspec EMPTY              = text "EMPTY"@@ -205,7 +218,7 @@ contentspec (Mixed m)          = mixed m contentspec (ContentSpec c)    = cp c --contentspec (ContentPE p cs)   = peref p-cp (TagName n m)       = text n <> modifier m+cp (TagName n m)       = qname n <> modifier m cp (Choice cs m)       = parens (hcat (intersperse (text "|") (Prelude.map cp cs))) <>                            modifier m cp (Seq cs m)          = parens (hcat (intersperse (text ",") (Prelude.map cp cs))) <>@@ -219,14 +232,14 @@ mixed :: Mixed -> ByteString mixed  PCDATA          = text "(#PCDATA)" mixed (PCDATAplus ns)  = text "(#PCDATA |" <+>-                         hcat (intersperse (text "|") (Prelude.map text ns)) <>+                         hcat (intersperse (text "|") (Prelude.map qname ns)) <>                          text ")*"  attlistdecl :: AttListDecl -> ByteString-attlistdecl (AttListDecl n ds) = text "<!ATTLIST" <+> text n <+>+attlistdecl (AttListDecl n ds) = text "<!ATTLIST" <+> qname n <+>                                  fsep (Prelude.map attdef ds) <> text ">" attdef :: AttDef -> ByteString-attdef (AttDef n t d)          = text n <+> atttype t <+> defaultdecl d+attdef (AttDef n t d)          = qname n <+> atttype t <+> defaultdecl d atttype :: AttType -> ByteString atttype  StringType            = text "CDATA" atttype (TokenizedType t)      = tokenizedtype t@@ -320,21 +333,23 @@ ev (EVRef r)                   = reference r pubidliteral :: PubidLiteral -> ByteString pubidliteral (PubidLiteral s)-    | toWord8 '"' `elem` (pack s) = text "'" <> text s <> text "'"+    | toWord8 '"' `elem` pack s = text "'" <> text s <> text "'"     | otherwise                = text "\"" <> text s <> text "\"" systemliteral :: SystemLiteral -> ByteString systemliteral (SystemLiteral s)-    | toWord8 '"' `elem` (pack s) = text "'" <> text s <> text "'"+    | toWord8 '"' `elem` pack s = text "'" <> text s <> text "'"     | otherwise                = text "\"" <> text s <> text "\"" chardata, cdsect :: [Char] -> ByteString chardata s                     = {-if all isSpace s then empty else-} text s cdsect c                       = text "<![CDATA[" <> chardata c <> text "]]>" +qname n                        = text (printableName n)+ -- toWord8 :: Char -> Word8 toWord8 :: (Enum a, Enum a1) => a1 -> a toWord8 = toEnum . fromEnum  containsDoubleQuote :: [EV] -> Bool containsDoubleQuote evs = any csq evs-    where csq (EVString s) = toWord8 '"' `elem` (pack s)+    where csq (EVString s) = toWord8 '"' `elem` pack s           csq _            = False
src/Text/XML/HaXml/Combinators.hs view
@@ -13,7 +13,7 @@    -- * Simple filters.    -- ** Selection filters.    -- $selection-  , keep, none, children, position+  , keep, none, children, childrenBy, position     -- ** Predicate filters.    -- $pred@@ -32,9 +32,10 @@    -- $recursive   , deep, deepest, multi    -- ** Interior editing.-  , when, guards, chip, inplace, foldXml+  , when, guards, chip, inplace, recursivelyInPlace, foldXml    -- ** Constructive filters.-  , mkElem, mkElemAttr, literal, cdata, replaceTag, replaceAttrs+   -- $constructive+  , mkElem, mkElemAttr, literal, cdata, replaceTag, replaceAttrs, addAttribute     -- * C-like conditionals.    -- $cond@@ -51,10 +52,11 @@   import Text.XML.HaXml.Types-import Maybe (fromMaybe)+import Text.XML.HaXml.Namespaces+import Data.Maybe (fromMaybe)  infixl 6 `with`, `without`-infixr 5 `o`, `oo`, `union`, `andThen`		-- , `orelse`+infixr 5 `o`, `oo`, `union`, `andThen`          -- , `orelse` infixl 5 />, </, |>| infixr 4 `when`, `guards` infixr 3 ?>, :>@@ -75,9 +77,9 @@ -- In the algebra of combinators, @none@ is the zero, and @keep@ the identity. -- (They have a more general type than just CFilter.) keep :: a->[a]-keep = \x->[x]+keep x = [x] none :: a->[b]-none = \x->[]+none _ = []  -- | Throw away current node, keep just the (unprocessed) children. children :: CFilter i@@ -102,7 +104,7 @@  elm, txt   :: CFilter i tag        :: String -> CFilter i-attr       :: Name -> CFilter i+attr       :: String -> CFilter i attrval    :: Attribute -> CFilter i tagWith    :: (String->Bool) -> CFilter i @@ -113,17 +115,17 @@ txt x@(CRef _ _)      = [x] txt _                 = [] -tag t x@(CElem (Elem n _ _) _) | t==n  = [x]-tag t _  = []+tag t x@(CElem (Elem n _ _) _) | t==printableName n  = [x]+tag _ _  = [] -tagWith p x@(CElem (Elem n _ _) _) | p n  = [x]-tagWith p _  = []+tagWith p x@(CElem (Elem n _ _) _) | p (printableName n)  = [x]+tagWith _ _  = [] -attr n x@(CElem (Elem _ as _) _) | n `elem` (map fst as)  = [x]-attr n _  = []+attr n x@(CElem (Elem _ as _) _) | n `elem` map (printableName.fst) as  = [x]+attr _ _  = []  attrval av x@(CElem (Elem _ as _) _) | av `elem` as  = [x]-attrval av _  = []+attrval _  _  = []   @@ -133,25 +135,25 @@ --   the attribute name @key@, and applies the continuation @cont@ to --   the value. find :: String -> (String->CFilter i) -> CFilter i-find key cont c@(CElem (Elem _ as _) _) = cont (show (lookfor key as)) c-  where lookfor x = fromMaybe (error ("missing attribute: "++show x)) . lookup x+find key cont c@(CElem (Elem _ as _) _) = cont (show (lookfor (N key) as)) c+  where lookfor x = fromMaybe (error ("missing attribute: "++key)) . lookup x -- 'lookfor' has the more general type :: (Eq a,Show a) => a -> [(a,b)] -> b  -- | When an attribute field may be absent, use @iffind key yes no@ to lookup --   its value.  If the attribute is absent, it acts as the @no@ filter, --   otherwise it applies the @yes@ filter. iffind :: String -> (String->CFilter i) -> CFilter i -> CFilter i-iffind key yes no c@(CElem (Elem _ as _) _) =-  case (lookup key as) of-    Nothing  -> no c+iffind  key  yes no c@(CElem (Elem _ as _) _) =+  case lookup (N key) as of+    Nothing               -> no c     (Just v@(AttValue _)) -> yes (show v) c-iffind key yes no other = no other+iffind _key _yes no other = no other  -- | @ifTxt yes no@ processes any textual content with the @yes@ filter, --   but otherwise is the same as the @no@ filter. ifTxt :: (String->CFilter i) -> CFilter i -> CFilter i-ifTxt yes no c@(CString _ s _) = yes s c-ifTxt yes no c                 = no c+ifTxt  yes _no c@(CString _ s _) = yes s c+ifTxt _yes  no c                 = no c   @@ -182,10 +184,10 @@ -- rather than one filter using the result of the other. --   (Has a more general type than just CFilter.) union :: (a->[b]) -> (a->[b]) -> (a->[b])-union = lift (++)		-- in Haskell 98:   union = lift List.union+union = lift (++)               -- in Haskell 98:   union = lift List.union   where     lift :: (a->b->d) -> (c->a) -> (c->b) -> c -> d-    lift f g h = \x-> f (g x) (h x)+    lift f g h x = f (g x) (h x)  -- | Glue a list of filters together.  (A list version of union; --   also has a more general type than just CFilter.)@@ -199,10 +201,10 @@ --   works over the same data as the first, but also uses the --   first's result. andThen :: (a->c) -> (c->a->b) -> (a->b)-andThen f g = \x-> g (f x) x			-- lift g f id+andThen f g x = g (f x) x                    -- lift g f id --- | Process children using specified filters.  /not exported/-childrenBy :: CFilter i -> CFilter i +-- | Process children using specified filters.+childrenBy :: CFilter i -> CFilter i childrenBy f = f `o` children  -- | Directional choice:@@ -239,7 +241,7 @@ --   @path [children, tag \"name1\", attr \"attr1\", children, tag \"name2\"]@ --   is like the XPath query @\/name1[\@attr1]\/name2@. path :: [CFilter i] -> CFilter i-path fs = foldr (flip (o)) keep fs+path fs = foldr (flip o) keep fs   -- RECURSIVE SEARCH@@ -262,22 +264,29 @@ --   otherwise the content is discarded. guards :: CFilter i -> CFilter i -> CFilter i f `when` g       = g ?> f :> keep-g `guards` f     = g ?> f :> none	-- = f `o` (keep `with` g)+g `guards` f     = g ?> f :> none       -- = f `o` (keep `with` g)  -- | Process CHildren In Place.  The filter is applied to any children --   of an element content, and the element rebuilt around the results. chip :: CFilter i -> CFilter i-chip f (CElem (Elem n as cs) i) = [ CElem (Elem n as (concatMap f cs)) i ]-chip f c = [c]+chip  f (CElem (Elem n as cs) i) = [ CElem (Elem n as (concatMap f cs)) i ]+chip _f c = [c] -- chip f = inplace (f `o` children)  -- | Process an element In Place.  The filter is applied to the element --   itself, and then the original element rebuilt around the results. inplace :: CFilter i -> CFilter i-inplace f c@(CElem (Elem name as _) i) = [ CElem (Elem name as (f c)) i ]-inplace f c = [c]+inplace  f c@(CElem (Elem name as _) i) = [ CElem (Elem name as (f c)) i ]+inplace _f c = [c] +-- | Recursively process an element in place.  That is, the filter is+--   applied to the element itself, then recursively to the results of the+--   filter, all the way to the bottom, then the original element rebuilt+--   around the final results.+recursivelyInPlace :: CFilter i -> CFilter i+recursivelyInPlace f = inplace (recursivelyInPlace f `o` f) + -- | Recursive application of filters: a fold-like operator.  Defined --   as @f `o` chip (foldXml f)@. foldXml :: CFilter i -> CFilter i@@ -287,18 +296,23 @@   -- CONSTRUCTIVE CONTENT FILTERS+--+-- $constructive+-- The constructive filters are primitive filters for building new elements,+-- or editing existing elements.  -- | Build an element with the given tag name - its content is the results --   of the given list of filters. mkElem :: String -> [CFilter i] -> CFilter i-mkElem h cfs = \t-> [ CElem (Elem h [] (cat cfs t)) undefined ]+mkElem h cfs t = [ CElem (Elem (N h) [] (cat cfs t)) undefined ]  -- | Build an element with the given name, attributes, and content. mkElemAttr :: String -> [(String,CFilter i)] -> [CFilter i] -> CFilter i-mkElemAttr h as cfs = \t-> [ CElem (Elem h (map (attr t) as) (cat cfs t)) undefined ]+mkElemAttr h as cfs = \t-> [ CElem (Elem (N h) (map (attr t) as) (cat cfs t))+                                   undefined ]   where attr t (n,vf) =             let v = concat [ s | (CString _ s _) <- (deep txt `o` vf) t ]-            in  (n, AttValue [Left v])+            in  (N n, AttValue [Left v])  -- | Build some textual content. literal :: String -> CFilter i@@ -310,19 +324,90 @@  -- | Rename an element tag (leaving attributes in place). replaceTag :: String -> CFilter i-replaceTag n (CElem (Elem _ as cs) i) = [CElem (Elem n as cs) i]-replaceTag n _ = []+replaceTag n (CElem (Elem _ as cs) i) = [CElem (Elem (N n) as cs) i]+replaceTag _ _ = []  -- | Replace the attributes of an element (leaving tag the same). replaceAttrs :: [(String,String)] -> CFilter i replaceAttrs as (CElem (Elem n _ cs) i) = [CElem (Elem n as' cs) i]-    where as' = map (\(n,v)-> (n, AttValue [Left v])) as-replaceAttrs as _ = []+    where as' = map (\(n,v)-> (N n, AttValue [Left v])) as+replaceAttrs _  _ = [] +-- | Add the desired attribute name and value to the topmost element,+--   without changing the element in any other way.+addAttribute :: String -> String -> CFilter a+addAttribute name val (CElem (Elem n   as   cs) i) =+                      [CElem (Elem n (a:as) cs) i]+  where a = (N name, AttValue [Left val])+addAttribute _ _ _ = []  + -- LABELLING+-- $labelling+-- LabelFilters are a way of annotating the results of a filter operation+-- with some arbitrary values drawn from the tree values.  Typically, the+-- annotations are then consumed by a label-processing filter (of+-- type @a -> CFilter@).  This is useful way of passing information between+-- sections of the tree as you process it.  An example may help to explain.+--+-- Let's say we want to add an attribute to every node of the tree,+-- containing a textual representation of its path from the root,+-- e.g. "/foo/bar/quux".  Where there are multiple identically-tagged elements+-- under the same parent node of the original tree, we expect them to have+-- a distinguishing attribute called "name".+--+-- Step one.  Given the path prefix to this node, how do we add the "xpath"+-- attribute?+--+-- > annotateOne :: String -> CFilter a+-- > annotateOne prefix =+-- >    (f `oo` ((tagged `x` attributed "name") (attr "name")))+-- >    |>|+-- >    (g `oo` (tagged keep))+-- >  where+-- >    f (tag,att) = addAttribute "xpath" (prefix++"/"++tag++"["++att++"]")+-- >    g  tag      = addAttribute "xpath" (prefix++"/"++tag)@+--+-- First, the @attr "name"@ filter distinguishes whether this node contains+-- the attribute, hence choosing whether the left or right branch of the+-- @|>|@ is taken.  If the attribute is /not/ present, then the LabelFilter+-- @tagged keep@ selects the current node, and annotates it with the+-- tagname of the element.  The @oo@ applies the label-consuming function @g@+-- to the result, and this injects the "xpath" attribute by suffixing+-- the tagname to the known path prefix.+--+-- If the "name" attribute /is/ present, then there are /two/ labelling filters+-- applied to the current node, annotating it with the pair of its tag+-- and the value of the attribute "name".  The label-consuming function @f@ is+-- applied to the pair with @oo@, to inject the "xpath" attribute with a more+-- complex representation of its path.+--+-- Step two.  Recursively apply the annotation throughout the tree.+--+-- > labelAllPaths :: CFilter a+-- > labelAllPaths = allPaths `o` initialise+-- >   where+-- >     initialise = annotateOne "/"+-- >+-- >     allPaths :: CFilter a+-- >     allPaths = inplace ( allPaths+-- >                          `o`+-- >                          (\prefix-> annotateOne prefix `o` children)+-- >                          `oo`+-- >                          (attributed "xpath" keep)+-- >                        )+--+-- In order to apply @annotateOne@ to any node, we need to know the path+-- prefix thus far into the tree.  So, we read the "xpath" attribute from+-- the current node (assumed to have already been processed) as a+-- LabelFilter, then consume the label by passing it to @annotateOne@ on+-- the children of the current node.  Using @inplace@ rebuilds the processed+-- children into the current node, after recursively dealing with their+-- children. ++ -- | A LabelFilter is like a CFilter except that it pairs up a polymorphic --   value (label) with each of its results. type LabelFilter i a = Content i -> [(a,Content i)]@@ -369,7 +454,7 @@ --   results get an empty string label. tagged :: CFilter i -> LabelFilter i String tagged f = extracted name f-  where name (CElem (Elem n _ _) _) = n+  where name (CElem (Elem n _ _) _) = printableName n         name _                      = ""  -- | Label each element in the result with the value of the named attribute.@@ -378,7 +463,7 @@ attributed :: String -> CFilter i -> LabelFilter i String attributed key f = extracted att f   where att (CElem (Elem _ as _) _) =-            case (lookup key as) of+            case lookup (N key) as of               Nothing  -> ""               (Just v@(AttValue _)) -> show v         att _ = ""@@ -393,7 +478,7 @@ -- | Label each content with some information extracted from itself. extracted :: (Content i->a) -> CFilter i -> LabelFilter i a extracted proj f = concatMap (\c->[(proj c, c)]) . f-                                                                                +   {-
src/Text/XML/HaXml/DtdToHaskell/Convert.hs view
@@ -1,11 +1,15 @@ -- | This module performs the translation of a parsed XML DTD into the --   internal representation of corresponding Haskell data\/newtypes.+--+--   Note that dtdToTypeDef is partial - it will crash if you resolve+--   qualified names (namespaces) to URIs beforehand.  It will only work+--   on the original literal name forms "prefix:name".  module Text.XML.HaXml.DtdToHaskell.Convert   ( dtd2TypeDef   ) where -import List (intersperse,nub)+import Data.List (intercalate,nub)  import Text.XML.HaXml.Types hiding (Name) import Text.XML.HaXml.DtdToHaskell.TypeDef@@ -13,7 +17,7 @@  ---- Internal representation for database of DTD decls ---- data Record = R [AttDef] ContentSpec--- type Db = [(String,Record)]+-- type Db = [(QName,Record)]   ---- Build a database of DTD decls then convert them to typedefs ----@@ -21,8 +25,8 @@ ---- Apparently multiple ATTLIST decls for the same element are permitted, ---- although only one ELEMENT decl for it is allowed. dtd2TypeDef :: [MarkupDecl] -> [TypeDef]-dtd2TypeDef mds =-  (concatMap convert . reverse . database []) mds+dtd2TypeDef =+  concatMap convert . reverse . database []   where   database db [] = db   database db (m:ms) =@@ -46,23 +50,26 @@   ---- Convert DTD record to typedef -----convert :: (String, Record) -> [TypeDef]-convert (n, R as cs) =+convert :: (QName, Record) -> [TypeDef]+convert (N n, R as cs) =     case cs of       EMPTY                   -> modifier None []       ANY                     -> modifier None [[Any]]                                  --error "NYI: contentspec of ANY"       (Mixed PCDATA)          -> modifier None [[String]]-      (Mixed (PCDATAplus ns)) -> modifier Star ([String]: map ((:[]) . Defined . name) ns)+      (Mixed (PCDATAplus ns)) -> modifier Star ([StringMixed]+                                                : map ((:[]) . Defined . name+                                                       . \(N n)->n)+                                                       ns)       (ContentSpec cp)        ->           case cp of-            (TagName n' m) -> modifier m [[Defined (name n')]]-            (Choice cps m) -> modifier m (map ((:[]).inner) cps)-            (Seq cps m)    -> modifier m [map inner cps]-    ++ concatMap (mkAttrDef n) as+            (TagName (N n') m) -> modifier m [[Defined (name n')]]+            (Choice cps m)     -> modifier m (map ((:[]).inner) cps)+            (Seq cps m)        -> modifier m [map inner cps]+    ++ concatMap (mkAttrDef (N n)) as   where     attrs    :: AttrFields-    attrs     = map (mkAttrField n) as+    attrs     = map (mkAttrField (N n)) as      modifier None sts   = mkData sts            attrs False (name n)     modifier m   [[st]] = mkData [[modf m st]]  attrs False (name n)@@ -71,10 +78,10 @@                           mkData sts            []    True  (name_ n)      inner :: CP -> StructType-    inner (TagName n' m) = modf m (Defined (name n'))-    inner (Choice cps m) = modf m (OneOf (map inner cps))-    inner (Seq cps None) = Tuple (map inner cps)-    inner (Seq cps m)    = modf m (Tuple (map inner cps))+    inner (TagName (N n') m) = modf m (Defined (name n'))+    inner (Choice cps m)     = modf m (OneOf (map inner cps))+    inner (Seq cps None)     = Tuple (map inner cps)+    inner (Seq cps m)        = modf m (Tuple (map inner cps))      modf None x  = x     modf Query x = Maybe x@@ -87,31 +94,32 @@ mkData tss  fs aux n  = [DataDef aux n fs (map (mkConstr n) tss)]   where     mkConstr m ts = (mkConsName m ts, ts)-    mkConsName (Name x m) sts = Name x (m++concat (intersperse "_" (map flatten sts)))+    mkConsName (Name x m) sts = Name x (m++intercalate "_" (map flatten sts))     flatten (Maybe st)   = {-"Maybe_" ++ -} flatten st     flatten (List st)    = {-"List_" ++ -} flatten st     flatten (List1 st)   = {-"List1_" ++ -} flatten st     flatten (Tuple sts)  = {-"Tuple" ++ show (length sts) ++ "_" ++ -}-                            concat (intersperse "_" (map flatten sts))+                            intercalate "_" (map flatten sts)+    flatten StringMixed  = "Str"     flatten String       = "Str"     flatten (OneOf sts)  = {-"OneOf" ++ show (length sts) ++ "_" ++ -}-                            concat (intersperse "_" (map flatten sts))+                            intercalate "_" (map flatten sts)     flatten Any          = "Any"     flatten (Defined (Name _ m))  = m -mkAttrDef :: String -> AttDef -> [TypeDef]+mkAttrDef :: QName -> AttDef -> [TypeDef] mkAttrDef _ (AttDef _ StringType _) =     [] mkAttrDef _ (AttDef _ (TokenizedType _) _) =     [] -- mkData [[String]] [] False (name n)-mkAttrDef e (AttDef n (EnumeratedType (NotationType nt)) _) =+mkAttrDef (N e) (AttDef (N n) (EnumeratedType (NotationType nt)) _) =     [EnumDef (name_a e n) (map (name_ac e n) nt)]-mkAttrDef e (AttDef n (EnumeratedType (Enumeration es)) _) =+mkAttrDef (N e) (AttDef (N n) (EnumeratedType (Enumeration es)) _) =     [EnumDef (name_a e n) (map (name_ac e n) es)]         -- Default attribute values not handled here -mkAttrField :: String -> AttDef -> (Name,StructType)-mkAttrField e (AttDef n typ req) = (name_f e n, mkType typ req)+mkAttrField :: QName -> AttDef -> (Name,StructType)+mkAttrField (N e) (AttDef (N n) typ req) = (name_f e n, mkType typ req)   where     mkType StringType REQUIRED = String     mkType StringType IMPLIED  = Maybe String@@ -124,4 +132,3 @@     mkType (EnumeratedType _) IMPLIED  = Maybe (Defined (name_a e n))     mkType (EnumeratedType _) (DefaultTo v@(AttValue _) _) =                 Defaultable (Defined (name_a e n)) (hName (name_ac e n (show v)))-
src/Text/XML/HaXml/DtdToHaskell/Instance.hs view
@@ -1,9 +1,14 @@+{-# LANGUAGE CPP #-} module Text.XML.HaXml.DtdToHaskell.Instance   ( mkInstance   ) where -import List (intersperse)+#if MIN_VERSION_base(4,11,0)+import Prelude hiding ((<>))+#endif +import Data.List (intersperse)+ import Text.XML.HaXml.DtdToHaskell.TypeDef import Text.PrettyPrint.HughesPJ @@ -23,7 +28,7 @@     text "instance XmlContent" <+> ppHName n <+> text "where" $$     nest 4 (              text "toContents" <+> topatval <+> text "=" $$-             nest 4 (text "[CElem (Elem \"" <> ppXName n <> text "\""+             nest 4 (text "[CElem (Elem (N \"" <> ppXName n <> text "\")"                           <+> toattr <+> text "[]) ()]")            $$              text "parseContents = do" $$@@ -48,7 +53,7 @@     text "instance XmlContent" <+> ppHName n <+> text "where" $$     nest 4 (              text "toContents" <+> parens (mkCpat n0 topat vs) <+> text "=" $$-             nest 4 (text "[CElem (Elem \"" <> ppXName n <> text "\""+             nest 4 (text "[CElem (Elem (N \"" <> ppXName n <> text "\")"                           <+> toattr <+> parens (mkToElem sts vs)                           <> text ") ()]")            $$@@ -56,7 +61,7 @@              nest 4 (text "{ e@(Elem _"<+> frpat <+> text "_) <- element [\""                              <> ppXName n <> text "\"]"                      $$ text "; interior e $"-                           <+> (mkParseConstr frattr (n0,sts))+                           <+> mkParseConstr frattr (n0,sts)                      $$ text "} `adjustErr` (\"in <" <> ppXName n                                                      <> text ">, \"++)")            )@@ -83,7 +88,7 @@ mkInstance (DataDef False n fs cs) =     let _ = nameSupply cs         (frpat, frattr, topat, toattr) = attrpats fs-        _ = if null fs then False else True+        _ = not (null fs)     in     text "instance HTypeable" <+> ppHName n <+> text "where" $$     nest 4 ( text "toHType x = Defined \"" <> ppXName n <> text "\" [] []" )@@ -110,7 +115,7 @@ mkInstance (DataDef True n fs cs) =     let _ = nameSupply cs         (_, frattr, _, _) = attrpats fs-        mixattrs = if null fs then False else True+        mixattrs = not (null fs)     in     text "instance HTypeable" <+> ppHName n <+> text "where" $$     nest 4 ( text "toHType x = Defined \"" <> ppXName n <> text "\" [] []" )@@ -131,7 +136,7 @@ -- enumeration of attribute values mkInstance (EnumDef n es) =     text "instance XmlAttrType" <+> ppHName n <+> text "where" $$-    nest 4 ( text "fromAttrToTyp n (n',v)" $$+    nest 4 ( text "fromAttrToTyp n (N n',v)" $$              nest 4 (text "| n==n'     = translate (attr2str v)" $$                      text "| otherwise = Nothing") $$              nest 2 (text "where" <+> mkTranslate es)@@ -232,17 +237,18 @@ mkParseContents st =   let ap = text "`apply`" in           case st of-            (Maybe String)  -> ap <+> text "optional text"-            (Maybe _)       -> ap <+> text "optional parseContents"-            (List String)   -> ap <+> text "many text"-            (List _)        -> ap <+> text "many parseContents"-            (List1 _)       -> ap <+> text "parseContents"-            (Tuple _)      -> ap <+> text "parseContents"-            (OneOf _)      -> ap <+> text "parseContents"-            (String)        -> ap <+> text "(text `onFail` return \"\")"-            (Any)           -> ap <+> text "parseContents"-            (Defined _)     -> ap <+> text "parseContents"-            (Defaultable _ _)  -> ap <+> text "nyi_fromElem_Defaultable"+            (Maybe String)    -> ap <+> text "optional text"+            (Maybe _)         -> ap <+> text "optional parseContents"+            (List String)     -> ap <+> text "many text"+            (List _)          -> ap <+> text "many parseContents"+            (List1 _)         -> ap <+> text "parseContents"+            (Tuple _)         -> ap <+> text "parseContents"+            (OneOf _)         -> ap <+> text "parseContents"+            StringMixed       -> ap <+> text "text"+            String            -> ap <+> text "(text `onFail` return \"\")"+            Any               -> ap <+> text "parseContents"+            (Defined _)       -> ap <+> text "parseContents"+            (Defaultable _ _) -> ap <+> text "nyi_fromElem_Defaultable"  -- mkToElem :: [StructType] -> [Doc] -> Doc@@ -252,17 +258,18 @@   where     toElem st v =       case st of-        (Maybe String)  -> text "maybe [] toText" <+> v-        (Maybe _)       -> text "maybe [] toContents" <+> v-        (List String)   -> text "concatMap toText" <+> v-        (List _)        -> text "concatMap toContents" <+> v-        (List1 _)       -> text "toContents" <+> v-        (Tuple _)      -> text "toContents" <+> v-        (OneOf _)      -> text "toContents" <+> v-        (String)        -> text "toText" <+> v-        (Any)           -> text "toContents" <+> v-        (Defined _)     -> text "toContents" <+> v-        (Defaultable _ _)  -> text "nyi_toElem_Defaultable" <+> v+        (Maybe String)    -> text "maybe [] toText" <+> v+        (Maybe _)         -> text "maybe [] toContents" <+> v+        (List String)     -> text "concatMap toText" <+> v+        (List _)          -> text "concatMap toContents" <+> v+        (List1 _)         -> text "toContents" <+> v+        (Tuple _)         -> text "toContents" <+> v+        (OneOf _)         -> text "toContents" <+> v+        StringMixed       -> text "toText" <+> v+        String            -> text "toText" <+> v+        Any               -> text "toContents" <+> v+        (Defined _)       -> text "toContents" <+> v+        (Defaultable _ _) -> text "nyi_toElem_Defaultable" <+> v  -- mkRpat :: [Doc] -> Doc -- mkRpat [v] = v@@ -273,8 +280,8 @@  nameSupply :: [b] -> [Doc] nameSupply  ss = take (length ss) (map char ['a'..'z']-                                  ++ map text [ a:n:[] | n <- ['0'..'9']-                                                       , a <- ['a'..'z'] ])+                                  ++ [ text [a,n] | n <- ['0'..'9']+                                                  , a <- ['a'..'z'] ]) -- nameSupply2 ss = take (length ss) [ text ('c':v:[]) | v <- ['a'..]]  mkTranslate :: [Name] -> Doc@@ -287,7 +294,7 @@  mkToAttr :: Name -> Doc mkToAttr n = text "toAttrFrTyp n" <+> ppHName n <+> text "=" <+>-             text "Just (n, str2attr" <+> doubleQuotes (ppXName n) <> text ")"+             text "Just (N n, str2attr" <+> doubleQuotes (ppXName n) <> text ")"  mkFrFld :: Name -> (Name,StructType) -> Doc mkFrFld tag (n,st) =@@ -390,6 +397,5 @@     let vs = nameSupply sts     in     text "toContents" <+> parens (mkCpat n attrpat vs) <+> text "="-    $$ nest 4 (text "[CElem (Elem \"" <> ppXName tag <> text "\""<+> attrexp+    $$ nest 4 (text "[CElem (Elem (N \"" <> ppXName tag <> text "\")"<+> attrexp               <+> parens (mkToElem sts vs) <+> text ") ()]")-
src/Text/XML/HaXml/DtdToHaskell/TypeDef.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE CPP #-} -- | Defines an internal representation of Haskell data\/newtype definitions --   that correspond to the XML DTD types, and provides pretty-printers to --   convert these types into the 'Doc' type of "Text.PrettyPrint.HughesPJ".@@ -18,8 +19,12 @@   , name, name_, name_a, name_ac, name_f, mangle, manglef   ) where -import Char (isLower, isUpper, toLower, toUpper, isDigit)-import List (intersperse)+#if MIN_VERSION_base(4,11,0)+import Prelude hiding ((<>))+#endif++import Data.Char (isLower, isUpper, toLower, toUpper, isDigit)+import Data.List (intersperse) import Text.PrettyPrint.HughesPJ  @@ -45,7 +50,8 @@     | Tuple [StructType]     | OneOf [StructType]     | Any                               -- ^ XML's contentspec allows ANY-    | String+    | StringMixed                       -- ^ mixed (#PCDATA | ... )*+    | String                            -- ^ string only (#PCDATA)     | Defined Name     deriving Eq @@ -63,8 +69,9 @@                                     . foldr1 (.) (intersperse (showChar '|')                                                               (map shows ss))                                     . showChar ')'-    showsPrec _ (Any)             = showString "ANY"-    showsPrec _ (String)          = showString "#PCDATA"+    showsPrec _ Any               = showString "ANY"+    showsPrec _ StringMixed       = showString "#PCDATA"+    showsPrec _ String            = showString "#PCDATA"     showsPrec _ (Defined (Name n _)) = showString n  @@ -123,6 +130,7 @@ ppST (Tuple sts) = parens (commaList (map ppST sts)) ppST (OneOf sts) = parens (text "OneOf" <> text (show (length sts)) <+>                            hsep (map ppST sts))+ppST  StringMixed= text "String" ppST  String     = text "String" ppST  Any        = text "ANYContent" ppST (Defined n) = ppHName n
src/Text/XML/HaXml/Escape.hs view
@@ -55,7 +55,7 @@     ) where -import Char+import Data.Char -- import Numeric import Text.XML.HaXml.Types @@ -111,16 +111,13 @@       (escapeContent xmlEscaper content)  escapeAttributes :: XmlEscaper -> [Attribute] -> [Attribute]-escapeAttributes xmlEscaper atts =-   map-      (\ (name,av) -> (name,escapeAttValue xmlEscaper av))-      atts+escapeAttributes xmlEscaper =+   map (\ (name,av) -> (name,escapeAttValue xmlEscaper av))  escapeAttValue :: XmlEscaper -> AttValue -> AttValue escapeAttValue xmlEscaper (AttValue attValList) =    AttValue (-      concat (-         map+      concatMap             (\ av -> case av of                Right _ -> [av]                Left s ->@@ -134,13 +131,11 @@                      s                )             attValList-         )       )  escapeContent :: XmlEscaper -> [Content i] -> [Content i]-escapeContent xmlEscaper contents =-   concat-      (map+escapeContent xmlEscaper =+   concatMap           (\ content -> case content of              (CString b str i) ->                 map@@ -154,8 +149,6 @@              (CElem element i) -> [CElem (escapeElement xmlEscaper element) i]              _ -> [content]              )-          contents-          )  mkEscape :: XmlEscaper -> Char -> Reference mkEscape (XmlEscaper {toEscape = toescape}) ch =@@ -184,10 +177,8 @@       (unEscapeContent xmlEscaper content)  unEscapeAttributes :: XmlEscaper -> [Attribute] -> [Attribute]-unEscapeAttributes xmlEscaper atts =-   map-      (\ (name,av) -> (name,unEscapeAttValue xmlEscaper av))-      atts+unEscapeAttributes xmlEscaper =+   map (\ (name,av) -> (name,unEscapeAttValue xmlEscaper av))  unEscapeAttValue :: XmlEscaper -> AttValue -> AttValue unEscapeAttValue xmlEscaper (AttValue attValList) =@@ -203,7 +194,7 @@       )  unEscapeContent :: XmlEscaper -> [Content i] -> [Content i]-unEscapeContent xmlEscaper content =+unEscapeContent xmlEscaper =    map       (\ cntnt -> case cntnt of          CRef ref i -> case unEscapeChar xmlEscaper ref of@@ -212,7 +203,6 @@          CElem element i -> CElem (unEscapeElement xmlEscaper element) i          _ -> cntnt          )-      content  unEscapeChar :: XmlEscaper -> Reference -> Maybe Char unEscapeChar xmlEscaper ref =@@ -229,26 +219,24 @@ compressElement (Elem name attributes content) =    Elem name (compressAttributes attributes) (compressContent content) -compressAttributes :: [(Name,AttValue)] -> [(Name,AttValue)]-compressAttributes atts =-   map-      (\ (name,av) -> (name,compressAttValue av))-      atts+compressAttributes :: [(QName,AttValue)] -> [(QName,AttValue)]+compressAttributes =+   map (\ (name,av) -> (name,compressAttValue av))  compressAttValue :: AttValue -> AttValue compressAttValue (AttValue l) = AttValue (compress l)    where       compress :: [Either String Reference] -> [Either String Reference]       compress [] = []-      compress (Right ref : es) = Right ref : (compress es)-      compress ( (ls @ (Left s1)) : es) =+      compress (Right ref : es) = Right ref : compress es+      compress ( ls@(Left s1) : es) =          case compress es of             (Left s2 : es2) -> Left (s1 ++ s2) : es2             es2 -> ls : es2  compressContent :: [Content i] -> [Content i] compressContent [] = []-compressContent ((csb @ (CString b1 s1 i1)) : cs) =+compressContent (csb@(CString b1 s1 i1) : cs) =    case compressContent cs of       (CString b2 s2 _) : cs2           | b1 == b2@@ -288,4 +276,3 @@       fromEscape = listToFM (map (\ (c,str) -> (str,c)) escapes),       isEscape = isescape       }-
src/Text/XML/HaXml/Html/Generate.hs view
@@ -28,9 +28,10 @@   , htmlprint   ) where -import Char (isSpace)+import Data.Char (isSpace)  import Text.XML.HaXml.Types+import Text.XML.HaXml.Namespaces import Text.XML.HaXml.Combinators import qualified Text.PrettyPrint.HughesPJ as Pretty @@ -123,10 +124,10 @@   cprint (CRef r _)       = Pretty.text ("&"++ref r++";")   cprint (CMisc _ _)      = Pretty.empty -  element (Elem n as []) = Pretty.text "<"   Pretty.<>-                        Pretty.text n     Pretty.<>-                        attrs as          Pretty.<>-                        Pretty.text " />"+  element (Elem n as []) = Pretty.text "<"               Pretty.<>+                           Pretty.text (printableName n) Pretty.<>+                           attrs as                      Pretty.<>+                           Pretty.text " />"   element (Elem n as cs) =                     --  ( Pretty.text "<"   Pretty.<>                     --    Pretty.text n     Pretty.<>@@ -136,22 +137,22 @@                     --  ( Pretty.text "</"  Pretty.<>                     --    Pretty.text n     Pretty.<>                     --    Pretty.text ">" )-                        Pretty.fcat [ ( Pretty.text "<"   Pretty.<>-                                        Pretty.text n     Pretty.<>-                                        attrs as          Pretty.<>-                                        Pretty.text ">")+                        Pretty.fcat [ Pretty.text "<"               Pretty.<>+                                      Pretty.text (printableName n) Pretty.<>+                                      attrs as                      Pretty.<>+                                      Pretty.text ">"                                     , Pretty.nest 4 (htmlprint cs)-                                    , ( Pretty.text "</"  Pretty.<>-                                        Pretty.text n     Pretty.<>-                                        Pretty.text ">" )+                                    , Pretty.text "</"              Pretty.<>+                                      Pretty.text (printableName n) Pretty.<>+                                      Pretty.text ">"                                     ]    attrs = Pretty.cat . map attribute   attribute (n,v@(AttValue _)) =-               Pretty.text " "  Pretty.<>-               Pretty.text n    Pretty.<>-               Pretty.text "='" Pretty.<>-               Pretty.text (show v) Pretty.<>+               Pretty.text " "               Pretty.<>+               Pretty.text (printableName n) Pretty.<>+               Pretty.text "='"              Pretty.<>+               Pretty.text (show v)          Pretty.<>                Pretty.text "'"    fmt _ [] = []@@ -170,6 +171,5 @@    keepUntil p xs = select p ([],xs)       where select _ (ls,[])     = (ls,[])-            select q (ls,(y:ys)) | q y       = (ls,y:ys)-                                 | otherwise = select q (y:ls,ys)-+            select q (ls,y:ys) | q y       = (ls,y:ys)+                               | otherwise = select q (y:ls,ys)
src/Text/XML/HaXml/Html/Parse.hs view
@@ -9,22 +9,24 @@  module Text.XML.HaXml.Html.Parse   ( htmlParse+  , htmlParse'   ) where  import Prelude hiding (either,maybe,sequence) import qualified Prelude (either)-import Maybe hiding (maybe)-import Char (toLower, isSpace, isDigit, isHexDigit)+import Data.Maybe hiding (maybe)+import Data.Char (toLower, {-isSpace,-} isDigit, isHexDigit) import Numeric (readDec,readHex)-import Monad+import Control.Monad  import Text.XML.HaXml.Types+import Text.XML.HaXml.Namespaces import Text.XML.HaXml.Lex import Text.XML.HaXml.Posn import Text.ParserCombinators.Poly.Plain  --  #define DEBUG- + #if defined(DEBUG) #  if ( defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ > 502 ) || \       ( defined(__NHC__) && __NHC__ > 114 ) || defined(__HUGS__)@@ -38,7 +40,7 @@ debug s = trace s (return ()) #else debug :: Monad m => String -> m ()-debug s = return ()+debug _ = return () #endif  @@ -46,14 +48,14 @@ --   contents of the file.  The result is the generic representation of --   an XML document.  Any errors cause program failure with message to stderr. htmlParse :: String -> String -> Document Posn-htmlParse name = Prelude.either error id . htmlParse' name+htmlParse file = Prelude.either error id . htmlParse' file  -- | The first argument is the name of the file, the second is the string --   contents of the file.  The result is the generic representation of --   an XML document.  Any parsing errors are returned in the @Either@ type. htmlParse' :: String -> String -> Either String (Document Posn)-htmlParse' name = Prelude.either Left (Right . simplify) . fst-                  . runParser document . xmlLex name+htmlParse' file = fmap simplify . fst+                  . runParser document . xmlLex file  ---- Document simplification ---- @@ -61,22 +63,25 @@ simplify (Document p st (Elem n avs cs) ms) =     Document p st (Elem n avs (deepfilter simp cs)) ms   where-    simp (CElem (Elem "null" [] []) _) = False-    simp (CElem (Elem  n     _  []) _) | n `elem` ["font","p","i","b","em"-                                                  ,"tt","big","small"] = False+    simp (CElem (Elem (N "null") [] []) _) = False+    simp (CElem (Elem t _ []) _)+        | localName t `elem` ["font","p","i","b","em","tt","big","small"]+                                           = False  -- simp (CString False s _) | all isSpace s = False     simp _ = True-    deepfilter p =-        filter p . map (\c-> case c of-                          CElem (Elem n avs cs) i-                                  -> CElem (Elem n avs (deepfilter p cs)) i+    deepfilter f =+        filter f . map (\c-> case c of+                          CElem (Elem t avs cs) i+                                  -> CElem (Elem t avs (deepfilter f cs)) i                           _       -> c)  -- opening any of these, they close again immediately+selfclosingtags :: [String] selfclosingtags = ["img","hr","br","meta","col","link","base"                   ,"param","area","frame","input"] ---closing this, implicitly closes any of those which are contained in it+-- closing this, implicitly closes any of those which are contained in it+closeInnerTags :: [(String,[String])] closeInnerTags =   [ ("ul",      ["li"])   , ("ol",      ["li"])@@ -98,21 +103,21 @@   , ("body",    ["p"])   ] ---opening this, implicitly closes that+-- opening this, implicitly closes that closes :: Name -> Name -> Bool-"a"  `closes` "a"   =  True-"li" `closes` "li"  =  True-"th" `closes`  t    | t `elem` ["th","td"]      =  True-"td" `closes`  t    | t `elem` ["th","td"]      =  True-"tr" `closes`  t    | t `elem` ["th","td","tr"] =  True-"dt" `closes`  t    | t `elem` ["dt","dd"]      =  True-"dd" `closes`  t    | t `elem` ["dt","dd"]      =  True-"form"  `closes` "form"      = True-"label" `closes` "label"     = True-_       `closes` "option"    = True-"thead" `closes` t  | t `elem` ["colgroup"]          = True-"tfoot" `closes` t  | t `elem` ["thead","colgroup"]  = True-"tbody" `closes` t  | t `elem` ["tbody","tfoot","thead","colgroup"] = True+"a"     `closes` "a"      =  True+"li"    `closes` "li"     =  True+"th"    `closes`  t       | t `elem` ["th","td"]      =  True+"td"    `closes`  t       | t `elem` ["th","td"]      =  True+"tr"    `closes`  t       | t `elem` ["th","td","tr"] =  True+"dt"    `closes`  t       | t `elem` ["dt","dd"]      =  True+"dd"    `closes`  t       | t `elem` ["dt","dd"]      =  True+"form"  `closes` "form"   = True+"label" `closes` "label"  = True+_       `closes` "option" = True+"thead" `closes` t        | t == "colgroup"                = True+"tfoot" `closes` t        | t `elem` ["thead","colgroup"]  = True+"tbody" `closes` t        | t `elem` ["tbody","tfoot","thead","colgroup"] = True "colgroup" `closes` "colgroup"  = True t `closes` "p"     | t `elem` ["p","h1","h2","h3","h4","h5","h6"@@ -120,31 +125,25 @@ _ `closes` _ = False  ------ Misc ------fst3 (a,_,_) = a-snd3 (_,a,_) = a-thd3 (_,_,a) = a--- ---- Auxiliary Parsing Functions ----  type HParser a = Parser (Posn,TokenT) a  tok :: TokenT -> HParser TokenT tok t = do (p,t') <- next-           case t' of TokError s    -> report failBad (show t) p t'+           case t' of TokError _    -> report failBad (show t) p t'                       _ | t'==t     -> return t                         | otherwise -> report fail (show t) p t' +qname :: HParser QName+qname = fmap N name+ name :: HParser Name --name = do {(p,TokName s) <- next; return s} name = do (p,tok) <- next-          case tok of -            TokName s  -> return s -            TokError s -> report failBad "a name" p tok+          case tok of+            TokName s  -> return s+            TokError _ -> report failBad "a name" p tok             _          -> report fail "a name" p tok  string, freetext :: HParser String@@ -157,21 +156,21 @@  maybe :: HParser a -> HParser (Maybe a) maybe p =-    ( p >>= return . Just) `onFail`-    ( return Nothing)+    (Just <$> p) `onFail`+    return Nothing  either :: HParser a -> HParser b -> HParser (Either a b) either p q =-    ( p >>= return . Left) `onFail`-    ( q >>= return . Right)+    (Left <$> p) `onFail`+    (Right <$> q)  word :: String -> HParser () word s = do { x <- next             ; case x of-                (p,TokName n)     | s==n -> return ()-                (p,TokFreeText n) | s==n -> return ()-                (p,t@(TokError _)) -> report failBad (show s) p t-                (p,t) -> report fail (show s) p t+                (_p,TokName n)     | s==n -> return ()+                (_p,TokFreeText n) | s==n -> return ()+                ( p,t@(TokError _)) -> report failBad (show s) p t+                ( p,t) -> report fail (show s) p t             }  posn :: HParser Posn@@ -181,15 +180,15 @@           } `onFail` return noPos  nmtoken :: HParser NmToken-nmtoken = (string `onFail` freetext)+nmtoken = string `onFail` freetext  failP, failBadP :: String -> HParser a failP msg    = do { p <- posn; fail (msg++"\n    at "++show p) } failBadP msg = do { p <- posn; failBad (msg++"\n    at "++show p) }  report :: (String->HParser a) -> String -> Posn -> TokenT -> HParser a-report fail exp p t = fail ("Expected "++show exp++" but found "++show t-                           ++"\n  at "++show p)+report fail expect p t = fail ("Expected "++show expect++" but found "++show t+                               ++"\n  at "++show p)  adjustErrP :: HParser a -> (String->String) -> HParser a p `adjustErrP` f = p `onFail` do pn <- posn@@ -200,11 +199,11 @@ document :: HParser (Document Posn) document = do     p     <- prolog `adjustErr` ("unrecognisable XML prolog\n"++)-    es    <- many1 (element "HTML document")+    ht    <- many1 (element "HTML document")     ms    <- many misc-    return (Document p emptyST (case map snd es of+    return (Document p emptyST (case map snd ht of                                   [e] -> e-                                  es  -> Elem "html" [] (map mkCElem es))+                                  es  -> Elem (N "html") [] (map mkCElem es))                                ms)   where mkCElem e = CElem e noPos @@ -224,7 +223,7 @@ cdsect :: HParser CDSect cdsect = do     tok TokSectionOpen-    bracket (tok (TokSection CDATAx)) (tok TokSectionClose) chardata+    bracket (tok (TokSection CDATAx)) (commit $ tok TokSectionClose) chardata  prolog :: HParser Prolog prolog = do@@ -237,7 +236,7 @@ xmldecl :: HParser XMLDecl xmldecl = do     tok TokPIOpen-    (word "xml" `onFail` word "XML")+    word "xml" `onFail` word "XML"     p <- posn     s <- freetext     tok TokPIClose `onFail` failBadP "missing ?> in <?xml ...?>"@@ -251,14 +250,14 @@  versioninfo :: HParser VersionInfo versioninfo = do-    (word "version" `onFail` word "VERSION")+    word "version" `onFail` word "VERSION"     tok TokEqual-    bracket (tok TokQuote) (tok TokQuote) freetext+    bracket (tok TokQuote) (commit $ tok TokQuote) freetext  misc :: HParser Misc-misc = -    oneOf' [ ("<!--comment-->", comment >>= return . Comment)-           , ("<?PI?>",         processinginstruction >>= return . PI)+misc =+    oneOf' [ ("<!--comment-->", Comment <$> comment)+           , ("<?PI?>",         PI <$> processinginstruction)            ]  @@ -270,20 +269,20 @@     tok TokSpecialOpen     tok (TokSpecial DOCTYPEx)     commit $ do-      n <- name+      n <- qname       eid <- maybe externalid---    es <- maybe (bracket (tok TokSqOpen) (tok TokSqClose)) (many markupdecl)+--    es <- maybe (bracket (tok TokSqOpen) (commit $ tok TokSqClose)) (many markupdecl)       tok TokAnyClose  `onFail` failP "missing > in DOCTYPE decl" --    return (DTD n eid (case es of { Nothing -> []; Just e -> e }))       return (DTD n eid [])  --markupdecl :: HParser MarkupDecl --markupdecl =---    ( elementdecl >>= return . Element) `onFail`---    ( attlistdecl >>= return . AttList) `onFail`---    ( entitydecl >>= return . Entity) `onFail`---    ( notationdecl >>= return . Notation) `onFail`---    ( misc >>= return . MarkupMisc) `onFail`+--    (Element <$> elementdecl) `onFail`+--    (AttList <$> attlistdecl) `onFail`+--    (Entity <$> entitydecl) `onFail`+--    (Notation <$> notationdecl) `onFail`+--    (MarkupMisc <$> misc) `onFail` --    PEREF(MarkupPE,markupdecl) -- --extsubset :: HParser ExtSubset@@ -294,16 +293,16 @@ -- --extsubsetdecl :: HParser ExtSubsetDecl --extsubsetdecl =---    ( markupdecl >>= return . ExtMarkupDecl) `onFail`---    ( conditionalsect >>= return . ExtConditionalSect) `onFail`+--    (ExtMarkupDecl <$> markupdecl) `onFail`+--    (ExtConditionalSect <$> conditionalsect) `onFail` --    PEREF(ExtPEReference,extsubsetdecl)  sddecl :: HParser SDDecl sddecl = do-    (word "standalone" `onFail` word "STANDALONE")+    word "standalone" `onFail` word "STANDALONE"     commit $ do       tok TokEqual `onFail` failP "missing = in 'standalone' decl"-      bracket (tok TokQuote) (tok TokQuote)+      bracket (tok TokQuote) (commit $ tok TokQuote)               ( (word "yes" >> return True) `onFail`                 (word "no" >> return False) `onFail`                 failP "'standalone' decl requires 'yes' or 'no' value" )@@ -321,39 +320,39 @@ element ctx =   do     tok TokAnyOpen-    (ElemTag e avs) <- elemtag+    (ElemTag (N e) avs) <- elemtag     ( if e `closes` ctx then          -- insert the missing close-tag, fail forward, and reparse.-         ( do debug ("/")+         ( do debug "/"               unparse ([TokEndOpen, TokName ctx, TokAnyClose,                         TokAnyOpen, TokName e] ++ reformatAttrs avs)-              return ([], Elem "null" [] []))+              return ([], Elem (N "null") [] []))       else if e `elem` selfclosingtags then          -- complete the parse straightaway.-         ( do tok TokEndClose	-- self-closing <tag /> +         ( do tok TokEndClose   -- self-closing <tag />               debug (e++"[+]")-              return ([], Elem e avs [])) `onFail`-     --  ( do tok TokAnyClose	-- sequence <tag></tag>	(**not HTML?**)+              return ([], Elem (N e) avs [])) `onFail`+     --  ( do tok TokAnyClose   -- sequence <tag></tag> (**not HTML?**)      --       debug (e++"[+")-     --       n <- bracket (tok TokEndOpen) (tok TokAnyClose) name+     --       n <- bracket (tok TokEndOpen) (commit $ tok TokAnyClose) qname      --       debug "]"-     --       if e == (map toLower n :: Name) -     --         then return ([], Elem e avs [])      +     --       if e == (map toLower n :: Name)+     --         then return ([], Elem e avs [])      --         else return (error "no nesting in empty tag")) `onFail`-         ( do tok TokAnyClose	-- <tag> with no close (e.g. <IMG>)+         ( do tok TokAnyClose   -- <tag> with no close (e.g. <IMG>)               debug (e++"[+]")-              return ([], Elem e avs []))+              return ([], Elem (N e) avs []))       else-        (( do tok TokEndClose+         ( do tok TokEndClose               debug (e++"[]")-              return ([], Elem e avs [])) `onFail`+              return ([], Elem (N e) avs [])) `onFail`          ( do tok TokAnyClose `onFail` failP "missing > or /> in element tag"               debug (e++"[")            -- zz <- many (content e)-           -- n <- bracket (tok TokEndOpen) (tok TokAnyClose) name+           -- n <- bracket (tok TokEndOpen) (commit $ tok TokAnyClose) qname               zz <- manyFinally (content e)                                 (tok TokEndOpen)-              n <- name+              (N n) <- qname               commit (tok TokAnyClose)               debug "]"               let (ss,cs) = unzip zz@@ -361,12 +360,12 @@               ( if e == (map toLower n :: Name) then                   do unparse (reformatTags (closeInner e s))                      debug "^"-                     return ([], Elem e avs cs)+                     return ([], Elem (N e) avs cs)                 else                   do unparse [TokEndOpen, TokName n, TokAnyClose]                      debug "-"-                     return (((e,avs):s), Elem e avs cs))-         ) `onFail` failP ("failed to repair non-matching tags in context: "++ctx)))+                     return ((e,avs):s, Elem (N e) avs cs))+         ) `onFail` failP ("failed to repair non-matching tags in context: "++ctx))  closeInner :: Name -> [(Name,[Attribute])] -> [(Name,[Attribute])] closeInner c ts =@@ -374,18 +373,22 @@       (Just these) -> filter ((`notElem` these).fst) ts       Nothing      -> ts +unparse :: [TokenT] -> Parser (Posn, TokenT) () unparse ts = do p <- posn                 reparse (zip (repeat p) ts) -reformatAttrs avs = concatMap f0 avs-    where f0 (a, v@(AttValue _)) = [TokName a, TokEqual, TokQuote,-                                       TokFreeText (show v), TokQuote]-reformatTags ts = concatMap f0 ts+reformatAttrs :: [(QName, AttValue)] -> [TokenT]+reformatAttrs = concatMap f0+    where f0 (a, v@(AttValue _)) = [ TokName (printableName a), TokEqual+                                   , TokQuote, TokFreeText (show v), TokQuote ]++reformatTags :: [(String, [(QName, AttValue)])] -> [TokenT]+reformatTags = concatMap f0     where f0 (t,avs) = [TokAnyOpen, TokName t]++reformatAttrs avs++[TokAnyClose]  content :: Name -> HParser (Stack,Content Posn)-content ctx = do { p <- posn ; content' p ctx }-  where content' p ctx = oneOf'+content ctx = do { p <- posn ; content' p }+  where content' p = oneOf'           [ ( "element", element ctx >>= \(s,e)-> return (s, CElem e p))           , ( "chardata", chardata >>= \s-> return ([], CString False s p))           , ( "reference", reference >>= \r-> return ([], CRef r p))@@ -396,23 +399,23 @@ ---- elemtag :: HParser ElemTag elemtag = do-    n <- name `adjustErrBad` ("malformed element tag\n"++)+    (N n) <- qname `adjustErrBad` ("malformed element tag\n"++)     as <- many attribute-    return (ElemTag (map toLower n) as)+    return (ElemTag (N  $ map toLower n) as)  attribute :: HParser Attribute attribute = do-    n <- name+    (N n) <- qname     v <- (do tok TokEqual              attvalue) `onFail`-         (return (AttValue [Left "TRUE"]))-    return (map toLower n,v)+         return (AttValue [Left "TRUE"])+    return (N $ map toLower n, v)  --elementdecl :: HParser ElementDecl --elementdecl = do --    tok TokSpecialOpen --    tok (TokSpecial ELEMENTx)---    n <- name `onFail` failP "missing identifier in ELEMENT decl"+--    n <- qname `onFail` failP "missing identifier in ELEMENT decl" --    c <- contentspec `onFail` failP "missing content spec in ELEMENT decl" --    tok TokAnyClose `onFail` failP "expected > terminating ELEMENT decl" --    return (ElementDecl n c)@@ -421,8 +424,8 @@ --contentspec = --    ( word "EMPTY" >> return EMPTY) `onFail` --    ( word "ANY" >> return ANY) `onFail`---    ( mixed >>= return . Mixed) `onFail`---    ( cp >>= return . ContentSpec) `onFail`+--    (Mixed <$> mixed) `onFail`+--    (ContentSpec <$> cp) `onFail` --    PEREF(ContentPE,contentspec) -- --choice :: HParser [CP]@@ -437,7 +440,7 @@ -- --cp :: HParser CP --cp =---    ( do n <- name+--    ( do n <- qname --         m <- modifier --         return (TagName n m)) `onFail` --    ( do ss <- sequence@@ -464,7 +467,7 @@ --  where --    cont = ( tok TokBraClose >> return PCDATA) `onFail` --           ( do cs <- many ( do tok TokPipe---                                n <- name+--                                n <- qname --                                return n) --                tok TokBraClose --                tok TokStar@@ -474,14 +477,14 @@ --attlistdecl = do --    tok TokSpecialOpen --    tok (TokSpecial ATTLISTx)---    n <- name `onFail` failP "missing identifier in ATTLIST"+--    n <- qname `onFail` failP "missing identifier in ATTLIST" --    ds <- many attdef --    tok TokAnyClose `onFail` failP "missing > terminating ATTLIST" --    return (AttListDecl n ds) -- --attdef :: HParser AttDef --attdef = do---    n <- name+--    n <- qname --    t <- atttype `onFail` failP "missing attribute type in attlist defn" --    d <- defaultdecl --    return (AttDef n t d)@@ -489,8 +492,8 @@ --atttype :: HParser AttType --atttype = --    ( word "CDATA" >> return StringType) `onFail`---    ( tokenizedtype >>= return . TokenizedType) `onFail`---    ( enumeratedtype >>= return . EnumeratedType)+--    (TokenizedType <$> tokenizedtype) `onFail`+--    (EnumeratedType <$> enumeratedtype) -- --tokenizedtype :: HParser TokenizedType --tokenizedtype =@@ -504,8 +507,8 @@ -- --enumeratedtype :: HParser EnumeratedType --enumeratedtype =---    ( notationtype >>= return . NotationType) `onFail`---    ( enumeration >>= return . Enumeration)+--    (NotationType <$> notationtype) `onFail`+--    (Enumeration <$> enumeration) -- --notationtype :: HParser NotationType --notationtype = do@@ -552,7 +555,7 @@ --    return (IgnoreSectContents i is) -- --ignore :: HParser Ignore---ignore = freetext >>= return . Ignore+--ignore = Ignore <$> freetext  reference :: HParser Reference reference = do@@ -562,22 +565,22 @@                     = return . RefChar . fst . head . readHex $ i     val ('#':i)     | all isDigit i                     = return . RefChar . fst . head . readDec $ i-    val name        = return . RefEntity $ name+    val ent         = return . RefEntity $ ent  {- reference :: HParser Reference reference =-    ( charref >>= return . RefChar) `onFail`-    ( entityref >>= return . RefEntity)+    (RefChar <$> charref) `onFail`+    (RefEntity <$> entityref)  entityref :: HParser EntityRef entityref = do-    n <- bracket (tok TokAmp) (tok TokSemi) name+    n <- bracket (tok TokAmp) (commit $ tok TokSemi) name     return n  charref :: HParser CharRef charref = do-    bracket (tok TokAmp) (tok TokSemi) (freetext >>= readCharVal)+    bracket (tok TokAmp) (commit $ tok TokSemi) (freetext >>= readCharVal)   where     readCharVal ('#':'x':i) = return . fst . head . readHex $ i     readCharVal ('#':i)     = return . fst . head . readDec $ i@@ -590,8 +593,8 @@ -- --entitydecl :: HParser EntityDecl --entitydecl =---    ( gedecl >>= return . EntityGEDecl) `onFail`---    ( pedecl >>= return . EntityPEDecl)+--    (EntityGEDecl <$> gedecl) `onFail`+--    (EntityPEDecl <$> pedecl) -- --gedecl :: HParser GEDecl --gedecl = do@@ -614,25 +617,24 @@ -- --entitydef :: HParser EntityDef --entitydef =---    ( entityvalue >>= return . DefEntityValue) `onFail`+--    (DefEntityValue <$> entityvalue) `onFail` --    ( do eid <- externalid --         ndd <- maybe ndatadecl --         return (DefExternalID eid ndd)) -- --pedef :: HParser PEDef --pedef =---    ( entityvalue >>= return . PEDefEntityValue) `onFail`---    ( externalid >>= return . PEDefExternalID)+--    (PEDefEntityValue <$> entityvalue) `onFail`+--    (PEDefExternalID <$> externalid)  externalid :: HParser ExternalID externalid =     ( do word "SYSTEM"-         s <- systemliteral-         return (SYSTEM s)) `onFail`+         SYSTEM <$> systemliteral) `onFail`     ( do word "PUBLIC"          p <- pubidliteral-         s <- (systemliteral `onFail` return (SystemLiteral ""))-         return (PUBLIC p s))+         PUBLIC p <$> systemliteral `onFail` return (SystemLiteral "")+    )  --ndatadecl :: HParser NDataDecl --ndatadecl = do@@ -640,14 +642,14 @@ --    n <- name --    return (NDATA n) -textdecl :: HParser TextDecl-textdecl = do-    tok TokPIOpen-    (word "xml" `onFail` word "XML")-    v <- maybe versioninfo-    e <- encodingdecl-    tok TokPIClose `onFail` failP "expected ?> terminating text decl"-    return (TextDecl v e)+--textdecl :: HParser TextDecl+--textdecl = do+--    tok TokPIOpen+--    (word "xml" `onFail` word "XML")+--    v <- maybe versioninfo+--    e <- encodingdecl+--    tok TokPIClose `onFail` failP "expected ?> terminating text decl"+--    return (TextDecl v e)  --extparsedent :: HParser ExtParsedEnt --extparsedent = do@@ -663,9 +665,9 @@  encodingdecl :: HParser EncodingDecl encodingdecl = do-    (word "encoding" `onFail` word "ENCODING")+    word "encoding" `onFail` word "ENCODING"     tok TokEqual `onFail` failBadP "expected = in 'encoding' decl"-    f <- bracket (tok TokQuote) (tok TokQuote) freetext+    f <- bracket (tok TokQuote) (commit $ tok TokQuote) freetext     return (EncodingDecl f)  --notationdecl :: HParser NotationDecl@@ -677,26 +679,26 @@ --    tok TokAnyClose `onFail` failP "expected > terminating NOTATION decl" --    return (NOTATION n e) -publicid :: HParser PublicID-publicid = do-    word "PUBLICID"-    p <- pubidliteral-    return (PUBLICID p)+--publicid :: HParser PublicID+--publicid = do+--    word "PUBLICID"+--    p <- pubidliteral+--    return (PUBLICID p) -entityvalue :: HParser EntityValue-entityvalue = do-    evs <- bracket (tok TokQuote) (tok TokQuote) (many ev)-    return (EntityValue evs)+--entityvalue :: HParser EntityValue+--entityvalue = do+--    evs <- bracket (tok TokQuote) (commit $ tok TokQuote) (many ev)+--    return (EntityValue evs) -ev :: HParser EV-ev =-    ( freetext >>= return . EVString) `onFail`---  PEREF(EVPERef,ev) `onFail`-    ( reference >>= return . EVRef)+--ev :: HParser EV+--ev =+--    (EVString <$> freetext) `onFail`+-- -- PEREF(EVPERef,ev) `onFail`+--    (EVRef <$> reference)  attvalue :: HParser AttValue attvalue =-  ( do avs <- bracket (tok TokQuote) (tok TokQuote)+  ( do avs <- bracket (tok TokQuote) (commit $ tok TokQuote)                       (many (either freetext reference))        return (AttValue avs) ) `onFail`   ( do v <- nmtoken@@ -711,14 +713,13 @@  systemliteral :: HParser SystemLiteral systemliteral = do-    s <- bracket (tok TokQuote) (tok TokQuote) freetext-    return (SystemLiteral s)		-- note: need to fold &...; escapes+    s <- bracket (tok TokQuote) (commit $ tok TokQuote) freetext+    return (SystemLiteral s)            -- note: need to fold &...; escapes  pubidliteral :: HParser PubidLiteral pubidliteral = do-    s <- bracket (tok TokQuote) (tok TokQuote) freetext-    return (PubidLiteral s)		-- note: need to fold &...; escapes+    s <- bracket (tok TokQuote) (commit $ tok TokQuote) freetext+    return (PubidLiteral s)             -- note: need to fold &...; escapes  chardata :: HParser CharData-chardata = freetext -- >>= return . CharData-+chardata = freetext -- <&> CharData
src/Text/XML/HaXml/Html/ParseLazy.hs view
@@ -12,11 +12,11 @@   ) where  import Prelude hiding (either,maybe,sequence)-import qualified Prelude (either)-import Maybe hiding (maybe)-import Char (toLower, isSpace, isDigit, isHexDigit)+--import qualified Prelude (either)+import Data.Maybe hiding (maybe)+import Data.Char (toLower, {-isSpace,-} isDigit, isHexDigit) import Numeric (readDec,readHex)-import Monad+import Control.Monad  import Text.XML.HaXml.Types import Text.XML.HaXml.Lex@@ -24,7 +24,7 @@ import Text.ParserCombinators.Poly.Lazy  --  #define DEBUG- + #if defined(DEBUG) #  if ( defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ > 502 ) || \       ( defined(__NHC__) && __NHC__ > 114 ) || defined(__HUGS__)@@ -38,7 +38,7 @@ debug s = trace s (return ()) #else debug :: Monad m => String -> m ()-debug s = return ()+debug _ = return () #endif  @@ -46,39 +46,41 @@ --   contents of the file.  The result is the generic representation of --   an XML document.  Any errors cause program failure with message to stderr. htmlParse :: String -> String -> Document Posn-htmlParse name = {-simplify .-} fst . runParser document . xmlLex name+htmlParse file = {-simplify .-} fst . runParser document . xmlLex file  {- -- | The first argument is the name of the file, the second is the string --   contents of the file.  The result is the generic representation of --   an XML document.  Any parsing errors are returned in the @Either@ type. htmlParse' :: String -> String -> Either String (Document Posn)-htmlParse' name = Prelude.either Left (Right . simplify) . fst-                  . runParser document . xmlLex name+htmlParse' file = Prelude.either Left (Right . simplify) . fst+                  . runParser document . xmlLex file -}  ---- Document simplification ---- -simplify :: Document i -> Document i-simplify (Document p st (Elem n avs cs) ms) =-    Document p st (Elem n avs (deepfilter simp cs)) ms-  where-    simp (CElem (Elem "null" [] []) _) = False-    simp (CElem (Elem  n     _  []) _) | n `elem` ["font","p","i","b","em"-                                                  ,"tt","big","small"] = False- -- simp (CString False s _) | all isSpace s = False-    simp _ = True-    deepfilter p =-        filter p . map (\c-> case c of-                          CElem (Elem n avs cs) i-                                  -> CElem (Elem n avs (deepfilter p cs)) i-                          _       -> c)+--simplify :: Document i -> Document i+--simplify (Document p st (Elem n avs cs) ms) =+--    Document p st (Elem n avs (deepfilter simp cs)) ms+--  where+--    simp (CElem (Elem "null" [] []) _) = False+--    simp (CElem (Elem  n     _  []) _) | n `elem` ["font","p","i","b","em"+--                                                  ,"tt","big","small"] = False+-- -- simp (CString False s _) | all isSpace s = False+--    simp _ = True+--    deepfilter p =+--        filter p . map (\c-> case c of+--                          CElem (Elem n avs cs) i+--                                  -> CElem (Elem n avs (deepfilter p cs)) i+--                          _       -> c)  -- opening any of these, they close again immediately+selfclosingtags :: [String] selfclosingtags = ["img","hr","br","meta","col","link","base"                   ,"param","area","frame","input"]  --closing this, implicitly closes any of those which are contained in it+closeInnerTags :: [(String,[String])] closeInnerTags =   [ ("ul",      ["li"])   , ("ol",      ["li"])@@ -101,52 +103,45 @@   ]  --opening this, implicitly closes that-closes :: Name -> Name -> Bool-"a"  `closes` "a"   =  True-"li" `closes` "li"  =  True-"th" `closes`  t    | t `elem` ["th","td"]      =  True-"td" `closes`  t    | t `elem` ["th","td"]      =  True-"tr" `closes`  t    | t `elem` ["th","td","tr"] =  True-"dt" `closes`  t    | t `elem` ["dt","dd"]      =  True-"dd" `closes`  t    | t `elem` ["dt","dd"]      =  True+closes :: String -> String -> Bool+"a"     `closes` "a"   =  True+"li"    `closes` "li"  =  True+"th"    `closes`  t    | t `elem` ["th","td"]      =  True+"td"    `closes`  t    | t `elem` ["th","td"]      =  True+"tr"    `closes`  t    | t `elem` ["th","td","tr"] =  True+"dt"    `closes`  t    | t `elem` ["dt","dd"]      =  True+"dd"    `closes`  t    | t `elem` ["dt","dd"]      =  True "form"  `closes` "form"      = True "label" `closes` "label"     = True _       `closes` "option"    = True-"thead" `closes` t  | t `elem` ["colgroup"]          = True-"tfoot" `closes` t  | t `elem` ["thead","colgroup"]  = True-"tbody" `closes` t  | t `elem` ["tbody","tfoot","thead","colgroup"] = True+"thead" `closes` t     | t == "colgroup"                = True+"tfoot" `closes` t     | t `elem` ["thead","colgroup"]  = True+"tbody" `closes` t     | t `elem` ["tbody","tfoot","thead","colgroup"] = True "colgroup" `closes` "colgroup"  = True-t `closes` "p"-    | t `elem` ["p","h1","h2","h3","h4","h5","h6"-               ,"hr","div","ul","dl","ol","table"]  =  True+t       `closes` "p"   | t `elem` ["p","h1","h2","h3","h4","h5","h6"+                                  ,"hr","div","ul","dl","ol","table"]  =  True _ `closes` _ = False  ------ Misc ------fst3 (a,_,_) = a-snd3 (_,a,_) = a-thd3 (_,_,a) = a--- ---- Auxiliary Parsing Functions ----  type HParser a = Parser (Posn,TokenT) a  tok :: TokenT -> HParser TokenT tok t = do (p,t') <- next-           case t' of TokError s    -> report failBad (show t) p t'+           case t' of TokError _    -> report failBad (show t) p t'                       _ | t'==t     -> return t                         | otherwise -> report fail (show t) p t' +qname :: HParser QName+qname = fmap N name+ name :: HParser Name --name = do {(p,TokName s) <- next; return s} name = do (p,tok) <- next-          case tok of -            TokName s  -> return s -            TokError s -> report failBad "a name" p tok+          case tok of+            TokName s  -> return s+            TokError _ -> report failBad "a name" p tok             _          -> report fail "a name" p tok  string, freetext :: HParser String@@ -159,21 +154,21 @@  maybe :: HParser a -> HParser (Maybe a) maybe p =-    ( p >>= return . Just) `onFail`-    ( return Nothing)+    (Just <$> p) `onFail`+    return Nothing  either :: HParser a -> HParser b -> HParser (Either a b) either p q =-    ( p >>= return . Left) `onFail`-    ( q >>= return . Right)+    (Left <$> p) `onFail`+    (Right <$> q)  word :: String -> HParser () word s = do { x <- next             ; case x of-                (p,TokName n)     | s==n -> return ()-                (p,TokFreeText n) | s==n -> return ()-                (p,t@(TokError _)) -> report failBad (show s) p t-                (p,t) -> report fail (show s) p t+                (_p,TokName n)     | s==n -> return ()+                (_p,TokFreeText n) | s==n -> return ()+                ( p,t@(TokError _)) -> report failBad (show s) p t+                ( p,t) -> report fail (show s) p t             }  posn :: HParser Posn@@ -183,15 +178,15 @@           } `onFail` return noPos  nmtoken :: HParser NmToken-nmtoken = (string `onFail` freetext)+nmtoken = string `onFail` freetext  failP, failBadP :: String -> HParser a failP msg    = do { p <- posn; fail (msg++"\n    at "++show p) } failBadP msg = do { p <- posn; failBad (msg++"\n    at "++show p) }  report :: (String->HParser a) -> String -> Posn -> TokenT -> HParser a-report fail exp p t = fail ("Expected "++show exp++" but found "++show t-                           ++"\n  at "++show p)+report fail expect p t = fail ("Expected "++show expect++" but found "++show t+                               ++"\n  at "++show p)  adjustErrP :: HParser a -> (String->String) -> HParser a p `adjustErrP` f = p `onFail` do pn <- posn@@ -203,12 +198,12 @@ document = do     return Document         `apply` (prolog `adjustErr` ("unrecognisable XML prolog\n"++))-        `apply` (return emptyST)-        `apply` (do es <- many1 (element "HTML document")-                    return (case map snd es of+        `apply` return emptyST+        `apply` (do ht <- many1 (element (N "HTML document"))+                    return (case map snd ht of                                 [e] -> e-                                es  -> Elem "html" [] (map mkCElem es)))-        `apply` (many misc)+                                es  -> Elem (N "html") [] (map mkCElem es)))+        `apply` many misc   where mkCElem e = CElem e noPos  comment :: HParser Comment@@ -227,7 +222,7 @@ cdsect :: HParser CDSect cdsect = do     tok TokSectionOpen-    bracket (tok (TokSection CDATAx)) (tok TokSectionClose) chardata+    bracket (tok (TokSection CDATAx)) (commit $ tok TokSectionClose) chardata  prolog :: HParser Prolog prolog = do@@ -240,7 +235,7 @@ xmldecl :: HParser XMLDecl xmldecl = do     tok TokPIOpen-    (word "xml" `onFail` word "XML")+    word "xml" `onFail` word "XML"     p <- posn     s <- freetext     tok TokPIClose `onFail` failBadP "missing ?> in <?xml ...?>"@@ -254,14 +249,14 @@  versioninfo :: HParser VersionInfo versioninfo = do-    (word "version" `onFail` word "VERSION")+    word "version" `onFail` word "VERSION"     tok TokEqual-    bracket (tok TokQuote) (tok TokQuote) freetext+    bracket (tok TokQuote) (commit $ tok TokQuote) freetext  misc :: HParser Misc-misc = -    oneOf' [ ("<!--comment-->", comment >>= return . Comment)-           , ("<?PI?>",         processinginstruction >>= return . PI)+misc =+    oneOf' [ ("<!--comment-->", Comment <$> comment)+           , ("<?PI?>",         PI <$> processinginstruction)            ]  @@ -273,20 +268,20 @@     tok TokSpecialOpen     tok (TokSpecial DOCTYPEx)     commit $ do-      n <- name+      n <- qname       eid <- maybe externalid---    es <- maybe (bracket (tok TokSqOpen) (tok TokSqClose)) (many markupdecl)+--    es <- maybe (bracket (tok TokSqOpen) (commit $ tok TokSqClose)) (many markupdecl)       tok TokAnyClose  `onFail` failP "missing > in DOCTYPE decl" --    return (DTD n eid (case es of { Nothing -> []; Just e -> e }))       return (DTD n eid [])  --markupdecl :: HParser MarkupDecl --markupdecl =---    ( elementdecl >>= return . Element) `onFail`---    ( attlistdecl >>= return . AttList) `onFail`---    ( entitydecl >>= return . Entity) `onFail`---    ( notationdecl >>= return . Notation) `onFail`---    ( misc >>= return . MarkupMisc) `onFail`+--    (Element <$> elementdecl) `onFail`+--    (AttList <$> attlistdecl) `onFail`+--    (Entity <$> entitydecl) `onFail`+--    (Notation <$> notationdecl) `onFail`+--    (MarkupMisc <$> misc) `onFail` --    PEREF(MarkupPE,markupdecl) -- --extsubset :: HParser ExtSubset@@ -297,16 +292,16 @@ -- --extsubsetdecl :: HParser ExtSubsetDecl --extsubsetdecl =---    ( markupdecl >>= return . ExtMarkupDecl) `onFail`---    ( conditionalsect >>= return . ExtConditionalSect) `onFail`+--    (ExtMarkupDecl <$> markupdecl) `onFail`+--    (ExtConditionalSect <$> conditionalsect) `onFail` --    PEREF(ExtPEReference,extsubsetdecl)  sddecl :: HParser SDDecl sddecl = do-    (word "standalone" `onFail` word "STANDALONE")+    word "standalone" `onFail` word "STANDALONE"     commit $ do       tok TokEqual `onFail` failP "missing = in 'standalone' decl"-      bracket (tok TokQuote) (tok TokQuote)+      bracket (tok TokQuote) (commit $ tok TokQuote)               ( (word "yes" >> return True) `onFail`                 (word "no" >> return False) `onFail`                 failP "'standalone' decl requires 'yes' or 'no' value" )@@ -320,44 +315,44 @@ -- earliest opportunity. type Stack = [(Name,[Attribute])] -element :: Name -> HParser (Stack,Element Posn)-element ctx =+element :: QName -> HParser (Stack,Element Posn)+element (N ctx) =   do     tok TokAnyOpen-    (ElemTag e avs) <- elemtag+    (ElemTag (N e) avs) <- elemtag     ( if e `closes` ctx then          -- insert the missing close-tag, fail forward, and reparse.-         ( do debug ("/")+         ( do debug "/"               unparse ([TokEndOpen, TokName ctx, TokAnyClose,                         TokAnyOpen, TokName e] ++ reformatAttrs avs)-              return ([], Elem "null" [] []))+              return ([], Elem (N "null") [] []))       else if e `elem` selfclosingtags then          -- complete the parse straightaway.-         ( do tok TokEndClose	-- self-closing <tag /> +         ( do tok TokEndClose   -- self-closing <tag />               debug (e++"[+]")-              return ([], Elem e avs [])) `onFail`-     --  ( do tok TokAnyClose	-- sequence <tag></tag>	(**not HTML?**)+              return ([], Elem (N e) avs [])) `onFail`+     --  ( do tok TokAnyClose   -- sequence <tag></tag> (**not HTML?**)      --       debug (e++"[+")-     --       n <- bracket (tok TokEndOpen) (tok TokAnyClose) name+     --       n <- bracket (tok TokEndOpen) (commit $ tok TokAnyClose) qname      --       debug "]"-     --       if e == (map toLower n :: Name) -     --         then return ([], Elem e avs [])      +     --       if e == (map toLower n :: Name)+     --         then return ([], Elem e avs [])      --         else return (error "no nesting in empty tag")) `onFail`-         ( do tok TokAnyClose	-- <tag> with no close (e.g. <IMG>)+         ( do tok TokAnyClose   -- <tag> with no close (e.g. <IMG>)               debug (e++"[+]")-              return ([], Elem e avs []))+              return ([], Elem (N e) avs []))       else-        (( do tok TokEndClose-              debug (e++"[]")-              return ([], Elem e avs [])) `onFail`+        ( do tok TokEndClose+             debug (e++"[]")+             return ([], Elem (N e) avs [])) `onFail`          ( do tok TokAnyClose `onFail` failP "missing > or /> in element tag"               debug (e++"[")               return (\ interior-> let (stack,contained) = interior-                                   in  (stack, Elem e avs contained))+                                   in  (stack, Elem (N e) avs contained))                   `apply`                   (do zz <- manyFinally (content e)                                         (tok TokEndOpen)-                      n <- name+                      (N n) <- qname                       commit (tok TokAnyClose)                       debug "]"                       let (ss,cs) = unzip zz@@ -369,8 +364,8 @@                         else                           do unparse [TokEndOpen, TokName n, TokAnyClose]                              debug "-"-                             return (((e,avs):s), cs)))-         ) `onFail` failP ("failed to repair non-matching tags in context: "++ctx)))+                             return ((e,avs):s, cs)))+         ) `onFail` failP ("failed to repair non-matching tags in context: "++ctx))  closeInner :: Name -> [(Name,[Attribute])] -> [(Name,[Attribute])] closeInner c ts =@@ -378,19 +373,24 @@       (Just these) -> filter ((`notElem` these).fst) ts       Nothing      -> ts +unparse :: [TokenT] -> Parser (Posn, TokenT) () unparse ts = do p <- posn                 reparse (zip (repeat p) ts) -reformatAttrs avs = concatMap f0 avs-    where f0 (a, v@(AttValue _)) = [TokName a, TokEqual, TokQuote,+reformatAttrs :: [(QName, AttValue)] -> [TokenT]+reformatAttrs = concatMap f0+    where f0 (N a, v@(AttValue _)) = [TokName a, TokEqual, TokQuote,                                        TokFreeText (show v), TokQuote]-reformatTags ts = concatMap f0 ts-    where f0 (t,avs) = [TokAnyOpen, TokName t]++reformatAttrs avs++[TokAnyClose] +reformatTags :: [(Name, [(QName, AttValue)])] -> [TokenT]+reformatTags = concatMap f0+    where f0 (t,avs) = [TokAnyOpen, TokName t]++reformatAttrs avs+                         ++[TokAnyClose]+ content :: Name -> HParser (Stack,Content Posn)-content ctx = do { p <- posn ; content' p ctx }-  where content' p ctx = oneOf'-          [ ( "element", element ctx >>= \(s,e)-> return (s, CElem e p))+content ctx = do { p <- posn ; content' p }+  where content' p = oneOf'+          [ ( "element", element (N ctx) >>= \(s,e)-> return (s, CElem e p))           , ( "chardata", chardata >>= \s-> return ([], CString False s p))           , ( "reference", reference >>= \r-> return ([], CRef r p))           , ( "cdsect", cdsect >>= \c-> return ([], CString True c p))@@ -400,23 +400,23 @@ ---- elemtag :: HParser ElemTag elemtag = do-    n <- name `adjustErrBad` ("malformed element tag\n"++)+    (N n) <- qname `adjustErrBad` ("malformed element tag\n"++)     as <- many attribute-    return (ElemTag (map toLower n) as)+    return (ElemTag (N (map toLower n)) as)  attribute :: HParser Attribute attribute = do-    n <- name+    (N n) <- qname     v <- (do tok TokEqual              attvalue) `onFail`-         (return (AttValue [Left "TRUE"]))-    return (map toLower n,v)+         return (AttValue [Left "TRUE"])+    return (N (map toLower n), v)  --elementdecl :: HParser ElementDecl --elementdecl = do --    tok TokSpecialOpen --    tok (TokSpecial ELEMENTx)---    n <- name `onFail` failP "missing identifier in ELEMENT decl"+--    n <- qname `onFail` failP "missing identifier in ELEMENT decl" --    c <- contentspec `onFail` failP "missing content spec in ELEMENT decl" --    tok TokAnyClose `onFail` failP "expected > terminating ELEMENT decl" --    return (ElementDecl n c)@@ -425,8 +425,8 @@ --contentspec = --    ( word "EMPTY" >> return EMPTY) `onFail` --    ( word "ANY" >> return ANY) `onFail`---    ( mixed >>= return . Mixed) `onFail`---    ( cp >>= return . ContentSpec) `onFail`+--    (Mixed <$> mixed) `onFail`+--    (ContentSpec <$> cp) `onFail` --    PEREF(ContentPE,contentspec) -- --choice :: HParser [CP]@@ -441,7 +441,7 @@ -- --cp :: HParser CP --cp =---    ( do n <- name+--    ( do n <- qname --         m <- modifier --         return (TagName n m)) `onFail` --    ( do ss <- sequence@@ -468,7 +468,7 @@ --  where --    cont = ( tok TokBraClose >> return PCDATA) `onFail` --           ( do cs <- many ( do tok TokPipe---                                n <- name+--                                n <- qname --                                return n) --                tok TokBraClose --                tok TokStar@@ -478,14 +478,14 @@ --attlistdecl = do --    tok TokSpecialOpen --    tok (TokSpecial ATTLISTx)---    n <- name `onFail` failP "missing identifier in ATTLIST"+--    n <- qname `onFail` failP "missing identifier in ATTLIST" --    ds <- many attdef --    tok TokAnyClose `onFail` failP "missing > terminating ATTLIST" --    return (AttListDecl n ds) -- --attdef :: HParser AttDef --attdef = do---    n <- name+--    n <- qname --    t <- atttype `onFail` failP "missing attribute type in attlist defn" --    d <- defaultdecl --    return (AttDef n t d)@@ -493,8 +493,8 @@ --atttype :: HParser AttType --atttype = --    ( word "CDATA" >> return StringType) `onFail`---    ( tokenizedtype >>= return . TokenizedType) `onFail`---    ( enumeratedtype >>= return . EnumeratedType)+--    (TokenizedType <$> tokenizedtype) `onFail`+--    (EnumeratedType <$> enumeratedtype) -- --tokenizedtype :: HParser TokenizedType --tokenizedtype =@@ -508,18 +508,18 @@ -- --enumeratedtype :: HParser EnumeratedType --enumeratedtype =---    ( notationtype >>= return . NotationType) `onFail`---    ( enumeration >>= return . Enumeration)+--    (NotationType <$> notationtype) `onFail`+--    (Enumeration <$> enumeration) -- --notationtype :: HParser NotationType --notationtype = do --    word "NOTATION"---    bracket (tok TokBraOpen) (tok TokBraClose)+--    bracket (tok TokBraOpen) (commit $ tok TokBraClose) --            (name `sepby1` (tok TokPipe)) -- --enumeration :: HParser Enumeration --enumeration =---    bracket (tok TokBraOpen) (tok TokBraClose)+--    bracket (tok TokBraOpen) (commit $ tok TokBraClose) --            (nmtoken `sepby1` (tok TokPipe)) -- --defaultdecl :: HParser DefaultDecl@@ -556,7 +556,7 @@ --    return (IgnoreSectContents i is) -- --ignore :: HParser Ignore---ignore = freetext >>= return . Ignore+--ignore = Ignore <$> freetext  reference :: HParser Reference reference = do@@ -566,22 +566,22 @@                     = return . RefChar . fst . head . readHex $ i     val ('#':i)     | all isDigit i                     = return . RefChar . fst . head . readDec $ i-    val name        = return . RefEntity $ name+    val ent         = return . RefEntity $ ent  {- reference :: HParser Reference reference =-    ( charref >>= return . RefChar) `onFail`-    ( entityref >>= return . RefEntity)+    (RefChar <$> charref) `onFail`+    (RefEntity <$> entityref)  entityref :: HParser EntityRef entityref = do-    n <- bracket (tok TokAmp) (tok TokSemi) name+    n <- bracket (tok TokAmp) (commit $ tok TokSemi) name     return n  charref :: HParser CharRef charref = do-    bracket (tok TokAmp) (tok TokSemi) (freetext >>= readCharVal)+    bracket (tok TokAmp) (commit $ tok TokSemi) (freetext >>= readCharVal)   where     readCharVal ('#':'x':i) = return . fst . head . readHex $ i     readCharVal ('#':i)     = return . fst . head . readDec $ i@@ -594,8 +594,8 @@ -- --entitydecl :: HParser EntityDecl --entitydecl =---    ( gedecl >>= return . EntityGEDecl) `onFail`---    ( pedecl >>= return . EntityPEDecl)+--    (EntityGEDecl <$> gedecl) `onFail`+--    (EntityPEDecl <$> pedecl) -- --gedecl :: HParser GEDecl --gedecl = do@@ -618,24 +618,24 @@ -- --entitydef :: HParser EntityDef --entitydef =---    ( entityvalue >>= return . DefEntityValue) `onFail`+--    (DefEntityValue <$> entityvalue) `onFail` --    ( do eid <- externalid --         ndd <- maybe ndatadecl --         return (DefExternalID eid ndd)) -- --pedef :: HParser PEDef --pedef =---    ( entityvalue >>= return . PEDefEntityValue) `onFail`---    ( externalid >>= return . PEDefExternalID)+--    (PEDefEntityValue <$> entityvalue) `onFail`+--    (PEDefExternalID <$> externalid)  externalid :: HParser ExternalID externalid =     ( do word "SYSTEM"-         s <- systemliteral-         return (SYSTEM s)) `onFail`+         SYSTEM <$> systemliteral+    ) `onFail`     ( do word "PUBLIC"          p <- pubidliteral-         s <- (systemliteral `onFail` return (SystemLiteral ""))+         s <- systemliteral `onFail` return (SystemLiteral "")          return (PUBLIC p s))  --ndatadecl :: HParser NDataDecl@@ -644,14 +644,14 @@ --    n <- name --    return (NDATA n) -textdecl :: HParser TextDecl-textdecl = do-    tok TokPIOpen-    (word "xml" `onFail` word "XML")-    v <- maybe versioninfo-    e <- encodingdecl-    tok TokPIClose `onFail` failP "expected ?> terminating text decl"-    return (TextDecl v e)+--textdecl :: HParser TextDecl+--textdecl = do+--    tok TokPIOpen+--    (word "xml" `onFail` word "XML")+--    v <- maybe versioninfo+--    e <- encodingdecl+--    tok TokPIClose `onFail` failP "expected ?> terminating text decl"+--    return (TextDecl v e)  --extparsedent :: HParser ExtParsedEnt --extparsedent = do@@ -667,9 +667,9 @@  encodingdecl :: HParser EncodingDecl encodingdecl = do-    (word "encoding" `onFail` word "ENCODING")+    word "encoding" `onFail` word "ENCODING"     tok TokEqual `onFail` failBadP "expected = in 'encoding' decl"-    f <- bracket (tok TokQuote) (tok TokQuote) freetext+    f <- bracket (tok TokQuote) (commit $ tok TokQuote) freetext     return (EncodingDecl f)  --notationdecl :: HParser NotationDecl@@ -681,26 +681,26 @@ --    tok TokAnyClose `onFail` failP "expected > terminating NOTATION decl" --    return (NOTATION n e) -publicid :: HParser PublicID-publicid = do-    word "PUBLICID"-    p <- pubidliteral-    return (PUBLICID p)+--publicid :: HParser PublicID+--publicid = do+--    word "PUBLICID"+--    p <- pubidliteral+--    return (PUBLICID p) -entityvalue :: HParser EntityValue-entityvalue = do-    evs <- bracket (tok TokQuote) (tok TokQuote) (many ev)-    return (EntityValue evs)+--entityvalue :: HParser EntityValue+--entityvalue = do+--    evs <- bracket (tok TokQuote) (commit $ tok TokQuote) (many ev)+--    return (EntityValue evs) -ev :: HParser EV-ev =-    ( freetext >>= return . EVString) `onFail`---  PEREF(EVPERef,ev) `onFail`-    ( reference >>= return . EVRef)+--ev :: HParser EV+--ev =+--    (EVString <$> freetext) `onFail`+-- -- PEREF(EVPERef,ev) `onFail`+--    (EVRef <$> reference)  attvalue :: HParser AttValue attvalue =-  ( do avs <- bracket (tok TokQuote) (tok TokQuote)+  ( do avs <- bracket (tok TokQuote) (commit $ tok TokQuote)                       (many (either freetext reference))        return (AttValue avs) ) `onFail`   ( do v <- nmtoken@@ -715,14 +715,13 @@  systemliteral :: HParser SystemLiteral systemliteral = do-    s <- bracket (tok TokQuote) (tok TokQuote) freetext-    return (SystemLiteral s)		-- note: need to fold &...; escapes+    s <- bracket (tok TokQuote) (commit $ tok TokQuote) freetext+    return (SystemLiteral s)            -- note: need to fold &...; escapes  pubidliteral :: HParser PubidLiteral pubidliteral = do-    s <- bracket (tok TokQuote) (tok TokQuote) freetext-    return (PubidLiteral s)		-- note: need to fold &...; escapes+    s <- bracket (tok TokQuote) (commit $ tok TokQuote) freetext+    return (PubidLiteral s)             -- note: need to fold &...; escapes  chardata :: HParser CharData-chardata = freetext -- >>= return . CharData-+chardata = freetext -- <&> CharData
src/Text/XML/HaXml/Html/Pretty.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE CPP #-} -- | This is a separate pretty-printer for HTML documents, recognising --   some of the differences between HTML and true XML. @@ -8,18 +9,26 @@   , content   ) where +#if MIN_VERSION_base(4,11,0)+import Prelude hiding (maybe,either,(<>))+#else import Prelude hiding (maybe,either)-import Maybe hiding (maybe)-import List (intersperse)-import Char (isSpace)+#endif++import Data.Maybe hiding (maybe)+import Data.List (intersperse)+import Data.Char (isSpace) import Text.PrettyPrint.HughesPJ import Text.XML.HaXml.Types+import Text.XML.HaXml.Namespaces -either f g (Left x)  = f x-either f g (Right x) = g x+either :: (a->c) -> (b->c) -> Either a b -> c+either  f _g (Left x)  = f x+either _f  g (Right x) = g x -maybe f Nothing  = empty-maybe f (Just x) = f x+maybe :: (a->Doc) -> Maybe a -> Doc+maybe _f Nothing  = empty+maybe  f (Just x) = f x  --peref p   = text "%" <> text p <> text ";" @@ -33,8 +42,8 @@  doctypedecl :: DocTypeDecl -> Doc markupdecl  :: MarkupDecl -> Doc-extsubset   :: ExtSubset -> Doc-extsubsetdecl :: ExtSubsetDecl -> Doc+--extsubset   :: ExtSubset -> Doc+--extsubsetdecl :: ExtSubsetDecl -> Doc  element   :: Element i -> Doc attribute :: Attribute -> Doc                     --etc@@ -55,11 +64,11 @@ misc (PI (n,s))            = text "<?" <> text n <+> text s <+> text "?>" sddecl sd   | sd           = text "standalone='yes'"             | otherwise    = text "standalone='no'"-doctypedecl (DTD n eid ds) = if null ds then +doctypedecl (DTD n eid ds) = if null ds then                                   hd <> text ">"                              else hd <+> text " [" $$                                   vcat (map markupdecl ds) $$ text "]>"-                           where hd = text "<!DOCTYPE" <+> text n <+>+                           where hd = text "<!DOCTYPE" <+> qname n <+>                                       maybe externalid eid markupdecl (Element e)     = elementdecl e markupdecl (AttList a)     = attlistdecl a@@ -67,40 +76,43 @@ markupdecl (Notation n)    = notationdecl n markupdecl (MarkupMisc m)  = misc m --markupdecl (MarkupPE p m)  = peref p-extsubset (ExtSubset t ds) = maybe textdecl t $$-                             vcat (map extsubsetdecl ds)-extsubsetdecl (ExtMarkupDecl m)      = markupdecl m-extsubsetdecl (ExtConditionalSect c) = conditionalsect c---extsubsetdecl (ExtPEReference p e)   = peref p -element (Elem n as []) = text "<" <> text n <+>+--extsubset (ExtSubset t ds) = maybe textdecl t $$+--                             vcat (map extsubsetdecl ds)+--extsubsetdecl (ExtMarkupDecl m)      = markupdecl m+--extsubsetdecl (ExtConditionalSect c) = conditionalsect c+-- --extsubsetdecl (ExtPEReference p e)   = peref p++element (Elem n as []) = text "<" <> qname n <+>                          fsep (map attribute as) <> text "/>" element e@(Elem n as cs)---  | any isText cs    = text "<" <> text n <+> fsep (map attribute as) <>+--  | any isText cs    = text "<" <> qname n <+> fsep (map attribute as) <> --                       text ">" <> hcat (map content cs) <>---                       text "</" <> text n <> text ">"-    | isText (head cs) = text "<" <> text n <+> fsep (map attribute as) <>+--                       text "</" <> qname n <> text ">"+    | isText (head cs) = text "<" <> qname n <+> fsep (map attribute as) <>                          text ">" <> hcat (map content cs) <>-                         text "</" <> text n <> text ">"+                         text "</" <> qname n <> text ">"     | otherwise        = let (d,c) = carryelem e empty                          in d <> c +isText :: Content i -> Bool isText (CString _ _ _) = True isText (CRef _ _)      = True isText _               = False +carryelem :: Element i -> Doc -> (Doc, Doc) carryelem (Elem n as []) c                        = ( c <>-                           text "<" <> text n <+> fsep (map attribute as)+                           text "<" <> qname n <+> fsep (map attribute as)                          , text "/>") --carryelem e@(Elem n as cs) c ----  | any isText cs    =  ( c <> element e, empty) --    | otherwise        =  let (cs',d') = carryscan carrycontent cs (text ">") --                          in --                          ( c <>---                            text "<" <> text n <+> fsep (map attribute as) $$+--                            text "<" <> qname n <+> fsep (map attribute as) $$ --                            nest 2 (vcat cs') <> -- $$---                            c' <> text "</" <> text n+--                            c' <> text "</" <> qname n --                          , text ">") --carrycontent (CElem e) c   = carryelem e c --carrycontent (CString _ s) c = (c <> chardata s, empty)@@ -113,17 +125,18 @@ --                           (bs,c'') = carryscan f as c' --                       in (b:bs, c'') -carryelem e@(Elem n as cs) c+carryelem (Elem n as cs) c   | isText (head cs) =         ( start <>-          text ">" <> hcat (map content cs) <> text "</" <> text n+          text ">" <> hcat (map content cs) <> text "</" <> qname n         , text ">")   | otherwise =         let (d,c') = foldl carrycontent (start, text ">") cs in-        ( d <> c' <> text "</" <> text n+        ( d <> c' <> text "</" <> qname n         , text ">")-  where start = c <> text "<" <> text n <+> fsep (map attribute as)+  where start = c <> text "<" <> qname n <+> fsep (map attribute as) +carrycontent :: (Doc, Doc) -> Content i -> (Doc, Doc) carrycontent (d,c) (CElem e _)     = let (d',c') = carryelem e c in                                      (d $$ nest 2 d',       c') carrycontent (d,c) (CString _ s _) = (d <> c <> chardata s, empty)@@ -131,20 +144,55 @@ carrycontent (d,c) (CMisc m _)     = (d $$ c <> misc m,     empty)  -attribute (n,v)          = text n <> text "=" <> attvalue v+attribute (n,v)          = qname n <> text "=" <> attvalue v content (CElem e _)      = element e content (CString _ s _)  = chardata s content (CRef r _)       = reference r content (CMisc m _)      = misc m -elementdecl (ElementDecl n cs) = text "<!ELEMENT" <+> text n <+>+elementdecl     :: ElementDecl -> Doc+contentspec     :: ContentSpec -> Doc+cp              :: CP -> Doc+modifier        :: Modifier -> Doc+mixed           :: Mixed -> Doc+attlistdecl     :: AttListDecl -> Doc+attdef          :: AttDef -> Doc+atttype         :: AttType -> Doc+tokenizedtype   :: TokenizedType -> Doc+enumeratedtype  :: EnumeratedType -> Doc+notationtype    :: [String] -> Doc+enumeration     :: [String] -> Doc+defaultdecl     :: DefaultDecl -> Doc+reference       :: Reference -> Doc+entityref       :: String -> Doc+charref         :: (Show a) => a -> Doc+entitydecl      :: EntityDecl -> Doc+gedecl          :: GEDecl -> Doc+pedecl          :: PEDecl -> Doc+entitydef       :: EntityDef -> Doc+pedef           :: PEDef -> Doc+externalid      :: ExternalID -> Doc+ndatadecl       :: NDataDecl -> Doc+notationdecl    :: NotationDecl -> Doc+publicid        :: PublicID -> Doc+encodingdecl    :: EncodingDecl -> Doc+nmtoken         :: String -> Doc+attvalue        :: AttValue -> Doc+entityvalue     :: EntityValue -> Doc+ev              :: EV -> Doc+pubidliteral    :: PubidLiteral -> Doc+systemliteral   :: SystemLiteral -> Doc+chardata        :: [Char] -> Doc+++elementdecl (ElementDecl n cs) = text "<!ELEMENT" <+> qname n <+>                                  contentspec cs <> text ">" contentspec EMPTY              = text "EMPTY" contentspec ANY                = text "ANY" contentspec (Mixed m)          = mixed m contentspec (ContentSpec c)    = cp c --contentspec (ContentPE p cs)   = peref p-cp (TagName n m)       = text n <> modifier m+cp (TagName n m)       = qname n <> modifier m cp (Choice cs m)       = parens (hcat (intersperse (text "|") (map cp cs))) <>                            modifier m cp (Seq cs m)          = parens (hcat (intersperse (text ",") (map cp cs))) <>@@ -156,12 +204,12 @@ modifier Plus          = text "+" mixed  PCDATA          = text "(#PCDATA)" mixed (PCDATAplus ns)  = text "(#PCDATA |" <+>-                         hcat (intersperse (text "|") (map text ns)) <>+                         hcat (intersperse (text "|") (map qname ns)) <>                          text ")*" -attlistdecl (AttListDecl n ds) = text "<!ATTLIST" <+> text n <+>+attlistdecl (AttListDecl n ds) = text "<!ATTLIST" <+> qname n <+>                                  fsep (map attdef ds) <> text ">"-attdef (AttDef n t d)          = text n <+> atttype t <+> defaultdecl d+attdef (AttDef n t d)          = qname n <+> atttype t <+> defaultdecl d atttype  StringType            = text "CDATA" atttype (TokenizedType t)      = tokenizedtype t atttype (EnumeratedType t)     = enumeratedtype t@@ -180,16 +228,16 @@ defaultdecl  REQUIRED          = text "#REQUIRED" defaultdecl  IMPLIED           = text "#IMPLIED" defaultdecl (DefaultTo a f)    = maybe (const (text "#FIXED")) f <+> attvalue a-conditionalsect (IncludeSect i)= text "<![INCLUDE [" <+>-                                 vcat (map extsubsetdecl i) <+> text "]]>"-conditionalsect (IgnoreSect i) = text "<![IGNORE [" <+>-                                 fsep (map ignoresectcontents i) <+> text "]]>"-ignore (Ignore)                = empty-ignoresectcontents (IgnoreSectContents i is)-                               = ignore i <+> vcat (map internal is)-                          where internal (ics,i) = text "<![[" <+>-                                                   ignoresectcontents ics <+>-                                                   text "]]>" <+> ignore i+--conditionalsect (IncludeSect i)= text "<![INCLUDE [" <+>+--                                 vcat (map extsubsetdecl i) <+> text "]]>"+--conditionalsect (IgnoreSect i) = text "<![IGNORE [" <+>+--                                 fsep (map ignoresectcontents i) <+> text "]]>"+--ignore (Ignore)                = empty+--ignoresectcontents (IgnoreSectContents i is)+--                               = ignore i <+> vcat (map internal is)+--                          where internal (ics,i) = text "<![[" <+>+--                                                   ignoresectcontents ics <+>+--                                                   text "]]>" <+> ignore i reference (RefEntity er)       = entityref er reference (RefChar cr)         = charref cr entityref n                    = text "&" <> text n <> text ";"@@ -208,11 +256,11 @@ externalid (PUBLIC i sl)       = text "PUBLIC" <+> pubidliteral i <+>                                  systemliteral sl ndatadecl (NDATA n)            = text "NDATA" <+> text n-textdecl (TextDecl vi ed)      = text "<?xml" <+> maybe text vi <+>-                                 encodingdecl ed <> text "?>"-extparsedent (ExtParsedEnt t c)= maybe textdecl t <+> content c-extpe (ExtPE t esd)            = maybe textdecl t <+>-                                 vcat (map extsubsetdecl esd)+--textdecl (TextDecl vi ed)      = text "<?xml" <+> maybe text vi <+>+--                                 encodingdecl ed <> text "?>"+--extparsedent (ExtParsedEnt t c)= maybe textdecl t <+> content c+--extpe (ExtPE t esd)            = maybe textdecl t <+>+--                                 vcat (map extsubsetdecl esd) notationdecl (NOTATION n e)    = text "<!NOTATION" <+> text n <+>                                  either externalid publicid e <>                                  text ">"@@ -229,6 +277,8 @@ pubidliteral (PubidLiteral s)  = text "'" <> text s <> text "'" systemliteral (SystemLiteral s)= text "'" <> text s <> text "'" chardata s                     = if all isSpace s then empty else text s-cdsect c                       = text "<![CDATA[" <> chardata c <> text "]]>"+--cdsect c                       = text "<![CDATA[" <> chardata c <> text "]]>"++qname n                        = text (printableName n)  ----
src/Text/XML/HaXml/Lex.hs view
@@ -26,7 +26,7 @@   , Section(..)   ) where -import Char+import Data.Char import Text.XML.HaXml.Posn  data Where = InTag String | NotInTag@@ -38,38 +38,38 @@  -- | The basic token type. data TokenT =-      TokCommentOpen		-- ^   \<!---    | TokCommentClose		-- ^   -->-    | TokPIOpen			-- ^   \<?-    | TokPIClose		-- ^   ?>-    | TokSectionOpen		-- ^   \<![-    | TokSectionClose		-- ^   ]]>-    | TokSection Section	-- ^   CDATA INCLUDE IGNORE etc-    | TokSpecialOpen		-- ^   \<!-    | TokSpecial Special	-- ^   DOCTYPE ELEMENT ATTLIST etc-    | TokEndOpen		-- ^   \<\/-    | TokEndClose		-- ^   \/>-    | TokAnyOpen		-- ^   \<-    | TokAnyClose		-- ^   >-    | TokSqOpen			-- ^   \[-    | TokSqClose		-- ^   \]-    | TokEqual			-- ^   =-    | TokQuery			-- ^   ?-    | TokStar			-- ^   \*-    | TokPlus			-- ^   +-    | TokAmp			-- ^   &-    | TokSemi			-- ^   ;-    | TokHash			-- ^   #-    | TokBraOpen		-- ^   (-    | TokBraClose		-- ^   )-    | TokPipe			-- ^   |-    | TokPercent		-- ^   %-    | TokComma			-- ^   ,-    | TokQuote			-- ^   \'\' or \"\"-    | TokName      String	-- ^   begins with letter, no spaces-    | TokFreeText  String	-- ^   any character data-    | TokNull			-- ^   fake token-    | TokError     String	-- ^   lexical error+      TokCommentOpen            -- ^   \<!--+    | TokCommentClose           -- ^   -->+    | TokPIOpen                 -- ^   \<?+    | TokPIClose                -- ^   ?>+    | TokSectionOpen            -- ^   \<![+    | TokSectionClose           -- ^   ]]>+    | TokSection Section        -- ^   CDATA INCLUDE IGNORE etc+    | TokSpecialOpen            -- ^   \<!+    | TokSpecial Special        -- ^   DOCTYPE ELEMENT ATTLIST etc+    | TokEndOpen                -- ^   \<\/+    | TokEndClose               -- ^   \/>+    | TokAnyOpen                -- ^   \<+    | TokAnyClose               -- ^   >+    | TokSqOpen                 -- ^   \[+    | TokSqClose                -- ^   \]+    | TokEqual                  -- ^   =+    | TokQuery                  -- ^   ?+    | TokStar                   -- ^   \*+    | TokPlus                   -- ^   ++    | TokAmp                    -- ^   &+    | TokSemi                   -- ^   ;+    | TokHash                   -- ^   #+    | TokBraOpen                -- ^   (+    | TokBraClose               -- ^   )+    | TokPipe                   -- ^   |+    | TokPercent                -- ^   %+    | TokComma                  -- ^   ,+    | TokQuote                  -- ^   \'\' or \"\"+    | TokName      String       -- ^   begins with letter, no spaces+    | TokFreeText  String       -- ^   any character data+    | TokNull                   -- ^   fake token+    | TokError     String       -- ^   lexical error     deriving (Eq)  data Special =@@ -86,38 +86,38 @@     deriving (Eq,Show)  instance Show TokenT where-  showsPrec p  TokCommentOpen		= showString     "<!--"-  showsPrec p  TokCommentClose		= showString     "-->"-  showsPrec p  TokPIOpen		= showString     "<?"-  showsPrec p  TokPIClose		= showString     "?>"-  showsPrec p  TokSectionOpen		= showString     "<!["-  showsPrec p  TokSectionClose		= showString     "]]>"-  showsPrec p  (TokSection s)		= showsPrec p s-  showsPrec p  TokSpecialOpen		= showString     "<!"-  showsPrec p  (TokSpecial s)		= showsPrec p s-  showsPrec p  TokEndOpen		= showString     "</"-  showsPrec p  TokEndClose		= showString     "/>"-  showsPrec p  TokAnyOpen		= showString     "<"-  showsPrec p  TokAnyClose		= showString     ">"-  showsPrec p  TokSqOpen		= showString     "["-  showsPrec p  TokSqClose		= showString     "]"-  showsPrec p  TokEqual			= showString     "="-  showsPrec p  TokQuery			= showString     "?"-  showsPrec p  TokStar			= showString     "*"-  showsPrec p  TokPlus			= showString     "+"-  showsPrec p  TokAmp			= showString     "&"-  showsPrec p  TokSemi			= showString     ";"-  showsPrec p  TokHash			= showString     "#"-  showsPrec p  TokBraOpen		= showString     "("-  showsPrec p  TokBraClose		= showString     ")"-  showsPrec p  TokPipe			= showString     "|"-  showsPrec p  TokPercent		= showString     "%"-  showsPrec p  TokComma			= showString     ","-  showsPrec p  TokQuote			= showString     "' or \""-  showsPrec p  (TokName      s)		= showString     s-  showsPrec p  (TokFreeText  s)		= showString     s-  showsPrec p  TokNull			= showString     "(null)"-  showsPrec p  (TokError     s)		= showString     s+  showsPrec _p TokCommentOpen           = showString     "<!--"+  showsPrec _p TokCommentClose          = showString     "-->"+  showsPrec _p TokPIOpen                = showString     "<?"+  showsPrec _p TokPIClose               = showString     "?>"+  showsPrec _p TokSectionOpen           = showString     "<!["+  showsPrec _p TokSectionClose          = showString     "]]>"+  showsPrec  p (TokSection s)           = showsPrec p s+  showsPrec _p TokSpecialOpen           = showString     "<!"+  showsPrec  p (TokSpecial s)           = showsPrec p s+  showsPrec _p TokEndOpen               = showString     "</"+  showsPrec _p TokEndClose              = showString     "/>"+  showsPrec _p TokAnyOpen               = showString     "<"+  showsPrec _p TokAnyClose              = showString     ">"+  showsPrec _p TokSqOpen                = showString     "["+  showsPrec _p TokSqClose               = showString     "]"+  showsPrec _p TokEqual                 = showString     "="+  showsPrec _p TokQuery                 = showString     "?"+  showsPrec _p TokStar                  = showString     "*"+  showsPrec _p TokPlus                  = showString     "+"+  showsPrec _p TokAmp                   = showString     "&"+  showsPrec _p TokSemi                  = showString     ";"+  showsPrec _p TokHash                  = showString     "#"+  showsPrec _p TokBraOpen               = showString     "("+  showsPrec _p TokBraClose              = showString     ")"+  showsPrec _p TokPipe                  = showString     "|"+  showsPrec _p TokPercent               = showString     "%"+  showsPrec _p TokComma                 = showString     ","+  showsPrec _p TokQuote                 = showString     "' or \""+  showsPrec _p (TokName      s)         = showString     s+  showsPrec _p (TokFreeText  s)         = showString     s+  showsPrec _p TokNull                  = showString     "(null)"+  showsPrec _p (TokError     s)         = showString     s  --trim, revtrim :: String -> String --trim    = f . f         where f = reverse . dropWhile isSpace@@ -134,8 +134,8 @@ skip n p s k = k (addcol n p) (drop n s)  blank :: ([Where]->Posn->String->[Token]) -> [Where]-> Posn-> String-> [Token]-blank k  (InTag t:_) p [] = lexerror ("unexpected EOF within "++t) p-blank k          _   p [] = []+blank _  (InTag t:_) p [] = lexerror ("unexpected EOF within "++t) p+blank _          _   _ [] = [] blank k      w p (' ': s) = blank k w (addcol 1 p) s blank k      w p ('\t':s) = blank k w (tab p) s blank k      w p ('\n':s) = blank k w (newline p) s@@ -144,24 +144,32 @@ blank k      w p    s     = k w p s  prefixes :: String -> String -> Bool-[]     `prefixes`   ys   = True+[]     `prefixes`   _    = True (x:xs) `prefixes` (y:ys) = x==y && xs `prefixes` ys-(x:xs) `prefixes`   []   = False --error "unexpected EOF in prefix"+(_:_)  `prefixes`   []   = False --error "unexpected EOF in prefix" -textUntil close tok acc pos p [] k =+textUntil, textOrRefUntil+    :: [Char] -> TokenT -> [Char] -> Posn -> Posn -> [Char]+       -> (Posn->String->[Token]) -> [Token]++textUntil close _tok _acc pos p [] _k =     lexerror ("unexpected EOF while looking for closing token "++close               ++"\n  to match the opening token in "++show pos) p-textUntil close tok acc pos p (s:ss) k+textUntil close  tok  acc pos p (s:ss) k     | close `prefixes` (s:ss)  = emit (TokFreeText (reverse acc)) pos:                                  emit tok p:                                  skip (length close-1) (addcol 1 p) ss k+    | tok==TokSemi && length acc >= 8 -- special case for repairing broken &+                               = emit (TokFreeText "amp") pos:+                                 emit tok pos:+                                 k (addcol 1 pos) (reverse acc++s:ss)     | isSpace s  = textUntil close tok (s:acc) pos (white s p) ss k     | otherwise  = textUntil close tok (s:acc) pos (addcol 1 p) ss k -textOrRefUntil close tok acc pos p [] k =+textOrRefUntil close _tok _acc pos p [] _k =     lexerror ("unexpected EOF while looking for closing token "++close               ++"\n  to match the opening token in "++show pos) p-textOrRefUntil close tok acc pos p (s:ss) k+textOrRefUntil close  tok  acc pos p (s:ss) k     | close `prefixes` (s:ss)  = emit (TokFreeText (reverse acc)) pos:                                  emit tok p:                                  skip (length close-1) (addcol 1 p) ss k@@ -202,11 +210,11 @@     textOrRefUntil "%" TokNull [] p p (expand s++"%") (xmlAny [])   where     expand []       = []-    expand ('%':ss) = let (sym,rest) = break (==';') ss in+    expand ('%':xs) = let (sym,rest) = break (==';') xs in                       case lookup sym of                         Just val -> expand val ++ expand (tail rest)                         Nothing  -> "%"++sym++";"++ expand (tail rest) -- hmmm-    expand (s:ss)   = s: expand ss+    expand (x:xs)   = x: expand xs  --xmltop :: Posn -> String -> [Token] --xmltop p [] = []@@ -217,15 +225,17 @@ --    | otherwise           = lexerror "expected <?xml?> or <!DOCTYPE>" p --  where next n k = skip n p s k +xmlPI, xmlPIEnd, xmlComment, xmlAny, xmlTag, xmlSection, xmlSpecial+    :: [Where] -> Posn -> String -> [Token]+ xmlPI      w p s = xmlName p s "name of processor in <? ?>" (blank xmlPIEnd w) xmlPIEnd   w p s = textUntil "?>"  TokPIClose "" p p s (blank xmlAny (tail w)) xmlComment w p s = textUntil "-->" TokCommentClose "" p p s (blank xmlAny w)  -- Note: the order of the clauses in xmlAny is very important. -- Some matches must precede the NotInTag test, the rest must follow it.-xmlAny :: [Where] -> Posn -> String -> [Token] xmlAny  (InTag t:_)  p [] = lexerror ("unexpected EOF within "++t) p-xmlAny          _    p [] = []+xmlAny          _    _ [] = [] xmlAny w p s@('<':ss)     | "?"   `prefixes` ss = emit TokPIOpen p:                                          skip 2 p s (xmlPI (InTag "<?...?>":w))@@ -233,10 +243,12 @@     | "!["  `prefixes` ss = emit TokSectionOpen p: skip 3 p s (xmlSection w)     | "!"   `prefixes` ss = emit TokSpecialOpen p:                                      skip 2 p s (xmlSpecial (InTag "<!...>":w))-    | "/"   `prefixes` ss = emit TokEndOpen p: -                                    skip 2 p s (xmlTag (InTag "</...>":tail w))+    | "/"   `prefixes` ss = emit TokEndOpen p:+                                    skip 2 p s (xmlTag (InTag "</...>":tale w))     | otherwise           = emit TokAnyOpen p:                                  skip 1 p s (xmlTag (InTag "<...>":NotInTag:w))+    where tale [] = [NotInTag] -- cope with non-well-formed input+          tale xs = tail xs xmlAny (_:_:w) p s@('/':ss)     | ">"   `prefixes` ss = emit TokEndClose p: skip 2 p s (xmlAny w) xmlAny w p ('&':ss) = emit TokAmp p:      textUntil ";" TokSemi "" p@@ -270,7 +282,7 @@                                              where p1 = addcol 1 p xmlAny w p s     | isSpace (head s)     = blank xmlAny w p s-    | isAlphaNum (head s) || (head s)`elem`":_"+    | isAlphaNum (head s) || head s`elem`":_"                            = xmlName p s "some kind of name" (blank xmlAny w)     | otherwise            = lexerror ("unrecognised token: "++take 4 s) p @@ -289,7 +301,7 @@       let p0 = addcol n p in       textUntil "]]>" TokSectionClose "" p0 p0 (drop n s) (blank xmlAny w)     k w p s n =-      skip n p s (xmlAny ({-InTag "<![section[ ... ]]>": -}w))+      skip n p s (xmlAny {-InTag "<![section[ ... ]]>": -}w)  xmlSpecial w p s     | "DOCTYPE"  `prefixes` s = emit (TokSpecial DOCTYPEx)  p: k 7@@ -302,8 +314,9 @@                     ++" but got "++take 7 s) p   where k n = skip n p s (blank xmlAny w) +xmlName :: Posn -> [Char] -> [Char] -> (Posn->[Char]->[Token]) -> [Token] xmlName p (s:ss) cxt k-    | isAlphaNum s || s==':' || s=='_'  = gatherName (s:[]) p (addcol 1 p) ss k+    | isAlphaNum s || s==':' || s=='_'  = gatherName [s] p (addcol 1 p) ss k     | otherwise   = lexerror ("expected a "++cxt++", but got char "++show s) p   where     gatherName acc pos p [] k =@@ -313,12 +326,13 @@         | isAlphaNum s || s `elem` ".-_:"                       = gatherName (s:acc) pos (addcol 1 p) ss k         | otherwise   = emit (TokName (reverse acc)) pos: k p (s:ss)-xmlName p [] cxt k = lexerror ("expected a "++cxt++", but got end of input") p+xmlName p [] cxt _ = lexerror ("expected a "++cxt++", but got end of input") p -xmlContent acc w pos p [] = if all isSpace acc then []+xmlContent :: [Char] -> [Where] -> Posn -> Posn -> [Char] -> [Token]+xmlContent acc _w _pos p [] = if all isSpace acc then []                             else lexerror "unexpected EOF between tags" p-xmlContent acc w pos p (s:ss)-    | elem s "<&"    = {- if all isSpace acc then xmlAny w p (s:ss) else -}+xmlContent acc  w  pos p (s:ss)+    | s `elem` "<&"  = {- if all isSpace acc then xmlAny w p (s:ss) else -}                        emit (TokFreeText (reverse acc)) pos: xmlAny w p (s:ss)     | isSpace s      = xmlContent (s:acc) w pos (white s p) ss     | otherwise      = xmlContent (s:acc) w pos (addcol 1 p) ss
+ src/Text/XML/HaXml/Namespaces.hs view
@@ -0,0 +1,188 @@+{-# LANGUAGE PatternGuards #-}+module Text.XML.HaXml.Namespaces+  ( nullNamespace+  , expandedName+  , namespaceName+  , localName+  , printableName+  , qualify+  , deQualify+  , qualifyExceptLocal+  , initNamespaceEnv+  , augmentNamespaceEnv+  , resolveAllNames+  ) where++import Prelude hiding (lookup)+import Text.XML.HaXml.Types+import Data.Map as Map (Map, insert, lookup, empty)+import Data.Maybe (fromMaybe)+import Data.List (isPrefixOf)++-- | The null Namespace (no prefix, no URI).+nullNamespace :: Namespace+nullNamespace  = Namespace { nsPrefix="", nsURI="" }++-- | Every Name can be split into a Namespace and local Name.  The Namespace+--   might of course be missing.+expandedName   :: QName -> (Maybe Namespace, String)+expandedName n  = (namespaceName n, localName n)++-- | Return the (possibly absent) Namespace component of a Name.+namespaceName          :: QName -> Maybe Namespace+namespaceName (N _)     = Nothing+namespaceName (QN ns _) = Just ns++-- | Return the local component of a Name, without its Namespace.+localName          :: QName -> String+--localName (N n)     | ':'`elem`n = tail $ dropWhile (/=':') n+localName (N n)     = n+localName (QN _ n)  = n++-- | Return the printable string for a Name, i.e. attaching a prefix+--   for its namespace (if it has one).+printableName :: QName -> String+printableName (N n)     = n+printableName (QN ns n) | null (nsPrefix ns) = n+                        | otherwise          = nsPrefix ns++':':n++-- | 'qualify' splits a Name of the form "pr:nm" into the+--   prefix "pr" and local name "nm", and looks up the prefix in the+--   given environment to determine its Namespace.  There may also be a+--   default namespace (the first argument) for unqualified names.+--   In the absence of a default Namespace, a Name that does not have+--   a prefix remains unqualified.  A prefix that is not known in the+--   environment becomes a fresh namespace with null URI.  A Name that is+--   already qualified is passed unchanged, unless its URI was null, in+--   which case we check afresh for that prefix in the environment.+qualify :: Maybe Namespace -> Map String Namespace -> QName -> QName+qualify def env (N n)+        | ':'`elem`n      = let (pre,':':nm) = span (/=':') n in+                            QN (fromMaybe nullNamespace {nsPrefix=pre}+                                      (Map.lookup pre env))+                               nm+        | Just d <- def   = QN d n+        | otherwise       = N n+qualify _ env qn@(QN ns n)+        | null (nsURI ns) = QN (fromMaybe ns (Map.lookup (nsPrefix ns) env)) n+        | otherwise       = qn++-- | 'deQualify' has the same signature as 'qualify', but ignores the+--   arguments for default namespace and environment, and simply removes any+--   pre-existing qualification.+deQualify :: Maybe Namespace -> Map String Namespace -> QName -> QName+deQualify _ _ (QN _ n) = N n+deQualify _ _ (N n)    = N n++-- | 'qualifyExceptLocal' converts names to qualified names, except where+--   an existing qualification matches the default namespace, in which case+--   the qualification is removed.  (This is useful when translating QNames+--   to Haskell, because Haskell qualified names cannot use the current+--   module name.)+qualifyExceptLocal :: Maybe Namespace -> Map String Namespace -> QName -> QName+qualifyExceptLocal Nothing    env  qn   = qualify Nothing env qn+qualifyExceptLocal (Just def) env (N n)+        | ':'`elem`n      = let (pre,':':nm) = span (/=':') n in+                            if nsPrefix def == pre then N nm+                            else QN (fromMaybe nullNamespace{nsPrefix=pre}+                                          (Map.lookup pre env))+                                    nm+        | otherwise       = N n+qualifyExceptLocal (Just def) env qn@(QN ns n)+        | def==ns         = N n+        | null (nsURI ns) = QN (fromMaybe ns (Map.lookup (nsPrefix ns) env)) n+        | otherwise       = qn++-- | The initial Namespace environment.  It always has bindings for the+--   prefixes 'xml' and 'xmlns'.+initNamespaceEnv :: Map String Namespace+initNamespaceEnv =+      Map.insert "xmlns" Namespace{nsPrefix="xmlns"+                                  ,nsURI="http://www.w3.org/2000/xmlns/"}+    $ Map.insert "xml"   Namespace{nsPrefix="xml"+                                  ,nsURI="http://www.w3.org/XML/1998/namespace"}+      Map.empty++-- | Add a fresh Namespace into the Namespace environment.  It is not+--   permitted to rebind the prefixes 'xml' or 'xmlns', but that is not+--   checked here.+augmentNamespaceEnv :: Namespace -> Map String Namespace+                                 -> Map String Namespace+augmentNamespaceEnv ns env = Map.insert (nsPrefix ns) ns env+{-+augmentNamespaceEnv :: Namespace -> Map String Namespace+                                 -> Either String (Map String Namespace)+augmentNamespaceEnv ns env+    | nsPrefix ns == "xml"   = Left "cannot rebind the 'xml' namespace"+    | nsPrefix ns == "xmlns" = Left "cannot rebind the 'xmlns' namespace"+    | otherwise              = Right (Map.insert (nsPrefix ns) ns env)+-}++-- | resolveAllNames in a document, causes every name to be properly+--   qualified with its namespace.  There is a default namespace for any+--   name that was originally unqualified.  This is likely only useful when+--   dealing with parsed document, less useful when generating a document+--   from scratch.+resolveAllNames :: (Maybe Namespace -> Map String Namespace -> QName -> QName)+                   -> Document i -> Document i+resolveAllNames qualify (Document prolog entities elm misc) =+    Document (walkProlog prolog) entities+             (walkElem Nothing initNamespaceEnv elm) misc+  where+    qualifyInDTD = qualify Nothing initNamespaceEnv+    walkProlog (Prolog xml misc0 mDTD misc1) =+                Prolog xml misc0 (fmap walkDTD mDTD) misc1+    walkDTD (DTD qn ext mds)     = DTD (qualifyInDTD qn) ext (map walkMD mds)+    --+    walkMD (Element ed)          = Element (walkED ed)+    walkMD (AttList ald)         = AttList (walkALD ald)+    walkMD md                    = md+    --+    walkED (ElementDecl qn cs)   = ElementDecl (qualifyInDTD qn) (walkCS cs)+    --+    walkCS (ContentSpec cp)      = ContentSpec (walkCP cp)+    walkCS (Mixed m)             = Mixed (walkM m)+    walkCS cs                    = cs+    --+    walkCP (TagName qn m)        = TagName (qualifyInDTD qn) m+    walkCP cp                    = cp+    --+    walkM (PCDATAplus qns)       = PCDATAplus (map qualifyInDTD qns)+    walkM PCDATA                 = PCDATA+    --+    walkALD (AttListDecl qn ads) = AttListDecl (qualifyInDTD qn)+                                               (map walkAD ads)+    --+    walkAD (AttDef qn at dd)     = AttDef (qualifyInDTD qn) at dd+    --+    walkElem def env (Elem qn attrs conts) =+                      Elem (qualify def' env' qn)+                           (map (\ (a,v)-> (qualify Nothing env' a, v)) attrs)+                           (map (walkContent def' env') conts)+                      -- like "maybe def head", but for lists+        where def' = foldr (const . defNamespace) def+                     (matching (=="xmlns") attrs)+              env' = foldr (augmentNamespaceEnv . mkNamespace) env+                     (matching ("xmlns:"`isPrefixOf`) attrs)+              defNamespace :: Attribute -> Maybe Namespace+              defNamespace (_ {-N "xmlns"-}, atv)+                      | null (show atv) = Nothing+                      | otherwise       = Just nullNamespace{nsURI=show atv}+              mkNamespace :: Attribute -> Namespace+              mkNamespace (N n, atv)  = let (_,':':nm) = span (/=':') n in+                                        Namespace{nsPrefix=nm,nsURI=show atv}+              mkNamespace (q@(QN (Namespace{ nsURI="" }) n), atv)  =+                                        Namespace{nsPrefix=n,nsURI=show atv}+              matching :: (String->Bool) -> [Attribute] -> [Attribute]+              matching p = filter (p . printableName . fst)+    --+    walkContent def env (CElem e i) = CElem (walkElem def env e) i+    walkContent _   _   content     = content++    -- Notes: we DO NOT CHECK some of the Namespace well-formedness conditions:+    --        Prefix Declared+    --        No Prefix Undeclaring+    --        Attributes Unique+    -- The functions defNamespace and mkNamespace are partial - they do not+    -- handle the QN case - but this is OK because they are only called from+    -- def' and env', which check the precondition
src/Text/XML/HaXml/OneOfN.hs view
@@ -2,6 +2,35 @@  import Text.XML.HaXml.XmlContent +-- | Somewhat of a nonsense - a choice of a single item.  But sometimes it+--   occurs in auto-generated code.+data OneOf1 a+    = OneOf1 a+    deriving (Eq,Show)++instance (HTypeable a)+    => HTypeable (OneOf1 a)+  where      toHType _ = Defined "OneOf1" [] []+  --         toHType m = Defined "OneOf1" [a] []+  --            where a = toHType $ (\ (OneOf1 a)->a) $ m++instance (XmlContent a)+    => XmlContent (OneOf1 a)+  where+    parseContents =+        choice OneOf1+        $ fail "OneOf1"+    toContents (OneOf1 x) = toContents x++foldOneOf1 :: (a->z) ->+               OneOf1 a+               -> z+foldOneOf1 a (OneOf1 z) = a z++----++-- | Equivalent to the Either type, but using the regular naming+--   scheme of this module. data OneOf2 a b     = OneOf2 a | TwoOf2 b     deriving (Eq,Show)@@ -13,16 +42,21 @@   --            where a = toHType $ (\ (OneOf2 a)->a) $ m   --                  b = toHType $ (\ (TwoOf2 b)->b) $ m - instance (XmlContent a,XmlContent b)     => XmlContent (OneOf2 a b)   where     parseContents =-        (choice OneOf2 $ choice TwoOf2-        $ fail "OneOf2")+        choice OneOf2 $ choice TwoOf2+        $ fail "OneOf2"     toContents (OneOf2 x) = toContents x     toContents (TwoOf2 x) = toContents x +foldOneOf2 :: (a->z) -> (b->z) ->+               OneOf2 a b+               -> z+foldOneOf2 a b (OneOf2 z) = a z+foldOneOf2 a b (TwoOf2 z) = b z+ ---- data OneOf3 a b c     = OneOf3 a | TwoOf3 b | ThreeOf3 c@@ -36,12 +70,19 @@     => XmlContent (OneOf3 a b c)   where     parseContents =-        (choice OneOf3 $ choice TwoOf3 $ choice ThreeOf3-        $ fail "OneOf3")+        choice OneOf3 $ choice TwoOf3 $ choice ThreeOf3+        $ fail "OneOf3"     toContents (OneOf3 x) = toContents x     toContents (TwoOf3 x) = toContents x     toContents (ThreeOf3 x) = toContents x +foldOneOf3 :: (a->z) -> (b->z) -> (c->z) ->+               OneOf3 a b c+               -> z+foldOneOf3 a b c (OneOf3 z) = a z+foldOneOf3 a b c (TwoOf3 z) = b z+foldOneOf3 a b c (ThreeOf3 z) = c z+ ---- data OneOf4 a b c d     = OneOf4 a | TwoOf4 b | ThreeOf4 c | FourOf4 d@@ -55,13 +96,21 @@     => XmlContent (OneOf4 a b c d)   where     parseContents =-        (choice OneOf4 $ choice TwoOf4 $ choice ThreeOf4 $ choice FourOf4-        $ fail "OneOf4")+        choice OneOf4 $ choice TwoOf4 $ choice ThreeOf4 $ choice FourOf4+        $ fail "OneOf4"     toContents (OneOf4 x) = toContents x     toContents (TwoOf4 x) = toContents x     toContents (ThreeOf4 x) = toContents x     toContents (FourOf4 x) = toContents x +foldOneOf4 :: (a->z) -> (b->z) -> (c->z) -> (d->z) ->+               OneOf4 a b c d+               -> z+foldOneOf4 a b c d (OneOf4 z) = a z+foldOneOf4 a b c d (TwoOf4 z) = b z+foldOneOf4 a b c d (ThreeOf4 z) = c z+foldOneOf4 a b c d (FourOf4 z) = d z+ ---- data OneOf5 a b c d e     = OneOf5 a | TwoOf5 b | ThreeOf5 c | FourOf5 d | FiveOf5 e@@ -75,33 +124,42 @@     => XmlContent (OneOf5 a b c d e)   where     parseContents =-        (choice OneOf5 $ choice TwoOf5 $ choice ThreeOf5 $ choice FourOf5+        choice OneOf5 $ choice TwoOf5 $ choice ThreeOf5 $ choice FourOf5         $ choice FiveOf5-        $ fail "OneOf5")+        $ fail "OneOf5"     toContents (OneOf5 x) = toContents x     toContents (TwoOf5 x) = toContents x     toContents (ThreeOf5 x) = toContents x     toContents (FourOf5 x) = toContents x     toContents (FiveOf5 x) = toContents x +foldOneOf5 :: (a->z) -> (b->z) -> (c->z) -> (d->z) -> (e->z) ->+               OneOf5 a b c d e+               -> z+foldOneOf5 a b c d e (OneOf5 z) = a z+foldOneOf5 a b c d e (TwoOf5 z) = b z+foldOneOf5 a b c d e (ThreeOf5 z) = c z+foldOneOf5 a b c d e (FourOf5 z) = d z+foldOneOf5 a b c d e (FiveOf5 z) = e z+ ---- data OneOf6 a b c d e f     = OneOf6 a | TwoOf6 b | ThreeOf6 c | FourOf6 d | FiveOf6 e | SixOf6 f     deriving (Eq,Show)  instance (HTypeable a,HTypeable b,HTypeable c,HTypeable d,HTypeable e-          ,HTypeable f)+         ,HTypeable f)     => HTypeable (OneOf6 a b c d e f)   where      toHType _ = Defined "OneOf6" [] []  instance (XmlContent a,XmlContent b,XmlContent c,XmlContent d,XmlContent e-          ,XmlContent f)+         ,XmlContent f)     => XmlContent (OneOf6 a b c d e f)   where     parseContents =-        (choice OneOf6 $ choice TwoOf6 $ choice ThreeOf6 $ choice FourOf6+        choice OneOf6 $ choice TwoOf6 $ choice ThreeOf6 $ choice FourOf6         $ choice FiveOf6 $ choice SixOf6-        $ fail "OneOf6")+        $ fail "OneOf6"     toContents (OneOf6 x) = toContents x     toContents (TwoOf6 x) = toContents x     toContents (ThreeOf6 x) = toContents x@@ -109,6 +167,16 @@     toContents (FiveOf6 x) = toContents x     toContents (SixOf6 x) = toContents x +foldOneOf6 :: (a->z) -> (b->z) -> (c->z) -> (d->z) -> (e->z) -> (f->z) ->+               OneOf6 a b c d e f+               -> z+foldOneOf6 a b c d e f (OneOf6 z) = a z+foldOneOf6 a b c d e f (TwoOf6 z) = b z+foldOneOf6 a b c d e f (ThreeOf6 z) = c z+foldOneOf6 a b c d e f (FourOf6 z) = d z+foldOneOf6 a b c d e f (FiveOf6 z) = e z+foldOneOf6 a b c d e f (SixOf6 z) = f z+ ---- data OneOf7 a b c d e f g     = OneOf7 a | TwoOf7 b | ThreeOf7 c | FourOf7 d | FiveOf7 e | SixOf7 f@@ -116,18 +184,18 @@     deriving (Eq,Show)  instance (HTypeable a,HTypeable b,HTypeable c,HTypeable d,HTypeable e-          ,HTypeable f,HTypeable g)+         ,HTypeable f,HTypeable g)     => HTypeable (OneOf7 a b c d e f g)   where      toHType _ = Defined "OneOf7" [] []  instance (XmlContent a,XmlContent b,XmlContent c,XmlContent d,XmlContent e-          ,XmlContent f,XmlContent g)+         ,XmlContent f,XmlContent g)     => XmlContent (OneOf7 a b c d e f g)   where     parseContents =-        (choice OneOf7 $ choice TwoOf7 $ choice ThreeOf7 $ choice FourOf7+        choice OneOf7 $ choice TwoOf7 $ choice ThreeOf7 $ choice FourOf7         $ choice FiveOf7 $ choice SixOf7 $ choice SevenOf7-        $ fail "OneOf7")+        $ fail "OneOf7"     toContents (OneOf7 x) = toContents x     toContents (TwoOf7 x) = toContents x     toContents (ThreeOf7 x) = toContents x@@ -136,6 +204,18 @@     toContents (SixOf7 x) = toContents x     toContents (SevenOf7 x) = toContents x +foldOneOf7 :: (a->z) -> (b->z) -> (c->z) -> (d->z) -> (e->z) -> (f->z) ->+               (g->z) ->+               OneOf7 a b c d e f g+               -> z+foldOneOf7 a b c d e f g (OneOf7 z) = a z+foldOneOf7 a b c d e f g (TwoOf7 z) = b z+foldOneOf7 a b c d e f g (ThreeOf7 z) = c z+foldOneOf7 a b c d e f g (FourOf7 z) = d z+foldOneOf7 a b c d e f g (FiveOf7 z) = e z+foldOneOf7 a b c d e f g (SixOf7 z) = f z+foldOneOf7 a b c d e f g (SevenOf7 z) = g z+ ---- data OneOf8 a b c d e f g h     = OneOf8 a | TwoOf8 b | ThreeOf8 c | FourOf8 d | FiveOf8 e | SixOf8 f@@ -143,18 +223,18 @@     deriving (Eq,Show)  instance (HTypeable a,HTypeable b,HTypeable c,HTypeable d,HTypeable e-          ,HTypeable f,HTypeable g,HTypeable h)+         ,HTypeable f,HTypeable g,HTypeable h)     => HTypeable (OneOf8 a b c d e f g h)   where      toHType _ = Defined "OneOf8" [] []  instance (XmlContent a,XmlContent b,XmlContent c,XmlContent d,XmlContent e-          ,XmlContent f,XmlContent g,XmlContent h)+         ,XmlContent f,XmlContent g,XmlContent h)     => XmlContent (OneOf8 a b c d e f g h)   where     parseContents =-        (choice OneOf8 $ choice TwoOf8 $ choice ThreeOf8 $ choice FourOf8+        choice OneOf8 $ choice TwoOf8 $ choice ThreeOf8 $ choice FourOf8         $ choice FiveOf8 $ choice SixOf8 $ choice SevenOf8 $ choice EightOf8-        $ fail "OneOf8")+        $ fail "OneOf8"     toContents (OneOf8 x) = toContents x     toContents (TwoOf8 x) = toContents x     toContents (ThreeOf8 x) = toContents x@@ -164,6 +244,19 @@     toContents (SevenOf8 x) = toContents x     toContents (EightOf8 x) = toContents x +foldOneOf8 :: (a->z) -> (b->z) -> (c->z) -> (d->z) -> (e->z) -> (f->z) ->+               (g->z) -> (h->z) ->+               OneOf8 a b c d e f g h+               -> z+foldOneOf8 a b c d e f g h (OneOf8 z) = a z+foldOneOf8 a b c d e f g h (TwoOf8 z) = b z+foldOneOf8 a b c d e f g h (ThreeOf8 z) = c z+foldOneOf8 a b c d e f g h (FourOf8 z) = d z+foldOneOf8 a b c d e f g h (FiveOf8 z) = e z+foldOneOf8 a b c d e f g h (SixOf8 z) = f z+foldOneOf8 a b c d e f g h (SevenOf8 z) = g z+foldOneOf8 a b c d e f g h (EightOf8 z) = h z+ ---- data OneOf9 a b c d e f g h i     = OneOf9 a | TwoOf9 b | ThreeOf9 c | FourOf9 d | FiveOf9 e | SixOf9 f@@ -171,19 +264,19 @@     deriving (Eq,Show)  instance (HTypeable a,HTypeable b,HTypeable c,HTypeable d,HTypeable e-          ,HTypeable f,HTypeable g,HTypeable h,HTypeable i)+         ,HTypeable f,HTypeable g,HTypeable h,HTypeable i)     => HTypeable (OneOf9 a b c d e f g h i)   where      toHType _ = Defined "OneOf9" [] []  instance (XmlContent a,XmlContent b,XmlContent c,XmlContent d,XmlContent e-          ,XmlContent f,XmlContent g,XmlContent h,XmlContent i)+         ,XmlContent f,XmlContent g,XmlContent h,XmlContent i)     => XmlContent (OneOf9 a b c d e f g h i)   where     parseContents =-        (choice OneOf9 $ choice TwoOf9 $ choice ThreeOf9 $ choice FourOf9+        choice OneOf9 $ choice TwoOf9 $ choice ThreeOf9 $ choice FourOf9         $ choice FiveOf9 $ choice SixOf9 $ choice SevenOf9 $ choice EightOf9         $ choice NineOf9-        $ fail "OneOf9")+        $ fail "OneOf9"     toContents (OneOf9 x) = toContents x     toContents (TwoOf9 x) = toContents x     toContents (ThreeOf9 x) = toContents x@@ -194,6 +287,20 @@     toContents (EightOf9 x) = toContents x     toContents (NineOf9 x) = toContents x +foldOneOf9 :: (a->z) -> (b->z) -> (c->z) -> (d->z) -> (e->z) -> (f->z) ->+               (g->z) -> (h->z) -> (i->z) ->+               OneOf9 a b c d e f g h i+               -> z+foldOneOf9 a b c d e f g h i (OneOf9 z) = a z+foldOneOf9 a b c d e f g h i (TwoOf9 z) = b z+foldOneOf9 a b c d e f g h i (ThreeOf9 z) = c z+foldOneOf9 a b c d e f g h i (FourOf9 z) = d z+foldOneOf9 a b c d e f g h i (FiveOf9 z) = e z+foldOneOf9 a b c d e f g h i (SixOf9 z) = f z+foldOneOf9 a b c d e f g h i (SevenOf9 z) = g z+foldOneOf9 a b c d e f g h i (EightOf9 z) = h z+foldOneOf9 a b c d e f g h i (NineOf9 z) = i z+ ---- data OneOf10 a b c d e f g h i j     = OneOf10 a | TwoOf10 b | ThreeOf10 c | FourOf10 d | FiveOf10 e@@ -201,19 +308,19 @@     deriving (Eq,Show)  instance (HTypeable a,HTypeable b,HTypeable c,HTypeable d,HTypeable e-          ,HTypeable f,HTypeable g,HTypeable h,HTypeable i,HTypeable j)+         ,HTypeable f,HTypeable g,HTypeable h,HTypeable i,HTypeable j)     => HTypeable (OneOf10 a b c d e f g h i j)   where      toHType _ = Defined "OneOf10" [] []  instance (XmlContent a,XmlContent b,XmlContent c,XmlContent d,XmlContent e-          ,XmlContent f,XmlContent g,XmlContent h,XmlContent i,XmlContent j)+         ,XmlContent f,XmlContent g,XmlContent h,XmlContent i,XmlContent j)     => XmlContent (OneOf10 a b c d e f g h i j)   where     parseContents =-        (choice OneOf10 $ choice TwoOf10 $ choice ThreeOf10 $ choice FourOf10+        choice OneOf10 $ choice TwoOf10 $ choice ThreeOf10 $ choice FourOf10         $ choice FiveOf10 $ choice SixOf10 $ choice SevenOf10         $ choice EightOf10 $ choice NineOf10 $ choice TenOf10-        $ fail "OneOf10")+        $ fail "OneOf10"     toContents (OneOf10 x) = toContents x     toContents (TwoOf10 x) = toContents x     toContents (ThreeOf10 x) = toContents x@@ -225,6 +332,21 @@     toContents (NineOf10 x) = toContents x     toContents (TenOf10 x) = toContents x +foldOneOf10 :: (a->z) -> (b->z) -> (c->z) -> (d->z) -> (e->z) -> (f->z) ->+               (g->z) -> (h->z) -> (i->z) -> (j->z) ->+               OneOf10 a b c d e f g h i j+               -> z+foldOneOf10 a b c d e f g h i j (OneOf10 z) = a z+foldOneOf10 a b c d e f g h i j (TwoOf10 z) = b z+foldOneOf10 a b c d e f g h i j (ThreeOf10 z) = c z+foldOneOf10 a b c d e f g h i j (FourOf10 z) = d z+foldOneOf10 a b c d e f g h i j (FiveOf10 z) = e z+foldOneOf10 a b c d e f g h i j (SixOf10 z) = f z+foldOneOf10 a b c d e f g h i j (SevenOf10 z) = g z+foldOneOf10 a b c d e f g h i j (EightOf10 z) = h z+foldOneOf10 a b c d e f g h i j (NineOf10 z) = i z+foldOneOf10 a b c d e f g h i j (TenOf10 z) = j z+ ---- data OneOf11 a b c d e f g h i j k     = OneOf11 a | TwoOf11 b | ThreeOf11 c | FourOf11 d | FiveOf11 e@@ -233,22 +355,22 @@     deriving (Eq,Show)  instance (HTypeable a,HTypeable b,HTypeable c,HTypeable d,HTypeable e-          ,HTypeable f,HTypeable g,HTypeable h,HTypeable i,HTypeable j-          ,HTypeable k)+         ,HTypeable f,HTypeable g,HTypeable h,HTypeable i,HTypeable j+         ,HTypeable k)     => HTypeable (OneOf11 a b c d e f g h i j k)   where      toHType _ = Defined "OneOf11" [] []  instance (XmlContent a,XmlContent b,XmlContent c,XmlContent d,XmlContent e-          ,XmlContent f,XmlContent g,XmlContent h,XmlContent i,XmlContent j-          ,XmlContent k)+         ,XmlContent f,XmlContent g,XmlContent h,XmlContent i,XmlContent j+         ,XmlContent k)     => XmlContent (OneOf11 a b c d e f g h i j k)   where     parseContents =-        (choice OneOf11 $ choice TwoOf11 $ choice ThreeOf11 $ choice FourOf11+        choice OneOf11 $ choice TwoOf11 $ choice ThreeOf11 $ choice FourOf11         $ choice FiveOf11 $ choice SixOf11 $ choice SevenOf11         $ choice EightOf11 $ choice NineOf11 $ choice TenOf11         $ choice ElevenOf11-        $ fail "OneOf11")+        $ fail "OneOf11"     toContents (OneOf11 x) = toContents x     toContents (TwoOf11 x) = toContents x     toContents (ThreeOf11 x) = toContents x@@ -261,6 +383,22 @@     toContents (TenOf11 x) = toContents x     toContents (ElevenOf11 x) = toContents x +foldOneOf11 :: (a->z) -> (b->z) -> (c->z) -> (d->z) -> (e->z) -> (f->z) ->+               (g->z) -> (h->z) -> (i->z) -> (j->z) -> (k->z) ->+               OneOf11 a b c d e f g h i j k+               -> z+foldOneOf11 a b c d e f g h i j k (OneOf11 z) = a z+foldOneOf11 a b c d e f g h i j k (TwoOf11 z) = b z+foldOneOf11 a b c d e f g h i j k (ThreeOf11 z) = c z+foldOneOf11 a b c d e f g h i j k (FourOf11 z) = d z+foldOneOf11 a b c d e f g h i j k (FiveOf11 z) = e z+foldOneOf11 a b c d e f g h i j k (SixOf11 z) = f z+foldOneOf11 a b c d e f g h i j k (SevenOf11 z) = g z+foldOneOf11 a b c d e f g h i j k (EightOf11 z) = h z+foldOneOf11 a b c d e f g h i j k (NineOf11 z) = i z+foldOneOf11 a b c d e f g h i j k (TenOf11 z) = j z+foldOneOf11 a b c d e f g h i j k (ElevenOf11 z) = k z+ ---- data OneOf12 a b c d e f g h i j k l     = OneOf12 a | TwoOf12 b | ThreeOf12 c | FourOf12 d | FiveOf12 e@@ -269,22 +407,22 @@     deriving (Eq,Show)  instance (HTypeable a,HTypeable b,HTypeable c,HTypeable d,HTypeable e-          ,HTypeable f,HTypeable g,HTypeable h,HTypeable i,HTypeable j-          ,HTypeable k,HTypeable l)+         ,HTypeable f,HTypeable g,HTypeable h,HTypeable i,HTypeable j+         ,HTypeable k,HTypeable l)     => HTypeable (OneOf12 a b c d e f g h i j k l)   where      toHType _ = Defined "OneOf12" [] []  instance (XmlContent a,XmlContent b,XmlContent c,XmlContent d,XmlContent e-          ,XmlContent f,XmlContent g,XmlContent h,XmlContent i,XmlContent j-          ,XmlContent k,XmlContent l)+         ,XmlContent f,XmlContent g,XmlContent h,XmlContent i,XmlContent j+         ,XmlContent k,XmlContent l)     => XmlContent (OneOf12 a b c d e f g h i j k l)   where     parseContents =-        (choice OneOf12 $ choice TwoOf12 $ choice ThreeOf12 $ choice FourOf12+        choice OneOf12 $ choice TwoOf12 $ choice ThreeOf12 $ choice FourOf12         $ choice FiveOf12 $ choice SixOf12 $ choice SevenOf12         $ choice EightOf12 $ choice NineOf12 $ choice TenOf12         $ choice ElevenOf12 $ choice TwelveOf12-        $ fail "OneOf12")+        $ fail "OneOf12"     toContents (OneOf12 x) = toContents x     toContents (TwoOf12 x) = toContents x     toContents (ThreeOf12 x) = toContents x@@ -298,6 +436,23 @@     toContents (ElevenOf12 x) = toContents x     toContents (TwelveOf12 x) = toContents x +foldOneOf12 :: (a->z) -> (b->z) -> (c->z) -> (d->z) -> (e->z) -> (f->z) ->+               (g->z) -> (h->z) -> (i->z) -> (j->z) -> (k->z) -> (l->z) ->+               OneOf12 a b c d e f g h i j k l+               -> z+foldOneOf12 a b c d e f g h i j k l (OneOf12 z) = a z+foldOneOf12 a b c d e f g h i j k l (TwoOf12 z) = b z+foldOneOf12 a b c d e f g h i j k l (ThreeOf12 z) = c z+foldOneOf12 a b c d e f g h i j k l (FourOf12 z) = d z+foldOneOf12 a b c d e f g h i j k l (FiveOf12 z) = e z+foldOneOf12 a b c d e f g h i j k l (SixOf12 z) = f z+foldOneOf12 a b c d e f g h i j k l (SevenOf12 z) = g z+foldOneOf12 a b c d e f g h i j k l (EightOf12 z) = h z+foldOneOf12 a b c d e f g h i j k l (NineOf12 z) = i z+foldOneOf12 a b c d e f g h i j k l (TenOf12 z) = j z+foldOneOf12 a b c d e f g h i j k l (ElevenOf12 z) = k z+foldOneOf12 a b c d e f g h i j k l (TwelveOf12 z) = l z+ ---- data OneOf13 a b c d e f g h i j k l m     = OneOf13 a | TwoOf13 b | ThreeOf13 c | FourOf13 d | FiveOf13 e@@ -306,22 +461,22 @@     deriving (Eq,Show)  instance (HTypeable a,HTypeable b,HTypeable c,HTypeable d,HTypeable e-          ,HTypeable f,HTypeable g,HTypeable h,HTypeable i,HTypeable j-          ,HTypeable k,HTypeable l,HTypeable m)+         ,HTypeable f,HTypeable g,HTypeable h,HTypeable i,HTypeable j+         ,HTypeable k,HTypeable l,HTypeable m)     => HTypeable (OneOf13 a b c d e f g h i j k l m)   where      toHType _ = Defined "OneOf13" [] []  instance (XmlContent a,XmlContent b,XmlContent c,XmlContent d,XmlContent e-          ,XmlContent f,XmlContent g,XmlContent h,XmlContent i,XmlContent j-          ,XmlContent k,XmlContent l,XmlContent m)+         ,XmlContent f,XmlContent g,XmlContent h,XmlContent i,XmlContent j+         ,XmlContent k,XmlContent l,XmlContent m)     => XmlContent (OneOf13 a b c d e f g h i j k l m)   where     parseContents =-        (choice OneOf13 $ choice TwoOf13 $ choice ThreeOf13 $ choice FourOf13+        choice OneOf13 $ choice TwoOf13 $ choice ThreeOf13 $ choice FourOf13         $ choice FiveOf13 $ choice SixOf13 $ choice SevenOf13         $ choice EightOf13 $ choice NineOf13 $ choice TenOf13         $ choice ElevenOf13 $ choice TwelveOf13 $ choice ThirteenOf13-        $ fail "OneOf13")+        $ fail "OneOf13"     toContents (OneOf13 x) = toContents x     toContents (TwoOf13 x) = toContents x     toContents (ThreeOf13 x) = toContents x@@ -336,6 +491,25 @@     toContents (TwelveOf13 x) = toContents x     toContents (ThirteenOf13 x) = toContents x +foldOneOf13 :: (a->z) -> (b->z) -> (c->z) -> (d->z) -> (e->z) -> (f->z) ->+               (g->z) -> (h->z) -> (i->z) -> (j->z) -> (k->z) -> (l->z) ->+               (m->z) ->+               OneOf13 a b c d e f g h i j k l m+               -> z+foldOneOf13 a b c d e f g h i j k l m (OneOf13 z) = a z+foldOneOf13 a b c d e f g h i j k l m (TwoOf13 z) = b z+foldOneOf13 a b c d e f g h i j k l m (ThreeOf13 z) = c z+foldOneOf13 a b c d e f g h i j k l m (FourOf13 z) = d z+foldOneOf13 a b c d e f g h i j k l m (FiveOf13 z) = e z+foldOneOf13 a b c d e f g h i j k l m (SixOf13 z) = f z+foldOneOf13 a b c d e f g h i j k l m (SevenOf13 z) = g z+foldOneOf13 a b c d e f g h i j k l m (EightOf13 z) = h z+foldOneOf13 a b c d e f g h i j k l m (NineOf13 z) = i z+foldOneOf13 a b c d e f g h i j k l m (TenOf13 z) = j z+foldOneOf13 a b c d e f g h i j k l m (ElevenOf13 z) = k z+foldOneOf13 a b c d e f g h i j k l m (TwelveOf13 z) = l z+foldOneOf13 a b c d e f g h i j k l m (ThirteenOf13 z) = m z+ ---- data OneOf14 a b c d e f g h i j k l m n     = OneOf14 a | TwoOf14 b | ThreeOf14 c | FourOf14 d | FiveOf14 e@@ -344,23 +518,23 @@     deriving (Eq,Show)  instance (HTypeable a,HTypeable b,HTypeable c,HTypeable d,HTypeable e-          ,HTypeable f,HTypeable g,HTypeable h,HTypeable i,HTypeable j-          ,HTypeable k,HTypeable l,HTypeable m,HTypeable n)+         ,HTypeable f,HTypeable g,HTypeable h,HTypeable i,HTypeable j+         ,HTypeable k,HTypeable l,HTypeable m,HTypeable n)     => HTypeable (OneOf14 a b c d e f g h i j k l m n)   where      toHType _ = Defined "OneOf14" [] []  instance (XmlContent a,XmlContent b,XmlContent c,XmlContent d,XmlContent e-          ,XmlContent f,XmlContent g,XmlContent h,XmlContent i,XmlContent j-          ,XmlContent k,XmlContent l,XmlContent m,XmlContent n)+         ,XmlContent f,XmlContent g,XmlContent h,XmlContent i,XmlContent j+         ,XmlContent k,XmlContent l,XmlContent m,XmlContent n)     => XmlContent (OneOf14 a b c d e f g h i j k l m n)   where     parseContents =-        (choice OneOf14 $ choice TwoOf14 $ choice ThreeOf14 $ choice FourOf14+        choice OneOf14 $ choice TwoOf14 $ choice ThreeOf14 $ choice FourOf14         $ choice FiveOf14 $ choice SixOf14 $ choice SevenOf14         $ choice EightOf14 $ choice NineOf14 $ choice TenOf14         $ choice ElevenOf14 $ choice TwelveOf14 $ choice ThirteenOf14         $ choice FourteenOf14-        $ fail "OneOf14")+        $ fail "OneOf14"     toContents (OneOf14 x) = toContents x     toContents (TwoOf14 x) = toContents x     toContents (ThreeOf14 x) = toContents x@@ -376,6 +550,26 @@     toContents (ThirteenOf14 x) = toContents x     toContents (FourteenOf14 x) = toContents x +foldOneOf14 :: (a->z) -> (b->z) -> (c->z) -> (d->z) -> (e->z) -> (f->z) ->+               (g->z) -> (h->z) -> (i->z) -> (j->z) -> (k->z) -> (l->z) ->+               (m->z) -> (n->z) ->+               OneOf14 a b c d e f g h i j k l m n+               -> z+foldOneOf14 a b c d e f g h i j k l m n (OneOf14 z) = a z+foldOneOf14 a b c d e f g h i j k l m n (TwoOf14 z) = b z+foldOneOf14 a b c d e f g h i j k l m n (ThreeOf14 z) = c z+foldOneOf14 a b c d e f g h i j k l m n (FourOf14 z) = d z+foldOneOf14 a b c d e f g h i j k l m n (FiveOf14 z) = e z+foldOneOf14 a b c d e f g h i j k l m n (SixOf14 z) = f z+foldOneOf14 a b c d e f g h i j k l m n (SevenOf14 z) = g z+foldOneOf14 a b c d e f g h i j k l m n (EightOf14 z) = h z+foldOneOf14 a b c d e f g h i j k l m n (NineOf14 z) = i z+foldOneOf14 a b c d e f g h i j k l m n (TenOf14 z) = j z+foldOneOf14 a b c d e f g h i j k l m n (ElevenOf14 z) = k z+foldOneOf14 a b c d e f g h i j k l m n (TwelveOf14 z) = l z+foldOneOf14 a b c d e f g h i j k l m n (ThirteenOf14 z) = m z+foldOneOf14 a b c d e f g h i j k l m n (FourteenOf14 z) = n z+ ---- data OneOf15 a b c d e f g h i j k l m n o     = OneOf15 a | TwoOf15 b | ThreeOf15 c | FourOf15 d | FiveOf15 e@@ -385,23 +579,23 @@     deriving (Eq,Show)  instance (HTypeable a,HTypeable b,HTypeable c,HTypeable d,HTypeable e-          ,HTypeable f,HTypeable g,HTypeable h,HTypeable i,HTypeable j-          ,HTypeable k,HTypeable l,HTypeable m,HTypeable n,HTypeable o)+         ,HTypeable f,HTypeable g,HTypeable h,HTypeable i,HTypeable j+         ,HTypeable k,HTypeable l,HTypeable m,HTypeable n,HTypeable o)     => HTypeable (OneOf15 a b c d e f g h i j k l m n o)   where      toHType _ = Defined "OneOf15" [] []  instance (XmlContent a,XmlContent b,XmlContent c,XmlContent d,XmlContent e-          ,XmlContent f,XmlContent g,XmlContent h,XmlContent i,XmlContent j-          ,XmlContent k,XmlContent l,XmlContent m,XmlContent n,XmlContent o)+         ,XmlContent f,XmlContent g,XmlContent h,XmlContent i,XmlContent j+         ,XmlContent k,XmlContent l,XmlContent m,XmlContent n,XmlContent o)     => XmlContent (OneOf15 a b c d e f g h i j k l m n o)   where     parseContents =-        (choice OneOf15 $ choice TwoOf15 $ choice ThreeOf15 $ choice FourOf15+        choice OneOf15 $ choice TwoOf15 $ choice ThreeOf15 $ choice FourOf15         $ choice FiveOf15 $ choice SixOf15 $ choice SevenOf15         $ choice EightOf15 $ choice NineOf15 $ choice TenOf15         $ choice ElevenOf15 $ choice TwelveOf15 $ choice ThirteenOf15         $ choice FourteenOf15 $ choice FifteenOf15-        $ fail "OneOf15")+        $ fail "OneOf15"     toContents (OneOf15 x) = toContents x     toContents (TwoOf15 x) = toContents x     toContents (ThreeOf15 x) = toContents x@@ -418,6 +612,27 @@     toContents (FourteenOf15 x) = toContents x     toContents (FifteenOf15 x) = toContents x +foldOneOf15 :: (a->z) -> (b->z) -> (c->z) -> (d->z) -> (e->z) -> (f->z) ->+               (g->z) -> (h->z) -> (i->z) -> (j->z) -> (k->z) -> (l->z) ->+               (m->z) -> (n->z) -> (o->z) ->+               OneOf15 a b c d e f g h i j k l m n o+               -> z+foldOneOf15 a b c d e f g h i j k l m n o (OneOf15 z) = a z+foldOneOf15 a b c d e f g h i j k l m n o (TwoOf15 z) = b z+foldOneOf15 a b c d e f g h i j k l m n o (ThreeOf15 z) = c z+foldOneOf15 a b c d e f g h i j k l m n o (FourOf15 z) = d z+foldOneOf15 a b c d e f g h i j k l m n o (FiveOf15 z) = e z+foldOneOf15 a b c d e f g h i j k l m n o (SixOf15 z) = f z+foldOneOf15 a b c d e f g h i j k l m n o (SevenOf15 z) = g z+foldOneOf15 a b c d e f g h i j k l m n o (EightOf15 z) = h z+foldOneOf15 a b c d e f g h i j k l m n o (NineOf15 z) = i z+foldOneOf15 a b c d e f g h i j k l m n o (TenOf15 z) = j z+foldOneOf15 a b c d e f g h i j k l m n o (ElevenOf15 z) = k z+foldOneOf15 a b c d e f g h i j k l m n o (TwelveOf15 z) = l z+foldOneOf15 a b c d e f g h i j k l m n o (ThirteenOf15 z) = m z+foldOneOf15 a b c d e f g h i j k l m n o (FourteenOf15 z) = n z+foldOneOf15 a b c d e f g h i j k l m n o (FifteenOf15 z) = o z+ ---- data OneOf16 a b c d e f g h i j k l m n o p     = OneOf16 a | TwoOf16 b | ThreeOf16 c | FourOf16 d | FiveOf16 e@@ -427,25 +642,25 @@     deriving (Eq,Show)  instance (HTypeable a,HTypeable b,HTypeable c,HTypeable d,HTypeable e-          ,HTypeable f,HTypeable g,HTypeable h,HTypeable i,HTypeable j-          ,HTypeable k,HTypeable l,HTypeable m,HTypeable n,HTypeable o-          ,HTypeable p)+         ,HTypeable f,HTypeable g,HTypeable h,HTypeable i,HTypeable j+         ,HTypeable k,HTypeable l,HTypeable m,HTypeable n,HTypeable o+         ,HTypeable p)     => HTypeable (OneOf16 a b c d e f g h i j k l m n o p)   where      toHType _ = Defined "OneOf16" [] []  instance (XmlContent a,XmlContent b,XmlContent c,XmlContent d,XmlContent e-          ,XmlContent f,XmlContent g,XmlContent h,XmlContent i,XmlContent j-          ,XmlContent k,XmlContent l,XmlContent m,XmlContent n,XmlContent o-          ,XmlContent p)+         ,XmlContent f,XmlContent g,XmlContent h,XmlContent i,XmlContent j+         ,XmlContent k,XmlContent l,XmlContent m,XmlContent n,XmlContent o+         ,XmlContent p)     => XmlContent (OneOf16 a b c d e f g h i j k l m n o p)   where     parseContents =-        (choice OneOf16 $ choice TwoOf16 $ choice ThreeOf16 $ choice FourOf16+        choice OneOf16 $ choice TwoOf16 $ choice ThreeOf16 $ choice FourOf16         $ choice FiveOf16 $ choice SixOf16 $ choice SevenOf16         $ choice EightOf16 $ choice NineOf16 $ choice TenOf16         $ choice ElevenOf16 $ choice TwelveOf16 $ choice ThirteenOf16         $ choice FourteenOf16 $ choice FifteenOf16 $ choice SixteenOf16-        $ fail "OneOf16")+        $ fail "OneOf16"     toContents (OneOf16 x) = toContents x     toContents (TwoOf16 x) = toContents x     toContents (ThreeOf16 x) = toContents x@@ -463,6 +678,28 @@     toContents (FifteenOf16 x) = toContents x     toContents (SixteenOf16 x) = toContents x +foldOneOf16 :: (a->z) -> (b->z) -> (c->z) -> (d->z) -> (e->z) -> (f->z) ->+               (g->z) -> (h->z) -> (i->z) -> (j->z) -> (k->z) -> (l->z) ->+               (m->z) -> (n->z) -> (o->z) -> (p->z) ->+               OneOf16 a b c d e f g h i j k l m n o p+               -> z+foldOneOf16 a b c d e f g h i j k l m n o p (OneOf16 z) = a z+foldOneOf16 a b c d e f g h i j k l m n o p (TwoOf16 z) = b z+foldOneOf16 a b c d e f g h i j k l m n o p (ThreeOf16 z) = c z+foldOneOf16 a b c d e f g h i j k l m n o p (FourOf16 z) = d z+foldOneOf16 a b c d e f g h i j k l m n o p (FiveOf16 z) = e z+foldOneOf16 a b c d e f g h i j k l m n o p (SixOf16 z) = f z+foldOneOf16 a b c d e f g h i j k l m n o p (SevenOf16 z) = g z+foldOneOf16 a b c d e f g h i j k l m n o p (EightOf16 z) = h z+foldOneOf16 a b c d e f g h i j k l m n o p (NineOf16 z) = i z+foldOneOf16 a b c d e f g h i j k l m n o p (TenOf16 z) = j z+foldOneOf16 a b c d e f g h i j k l m n o p (ElevenOf16 z) = k z+foldOneOf16 a b c d e f g h i j k l m n o p (TwelveOf16 z) = l z+foldOneOf16 a b c d e f g h i j k l m n o p (ThirteenOf16 z) = m z+foldOneOf16 a b c d e f g h i j k l m n o p (FourteenOf16 z) = n z+foldOneOf16 a b c d e f g h i j k l m n o p (FifteenOf16 z) = o z+foldOneOf16 a b c d e f g h i j k l m n o p (SixteenOf16 z) = p z+ ---- data OneOf17 a b c d e f g h i j k l m n o p q     = OneOf17 a | TwoOf17 b | ThreeOf17 c | FourOf17 d | FiveOf17 e@@ -472,26 +709,26 @@     deriving (Eq,Show)  instance (HTypeable a,HTypeable b,HTypeable c,HTypeable d,HTypeable e-          ,HTypeable f,HTypeable g,HTypeable h,HTypeable i,HTypeable j-          ,HTypeable k,HTypeable l,HTypeable m,HTypeable n,HTypeable o-          ,HTypeable p,HTypeable q)+         ,HTypeable f,HTypeable g,HTypeable h,HTypeable i,HTypeable j+         ,HTypeable k,HTypeable l,HTypeable m,HTypeable n,HTypeable o+         ,HTypeable p,HTypeable q)     => HTypeable (OneOf17 a b c d e f g h i j k l m n o p q)   where      toHType _ = Defined "OneOf17" [] []  instance (XmlContent a,XmlContent b,XmlContent c,XmlContent d,XmlContent e-          ,XmlContent f,XmlContent g,XmlContent h,XmlContent i,XmlContent j-          ,XmlContent k,XmlContent l,XmlContent m,XmlContent n,XmlContent o-          ,XmlContent p,XmlContent q)+         ,XmlContent f,XmlContent g,XmlContent h,XmlContent i,XmlContent j+         ,XmlContent k,XmlContent l,XmlContent m,XmlContent n,XmlContent o+         ,XmlContent p,XmlContent q)     => XmlContent (OneOf17 a b c d e f g h i j k l m n o p q)   where     parseContents =-        (choice OneOf17 $ choice TwoOf17 $ choice ThreeOf17 $ choice FourOf17+        choice OneOf17 $ choice TwoOf17 $ choice ThreeOf17 $ choice FourOf17         $ choice FiveOf17 $ choice SixOf17 $ choice SevenOf17         $ choice EightOf17 $ choice NineOf17 $ choice TenOf17         $ choice ElevenOf17 $ choice TwelveOf17 $ choice ThirteenOf17         $ choice FourteenOf17 $ choice FifteenOf17 $ choice SixteenOf17         $ choice SeventeenOf17-        $ fail "OneOf17")+        $ fail "OneOf17"     toContents (OneOf17 x) = toContents x     toContents (TwoOf17 x) = toContents x     toContents (ThreeOf17 x) = toContents x@@ -510,6 +747,29 @@     toContents (SixteenOf17 x) = toContents x     toContents (SeventeenOf17 x) = toContents x +foldOneOf17 :: (a->z) -> (b->z) -> (c->z) -> (d->z) -> (e->z) -> (f->z) ->+               (g->z) -> (h->z) -> (i->z) -> (j->z) -> (k->z) -> (l->z) ->+               (m->z) -> (n->z) -> (o->z) -> (p->z) -> (q->z) ->+               OneOf17 a b c d e f g h i j k l m n o p q+               -> z+foldOneOf17 a b c d e f g h i j k l m n o p q (OneOf17 z) = a z+foldOneOf17 a b c d e f g h i j k l m n o p q (TwoOf17 z) = b z+foldOneOf17 a b c d e f g h i j k l m n o p q (ThreeOf17 z) = c z+foldOneOf17 a b c d e f g h i j k l m n o p q (FourOf17 z) = d z+foldOneOf17 a b c d e f g h i j k l m n o p q (FiveOf17 z) = e z+foldOneOf17 a b c d e f g h i j k l m n o p q (SixOf17 z) = f z+foldOneOf17 a b c d e f g h i j k l m n o p q (SevenOf17 z) = g z+foldOneOf17 a b c d e f g h i j k l m n o p q (EightOf17 z) = h z+foldOneOf17 a b c d e f g h i j k l m n o p q (NineOf17 z) = i z+foldOneOf17 a b c d e f g h i j k l m n o p q (TenOf17 z) = j z+foldOneOf17 a b c d e f g h i j k l m n o p q (ElevenOf17 z) = k z+foldOneOf17 a b c d e f g h i j k l m n o p q (TwelveOf17 z) = l z+foldOneOf17 a b c d e f g h i j k l m n o p q (ThirteenOf17 z) = m z+foldOneOf17 a b c d e f g h i j k l m n o p q (FourteenOf17 z) = n z+foldOneOf17 a b c d e f g h i j k l m n o p q (FifteenOf17 z) = o z+foldOneOf17 a b c d e f g h i j k l m n o p q (SixteenOf17 z) = p z+foldOneOf17 a b c d e f g h i j k l m n o p q (SeventeenOf17 z) = q z+ ---- data OneOf18 a b c d e f g h i j k l m n o p q r     = OneOf18 a | TwoOf18 b | ThreeOf18 c | FourOf18 d | FiveOf18 e@@ -519,26 +779,26 @@     deriving (Eq,Show)  instance (HTypeable a,HTypeable b,HTypeable c,HTypeable d,HTypeable e-          ,HTypeable f,HTypeable g,HTypeable h,HTypeable i,HTypeable j-          ,HTypeable k,HTypeable l,HTypeable m,HTypeable n,HTypeable o-          ,HTypeable p,HTypeable q,HTypeable r)+         ,HTypeable f,HTypeable g,HTypeable h,HTypeable i,HTypeable j+         ,HTypeable k,HTypeable l,HTypeable m,HTypeable n,HTypeable o+         ,HTypeable p,HTypeable q,HTypeable r)     => HTypeable (OneOf18 a b c d e f g h i j k l m n o p q r)   where      toHType _ = Defined "OneOf18" [] []  instance (XmlContent a,XmlContent b,XmlContent c,XmlContent d,XmlContent e-          ,XmlContent f,XmlContent g,XmlContent h,XmlContent i,XmlContent j-          ,XmlContent k,XmlContent l,XmlContent m,XmlContent n,XmlContent o-          ,XmlContent p,XmlContent q,XmlContent r)+         ,XmlContent f,XmlContent g,XmlContent h,XmlContent i,XmlContent j+         ,XmlContent k,XmlContent l,XmlContent m,XmlContent n,XmlContent o+         ,XmlContent p,XmlContent q,XmlContent r)     => XmlContent (OneOf18 a b c d e f g h i j k l m n o p q r)   where     parseContents =-        (choice OneOf18 $ choice TwoOf18 $ choice ThreeOf18 $ choice FourOf18+        choice OneOf18 $ choice TwoOf18 $ choice ThreeOf18 $ choice FourOf18         $ choice FiveOf18 $ choice SixOf18 $ choice SevenOf18         $ choice EightOf18 $ choice NineOf18 $ choice TenOf18         $ choice ElevenOf18 $ choice TwelveOf18 $ choice ThirteenOf18         $ choice FourteenOf18 $ choice FifteenOf18 $ choice SixteenOf18         $ choice SeventeenOf18 $ choice EighteenOf18-        $ fail "OneOf18")+        $ fail "OneOf18"     toContents (OneOf18 x) = toContents x     toContents (TwoOf18 x) = toContents x     toContents (ThreeOf18 x) = toContents x@@ -558,6 +818,30 @@     toContents (SeventeenOf18 x) = toContents x     toContents (EighteenOf18 x) = toContents x +foldOneOf18 :: (a->z) -> (b->z) -> (c->z) -> (d->z) -> (e->z) -> (f->z) ->+               (g->z) -> (h->z) -> (i->z) -> (j->z) -> (k->z) -> (l->z) ->+               (m->z) -> (n->z) -> (o->z) -> (p->z) -> (q->z) -> (r->z) ->+               OneOf18 a b c d e f g h i j k l m n o p q r+               -> z+foldOneOf18 a b c d e f g h i j k l m n o p q r (OneOf18 z) = a z+foldOneOf18 a b c d e f g h i j k l m n o p q r (TwoOf18 z) = b z+foldOneOf18 a b c d e f g h i j k l m n o p q r (ThreeOf18 z) = c z+foldOneOf18 a b c d e f g h i j k l m n o p q r (FourOf18 z) = d z+foldOneOf18 a b c d e f g h i j k l m n o p q r (FiveOf18 z) = e z+foldOneOf18 a b c d e f g h i j k l m n o p q r (SixOf18 z) = f z+foldOneOf18 a b c d e f g h i j k l m n o p q r (SevenOf18 z) = g z+foldOneOf18 a b c d e f g h i j k l m n o p q r (EightOf18 z) = h z+foldOneOf18 a b c d e f g h i j k l m n o p q r (NineOf18 z) = i z+foldOneOf18 a b c d e f g h i j k l m n o p q r (TenOf18 z) = j z+foldOneOf18 a b c d e f g h i j k l m n o p q r (ElevenOf18 z) = k z+foldOneOf18 a b c d e f g h i j k l m n o p q r (TwelveOf18 z) = l z+foldOneOf18 a b c d e f g h i j k l m n o p q r (ThirteenOf18 z) = m z+foldOneOf18 a b c d e f g h i j k l m n o p q r (FourteenOf18 z) = n z+foldOneOf18 a b c d e f g h i j k l m n o p q r (FifteenOf18 z) = o z+foldOneOf18 a b c d e f g h i j k l m n o p q r (SixteenOf18 z) = p z+foldOneOf18 a b c d e f g h i j k l m n o p q r (SeventeenOf18 z) = q z+foldOneOf18 a b c d e f g h i j k l m n o p q r (EighteenOf18 z) = r z+ ---- data OneOf19 a b c d e f g h i j k l m n o p q r s     = OneOf19 a | TwoOf19 b | ThreeOf19 c | FourOf19 d | FiveOf19 e@@ -568,26 +852,26 @@     deriving (Eq,Show)  instance (HTypeable a,HTypeable b,HTypeable c,HTypeable d,HTypeable e-          ,HTypeable f,HTypeable g,HTypeable h,HTypeable i,HTypeable j-          ,HTypeable k,HTypeable l,HTypeable m,HTypeable n,HTypeable o-          ,HTypeable p,HTypeable q,HTypeable r,HTypeable s)+         ,HTypeable f,HTypeable g,HTypeable h,HTypeable i,HTypeable j+         ,HTypeable k,HTypeable l,HTypeable m,HTypeable n,HTypeable o+         ,HTypeable p,HTypeable q,HTypeable r,HTypeable s)     => HTypeable (OneOf19 a b c d e f g h i j k l m n o p q r s)   where      toHType _ = Defined "OneOf19" [] []  instance (XmlContent a,XmlContent b,XmlContent c,XmlContent d,XmlContent e-          ,XmlContent f,XmlContent g,XmlContent h,XmlContent i,XmlContent j-          ,XmlContent k,XmlContent l,XmlContent m,XmlContent n,XmlContent o-          ,XmlContent p,XmlContent q,XmlContent r,XmlContent s)+         ,XmlContent f,XmlContent g,XmlContent h,XmlContent i,XmlContent j+         ,XmlContent k,XmlContent l,XmlContent m,XmlContent n,XmlContent o+         ,XmlContent p,XmlContent q,XmlContent r,XmlContent s)     => XmlContent (OneOf19 a b c d e f g h i j k l m n o p q r s)   where     parseContents =-        (choice OneOf19 $ choice TwoOf19 $ choice ThreeOf19 $ choice FourOf19+        choice OneOf19 $ choice TwoOf19 $ choice ThreeOf19 $ choice FourOf19         $ choice FiveOf19 $ choice SixOf19 $ choice SevenOf19         $ choice EightOf19 $ choice NineOf19 $ choice TenOf19         $ choice ElevenOf19 $ choice TwelveOf19 $ choice ThirteenOf19         $ choice FourteenOf19 $ choice FifteenOf19 $ choice SixteenOf19         $ choice SeventeenOf19 $ choice EighteenOf19 $ choice NineteenOf19-        $ fail "OneOf19")+        $ fail "OneOf19"     toContents (OneOf19 x) = toContents x     toContents (TwoOf19 x) = toContents x     toContents (ThreeOf19 x) = toContents x@@ -608,6 +892,32 @@     toContents (EighteenOf19 x) = toContents x     toContents (NineteenOf19 x) = toContents x +foldOneOf19 :: (a->z) -> (b->z) -> (c->z) -> (d->z) -> (e->z) -> (f->z) ->+               (g->z) -> (h->z) -> (i->z) -> (j->z) -> (k->z) -> (l->z) ->+               (m->z) -> (n->z) -> (o->z) -> (p->z) -> (q->z) -> (r->z) ->+               (s->z) ->+               OneOf19 a b c d e f g h i j k l m n o p q r s+               -> z+foldOneOf19 a b c d e f g h i j k l m n o p q r s (OneOf19 z) = a z+foldOneOf19 a b c d e f g h i j k l m n o p q r s (TwoOf19 z) = b z+foldOneOf19 a b c d e f g h i j k l m n o p q r s (ThreeOf19 z) = c z+foldOneOf19 a b c d e f g h i j k l m n o p q r s (FourOf19 z) = d z+foldOneOf19 a b c d e f g h i j k l m n o p q r s (FiveOf19 z) = e z+foldOneOf19 a b c d e f g h i j k l m n o p q r s (SixOf19 z) = f z+foldOneOf19 a b c d e f g h i j k l m n o p q r s (SevenOf19 z) = g z+foldOneOf19 a b c d e f g h i j k l m n o p q r s (EightOf19 z) = h z+foldOneOf19 a b c d e f g h i j k l m n o p q r s (NineOf19 z) = i z+foldOneOf19 a b c d e f g h i j k l m n o p q r s (TenOf19 z) = j z+foldOneOf19 a b c d e f g h i j k l m n o p q r s (ElevenOf19 z) = k z+foldOneOf19 a b c d e f g h i j k l m n o p q r s (TwelveOf19 z) = l z+foldOneOf19 a b c d e f g h i j k l m n o p q r s (ThirteenOf19 z) = m z+foldOneOf19 a b c d e f g h i j k l m n o p q r s (FourteenOf19 z) = n z+foldOneOf19 a b c d e f g h i j k l m n o p q r s (FifteenOf19 z) = o z+foldOneOf19 a b c d e f g h i j k l m n o p q r s (SixteenOf19 z) = p z+foldOneOf19 a b c d e f g h i j k l m n o p q r s (SeventeenOf19 z) = q z+foldOneOf19 a b c d e f g h i j k l m n o p q r s (EighteenOf19 z) = r z+foldOneOf19 a b c d e f g h i j k l m n o p q r s (NineteenOf19 z) = s z+ ---- data OneOf20 a b c d e f g h i j k l m n o p q r s t     = OneOf20 a | TwoOf20 b | ThreeOf20 c | FourOf20 d | FiveOf20 e@@ -618,27 +928,27 @@     deriving (Eq,Show)  instance (HTypeable a,HTypeable b,HTypeable c,HTypeable d,HTypeable e-          ,HTypeable f,HTypeable g,HTypeable h,HTypeable i,HTypeable j-          ,HTypeable k,HTypeable l,HTypeable m,HTypeable n,HTypeable o-          ,HTypeable p,HTypeable q,HTypeable r,HTypeable s,HTypeable t)+         ,HTypeable f,HTypeable g,HTypeable h,HTypeable i,HTypeable j+         ,HTypeable k,HTypeable l,HTypeable m,HTypeable n,HTypeable o+         ,HTypeable p,HTypeable q,HTypeable r,HTypeable s,HTypeable t)     => HTypeable (OneOf20 a b c d e f g h i j k l m n o p q r s t)   where      toHType _ = Defined "OneOf20" [] []  instance (XmlContent a,XmlContent b,XmlContent c,XmlContent d,XmlContent e-          ,XmlContent f,XmlContent g,XmlContent h,XmlContent i,XmlContent j-          ,XmlContent k,XmlContent l,XmlContent m,XmlContent n,XmlContent o-          ,XmlContent p,XmlContent q,XmlContent r,XmlContent s,XmlContent t)+         ,XmlContent f,XmlContent g,XmlContent h,XmlContent i,XmlContent j+         ,XmlContent k,XmlContent l,XmlContent m,XmlContent n,XmlContent o+         ,XmlContent p,XmlContent q,XmlContent r,XmlContent s,XmlContent t)     => XmlContent (OneOf20 a b c d e f g h i j k l m n o p q r s t)   where     parseContents =-        (choice OneOf20 $ choice TwoOf20 $ choice ThreeOf20 $ choice FourOf20+        choice OneOf20 $ choice TwoOf20 $ choice ThreeOf20 $ choice FourOf20         $ choice FiveOf20 $ choice SixOf20 $ choice SevenOf20         $ choice EightOf20 $ choice NineOf20 $ choice TenOf20         $ choice ElevenOf20 $ choice TwelveOf20 $ choice ThirteenOf20         $ choice FourteenOf20 $ choice FifteenOf20 $ choice SixteenOf20         $ choice SeventeenOf20 $ choice EighteenOf20 $ choice NineteenOf20         $ choice TwentyOf20-        $ fail "OneOf20")+        $ fail "OneOf20"     toContents (OneOf20 x) = toContents x     toContents (TwoOf20 x) = toContents x     toContents (ThreeOf20 x) = toContents x@@ -659,5 +969,52 @@     toContents (EighteenOf20 x) = toContents x     toContents (NineteenOf20 x) = toContents x     toContents (TwentyOf20 x) = toContents x++foldOneOf20 :: (a->z) -> (b->z) -> (c->z) -> (d->z) -> (e->z) -> (f->z) ->+               (g->z) -> (h->z) -> (i->z) -> (j->z) -> (k->z) -> (l->z) ->+               (m->z) -> (n->z) -> (o->z) -> (p->z) -> (q->z) -> (r->z) ->+               (s->z) -> (t->z) ->+               OneOf20 a b c d e f g h i j k l m n o p q r s t+               -> z+foldOneOf20 a b c d e f g h i j k l m n o p q r s+            t (OneOf20 z) = a z+foldOneOf20 a b c d e f g h i j k l m n o p q r s+            t (TwoOf20 z) = b z+foldOneOf20 a b c d e f g h i j k l m n o p q r s+            t (ThreeOf20 z) = c z+foldOneOf20 a b c d e f g h i j k l m n o p q r s+            t (FourOf20 z) = d z+foldOneOf20 a b c d e f g h i j k l m n o p q r s+            t (FiveOf20 z) = e z+foldOneOf20 a b c d e f g h i j k l m n o p q r s+            t (SixOf20 z) = f z+foldOneOf20 a b c d e f g h i j k l m n o p q r s+            t (SevenOf20 z) = g z+foldOneOf20 a b c d e f g h i j k l m n o p q r s+            t (EightOf20 z) = h z+foldOneOf20 a b c d e f g h i j k l m n o p q r s+            t (NineOf20 z) = i z+foldOneOf20 a b c d e f g h i j k l m n o p q r s+            t (TenOf20 z) = j z+foldOneOf20 a b c d e f g h i j k l m n o p q r s+            t (ElevenOf20 z) = k z+foldOneOf20 a b c d e f g h i j k l m n o p q r s+            t (TwelveOf20 z) = l z+foldOneOf20 a b c d e f g h i j k l m n o p q r s+            t (ThirteenOf20 z) = m z+foldOneOf20 a b c d e f g h i j k l m n o p q r s+            t (FourteenOf20 z) = n z+foldOneOf20 a b c d e f g h i j k l m n o p q r s+            t (FifteenOf20 z) = o z+foldOneOf20 a b c d e f g h i j k l m n o p q r s+            t (SixteenOf20 z) = p z+foldOneOf20 a b c d e f g h i j k l m n o p q r s+            t (SeventeenOf20 z) = q z+foldOneOf20 a b c d e f g h i j k l m n o p q r s+            t (EighteenOf20 z) = r z+foldOneOf20 a b c d e f g h i j k l m n o p q r s+            t (NineteenOf20 z) = s z+foldOneOf20 a b c d e f g h i j k l m n o p q r s+            t (TwentyOf20 z) = t z  ----
src/Text/XML/HaXml/Parse.hs view
@@ -1,4 +1,4 @@-{-# OPTIONS -cpp #-}+{-# LANGUAGE CPP #-} -- | A non-validating XML parser.  For the input grammar, see --   <http://www.w3.org/TR/REC-xml>. module Text.XML.HaXml.Parse@@ -14,7 +14,7 @@   , comment, cdsect, chardata   , reference, doctypedecl   , processinginstruction-  , elemtag, name, tok+  , elemtag, qname, name, tok   , elemOpenTag, elemCloseTag   , emptySTs, XParser   -- * These general utility functions don't belong here@@ -31,13 +31,14 @@  import Prelude hiding (either,maybe,sequence) import qualified Prelude (either)-import Maybe hiding (maybe)-import List (intersperse)       -- debugging only-import Char (isSpace,isDigit,isHexDigit)-import Monad hiding (sequence)+import Data.Maybe hiding (maybe)+import Data.List (intercalate)+import Data.Char (isSpace,isDigit,isHexDigit)+import Control.Monad hiding (sequence) import Numeric (readDec,readHex)  import Text.XML.HaXml.Types+import Text.XML.HaXml.Namespaces import Text.XML.HaXml.Posn import Text.XML.HaXml.Lex import Text.ParserCombinators.Poly.State@@ -67,11 +68,11 @@ #  elif defined(__NHC__) || defined(__HBC__) import NonStdTrace #  endif-debug :: a -> String -> a v `debug` s = trace s v #else v `debug` s = v #endif+debug :: a -> String -> a   -- | To parse a whole document, @xmlParse file content@ takes a filename@@ -103,7 +104,8 @@ xmlParse' name  = fst3 . runParser (toEOF document) emptySTs . xmlLex name dtdParse' name  = fst3 . runParser justDTD  emptySTs . xmlLex name -toEOF = id	-- there are other possible implementations...+toEOF :: XParser a -> XParser a+toEOF = id      -- there are other possible implementations...  -- | To parse a partial document, e.g. from an XML-based stream protocol, --   where you may later want to get more document elements from the same@@ -130,7 +132,7 @@ addGE n v (pe,ge) = let newge = addST n v ge in newge `seq` (pe, newge)  lookupPE :: String -> SymTabs -> Maybe PEDef-lookupPE s (pe,ge) = lookupST s pe+lookupPE s (pe,_ge) = lookupST s pe  flattenEV :: EntityValue -> String flattenEV (EntityValue evs) = concatMap flatten evs@@ -153,13 +155,6 @@  ---- Auxiliary Parsing Functions ---- --- | Parse a bracketed item, discarding the brackets AND NOT using adjustErrBad-myBracket :: PolyParse p => p bra -> p ket -> p a -> p a-myBracket open close p = do-    do { open    `adjustErr` ("Missing opening bracket:\n\t"++)-       ; p `discard` (close `adjustErr` ("Missing closing bracket:\n\t"++))-       }- -- | XParser is just a specialisation of the PolyState parser. type XParser a = Parser SymTabs (Posn,TokenT) a @@ -174,6 +169,24 @@                if t`elem`ts then report fail ("no "++show t) p t                             else return t +-- | Return a qualified name (although the namespace qualification is not+--   processed here; this is merely to get the correct type).+qname :: XParser QName+qname = do+    (p,tok) <- next+    case tok of+        TokName s  -> case split ':' s of+            [one] -> return $ N s+            [ns,elem_name] -> return $ QN (Namespace ns "") elem_name+            _ -> report fail "a name" p tok+        TokError _ -> report failBad "a name" p tok+        _          -> report fail "a name" p tok+    where+    split :: Char -> String -> [String]+    split c xs = case break (==c) xs of+        (ls, "") -> [ls]+        (ls, x:rs) -> ls : split c rs+ -- | Return just a name, e.g. element name, attribute name. name :: XParser Name name = do (p,tok) <- next@@ -192,38 +205,39 @@  maybe :: XParser a -> XParser (Maybe a) maybe p =-    ( p >>= return . Just) `onFail`-    ( return Nothing)+    ( Just <$> p) `onFail`+    return Nothing  either :: XParser a -> XParser b -> XParser (Either a b) either p q =-    ( p >>= return . Left) `onFail`-    ( q >>= return . Right)+    ( Left <$> p) `onFail`+    ( Right <$> q)  word :: String -> XParser () word s = do { x <- next             ; case x of-                (p,TokName n)     | s==n -> return ()-                (p,TokFreeText n) | s==n -> return ()-                (p,t@(TokError _)) -> report failBad (show s) p t-                (p,t) -> report fail (show s) p t+                (_p,TokName n)     | s==n -> return ()+                (_p,TokFreeText n) | s==n -> return ()+                ( p,t@(TokError _)) -> report failBad (show s) p t+                ( p,t) -> report fail (show s) p t             } +posn :: XParser Posn posn = do { x@(p,_) <- next           ; reparse [x]           ; return p           }  nmtoken :: XParser NmToken-nmtoken = (string `onFail` freetext)+nmtoken = string `onFail` freetext  failP, failBadP :: String -> XParser a failP msg = do { p <- posn; fail (msg++"\n    at "++show p) } failBadP msg = do { p <- posn; failBad (msg++"\n    at "++show p) }  report :: (String->XParser a) -> String -> Posn -> TokenT -> XParser a-report fail exp p t = fail ("Expected "++exp++" but found "++show t-                           ++"\n  in "++show p)+report fail expect p t = fail ("Expected "++expect++" but found "++show t+                               ++"\n  in "++show p)  adjustErrP :: XParser a -> (String->String) -> XParser a p `adjustErrP` f = p `onFail` do pn <- posn@@ -279,13 +293,13 @@ justDTD =   do (ExtSubset _ ds) <- extsubset `debug` "Trying external subset"      if null ds then fail "empty"-         else return (Just (DTD "extsubset" Nothing (concatMap extract ds)))+         else return (Just (DTD (N "extsubset") Nothing (concatMap extract ds)))   `onFail`   do (Prolog _ _ dtd _) <- prolog      return dtd  where extract (ExtMarkupDecl m) = [m]        extract (ExtConditionalSect (IncludeSect i)) = concatMap extract i-       extract (ExtConditionalSect (IgnoreSect i)) = []+       extract (ExtConditionalSect (IgnoreSect _i)) = []  -- | Return an entire XML document including prolog and trailing junk. document :: XParser (Document Posn)@@ -299,7 +313,7 @@ -- | Return an XML comment. comment :: XParser Comment comment = do-    myBracket (tok TokCommentOpen) (tok TokCommentClose) freetext+    bracket (tok TokCommentOpen) (tok TokCommentClose) freetext --  tok TokCommentOpen --  commit $ do --    c <- freetext@@ -319,7 +333,7 @@ cdsect :: XParser CDSect cdsect = do     tok TokSectionOpen-    bracket (tok (TokSection CDATAx)) (tok TokSectionClose) chardata+    bracket (tok (TokSection CDATAx)) (commit $ tok TokSectionClose) chardata  prolog :: XParser Prolog prolog = do@@ -332,7 +346,7 @@ xmldecl :: XParser XMLDecl xmldecl = do     tok TokPIOpen-    (word "xml" `onFail` word "XML")+    word "xml" `onFail` word "XML"     p <- posn     s <- freetext     tok TokPIClose `onFail` failBadP "missing ?> in <?xml ...?>"@@ -348,14 +362,14 @@  versioninfo :: XParser VersionInfo versioninfo = do-    (word "version" `onFail` word "VERSION")+    word "version" `onFail` word "VERSION"     tok TokEqual-    bracket (tok TokQuote) (tok TokQuote) freetext+    bracket (tok TokQuote) (commit $ tok TokQuote) freetext  misc :: XParser Misc misc =-    oneOf' [ ("<!--comment-->",  comment >>= return . Comment)-           , ("<?PI?>",          processinginstruction >>= return . PI)+    oneOf' [ ("<!--comment-->",  Comment <$> comment)+           , ("<?PI?>",          PI <$> processinginstruction)            ]  -- | Return a DOCTYPE decl, indicating a DTD.@@ -364,21 +378,21 @@     tok TokSpecialOpen     tok (TokSpecial DOCTYPEx)     commit $ do-      n   <- name+      n   <- qname       eid <- maybe externalid-      es  <- maybe (bracket (tok TokSqOpen) (tok TokSqClose)+      es  <- maybe (bracket (tok TokSqOpen) (commit $ tok TokSqClose)                             (many (peRef markupdecl)))       blank (tok TokAnyClose)  `onFail` failP "missing > in DOCTYPE decl"-      return (DTD n eid (case es of { Nothing -> []; Just e -> e }))+      return (DTD n eid (fromMaybe [] es))  -- | Return a DTD markup decl, e.g. ELEMENT, ATTLIST, etc markupdecl :: XParser MarkupDecl markupdecl =-  oneOf' [ ("ELEMENT",  elementdecl  >>= return . Element)-         , ("ATTLIST",  attlistdecl  >>= return . AttList)-         , ("ENTITY",   entitydecl   >>= return . Entity)-         , ("NOTATION", notationdecl >>= return . Notation)-         , ("misc",     misc         >>= return . MarkupMisc)+  oneOf' [ ("ELEMENT",  Element <$> elementdecl )+         , ("ATTLIST",  AttList <$> attlistdecl )+         , ("ENTITY",   Entity <$> entitydecl )+         , ("NOTATION", Notation <$> notationdecl)+         , ("misc",     MarkupMisc <$> misc )          ]     `adjustErrP`           ("when looking for a markup decl,\n"++)@@ -392,15 +406,15 @@  extsubsetdecl :: XParser ExtSubsetDecl extsubsetdecl =-    ( markupdecl >>= return . ExtMarkupDecl) `onFail`-    ( conditionalsect >>= return . ExtConditionalSect)+    ( ExtMarkupDecl <$> markupdecl) `onFail`+    ( ExtConditionalSect <$> conditionalsect)  sddecl :: XParser SDDecl sddecl = do-    (word "standalone" `onFail` word "STANDALONE")+    word "standalone" `onFail` word "STANDALONE"     commit $ do       tok TokEqual `onFail` failP "missing = in 'standalone' decl"-      bracket (tok TokQuote) (tok TokQuote)+      bracket (tok TokQuote) (commit $ tok TokQuote)               ( (word "yes" >> return True) `onFail`                 (word "no" >> return False) `onFail`                 failP "'standalone' decl requires 'yes' or 'no' value" )@@ -417,7 +431,7 @@              ,  do tok TokAnyClose                    cs <- many content                    p  <- posn-                   m  <- bracket (tok TokEndOpen) (tok TokAnyClose) name+                   m  <- bracket (tok TokEndOpen) (commit $ tok TokAnyClose) qname                    checkmatch p n m                    return (Elem n as cs))            ] `adjustErr` (("in element tag "++n++",\n")++)@@ -437,19 +451,20 @@                  manyFinally content                              (do p <- posn                                  m <- bracket (tok TokEndOpen)-                                              (tok TokAnyClose) name+                                              (commit $ tok TokAnyClose) qname                                  checkmatch p n m)-      ) `adjustErrBad` (("in element tag "++n++",\n")++)+      ) `adjustErrBad` (("in element tag "++printableName n++",\n")++) -checkmatch :: Posn -> Name -> Name -> XParser ()+checkmatch :: Posn -> QName -> QName -> XParser () checkmatch p n m =   if n == m then return ()-  else failBadP ("tag <"++n++"> terminated by </"++m++">")+  else failBad ("tag <"++printableName n++"> terminated by </"++printableName m+                ++">\n  at "++show p)  -- | Parse only the parts between angle brackets in an element tag. elemtag :: XParser ElemTag elemtag = do-    n  <- name `adjustErrBad` ("malformed element tag\n"++)+    n  <- qname `adjustErrBad` ("malformed element tag\n"++)     as <- many attribute     return (ElemTag n as) @@ -463,17 +478,17 @@  -- | For use with stream parsers - accepts a closing tag, provided it --   matches the given element name.-elemCloseTag :: Name -> XParser ()+elemCloseTag :: QName -> XParser () elemCloseTag n = do     tok TokEndOpen     p <- posn-    m <- name+    m <- qname     tok TokAnyClose     checkmatch p n m  attribute :: XParser Attribute attribute = do-    n <- name `adjustErr` ("malformed attribute name\n"++)+    n <- qname `adjustErr` ("malformed attribute name\n"++)     tok TokEqual `onFail` failBadP "missing = in attribute"     v <- attvalue `onFail` failBadP "missing attvalue"     return (n,v)@@ -486,11 +501,11 @@      ; return (c' p)      }   where-     content' = oneOf' [ ("element",   element   >>= return . CElem)-                       , ("chardata",  chardata  >>= return . CString False)-                       , ("reference", reference >>= return . CRef)-                       , ("CDATA",     cdsect    >>= return . CString True)-                       , ("misc",      misc      >>= return . CMisc)+     content' = oneOf' [ ("element",   CElem <$> element )+                       , ("chardata",  CString False <$> chardata )+                       , ("reference", CRef <$> reference)+                       , ("CDATA",     CString True <$> cdsect )+                       , ("misc",      CMisc <$> misc )                        ]                   `adjustErrP` ("when looking for a content item,\n"++) -- (\    (element, text, reference, CDATA section, <!--comment-->, or <?PI?>")@@ -499,71 +514,72 @@ elementdecl = do     tok TokSpecialOpen     tok (TokSpecial ELEMENTx)-    n <- peRef name `adjustErrBad` ("expecting identifier in ELEMENT decl\n"++)+    n <- peRef qname `adjustErrBad` ("expecting identifier in ELEMENT decl\n"++)     c <- peRef contentspec-             `adjustErrBad` (("in content spec of ELEMENT decl: "++n++"\n")++)+             `adjustErrBad` (("in content spec of ELEMENT decl: "+                              ++printableName n++"\n")++)     blank (tok TokAnyClose) `onFail` failBadP        ("expected > terminating ELEMENT decl"-       ++"\n    element name was "++show n-       ++"\n    contentspec was "++(\ (ContentSpec p)-> show p) c)+       ++"\n    element name was "++show (printableName n)+       ++"\n    contentspec was "++(\ (ContentSpec p)-> debugShowCP p) c)     return (ElementDecl n c)  contentspec :: XParser ContentSpec contentspec =     oneOf' [ ("EMPTY",  peRef (word "EMPTY") >> return EMPTY)            , ("ANY",    peRef (word "ANY") >> return ANY)-           , ("mixed",  peRef mixed >>= return . Mixed)-           , ("simple", peRef cp >>= return . ContentSpec)+           , ("mixed",  Mixed <$> peRef mixed)+           , ("simple", ContentSpec <$> peRef cp)            ]  --   `adjustErr` ("when looking for content spec,\n"++)  --   `adjustErr` (++"\nLooking for content spec (EMPTY, ANY, mixed, etc)")  choice :: XParser [CP] choice = do-    myBracket (tok TokBraOpen `debug` "Trying choice")-              (blank (tok TokBraClose `debug` "Succeeded with choice"))-              (peRef cp `sepBy1` blank (tok TokPipe))+    bracket (tok TokBraOpen `debug` "Trying choice")+            (blank (tok TokBraClose `debug` "Succeeded with choice"))+            (peRef cp `sepBy1` blank (tok TokPipe))  sequence :: XParser [CP] sequence = do- myBracket (tok TokBraOpen `debug` "Trying sequence")-           (blank (tok TokBraClose `debug` "Succeeded with sequence"))-           (peRef cp `sepBy1` blank (tok TokComma))+    bracket (tok TokBraOpen `debug` "Trying sequence")+            (blank (tok TokBraClose `debug` "Succeeded with sequence"))+            (peRef cp `sepBy1` blank (tok TokComma))  cp :: XParser CP-cp = oneOf [ ( do n <- name-                  m <- modifier-                  let c = TagName n m-                  return c `debug` ("ContentSpec: name "++show c))-           , ( do ss <- sequence-                  m <- modifier-                  let c = Seq ss m-                  return c `debug` ("ContentSpec: sequence "++show c))-           , ( do cs <- choice-                  m <- modifier-                  let c = Choice cs m-                  return c `debug` ("ContentSpec: choice "++show c))+cp = oneOf [ do n <- qname+                m <- modifier+                let c = TagName n m+                return c `debug` ("ContentSpec: name "++debugShowCP c)+           , do ss <- sequence+                m <- modifier+                let c = Seq ss m+                return c `debug` ("ContentSpec: sequence "++debugShowCP c)+           , do cs <- choice+                m <- modifier+                let c = Choice cs m+                return c `debug` ("ContentSpec: choice "++debugShowCP c)            ] `adjustErr` (++"\nwhen looking for a content particle")  modifier :: XParser Modifier-modifier = oneOf [ ( tok TokStar >> return Star )-                 , ( tok TokQuery >> return Query )-                 , ( tok TokPlus >> return Plus )-                 , ( return None )+modifier = oneOf [ tok TokStar >> return Star+                 , tok TokQuery >> return Query+                 , tok TokPlus >> return Plus+                 , return None                  ]  -- just for debugging-instance Show CP where-    show (TagName n m) = n++show m-    show (Choice cps m) = '(': concat (intersperse "|" (map show cps))-                          ++")"++show m-    show (Seq cps m) = '(': concat (intersperse "," (map show cps))-                          ++")"++show m-instance Show Modifier where-    show None = ""-    show Query = "?"-    show Star = "*"-    show Plus = "+"+debugShowCP :: CP -> String+debugShowCP cp = case cp of+    TagName n m  -> printableName n++debugShowModifier m+    Choice cps m -> '(': intercalate "|" (map debugShowCP cps)++")"++debugShowModifier m+    Seq cps m    -> '(': intercalate "," (map debugShowCP cps)++")"++debugShowModifier m+debugShowModifier :: Modifier -> String+debugShowModifier modifier = case modifier of+    None  -> ""+    Query -> "?"+    Star  -> "*"+    Plus  -> "+" ----  mixed :: XParser Mixed@@ -572,12 +588,12 @@     peRef (do tok TokHash               word "PCDATA")     commit $-      oneOf [ ( do cs <- many (peRef (do tok TokPipe-                                         peRef name))-                   blank (tok TokBraClose >> tok TokStar)-                   return (PCDATAplus cs))-            , ( blank (tok TokBraClose >> tok TokStar) >> return PCDATA)-            , ( blank (tok TokBraClose) >> return PCDATA)+      oneOf [ do cs <- many (peRef (do tok TokPipe+                                       peRef qname))+                 blank (tok TokBraClose >> tok TokStar)+                 return (PCDATAplus cs)+            , blank (tok TokBraClose >> tok TokStar) >> return PCDATA+            , blank (tok TokBraClose) >> return PCDATA             ]         `adjustErrP` (++"\nLooking for mixed content spec (#PCDATA | ...)*\n") @@ -585,61 +601,61 @@ attlistdecl = do     tok TokSpecialOpen     tok (TokSpecial ATTLISTx)-    n <- peRef name `adjustErrBad` ("expecting identifier in ATTLIST\n"++)+    n <- peRef qname `adjustErrBad` ("expecting identifier in ATTLIST\n"++)     ds <- peRef (many1 (peRef attdef))     blank (tok TokAnyClose) `onFail` failBadP "missing > terminating ATTLIST"     return (AttListDecl n ds)  attdef :: XParser AttDef attdef =-  do n <- peRef name `adjustErr` ("expecting attribute name\n"++)-     t <- peRef atttype `adjustErr` (("within attlist defn: "++n++",\n")++)-     d <- peRef defaultdecl `adjustErr` (("in attlist defn: "++n++",\n")++)+  do n <- peRef qname `adjustErr` ("expecting attribute name\n"++)+     t <- peRef atttype `adjustErr` (("within attlist defn: "+                                     ++printableName n++",\n")++)+     d <- peRef defaultdecl `adjustErr` (("in attlist defn: "+                                         ++printableName n++",\n")++)      return (AttDef n t d)  atttype :: XParser AttType atttype =     oneOf' [ ("CDATA",      word "CDATA" >> return StringType)-           , ("tokenized",  tokenizedtype >>= return . TokenizedType)-           , ("enumerated", enumeratedtype >>= return . EnumeratedType)+           , ("tokenized",  TokenizedType <$> tokenizedtype)+           , ("enumerated", EnumeratedType <$> enumeratedtype)            ]       `adjustErr` ("looking for ATTTYPE,\n"++)  --   `adjustErr` (++"\nLooking for ATTTYPE (CDATA, tokenized, or enumerated")  tokenizedtype :: XParser TokenizedType tokenizedtype =-    oneOf [ ( word "ID" >> return ID)-          , ( word "IDREF" >> return IDREF)-          , ( word "IDREFS" >> return IDREFS)-          , ( word "ENTITY" >> return ENTITY)-          , ( word "ENTITIES" >> return ENTITIES)-          , ( word "NMTOKEN" >> return NMTOKEN)-          , ( word "NMTOKENS" >> return NMTOKENS)+    oneOf [ word "ID" >> return ID+          , word "IDREF" >> return IDREF+          , word "IDREFS" >> return IDREFS+          , word "ENTITY" >> return ENTITY+          , word "ENTITIES" >> return ENTITIES+          , word "NMTOKEN" >> return NMTOKEN+          , word "NMTOKENS" >> return NMTOKENS           ] `onFail`     do { t <- next        ; failP ("Expected one of"                ++" (ID, IDREF, IDREFS, ENTITY, ENTITIES, NMTOKEN, NMTOKENS)"                ++"\nbut got "++show t)        }--- `adjustErr` (++"\nLooking for a tokenized type:\n\ --- \    (ID, IDREF, IDREFS, ENTITY, ENTITIES, NMTOKEN, NMTOKENS)")  enumeratedtype :: XParser EnumeratedType enumeratedtype =-    oneOf' [ ("NOTATION",   notationtype >>= return . NotationType)-           , ("enumerated", enumeration >>= return . Enumeration)+    oneOf' [ ("NOTATION",   NotationType <$> notationtype)+           , ("enumerated", Enumeration <$> enumeration)            ]       `adjustErr` ("looking for an enumerated or NOTATION type,\n"++)  notationtype :: XParser NotationType notationtype = do     word "NOTATION"-    bracket (tok TokBraOpen) (blank (tok TokBraClose))+    bracket (tok TokBraOpen) (commit $ blank $ tok TokBraClose)             (peRef name `sepBy1` peRef (tok TokPipe))  enumeration :: XParser Enumeration enumeration =-    bracket (tok TokBraOpen) (blank (tok TokBraClose))+    bracket (tok TokBraOpen) (commit $ blank $ tok TokBraClose)             (peRef nmtoken `sepBy1` blank (peRef (tok TokPipe)))  defaultdecl :: XParser DefaultDecl@@ -652,8 +668,6 @@                               return (DefaultTo a f) )            ]         `adjustErr` ("looking for an attribute default decl,\n"++)---      `adjustErr` (++"\nLooking for an attribute default decl:\n\ --- \    (REQUIRED, IMPLIED, FIXED)")  conditionalsect :: XParser ConditionalSect conditionalsect = oneOf'@@ -672,7 +686,7 @@            peRef (tok (TokSection IGNOREx))            p <- posn            tok TokSqOpen `onFail` failBadP "missing [ after IGNORE"-           i <- many newIgnore  -- many ignoresectcontents+           many newIgnore  -- many ignoresectcontents            tok TokSectionClose                    `onFail` failBadP ("missing ]]> for IGNORE section"                                      ++"\n    begun at "++show p)@@ -689,26 +703,26 @@          return Ignore  `debug` ("ignoring: "++show t))  --- obsolete?-ignoresectcontents :: XParser IgnoreSectContents-ignoresectcontents = do-    i <- ignore-    is <- many (do tok TokSectionOpen-                   ic <- ignoresectcontents-                   tok TokSectionClose-                   ig <- ignore-                   return (ic,ig))-    return (IgnoreSectContents i is)--ignore :: XParser Ignore-ignore = do-  is <- many1 (nottok [TokSectionOpen,TokSectionClose])-  return Ignore  `debug` ("ignored all of: "++show is)+--ignoresectcontents :: XParser IgnoreSectContents+--ignoresectcontents = do+--    i <- ignore+--    is <- many (do tok TokSectionOpen+--                   ic <- ignoresectcontents+--                   tok TokSectionClose+--                   ig <- ignore+--                   return (ic,ig))+--    return (IgnoreSectContents i is)+--+--ignore :: XParser Ignore+--ignore = do+--  is <- many1 (nottok [TokSectionOpen,TokSectionClose])+--  return Ignore  `debug` ("ignored all of: "++show is) ----  -- | Return either a general entity reference, or a character reference. reference :: XParser Reference reference = do-    myBracket (tok TokAmp) (tok TokSemi) (freetext >>= val)+    bracket (tok TokAmp) (tok TokSemi) (freetext >>= val)   where     val ('#':'x':i) | all isHexDigit i                     = return . RefChar . fst . head . readHex $ i@@ -718,16 +732,16 @@  {- -- following is incorrect reference =-    ( charref >>= return . RefChar) `onFail`-    ( entityref >>= return . RefEntity)+    ( RefChar <$> charref) `onFail`+    ( RefEntity <$> entityref)  entityref :: XParser EntityRef entityref = do-    bracket (tok TokAmp) (tok TokSemi) name+    bracket (tok TokAmp) (commit $ tok TokSemi) name  charref :: XParser CharRef charref = do-    bracket (tok TokAmp) (tok TokSemi) (freetext >>= readCharVal)+    bracket (tok TokAmp) (commit $ tok TokSemi) (freetext >>= readCharVal)   where     readCharVal ('#':'x':i) = return . fst . head . readHex $ i     readCharVal ('#':i)     = return . fst . head . readDec $ i@@ -736,12 +750,12 @@  pereference :: XParser PEReference pereference = do-    myBracket (tok TokPercent) (tok TokSemi) nmtoken+    bracket (tok TokPercent) (tok TokSemi) nmtoken  entitydecl :: XParser EntityDecl entitydecl =-    ( gedecl >>= return . EntityGEDecl) `onFail`-    ( pedecl >>= return . EntityPEDecl)+    ( EntityGEDecl <$> gedecl) `onFail`+    ( EntityPEDecl <$> pedecl)  gedecl :: XParser GEDecl gedecl = do@@ -766,7 +780,7 @@  entitydef :: XParser EntityDef entitydef =-    oneOf' [ ("entityvalue", entityvalue >>= return . DefEntityValue)+    oneOf' [ ("entityvalue", DefEntityValue <$> entityvalue)            , ("external",    do eid <- externalid                                 ndd <- maybe ndatadecl                                 return (DefExternalID eid ndd))@@ -774,54 +788,51 @@  pedef :: XParser PEDef pedef =-    oneOf' [ ("entityvalue", entityvalue >>= return . PEDefEntityValue)-           , ("externalid",  externalid  >>= return . PEDefExternalID)+    oneOf' [ ("entityvalue", PEDefEntityValue <$> entityvalue)+           , ("externalid",  PEDefExternalID <$> externalid )            ]  externalid :: XParser ExternalID externalid =     oneOf' [ ("SYSTEM", do word "SYSTEM"-                           s <- systemliteral-                           return (SYSTEM s) )+                           SYSTEM <$> systemliteral)            , ("PUBLIC", do word "PUBLIC"                            p <- pubidliteral-                           s <- systemliteral-                           return (PUBLIC p s) )+                           PUBLIC p <$> systemliteral)            ]       `adjustErr` ("looking for an external id,\n"++)  ndatadecl :: XParser NDataDecl ndatadecl = do     word "NDATA"-    n <- name-    return (NDATA n)+    NDATA <$> name  textdecl :: XParser TextDecl textdecl = do     tok TokPIOpen-    (word "xml" `onFail` word "XML")+    word "xml" `onFail` word "XML"     v <- maybe versioninfo     e <- encodingdecl     tok TokPIClose `onFail` failP "expected ?> terminating text decl"     return (TextDecl v e) -extparsedent :: XParser (ExtParsedEnt Posn)-extparsedent = do-    t <- maybe textdecl-    c <- content-    return (ExtParsedEnt t c)--extpe :: XParser ExtPE-extpe = do-    t <- maybe textdecl-    e <- many (peRef extsubsetdecl)-    return (ExtPE t e)+--extparsedent :: XParser (ExtParsedEnt Posn)+--extparsedent = do+--    t <- maybe textdecl+--    c <- content+--    return (ExtParsedEnt t c)+--+--extpe :: XParser ExtPE+--extpe = do+--    t <- maybe textdecl+--    e <- many (peRef extsubsetdecl)+--    return (ExtPE t e)  encodingdecl :: XParser EncodingDecl encodingdecl = do-    (word "encoding" `onFail` word "ENCODING")+    word "encoding" `onFail` word "ENCODING"     tok TokEqual `onFail` failBadP "expected = in 'encoding' decl"-    f <- bracket (tok TokQuote) (tok TokQuote) freetext+    f <- bracket (tok TokQuote) (commit $ tok TokQuote) freetext     return (EncodingDecl f)  notationdecl :: XParser NotationDecl@@ -836,12 +847,11 @@ publicid :: XParser PublicID publicid = do     word "PUBLIC"-    p <- pubidliteral-    return (PUBLICID p)+    PUBLICID <$> pubidliteral  entityvalue :: XParser EntityValue entityvalue = do- -- evs <- bracket (tok TokQuote) (tok TokQuote) (many (peRef ev))+ -- evs <- bracket (tok TokQuote) (commit $ tok TokQuote) (many (peRef ev))     tok TokQuote     pn <- posn     evs <- many ev@@ -849,38 +859,37 @@     -- quoted text must be rescanned for possible PERefs     st <- stGet     Prelude.either failBad (return . EntityValue) . fst3 $-                (runParser (many ev) st+                runParser (many ev) st                          (reLexEntityValue (\s-> stringify (lookupPE s st))                                            pn-                                           (flattenEV (EntityValue evs))))+                                           (flattenEV (EntityValue evs)))   where     stringify (Just (PEDefEntityValue ev)) = Just (flattenEV ev)     stringify _ = Nothing  ev :: XParser EV ev =-    oneOf' [ ("string",    (string`onFail`freetext) >>= return . EVString)-           , ("reference", reference >>= return . EVRef)+    oneOf' [ ("string",    EVString <$> (string`onFail`freetext))+           , ("reference", EVRef <$> reference)            ]       `adjustErr` ("looking for entity value,\n"++)  attvalue :: XParser AttValue attvalue = do-    avs <- bracket (tok TokQuote) (tok TokQuote)+    avs <- bracket (tok TokQuote) (commit $ tok TokQuote)                    (many (either freetext reference))     return (AttValue avs)  systemliteral :: XParser SystemLiteral systemliteral = do-    s <- bracket (tok TokQuote) (tok TokQuote) freetext+    s <- bracket (tok TokQuote) (commit $ tok TokQuote) freetext     return (SystemLiteral s)            -- note: refs &...; not permitted  pubidliteral :: XParser PubidLiteral pubidliteral = do-    s <- bracket (tok TokQuote) (tok TokQuote) freetext+    s <- bracket (tok TokQuote) (commit $ tok TokQuote) freetext     return (PubidLiteral s)             -- note: freetext is too liberal here  -- | Return parsed freetext (i.e. until the next markup) chardata :: XParser CharData chardata = freetext-
src/Text/XML/HaXml/ParseLazy.hs view
@@ -13,7 +13,7 @@   , comment, chardata   , reference, doctypedecl   , processinginstruction-  , elemtag, name, tok+  , elemtag, qname, name, tok   , elemOpenTag, elemCloseTag   , emptySTs, XParser   -- * These general utility functions don't belong here@@ -30,14 +30,15 @@  import Prelude hiding (either,maybe,sequence,catch) import qualified Prelude (either)-import Maybe hiding (maybe)-import List (intersperse)       -- debugging only-import Char (isSpace,isDigit,isHexDigit)-import Monad hiding (sequence)+import Data.Maybe hiding (maybe)+import Data.List (intercalate)+import Data.Char (isSpace,isDigit,isHexDigit)+import Control.Monad hiding (sequence) import Numeric (readDec,readHex) --import Control.Exception (catch)  import Text.XML.HaXml.Types+import Text.XML.HaXml.Namespaces import Text.XML.HaXml.Posn import Text.XML.HaXml.Lex import Text.ParserCombinators.Poly.StateLazy@@ -67,11 +68,11 @@ #  elif defined(__NHC__) || defined(__HBC__) import NonStdTrace #  endif-debug :: a -> String -> a v `debug` s = trace s v #else-v `debug` s = v+v `debug` _ = v #endif+debug :: a -> String -> a   -- | To parse a whole document, @xmlParse file content@ takes a filename@@ -85,6 +86,7 @@ --   Any parse error message is passed back to the caller through the --   @Either@ type. xmlParse' :: String -> String -> Either String (Document Posn)+-}  -- | To parse just a DTD, @dtdParse file content@ takes a filename --   (for generating error reports) and the string content of that@@ -92,6 +94,7 @@ --   However, if a DTD is found but contains errors, the program crashes. dtdParse  :: String -> String -> Maybe DocTypeDecl +{- -- | To parse just a DTD, @dtdParse' file content@ takes a filename --   (for generating error reports) and the string content of that --   file.  If no DTD was found, you get @Right Nothing@.@@ -105,8 +108,8 @@ xmlParse  name  = fst3 . runParser (toEOF document) emptySTs . xmlLex name dtdParse  name  = fst3 . runParser justDTD  emptySTs . xmlLex name --toEOF = id	-- there are other possible implementations...+toEOF :: XParser a -> XParser a+toEOF = id      -- there are other possible implementations...  -- | To parse a partial document, e.g. from an XML-based stream protocol, --   where you may later want to get more document elements from the same@@ -133,7 +136,7 @@ addGE n v (pe,ge) = let newge = addST n v ge in newge `seq` (pe, newge)  lookupPE :: String -> SymTabs -> Maybe PEDef-lookupPE s (pe,ge) = lookupST s pe+lookupPE s (pe,_ge) = lookupST s pe  flattenEV :: EntityValue -> String flattenEV (EntityValue evs) = concatMap flatten evs@@ -156,14 +159,6 @@  ---- Auxiliary Parsing Functions ---- --- | Parse a bracketed item, discarding the brackets AND NOT using adjustErrBad-myBracket :: PolyParse p => p bra -> p ket -> p a -> p a-myBracket open close p = do-    do { open    `adjustErr` ("Missing opening bracket:\n\t"++)-       ; p `discard` (close `adjustErr` ("Missing closing bracket:\n\t"++))-       }-- -- | XParser is just a specialisation of the PolyStateLazy parser. type XParser a = Parser SymTabs (Posn,TokenT) a @@ -178,6 +173,24 @@                if t`elem`ts then report fail ("no "++show t) p t                             else return t +-- | Return a qualified name (although the namespace qualification is not+--   processed here; this is merely to get the correct type).+qname :: XParser QName+qname = do+    (p,tok) <- next+    case tok of+        TokName s  -> case split ':' s of+            [one] -> return $ N s+            [ns,elem_name] -> return $ QN (Namespace ns "") elem_name+            _ -> report fail "a name" p tok+        TokError _ -> report failBad "a name" p tok+        _          -> report fail "a name" p tok+    where+    split :: Char -> String -> [String]+    split c xs = case break (==c) xs of+        (ls, "") -> [ls]+        (ls, x:rs) -> ls : split c rs+ -- | Return just a name, e.g. element name, attribute name. name :: XParser Name name = do (p,tok) <- next@@ -196,38 +209,39 @@  maybe :: XParser a -> XParser (Maybe a) maybe p =-    ( p >>= return . Just) `onFail`-    ( return Nothing)+    (Just <$> p) `onFail`+    return Nothing  either :: XParser a -> XParser b -> XParser (Either a b) either p q =-    ( p >>= return . Left) `onFail`-    ( q >>= return . Right)+    (Left <$> p) `onFail`+    (Right <$> q)  word :: String -> XParser () word s = do { x <- next             ; case x of-                (p,TokName n)     | s==n -> return ()-                (p,TokFreeText n) | s==n -> return ()-                (p,t@(TokError _)) -> report failBad (show s) p t-                (p,t) -> report fail (show s) p t+                (_p,TokName n)     | s==n -> return ()+                (_p,TokFreeText n) | s==n -> return ()+                ( p,t@(TokError _)) -> report failBad (show s) p t+                ( p,t) -> report fail (show s) p t             } +posn :: XParser Posn posn = do { x@(p,_) <- next           ; reparse [x]           ; return p           }  nmtoken :: XParser NmToken-nmtoken = (string `onFail` freetext)+nmtoken = string `onFail` freetext  failP, failBadP :: String -> XParser a failP msg = do { p <- posn; fail (msg++"\n    at "++show p) } failBadP msg = do { p <- posn; failBad (msg++"\n    at "++show p) }  report :: (String->XParser a) -> String -> Posn -> TokenT -> XParser a-report fail exp p t = fail ("Expected "++exp++" but found "++show t-                           ++"\n  in "++show p)+report fail expect p t = fail ("Expected "++expect++" but found "++show t+                               ++"\n  in "++show p)  adjustErrP :: XParser a -> (String->String) -> XParser a p `adjustErrP` f = p `onFail` do pn <- posn@@ -283,13 +297,13 @@ justDTD =   do (ExtSubset _ ds) <- extsubset `debug` "Trying external subset"      if null ds then fail "empty"-         else return (Just (DTD "extsubset" Nothing (concatMap extract ds)))+         else return (Just (DTD (N "extsubset") Nothing (concatMap extract ds)))   `onFail`   do (Prolog _ _ dtd _) <- prolog      return dtd  where extract (ExtMarkupDecl m) = [m]        extract (ExtConditionalSect (IncludeSect i)) = concatMap extract i-       extract (ExtConditionalSect (IgnoreSect i)) = []+       extract (ExtConditionalSect (IgnoreSect _)) = []  -- | Return an entire XML document including prolog and trailing junk. document :: XParser (Document Posn)@@ -301,14 +315,14 @@  -- return (Document p ge e ms)     return Document `apply` (prolog `adjustErr`                                     ("unrecognisable XML prolog\n"++))-                    `apply` (fmap snd stGet)+                    `apply` fmap snd stGet                     `apply` element                     `apply` many misc  -- | Return an XML comment. comment :: XParser Comment comment = do-    myBracket (tok TokCommentOpen) (tok TokCommentClose) freetext+    bracket (tok TokCommentOpen) (tok TokCommentClose) freetext --  tok TokCommentOpen --  commit $ do --    c <- freetext@@ -328,7 +342,7 @@ cdsect :: XParser CDSect cdsect = do     tok TokSectionOpen-    bracket (tok (TokSection CDATAx)) (tok TokSectionClose) chardata+    bracket (tok (TokSection CDATAx)) (commit $ tok TokSectionClose) chardata  prolog :: XParser Prolog prolog = do@@ -341,7 +355,7 @@ xmldecl :: XParser XMLDecl xmldecl = do     tok TokPIOpen-    (word "xml" `onFail` word "XML")+    word "xml" `onFail` word "XML"     p <- posn     s <- freetext     tok TokPIClose `onFail` failBadP "missing ?> in <?xml ...?>"@@ -358,14 +372,14 @@  versioninfo :: XParser VersionInfo versioninfo = do-    (word "version" `onFail` word "VERSION")+    word "version" `onFail` word "VERSION"     tok TokEqual-    bracket (tok TokQuote) (tok TokQuote) freetext+    bracket (tok TokQuote) (commit $ tok TokQuote) freetext  misc :: XParser Misc misc =-    oneOf' [ ("<!--comment-->",  comment >>= return . Comment)-           , ("<?PI?>",          processinginstruction >>= return . PI)+    oneOf' [ ("<!--comment-->",  Comment <$> comment)+           , ("<?PI?>",          PI <$> processinginstruction)            ]  -- | Return a DOCTYPE decl, indicating a DTD.@@ -374,21 +388,21 @@     tok TokSpecialOpen     tok (TokSpecial DOCTYPEx)     commit $ do-      n   <- name+      n   <- qname       eid <- maybe externalid-      es  <- maybe (bracket (tok TokSqOpen) (tok TokSqClose)+      es  <- maybe (bracket (tok TokSqOpen) (commit $ tok TokSqClose)                             (many (peRef markupdecl)))       blank (tok TokAnyClose)  `onFail` failP "missing > in DOCTYPE decl"-      return (DTD n eid (case es of { Nothing -> []; Just e -> e }))+      return (DTD n eid (fromMaybe [] es))  -- | Return a DTD markup decl, e.g. ELEMENT, ATTLIST, etc markupdecl :: XParser MarkupDecl markupdecl =-  oneOf' [ ("ELEMENT",  elementdecl  >>= return . Element)-         , ("ATTLIST",  attlistdecl  >>= return . AttList)-         , ("ENTITY",   entitydecl   >>= return . Entity)-         , ("NOTATION", notationdecl >>= return . Notation)-         , ("misc",     misc         >>= return . MarkupMisc)+  oneOf' [ ("ELEMENT",  Element <$> elementdecl)+         , ("ATTLIST",  AttList <$> attlistdecl)+         , ("ENTITY",   Entity <$> entitydecl)+         , ("NOTATION", Notation <$> notationdecl)+         , ("misc",     MarkupMisc <$> misc)          ]     `adjustErrP`           ("when looking for a markup decl,\n"++)@@ -402,15 +416,15 @@  extsubsetdecl :: XParser ExtSubsetDecl extsubsetdecl =-    ( markupdecl >>= return . ExtMarkupDecl) `onFail`-    ( conditionalsect >>= return . ExtConditionalSect)+    (ExtMarkupDecl <$> markupdecl) `onFail`+    (ExtConditionalSect <$> conditionalsect)  sddecl :: XParser SDDecl sddecl = do-    (word "standalone" `onFail` word "STANDALONE")+    word "standalone" `onFail` word "STANDALONE"     commit $ do       tok TokEqual `onFail` failP "missing = in 'standalone' decl"-      bracket (tok TokQuote) (tok TokQuote)+      bracket (tok TokQuote) (commit $ tok TokQuote)               ( (word "yes" >> return True) `onFail`                 (word "no" >> return False) `onFail`                 failP "'standalone' decl requires 'yes' or 'no' value" )@@ -427,7 +441,7 @@              ,  do tok TokAnyClose                    cs <- many content                    p  <- posn-                   m  <- bracket (tok TokEndOpen) (tok TokAnyClose) name+                   m  <- bracket (tok TokEndOpen) (commit $ tok TokAnyClose) qname                    checkmatch p n m                    return (Elem n as cs))            ] `adjustErr` (("in element tag "++n++",\n")++)@@ -446,19 +460,20 @@              commit $ manyFinally content                                   (do p <- posn                                       m <- bracket (tok TokEndOpen)-                                                   (tok TokAnyClose) name+                                                   (commit $ tok TokAnyClose) qname                                       checkmatch p n m)-          ) `adjustErrBad` (("in element tag "++n++",\n")++)+          ) `adjustErrBad` (("in element tag "++printableName n++",\n")++) -checkmatch :: Posn -> Name -> Name -> XParser ()+checkmatch :: Posn -> QName -> QName -> XParser () checkmatch p n m =   if n == m then return ()-  else failBadP ("tag <"++n++"> terminated by </"++m++">")+  else failBad ("tag <"++printableName n++"> terminated by </"++printableName m+                ++">\n  at "++show p)  -- | Parse only the parts between angle brackets in an element tag. elemtag :: XParser ElemTag elemtag = do-    n  <- name `adjustErrBad` ("malformed element tag\n"++)+    n  <- qname `adjustErrBad` ("malformed element tag\n"++)     as <- many attribute     return (ElemTag n as) @@ -472,17 +487,17 @@  -- | For use with stream parsers - accepts a closing tag, provided it --   matches the given element name.-elemCloseTag :: Name -> XParser ()+elemCloseTag :: QName -> XParser () elemCloseTag n = do     tok TokEndOpen     p <- posn-    m <- name+    m <- qname     tok TokAnyClose     checkmatch p n m  attribute :: XParser Attribute attribute = do-    n <- name `adjustErr` ("malformed attribute name\n"++)+    n <- qname `adjustErr` ("malformed attribute name\n"++)     tok TokEqual `onFail` failBadP "missing = in attribute"     v <- attvalue `onFail` failBadP "missing attvalue"     return (n,v)@@ -495,11 +510,11 @@      ; return (c' p)      }   where-     content' = oneOf' [ ("element",   element   >>= return . CElem)-                       , ("chardata",  chardata  >>= return . CString False)-                       , ("reference", reference >>= return . CRef)-                       , ("CDATA",     cdsect    >>= return . CString True)-                       , ("misc",      misc      >>= return . CMisc)+     content' = oneOf' [ ("element",   CElem <$> element)+                       , ("chardata",  CString False <$> chardata)+                       , ("reference", CRef <$> reference)+                       , ("CDATA",     CString True <$> cdsect)+                       , ("misc",      CMisc <$> misc)                        ]                   `adjustErrP` ("when looking for a content item,\n"++) -- (\    (element, text, reference, CDATA section, <!--comment-->, or <?PI?>")@@ -508,71 +523,72 @@ elementdecl = do     tok TokSpecialOpen     tok (TokSpecial ELEMENTx)-    n <- peRef name `adjustErrBad` ("expecting identifier in ELEMENT decl\n"++)+    n <- peRef qname `adjustErrBad` ("expecting identifier in ELEMENT decl\n"++)     c <- peRef contentspec-             `adjustErrBad` (("in content spec of ELEMENT decl: "++n++"\n")++)+             `adjustErrBad` (("in content spec of ELEMENT decl: "+                             ++printableName n++"\n")++)     blank (tok TokAnyClose) `onFail` failBadP        ("expected > terminating ELEMENT decl"-       ++"\n    element name was "++show n-       ++"\n    contentspec was "++(\ (ContentSpec p)-> show p) c)+       ++"\n    element name was "++show (printableName n)+       ++"\n    contentspec was "++(\ (ContentSpec p)-> debugShowCP p) c)     return (ElementDecl n c)  contentspec :: XParser ContentSpec contentspec =     oneOf' [ ("EMPTY",  peRef (word "EMPTY") >> return EMPTY)            , ("ANY",    peRef (word "ANY") >> return ANY)-           , ("mixed",  peRef mixed >>= return . Mixed)-           , ("simple", peRef cp >>= return . ContentSpec)+           , ("mixed",  Mixed <$> peRef mixed)+           , ("simple", ContentSpec <$> peRef cp)            ]  --   `adjustErr` ("when looking for content spec,\n"++)  --   `adjustErr` (++"\nLooking for content spec (EMPTY, ANY, mixed, etc)")  choice :: XParser [CP] choice = do-    myBracket (tok TokBraOpen `debug` "Trying choice")-              (blank (tok TokBraClose `debug` "Succeeded with choice"))-              (peRef cp `sepBy1` blank (tok TokPipe))+    bracket (tok TokBraOpen `debug` "Trying choice")+            (blank (tok TokBraClose `debug` "Succeeded with choice"))+            (peRef cp `sepBy1` blank (tok TokPipe))  sequence :: XParser [CP] sequence = do- myBracket (tok TokBraOpen `debug` "Trying sequence")-           (blank (tok TokBraClose `debug` "Succeeded with sequence"))-           (peRef cp `sepBy1` blank (tok TokComma))+    bracket (tok TokBraOpen `debug` "Trying sequence")+            (blank (tok TokBraClose `debug` "Succeeded with sequence"))+            (peRef cp `sepBy1` blank (tok TokComma))  cp :: XParser CP-cp = oneOf [ ( do n <- name-                  m <- modifier-                  let c = TagName n m-                  return c `debug` ("ContentSpec: name "++show c))-           , ( do ss <- sequence-                  m <- modifier-                  let c = Seq ss m-                  return c `debug` ("ContentSpec: sequence "++show c))-           , ( do cs <- choice-                  m <- modifier-                  let c = Choice cs m-                  return c `debug` ("ContentSpec: choice "++show c))+cp = oneOf [ do n <- qname+                m <- modifier+                let c = TagName n m+                return c `debug` ("ContentSpec: name "++debugShowCP c)+           , do ss <- sequence+                m <- modifier+                let c = Seq ss m+                return c `debug` ("ContentSpec: sequence "++debugShowCP c)+           , do cs <- choice+                m <- modifier+                let c = Choice cs m+                return c `debug` ("ContentSpec: choice "++debugShowCP c)            ] `adjustErr` (++"\nwhen looking for a content particle")  modifier :: XParser Modifier-modifier = oneOf [ ( tok TokStar >> return Star )-                 , ( tok TokQuery >> return Query )-                 , ( tok TokPlus >> return Plus )-                 , ( return None )+modifier = oneOf [ tok TokStar >> return Star+                 , tok TokQuery >> return Query+                 , tok TokPlus >> return Plus+                 , return None                  ]  -- just for debugging-instance Show CP where-    show (TagName n m) = n++show m-    show (Choice cps m) = '(': concat (intersperse "|" (map show cps))-                          ++")"++show m-    show (Seq cps m) = '(': concat (intersperse "," (map show cps))-                          ++")"++show m-instance Show Modifier where-    show None = ""-    show Query = "?"-    show Star = "*"-    show Plus = "+"+debugShowCP :: CP -> String+debugShowCP cp = case cp of+    TagName n m  -> printableName n++debugShowModifier m+    Choice cps m -> '(': intercalate "|" (map debugShowCP cps)++")"++debugShowModifier m+    Seq cps m    -> '(': intercalate "," (map debugShowCP cps)++")"++debugShowModifier m+debugShowModifier :: Modifier -> String+debugShowModifier modifier = case modifier of+    None  -> ""+    Query -> "?"+    Star  -> "*"+    Plus  -> "+" ----  mixed :: XParser Mixed@@ -581,12 +597,12 @@     peRef (do tok TokHash               word "PCDATA")     commit $-      oneOf [ ( do cs <- many (peRef (do tok TokPipe-                                         peRef name))-                   blank (tok TokBraClose >> tok TokStar)-                   return (PCDATAplus cs))-            , ( blank (tok TokBraClose >> tok TokStar) >> return PCDATA)-            , ( blank (tok TokBraClose) >> return PCDATA)+      oneOf [ do cs <- many (peRef (do tok TokPipe+                                       peRef qname))+                 blank (tok TokBraClose >> tok TokStar)+                 return (PCDATAplus cs)+            , blank (tok TokBraClose >> tok TokStar) >> return PCDATA+            , blank (tok TokBraClose) >> return PCDATA             ]         `adjustErrP` (++"\nLooking for mixed content spec (#PCDATA | ...)*\n") @@ -594,61 +610,61 @@ attlistdecl = do     tok TokSpecialOpen     tok (TokSpecial ATTLISTx)-    n <- peRef name `adjustErrBad` ("expecting identifier in ATTLIST\n"++)+    n <- peRef qname `adjustErrBad` ("expecting identifier in ATTLIST\n"++)     ds <- peRef (many1 (peRef attdef))     blank (tok TokAnyClose) `onFail` failBadP "missing > terminating ATTLIST"     return (AttListDecl n ds)  attdef :: XParser AttDef attdef =-  do n <- peRef name `adjustErr` ("expecting attribute name\n"++)-     t <- peRef atttype `adjustErr` (("within attlist defn: "++n++",\n")++)-     d <- peRef defaultdecl `adjustErr` (("in attlist defn: "++n++",\n")++)+  do n <- peRef qname `adjustErr` ("expecting attribute name\n"++)+     t <- peRef atttype `adjustErr` (("within attlist defn: "+                                      ++printableName n++",\n")++)+     d <- peRef defaultdecl `adjustErr` (("in attlist defn: "+                                          ++printableName n++",\n")++)      return (AttDef n t d)  atttype :: XParser AttType atttype =     oneOf' [ ("CDATA",      word "CDATA" >> return StringType)-           , ("tokenized",  tokenizedtype >>= return . TokenizedType)-           , ("enumerated", enumeratedtype >>= return . EnumeratedType)+           , ("tokenized",  TokenizedType <$> tokenizedtype)+           , ("enumerated", EnumeratedType <$> enumeratedtype)            ]       `adjustErr` ("looking for ATTTYPE,\n"++)  --   `adjustErr` (++"\nLooking for ATTTYPE (CDATA, tokenized, or enumerated")  tokenizedtype :: XParser TokenizedType tokenizedtype =-    oneOf [ ( word "ID" >> return ID)-          , ( word "IDREF" >> return IDREF)-          , ( word "IDREFS" >> return IDREFS)-          , ( word "ENTITY" >> return ENTITY)-          , ( word "ENTITIES" >> return ENTITIES)-          , ( word "NMTOKEN" >> return NMTOKEN)-          , ( word "NMTOKENS" >> return NMTOKENS)+    oneOf [ word "ID" >> return ID+          , word "IDREF" >> return IDREF+          , word "IDREFS" >> return IDREFS+          , word "ENTITY" >> return ENTITY+          , word "ENTITIES" >> return ENTITIES+          , word "NMTOKEN" >> return NMTOKEN+          , word "NMTOKENS" >> return NMTOKENS           ] `onFail`     do { t <- next        ; failP ("Expected one of"                ++" (ID, IDREF, IDREFS, ENTITY, ENTITIES, NMTOKEN, NMTOKENS)"                ++"\nbut got "++show t)        }--- `adjustErr` (++"\nLooking for a tokenized type:\n\ --- \    (ID, IDREF, IDREFS, ENTITY, ENTITIES, NMTOKEN, NMTOKENS)")  enumeratedtype :: XParser EnumeratedType enumeratedtype =-    oneOf' [ ("NOTATION",   notationtype >>= return . NotationType)-           , ("enumerated", enumeration >>= return . Enumeration)+    oneOf' [ ("NOTATION",   NotationType <$> notationtype)+           , ("enumerated", Enumeration <$> enumeration)            ]       `adjustErr` ("looking for an enumerated or NOTATION type,\n"++)  notationtype :: XParser NotationType notationtype = do     word "NOTATION"-    bracket (tok TokBraOpen) (blank (tok TokBraClose))+    bracket (tok TokBraOpen) (commit $ blank $ tok TokBraClose)             (peRef name `sepBy1` peRef (tok TokPipe))  enumeration :: XParser Enumeration enumeration =-    bracket (tok TokBraOpen) (blank (tok TokBraClose))+    bracket (tok TokBraOpen) (commit $ blank $ tok TokBraClose)             (peRef nmtoken `sepBy1` blank (peRef (tok TokPipe)))  defaultdecl :: XParser DefaultDecl@@ -661,8 +677,6 @@                               return (DefaultTo a f) )            ]         `adjustErr` ("looking for an attribute default decl,\n"++)---      `adjustErr` (++"\nLooking for an attribute default decl:\n\ --- \    (REQUIRED, IMPLIED, FIXED)")  conditionalsect :: XParser ConditionalSect conditionalsect = oneOf'@@ -698,26 +712,26 @@          return Ignore  `debug` ("ignoring: "++show t))  --- obsolete?-ignoresectcontents :: XParser IgnoreSectContents-ignoresectcontents = do-    i <- ignore-    is <- many (do tok TokSectionOpen-                   ic <- ignoresectcontents-                   tok TokSectionClose-                   ig <- ignore-                   return (ic,ig))-    return (IgnoreSectContents i is)--ignore :: XParser Ignore-ignore = do-  is <- many1 (nottok [TokSectionOpen,TokSectionClose])-  return Ignore  `debug` ("ignored all of: "++show is)+--ignoresectcontents :: XParser IgnoreSectContents+--ignoresectcontents = do+--    i <- ignore+--    is <- many (do tok TokSectionOpen+--                   ic <- ignoresectcontents+--                   tok TokSectionClose+--                   ig <- ignore+--                   return (ic,ig))+--    return (IgnoreSectContents i is)+--+--ignore :: XParser Ignore+--ignore = do+--  is <- many1 (nottok [TokSectionOpen,TokSectionClose])+--  return Ignore  `debug` ("ignored all of: "++show is) ----  -- | Return either a general entity reference, or a character reference. reference :: XParser Reference reference = do-    bracket (tok TokAmp) (tok TokSemi) (freetext >>= val)+    bracket (tok TokAmp) (commit $ tok TokSemi) (freetext >>= val)   where     val ('#':'x':i) | all isHexDigit i                     = return . RefChar . fst . head . readHex $ i@@ -727,16 +741,16 @@  {- -- following is incorrect reference =-    ( charref >>= return . RefChar) `onFail`-    ( entityref >>= return . RefEntity)+    ( RefChar <$> charref) `onFail`+    ( RefEntity <$> entityref)  entityref :: XParser EntityRef entityref = do-    bracket (tok TokAmp) (tok TokSemi) name+    bracket (tok TokAmp) (commit $ tok TokSemi) name  charref :: XParser CharRef charref = do-    bracket (tok TokAmp) (tok TokSemi) (freetext >>= readCharVal)+    bracket (tok TokAmp) (commit $ tok TokSemi) (freetext >>= readCharVal)   where     readCharVal ('#':'x':i) = return . fst . head . readHex $ i     readCharVal ('#':i)     = return . fst . head . readDec $ i@@ -745,12 +759,12 @@  pereference :: XParser PEReference pereference = do-    myBracket (tok TokPercent) (tok TokSemi) nmtoken+    bracket (tok TokPercent) (tok TokSemi) nmtoken  entitydecl :: XParser EntityDecl entitydecl =-    ( gedecl >>= return . EntityGEDecl) `onFail`-    ( pedecl >>= return . EntityPEDecl)+    ( EntityGEDecl <$> gedecl) `onFail`+    ( EntityPEDecl <$> pedecl)  gedecl :: XParser GEDecl gedecl = do@@ -775,7 +789,7 @@  entitydef :: XParser EntityDef entitydef =-    oneOf' [ ("entityvalue", entityvalue >>= return . DefEntityValue)+    oneOf' [ ("entityvalue", DefEntityValue <$> entityvalue)            , ("external",    do eid <- externalid                                 ndd <- maybe ndatadecl                                 return (DefExternalID eid ndd))@@ -783,54 +797,51 @@  pedef :: XParser PEDef pedef =-    oneOf' [ ("entityvalue", entityvalue >>= return . PEDefEntityValue)-           , ("externalid",  externalid  >>= return . PEDefExternalID)+    oneOf' [ ("entityvalue", PEDefEntityValue <$> entityvalue)+           , ("externalid",  PEDefExternalID <$> externalid )            ]  externalid :: XParser ExternalID externalid =     oneOf' [ ("SYSTEM", do word "SYSTEM"-                           s <- systemliteral-                           return (SYSTEM s) )+                           SYSTEM <$> systemliteral)            , ("PUBLIC", do word "PUBLIC"                            p <- pubidliteral-                           s <- systemliteral-                           return (PUBLIC p s) )+                           PUBLIC p <$> systemliteral)            ]       `adjustErr` ("looking for an external id,\n"++)  ndatadecl :: XParser NDataDecl ndatadecl = do     word "NDATA"-    n <- name-    return (NDATA n)+    NDATA <$> name  textdecl :: XParser TextDecl textdecl = do     tok TokPIOpen-    (word "xml" `onFail` word "XML")+    word "xml" `onFail` word "XML"     v <- maybe versioninfo     e <- encodingdecl     tok TokPIClose `onFail` failP "expected ?> terminating text decl"     return (TextDecl v e) -extparsedent :: XParser (ExtParsedEnt Posn)-extparsedent = do-    t <- maybe textdecl-    c <- content-    return (ExtParsedEnt t c)--extpe :: XParser ExtPE-extpe = do-    t <- maybe textdecl-    e <- many (peRef extsubsetdecl)-    return (ExtPE t e)+--extparsedent :: XParser (ExtParsedEnt Posn)+--extparsedent = do+--    t <- maybe textdecl+--    c <- content+--    return (ExtParsedEnt t c)+--+--extpe :: XParser ExtPE+--extpe = do+--    t <- maybe textdecl+--    e <- many (peRef extsubsetdecl)+--    return (ExtPE t e)  encodingdecl :: XParser EncodingDecl encodingdecl = do-    (word "encoding" `onFail` word "ENCODING")+    word "encoding" `onFail` word "ENCODING"     tok TokEqual `onFail` failBadP "expected = in 'encoding' decl"-    f <- bracket (tok TokQuote) (tok TokQuote) freetext+    f <- bracket (tok TokQuote) (commit $ tok TokQuote) freetext     return (EncodingDecl f)  notationdecl :: XParser NotationDecl@@ -845,12 +856,11 @@ publicid :: XParser PublicID publicid = do     word "PUBLIC"-    p <- pubidliteral-    return (PUBLICID p)+    PUBLICID <$> pubidliteral  entityvalue :: XParser EntityValue entityvalue = do- -- evs <- bracket (tok TokQuote) (tok TokQuote) (many (peRef ev))+ -- evs <- bracket (tok TokQuote) (commit $ tok TokQuote) (many (peRef ev))     tok TokQuote     pn <- posn     evs <- many ev@@ -859,38 +869,37 @@     st <- stGet  -- Prelude.either failBad (return . EntityValue) . fst3 $     return . EntityValue . fst3 $-                (runParser (many ev) st+                runParser (many ev) st                          (reLexEntityValue (\s-> stringify (lookupPE s st))                                            pn-                                           (flattenEV (EntityValue evs))))+                                           (flattenEV (EntityValue evs)))   where     stringify (Just (PEDefEntityValue ev)) = Just (flattenEV ev)     stringify _ = Nothing  ev :: XParser EV ev =-    oneOf' [ ("string",    (string`onFail`freetext) >>= return . EVString)-           , ("reference", reference >>= return . EVRef)+    oneOf' [ ("string",    EVString <$> (string`onFail`freetext))+           , ("reference", EVRef <$> reference)            ]       `adjustErr` ("looking for entity value,\n"++)  attvalue :: XParser AttValue attvalue = do-    avs <- bracket (tok TokQuote) (tok TokQuote)+    avs <- bracket (tok TokQuote) (commit $ tok TokQuote)                    (many (either freetext reference))     return (AttValue avs)  systemliteral :: XParser SystemLiteral systemliteral = do-    s <- bracket (tok TokQuote) (tok TokQuote) freetext+    s <- bracket (tok TokQuote) (commit $ tok TokQuote) freetext     return (SystemLiteral s)            -- note: refs &...; not permitted  pubidliteral :: XParser PubidLiteral pubidliteral = do-    s <- bracket (tok TokQuote) (tok TokQuote) freetext+    s <- bracket (tok TokQuote) (commit $ tok TokQuote) freetext     return (PubidLiteral s)             -- note: freetext is too liberal here  -- | Return parsed freetext (i.e. until the next markup) chardata :: XParser CharData chardata = freetext-
src/Text/XML/HaXml/Posn.hs view
@@ -14,7 +14,7 @@   , posnFilename, posnLine, posnColumn   ) where -import Char+import Data.Char  -- | Source positions contain a filename, line, column, and an --   inclusion point, which is itself another source position,@@ -68,9 +68,10 @@ -- | Add the given whitespace char to the given position. --   Precondition: @white c | isSpace c = True@ white :: Char -> Posn -> Posn-white ' '  = addcol 1-white '\n' = newline-white '\r' = id-white '\t' = tab+white ' '    = addcol 1+white '\n'   = newline+white '\r'   = id+white '\t'   = tab white '\xa0' = addcol 1-+white x | isSpace x = addcol 1 -- other Unicode whitespace+white _      = error "precondition not satisfied: Posn.white c | isSpace c"
src/Text/XML/HaXml/Pretty.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE CPP #-} -- | This is a pretty-printer for turning the internal representation --   of generic structured XML documents into the Doc type (which can --   later be rendered using Text.PrettyPrint.HughesPJ.render).@@ -21,12 +22,18 @@   ,   cp   ) where +#if MIN_VERSION_base(4,11,0)+import Prelude hiding (maybe,either,(<>))+#else import Prelude hiding (maybe,either)-import Maybe hiding (maybe)-import List (intersperse)+#endif++import Data.Maybe hiding (maybe)+import Data.List (intersperse) --import Char (isSpace) import Text.PrettyPrint.HughesPJ import Text.XML.HaXml.Types+import Text.XML.HaXml.Namespaces  either :: (t -> t1) -> (t2 -> t1) -> Either t t2 -> t1 either f _ (Left x)  = f x@@ -48,8 +55,8 @@  doctypedecl :: DocTypeDecl -> Doc markupdecl  :: MarkupDecl -> Doc-extsubset   :: ExtSubset -> Doc-extsubsetdecl :: ExtSubsetDecl -> Doc+--extsubset   :: ExtSubset -> Doc+--extsubsetdecl :: ExtSubsetDecl -> Doc cp          :: CP -> Doc  element   :: Element i -> Doc@@ -75,83 +82,69 @@                                   hd <> text ">"                              else hd <+> text " [" $$                                   vcat (map markupdecl ds) $$ text "]>"-                           where hd = text "<!DOCTYPE" <+> text n <+>+                           where hd = text "<!DOCTYPE" <+> qname n <+>                                       maybe externalid eid markupdecl (Element e)     = elementdecl e markupdecl (AttList a)     = attlistdecl a markupdecl (Entity e)      = entitydecl e markupdecl (Notation n)    = notationdecl n markupdecl (MarkupMisc m)  = misc m--- markupdecl (MarkupPE p m)  = peref p-extsubset (ExtSubset t ds) = maybe textdecl t $$-                             vcat (map extsubsetdecl ds)-extmarkupdecl (ExtMarkupDecl m)      = markupdecl m-extsubsetdecl (ExtConditionalSect c) = conditionalsect c--- extsubsetdecl (ExtPEReference p e)   = peref p+--markupdecl (MarkupPE p m)  = peref p -element (Elem n as []) = text "<" <> text n <+>+--extsubset (ExtSubset t ds) = maybe textdecl t $$+--                             vcat (map extsubsetdecl ds)+--extmarkupdecl (ExtMarkupDecl m)      = markupdecl m+--extsubsetdecl (ExtConditionalSect c) = conditionalsect c+-- -- extsubsetdecl (ExtPEReference p e)   = peref p++element (Elem n as []) = text "<" <> qname n <+>                          fsep (map attribute as) <> text "/>" element e@(Elem n as cs)---  | any isText cs    = text "<" <> text n <+> fsep (map attribute as) <>---                       text ">" <> hcat (map content cs) <>---                       text "</" <> text n <> text ">"-    | isText (head cs) = text "<" <> text n <+> fsep (map attribute as) <>+    | all isText cs    = text "<" <> qname n <+> fsep (map attribute as) <>                          text ">" <> hcat (map content cs) <>-                         text "</" <> text n <> text ">"-    | otherwise        = let (d,c) = carryelem e empty-                         in d <> c+                         text "</" <> qname n <> text ">"+    | otherwise        = vcat [ text "<" <> qname n <> attributes as <> text ">"+                              , nest 2 $ vcat (map content cs)+                              , text "</" <> qname n <> text ">"+                              ] +attributes [] = empty+attributes as@(_:_) = text " " <> fsep (map attribute as)+ isText :: Content t -> Bool isText (CString _ _ _) = True isText (CRef _ _)      = True isText _               = False -carryelem :: Element t -> Doc -> (Doc, Doc)-carrycontent ::  Content t -> Doc -> (Doc, Doc)-carryelem (Elem n as []) c-                       = ( c <>-                           text "<" <> text n <+> fsep (map attribute as)-                         , text "/>")-carryelem (Elem n as cs) c---  | any isText cs    =  ( c <> element e, empty)-    | otherwise        =  let (cs0,d0) = carryscan carrycontent cs (text ">")-                          in-                          ( c <>-                            text "<" <> text n <+> fsep (map attribute as) $$-                            nest 2 (vcat cs0) <> --- $$-                            d0 <> text "</" <> text n-                          , text ">")-carrycontent (CElem e _) c   = carryelem e c-carrycontent (CString False s _) c = (c <> chardata s, empty)-carrycontent (CString True  s _) c = (c <> cdsect s, empty)-carrycontent (CRef r _) c    = (c <> reference r, empty)-carrycontent (CMisc m _) c   = (c <> misc m, empty)+carryelem    ::  Element t  -> Doc -> (Doc, Doc)+carrycontent ::  Content t  -> Doc -> (Doc, Doc)+spancontent  :: [Content a] -> Doc -> ([Doc],Doc) -carryscan :: (a->c->(b,c)) -> [a] -> c -> ([b],c)-carryscan _ []     c = ([],c)-carryscan f (a:as) c = let (b, c0) = f a c-                           (bs,c1) = carryscan f as c0-                       in (b:bs, c1)+carryelem (Elem n as []) c = ( c <>+                               text "<" <> qname n <+> fsep (map attribute as)+                             , text "/>")+carryelem (Elem n as cs) c =  let (cs0,d0) = spancontent cs (text ">") in+                              ( c <>+                                text "<"<>qname n <+> fsep (map attribute as) $$+                                nest 2 (vcat cs0) <>+                                d0 <> text "</" <> qname n+                              , text ">") ---carryelem e@(Elem n as cs) c---  | isText (head cs) =---        ( start <>---          text ">" <> hcat (map content cs) <> text "</" <> text n---        , text ">")---  | otherwise =---        let (d,c0) = foldl carrycontent (start, text ">") cs in---        ( d <> c0 <> text "</" <> text n---        , text ">")---  where start = c <> text "<" <> text n <+> fsep (map attribute as)------carrycontent (d,c) (CElem e)   = let (d',c') = carryelem e c in---                                 (d $$ nest 2 d',       c')---carrycontent (d,c) (CString _ s) = (d <> c <> chardata s, empty)---carrycontent (d,c) (CRef r)    = (d <> c <> reference r,empty)---carrycontent (d,c) (CMisc m)   = (d $$ c <> misc m,     empty)+carrycontent (CElem e _) c         = carryelem e c+carrycontent (CString False s _) c = (c <> chardata s, empty)+carrycontent (CString True  s _) c = (c <> cdsect s, empty)+carrycontent (CRef r _) c          = (c <> reference r, empty)+carrycontent (CMisc m _) c         = (c <> misc m, empty) +spancontent []     c = ([],c)+spancontent (a:as) c | isText a  = let (ts,rest) = span isText (a:as)+                                       formatted = c <> hcat (map content ts)+                                   in  spancontent rest formatted+                     | otherwise = let (b, c0) = carrycontent a c+                                       (bs,c1) = spancontent as c0+                                   in  (b:bs, c1) -attribute (n,v)             = text n <> text "=" <> attvalue v+attribute (n,v)             = qname n <> text "=" <> attvalue v content (CElem e _)         = element e content (CString False s _) = chardata s content (CString True s _)  = cdsect s@@ -159,7 +152,7 @@ content (CMisc m _)         = misc m  elementdecl :: ElementDecl -> Doc-elementdecl (ElementDecl n cs) = text "<!ELEMENT" <+> text n <+>+elementdecl (ElementDecl n cs) = text "<!ELEMENT" <+> qname n <+>                                  contentspec cs <> text ">" contentspec :: ContentSpec -> Doc contentspec EMPTY              = text "EMPTY"@@ -167,7 +160,7 @@ contentspec (Mixed m)          = mixed m contentspec (ContentSpec c)    = cp c --contentspec (ContentPE p cs)   = peref p-cp (TagName n m)       = parens (text n) <> modifier m+cp (TagName n m)       = parens (qname n) <> modifier m cp (Choice cs m)       = parens (hcat (intersperse (text "|") (map cp cs))) <>                            modifier m cp (Seq cs m)          = parens (hcat (intersperse (text ",") (map cp cs))) <>@@ -181,14 +174,14 @@ mixed :: Mixed -> Doc mixed  PCDATA          = text "(#PCDATA)" mixed (PCDATAplus ns)  = text "(#PCDATA |" <+>-                         hcat (intersperse (text "|") (map text ns)) <>+                         hcat (intersperse (text "|") (map qname ns)) <>                          text ")*"  attlistdecl :: AttListDecl -> Doc-attlistdecl (AttListDecl n ds) = text "<!ATTLIST" <+> text n <+>+attlistdecl (AttListDecl n ds) = text "<!ATTLIST" <+> qname n <+>                                  fsep (map attdef ds) <> text ">" attdef :: AttDef -> Doc-attdef (AttDef n t d)          = text n <+> atttype t <+> defaultdecl d+attdef (AttDef n t d)          = qname n <+> atttype t <+> defaultdecl d atttype :: AttType -> Doc atttype  StringType            = text "CDATA" atttype (TokenizedType t)      = tokenizedtype t@@ -213,16 +206,16 @@ defaultdecl  REQUIRED          = text "#REQUIRED" defaultdecl  IMPLIED           = text "#IMPLIED" defaultdecl (DefaultTo a f)    = maybe (const (text "#FIXED")) f <+> attvalue a-conditionalsect (IncludeSect i)= text "<![INCLUDE [" <+>-                                 vcat (map extsubsetdecl i) <+> text "]]>"-conditionalsect (IgnoreSect i) = text "<![IGNORE [" <+>-                                 fsep (map ignoresectcontents i) <+> text "]]>"-ignore (Ignore)                = empty-ignoresectcontents (IgnoreSectContents i is)-                               = ignore i <+> vcat (map internal is)-                          where internal (ics,i) = text "<![[" <+>-                                                   ignoresectcontents ics <+>-                                                   text "]]>" <+> ignore i+--conditionalsect (IncludeSect i)= text "<![INCLUDE [" <+>+--                                 vcat (map extsubsetdecl i) <+> text "]]>"+--conditionalsect (IgnoreSect i) = text "<![IGNORE [" <+>+--                                 fsep (map ignoresectcontents i) <+> text "]]>"+--ignore (Ignore)                = empty+--ignoresectcontents (IgnoreSectContents i is)+--                               = ignore i <+> vcat (map internal is)+--                          where internal (ics,i) = text "<![[" <+>+--                                                   ignoresectcontents ics <+>+--                                                   text "]]>" <+> ignore i reference :: Reference -> Doc reference (RefEntity er)       = entityref er reference (RefChar cr)         = charref cr@@ -251,11 +244,11 @@                                  systemliteral sl ndatadecl :: NDataDecl -> Doc ndatadecl (NDATA n)            = text "NDATA" <+> text n-textdecl (TextDecl vi ed)      = text "<?xml" <+> maybe text vi <+>-                                 encodingdecl ed <+> text "?>"-extparsedent (ExtParsedEnt t c)= maybe textdecl t <+> content c-extpe (ExtPE t esd)            = maybe textdecl t <+>-                                 vcat (map extsubsetdecl esd)+--textdecl (TextDecl vi ed)      = text "<?xml" <+> maybe text vi <+>+--                                 encodingdecl ed <+> text "?>"+--extparsedent (ExtParsedEnt t c)= maybe textdecl t <+> content c+--extpe (ExtPE t esd)            = maybe textdecl t <+>+--                                 vcat (map extsubsetdecl esd) notationdecl :: NotationDecl -> Doc notationdecl (NOTATION n e)    = text "<!NOTATION" <+> text n <+>                                  either externalid publicid e <>@@ -290,6 +283,8 @@ chardata s                     = {-if all isSpace s then empty else-} text s cdsect :: String -> Doc cdsect c                       = text "<![CDATA[" <> chardata c <> text "]]>"++qname n                        = text (printableName n)  ---- containsDoubleQuote :: [EV] -> Bool
src/Text/XML/HaXml/SAX.hs view
@@ -5,9 +5,9 @@ --   streams for communication.  module Text.XML.HaXml.SAX-	( SaxElement(..)-	, saxParse-	) where+        ( SaxElement(..)+        , saxParse+        ) where  import Text.XML.HaXml.Types import Text.XML.HaXml.Parse@@ -15,34 +15,34 @@ import Text.ParserCombinators.Poly.State  data SaxElement-	= SaxDocTypeDecl DocTypeDecl-		-- ^ A doctype declaration occured(\<!DOCTYPE\>)-	| SaxProcessingInstruction ProcessingInstruction-		-- ^ A processing instruction occured (\<??\>)-	| SaxComment String		-- ^ A comment occured (\<!-- --\>)-	| SaxElementOpen Name [Attribute] -- ^ An element was opened (\<\>)-	| SaxElementClose Name		-- ^ An element was closed (\<\/\>)-	| SaxElementTag Name [Attribute]-		-- ^ An element without content occured (\<\/\>)-	| SaxCharData CharData		-- ^ Some string data occured-	| SaxReference Reference	-- ^ A reference occured+        = SaxDocTypeDecl DocTypeDecl+                -- ^ A doctype declaration occured(\<!DOCTYPE\>)+        | SaxProcessingInstruction ProcessingInstruction+                -- ^ A processing instruction occured (\<??\>)+        | SaxComment String             -- ^ A comment occured (\<!-- --\>)+        | SaxElementOpen Name [Attribute] -- ^ An element was opened (\<\>)+        | SaxElementClose Name          -- ^ An element was closed (\<\/\>)+        | SaxElementTag Name [Attribute]+                -- ^ An element without content occured (\<\/\>)+        | SaxCharData CharData          -- ^ Some string data occured+        | SaxReference Reference        -- ^ A reference occured  -- | @saxParse file content@ takes a filename and the string content of that --   file and generates a stream of @SaxElement@s. If an error occurs, the --   parsing stops and a string is returned using the @Maybe@ type. saxParse :: String -- ^ The filename-	 -> String -- ^ The content of the file-	 -> ([SaxElement],Maybe String)-		-- ^ A tuple of the parsed elements and @Nothing@, if no-		--   error occured, or @Just@ @String@ if an error occured.+         -> String -- ^ The content of the file+         -> ([SaxElement],Maybe String)+                -- ^ A tuple of the parsed elements and @Nothing@, if no+                --   error occured, or @Just@ @String@ if an error occured. saxParse file cntnt = parseStream sax emptySTs                                     (xmlLex file cntnt)  parseStream :: Parser s t a -> s -> [t] -> ([a], Maybe String) parseStream _ _ [] = ([],Nothing) parseStream p state toks = case runParser p state toks of-	(Left err, _, _) -> ([],Just err)-	(Right res, nstate, rest) -> (res:moreres, err)+        (Left err, _, _) -> ([],Just err)+        (Right res, nstate, rest) -> (res:moreres, err)             where (moreres,err) = parseStream p nstate rest  sax :: XParser SaxElement@@ -54,40 +54,40 @@             , saxreference             , saxchardata             ]-	`adjustErr` (++("\nLooking for a SAX event:\n"+        `adjustErr` (++("\nLooking for a SAX event:\n"                ++"  elem-open, elem-close, PI, comment, DTD, ref, or chardata"))  saxelementopen :: XParser SaxElement saxelementopen = do-	tok TokAnyOpen-	(ElemTag n as) <- elemtag-	(( do tok TokEndClose-	      return (SaxElementTag n as)) `onFail`-	 ( do tok TokAnyClose-	      return (SaxElementOpen n as))-	 `onFail` fail "missing > or /> in element tag")+        tok TokAnyOpen+        (ElemTag (N n) as) <- elemtag  -- no QN ever generated during parsing+        ( do tok TokEndClose+             return (SaxElementTag n as)) `onFail`+          ( do tok TokAnyClose+               return (SaxElementOpen n as))+          `onFail` fail "missing > or /> in element tag"  saxelementclose :: XParser SaxElement saxelementclose = do-	tok TokEndOpen-	n <- name-	tok TokAnyClose-	return (SaxElementClose n)+        tok TokEndOpen+        n <- name+        tok TokAnyClose+        return (SaxElementClose n)  saxcomment :: XParser SaxElement-saxcomment = comment >>= return . SaxComment+saxcomment = SaxComment <$> comment  saxchardata :: XParser SaxElement saxchardata =-  (cdsect >>= return . SaxCharData)+  (SaxCharData <$>cdsect)   `onFail`-  (chardata >>= return . SaxCharData)+  (SaxCharData <$>chardata)  saxreference :: XParser SaxElement-saxreference = reference >>= return . SaxReference+saxreference = SaxReference <$> reference  saxdoctypedecl :: XParser SaxElement-saxdoctypedecl = doctypedecl >>= return . SaxDocTypeDecl+saxdoctypedecl = SaxDocTypeDecl <$> doctypedecl  saxprocessinginstruction :: XParser SaxElement saxprocessinginstruction = fmap SaxProcessingInstruction processinginstruction
+ src/Text/XML/HaXml/Schema/Environment.hs view
@@ -0,0 +1,197 @@+{-# LANGUAGE PatternGuards #-}+module Text.XML.HaXml.Schema.Environment+  ( module Text.XML.HaXml.Schema.Environment+  ) where++import Text.XML.HaXml.Types (QName(..),Name(..),Namespace(..))+import Text.XML.HaXml.Schema.XSDTypeModel+import Text.XML.HaXml.Schema.NameConversion (wordsBy)+import Text.XML.HaXml.Schema.Parse (targetPrefix)++import qualified Data.Map as Map+import Data.Map (Map)+import Data.List (foldl')++-- Some things we probably want to do.+-- * Build Maps from :+--       typename        to definition+--       element name    to definition+--       attribute name  to definition+--       (element) group to definition+--       attribute group to definition+--       abstract complextype to its extension types+--       substitution group to its substitutable elements+--       abstract/substGroup to defining module+-- * XSD types become top-level types in Haskell.+-- * XSD element decls also become top-level types in Haskell.+-- * Element groups get their own Haskell types too.+-- * Attributes and attribute groups do not become types, they are+--   simply constituent parts of an element.+-- * Resolve element/attribute references by inlining their names.++-- If a complextype definition includes nested in-line decls of other+-- types, we need to be able to lift them out to the top-level, then+-- refer to them by name only at the nested position(?)++-- When dealing with sub/supertype relationships, we often need to know all+-- of the subtypes of a supertype before some of the subtypes are actually+-- available in scope.  The environment must therefore first be closed+-- over all modules: the resulting type mapping (env_type) should be _copied_+-- across to (env_allTypes) in a fresh initial environment, which latter is+-- then used to rebuild the local scope from scratch.+-- Likewise, the mappings from supertype->subtype (env_extendty) and for+-- substitution groups (env_substGrp) also need to be global.++data Environment =  Environment+    { env_type      :: Map QName (Either SimpleType ComplexType)+                                 -- ^ type definitions in scope+    , env_allTypes  :: Map QName (Either SimpleType ComplexType)+                                 -- ^ all type definitions, regardless of scope+    , env_element   :: Map QName ElementDecl+    , env_attribute :: Map QName AttributeDecl+    , env_group     :: Map QName Group+    , env_attrgroup :: Map QName AttrGroup+    , env_namespace :: Map String{-URI-} String{-Prefix-}+    , env_extendty  :: Map QName [(QName,FilePath)] -- ^ supertype -> subtypes+    , env_substGrp  :: Map QName [(QName,FilePath)] -- ^ substitution groups+    , env_typeloc   :: Map QName FilePath           -- ^ where type is defined+    }+    deriving (Show, Eq)++-- | An empty environment of XSD type mappings.+emptyEnv :: Environment+emptyEnv = Environment Map.empty Map.empty Map.empty Map.empty Map.empty+                       Map.empty Map.empty Map.empty Map.empty Map.empty++-- | Combine two environments (e.g. read from different interface files)+combineEnv :: Environment -> Environment -> Environment+combineEnv e1 e0 = Environment+    { env_type      = Map.union (env_type e1)      (env_type e0)+    , env_allTypes  = Map.union (env_allTypes e1)  (env_allTypes e0)+    , env_element   = Map.union (env_element e1)   (env_element e0)+    , env_attribute = Map.union (env_attribute e1) (env_attribute e0)+    , env_group     = Map.union (env_group e1)     (env_group e0)+    , env_attrgroup = Map.union (env_attrgroup e1) (env_attrgroup e0)+    , env_namespace = Map.union (env_namespace e1) (env_namespace e0)+    , env_extendty  = Map.unionWith (++) (env_extendty e1) (env_extendty e0)+    , env_substGrp  = Map.unionWith (++) (env_substGrp e1) (env_substGrp e0)+    , env_typeloc   = Map.union (env_typeloc e1)   (env_typeloc e0)+    }++-- | Build an environment of XSD type mappings from a schema module.+mkEnvironment :: FilePath -> Schema -> Environment -> Environment+mkEnvironment fp s init = foldl' item (addNS init (schema_namespaces s))+                                      (schema_items s)+  where+    -- think about qualification, w.r.t targetNamespace, elementFormDefault, etc+    item env (Include _ _)       = env+    item env (Import _ _ _)      = env+    item env (Redefine _ _)      = env  -- revisit this+    item env (Annotation _)      = env+    item env (Simple st)         = simple env st+    item env (Complex ct)        = complex env ct+    item env (SchemaElement e)   = elementDecl env e+    item env (SchemaAttribute a) = attributeDecl env a+    item env (AttributeGroup g)  = attrGroup env g+    item env (SchemaGroup g)     = group env g++    simple env s@(Restricted _ (Just n) _ _)+                                 = env{env_type=Map.insert (mkN n) (Left s)+                                                           (env_type env)}+    simple env s@(ListOf _ (Just n) _ _)+                                 = env{env_type=Map.insert (mkN n) (Left s)+                                                           (env_type env)}+    simple env s@(UnionOf _ (Just n) _ _ _)+                                 = env{env_type=Map.insert (mkN n) (Left s)+                                                           (env_type env)}+    simple env   _               = env++    -- Only toplevel names have global scope.+    -- Should we lift local names to toplevel with prefixed names?+    -- Or thread the environment explicitly through every tree-walker?+    -- Or resolve every reference to its referent in a single resolution pass?+    -- (Latter not good, because it potentially duplicates exprs?)+    complex env c+      | Nothing <- complex_name c = env+      | Just n  <- complex_name c =+              either (const id)+                     (\extn env->+                        env{env_extendty = Map.insertWith (++)+                                               (extension_base extn)+                                               [(mkN n, fp)]+                                               (env_extendty env)})+                     (isExtn (complex_content c))+              $ (if complex_abstract c then \env->+              -- because an abstract type might have no concrete instantiations!+                        env{env_extendty = Map.insertWith (++)+                                               (mkN n)+                                               []+                                               (env_extendty env)}+                 else id)+              $ env{env_type=Map.insert (mkN n) (Right c) (env_type env)+                   ,env_typeloc=Map.insert (mkN n) fp (env_typeloc env)}+          where isExtn x@SimpleContent{}  = ci_stuff x+                isExtn x@ComplexContent{} = ci_stuff x+                isExtn x@ThisType{}       = Left undefined+{-+      | Nothing <- complex_name c = env+      | Right extn <- isExtn $ complex_content c+      , Just n  <- complex_name c = env{env_extendty =+                                            Map.insertWith (++)+                                                (extension_base extn)+                                                [(mkN n, isFwd)]+                                                (env_extendty env)+                                       ,env_type=Map.insert (mkN n) (Right c)+                                                            (env_type env)}+      | Just n  <- complex_name c = env{env_type=Map.insert (mkN n) (Right c)+                                                            (env_type env)}+          where isExtn x@SimpleContent{}  = ci_stuff x+                isExtn x@ComplexContent{} = ci_stuff x+                isExtn x@ThisType{}       = Left undefined+                isFwd = case Map.lookup (extension_base extn) (env_typeloc env) of+                          Nothing  -> error $ "unknown supertype of "++show c+                          Just mod -> mod /= fp+-}+    elementDecl env e+      | Right r <- elem_nameOrRef e = env+--    | Just sg <- elem_substGroup e+--    , Left nt <- elem_nameOrRef e = env{env_substGrp=Map.insertWith (++) sg+--                                                [(mkN $ theName nt, isFwd sg)]+--                                                        (env_substGrp env)+--                                       ,env_element=Map.insert+--                                                        (mkN $ theName nt) e+--                                                        (env_element env)}+      | Left nt <- elem_nameOrRef e =+              maybe id (\sg env-> env{env_substGrp=Map.insertWith (++) sg+                                          [(mkN $ theName nt, fp)]+                                          (env_substGrp env)})+                    (elem_substGroup e)+              $ env{env_element=Map.insert (mkN $ theName nt) e+                                           (env_element env)+                   ,env_typeloc=Map.insert (mkN $ theName nt) fp+                                           (env_typeloc env)}+    attributeDecl env a+      | Right r <- attr_nameOrRef a = env+      | Left nt <- attr_nameOrRef a = env{env_attribute=+                                            Map.insert (mkN $ theName nt) a+                                                       (env_attribute env)}+    attrGroup env g+      | Right r <- attrgroup_nameOrRef g = env+      | Left n  <- attrgroup_nameOrRef g = env{env_attrgroup=Map.insert+                                                           (mkN n) g+                                                           (env_attrgroup env)}+    group env g+      | Right r <- group_nameOrRef g = env+      | Left n  <- group_nameOrRef g = env{env_group=Map.insert (mkN n) g+                                                           (env_group env)}+    mkN = N . last . wordsBy (==':')++    addNS env nss = env{env_namespace = foldr newNS (env_namespace env) nss}+              where newNS ns env = Map.insert (nsURI ns) (nsPrefix ns) env++-- | Find all direct module dependencies.+gatherImports :: Schema -> [(FilePath, Maybe String)]+gatherImports s =+    [ (f,Nothing)  | (Include f _)    <- schema_items s ] +++    [ (f,ns)       | (Import uri f _) <- schema_items s+                   , let ns = targetPrefix (Just uri) (schema_namespaces s) ]
+ src/Text/XML/HaXml/Schema/HaskellTypeModel.hs view
@@ -0,0 +1,194 @@+-- | A type model for Haskell datatypes that bears a reasonable correspondence+--   to the XSD type model.+module Text.XML.HaXml.Schema.HaskellTypeModel+  ( module Text.XML.HaXml.Schema.HaskellTypeModel+  ) where++import Text.XML.HaXml.Schema.NameConversion+import Text.XML.HaXml.Schema.XSDTypeModel (Schema(..),Occurs)+import Text.XML.HaXml.Schema.Parse (lookupBy)+import Text.XML.HaXml.Types (QName(..),Namespace(..))+import Data.List (partition)++-- | Comments can be attached to most things, but not all of them will exist.+type Comment   = Maybe String++-- | The whole Haskell module.+data Module    = Module+                 { module_name        :: XName   -- the name of this module+                 , module_xsd_ns      :: Maybe XName -- xmlns:prefix for XSD+                 , module_re_exports  :: [Decl]  -- modules imported + exported+                 , module_import_only :: [Decl]  -- module + alias+                 , module_decls       :: [Decl]  -- the body of the module+                 }++-- | There are essentially simple types, and complex types, each of which+--   can be either restricted or extended.  There are four kinds of complex+--   type: choices, sequences, named groups, or a simple element with content.+data Decl+                 -- becomes type T = S+               = NamedSimpleType     XName XName Comment++                 -- becomes newtype T = T S+                 --       + instance Restricts T S where restricts ...+               | RestrictSimpleType  XName XName [Restrict] Comment++                 -- becomes data T  = T  S Tf+                 --       + data Tf = Tf {fields}+                 --       + instance Extension T S Tf where ...+               | ExtendSimpleType    XName XName [Attribute] Comment++                 -- becomes data T = Ta S0 | Tb S1 | Tc S2 | ...+               | UnionSimpleTypes    XName [XName] Comment++                 -- becomes data T = T_C0 | T_C1 | T_C2 | ...+               | EnumSimpleType      XName [(XName,Comment)] Comment++                 -- becomes data T  = T { singleattr, fields }+                 --   or    data T  = T { manyattr, singlefield }+                 --   or    data T  = T { t_attrs :: Ta, fields }+                 --       + data Ta = Ta { attributes }+               | ElementsAttrs XName [Element] [Attribute] Comment++                 -- or if T is abstract, it becomes+                 --         data T = T_A  A+                 --                | T_B  B+                 --                | FwdDecl fc c => T_C (fc->c) fc+                 --                | ...+                 --         data FwdC = FwdC -- because C is not yet in scope+                 --         instance FwdDecl FwdC C  -- later, at defn of C+                 --+                 -- In fact, it is better to move the declaration of type C+                 -- here, rather than use a FwdDecl proxy.  This will require+                 -- some patching later where C was originally declared.+                 --         data T = T_A  A+                 --                | T_B  B+                 --                | T_C  C -- but C not yet declared+                 --                | ...+                 --         data C = ... -- because C is not yet in scope+                 --         -- later, at true defn site of C, omit its decl.+                 --+                 -- An earlier solution was+                 --         class T a where parseT :: String -> XMLParser a+                 --         instance T A+                 --         instance T B+                 --         instance T C+                 -- but this is incorrect because the choice between A|B|C+                 -- rests with the input doc, not with the caller of the parser.+               | ElementsAttrsAbstract {-typename-}XName+                                       {-subtypes-}[(XName,Maybe XName)]+                                --  ^ [(type name, module where declared later)]+                                       Comment++                 -- becomes function+                 --    elementE :: Parser T+                 --    elementE = parseSchemaType "E"+               | ElementOfType Element+                 -- or, if E is abstract, with substitutionGroup {Foo,Bar},+                 --    elementE = fmap T_Foo elementFoo `onFail`+                 --               fmap T_Bar elementBar `onFail` ...+               | ElementAbstractOfType {-element name-}XName+                                       {-abstract type name-}XName+                                       {-substitute elems and fwddecls-}+                                           [(XName,Maybe XName)]+                                       Comment++                 -- becomes (global) data T = E0 e0 | E1 e1 | E2 e2 | E3 e3+                 -- becomes (local)  OneOfN e0 e1 e2 e3+               | Choice XName [Element] Comment++                 -- becomes data GroupT = GT e0 e1 e2 e3+               | Group  XName [Element] Comment++      {-         -- becomes data GroupT = GT e0 e1 e2 e3+               | GroupAttrs XName [Attribute] Comment+      -}+                 -- becomes newtype T = T S+                 --       + different (more restrictive) parser+               | RestrictComplexType  XName XName Comment++                 -- becomes data T  = T  {fields}+                 --       + instance Extension T S where ...+                 -- or when T extends an _abstract_ XSDtype S, defined in an+                 -- earlier module, it additionally has+                 --        instance FwdDecl FwdT T+               | ExtendComplexType XName XName [Element] [Attribute]+                                               [Element] [Attribute]+                                               {-FwdDecl req'd-}(Maybe XName)+                                               {-supertype abstract?-}Bool+                                               {-grandsupertypes-}[XName]+                                               Comment+                 -- or when T is itself abstract, extending an abstract type S+                 --        class T a where parseT :: String -> XMLParser a+                 --        instance (T a) => S a where parseS = parseT+               | ExtendComplexTypeAbstract XName XName+                                       {-subtypes-}[(XName,Maybe XName)]+                                       {-FwdDecl instnc req'd-}(Maybe XName)+                                       {-grandsupertypes-}[XName]+                                       Comment++                 -- becomes an import and re-export+               | XSDInclude XName Comment+                 -- becomes an import only+               | XSDImport  XName (Maybe XName) Comment+                 -- a top-level annotation+               | XSDComment Comment+                 deriving (Eq,Show)++data Element   = Element { elem_name     :: XName+                         , elem_type     :: XName+                         , elem_modifier :: Modifier+                         , elem_byRef    :: Bool+                         , elem_locals   :: [Decl]+                      -- , elem_abstract :: Bool+                         , elem_substs   :: Maybe [XName] -- substitutable elems+                         , elem_comment  :: Comment+                         }+               | OneOf   { elem_oneOf    :: [[Element]]+                         , elem_modifier :: Modifier+                         , elem_comment  :: Comment+                         }+               | AnyElem { elem_modifier :: Modifier+                         , elem_comment  :: Comment+                         }+               | Text -- for mixed content+                 deriving (Eq,Show)+data Attribute = Attribute { attr_name    :: XName+                           , attr_type    :: XName+                           , attr_required:: Bool+                           , attr_comment :: Comment+                           }+                 deriving (Eq,Show)++data Modifier  = Single+               | Optional+               | Range Occurs+                 deriving (Eq,Show)++-- | Restrictions on simpleType+data Restrict  = RangeR Occurs Comment+               | Pattern String{-really Regexp-} Comment+               | Enumeration [(String,Comment)]+               | StrLength Occurs Comment+                 deriving (Eq,Show)+++-- | A helper for building the formal Module structure.+mkModule :: String -> Schema -> [Decl] -> Module+mkModule name schema decls =+                      Module { module_name        = XName $ N name+                             , module_xsd_ns      = xsdQualification+                                                      (schema_namespaces schema)+                             , module_re_exports  = reexports+                             , module_import_only = imports+                             , module_decls       = theRest+                             }+    where (reexports,other)   = partition xsdinclude decls+          (imports,  theRest) = partition xsdimport  other+          xsdinclude (XSDInclude _ _)  = True+          xsdinclude _                 = False+          xsdimport  (XSDImport _ _ _) = True+          xsdimport  _                 = False+          xsdQualification nss = XName . N . nsPrefix <$>+                                      lookupBy ((==xsd).nsURI) nss+              where xsd = "http://www.w3.org/2001/XMLSchema"
+ src/Text/XML/HaXml/Schema/NameConversion.hs view
@@ -0,0 +1,221 @@+-- | A type model for Haskell datatypes that bears a reasonable correspondence+--   to the XSD type model.+module Text.XML.HaXml.Schema.NameConversion+  ( module Text.XML.HaXml.Schema.NameConversion+  ) where++import Text.XML.HaXml.Types+import Text.XML.HaXml.Namespaces++import Data.Char+import Data.List++-- | An XName just holds the original XSD qualified name.  It does not+--   ensure that the string conforms to any rules of the various Haskell+--   namespaces.  Use a NameConverter to define how you would like names+--   to be mangled.+newtype XName = XName QName+  deriving (Eq,Show)++-- | An HName is a resolved version of an XName.  It should conform to+--   the various namespace rules, and may already include a module+--   qualifier if appropriate.+newtype HName = HName String+    deriving Show++-- | A NameConverter is a collection of functions that convert an XName+--   into an HName, for various Haskell namespaces.  You can define your+--   own arbitrary resolver, but should ensure that you abide by the+--   Haskell rules for conid, varid, etc.+data NameConverter = NameConverter+                       { modid    :: XName -> HName+                       , conid    :: XName -> HName+                       , varid    :: XName -> HName+                       , unqconid :: XName -> HName+                       , unqvarid :: XName -> HName+                       , fwdconid :: XName -> HName  -- ^ for forward type decls+                       , fieldid  :: XName -> XName -> HName+                       }++-- | A simple default set of rules for resolving XNames into HNames.+simpleNameConverter :: NameConverter+simpleNameConverter = NameConverter+    { modid    = \(XName qn)-> HName . mkConid . hierarchy $ qn+    , conid    = \(XName qn)-> HName . mkConid . hierarchy $ qn+    , varid    = \(XName qn)-> HName . mkVarid . last avoidKeywords+                                               . hierarchy $ qn+    , unqconid = \(XName qn)-> HName . mkConid . local $ qn+    , unqvarid = \(XName qn)-> HName . mkVarid . last avoidKeywords+                                               . local $ qn+    , fwdconid = \(XName qn)-> HName . ("Fwd"++) . mkConid . local $ qn+    , fieldid  = \(XName qnt) (XName qnf)->+                               HName $ (mkVarid . last id . hierarchy $ qnt)+                                       ++ "_" +++                                       (mkVarid . last id . hierarchy $ qnf)+    }+  where+    hierarchy (N n)     = wordsBy (==':') n+    hierarchy (QN ns n) = [nsPrefix ns, n]++    local               = (:[]) . Prelude.last . hierarchy++    mkConid  []         = "Empty"+    mkConid  [c]        | map toLower c == "string"     = "Xsd.XsdString"+                        | otherwise = first toUpper $ map escape c+    mkConid [m,c]       | map toLower c == "string"     = "Xsd.XsdString"+                        | map toLower c == "date"       = "Xsd.Date"+                        | map toLower c == "double"     = "Xsd.Double"+                        | map toLower c == "integer"    = "Xsd.Integer"+                        | map toLower c == "boolean"    = "Xsd.Boolean"+                        | map toLower c == "decimal"    = "Xsd.Decimal"+                        | otherwise = first toUpper (map escape m)++"."++first toUpper (map escape c)+    mkConid more        = mkConid [concat more]+    mkVarid  [v]        = first toLower (map escape v)+    mkVarid [m,v]       = first toUpper m++"."++first toLower (map escape v)++    first f (x:xs)+      | not (isAlpha x) = f 'v': x: xs+      | otherwise       = f x: xs+    last  f [x]         = [ f x ]+    last  f (x:xs)      = x: last f xs++-- | Character escapes to create a valid Haskell identifier.+escape :: Char -> Char+escape x | x==' '       = '_'+         | x=='_'       = '_'+         | isAlphaNum x = x+         | otherwise    = '\''++ -- cleanUp = map (\c-> if not (isAlphaNum c) then '_' else c)++-- | Ensure that a string does not match a Haskell keyword.+avoidKeywords :: String -> String+avoidKeywords s+    | s `elem` keywords  = s++"_"+    | otherwise          = s+  where+    keywords = [ "case", "of", "data", "default", "deriving", "do"+               , "forall", "foreign", "if", "then", "else", "import"+               , "infix", "infixl", "infixr", "instance", "let", "in"+               , "module", "newtype", "qualified", "type", "where" ]+++-- | A specialised module-name converter for FpML module names with+--   multiple dashes, including version numbers,+--   e.g. fpml-dividend-swaps-4-7.xsd      becomes FpML.V47.Swaps.Dividend+--   but  fpml-posttrade-execution-4-7.xsd becomes FpML.V47.PostTrade.Execution+fpml :: String -> String+fpml = intercalate "."        -- put the dots in+         . ("Data":)          -- root of the Haskell module namespace+         . rearrange          -- hierarchy shuffling, dependent on names+         . map cap            -- make into nice module names+         . version            -- move version number to front+         . wordsBy (=='-')    -- separate words+         . basename ".xsd"    -- strip .xsd if present+  where+    version ws = let (last2,remain) = splitAt 2 . reverse $ ws in+                 if all (all isDigit) last2 && length ws > 2+                 then head ws: ('V':concat (reverse last2))+                             : tail (reverse remain)+                 else ws+    rearrange [a,v,"PostTrade",c] = [a,v,"PostTrade",c]+    rearrange [a,v,b,c]           = [a,v,c,b]+    rearrange [a,v,b,c,d]         = [a,v,d,b++c]+    rearrange [a,v,b,c,d,e]       = [a,v,e,b++c++d]+    rearrange v                   = v++    cap :: String -> String+    cap "Fpml"      = "FpML"+    cap "fpml"      = "FpML"+    cap "cd"        = "CD"+    cap "eq"        = "EQ"+    cap "fx"        = "FX"+    cap "ird"       = "IRD"+    cap "posttrade" = "PostTrade"+    cap "pretrade"  = "PreTrade"+    cap (c:cs)      = toUpper c: cs+++-- | Chop a list into segments, at separators identified by the predicate.+--   The separator items are discarded.+wordsBy :: (a->Bool) -> [a] -> [[a]]+wordsBy pred = wordsBy' pred []+  where wordsBy' p []  []     = []+        wordsBy' p acc []     = [reverse acc]+        wordsBy' p acc (c:cs) | p c       = reverse acc :+                                            wordsBy' p [] (dropWhile p cs)+                              | otherwise = wordsBy' p (c:acc) cs++-- | Remove any prefix directory names, and given suffix extension.+basename :: String -> String -> String+basename ext = reverse . snip (reverse ext)+                       . takeWhile (not.(`elem`"\\/")) . reverse+    where snip p s = if p `isPrefixOf`s then drop (length p) s else s++fpmlNameConverter :: NameConverter+fpmlNameConverter = simpleNameConverter+    { modid   = (\(HName h)-> HName (fpml h))+                . modid simpleNameConverter+ -- , conid   = (\(HName h)-> case take 4 (reverse h) of+ --                             "munE" -> HName (reverse (drop 4 (reverse h)))+ --                             _      -> HName h )+ --             . conid simpleNameConverter+    , fwdconid = \(XName qn)-> HName . ("Pseudo"++) . mkConId . local $ qn+    , fieldid  = \(XName qnt) (XName qnf)->+                  let t = mkVarId . local $ qnt+                      f = mkVarId . local $ qnf+                  in HName $ if t==f then f+                             else mkVarId (shorten (mkConId t)) ++"_"+++                                  if t `isPrefixOf` f+                                  then mkVarId (drop (length t) f)+                                  else f+    }+  where+    hierarchy (N n)     = wordsBy (==':') n+    hierarchy (QN ns n) = [nsPrefix ns, n]++    local               = Prelude.last . hierarchy++    mkVarId   "id"      = "ID"+    mkVarId   (v:vs)    = toLower v: map escape vs+    mkConId   (v:vs)    = toUpper v: map escape vs++    shorten t | length t <= 12 = t+              | length t <  35 = concatMap shortenWord (splitWords t)+              | otherwise      = map toLower (head t: filter isUpper (tail t))+    splitWords "" = []+    splitWords (u:s)  = let (w,rest) = break (\c->isUpper c || c=='_') s+                        in (u:w) : splitWords rest++    shortenWord "Request"     = "Req" -- some special cases+    shortenWord "Reference"   = "Ref"+    shortenWord "Valuation"   = "Val"+    shortenWord "Calendar"    = "Cal"+    shortenWord "Absolute"    = "Abs"+    shortenWord "Additional"  = "Add"+    shortenWord "Business"    = "Bus"+    shortenWord "Standard"    = "Std"+    shortenWord "Calculation" = "Calc"+    shortenWord "Quotation"   = "Quot"+    shortenWord "Information" = "Info"+    shortenWord "Exchange"    = "Exch"+    shortenWord "Characteristics" = "Char"+    shortenWord "Multiple"    = "Multi"+    shortenWord "Constituent" = "Constit"+    shortenWord "Convertible" = "Convert"+    shortenWord "Underlyer"   = "Underly"+    shortenWord "Underlying"  = "Underly"+    shortenWord "Properties"  = "Props"+    shortenWord "Property"    = "Prop"+    shortenWord "Affirmation" = "Affirmation"+    shortenWord "Affirmed"    = "Affirmed"+    shortenWord "KnockIn"     = "KnockIn"  -- avoid shortening+    shortenWord "Knockin"     = "Knockin"+    shortenWord "KnockOut"    = "KnockOut"+    shortenWord "Knockout"    = "Knockout"+    shortenWord w | length w < 8 = w   -- then the general rule+                  | otherwise    = case splitAt 5 w of+                                     (pref,c:suf) | isVowel c -> pref+                                                  | otherwise -> pref++[c]++    isVowel = (`elem` "aeiouy")
+ src/Text/XML/HaXml/Schema/Parse.hs view
@@ -0,0 +1,654 @@+module Text.XML.HaXml.Schema.Parse+  ( module Text.XML.HaXml.Schema.Parse+  ) where++import Data.Char (isSpace)+import Data.List (isPrefixOf)+import Data.Monoid (Monoid(mappend))+-- import Text.ParserCombinators.Poly+import Text.Parse    -- for String parsers++import Text.XML.HaXml.Types      (Name,QName(..),Namespace(..),Attribute(..)+                                 ,Content(..),Element(..),info)+import Text.XML.HaXml.Namespaces+import Text.XML.HaXml.Verbatim hiding (qname)+import Text.XML.HaXml.Posn+import Text.XML.HaXml.Schema.XSDTypeModel as XSD+import Text.XML.HaXml.XmlContent.Parser (text)+++-- | Lift boolean 'or' over predicates.+(|||) :: (a->Bool) -> (a->Bool) -> (a->Bool)+p ||| q = \v -> p v || q v++-- | Qualify an ordinary name with the XSD namespace.+xsd :: Name -> QName+xsd = QN Namespace{nsPrefix="xsd",nsURI="http://www.w3.org/2001/XMLSchema"}++-- | Predicate for comparing against an XSD-qualified name.  (Also accepts+--   unqualified names, but this is probably a bit too lax.  Doing it right+--   would require checking to see whether the current schema module's default+--   namespace is XSD or not.)+xsdTag :: String -> Content Posn -> Bool+xsdTag tag (CElem (Elem qn _ _) _)  =  qn == xsd tag || qn == N tag+xsdTag _   _                        =  False++-- | We need a Parser monad for reading from a sequence of generic XML+--   Contents into specific datatypes that model the structure of XSD+--   descriptions.  This is a specialisation of the polyparse combinators,+--   fixing the input token type.+type XsdParser a = Parser (Content Posn) a++-- | Get the next content element, checking that it matches some criterion+--   given by the predicate.+--   (Skips over comments and whitespace, rejects text and refs.+--    Also returns position of element.)+--   The list of strings argument is for error reporting - it usually+--   represents a list of expected tags.+posnElementWith :: (Content Posn->Bool) -> [String]+                   -> XsdParser (Posn,Element Posn)+posnElementWith match tags = do+    { c <- next `adjustErr` (++" when expecting "++formatted tags)+    ; case c of+        CElem e pos+            | match c   -> return (pos,e)+        CElem (Elem t _ _) pos+            | otherwise -> fail ("Found a <"++printableName t+                                 ++">, but expected "+                                 ++formatted tags++"\nat "++show pos)+        CString b s pos  -- ignore blank space+            | not b && all isSpace s -> posnElementWith match tags+            | otherwise -> fail ("Found text content, but expected "+                                 ++formatted tags++"\ntext is: "++s+                                 ++"\nat "++show pos)+        CRef r pos -> fail ("Found reference, but expected "+                            ++formatted tags++"\nreference is: "++verbatim r+                            ++"\nat "++show pos)+        CMisc _ _ -> posnElementWith match tags  -- skip comments, PIs, etc.+    }+  where+    formatted [t]  = "a <"++t++">"+    formatted tgs = "one of"++ concatMap (\t->" <"++t++">") tgs++-- | Get the next content element, checking that it has the required tag+--   belonging to the XSD namespace.+xsdElement :: Name -> XsdParser (Element Posn)+xsdElement n = fmap snd (posnElementWith (xsdTag n) ["xsd:"++n])++-- | Get the next content element, whatever it is.+anyElement :: XsdParser (Element Posn)+anyElement = fmap snd (posnElementWith (const True) ["any element"])++-- | Grab and parse any and all children of the next element.+allChildren :: XsdParser a -> XsdParser a+allChildren p = do e <- anyElement+                   interiorWith (const True) p e++-- | Run an XsdParser on the child contents of the given element (i.e. not+--   in the current monadic content sequence), filtering the children+--   before parsing, and checking that the contents are exhausted, before+--   returning the calculated value within the current parser context.+interiorWith :: (Content Posn->Bool) -> XsdParser a+                -> Element Posn -> XsdParser a+interiorWith keep (P p) (Elem e _ cs) = P $ \inp->+    tidy inp $+    case p (filter keep cs) of+        Committed r        -> r+        f@(Failure _ _)    -> f+        s@(Success [] _)   -> s+        Success ds@(d:_) a+            | all onlyMisc ds -> Success [] a+            | otherwise       -> Committed $+                                 Failure ds ("Too many elements inside <"+                                             ++printableName e++"> at\n"+                                             ++show (info d)++"\n\n"+                                             ++"Found excess: "+                                             ++verbatim (take 5 ds))+  where onlyMisc (CMisc _ _) = True+        onlyMisc (CString False s _) | all isSpace s = True+        onlyMisc _ = False++-- | Check for the presence (and value) of an attribute in the given element.+--   Absence results in failure.+attribute :: QName -> TextParser a -> Element Posn -> XsdParser a+attribute qn (P p) (Elem n as _) = P $ \inp->+    case lookup qn as of+        Nothing  -> Failure inp $ "attribute "++printableName qn+                                  ++" not present in <"++printableName n++">"+        Just atv -> tidy inp $+                    case p (show atv) of+                      Committed r   -> r+                      Failure z msg -> Failure z $+                                             "Attribute parsing failure: "+                                             ++printableName qn++"=\""+                                             ++show atv++"\": "++msg+                      Success [] v  -> Success [] v+                      Success xs _  -> Committed $+                                       Failure xs $+                                             "Attribute parsing excess text: "+                                             ++printableName qn++"=\""+                                             ++show atv++"\":\n  Excess is: "+                                             ++xs++-- | Grab any attributes that declare a locally-used prefix for a+--   specific namespace.+namespaceAttrs :: Element Posn -> XsdParser [Namespace]+namespaceAttrs (Elem _ as _) =+    return . map mkNamespace . filter (matchNamespace "xmlns") $ as+  where+    deQN (QN _ n) = n+    mkNamespace (attname,attval) = Namespace { nsPrefix = deQN attname+                                             , nsURI    = verbatim attval+                                             }++-- | Predicate for whether an attribute belongs to a given namespace.+matchNamespace :: String -> Attribute -> Bool+matchNamespace n (N m,     _) =   False  -- (n++":") `isPrefixOf` m+matchNamespace n (QN ns _, _) =   n == nsPrefix ns++-- | Tidy up the parsing context.+tidy :: t -> Result x a -> Result t a+tidy inp (Committed r) = tidy inp r+tidy inp (Failure _ m) = Failure inp m+tidy inp (Success _ v) = Success inp v++-- | Given a URI for a targetNamespace, and a list of Namespaces, tell+--   me the prefix corresponding to the targetNamespace.+targetPrefix :: Maybe TargetNamespace -> [Namespace] -> Maybe String+targetPrefix Nothing    _   = Nothing+targetPrefix (Just uri) nss = nsPrefix <$> lookupBy ((==uri).nsURI) nss++-- | An auxiliary you might expect to find in Data.List+lookupBy :: (a->Bool) -> [a] -> Maybe a+lookupBy p []     = Nothing+lookupBy p (y:ys) | p y       = Just y+                  | otherwise = lookupBy p ys++-- | Turn a qualified attribute value (two strings) into a qualified name+--   (QName), but excluding the case where the namespace prefix corresponds+--   to the targetNamespace of the current schema document.+qual :: Maybe TargetNamespace -> [Namespace] -> String-> String -> QName+qual tn nss pre nm = case targetPrefix tn nss of+                         Nothing             -> QN thisNS nm+                         Just p  | p/=pre    -> QN thisNS nm+                                 | otherwise -> N nm+    where thisNS = Namespace{ nsPrefix = pre+                            , nsURI = maybe "" nsURI $+                                      lookupBy ((==pre).nsPrefix) nss+                            }++-- Now for the real parsers.++-- | Parse a Schema declaration+schema = do+    e <- xsdElement "schema"+    commit $ do+        tn  <- optional (attribute (N "targetNamespace") uri e)+        nss <- namespaceAttrs e+        return Schema+          `apply` (attribute (N "elementFormDefault")    qform e+                   `onFail` return Unqualified)+          `apply` (attribute (N "attributeFormDefault")  qform e+                   `onFail` return Unqualified)+          `apply` optional (attribute (xsd "finalDefault") final e)+          `apply` optional (attribute (xsd "blockDefault") block e)+          `apply` return tn+          `apply` optional (attribute (N "version")       string e)+          `apply` return nss+          `apply` interiorWith (const True) (many (schemaItem (qual tn nss))) e++-- | Parse a (possibly missing) <xsd:annotation> element.+annotation :: XsdParser Annotation+annotation = do+    definiteAnnotation `onFail` return (NoAnnotation "missing")++-- | Parse a definitely-occurring <xsd:annotation> element.+definiteAnnotation :: XsdParser Annotation+definiteAnnotation = do+    e <- xsdElement "annotation"+    ( Documentation <$> interiorWith (xsdTag "documentation")+                                        (allChildren text)  e)+      `onFail`+      (AppInfo <$> interiorWith (xsdTag "documentation")+                                        (allChildren text)  e)+      `onFail`+      return (NoAnnotation "failed to parse")++-- | Parse a FormDefault attribute.+qform :: TextParser QForm+qform = do+    w <- word+    case w of+        "qualified"   -> return Qualified+        "unqualified" -> return Unqualified+        _             -> failBad "Expected \"qualified\" or \"unqualified\""++-- | Parse a Final or Block attribute.+final :: TextParser Final+final = do+    w <- word+    case w of+        "restriction" -> return NoRestriction+        "extension"   -> return NoExtension+        "#all"        -> return AllFinal+        _             -> failBad $ "Expected \"restriction\" or \"extension\""+                                   ++" or \"#all\""+block :: TextParser Block+block = final++-- | Parse a schema item (just under the toplevel <xsd:schema>)+schemaItem :: (String->String->QName) -> XsdParser SchemaItem+schemaItem qual = oneOf'+       [ ("xsd:include",        include)+       , ("xsd:import",         import_)+       , ("xsd:redefine",       redefine qual)+       , ("xsd:annotation",     fmap Annotation     definiteAnnotation)+         --+       , ("xsd:simpleType",     fmap Simple           (simpleType qual))+       , ("xsd:complexType",    fmap Complex          (complexType qual))+       , ("xsd:element",        fmap SchemaElement    (elementDecl qual))+       , ("xsd:attribute",      fmap SchemaAttribute  (attributeDecl qual))+       , ("xsd:attributeGroup", fmap AttributeGroup   (attributeGroup qual))+       , ("xsd:group",          fmap SchemaGroup      (group_ qual))+   --  , ("xsd:notation",       notation)+-- sigh+       , ("xs:include",        include)+       , ("xs:import",         import_)+       , ("xs:redefine",       redefine qual)+       , ("xs:annotation",     fmap Annotation     definiteAnnotation)+         --+       , ("xs:simpleType",     fmap Simple           (simpleType qual))+       , ("xs:complexType",    fmap Complex          (complexType qual))+       , ("xs:element",        fmap SchemaElement    (elementDecl qual))+       , ("xs:attribute",      fmap SchemaAttribute  (attributeDecl qual))+       , ("xs:attributeGroup", fmap AttributeGroup   (attributeGroup qual))+       , ("xs:group",          fmap SchemaGroup      (group_ qual))+   --  , ("xs:notation",       notation)+       ]++-- | Parse an <xsd:include>.+include :: XsdParser SchemaItem+include = do e <- xsdElement "include"+             commit $ return Include+                      `apply` attribute (N "schemaLocation") uri e+                      `apply` interiorWith (xsdTag "annotation") annotation e++-- | Parse an <xsd:import>.+import_ :: XsdParser SchemaItem+import_ = do e <- xsdElement "import"+             commit $ return Import+                      `apply` attribute (N "namespace")      uri e+                      `apply` attribute (N "schemaLocation") uri e+                      `apply` interiorWith (xsdTag "annotation") annotation e++-- | Parse a <xsd:redefine>.+redefine :: (String->String->QName) -> XsdParser SchemaItem+redefine q = do e <- xsdElement "redefine"+                commit $ return Redefine+                     `apply` attribute (N "schemaLocation") uri e+                     `apply` interiorWith (const True) (many (schemaItem q)) e++-- | Parse a <xsd:simpleType> decl.+simpleType :: (String->String->QName) -> XsdParser SimpleType+simpleType q = do+    e <- xsdElement "simpleType"+    n <- optional (attribute (N "name") string e)+    f <- optional (attribute (N "final") final e)+    a <- interiorWith (xsdTag "annotation") annotation e+    commit $ interiorWith (not . xsdTag "annotation") (simpleItem n f a) e+  where+    simpleItem n f a =+        do e  <- xsdElement "restriction"+           commit $ do+             a1 <- interiorWith (xsdTag "annotation") annotation e+             b  <- optional (attribute (N "base") (qname q) e)+             r  <- interiorWith (not . xsdTag "annotation")+                                (restrictType a1 b `onFail` restriction1 a1 b) e+             return (Restricted a n f r)+        `onFail`+        do e  <- xsdElement "list"+           commit $ do+             a1 <- interiorWith (xsdTag "annotation") annotation e+             t  <- attribute (N "itemType") (fmap Right (qname q)) e+                     `onFail`+                   interiorWith (xsdTag "simpleType")+                                (fmap Left (simpleType q)) e+                     `adjustErr`+                   (("Expected attribute 'itemType' or element <simpleType>\n"+                    ++"  inside <list> decl.\n")++)+             return (ListOf (a`mappend`a1) n f t)+        `onFail`+        do e  <- xsdElement "union"+           commit $ do+             a1 <- interiorWith (xsdTag "annotation") annotation e+             ts <- interiorWith (xsdTag "simpleType") (many (simpleType q)) e+             ms <- attribute (N "memberTypes") (many (qname q)) e+                   `onFail` return []+             return (UnionOf (a`mappend`a1) n f ts ms)+        `adjustErr`+        ("xsd:simpleType does not contain a restriction, list, or union\n"++)++    restriction1 a b = return (RestrictSim1 a b)+                            `apply` (return Restriction1 `apply` particle q)+    restrictType a b = return (RestrictType a b)+                            `apply` optional (simpleType q)+                            `apply` many1 aFacet++aFacet :: XsdParser Facet+aFacet = foldr onFail (fail "Could not recognise simpleType Facet")+               (zipWith facet ["minInclusive","minExclusive","maxInclusive"+                              ,"maxExclusive","totalDigits","fractionDigits"+                              ,"length","minLength","maxLength"+                              ,"enumeration","whiteSpace","pattern"]+                              [OrderedBoundsMinIncl,OrderedBoundsMinExcl+                              ,OrderedBoundsMaxIncl,OrderedBoundsMaxExcl+                              ,OrderedNumericTotalDigits+                              ,OrderedNumericFractionDigits+                              ,UnorderedLength,UnorderedMinLength+                              ,UnorderedMaxLength,UnorderedEnumeration+                              ,UnorderedWhitespace,UnorderedPattern])++facet :: String -> FacetType -> XsdParser Facet+facet s t = do e <- xsdElement s+               v <- attribute (N "value") string e+               f <- attribute (N "fixed") bool e+                    `onFail` return False -- XXX check this+               a <- interiorWith (const True) annotation e+               return (Facet t a v f)++-- | Parse a <xsd:complexType> decl.+complexType :: (String->String->QName) -> XsdParser ComplexType+complexType q =+    do e  <- xsdElement "complexType"+       commit $ return ComplexType+           `apply` interiorWith (xsdTag "annotation") annotation e+           `apply` optional (attribute (N "name") string e)+           `apply` (attribute (N "abstract") bool e `onFail` return False)+           `apply` optional (attribute (N "final") final e)+           `apply` optional (attribute (N "block") block e)+           `apply` (attribute (N "mixed") bool e `onFail` return False)+           `apply` interiorWith (not . xsdTag "annotation") (complexItem q) e++-- | Parse the alternative contents of a <xsd:complexType> decl.+complexItem :: (String->String->QName) -> XsdParser ComplexItem+complexItem q =+    ( do e <- xsdElement "simpleContent"+         commit $ return SimpleContent+                `apply` interiorWith (xsdTag "annotation") annotation e+                `apply` interiorWith (not.xsdTag "annotation") stuff e+    ) `onFail` (+      do e <- xsdElement "complexContent"+         commit $ return ComplexContent+                `apply` interiorWith (xsdTag "annotation") annotation e+                `apply` (attribute (N "mixed") bool e `onFail` return False)+                `apply` interiorWith (not.xsdTag "annotation") stuff e+    ) `onFail` (+      do ThisType <$> particleAttrs q+    )+  where+    stuff :: XsdParser (Either Restriction1 Extension)+    stuff =+      ( do e <- xsdElement "restriction"+           commit $ fmap Left $ return Restriction1 `apply` particle q+      ) `onFail` (+        do e <- xsdElement "extension"+           commit $ fmap Right $ return Extension+               `apply` interiorWith (xsdTag "annotation") annotation e+               `apply` attribute (N "base") (qname q) e+               `apply` interiorWith (not.xsdTag "annotation")+                                    (particleAttrs q) e+      )++-- | Parse a particle decl.+particle :: (String->String->QName) -> XsdParser Particle+particle q = optional (fmap Left (choiceOrSeq q) `onFail` fmap Right (group_ q))++-- | Parse a particle decl with optional attributes.+particleAttrs :: (String->String->QName) -> XsdParser ParticleAttrs+particleAttrs q = return PA `apply` particle q+                            `apply` many (fmap Left (attributeDecl q)+                                          `onFail`+                                          fmap Right (attributeGroup q))+                            `apply` optional anyAttr++-- | Parse an <xsd:all>, <xsd:choice>, or <xsd:sequence> decl.+choiceOrSeq :: (String->String->QName) -> XsdParser ChoiceOrSeq+choiceOrSeq q =+    do e <- xsdElement "all"+       commit $ return All+           `apply` interiorWith (xsdTag "annotation") annotation e+           `apply` interiorWith (not.xsdTag "annotation")+                                (many (elementDecl q)) e+    `onFail`+    do e <- xsdElement "choice"+       commit $ return Choice+           `apply` interiorWith (xsdTag "annotation") annotation e+           `apply` occurs e+           `apply` interiorWith (not.xsdTag "annotation")+                                (many (elementEtc q)) e+    `onFail`+    do e <- xsdElement "sequence"+       commit $ return Sequence+           `apply` interiorWith (xsdTag "annotation") annotation e+           `apply` occurs e+           `apply` interiorWith (not.xsdTag "annotation")+                                (many (elementEtc q)) e++-- | Parse a <xsd:group> decl.+group_ :: (String->String->QName) -> XsdParser Group+group_ q = do e <- xsdElement "group"+              commit $ return Group+                `apply` interiorWith (xsdTag "annotation") annotation e+                `apply` (fmap Left (attribute (N "name") string e)+                         `onFail`+                         fmap Right (attribute (N "ref") (qname q) e))+                `apply` occurs e+                `apply` interiorWith (not.xsdTag "annotation")+                                     (optional (choiceOrSeq q)) e++-- | Parse an <xsd:element>, <xsd:group>, <xsd:all>, <xsd:choice>,+--   <xsd:sequence> or <xsd:any>.+elementEtc :: (String->String->QName) -> XsdParser ElementEtc+elementEtc q = fmap HasElement (elementDecl q)+             `onFail`+             fmap HasGroup (group_ q)+             `onFail`+             fmap HasCS (choiceOrSeq q)+             `onFail`+             fmap HasAny any_++-- | Parse an <xsd:any>.+any_ :: XsdParser Any+any_ = do e <- xsdElement "any"+          commit $ return Any+              `apply` interiorWith (xsdTag "annotation") annotation e+              `apply` (attribute (N "namespace") uri e+                       `onFail` return "##any")+              `apply` (attribute (N "processContents") processContents e+                       `onFail` return Strict)+              `apply` occurs e++-- | Parse an <xsd:anyAttribute>.+anyAttr :: XsdParser AnyAttr+anyAttr = do e <- xsdElement "anyAttribute"+             commit $ return AnyAttr+                 `apply` interiorWith (xsdTag "annotation") annotation e+                 `apply` (attribute (N "namespace") uri e+                          `onFail` return "##any")+                 `apply` (attribute (N "processContents") processContents e+                          `onFail` return Strict)++-- | Parse an <xsd:attributegroup>.+attributeGroup :: (String->String->QName) -> XsdParser AttrGroup+attributeGroup q =+    do e <- xsdElement "attributeGroup"+       commit $ return AttrGroup+           `apply` interiorWith (xsdTag "annotation") annotation e+           `apply` (fmap Left (attribute (N "name") string e)+                    `onFail`+                    fmap Right (attribute (N "ref") (qname q) e))+           `apply` interiorWith (not.xsdTag "annotation") (many stuff) e+  where+    stuff = fmap Left (attributeDecl q) `onFail` fmap Right (attributeGroup q)++-- | Parse an <xsd:element> decl.+elementDecl :: (String->String->QName) -> XsdParser ElementDecl+elementDecl q =+    do e <- xsdElement "element"+       commit $ return ElementDecl+           `apply` interiorWith (xsdTag "annotation") annotation e+           `apply` (fmap Left (nameAndType q e)+                    `onFail`+                    fmap Right (attribute (N "ref") (qname q) e))+           `apply` occurs e+           `apply` (attribute (N "nillable") bool e `onFail` return False)+           `apply` optional (attribute (N "substitutionGroup") (qname q) e)+           `apply` (attribute (N "abstract") bool e `onFail` return False)+           `apply` optional (attribute (xsd "final") final e)+           `apply` optional (attribute (xsd "block") block e)+           `apply` (attribute (xsd "form") qform e `onFail` return Unqualified)+           `apply` interiorWith (xsdTag "simpleType" ||| xsdTag "complexType")+                                (optional (fmap Left (simpleType q)+                                           `onFail`+                                           fmap Right (complexType q))) e+           `apply` interiorWith (xsdTag "unique" ||| xsdTag "key"+                                                 ||| xsdTag "keyRef")+                                (many (uniqueKeyOrKeyRef q)) e++-- | Parse name and type attributes.+nameAndType :: (String->String->QName) -> Element Posn -> XsdParser NameAndType+nameAndType q e = return NT `apply` attribute (N "name") string e+                            `apply` optional (attribute (N "type") (qname q) e)++-- | Parse an <xsd:attribute> decl.+attributeDecl :: (String->String->QName) -> XsdParser AttributeDecl+attributeDecl q =+    do e <- xsdElement "attribute"+       commit $ return AttributeDecl+           `apply` interiorWith (xsdTag "annotation") annotation e+           `apply` (fmap Left (nameAndType q e)+                    `onFail`+                    fmap Right (attribute (N "ref") (qname q) e))+           `apply` (attribute (N "use") use e `onFail` return Optional)+           `apply` optional (attribute (N "default") (fmap Left string) e+                              `onFail`+                              attribute (N "fixed") (fmap Right string) e)+           `apply` (attribute (xsd "form") qform e `onFail` return Unqualified)+           `apply` interiorWith (xsdTag "simpleType")+                                (optional (simpleType q)) e+++-- | Parse an occurrence range from attributes of given element.+occurs :: Element Posn -> XsdParser Occurs+occurs e = return Occurs+               `apply` optional (attribute (N "minOccurs") parseDec e)+               `apply` optional (attribute (N "maxOccurs") maxDec e)+  where+    maxDec = parseDec+             `onFail`+             do isWord "unbounded"; return maxBound++-- | Parse a <xsd:unique>, <xsd:key>, or <xsd:keyref>.+uniqueKeyOrKeyRef :: (String->String->QName) -> XsdParser UniqueKeyOrKeyRef+uniqueKeyOrKeyRef q = fmap U unique `onFail`+                      fmap K key `onFail`+                      fmap KR (keyRef q)++-- | Parse a <xsd:unique>.+unique :: XsdParser Unique+unique =+    do e <- xsdElement "unique"+       commit $ return Unique+           `apply` interiorWith (xsdTag "annotation") annotation e+           `apply` attribute (N "name") string e+           `apply` interiorWith (xsdTag "selector") selector e+           `apply` interiorWith (xsdTag "field") (many1 field_) e++-- | Parse a <xsd:key>.+key :: XsdParser Key+key =+    do e <- xsdElement "key"+       commit $ return Key+           `apply` interiorWith (xsdTag "annotation") annotation e+           `apply` attribute (N "name") string e+           `apply` interiorWith (xsdTag "selector") selector e+           `apply` interiorWith (xsdTag "field") (many1 field_) e++-- | Parse a <xsd:keyref>.+keyRef :: (String->String->QName) -> XsdParser KeyRef+keyRef q =+    do e <- xsdElement "keyref"+       commit $ return KeyRef+           `apply` interiorWith (xsdTag "annotation") annotation e+           `apply` attribute (N "name") string e+           `apply` attribute (N "refer") (qname q) e+           `apply` interiorWith (xsdTag "selector") selector e+           `apply` interiorWith (xsdTag "field") (many1 field_) e++-- | Parse a <xsd:selector>.+selector :: XsdParser Selector+selector =+    do e <- xsdElement "selector"+       commit $ return Selector+           `apply` interiorWith (xsdTag "annotation") annotation e+           `apply` attribute (N "xpath") string e++-- | Parse a <xsd:field>.+field_ :: XsdParser Field+field_ =+    do e <- xsdElement "field"+       commit $ return Field+           `apply` interiorWith (xsdTag "annotation") annotation e+           `apply` attribute (N "xpath") string e++-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --++-- | Text parser for a URI (very simple, non-validating, probably incorrect).+uri :: TextParser String+uri = string++-- | Text parser for an arbitrary string consisting of possibly multiple tokens.+string :: TextParser String+string = concat <$> many (space `onFail` word)++space :: TextParser String+space = many1 $ satisfy isSpace++-- | Parse a textual boolean, i.e. "true", "false", "0", or "1"+bool :: TextParser Bool+bool = do w <- word+          case w of+            "true"  -> return True+            "false" -> return False+            "0"     -> return True+            "1"     -> return False+            _       -> fail "could not parse boolean value"++-- | Parse a "use" attribute value, i.e. "required", "optional", or "prohibited"+use :: TextParser Use+use = do w <- word+         case w of+           "required"   -> return Required+           "optional"   -> return Optional+           "prohibited" -> return Prohibited+           _            -> fail "could not parse \"use\" attribute value"++-- | Parse a "processContents" attribute, i.e. "skip", "lax", or "strict".+processContents :: TextParser ProcessContents+processContents =+    do w <- word+       case w of+         "skip"   -> return Skip+         "lax"    -> return Lax+         "strict" -> return Strict+         _        -> fail "could not parse \"processContents\" attribute value"++-- | Parse an attribute value that should be a QName.+qname :: (String->String->QName) -> TextParser QName+qname q = do a <- word+             do ":" <- word+                b   <- many (satisfy (/=':'))+                return (q a b)+               `onFail`+                 do cs <- many next+                    return (N (a++cs))
+ src/Text/XML/HaXml/Schema/PrettyHaskell.hs view
@@ -0,0 +1,884 @@+{-# LANGUAGE CPP #-}+-- | Pretty-print the internal Haskell model of XSD datatypes to a real+--   Haskell module containing type declarations, and instances for parsing+--   (and printing - though not yet implemented) values of those datatypes+--   from(/to) XML.+module Text.XML.HaXml.Schema.PrettyHaskell+  ( ppComment+  , ppModule+  , ppHighLevelDecl+  , ppHighLevelDecls+  , ppvList+  ) where++#if MIN_VERSION_base(4,11,0)+import Prelude hiding ((<>))+#endif++import Text.XML.HaXml.Types (QName(..),Namespace(..))+import Text.XML.HaXml.Schema.HaskellTypeModel+import Text.XML.HaXml.Schema.XSDTypeModel (Occurs(..))+import Text.XML.HaXml.Schema.NameConversion+import Text.PrettyPrint.HughesPJ as PP++import Data.List (intersperse,notElem,inits)+import Data.Maybe (isJust,fromJust,fromMaybe,catMaybes)+import Data.Char (toLower)++-- | Vertically pretty-print a list of things, with open and close brackets,+--   and separators.+ppvList :: String -> String -> String -> (a->Doc) -> [a] -> Doc+ppvList open sep close pp []     = text open <> text close+ppvList open sep close pp (x:xs) = text open <+> pp x+                                   $$ vcat (map (\y-> text sep <+> pp y) xs)+                                   $$ text close++data CommentPosition = Before | After++-- | Generate aligned haddock-style documentation.+--   (but without escapes in comment text yet)+ppComment :: CommentPosition -> Comment -> Doc+ppComment _   Nothing  = empty+ppComment pos (Just s) = case ps of+  (c:cs) ->+      text "--" <+> text (case pos of Before -> "|"; After -> "^") <+> text c+      $$+      vcat (map (\x-> text "--  " <+> text x) cs)+  [] -> empty+  where+    ps = lines (paragraph 60 s)++-- | Generate aligned haddock-style docs for choices (where each choice+--   has its own documentation, but haddock cannot place it directly next+--   to the appropriate component.+ppCommentForChoice :: CommentPosition -> Comment -> [[Element]] -> Doc+ppCommentForChoice pos outer nested =+    text "--" <+> text (case pos of Before -> "|"; After -> "^") <+> text c+    $$ vcat (map (\x-> text "--  " <+> text x) cs)+    $$ vcat (map (\x-> text "--  " <+> text x) bullets)+  where+    (c:cs)  = lines intro+    intro   = maybe "Choice between:"+                    (\s-> paragraph 60 s++"\n\nChoice between:")+                    outer+    bullets = concatMap lines+              $ zipWith (\n seq-> case seq of+                              [x]-> "\n("++show n++") "++paragraph 56 x+                              _  -> "\n("++show n++") Sequence of:"+                                    ++ concatMap (\s->"\n\n  * "+                                                      ++paragraph 52 s)+                                                 seq)+                        [1..]+              $ map (map safeComment) nested+    safeComment Text = "mixed text"+    safeComment e@Element{} = fromMaybe (xname $ elem_name e) (elem_comment e)+    safeComment e           = fromMaybe "unknown" (elem_comment e)+    xname (XName (N x))     = x+    xname (XName (QN ns x)) = nsPrefix ns++":"++x++-- | Pretty-print a Haskell-style name.+ppHName :: HName -> Doc+ppHName (HName x) = text x++-- | Pretty-print an XML-style name.+ppXName :: XName -> Doc+ppXName (XName (N x))     = text x+ppXName (XName (QN ns x)) = text (nsPrefix ns) <> text ":" <> text x++-- | Some different ways of using a Haskell identifier.+ppModId, ppConId, ppVarId, ppUnqConId, ppUnqVarId, ppFwdConId+    :: NameConverter -> XName -> Doc+ppModId nx = ppHName . modid nx+ppConId nx = ppHName . conid nx+ppVarId nx = ppHName . varid nx+ppUnqConId nx = ppHName . unqconid nx+ppUnqVarId nx = ppHName . unqvarid nx+ppFwdConId nx = ppHName . fwdconid nx++ppJoinConId, ppFieldId :: NameConverter -> XName -> XName -> Doc+ppJoinConId nx p q = ppHName (conid nx p) <> text "_" <> ppHName (conid nx q)+ppFieldId   nx t   = ppHName . fieldid nx t++-- | Convert a whole document from HaskellTypeModel to Haskell source text.+ppModule :: NameConverter -> Module -> Doc+ppModule nx m =+    text "{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies #-}"+    $$ text "{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}"+    $$ text "module" <+> ppModId nx (module_name m)+    $$ nest 2 (text "( module" <+> ppModId nx (module_name m)+              $$ vcat (map (\(XSDInclude ex com)->+                               ppComment Before com+                               $$ text ", module" <+> ppModId nx ex)+                           (module_re_exports m))+              $$ text ") where")+    $$ text " "+    $$ text "import Text.XML.HaXml.Schema.Schema (SchemaType(..),SimpleType(..),Extension(..),Restricts(..))"+    $$ text "import Text.XML.HaXml.Schema.Schema as Schema"+    $$ text "import Text.XML.HaXml.OneOfN"+    $$ (case module_xsd_ns m of+         Nothing -> text "import Text.XML.HaXml.Schema.PrimitiveTypes as Xsd"+         Just ns -> text "import qualified Text.XML.HaXml.Schema.PrimitiveTypes as"<+>ppConId nx ns)+    $$ vcat (map (ppHighLevelDecl nx)+                 (module_re_exports m ++ module_import_only m))+    $$ text " "+    $$ text "-- Some hs-boot imports are required, for fwd-declaring types."+    $$ vcat (map ppFwdDecl $ concatMap imports $ module_decls m)+    $$ vcat (map ppFwdElem $ concatMap importElems $ module_decls m)+    $$ text " "+    $$ ppHighLevelDecls nx (module_decls m)++  where+    imports (ElementsAttrsAbstract _ deps _) = deps+    imports (ExtendComplexTypeAbstract _ _ deps _ _ _) = deps+    imports _ = []++    importElems (ElementAbstractOfType _ _ deps _) = deps+    importElems _ = []++    ppFwdDecl (_,   Nothing)  = empty+    ppFwdDecl (name,Just mod) = text "import {-# SOURCE #-}" <+> ppModId nx mod+                                <+> text "(" <+> ppConId nx name <+> text ")"++    ppFwdElem (_,   Nothing)  = empty+    ppFwdElem (name,Just mod) = text "import {-# SOURCE #-}" <+> ppModId nx mod+                                <+> text "("+                                    <+> (text "element" <> ppUnqConId nx name)+                                    <> (text ", elementToXML" <> ppUnqConId nx name)+                                <+> text ")"+++-- | Generate a fragmentary parser for an attribute.+ppAttr :: Attribute -> Int -> Doc+ppAttr a n = (text "a"<>text (show n)) <+> text "<-"+                                       <+> (if attr_required a then empty+                                                 else text "optional $")+                                       <+> text "getAttribute \""+                                       <> ppXName (attr_name a)+                                       <> text "\" e pos"++-- | Generate a fragmentary toXML for an attribute.+toXmlAttr :: Attribute -> Doc+toXmlAttr a = (if attr_required a then id+                                  else (\d-> text "maybe []" <+> parens d))+              (text "toXMLAttribute \"" <> ppXName (attr_name a) <> text "\"")++-- | Generate a fragmentary parser for an element.+ppElem :: NameConverter -> Element -> Doc+ppElem nx e@Element{}+    | elem_byRef e    = ppElemModifier (elem_modifier e)+                                       (text "element"+                                        <> ppUnqConId nx (elem_name e))+    | otherwise       = ppElemModifier (elem_modifier e)+                                       (text "parseSchemaType \""+                                        <> ppXName (elem_name e)+                                        <> text "\"")+ppElem nx e@AnyElem{} = ppElemModifier (elem_modifier e)+                          (text "parseAnyElement")+ppElem nx e@Text{}    = text "parseText"+ppElem nx e@OneOf{}   = ppElemModifier (liftedElemModifier e)+                          (text "oneOf'" <+> ppvList "[" "," "]"+                                                    (ppOneOf n)+                                                    (zip (elem_oneOf e) [1..n]))+  where+    n = length (elem_oneOf e)+    ppOneOf n (e,i) = text "(\"" <> hsep (map (ppElemTypeName nx id)+                                         . cleanChoices $ e)+                      <> text "\","+                      <+> text "fmap" <+> text (ordinal i ++"Of"++show n)+                          <+> parens (ppSeqElem . cleanChoices $ e)+                      <> text ")"+    ordinal i | i <= 20   = ordinals!!i+              | otherwise = "Choice" ++ show i+    ordinals = ["Zero","One","Two","Three","Four","Five","Six","Seven","Eight"+               ,"Nine","Ten","Eleven","Twelve","Thirteen","Fourteen","Fifteen"+               ,"Sixteen","Seventeen","Eighteen","Nineteen","Twenty"]+    ppSeqElem []  = PP.empty+    ppSeqElem [e] = ppElem nx e+    ppSeqElem es  = text ("return ("++replicate (length es-1) ','++")")+                    <+> vcat (map (\e-> text "`apply`" <+> ppElem nx e) es)++-- | Generate a fragmentary toXML for an element.  Fragment must still be+--   applied to an actual element value.+toXmlElem :: NameConverter -> Element -> Doc+toXmlElem nx e@Element{}+    | elem_byRef e    = xmlElemModifier (elem_modifier e)+                                        (text "elementToXML"+                                        <> ppUnqConId nx (elem_name e))+    | otherwise       = xmlElemModifier (elem_modifier e)+                                        (text "schemaTypeToXML \""+                                        <> ppXName (elem_name e)+                                        <> text "\"")+toXmlElem nx e@AnyElem{} = xmlElemModifier (elem_modifier e)+                                           (text "toXMLAnyElement")+toXmlElem nx e@Text{}    = text "toXMLText"+toXmlElem nx e@OneOf{}   = xmlElemModifier (liftedElemModifier e)+                           (text "foldOneOf" <> text (show n)+                           <+> ppvList "" "" "" xmlOneOf (elem_oneOf e))+  where+    n = length (elem_oneOf e)+    xmlOneOf e = parens (xmlSeqElem . cleanChoices $ e)+    xmlSeqElem []  = PP.empty+    xmlSeqElem [e] = toXmlElem nx e+    xmlSeqElem es  = text "\\ (" <> hcat (intersperse (text ",") vars)+                     <> text ") -> concat"+                     <+> ppvList "[" "," "]" (\(e,v)-> toXmlElem nx e <+> v)+                                             (zip es vars)+        where vars = map (text.(:[])) . take (length es) $ ['a'..'z']++-- | Convert multiple HaskellTypeModel Decls to Haskell source text.+ppHighLevelDecls :: NameConverter -> [Decl] -> Doc+ppHighLevelDecls nx hs = vcat (intersperse (text " ")+                                           (map (ppHighLevelDecl nx) hs))++-- | Convert a single Haskell Decl into Haskell source text.+ppHighLevelDecl :: NameConverter -> Decl -> Doc++ppHighLevelDecl nx (NamedSimpleType t s comm) =+    ppComment Before comm+    $$ text "type" <+> ppUnqConId nx t <+> text "=" <+> ppConId nx s+    $$ text "-- No instances required: synonym is isomorphic to the original."++ppHighLevelDecl nx (RestrictSimpleType t s r comm) =+    ppComment Before comm+    $$ text "newtype" <+> ppUnqConId nx t <+> text "="+                      <+> ppUnqConId nx t <+> ppConId nx s+                      <+> text "deriving (Eq,Show)"+    $$ text "instance Restricts" <+> ppUnqConId nx t <+> ppConId nx s+                      <+> text "where"+        $$ nest 4 (text "restricts (" <> ppUnqConId nx t <+> text "x) = x")+    $$ text "instance SchemaType" <+> ppUnqConId nx t <+> text "where"+        $$ nest 4 (text "parseSchemaType s = do"+                  $$ nest 4 (text "e <- element [s]"+                           $$ text "commit $ interior e $ parseSimpleType")+                  )+        $$ nest 4 (text "schemaTypeToXML s ("<> ppUnqConId nx t <+> text "x) = "+                  $$ nest 4 (text "toXMLElement s [] [toXMLText (simpleTypeText x)]")+                  )+    $$ text "instance SimpleType" <+> ppUnqConId nx t <+> text "where"+        $$ nest 4 (text "acceptingParser = fmap" <+> ppUnqConId nx t+                                                 <+> text "acceptingParser"+                   -- XXX should enforce the restrictions somehow.  (?)+                   $$ text "-- XXX should enforce the restrictions somehow?"+                   $$ text "-- The restrictions are:"+                   $$ vcat (map ((text "--     " <+>) . ppRestrict) r))+        $$ nest 4 (text "simpleTypeText (" <> ppUnqConId nx t+                                          <+> text "x) = simpleTypeText x")+  where+    ppRestrict (RangeR occ comm)     = text "(RangeR"+                                         <+> ppOccurs occ <>  text ")"+    ppRestrict (Pattern regexp comm) = text ("(Pattern "++regexp++")")+    ppRestrict (Enumeration items)   = text "(Enumeration"+                                         <+> hsep (map (text . fst) items)+                                         <>  text ")"+    ppRestrict (StrLength occ comm)  = text "(StrLength"+                                         <+> ppOccurs occ <>  text ")"+    ppOccurs = parens . text . show++ppHighLevelDecl nx (ExtendSimpleType t s as comm) =+    ppComment Before comm+    $$ text "data" <+> ppUnqConId nx t <+> text "="+                                    <+> ppUnqConId nx t <+> ppConId nx s+                                    <+> ppConId nx t_attrs+                                    <+> text "deriving (Eq,Show)"+    $$ text "data" <+> ppConId nx t_attrs <+> text "=" <+> ppConId nx t_attrs+        $$ nest 4 (ppFields nx t_attrs [] as+                  $$ text "deriving (Eq,Show)")+    $$ text "instance SchemaType" <+> ppUnqConId nx t <+> text "where"+        $$ nest 4 (text "parseSchemaType s = do"+                  $$ nest 4 (text "(pos,e) <- posnElement [s]"+                            $$ text "commit $ do"+                            $$ nest 2+                                  (vcat (zipWith ppAttr as [0..])+                                  $$ text "reparse [CElem e pos]"+                                  $$ text "v <- parseSchemaType s"+                                  $$ text "return $" <+> ppUnqConId nx t+                                                     <+> text "v"+                                                     <+> attrsValue as)+                            )+                  )+        $$ nest 4 (text "schemaTypeToXML s ("<> ppUnqConId nx t+                                             <+> text "bt at) ="+                  $$ nest 4 (text "addXMLAttributes"+                             <+> ppvList "[" "," "]"+                                     (\a-> toXmlAttr a <+> text "$"+                                         <+> ppFieldId nx t_attrs (attr_name a)+                                         <+> text "at")+                                     as+                             $$ nest 4 (text "$ schemaTypeToXML s bt"))+                  )+    $$ text "instance Extension" <+> ppUnqConId nx t <+> ppConId nx s+                                 <+> text "where"+        $$ nest 4 (text "supertype (" <> ppUnqConId nx t <> text " s _) = s")+  where+    t_attrs = let (XName (N t_base)) = t in XName (N (t_base++"Attributes"))++    attrsValue [] = ppConId nx t_attrs+    attrsValue as = parens (ppConId nx t_attrs <+>+                            hsep [text ("a"++show n) | n <- [0..length as-1]])++    -- do element [s]+    --    blah <- attribute foo+    --    interior e $ do+    --        simple <- parseText acceptingParser+    --        return (T simple blah)++ppHighLevelDecl nx (UnionSimpleTypes t sts comm) =+    ppComment Before comm+    $$ text "data" <+> ppUnqConId nx t <+> text "=" <+> ppUnqConId nx t+    $$ text "-- Placeholder for a Union type, not yet implemented."++ppHighLevelDecl nx (EnumSimpleType t [] comm) =+    ppComment Before comm+    $$ text "data" <+> ppUnqConId nx t+ppHighLevelDecl nx (EnumSimpleType t is comm) =+    ppComment Before comm+    $$ text "data" <+> ppUnqConId nx t+        $$ nest 4 ( ppvList "=" "|" "deriving (Eq,Show,Enum)" item is )+    $$ text "instance SchemaType" <+> ppUnqConId nx t <+> text "where"+        $$ nest 4 (text "parseSchemaType s = do"+                  $$ nest 4 (text "e <- element [s]"+                           $$ text "commit $ interior e $ parseSimpleType")+                  )+        $$ nest 4 (text "schemaTypeToXML s x = "+                  $$ nest 4 (text "toXMLElement s [] [toXMLText (simpleTypeText x)]")+                  )+    $$ text "instance SimpleType" <+> ppUnqConId nx t <+> text "where"+        $$ nest 4 (text "acceptingParser ="+                        <+> ppvList "" "`onFail`" "" parseItem is+                   $$ vcat (map enumText is))+  where+    item (i,c) = (ppUnqConId nx t <> text "_" <> ppConId nx i)+                 $$ ppComment After c+    parseItem (i,_) = text "do literal \"" <> ppXName i <> text "\"; return"+                           <+> (ppUnqConId nx t <> text "_" <> ppConId nx i)+    enumText  (i,_) = text "simpleTypeText"+                           <+> (ppUnqConId nx t <> text "_" <> ppConId nx i)+                           <+> text "= \"" <> ppXName i <> text "\""++ppHighLevelDecl nx (ElementsAttrs t es as comm) =+    ppComment Before comm+    $$ text "data" <+> ppUnqConId nx t <+> text "=" <+> ppUnqConId nx t+        $$ nest 8 (ppFields nx t (uniqueify es) as+                  $$ text "deriving (Eq,Show)")+    $$ text "instance SchemaType" <+> ppUnqConId nx t <+> text "where"+        $$ nest 4 (text "parseSchemaType s = do"+                  $$ nest 4 (text "(pos,e) <- posnElement [s]"+                       --   $$ text "commit $ do"+                       --   $$ nest 2+                            $$    (vcat (zipWith ppAttr as [0..])+                                  $$ text "commit $ interior e $ return"+                                      <+> returnValue as+                                      $$ nest 4 (vcat (map ppApplyElem es))+                                  )+                            )+                  )+        $$ nest 4 (text "schemaTypeToXML s x@"<> ppUnqConId nx t <> text "{} ="+                  $$ nest 4 (text "toXMLElement s"+                             <+> ppvList "[" "," "]"+                                         (\a-> toXmlAttr a <+> text "$"+                                               <+> ppFieldId nx t (attr_name a)+                                               <+> text "x")+                                         as+                             $$ nest 4 (ppvList "[" "," "]"+                                           (\ (e,i)-> toXmlElem nx e+                                                      <+> text "$"+                                                      <+> ppFieldName nx t e i+                                                      <+> text "x")+                                           (zip es [0..]))+                            )+                  )+  where+    returnValue [] = ppUnqConId nx t+    returnValue as = parens (ppUnqConId nx t <+>+                             hsep [text ("a"++show n) | n <- [0..length as-1]])+    ppApplyElem e = text "`apply`" <+> ppElem nx e++ppHighLevelDecl nx (ElementsAttrsAbstract t [] comm) =+    ppComment Before comm+    $$ text "--  (There are no subtypes defined for this abstract type.)"+    $$ text "data" <+> ppUnqConId nx t <+> text "=" <+> ppUnqConId nx t+                   <+> text "deriving (Eq,Show)"+    $$ text "instance SchemaType" <+> ppUnqConId nx t <+> text "where"+        $$ nest 4 (text "parseSchemaType s = fail" <+> errmsg)+        $$ nest 4 (text "schemaTypeToXML s _ = toXMLElement s [] []")+  where+    errmsg = text "\"Parse failed when expecting an extension type of"+             <+> ppXName t <> text ":\\n  No extension types are known.\""+ppHighLevelDecl nx (ElementsAttrsAbstract t insts comm) =+    ppComment Before comm+    $$ text "data" <+> ppUnqConId nx t+        $$ nest 8 (ppvList "=" "|" "" ppAbstrCons insts+                  $$ text "deriving (Eq,Show)")+--  $$ text "-- instance SchemaType" <+> ppUnqConId nx t+--      <+> text "(declared in Instance module)"+--  *** Declare instance here+    $$ text "instance SchemaType" <+> ppUnqConId nx t <+> text "where"+        $$ nest 4 (text "parseSchemaType s = do"+                  $$ nest 4 (vcat (intersperse (text "`onFail`")+                                               (map ppParse insts)+                                   ++ [text "`onFail` fail" <+> errmsg])))+        $$ nest 4 (vcat (map toXML insts))+--  $$ text ""+--  $$ vcat (map ppFwdDecl $ filter (isJust . snd) insts)+  where+    ppAbstrCons (name,Nothing)  = con name <+> ppConId nx name+    ppAbstrCons (name,Just mod) = con name <+> ppConId nx name+--  *** Declare FwdDecl type here (proxy for type declared in later module)+--  ppAbstrCons (name,Just mod) = text "forall q . (FwdDecl" <+>+--                                fwd name <+> text "q," <+>+--                                text "SchemaType q) =>" <+>+--                                con name <+>+--                                text "("<>fwd name<>text"->q)" <+> fwd name+    ppParse (name,Nothing) = text "(fmap" <+> con name <+>+                             text "$ parseSchemaType s)"+    ppParse (name,Just _)  = ppParse (name,Nothing)+--  ppParse (name,Just _)  = text "(return" <+> con name <+>+--                           text "`apply` (fmap const $ parseSchemaType s)" <+>+--                           text "`apply` return" <+> fwd name <> text ")"+--  ppFwdDecl (name,Just mod)+--         = text "-- | Proxy:" <+> ppConId nx name+--               <+> text "declared later in" <+> ppModId nx mod+--           $$ text "data" <+> fwd name <+> text "=" <+> fwd name+    errmsg = text "\"Parse failed when expecting an extension type of"+             <+> ppXName t <> text ",\\n\\\n\\  namely one of:\\n\\\n\\"+             <> hcat (intersperse (text ",")+                                  (map (ppXName . fst) insts))+             <> text "\""+--  fwd name = ppFwdConId nx name+    con name = ppJoinConId nx t name+    -- This is probably an unportable hack, but because an abstract type never+    -- has an element in its own name, we need to guess at the name of the+    -- possible subtype elements that could substitute for it.+    toXML (name,_) = text "schemaTypeToXML _s ("+                     <> con name <+> text "x) = schemaTypeToXML \""+                     <> ppXName (initLower name) <> text "\" x"+    initLower (XName (N (c:cs))) = XName $ N (toLower c:cs)+    initLower (XName (QN ns (c:cs))) = XName $ QN ns (toLower c:cs)++ppHighLevelDecl nx (ElementOfType e@Element{}) =+    ppComment Before (elem_comment e)+    $$ (text "element" <> ppUnqConId nx (elem_name e)) <+> text "::"+        <+> text "XMLParser" <+> ppConId nx (elem_type e)+    $$ (text "element" <> ppUnqConId nx (elem_name e)) <+> text "="+        <+> (text "parseSchemaType \"" <> ppXName (elem_name e)  <> text "\"")+    $$ (text "elementToXML" <> ppUnqConId nx (elem_name e)) <+> text "::"+        <+> ppConId nx (elem_type e) <+> text "-> [Content ()]"+    $$ (text "elementToXML" <> ppUnqConId nx (elem_name e)) <+> text "="+        <+> (text "schemaTypeToXML \"" <> ppXName (elem_name e)  <> text "\"")++ppHighLevelDecl nx e@(ElementAbstractOfType n t [] comm) =+    ppComment Before comm+    $$ text "--  (There are no elements in any substitution group for this element.)"+    $$ (text "element" <> ppUnqConId nx n) <+> text "::"+        <+> text "XMLParser" <+> ppConId nx t+    $$ (text "element" <> ppUnqConId nx n) <+> text "="+        <+> text "fail" <+> errmsg+    $$ (text "elementToXML" <> ppUnqConId nx n) <+> text "::"+        <+> ppConId nx t <+> text "-> [Content ()]"+    $$ (text "elementToXML" <> ppUnqConId nx n) <+> text "="+        <+> (text "schemaTypeToXML \"" <> ppXName n <> text "\"")+  where+    errmsg = text "\"Parse failed when expecting an element in the substitution group for\\n\\\n\\    <"+             <> ppXName n <> text ">,\\n\\\n\\  There are no substitutable elements.\""+ppHighLevelDecl nx e@(ElementAbstractOfType n t substgrp comm)+--  | any notInScope substgrp+--              = (text "-- element" <> ppUnqConId nx n) <+> text "::"+--                    <+> text "XMLParser" <+> ppConId nx t+--              $$ text "--     declared in Instances module"+{-  | otherwise-} = ppComment Before comm+                $$ (text "element" <> ppUnqConId nx n) <+> text "::"+                    <+> text "XMLParser" <+> ppConId nx t+                $$ (text "element" <> ppUnqConId nx n) <+> text "="+                   <+> vcat (intersperse (text "`onFail`") (map ppOne substgrp)+                             ++ [text "`onFail` fail" <+> errmsg])+                $$ (text "elementToXML" <> ppUnqConId nx n) <+> text "::"+                    <+> ppConId nx t <+> text "-> [Content ()]"+                $$ (text "elementToXML" <> ppUnqConId nx n) <+> text "="+                    <+> (text "schemaTypeToXML \"" <> ppXName n <> text "\"")+            --  $$ vcat (map elementToXML substgrp)+--  | otherwise = ppElementAbstractOfType nx e+  where+    notInScope (_,Just _)  = True+    notInScope (_,Nothing) = False+    ppOne (c,Nothing) = text "fmap" <+> text "supertype" -- ppJoinConId nx t c+                        <+> (text "element" <> ppConId nx c)+    ppOne (c,Just _)  = text "fmap" <+> text "supertype" -- ppJoinConId nx t c+                        <+> (text "element" <> ppConId nx c)+                        <+> text "-- FIXME: element is forward-declared"+    errmsg = text "\"Parse failed when expecting an element in the substitution group for\\n\\\n\\    <"+             <> ppXName n <> text ">,\\n\\\n\\  namely one of:\\n\\\n\\<"+             <> hcat (intersperse (text ">, <")+                                  (map (ppXName . fst) substgrp))+             <> text ">\""+--  elementToXML (c,_) = (text "elementToXML" <> ppUnqConId nx n)+--                       <+> text "(" <> ppJoinConId nx t c+--                       <+> text " x) = elementToXML" <> ppUnqConId nx c+--                       <+> text "x"+++ppHighLevelDecl nx (Choice t es comm) =+    ppComment Before comm+    $$ text "data" <+> ppUnqConId nx t+        <+> nest 4 ( ppvList "=" "|" "" choices (zip es [1..])+                   $$ text "deriving (Eq,Show)" )+  where+    choices (e,n) = (ppUnqConId nx t <> text (show n))+                    <+> ppConId nx (elem_type e)++-- Comment out the Group for now.  Groups get inlined into the ComplexType+-- where they are used, so it may not be sensible to declare them separately+-- as well.+ppHighLevelDecl nx (Group t es comm) = PP.empty+--  ppComment Before comm+--  $$ text "data" <+> ppConId nx t <+> text "="+--                 <+> ppConId nx t <+> hsep (map (ppConId nx . elem_type) es)++-- Possibly we want to declare a really more restrictive type, e.g.+--    to remove optionality, (Maybe Foo) -> (Foo), [Foo] -> Foo+--    consequently the "restricts" method should do a proper translation,+--    not merely an unwrapping.+ppHighLevelDecl nx (RestrictComplexType t s comm) =+    ppComment Before comm+    $$ text "newtype" <+> ppUnqConId nx t <+> text "="+                                       <+> ppUnqConId nx t <+> ppConId nx s+                                       <+> text "deriving (Eq,Show)"+    $$ text "-- plus different (more restrictive) parser"+    $$ text "-- (parsing restrictions currently unimplemented)"+    $$ text "instance Restricts" <+> ppUnqConId nx t <+> ppConId nx s+                                 <+> text "where"+        $$ nest 4 (text "restricts (" <> ppUnqConId nx t <+> text "x) = x")+    $$ text "instance SchemaType" <+> ppUnqConId nx t <+> text "where"+        $$ nest 4 (text "parseSchemaType = fmap " <+> ppUnqConId nx t <+>+                   text ". parseSchemaType")+                -- XXX should enforce the restriction.+        $$ nest 4 (text "schemaTypeToXML s (" <> ppUnqConId nx t <+> text "x)")+                   <+> text "= schemaTypeToXML s x"++{-+ppHighLevelDecl nx (ExtendComplexType t s es as _ comm)+    | length es + length as = 1 =+    ppComment Before comm+    $$ text "data" <+> ppConId nx t <+> text "="+                                    <+> ppConId nx t <+> ppConId nx s+                                    <+> ppFields nx t es as+                                    <+> text "deriving (Eq,Show)"+    $$ text "instance Extension" <+> ppConId nx t <+> ppConId nx s+                                 <+> ppAuxConId nx t <+> text "where"+        $$ nest 4 (text "supertype (" <> ppConId nx t <> text " s e) = s"+                   $$ text "extension (" <> ppConId nx t <> text " s e) = e")+-}++ppHighLevelDecl nx (ExtendComplexType t s oes oas es as+                                      fwdReqd absSup grandsuper comm) =+    ppHighLevelDecl nx (ElementsAttrs t (oes++es) (oas++as) comm)+    $$ ppExtension nx t s fwdReqd absSup oes oas es as+    $$ (if not (null grandsuper) -- && not (isJust fwdReqd) -- && isJust fwdReqd+        then ppSuperExtension nx s grandsuper (t,Nothing)+        else empty)++ppHighLevelDecl nx (ExtendComplexTypeAbstract t s insts+                                              fwdReqd grandsuper comm) =+    ppHighLevelDecl nx (ElementsAttrsAbstract t insts comm)+    $$ ppExtension nx t s fwdReqd True [] [] [] []+--  $$ if not (null grandsuper)+--     then vcat (map (ppSuperExtension nx t grandsuper) insts)+--                     -- FIXME some instances are missing!+--     else empty++ppHighLevelDecl nx (XSDInclude m comm) =+    ppComment After comm+    $$ text "import" <+> ppModId nx m++ppHighLevelDecl nx (XSDImport m ma comm) =+    ppComment After comm+    $$ text "import" <+> ppModId nx m+                     <+> maybe empty (\a->text "as"<+>ppConId nx a) ma++ppHighLevelDecl nx (XSDComment comm) =+    ppComment Before comm++{-------------------------------------------------------------------------------++-- | Instances that depend on FwdDecl'd types, need to be declared in a+--   different module.  So they have been separated out from ppHighLevelDecl.+ppHighLevelInstances :: NameConverter -> Decl -> Doc+ppHighLevelInstances nx (ElementsAttrsAbstract t insts comm) =+    text "instance SchemaType" <+> ppUnqConId nx t <+> text "where"+        $$ nest 4 (text "parseSchemaType s = do"+                  $$ nest 4 (vcat (intersperse (text "`onFail`")+                                               (map ppParse insts)+                                   ++ [text "`onFail` fail" <+> errmsg])))+  where+    ppParse (name,Nothing) = text "(fmap" <+> con name <+>+                             text "$ parseSchemaType s)"+    ppParse (name,Just _)  = text "(return" <+> con name <+>+                             text "`apply` (fmap const $ parseSchemaType s)" <+>+                             text "`apply` return" <+> fwd name <> text ")"+    errmsg = text "\"Parse failed when expecting an extension type of"+             <+> ppXName t <> text ",\\n\\\n\\  namely one of:\\n\\\n\\"+             <> hcat (intersperse (text ",")+                                  (map (ppXName . fst) insts))+             <> text "\""+    fwd name = ppFwdConId nx name+    con name = ppJoinConId nx t name++ppHighLevelInstances nx e@(ElementAbstractOfType n t substgrp comm)+    | any notInScope substgrp = ppElementAbstractOfType nx e+    | otherwise = empty+  where+    notInScope (_,Just _)  = True+    notInScope (_,Nothing) = False++ppHighLevelInstances nx (ExtendComplexType t s oes oas es as+                                      fwdReqd absSup grandsuper comm) =+    empty+--  ppExtension nx t s fwdReqd absSup oes oas es as+--  $$ (if not (null grandsuper) && isJust fwdReqd+--      then ppSuperExtension nx s grandsuper (t,Nothing)+--      else empty)++ppHighLevelInstances nx (ExtendComplexTypeAbstract t s insts+                                                   fwdReqd grandsuper comm) =+    ppHighLevelInstances nx (ElementsAttrsAbstract t insts comm)+--  $$ ppExtension nx t s fwdReqd True [] [] [] []+--  $$ if not (null grandsuper)+--     then vcat (map (ppSuperExtension nx t grandsuper) insts)+--                     -- FIXME some instances are missing!+--     else empty+++ppElementAbstractOfType nx (ElementAbstractOfType n t substgrp comm) =+    ppComment Before comm+    $$ (text "element" <> ppUnqConId nx n) <+> text "::"+        <+> text "XMLParser" <+> ppConId nx t+    $$ (text "element" <> ppUnqConId nx n) <+> text "="+       <+> vcat (intersperse (text "`onFail`") (map ppOne substgrp)+                 ++ [text "`onFail` fail" <+> errmsg])+  where+    ppOne (c,Nothing) = text "fmap" <+> text "supertype" -- ppJoinConId nx t c+                        <+> (text "element" <> ppConId nx c)+    ppOne (c,Just _)  = text "fmap" <+> text "supertype" -- ppJoinConId nx t c+                        <+> (text "element" <> ppConId nx c)+                        <+> text "-- FIXME: element is forward-declared"+    errmsg = text "\"Parse failed when expecting an element in the substitution group for\\n\\\n\\    <"+             <> ppXName n <> text ">,\\n\\\n\\  namely one of:\\n\\\n\\<"+             <> hcat (intersperse (text ">, <")+                                  (map (ppXName . fst) substgrp))+             <> text ">\""++----------------------------------------------------------------------------- -}++--------------------------------------------------------------------------------++-- | Generate an instance of the Extension class for a subtype/supertype pair.+ppExtension :: NameConverter -> XName -> XName -> Maybe XName -> Bool ->+               [Element] -> [Attribute] -> [Element] -> [Attribute] -> Doc+ppExtension nx t s fwdReqd abstractSuper oes oas es as =+    text "instance Extension" <+> ppUnqConId nx t <+> ppConId nx s+                              <+> text "where"+       $$ (if abstractSuper then+           nest 4 (text "supertype v" <+> text "="+                                      <+> ppJoinConId nx s t <+>+                                 --   (if isJust fwdReqd+                                 --    then text "(\\_-> v)" <+> ppFwdConId nx t+                                 --    else text "v")+                                      text "v")+           else+           nest 4 (text "supertype (" <> ppType t (oes++es) (oas++as)+                                      <> text ") ="+                                      $$ nest 11 (ppType s oes oas) ))+--  $$ (if isJust fwdReqd then+--     -- text "data" <+> fwd t <+> text "=" <+> fwd t $$  -- already defined+--        text ""+--        $$ text "-- | Proxy" <+> fwd t <+> text "was declared earlier in"+--                   <+> ppModId nx (fromJust fwdReqd)+--        $$ text "instance FwdDecl" <+> fwd t <+> ppConId nx t+--      else empty)+  where+    fwd name = ppFwdConId nx name+    ppType t es as = ppUnqConId nx t+                     <+> hsep (take (length as) [text ('a':show n) | n<-[0..]])+                     <+> hsep (take (length es) [text ('e':show n) | n<-[0..]])++-- | Generate an instance of the Extension class for a type and its+--   "grand"-supertype, that is, the supertype of its supertype.+ppSuperExtension :: NameConverter -> XName -> [XName]+                    -> (XName,Maybe XName) -> Doc+{-+ppSuperExtension nx super (grandSuper:_) (t,Nothing) =+    text "instance Extension" <+> ppUnqConId nx t <+> ppConId nx grandSuper+                              <+> text "where"+    $$ nest 4 (text "supertype = (supertype ::"+                                           <+> ppUnqConId nx super+                                           <+> text "->"+                                           <+> ppConId nx grandSuper <> text ")"+              $$ nest 12 (text ". (supertype ::"+                                           <+> ppUnqConId nx t+                                           <+> text "->"+                                           <+> ppConId nx super <> text ")"))+-}+ppSuperExtension nx super grandSupers (t,Just mod) =  -- fwddecl+    text "-- Note that" <+> ppUnqConId nx t+    <+> text "will be declared later in module" <+> ppModId nx mod+    $$ ppSuperExtension nx super grandSupers (t,Nothing)+ppSuperExtension nx super grandSupers (t,Nothing) =+    vcat (map (ppSuper t . reverse) (drop 2 . inits $ super: grandSupers))+  where+    ppSuper :: XName -> [XName] -> Doc+    ppSuper t gss@(gs:_) =+        text "instance Extension" <+> ppUnqConId nx t <+> ppConId nx gs+                                  <+> text "where"+        $$ nest 4 (text "supertype" <+>+                      ppvList "=" "." "" coerce (zip (tail gss++[t]) gss))+    coerce (a,b) = text "(supertype ::" <+> ppUnqConId nx a+                                        <+> text "->"+                                        <+> ppConId nx b <> text ")"++-- | Generate named fields from elements and attributes.+ppFields :: NameConverter -> XName -> [Element] -> [Attribute] -> Doc+ppFields nx t es as | null es && null as = empty+ppFields nx t es as =  ppvList "{" "," "}" id fields+  where+    fields = map (ppFieldAttribute nx t) as +++             zipWith (ppFieldElement nx t) es [0..]++-- | Generate a single named field (including type sig) from an element.+ppFieldElement :: NameConverter -> XName -> Element -> Int -> Doc+ppFieldElement nx t e@Element{} i = ppFieldName nx t e i+                                    <+> text "::" <+> ppElemTypeName nx id e+                                    $$ ppComment After (elem_comment e)+ppFieldElement nx t e@OneOf{}   i = ppFieldName nx t e i+                                    <+> text "::" <+> ppElemTypeName nx id e+                                    $$ ppCommentForChoice After (elem_comment e)+                                                                (elem_oneOf e)+ppFieldElement nx t e@AnyElem{} i = ppFieldName nx t e i+                                    <+> text "::" <+> ppElemTypeName nx id e+                                    $$ ppComment After (elem_comment e)+ppFieldElement nx t e@Text{}    i = ppFieldName nx t e i+                                    <+> text "::" <+> ppElemTypeName nx id e++-- | Generate a single named field (no type sig) from an element.+ppFieldName :: NameConverter -> XName -> Element -> Int -> Doc+ppFieldName nx t e@Element{} _ = ppFieldId nx t (elem_name e)+ppFieldName nx t e@OneOf{}   i = ppFieldId nx t (XName $ N $ "choice"++show i)+ppFieldName nx t e@AnyElem{} i = ppFieldId nx t (XName $ N $ "any"++show i)+ppFieldName nx t e@Text{}    i = ppFieldId nx t (XName $ N $ "text"++show i)++-- | What is the name of the type for an Element (or choice of Elements)?+ppElemTypeName :: NameConverter -> (Doc->Doc) -> Element -> Doc+ppElemTypeName nx brack e@Element{} =+    ppTypeModifier (elem_modifier e) brack $ ppConId nx (elem_type e)+ppElemTypeName nx brack e@OneOf{}   =+    brack $ ppTypeModifier (liftedElemModifier e) parens $+    text "OneOf" <> text (show (length (elem_oneOf e)))+     <+> hsep (map (ppSeq . cleanChoices) (elem_oneOf e))+  where+    ppSeq []  = text "()"+    ppSeq [e] = ppElemTypeName nx parens e+    ppSeq es  = text "(" <> hcat (intersperse (text ",")+                                     (map (ppElemTypeName nx parens) es))+                         <> text ")"+ppElemTypeName nx brack e@AnyElem{} =+    brack $ ppTypeModifier (elem_modifier e) id $+    text "AnyElement"+ppElemTypeName nx brack e@Text{} =+    text "String"++-- | Generate a single named field from an attribute.+ppFieldAttribute :: NameConverter -> XName -> Attribute -> Doc+ppFieldAttribute nx t a = ppFieldId nx t (attr_name a) <+> text "::"+                                   <+> (if attr_required a then empty+                                           else text "Maybe")+                                   <+> ppConId nx (attr_type a)+                          $$ ppComment After (attr_comment a)++-- | Generate a list or maybe type name (possibly parenthesised).+ppTypeModifier :: Modifier -> (Doc->Doc) -> Doc -> Doc+ppTypeModifier Single   _ d  = d+ppTypeModifier Optional k d  = k $ text "Maybe" <+> k d+ppTypeModifier (Range (Occurs Nothing Nothing))  _ d = d+ppTypeModifier (Range (Occurs (Just 0) Nothing)) k d = k $ text "Maybe" <+> k d+ppTypeModifier (Range (Occurs _ _))              _ d = text "[" <> d <> text "]"++-- | Generate a parser for a list or Maybe value.+ppElemModifier :: Modifier -> Doc -> Doc+ppElemModifier Single    doc = doc+ppElemModifier Optional  doc = text "optional" <+> parens doc+ppElemModifier (Range (Occurs Nothing Nothing))  doc = doc+ppElemModifier (Range (Occurs (Just 0) Nothing)) doc = text "optional"+                                                       <+> parens doc+ppElemModifier (Range (Occurs (Just 0) (Just n))) doc+               | n==maxBound = text "many" <+> parens doc+ppElemModifier (Range (Occurs Nothing  (Just n))) doc+               | n==maxBound = text "many1" <+> parens doc+ppElemModifier (Range (Occurs (Just 1) (Just n))) doc+               | n==maxBound = text "many1" <+> parens doc+ppElemModifier (Range o) doc = text "between" <+> (parens (text (show o))+                                                  $$ parens doc)++-- | Generate a toXML for a list or Maybe value.+xmlElemModifier :: Modifier -> Doc -> Doc+xmlElemModifier Single    doc = doc+xmlElemModifier Optional  doc = text "maybe []" <+> parens doc+xmlElemModifier (Range (Occurs Nothing Nothing))  doc = doc+xmlElemModifier (Range (Occurs (Just 0) Nothing)) doc = text "maybe []"+                                                        <+> parens doc+xmlElemModifier (Range (Occurs _ _)) doc = text "concatMap" <+> parens doc++-- | Eliminate a Maybe type modifier, when it occurs directly inside a+--   choice construct (since a parsed Nothing would always be preferred over+--   a real value later in the choice).  Likewise, empty lists must+--   be disallowed inside choice.+cleanChoices :: [Element] -> [Element]+cleanChoices [e@Element{}] = (:[]) $+    case elem_modifier e of+      Range (Occurs (Just 0) Nothing) -> e{elem_modifier=Single}+      Range (Occurs (Just 0) max)-> e{elem_modifier=Range (Occurs (Just 1) max)}+      _ -> e+cleanChoices es = es++-- | Sometimes, a choice without a type modifier contains element sequences,+--   all of which have the same modifier. In that case, it makes sense to lift+--   the modifier (typically Maybe) to the outer layer.+liftedElemModifier :: Element -> Modifier+liftedElemModifier e@OneOf{} =+    case elem_modifier e of+      Range (Occurs Nothing Nothing) -> newModifier+      Single -> newModifier+      m -> m+  where+    newModifier = if all (\x-> case x of+                                 Text -> True+                                 _ -> case elem_modifier x of+                                        Range (Occurs (Just 0) _) -> True+                                        Optional                  -> True+                                        _                         -> False)+                         (concat (elem_oneOf e))+                  then Optional+                  else Single++-- | Split long lines of comment text into a paragraph with a maximum width.+paragraph :: Int -> String -> String+paragraph n s = go n (words s)+    where go i []     = []+          go i [x]    | len<i     =       x+                      | otherwise = "\n"++x+              where len = length x+          go i (x:xs) | len<i     =       x++" "++go (i-len-1) xs+                      | otherwise = "\n"++x++" "++go (n-len-1) xs+              where len = length x++uniqueify :: [Element] -> [Element]+uniqueify = go []+  where+    go seen [] = []+    go seen (e@Element{}:es)+        | show (elem_name e) `elem` seen+                    = let fresh = new (`elem`seen) (elem_name e) in+                      e{elem_name=fresh} : go (show fresh:seen) es+        | otherwise = e: go (show (elem_name e): seen) es+    go seen (e:es)  = e : go seen es+    new pred (XName (N n))     = XName $ N $ head $+                                 dropWhile pred [n++show i | i <- [2..]]+    new pred (XName (QN ns n)) = XName $ QN ns $ head $+                                 dropWhile pred [n++show i | i <- [2..]]
+ src/Text/XML/HaXml/Schema/PrettyHsBoot.hs view
@@ -0,0 +1,445 @@+{-# LANGUAGE CPP #-}+-- | Pretty-print the internal Haskell model of XSD datatypes to a+--   Haskell hs-boot module containing only stub type declarations.+--   This approach is intended to work around issues of mutually recursive+--   datatype definitions.+module Text.XML.HaXml.Schema.PrettyHsBoot+  ( ppComment+  , ppModule+  , ppHighLevelDecl+  , ppHighLevelDecls+  , ppvList+  ) where++#if MIN_VERSION_base(4,11,0)+import Prelude hiding ((<>))+#endif++import Text.XML.HaXml.Types (QName(..),Namespace(..))+import Text.XML.HaXml.Schema.HaskellTypeModel+import Text.XML.HaXml.Schema.XSDTypeModel (Occurs(..))+import Text.XML.HaXml.Schema.NameConversion+import Text.PrettyPrint.HughesPJ as PP++import Data.List (intersperse,notElem,inits)+import Data.Maybe (isJust,fromJust,catMaybes)++-- | Vertically pretty-print a list of things, with open and close brackets,+--   and separators.+ppvList :: String -> String -> String -> (a->Doc) -> [a] -> Doc+ppvList open sep close pp []     = text open <> text close+ppvList open sep close pp (x:xs) = text open <+> pp x+                                   $$ vcat (map (\y-> text sep <+> pp y) xs)+                                   $$ text close++data CommentPosition = Before | After++-- | Generate aligned haddock-style documentation.+--   (but without escapes in comment text yet)+ppComment :: CommentPosition -> Comment -> Doc+ppComment _   Nothing  = empty+ppComment pos (Just s) =+    text "--" <+> text (case pos of Before -> "|"; After -> "^") <+> text c+    $$+    vcat (map (\x-> text "--  " <+> text x) cs)+  where+    (c:cs) = lines (paragraph 60 s)++-- | Pretty-print a Haskell-style name.+ppHName :: HName -> Doc+ppHName (HName x) = text x++-- | Pretty-print an XML-style name.+ppXName :: XName -> Doc+ppXName (XName (N x))     = text x+ppXName (XName (QN ns x)) = text (nsPrefix ns) <> text ":" <> text x++-- | Some different ways of using a Haskell identifier.+ppModId, ppConId, ppVarId, ppUnqConId, ppUnqVarId, ppFwdConId+    :: NameConverter -> XName -> Doc+ppModId nx = ppHName . modid nx+ppConId nx = ppHName . conid nx+ppVarId nx = ppHName . varid nx+ppUnqConId nx = ppHName . unqconid nx+ppUnqVarId nx = ppHName . unqvarid nx+ppFwdConId nx = ppHName . fwdconid nx++ppJoinConId, ppFieldId :: NameConverter -> XName -> XName -> Doc+ppJoinConId nx p q = ppHName (conid nx p) <> text "_" <> ppHName (conid nx q)+ppFieldId   nx t   = ppHName . fieldid nx t++-- | Convert a whole document from HaskellTypeModel to Haskell source text.+ppModule :: NameConverter -> Module -> Doc+ppModule nx m =+    text "{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies #-}"+    $$ text "{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}"+    $$ text "module" <+> ppModId nx (module_name m)+    $$ nest 2 (text "( module" <+> ppModId nx (module_name m)+              $$ vcat (map (\(XSDInclude ex com)->+                               ppComment Before com+                               $$ text ", module" <+> ppModId nx ex)+                           (module_re_exports m))+              $$ text ") where")+    $$ text " "+    $$ text "import Text.XML.HaXml.Schema.Schema (SchemaType(..),SimpleType(..),Extension(..),Restricts(..))"+    $$ text "import Text.XML.HaXml.Schema.Schema as Schema"+    $$ (case module_xsd_ns m of+         Nothing -> text "import Text.XML.HaXml.Schema.PrimitiveTypes as Xsd"+         Just ns -> text "import qualified Text.XML.HaXml.Schema.PrimitiveTypes as"<+>ppConId nx ns)+    $$ vcat (map (ppHighLevelDecl nx)+                 (module_re_exports m {-++ module_import_only m-}))+    $$ text " "+    $$ ppHighLevelDecls nx (module_decls m)++-- | Generate a fragmentary parser for an attribute.+ppAttr :: Attribute -> Int -> Doc+ppAttr a n = (text "a"<>text (show n)) <+> text "<- getAttribute \""+                                       <> ppXName (attr_name a)+                                       <> text "\" e pos"+-- | Generate a fragmentary parser for an element.+ppElem :: NameConverter -> Element -> Doc+ppElem nx e@Element{}+    | elem_byRef e    = ppElemModifier (elem_modifier e)+                                       (text "element"+                                        <> ppUnqConId nx (elem_name e))+    | otherwise       = ppElemModifier (elem_modifier e)+                                       (text "parseSchemaType \""+                                        <> ppXName (elem_name e)+                                        <> text "\"")+ppElem nx e@AnyElem{} = ppElemModifier (elem_modifier e)+                          (text "parseAnyElement")+ppElem nx e@Text{}    = text "parseText"+ppElem nx e@OneOf{}   = ppElemModifier (elem_modifier e)+                          (text "oneOf" <+> ppvList "[" "," "]"+                                                    (ppOneOf n)+                                                    (zip (elem_oneOf e) [1..n]))+  where+    n = length (elem_oneOf e)+    ppOneOf n (e,i) = text "fmap" <+> text (ordinal i ++"Of"++show n)+                      <+> parens (ppSeqElem e)+    ordinal i | i <= 20   = ordinals!!i+              | otherwise = "Choice" ++ show i+    ordinals = ["Zero","One","Two","Three","Four","Five","Six","Seven","Eight"+               ,"Nine","Ten","Eleven","Twelve","Thirteen","Fourteen","Fifteen"+               ,"Sixteen","Seventeen","Eighteen","Nineteen","Twenty"]+    ppSeqElem []  = PP.empty+    ppSeqElem [e] = ppElem nx e+    ppSeqElem es  = text ("return ("++replicate (length es-1) ','++")")+                    <+> vcat (map (\e-> text "`apply`" <+> ppElem nx e) es)++-- | Convert multiple HaskellTypeModel Decls to Haskell source text.+ppHighLevelDecls :: NameConverter -> [Decl] -> Doc+ppHighLevelDecls nx hs = vcat (intersperse (text " ")+                                           (map (ppHighLevelDecl nx) hs))++-- | Convert a single Haskell Decl into Haskell source text.+ppHighLevelDecl :: NameConverter -> Decl -> Doc++ppHighLevelDecl nx (NamedSimpleType t s comm) =+    ppComment Before comm+    $$ text "type" <+> ppUnqConId nx t <+> text "=" <+> ppConId nx s+    $$ text "-- No instances required: synonym is isomorphic to the original."++ppHighLevelDecl nx (RestrictSimpleType t s r comm) =+    ppComment Before comm+    $$ text "newtype" <+> ppUnqConId nx t <+> text "="+                      <+> ppUnqConId nx t <+> ppConId nx s+    $$ text "instance Eq" <+> ppUnqConId nx t+    $$ text "instance Show" <+> ppUnqConId nx t+    $$ text "instance Restricts" <+> ppUnqConId nx t <+> ppConId nx s+    $$ text "instance SchemaType" <+> ppUnqConId nx t+    $$ text "instance SimpleType" <+> ppUnqConId nx t++ppHighLevelDecl nx (ExtendSimpleType t s as comm) =+    ppComment Before comm+    $$ text "data" <+> ppUnqConId nx t+    $$ text "data" <+> ppConId nx t_attrs+    $$ text "instance Eq" <+> ppUnqConId nx t+    $$ text "instance Eq" <+> ppConId nx t_attrs+    $$ text "instance Show" <+> ppUnqConId nx t+    $$ text "instance Show" <+> ppConId nx t_attrs+    $$ text "instance SchemaType" <+> ppUnqConId nx t+    $$ text "instance Extension"  <+> ppUnqConId nx t <+> ppConId nx s+  where+    t_attrs = let (XName (N t_base)) = t in XName (N (t_base++"Attributes"))++ppHighLevelDecl nx (UnionSimpleTypes t sts comm) =+    ppComment Before comm+    $$ text "data" <+> ppUnqConId nx t <+> text "=" <+> ppUnqConId nx t+    $$ text "-- Placeholder for a Union type, not yet implemented."++ppHighLevelDecl nx (EnumSimpleType t [] comm) =+    ppComment Before comm+    $$ text "data" <+> ppUnqConId nx t+ppHighLevelDecl nx (EnumSimpleType t is comm) =+    ppComment Before comm+    $$ text "data" <+> ppUnqConId nx t+    $$ text "instance Eq" <+> ppUnqConId nx t+    $$ text "instance Show" <+> ppUnqConId nx t+    $$ text "instance Enum" <+> ppUnqConId nx t+    $$ text "instance SchemaType" <+> ppUnqConId nx t+    $$ text "instance SimpleType" <+> ppUnqConId nx t++ppHighLevelDecl nx (ElementsAttrs t es as comm) =+    ppComment Before comm+    $$ text "data" <+> ppUnqConId nx t+    $$ text "instance Eq" <+> ppUnqConId nx t+    $$ text "instance Show" <+> ppUnqConId nx t+    $$ text "instance SchemaType" <+> ppUnqConId nx t++ppHighLevelDecl nx (ElementsAttrsAbstract t insts comm) =+    ppComment Before comm+    $$ text "data" <+> ppUnqConId nx t+    $$ text "instance Eq" <+> ppUnqConId nx t+    $$ text "instance Show" <+> ppUnqConId nx t+    $$ text "instance SchemaType" <+> ppUnqConId nx t++ppHighLevelDecl nx (ElementOfType e@Element{}) =+    ppComment Before (elem_comment e)+    $$ (text "element" <> ppUnqConId nx (elem_name e)) <+> text "::"+        <+> text "XMLParser" <+> ppConId nx (elem_type e)+    $$ (text "elementToXML" <> ppUnqConId nx (elem_name e)) <+> text "::"+        <+> ppConId nx (elem_type e) <+> text "-> [Content ()]"+++ppHighLevelDecl nx e@(ElementAbstractOfType n t substgrp comm)+    | any notInScope substgrp+                = (text "element" <> ppUnqConId nx n) <+> text "::"+                      <+> text "XMLParser" <+> ppConId nx t+                $$ (text "elementToXML" <> ppUnqConId nx n) <+> text "::"+                    <+> ppConId nx t <+> text "-> [Content ()]"+    | otherwise = ppElementAbstractOfType nx e+  where+    notInScope (_,Just _)  = True+    notInScope (_,Nothing) = False++ppHighLevelDecl nx (Choice t es comm) =+    ppComment Before comm+    $$ text "data" <+> ppUnqConId nx t+    $$ text "instance Eq" <+> ppUnqConId nx t+    $$ text "instance Show" <+> ppUnqConId nx t++-- Comment out the Group for now.  Groups get inlined into the ComplexType+-- where they are used, so it may not be sensible to declare them separately+-- as well.+ppHighLevelDecl nx (Group t es comm) = PP.empty+--  ppComment Before comm+--  $$ text "data" <+> ppConId nx t <+> text "="+--                 <+> ppConId nx t <+> hsep (map (ppConId nx . elem_type) es)++-- Possibly we want to declare a really more restrictive type, e.g.+--    to remove optionality, (Maybe Foo) -> (Foo), [Foo] -> Foo+--    consequently the "restricts" method should do a proper translation,+--    not merely an unwrapping.+ppHighLevelDecl nx (RestrictComplexType t s comm) =+    ppComment Before comm+    $$ text "newtype" <+> ppUnqConId nx t <+> text "="+                                       <+> ppUnqConId nx t <+> ppConId nx s+    $$ text "-- plus different (more restrictive) parser"+    $$ text "instance Eq" <+> ppUnqConId nx t+    $$ text "instance Show" <+> ppUnqConId nx t+    $$ text "instance Restricts" <+> ppUnqConId nx t <+> ppConId nx s+    $$ text "instance SchemaType" <+> ppUnqConId nx t++{-+ppHighLevelDecl nx (ExtendComplexType t s es as _ comm)+    | length es + length as = 1 =+    ppComment Before comm+    $$ text "data" <+> ppConId nx t <+> text "="+                                    <+> ppConId nx t <+> ppConId nx s+                                    <+> ppFields nx t es as+    $$ text "instance Extension" <+> ppConId nx t <+> ppConId nx s+                                 <+> ppAuxConId nx t <+> text "where"+        $$ nest 4 (text "supertype (" <> ppConId nx t <> text " s e) = s"+                   $$ text "extension (" <> ppConId nx t <> text " s e) = e")+-}++ppHighLevelDecl nx (ExtendComplexType t s oes oas es as+                                      fwdReqd absSup grandsuper comm) =+    ppHighLevelDecl nx (ElementsAttrs t (oes++es) (oas++as) comm)+    $$ ppExtension nx t s fwdReqd absSup oes oas es as+    $$ (if not (null grandsuper) -- && not (isJust fwdReqd)+        then ppSuperExtension nx s grandsuper (t,Nothing)+        else empty)++ppHighLevelDecl nx (ExtendComplexTypeAbstract t s insts+                                              fwdReqd grandsuper comm) =+    ppHighLevelDecl nx (ElementsAttrsAbstract t insts comm)+    $$ ppExtension nx t s fwdReqd True [] [] [] []+--  $$ if not (null grandsuper)+--     then vcat (map (ppSuperExtension nx t grandsuper) insts)+--                     -- FIXME some instances are missing!+--     else empty++ppHighLevelDecl nx (XSDInclude m comm) =+    ppComment After comm+    $$ text "import {-# SOURCE #-}" <+> ppModId nx m++ppHighLevelDecl nx (XSDImport m ma comm) =+    ppComment After comm+    $$ text "import {-# SOURCE #-}" <+> ppModId nx m+                     <+> maybe empty (\a->text "as"<+>ppConId nx a) ma++ppHighLevelDecl nx (XSDComment comm) =+    ppComment Before comm++--------------------------------------------------------------------------------++-- | Instances that depend on FwdDecl'd types, need to be declared in a+--   different module.  So they have been separated out from ppHighLevelDecl.+ppHighLevelInstances :: NameConverter -> Decl -> Doc+ppHighLevelInstances nx (ElementsAttrsAbstract t insts comm) =+    text "instance SchemaType" <+> ppUnqConId nx t++ppHighLevelInstances nx e@(ElementAbstractOfType n t substgrp comm)+    | any notInScope substgrp = ppElementAbstractOfType nx e+    | otherwise = empty+  where+    notInScope (_,Just _)  = True+    notInScope (_,Nothing) = False++ppHighLevelInstances nx (ExtendComplexType t s oes oas es as+                                      fwdReqd absSup grandsuper comm) =+    empty+--  ppExtension nx t s fwdReqd absSup oes oas es as+--  $$ (if not (null grandsuper) && isJust fwdReqd+--      then ppSuperExtension nx s grandsuper (t,Nothing)+--      else empty)++ppHighLevelInstances nx (ExtendComplexTypeAbstract t s insts+                                                   fwdReqd grandsuper comm) =+    ppHighLevelInstances nx (ElementsAttrsAbstract t insts comm)+--  $$ ppExtension nx t s fwdReqd True [] [] [] []+--  $$ if not (null grandsuper)+--     then vcat (map (ppSuperExtension nx t grandsuper) insts)+--                     -- FIXME some instances are missing!+--     else empty++ppElementAbstractOfType nx (ElementAbstractOfType n t substgrp comm) =+    ppComment Before comm+    $$ (text "element" <> ppUnqConId nx n) <+> text "::"+        <+> text "XMLParser" <+> ppConId nx t++--------------------------------------------------------------------------------++-- | Generate an instance of the Extension class for a subtype/supertype pair.+ppExtension :: NameConverter -> XName -> XName -> Maybe XName -> Bool ->+               [Element] -> [Attribute] -> [Element] -> [Attribute] -> Doc+ppExtension nx t s fwdReqd abstractSuper oes oas es as =+    text "instance Extension" <+> ppUnqConId nx t <+> ppConId nx s++-- | Generate an instance of the Extension class for a type and its+--   "grand"-supertype, that is, the supertype of its supertype.+ppSuperExtension :: NameConverter -> XName -> [XName]+                    -> (XName,Maybe XName) -> Doc+{-+ppSuperExtension nx super (grandSuper:_) (t,Nothing) =+    text "instance Extension" <+> ppUnqConId nx t <+> ppConId nx grandSuper+                              <+> text "where"+    $$ nest 4 (text "supertype = (supertype ::"+                                           <+> ppUnqConId nx super+                                           <+> text "->"+                                           <+> ppConId nx grandSuper <> text ")"+              $$ nest 12 (text ". (supertype ::"+                                           <+> ppUnqConId nx t+                                           <+> text "->"+                                           <+> ppConId nx super <> text ")"))+-}+ppSuperExtension nx super (grandSuper:_) (t,Just mod) =  -- fwddecl+    -- FIXME: generate comment for all of the grandSupers.+    text "-- instance Extension" <+> ppUnqConId nx t <+> ppConId nx grandSuper+    $$ text "--   will be declared in module" <+> ppModId nx mod+ppSuperExtension nx super grandSupers (t,Nothing) =+    vcat (map (ppSuper t . reverse) (drop 2 . inits $ super: grandSupers))+  where+    ppSuper :: XName -> [XName] -> Doc+    ppSuper t gss@(gs:_) =+        text "instance Extension" <+> ppUnqConId nx t <+> ppConId nx gs++-- | Generate named fields from elements and attributes.+ppFields :: NameConverter -> XName -> [Element] -> [Attribute] -> Doc+ppFields nx t es as | null es && null as = empty+ppFields nx t es as =  ppvList "{" "," "}" id fields+  where+    fields = map (ppFieldAttribute nx t) as +++             zipWith (ppFieldElement nx t) es [0..]++-- | Generate a single named field from an element.+ppFieldElement :: NameConverter -> XName -> Element -> Int -> Doc+ppFieldElement nx t e@Element{} _ = ppFieldId nx t (elem_name e)+                                        <+> text "::" <+> ppElemTypeName nx id e+                                    $$ ppComment After (elem_comment e)+ppFieldElement nx t e@OneOf{}   i = ppFieldId nx t (XName $ N $ "choice"++show i)+                                        <+> text "::" <+> ppElemTypeName nx id e+                                    $$ ppComment After (elem_comment e)+ppFieldElement nx t e@AnyElem{} i = ppFieldId nx t (XName $ N $ "any"++show i)+                                        <+> text "::" <+> ppElemTypeName nx id e+                                    $$ ppComment After (elem_comment e)+ppFieldElement nx t e@Text{}    i = ppFieldId nx t (XName $ N $ "text"++show i)+                                        <+> text "::" <+> ppElemTypeName nx id e++-- | What is the name of the type for an Element (or choice of Elements)?+ppElemTypeName :: NameConverter -> (Doc->Doc) -> Element -> Doc+ppElemTypeName nx brack e@Element{} =+    ppTypeModifier (elem_modifier e) brack $ ppConId nx (elem_type e)+ppElemTypeName nx brack e@OneOf{}   =+    brack $ ppTypeModifier (elem_modifier e) parens $+    text "OneOf" <> text (show (length (elem_oneOf e)))+     <+> hsep (map ppSeq (elem_oneOf e))+  where+    ppSeq []  = text "()"+    ppSeq [e] = ppElemTypeName nx parens e+    ppSeq es  = text "(" <> hcat (intersperse (text ",")+                                     (map (ppElemTypeName nx parens) es))+                         <> text ")"+ppElemTypeName nx brack e@AnyElem{} =+    brack $ ppTypeModifier (elem_modifier e) id $+    text "AnyElement"+ppElemTypeName nx brack e@Text{} =+    text "String"++-- | Generate a single named field from an attribute.+ppFieldAttribute :: NameConverter -> XName -> Attribute -> Doc+ppFieldAttribute nx t a = ppFieldId nx t (attr_name a) <+> text "::"+                                   <+> ppConId nx (attr_type a)+                          $$ ppComment After (attr_comment a)++-- | Generate a list or maybe type name (possibly parenthesised).+ppTypeModifier :: Modifier -> (Doc->Doc) -> Doc -> Doc+ppTypeModifier Single   _ d  = d+ppTypeModifier Optional k d  = k $ text "Maybe" <+> k d+ppTypeModifier (Range (Occurs Nothing Nothing))  _ d = d+ppTypeModifier (Range (Occurs (Just 0) Nothing)) k d = k $ text "Maybe" <+> k d+ppTypeModifier (Range (Occurs _ _))              _ d = text "[" <> d <> text "]"++-- | Generate a parser for a list or Maybe value.+ppElemModifier Single    doc = doc+ppElemModifier Optional  doc = text "optional" <+> parens doc+ppElemModifier (Range (Occurs Nothing Nothing))  doc = doc+ppElemModifier (Range (Occurs (Just 0) Nothing)) doc = text "optional"+                                                       <+> parens doc+ppElemModifier (Range o) doc = text "between" <+> (parens (text (show o))+                                                  $$ parens doc)++-- | Split long lines of comment text into a paragraph with a maximum width.+paragraph :: Int -> String -> String+paragraph n s = go n (words s)+    where go i []     = []+          go i (x:xs) | len<i     =       x++" "++go (i-len-1) xs+                      | otherwise = "\n"++x++" "++go (n-len-1) xs+              where len = length x++uniqueify :: [Element] -> [Element]+uniqueify = go []+  where+    go seen [] = []+    go seen (e@Element{}:es)+        | show (elem_name e) `elem` seen+                    = let fresh = new (`elem`seen) (elem_name e) in+                      e{elem_name=fresh} : go (show fresh:seen) es+        | otherwise = e: go (show (elem_name e): seen) es+    go seen (e:es)  = e : go seen es+    new pred (XName (N n))     = XName $ N $ head $+                                 dropWhile pred [n++show i | i <- [2..]]+    new pred (XName (QN ns n)) = XName $ QN ns $ head $+                                 dropWhile pred [n++show i | i <- [2..]]
+ src/Text/XML/HaXml/Schema/PrimitiveTypes.hs view
@@ -0,0 +1,302 @@+{-# LANGUAGE TypeSynonymInstances #-}+module Text.XML.HaXml.Schema.PrimitiveTypes+  ( -- * Type class for parsing simpleTypes+    SimpleType(..)+  , module Text.Parse+  , -- * Primitive XSD datatypes+    XsdString(..)+  , Boolean(..)+  , Base64Binary(..)+  , HexBinary(..)+  , Float(..)+  , Decimal(..)+  , Double(..)+  , AnyURI(..)+  , QName(..)+  , NOTATION(..)+  , Duration(..)+  , DateTime(..)+  , Time(..)+  , Date(..)+  , GYearMonth(..)+  , GYear(..)+  , GMonthDay(..)+  , GDay(..)+  , GMonth(..)+  , -- * Derived, yet builtin, datatypes+    NormalizedString(..)+  , Token(..)+  , Language(..)+  , Name(..)+  , NCName(..)+  , ID(..)+  , IDREF(..)+  , IDREFS(..)+  , ENTITY(..)+  , ENTITIES(..)+  , NMTOKEN(..)+  , NMTOKENS(..)+  , Integer(..)+  , NonPositiveInteger(..)+  , NegativeInteger(..)+  , Long(..)+  , Int(..)+  , Short(..)+  , Byte(..)+  , NonNegativeInteger(..)+  , UnsignedLong(..)+  , UnsignedInt(..)+  , UnsignedShort(..)+  , UnsignedByte(..)+  , PositiveInteger(..)+  ) where++import Text.Parse+import Data.Char as Char+--import Data.Time.LocalTime -- for dates and times?+import Text.XML.HaXml.Types (QName(..))+import Data.Int+import Data.Word++-- | Ultimately, an XML parser will find some plain text as the content+--   of a simpleType, which will need to be parsed.  We use a TextParser,+--   because values of simpleTypes can also be given elsewhere, e.g. as+--   attribute values in an XSD definition, e.g. to restrict the permissible+--   values of the simpleType.  Such restrictions are therefore implemented+--   as layered parsers.+class SimpleType a where+  acceptingParser :: TextParser a+  simpleTypeText  :: a -> String++-- * Primitive types++type Boolean      = Bool+newtype XsdString = XsdString    String    deriving (Eq,Show)+data Base64Binary = Base64Binary String    deriving (Eq,Show)+data HexBinary    = HexBinary    String    deriving (Eq,Show)+data AnyURI       = AnyURI       String    deriving (Eq,Show)+--data QName+data NOTATION     = NOTATION String -- or re-use NOTATION from HaXml.Types?+                                           deriving (Eq,Show)+data Decimal      = Decimal Double         deriving (Eq,Show)+--data Float+--data Double+data Duration     = Duration Bool Int Int Int Int Int Float  deriving (Eq,Show)++-- * All of the following temporal types are incompletely specified for now.+--   They should probably be mapped to something appropriate from the time+--   package?++data DateTime     = DateTime String        deriving (Eq,Show) -- LocalTime ?+data Time         = Time String            deriving (Eq,Show) -- TimeOfDay ?+data Date         = Date String            deriving (Eq,Show) -- Day ?+data GYearMonth   = GYearMonth String      deriving (Eq,Show) -- ??+data GYear        = GYear String           deriving (Eq,Show) -- ??+data GMonthDay    = GMonthDay String       deriving (Eq,Show) -- ??+data GDay         = GDay String            deriving (Eq,Show) -- ??+data GMonth       = GMonth String          deriving (Eq,Show) -- ??++isNext :: Char -> TextParser Char+isNext c = do d <- next+              if c==d then return c else fail ("expected "++c:", got "++d:".")++instance SimpleType Bool where+    acceptingParser = do w <- word+                         case w of "true"  -> return True;+                                   "false" -> return False+                                   "0"     -> return False;+                                   "1"     -> return True+                                   _       -> fail ("Not a bool: "++w)+    simpleTypeText False = "false"+    simpleTypeText True  = "true"+instance SimpleType XsdString where+    acceptingParser = fmap XsdString (many next)+    simpleTypeText (XsdString s) = s+instance SimpleType Base64Binary where+    acceptingParser = fmap Base64Binary (many (satisfy isAlphaNum `onFail`+                                               satisfy isSpace `onFail`+                                               satisfy (`elem`"+/=")))+    simpleTypeText (Base64Binary s) = s+instance SimpleType HexBinary where+    acceptingParser = fmap HexBinary (many (satisfy Char.isHexDigit))+    simpleTypeText (HexBinary s) = s+instance SimpleType AnyURI where+    acceptingParser = fmap AnyURI (many next) -- not very satisfactory+    simpleTypeText (AnyURI s) = s+instance SimpleType NOTATION where+    acceptingParser = fmap NOTATION (many next) -- not very satisfactory+    simpleTypeText (NOTATION s) = s++instance SimpleType Decimal where+    acceptingParser = fmap Decimal parse+    simpleTypeText (Decimal s) = show s -- XXX FIXME: showGFloat?+instance SimpleType Float where+    acceptingParser  = parse+    simpleTypeText x = show x           -- XXX FIXME: showGFloat?+instance SimpleType Double where+    acceptingParser  = parse+    simpleTypeText x = show x           -- XXX FIXME: showGFloat?++instance SimpleType Duration where+    acceptingParser = return Duration `apply` (do isNext '-'; return False+                                               `onFail` return True)+                                      `discard` isNext 'P'+                                      `apply` ((parseDec `discard` isNext 'Y')+                                               `onFail` return 0)+                                      `apply` ((parseDec `discard` isNext 'M')+                                               `onFail` return 0)+                                      `apply` ((parseDec `discard` isNext 'D')+                                               `onFail` return 0)+                                      `discard` (isNext 'T'`onFail`return 'T')+                                      -- fix: T absent iff H:M:S absent also+                                      `apply` ((parseDec `discard` isNext 'H')+                                               `onFail` return 0)+                                      `apply` ((parseDec `discard` isNext 'M')+                                               `onFail` return 0)+                                      `apply` ((parseFloat `discard` isNext 'S')+                                               `onFail` return 0)+    simpleTypeText (Duration pos 0 0 0 0 0 0) = (if pos then "" else "-")++"PT0S"+    simpleTypeText (Duration pos y m d h n s) =+        (if pos then "" else "-")++"P"++showUnit y 'Y'++showUnit m 'M'++showUnit d 'D'++showTime+      where+        showUnit :: (Num a,Eq a,Show a) => a -> Char -> String+        showUnit n u = if n == 0 then "" else show n ++ [u]+        showTime = if (h,n,s) == (0,0,0) then "" else "T"++showUnit h 'H'++showUnit n 'M'++showUnit s 'S'+instance SimpleType DateTime where+    acceptingParser = fmap DateTime (many next)+ -- acceptingParser = fail "not implemented: simpletype parser for DateTime"+    simpleTypeText (DateTime x) = x+instance SimpleType Time where+    acceptingParser = fmap Time (many next)+ -- acceptingParser = fail "not implemented: simpletype parser for Time"+    simpleTypeText (Time x) = x+instance SimpleType Date where+    acceptingParser = fmap Date (many next)+ -- acceptingParser = fail "not implemented: simpletype parser for Date"+    simpleTypeText (Date x) = x+instance SimpleType GYearMonth where+    acceptingParser = fmap GYearMonth (many next)+ -- acceptingParser = fail "not implemented: simpletype parser for GYearMonth"+    simpleTypeText (GYearMonth x) = x+instance SimpleType GYear where+    acceptingParser = fmap GYear (many next)+ -- acceptingParser = fail "not implemented: simpletype parser for GYear"+    simpleTypeText (GYear x) = x+instance SimpleType GMonthDay where+    acceptingParser = fmap GMonthDay (many next)+ -- acceptingParser = fail "not implemented: simpletype parser for GMonthDay"+    simpleTypeText (GMonthDay x) = x+instance SimpleType GDay where+    acceptingParser = fmap GDay (many next)+ -- acceptingParser = fail "not implemented: simpletype parser for GDay"+    simpleTypeText (GDay x) = x+instance SimpleType GMonth where+    acceptingParser = fmap GMonth (many next)+ -- acceptingParser = fail "not implemented: simpletype parser for GMonth"+    simpleTypeText (GMonth x) = x++-- * Derived builtin types++newtype NormalizedString = Normalized String    deriving (Eq,Show)+newtype Token    = Token    String              deriving (Eq,Show)+newtype Language = Language String              deriving (Eq,Show)+newtype Name     = Name     String              deriving (Eq,Show)+newtype NCName   = NCName   String              deriving (Eq,Show)+newtype ID       = ID       String              deriving (Eq,Show)+newtype IDREF    = IDREF    String              deriving (Eq,Show)+newtype IDREFS   = IDREFS   String              deriving (Eq,Show)+newtype ENTITY   = ENTITY   String              deriving (Eq,Show)+newtype ENTITIES = ENTITIES String              deriving (Eq,Show)+newtype NMTOKEN  = NMTOKEN  String              deriving (Eq,Show)+newtype NMTOKENS = NMTOKENS String              deriving (Eq,Show)++instance SimpleType NormalizedString where+    acceptingParser = fmap Normalized (many next)+    simpleTypeText (Normalized x) = x+instance SimpleType Token where+    acceptingParser = fmap Token (many next)+    simpleTypeText (Token x) = x+instance SimpleType Language where+    acceptingParser = fmap Language (many next)+    simpleTypeText (Language x) = x+instance SimpleType Name where+    acceptingParser = fmap Name (many next)+    simpleTypeText (Name x) = x+instance SimpleType NCName where+    acceptingParser = fmap NCName (many next)+    simpleTypeText (NCName x) = x+instance SimpleType ID where+    acceptingParser = fmap ID (many next)+    simpleTypeText (ID x) = x+instance SimpleType IDREF where+    acceptingParser = fmap IDREF (many next)+    simpleTypeText (IDREF x) = x+instance SimpleType IDREFS where+    acceptingParser = fmap IDREFS (many next)+    simpleTypeText (IDREFS x) = x+instance SimpleType ENTITY where+    acceptingParser = fmap ENTITY (many next)+    simpleTypeText (ENTITY x) = x+instance SimpleType ENTITIES where+    acceptingParser = fmap ENTITIES (many next)+    simpleTypeText (ENTITIES x) = x+instance SimpleType NMTOKEN where+    acceptingParser = fmap NMTOKEN (many next)+    simpleTypeText (NMTOKEN x) = x+instance SimpleType NMTOKENS where+    acceptingParser = fmap NMTOKENS (many next)+    simpleTypeText (NMTOKENS x) = x++--data Integer+newtype NonPositiveInteger = NonPos   Integer   deriving (Eq,Show)+newtype NegativeInteger    = Negative Integer   deriving (Eq,Show)+newtype Long               = Long     Int64     deriving (Eq,Show)+--data Int+newtype Short              = Short    Int16     deriving (Eq,Show)+newtype Byte               = Byte     Int8      deriving (Eq,Show)+newtype NonNegativeInteger = NonNeg   Integer   deriving (Eq,Show)+newtype UnsignedLong       = ULong    Word64    deriving (Eq,Show)+newtype UnsignedInt        = UInt     Word32    deriving (Eq,Show)+newtype UnsignedShort      = UShort   Word16    deriving (Eq,Show)+newtype UnsignedByte       = UByte    Word8     deriving (Eq,Show)+newtype PositiveInteger    = Positive Integer   deriving (Eq,Show)++instance SimpleType Integer where+    acceptingParser = parse+    simpleTypeText  = show+instance SimpleType NonPositiveInteger where+    acceptingParser = fmap NonPos parse+    simpleTypeText (NonPos x) = show x+instance SimpleType NegativeInteger where+    acceptingParser = fmap Negative parse+    simpleTypeText (Negative x) = show x+instance SimpleType Long where+    acceptingParser = fmap (Long . fromInteger) parse+    simpleTypeText (Long x) = show x+instance SimpleType Int where+    acceptingParser = parse+    simpleTypeText  = show+instance SimpleType Short where+    acceptingParser = fmap (Short . fromInteger) parse+    simpleTypeText (Short x) = show x+instance SimpleType Byte where+    acceptingParser = fmap (Byte . fromInteger) parse+    simpleTypeText (Byte x) = show x+instance SimpleType NonNegativeInteger where+    acceptingParser = fmap NonNeg parse+    simpleTypeText (NonNeg x) = show x+instance SimpleType UnsignedLong where+    acceptingParser = fmap (ULong . fromInteger) parse+    simpleTypeText (ULong x) = show x+instance SimpleType UnsignedInt where+    acceptingParser = fmap (UInt . fromInteger) parse+    simpleTypeText (UInt x) = show x+instance SimpleType UnsignedShort where+    acceptingParser = fmap (UShort . fromInteger) parse+    simpleTypeText (UShort x) = show x+instance SimpleType UnsignedByte where+    acceptingParser = fmap (UByte . fromInteger) parse+    simpleTypeText (UByte x) = show x+instance SimpleType PositiveInteger where+    acceptingParser = fmap Positive parse+    simpleTypeText (Positive x) = show x
+ src/Text/XML/HaXml/Schema/Schema.hs view
@@ -0,0 +1,251 @@+{-# LANGUAGE CPP, FunctionalDependencies,+             TypeSynonymInstances, ExistentialQuantification #-}+module Text.XML.HaXml.Schema.Schema+  ( SchemaType(..)+  , SimpleType(..) -- already exported by PrimitiveTypes+  , Extension(..)+  , Restricts(..)+  , FwdDecl(..)+  , getAttribute+  , between+  , Occurs(..)+  , parseSimpleType+  , parseText+  , AnyElement(..)+  , parseAnyElement+--  , module Text.XML.HaXml.XmlContent.Parser -- no, just the things below+  , Content(..)+  , XMLParser(..)+  , posnElement+  , posnElementWith+  , element+  , interior+  , text+  , module Text.ParserCombinators.Poly+  , module Text.Parse+--  , module Text.XML.HaXml.Schema.PrimitiveTypes+  , module Text.XML.HaXml.OneOfN+  , toXMLElement+  , toXMLText+  , toXMLAnyElement+  , toXMLAttribute+  , addXMLAttributes+  ) where++import Control.Monad (void)+import Text.ParserCombinators.Poly+import Text.Parse++import Text.XML.HaXml.Types+import Text.XML.HaXml.Posn+import Text.XML.HaXml.Namespaces (printableName)+import Text.XML.HaXml.XmlContent.Parser hiding (Document,Reference)+import Text.XML.HaXml.Schema.XSDTypeModel (Occurs(..))+import Text.XML.HaXml.Schema.PrimitiveTypes as Prim+import Text.XML.HaXml.OneOfN+import Text.XML.HaXml.Verbatim++-- | A SchemaType promises to interconvert between a generic XML+--   content tree and a Haskell value, according to the rules of XSD.+class SchemaType a where+    parseSchemaType :: String -> XMLParser a+    schemaTypeToXML :: String -> a -> [Content ()]++-- | A type t can extend another type s by the addition of extra elements+--   and/or attributes.  s is therefore the supertype of t.+class Extension t s {- - | t -> s -} where  -- fundep ill-advised.+    supertype :: t -> s++-- | A type t can restrict another type s, that is, t admits fewer values+--   than s, but all the values t does admit also belong to the type s.+class Restricts t s | t -> s where+    restricts :: t -> s++-- | A trick to enable forward-declaration of a type that will be defined+--   properly in another module, higher in the dependency graph. 'fd' is+--   a dummy type e.g. the empty @data FwdA@, where 'a' is the proper+--   @data A@, not yet available.+class FwdDecl fd a | fd -> a++-- | Given a TextParser for a SimpleType, make it into an XMLParser, i.e.+--   consuming textual XML content as input rather than a String.+parseSimpleType :: SimpleType t => XMLParser t+parseSimpleType = do s <- text `onFail` return ""+                     case runParser acceptingParser s of+                       (Left err, _) -> fail err+                       (Right v, "") -> return v+                       (Right v, _)  -> return v -- ignore trailing text++-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --++-- | Between is a list parser that tries to ensure that any range+--   specification (min and max elements) is obeyed when parsing.+between :: PolyParse p => Occurs -> p a -> p [a]+between (Occurs Nothing  Nothing)  p = fmap (:[]) p+between (Occurs (Just i) Nothing)  p = return (++) `apply` exactly i p+                                                   `apply` many p+between (Occurs Nothing  (Just j)) p = upto j p+between (Occurs (Just i) (Just j)) p = return (++) `apply` exactly i p+                                                   `apply` upto (j-i) p++-- | Generated parsers will use 'getAttribute' as a convenient wrapper+--   to lift a SchemaAttribute parser into an XMLParser.+getAttribute :: (SimpleType a, Show a) =>+                String -> Element Posn -> Posn -> XMLParser a+getAttribute aname (Elem t as _) pos =+    case qnLookup aname as of+        Nothing  -> fail $ "attribute missing: " ++ aname+                           ++ " in element <" ++ printableName t+                           ++ "> at " ++ show pos+        Just atv -> case runParser acceptingParser (attr2str atv) of+                        (Right val, "")   -> return val+                        (Right val, rest) -> failBad $+                                               "Bad attribute value for "+                                               ++ aname ++ " in element <"+                                               ++ printableName t+                                               ++ ">:  got "++show val+                                               ++ "\n but trailing text: "+                                               ++ rest ++ "\n at " ++ show pos+                        (Left err,  rest) -> failBad $ err ++ " in attribute "+                                               ++ aname  ++ " of element <"+                                               ++ printableName t+                                               ++ "> at " ++ show pos+  where+    qnLookup :: String -> [(QName,a)] -> Maybe a+    qnLookup s = Prelude.lookup s . map (\(qn,v)-> (printableName qn, v))+++-- | The <xsd:any> type.  Parsing will always produce an "UnconvertedANY".+data AnyElement = forall a . (SchemaType a, Show a) => ANYSchemaType a+                | UnconvertedANY (Content Posn)++instance Show AnyElement where+    show (UnconvertedANY c) = "Unconverted "++ show (verbatim c)+    show (ANYSchemaType a)  = "ANYSchemaType "++show a+instance Eq AnyElement where+    a == b  =  show a == show b+instance SchemaType AnyElement where+    parseSchemaType _ = parseAnyElement+    schemaTypeToXML _ = toXMLAnyElement++parseAnyElement :: XMLParser AnyElement+parseAnyElement = fmap UnconvertedANY next++-- | Parse the textual part of mixed content+parseText :: XMLParser String+parseText = text  -- from XmlContent.Parser+            `onFail` return ""++-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --++toXMLElement :: String -> [[Attribute]] -> [[Content ()]] -> [Content ()]+toXMLElement name attrs content =+    [CElem (Elem (N name) (concat attrs) (concat content)) ()]++toXMLText :: String -> [Content ()]+toXMLText text =+    [CString False text ()]++toXMLAnyElement :: AnyElement -> [Content ()]+toXMLAnyElement (UnconvertedANY c) = [void c]+--toXMLAnyElement (ANYSchemaType x)  = [c]++toXMLAttribute :: (SimpleType a) => String -> a -> [Attribute]+toXMLAttribute name val = [ (N name, AttValue [Left (simpleTypeText val)]) ]++-- | For a ComplexType that is an extension of a SimpleType, it is necessary to+--   convert the value to XML first, then add in the extra attributes that+--   constitute the extension.+addXMLAttributes :: [[Attribute]] -> [Content ()] -> [Content ()]+addXMLAttributes extra [CElem (Elem n attrs content) ()] =+                       [CElem (Elem n (attrs++concat extra) content) ()]+addXMLAttributes _ x = x++-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --+++{- examples+   --------++instance SchemaType FpMLSomething where+  parseSchemaType s = do (pos,e) <- posnElement [s]+                         commit $ do+                           a0 <- getAttribute "flirble" e pos+                           a1 <- getAttribute "binky" e pos+                           interior e $ do+                             c0 <- parseSchemaType "foobar"+                             c1 <- many $ parseSchemaType "quux"+                             c2 <- optional $ parseSchemaType "doodad"+                             c3 <- between (Occurs (Just 3) (Just 5))+                                            $ parseSchemaType "rinta"+                             c4 <- fmap OneOf2 (parseSchemaType "left")+                                   `onFail`+                                   fmap TwoOf2 (parseSchemaType "right")+                             return $ FpMLSomething a0 a1 c0 c1 c2 c3 c4+  schemaTypeToXML s x@FPMLSomething{} =+      toXMLElement s [ mkAttribute "flirble" (something_flirble x)+                     , mkAttribute "binky"   (something_binky x)+                     ]+          [             schemaTypeToXML "foobar"  (something_foobar x)+          , concatMap  (schemaTypeToXML "quux")   (something_quux x)+          , maybe []   (schemaTypeToXML "doodad") (something_doodad x)+          , concatMap  (schemaTypeToXML "rinta")  (something_rinta x)+          , foldOneOf2 (schemaTypeToXML "left")+                       (schemaTypeToXML "right")  (something_choice4 x)+          ]++instance SimpleType FpMLNumber where+    acceptingParser = ...+    simpleTypeText  = ...+-}+++-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --++-- Ensure that all primitive/simple types can also be used as elements.++#define SchemaInstance(TYPE)  instance SchemaType TYPE where { parseSchemaType s = do { e <- element [s]; interior e parseSimpleType; }; schemaTypeToXML s x = toXMLElement s [] [toXMLText (simpleTypeText x)] }++SchemaInstance(XsdString)+SchemaInstance(Prim.Boolean)+SchemaInstance(Prim.Base64Binary)+SchemaInstance(Prim.HexBinary)+SchemaInstance(Float)+SchemaInstance(Decimal)+SchemaInstance(Double)+SchemaInstance(Prim.AnyURI)+SchemaInstance(Prim.NOTATION)+SchemaInstance(Prim.Duration)+SchemaInstance(Prim.DateTime)+SchemaInstance(Prim.Time)+SchemaInstance(Prim.Date)+SchemaInstance(Prim.GYearMonth)+SchemaInstance(Prim.GYear)+SchemaInstance(Prim.GMonthDay)+SchemaInstance(Prim.GDay)+SchemaInstance(Prim.GMonth)+SchemaInstance(Prim.NormalizedString)+SchemaInstance(Prim.Token)+SchemaInstance(Prim.Language)+SchemaInstance(Prim.Name)+SchemaInstance(Prim.NCName)+SchemaInstance(Prim.ID)+SchemaInstance(Prim.IDREF)+SchemaInstance(Prim.IDREFS)+SchemaInstance(Prim.ENTITY)+SchemaInstance(Prim.ENTITIES)+SchemaInstance(Prim.NMTOKEN)+SchemaInstance(Prim.NMTOKENS)+SchemaInstance(Integer)+SchemaInstance(Prim.NonPositiveInteger)+SchemaInstance(Prim.NegativeInteger)+SchemaInstance(Prim.Long)+SchemaInstance(Int)+SchemaInstance(Prim.Short)+SchemaInstance(Prim.Byte)+SchemaInstance(Prim.NonNegativeInteger)+SchemaInstance(Prim.UnsignedLong)+SchemaInstance(Prim.UnsignedInt)+SchemaInstance(Prim.UnsignedShort)+SchemaInstance(Prim.UnsignedByte)+SchemaInstance(Prim.PositiveInteger)
+ src/Text/XML/HaXml/Schema/TypeConversion.hs view
@@ -0,0 +1,591 @@+{-# LANGUAGE PatternGuards #-}+module Text.XML.HaXml.Schema.TypeConversion+  ( module Text.XML.HaXml.Schema.TypeConversion+  ) where++import Text.XML.HaXml.Types (QName(..),Name(..),Namespace(..))+import Text.XML.HaXml.Namespaces (printableName,localName)+import Text.XML.HaXml.Schema.Environment+import Text.XML.HaXml.Schema.XSDTypeModel     as XSD+import Text.XML.HaXml.Schema.HaskellTypeModel as Haskell+import Text.XML.HaXml.Schema.NameConversion+import Text.XML.HaXml.Schema.Parse (xsd)++import qualified Data.Map as Map+import Data.Semigroup (Semigroup (..))+import Data.Map (Map)+import Data.List (foldl')+import Data.Maybe (fromMaybe,fromJust,isNothing,isJust)+import Data.Monoid (Monoid (..))++-- | Transform a Schema by lifting all locally-defined anonymous types to+--   the top-level, naming them, and planting a referend at their original+--   location.+typeLift :: Schema -> Schema+typeLift s = s{ schema_items =+                    concat [ hoist e | SchemaElement e <- schema_items s ]+                    ++ map renameLocals (schema_items s) }+  where+    hoist :: ElementDecl -> [SchemaItem]+    hoist e =+              let only_children = filter (not . (==) e) $ findE e+              in flip concatMap only_children $+              \e@ElementDecl{elem_nameOrRef=Left (NT{ theName=n+                                                  {-, theType=Nothing-}})}->+                  localType n (elem_content e)++    findE :: ElementDecl -> [ElementDecl]+    findE e = ( case elem_nameOrRef e of+                  Left (NT{theType=Nothing}) -> (e:)+                  Left (NT{theType=Just t})  -> case elem_content e of+                                                  Just (Right+                                                    (ComplexType+                                                       {complex_name=Just t'}))+                                                 {--| t==t'-}+                                                    -> (e:)+                                                  _ -> id+                  _                          -> id+              )+              ( case elem_content e of+                  Nothing        -> []+                  Just (Left  _) -> []+                  Just (Right c) ->+                    case complex_content c of+                      v@SimpleContent{ci_stuff=Left (Restriction1 p)} -> particle p+                      v@SimpleContent{ci_stuff=Right (Extension{extension_newstuff=PA p _ _})} -> particle p+                      v@ComplexContent{ci_stuff=Left (Restriction1 p)} -> particle p+                      v@ComplexContent{ci_stuff=Right (Extension{extension_newstuff=PA p _ _})} -> particle p+                      v@ThisType{ci_thistype=PA p _ _} -> particle p+              )+    particle Nothing = []+    particle (Just (Left cos)) = choiceOrSeq cos+    particle (Just (Right g))  = maybe [] choiceOrSeq $ group_stuff g+    choiceOrSeq (XSD.All _ es)        = concatMap findE es+    choiceOrSeq (XSD.Choice   _ _ es) = concatMap etc es+    choiceOrSeq (XSD.Sequence _ _ es) = concatMap etc es+    etc (HasElement e) = findE e+    etc (HasGroup g)   = maybe [] choiceOrSeq $ group_stuff g+    etc (HasCS cos)    = choiceOrSeq cos+    etc (HasAny _)     = []++    localType n Nothing          = []+    localType n (Just (Left s))  = [Simple  (renameSimple n s)]+    localType n (Just (Right c)) = [Complex c{ complex_name = Just n }]++    renameSimple n s@Primitive{}  = s+    renameSimple n s@Restricted{} = s{ simple_name  = Just n }+    renameSimple n s@ListOf{}     = s{ simple_name  = Just n }+    renameSimple n s@UnionOf{}    = s{ simple_name  = Just n }+++    -- * For now, rather than walk the tree, giving typenames to nodes that were+    --   previously locally-typed, we will instead assume in the pretty-printer+    --   that it can always replace a missing typename with the element name, and+    --   have it resolve to something sensible.+    renameLocals :: SchemaItem -> SchemaItem+    renameLocals s = s+--  renameLocals (SchemaElement e)+--                 | Left (NT{theName=n,theType=Nothing}) <- elem_nameOrRef e+--                 = SchemaElement e{ elem_nameOrRef = Left (NT{theName=n+--                                                             ,theType=Just n})+--                                  }+--            -- still gotta do the recursive search + rename+++-- | Given an environment of schema type mappings, and a schema module,+--   create a bunch of Decls that describe the types in a more+--   Haskell-friendly way.+convert :: Environment -> Schema -> [Haskell.Decl]+convert env s = concatMap item (schema_items s)+  where+    item (Include loc ann)    = [XSDInclude (xname loc) (comment ann)]+    item (Import uri loc ann) = [XSDImport  (xname loc)+                                            (xname <$>+                                             Map.lookup uri (env_namespace env))+                                            (comment ann)]+    item (Redefine _ _)       = [] -- ignoring redefinitions for now+    item (Annotation ann)     = [XSDComment (comment ann)]+    item (Simple st)          = simple st+    item (Complex ct)         = complex ct+    item (SchemaElement ed)   = topElementDecl ed+    item (SchemaAttribute ad) = [] -- attributeDecl ad+    item (AttributeGroup ag)  = [] -- attrgroup ag+    item (SchemaGroup g)      = group g++    simple (Primitive prim)     = []+    simple s@(Restricted a n f r)+        | (Just enums) <- isEnumeration s+                                = [EnumSimpleType+                                       (maybe (error "missing Name") xname n)+                                       enums (comment a) ]+        | otherwise             = [RestrictSimpleType+                                       (maybe (error "missing Name") xname n)+                                       (maybe (xname "unknownSimple") XName+                                                             (restrict_base r))+                                       (mkRestrict r)+                                       (comment a)]+    simple (ListOf a n f t)     = error "Not yet implemented: ListOf simpleType"+                              --  [NamedSimpleType    (xname n) (nameOfSimple s)+                              --                      (comment a)]+    simple s@(UnionOf a n f u m)+        | (Just enums) <- isEnumeration s+                                = [EnumSimpleType+                                       (maybe (error "missing Name") xname n)+                                       enums (comment a) ]+        | otherwise             = [UnionSimpleTypes+                                       (maybe (error "missing Name") xname n)+                                       (map (xname . printableName) m) -- XXX ignores content 'u'+                                       (comment a)]++    isEnumeration :: SimpleType -> Maybe [(XName,Comment)]+    isEnumeration (Primitive _)        = Nothing+    isEnumeration (ListOf _ _ _ _)     = Nothing+    isEnumeration (Restricted _ _ _ r) =+        case r of+            RestrictSim1 ann base r1  -> Nothing+            RestrictType _ _ _ facets ->+                let enum = [ (xname v, comment ann)+                           | (Facet UnorderedEnumeration ann v _) <- facets ]+                in if null enum then Nothing else Just enum+    isEnumeration (UnionOf _ _ _ u ms) =+        squeeze [] ( flip map ms (\m-> case Map.lookup m (env_type env) of+                                         Just (Left s)-> isEnumeration s+                                         _            -> Nothing)+                     ++ map isEnumeration u )+        where squeeze _  (Nothing:_)    = Nothing+              squeeze xs (Just ys:rest) = squeeze (xs++ys) rest+              squeeze xs []             = Just xs++    complex ct =+      let nx  = N $ fromMaybe "errorMissingName" (complex_name ct)+          n   = XName nx+      in singleton $+      case complex_content ct of+        c@SimpleContent{}  ->+            case ci_stuff c of+                Left r  ->+                    RestrictSimpleType n ({-simple-}xname "Unimplemented") []+                                     (comment (complex_annotation ct+                                              `mappend` ci_annotation c))+                Right e ->+                    ExtendSimpleType n+                                     ({-supertype-}XName $ extension_base e)+                                     ({-attrs-}snd $+                                      particleAttrs $ extension_newstuff e)+                                     (comment (complex_annotation ct+                                              `mappend` ci_annotation c+                                              `mappend` extension_annotation e))+        c@ComplexContent{} ->+            case ci_stuff c of+                Left r  ->+                    RestrictComplexType n ({-complex-}xname "Can'tBeRight")+                                     (comment (complex_annotation ct+                                              `mappend` ci_annotation c))+                Right e ->+                    let myLoc  = fromMaybe "NUL" (Map.lookup nx+                                                             (env_typeloc env))+                        supLoc = fromMaybe "NUL" (Map.lookup (extension_base e)+                                                             (env_typeloc env))+                    in+                    if complex_abstract ct then+                        ExtendComplexTypeAbstract n+                             ({-supertype-}XName $ extension_base e)+                             ({-subtypes-}+                              maybe (error ("ExtendComplexTypeAbstract "++show nx))+                                    (map (\(t,l)->(XName t,if l/=myLoc+                                                           then Just (xname l)+                                                           else Nothing)))+                                    (Map.lookup nx (env_extendty env)))+                             ({-fwddecl-}if myLoc/=supLoc+                                         then Just (xname supLoc) else Nothing)+                             ({-grandsupers-}+                              map XName $ repeatedly (supertypeOf env) nx)+                             (comment (complex_annotation ct+                                      `mappend` ci_annotation c+                                      `mappend` extension_annotation e))+                    else+                    let (es,as) = particleAttrs (extension_newstuff e)+                        es'     | ci_mixed c = mkMixedContent es+                                | otherwise  = es+                        (oldEs,oldAs) = contentInfo $+                                            Map.lookup (extension_base e)+                                                       (env_type env)+                    in+                    ExtendComplexType n+                        ({-supertype-}XName $ extension_base e)+                        {-supertype elems-}oldEs+                        {-supertype attrs-}oldAs+                        {-elems-}es+                        {-attrs-}as+                        ({-fwddecl-}if myLoc/=supLoc then Just (xname supLoc)+                                                     else Nothing)+                        ({-abstract supertype-}+                         maybe False (either (const False) complex_abstract)+                                     (Map.lookup (extension_base e)+                                                 (env_type env)))+                        ({-grandsupers-}+                         map XName $ repeatedly (supertypeOf env)+                                   $ extension_base e)+                        (comment (complex_annotation ct+                                 `mappend` ci_annotation c+                                 `mappend` extension_annotation e))+        c@ThisType{} | complex_abstract ct ->+            let myLoc  = fromMaybe "NUL"+                         (Map.lookup nx (env_typeloc env)) in+            ElementsAttrsAbstract n+                          {-all instance types: -}+                          (case Map.lookup nx (env_extendty env) of+                             Nothing -> []+                             Just xs -> map (\ (x,loc)->(XName x,if loc/=myLoc+                                                          then Just (xname loc)+                                                          else Nothing)) xs+                          )+                          (comment (complex_annotation ct))+        c@ThisType{} | otherwise ->+            let (es,as) = particleAttrs (ci_thistype c)+                es'     | complex_mixed ct = mkMixedContent es+                        | otherwise        = es+            in+            ElementsAttrs n es' as (comment (complex_annotation ct))++    mkMixedContent [e@OneOf{}] = [e{ elem_oneOf = [Text]: elem_oneOf e }]+    mkMixedContent es          = Text: concatMap (\e->[e,Text]) es++    topElementDecl :: XSD.ElementDecl -> [Haskell.Decl]+    topElementDecl ed = case elem_nameOrRef ed of+        Left  n   -> case theType n of+                       Nothing ->+                       --error "Not implemented: contentInfo on topElementDecl"+                       --I'm pretty sure a topElementDecl can't be abstract...+                         let (es,as) = contentInfo (elem_content ed) in+                         [ ElementsAttrs ({-name-}xname $ theName n)+                                         {-elems-}es+                                         {-attrs-}as+                                         (comment (elem_annotation ed))+                         , ElementOfType $ elementDecl ed+                           --  Element{ elem_name = xname (theName n)+                           --         , elem_type = checkXName s (N $ theName n)+                           --         , elem_modifier =+                           --                 occursToModifier (elem_occurs ed)+                           --         , elem_byRef   = False+                           --         , elem_locals  = []+                           --         , elem_substs  = Nothing+                           --         , elem_comment =+                           --                     (comment (elem_annotation ed))+                           --         }+                         ]+                       Just t | elem_abstract ed ->+                         let nm     = N $ theName n+                             myLoc  = fromMaybe "NUL"+                                          (Map.lookup nm (env_typeloc env)) in+                         singleton $+                         ElementAbstractOfType+                                 (XName nm)+                                 (checkXName s t)+                                 (case Map.lookup nm (env_substGrp env) of+                                    Nothing -> []+                                    Just xs ->+                                      map (\ (x,loc)->(XName x,+                                                       if loc/=myLoc+                                                       then Just (xname loc)+                                                       else Nothing)) xs)+                                 (comment (elem_annotation ed))+                       Just t | otherwise ->+                         singleton $ ElementOfType $ elementDecl ed+                     --  Element{ elem_name    = xname $ theName n+                     --         , elem_type    = checkXName s t+                     --         , elem_modifier=+                     --                       occursToModifier (elem_occurs ed)+                     --         , elem_byRef   = False+                     --         , elem_locals  = []+                     --         , elem_substs  = Nothing+                     --         , elem_comment = comment (elem_annotation ed)+                     --         }+        Right ref -> case Map.lookup ref (env_element env) of+           Nothing -> error $ "<topElementDecl> unknown element reference "+                            ++printableName ref+           Just e' -> topElementDecl e'++    elementDecl :: XSD.ElementDecl -> Haskell.Element+    elementDecl ed = case elem_nameOrRef ed of+        Left  n   -> Element { elem_name     = xname $ theName n+                             , elem_type     = maybe (localTypeExp ed)+                                                     (checkXName s)+                                                     (theType n)+                             , elem_modifier = occursToModifier $ elem_occurs ed+                             , elem_byRef    = False   -- by reference+                             , elem_locals   = []      -- internal Decl+                             , elem_substs   = Nothing -- substitution group+                         --  , elem_substs   = if elem_abstract ed+                         --                    then fmap (map XName) $+                         --                         Map.lookup (N $ theName n)+                         --                                (env_substGrp env)+                         --                    else Nothing+                             , elem_comment  = comment $ elem_annotation ed+                             }+        Right ref -> case Map.lookup ref (env_element env) of+                       Just e' -> (elementDecl e')+                                      { elem_modifier =+                                              occursToModifier (elem_occurs ed)+                                      , elem_byRef = True }+                       Nothing -> -- possible ref is imported qualified?+                           case Map.lookup (N $ localName ref)+                                           (env_element env) of+                               Just e' -> (elementDecl e')+                                            { elem_modifier =+                                               occursToModifier (elem_occurs ed)+                                            , elem_byRef = True }+                               Nothing -> Element ({-name-}XName ref)+                                              -- best guess at type+                                              ({-type-}XName ref)+                                              (occursToModifier (elem_occurs ed))+                                              True [] Nothing Nothing++    localTypeExp :: XSD.ElementDecl -> XName+    localTypeExp ed | isJust (elem_content ed) =+                          case fromJust (elem_content ed) of+                            Left st@Primitive{}   -> xname "SomethingPrimitive"+                            Left st@Restricted{}  -> (\x-> maybe x xname+                                                          (simple_name st)) $+                                                     maybe (xname "GiveUp")+                                                           XName+                                                      (restrict_base $+                                                       simple_restriction st)+                            Left st@ListOf{}      -> xname "SomethingListy"+                            Left st@UnionOf{}     -> xname "SomethingUnionLike"+                            Right c@ComplexType{} -> maybe (localTypeExp ed{elem_content=Nothing})+                                                           xname+                                                     $ complex_name c+                    | otherwise =+                          case elem_nameOrRef ed of+                            Left n  -> xname $ theName n+                            Right _ -> xname "unknownElement"++    attributeDecl :: XSD.AttributeDecl -> [Haskell.Attribute]+    attributeDecl ad = case attr_nameOrRef ad of+        Left  n   -> singleton $+                     Attribute (xname $ theName n)+                               (maybe (maybe (xname "String")+                                           -- guess at an attribute typename?+                                           --(error "XSD.attributeDecl->")+                                             nameOfSimple+                                             (attr_simpleType ad))+                                      XName+                                      (theType n))+                               (attr_use ad == Required)+                               (comment  (attr_annotation ad))+        Right ref -> case Map.lookup ref (env_attribute env) of+                       Nothing -> error $ "<attributeDecl> unknown attribute reference "+                                          ++printableName ref+                       Just a' -> attributeDecl a'++    attrgroup :: XSD.AttrGroup -> [Haskell.Attribute]+    attrgroup g = case attrgroup_nameOrRef g of+        Left  n   -> concatMap (either attributeDecl attrgroup)+                               (attrgroup_stuff g)+        Right ref -> case Map.lookup ref (env_attrgroup env) of+                       Nothing -> error $ "unknown attribute group reference "+                                          ++printableName ref+                       Just g' -> attrgroup g'++    group :: XSD.Group -> [Haskell.Decl]+    group g = case group_nameOrRef g of+        Left  n   -> let {-highs,-}es = choiceOrSeq (fromMaybe (error "XSD.group")+                                                             (group_stuff g))+                     in {-highs ++-} singleton $+                           Haskell.Group (xname n)+                                         (map (\e->e{elem_modifier=+                                                         combineOccursModifier+                                                             (group_occurs g)+                                                             (elem_modifier e)})+                                              es)+                                         (comment (group_annotation g))+        Right (QN _ ref) -> case Map.lookup (N ref) (env_group env) of+                       Nothing -> error $ "bad group reference "+                                       ++printableName (N ref)+                       Just g' -> group g'{ group_occurs=group_occurs g }+        Right ref -> case Map.lookup ref (env_group env) of+                  --   Nothing -> error $ "bad group reference "+                  --                      ++printableName ref+                       Nothing -> singleton $+                                  Haskell.Group (xname ("unknown-group-"++printableName ref)) []+                                                (comment (group_annotation g))+                       Just g' -> group g'{ group_occurs=group_occurs g }++    particleAttrs :: ParticleAttrs -> ([Haskell.Element],[Haskell.Attribute])+    particleAttrs (PA part attrs _) = -- ignoring AnyAttr for now+        (particle part, concatMap (either attributeDecl attrgroup) attrs)++    particle :: Particle -> [Haskell.Element] -- XXX fix to ret Decls+    particle Nothing          = []+    particle (Just (Left cs)) = {-snd $-} choiceOrSeq cs+    particle (Just (Right g)) = let [Haskell.Group _ es _] = group g in es++--  choiceOrSeq :: ChoiceOrSeq -> ([Haskell.Decl],[Haskell.Element])+    choiceOrSeq :: ChoiceOrSeq -> [Haskell.Element]+    choiceOrSeq (XSD.All      ann eds)   = error "not yet implemented: XSD.All"+    choiceOrSeq (XSD.Choice   ann o ees) = [ OneOf (anyToEnd+                                                     (map elementEtc ees))+                                                   (occursToModifier o)+                                                   (comment ann) ]+    choiceOrSeq (XSD.Sequence ann _ ees) = concatMap elementEtc ees++    elementEtc :: ElementEtc -> [Haskell.Element]+    elementEtc (HasElement ed) = [elementDecl ed]+    elementEtc (HasGroup g)    = let [Haskell.Group _ es _] = group g in es+    elementEtc (HasCS cs)      = choiceOrSeq cs+    elementEtc (HasAny a)      = any a++    any :: XSD.Any -> [Haskell.Element]+    any a@XSD.Any{}  = [Haskell.AnyElem+                           { elem_modifier = occursToModifier (any_occurs a)+                           , elem_comment  = comment (any_annotation a) }]++    -- If an ANY element is part of a choice, ensure it is the last part.+    anyToEnd :: [[Haskell.Element]] -> [[Haskell.Element]]+    anyToEnd = go Nothing+      where go _ [e@[AnyElem{}]] = [e]+            go _ (e@[AnyElem{}]:es) = go (Just e) es+            go Nothing  []        = []+            go (Just e) []        = [e]+            go m (e:es)           = e:go m es++    contentInfo :: Maybe (Either SimpleType ComplexType)+                   -> ([Haskell.Element],[Haskell.Attribute])+    contentInfo Nothing  = ([],[])+    contentInfo (Just e) = either simple complex e+      where+        simple  :: SimpleType  -> ([Element],[Attribute])+        complex :: ComplexType -> ([Element],[Attribute])+        simple _         = ([], [])  -- XXX clearly wrong+     -- simple (Primitive p)        = ([], [])  -- XXX clearly wrong+     -- simple (Restricted n _ _ _) =+        complex ct = case complex_content ct of+                       SimpleContent{}     -> ([],[]) -- XXX clearly wrong+                       ci@ComplexContent{} -> either restr exten (ci_stuff ci)+                       ThisType pa         -> particleAttrs pa+        restr :: Restriction1 -> ([Element],[Attribute])+        exten :: Extension    -> ([Element],[Attribute])+        restr (Restriction1 p)  = (particle p,[])+        exten e = let (oes,oas) = contentInfo (Map.lookup (extension_base e)+                                                          (env_type env))+                      (nes,nas) = particleAttrs (extension_newstuff e)+                  in (oes++nes, oas++nas)+++comment :: Annotation -> Comment+comment (Documentation s) = Just s+comment (AppInfo s)       = Just s+comment (NoAnnotation _)  = Nothing++xname :: String -> XName+xname = XName . N++checkXName :: Schema -> QName -> XName+checkXName s n@(N _)     = XName n+checkXName s n@(QN ns m) | (Just uri) <- schema_targetNamespace s+                         , nsURI ns == uri = XName $ N m+                         | otherwise       = XName n++nameOfSimple :: SimpleType -> XName+nameOfSimple (Primitive prim)            = XName . xsd . show $ prim+nameOfSimple (Restricted _ (Just n) _ _) = xname n+nameOfSimple (ListOf _ (Just n) _ _)     = xname n -- ("["++n++"]")+nameOfSimple (UnionOf _ (Just n) _ _ _)  = xname n -- return to this+nameOfSimple s                           = xname "String" -- anonymous simple++mkRestrict :: XSD.Restriction -> [Haskell.Restrict]+mkRestrict (RestrictSim1 ann base r1) = []+--      = error "Not yet implemented: Restriction1 on simpletype"+--      ^ This branch is not strictly correct.  There ought to be some+--        restrictions.+mkRestrict (RestrictType _ _ _ facets) =+    (let occurs = [ (f,ann,v)  | (Facet f ann v _) <- facets+                               , f `elem` [OrderedBoundsMinIncl+                                          ,OrderedBoundsMinExcl+                                          ,OrderedBoundsMaxIncl+                                          ,OrderedBoundsMaxExcl] ]+     in [Haskell.RangeR (foldl consolidate (Occurs Nothing Nothing) occurs)+          (comment $ mconcat [ ann | (_,ann,_) <- occurs]) | null occurs]+    ) +++    [ Haskell.Pattern v (comment ann)+              | (Facet UnorderedPattern ann v _) <- facets ]+    +++    (let enum = [ (v,comment ann)+                | (Facet UnorderedEnumeration ann v _) <- facets ]+     in [Haskell.Enumeration enum | null enum]+    ) +++    (let occurs = [ (f,ann,v)  | (Facet f ann v _) <- facets+                               , f `elem` [UnorderedLength+                                          ,UnorderedMaxLength+                                          ,UnorderedMinLength] ]+     in [Haskell.StrLength+          (foldl consolidate (Occurs Nothing Nothing) occurs)+          (comment $ mconcat [ ann | (_,ann,_) <- occurs]) | null occurs]+    )++singleton :: a -> [a]+singleton = (:[])++-- | Consolidate a Facet occurrence into a single Occurs value.+consolidate :: Occurs -> (FacetType,Annotation,String) -> Occurs+consolidate (Occurs min max) (OrderedBoundsMinIncl,_,n) =+             Occurs (Just (read n)) max+consolidate (Occurs min max) (OrderedBoundsMinExcl,_,n) =+             Occurs (Just (read n +1)) max+consolidate (Occurs min max) (OrderedBoundsMaxIncl,_,n) =+             Occurs min (Just (read n))+consolidate (Occurs min max) (OrderedBoundsMaxExcl,_,n) =+             Occurs min (Just (read n -1))+consolidate (Occurs min max) (UnorderedLength,_,n) =+             Occurs (Just (read n)) (Just (read n))+consolidate (Occurs min max) (UnorderedMinLength,_,n) =+             Occurs (Just (read n)) max+consolidate (Occurs min max) (UnorderedMaxLength,_,n) =+             Occurs min (Just (read n))++instance Monoid Occurs where+    mempty = Occurs Nothing Nothing+    mappend = (<>)++instance Semigroup Occurs where+    (Occurs Nothing  Nothing)  <> o  = o+    (Occurs (Just z) Nothing)  <> (Occurs min max)+                                        = Occurs (Just $ maybe z (*z) min) max+    (Occurs Nothing  (Just x)) <> (Occurs min max)+                                        = Occurs min (Just $ maybe x (*x) max)+    (Occurs (Just z) (Just x)) <> (Occurs min max)+                                        = Occurs (Just $ maybe z (*z) min)+                                                 (Just $ maybe x (*x) max)++-- | Push another Occurs value inside an existing Modifier.+combineOccursModifier :: Occurs -> Modifier -> Modifier+combineOccursModifier o Haskell.Single     = occursToModifier $ mappend o+                                                    $ Occurs (Just 1) (Just 1)+combineOccursModifier o Haskell.Optional   = occursToModifier $ mappend o+                                                    $ Occurs (Just 0) (Just 1)+combineOccursModifier o (Haskell.Range o') = occursToModifier $ mappend o o'++-- | Convert an occurs range to a Haskell-style type modifier (Maybe, List, Id)+occursToModifier :: Occurs -> Modifier+occursToModifier (Occurs Nothing  Nothing)  = Haskell.Single+occursToModifier (Occurs (Just 0) Nothing)  = Haskell.Optional+occursToModifier (Occurs (Just 0) (Just 1)) = Haskell.Optional+occursToModifier (Occurs (Just 1) (Just 1)) = Haskell.Single+occursToModifier o                          = Haskell.Range o+++-- | Find the supertype (if it exists) of a given type name.+supertypeOf :: Environment -> QName -> Maybe QName+supertypeOf env t =+    do typ <- Map.lookup t (env_type env)+       a <- either (const Nothing) (Just . complex_content) typ+       b <- case a of ComplexContent{} -> Just (ci_stuff a)+                      _ -> Nothing+       either (const Nothing) (Just . extension_base) b++-- | Keep applying the function to transform the value, until it yields+--   Nothing.  Returns the sequence of transformed values.+repeatedly :: (a->Maybe a) -> a -> [a]+repeatedly f x = case f x of Nothing -> []+                             Just y  -> y : repeatedly f y
+ src/Text/XML/HaXml/Schema/XSDTypeModel.hs view
@@ -0,0 +1,313 @@+module Text.XML.HaXml.Schema.XSDTypeModel+  ( module Text.XML.HaXml.Schema.XSDTypeModel+  ) where++import Data.Semigroup (Semigroup (..))+import Data.Monoid (Monoid (..))+import Text.XML.HaXml.Types      (Name,Namespace,QName)++data Schema        = Schema+                   --  { schema_annotation           :: Annotation+                       { schema_elementFormDefault   :: QForm+                       , schema_attributeFormDefault :: QForm+                       , schema_finalDefault         :: Maybe Final+                       , schema_blockDefault         :: Maybe Block+                       , schema_targetNamespace      :: Maybe TargetNamespace+                       , schema_version              :: Maybe String+                       , schema_namespaces           :: [Namespace]+                       , schema_items                :: [SchemaItem]+                       }+                     deriving (Eq,Show)+data SchemaItem    = Include    SchemaLocation Annotation+                   | Import URI SchemaLocation Annotation+                   | Redefine   SchemaLocation [SchemaItem]+                   | Annotation Annotation+                   --+                   | Simple          SimpleType+                   | Complex         ComplexType+                   | SchemaElement   ElementDecl+                   | SchemaAttribute AttributeDecl+                   | AttributeGroup  AttrGroup+                   | SchemaGroup     Group+               --  | Notation        Name+                     deriving (Eq,Show)++-- The "simple type" model++data SimpleType    = Primitive  { simple_primitive   :: PrimitiveType }+                   | Restricted { simple_annotation  :: Annotation+                                , simple_name        :: Maybe Name+                                , simple_final       :: Maybe Final+                                , simple_restriction :: Restriction+                                }+                   | ListOf     { simple_annotation  :: Annotation+                                , simple_name        :: Maybe Name+                                , simple_final       :: Maybe Final+                                  -- simpletype = element, qname = attribute+                                , simple_type        :: Either SimpleType QName+                                }+                   | UnionOf    { simple_annotation  :: Annotation+                                , simple_name        :: Maybe Name+                                , simple_final       :: Maybe Final+                                  -- union = elements+                                , simple_union       :: [SimpleType]+                                  -- members = attribute+                                , simple_members     :: [QName]+                                }+                     deriving (Eq,Show)++data Restriction   = RestrictSim1 { restrict_annotation :: Annotation+                                  , restrict_base       :: Maybe QName+                                  , restrict_r1         :: Restriction1+                                  }+                   | RestrictType { restrict_annotation :: Annotation+                                  , restrict_base       :: Maybe QName+                                  , restrict_type       :: Maybe SimpleType+                                  , restrict_facets     :: [Facet]+                                  }+                     deriving (Eq,Show)++data Facet         = Facet { facet_facetType  :: FacetType+                           , facet_annotation :: Annotation+                           , facet_facetValue :: String+                           , facet_fixed      :: Bool+                           }+                     deriving (Eq,Show)++data FacetType     = OrderedBoundsMinIncl+                   | OrderedBoundsMinExcl+                   | OrderedBoundsMaxIncl+                   | OrderedBoundsMaxExcl+                   | OrderedNumericTotalDigits+                   | OrderedNumericFractionDigits+                   | UnorderedPattern+                   | UnorderedEnumeration+                   | UnorderedWhitespace+                   | UnorderedLength+                   | UnorderedMaxLength+                   | UnorderedMinLength+                     deriving (Eq,Show)++-- The "complex type" model++data ComplexType   = ComplexType+                       { complex_annotation :: Annotation+                       , complex_name       :: Maybe Name+                       , complex_abstract   :: Bool+                       , complex_final      :: Maybe Final+                       , complex_block      :: Maybe Block+                       , complex_mixed      :: Bool+                       , complex_content    :: ComplexItem+                       }+                     deriving (Eq,Show)+data ComplexItem   = SimpleContent+                       { ci_annotation :: Annotation+                       , ci_stuff      :: Either Restriction1 Extension+                       }+                   | ComplexContent+                       { ci_annotation :: Annotation+                       , ci_mixed      :: Bool+                       , ci_stuff      :: Either Restriction1 Extension+                       }+                   | ThisType+                       { ci_thistype   :: ParticleAttrs+                       }+                     deriving (Eq,Show)++data Restriction1  = Restriction1 Particle+                     deriving (Eq,Show)+data Extension     = Extension+                       { extension_annotation :: Annotation+                       , extension_base       :: QName+                       , extension_newstuff   :: ParticleAttrs+                       }+                     deriving (Eq,Show)++type Particle      = Maybe (Either ChoiceOrSeq Group)+data ParticleAttrs = PA Particle [Either AttributeDecl AttrGroup]+                        (Maybe AnyAttr)+                     deriving (Eq,Show)+data Group         = Group+                       { group_annotation :: Annotation+                       , group_nameOrRef  :: Either Name QName+                       , group_occurs     :: Occurs+                       , group_stuff      :: Maybe ChoiceOrSeq+                       }+                     deriving (Eq,Show)++data ChoiceOrSeq   = All      Annotation [ElementDecl]+                   | Choice   Annotation Occurs [ElementEtc]+                   | Sequence Annotation Occurs [ElementEtc]+                     deriving (Eq,Show)+data ElementEtc    = HasElement ElementDecl+                   | HasGroup   Group+                   | HasCS      ChoiceOrSeq+                   | HasAny     Any+                     deriving (Eq,Show)++data Any           = Any+                       { any_annotation      :: Annotation+                       , any_namespace       :: URI+                       , any_processContents :: ProcessContents+                       , any_occurs          :: Occurs+                       }+                     deriving (Eq,Show)+data AnyAttr       = AnyAttr+                       { anyattr_annotation      :: Annotation+                       , anyattr_namespace       :: URI+                       , anyattr_processContents :: ProcessContents+                       }+                     deriving (Eq,Show)++data AttrGroup     = AttrGroup+                       { attrgroup_annotation :: Annotation+                       , attrgroup_nameOrRef  :: Either Name QName+                       , attrgroup_stuff      :: [Either AttributeDecl+                                                         AttrGroup]+                       }+                     deriving (Eq,Show)++data ElementDecl   = ElementDecl+                       { elem_annotation :: Annotation+                       , elem_nameOrRef  :: Either NameAndType QName+                       , elem_occurs     :: Occurs+                       , elem_nillable   :: Nillable+                       , elem_substGroup :: Maybe QName+                       , elem_abstract   :: Bool+                       , elem_final      :: Maybe Final+                       , elem_block      :: Maybe Block+                       , elem_form       :: QForm+                       , elem_content    :: Maybe (Either SimpleType+                                                          ComplexType)+                       , elem_stuff      :: [ UniqueKeyOrKeyRef ]+                       }+                     deriving (Eq,Show)+data NameAndType   = NT { theName :: Name, theType :: Maybe QName }+                     deriving (Eq,Show)+++data AttributeDecl = AttributeDecl+                       { attr_annotation :: Annotation+                       , attr_nameOrRef  :: Either NameAndType QName+                       , attr_use        :: Use+                       , attr_defFixed   :: Maybe (Either DefaultValue+                                                          FixedValue)+                       , attr_form       :: QForm+                       , attr_simpleType :: Maybe SimpleType+                       }+                     deriving (Eq,Show)+++data UniqueKeyOrKeyRef+                   = U  Unique+                   | K  Key+                   | KR KeyRef+                     deriving (Eq,Show)++data Unique        = Unique+                       { unique_annotation :: Annotation+                       , unique_name       :: Name+                       , unique_selector   :: Selector+                       , unique_fields     :: [Field]+                       }+                     deriving (Eq,Show)+data Key           = Key+                       { key_annotation :: Annotation+                       , key_name       :: Name+                       , key_selector   :: Selector+                       , key_fields     :: [Field]+                       }+                     deriving (Eq,Show)+data KeyRef        = KeyRef+                       { keyref_annotation :: Annotation+                       , keyref_name       :: Name+                       , keyref_refer      :: QName+                       , keyref_selector   :: Selector+                       , keyref_fields     :: [Field]+                       }+                     deriving (Eq,Show)+data Selector        = Selector+                       { selector_annotation :: Annotation+                       , selector_xpath      :: String+                       }+                     deriving (Eq,Show)+data Field           = Field+                       { field_annotation :: Annotation+                       , field_xpath      :: String+                       }+                     deriving (Eq,Show)++data Occurs        = Occurs (Maybe Int) (Maybe Int)+                     deriving (Eq,Show)+data Use           = Required | Optional | Prohibited+                     -- (1,1) |   (0,1)  |   (0,0) -- corresp. to Occurs values+                     deriving (Eq,Show)++data PrimitiveType = String | Boolean | Decimal | Float | Double+                   | Duration | DateTime | Time | Date+                   | GYearMonth | GYear | GMonthDay | GDay | GMonth+                   | Base64Binary | HexBinary+                   | AnyURI | QName | Notation+                     deriving (Eq,Show)+++data MyRestriction = Range Occurs+                   | Pattern Regexp+                   | Enumeration [String]+                     deriving (Eq,Show)+type Mixed         = Bool+type Nillable      = Bool+type Fixed         = Bool++data Annotation    = Documentation String+                   | AppInfo String+                   | NoAnnotation String+                     deriving (Eq,Show)++data QForm         = Qualified | Unqualified -- only matters for locally decl'd+                     deriving (Eq,Show)+type TargetNamespace+                   = URI+data Final         = NoExtension | NoRestriction | AllFinal+                     deriving (Eq,Show)+type Block         = Final+data ProcessContents+                   = Skip | Lax | Strict+                     deriving (Eq,Show)++{-+data Constraint    = Unique Selector [Field]+                   | Key    Selector [Field]+                   | KeyRef Selector [Field]+                     deriving (Eq,Show)+type Selector      = String	-- XPath query for scope of constraint+type Field         = String	-- XPath query for entity being constrained+-}++-- check all of the following.+type SchemaLocation= String+type DefaultValue  = String+type FixedValue    = String+type Regexp        = String+type URI           = String+type TypeName      = String++instance Monoid Annotation where+  mempty = NoAnnotation "Monoid.mempty <Annotation>"+  mappend = (<>)++instance Semigroup Annotation where+  (Documentation d) <> (Documentation e) = Documentation (d++"\n"++e)+  _                 <> (Documentation e) = Documentation e+  ann               <> _                 = ann++-- | This instance is pretty unsatisfactory, and is useful only for+-- building environments involving recursive modules.  The /mappend/+-- method is left-biased, and the /mempty/ value contains lots of+-- undefined values.+instance Monoid Schema where+  mempty        = Schema{ schema_items=[] }+  mappend       = (<>)++instance Semigroup Schema where+  s <> t = s{ schema_items = schema_items s ++ schema_items t }
src/Text/XML/HaXml/ShowXmlLazy.hs view
@@ -1,11 +1,18 @@+{-# LANGUAGE CPP #-} module Text.XML.HaXml.ShowXmlLazy (showXmlLazy) where  import Text.XML.HaXml.Types+import Text.XML.HaXml.Namespaces import Text.XML.HaXml.TypeMapping -- (toHType, toDTD, Tuple(), Defined, showHType) -import qualified Text.XML.HaXml.XmlContent as X+#if MIN_VERSION_base(4,11,0)+import Prelude hiding (maybe,either,(<>))+#else import Prelude hiding (maybe,either)-import Maybe hiding (maybe)+#endif++import qualified Text.XML.HaXml.XmlContent as X+import Data.Maybe hiding (maybe) import Data.List  -- | Convert a fully-typed XML document to a string (without DTD).@@ -24,8 +31,8 @@                      [] (if dtd then Just (toDTD ht) else Nothing) [])              emptyST              ( case (ht, X.toContents value) of-                 (Tuple _, cs)       -> Elem (showHType ht "") [] cs-                 (Defined _ _ _, cs) -> Elem (showHType ht "-XML") [] cs+                 (Tuple _, cs)       -> Elem (N $ showHType ht "") [] cs+                 (Defined _ _ _, cs) -> Elem (N $ showHType ht "-XML") [] cs                  (_, [CElem e ()])   -> e )              [] @@ -103,7 +110,7 @@                                   hd <> text ">"                              else hd <+> text " [" $$                                   vcat (map markupdecl ds) $$ text "]>"-                           where hd = text "<!DOCTYPE" <+> text n <+>+                           where hd = text "<!DOCTYPE" <+> qname n <+>                                       maybe externalid eid markupdecl (Element e)     = elementdecl e markupdecl (AttList a)     = attlistdecl a@@ -117,15 +124,15 @@ -- extsubsetdecl (ExtConditionalSect c) = conditionalsect c --extsubsetdecl (ExtPEReference p e)   = peref p -element (Elem n as []) = text "<" <> text n <+>+element (Elem n as []) = text "<" <> qname n <+>                          fsep (map attribute as) <> text "/>" element e@(Elem n as cs)---  | any isText cs    = text "<" <> text n <+> fsep (map attribute as) <>+--  | any isText cs    = text "<" <> qname n <+> fsep (map attribute as) <> --                       text ">" <> hcat (map content cs) <>---                       text "</" <> text n <> text ">"-    | isText (head cs) = text "<" <> text n <+> fsep (map attribute as) <>+--                       text "</" <> qname n <> text ">"+    | isText (head cs) = text "<" <> qname n <+> fsep (map attribute as) <>                          text ">" <> hcat (map content cs) <>-                         text "</" <> text n <> text ">"+                         text "</" <> qname n <> text ">"     | otherwise        = let (d,c) = carryelem e empty                          in d <> c @@ -136,16 +143,16 @@  carryelem (Elem n as []) c                        = ( c <>-                           text "<" <> text n <+> fsep (map attribute as)+                           text "<" <> qname n <+> fsep (map attribute as)                          , text "/>") carryelem (Elem n as cs) c---  | any isText cs    =  ( c <> element e, empty)-    | otherwise        =  let (cs0,d0) = carryscan carrycontent cs (text ">")+{-  | any isText cs    =  ( c <> element e, empty)+    | otherwise -}     =  let (cs0,d0) = carryscan carrycontent cs (text ">")                           in                           ( c <>-                            text "<" <> text n <+> fsep (map attribute as) $$+                            text "<" <> qname n <+> fsep (map attribute as) $$                             nest (2 :: Int) (vcat cs0) <> --- $$-                            d0 <> text "</" <> text n+                            d0 <> text "</" <> qname n                           , text ">") carrycontent :: Content t -> [Char] -> ([Char], [Char]) carryelem :: Element t -> [Char] -> ([Char], [Char])@@ -179,7 +186,7 @@ --carrycontent (d,c) (CMisc m)   = (d $$ c <> misc m,     empty)  -attribute (n,v)             = text n <> text "=" <> attvalue v+attribute (n,v)             = qname n <> text "=" <> attvalue v content (CElem e _)         = element e content (CString False s _) = chardata s content (CString True s _)  = cdsect s@@ -187,7 +194,7 @@ content (CMisc m _)         = misc m  elementdecl :: ElementDecl -> [Char]-elementdecl (ElementDecl n cs) = text "<!ELEMENT" <+> text n <+>+elementdecl (ElementDecl n cs) = text "<!ELEMENT" <+> qname n <+>                                  contentspec cs <> text ">" contentspec :: ContentSpec -> [Char] contentspec EMPTY              = text "EMPTY"@@ -195,7 +202,7 @@ contentspec (Mixed m)          = mixed m contentspec (ContentSpec c)    = cp c --contentspec (ContentPE p cs)   = peref p-cp (TagName n m)       = text n <> modifier m+cp (TagName n m)       = qname n <> modifier m cp (Choice cs m)       = parens (hcat (intersperse (text "|") (map cp cs))) <>                            modifier m cp (Seq cs m)          = parens (hcat (intersperse (text ",") (map cp cs))) <>@@ -209,14 +216,14 @@ mixed :: Mixed -> [Char] mixed  PCDATA          = text "(#PCDATA)" mixed (PCDATAplus ns)  = text "(#PCDATA |" <+>-                         hcat (intersperse (text "|") (map text ns)) <>+                         hcat (intersperse (text "|") (map qname ns)) <>                          text ")*"  attlistdecl :: AttListDecl -> [Char]-attlistdecl (AttListDecl n ds) = text "<!ATTLIST" <+> text n <+>+attlistdecl (AttListDecl n ds) = text "<!ATTLIST" <+> qname n <+>                                  fsep (map attdef ds) <> text ">" attdef :: AttDef -> [Char]-attdef (AttDef n t d)          = text n <+> atttype t <+> defaultdecl d+attdef (AttDef n t d)          = qname n <+> atttype t <+> defaultdecl d atttype :: AttType -> [Char] atttype  StringType            = text "CDATA" atttype (TokenizedType t)      = tokenizedtype t@@ -319,9 +326,10 @@ cdsect :: [Char] -> [Char] cdsect c                       = text "<![CDATA[" <> chardata c <> text "]]>" +qname n                        = text (printableName n)+ ---- containsDoubleQuote :: [EV] -> Bool containsDoubleQuote evs = any csq evs     where csq (EVString s) = '"' `elem` s           csq _            = False-
src/Text/XML/HaXml/TypeMapping.hs view
@@ -1,13 +1,13 @@ module Text.XML.HaXml.TypeMapping   (   -- * A class to get an explicit type representation for any value-    HTypeable(..)	-- sole method, toHType+    HTypeable(..)       -- sole method, toHType   -- * Explicit representation of Haskell datatype information-  , HType(..)		-- instance of Eq, Show-  , Constr(..)		-- instance of Eq, Show+  , HType(..)           -- instance of Eq, Show+  , Constr(..)          -- instance of Eq, Show   -- * Helper functions to extract type info as strings-  , showHType		-- :: HType -> ShowS-  , showConstr		-- :: Int -> HType -> String+  , showHType           -- :: HType -> ShowS+  , showConstr          -- :: Int -> HType -> String   -- * Conversion from Haskell datatype to DTD   , toDTD   ) where@@ -38,9 +38,9 @@     | Prim String String        -- ^ separate Haskell name and XML name     | String     | Defined String [HType] [Constr]-	-- ^ A user-defined type has a name, a sequence of type variables,-	--   and a set of constructors.  (The variables might already be-	--   instantiated to actual types.)+        -- ^ A user-defined type has a name, a sequence of type variables,+        --   and a set of constructors.  (The variables might already be+        --   instantiated to actual types.)     deriving (Show)  instance Eq HType where@@ -49,7 +49,7 @@     (Tuple xs) == (Tuple ys) =  xs==ys     (Prim x _) == (Prim y _) =  x==y     String     == String     =  True-    (Defined n xs _) == (Defined m ys _)  =  n==m 	-- && xs==ys+    (Defined n _xs _) == (Defined m _ys _)  =  n==m     -- && xs==ys     _          == _          =  False  -- | A concrete representation of any user-defined Haskell constructor.@@ -65,7 +65,7 @@ --   suitable for an XML tagname. showConstr :: Int -> HType -> String showConstr n (Defined _ _ cs) = flatConstr (cs!!n) ""-showConstr n _ = error "no constructors for builtin types"+showConstr _ _ = error "no constructors for builtin types"  ------------------------------------------------------------------------ -- Some instances@@ -202,16 +202,16 @@   DTD (toplevel ht) Nothing (macrosFirst (reverse (h2d True [] [] [ht])))   where     macrosFirst :: [MarkupDecl] -> [MarkupDecl]-    macrosFirst decls = concat [p, p'] where (p, p') = partition f decls-                                             f (Entity _) = True-                                             f _ = False-    toplevel ht@(Defined _ _ _) = showHType ht "-XML"-    toplevel ht@_               = showHType ht ""+    macrosFirst decls = p ++ p' where (p, p') = partition f decls+                                      f (Entity _) = True+                                      f _ = False+    toplevel ht@(Defined _ _ _) = N $ showHType ht "-XML"+    toplevel ht                 = N $ showHType ht ""     c0 = False     h2d :: Bool -> [HType] -> [Constr] -> [HType] -> [MarkupDecl]     -- toplevel?   history    history   remainingwork     result-    h2d c history chist []       = []-    h2d c history chist (ht:hts) =+    h2d _c _history _chist []       = []+    h2d  c  history  chist (ht:hts) =       if ht `elem` history then h2d c0 history chist hts       else         case ht of@@ -219,29 +219,31 @@           List ht0   -> declelem ht: h2d c0 (ht:history) chist (ht0:hts)           Tuple hts0 -> (c ? (declelem ht:))                                      (h2d c0 history chist (hts0++hts))-          Prim s t   -> declprim ht ++ h2d c0 (ht:history) chist hts+          Prim _ _   -> declprim ht ++ h2d c0 (ht:history) chist hts           String     -> declstring:    h2d c0 (ht:history) chist hts-          Defined s _ cs ->+          Defined _ _ cs ->                let hts0 = concatMap grab cs in                (c ? (decltopelem ht:)) (declmacro ht chist)                ++ h2d c0 (ht:history) (cs++chist) (hts0++hts)     declelem ht =-      Element (ElementDecl (showHType ht "") (ContentSpec (outerHtExpr ht)))+      Element (ElementDecl (N $ showHType ht "")+                           (ContentSpec (outerHtExpr ht)))     decltopelem ht =    -- hack to avoid peref at toplevel-      Element (ElementDecl (showHType ht "-XML") (ContentSpec (innerHtExpr ht None)))+      Element (ElementDecl (N $ showHType ht "-XML")+                           (ContentSpec (innerHtExpr ht None)))     declmacro ht@(Defined _ _ cs) chist =       Entity (EntityPEDecl (PEDecl (showHType ht "") (PEDefEntityValue ev))):       concatMap (declConstr chist) cs       where ev = EntityValue [EVString (render (PP.cp (outerHtExpr ht)))]     declConstr chist c@(Constr s fv hts)-      | c `notElem` chist =-          [Element (ElementDecl (flatConstr c "") (ContentSpec (constrHtExpr c)))]-      | otherwise = [] -    declprim (Prim s t) =-      [ Element (ElementDecl t EMPTY)-      , AttList (AttListDecl t [AttDef "value" StringType REQUIRED])]+      | c `notElem` chist = [Element (ElementDecl (N $ flatConstr c "")+                                         (ContentSpec (constrHtExpr c)))]+      | otherwise = []+    declprim (Prim _ t) =+      [ Element (ElementDecl (N t) EMPTY)+      , AttList (AttListDecl (N t) [AttDef (N "value") StringType REQUIRED])]     declstring =-      Element (ElementDecl "string" (Mixed PCDATA))+      Element (ElementDecl (N "string") (Mixed PCDATA))     grab (Constr _ _ hts) = hts  (?) :: Bool -> (a->a) -> (a->a)@@ -256,35 +258,35 @@                         . showChar '-'                         . foldr1 (.) (intersperse (showChar '-')                                                   (map showHType hts))-showHType (Prim s t)  = showString t+showHType (Prim _ t)  = showString t showHType String      = showString "string" showHType (Defined s fv _)-                      = showString s . ((length fv > 0) ? (showChar '-'))+                      = showString s . ((length fv > 0) ? showChar '-')                         . foldr (.) id (intersperse (showChar '-')                                                     (map showHType fv))  flatConstr :: Constr -> ShowS flatConstr (Constr s fv _)-        = showString s . ((length fv > 0) ? (showChar '-'))+        = showString s . ((length fv > 0) ? showChar '-')           . foldr (.) id (intersperse (showChar '-') (map showHType fv))  outerHtExpr :: HType -> CP outerHtExpr (Maybe ht)      = innerHtExpr ht Query outerHtExpr (List ht)       = innerHtExpr ht Star-outerHtExpr (Defined s fv cs) =-    Choice (map (\c->TagName (flatConstr c "") None) cs) None+outerHtExpr (Defined _s _fv cs) =+    Choice (map (\c->TagName (N $ flatConstr c "") None) cs) None outerHtExpr ht              = innerHtExpr ht None  innerHtExpr :: HType -> Modifier -> CP-innerHtExpr (Prim s t)  m = TagName t m-innerHtExpr (Tuple hts) m = Seq (map (\c-> innerHtExpr c None) hts) m-innerHtExpr ht@(Defined s hts cs) m = -- CPPE (showHType ht "") (outerHtExpr ht)-                                      TagName ('%': showHType ht ";") m+innerHtExpr (Prim _ t)  m = TagName (N t) m+innerHtExpr (Tuple hts) m = Seq (map (`innerHtExpr` None) hts) m+innerHtExpr ht@(Defined _ _ _) m = -- CPPE (showHType ht "") (outerHtExpr ht)+                                   TagName (N ('%': showHType ht ";")) m                                                         --  ***HACK!!!***-innerHtExpr ht m = TagName (showHType ht "") m+innerHtExpr ht m = TagName (N $ showHType ht "") m  constrHtExpr :: Constr -> CP-constrHtExpr (Constr s fv [])  = TagName "EMPTY" None   --  ***HACK!!!***-constrHtExpr (Constr s fv hts) = innerHtExpr (Tuple hts) None+constrHtExpr (Constr _s _fv [])  = TagName (N "EMPTY") None   --  ***HACK!!!***+constrHtExpr (Constr _s _fv hts) = innerHtExpr (Tuple hts) None  ------------------------------------------------------------------------
src/Text/XML/HaXml/Types.hs view
@@ -99,6 +99,10 @@   , PubidLiteral(..)   , SystemLiteral(..) +  -- ** Namespaces+  , QName(..)+  , Namespace(..)+   -- ** Basic value types   , Name   , Names@@ -129,14 +133,14 @@ -- | The symbol table stored in a document holds all its general entity --   reference definitions. data Document i = Document Prolog (SymTab EntityDef) (Element i) [Misc]-                  deriving Eq+                  deriving (Eq, Show) data Prolog     = Prolog (Maybe XMLDecl) [Misc] (Maybe DocTypeDecl) [Misc]-                  deriving Eq+                  deriving (Eq, Show) data XMLDecl    = XMLDecl VersionInfo (Maybe EncodingDecl) (Maybe SDDecl)-                  deriving Eq+                  deriving (Eq, Show) data Misc       = Comment Comment                 | PI ProcessingInstruction-                deriving Eq+                deriving (Eq, Show)  type ProcessingInstruction = (PITarget,String) @@ -145,30 +149,37 @@ type Comment     = String type PITarget    = String -data DocTypeDecl = DTD Name (Maybe ExternalID) [MarkupDecl]  deriving Eq+data DocTypeDecl = DTD QName (Maybe ExternalID) [MarkupDecl]  deriving (Eq, Show) data MarkupDecl  = Element  ElementDecl                  | AttList  AttListDecl                  | Entity   EntityDecl                  | Notation NotationDecl                  | MarkupMisc Misc-                 deriving Eq+                 deriving (Eq, Show) -data ExtSubset     = ExtSubset (Maybe TextDecl) [ExtSubsetDecl]  deriving Eq+data ExtSubset     = ExtSubset (Maybe TextDecl) [ExtSubsetDecl]  deriving (Eq, Show) data ExtSubsetDecl = ExtMarkupDecl MarkupDecl                    | ExtConditionalSect ConditionalSect-                   deriving Eq+                   deriving (Eq, Show) -data Element i = Elem Name [Attribute] [Content i] deriving Eq-                                        --  intermediate for parsing-data ElemTag   = ElemTag Name [Attribute]-type Attribute = (Name, AttValue)+data Element i = Elem QName [Attribute] [Content i] deriving (Eq, Show)+--  ElemTag is an intermediate type for parsing only+data ElemTag   = ElemTag QName [Attribute]+type Attribute = (QName, AttValue) data Content i = CElem (Element i) i                | CString Bool CharData i                         -- ^ bool is whether whitespace is significant                | CRef Reference i                | CMisc Misc i-               deriving Eq+               deriving Show +-- custom instance of Eq, ignoring the informational elements.+instance Eq (Content i) where+    (CElem e _)     == (CElem e' _)       =  e==e'+    (CString b c _) == (CString b' c' _)  =  b==b' && c==c'+    (CRef r _)      == (CRef r' _)        =  r==r'+    (CMisc m _)     == (CMisc m' _)       =  m==m'+ info :: Content t -> t info (CElem _ i) = i info (CString _ _ i) = i@@ -185,31 +196,30 @@   fmap f (CRef r i)      = CRef r (f i)   fmap f (CMisc m i)     = CMisc m (f i) -data ElementDecl = ElementDecl Name ContentSpec deriving Eq+data ElementDecl = ElementDecl QName ContentSpec deriving (Eq, Show) data ContentSpec = EMPTY                  | ANY                  | Mixed Mixed                  | ContentSpec CP-                 deriving Eq--- FIXME: What is TagName here? Seems to be in disagreement with XML spec.-data CP = TagName Name Modifier+                 deriving (Eq, Show)+data CP = TagName QName Modifier         | Choice [CP] Modifier         | Seq [CP] Modifier-        deriving Eq+        deriving (Eq, Show) data Modifier = None  -- ^ Just One               | Query -- ^ Zero Or One               | Star  -- ^ Zero Or More               | Plus  -- ^ One Or More-              deriving Eq+              deriving (Eq, Show) data Mixed = PCDATA-           | PCDATAplus [Name]-           deriving Eq-data AttListDecl = AttListDecl Name [AttDef] deriving Eq-data AttDef      = AttDef Name AttType DefaultDecl deriving Eq+           | PCDATAplus [QName]+           deriving (Eq, Show)+data AttListDecl = AttListDecl QName [AttDef] deriving (Eq, Show)+data AttDef      = AttDef QName AttType DefaultDecl deriving (Eq, Show) data AttType     = StringType                  | TokenizedType TokenizedType                  | EnumeratedType EnumeratedType-                 deriving Eq+                 deriving (Eq, Show) data TokenizedType = ID                    | IDREF                    | IDREFS@@ -217,25 +227,25 @@                    | ENTITIES                    | NMTOKEN                    | NMTOKENS-                   deriving Eq+                   deriving (Eq, Show) data EnumeratedType = NotationType NotationType                     | Enumeration Enumeration-                    deriving Eq+                    deriving (Eq, Show) type NotationType   = [Name]    -- nonempty list type Enumeration    = [NmToken] -- nonempty list data DefaultDecl    = REQUIRED                     | IMPLIED                     | DefaultTo AttValue (Maybe FIXED)-                    deriving Eq-data FIXED          = FIXED deriving Eq+                    deriving (Eq, Show)+data FIXED          = FIXED deriving (Eq, Show)  data ConditionalSect = IncludeSect IncludeSect                      | IgnoreSect IgnoreSect-                     deriving Eq+                     deriving (Eq, Show) type IncludeSect = [ExtSubsetDecl] type IgnoreSect  = [IgnoreSectContents]-data Ignore      = Ignore deriving Eq-data IgnoreSectContents = IgnoreSectContents Ignore [(IgnoreSectContents,Ignore)]  deriving Eq+data Ignore      = Ignore deriving (Eq, Show)+data IgnoreSectContents = IgnoreSectContents Ignore [(IgnoreSectContents,Ignore)]  deriving (Eq, Show)  data Reference    = RefEntity EntityRef                   | RefChar CharRef@@ -246,25 +256,44 @@  data EntityDecl   = EntityGEDecl GEDecl                   | EntityPEDecl PEDecl-                  deriving Eq-data GEDecl       = GEDecl Name EntityDef deriving Eq-data PEDecl       = PEDecl Name PEDef deriving Eq+                  deriving (Eq, Show)+data GEDecl       = GEDecl Name EntityDef deriving (Eq, Show)+data PEDecl       = PEDecl Name PEDef deriving (Eq, Show) data EntityDef    = DefEntityValue EntityValue                   | DefExternalID ExternalID (Maybe NDataDecl)-                  deriving Eq+                  deriving (Eq, Show) data PEDef        = PEDefEntityValue EntityValue                   | PEDefExternalID ExternalID deriving (Eq,Show) data ExternalID   = SYSTEM SystemLiteral                   | PUBLIC PubidLiteral SystemLiteral deriving (Eq,Show)-newtype NDataDecl = NDATA Name  deriving Eq+newtype NDataDecl = NDATA Name  deriving (Eq, Show) -data TextDecl       = TextDecl (Maybe VersionInfo) EncodingDecl  deriving Eq-data ExtParsedEnt i = ExtParsedEnt (Maybe TextDecl) (Content i) deriving Eq-data ExtPE          = ExtPE (Maybe TextDecl) [ExtSubsetDecl] deriving Eq+data TextDecl       = TextDecl (Maybe VersionInfo) EncodingDecl  deriving (Eq, Show)+data ExtParsedEnt i = ExtParsedEnt (Maybe TextDecl) (Content i) deriving (Eq, Show)+data ExtPE          = ExtPE (Maybe TextDecl) [ExtSubsetDecl] deriving (Eq, Show) -data NotationDecl    = NOTATION Name (Either ExternalID PublicID) deriving Eq-newtype PublicID     = PUBLICID PubidLiteral deriving Eq-newtype EncodingDecl = EncodingDecl String deriving Eq+data NotationDecl    = NOTATION Name (Either ExternalID PublicID) deriving (Eq, Show)+newtype PublicID     = PUBLICID PubidLiteral deriving (Eq, Show)+newtype EncodingDecl = EncodingDecl String deriving (Eq, Show)++-- | A QName is a (possibly) qualified name, in the sense of XML namespaces.+data QName    = N  Name+              | QN Namespace Name deriving (Eq,Show)+-- | Namespaces are not defined in the XML spec itself, but at+--       http://www.w3.org/TR/xml-names+data Namespace = Namespace { nsPrefix  :: String+                           , nsURI     :: String+                           }+                 deriving (Show)+instance Eq Namespace where+    p == q  =  nsURI p == nsURI q     -- this is the W3C spec's definition!+instance Ord QName where+    compare (N n)    (N m)    = compare n m+    compare (QN p n) (N m)    = LT+    compare (N n)    (QN q m) = GT+    compare (QN p n) (QN q m) = case compare (nsPrefix p) (nsPrefix q) of+                                  EQ -> compare n m+                                  r  -> r  type Name     = String           -- non-empty string type Names    = [Name]           -- non-empty list
src/Text/XML/HaXml/Util.hs view
@@ -1,5 +1,5 @@ {- |- - Only a shmall module containing some helper functions to extract xml content+ - Only a small module containing some helper functions to extract xml content  - I would have added this to Types but I've put it into an additional module  - to avoid circular references (Verbatim <-> Types) -}@@ -13,21 +13,25 @@   , tagTextContent   ) where -import Text.XML.HaXml.Posn+--import Text.XML.HaXml.Posn import Text.XML.HaXml.Types import Text.XML.HaXml.Verbatim --- get the main element of the document so that you can apply CFilters directly--- i is typically (posInNewCxt "filename" Nothing) +-- | Get the main element of the document so that you can apply+--   CFilters directly.  'i' is typically (posInNewCxt "filename" Nothing)  docContent :: i -> Document i -> Content i docContent i (Document _ _ e _) = CElem e i --- if you know that your CFilter returns a tag your can use this function to get the tag Element +-- | If you know that your CFilter returns a tag, you can use this+--   function to get the tagged Element. contentElem ::  Content i -> Element i contentElem (CElem e _) = e contentElem _ = error "content is not a CElem"+ attrs :: Element i -> [Attribute] attrs ( Elem _ attrs _ ) = attrs++tagTextContent :: Content i -> [Char] tagTextContent ((CElem (Elem _ _ cs) _)) = concatMap verbatim cs   {-
src/Text/XML/HaXml/Validate.hs view
@@ -4,12 +4,15 @@   , partialValidate   ) where +import Prelude hiding (elem,rem,mod,sequence)+import qualified Prelude (elem) import Text.XML.HaXml.Types+import Text.XML.HaXml.Namespaces import Text.XML.HaXml.Combinators (multi,tag,iffind,literal,none,o) import Text.XML.HaXml.XmlContent (attr2str)-import Maybe (fromMaybe,isNothing,fromJust)-import List (intersperse,nub,(\\))-import Char (isSpace)+import Data.Maybe (fromMaybe,isNothing,fromJust)+import Data.List (intercalate,nub,(\\))+import Data.Char (isSpace)  #if __GLASGOW_HASKELL__ >= 604 || __NHC__ >= 118 || defined(__HUGS__) -- emulate older finite map interface using Data.Map, if it is available@@ -33,11 +36,11 @@  -- gather appropriate information out of the DTD data SimpleDTD = SimpleDTD-    { elements   :: FiniteMap Name ContentSpec	-- content model of elem-    , attributes :: FiniteMap (Name,Name) AttType -- type of (elem,attr)-    , required   :: FiniteMap Name [Name]	-- required attributes of elem-    , ids        :: [(Name,Name)]	-- all (element,attr) with ID type-    , idrefs     :: [(Name,Name)]	-- all (element,attr) with IDREF type+    { elements   :: FiniteMap QName ContentSpec -- content model of elem+    , attributes :: FiniteMap (QName,QName) AttType -- type of (elem,attr)+    , required   :: FiniteMap QName [QName]     -- required attributes of elem+    , ids        :: [(QName,QName)]     -- all (element,attr) with ID type+    , idrefs     :: [(QName,QName)]     -- all (element,attr) with IDREF type     }  simplifyDTD :: DocTypeDecl -> SimpleDTD@@ -48,15 +51,23 @@       , attributes = listToFM [ ((elem,attr),typ)                               | AttList (AttListDecl elem attdefs) <- decls                               , AttDef attr typ _ <- attdefs ]-      , required   = listToFM [ (elem, [ attr-                                       | AttDef attr _ REQUIRED <- attdefs ])-                              | AttList (AttListDecl elem attdefs) <- decls ]+      -- Be sure to look at all attribute declarations for each+      -- element, since we must merge them.  This implements the+      -- specification in that regard only; the specification's rules+      -- about how to merge multiple declarations for the same+      -- attribute are not considered by this implementation.+      -- See: http://www.w3.org/TR/REC-xml/#NT-AttlistDecl+      , required   = listToFM [ (elem, concat [ [ attr | AttDef attr _ REQUIRED <- attdefs ]+                                              | AttList (AttListDecl elem' attdefs) <- decls+                                              , elem' == elem ]+                                )+                              | Element (ElementDecl elem _) <- decls ]       , ids        = [ (elem,attr)                      | Element (ElementDecl elem _) <- decls                      , AttList (AttListDecl name attdefs) <- decls                      , elem == name                      , AttDef attr (TokenizedType ID) _ <- attdefs ]-      , idrefs     = []	-- not implemented+      , idrefs     = [] -- not implemented       }  -- simple auxiliary to avoid lots of if-then-else with empty else clauses.@@ -74,8 +85,8 @@ validate dtd' elem = root dtd' elem ++ partialValidate dtd' elem   where     root (DTD name _ _) (Elem name' _ _) =-        (name/=name') `gives` ("Document type should be <"++name-                               ++"> but appears to be <"++name'++">.")+        (name/=name') `gives` ("Document type should be <"++qname name+                               ++"> but appears to be <"++qname name'++">.")  -- | 'partialValidate' is like validate, except that it does not check that --   the element type matches that of the DTD's root element.@@ -86,13 +97,13 @@      valid (Elem name attrs contents) =         -- is the element defined in the DTD?-        let spec = lookupFM (elements dtd) name in -        (isNothing spec) `gives` ("Element <"++name++"> not known.")+        let spec = lookupFM (elements dtd) name in+        isNothing spec `gives` ("Element <"++qname name++"> not known.")         -- is each attribute mentioned only once?-        ++ (let dups = duplicates (map fst attrs) in+        ++ (let dups = duplicates (map (qname . fst) attrs) in             not (null dups) `gives`-               ("Element <"++name++"> has duplicate attributes: "-                ++concat (intersperse "," dups)++"."))+               ("Element <"++qname name++"> has duplicate attributes: "+                ++intercalate "," dups++"."))         -- does each attribute belong to this element?  value is in range?         ++ concatMap (checkAttr name) attrs         -- are all required attributes present?@@ -101,125 +112,125 @@         -- are its children in a permissible sequence?         ++ checkContentSpec name (fromMaybe ANY spec) contents         -- now recursively check the element children-        ++ concatMap valid [ elem | CElem elem _ <- contents ]+        ++ concatMap valid [ elm | CElem elm _ <- contents ] -    checkAttr elem (attr, val) =-        let typ = lookupFM (attributes dtd) (elem,attr)+    checkAttr elm (attr, val) =+        let typ = lookupFM (attributes dtd) (elm,attr)             attval = attr2str val in-        if isNothing typ then ["Attribute \""++attr-                               ++"\" not known for element <"++elem++">."]+        if isNothing typ then ["Attribute \""++qname attr+                               ++"\" not known for element <"++qname elm++">."]         else           case fromJust typ of             EnumeratedType e ->               case e of                 Enumeration es ->-                    (not (attval `Prelude.elem` es)) `gives`+                    (attval `notElem` es) `gives`                           ("Value \""++attval++"\" of attribute \""-                           ++attr++"\" in element <"++elem+                           ++qname attr++"\" in element <"++qname elm                            ++"> is not in the required enumeration range: "                            ++unwords es)                 _ -> []             _ -> [] -    checkRequired elem attrs req =-        (not (req `Prelude.elem` map fst attrs)) `gives`-            ("Element <"++elem++"> requires the attribute \""++req+    checkRequired elm attrs req =+        (req `notElem` map fst attrs) `gives`+            ("Element <"++qname elm++"> requires the attribute \""++qname req              ++"\" but it is missing.") -    checkContentSpec elem ANY _ = []-    checkContentSpec elem EMPTY [] = []-    checkContentSpec elem EMPTY (_:_) =-        ["Element <"++elem++"> is not empty but should be."]-    checkContentSpec elem (Mixed PCDATA) cs = concatMap (checkMixed elem []) cs-    checkContentSpec elem (Mixed (PCDATAplus names)) cs =-        concatMap (checkMixed elem names) cs-    checkContentSpec elem (ContentSpec cp) cs = excludeText elem cs ++-        (let (errs,rest) = checkCP elem cp (flatten cs) in+    checkContentSpec _elm ANY   _     = []+    checkContentSpec _elm EMPTY []    = []+    checkContentSpec  elm EMPTY (_:_) =+        ["Element <"++qname elm++"> is not empty but should be."]+    checkContentSpec  elm (Mixed PCDATA) cs = concatMap (checkMixed elm []) cs+    checkContentSpec  elm (Mixed (PCDATAplus names)) cs =+        concatMap (checkMixed elm names) cs+    checkContentSpec  elm (ContentSpec cp) cs = excludeText elm cs +++        (let (errs,rest) = checkCP elm cp (flatten cs) in          case rest of [] -> errs-                      _  -> errs++["Element <"++elem++"> contains extra "+                      _  -> errs++["Element <"++qname elm++"> contains extra "                                   ++"elements beyond its content spec."]) -    checkMixed elem permitted (CElem (Elem name _ _) _)-        | not (name `Prelude.elem` permitted) =-            ["Element <"++elem++"> contains an element <"++name+    checkMixed  elm  permitted (CElem (Elem name _ _) _)+        | name `notElem` permitted =+            ["Element <"++qname elm++"> contains an element <"++qname name              ++"> but should not."]-    checkMixed elem permitted _ = []+    checkMixed _elm _permitted _ = []      flatten (CElem (Elem name _ _) _: cs) = name: flatten cs     flatten (_: cs)                       = flatten cs     flatten []                            = [] -    excludeText elem (CElem _ _: cs) = excludeText elem cs-    excludeText elem (CMisc _ _: cs) = excludeText elem cs-    excludeText elem (CString _ s _: cs) | all isSpace s = excludeText elem cs-    excludeText elem (_:  cs) =-        ["Element <"++elem++"> contains text/references but should not."]-    excludeText elem [] = []+    excludeText  elm (CElem _ _: cs) = excludeText elm cs+    excludeText  elm (CMisc _ _: cs) = excludeText elm cs+    excludeText  elm (CString _ s _: cs) | all isSpace s = excludeText elm cs+    excludeText  elm (_:_) =+        ["Element <"++qname elm++"> contains text/references but should not."]+    excludeText _elm [] = []      -- This is a little parser really.  Returns any errors, plus the remainder     -- of the input string.-    checkCP :: Name -> CP -> [Name] -> ([String],[Name])-    checkCP elem cp@(TagName n None) [] = (cpError elem cp, [])-    checkCP elem cp@(TagName n None) (n':ns)-        | n==n'     = ([], ns)-        | otherwise = (cpError elem cp, n':ns)-    checkCP elem cp@(TagName n Query) [] = ([],[])-    checkCP elem cp@(TagName n Query) (n':ns)-        | n==n'     = ([], ns)-        | otherwise = ([], n':ns)-    checkCP elem cp@(TagName n Star) [] = ([],[])-    checkCP elem cp@(TagName n Star) (n':ns)-        | n==n'     = checkCP elem (TagName n Star) ns-        | otherwise = ([], n':ns)-    checkCP elem cp@(TagName n Plus) [] = (cpError elem cp, [])-    checkCP elem cp@(TagName n Plus) (n':ns)-        | n==n'     = checkCP elem (TagName n Star) ns-        | otherwise = (cpError elem cp, n':ns)+    checkCP :: QName -> CP -> [QName] -> ([String],[QName])+    checkCP elm cp@(TagName _ None) []       = (cpError elm cp, [])+    checkCP elm cp@(TagName n None) (n':ns)+                                 | n==n'     = ([], ns)+                                 | otherwise = (cpError elm cp, n':ns)+    checkCP  _     (TagName _ Query) []      = ([],[])+    checkCP  _     (TagName n Query) (n':ns)+                                 | n==n'     = ([], ns)+                                 | otherwise = ([], n':ns)+    checkCP  _     (TagName _ Star) []       = ([],[])+    checkCP elm    (TagName n Star) (n':ns)+                                 | n==n'     = checkCP elm (TagName n Star) ns+                                 | otherwise = ([], n':ns)+    checkCP elm cp@(TagName _ Plus) []       = (cpError elm cp, [])+    checkCP elm cp@(TagName n Plus) (n':ns)+                                 | n==n'     = checkCP elm (TagName n Star) ns+                                 | otherwise = (cpError elm cp, n':ns)  -- omit this clause, to permit (a?|b?) as a valid but empty choice  -- checkCP elem cp@(Choice cps None) [] = (cpError elem cp, [])-    checkCP elem cp@(Choice cps None) ns =-        let next = choice elem ns cps in-        if null next then (cpError elem cp, ns)-        else ([], head next)	-- choose the first alternative with no errors-    checkCP elem cp@(Choice cps Query) [] = ([],[])-    checkCP elem cp@(Choice cps Query) ns =-        let next = choice elem ns cps in+    checkCP elm cp@(Choice cps None) ns =+        let next = choice elm ns cps in+        if null next then (cpError elm cp, ns)+        else ([], head next)    -- choose the first alternative with no errors+    checkCP _      (Choice _   Query) [] = ([],[])+    checkCP elm    (Choice cps Query) ns =+        let next = choice elm ns cps in         if null next then ([],ns)         else ([], head next)-    checkCP elem cp@(Choice cps Star) [] = ([],[])-    checkCP elem cp@(Choice cps Star) ns =-        let next = choice elem ns cps in+    checkCP _      (Choice _   Star) [] = ([],[])+    checkCP elm    (Choice cps Star) ns =+        let next = choice elm ns cps in         if null next then ([],ns)-        else checkCP elem (Choice cps Star) (head next)-    checkCP elem cp@(Choice cps Plus) [] = (cpError elem cp, [])-    checkCP elem cp@(Choice cps Plus) ns =-        let next = choice elem ns cps in-        if null next then (cpError elem cp, ns)-        else checkCP elem (Choice cps Star) (head next)+        else checkCP elm (Choice cps Star) (head next)+    checkCP elm cp@(Choice _   Plus) [] = (cpError elm cp, [])+    checkCP elm cp@(Choice cps Plus) ns =+        let next = choice elm ns cps in+        if null next then (cpError elm cp, ns)+        else checkCP elm (Choice cps Star) (head next)  -- omit this clause, to permit (a?,b?) as a valid but empty sequence  -- checkCP elem cp@(Seq cps None) [] = (cpError elem cp, [])-    checkCP elem cp@(Seq cps None) ns =-        let (errs,next) = sequence elem ns cps in+    checkCP elm cp@(Seq cps None) ns =+        let (errs,next) = sequence elm ns cps in         if null errs then ([],next)-        else (cpError elem cp++errs, ns)-    checkCP elem cp@(Seq cps Query) [] = ([],[])-    checkCP elem cp@(Seq cps Query) ns =-        let (errs,next) = sequence elem ns cps in+        else (cpError elm cp++errs, ns)+    checkCP _      (Seq _   Query) [] = ([],[])+    checkCP elm    (Seq cps Query) ns =+        let (errs,next) = sequence elm ns cps in         if null errs then ([],next)         else ([], ns)-    checkCP elem cp@(Seq cps Star) [] = ([],[])-    checkCP elem cp@(Seq cps Star) ns =-        let (errs,next) = sequence elem ns cps in-        if null errs then checkCP elem (Seq cps Star) next+    checkCP _      (Seq _   Star) [] = ([],[])+    checkCP elm    (Seq cps Star) ns =+        let (errs,next) = sequence elm ns cps in+        if null errs then checkCP elm (Seq cps Star) next         else ([], ns)-    checkCP elem cp@(Seq cps Plus) [] = (cpError elem cp, [])-    checkCP elem cp@(Seq cps Plus) ns =-        let (errs,next) = sequence elem ns cps in-        if null errs then checkCP elem (Seq cps Star) next-        else (cpError elem cp++errs, ns)+    checkCP elm cp@(Seq _   Plus) [] = (cpError elm cp, [])+    checkCP elm cp@(Seq cps Plus) ns =+        let (errs,next) = sequence elm ns cps in+        if null errs then checkCP elm (Seq cps Star) next+        else (cpError elm cp++errs, ns) -    choice elem ns cps =  -- return only those parses that don't give any errors-        [ rem | ([],rem) <- map (\cp-> checkCP elem (definite cp) ns) cps ]+    choice elm ns cps =  -- return only those parses that don't give any errors+        [ rem | ([],rem) <- map (\cp-> checkCP elm (definite cp) ns) cps ]         ++ [ ns | all possEmpty cps ]         where definite (TagName n Query)  = TagName n None               definite (Choice cps Query) = Choice cps None@@ -233,33 +244,35 @@               possEmpty (Choice _ mod)    = mod `Prelude.elem` [Query,Star]               possEmpty (Seq cps None)    = all possEmpty cps               possEmpty (Seq _ mod)       = mod `Prelude.elem` [Query,Star]-    sequence elem ns cps =  -- accumulate errors down the sequence-        foldl (\(es,ns) cp-> let (es',ns') = checkCP elem cp ns+    sequence elm ns cps =  -- accumulate errors down the sequence+        foldl (\(es,ns) cp-> let (es',ns') = checkCP elm cp ns                              in (es++es', ns'))               ([],ns) cps -    checkIDs elem =-        let celem = CElem elem undefined-            showAttr a = iffind a literal none-            idElems = concatMap (\(name,at)-> multi (showAttr at `o` tag name)-                                                    celem)+    checkIDs elm =+        let celem = CElem elm undefined+            showAttr a = iffind (printableName a) literal none+            idElems = concatMap (\(name, at)->+                                     multi (showAttr at `o`+                                                tag (printableName name))+                                           celem)                                 (ids dtd)             badIds  = duplicates (map (\(CString _ s _)->s) idElems)         in not (null badIds) `gives`                ("These attribute values of type ID are not unique: "-                ++concat (intersperse "," badIds)++".")+                ++intercalate "," badIds++".")  -cpError :: Name -> CP -> [String]-cpError elem cp =-    ["Element <"++elem++"> should contain "++display cp++" but does not."]+cpError :: QName -> CP -> [String]+cpError elm cp =+    ["Element <"++qname elm++"> should contain "++display cp++" but does not."]   display :: CP -> String-display (TagName name mod) = name ++ modifier mod-display (Choice cps mod)   = "(" ++ concat (intersperse "|" (map display cps))+display (TagName name mod) = qname name ++ modifier mod+display (Choice cps mod)   = "(" ++ intercalate "|" (map display cps)                              ++ ")" ++ modifier mod-display (Seq cps mod)      = "(" ++ concat (intersperse "," (map display cps))+display (Seq cps mod)      = "(" ++ intercalate "," (map display cps)                              ++ ")" ++ modifier mod  modifier :: Modifier -> String@@ -269,4 +282,7 @@ modifier Plus  = "+"  duplicates :: Eq a => [a] -> [a]-duplicates xs = xs \\ (nub xs)+duplicates xs = xs \\ nub xs++qname :: QName -> String+qname n = printableName n
src/Text/XML/HaXml/Verbatim.hs view
@@ -22,7 +22,7 @@    which will format XML 'Content' as a 'String' while retaining the    formatting of the input document unchanged. -   /Know problems/:+   /Known problems/:      * HaXml's parser eats line feeds between two tags. @@ -45,7 +45,11 @@ module Text.XML.HaXml.Verbatim where  import Text.XML.HaXml.Types+import Text.XML.HaXml.Namespaces +qname :: QName -> String+qname n = printableName n+ -- |This class promises that the function 'verbatim' knows how to -- format this data type into a string without changing the -- formatting.@@ -54,7 +58,7 @@     verbatim :: a -> String  instance (Verbatim a) => Verbatim [a] where-    verbatim  = concat . (map verbatim)+    verbatim  = concatMap verbatim  instance Verbatim Char where     verbatim c = [c]@@ -67,18 +71,25 @@     verbatim (CElem c _)     = verbatim c     verbatim (CString _ c _) = c     verbatim (CRef c _)      = verbatim c-    verbatim (CMisc _ _)     = error "NYI: verbatim not defined for CMisc"+    verbatim (CMisc (Comment c) _) = "<!--"++c++"-->"+    verbatim (CMisc _ _)     = "<? ?>"+ -- verbatim (CMisc _ _)     = error "NYI: verbatim not defined for CMisc"  instance Verbatim (Element i) where-    verbatim (Elem nam att [])   = "<" ++ nam ++ (concat . (map verbAttr)) att+    verbatim (Elem nam att [])   = "<" ++ qname nam+                                   ++ concatMap verbAttr att                                    ++ "/>"-    verbatim (Elem nam att cont) = "<" ++ nam ++ (concat . (map verbAttr)) att-                                   ++ ">" ++ verbatim cont ++ "</" ++ nam ++ ">"+    verbatim (Elem nam att cont) = "<" ++ qname nam+                                   ++ concatMap verbAttr att+                                   ++ ">" ++ verbatim cont ++ "</"+                                   ++ qname nam ++ ">"  instance Verbatim Reference where     verbatim (RefEntity r) = "&" ++ verbatim r ++ ";"     verbatim (RefChar c)   = "&#" ++ show c ++ ";" +instance Verbatim AttValue where+    verbatim (AttValue v) = verbatim v  -- |This is a helper function is required because Haskell does not -- allow to make an ordinary tuple (like 'Attribute') an instance of a@@ -87,5 +98,4 @@ -- implicitly by the definition for lists of 'Verbatim' data types.  verbAttr :: Attribute -> String-verbAttr (n, AttValue v) = " " ++ n ++ "=\"" ++ verbatim v ++ "\""-+verbAttr (n, AttValue v) = " " ++ qname n ++ "=\"" ++ verbatim v ++ "\""
+ src/Text/XML/HaXml/Version.hs view
@@ -0,0 +1,6 @@+module Text.XML.HaXml.Version+  ( version+  ) where++version :: String+version  = "1.25.6"
src/Text/XML/HaXml/Wrappers.hs view
@@ -1,3 +1,5 @@+{-# LANGUAGE CPP #-}+#define dummy   -- just to ensure that cpp gets called on this file module Text.XML.HaXml.Wrappers   ( fix2Args   , processXmlWith@@ -5,9 +7,12 @@   ) where  -- imports required for processXmlWith and fix2Args-import System-import IO-import List (isSuffixOf)+import Prelude hiding (filter)+import System.Exit+import System.Environment+import System.IO+import Data.List  (isSuffixOf)+import Control.Monad (when)  import Text.XML.HaXml.Types       (Document(..),Content(..)) import Text.XML.HaXml.Combinators (CFilter)@@ -15,6 +20,7 @@ import Text.XML.HaXml.Parse       (xmlParse) import Text.XML.HaXml.Html.Parse  (htmlParse) import Text.XML.HaXml.Pretty as PP(document)+import Text.XML.HaXml.Version import Text.PrettyPrint.HughesPJ  (render)  @@ -25,6 +31,12 @@ fix2Args :: IO (String,String) fix2Args = do   args <- getArgs+  when ("--version" `elem` args) $ do+      putStrLn $ "part of HaXml-" ++ version+      exitSuccess+  when ("--help" `elem` args) $ do+      putStrLn "See http://projects.haskell.org/HaXml"+      exitSuccess   case length args of     0 -> return ("-",     "-")     1 -> return (args!!0, "-")@@ -54,12 +66,13 @@   hFlush o    where-    onContent :: FilePath -> (CFilter Posn) -> Document Posn -> Document Posn+    onContent :: FilePath -> CFilter Posn -> Document Posn -> Document Posn     onContent file filter (Document p s e m) =         case filter (CElem e (posInNewCxt file Nothing)) of             [CElem e' _] -> Document p s e' m-            []           -> error "produced no output"-            _            -> error "produced more than one output"+            []           -> error $ "filtering"++file++"produced no output"+            _            -> error $ "filtering"++file+++                                    "produced more than one output document"  -- | The wrapper @onContent@ simply applies a given content filter to a --   document.  Ambiguous or empty results raise an error exception.
src/Text/XML/HaXml/XmlContent.hs view
@@ -4,7 +4,7 @@ -- --   If you are starting with an XML DTD, use HaXml's tool DtdToHaskell --   to generate both the Haskell types and the corresponding instances.---   +-- --   If you are starting with a set of Haskell datatypes, use DrIFT to --   derive instances of this class for you: --       http:\/\/repetae.net\/john\/computer\/haskell\/DrIFT@@ -31,12 +31,12 @@   , hGetXml,  hPutXml, fpsHPutXml   ) where -import IO+import System.IO import qualified Text.XML.HaXml.ByteStringPP as FPS (document) import qualified Data.ByteString.Lazy.Char8 as FPS  import Text.PrettyPrint.HughesPJ (render)-import Text.ParserCombinators.Poly+--import Text.ParserCombinators.Poly  import Text.XML.HaXml.Types import Text.XML.HaXml.TypeMapping@@ -111,15 +111,15 @@                      [] (if dtd then Just (toDTD ht) else Nothing) [])              emptyST              ( case toContents value of-                 []             -> Elem "empty" [] []+                 []             -> Elem (N "empty") [] []                  [CElem e ()]   -> e-                 (CElem e ():_) -> error "too many XML elements in document" )+                 (CElem _ ():_) -> error "too many XML elements in document" )              []  -- | Read a Haskell value from an XML document, ignoring the DTD and --   using the Haskell result type to determine how to parse it. fromXml :: XmlContent a => Document Posn -> Either String a-fromXml (Document _ _ e@(Elem n _ cs) _) =+fromXml (Document _ _ e@(Elem _ _ _) _) =   fst (runParser parseContents [CElem e (posInNewCxt "document" Nothing)])  @@ -151,8 +151,10 @@  instance XmlContent Char where     -- NOT in a string-    toContents c  = error "Text.XML.HaXml.XmlContent.toContents used on a Haskell Char"-    parseContents = fail "Text.XML.HaXml.XmlContent.parseContents used on a Haskell Char "+    toContents _  = error $ "Text.XML.HaXml.XmlContent.toContents "+++                            " used on a Haskell Char"+    parseContents = fail  $ "Text.XML.HaXml.XmlContent.parseContents "+++                            " used on a Haskell Char "     -- Only defined for Char and no other types:     xToChar   = id     xFromChar = id@@ -166,7 +168,7 @@     parseContents = let result = runParser p [] -- for type of result only                         p = case (toHType . head . (\ (Right x)->x) . fst)                                  result of-                              (Prim "Char" _) -> fmap (map xFromChar) $ text+                              (Prim "Char" _) -> map xFromChar <$> text                               _ -> many parseContents                     in p         -- comments, PIs, etc, are skipped in the individual element parser.
src/Text/XML/HaXml/XmlContent/Haskell.hs view
@@ -29,8 +29,8 @@    ) where -import IO-import List (isPrefixOf, isSuffixOf)+import System.IO+import Data.List (isPrefixOf, isSuffixOf) import qualified Text.XML.HaXml.ByteStringPP as FPS (document) import qualified Data.ByteString.Lazy.Char8 as FPS @@ -38,6 +38,7 @@ import Text.ParserCombinators.Poly  import Text.XML.HaXml.Types+import Text.XML.HaXml.Namespaces import Text.XML.HaXml.TypeMapping import Text.XML.HaXml.Posn     (Posn, posInNewCxt) import Text.XML.HaXml.Pretty   (document)@@ -109,8 +110,8 @@                      [] (if dtd then Just (toDTD ht) else Nothing) [])              emptyST              ( case (ht, toContents value) of-                 (Tuple _, cs)       -> Elem (showHType ht "") [] cs-                 (Defined _ _ _, cs) -> Elem (showHType ht "-XML") [] cs+                 (Tuple _, cs)       -> Elem (N $ showHType ht "") [] cs+                 (Defined _ _ _, cs) -> Elem (N $ showHType ht "-XML") [] cs                  (_, [CElem e ()])   -> e )              [] @@ -118,8 +119,8 @@ --   using the Haskell result type to determine how to parse it. fromXml :: XmlContent a => Document Posn -> Either String a fromXml (Document _ _ e@(Elem n _ cs) _)-  | "tuple" `isPrefixOf` n = fst (runParser parseContents cs)-  | "-XML"  `isSuffixOf` n = fst (runParser parseContents cs)+  | "tuple" `isPrefixOf` localName n = fst (runParser parseContents cs)+  | "-XML"  `isSuffixOf` localName n = fst (runParser parseContents cs)   | otherwise = fst (runParser parseContents                                [CElem e (posInNewCxt "document" Nothing)]) @@ -152,29 +153,29 @@ ------------------------------------------------------------------------  instance XmlContent Bool where-    toContents b   = [CElem (Elem "bool" [mkAttr "value" (show b)] []) ()]+    toContents b   = [CElem (Elem (N "bool") [mkAttr "value" (show b)] []) ()]     parseContents = do { e <- element ["bool"] ; return (attval e) }  instance XmlContent Int where-    toContents i   = [CElem (Elem "int" [mkAttr "value" (show i)] []) ()]+    toContents i   = [CElem (Elem (N "int") [mkAttr "value" (show i)] []) ()]     parseContents = do { e <- element ["int"] ; return (attval e) }  instance XmlContent Integer where-    toContents i   = [CElem (Elem "integer" [mkAttr "value" (show i)] []) ()]+    toContents i   = [CElem (Elem (N "integer") [mkAttr "value" (show i)] []) ()]     parseContents = do { e <- element ["integer"] ; return (attval e) }  instance XmlContent Float where-    toContents i   = [CElem (Elem "float" [mkAttr "value" (show i)] []) ()]+    toContents i   = [CElem (Elem (N "float") [mkAttr "value" (show i)] []) ()]     parseContents = do { e <- element ["float"] ; return (attval e) }  instance XmlContent Double where-    toContents i   = [CElem (Elem "double" [mkAttr "value" (show i)] []) ()]+    toContents i   = [CElem (Elem (N "double") [mkAttr "value" (show i)] []) ()]     parseContents = do { e <- element ["double"] ; return (attval e) }  instance XmlContent Char where     -- NOT in a string-    toContents c   = [CElem (Elem "char" [mkAttr "value" [c]] []) ()]-    parseContents = do { (Elem _ [("value",(AttValue [Left [c]]))] [])+    toContents c   = [CElem (Elem (N "char") [mkAttr "value" [c]] []) ()]+    parseContents = do { (Elem _ [(N "value",AttValue [Left [c]])] [])                              <- element ["char"]                        ; return c                        }@@ -192,9 +193,11 @@         case x of             (CString _ s _:cs)                    -> Success cs (map xFromChar s)-            (CElem (Elem "string" [] [CString _ s _]) _:cs)+            (CElem (Elem (N "string") [] [CString _ s _]) _:cs)                    -> Success cs (map xFromChar s)-            (CElem (Elem e [] xs) _:cs) | "list" `isPrefixOf` e+            (CElem (Elem (N "string") [] []) _:cs)+                   -> Success cs []+            (CElem (Elem (N e) [] xs) _:cs) | "list" `isPrefixOf` e                    -> scanElements xs                    where                   -- scanElements :: [Content] -> (Either String [a],[Content])@@ -207,17 +210,18 @@                                     Failure ds msg -> Failure ds msg                                     Success ds ys  -> Success ds (y:ys)             (CElem (Elem e _ _) pos: cs)-                   -> Failure cs ("Expected a <list-...>, but found a <"++e+                   -> Failure cs ("Expected a <list-...>, but found a <"+                                  ++printableName e                                   ++"> at\n"++show pos)             (CRef r pos: cs)                    -> Failure cs ("Expected a <list-...>, but found a ref "                                   ++verbatim r++" at\n"++ show pos)-            (_:cs) -> ((\ (P p)-> p) parseContents) cs  -- skip comments etc.+            (_:cs) -> (\ (P p)-> p) parseContents cs  -- skip comments etc.             []     -> Failure [] "Ran out of input XML whilst secondary parsing"         )  instance XmlContent () where-    toContents ()  = [CElem (Elem "unit" [] []) ()]+    toContents ()  = [CElem (Elem (N "unit") [] []) ()]     parseContents = do { element ["unit"]; return () }  @@ -235,9 +239,9 @@     toContents v@(Right ab) =         [mkElemC (showConstr 1 (toHType v)) (toContents ab)]     parseContents =-        (inElementWith (flip isPrefixOf) "Left"  $ fmap Left  parseContents)+        inElementWith (flip isPrefixOf) "Left"  (fmap Left  parseContents)           `onFail`-        (inElementWith (flip isPrefixOf) "Right" $ fmap Right parseContents)+        inElementWith (flip isPrefixOf) "Right" (fmap Right parseContents)  --    do{ e@(Elem t [] _) <- element ["Left","Right"] --      ; case t of
src/Text/XML/HaXml/XmlContent/Parser.hs view
@@ -13,7 +13,7 @@ --   This unified class interface replaces two previous (somewhat similar) --   classes: Haskell2Xml and Xml2Haskell.  There was no real reason to have --   separate classes depending on how you originally defined your datatypes.---   However, some instances for basic types like lists will depend on which +--   However, some instances for basic types like lists will depend on which --   direction you are using.  See Text.XML.HaXml.XmlContent and --   Text.XML.HaXml.XmlContent.Haskell. @@ -67,22 +67,15 @@   , ANYContent(..)   ) where ---import IO-import Maybe (catMaybes)-import Char  (chr, isSpace)-import List  (isPrefixOf, isSuffixOf)--import Text.PrettyPrint.HughesPJ (render)-import qualified Text.XML.HaXml.Pretty as PP+import Control.Monad (void)+import Data.Maybe (catMaybes)+import Data.Char  (chr, isSpace)  import Text.XML.HaXml.Types+import Text.XML.HaXml.Namespaces import Text.XML.HaXml.TypeMapping-import Text.XML.HaXml.Posn     (Posn, posInNewCxt)-import Text.XML.HaXml.Pretty   (document)-import Text.XML.HaXml.Parse    (xmlParse)+import Text.XML.HaXml.Posn     (Posn) import Text.XML.HaXml.Verbatim (Verbatim(verbatim))-import qualified Text.XML.HaXml.ByteStringPP as FPS (document)-import qualified Data.ByteString.Lazy.Char8 as FPS  import Text.ParserCombinators.Poly @@ -101,19 +94,19 @@ ------------------------------------------------------------------------ -- | Read a single attribute called "value". attval :: (Read a) => Element i -> a-attval (Elem _ [("value",v@(AttValue _))] []) = read (show v)+attval (Elem _ [(_{-N "value"-},v@(AttValue _))] []) = read (show v)  -- | Generate a single attribute. mkAttr :: String -> String -> Attribute-mkAttr n v = (n, AttValue [Left v])+mkAttr n v = (N n, AttValue [Left v])  -- | Generate an element with no attributes, named for its HType. mkElem :: XmlContent a => a -> [Content ()] -> Content ()-mkElem x cs  = CElem (Elem (showHType (toHType x) "") [] cs) ()+mkElem x cs  = CElem (Elem (N (showHType (toHType x) "")) [] cs) ()  -- | Generate an element with no attributes, named directly. mkElemC :: String -> [Content ()] -> Content ()-mkElemC x cs = CElem (Elem x [] cs) ()+mkElemC x cs = CElem (Elem (N x) [] cs) ()  -- | Turn a simple string into XML text. toText :: String -> [Content ()]@@ -151,9 +144,10 @@     { c <- content (formatted tags)     ; case c of           CElem e@(Elem t _ _) pos-              | any (match t) tags -> return (pos, e)-              | otherwise          -> fail ("Found a <"++t++">, but expected "-                                           ++formatted tags++"\nat "++show pos)+              | any (match (localName t)) tags -> return (pos, e)+              | otherwise   -> fail ("Found a <"++printableName t+                                     ++">, but expected "+                                     ++formatted tags++"\nat "++show pos)           CString b s pos               | not b && all isSpace s -> posnElementWith match tags                                                         -- ignore blank space@@ -195,9 +189,12 @@         (Right x, []) -> return x         (Right x, ds@(d:_))             | all onlyMisc ds -> return x-            | otherwise       -> fail ("Too many elements inside <"++e++"> at\n"+            | otherwise       -> fail ("Too many elements inside <"+                                      ++printableName e++"> at\n"                                       ++show (info d)++"\n"-                                      ++"Found excess: "++verbatim d)+                                      ++"Found excess: "+                                      ++verbatim (take 7 ds)+                                      ++"\n[...]")   where onlyMisc (CMisc _ _) = True         onlyMisc (CString False s _) | all isSpace s = True         onlyMisc _ = False@@ -603,16 +600,16 @@  fromAttrToStr :: String -> Attribute -> Maybe String fromAttrToStr n (n0,v)-        | n == n0   = Just (attr2str v)-        | otherwise = Nothing+        | n == localName n0   = Just (attr2str v)+        | otherwise           = Nothing  toAttrFrStr   :: String -> String -> Maybe Attribute-toAttrFrStr n v = Just (n, str2attr v)+toAttrFrStr n v = Just (N n, str2attr v)  str2attr :: String -> AttValue str2attr s =     let f t =-          let (l,r) = span (\c-> not (elem c "\"&<>'")) t+          let (l,r) = span (`notElem` "\"&<>'") t           in if null r then [Left l]              else Left l: Right (g (head r)): f (tail r)         g '"'  = RefEntity "quot"@@ -655,8 +652,8 @@                 | UnConverted [Content Posn]  instance Show ANYContent where-    show (UnConverted c) = "UnConverted " ++ (show $ map verbatim c)-    show (ANYContent a)  = "ANYContent " ++ (show a)+    show (UnConverted c) = "UnConverted " ++ show (map verbatim c)+    show (ANYContent a)  = "ANYContent " ++ show a  instance Eq ANYContent where     a == b = show a == show b@@ -676,14 +673,14 @@                      hx = toHType x instance (XmlContent a) => XmlContent (List1 a) where     toContents (NonEmpty xs) = concatMap toContents xs-    parseContents = fmap NonEmpty $ many1 parseContents+    parseContents = NonEmpty <$> many1 parseContents  instance HTypeable ANYContent where     toHType _      = Prim "ANYContent" "ANY" instance XmlContent ANYContent where     toContents (ANYContent a)  = toContents a-    toContents (UnConverted s) = map (fmap (const ())) s-    parseContents = P (\cs -> Success [] (UnConverted cs))+    toContents (UnConverted s) = map void s+    parseContents = P (Success [] . UnConverted)  ------------------------------------------------------------------------ --
src/Text/XML/HaXml/Xtract/Combinators.hs view
@@ -21,20 +21,20 @@  -- | lift an ordinary content filter to a double filter. local,global :: CFilter i -> DFilter i-local  f = \xml sub-> f sub-global f = \xml sub-> f xml+local  f _xml sub = f sub+global f xml _sub = f xml  -- | drop a double filter to an ordinary content filter. --   (permitting interior access to document root) dfilter :: DFilter i -> CFilter i-dfilter f = \xml-> f xml xml+dfilter f xml = f xml xml  -- | drop a double filter to an ordinary content filter. --   (Where interior access to the document root is not needed, the --    retaining pointer to the outer element can be pruned away. --   'cfilter' is more space-efficient than 'dfilter' in this situation.) cfilter :: DFilter i -> CFilter i-cfilter f = \xml -> f undefined xml+cfilter f = f undefined --cfilter f = \xml-> flip f xml --                          (case xml of --                             CElem (Elem n as cs) i -> CElem (Elem n [] []) i@@ -42,12 +42,12 @@  -- | lift a CFilter combinator to a DFilter combinator liftLocal, liftGlobal :: (CFilter i->CFilter i) -> (DFilter i->DFilter i)-liftLocal  ff = \df-> \xml sub-> (ff (df xml)) sub-liftGlobal ff = \df-> \xml sub-> (ff (df xml)) xml+liftLocal  ff df xml  sub = ff (df xml) sub+liftGlobal ff df xml _sub = ff (df xml) xml  -- | lifted composition over double filters. o :: DFilter i -> DFilter i -> DFilter i-g `o` f = \xml-> concatMap (g xml) . (f xml)+g `o` f = \xml-> concatMap (g xml) . f xml  -- | lifted choice. (|>|) :: (a->b->[c]) -> (a->b->[c]) -> (a->b->[c])@@ -58,7 +58,7 @@ union :: (a->b->[c]) -> (a->b->[c]) -> (a->b->[c]) union = lift (++)   where-    lift f g h = \x y-> f (g x y) (h x y)+    lift f g h x y = f (g x y) (h x y)  -- | lifted predicates. with, without :: DFilter i -> DFilter i -> DFilter i@@ -67,8 +67,8 @@  -- | lifted unit and zero. keep, none :: DFilter i-keep = \xml sub-> [sub]	-- local C.keep-none = \xml sub-> []	-- local C.none+keep _xml  sub = [sub]       -- local C.keep+none _xml _sub = []          -- local C.none  children, elm, txt :: DFilter i children = local C.children@@ -76,21 +76,21 @@ txt      = local C.txt  applypred :: CFilter i -> DFilter i -> CFilter i-applypred f p = \xml-> (const f `with` p) xml xml+applypred f p xml = (const f `with` p) xml xml  iffind :: String -> (String -> DFilter i) -> DFilter i -> DFilter i-iffind key yes no xml c@(CElem (Elem _ as _) _) =-  case (lookup key as) of+iffind  key  yes no xml c@(CElem (Elem _ as _) _) =+  case lookup (N key) as of     Nothing -> no xml c     (Just v@(AttValue _)) -> yes (show v) xml c-iffind key yes no xml other = no xml other+iffind _key _yes no xml other = no xml other  ifTxt :: (String->DFilter i) -> DFilter i -> DFilter i-ifTxt yes no xml c@(CString _ s _) = yes s xml c-ifTxt yes no xml c                 = no xml c+ifTxt  yes _no xml c@(CString _ s _) = yes s xml c+ifTxt _yes  no xml c                 = no xml c  cat :: [a->b->[c]] -> (a->b->[c])-cat fs = \xml sub-> concat [ f xml sub | f <- fs ]+cat fs xml sub = concat [ f xml sub | f <- fs ]  (/>) :: DFilter i -> DFilter i -> DFilter i f /> g = g `o` children `o` f
src/Text/XML/HaXml/Xtract/Lex.hs view
@@ -13,28 +13,27 @@   , Token   ) where -import Char-import List(isPrefixOf)+import Data.Char   type Token = Either String (Posn, TokenT) -data Posn = Pn Int		-- char index only+data Posn = Pn Int              -- char index only         deriving Eq  instance Show Posn where-      showsPrec p (Pn c) = showString "char pos " . shows c+      showsPrec _p (Pn c) = showString "char pos " . shows c  data TokenT =       Symbol String-    | TokString String		--     begins with letter-    | TokNum Integer		--     begins with digit+    | TokString String          --     begins with letter+    | TokNum Integer            --     begins with digit     deriving Eq  instance Show TokenT where-    showsPrec p (Symbol s) = showString s-    showsPrec p (TokString s) = showString s-    showsPrec p (TokNum n) = shows n+    showsPrec _p (Symbol s) = showString s+    showsPrec _p (TokString s) = showString s+    showsPrec _p (TokNum n) = shows n  emit :: TokenT -> Posn -> Token emit tok p = forcep p `seq` Right (p,tok)@@ -59,7 +58,7 @@ white '\xa0' = addcol 1  blank :: (Posn->String->[Token]) -> Posn-> String-> [Token]-blank k p []       = []+blank _ _ []       = [] blank k p (' ': s) = blank k (addcol 1 p) s blank k p ('\t':s) = blank k (tab p) s blank k p ('\n':s) = blank k (newline p) s@@ -75,10 +74,11 @@ lexXtract :: (String->String) -> String -> [Token] lexXtract f = selAny f (Pn 1) +syms :: [Char] syms = "/[]()@,=*&|~$+-<>"  selAny :: (String->String) -> Posn -> String -> [Token]-selAny f p [] = []+selAny _ _ [] = [] selAny f p ('/':'/':ss) = emit (Symbol "//") p:  selAny f (addcol 2 p) ss selAny f p ('!':'=':ss) = emit (Symbol "!=") p:  selAny f (addcol 2 p) ss selAny f p ('<':'=':ss) = emit (Symbol "<=") p:  selAny f (addcol 2 p) ss@@ -108,20 +108,26 @@     | isDigit s       = gatherNum    [s] p (addcol 1 p) ss (blank (selAny f))     | otherwise       = lexerror "unrecognised pattern" p +gatherName :: (String->String) -> String -> Posn -> Posn -> String+              -> (Posn->String->[Token]) -> [Token] gatherName f acc pos p (s:ss) k   | isAlphaNum s || s `elem` "-_:" = gatherName f (s:acc) pos (addcol 1 p) ss k gatherName f acc pos p ss k =   emit (TokString (f (reverse acc))) pos: k p ss +gatherNum :: String -> Posn -> Posn -> String+             -> (Posn->String->[Token]) -> [Token] gatherNum acc pos p (s:ss) k   | isHexDigit s = gatherNum (s:acc) pos (addcol 1 p) ss k gatherNum acc pos p ss k =   emit (TokNum (read (reverse acc))) pos: k p ss -accumulateUntil c tok acc pos  p  [] k =+accumulateUntil :: Char -> TokenT -> String -> Posn -> Posn -> String+                   -> (Posn->String->[Token]) -> [Token]+accumulateUntil c _tok _acc pos  p  [] _k =     lexerror ("found end of pattern while looking for "++c               :" to match opening quote at "++show pos) p-accumulateUntil c tok acc pos  p (s:ss) k+accumulateUntil c  tok  acc pos  p (s:ss) k     | c==s       = emit (TokString (reverse acc)) pos:                                   emit tok p: k (addcol 1 p) ss     | isSpace s  = accumulateUntil c tok (s:acc) pos (white s p) ss k
src/Text/XML/HaXml/Xtract/Parse.hs view
@@ -12,10 +12,11 @@ import Text.XML.HaXml.Xtract.Combinators as D import Text.XML.HaXml.Combinators as C import Text.XML.HaXml.Types (Content)-import List(isPrefixOf)+import Data.List(isPrefixOf) import Text.XML.HaXml.Escape (xmlUnEscapeContent,stdXmlEscaper)  -- output transformer - to ensure that text/references are glued together+unescape :: [Content i] -> [Content i] unescape = xmlUnEscapeContent stdXmlEscaper  @@ -57,95 +58,97 @@ string :: XParser String string = P (\inp -> case inp of                 (Left err: _) -> Failure inp err-                (Right (p,TokString n):ts) -> Success ts n+                (Right (_,TokString n):ts) -> Success ts n                 ts -> Failure ts "expected a string" ) number :: XParser Integer number = P (\inp -> case inp of                 (Left err: _) -> Failure inp err-                (Right (p,TokNum n):ts) -> Success ts n+                (Right (_,TokNum n):ts) -> Success ts n                 ts -> Failure ts "expected a number" ) symbol :: String -> XParser () symbol s = P (\inp -> case inp of                 (Left err: _) -> Failure inp err-                (Right (p, Symbol n):ts) | n==s -> Success ts ()+                (Right (_, Symbol n):ts) | n==s -> Success ts ()                 ts -> Failure ts ("expected symbol "++s) ) +quote :: XParser () quote = oneOf [ symbol "'",  symbol "\"" ] +pam :: [a->b] -> a -> [b] pam fs x = [ f x | f <- fs ]   {--- original Xtract grammar -----      query     = string			tagname-                | string *			tagname prefix-                | * string			tagname suffix-                | *				any element-                | -				chardata+      query     = string                        tagname+                | string *                      tagname prefix+                | * string                      tagname suffix+                | *                             any element+                | -                             chardata                 | ( query )-                | query / query			parent/child relationship-                | query // query		deep inside-                | query + query			union of queries+                | query / query                 parent/child relationship+                | query // query                deep inside+                | query + query                 union of queries                 | query [predicate]                 | query [positions] -      predicate = quattr			has attribute-                | quattr op ' string '		attribute has value-                | quattr op " string "		attribute has value-                | quattr op  quattr		attribute value comparison (lexical)-                | quattr nop integer  		attribute has value (numerical)-                | quattr nop quattr		attribute value comparison (numerical)-                | ( predicate )			bracketting-                | predicate & predicate		logical and-                | predicate | predicate		logical or-                | ~ predicate			logical not+      predicate = quattr                        has attribute+                | quattr op ' string '          attribute has value+                | quattr op " string "          attribute has value+                | quattr op  quattr             attribute value comparison (lexical)+                | quattr nop integer            attribute has value (numerical)+                | quattr nop quattr             attribute value comparison (numerical)+                | ( predicate )                 bracketting+                | predicate & predicate         logical and+                | predicate | predicate         logical or+                | ~ predicate                   logical not -      attribute = @ string			has attribute-                | query / @ string		child has attribute-                | -				has textual content-                | query / -			child has textual content+      attribute = @ string                      has attribute+                | query / @ string              child has attribute+                | -                             has textual content+                | query / -                     child has textual content        quattr    = query                 | attribute -      op        =  =				equal to-                |  !=				not equal to-                |  <				less than-                |  <=				less than or equal to-                |  >				greater than-                |  >=				greater than or equal to+      op        =  =                            equal to+                |  !=                           not equal to+                |  <                            less than+                |  <=                           less than or equal to+                |  >                            greater than+                |  >=                           greater than or equal to -      nop       =  .=.				equal to-                |  .!=.				not equal to-                |  .<.				less than-                |  .<=.				less than or equal to-                |  .>.				greater than-                |  .>=.				greater than or equal to+      nop       =  .=.                          equal to+                |  .!=.                         not equal to+                |  .<.                          less than+                |  .<=.                         less than or equal to+                |  .>.                          greater than+                |  .>=.                         greater than or equal to -      positions = position {, positions}	multiple positions-                | position - position		ranges+      positions = position {, positions}        multiple positions+                | position - position           ranges -      position  = integer			numbering is from 0 upwards-                | $				last+      position  = integer                       numbering is from 0 upwards+                | $                             last   ---- transformed grammar (removing left recursion)-      aquery = ./ tquery	-- current context-             | tquery		-- also current context-             | / tquery		-- root context-             | // tquery	-- deep context from root+      aquery = ./ tquery        -- current context+             | tquery           -- also current context+             | / tquery         -- root context+             | // tquery        -- deep context from root        tquery = ( tquery ) xquery              | tag xquery-             | -		-- fixes original grammar ("-/*" is incorrect)-      +             | -                -- fixes original grammar ("-/*" is incorrect)+       tag    = string *              | string              | * string              | *-      +       xquery = / tquery              | // tquery-             | / @ string	-- new: print attribute value+             | / @ string       -- new: print attribute value              | + tquery              | [ tpredicate ] xquery              | [ positions ] xquery@@ -225,7 +228,7 @@     [ do q <- bracket (tquery (qf:qf:cxt))          xquery cxt q     , do q <- xtag-         xquery cxt (qf ((unescape .).q))	-- glue inners texts together+         xquery cxt (qf ((unescape .).q))       -- glue inners texts together     , do symbol "-"          return (qf (local C.txt))     ]@@ -235,11 +238,10 @@     [ do s <- string          symbol "*"          return (local (C.tagWith (s `isPrefixOf`)))-    , do s <- string-         return (local (C.tag s))+    , local . C.tag <$> string     , do symbol "*"          s <- string-         return (local (C.tagWith (((reverse s) `isPrefixOf`) . reverse)))+         return (local (C.tagWith ((reverse s `isPrefixOf`) . reverse)))     , do symbol "*"          return (local C.elm)     ]@@ -248,19 +250,19 @@ xquery :: [DFilter i->DFilter i] -> DFilter i -> XParser (DFilter i) xquery cxt q1 = oneOf     [ do symbol "/"-         ( do symbol "@"-              attr <- string-              return (D.iffind attr (\s->local (C.literal s)) D.none `D.o` q1)+         do symbol "@"+            attr <- string+            return (D.iffind attr (local . C.literal) D.none `D.o` q1)            `onFail`-           tquery ((q1 D./>):cxt) )+           tquery ((q1 D./>):cxt)     , do symbol "//"-         tquery ((\q2-> (liftLocal C.multi) q2+         tquery ((\q2-> liftLocal C.multi q2                             `D.o` local C.children `D.o` q1):cxt)     , do symbol "+"          q2 <- tquery cxt          return (D.cat [q1,q2])     , do symbol "["-         is <- iindex	-- now extended to multiple indexes+         is <- iindex   -- now extended to multiple indexes          symbol "]"          xquery cxt (\xml-> concat . pam is . q1 xml)     , do symbol "["@@ -321,24 +323,24 @@        quote        s2 <- string        quote-       return ((iffn (\s1->if cmp s1 s2 then D.keep else D.none) D.none)+       return (iffn (\s1->if cmp s1 s2 then D.keep else D.none) D.none                `D.o` q)   , do cmp <- op-       (q2,iffn2) <- wattribute-       return ((iffn (\s1-> iffn2 (\s2-> if cmp s1 s2 then D.keep else D.none)+       (q2,iffn2) <- wattribute -- q2 unused?  is this a mistake?+       return (iffn (\s1-> iffn2 (\s2-> if cmp s1 s2 then D.keep else D.none)                                   D.none)-                     D.none) `D.o` q)+                     D.none `D.o` q)   , do cmp <- nop        n <- number-       return ((iffn (\s->if cmp (read s) n then D.keep else D.none) D.none)+       return (iffn (\s->if cmp (read s) n then D.keep else D.none) D.none                `D.o` q)   , do cmp <- nop-       (q2,iffn2) <- wattribute-       return ((iffn (\s1-> iffn2 (\s2-> if cmp (read s1) (read s2) then D.keep+       (q2,iffn2) <- wattribute -- q2 unused?  is this a mistake?+       return (iffn (\s1-> iffn2 (\s2-> if cmp (read s1) (read s2) then D.keep                                                                     else D.none)                                   D.none)-                     D.none) `D.o` q)-  , do return ((a `D.o` q))+                     D.none `D.o` q)+  , do return (a `D.o` q)   ]  wattribute :: XParser (DFilter i, (String->DFilter i)->DFilter i->DFilter i)@@ -365,8 +367,7 @@ simpleindex :: XParser ([a]->[a]) simpleindex = oneOf     [ do n <- number-         r <- rrange n-         return r+         rrange n     , do symbol "$"          return (C.keep . last)     ]@@ -375,7 +376,7 @@ rrange n1 = oneOf     [ do symbol "-"          numberdollar n1-    , return (C.keep.(!!(fromInteger n1)))+    , return (take 1 . drop (fromInteger n1))     ]  numberdollar n1 = oneOf@@ -414,4 +415,3 @@     , do symbol ".>.";  return (>)     , do symbol ".>=."; return (>=)     ]-
− src/pkg.conf
@@ -1,16 +0,0 @@-Package-  { name            = "HaXml"-  , auto            = True-  , import_dirs     = ["$libdir/imports/HaXml"]-  , source_dirs     = []-  , library_dirs    = ["$libdir"]-  , hs_libraries    = ["HSHaXml" ]-  , extra_libraries = []-  , include_dirs    = []-  , c_includes      = []-  , package_deps    = ["base","polyparse"]-  , extra_ghc_opts  = []-  , extra_cc_opts   = []-  , extra_ld_opts   = []-  }-
src/tools/Canonicalise.hs view
@@ -1,8 +1,7 @@ module Main where -import System (getArgs)-import IO-import List   (isSuffixOf)+import System.IO+import Data.List   (isSuffixOf)  import Text.XML.HaXml.Parse      (xmlParse) import Text.XML.HaXml.Html.Parse (htmlParse)@@ -15,6 +14,7 @@ -- It demonstrates the behaviour of the parser and pretty-printer, -- including any shortcomings they may have. +main :: IO () main =   fix2Args >>= \(inf,outf)->   ( if inf=="-" then getContents
src/tools/CanonicaliseLazy.hs view
@@ -1,7 +1,7 @@ module Main where -import IO-import List (isSuffixOf)+import System.IO+import Data.List (isSuffixOf)  import Text.XML.HaXml.ParseLazy      (xmlParse) import Text.XML.HaXml.Html.ParseLazy (htmlParse)@@ -15,6 +15,7 @@ -- It demonstrates the behaviour of the parser and pretty-printer, -- including any shortcomings they may have. +main :: IO () main =   fix2Args >>= \(inf,outf)->   ( if inf=="-" then getContents
src/tools/DtdToHaskell.hs view
@@ -6,22 +6,32 @@ -- definitions, you should import Xml2Haskell wherever you intend -- to read and write XML files with your Haskell programs. -import System-import IO-import List (nub,takeWhile,dropWhile)+import System.Environment+import System.Exit+import System.IO+import Data.List (nub)+import Control.Monad  --import Text.XML.HaXml.Wrappers   (fix2Args)+import Text.XML.HaXml            (version) import Text.XML.HaXml.Types      (DocTypeDecl(..))+import Text.XML.HaXml.Namespaces (localName) import Text.XML.HaXml.Parse      (dtdParse)-import Text.XML.HaXml.DtdToHaskell.TypeDef  (TypeDef,ppTypeDef,mangle)+import Text.XML.HaXml.DtdToHaskell.TypeDef  (ppTypeDef,mangle) import Text.XML.HaXml.DtdToHaskell.Convert  (dtd2TypeDef) import Text.XML.HaXml.DtdToHaskell.Instance (mkInstance) import Text.PrettyPrint.HughesPJ (render,vcat) --- sucked in from Text.XML.HaXml.Wrappers to avod dependency on T.X.H.Html+-- sucked in from Text.XML.HaXml.Wrappers to avoid dependency on T.X.H.Html fix2Args :: IO (String,String) fix2Args = do   args <- getArgs+  when ("--version" `elem` args) $ do+      putStrLn $ "part of HaXml-"++version+      exitSuccess+  when ("--help" `elem` args) $ do+      putStrLn "See http://haskell.org/HaXml"+      exitSuccess   case length args of     0 -> return ("-",     "-")     1 -> return (args!!0, "-")@@ -31,6 +41,7 @@             exitFailure  +main ::IO () main =   fix2Args >>= \(inf,outf)->   ( if inf=="-" then getContents@@ -39,12 +50,14 @@     else openFile outf WriteMode ) >>= \o->   let (DTD name _ markup) = (getDtd . dtdParse inf) content       decls = (nub . dtd2TypeDef) markup-      realname = if outf/="-" then mangle (trim outf)-                 else if null name then mangle (trim inf)-                 else mangle name+      realname+        | outf /= "-" = mangle (trim outf)+        | null (localName name) = mangle (trim inf)+        | otherwise = mangle (localName name)   in   do hPutStrLn o ("module "++realname                   ++" where\n\nimport Text.XML.HaXml.XmlContent"+                  ++"\nimport Text.XML.HaXml.Types"                   ++"\nimport Text.XML.HaXml.OneOfN")     --            ++"\nimport Char (isSpace)"     --            ++"\nimport List (isPrefixOf)"@@ -55,11 +68,11 @@      hPutStrLn o "\n\n{-Done-}"      hFlush o -+getDtd :: Maybe t -> t getDtd (Just dtd) = dtd-getDtd (Nothing)  = error "No DTD in this document"+getDtd Nothing    = error "No DTD in this document" +trim :: [Char] -> [Char] trim name | '/' `elem` name  = (trim . tail . dropWhile (/='/')) name           | '.' `elem` name  = takeWhile (/='.') name           | otherwise        = name-
+ src/tools/FpMLToHaskell.hs view
@@ -0,0 +1,220 @@+-- FpMLToHaskell+module Main where++-- This program is designed to convert a bunch of XML files containing XSD+-- module decls into a bunch of Haskell modules containing data/newtype+-- definitions which mirror the XSD.  Once you have used this program+-- to generate your type definitions, you should import Text.XML.HaXml.Schema+-- (as well as the generated modules) wherever you intend to read and write+-- XML files with your Haskell programs.++import System.Exit+import System.Environment+import System.IO+import Control.Monad+import Control.Exception as E+import System.Directory+import Data.List+import Data.Maybe (fromMaybe,mapMaybe)+import Data.Function (on)++import Text.XML.HaXml            (version)+import Text.XML.HaXml.Types+import Text.XML.HaXml.Namespaces (resolveAllNames,qualify+                                 ,nullNamespace)+import Text.XML.HaXml.Parse      (xmlParse')+import Text.XML.HaXml.Util       (docContent)+import Text.XML.HaXml.Posn       (posInNewCxt)++import Text.XML.HaXml.Schema.Parse+import Text.XML.HaXml.Schema.XSDTypeModel (Schema)+import Text.XML.HaXml.Schema.NameConversion+import Text.XML.HaXml.Schema.Environment    as Env+import Text.XML.HaXml.Schema.TypeConversion as XsdToH+import Text.XML.HaXml.Schema.PrettyHaskell+import qualified Text.XML.HaXml.Schema.PrettyHsBoot     as HsBoot+import qualified Text.XML.HaXml.Schema.HaskellTypeModel as Haskell+import Text.ParserCombinators.Poly+import Text.PrettyPrint.HughesPJ (render)++fst3 :: (a,b,c) -> a+fst3 (a,_,_) = a++-- sucked in from Text.XML.HaXml.Wrappers to avoid dependency on T.X.H.Html+argDirsToFiles :: IO (FilePath,[(FilePath,FilePath)])+argDirsToFiles = do+  args <- getArgs+  when ("--version" `elem` args) $ do+      putStrLn $ "part of HaXml-"++version+      exitSuccess+  when ("--help" `elem` args) $ do+      putStrLn "Usage: FpMLToHaskell xsdDir haskellDir"+      putStrLn "    -- The results go into haskelldir/Data/FpML/file0.hs etc"+      putStrLn "See http://haskell.org/HaXml"+      exitSuccess+  case args of+    [xsddir,hdir]-> do+            files <- fmap (filter (".xsd" `isSuffixOf`))+                          (getDirectoryContents xsddir)+            let newdirs = map (\file->hdir++"/"++dirOf (fpml file)) files+            mapM_ (\newdir -> do createDirectoryIfMissing True newdir) newdirs+            return (xsddir+                   ,map (\f-> (f, hdir++"/"++reslash (fpml f)++".hs")) files)+    _ -> do prog <- getProgName+            putStrLn ("Usage: "++prog++" xsdDir haskellDir")+            exitFailure+ where+  reslash = map (\c-> case c of '.'->'/'; _->c)+  dirOf   = intercalate "/" . init . wordsBy' '.'+  wordsBy' c s = let (a,b) = span (/=c) s in+                if null b then [a] else a: wordsBy' c (tail b)++main ::IO ()+main = do+    (dir,files) <- argDirsToFiles+    deps <- forM files (\ (inf,_outf)-> do+        putStrLn $ "Reading "++inf+        thiscontent <- readFileUTF8 (dir++"/"++inf)+        let d@Document{} = resolveAllNames qualify+                           . either (error . ("not XML:\n"++)) id+                           . xmlParse' inf+                           $ thiscontent+        case runParser schema [docContent (posInNewCxt inf Nothing) d] of+            (Left msg,_) -> do hPutStrLn stderr msg+                               return ([], undefined)+            (Right v,[]) ->    return (Env.gatherImports v, v)+            (Right v,_)  -> do putStrLn "Parse incomplete!"+                               putStrLn inf+                               putStrLn "\n-----------------\n"+                               putStrLn $ show v+                               putStrLn "\n-----------------\n"+                               return ([],v)+        )+    let filedeps :: [[((FilePath,FilePath),([(FilePath,Maybe String)],Schema))]]+        filedeps  = ordered (\ ((inf,_),_)-> inf)+                            (\ (_,(ds,_))-> map fst ds)+                            (\x-> lookupWith (fst.fst) x (zip files deps))+                            (zip files deps)+        -- a single supertype environment, closed over all modules+        supertypeEnv :: Environment+        supertypeEnv = foldr (flip (foldr+                                    (\ ((inf, _), (_, v)) ->+                                       mkEnvironment inf v)))+                             emptyEnv filedeps+        adjust :: Environment -> Environment+        adjust env = env{ env_extendty = env_extendty supertypeEnv+                        , env_substGrp = env_substGrp supertypeEnv+                        , env_allTypes = env_allTypes supertypeEnv }+        -- each module's env includes only dependencies, apart from supertypes+        environs :: [(FilePath,(Environment,FilePath,Schema))]+        environs  = flip concatMap filedeps $ \scc->+                      case scc of+                        [((inf,outf),(ds,v))]->+                          [(inf, ( adjust $ mkEnvironment inf v+                                     (foldr combineEnv emptyEnv+                                         (flip map ds+                                               (\d-> fst3 $+                                                     fromMaybe (error "FME") $+                                                     lookup (fst d) environs)+                                         )+                                     )+                                 , outf+                                 , v+                                 )+                          )]+                        cyclic ->+                            let jointSchema :: Schema+                                jointSchema = mconcat (map (snd.snd) cyclic)+                                jointDeps :: [FilePath]+                                jointDeps = concatMap (map fst.fst.snd) cyclic+                                jointEnv :: Environment+                                jointEnv = mkEnvironment "" jointSchema $+                                           foldr combineEnv emptyEnv $+                                           flip map (nub jointDeps+                                                    \\ map (fst.fst) cyclic)+                                               (\d-> fst3 $+                                                     fromMaybe (error "FME") $+                                                     lookup d environs)+                            in flip map cyclic $+                               \((inf,outf),(_,v))->+                                 (inf,(adjust $ mkEnvironment inf v jointEnv+                                      ,outf+                                      ,v)+                                 )+    forM_ environs (\ (inf,(env,outf,v))-> do+        o  <- openFile outf WriteMode+        hb <- openFile (bootf outf) WriteMode+        hSetEncoding o  utf8+        hSetEncoding hb utf8+        let decls   = XsdToH.convert env (XsdToH.typeLift v)+            haskell = Haskell.mkModule inf v decls+            doc     = ppModule fpmlNameConverter haskell+            docboot = HsBoot.ppModule fpmlNameConverter haskell+        putStrLn $ "Writing "++outf+        hPutStrLn o $ render doc+        putStrLn $ "Writing "++bootf outf+        hPutStrLn hb $ render docboot+        hFlush o+        hFlush hb+        )++-- | Munge filename for hs-boot.+bootf :: FilePath -> FilePath+bootf x = case reverse x of+            's':'h':'.':f -> reverse f++".hs-boot"+            _ -> error "bad stuff made my cheese boots melt"++-- | Calculate dependency ordering of modules, least dependent first.+--   Cyclic groups may occur, suitably placed in the ordering.+ordered :: (Eq a, Eq b) => (b->a) -> (b->[a]) -> (a->Maybe b) -> [b] -> [[b]]+ordered name' deps env list =+    let cycles    = cyclicDeps name' deps env list+        noncyclic = map (:[]) $ list \\ concat cycles+        workqueue = noncyclic++cycles+    in traverse' [] workqueue+  where+    traverse' acc []     = acc+    traverse' acc (w:wq) = if all (`elem` concatMap (map name') acc)+                                 (concatMap deps w \\ map name' w)+                          then traverse' (acc++[w]) wq+                          else traverse'     acc   (wq++[w])++-- | Find cyclic dependencies between modules.+cyclicDeps :: Eq a => (b->a) -> (b->[a]) -> (a->Maybe b) -> [b] -> [[b]]+cyclicDeps name' deps env = nubBy (setEq`on`map name')+                           . (\cs-> foldl minimal cs cs)+                           . concatMap (walk [])+  where+--  walk :: [b] -> b -> [[b]]+    walk acc t = if name' t `elem` map name' acc then [acc]+                 else concatMap (walk (t:acc)) (mapMaybe env $ deps t)+    minimal acc c = concatMap (prune c) acc+    prune c c' = [c' | not (map name' c `isProperSubsetOf` map name' c')]+    isSubsetOf a b = all (`elem`b) a+    setEq a b            = a`isSubsetOf`b &&      b`isSubsetOf`a+    isProperSubsetOf a b = a`isSubsetOf`b && not (b`isSubsetOf`a)++-- | A variation on the standard lookup function.+lookupWith :: Eq a => (b->a) -> a -> [b] -> Maybe b+lookupWith _ _ [] = Nothing+lookupWith proj x (y:ys) | proj y == x = Just y+                         | otherwise   = lookupWith proj x ys++-- | What is the targetNamespace of the unique top-level element?+targetNamespace :: Element i -> String+targetNamespace (Elem qn attrs _) =+    if qn /= xsdSchema then "ERROR! top element not an xsd:schema tag"+    else maybe "ERROR! no targetNamespace specified" show+         (lookup (N "targetNamespace") attrs)++-- | The XSD Namespace.+xsdSchema :: QName+xsdSchema = QN (nullNamespace{nsURI="http://www.w3.org/2001/XMLSchema"})+               "schema"++-- | UTF8-clean readFile; avoids handle-leaks.+readFileUTF8 :: FilePath -> IO String+readFileUTF8 file = do+    h <- openFile file ReadMode+    (do hSetEncoding h utf8+        hGetContents h) `E.onException` hClose h
src/tools/MkOneOf.hs view
@@ -1,20 +1,31 @@ module Main where -import System (getArgs)-import Char   (isDigit)-import IO     (hFlush,stdout)+import Prelude hiding (max)+import System.Exit        (exitSuccess)+import System.Environment (getArgs)+import Data.Char          (isDigit)+import System.IO          (hFlush,stdout)+import Control.Monad      (when)+import Text.XML.HaXml     (version) +main  :: IO () main = do     args <- getArgs+    when ("--version" `elem` args) $ do+        putStrLn $ "part of HaXml-"++version+        exitSuccess+    when ("--help" `elem` args) $ do+        putStrLn "See http://haskell.org/HaXml"+        exitSuccess     case length args of       1 -> do n <- saferead (head args)               putStrLn ("module Text.XML.HaXml."++constructor 1 n++" where\n")-              putStrLn ("import Text.XML.HaXml.XmlContent\n")+              putStrLn "import Text.XML.HaXml.XmlContent\n"               putStrLn (mkOneOf n)       2 -> do n <- saferead (args!!0)               m <- saferead (args!!1)-              putStrLn ("module Text.XML.HaXml.OneOfN where\n")-              putStrLn ("import Text.XML.HaXml.XmlContent\n")+              putStrLn "module Text.XML.HaXml.OneOfN where\n"+              putStrLn "import Text.XML.HaXml.XmlContent\n"               mapM_ (putStrLn . mkOneOf) [n..m]       _ -> error "Usage: MkOneOf n [m]"     hFlush stdout@@ -28,11 +39,11 @@                                  [1..n]                                  (take n variables))     ++ "\n    deriving (Eq,Show)"-    ++ "\n\ninstance "++ format 10 78 10 "(" ","+    ++ "\n\ninstance "++ format 9 78 9 "(" ","                                 (map ("HTypeable "++) (take n variables))     ++ ")\n    => HTypeable ("++ typename n 26 ++")\n  where"-    ++ "      toHType m = Defined \""++constructor 1 n++"\" [] []"-    ++ "\n\ninstance "++ format 10 78 10 "(" ","+    ++ "      toHType _ = Defined \""++constructor 1 n++"\" [] []"+    ++ "\n\ninstance "++ format 9 78 9 "(" ","                                 (map ("XmlContent "++) (take n variables))     ++ ")\n    => XmlContent ("++ typename n 26 ++")\n  where"     ++ "\n    parseContents ="@@ -42,6 +53,17 @@     ++ concatMap (\v->"\n    toContents ("++constructor v n                                           ++" x) = toContents x")                  [1..n]+    ++ "\n\nfold"++constructor 1 n++" :: "+                 ++format 15 78 15 "" ""+                          (map (\v->"("++v++"->z) -> ") (take n variables))+                 ++"\n               "+                 ++constructor 1 n++format 22 78 22 " " " " (take n variables)+                 ++"\n               -> z"+    ++ concat (zipWith (\i v-> "\n"++"fold"++constructor 1 n+                               ++format 11 50 11 " " " " (take n variables)+                               ++" ("++constructor i n ++" z) = "++v++" z")+                       [1..n]+                       (take n variables))     ++ "\n\n----"  ---- constructor names ----@@ -52,28 +74,29 @@ constructor n m = ordinal n ++"Of" ++ show m  ordinal :: Int -> String-ordinal n | n <= 20   = ordinals!!n-ordinal n | otherwise = "Choice"++show n+ordinal n = if n <= 20 then ordinals!!n else "Choice"++show n +ordinals :: [String] ordinals = ["Zero","One","Two","Three","Four","Five","Six","Seven","Eight"            ,"Nine","Ten","Eleven","Twelve","Thirteen","Fourteen","Fifteen"            ,"Sixteen","Seventeen","Eighteen","Nineteen","Twenty"]  ---- variable names -----variables = [ v:[] | v <- ['a'..'z']]-            ++ [ v:w:[] | v <- ['a'..'z'], w <- ['a'..'z']]+variables :: [String]+variables = [ [v] | v <- ['a'..'y']]+            ++ [ [v,w] | v <- ['a'..'z'], w <- ['a'..'z']]  ---- simple pretty-printing ---- -format :: Int		-- current position on page-       -> Int		-- maximum width of page-       -> Int		-- amount to indent when a newline is emitted-       -> String	-- text to precede first value-       -> String	-- text to precede subsequent values-       -> [String]	-- list of values to format+format :: Int           -- current position on page+       -> Int           -- maximum width of page+       -> Int           -- amount to indent when a newline is emitted+       -> String        -- text to precede first value+       -> String        -- text to precede subsequent values+       -> [String]      -- list of values to format         -> String-format cur max ind s0 s1 []     = ""-format cur max ind s0 s1 (x:xs)+format _cur _max _ind _s0 _s1 []     = ""+format  cur  max  ind  s0  s1 (x:xs)     | sameline < max  = s0 ++ x ++ format sameline max ind s1 s1 xs     | otherwise       = "\n" ++ replicate ind ' ' ++                         s0 ++ x ++ format newline max ind s1 s1 xs@@ -82,6 +105,7 @@  ---- safe integer parsing ---- saferead :: String -> IO Int-saferead s | all isDigit s = return (read s)-saferead s | otherwise     = error ("expected a number on the commandline, "-                                    ++"but got \""++s++"\" instead")+saferead s = if all isDigit s+             then return (read s)+             else error ("expected a number on the commandline, "+                          ++"but got \""++s++"\" instead")
src/tools/Validate.hs view
@@ -1,11 +1,9 @@ module Main where -import System (getArgs)-import IO-import List   (isSuffixOf)-import Maybe  (fromJust)+import System.IO+import Data.Maybe  (fromJust) -import Text.XML.HaXml.Types     (Document(..),Content(..))+import Text.XML.HaXml.Types     (Document(..)) import Text.XML.HaXml.Parse     (xmlParse,dtdParse) import Text.XML.HaXml.Validate  (validate) import Text.XML.HaXml.Wrappers  (fix2Args)@@ -14,6 +12,7 @@ -- an XML document from another file (or stdin), and writes any validation -- errors to stdout. +main :: IO () main = do   (dtdf,xmlf) <- fix2Args   dtdtext     <- ( if dtdf=="-" then error "Usage: validate dtdfile [xmlfile]"
+ src/tools/XsdToHaskell.hs view
@@ -0,0 +1,127 @@+-- XsdToHaskell+module Main where++-- This program is designed to convert an XML file containing an XSD+-- decl into a Haskell module containing data/newtype definitions which+-- mirror the XSD.  Once you have used this program to generate your type+-- definitions, you should import Xsd2Haskell wherever you intend+-- to read and write XML files with your Haskell programs.++import System.Environment+import System.Exit+import System.IO+import Control.Monad+--import Data.Either++--import Text.XML.HaXml.Wrappers   (fix2Args)+import Text.XML.HaXml            (version)+import Text.XML.HaXml.Types+import Text.XML.HaXml.Namespaces (resolveAllNames,qualify+                                 ,nullNamespace)+import Text.XML.HaXml.Parse      (xmlParse')+import Text.XML.HaXml.Util       (docContent)+import Text.XML.HaXml.Posn       (posInNewCxt)++import Text.XML.HaXml.Schema.Parse+import Text.XML.HaXml.Schema.Environment+import Text.XML.HaXml.Schema.NameConversion+import Text.XML.HaXml.Schema.TypeConversion+import Text.XML.HaXml.Schema.PrettyHaskell+import qualified Text.XML.HaXml.Schema.HaskellTypeModel as Haskell+import Text.ParserCombinators.Poly+import Text.PrettyPrint.HughesPJ (render)++-- sucked in from Text.XML.HaXml.Wrappers to avoid dependency on T.X.H.Html+fix2Args :: IO (String,String)+fix2Args = do+  args <- getArgs+  when ("--version" `elem` args) $ do+      putStrLn $ "part of HaXml-"++version+      exitSuccess+  when ("--help" `elem` args) $ do+      putStrLn "See http://haskell.org/HaXml"+      exitSuccess+  case length args of+    0 -> return ("-",     "-")+    1 -> return (args!!0, "-")+    2 -> return (args!!0, args!!1)+    _ -> do prog <- getProgName+            putStrLn ("Usage: "++prog++" [xmlfile] [outfile]")+            exitFailure+++main ::IO ()+main =+  fix2Args >>= \(inf,outf)->+  ( if inf=="-" then getContents+    else readFile inf )           >>= \thiscontent->+  ( if outf=="-" then return stdout+    else openFile outf WriteMode ) >>= \o->+  let d@Document{} = resolveAllNames qualify+                     . either (error . ("not XML:\n"++)) id+                     . xmlParse' inf+                     $ thiscontent+  in do+    case runParser schema [docContent (posInNewCxt inf Nothing) d] of+        (Left msg,_) ->    hPutStrLn stderr msg+        (Right v,[]) -> do putStrLn "Parse Success!"+                           putStrLn "\n-----------------\n"+                           putStrLn $ show v+                           putStrLn "\n-----------------\n"+                           let decls = convert (mkEnvironment inf v emptyEnv) v+                               haskl = Haskell.mkModule inf v decls+                               doc   = ppModule simpleNameConverter haskl+                           hPutStrLn o $ render doc+        (Right v,_)  -> do putStrLn "Parse incomplete!"+                           putStrLn "\n-----------------\n"+                           putStrLn $ show v+                           putStrLn "\n-----------------\n"+    hFlush o+++--do hPutStrLn o $ "Document contains XSD for target namespace "+++--                 targetNamespace e+  {-+  let (DTD name _ markup) = (getDtd . dtdParse inf) content+      decls = (nub . dtd2TypeDef) markup+      realname = if outf/="-" then mangle (trim outf)+                 else if null (localName name) then mangle (trim inf)+                 else mangle (localName name)+  in+  do hPutStrLn o ("module "++realname+                  ++" where\n\nimport Text.XML.HaXml.XmlContent"+                  ++"\nimport Text.XML.HaXml.OneOfN")+    --            ++"\nimport Char (isSpace)"+    --            ++"\nimport List (isPrefixOf)"+     hPutStrLn o "\n\n{-Type decls-}\n"+     (hPutStrLn o . render . vcat . map ppTypeDef) decls+     hPutStrLn o "\n\n{-Instance decls-}\n"+     mapM_ (hPutStrLn o . (++"\n") . render . mkInstance) decls+     hPutStrLn o "\n\n{-Done-}"+     hFlush o+  -}++{-+getDtd :: Maybe t -> t+getDtd (Just dtd) = dtd+getDtd (Nothing)  = error "No DTD in this document"++trim :: [Char] -> [Char]+trim name | '/' `elem` name  = (trim . tail . dropWhile (/='/')) name+          | '.' `elem` name  = takeWhile (/='.') name+          | otherwise        = name+-}++targetNamespace :: Element i -> String+targetNamespace (Elem qn attrs _) =+    if qn /= xsdSchema then "ERROR! top element not an xsd:schema tag"+    else maybe "ERROR! no targetNamespace specified" show+         (lookup (N "targetNamespace") attrs)++xsdSchema :: QName+xsdSchema = QN (nullNamespace{nsURI="http://www.w3.org/2001/XMLSchema"})+               "schema"++--  <xsd:schema xmlns:xsd="" xmlns:fpml="" targetNamespace="" version=""+--              attributeFormDefault="unqualified"+--              elementFormDefault="qualified">
src/tools/Xtract.hs view
@@ -1,58 +1,95 @@ ------------------------------------------------------------ -- The Xtract tool - an XML-grep.------------------------------------------------------------- +------------------------------------------------------------ module Main where-import System (getArgs, exitWith, ExitCode(..))-import IO-import Char         (toLower)-import List         (isSuffixOf)+import System.Environment (getArgs)+import System.Exit        (exitWith, exitSuccess, ExitCode(..))+import System.IO+import Data.Char          (toLower)+import Data.List          (isSuffixOf)+import Control.Monad      (when)+import System.Console.GetOpt +import Text.XML.HaXml                          (version) import Text.XML.HaXml.Types-import Text.XML.HaXml.Posn          (posInNewCxt)-import Text.XML.HaXml.Parse         (xmlParse)-import Text.XML.HaXml.Html.Parse    (htmlParse)-import Text.XML.HaXml.Xtract.Parse  (xtract)-import Text.PrettyPrint.HughesPJ    (render, vcat, hcat, empty)-import Text.XML.HaXml.Pretty        (content)-import Text.XML.HaXml.Html.Generate (htmlprint)-import Text.XML.HaXml.Escape        (xmlEscapeContent,stdXmlEscaper)-import Text.XML.HaXml.Util          (docContent)+import Text.XML.HaXml.Posn                     (posInNewCxt)+import qualified Text.XML.HaXml.Parse          (xmlParse)+import qualified Text.XML.HaXml.Html.Parse     (htmlParse)+import Text.XML.HaXml.Xtract.Parse             (xtract)+import qualified Text.XML.HaXml.ParseLazy      (xmlParse)+import qualified Text.XML.HaXml.Html.ParseLazy (htmlParse)+import Text.PrettyPrint.HughesPJ               (Doc,render, vcat, hcat, empty)+import Text.XML.HaXml.Pretty                   (content)+import Text.XML.HaXml.Html.Generate            (htmlprint)+import Text.XML.HaXml.Escape                   (xmlEscapeContent,stdXmlEscaper)+import Text.XML.HaXml.Util                     (docContent) +escape :: [Content i] -> [Content i] escape = xmlEscapeContent stdXmlEscaper -main =-  getArgs >>= \args->-  if length args < 1 then-    putStrLn "Usage: Xtract [-n] <pattern> [xmlfile ...]" >>-    exitWith (ExitFailure 1)-  else-    let (pattern,files,esc) =-          case args of ("-n":pat:files) -> (pat,files, (:[]))-                       (pat:"-n":files) -> (pat,files, (:[]))-                       (pat:files)      -> (pat,files, escape.(:[]))+data Opts = Opts {doEscaping :: Bool, forceHtml :: Bool, printHelp :: Bool, printVersion :: Bool, beLazy :: Bool}++defaultOptions :: Opts+defaultOptions = Opts {doEscaping = True, forceHtml = False, printHelp = False, printVersion = False, beLazy = False}++options :: [OptDescr (Opts -> Opts)]+options = [+    Option ['n'] []+        (NoArg (\o -> o {doEscaping = False})) "Do not escape output",+    Option [] ["html"]+        (NoArg (\o -> o {forceHtml = True})) "Force HTML mode",+    Option [] ["help"]+        (NoArg (\o -> o {printHelp = True})) "Displays this help",+    Option [] ["version"]+        (NoArg (\o -> o {printVersion = True})) "Prints version",+    Option ['l'] ["lazy"]+        (NoArg (\o -> o {beLazy = True})) "Parse lazily"+    ]++main :: IO ()+main = do+  preArgs <- getArgs+  let (preOpts, args, _errs) = getOpt Permute options preArgs+  let opts = foldl (flip ($)) defaultOptions preOpts+  when (printVersion opts) $ do+      putStrLn $ "part of HaXml-"++version+      exitSuccess+  when (printHelp opts) $ do+      putStrLn "See http://haskell.org/HaXml"+      exitSuccess+  when (length args < 1) $ do+      putStrLn $ usageInfo "Usage: Xtract [options] <pattern> [xmlfile ...]" options+      exitWith (ExitFailure 1)+  let (xmlParse, htmlParse) = if beLazy opts then+        (Text.XML.HaXml.ParseLazy.xmlParse, Text.XML.HaXml.Html.ParseLazy.htmlParse)+        else+        (Text.XML.HaXml.Parse.xmlParse, Text.XML.HaXml.Html.Parse.htmlParse)+  let (pat,files,esc) =+          (head args,tail args,if doEscaping opts then escape .(:[]) else (:[])) --      findcontents = --        if null files then (getContents >>= \x-> return [xmlParse "<stdin>"x]) --        else mapM (\x-> do c <- (if x=="-" then getContents else readFile x) --                           return ((if isHTML x --                                    then htmlParse x else xmlParse x) c)) --                  files-    in --  findcontents >>= \cs-> --  ( hPutStrLn stdout . render . vcat --  . map (vcat . map content . selection . docContent)) cs-    mapM_ (\x-> do c <- (if x=="-" then getContents else readFile x)-                   ( if isHTML x then-                          hPutStrLn stdout . render . htmlprint-                          . xtract (map toLower) pattern+  mapM_ (\x->   do c <- (if x=="-" then getContents else readFile x)+                   ( if isHTML x || forceHtml opts then+                          putStrLn . render . htmlprint+                          . xtract (map toLower) pat                           . docContent (posInNewCxt x Nothing) . htmlParse x-                     else hPutStrLn stdout . render . vcat . map (format . esc)-                          . xtract id pattern+                     else putStrLn . render . vcat . map (format . esc)+                          . xtract id pat                           . docContent (posInNewCxt x Nothing) . xmlParse x) c                    hFlush stdout)           files +isHTML :: [Char] -> Bool isHTML x = ".html" `isSuffixOf` x  ||  ".htm"  `isSuffixOf` x +format :: [Content i] -> Doc format [] = empty format cs@(CString _ _ _:_) = hcat . map content $ cs format cs@(CRef _ _:_)      = hcat . map content $ cs
− src/tools/XtractLazy.hs
@@ -1,59 +0,0 @@---------------------------------------------------------------- The Xtract tool - an XML-grep.------------------------------------------------------------- -module Main where-import System (getArgs, exitWith, ExitCode(..))-import IO-import Char         (toLower)-import List         (isSuffixOf)--import Text.XML.HaXml.Types-import Text.XML.HaXml.Posn          (posInNewCxt)-import Text.XML.HaXml.ParseLazy     (xmlParse)-import Text.XML.HaXml.Html.ParseLazy(htmlParse)-import Text.XML.HaXml.Xtract.Parse  (xtract)-import Text.PrettyPrint.HughesPJ    (render, vcat, hcat, empty)-import Text.XML.HaXml.Pretty        (content)-import Text.XML.HaXml.Html.Generate (htmlprint)-import Text.XML.HaXml.Escape        (xmlEscapeContent,stdXmlEscaper)--escape = xmlEscapeContent stdXmlEscaper--main =-  getArgs >>= \args->-  if length args < 1 then-    putStrLn "Usage: Xtract [-n] <pattern> [xmlfile ...]" >>-    exitWith (ExitFailure 1)-  else-    let (pattern,files,esc) =-          case args of ("-n":pat:files) -> (pat,files, (:[]))-                       (pat:"-n":files) -> (pat,files, (:[]))-                       (pat:files)      -> (pat,files, escape.(:[]))---      findcontents =---        if null files then (getContents >>= \x-> return [xmlParse "<stdin>"x])---        else mapM (\x-> do c <- (if x=="-" then getContents else readFile x)---                           return ((if isHTML x---                                    then htmlParse x else xmlParse x) c))---                  files-    in---  findcontents >>= \cs->---  ( hPutStrLn stdout . render . vcat---  . map (vcat . map content . selection . getElem)) cs-    mapM_ (\x-> do c <- (if x=="-" then getContents else readFile x)-                   ( if isHTML x then-                          hPutStrLn stdout . render . htmlprint-                          . xtract (map toLower) pattern-                          . getElem x . htmlParse x-                     else hPutStrLn stdout . render . vcat . map (format . esc)-                          . xtract id pattern-                          . getElem x . xmlParse x) c-                   hFlush stdout)-          files--getElem x (Document _ _ e _) = CElem e (posInNewCxt x Nothing)-isHTML x = ".html" `isSuffixOf` x  ||  ".htm"  `isSuffixOf` x--format [] = empty-format cs@(CString _ _ _:_) = hcat . map content $ cs-format cs@(CRef _ _:_)      = hcat . map content $ cs-format cs                   = vcat . map content $ cs