summaryrefslogtreecommitdiffstats
path: root/kate/xmltools/testcases.xml
blob: e66fc6058915053800692c88c03928518981b5d0 (plain)
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
This is a pseudo XML file to test the functions of the XML Plugin.
v0.8, 2002-04-21

1. Choose "Assign Meta DTD..." and load the file meta-dtd/html4-loose.dtd.xml

2. Place cursor at the "X" and choose "Close Element" from the
"XML Plugin" menu. "</P>" resp. "</p>" should be inserted:
	<P> <a href=""> foo <i> test </i> bar </a> X
	<P> <a x="xyz"> foo bar </a> X
	<P> foo <img foo="&bar;"/> bar X
	<P> foo <img/> bar X
	<P> foo bar X
	<p foo="bar">
		next line, X
	<p><!-- foo --> X (again, the "p" should be closed)
	<p><? foo ?> X (again, the "p" should be closed)

3. Place cursor after (outside) the tag and select "Insert Element...". The listed
sub-elements should be offered as completion once you start typing.  Select one
and it should be inserted, including its closing tag. The cursor should be
placed behind the tag name in the opening tag. The same thing should work
if you just type "<" outside the tag:
	<a>	abbr, acronym, ....(i.e. no "a", as it cannot be nested!)
	<A>	abbr, acronym, ....
	<P foo="bar">	a, abbr, acronym, ...
	<textarea>, (no possible sub-elements)

4. Place cursor inside the element, but after the element name and outside the
attribute values. Press space. A list of attributes should be displayed. Select one and
it should be inserted, including the = and two quotation marks. The cursor should be
placed inside the quotation marks:
	<a>	accesskey, charset, ...
	<a href="foo">	accesskey, charset, ...
	<img href="foo" />	align, alt, border, ...
	<html>	dir, lang, version

5. Place cursor inside the attribute values and press space. A List of
attribute values should be displayed. Select one and it should be inserted at
the current cursor position, replacing the old value:
	<td align="">	center, char, justify, left, right
	<td valign="">	baseline, bottom, middle, top
	<td valign="foobar"> -- "foobar" should be replaced
	<area tqshape="">	circle, default, poly, rect
	<area foobar="">	(no predefined values)

6. Type "&". A list with named entities should appear. Select one and
it should be inserted, including the trailing semicolon.

7. Test that SGML (that is HTML, really) is treated as case-insensitive:
	<TD AligN="center">
	<Td AligN="justify">
	<td AligN="leftcenter">
	<TD align="">

8. Single quotes work just like double quotes, whitespace inside element tags is okay:
	<td align='right'>
	<td align=''>
	<td
		align="">

9. Current limitations: trigger completion at "X":
	<a href="foo"> blah <em>X -- <a> inside <a> is not allowed, but this limitation is not
		part of the DTD, so the plugin will incorrectly claim that <a> is allowed at "X".
	<head><title> foobar</title> X -- <title> is only allowed once, but the plugin
		only looks for the parent element (<head> in this case) and ignores the existing <title>.
	<a href="foo" X > -- an attribute may only appear once, but "href" is listed by the plugin
		although it's used already.
	<td align = "X"> -- whitespace around '=' is not recognized although it's legal.

10. Use "Assing Meta DTD..." to switch to kde-dockbook.dtd.xml. Try the above steps
on the following tags:
	<author lang="">
	<surname>