Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

mkoneof(1) [debian man page]

MkOneOf(1)							   User Commands							MkOneOf(1)

MkOneOf - a helper program to use with DtdToHaskell SYNOPSIS
DtdToHaskell translates XML DTD into equivalent Haskell types. When there is a choice between different tags, DtdToHaskell uses types like OneOf2, OneOf3, OneOf4, etc. The module Text.XML.HaXml.OneOfN currently defines these types up OneOf20. If your DTD requires larger choices, you can use this program to generate them. MkOneOf takes an integer N or an integer range N M and writes to the standard output a Haskell module with respectively the datatype OneOfN or the datatypes OneOfN up to and including OneOfM. EXAMPLES
If we run "MkOneOf 1 2", the program will print module Text.XML.HaXml.OneOfN where import Text.XML.HaXml.Xml2Haskell data OneOf1 a = OneOf1 a deriving (Eq,Show) instance (XmlContent a) => XmlContent (OneOf1 a) where fromElem cs = (choice OneOf1 $ ( toElem (OneOf1 x) = toElem x ---- data OneOf2 a b = OneOf2 a | TwoOf2 b deriving (Eq,Show) instance (XmlContent a,XmlContent b) => XmlContent (OneOf2 a b) where fromElem cs = (choice OneOf2 $ choice TwoOf2 $ ( toElem (OneOf2 x) = toElem x toElem (TwoOf2 x) = toElem x ---- COPYRIGHT
The HaXml library and tools were written by and are copyright to Copyright (C) 1998 - 2006 Malcolm Wallace and Colin Runciman The library incorporates the module Text.ParserCombinators.HuttonMeijerWallace Copyright (C) 1996 Graham Hutton and Erik Meijer with modifications Copyright (C) 1998 - 2000 Malcolm Wallace and may also use or incorporate the module Text.PrettyPrint.HughesPJ Copyright (C) 1996 - 1997 John Hughes and Simon Peyton Jones The HaXml library is licensed under the terms of the GNU Lesser General Public Licence (LGPL), with the following special exception: As a relaxation of clause 6 of the LGPL, the copyright holders of this library give permission to use, copy, link, modify, and dis- tribute, binary-only object-code versions of an executable linked with the Library, without requiring the supply of any mechanism to modify or replace the Library and relink (clauses 6a, 6b, 6c, 6d, 6e), provided that all the other terms of clause 6 are complied with. The HaXml tools Xtract, Validate, DtdToHaskell, and MkOneOf, are licensed under the terms of the GNU General Public 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 of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Licences for more details. SEE ALSO
DtdToHaskell(1) AUTHOR
This contents of this manual page was copied from the HTML documentation and slightly edited by Arjan Oosting <> for the Debian system (but may be used by others). MkOneOf, version 1.17 October 2007 MkOneOf(1)

Check Out this Related Man Page

XML::Mini::Element::DocType(3pm)			User Contributed Perl Documentation			  XML::Mini::Element::DocType(3pm)

XML::Mini::Element::DocType - represents DocType header in XML::Mini parser DESCRIPTION
The XML::Mini::Element::DocType is used internally to represent <!DOCTYPE bla bla [ ... ]>. You shouldn't need to use it directly, see XML::Mini::Element's docType() method. AUTHOR
Copyright (C) 2002-2008 Patrick Deegan, Psychogenic Inc. Programs that use this code are bound to the terms and conditions of the GNU GPL (see the LICENSE file). If you wish to include these modules in non-GPL code, you need prior written authorisation from the authors. This library is released under the terms of the GNU GPL version 3, making it available only for free programs ("free" here being used in the sense of the GPL, see for more details). Anyone wishing to use this library within a proprietary or otherwise non- GPLed program MUST contact to acquire a distinct license for their application. This approach encourages the use of free software while allowing for proprietary solutions that support further development. LICENSE XML::Mini::Element module, part of the XML::Mini XML parser/generator package. Copyright (C) 2002-2008 Patrick Deegan All rights reserved XML::Mini is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. XML::Mini 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 General Public License for more details. You should have received a copy of the GNU General Public License along with XML::Mini. If not, see <>. Official XML::Mini site: Contact page for author available on SEE ALSO
XML::Mini, XML::Mini::Document, XML::Mini::Element perl v5.10.0 2009-09-20 XML::Mini::Element::DocType(3pm)
Man Page