1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
|
/** -*-C-*-ish
ElementTreeData.k Copyright (C) 2005 Chris Morris
This file is distributed under the terms of the GNU Lesser General
Public Licence. See COPYING for licence.
*/
module ElementTreeData;
import public Dict;
// isempty is true for things like <br> (or <br/> if it's an XML
// representation)
public data ElementTree([Element] elements, String name, TinyDict<String,String> attributes);
public data Element = SubElement(ElementTree nested) | CData(String cdata) | SubTree(ElementTree() generator);
// we use CData a little sloppily here - it's just string data, not
// necessarily the XML CData type.
public Exception ElementParseError = Exception("Parse error reading element tree",500);
"Singleton or OpenAndClose for XML, ImpliedSingleton for HTML"
public data EmptyTagMode = Singleton | ImpliedSingleton | OpenAndClose;
//"Controls code formatting."
//public data PrettyFormat = NoBreak | OuterBreak | FullBreak;
// replaced with Bool breaks
"Controls UTF-8 formatting."
public data UnicodeFormat = LiteralUTF8 | NumericReference;
|