File: ElementTreeData.k

package info (click to toggle)
kaya 0.2.0-6
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 3,012 kB
  • ctags: 1,307
  • sloc: cpp: 6,691; haskell: 4,833; sh: 2,868; yacc: 768; makefile: 700; perl: 87
file content (30 lines) | stat: -rw-r--r-- 1,067 bytes parent folder | download
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;