summaryrefslogtreecommitdiffstats
path: root/src/dom/work
diff options
context:
space:
mode:
authorBob Jamison <ishmalius@gmail.com>2006-04-12 13:25:21 +0000
committerishmal <ishmal@users.sourceforge.net>2006-04-12 13:25:21 +0000
commit6fd9af13a8614a4b95e8be1518e745915ef8bb56 (patch)
treebf94fa5f7c3a7b2f581f3e7cf2522bf7c2d4b6c9 /src/dom/work
parentRemoved file/folder for ishmal (diff)
downloadinkscape-6fd9af13a8614a4b95e8be1518e745915ef8bb56.tar.gz
inkscape-6fd9af13a8614a4b95e8be1518e745915ef8bb56.zip
Add new rearranged /dom directory
(bzr r479)
Diffstat (limited to 'src/dom/work')
-rw-r--r--src/dom/work/001.css214
-rw-r--r--src/dom/work/acid.css110
-rw-r--r--src/dom/work/base.css32
-rw-r--r--src/dom/work/css.idl633
-rw-r--r--src/dom/work/cssprop.txt123
-rw-r--r--src/dom/work/dom.idl548
-rw-r--r--src/dom/work/events.idl298
-rw-r--r--src/dom/work/inkscape.css493
-rw-r--r--src/dom/work/ls.idl171
-rw-r--r--src/dom/work/meyerweb.css181
-rw-r--r--src/dom/work/prop-css.txt1082
-rw-r--r--src/dom/work/prop-svg.txt651
-rw-r--r--src/dom/work/ranges.idl122
-rw-r--r--src/dom/work/sandb1.css149
-rw-r--r--src/dom/work/smil.idl369
-rw-r--r--src/dom/work/stylesheets.idl71
-rw-r--r--src/dom/work/testdom.cpp110
-rw-r--r--src/dom/work/testhttp.cpp82
-rw-r--r--src/dom/work/testodf.cpp98
-rw-r--r--src/dom/work/testsvg.cpp97
-rw-r--r--src/dom/work/testuri.cpp76
-rw-r--r--src/dom/work/testxpath.cpp1416
-rw-r--r--src/dom/work/testzip.cpp65
-rw-r--r--src/dom/work/traversal.idl102
-rw-r--r--src/dom/work/views.idl254
-rw-r--r--src/dom/work/xpath.idl115
-rw-r--r--src/dom/work/xpathtests.cpp1290
27 files changed, 8952 insertions, 0 deletions
diff --git a/src/dom/work/001.css b/src/dom/work/001.css
new file mode 100644
index 000000000..6f07bc312
--- /dev/null
+++ b/src/dom/work/001.css
@@ -0,0 +1,214 @@
+/* css Zen Garden default style - 'Tranquille' by Dave Shea - http://www.mezzoblue.com/ */
+/* css released under Creative Commons License - http://creativecommons.org/licenses/by-nc-sa/1.0/ */
+/* All associated graphics copyright 2003, Dave Shea */
+/* Added: May 7th, 2003 */
+
+
+/* IMPORTANT */
+/* This design is not a template. You may not reproduce it elsewhere without the
+ designer's written permission. However, feel free to study the CSS and use
+ techniques you learn from it elsewhere. */
+
+
+/* The Zen Garden default was the first I put together, and almost didn't make the cut. I briefly flirted with using
+ 'Salmon Cream Cheese' as the main style for the Garden, but switched back to this one before launch.
+
+ All graphics in this design were illustrated by me in Photoshop. Google Image Search provided inspiration for
+ some of the elements. I did a bit of research on Kanji to come up with the characters on the top left. Anyone who
+ can read that will most likely tell you it makes no sense, but the best I could do was putting together the
+ characters for 'beginning' 'complete' and 'skill' to roughly say something like 'we're breaking fresh ground.'
+
+ It's a stretch. */
+
+
+/* basic elements */
+html {
+ margin: 0px;
+ padding: 0px;
+ }
+body {
+ font: 9pt/17pt georgia;
+ color: #555753;
+ background: #fff url(/001/blossoms.jpg) no-repeat bottom right;
+ margin: 0px;
+ padding: 0px;
+ }
+p {
+ font: 9pt/17pt georgia;
+ margin-top: 0px;
+ text-align: justify;
+ }
+h3 {
+ font: italic normal 12pt georgia;
+ letter-spacing: 1px;
+ margin-bottom: 0px;
+ color: #7D775C;
+ }
+a:link {
+ font-weight: bold;
+ text-decoration: none;
+ color: #B7A5DF;
+ }
+a:visited {
+ font-weight: bold;
+ text-decoration: none;
+ color: #D4CDDC;
+ }
+a:hover, a:active {
+ text-decoration: underline;
+ color: #9685BA;
+ }
+acronym {
+ border-bottom: none;
+ }
+
+
+/* specific divs */
+#container {
+ background: url(/001/zen-bg.jpg) no-repeat top left;
+ padding: 0px 175px 0px 110px;
+ margin: 0px;
+ position: absolute;
+ top: 0px;
+ left: 0px;
+ }
+
+#intro {
+ min-width: 470px;
+ }
+#pageHeader {
+ margin-bottom: 20px;
+ }
+
+/* using an image to replace text in an h1. This trick courtesy Douglas Bowman, http://www.stopdesign.com/articles/css/replace-text/ */
+#pageHeader h1 {
+ background: transparent url(/001/h1.gif) no-repeat top left;
+ margin-top: 10px;
+ width: 219px;
+ height: 87px;
+ float: left;
+ }
+#pageHeader h1 span {
+ display:none
+ }
+#pageHeader h2 {
+ background: transparent url(/001/h2.gif) no-repeat top left;
+ margin-top: 58px;
+ margin-bottom: 40px;
+ width: 200px;
+ height: 18px;
+ float: right;
+ }
+#pageHeader h2 span {
+ display:none
+ }
+
+#quickSummary {
+ clear:both;
+ margin: 20px 20px 20px 10px;
+ width: 160px;
+ float: left;
+ }
+#quickSummary p {
+ font: italic 10pt/22pt georgia;
+ text-align:center;
+ }
+
+#preamble {
+ clear: right;
+ padding: 0px 10px 0px 10px;
+ }
+#supportingText {
+ padding-left: 10px;
+ margin-bottom: 40px;
+ }
+
+#footer {
+ text-align: center;
+ }
+#footer a:link, #footer a:visited {
+ margin-right: 20px;
+ }
+
+#linkList {
+ margin-left: 600px;
+ position: absolute;
+ top: 0px;
+ right: 0px;
+ }
+#linkList2 {
+ font: 10px verdana, sans-serif;
+ background: transparent url(/001/paper-bg.jpg) top left repeat-y;
+ padding: 10px;
+ margin-top: 150px;
+ width: 130px;
+ }
+#linkList h3.select {
+ background: transparent url(/001/h3.gif) no-repeat top left;
+ margin: 10px 0px 5px 0px;
+ width: 97px;
+ height: 16px;
+ }
+#linkList h3.select span {
+ display:none
+ }
+#linkList h3.favorites {
+ background: transparent url(/001/h4.gif) no-repeat top left;
+ margin: 25px 0px 5px 0px;
+ width: 60px;
+ height: 18px;
+ }
+#linkList h3.favorites span {
+ display:none
+ }
+#linkList h3.archives {
+ background: transparent url(/001/h5.gif) no-repeat top left;
+ margin: 25px 0px 5px 0px;
+ width:57px;
+ height: 14px;
+ }
+#linkList h3.archives span {
+ display:none
+ }
+#linkList h3.resources {
+ background: transparent url(/001/h6.gif) no-repeat top left;
+ margin: 25px 0px 5px 0px;
+ width:63px;
+ height: 10px;
+ }
+#linkList h3.resources span {
+ display:none
+ }
+
+
+#linkList ul {
+ margin: 0px;
+ padding: 0px;
+ }
+#linkList li {
+ line-height: 2.5ex;
+ background: transparent url(/001/cr1.gif) no-repeat top center;
+ display: block;
+ padding-top: 5px;
+ margin-bottom: 5px;
+ list-style-type: none;
+ }
+#linkList li a:link {
+ color: #988F5E;
+ }
+#linkList li a:visited {
+ color: #B3AE94;
+ }
+
+
+#extraDiv1 {
+ background: transparent url(/001/cr2.gif) top left no-repeat;
+ position: absolute;
+ top: 40px;
+ right: 0px;
+ width: 148px;
+ height: 110px;
+ }
+.accesskey {
+ text-decoration: underline;
+ } \ No newline at end of file
diff --git a/src/dom/work/acid.css b/src/dom/work/acid.css
new file mode 100644
index 000000000..7ea8750f5
--- /dev/null
+++ b/src/dom/work/acid.css
@@ -0,0 +1,110 @@
+ /* section numbers refer to CSS2.1 */
+
+ /* page setup */
+ html { font: 12px sans-serif; margin: 0; padding: 0; overflow: hidden; /* hides scrollbars on viewport, see 11.1.1:3 */ background: white; color: red; }
+ body { margin: 0; padding: 0; }
+
+ /* introduction message */
+ .intro { font: 2em sans-serif; margin: 3.5em 2em; padding: 0.5em; border: solid thin; background: white; color: black; position: relative; z-index: 2; /* should cover the black and red bars that are fixed-positioned */ }
+ .intro * { font: inherit; margin: 0; padding: 0; }
+ .intro h1 { font-size: 1em; font-weight: bolder; margin: 0; padding: 0; }
+ .intro :link { color: blue; }
+ .intro :visited { color: purple; }
+
+ /* picture setup */
+ #top { margin: 100em 3em 0; padding: 2em 0 0 .5em; text-align: left; font: 2em/24px sans-serif; color: navy; white-space: pre; } /* "Hello World!" text */
+ .picture { position: relative; border: 1em solid transparent; margin: 0 0 100em 3em; } /* containing block for face */
+ .picture { background: red; } /* overriden by preferred stylesheet below */
+
+ /* top line of face (scalp): fixed positioning and min/max height/width */
+ .picture p { position: fixed; margin: 0; padding: 0; border: 0; top: 9em; left: 11em; width: 140%; max-width: 4em; height: 8px; min-height: 1em; max-height: 2mm; /* min-height overrides max-height, see 10.7 */ background: black; border-bottom: 0.5em yellow solid; }
+
+ /* bits that shouldn't be part of the top line (and shouldn't be visible at all): HTML parsing, "+" combinator, stacking order */
+ .picture p.bad { border-bottom: red solid; /* shouldn't matter, because the "p + table + p" rule below should match it too, thus hiding it */ }
+ .picture p + p { background: maroon; z-index: 1; } /* shouldn't match anything */
+ .picture p + table + p { margin-top: 3em; /* should end up under the absolutely positioned table below, and thus not be visible */ }
+
+ /* second line of face: attribute selectors, float positioning */
+ [class~=one].first.one { position: absolute; top: 0; margin: 36px 0 0 60px; padding: 0; border: black 2em; border-style: none solid; /* shrink wraps around float */ }
+ [class~=one][class~=first] [class=second\ two][class="second two"] { float: right; width: 48px; height: 12px; background: yellow; margin: 0; padding: 0; } /* only content of abs pos block */
+
+ /* third line of face: width and overflow */
+ .forehead { margin: 4em; width: 8em; border-left: solid black 1em; border-right: solid black 1em; background: red url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAADElEQVR42mP4%2F58BAAT%2FAf9jgNErAAAAAElFTkSuQmCC); /* that's a 1x1 yellow pixel PNG */ }
+ .forehead * { width: 12em; line-height: 1em; }
+
+ /* class selectors headache */
+ .two.error.two { background: maroon; } /* shouldn't match */
+ .forehead.error.forehead { background: red; } /* shouldn't match */
+ [class=second two] { background: red; } /* this should be ignored (invalid selector -- grammar says it only accepts IDENTs or STRINGs) */
+
+ /* fourth and fifth lines of face, with eyes: paint order test (see appendix E) and fixed backgrounds */
+ /* the two images are identical: 2-by-2 squares with the top left
+ and bottom right pixels set to yellow and the other two set to
+ transparent. Since they are offset by one pixel from each other,
+ the second one paints exactly over the transparent parts of the
+ first one, thus creating a solid yellow block. */
+ .eyes { position: absolute; top: 5em; left: 3em; margin: 0; padding: 0; background: red; }
+ #eyes-a { height: 0; line-height: 2em; text-align: right; } /* contents should paint top-most because they're inline */
+ #eyes-a object { display: inline; vertical-align: bottom; }
+ #eyes-a object[type] { width: 7.5em; height: 2.5em; } /* should have no effect since that object should fallback to being inline (height/width don't apply to inlines) */
+ #eyes-a object object object { border-right: solid 1em black; padding: 0 12px 0 11px; background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAIAAAD91JpzAAAABnRSTlMAAAAAAABupgeRAAAABmJLR0QA%2FwD%2FAP%2BgvaeTAAAAEUlEQVR42mP4%2F58BCv7%2FZwAAHfAD%2FabwPj4AAAAASUVORK5CYII%3D) fixed 1px 0; }
+ #eyes-b { float: left; width: 10em; height: 2em; background: fixed url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAIAAAD91JpzAAAABnRSTlMAAAAAAABupgeRAAAABmJLR0QA%2FwD%2FAP%2BgvaeTAAAAEUlEQVR42mP4%2F58BCv7%2FZwAAHfAD%2FabwPj4AAAAASUVORK5CYII%3D); border-left: solid 1em black; border-right: solid 1em red; } /* should paint in the middle layer because it is a float */
+ #eyes-c { display: block; background: red; border-left: 2em solid yellow; width: 10em; height: 2em; } /* should paint bottom most because it is a block */
+
+ /* lines six to nine, with nose: auto margins */
+ .nose { float: left; margin: -2em 2em -1em; border: solid 1em black; border-top: 0; min-height: 80%; height: 60%; max-height: 3em; /* percentages become auto (see 10.5 and 10.7) and intrinsic height is more than 3em, so 3em wins */ padding: 0; width: 12em; }
+ .nose > div { padding: 1em 1em 3em; height: 0; background: yellow; }
+ .nose div div { width: 2em; height: 2em; background: red; margin: auto; }
+ .nose :hover div { border-color: blue; }
+ .nose div:hover :before { border-bottom-color: inherit; }
+ .nose div:hover :after { border-top-color: inherit; }
+ .nose div div:before { display: block; border-style: none solid solid; border-color: red yellow black yellow; border-width: 1em; content: ''; height: 0; }
+ .nose div :after { display: block; border-style: solid solid none; border-color: black yellow red yellow; border-width: 1em; content: ''; height: 0; }
+
+ /* between lines nine and ten: margin collapsing with 'float' and 'clear' */
+ .empty { margin: 6.25em; height: 10%; /* computes to auto which makes it empty per 8.3.1:7 (own margins) */ }
+ .empty div { margin: 0 2em -6em 4em; }
+ .smile { margin: 5em 3em; clear: both; /* clearance is negative (see 8.3.1 and 9.5.1) */ }
+
+ /* line ten and eleven: containing block for abs pos */
+ .smile div { margin-top: 0.25em; background: black; width: 12em; height: 2em; position: relative; bottom: -1em; }
+ .smile div div { position: absolute; top: 0; right: 1em; width: auto; height: 0; margin: 0; border: yellow solid 1em; }
+
+ /* smile (over lines ten and eleven): backgrounds behind borders, inheritance of 'float', nested floats, negative heights */
+ .smile div div span { display: inline; margin: -1em 0 0 0; border: solid 1em transparent; border-style: none solid; float: right; background: black; height: 1em; }
+ .smile div div span em { float: inherit; border-top: solid yellow 1em; border-bottom: solid black 1em; } /* zero-height block; width comes from (zero-height) child. */
+ .smile div div span em strong { width: 6em; display: block; margin-bottom: -1em; /* should have no effect, since parent has top&bottom borders, so this margin doesn't collapse */ }
+
+ /* line twelve: line-height */
+ .chin { margin: -4em 4em 0; width: 8em; line-height: 1em; border-left: solid 1em black; border-right: solid 1em black; background: yellow url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAIAAAFSDNYfAAAAaklEQVR42u3XQQrAIAwAQeP%2F%2F6wf8CJBJTK9lnQ7FpHGaOurt1I34nfH9pMMZAZ8BwMGEvvh%2BBsJCAgICLwIOA8EBAQEBAQEBAQEBK79H5RfIQAAAAAAAAAAAAAAAAAAAAAAAAAAAID%2FABMSqAfj%2FsLmvAAAAABJRU5ErkJggg%3D%3D) /* 64x64 red square */ no-repeat fixed /* shouldn't be visible unless the smiley is moved to the top left of the viewport */; }
+ .chin div { display: inline; font: 2px/4px serif; }
+
+ /* line thirteen: cascade and selector tests */
+ .parser-container div { color: maroon; border: solid; color: orange; } /* setup */
+ div.parser-container * { border-color: black; /* overrides (implied) border-color on previous line */ } /* setup */
+ * div.parser { border-width: 0 2em; /* overrides (implied) declarations on earlier line */ } /* setup */
+
+ /* line thirteen continued: parser tests */
+ .parser { /* comment parsing test -- comment ends before the end of this line, the backslash should have no effect: \*/ }
+ .parser { margin: 0 5em 1em; padding: 0 1em; width: 2em; height: 1em; error: \}; background: yellow; } /* setup with parsing test */
+ * html .parser { background: gray; }
+ \.parser { padding: 2em; }
+ .parser { m\argin: 2em; };
+ .parser { height: 3em; }
+ .parser { width: 200; }
+ .parser { border: 5em solid red ! error; }
+ .parser { background: red pink; }
+
+ /* line fourteen (last line of face): table */
+ ul { display: table; padding: 0; margin: -1em 7em 0; background: red; }
+ ul li { padding: 0; margin: 0; }
+ ul li.first-part { display: table-cell; height: 1em; width: 1em; background: black; }
+ ul li.second-part { display: table; height: 1em; width: 1em; background: black; } /* anonymous table cell wraps around this */
+ ul li.third-part { display: table-cell; height: 0.5em; /* gets stretched to fit row */ width: 1em; background: black; }
+ ul li.fourth-part { list-style: none; height: 1em; width: 1em; background: black; } /* anonymous table cell wraps around this */
+
+ /* bits that shouldn't appear: inline alignment in cells */
+ .image-height-test { height: 10px; overflow: hidden; font: 20em serif; } /* only the area between the top of the line box and the top of the image should be visible */
+ table { margin: 0; border-spacing: 0; }
+ td { padding: 0; }
+
diff --git a/src/dom/work/base.css b/src/dom/work/base.css
new file mode 100644
index 000000000..7176bbf94
--- /dev/null
+++ b/src/dom/work/base.css
@@ -0,0 +1,32 @@
+/* recover from old-browser styling */
+
+*.oldbl {display: block !important;}
+*.oldin {display: inline !important;}
+*.ahem {display: none !important;}
+img.pic {display: block !important;}
+
+/* NS6.x-specific fix(es) */
+
+/*|*:-moz-list-bullet, *|*:-moz-list-number {font-size: 1em;}/
+
+/* misc */
+
+.skipper {display: none !important;}
+
+* {font-size: 100%;}
+h1 {font-size: 2em;}
+h2 {font-size: 1.5em;}
+h3 {font-size: 1.33em;}
+h4 {font-size: 1.1em;}
+h5 {font-size: 0.9em;}
+h6 {font-size: 0.75em;}
+pre, code, tt {font: 95% "Andale Mono", Courier, "Courier New", monospace;}
+
+img.pic {float: right; margin: 0.25em 0 0.66em 1.5em;}
+img.border {border: 3px double;}
+
+p.contact {margin: 0 1em !important; text-align: right; font-size: 90%;}
+
+#main {min-height: 30em;}
+#header h1 a, #nav a {text-decoration: none;}
+#nav {padding-top: 0.75em;}
diff --git a/src/dom/work/css.idl b/src/dom/work/css.idl
new file mode 100644
index 000000000..5033f901c
--- /dev/null
+++ b/src/dom/work/css.idl
@@ -0,0 +1,633 @@
+/*
+ * Copyright (c) 2000 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program 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 W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+// File: http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113/css.idl
+
+#ifndef _CSS_IDL_
+#define _CSS_IDL_
+
+#include "dom.idl"
+#include "stylesheets.idl"
+#include "views.idl"
+
+#pragma prefix "dom.w3c.org"
+module css
+{
+
+ typedef dom::DOMString DOMString;
+ typedef dom::Element Element;
+ typedef dom::DOMImplementation DOMImplementation;
+
+ interface CSSRule;
+ interface CSSStyleSheet;
+ interface CSSStyleDeclaration;
+ interface CSSValue;
+ interface Counter;
+ interface Rect;
+ interface RGBColor;
+
+ // Introduced in DOM Level 2:
+ interface CSSRuleList {
+ readonly attribute unsigned long length;
+ CSSRule item(in unsigned long index);
+ };
+
+ // Introduced in DOM Level 2:
+ interface CSSRule {
+
+ // RuleType
+ const unsigned short UNKNOWN_RULE = 0;
+ const unsigned short STYLE_RULE = 1;
+ const unsigned short CHARSET_RULE = 2;
+ const unsigned short IMPORT_RULE = 3;
+ const unsigned short MEDIA_RULE = 4;
+ const unsigned short FONT_FACE_RULE = 5;
+ const unsigned short PAGE_RULE = 6;
+
+ readonly attribute unsigned short type;
+ attribute DOMString cssText;
+ // raises(dom::DOMException) on setting
+
+ readonly attribute CSSStyleSheet parentStyleSheet;
+ readonly attribute CSSRule parentRule;
+ };
+
+ // Introduced in DOM Level 2:
+ interface CSSStyleRule : CSSRule {
+ attribute DOMString selectorText;
+ // raises(dom::DOMException) on setting
+
+ readonly attribute CSSStyleDeclaration style;
+ };
+
+ // Introduced in DOM Level 2:
+ interface CSSMediaRule : CSSRule {
+ readonly attribute stylesheets::MediaList media;
+ readonly attribute CSSRuleList cssRules;
+ unsigned long insertRule(in DOMString rule,
+ in unsigned long index)
+ raises(dom::DOMException);
+ void deleteRule(in unsigned long index)
+ raises(dom::DOMException);
+ };
+
+ // Introduced in DOM Level 2:
+ interface CSSFontFaceRule : CSSRule {
+ readonly attribute CSSStyleDeclaration style;
+ };
+
+ // Introduced in DOM Level 2:
+ interface CSSPageRule : CSSRule {
+ attribute DOMString selectorText;
+ // raises(dom::DOMException) on setting
+
+ readonly attribute CSSStyleDeclaration style;
+ };
+
+ // Introduced in DOM Level 2:
+ interface CSSImportRule : CSSRule {
+ readonly attribute DOMString href;
+ readonly attribute stylesheets::MediaList media;
+ readonly attribute CSSStyleSheet styleSheet;
+ };
+
+ // Introduced in DOM Level 2:
+ interface CSSCharsetRule : CSSRule {
+ attribute DOMString encoding;
+ // raises(dom::DOMException) on setting
+
+ };
+
+ // Introduced in DOM Level 2:
+ interface CSSUnknownRule : CSSRule {
+ };
+
+ // Introduced in DOM Level 2:
+ interface CSSStyleDeclaration {
+ attribute DOMString cssText;
+ // raises(dom::DOMException) on setting
+
+ DOMString getPropertyValue(in DOMString propertyName);
+ CSSValue getPropertyCSSValue(in DOMString propertyName);
+ DOMString removeProperty(in DOMString propertyName)
+ raises(dom::DOMException);
+ DOMString getPropertyPriority(in DOMString propertyName);
+ void setProperty(in DOMString propertyName,
+ in DOMString value,
+ in DOMString priority)
+ raises(dom::DOMException);
+ readonly attribute unsigned long length;
+ DOMString item(in unsigned long index);
+ readonly attribute CSSRule parentRule;
+ };
+
+ // Introduced in DOM Level 2:
+ interface CSSValue {
+
+ // UnitTypes
+ const unsigned short CSS_INHERIT = 0;
+ const unsigned short CSS_PRIMITIVE_VALUE = 1;
+ const unsigned short CSS_VALUE_LIST = 2;
+ const unsigned short CSS_CUSTOM = 3;
+
+ attribute DOMString cssText;
+ // raises(dom::DOMException) on setting
+
+ readonly attribute unsigned short cssValueType;
+ };
+
+ // Introduced in DOM Level 2:
+ interface CSSPrimitiveValue : CSSValue {
+
+ // UnitTypes
+ const unsigned short CSS_UNKNOWN = 0;
+ const unsigned short CSS_NUMBER = 1;
+ const unsigned short CSS_PERCENTAGE = 2;
+ const unsigned short CSS_EMS = 3;
+ const unsigned short CSS_EXS = 4;
+ const unsigned short CSS_PX = 5;
+ const unsigned short CSS_CM = 6;
+ const unsigned short CSS_MM = 7;
+ const unsigned short CSS_IN = 8;
+ const unsigned short CSS_PT = 9;
+ const unsigned short CSS_PC = 10;
+ const unsigned short CSS_DEG = 11;
+ const unsigned short CSS_RAD = 12;
+ const unsigned short CSS_GRAD = 13;
+ const unsigned short CSS_MS = 14;
+ const unsigned short CSS_S = 15;
+ const unsigned short CSS_HZ = 16;
+ const unsigned short CSS_KHZ = 17;
+ const unsigned short CSS_DIMENSION = 18;
+ const unsigned short CSS_STRING = 19;
+ const unsigned short CSS_URI = 20;
+ const unsigned short CSS_IDENT = 21;
+ const unsigned short CSS_ATTR = 22;
+ const unsigned short CSS_COUNTER = 23;
+ const unsigned short CSS_RECT = 24;
+ const unsigned short CSS_RGBCOLOR = 25;
+
+ readonly attribute unsigned short primitiveType;
+ void setFloatValue(in unsigned short unitType,
+ in float floatValue)
+ raises(dom::DOMException);
+ float getFloatValue(in unsigned short unitType)
+ raises(dom::DOMException);
+ void setStringValue(in unsigned short stringType,
+ in DOMString stringValue)
+ raises(dom::DOMException);
+ DOMString getStringValue()
+ raises(dom::DOMException);
+ Counter getCounterValue()
+ raises(dom::DOMException);
+ Rect getRectValue()
+ raises(dom::DOMException);
+ RGBColor getRGBColorValue()
+ raises(dom::DOMException);
+ };
+
+ // Introduced in DOM Level 2:
+ interface CSSValueList : CSSValue {
+ readonly attribute unsigned long length;
+ CSSValue item(in unsigned long index);
+ };
+
+ // Introduced in DOM Level 2:
+ interface RGBColor {
+ readonly attribute CSSPrimitiveValue red;
+ readonly attribute CSSPrimitiveValue green;
+ readonly attribute CSSPrimitiveValue blue;
+ };
+
+ // Introduced in DOM Level 2:
+ interface Rect {
+ readonly attribute CSSPrimitiveValue top;
+ readonly attribute CSSPrimitiveValue right;
+ readonly attribute CSSPrimitiveValue bottom;
+ readonly attribute CSSPrimitiveValue left;
+ };
+
+ // Introduced in DOM Level 2:
+ interface Counter {
+ readonly attribute DOMString identifier;
+ readonly attribute DOMString listStyle;
+ readonly attribute DOMString separator;
+ };
+
+ // Introduced in DOM Level 2:
+ interface ElementCSSInlineStyle {
+ readonly attribute CSSStyleDeclaration style;
+ };
+
+ // Introduced in DOM Level 2:
+ interface CSS2Properties {
+ attribute DOMString azimuth;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString background;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString backgroundAttachment;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString backgroundColor;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString backgroundImage;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString backgroundPosition;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString backgroundRepeat;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString border;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString borderCollapse;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString borderColor;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString borderSpacing;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString borderStyle;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString borderTop;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString borderRight;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString borderBottom;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString borderLeft;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString borderTopColor;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString borderRightColor;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString borderBottomColor;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString borderLeftColor;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString borderTopStyle;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString borderRightStyle;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString borderBottomStyle;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString borderLeftStyle;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString borderTopWidth;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString borderRightWidth;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString borderBottomWidth;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString borderLeftWidth;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString borderWidth;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString bottom;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString captionSide;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString clear;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString clip;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString color;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString content;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString counterIncrement;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString counterReset;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString cue;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString cueAfter;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString cueBefore;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString cursor;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString direction;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString display;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString elevation;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString emptyCells;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString cssFloat;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString font;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString fontFamily;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString fontSize;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString fontSizeAdjust;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString fontStretch;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString fontStyle;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString fontVariant;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString fontWeight;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString height;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString left;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString letterSpacing;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString lineHeight;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString listStyle;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString listStyleImage;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString listStylePosition;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString listStyleType;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString margin;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString marginTop;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString marginRight;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString marginBottom;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString marginLeft;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString markerOffset;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString marks;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString maxHeight;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString maxWidth;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString minHeight;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString minWidth;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString orphans;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString outline;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString outlineColor;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString outlineStyle;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString outlineWidth;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString overflow;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString padding;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString paddingTop;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString paddingRight;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString paddingBottom;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString paddingLeft;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString page;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString pageBreakAfter;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString pageBreakBefore;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString pageBreakInside;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString pause;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString pauseAfter;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString pauseBefore;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString pitch;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString pitchRange;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString playDuring;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString position;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString quotes;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString richness;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString right;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString size;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString speak;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString speakHeader;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString speakNumeral;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString speakPunctuation;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString speechRate;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString stress;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString tableLayout;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString textAlign;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString textDecoration;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString textIndent;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString textShadow;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString textTransform;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString top;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString unicodeBidi;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString verticalAlign;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString visibility;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString voiceFamily;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString volume;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString whiteSpace;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString widows;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString width;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString wordSpacing;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString zIndex;
+ // raises(dom::DOMException) on setting
+
+ };
+
+ // Introduced in DOM Level 2:
+ interface CSSStyleSheet : stylesheets::StyleSheet {
+ readonly attribute CSSRule ownerRule;
+ readonly attribute CSSRuleList cssRules;
+ unsigned long insertRule(in DOMString rule,
+ in unsigned long index)
+ raises(dom::DOMException);
+ void deleteRule(in unsigned long index)
+ raises(dom::DOMException);
+ };
+
+ // Introduced in DOM Level 2:
+ interface ViewCSS : views::AbstractView {
+ CSSStyleDeclaration getComputedStyle(in Element elt,
+ in DOMString pseudoElt);
+ };
+
+ // Introduced in DOM Level 2:
+ interface DocumentCSS : stylesheets::DocumentStyle {
+ CSSStyleDeclaration getOverrideStyle(in Element elt,
+ in DOMString pseudoElt);
+ };
+
+ // Introduced in DOM Level 2:
+ interface DOMImplementationCSS : DOMImplementation {
+ CSSStyleSheet createCSSStyleSheet(in DOMString title,
+ in DOMString media)
+ raises(dom::DOMException);
+ };
+};
+
+#endif // _CSS_IDL_
+
diff --git a/src/dom/work/cssprop.txt b/src/dom/work/cssprop.txt
new file mode 100644
index 000000000..36832f42b
--- /dev/null
+++ b/src/dom/work/cssprop.txt
@@ -0,0 +1,123 @@
+azimuth
+background
+backgroundAttachment
+backgroundColor
+backgroundImage
+backgroundPosition
+backgroundRepeat
+border
+borderCollapse
+borderColor
+borderSpacing
+borderStyle
+borderTop
+borderRight
+borderBottom
+borderLeft
+borderTopColor
+borderRightColor
+borderBottomColor
+borderLeftColor
+borderTopStyle
+borderRightStyle
+borderBottomStyle
+borderLeftStyle
+borderTopWidth
+borderRightWidth
+borderBottomWidth
+borderLeftWidth
+borderWidth
+bottom
+captionSide
+clear
+clip
+color
+content
+counterIncrement
+counterReset
+cue
+cueAfter
+cueBefore
+cursor
+direction
+display
+elevation
+emptyCells
+cssFloat
+font
+fontFamily
+fontSize
+fontSizeAdjust
+fontStretch
+fontStyle
+fontVariant
+fontWeight
+height
+left
+letterSpacing
+lineHeight
+listStyle
+listStyleImage
+listStylePosition
+listStyleType
+margin
+marginTop
+marginRight
+marginBottom
+marginLeft
+markerOffset
+marks
+maxHeight
+maxWidth
+minHeight
+minWidth
+orphans
+outline
+outlineColor
+outlineStyle
+outlineWidth
+overflow
+padding
+paddingTop
+paddingRight
+paddingBottom
+paddingLeft
+page
+pageBreakAfter
+pageBreakBefore
+pageBreakInside
+pause
+pauseAfter
+pauseBefore
+pitch
+pitchRange
+playDuring
+position
+quotes
+richness
+right
+size
+speak
+speakHeader
+speakNumeral
+speakPunctuation
+speechRate
+stress
+tableLayout
+textAlign
+textDecoration
+textIndent
+textShadow
+textTransform
+top
+unicodeBidi
+verticalAlign
+visibility
+voiceFamily
+volume
+whiteSpace
+widows
+width
+wordSpacing
+zIndex
+
diff --git a/src/dom/work/dom.idl b/src/dom/work/dom.idl
new file mode 100644
index 000000000..4c9dcbfe2
--- /dev/null
+++ b/src/dom/work/dom.idl
@@ -0,0 +1,548 @@
+/*
+ * Copyright (c) 2004 World Wide Web Consortium,
+ *
+ * (Massachusetts Institute of Technology, European Research Consortium for
+ * Informatics and Mathematics, Keio University). All Rights Reserved. This
+ * work is distributed under the W3C(r) Software License [1] 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.
+ *
+ * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+ */
+
+// File: http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/dom.idl
+
+#ifndef _DOM_IDL_
+#define _DOM_IDL_
+
+#pragma prefix "w3c.org"
+module dom
+{
+
+ valuetype DOMString sequence<unsigned short>;
+
+ typedef unsigned long long DOMTimeStamp;
+
+ typedef any DOMUserData;
+
+ typedef Object DOMObject;
+
+ interface DOMImplementation;
+ interface DocumentType;
+ interface Document;
+ interface NodeList;
+ interface NamedNodeMap;
+ interface UserDataHandler;
+ interface Element;
+ interface TypeInfo;
+ interface DOMLocator;
+
+ exception DOMException {
+ unsigned short code;
+ };
+ // ExceptionCode
+ const unsigned short INDEX_SIZE_ERR = 1;
+ const unsigned short DOMSTRING_SIZE_ERR = 2;
+ const unsigned short HIERARCHY_REQUEST_ERR = 3;
+ const unsigned short WRONG_DOCUMENT_ERR = 4;
+ const unsigned short INVALID_CHARACTER_ERR = 5;
+ const unsigned short NO_DATA_ALLOWED_ERR = 6;
+ const unsigned short NO_MODIFICATION_ALLOWED_ERR = 7;
+ const unsigned short NOT_FOUND_ERR = 8;
+ const unsigned short NOT_SUPPORTED_ERR = 9;
+ const unsigned short INUSE_ATTRIBUTE_ERR = 10;
+ // Introduced in DOM Level 2:
+ const unsigned short INVALID_STATE_ERR = 11;
+ // Introduced in DOM Level 2:
+ const unsigned short SYNTAX_ERR = 12;
+ // Introduced in DOM Level 2:
+ const unsigned short INVALID_MODIFICATION_ERR = 13;
+ // Introduced in DOM Level 2:
+ const unsigned short NAMESPACE_ERR = 14;
+ // Introduced in DOM Level 2:
+ const unsigned short INVALID_ACCESS_ERR = 15;
+ // Introduced in DOM Level 3:
+ const unsigned short VALIDATION_ERR = 16;
+ // Introduced in DOM Level 3:
+ const unsigned short TYPE_MISMATCH_ERR = 17;
+
+
+ // Introduced in DOM Level 3:
+ interface DOMStringList {
+ DOMString item(in unsigned long index);
+ readonly attribute unsigned long length;
+ boolean contains(in DOMString str);
+ };
+
+ // Introduced in DOM Level 3:
+ interface NameList {
+ DOMString getName(in unsigned long index);
+ DOMString getNamespaceURI(in unsigned long index);
+ readonly attribute unsigned long length;
+ boolean contains(in DOMString str);
+ boolean containsNS(in DOMString namespaceURI,
+ in DOMString name);
+ };
+
+ // Introduced in DOM Level 3:
+ interface DOMImplementationList {
+ DOMImplementation item(in unsigned long index);
+ readonly attribute unsigned long length;
+ };
+
+ // Introduced in DOM Level 3:
+ interface DOMImplementationSource {
+ DOMImplementation getDOMImplementation(in DOMString features);
+ DOMImplementationList getDOMImplementationList(in DOMString features);
+ };
+
+ interface DOMImplementation {
+ boolean hasFeature(in DOMString feature,
+ in DOMString version);
+ // Introduced in DOM Level 2:
+ DocumentType createDocumentType(in DOMString qualifiedName,
+ in DOMString publicId,
+ in DOMString systemId)
+ raises(DOMException);
+ // Introduced in DOM Level 2:
+ Document createDocument(in DOMString namespaceURI,
+ in DOMString qualifiedName,
+ in DocumentType doctype)
+ raises(DOMException);
+ // Introduced in DOM Level 3:
+ DOMObject getFeature(in DOMString feature,
+ in DOMString version);
+ };
+
+ interface Node {
+
+ // NodeType
+ const unsigned short ELEMENT_NODE = 1;
+ const unsigned short ATTRIBUTE_NODE = 2;
+ const unsigned short TEXT_NODE = 3;
+ const unsigned short CDATA_SECTION_NODE = 4;
+ const unsigned short ENTITY_REFERENCE_NODE = 5;
+ const unsigned short ENTITY_NODE = 6;
+ const unsigned short PROCESSING_INSTRUCTION_NODE = 7;
+ const unsigned short COMMENT_NODE = 8;
+ const unsigned short DOCUMENT_NODE = 9;
+ const unsigned short DOCUMENT_TYPE_NODE = 10;
+ const unsigned short DOCUMENT_FRAGMENT_NODE = 11;
+ const unsigned short NOTATION_NODE = 12;
+
+ readonly attribute DOMString nodeName;
+ attribute DOMString nodeValue;
+ // raises(DOMException) on setting
+ // raises(DOMException) on retrieval
+
+ readonly attribute unsigned short nodeType;
+ readonly attribute Node parentNode;
+ readonly attribute NodeList childNodes;
+ readonly attribute Node firstChild;
+ readonly attribute Node lastChild;
+ readonly attribute Node previousSibling;
+ readonly attribute Node nextSibling;
+ readonly attribute NamedNodeMap attributes;
+ // Modified in DOM Level 2:
+ readonly attribute Document ownerDocument;
+ // Modified in DOM Level 3:
+ Node insertBefore(in Node newChild,
+ in Node refChild)
+ raises(DOMException);
+ // Modified in DOM Level 3:
+ Node replaceChild(in Node newChild,
+ in Node oldChild)
+ raises(DOMException);
+ // Modified in DOM Level 3:
+ Node removeChild(in Node oldChild)
+ raises(DOMException);
+ // Modified in DOM Level 3:
+ Node appendChild(in Node newChild)
+ raises(DOMException);
+ boolean hasChildNodes();
+ Node cloneNode(in boolean deep);
+ // Modified in DOM Level 3:
+ void normalize();
+ // Introduced in DOM Level 2:
+ boolean isSupported(in DOMString feature,
+ in DOMString version);
+ // Introduced in DOM Level 2:
+ readonly attribute DOMString namespaceURI;
+ // Introduced in DOM Level 2:
+ attribute DOMString prefix;
+ // raises(DOMException) on setting
+
+ // Introduced in DOM Level 2:
+ readonly attribute DOMString localName;
+ // Introduced in DOM Level 2:
+ boolean hasAttributes();
+ // Introduced in DOM Level 3:
+ readonly attribute DOMString baseURI;
+
+ // DocumentPosition
+ const unsigned short DOCUMENT_POSITION_DISCONNECTED = 0x01;
+ const unsigned short DOCUMENT_POSITION_PRECEDING = 0x02;
+ const unsigned short DOCUMENT_POSITION_FOLLOWING = 0x04;
+ const unsigned short DOCUMENT_POSITION_CONTAINS = 0x08;
+ const unsigned short DOCUMENT_POSITION_CONTAINED_BY = 0x10;
+ const unsigned short DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = 0x20;
+
+ // Introduced in DOM Level 3:
+ unsigned short compareDocumentPosition(in Node other)
+ raises(DOMException);
+ // Introduced in DOM Level 3:
+ attribute DOMString textContent;
+ // raises(DOMException) on setting
+ // raises(DOMException) on retrieval
+
+ // Introduced in DOM Level 3:
+ boolean isSameNode(in Node other);
+ // Introduced in DOM Level 3:
+ DOMString lookupPrefix(in DOMString namespaceURI);
+ // Introduced in DOM Level 3:
+ boolean isDefaultNamespace(in DOMString namespaceURI);
+ // Introduced in DOM Level 3:
+ DOMString lookupNamespaceURI(in DOMString prefix);
+ // Introduced in DOM Level 3:
+ boolean isEqualNode(in Node arg);
+ // Introduced in DOM Level 3:
+ DOMObject getFeature(in DOMString feature,
+ in DOMString version);
+ // Introduced in DOM Level 3:
+ DOMUserData setUserData(in DOMString key,
+ in DOMUserData data,
+ in UserDataHandler handler);
+ // Introduced in DOM Level 3:
+ DOMUserData getUserData(in DOMString key);
+ };
+
+ interface NodeList {
+ Node item(in unsigned long index);
+ readonly attribute unsigned long length;
+ };
+
+ interface NamedNodeMap {
+ Node getNamedItem(in DOMString name);
+ Node setNamedItem(in Node arg)
+ raises(DOMException);
+ Node removeNamedItem(in DOMString name)
+ raises(DOMException);
+ Node item(in unsigned long index);
+ readonly attribute unsigned long length;
+ // Introduced in DOM Level 2:
+ Node getNamedItemNS(in DOMString namespaceURI,
+ in DOMString localName)
+ raises(DOMException);
+ // Introduced in DOM Level 2:
+ Node setNamedItemNS(in Node arg)
+ raises(DOMException);
+ // Introduced in DOM Level 2:
+ Node removeNamedItemNS(in DOMString namespaceURI,
+ in DOMString localName)
+ raises(DOMException);
+ };
+
+ interface CharacterData : Node {
+ attribute DOMString data;
+ // raises(DOMException) on setting
+ // raises(DOMException) on retrieval
+
+ readonly attribute unsigned long length;
+ DOMString substringData(in unsigned long offset,
+ in unsigned long count)
+ raises(DOMException);
+ void appendData(in DOMString arg)
+ raises(DOMException);
+ void insertData(in unsigned long offset,
+ in DOMString arg)
+ raises(DOMException);
+ void deleteData(in unsigned long offset,
+ in unsigned long count)
+ raises(DOMException);
+ void replaceData(in unsigned long offset,
+ in unsigned long count,
+ in DOMString arg)
+ raises(DOMException);
+ };
+
+ interface Attr : Node {
+ readonly attribute DOMString name;
+ readonly attribute boolean specified;
+ attribute DOMString value;
+ // raises(DOMException) on setting
+
+ // Introduced in DOM Level 2:
+ readonly attribute Element ownerElement;
+ // Introduced in DOM Level 3:
+ readonly attribute TypeInfo schemaTypeInfo;
+ // Introduced in DOM Level 3:
+ readonly attribute boolean isId;
+ };
+
+ interface Element : Node {
+ readonly attribute DOMString tagName;
+ DOMString getAttribute(in DOMString name);
+ void setAttribute(in DOMString name,
+ in DOMString value)
+ raises(DOMException);
+ void removeAttribute(in DOMString name)
+ raises(DOMException);
+ Attr getAttributeNode(in DOMString name);
+ Attr setAttributeNode(in Attr newAttr)
+ raises(DOMException);
+ Attr removeAttributeNode(in Attr oldAttr)
+ raises(DOMException);
+ NodeList getElementsByTagName(in DOMString name);
+ // Introduced in DOM Level 2:
+ DOMString getAttributeNS(in DOMString namespaceURI,
+ in DOMString localName)
+ raises(DOMException);
+ // Introduced in DOM Level 2:
+ void setAttributeNS(in DOMString namespaceURI,
+ in DOMString qualifiedName,
+ in DOMString value)
+ raises(DOMException);
+ // Introduced in DOM Level 2:
+ void removeAttributeNS(in DOMString namespaceURI,
+ in DOMString localName)
+ raises(DOMException);
+ // Introduced in DOM Level 2:
+ Attr getAttributeNodeNS(in DOMString namespaceURI,
+ in DOMString localName)
+ raises(DOMException);
+ // Introduced in DOM Level 2:
+ Attr setAttributeNodeNS(in Attr newAttr)
+ raises(DOMException);
+ // Introduced in DOM Level 2:
+ NodeList getElementsByTagNameNS(in DOMString namespaceURI,
+ in DOMString localName)
+ raises(DOMException);
+ // Introduced in DOM Level 2:
+ boolean hasAttribute(in DOMString name);
+ // Introduced in DOM Level 2:
+ boolean hasAttributeNS(in DOMString namespaceURI,
+ in DOMString localName)
+ raises(DOMException);
+ // Introduced in DOM Level 3:
+ readonly attribute TypeInfo schemaTypeInfo;
+ // Introduced in DOM Level 3:
+ void setIdAttribute(in DOMString name,
+ in boolean isId)
+ raises(DOMException);
+ // Introduced in DOM Level 3:
+ void setIdAttributeNS(in DOMString namespaceURI,
+ in DOMString localName,
+ in boolean isId)
+ raises(DOMException);
+ // Introduced in DOM Level 3:
+ void setIdAttributeNode(in Attr idAttr,
+ in boolean isId)
+ raises(DOMException);
+ };
+
+ interface Text : CharacterData {
+ Text splitText(in unsigned long offset)
+ raises(DOMException);
+ // Introduced in DOM Level 3:
+ readonly attribute boolean isElementContentWhitespace;
+ // Introduced in DOM Level 3:
+ readonly attribute DOMString wholeText;
+ // Introduced in DOM Level 3:
+ Text replaceWholeText(in DOMString content)
+ raises(DOMException);
+ };
+
+ interface Comment : CharacterData {
+ };
+
+ // Introduced in DOM Level 3:
+ interface TypeInfo {
+ readonly attribute DOMString typeName;
+ readonly attribute DOMString typeNamespace;
+
+ // DerivationMethods
+ const unsigned long DERIVATION_RESTRICTION = 0x00000001;
+ const unsigned long DERIVATION_EXTENSION = 0x00000002;
+ const unsigned long DERIVATION_UNION = 0x00000004;
+ const unsigned long DERIVATION_LIST = 0x00000008;
+
+ boolean isDerivedFrom(in DOMString typeNamespaceArg,
+ in DOMString typeNameArg,
+ in unsigned long derivationMethod);
+ };
+
+ // Introduced in DOM Level 3:
+ interface UserDataHandler {
+
+ // OperationType
+ const unsigned short NODE_CLONED = 1;
+ const unsigned short NODE_IMPORTED = 2;
+ const unsigned short NODE_DELETED = 3;
+ const unsigned short NODE_RENAMED = 4;
+ const unsigned short NODE_ADOPTED = 5;
+
+ void handle(in unsigned short operation,
+ in DOMString key,
+ in DOMUserData data,
+ in Node src,
+ in Node dst);
+ };
+
+ // Introduced in DOM Level 3:
+ interface DOMError {
+
+ // ErrorSeverity
+ const unsigned short SEVERITY_WARNING = 1;
+ const unsigned short SEVERITY_ERROR = 2;
+ const unsigned short SEVERITY_FATAL_ERROR = 3;
+
+ readonly attribute unsigned short severity;
+ readonly attribute DOMString message;
+ readonly attribute DOMString type;
+ readonly attribute DOMObject relatedException;
+ readonly attribute DOMObject relatedData;
+ readonly attribute DOMLocator location;
+ };
+
+ // Introduced in DOM Level 3:
+ interface DOMErrorHandler {
+ boolean handleError(in DOMError error);
+ };
+
+ // Introduced in DOM Level 3:
+ interface DOMLocator {
+ readonly attribute long lineNumber;
+ readonly attribute long columnNumber;
+ readonly attribute long byteOffset;
+ readonly attribute long utf16Offset;
+ readonly attribute Node relatedNode;
+ readonly attribute DOMString uri;
+ };
+
+ // Introduced in DOM Level 3:
+ interface DOMConfiguration {
+ void setParameter(in DOMString name,
+ in DOMUserData value)
+ raises(DOMException);
+ DOMUserData getParameter(in DOMString name)
+ raises(DOMException);
+ boolean canSetParameter(in DOMString name,
+ in DOMUserData value);
+ readonly attribute DOMStringList parameterNames;
+ };
+
+ interface CDATASection : Text {
+ };
+
+ interface DocumentType : Node {
+ readonly attribute DOMString name;
+ readonly attribute NamedNodeMap entities;
+ readonly attribute NamedNodeMap notations;
+ // Introduced in DOM Level 2:
+ readonly attribute DOMString publicId;
+ // Introduced in DOM Level 2:
+ readonly attribute DOMString systemId;
+ // Introduced in DOM Level 2:
+ readonly attribute DOMString internalSubset;
+ };
+
+ interface Notation : Node {
+ readonly attribute DOMString publicId;
+ readonly attribute DOMString systemId;
+ };
+
+ interface Entity : Node {
+ readonly attribute DOMString publicId;
+ readonly attribute DOMString systemId;
+ readonly attribute DOMString notationName;
+ // Introduced in DOM Level 3:
+ readonly attribute DOMString inputEncoding;
+ // Introduced in DOM Level 3:
+ readonly attribute DOMString xmlEncoding;
+ // Introduced in DOM Level 3:
+ readonly attribute DOMString xmlVersion;
+ };
+
+ interface EntityReference : Node {
+ };
+
+ interface ProcessingInstruction : Node {
+ readonly attribute DOMString target;
+ attribute DOMString data;
+ // raises(DOMException) on setting
+
+ };
+
+ interface DocumentFragment : Node {
+ };
+
+ interface Document : Node {
+ // Modified in DOM Level 3:
+ readonly attribute DocumentType doctype;
+ readonly attribute DOMImplementation implementation;
+ readonly attribute Element documentElement;
+ Element createElement(in DOMString tagName)
+ raises(DOMException);
+ DocumentFragment createDocumentFragment();
+ Text createTextNode(in DOMString data);
+ Comment createComment(in DOMString data);
+ CDATASection createCDATASection(in DOMString data)
+ raises(DOMException);
+ ProcessingInstruction createProcessingInstruction(in DOMString target,
+ in DOMString data)
+ raises(DOMException);
+ Attr createAttribute(in DOMString name)
+ raises(DOMException);
+ EntityReference createEntityReference(in DOMString name)
+ raises(DOMException);
+ NodeList getElementsByTagName(in DOMString tagname);
+ // Introduced in DOM Level 2:
+ Node importNode(in Node importedNode,
+ in boolean deep)
+ raises(DOMException);
+ // Introduced in DOM Level 2:
+ Element createElementNS(in DOMString namespaceURI,
+ in DOMString qualifiedName)
+ raises(DOMException);
+ // Introduced in DOM Level 2:
+ Attr createAttributeNS(in DOMString namespaceURI,
+ in DOMString qualifiedName)
+ raises(DOMException);
+ // Introduced in DOM Level 2:
+ NodeList getElementsByTagNameNS(in DOMString namespaceURI,
+ in DOMString localName);
+ // Introduced in DOM Level 2:
+ Element getElementById(in DOMString elementId);
+ // Introduced in DOM Level 3:
+ readonly attribute DOMString inputEncoding;
+ // Introduced in DOM Level 3:
+ readonly attribute DOMString xmlEncoding;
+ // Introduced in DOM Level 3:
+ attribute boolean xmlStandalone;
+ // raises(DOMException) on setting
+
+ // Introduced in DOM Level 3:
+ attribute DOMString xmlVersion;
+ // raises(DOMException) on setting
+
+ // Introduced in DOM Level 3:
+ attribute boolean strictErrorChecking;
+ // Introduced in DOM Level 3:
+ attribute DOMString documentURI;
+ // Introduced in DOM Level 3:
+ Node adoptNode(in Node source)
+ raises(DOMException);
+ // Introduced in DOM Level 3:
+ readonly attribute DOMConfiguration domConfig;
+ // Introduced in DOM Level 3:
+ void normalizeDocument();
+ // Introduced in DOM Level 3:
+ Node renameNode(in Node n,
+ in DOMString namespaceURI,
+ in DOMString qualifiedName)
+ raises(DOMException);
+ };
+};
+
+#endif // _DOM_IDL_
+
diff --git a/src/dom/work/events.idl b/src/dom/work/events.idl
new file mode 100644
index 000000000..5773dcaf6
--- /dev/null
+++ b/src/dom/work/events.idl
@@ -0,0 +1,298 @@
+/*
+ * Copyright (c) 2003 World Wide Web Consortium,
+ *
+ * (Massachusetts Institute of Technology, European Research Consortium for
+ * Informatics and Mathematics, Keio University). All Rights Reserved. This
+ * work is distributed under the W3C(r) Software License [1] 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.
+ *
+ * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+ */
+
+// File: http://www.w3.org/TR/2003/NOTE-DOM-Level-3-Events-20031107/events.idl
+
+#ifndef _EVENTS_IDL_
+#define _EVENTS_IDL_
+
+#include "dom.idl"
+#include "views.idl"
+
+#pragma prefix "dom.w3c.org"
+module events
+{
+
+ typedef dom::DOMString DOMString;
+ typedef dom::DOMTimeStamp DOMTimeStamp;
+ typedef dom::DOMObject DOMObject;
+ typedef dom::Node Node;
+
+ interface EventTarget;
+ interface EventListener;
+
+ // Introduced in DOM Level 2:
+ exception EventException {
+ unsigned short code;
+ };
+ // EventExceptionCode
+ const unsigned short UNSPECIFIED_EVENT_TYPE_ERR = 0;
+ // Introduced in DOM Level 3:
+ const unsigned short DISPATCH_REQUEST_ERR = 1;
+
+
+ // Introduced in DOM Level 2:
+ interface Event {
+
+ // PhaseType
+ const unsigned short CAPTURING_PHASE = 1;
+ const unsigned short AT_TARGET = 2;
+ const unsigned short BUBBLING_PHASE = 3;
+
+ readonly attribute DOMString type;
+ readonly attribute EventTarget target;
+ readonly attribute EventTarget currentTarget;
+ readonly attribute unsigned short eventPhase;
+ readonly attribute boolean bubbles;
+ readonly attribute boolean cancelable;
+ readonly attribute DOMTimeStamp timeStamp;
+ void stopPropagation();
+ void preventDefault();
+ void initEvent(in DOMString eventTypeArg,
+ in boolean canBubbleArg,
+ in boolean cancelableArg);
+ // Introduced in DOM Level 3:
+ readonly attribute DOMString namespaceURI;
+ // Introduced in DOM Level 3:
+ boolean isCustom();
+ // Introduced in DOM Level 3:
+ void stopImmediatePropagation();
+ // Introduced in DOM Level 3:
+ boolean isDefaultPrevented();
+ // Introduced in DOM Level 3:
+ void initEventNS(in DOMString namespaceURIArg,
+ in DOMString eventTypeArg,
+ in boolean canBubbleArg,
+ in boolean cancelableArg);
+ };
+
+ // Introduced in DOM Level 2:
+ interface EventTarget {
+ void addEventListener(in DOMString type,
+ in EventListener listener,
+ in boolean useCapture);
+ void removeEventListener(in DOMString type,
+ in EventListener listener,
+ in boolean useCapture);
+ // Modified in DOM Level 3:
+ boolean dispatchEvent(in Event evt)
+ raises(EventException);
+ // Introduced in DOM Level 3:
+ void addEventListenerNS(in DOMString namespaceURI,
+ in DOMString type,
+ in EventListener listener,
+ in boolean useCapture,
+ in DOMObject evtGroup);
+ // Introduced in DOM Level 3:
+ void removeEventListenerNS(in DOMString namespaceURI,
+ in DOMString type,
+ in EventListener listener,
+ in boolean useCapture);
+ // Introduced in DOM Level 3:
+ boolean willTriggerNS(in DOMString namespaceURI,
+ in DOMString type);
+ // Introduced in DOM Level 3:
+ boolean hasEventListenerNS(in DOMString namespaceURI,
+ in DOMString type);
+ };
+
+ // Introduced in DOM Level 2:
+ interface EventListener {
+ void handleEvent(in Event evt);
+ };
+
+ // Introduced in DOM Level 2:
+ interface DocumentEvent {
+ Event createEvent(in DOMString eventType)
+ raises(dom::DOMException);
+ // Introduced in DOM Level 3:
+ boolean canDispatch(in DOMString namespaceURI,
+ in DOMString type);
+ };
+
+ // Introduced in DOM Level 3:
+ interface CustomEvent : Event {
+ void setDispatchState(in EventTarget target,
+ in unsigned short phase);
+ boolean isPropagationStopped();
+ boolean isImmediatePropagationStopped();
+ };
+
+ // Introduced in DOM Level 2:
+ interface UIEvent : Event {
+ readonly attribute views::AbstractView view;
+ readonly attribute long detail;
+ void initUIEvent(in DOMString typeArg,
+ in boolean canBubbleArg,
+ in boolean cancelableArg,
+ in views::AbstractView viewArg,
+ in long detailArg);
+ // Introduced in DOM Level 3:
+ void initUIEventNS(in DOMString namespaceURI,
+ in DOMString typeArg,
+ in boolean canBubbleArg,
+ in boolean cancelableArg,
+ in views::AbstractView viewArg,
+ in long detailArg);
+ };
+
+ // Introduced in DOM Level 3:
+ interface TextEvent : UIEvent {
+ readonly attribute DOMString data;
+ void initTextEvent(in DOMString typeArg,
+ in boolean canBubbleArg,
+ in boolean cancelableArg,
+ in views::AbstractView viewArg,
+ in DOMString dataArg);
+ void initTextEventNS(in DOMString namespaceURI,
+ in DOMString type,
+ in boolean canBubbleArg,
+ in boolean cancelableArg,
+ in views::AbstractView viewArg,
+ in DOMString dataArg);
+ };
+
+ // Introduced in DOM Level 2:
+ interface MouseEvent : UIEvent {
+ readonly attribute long screenX;
+ readonly attribute long screenY;
+ readonly attribute long clientX;
+ readonly attribute long clientY;
+ readonly attribute boolean ctrlKey;
+ readonly attribute boolean shiftKey;
+ readonly attribute boolean altKey;
+ readonly attribute boolean metaKey;
+ readonly attribute unsigned short button;
+ readonly attribute EventTarget relatedTarget;
+ void initMouseEvent(in DOMString typeArg,
+ in boolean canBubbleArg,
+ in boolean cancelableArg,
+ in views::AbstractView viewArg,
+ in long detailArg,
+ in long screenXArg,
+ in long screenYArg,
+ in long clientXArg,
+ in long clientYArg,
+ in boolean ctrlKeyArg,
+ in boolean altKeyArg,
+ in boolean shiftKeyArg,
+ in boolean metaKeyArg,
+ in unsigned short buttonArg,
+ in EventTarget relatedTargetArg);
+ // Introduced in DOM Level 3:
+ boolean getModifierState(in DOMString keyIdentifierArg);
+ // Introduced in DOM Level 3:
+ void initMouseEventNS(in DOMString namespaceURI,
+ in DOMString typeArg,
+ in boolean canBubbleArg,
+ in boolean cancelableArg,
+ in views::AbstractView viewArg,
+ in long detailArg,
+ in long screenXArg,
+ in long screenYArg,
+ in long clientXArg,
+ in long clientYArg,
+ in unsigned short buttonArg,
+ in EventTarget relatedTargetArg,
+ in DOMString modifiersList);
+ };
+
+ // Introduced in DOM Level 3:
+ interface KeyboardEvent : UIEvent {
+
+ // KeyLocationCode
+ const unsigned long DOM_KEY_LOCATION_STANDARD = 0x00;
+ const unsigned long DOM_KEY_LOCATION_LEFT = 0x01;
+ const unsigned long DOM_KEY_LOCATION_RIGHT = 0x02;
+ const unsigned long DOM_KEY_LOCATION_NUMPAD = 0x03;
+
+ readonly attribute DOMString keyIdentifier;
+ readonly attribute unsigned long keyLocation;
+ readonly attribute boolean ctrlKey;
+ readonly attribute boolean shiftKey;
+ readonly attribute boolean altKey;
+ readonly attribute boolean metaKey;
+ boolean getModifierState(in DOMString keyIdentifierArg);
+ void initKeyboardEvent(in DOMString typeArg,
+ in boolean canBubbleArg,
+ in boolean cancelableArg,
+ in views::AbstractView viewArg,
+ in DOMString keyIdentifierArg,
+ in unsigned long keyLocationArg,
+ in DOMString modifiersList);
+ void initKeyboardEventNS(in DOMString namespaceURI,
+ in DOMString typeArg,
+ in boolean canBubbleArg,
+ in boolean cancelableArg,
+ in views::AbstractView viewArg,
+ in DOMString keyIdentifierArg,
+ in unsigned long keyLocationArg,
+ in DOMString modifiersList);
+ };
+
+ // Introduced in DOM Level 2:
+ interface MutationEvent : Event {
+
+ // attrChangeType
+ const unsigned short MODIFICATION = 1;
+ const unsigned short ADDITION = 2;
+ const unsigned short REMOVAL = 3;
+
+ readonly attribute Node relatedNode;
+ readonly attribute DOMString prevValue;
+ readonly attribute DOMString newValue;
+ readonly attribute DOMString attrName;
+ readonly attribute unsigned short attrChange;
+ void initMutationEvent(in DOMString typeArg,
+ in boolean canBubbleArg,
+ in boolean cancelableArg,
+ in Node relatedNodeArg,
+ in DOMString prevValueArg,
+ in DOMString newValueArg,
+ in DOMString attrNameArg,
+ in unsigned short attrChangeArg);
+ // Introduced in DOM Level 3:
+ void initMutationEventNS(in DOMString namespaceURI,
+ in DOMString typeArg,
+ in boolean canBubbleArg,
+ in boolean cancelableArg,
+ in Node relatedNodeArg,
+ in DOMString prevValueArg,
+ in DOMString newValueArg,
+ in DOMString attrNameArg,
+ in unsigned short attrChangeArg);
+ };
+
+ // Introduced in DOM Level 3:
+ interface MutationNameEvent : MutationEvent {
+ readonly attribute DOMString prevNamespaceURI;
+ readonly attribute DOMString prevNodeName;
+ // Introduced in DOM Level 3:
+ void initMutationNameEvent(in DOMString typeArg,
+ in boolean canBubbleArg,
+ in boolean cancelableArg,
+ in Node relatedNodeArg,
+ in DOMString prevNamespaceURIArg,
+ in DOMString prevNodeNameArg);
+ // Introduced in DOM Level 3:
+ void initMutationNameEventNS(in DOMString namespaceURI,
+ in DOMString typeArg,
+ in boolean canBubbleArg,
+ in boolean cancelableArg,
+ in Node relatedNodeArg,
+ in DOMString prevNamespaceURIArg,
+ in DOMString prevNodeNameArg);
+ };
+};
+
+#endif // _EVENTS_IDL_
+
diff --git a/src/dom/work/inkscape.css b/src/dom/work/inkscape.css
new file mode 100644
index 000000000..e73b15038
--- /dev/null
+++ b/src/dom/work/inkscape.css
@@ -0,0 +1,493 @@
+/*
+* CSS for Inkscape Website (http://www.inkscape.org/)
+*
+* By: Tom von Schwerdtner | Etria LLP (http://www.etria.com/)
+*
+*/
+
+body {
+ color: #000000;
+ background: #ffffff;
+ padding: 0px;
+ margin: 0px;
+ font-family: arial, Helvetica, 'Bitstream Vera Sans', 'Luxi Sans', Verdana, Sans-Serif;
+ font-size: 80%;
+}
+
+a:link, a:visited, a:hover {
+ font-weight: bold;
+ color: #0081ac;
+ text-decoration: none;
+}
+
+a:hover {
+ text-decoration: underline;
+}
+
+a:visited {
+ color: #ac0011;
+}
+
+div.top {
+ background:#0081ac;
+ width: 100%;
+ height: 100px;
+ border-bottom: 1px black solid;
+}
+
+div.top a.logo,
+div.top a.logo:link,
+div.top a.logo:hover,
+div.top a.logo:visited
+ {
+ color: #ffffff;
+ background: transparent;
+ border: none;
+ text-decoration: none;
+}
+
+div.top h1 {
+ color: #ffffff;
+ background: transparent;
+ font-size: 40px;
+ font-family: arial;
+ margin: 0px;
+ padding: 20px;
+ float: left;
+}
+
+img.logo {
+ float: right;
+ border: none;
+}
+
+#menu {
+ float: left;
+ border: 1px #999999 solid;
+ width: 150px;
+ margin-left: 10px;
+ margin-top: 10px;
+ margin-bottom: 10px;
+}
+
+#menu ul {
+ list-style: none;
+ padding: 0px;
+ margin: 0px;
+}
+
+#menu li.sub {
+ color: #000000;
+ background: #d6d6d6;
+ font-weight: bold;
+ padding: 0px;
+}
+
+#menu .title {
+ padding: 4px;
+ text-align: center;
+}
+
+#menu ul.sub {
+ padding: 0px;
+ margin: 0px;
+ border-top: 1px #999999 solid;
+ border-bottom: 1px #999999 solid;
+ list-style: none;
+}
+
+#menu li a {
+ display: block;
+ background: #f0f0f0;
+ color: #0081ac;
+ border-top: 1px #d6d6d6 solid;
+ border-bottom: 1px #d6d6d6 solid;
+ margin: 0px;
+ padding: 4px;
+ padding-left: 10px;
+ width: 100%;
+}
+#menu li a:visited {
+ color: #0081ac;
+}
+
+html>body #menu li a {
+ width: auto;
+}
+
+#menu li.item a:hover, ul.sub li.item a:hover {
+ display: block;
+ background: #ac0011;
+ /*background: #DC878F;*/
+ color: #ffffff;
+ border-top: 1px #6F000B solid;
+ border-bottom: 1px #6F000B solid;
+ text-decoration: none;
+}
+
+#sourceforge {
+ text-align: center;
+ border: none;
+}
+
+html>body #sourceforge {
+ width: auto;
+}
+
+div.content {
+ padding: 20px;
+
+ /* this is a hack */
+ margin-left: 160px;
+ margin-right: 20px;
+}
+
+
+#skipnav {
+ display: none;
+}
+
+#togglecss {
+ position: absolute;
+ top: 110px;
+ right: 10px;
+}
+
+div.news {
+}
+
+div.news div.item {
+}
+
+div.news div.item img {
+ margin: 10px;
+}
+
+div.news div.item img.right {
+ float: right;
+ margin-right: 0px;
+}
+
+div.news div.item img.left {
+ float: left;
+ margin-left: 0px;
+}
+
+img.thumb {
+ border: 1px #999999 solid;
+}
+
+div.news div.item h3 {
+ font-weight: bold;
+ border-left: 10px #999999 solid;
+ padding-left: 4px;
+ margin-bottom: 4px;
+
+ clear: right;
+}
+
+div.news div.item p {
+ margin-top: 0px;
+ margin-left: 20px;
+ margin-right: 20px;
+}
+
+p {
+ text-align: justify;
+}
+
+h2 {
+ border-bottom: 1px #000000 solid;
+ clear: right;
+}
+
+pre {
+ border: 1px #006F02 solid;
+ background: #B0E4AE;
+ padding: 4px;
+}
+
+
+/* File Releases */
+
+div.rss-files {
+}
+
+div.rss-files div.file {
+ background: #f0f0f0;
+ color: #000000;
+ border: 1px #999999 solid;
+ padding: 2px;
+ margin: 20px;
+}
+
+div.rss-files div.file div.title {
+ font-weight: bold;
+ padding: 4px;
+ padding-top: 2px;
+}
+div.rss-files div.file div.description {
+ font-weight: normal;
+ border: 1px #999999 solid;
+ background: #ffffff;
+ color: #000000;
+ padding: 4px;
+}
+
+#footer {
+ text-align: center;
+ width: 100%;
+ border-top: 1px #000000 solid;
+ border-bottom: 1px #000000 solid;
+ padding-top: 4px;
+ padding-bottom: 4px;
+ background:#0081AC;
+ color: #ffffff;
+ clear: both;
+}
+
+#footer img {
+ border: none;
+}
+
+#footer a {
+ color: white;
+}
+/* We are overriding some earlier styles here, so this needs to be at the end
+ */
+/*
+a.external:link,
+a.external:visited,
+a.external:hover,
+#menu li a.external,
+#menu li a.external:hover
+{
+ background-image: url('/images/globe.png');
+ background-repeat: no-repeat;
+ background-position: center right;
+ padding-right: 18px;
+}
+*/
+
+/* Doxygen Specific */
+
+div.doxygen {
+}
+
+div.doxygen pre {
+ background: #F8F8C6;
+ background: #fffff0;
+ color: #000000;
+ border: 1px #808000 solid;
+}
+
+div.doxygen pre a:hover {
+}
+
+div.doxygen pre .preprocessor {
+ font-weight: bold;
+ color: #006809;
+}
+
+div.doxygen pre .keyword {
+ color: #68005F;
+}
+
+div.doxygen pre .keywordflow {
+ color: #120053;
+ font-weight: bold;
+}
+
+div.doxygen pre .keywordtype {
+ font-weight: bold;
+ color: #495300;
+}
+
+div.doxygen pre .comment {
+ font-style: italic;
+ font-weight: bold;
+}
+
+
+
+
+table {
+
+ margin-left: auto;
+ margin-right: auto;
+ width: 100%;
+
+ clear: none;
+
+ border-collapse: collapse;
+
+
+ background: none;
+
+
+/* font-family: Arial, Helvetica, 'Bitstream Vera Sans', 'Luxi Sans', Verdana, Sans-Serif; */
+ font-size: 13px;
+
+}
+
+td {
+ padding: 8px;
+ vertical-align: top;
+}
+
+
+table.roadmap {
+ background: #eee;
+}
+
+table.roadmap td {
+
+ border: 1px solid #999;
+ /* width: 50%; */
+
+
+}
+
+tr.header {
+ font-weight: bold;
+ background: #ddd;
+}
+
+td.title {
+ text-align: center;
+ font-size: 16px;
+ font-weight: bold;
+ background: #ddd;
+}
+
+
+
+img.float {
+ float: right;
+
+ margin-top: 7px;
+ margin-left: 10px;
+ /* margin-right: 10px; */
+ margin-bottom: 10px;
+}
+
+
+
+/*@import: url(wiki.css)*/
+
+
+
+/* FORM STUFF */
+
+SELECT, option, textarea, input {
+
+ color: #000000;
+ font-size: 10px;
+ text-decoration: none;
+ background: white;
+ border: 1px solid #666666;
+
+ margin: 2px 0px 2px 0;
+ padding: 2px;
+
+}
+
+/* now make them all have nice hovers */
+
+
+
+SELECT:hover, option:hover, textarea:hover, input:hover {
+ background: #ddd;
+}
+
+
+form.search {
+ /*display: inline;
+ background: #f0f0f0;
+ */
+
+ text-align: center;
+
+ display: block;
+ background: #f0f0f0;
+ color: #0081ac;
+ border-top: 1px #d6d6d6 solid;
+ border-bottom: 1px #d6d6d6 solid;
+ margin: 0px;
+ padding: 4px;
+ padding-left: 10px;
+
+
+}
+
+form.search:hover {
+ background: #ac0011;
+}
+
+
+
+#post_news input
+{
+ width: 35%;
+}
+
+#post_news textarea
+{
+ width: 100%;
+ height: 150px;
+}
+
+input#login,
+#post_news input#preview,
+#post_news input#save,
+#post_news input#reset
+{
+ width: 100px;
+}
+
+
+#post_news table
+{
+ padding: 0;
+}
+
+#post_news td
+{
+ padding-left: 0;
+}
+#post_news table tr td.header
+{
+ width: 10%;
+ font-weight: bold;
+}
+
+.alert
+{
+ color: red;
+}
+
+
+div.alert
+{
+ border: 1px solid red;
+ padding: 8px;
+}
+
+.preview,
+.message
+{
+ border: 1px solid #ccc;
+ padding: 8px;
+}
+
+
+#navbar
+{
+ padding: 8px;
+ background: #ccc;
+}
+
+#navbar a
+{
+ padding-right: 12px;
+}
diff --git a/src/dom/work/ls.idl b/src/dom/work/ls.idl
new file mode 100644
index 000000000..db53ab79c
--- /dev/null
+++ b/src/dom/work/ls.idl
@@ -0,0 +1,171 @@
+/*
+ * Copyright (c) 2004 World Wide Web Consortium,
+ *
+ * (Massachusetts Institute of Technology, European Research Consortium for
+ * Informatics and Mathematics, Keio University). All Rights Reserved. This
+ * work is distributed under the W3C(r) Software License [1] 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.
+ *
+ * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+ */
+
+// File: http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/ls.idl
+
+#ifndef _LS_IDL_
+#define _LS_IDL_
+
+#include "dom.idl"
+#include "events.idl"
+#include "traversal.idl"
+
+#pragma prefix "dom.w3c.org"
+module ls
+{
+
+ typedef Object LSInputStream;
+
+ typedef Object LSOutputStream;
+
+ typedef Object LSReader;
+
+ typedef Object LSWriter;
+
+ typedef dom::DOMString DOMString;
+ typedef dom::DOMConfiguration DOMConfiguration;
+ typedef dom::Node Node;
+ typedef dom::Document Document;
+ typedef dom::Element Element;
+
+ interface LSParser;
+ interface LSSerializer;
+ interface LSInput;
+ interface LSOutput;
+ interface LSParserFilter;
+ interface LSSerializerFilter;
+
+ exception LSException {
+ unsigned short code;
+ };
+ // LSExceptionCode
+ const unsigned short PARSE_ERR = 81;
+ const unsigned short SERIALIZE_ERR = 82;
+
+
+ interface DOMImplementationLS {
+
+ // DOMImplementationLSMode
+ const unsigned short MODE_SYNCHRONOUS = 1;
+ const unsigned short MODE_ASYNCHRONOUS = 2;
+
+ LSParser createLSParser(in unsigned short mode,
+ in DOMString schemaType)
+ raises(dom::DOMException);
+ LSSerializer createLSSerializer();
+ LSInput createLSInput();
+ LSOutput createLSOutput();
+ };
+
+ interface LSParser {
+ readonly attribute DOMConfiguration domConfig;
+ attribute LSParserFilter filter;
+ readonly attribute boolean async;
+ readonly attribute boolean busy;
+ Document parse(in LSInput input)
+ raises(dom::DOMException,
+ LSException);
+ Document parseURI(in DOMString uri)
+ raises(dom::DOMException,
+ LSException);
+
+ // ACTION_TYPES
+ const unsigned short ACTION_APPEND_AS_CHILDREN = 1;
+ const unsigned short ACTION_REPLACE_CHILDREN = 2;
+ const unsigned short ACTION_INSERT_BEFORE = 3;
+ const unsigned short ACTION_INSERT_AFTER = 4;
+ const unsigned short ACTION_REPLACE = 5;
+
+ Node parseWithContext(in LSInput input,
+ in Node contextArg,
+ in unsigned short action)
+ raises(dom::DOMException,
+ LSException);
+ void abort();
+ };
+
+ interface LSInput {
+ // Depending on the language binding in use,
+ // this attribute may not be available.
+ attribute LSReader characterStream;
+ attribute LSInputStream byteStream;
+ attribute DOMString stringData;
+ attribute DOMString systemId;
+ attribute DOMString publicId;
+ attribute DOMString baseURI;
+ attribute DOMString encoding;
+ attribute boolean certifiedText;
+ };
+
+ interface LSResourceResolver {
+ LSInput resolveResource(in DOMString type,
+ in DOMString namespaceURI,
+ in DOMString publicId,
+ in DOMString systemId,
+ in DOMString baseURI);
+ };
+
+ interface LSParserFilter {
+
+ // Constants returned by startElement and acceptNode
+ const short FILTER_ACCEPT = 1;
+ const short FILTER_REJECT = 2;
+ const short FILTER_SKIP = 3;
+ const short FILTER_INTERRUPT = 4;
+
+ unsigned short startElement(in Element elementArg);
+ unsigned short acceptNode(in Node nodeArg);
+ readonly attribute unsigned long whatToShow;
+ };
+
+ interface LSSerializer {
+ readonly attribute DOMConfiguration domConfig;
+ attribute DOMString newLine;
+ attribute LSSerializerFilter filter;
+ boolean write(in Node nodeArg,
+ in LSOutput destination)
+ raises(LSException);
+ boolean writeToURI(in Node nodeArg,
+ in DOMString uri)
+ raises(LSException);
+ DOMString writeToString(in Node nodeArg)
+ raises(dom::DOMException,
+ LSException);
+ };
+
+ interface LSOutput {
+ // Depending on the language binding in use,
+ // this attribute may not be available.
+ attribute LSWriter characterStream;
+ attribute LSOutputStream byteStream;
+ attribute DOMString systemId;
+ attribute DOMString encoding;
+ };
+
+ interface LSProgressEvent : events::Event {
+ readonly attribute LSInput input;
+ readonly attribute unsigned long position;
+ readonly attribute unsigned long totalSize;
+ };
+
+ interface LSLoadEvent : events::Event {
+ readonly attribute Document newDocument;
+ readonly attribute LSInput input;
+ };
+
+ interface LSSerializerFilter : traversal::NodeFilter {
+ readonly attribute unsigned long whatToShow;
+ };
+};
+
+#endif // _LS_IDL_
+
diff --git a/src/dom/work/meyerweb.css b/src/dom/work/meyerweb.css
new file mode 100644
index 000000000..9cce6b65e
--- /dev/null
+++ b/src/dom/work/meyerweb.css
@@ -0,0 +1,181 @@
+@import url(skel.css);
+
+/* generics */
+
+* {font-size: 100%; padding: 0; margin: 0;}
+body {font: 0.84em/1.333 Arial, sans-serif; margin: 0; padding: 0;
+ color: #202020; background: #FFF;
+ min-width: 40em; margin: 0 auto;}
+a:link {color: #339;}
+a:visited {color: #848;}
+a img {border: none;}
+h1 {font-size: 2em; margin: 2em 0 0.5em; padding: 0.25em 0;}
+h2 {font-size: 1.5em; margin: 2em 0 0.33em; padding: 0.25em 0;}
+h3 {font-size: 1.33em; margin: 2em 0 0.25em; padding: 0.125em 0;}
+h4 {font-size: 1.1em; margin: 0.5em 0 0;}
+h5 {font-size: 1em; margin: 0.5em 0 0;}
+h6 {font-size: 0.85em; margin: 0.5em 0 0;}
+p {margin: 0.33em 0 1em 0;}
+ul, ol {margin: 1em 0; padding-left: 2.5em;}
+dt {margin: 0.5em 0 0;}
+dd {margin: 0.25em 0 0.5em 2.5em;}
+pre, code, tt {font: 110% "Andale Mono", Courier, "Courier New", monospace;}
+small {font-size: 85%;}
+big {font-size: 115%;}
+sup {font-size: smaller; vertical-align: 0.5em; line-height: 1px;}
+img.pic {float: right; position: relative; margin: 0.25em 0 0.66em 1.5em;}
+img.border {border: 3px double;}
+img.standalone {display: block; margin: 0.5em auto; width: auto; max-width: 100%;}
+p.standalone {text-align: center;}
+p.standalone img {display: inline;}
+.warning {background: #FF8; color: red; border: 2px solid; padding: 1em;}
+.highlight {background: #B4D5FF; font-weight: bold;}
+
+table.chart {margin: 1em auto;}
+table.chart caption {font-weight: bold; font-style: italic; font-size: 90%;}
+table.chart th {text-align: left;}
+table.chart thead th {border-bottom: 1px solid #CCC;}
+table.chart th, table.chart td {border-bottom: 1px dotted #DDD;}
+table.chart tbody th {padding-right: 1em;}
+
+/* masthead */
+
+#sitemast {padding: 0; margin: 0; overflow: hidden; border-bottom: 1px solid #000;
+ height: 128px; width: 100%; position: relative; z-index: 1;}
+#sitemast h1 {font-size: 2em; line-height: 1em; letter-spacing: 0.13em;
+ padding: 0; margin: 0;
+ position: absolute; left: 0; top: 100px;
+ /* hide-from-IE5/Mac hack \*/
+ top: auto; bottom: 0;
+ /* end hack */}
+#sitemast h1 a {padding: 0 0.25em;}
+#sitemast h1 a, .panel a {text-decoration: none;}
+
+/* main content */
+
+#main {margin: 2.25em 20em 0 12em; padding: 3.5em 0;
+ min-height: 30em;}
+#main h2 {border-bottom: 1px solid #888; margin: 0; padding: 0;
+ font-size: 1.75em; line-height: 1;}
+#main p.contact {margin: 0 1em; text-align: right; font-size: 90%;}
+
+#main p {line-height: 1.4;}
+#main li {line-height: 1.33; margin-bottom: 0.33em;}
+#main .compact li {line-height: normal; margin-bottom: 0;}
+#main ul li {list-style: square;}
+#main ol li {list-style: decimal;}
+
+#main blockquote {font-style: normal; margin: 1em 1em 1em 2em;}
+#main blockquote em {font-style: italic; font-weight: inherit;}
+#main blockquote p {margin: 0.33em 2.5% 0.33em 0 !important;
+ line-height: 1.2; text-indent: 2em;}
+#main blockquote.book p {margin: 0 2.5% 0 0 !important;}
+#main blockquote.lyric {font-style: italic; white-space: pre;
+ border: none; margin-left: 1em;}
+#main blockquote.lyric p {text-indent: 0;}
+.quoteattrib {margin: -0.75em 3em 0.66em; font-size: 87.5%;}
+.quoteattrib cite {font-style: italic;}
+
+/* search bits */
+
+#search {position: absolute; top: 129px; right: 0;
+ z-index: 10;
+ text-align: right; padding: 0.25em 0 1.25em 5px;
+ background: url(pix/logoogle2.gif) no-repeat 0% 100%;}
+#search h4 {display: none;}
+#search form {margin: 0; padding: 2px 1em 0;}
+#search input[type="text"] {width: 14em; border: 2px inset #999;}
+#search small {display: block; margin: 0 1.25em; padding: 0;
+ text-align: right; line-height: 1;}
+#search small a {background: #FFF; color: #668; font-style: italic;}
+
+/* navbar */
+
+#navigate {position: absolute; top: 129px; left: 0; right: 0;
+ padding: 0.25em 0 0.25em 1em;
+ z-index: 1; overflow: hidden;
+ height: auto; width: 85%; line-height: 2;}
+#navigate h4 {display: none;}
+#navigate ul, #navigate li {margin: 0; padding: 0;}
+#navigate ul {padding-left: 0.5em;}
+
+#navlinks {float: left; width: 100%;}
+#navlinks a {text-decoration: none;}
+#navlinks li {float: left; list-style: none; margin-left: 1px;}
+#navlinks li a {padding: 0.25em 1em; margin-right: 0.125em;
+ border-top: 0.75em solid #AAC; border-bottom: 1px dotted #FFF;
+ font-weight: bold; color: #668;}
+#navlinks li ul {display: none; border: none;}
+#navlinks li li a {font-weight: normal;}
+#navlinks a:hover {border-top-color: #88A;}
+#navlinks #otherLink {margin-left: 1.75em;}
+
+.arch #archLink a,
+.css #cssLink a,
+.tools #toolsLink a,
+.write #writeLink a,
+.speak #speakLink a,
+.other #otherLink a
+{border-color: #226 #FFF #FFF; background: #CCE; color: #226; font-style: italic;}
+
+/* 'sidebar' */
+
+#extra {position: absolute; top: 129px; right: 0; z-index: 100; width: 18em;
+ font-size: 1em; line-height: 1.2;
+ padding: 1.75em 0 0; margin: 3em 0 0;
+ color: #5A5A5F;}
+#extra a:link {color: #66A;}
+#extra a:visited {color: #858;}
+
+#extra .panel {margin: 1em 0 0; padding: 1em 1em 0 3em; border: 1px dotted #FFF;}
+#extra .panel h4, #extra .panel h5 {margin: 0 0 0.25em; padding: 0 0.5em 0 0;
+ font-size: 90%; line-height: 1;
+ border-bottom: 1px solid #AAA;}
+#extra .panel ul {list-style: none; margin: 0 1em 0 0; padding: 0; font-size: 90%;}
+#extra .panel li {margin-left: 1em; text-indent: -1em;}
+#extra .panel .more {float: right; margin: -1.5em 1px 0 0.5em;
+ font-style: italic; text-align: right; font-size: smaller;}
+#extra .panel .more a {padding-left: 15px; background: url(pix/morearr.gif) 0 66% no-repeat;}
+
+#extra #blogroll h5 {padding-right: 95px;}
+#extra #blogroll ul {margin: 0.5em 1em 0 0;}
+#extra #xfn-btn {float: right; margin: -20px 1px 0 5px;}
+
+#extra #excuse {text-align: center; padding: 0 0.25em 0.66em; margin: 2em 1em -2em 3em;
+ border: 1px solid #CCC;}
+#extra #excuse h4 {display: inline; position: relative; top: -0.6em;
+ border: 0; padding: 0 0.25em; margin: 0;
+ background: #FFF; color: #666;
+ text-transform: capitalize; font-size: 1em; font-weight: normal;}
+#extra #excuse p {margin: 0; padding: 0; color: #444;}
+
+#extra #extras {padding: 1em 0.5em 1em; margin: 2em 1em 0 3em; width: 13em;
+ color: #666; border: 1px solid #AAA; border-width: 1px 0;}
+#extra #extras h4 {display: none;}
+#extra #extras ul {margin: 0; text-align: center; list-style: none;}
+#extra #extras li {margin-left: 0.25em; display: inline;}
+#extra #extras a {margin-right: 0.25em;}
+
+/* miscellaneous */
+
+#footer {margin: 3em 18em 0 12em; padding: 0.5em 0 3.5em;
+ border-top: 1px solid gray;
+ text-align: center;
+ color: gray; background: #FFF;}
+#footer a {color: #558;}
+#footer a:visited {color: #858;}
+#footer p {line-height: 1; margin: 0; padding: 0.5em 0.25em 0; font-size: 0.85em; }
+
+#reading img {border: 1px solid silver;}
+#extra #reading img {margin: 0.5em;}
+
+.book #main img.cover {float: right; margin: 1em 0 1em 2em;
+ border: 1px solid; border-color: #AAA #444 #444 #AAA;}
+
+/* Hack-o-rama! */
+
+* html #navigate {padding-top: 0;}
+
+/*\*//*/
+body #search {width: 20em;}
+/**/
diff --git a/src/dom/work/prop-css.txt b/src/dom/work/prop-css.txt
new file mode 100644
index 000000000..882984137
--- /dev/null
+++ b/src/dom/work/prop-css.txt
@@ -0,0 +1,1082 @@
+
+{
+"azimuth",
+"<angle> | [[ left-side | far-left | left | center-left | center | center-right | right | far-right | right-side ] || behind ] | leftwards | rightwards | inherit",
+"center",
+"",
+"yes",
+"",
+"aural"
+},
+
+
+{
+"background-attachment",
+"scroll | fixed | inherit",
+"scroll",
+"",
+"no",
+"",
+"visual"
+},
+
+
+{
+"background-color",
+"<color> | transparent | inherit",
+"transparent",
+"",
+"no",
+"",
+"visual"
+},
+
+
+{
+"background-image",
+"<uri> | none | inherit",
+"none",
+"",
+"no",
+"",
+"visual"
+},
+
+
+{
+"background-position",
+"[ [ <percentage> | <length> | left | center | right ] [ <percentage> | <length> | top | center | bottom ]? ] | [ [ left | center | right ] || [ top | center | bottom ] ] | inherit",
+"0% 0%",
+"",
+"no",
+"refer to the size of the box itself",
+"visual"
+},
+
+
+{
+"background-repeat",
+"repeat | repeat-x | repeat-y | no-repeat | inherit",
+"repeat",
+"",
+"no",
+"",
+"visual"
+},
+
+
+{
+"background",
+"['background-color' || 'background-image' || 'background-repeat' || 'background-attachment' || 'background-position'] | inherit",
+"see individual properties",
+"",
+"no",
+"allowed on 'background-position",
+"visual"
+},
+
+
+{
+"border-collapse",
+"collapse | separate | inherit",
+"separate",
+"table' and 'inline-table' elements",
+"yes",
+"",
+"visual"
+},
+
+
+{
+"border-color",
+"[ <color> | transparent ]{1,4} | inherit",
+"see individual properties",
+"",
+"no",
+"",
+"visual"
+},
+
+
+{
+"border-spacing",
+"<length> <length>? | inherit",
+"0",
+"table' and 'inline-table' elements",
+"yes",
+"",
+"visual"
+},
+
+
+{
+"border-style",
+"<border-style>{1,4} | inherit",
+"see individual properties",
+"",
+"no",
+"",
+"visual"
+},
+
+
+{
+"border-top' 'border-right' 'border-bottom' 'border-left",
+"[ <border-width> || <border-style> || 'border-top-color' ] | inherit",
+"see individual properties",
+"",
+"no",
+"",
+"visual"
+},
+
+
+{
+"border-top-color' 'border-right-color' 'border-bottom-color' 'border-left-color",
+"<color> | transparent | inherit",
+"the value of the 'color' property",
+"",
+"no",
+"",
+"visual"
+},
+
+
+{
+"border-top-style' 'border-right-style' 'border-bottom-style' 'border-left-style",
+"<border-style> | inherit",
+"none",
+"",
+"no",
+"",
+"visual"
+},
+
+
+{
+"border-top-width' 'border-right-width' 'border-bottom-width' 'border-left-width",
+"<border-width> | inherit",
+"medium",
+"",
+"no",
+"",
+"visual"
+},
+
+
+{
+"border-width",
+"<border-width>{1,4} | inherit",
+"see individual properties",
+"",
+"no",
+"",
+"visual"
+},
+
+
+{
+"border",
+"[ <border-width> || <border-style> || 'border-top-color' ] | inherit",
+"see individual properties",
+"",
+"no",
+"",
+"visual"
+},
+
+
+{
+"bottom",
+"<length> | <percentage> | auto | inherit",
+"auto",
+"positioned elements",
+"no",
+"refer to height of containing block",
+"visual"
+},
+
+
+{
+"caption-side",
+"top | bottom | inherit",
+"top",
+"table-caption' elements",
+"yes",
+"",
+"visual"
+},
+
+
+{
+"clear",
+"none | left | right | both | inherit",
+"none",
+"block-level elements",
+"no",
+"",
+"visual"
+},
+
+
+{
+"clip",
+"<shape> | auto | inherit",
+"auto",
+"absolutely positioned elements",
+"no",
+"",
+"visual"
+},
+
+
+{
+"color",
+"<color> | inherit",
+"depends on user agent",
+"",
+"yes",
+"",
+"visual"
+},
+
+
+{
+"content",
+"normal | [ <string> | <uri> | <counter> | attr(<identifier>) | open-quote | close-quote | no-open-quote | no-close-quote ]+ | inherit",
+"normal",
+":before and :after pseudo-elements",
+"no",
+"",
+"all "
+},
+
+
+{
+"counter-increment",
+"[ <identifier> <integer>? ]+ | none | inherit",
+"none",
+"",
+"no",
+"",
+"all "
+},
+
+
+{
+"counter-reset",
+"[ <identifier> <integer>? ]+ | none | inherit",
+"none",
+"",
+"no",
+"",
+"all "
+},
+
+
+{
+"cue-after",
+"<uri> | none | inherit",
+"none",
+"",
+"no",
+"",
+"aural"
+},
+
+
+{
+"cue-before",
+"<uri> | none | inherit",
+"none",
+"",
+"no",
+"",
+"aural"
+},
+
+
+{
+"cue",
+"[ 'cue-before' || 'cue-after' ] | inherit",
+"see individual properties",
+"",
+"no",
+"",
+"aural"
+},
+
+
+{
+"cursor",
+"[ [<uri> ,]* [ auto | crosshair | default | pointer | move | e-resize | ne-resize | nw-resize | n-resize | se-resize | sw-resize | s-resize | w-resize | text | wait | help | progress ] ] | inherit",
+"auto",
+"",
+"yes",
+"",
+"visual,
+ interactive "
+},
+
+
+{
+"direction",
+"ltr | rtl | inherit",
+"ltr",
+"all elements, but see prose",
+"yes",
+"",
+"visual"
+},
+
+
+{
+"display",
+"inline | block | list-item | run-in | inline-block | table | inline-table | table-row-group | table-header-group | table-footer-group | table-row | table-column-group | table-column | table-cell | table-caption | none | inherit",
+"inline",
+"",
+"no",
+"",
+"all "
+},
+
+
+{
+"elevation",
+"<angle> | below | level | above | higher | lower | inherit",
+"level",
+"",
+"yes",
+"",
+"aural"
+},
+
+
+{
+"empty-cells",
+"show | hide | inherit",
+"show",
+"table-cell' elements",
+"yes",
+"",
+"visual"
+},
+
+
+{
+"float",
+"left | right | none | inherit",
+"none",
+"all, but see 9.7",
+"no",
+"",
+"visual"
+},
+
+
+{
+"font-family",
+"[[ <family-name> | <generic-family> ] [, <family-name>| <generic-family>]* ] | inherit",
+"depends on user agent",
+"",
+"yes",
+"",
+"visual"
+},
+
+
+{
+"font-size",
+"<absolute-size> | <relative-size> | <length> | <percentage> | inherit",
+"medium",
+"",
+"yes",
+"refer to parent element's font size",
+"visual"
+},
+
+
+{
+"font-style",
+"normal | italic | oblique | inherit",
+"normal",
+"",
+"yes",
+"",
+"visual"
+},
+
+
+{
+"font-variant",
+"normal | small-caps | inherit",
+"normal",
+"",
+"yes",
+"",
+"visual"
+},
+
+
+{
+"font-weight",
+"normal | bold | bolder | lighter | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | inherit",
+"normal",
+"",
+"yes",
+"",
+"visual"
+},
+
+
+{
+"font",
+"[ [ 'font-style' || 'font-variant' || 'font-weight' ]? 'font-size' [ / 'line-height' ]? 'font-family' ] | caption | icon | menu | message-box | small-caption | status-bar | inherit",
+"see individual properties",
+"",
+"yes",
+"see individual properties",
+"visual"
+},
+
+
+{
+"height",
+"<length> | <percentage> | auto | inherit",
+"auto",
+"all elements but non-replaced inline elements, table columns, and column groups",
+"no",
+"see prose",
+"visual"
+},
+
+
+{
+"left",
+"<length> | <percentage> | auto | inherit",
+"auto",
+"positioned elements",
+"no",
+"refer to width of containing block",
+"visual"
+},
+
+
+{
+"letter-spacing",
+"normal | <length> | inherit",
+"normal",
+"",
+"yes",
+"",
+"visual"
+},
+
+
+{
+"line-height",
+"normal | <number> | <length> | <percentage> | inherit",
+"normal",
+"",
+"yes",
+"refer to the font size of the element itself",
+"visual"
+},
+
+
+{
+"list-style-image",
+"<uri> | none | inherit",
+"none",
+"elements with 'display: list-item",
+"yes",
+"",
+"visual"
+},
+
+
+{
+"list-style-position",
+"inside | outside | inherit",
+"outside",
+"elements with 'display: list-item",
+"yes",
+"",
+"visual"
+},
+
+
+{
+"list-style-type",
+"disc | circle | square | decimal | decimal-leading-zero | lower-roman | upper-roman | lower-greek | lower-latin | upper-latin | armenian | georgian | none | inherit",
+"disc",
+"elements with 'display: list-item",
+"yes",
+"",
+"visual"
+},
+
+
+{
+"list-style",
+"[ 'list-style-type' || 'list-style-position' || 'list-style-image' ] | inherit",
+"see individual properties",
+"elements with 'display: list-item",
+"yes",
+"",
+"visual"
+},
+
+
+{
+"margin-right' 'margin-left",
+"<margin-width> | inherit",
+"0",
+"all elements except elements with table display types other than table and inline-table",
+"no",
+"refer to width of containing block",
+"visual"
+},
+
+
+{
+"margin-top' 'margin-bottom",
+"<margin-width> | inherit",
+"0",
+"all elements except elements with table display types other than table and inline-table",
+"no",
+"refer to width of containing block",
+"visual"
+},
+
+
+{
+"margin",
+"<margin-width>{1,4} | inherit",
+"see individual properties",
+"all elements except elements with table display types other than table and inline-table",
+"no",
+"refer to width of containing block",
+"visual"
+},
+
+
+{
+"max-height",
+"<length> | <percentage> | none | inherit",
+"none",
+"all elements except non-replaced inline elements and table elements",
+"no",
+"see prose",
+"visual"
+},
+
+
+{
+"max-width",
+"<length> | <percentage> | none | inherit",
+"none",
+"all elements except non-replaced inline elements and table elements",
+"no",
+"refer to width of containing block",
+"visual"
+},
+
+
+{
+"min-height",
+"<length> | <percentage> | inherit",
+"0",
+"all elements except non-replaced inline elements and table elements",
+"no",
+"see prose",
+"visual"
+},
+
+
+{
+"min-width",
+"<length> | <percentage> | inherit",
+"0",
+"all elements except non-replaced inline elements and table elements",
+"no",
+"refer to width of containing block",
+"visual"
+},
+
+
+{
+"orphans",
+"<integer> | inherit",
+"2",
+"block-level elements",
+"yes",
+"",
+"visual, paged "
+},
+
+
+{
+"outline-color",
+"<color> | invert | inherit",
+"invert",
+"",
+"no",
+"",
+"visual, interactive "
+},
+
+
+{
+"outline-style",
+"<border-style> | inherit",
+"none",
+"",
+"no",
+"",
+"visual, interactive "
+},
+
+
+{
+"outline-width",
+"<border-width> | inherit",
+"medium",
+"",
+"no",
+"",
+"visual, interactive "
+},
+
+
+{
+"outline",
+"[ 'outline-color' || 'outline-style' || 'outline-width' ] | inherit",
+"see individual properties",
+"",
+"no",
+"",
+"visual, interactive "
+},
+
+
+{
+"overflow",
+"visible | hidden | scroll | auto | inherit",
+"visible",
+"block-level and replaced elements, table cells, inline blocks",
+"no",
+"",
+"visual"
+},
+
+
+{
+"padding-top' 'padding-right' 'padding-bottom' 'padding-left",
+"<padding-width> | inherit",
+"0",
+"all elements except elements with table display types other than table, inline-table, and table-cell",
+"no",
+"refer to width of containing block",
+"visual"
+},
+
+
+{
+"padding",
+"<padding-width>{1,4} | inherit",
+"see individual properties",
+"all elements except elements with table display types other than table, inline-table, and table-cell",
+"no",
+"refer to width of containing block",
+"visual"
+},
+
+
+{
+"page-break-after",
+"auto | always | avoid | left | right | inherit",
+"auto",
+"block-level elements",
+"no",
+"",
+"visual,
+ paged "
+},
+
+
+{
+"page-break-before",
+"auto | always | avoid | left | right | inherit",
+"auto",
+"block-level elements",
+"no",
+"",
+"visual,
+ paged "
+},
+
+
+{
+"page-break-inside",
+"avoid | auto | inherit",
+"auto",
+"block-level elements",
+"yes",
+"",
+"visual,
+ paged "
+},
+
+
+{
+"pause-after",
+"<time> | <percentage> | inherit",
+"0",
+"",
+"no",
+"see prose",
+"aural"
+},
+
+
+{
+"pause-before",
+"<time> | <percentage> | inherit",
+"0",
+"",
+"no",
+"see prose",
+"aural"
+},
+
+
+{
+"pause",
+"[ [<time> | <percentage>]{1,2} ] | inherit",
+"see individual properties",
+"",
+"no",
+"see descriptions of 'pause-before' and 'pause-after",
+"aural"
+},
+
+
+{
+"pitch-range",
+"<number> | inherit",
+"50",
+"",
+"yes",
+"",
+"aural"
+},
+
+
+{
+"pitch",
+"<frequency> | x-low | low | medium | high | x-high | inherit",
+"medium",
+"",
+"yes",
+"",
+"aural"
+},
+
+
+{
+"play-during",
+"<uri> [ mix || repeat ]? | auto | none | inherit",
+"auto",
+"",
+"no",
+"",
+"aural"
+},
+
+
+{
+"position",
+"static | relative | absolute | fixed | inherit",
+"static",
+"",
+"no",
+"",
+"visual"
+},
+
+
+{
+"quotes",
+"[<string> <string>]+ | none | inherit",
+"depends on user agent",
+"",
+"yes",
+"",
+"visual"
+},
+
+
+{
+"richness",
+"<number> | inherit",
+"50",
+"",
+"yes",
+"",
+"aural"
+},
+
+
+{
+"right",
+"<length> | <percentage> | auto | inherit",
+"auto",
+"positioned elements",
+"no",
+"refer to width of containing block",
+"visual"
+},
+
+
+{
+"speak-header",
+"once | always | inherit",
+"once",
+"elements that have table header information",
+"yes",
+"",
+"aural"
+},
+
+
+{
+"speak-numeral",
+"digits | continuous | inherit",
+"continuous",
+"",
+"yes",
+"",
+"aural"
+},
+
+
+{
+"speak-punctuation",
+"code | none | inherit",
+"none",
+"",
+"yes",
+"",
+"aural"
+},
+
+
+{
+"speak",
+"normal | none | spell-out | inherit",
+"normal",
+"",
+"yes",
+"",
+"aural"
+},
+
+
+{
+"speech-rate",
+"<number> | x-slow | slow | medium | fast | x-fast | faster | slower | inherit",
+"medium",
+"",
+"yes",
+"",
+"aural"
+},
+
+
+{
+"stress",
+"<number> | inherit",
+"50",
+"",
+"yes",
+"",
+"aural"
+},
+
+
+{
+"table-layout",
+"auto | fixed | inherit",
+"auto",
+"table' and 'inline-table' elements",
+"no",
+"",
+"visual"
+},
+
+
+{
+"text-align",
+"left | right | center | justify | inherit",
+"left' if 'direction' is 'ltr'; 'right' if 'direction' is 'rtl",
+"block-level elements, table cells and inline blocks",
+"yes",
+"",
+"visual"
+},
+
+
+{
+"text-decoration",
+"none | [ underline || overline || line-through || blink ] | inherit",
+"none",
+"",
+"no (see prose)",
+"",
+"visual"
+},
+
+
+{
+"text-indent",
+"<length> | <percentage> | inherit",
+"0",
+"block-level elements, table cells and inline blocks",
+"yes",
+"refer to width of containing block",
+"visual"
+},
+
+
+{
+"text-transform",
+"capitalize | uppercase | lowercase | none | inherit",
+"none",
+"",
+"yes",
+"",
+"visual"
+},
+
+
+{
+"top",
+"<length> | <percentage> | auto | inherit",
+"auto",
+"positioned elements",
+"no",
+"refer to height of containing block",
+"visual"
+},
+
+
+{
+"unicode-bidi",
+"normal | embed | bidi-override | inherit",
+"normal",
+"all elements, but see prose",
+"no",
+"",
+"visual"
+},
+
+
+{
+"vertical-align",
+"baseline | sub | super | top | text-top | middle | bottom | text-bottom | <percentage> | <length> | inherit",
+"baseline",
+"inline-level and 'table-cell' elements",
+"no",
+"refer to the 'line-height' of the element itself",
+"visual"
+},
+
+
+{
+"visibility",
+"visible | hidden | collapse | inherit",
+"visible",
+"",
+"yes",
+"",
+"visual"
+},
+
+
+{
+"voice-family",
+"[[<specific-voice> | <generic-voice> ],]* [<specific-voice> | <generic-voice> ] | inherit",
+"depends on user agent",
+"",
+"yes",
+"",
+"aural"
+},
+
+
+{
+"volume",
+"<number> | <percentage> | silent | x-soft | soft | medium | loud | x-loud | inherit",
+"medium",
+"",
+"yes",
+"refer to inherited value",
+"aural"
+},
+
+
+{
+"white-space",
+"normal | pre | nowrap | pre-wrap | pre-line | inherit",
+"normal",
+"",
+"yes",
+"",
+"visual"
+},
+
+
+{
+"widows",
+"<integer> | inherit",
+"2",
+"block-level elements",
+"yes",
+"",
+"visual, paged "
+},
+
+
+{
+"width",
+"<length> | <percentage> | auto | inherit",
+"auto",
+"all elements but non-replaced inline elements, table rows, and row groups",
+"no",
+"refer to width of containing block",
+"visual"
+},
+
+
+{
+"word-spacing",
+"normal | <length> | inherit",
+"normal",
+"",
+"yes",
+"",
+"visual"
+},
+
+
+{
+"z-index",
+"auto | <integer> | inherit",
+"auto",
+"positioned elements",
+"no",
+"",
+"visual"
+}
+
diff --git a/src/dom/work/prop-svg.txt b/src/dom/work/prop-svg.txt
new file mode 100644
index 000000000..0d4984f25
--- /dev/null
+++ b/src/dom/work/prop-svg.txt
@@ -0,0 +1,651 @@
+
+{
+"alignment-baseline",
+"auto | baseline | before-edge | text-before-edge | middle | central | after-edge | text-after-edge | ideographic | alphabetic | hanging | mathematical | inherit",
+"see property description",
+"'tspan', 'tref', 'altGlyph', 'textPath' elements",
+"no",
+"",
+"visual",
+"yes"
+},
+
+{
+"baseline-shift",
+"baseline | sub | super | <percentage> | <length> | inherit",
+"baseline",
+"tspan', 'tref', 'altGlyph', 'textPath' elements",
+"no",
+"refers to the 'line-height' of the 'text' element, which in the case of SVG is defined to be equal to the 'font-size",
+"visual",
+"yes (non-additive, 'set' and 'animate' elements only)"
+},
+
+{
+"clip",
+"<shape> | auto | inherit",
+"auto",
+"elements which establish a new viewport, 'pattern' elements and 'marker' elements",
+"no",
+"",
+"visual",
+"yes"
+},
+
+{
+"clip-path",
+"<uri> | none | inherit",
+"none",
+"container elements and graphics elements",
+"no",
+"",
+"visual",
+"yes"
+},
+
+{
+"clip-rule",
+"nonzero | evenodd | inherit",
+"nonzero",
+"graphics elements within a 'clipPath' element",
+"yes",
+"",
+"visual",
+"yes"
+},
+
+{
+"color",
+"<color> | inherit",
+"depends on user agent",
+"elements to which properties 'fill', 'stroke', 'stop-color', 'flood-color', 'lighting-color' apply",
+"yes",
+"",
+"visual",
+"yes"
+},
+
+{
+"color-interpolation",
+"auto | sRGB | linearRGB | inherit",
+"sRGB",
+"container elements, graphics elements and 'animateColor",
+"yes",
+"",
+"visual",
+"yes"
+},
+
+{
+"color-interpolation-filters",
+"auto | sRGB | linearRGB | inherit",
+"linearRGB",
+"filter primitives",
+"yes",
+"",
+"visual",
+"yes"
+},
+
+{
+"color-profile",
+"auto | sRGB | <name> | <uri> | inherit",
+"auto",
+"'image' elements that refer to raster images",
+"yes",
+"",
+"visual",
+"yes"
+},
+
+{
+"color-rendering",
+"auto | optimizeSpeed | optimizeQuality | inherit",
+"auto",
+"container elements, graphics elements and 'animateColor",
+"yes",
+"",
+"visual",
+"yes"
+},
+
+{
+"cursor",
+"[ [<uri> ,]* [ auto | crosshair | default | pointer | move | e-resize | ne-resize | nw-resize | n-resize | se-resize | sw-resize | s-resize | w-resize| text | wait | help ] ] | inherit",
+"auto",
+"container elements and graphics elements",
+"yes",
+"",
+"visual, interactive",
+"yes"
+},
+
+{
+"direction",
+"ltr | rtl | inherit",
+"ltr",
+"text content elements",
+"yes",
+"",
+"visual",
+"no"
+},
+
+{
+"display",
+"inline | block | list-item | run-in | compact | marker | table | inline-table | table-row-group | table-header-group | table-footer-group | table-row | table-column-group | table-column | table-cell | table-caption | none | inherit",
+"inline",
+"'svg', 'g', 'switch', 'a', 'foreignObject', graphics elements (including the 'text' element) and text sub-elements (i.e., 'tspan', 'tref', 'altGlyph', 'textPath')",
+"no",
+"",
+"all",
+"yes"
+},
+
+{
+"dominant-baseline",
+"auto | use-script | no-change | reset-size | ideographic | alphabetic | hanging | mathematical | central | middle | text-after-edge | text-before-edge | inherit",
+"auto",
+"text content elements",
+"no",
+"",
+"visual",
+"yes"
+},
+
+{
+"enable-background",
+"accumulate | new [ <x> <y> <width> <height> ] | inherit",
+"accumulate",
+"container elements",
+"no",
+"",
+"visual",
+"no"
+},
+
+{
+"fill",
+"<paint> (See Specifying paint)",
+"black",
+"shapes and text content elements",
+"yes",
+"",
+"visual",
+"yes"
+},
+
+{
+"fill-opacity",
+"<opacity-value> | inherit",
+"1",
+"shapes and text content elements",
+"yes",
+"",
+"visual",
+"yes"
+},
+
+{
+"fill-rule",
+"nonzero | evenodd | inherit",
+"nonzero",
+"shapes and text content elements",
+"yes",
+"",
+"visual",
+"yes"
+},
+
+{
+"filter",
+"<uri> | none | inherit",
+"none",
+"container elements and graphics elements",
+"no",
+"",
+"visual",
+"yes"
+},
+
+{
+"flood-color",
+"currentColor | <color> [icc-color(<name>[,<icccolorvalue>]*)] | inherit",
+"black",
+"'feFlood' elements",
+"no",
+"",
+"visual",
+"yes"
+},
+
+{
+"flood-opacity",
+"<opacity-value> | inherit",
+"1",
+"'feFlood' elements",
+"no",
+"",
+"visual",
+"yes"
+},
+
+{
+"font",
+"[ [ 'font-style' || 'font-variant' || 'font-weight' ]? 'font-size' [ / 'line-height' ]? 'font-family' ] | caption | icon | menu | message-box | small-caption | status-bar | inherit",
+"see individual properties",
+"text content elements",
+"yes",
+"allowed on 'font-size' and 'line-height' ('line-height' same as 'font-size' in SVG)",
+"visual",
+"yes (non-additive, 'set' and 'animate' elements only)"
+},
+
+{
+"font-family",
+"[[ <family-name> | <generic-family> ],]* [ <family-name> | <generic-family>] | inherit",
+"depends on user agent",
+"text content elements",
+"yes",
+"",
+"visual",
+"yes"
+},
+
+{
+"font-size",
+"<absolute-size> | <relative-size> | <length> | <percentage> | inherit",
+"medium",
+"text content elements",
+"yes, the computed value is inherited",
+"refer to parent element's font size",
+"visual",
+"yes"
+},
+
+{
+"font-size-adjust",
+"<number> | none | inherit",
+"none",
+"text content elements",
+"yes",
+"",
+"visual",
+"yes"
+},
+
+{
+"font-stretch",
+"normal | wider | narrower | ultra-condensed | extra-condensed | condensed | semi-condensed | semi-expanded | expanded | extra-expanded | ultra-expanded | inherit",
+"normal",
+"text content elements",
+"yes",
+"",
+"visual",
+"yes"
+},
+
+{
+"font-style",
+"normal | italic | oblique | inherit",
+"normal",
+"text content elements",
+"yes",
+"",
+"visual",
+"yes"
+},
+
+{
+"font-variant",
+"normal | small-caps | inherit",
+"normal",
+"text content elements",
+"yes",
+"",
+"visual",
+"yes"
+},
+
+{
+"font-weight",
+"normal | bold | bolder | lighter | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | inherit",
+"normal",
+"text content elements",
+"yes",
+"",
+"visual",
+"yes"
+},
+
+{
+"glyph-orientation-horizontal",
+"<angle> | inherit",
+"0deg",
+"text content elements",
+"yes",
+"",
+"visual",
+"no"
+},
+
+{
+"glyph-orientation-vertical",
+"auto | <angle> | inherit",
+"auto",
+"text content elements",
+"yes",
+"",
+"visual",
+"no"
+},
+
+{
+"image-rendering",
+"auto | optimizeSpeed | optimizeQuality | inherit",
+"auto",
+"images",
+"yes",
+"",
+"visual",
+"yes"
+},
+
+{
+"kerning",
+"auto | <length> | inherit",
+"auto",
+"text content elements",
+"yes",
+"",
+"visual",
+"yes"
+},
+
+{
+"letter-spacing",
+"normal | <length> | inherit",
+"normal",
+"text content elements",
+"yes",
+"",
+"visual",
+"yes"
+},
+
+{
+"lighting-color",
+"currentColor | <color> [icc-color(<name>[,<icccolorvalue>]*)] | inherit",
+"white",
+"feDiffuseLighting' and 'feSpecularLighting' elements",
+"no",
+"",
+"visual",
+"yes"
+},
+
+{
+"marker",
+"see individual properties",
+"see individual properties",
+"path', 'line', 'polyline' and 'polygon' elements",
+"yes",
+"",
+"visual",
+"yes"
+},
+
+{
+"marker-end' 'marker-mid' 'marker-start",
+"none | inherit | <uri>",
+"none",
+"path', 'line', 'polyline' and 'polygon' elements",
+"yes",
+"",
+"visual",
+"yes"
+},
+
+{
+"mask",
+"<uri> | none | inherit",
+"none",
+"container elements and graphics elements",
+"no",
+"",
+"visual",
+"yes"
+},
+
+{
+"opacity",
+"<opacity-value> | inherit",
+"1",
+"container elements and graphics elements",
+"no",
+"",
+"visual",
+"yes"
+},
+
+{
+"overflow",
+"visible | hidden | scroll | auto | inherit",
+"see prose",
+"elements which establish a new viewport, 'pattern' elements and 'marker' elements",
+"no",
+"",
+"visual",
+"yes"
+},
+
+{
+"pointer-events",
+"visiblePainted | visibleFill | visibleStroke | visible | painted | fill | stroke | all | none | inherit",
+"visiblePainted",
+"graphics elements",
+"yes",
+"",
+"visual",
+"yes"
+},
+
+{
+"shape-rendering",
+"auto | optimizeSpeed | crispEdges | geometricPrecision | inherit",
+"auto",
+"shapes",
+"yes",
+"",
+"visual",
+"yes"
+},
+
+{
+"stop-color",
+"currentColor | <color> [icc-color(<name>[,<icccolorvalue>]*)] | inherit",
+"black",
+"stop' elements",
+"no",
+"",
+"visual",
+"yes"
+},
+
+{
+"stop-opacity",
+"<opacity-value> | inherit",
+"1",
+"stop' elements",
+"no",
+"",
+"visual",
+"yes"
+},
+
+{
+"stroke",
+"<paint> (See Specifying paint)",
+"none",
+"shapes and text content elements",
+"yes",
+"",
+"visual",
+"yes"
+},
+
+{
+"stroke-dasharray",
+"none | <dasharray> | inherit",
+"none",
+"shapes and text content elements",
+"yes",
+"",
+"visual",
+""
+},
+
+{
+"stroke-dashoffset",
+"<length> | inherit",
+"0",
+"shapes and text content elements",
+"yes",
+"see prose",
+"visual",
+"yes"
+},
+
+{
+"stroke-linecap",
+"butt | round | square | inherit",
+"butt",
+"shapes and text content elements",
+"yes",
+"",
+"visual",
+"yes"
+},
+
+{
+"stroke-linejoin",
+"miter | round | bevel | inherit",
+"miter",
+"shapes and text content elements",
+"yes",
+"",
+"visual",
+"yes"
+},
+
+{
+"stroke-miterlimit",
+"<miterlimit> | inherit",
+"4",
+"shapes and text content elements",
+"yes",
+"",
+"visual",
+"yes"
+},
+
+{
+"stroke-opacity",
+"<opacity-value> | inherit",
+"1",
+"shapes and text content elements",
+"yes",
+"",
+"visual",
+"yes"
+},
+
+{
+"stroke-width",
+"<length> | inherit",
+"1",
+"shapes and text content elements",
+"yes",
+"",
+"visual",
+"yes"
+},
+
+{
+"text-anchor",
+"start | middle | end | inherit",
+"start",
+"text content elements",
+"yes",
+"",
+"visual",
+"yes"
+},
+
+{
+"text-decoration",
+"none | [ underline || overline || line-through || blink ] | inherit",
+"none",
+"text content elements",
+"no (see prose)",
+"",
+"visual",
+"yes"
+},
+
+{
+"text-rendering",
+"auto | optimizeSpeed | optimizeLegibility | geometricPrecision | inherit",
+"auto",
+"'text' elements",
+"yes",
+"",
+"visual",
+"yes"
+},
+
+{
+"unicode-bidi",
+"normal | embed | bidi-override | inherit",
+"normal",
+"text content elements",
+"no",
+"",
+"visual",
+"no"
+},
+
+{
+"visibility",
+"visible | hidden | collapse | inherit",
+"visible",
+"graphics elements (including the 'text' element) and text sub-elements (i.e., 'tspan', 'tref', 'altGlyph', 'textPath' and 'a')",
+"yes",
+"",
+"visual",
+"yes"
+},
+
+{
+"word-spacing",
+"normal | <length> | inherit",
+"normal",
+"text content elements",
+"yes",
+"",
+"visual",
+"yes"
+},
+
+{
+"writing-mode",
+"lr-tb | rl-tb | tb-rl | lr | rl | tb | inherit",
+"lr-tb",
+"'text' elements",
+"yes",
+"",
+"visual",
+"no"
+},
+
+
diff --git a/src/dom/work/ranges.idl b/src/dom/work/ranges.idl
new file mode 100644
index 000000000..205b1bab7
--- /dev/null
+++ b/src/dom/work/ranges.idl
@@ -0,0 +1,122 @@
+/*
+ * Copyright (c) 2000 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program 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 W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+// File: http://www.w3.org/TR/2000/REC-DOM-Level-2-Traversal-Range-20001113/ranges.idl
+
+#ifndef _RANGES_IDL_
+#define _RANGES_IDL_
+
+#include "dom.idl"
+
+#pragma prefix "dom.w3c.org"
+module ranges
+{
+
+ typedef dom::Node Node;
+ typedef dom::DocumentFragment DocumentFragment;
+ typedef dom::DOMString DOMString;
+
+ // Introduced in DOM Level 2:
+ exception RangeException {
+ unsigned short code;
+ };
+ // RangeExceptionCode
+ const unsigned short BAD_BOUNDARYPOINTS_ERR = 1;
+ const unsigned short INVALID_NODE_TYPE_ERR = 2;
+
+
+ // Introduced in DOM Level 2:
+ interface Range {
+ readonly attribute Node startContainer;
+ // raises(dom::DOMException) on retrieval
+
+ readonly attribute long startOffset;
+ // raises(dom::DOMException) on retrieval
+
+ readonly attribute Node endContainer;
+ // raises(dom::DOMException) on retrieval
+
+ readonly attribute long endOffset;
+ // raises(dom::DOMException) on retrieval
+
+ readonly attribute boolean collapsed;
+ // raises(dom::DOMException) on retrieval
+
+ readonly attribute Node commonAncestorContainer;
+ // raises(dom::DOMException) on retrieval
+
+ void setStart(in Node refNode,
+ in long offset)
+ raises(RangeException,
+ dom::DOMException);
+ void setEnd(in Node refNode,
+ in long offset)
+ raises(RangeException,
+ dom::DOMException);
+ void setStartBefore(in Node refNode)
+ raises(RangeException,
+ dom::DOMException);
+ void setStartAfter(in Node refNode)
+ raises(RangeException,
+ dom::DOMException);
+ void setEndBefore(in Node refNode)
+ raises(RangeException,
+ dom::DOMException);
+ void setEndAfter(in Node refNode)
+ raises(RangeException,
+ dom::DOMException);
+ void collapse(in boolean toStart)
+ raises(dom::DOMException);
+ void selectNode(in Node refNode)
+ raises(RangeException,
+ dom::DOMException);
+ void selectNodeContents(in Node refNode)
+ raises(RangeException,
+ dom::DOMException);
+
+ // CompareHow
+ const unsigned short START_TO_START = 0;
+ const unsigned short START_TO_END = 1;
+ const unsigned short END_TO_END = 2;
+ const unsigned short END_TO_START = 3;
+
+ short compareBoundaryPoints(in unsigned short how,
+ in Range sourceRange)
+ raises(dom::DOMException);
+ void deleteContents()
+ raises(dom::DOMException);
+ DocumentFragment extractContents()
+ raises(dom::DOMException);
+ DocumentFragment cloneContents()
+ raises(dom::DOMException);
+ void insertNode(in Node newNode)
+ raises(dom::DOMException,
+ RangeException);
+ void surroundContents(in Node newParent)
+ raises(dom::DOMException,
+ RangeException);
+ Range cloneRange()
+ raises(dom::DOMException);
+ DOMString toString()
+ raises(dom::DOMException);
+ void detach()
+ raises(dom::DOMException);
+ };
+
+ // Introduced in DOM Level 2:
+ interface DocumentRange {
+ Range createRange();
+ };
+};
+
+#endif // _RANGES_IDL_
+
diff --git a/src/dom/work/sandb1.css b/src/dom/work/sandb1.css
new file mode 100644
index 000000000..1da2686aa
--- /dev/null
+++ b/src/dom/work/sandb1.css
@@ -0,0 +1,149 @@
+@import url(base.css);
+
+/*
+All images:
+Copyright 2003 - Swartz & Bivens, P.L.L.C.
+*/
+
+html, body {width: 100%; height: 100% !important; font-size: 1em;}
+body {margin: 0; padding: 0; font: 1em Verdana, Arial, Helvetica, sans-serif; position: relative;}
+
+#header {margin: 0; padding: 0 0 0.75em 0; border-bottom: 1px solid;
+ border-left: 1.5em solid;}
+#header h1 {margin: 0; padding: 0.75em 0.5em 0 0; font-size: 1.5em;
+ font-family: Verdana, sans-serif; line-height: 0.8em; letter-spacing: -0.13em;}
+
+#main {padding: 0.6em 0 5em 25px; margin-right: 21%;}
+#main h2, #main h3, #main h4, #main h5, #main h6 {line-height: 0.8em; margin: 1em 0 0;
+ border-bottom: 1px solid; }
+
+
+#main p, #main ul, #main ol, #main dl {margin-right: 6%;}
+
+
+p.desc {margin: 0.5em 0 1em 95px;}
+a.pic {float: left; margin: -21px 0 0.5em; width: 80px;}
+a.hlinks {text-decoration: none; border-bottom: 0.25em solid;}
+
+#nav {position: absolute; right: 0%; top: 3.2em; width: 20%; max-width: 200px;
+ padding: 0; margin: 0 0 0 1px;
+ font-family: Arial, sans-serif;
+ border-style: solid;
+ background-color: #4682B4;
+ border-width: 1px 2px 2px 1px;
+}
+#nav h4 {margin: 0; padding: 0.25em 0.5em 1px 0.25em;
+ font-size: 0.9em; font-style: italic; line-height: 0.7em;
+ letter-spacing: 1px; text-transform: lowercase;
+ border-style: dotted; border-width: 0px 0 1px 2px;}
+#nav ul {margin: 0 0 1.5em 0; padding: 0.25em 0 0.5em 0;
+ list-style: none; font-size: 85%;}
+#nav ul li {padding: 0.15em 0 0.1em 0.5em;}
+#nav ul ul {padding: 0 0 0 1em; margin: 0; border-left: none; font-size: 90%; font-style: italic;}
+#nav ul ul li {padding-top: 1px; text-indent: -0.5em;}
+#nav ul li em {font-weight: bold; padding: 0; margin: 0; border-bottom: 1px dotted red; width: .5em; }
+#nav ul ul em {font-weight: bold; padding: 0; margin: 0; border-bottom: 1px dotted red; width: .5em; }
+#nav ul ul li em {font-weight: bold; padding: 0; margin: 0; border-bottom: 1px dotted red; width: .5em; }
+#nav #select {font-weight: bold; font-style: italic; letter-spacing: 1px; text-transform: lowercase;
+ border-style: dotted; border-width: 1px 3px 1px 2px; border-right: none; margin-left: -1px;}
+
+#style li.sub:hover {margin-left: -10.2em; border: 1px solid gray; background: #DDB;}
+#style li.sub:hover > a {color: #330;}
+#style li.sub:hover > ul {top: 1.75em; left: -1px; background: #FEFEFC;}
+
+#style {position: absolute; right: 0%; top: 1.0em;
+ padding: 0; margin: 0;
+ font-family: Arial, sans-serif;}
+#style h4 {margin: 0; padding: 0.25em 0.5em 1px 0.25em;
+ font-size: 0.9em; font-style: italic; line-height: 0.7em;
+ letter-spacing: 1px; text-transform: lowercase;
+ border-style: solid solid dotted; border-width: 1px 0 1px 2px;}
+#style #sandb1 {font-weight: bold; font-style: italic; letter-spacing: 1px; text-transform: lowercase;
+ border: 1px dotted; border-top: none; margin-left: -1px;}
+
+#style li.sub:hover {margin-left: -10.2em; border: 1px solid gray; background: #DDB;}
+#style li.sub:hover > a {color: #330;}
+#style li.sub:hover > ul {top: 1.75em; left: -1px; background: #FEFEFC;}
+
+#footer {border-top: 2.5px double; margin: 0; padding: 0.25em; text-align: left; font-size: 75%;}
+#footer p {margin: 0; padding: 0; text-align: center}
+#footer img, #nav img {padding:0; margin: 0; border:0; vertical-align: middle; }
+
+img {border:0;}
+
+/* home styles */
+
+body.home #main {padding-left: 120px;}
+body.home #main img.pic {position: absolute; left: -1em; top: 6.25em; z-index: 100;}
+
+
+/* colors and backgrounds */
+
+body {background: #FFFFFF url(bigsbbg.gif) no-repeat fixed center;
+ color: #42384C;}
+
+#header, #nav ul, #nav #sandb1, #footer {border-color: #738CA6;}
+#main h2, #main h2 a {border-color: #414066;}
+#thoughts * {border-color: #5B5980;}
+
+#main a:link {color: #006691;}
+#main a:hover {color: #006691; background-color: #ddeeff;}
+
+#header {background: #BAC5D1;}
+#header h1 {background: #738CA6;}
+#header h1 a {color: #343366;}
+
+#main h2 a {color: #00294C;}
+
+#nav {background: #BCCAE0;}
+#nav h4 {border-color: #667F99; color: #343366; background: #B2BFD9;}
+#nav ul {background: none;}
+#nav ul ul {background: none;}
+
+#navlinks a:link {color: #4C6580;}
+#navlinks a:visited, #stylelinks a {color: #818099;}
+#nav a:hover {color: #334180;}
+#style #sandb1 {background: #C7D4E6;}
+#style #sandb1 a {color: #4D4C66;}
+
+#style a {font-size: 70%; background: transparent; color: #FFFFFF}
+#style a:hover {font-size:70%; background: transparent; color: #683399}
+#style a:visited {font-size:70%; background: transparent; color: #FFFFFF}
+#style a span {display: none;}
+#style a:hover span {display: block; position: absolute; bottom: 2px; left: 0; width: 265px; padding: 1px; margin: 1px; z-index: 100; color: #ffffff; background: #000066; font: 10px Verdana, sans-serif; text-align: center;}
+
+.sField { border-width:1px; border-style:solid; border-color:#ffffff; background-color:#333399;font-family: Arial, Helvetica, sans-serif;color: #ffffff; margin: 0; padding: 0; }
+.sButton { border-width:1px; border-style:solid; border-color:#ffffff; background-color:#333399;font-family: Arial, Helvetica, sans-serif;color: #ffffff; margin: 0; padding: 0; }
+.eField { border-width:1px; border-style:solid; border-color:#6495ED; background-color:#F0F8FF;font-family: Arial, Helvetica, sans-serif;color: #000000; }
+.eButton { border-width:1px; border-style:solid; border-color:#6495ED; background-color:#F0F8FF;font-family: Arial, Helvetica, sans-serif;color: #000000;}
+.mid { vertical-align: middle; }
+.line { color: #6495ED; border-top: 3px solid #6495ED; border-bottom: 2px solid #000080; height: 5px; border-left: none; }
+
+input { font: 60% verdana,sans-serif; vertical-align: middle; }
+.sField:hover, .sField:focus { background-color: #336699 }
+.sButton:hover, .sButton:focus { background-color: #336699 }
+.eField:hover, .eField:focus { background-color: #DFEFFF}
+.eButton:hover, .eButton:focus { background-color: #DFEFFF }
+
+#bt {position: absolute; right: 0%; margin-right: 24%;}
+
+#gl { text-align: center; vertical-align: middle; margin: 0; padding: 0; }
+
+
+#footer {color: #343366; background: #BAC5D1;}
+
+
+a:visited {color: #4C6580; background: transparent;}
+
+#navlinks li a:hover:after, #navlinks li a:focus:after {content: " [" attr(accesskey) "] ";}
+
+acronym {border-bottom: 1px dashed #0063CC; cursor: help;}
+
+
+
+/* fix IE6 rendering bugs */
+
+#header h1 {position: relative;}
+#header>h1 {position: static;}
+
+html>body #main p, html>body #main h3, html>body #main dt, html>body #main ul, html>body #main li, html>body #main ol {background: url(bigsbbg2.gif) no-repeat fixed center;}
diff --git a/src/dom/work/smil.idl b/src/dom/work/smil.idl
new file mode 100644
index 000000000..29fd3754d
--- /dev/null
+++ b/src/dom/work/smil.idl
@@ -0,0 +1,369 @@
+/*
+ * Copyright (c) 2000 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program 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 W3C License http://www.w3.org/Consortium/Legal/ for more
+ * details.
+ */
+
+// File: smil.idl
+#ifndef _SMIL_IDL_
+#define _SMIL_IDL_
+
+#include "dom.idl"
+#include "views.idl"
+#include "events.idl"
+
+#pragma prefix "dom.w3c.org"
+module smil
+{
+ typedef dom::DOMString DOMString;
+ typedef dom::Element Element;
+ typedef dom::NodeList NodeList;
+ typedef dom::Document Document;
+
+ interface SMILRegionElement;
+
+ interface ElementLayout {
+ attribute DOMString title;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString backgroundColor;
+ // raises(dom::DOMException) on setting
+
+ attribute long height;
+ // raises(dom::DOMException) on setting
+
+ attribute long width;
+ // raises(dom::DOMException) on setting
+
+ };
+
+ interface SMILRegionInterface {
+ attribute SMILRegionElement region;
+ };
+
+ interface Time {
+ readonly attribute boolean resolved;
+ readonly attribute double resolvedOffset;
+ // TimeTypes
+ const unsigned short SMIL_TIME_INDEFINITE = 0;
+ const unsigned short SMIL_TIME_OFFSET = 1;
+ const unsigned short SMIL_TIME_SYNC_BASED = 2;
+ const unsigned short SMIL_TIME_EVENT_BASED = 3;
+ const unsigned short SMIL_TIME_WALLCLOCK = 4;
+ const unsigned short SMIL_TIME_MEDIA_MARKER = 5;
+
+ readonly attribute unsigned short timeType;
+ attribute double offset;
+ // raises(dom::DOMException) on setting
+
+ attribute Element baseElement;
+ // raises(dom::DOMException) on setting
+
+ attribute boolean baseBegin;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString event;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString marker;
+ // raises(dom::DOMException) on setting
+
+ };
+
+ interface TimeList {
+ Time item(in unsigned long index);
+ readonly attribute unsigned long length;
+ };
+
+ interface ElementTime {
+ attribute TimeList begin;
+ // raises(dom::DOMException) on setting
+
+ attribute TimeList end;
+ // raises(dom::DOMException) on setting
+
+ attribute float dur;
+ // raises(dom::DOMException) on setting
+
+ // restartTypes
+ const unsigned short RESTART_ALWAYS = 0;
+ const unsigned short RESTART_NEVER = 1;
+ const unsigned short RESTART_WHEN_NOT_ACTIVE = 2;
+
+ attribute unsigned short restart;
+ // raises(dom::DOMException) on setting
+
+ // fillTypes
+ const unsigned short FILL_REMOVE = 0;
+ const unsigned short FILL_FREEZE = 1;
+
+ attribute unsigned short fill;
+ // raises(dom::DOMException) on setting
+
+ attribute float repeatCount;
+ // raises(dom::DOMException) on setting
+
+ attribute float repeatDur;
+ // raises(dom::DOMException) on setting
+
+ boolean beginElement();
+ boolean endElement();
+ void pauseElement();
+ void resumeElement();
+ void seekElement(inout float seekTo);
+ };
+
+ interface ElementTimeManipulation {
+ attribute float speed;
+ // raises(dom::DOMException) on setting
+
+ attribute float accelerate;
+ // raises(dom::DOMException) on setting
+
+ attribute float decelerate;
+ // raises(dom::DOMException) on setting
+
+ attribute boolean autoReverse;
+ // raises(dom::DOMException) on setting
+
+ };
+
+ interface ElementTimeContainer : ElementTime {
+ readonly attribute NodeList timeChildren;
+ NodeList getActiveChildrenAt(in float instant);
+ };
+
+ interface ElementSyncBehavior {
+ readonly attribute DOMString syncBehavior;
+ readonly attribute float syncTolerance;
+ readonly attribute DOMString defaultSyncBehavior;
+ readonly attribute float defaultSyncTolerance;
+ readonly attribute boolean syncMaster;
+ };
+
+ interface ElementParallelTimeContainer : ElementTimeContainer {
+ attribute DOMString endSync;
+ // raises(dom::DOMException) on setting
+
+ float getImplicitDuration();
+ };
+
+ interface ElementSequentialTimeContainer : ElementTimeContainer {
+ };
+
+ interface ElementExclusiveTimeContainer : ElementTimeContainer {
+ attribute DOMString endSync;
+ // raises(dom::DOMException) on setting
+
+ NodeList getPausedElements();
+ };
+
+ interface ElementTimeControl {
+ boolean beginElement()
+ raises(dom::DOMException);
+ boolean beginElementAt(in float offset)
+ raises(dom::DOMException);
+ boolean endElement()
+ raises(dom::DOMException);
+ boolean endElementAt(in float offset)
+ raises(dom::DOMException);
+ };
+
+ interface ElementTargetAttributes {
+ attribute DOMString attributeName;
+ // attributeTypes
+ const unsigned short ATTRIBUTE_TYPE_AUTO = 0;
+ const unsigned short ATTRIBUTE_TYPE_CSS = 1;
+ const unsigned short ATTRIBUTE_TYPE_XML = 2;
+
+ attribute unsigned short attributeType;
+ };
+
+ interface ElementTest {
+ attribute long systemBitrate;
+ // raises(dom::DOMException) on setting
+
+ attribute boolean systemCaptions;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString systemLanguage;
+ // raises(dom::DOMException) on setting
+
+ readonly attribute boolean systemRequired;
+ readonly attribute boolean systemScreenSize;
+ readonly attribute boolean systemScreenDepth;
+ attribute DOMString systemOverdubOrSubtitle;
+ // raises(dom::DOMException) on setting
+
+ attribute boolean systemAudioDesc;
+ // raises(dom::DOMException) on setting
+
+ };
+
+ interface SMILDocument : Document, ElementSequentialTimeContainer {
+ };
+
+ interface SMILElement : Element {
+ attribute DOMString id;
+ // raises(dom::DOMException) on setting
+
+ };
+
+ interface SMILLayoutElement : SMILElement {
+ readonly attribute DOMString type;
+ readonly attribute boolean resolved;
+ };
+
+ interface SMILTopLayoutElement : SMILElement, ElementLayout {
+ };
+
+ interface SMILRootLayoutElement : SMILElement, ElementLayout {
+ };
+
+ interface SMILRegionElement : SMILElement, ElementLayout {
+ attribute DOMString fit;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString top;
+ // raises(dom::DOMException) on setting
+
+ attribute long zIndex;
+ // raises(dom::DOMException) on setting
+
+ };
+
+ interface TimeEvent : events::Event {
+ readonly attribute views::AbstractView view;
+ readonly attribute long detail;
+ void initTimeEvent(in DOMString typeArg,
+ in views::AbstractView viewArg,
+ in long detailArg);
+ };
+
+ interface SMILMediaElement : ElementTime, SMILElement {
+ attribute DOMString abstractAttr;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString alt;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString author;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString clipBegin;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString clipEnd;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString copyright;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString longdesc;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString port;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString readIndex;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString rtpformat;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString src;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString stripRepeat;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString title;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString transport;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString type;
+ // raises(dom::DOMException) on setting
+
+ };
+
+ interface SMILRefElement : SMILMediaElement {
+ };
+
+ interface SMILAnimation : SMILElement, ElementTargetAttributes, ElementTime, ElementTimeControl {
+ // additiveTypes
+ const unsigned short ADDITIVE_REPLACE = 0;
+ const unsigned short ADDITIVE_SUM = 1;
+
+ attribute unsigned short additive;
+ // raises(dom::DOMException) on setting
+
+ // accumulateTypes
+ const unsigned short ACCUMULATE_NONE = 0;
+ const unsigned short ACCUMULATE_SUM = 1;
+
+ attribute unsigned short accumulate;
+ // raises(dom::DOMException) on setting
+
+ // calcModeTypes
+ const unsigned short CALCMODE_DISCRETE = 0;
+ const unsigned short CALCMODE_LINEAR = 1;
+ const unsigned short CALCMODE_PACED = 2;
+ const unsigned short CALCMODE_SPLINE = 3;
+
+ attribute unsigned short calcMode;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString keySplines;
+ // raises(dom::DOMException) on setting
+
+ attribute TimeList keyTimes;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString values;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString from;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString to;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString by;
+ // raises(dom::DOMException) on setting
+
+ };
+
+ interface SMILAnimateElement : SMILAnimation {
+ };
+
+ interface SMILSetElement : ElementTimeControl, ElementTime, ElementTargetAttributes, SMILElement {
+ attribute DOMString to;
+ };
+
+ interface SMILAnimateMotionElement : SMILAnimateElement {
+ attribute DOMString path;
+ // raises(dom::DOMException) on setting
+
+ attribute DOMString origin;
+ // raises(dom::DOMException) on setting
+
+ };
+
+ interface SMILAnimateColorElement : SMILAnimation {
+ };
+
+ interface SMILSwitchElement : SMILElement {
+ Element getSelectedElement();
+ };
+};
+
+#endif // _SMIL_IDL_
+
diff --git a/src/dom/work/stylesheets.idl b/src/dom/work/stylesheets.idl
new file mode 100644
index 000000000..1bc307370
--- /dev/null
+++ b/src/dom/work/stylesheets.idl
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2000 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program 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 W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+// File: http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113/stylesheets.idl
+
+#ifndef _STYLESHEETS_IDL_
+#define _STYLESHEETS_IDL_
+
+#include "dom.idl"
+
+#pragma prefix "dom.w3c.org"
+module stylesheets
+{
+
+ typedef dom::DOMString DOMString;
+ typedef dom::Node Node;
+
+ interface MediaList;
+
+ // Introduced in DOM Level 2:
+ interface StyleSheet {
+ readonly attribute DOMString type;
+ attribute boolean disabled;
+ readonly attribute Node ownerNode;
+ readonly attribute StyleSheet parentStyleSheet;
+ readonly attribute DOMString href;
+ readonly attribute DOMString title;
+ readonly attribute MediaList media;
+ };
+
+ // Introduced in DOM Level 2:
+ interface StyleSheetList {
+ readonly attribute unsigned long length;
+ StyleSheet item(in unsigned long index);
+ };
+
+ // Introduced in DOM Level 2:
+ interface MediaList {
+ attribute DOMString mediaText;
+ // raises(dom::DOMException) on setting
+
+ readonly attribute unsigned long length;
+ DOMString item(in unsigned long index);
+ void deleteMedium(in DOMString oldMedium)
+ raises(dom::DOMException);
+ void appendMedium(in DOMString newMedium)
+ raises(dom::DOMException);
+ };
+
+ // Introduced in DOM Level 2:
+ interface LinkStyle {
+ readonly attribute StyleSheet sheet;
+ };
+
+ // Introduced in DOM Level 2:
+ interface DocumentStyle {
+ readonly attribute StyleSheetList styleSheets;
+ };
+};
+
+#endif // _STYLESHEETS_IDL_
+
diff --git a/src/dom/work/testdom.cpp b/src/dom/work/testdom.cpp
new file mode 100644
index 000000000..d3e8d99f3
--- /dev/null
+++ b/src/dom/work/testdom.cpp
@@ -0,0 +1,110 @@
+/**
+ * Phoebe DOM Implementation.
+ *
+ * This is a C++ approximation of the W3C DOM model, which follows
+ * fairly closely the specifications in the various .idl files, copies of
+ * which are provided for reference. Most important is this one:
+ *
+ * http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/idl-definitions.html
+ *
+ * Authors:
+ * Bob Jamison
+ *
+ * Copyright (C) 2005 Bob Jamison
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+
+
+#include "lsimpl.h"
+
+using namespace org::w3c::dom;
+
+
+bool doTest(char *filename)
+{
+
+ ls::DOMImplementationLSImpl domImpl;
+ ls::LSInput input = domImpl.createLSInput();
+ ls::LSParser &parser = domImpl.createLSParser(0, "");
+
+ DOMString buf;
+ FILE *f = fopen(filename, "rb");
+ if (!f)
+ {
+ printf("Cannot open %s for reading\n", filename);
+ return false;
+ }
+ while (!feof(f))
+ {
+ int ch = fgetc(f);
+ buf.push_back(ch);
+ }
+ fclose(f);
+ input.setStringData(buf);
+
+ printf("######## PARSE ######################################\n");
+ Document *doc = parser.parse(input);
+
+ if (!doc)
+ {
+ printf("parsing failed\n");
+ return 0;
+ }
+
+ //### OUTPUT
+ printf("######## SERIALIZE ##################################\n");
+ ls::LSSerializer &serializer = domImpl.createLSSerializer();
+ ls::LSOutput output = domImpl.createLSOutput();
+ io::StdWriter writer;
+ output.setCharacterStream(&writer);
+ serializer.write(doc, output);
+
+ printf("####### Namespace check\n");
+ DOMString svgNamespace = "http://www.w3.org/2000/svg";
+ NodeList list = doc->getElementsByTagNameNS(svgNamespace, "svg");
+ int nodeCount = list.getLength();
+ printf("Nodes:%d\n", nodeCount);
+ for (int i=0; i<nodeCount ; i++)
+ {
+ Node *node = list.item(i);
+ serializer.write(node, output);
+ }
+
+
+
+
+ delete doc;
+ return 1;
+}
+
+
+
+
+
+int main(int argc, char **argv)
+{
+ if (argc!=2)
+ {
+ printf("usage: %s xmlfile\n", argv[0]);
+ return 0;
+ }
+ doTest(argv[1]);
+ return 0;
+}
+
+
+
diff --git a/src/dom/work/testhttp.cpp b/src/dom/work/testhttp.cpp
new file mode 100644
index 000000000..b40cc86be
--- /dev/null
+++ b/src/dom/work/testhttp.cpp
@@ -0,0 +1,82 @@
+/**
+ * Phoebe DOM Implementation.
+ *
+ * This is a C++ approximation of the W3C DOM model, which follows
+ * fairly closely the specifications in the various .idl files, copies of
+ * which are provided for reference. Most important is this one:
+ *
+ * http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/idl-definitions.html
+ *
+ * Authors:
+ * Bob Jamison
+ *
+ * Copyright (C) 2005 Bob Jamison
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+
+
+#include "io/uristream.h"
+
+using namespace org::w3c::dom;
+
+
+bool doTest1(char *filename)
+{
+ return true;
+}
+
+bool doTest2()
+{
+ io::UriInputStream instream("http://www.mit.edu");
+
+ DOMString res;
+
+ while (true)
+ {
+ int ch = instream.get();
+ if (ch<0)
+ break;
+ res.push_back(ch);
+ }
+
+ instream.close();
+
+ printf("result: %s\n", res.c_str());
+
+ return true;
+}
+
+
+
+
+
+int main(int argc, char **argv)
+{
+ /*
+ if (argc!=2)
+ {
+ printf("usage: %s xmlfile\n", argv[0]);
+ return 0;
+ }
+ doTest1(argv[1]);
+ */
+ doTest2();
+ return 0;
+}
+
+
+
diff --git a/src/dom/work/testodf.cpp b/src/dom/work/testodf.cpp
new file mode 100644
index 000000000..bf55257b5
--- /dev/null
+++ b/src/dom/work/testodf.cpp
@@ -0,0 +1,98 @@
+/**
+ * Phoebe DOM Implementation.
+ *
+ * This is a C++ approximation of the W3C DOM model, which follows
+ * fairly closely the specifications in the various .idl files, copies of
+ * which are provided for reference. Most important is this one:
+ *
+ * http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/idl-definitions.html
+ *
+ * Authors:
+ * Bob Jamison
+ *
+ * Copyright (C) 2005 Bob Jamison
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+
+
+#include "svg/svglsimpl.h"
+#include "io/uristream.h"
+
+
+using namespace org::w3c::dom;
+
+
+bool doTest(char *filename)
+{
+
+ svg::SVGDOMImplementationLSImpl domImpl;
+ ls::LSInput input = domImpl.createLSInput();
+ ls::LSParser &parser = domImpl.createLSParser(0, "");
+
+
+ printf("######## PARSE ######################################\n");
+ Document *doc;
+ try
+ {
+ io::UriInputStream ins(filename);
+ input.setByteStream(&ins);
+ doc = parser.parse(input);
+ ins.close();
+ }
+ catch (io::StreamException &e)
+ {
+ printf("could not open input stream %s\n", filename);
+ return false;
+ }
+
+ if (!doc)
+ {
+ printf("parsing failed\n");
+ return false;
+ }
+
+ return true;
+ //### OUTPUT
+ printf("######## SERIALIZE ##################################\n");
+ ls::LSSerializer &serializer = domImpl.createLSSerializer();
+ ls::LSOutput output = domImpl.createLSOutput();
+ io::StdWriter writer;
+ output.setCharacterStream(&writer);
+ serializer.write(doc, output);
+
+
+ delete doc;
+ return true;
+}
+
+
+
+
+
+int main(int argc, char **argv)
+{
+ if (argc!=2)
+ {
+ printf("usage: %s xmlfile\n", argv[0]);
+ return 0;
+ }
+ doTest(argv[1]);
+ return 0;
+}
+
+
+
diff --git a/src/dom/work/testsvg.cpp b/src/dom/work/testsvg.cpp
new file mode 100644
index 000000000..72850b84b
--- /dev/null
+++ b/src/dom/work/testsvg.cpp
@@ -0,0 +1,97 @@
+/**
+ * Phoebe DOM Implementation.
+ *
+ * This is a C++ approximation of the W3C DOM model, which follows
+ * fairly closely the specifications in the various .idl files, copies of
+ * which are provided for reference. Most important is this one:
+ *
+ * http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/idl-definitions.html
+ *
+ * Authors:
+ * Bob Jamison
+ *
+ * Copyright (C) 2005 Bob Jamison
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+
+
+#include "svg/svglsimpl.h"
+
+using namespace org::w3c::dom;
+
+
+bool doTest(char *filename)
+{
+
+ svg::SVGDOMImplementationLSImpl domImpl;
+ ls::LSInput input = domImpl.createLSInput();
+ ls::LSParser &parser = domImpl.createLSParser(0, "");
+
+ DOMString buf;
+ FILE *f = fopen(filename, "rb");
+ if (!f)
+ {
+ printf("Cannot open %s for reading\n", filename);
+ return false;
+ }
+ while (!feof(f))
+ {
+ int ch = fgetc(f);
+ buf.push_back(ch);
+ }
+ fclose(f);
+ input.setStringData(buf);
+
+ printf("######## PARSE ######################################\n");
+ Document *doc = parser.parse(input);
+
+ if (!doc)
+ {
+ printf("parsing failed\n");
+ return 0;
+ }
+
+ //### OUTPUT
+ printf("######## SERIALIZE ##################################\n");
+ ls::LSSerializer &serializer = domImpl.createLSSerializer();
+ ls::LSOutput output = domImpl.createLSOutput();
+ io::StdWriter writer;
+ output.setCharacterStream(&writer);
+ serializer.write(doc, output);
+
+
+ delete doc;
+ return 1;
+}
+
+
+
+
+
+int main(int argc, char **argv)
+{
+ if (argc!=2)
+ {
+ printf("usage: %s xmlfile\n", argv[0]);
+ return 0;
+ }
+ doTest(argv[1]);
+ return 0;
+}
+
+
+
diff --git a/src/dom/work/testuri.cpp b/src/dom/work/testuri.cpp
new file mode 100644
index 000000000..2e061997b
--- /dev/null
+++ b/src/dom/work/testuri.cpp
@@ -0,0 +1,76 @@
+/**
+ * Phoebe DOM Implementation.
+ *
+ * This is a C++ approximation of the W3C DOM model, which follows
+ * fairly closely the specifications in the various .idl files, copies of
+ * which are provided for reference. Most important is this one:
+ *
+ * http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/idl-definitions.html
+ *
+ * Authors:
+ * Bob Jamison
+ *
+ * Copyright (C) 2005 Bob Jamison
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include "io/uristream.h"
+
+
+
+
+static bool doURI(char *uristr)
+{
+ org::w3c::dom::URI uri(uristr);
+
+ printf("URI : '%s'\n", uri.toString().c_str());
+ printf("scheme : '%s'\n", uri.getSchemeStr().c_str());
+ printf("auth : '%s'\n", uri.getAuthority().c_str());
+ printf("path : '%s'\n", uri.getPath().c_str());
+ printf("query : '%s'\n", uri.getQuery().c_str());
+ printf("fragment: '%s'\n", uri.getFragment().c_str());
+ printf("absolute: '%d'\n", uri.getIsAbsolute());
+
+
+
+
+
+ return true;
+}
+
+static bool doTest()
+{
+ char *uristr = "http://www.mit.edu:80/index.html?test=good#hello";
+ doURI(uristr);
+ uristr = "http://www.mit.edu:80";
+ doURI(uristr);
+
+
+
+
+
+
+ return true;
+}
+
+
+
+int main(int argc, char **argv)
+{
+ if (!doTest())
+ return 1;
+ return 0;
+}
diff --git a/src/dom/work/testxpath.cpp b/src/dom/work/testxpath.cpp
new file mode 100644
index 000000000..d724600a7
--- /dev/null
+++ b/src/dom/work/testxpath.cpp
@@ -0,0 +1,1416 @@
+/**
+ * Phoebe DOM Implementation.
+ *
+ * This is a C++ approximation of the W3C DOM model, which follows
+ * fairly closely the specifications in the various .idl files, copies of
+ * which are provided for reference. Most important is this one:
+ *
+ * http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/idl-definitions.html
+ *
+ * Authors:
+ * Bob Jamison
+ *
+ * Copyright (C) 2005 Bob Jamison
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+
+
+#include "dom.h"
+#include "lsimpl.h"
+#include "xpathparser.h"
+
+#include <stdio.h>
+
+using namespace org::w3c::dom;
+using namespace org::w3c::dom::xpath;
+
+
+typedef struct
+{
+ char *xpathStr;
+ char *desc;
+ char *xml;
+} XpathTest;
+
+XpathTest xpathTests[] =
+{
+
+{
+"/AAA",
+"Select the root element AAA",
+" <AAA>\n"
+" <BBB/>\n"
+" <CCC/>\n"
+" <BBB/>\n"
+" <BBB/>\n"
+" <DDD>\n"
+" <BBB/>\n"
+" </DDD>\n"
+" <CCC/>\n"
+" </AAA>\n"
+},
+
+{
+"/AAA/CCC",
+"Select all elements CCC which are children of the root element AAA",
+" <AAA>\n"
+" <BBB/>\n"
+" <CCC/>\n"
+" <BBB/>\n"
+" <BBB/>\n"
+" <DDD>\n"
+" <BBB/>\n"
+" </DDD>\n"
+" <CCC/>\n"
+" </AAA>\n"
+},
+
+{
+"/AAA/DDD/BBB",
+"Select all elements BBB which are children of DDD which are children of the root element AAA",
+" <AAA>\n"
+" <BBB/>\n"
+" <CCC/>\n"
+" <BBB/>\n"
+" <BBB/>\n"
+" <DDD>\n"
+" <BBB/>\n"
+" </DDD>\n"
+" <CCC/>\n"
+" </AAA>\n"
+},
+
+{
+"//BBB",
+"Select all elements BBB",
+" <AAA>\n"
+" <BBB/>\n"
+" <CCC/>\n"
+" <BBB/>\n"
+" <DDD>\n"
+" <BBB/>\n"
+" </DDD>\n"
+" <CCC>\n"
+" <DDD>\n"
+" <BBB/>\n"
+" <BBB/>\n"
+" </DDD>\n"
+" </CCC>\n"
+" </AAA>\n"
+},
+
+{
+"//DDD/BBB",
+"Select all elements BBB which are children of DDD",
+" <AAA>\n"
+" <BBB/>\n"
+" <CCC/>\n"
+" <BBB/>\n"
+" <DDD>\n"
+" <BBB/>\n"
+" </DDD>\n"
+" <CCC>\n"
+" <DDD>\n"
+" <BBB/>\n"
+" <BBB/>\n"
+" </DDD>\n"
+" </CCC>\n"
+" </AAA>\n"
+},
+
+{
+"/AAA/CCC/DDD/*",
+"Select all elements enclosed by elements /AAA/CCC/DDD",
+" <AAA>\n"
+" <XXX>\n"
+" <DDD>\n"
+" <BBB/>\n"
+" <BBB/>\n"
+" <EEE/>\n"
+" <FFF/>\n"
+" </DDD>\n"
+" </XXX>\n"
+" <CCC>\n"
+" <DDD>\n"
+" <BBB/>\n"
+" <BBB/>\n"
+" <EEE/>\n"
+" <FFF/>\n"
+" </DDD>\n"
+" </CCC>\n"
+" <CCC>\n"
+" <BBB>\n"
+" <BBB>\n"
+" <BBB/>\n"
+" </BBB>\n"
+" </BBB>\n"
+" </CCC>\n"
+" </AAA>\n"
+},
+
+{
+"/*/*/*/BBB",
+"Select all elements BBB which have 3 ancestors",
+" <AAA>\n"
+" <XXX>\n"
+" <DDD>\n"
+" <BBB/>\n"
+" <BBB/>\n"
+" <EEE/>\n"
+" <FFF/>\n"
+" </DDD>\n"
+" </XXX>\n"
+" <CCC>\n"
+" <DDD>\n"
+" <BBB/>\n"
+" <BBB/>\n"
+" <EEE/>\n"
+" <FFF/>\n"
+" </DDD>\n"
+" </CCC>\n"
+" <CCC>\n"
+" <BBB>\n"
+" <BBB>\n"
+" <BBB/>\n"
+" </BBB>\n"
+" </BBB>\n"
+" </CCC>\n"
+" </AAA>\n"
+},
+
+{
+"//*",
+"Select all elements",
+" <AAA>\n"
+" <XXX>\n"
+" <DDD>\n"
+" <BBB/>\n"
+" <BBB/>\n"
+" <EEE/>\n"
+" <FFF/>\n"
+" </DDD>\n"
+" </XXX>\n"
+" <CCC>\n"
+" <DDD>\n"
+" <BBB/>\n"
+" <BBB/>\n"
+" <EEE/>\n"
+" <FFF/>\n"
+" </DDD>\n"
+" </CCC>\n"
+" <CCC>\n"
+" <BBB>\n"
+" <BBB>\n"
+" <BBB/>\n"
+" </BBB>\n"
+" </BBB>\n"
+" </CCC>\n"
+" </AAA>\n"
+},
+
+{
+"/AAA/BBB[1]",
+"Select the first BBB child of element AAA",
+" <AAA>\n"
+" <BBB/>\n"
+" <BBB/>\n"
+" <BBB/>\n"
+" <BBB/>\n"
+" </AAA>\n"
+},
+
+{
+"/AAA/BBB[last()]",
+"Select the last BBB child of element AAA",
+" <AAA>\n"
+" <BBB/>\n"
+" <BBB/>\n"
+" <BBB/>\n"
+" <BBB/>\n"
+" </AAA>\n"
+},
+
+{
+"//@id",
+"Select all attributes @id",
+" <AAA>\n"
+" <BBB id = 'b1'/>\n"
+" <BBB id = 'b2'/>\n"
+" <BBB name = 'bbb'/>\n"
+" <BBB/>\n"
+" </AAA>\n"
+},
+
+{
+"//BBB[@id]",
+"Select BBB elements which have attribute id",
+" <AAA>\n"
+" <BBB id = 'b1'/>\n"
+" <BBB id = 'b2'/>\n"
+" <BBB name = 'bbb'/>\n"
+" <BBB/>\n"
+" </AAA>\n"
+},
+
+{
+"//BBB[@name]",
+"Select BBB elements which have attribute name",
+" <AAA>\n"
+" <BBB id = 'b1'/>\n"
+" <BBB id = 'b2'/>\n"
+" <BBB name = 'bbb'/>\n"
+" <BBB/>\n"
+" </AAA>\n"
+},
+
+{
+"//BBB[@*]",
+"Select BBB elements which have any attribute",
+" <AAA>\n"
+" <BBB id = 'b1'/>\n"
+" <BBB id = 'b2'/>\n"
+" <BBB name = 'bbb'/>\n"
+" <BBB/>\n"
+" </AAA>\n"
+},
+
+{
+"//BBB[not(@*)]",
+"Select BBB elements without an attribute",
+" <AAA>\n"
+" <BBB id = 'b1'/>\n"
+" <BBB id = 'b2'/>\n"
+" <BBB name = 'bbb'/>\n"
+" <BBB/>\n"
+" </AAA>\n"
+},
+
+{
+"//BBB[@id='b1']",
+"Select BBB elements which have attribute id with value b1",
+" <AAA>\n"
+" <BBB id = 'b1'/>\n"
+" <BBB name = ' bbb '/>\n"
+" <BBB name = 'bbb'/>\n"
+" </AAA>\n"
+},
+
+{
+"//BBB[@name='bbb']",
+"Select BBB elements which have attribute name with value 'bbb'",
+" <AAA>\n"
+" <BBB id = 'b1'/>\n"
+" <BBB name = ' bbb '/>\n"
+" <BBB name = 'bbb'/>\n"
+" </AAA>\n"
+},
+
+{
+"//BBB[normalize-space(@name)='bbb']",
+"Select BBB elements which have attribute name with value bbb, leading and trailing spaces are removed before comparison",
+" <AAA>\n"
+" <BBB id = 'b1'/>\n"
+" <BBB name = ' bbb '/>\n"
+" <BBB name = 'bbb'/>\n"
+" </AAA>\n"
+},
+
+{
+"//*[count(BBB)=2]",
+"Select elements which have two children BBB",
+" <AAA>\n"
+" <CCC>\n"
+" <BBB/>\n"
+" <BBB/>\n"
+" <BBB/>\n"
+" </CCC>\n"
+" <DDD>\n"
+" <BBB/>\n"
+" <BBB/>\n"
+" </DDD>\n"
+" <EEE>\n"
+" <CCC/>\n"
+" <DDD/>\n"
+" </EEE>\n"
+" </AAA>\n"
+},
+
+{
+"//*[count(*)=2]",
+"Select elements which have 2 children",
+" <AAA>\n"
+" <CCC>\n"
+" <BBB/>\n"
+" <BBB/>\n"
+" <BBB/>\n"
+" </CCC>\n"
+" <DDD>\n"
+" <BBB/>\n"
+" <BBB/>\n"
+" </DDD>\n"
+" <EEE>\n"
+" <CCC/>\n"
+" <DDD/>\n"
+" </EEE>\n"
+" </AAA>\n"
+},
+
+{
+"//*[count(*)=3]",
+"Select elements which have 3 children",
+" <AAA>\n"
+" <CCC>\n"
+" <BBB/>\n"
+" <BBB/>\n"
+" <BBB/>\n"
+" </CCC>\n"
+" <DDD>\n"
+" <BBB/>\n"
+" <BBB/>\n"
+" </DDD>\n"
+" <EEE>\n"
+" <CCC/>\n"
+" <DDD/>\n"
+" </EEE>\n"
+" </AAA>\n"
+},
+
+{
+"//*[name()='BBB']",
+"Select all elements with name BBB, equivalent with //BBB",
+" <AAA>\n"
+" <BCC>\n"
+" <BBB/>\n"
+" <BBB/>\n"
+" <BBB/>\n"
+" </BCC>\n"
+" <DDB>\n"
+" <BBB/>\n"
+" <BBB/>\n"
+" </DDB>\n"
+" <BEC>\n"
+" <CCC/>\n"
+" <DBD/>\n"
+" </BEC>\n"
+" </AAA>\n"
+},
+
+{
+"//*[starts-with(name(),'B')]",
+"Select all elements name of which starts with letter B",
+" <AAA>\n"
+" <BCC>\n"
+" <BBB/>\n"
+" <BBB/>\n"
+" <BBB/>\n"
+" </BCC>\n"
+" <DDB>\n"
+" <BBB/>\n"
+" <BBB/>\n"
+" </DDB>\n"
+" <BEC>\n"
+" <CCC/>\n"
+" <DBD/>\n"
+" </BEC>\n"
+" </AAA>\n"
+},
+
+{
+"//*[contains(name(),'C')]",
+"Select all elements name of which contain letter C",
+" <AAA>\n"
+" <BCC>\n"
+" <BBB/>\n"
+" <BBB/>\n"
+" <BBB/>\n"
+" </BCC>\n"
+" <DDB>\n"
+" <BBB/>\n"
+" <BBB/>\n"
+" </DDB>\n"
+" <BEC>\n"
+" <CCC/>\n"
+" <DBD/>\n"
+" </BEC>\n"
+" </AAA>\n"
+},
+
+{
+"//*[string-length(name()) = 3]",
+"Select elements with three-letter name",
+" <AAA>\n"
+" <Q/>\n"
+" <SSSS/>\n"
+" <BB/>\n"
+" <CCC/>\n"
+" <DDDDDDDD/>\n"
+" <EEEE/>\n"
+" </AAA>\n"
+},
+
+{
+"//*[string-length(name()) < 3]",
+"Select elements name of which has one or two characters",
+" <AAA>\n"
+" <Q/>\n"
+" <SSSS/>\n"
+" <BB/>\n"
+" <CCC/>\n"
+" <DDDDDDDD/>\n"
+" <EEEE/>\n"
+" </AAA>\n"
+},
+
+{
+"//*[string-length(name()) > 3]",
+"Select elements with name longer than three characters",
+" <AAA>\n"
+" <Q/>\n"
+" <SSSS/>\n"
+" <BB/>\n"
+" <CCC/>\n"
+" <DDDDDDDD/>\n"
+" <EEEE/>\n"
+" </AAA>\n"
+},
+
+{
+"//CCC | //BBB",
+"Select all elements CCC and BBB",
+" <AAA>\n"
+" <BBB/>\n"
+" <CCC/>\n"
+" <DDD>\n"
+" <CCC/>\n"
+" </DDD>\n"
+" <EEE/>\n"
+" </AAA>\n"
+},
+
+{
+"/AAA/EEE | //BBB",
+"Select all elements BBB and elements EEE which are children of root element AAA",
+" <AAA>\n"
+" <BBB/>\n"
+" <CCC/>\n"
+" <DDD>\n"
+" <CCC/>\n"
+" </DDD>\n"
+" <EEE/>\n"
+" </AAA>\n"
+},
+
+{
+"/AAA/EEE | //DDD/CCC | /AAA | //BBB",
+"Number of combinations is not restricted",
+" <AAA>\n"
+" <BBB/>\n"
+" <CCC/>\n"
+" <DDD>\n"
+" <CCC/>\n"
+" </DDD>\n"
+" <EEE/>\n"
+" </AAA>\n"
+},
+
+{
+"/AAA",
+"Equivalent of /child::AAA",
+" <AAA>\n"
+" <BBB/>\n"
+" <CCC/>\n"
+" </AAA>\n"
+},
+
+{
+"/child::AAA",
+"Equivalent of /AAA",
+" <AAA>\n"
+" <BBB/>\n"
+" <CCC/>\n"
+" </AAA>\n"
+},
+
+{
+"/AAA/BBB",
+"Equivalent of /child::AAA/child::BBB",
+" <AAA>\n"
+" <BBB/>\n"
+" <CCC/>\n"
+" </AAA>\n"
+},
+
+{
+"/child::AAA/child::BBB",
+"Equivalent of /AAA/BBB",
+" <AAA>\n"
+" <BBB/>\n"
+" <CCC/>\n"
+" </AAA>\n"
+},
+
+{
+"/child::AAA/BBB",
+"Both possibilities can be combined",
+" <AAA>\n"
+" <BBB/>\n"
+" <CCC/>\n"
+" </AAA>\n"
+},
+
+{
+"/descendant::*",
+"Select all descendants of document root and therefore all elements",
+" <AAA>\n"
+" <BBB>\n"
+" <DDD>\n"
+" <CCC>\n"
+" <DDD/>\n"
+" <EEE/>\n"
+" </CCC>\n"
+" </DDD>\n"
+" </BBB>\n"
+" <CCC>\n"
+" <DDD>\n"
+" <EEE>\n"
+" <DDD>\n"
+" <FFF/>\n"
+" </DDD>\n"
+" </EEE>\n"
+" </DDD>\n"
+" </CCC>\n"
+" </AAA>\n"
+},
+
+{
+"/AAA/BBB/descendant::*",
+"Select all descendants of /AAA/BBB",
+" <AAA>\n"
+" <BBB>\n"
+" <DDD>\n"
+" <CCC>\n"
+" <DDD/>\n"
+" <EEE/>\n"
+" </CCC>\n"
+" </DDD>\n"
+" </BBB>\n"
+" <CCC>\n"
+" <DDD>\n"
+" <EEE>\n"
+" <DDD>\n"
+" <FFF/>\n"
+" </DDD>\n"
+" </EEE>\n"
+" </DDD>\n"
+" </CCC>\n"
+" </AAA>\n"
+},
+
+{
+"//CCC/descendant::*",
+"Select all elements which have CCC among its ancestors",
+" <AAA>\n"
+" <BBB>\n"
+" <DDD>\n"
+" <CCC>\n"
+" <DDD/>\n"
+" <EEE/>\n"
+" </CCC>\n"
+" </DDD>\n"
+" </BBB>\n"
+" <CCC>\n"
+" <DDD>\n"
+" <EEE>\n"
+" <DDD>\n"
+" <FFF/>\n"
+" </DDD>\n"
+" </EEE>\n"
+" </DDD>\n"
+" </CCC>\n"
+" </AAA>\n"
+},
+
+{
+"//CCC/descendant::DDD",
+"Select elements DDD which have CCC among its ancestors",
+" <AAA>\n"
+" <BBB>\n"
+" <DDD>\n"
+" <CCC>\n"
+" <DDD/>\n"
+" <EEE/>\n"
+" </CCC>\n"
+" </DDD>\n"
+" </BBB>\n"
+" <CCC>\n"
+" <DDD>\n"
+" <EEE>\n"
+" <DDD>\n"
+" <FFF/>\n"
+" </DDD>\n"
+" </EEE>\n"
+" </DDD>\n"
+" </CCC>\n"
+" </AAA>\n"
+},
+
+{
+"//DDD/parent::*",
+"Select all parents of DDD element",
+" <AAA>\n"
+" <BBB>\n"
+" <DDD>\n"
+" <CCC>\n"
+" <DDD/>\n"
+" <EEE/>\n"
+" </CCC>\n"
+" </DDD>\n"
+" </BBB>\n"
+" <CCC>\n"
+" <DDD>\n"
+" <EEE>\n"
+" <DDD>\n"
+" <FFF/>\n"
+" </DDD>\n"
+" </EEE>\n"
+" </DDD>\n"
+" </CCC>\n"
+" </AAA>\n"
+},
+
+{
+"/AAA/BBB/DDD/CCC/EEE/ancestor::*",
+"Select all elements given in this absolute path",
+" <AAA>\n"
+" <BBB>\n"
+" <DDD>\n"
+" <CCC>\n"
+" <DDD/>\n"
+" <EEE/>\n"
+" </CCC>\n"
+" </DDD>\n"
+" </BBB>\n"
+" <CCC>\n"
+" <DDD>\n"
+" <EEE>\n"
+" <DDD>\n"
+" <FFF/>\n"
+" </DDD>\n"
+" </EEE>\n"
+" </DDD>\n"
+" </CCC>\n"
+" </AAA>\n"
+},
+
+{
+"//FFF/ancestor::*",
+"Select ancestors of FFF element",
+" <AAA>\n"
+" <BBB>\n"
+" <DDD>\n"
+" <CCC>\n"
+" <DDD/>\n"
+" <EEE/>\n"
+" </CCC>\n"
+" </DDD>\n"
+" </BBB>\n"
+" <CCC>\n"
+" <DDD>\n"
+" <EEE>\n"
+" <DDD>\n"
+" <FFF/>\n"
+" </DDD>\n"
+" </EEE>\n"
+" </DDD>\n"
+" </CCC>\n"
+" </AAA>\n"
+},
+
+{
+"/AAA/BBB/following-sibling::*",
+"The following-sibling axis contains all the following siblings of the context node.",
+" <AAA>\n"
+" <BBB>\n"
+" <CCC/>\n"
+" <DDD/>\n"
+" </BBB>\n"
+" <XXX>\n"
+" <DDD>\n"
+" <EEE/>\n"
+" <DDD/>\n"
+" <CCC/>\n"
+" <FFF/>\n"
+" <FFF>\n"
+" <GGG/>\n"
+" </FFF>\n"
+" </DDD>\n"
+" </XXX>\n"
+" <CCC>\n"
+" <DDD/>\n"
+" </CCC>\n"
+" </AAA>\n"
+},
+
+{
+"//CCC/following-sibling::*",
+"The following-sibling axis contains all the following siblings of the context node.",
+" <AAA>\n"
+" <BBB>\n"
+" <CCC/>\n"
+" <DDD/>\n"
+" </BBB>\n"
+" <XXX>\n"
+" <DDD>\n"
+" <EEE/>\n"
+" <DDD/>\n"
+" <CCC/>\n"
+" <FFF/>\n"
+" <FFF>\n"
+" <GGG/>\n"
+" </FFF>\n"
+" </DDD>\n"
+" </XXX>\n"
+" <CCC>\n"
+" <DDD/>\n"
+" </CCC>\n"
+" </AAA>\n"
+},
+
+{
+"/AAA/XXX/preceding-sibling::*",
+"The preceding-sibling axis contains all the preceding siblings of the context node.",
+" <AAA>\n"
+" <BBB>\n"
+" <CCC/>\n"
+" <DDD/>\n"
+" </BBB>\n"
+" <XXX>\n"
+" <DDD>\n"
+" <EEE/>\n"
+" <DDD/>\n"
+" <CCC/>\n"
+" <FFF/>\n"
+" <FFF>\n"
+" <GGG/>\n"
+" </FFF>\n"
+" </DDD>\n"
+" </XXX>\n"
+" <CCC>\n"
+" <DDD/>\n"
+" </CCC>\n"
+" </AAA>\n"
+},
+
+{
+"//CCC/preceding-sibling::*",
+"The preceding-sibling axis contains all the preceding siblings of the context node",
+" <AAA>\n"
+" <BBB>\n"
+" <CCC/>\n"
+" <DDD/>\n"
+" </BBB>\n"
+" <XXX>\n"
+" <DDD>\n"
+" <EEE/>\n"
+" <DDD/>\n"
+" <CCC/>\n"
+" <FFF/>\n"
+" <FFF>\n"
+" <GGG/>\n"
+" </FFF>\n"
+" </DDD>\n"
+" </XXX>\n"
+" <CCC>\n"
+" <DDD/>\n"
+" </CCC>\n"
+" </AAA>\n"
+},
+
+{
+"/AAA/XXX/following::*",
+"The following axis contains all nodes in the same document as the context "
+"node that are after the context node in document order, "
+"excluding any descendants and excluding attribute nodes and namespace nodes.",
+" <AAA>\n"
+" <BBB>\n"
+" <CCC/>\n"
+" <ZZZ>\n"
+" <DDD/>\n"
+" <DDD>\n"
+" <EEE/>\n"
+" </DDD>\n"
+" </ZZZ>\n"
+" <FFF>\n"
+" <GGG/>\n"
+" </FFF>\n"
+" </BBB>\n"
+" <XXX>\n"
+" <DDD>\n"
+" <EEE/>\n"
+" <DDD/>\n"
+" <CCC/>\n"
+" <FFF/>\n"
+" <FFF>\n"
+" <GGG/>\n"
+" </FFF>\n"
+" </DDD>\n"
+" </XXX>\n"
+" <CCC>\n"
+" <DDD/>\n"
+" </CCC>\n"
+" </AAA>\n"
+},
+
+{
+"//ZZZ/following::*",
+"The following axis contains all nodes in the same document as the context "
+"node that are after the context node in document order, "
+"excluding any descendants and excluding attribute nodes and namespace nodes.",
+" <AAA>\n"
+" <BBB>\n"
+" <CCC/>\n"
+" <ZZZ>\n"
+" <DDD/>\n"
+" <DDD>\n"
+" <EEE/>\n"
+" </DDD>\n"
+" </ZZZ>\n"
+" <FFF>\n"
+" <GGG/>\n"
+" </FFF>\n"
+" </BBB>\n"
+" <XXX>\n"
+" <DDD>\n"
+" <EEE/>\n"
+" <DDD/>\n"
+" <CCC/>\n"
+" <FFF/>\n"
+" <FFF>\n"
+" <GGG/>\n"
+" </FFF>\n"
+" </DDD>\n"
+" </XXX>\n"
+" <CCC>\n"
+" <DDD/>\n"
+" </CCC>\n"
+" </AAA>\n"
+},
+
+{
+"/AAA/XXX/preceding::*",
+"The preceding axis contains all nodes in the same document as the "
+"context node that are before the context node in document order, "
+"excluding any ancestors and excluding attribute nodes and namespace nodes",
+" <AAA>\n"
+" <BBB>\n"
+" <CCC/>\n"
+" <ZZZ>\n"
+" <DDD/>\n"
+" </ZZZ>\n"
+" </BBB>\n"
+" <XXX>\n"
+" <DDD>\n"
+" <EEE/>\n"
+" <DDD/>\n"
+" <CCC/>\n"
+" <FFF/>\n"
+" <FFF>\n"
+" <GGG/>\n"
+" </FFF>\n"
+" </DDD>\n"
+" </XXX>\n"
+" <CCC>\n"
+" <DDD/>\n"
+" </CCC>\n"
+" </AAA>\n"
+},
+
+{
+"//GGG/preceding::*",
+"The preceding axis contains all nodes in the same document as the "
+"context node that are before the context node in document order, "
+"excluding any ancestors and excluding attribute nodes and namespace nodes",
+" <AAA>\n"
+" <BBB>\n"
+" <CCC/>\n"
+" <ZZZ>\n"
+" <DDD/>\n"
+" </ZZZ>\n"
+" </BBB>\n"
+" <XXX>\n"
+" <DDD>\n"
+" <EEE/>\n"
+" <DDD/>\n"
+" <CCC/>\n"
+" <FFF/>\n"
+" <FFF>\n"
+" <GGG/>\n"
+" </FFF>\n"
+" </DDD>\n"
+" </XXX>\n"
+" <CCC>\n"
+" <DDD/>\n"
+" </CCC>\n"
+" </AAA>\n"
+},
+
+{
+"/AAA/XXX/descendant-or-self::*",
+"The descendant-or-self axis contains the "
+"context node and the descendants of the context node",
+" <AAA>\n"
+" <BBB>\n"
+" <CCC/>\n"
+" <ZZZ>\n"
+" <DDD/>\n"
+" </ZZZ>\n"
+" </BBB>\n"
+" <XXX>\n"
+" <DDD>\n"
+" <EEE/>\n"
+" <DDD/>\n"
+" <CCC/>\n"
+" <FFF/>\n"
+" <FFF>\n"
+" <GGG/>\n"
+" </FFF>\n"
+" </DDD>\n"
+" </XXX>\n"
+" <CCC>\n"
+" <DDD/>\n"
+" </CCC>\n"
+" </AAA>\n"
+},
+
+{
+"//CCC/descendant-or-self::*",
+"The descendant-or-self axis contains the "
+"context node and the descendants of the context node",
+" <AAA>\n"
+" <BBB>\n"
+" <CCC/>\n"
+" <ZZZ>\n"
+" <DDD/>\n"
+" </ZZZ>\n"
+" </BBB>\n"
+" <XXX>\n"
+" <DDD>\n"
+" <EEE/>\n"
+" <DDD/>\n"
+" <CCC/>\n"
+" <FFF/>\n"
+" <FFF>\n"
+" <GGG/>\n"
+" </FFF>\n"
+" </DDD>\n"
+" </XXX>\n"
+" <CCC>\n"
+" <DDD/>\n"
+" </CCC>\n"
+" </AAA>\n"
+},
+
+{
+"/AAA/XXX/DDD/EEE/ancestor-or-self::*",
+"The ancestor-or-self axis contains the context node and the "
+"ancestors of the context node; thus, the ancestor-or-self axis "
+"will always include the root node.",
+" <AAA>\n"
+" <BBB>\n"
+" <CCC/>\n"
+" <ZZZ>\n"
+" <DDD/>\n"
+" </ZZZ>\n"
+" </BBB>\n"
+" <XXX>\n"
+" <DDD>\n"
+" <EEE/>\n"
+" <DDD/>\n"
+" <CCC/>\n"
+" <FFF/>\n"
+" <FFF>\n"
+" <GGG/>\n"
+" </FFF>\n"
+" </DDD>\n"
+" </XXX>\n"
+" <CCC>\n"
+" <DDD/>\n"
+" </CCC>\n"
+" </AAA>\n"
+},
+
+{
+"//GGG/ancestor-or-self::*",
+"The ancestor-or-self axis contains the context node and the "
+"ancestors of the context node; thus, the ancestor-or-self axis "
+"will always include the root node.",
+" <AAA>\n"
+" <BBB>\n"
+" <CCC/>\n"
+" <ZZZ>\n"
+" <DDD/>\n"
+" </ZZZ>\n"
+" </BBB>\n"
+" <XXX>\n"
+" <DDD>\n"
+" <EEE/>\n"
+" <DDD/>\n"
+" <CCC/>\n"
+" <FFF/>\n"
+" <FFF>\n"
+" <GGG/>\n"
+" </FFF>\n"
+" </DDD>\n"
+" </XXX>\n"
+" <CCC>\n"
+" <DDD/>\n"
+" </CCC>\n"
+" </AAA>\n"
+},
+
+{
+"//GGG/ancestor::*",
+"The ancestor, descendant, following, preceding and self axes partition a document",
+" <AAA>\n"
+" <BBB>\n"
+" <CCC/>\n"
+" <ZZZ/>\n"
+" </BBB>\n"
+" <XXX>\n"
+" <DDD>\n"
+" <EEE/>\n"
+" <FFF>\n"
+" <HHH/>\n"
+" <GGG>\n"
+" <JJJ>\n"
+" <QQQ/>\n"
+" </JJJ>\n"
+" <JJJ/>\n"
+" </GGG>\n"
+" <HHH/>\n"
+" </FFF>\n"
+" </DDD>\n"
+" </XXX>\n"
+" <CCC>\n"
+" <DDD/>\n"
+" </CCC>\n"
+" </AAA>\n"
+},
+
+{
+"//GGG/descendant::*",
+"The ancestor, descendant, following, preceding and self axes partition a document",
+" <AAA>\n"
+" <BBB>\n"
+" <CCC/>\n"
+" <ZZZ/>\n"
+" </BBB>\n"
+" <XXX>\n"
+" <DDD>\n"
+" <EEE/>\n"
+" <FFF>\n"
+" <HHH/>\n"
+" <GGG>\n"
+" <JJJ>\n"
+" <QQQ/>\n"
+" </JJJ>\n"
+" <JJJ/>\n"
+" </GGG>\n"
+" <HHH/>\n"
+" </FFF>\n"
+" </DDD>\n"
+" </XXX>\n"
+" <CCC>\n"
+" <DDD/>\n"
+" </CCC>\n"
+" </AAA>\n"
+},
+
+{
+"//GGG/following::*",
+"The ancestor, descendant, following, preceding and self axes partition a document",
+" <AAA>\n"
+" <BBB>\n"
+" <CCC/>\n"
+" <ZZZ/>\n"
+" </BBB>\n"
+" <XXX>\n"
+" <DDD>\n"
+" <EEE/>\n"
+" <FFF>\n"
+" <HHH/>\n"
+" <GGG>\n"
+" <JJJ>\n"
+" <QQQ/>\n"
+" </JJJ>\n"
+" <JJJ/>\n"
+" </GGG>\n"
+" <HHH/>\n"
+" </FFF>\n"
+" </DDD>\n"
+" </XXX>\n"
+" <CCC>\n"
+" <DDD/>\n"
+" </CCC>\n"
+" </AAA>\n"
+},
+
+{
+"//GGG/preceding::*",
+"The ancestor, descendant, following, preceding and self axes partition a document",
+" <AAA>\n"
+" <BBB>\n"
+" <CCC/>\n"
+" <ZZZ/>\n"
+" </BBB>\n"
+" <XXX>\n"
+" <DDD>\n"
+" <EEE/>\n"
+" <FFF>\n"
+" <HHH/>\n"
+" <GGG>\n"
+" <JJJ>\n"
+" <QQQ/>\n"
+" </JJJ>\n"
+" <JJJ/>\n"
+" </GGG>\n"
+" <HHH/>\n"
+" </FFF>\n"
+" </DDD>\n"
+" </XXX>\n"
+" <CCC>\n"
+" <DDD/>\n"
+" </CCC>\n"
+" </AAA>\n"
+},
+
+{
+"//GGG/self::*",
+"The ancestor, descendant, following, preceding and self axes partition a document",
+" <AAA>\n"
+" <BBB>\n"
+" <CCC/>\n"
+" <ZZZ/>\n"
+" </BBB>\n"
+" <XXX>\n"
+" <DDD>\n"
+" <EEE/>\n"
+" <FFF>\n"
+" <HHH/>\n"
+" <GGG>\n"
+" <JJJ>\n"
+" <QQQ/>\n"
+" </JJJ>\n"
+" <JJJ/>\n"
+" </GGG>\n"
+" <HHH/>\n"
+" </FFF>\n"
+" </DDD>\n"
+" </XXX>\n"
+" <CCC>\n"
+" <DDD/>\n"
+" </CCC>\n"
+" </AAA>\n"
+},
+
+{
+"//GGG/ancestor::* | //GGG/descendant::* | //GGG/following::* | //GGG/preceding::* | //GGG/self::*",
+"The ancestor, descendant, following, preceding and self axes partition a document",
+" <AAA>\n"
+" <BBB>\n"
+" <CCC/>\n"
+" <ZZZ/>\n"
+" </BBB>\n"
+" <XXX>\n"
+" <DDD>\n"
+" <EEE/>\n"
+" <FFF>\n"
+" <HHH/>\n"
+" <GGG>\n"
+" <JJJ>\n"
+" <QQQ/>\n"
+" </JJJ>\n"
+" <JJJ/>\n"
+" </GGG>\n"
+" <HHH/>\n"
+" </FFF>\n"
+" </DDD>\n"
+" </XXX>\n"
+" <CCC>\n"
+" <DDD/>\n"
+" </CCC>\n"
+" </AAA>\n"
+},
+
+{
+"//BBB[position() mod 2 = 0 ]",
+"Select even BBB elements",
+" <AAA>\n"
+" <BBB/>\n"
+" <BBB/>\n"
+" <BBB/>\n"
+" <BBB/>\n"
+" <BBB/>\n"
+" <BBB/>\n"
+" <BBB/>\n"
+" <BBB/>\n"
+" <CCC/>\n"
+" <CCC/>\n"
+" <CCC/>\n"
+" </AAA>\n"
+},
+
+{
+"//BBB[ position() = floor(last() div 2 + 0.5) or position() = ceiling(last() div 2 + 0.5) ]",
+"Select middle BBB element(s)",
+" <AAA>\n"
+" <BBB/>\n"
+" <BBB/>\n"
+" <BBB/>\n"
+" <BBB/>\n"
+" <BBB/>\n"
+" <BBB/>\n"
+" <BBB/>\n"
+" <BBB/>\n"
+" <CCC/>\n"
+" <CCC/>\n"
+" <CCC/>\n"
+" </AAA>\n"
+},
+
+{
+"//CCC[ position() = floor(last() div 2 + 0.5) or position() = ceiling(last() div 2 + 0.5) ]",
+"Select middle CCC element(s)",
+" <AAA>\n"
+" <BBB/>\n"
+" <BBB/>\n"
+" <BBB/>\n"
+" <BBB/>\n"
+" <BBB/>\n"
+" <BBB/>\n"
+" <BBB/>\n"
+" <BBB/>\n"
+" <CCC/>\n"
+" <CCC/>\n"
+" <CCC/>\n"
+" </AAA>\n"
+},
+
+{ //end data
+NULL,
+NULL,
+NULL,
+}
+
+};
+
+
+
+bool doStringTest(char *str)
+{
+ XPathParser xp;
+ xp.setDebug(true);
+
+ if (!xp.parse(str))
+ return false;
+
+
+ return true;
+}
+
+
+
+bool doStringTests()
+{
+ for (XpathTest *xpt = xpathTests ; xpt->xpathStr ; xpt++)
+ {
+ if (!doStringTest(xpt->xpathStr))
+ return false;
+ }
+ return true;
+}
+
+void dumpDoc(Document *doc)
+{
+ ls::DOMImplementationLSImpl domImpl;
+ ls::LSSerializer &serializer = domImpl.createLSSerializer();
+ ls::LSOutput output = domImpl.createLSOutput();
+ io::StdWriter writer;
+ output.setCharacterStream(&writer);
+ serializer.write(doc, output);
+}
+
+
+bool doXmlTest(XpathTest *xpt)
+{
+ //### READ
+ ls::DOMImplementationLSImpl domImpl;
+ ls::LSInput input = domImpl.createLSInput();
+ ls::LSParser &parser = domImpl.createLSParser(0, "");
+ input.setStringData(xpt->xml);
+ Document *doc = parser.parse(input);
+
+ //### XPATH
+ XPathParser xp;
+ xp.setDebug(true);
+
+ org::w3c::dom::NodeList list = xp.evaluate(doc, xpt->xpathStr);
+ for (unsigned int i=0 ; i<list.getLength() ; i++)
+ {
+ org::w3c::dom::Node *n = list.item(i);
+ }
+
+ //dumpDoc(doc);
+
+ delete doc;
+ return true;
+}
+
+bool doXmlTests()
+{
+ for (XpathTest *xpt = xpathTests ; xpt->xpathStr ; xpt++)
+ {
+ if (!doXmlTest(xpt))
+ return false;
+ }
+ return true;
+}
+
+bool doTests()
+{
+ /*
+ if (!doStringTests())
+ {
+ printf("## Failed string tests\n");
+ return false;
+ }
+ */
+ if (!doXmlTests())
+ {
+ printf("## Failed xml tests\n");
+ return false;
+ }
+ return true;
+}
+
+
+
+int main(int argc, char **argv)
+{
+ doTests();
+ return 0;
+}
diff --git a/src/dom/work/testzip.cpp b/src/dom/work/testzip.cpp
new file mode 100644
index 000000000..5a1f38960
--- /dev/null
+++ b/src/dom/work/testzip.cpp
@@ -0,0 +1,65 @@
+/**
+ * Phoebe DOM Implementation.
+ *
+ * This is a C++ approximation of the W3C DOM model, which follows
+ * fairly closely the specifications in the various .idl files, copies of
+ * which are provided for reference. Most important is this one:
+ *
+ * http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/idl-definitions.html
+ *
+ * Authors:
+ * Bob Jamison
+ *
+ * Copyright (C) 2006 Bob Jamison
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <stdio.h>
+
+
+#include "io/uristream.h"
+#include "util/ziptool.h"
+
+
+
+bool doTest()
+{
+ org::w3c::dom::io::UriInputStream ins("file:work/test.odg");
+
+ std::vector<unsigned char>inbuf;
+
+ while (true)
+ {
+ int ch = ins.get();
+ if (ch < 0)
+ break;
+ inbuf.push_back(ch);
+ }
+ ZipFile zf;
+ if (!zf.readBuffer(inbuf))
+ {
+ return false;
+ }
+ return true;
+}
+
+
+int main(int argc, char **argv)
+{
+ doTest();
+}
+
+
diff --git a/src/dom/work/traversal.idl b/src/dom/work/traversal.idl
new file mode 100644
index 000000000..660f4577d
--- /dev/null
+++ b/src/dom/work/traversal.idl
@@ -0,0 +1,102 @@
+/*
+ * Copyright (c) 2000 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program 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 W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+// File: http://www.w3.org/TR/2000/REC-DOM-Level-2-Traversal-Range-20001113/traversal.idl
+
+#ifndef _TRAVERSAL_IDL_
+#define _TRAVERSAL_IDL_
+
+#include "dom.idl"
+
+#pragma prefix "dom.w3c.org"
+module traversal
+{
+
+ typedef dom::Node Node;
+
+ interface NodeFilter;
+
+ // Introduced in DOM Level 2:
+ interface NodeIterator {
+ readonly attribute Node root;
+ readonly attribute unsigned long whatToShow;
+ readonly attribute NodeFilter filter;
+ readonly attribute boolean expandEntityReferences;
+ Node nextNode()
+ raises(dom::DOMException);
+ Node previousNode()
+ raises(dom::DOMException);
+ void detach();
+ };
+
+ // Introduced in DOM Level 2:
+ interface NodeFilter {
+
+ // Constants returned by acceptNode
+ const short FILTER_ACCEPT = 1;
+ const short FILTER_REJECT = 2;
+ const short FILTER_SKIP = 3;
+
+
+ // Constants for whatToShow
+ const unsigned long SHOW_ALL = 0xFFFFFFFF;
+ const unsigned long SHOW_ELEMENT = 0x00000001;
+ const unsigned long SHOW_ATTRIBUTE = 0x00000002;
+ const unsigned long SHOW_TEXT = 0x00000004;
+ const unsigned long SHOW_CDATA_SECTION = 0x00000008;
+ const unsigned long SHOW_ENTITY_REFERENCE = 0x00000010;
+ const unsigned long SHOW_ENTITY = 0x00000020;
+ const unsigned long SHOW_PROCESSING_INSTRUCTION = 0x00000040;
+ const unsigned long SHOW_COMMENT = 0x00000080;
+ const unsigned long SHOW_DOCUMENT = 0x00000100;
+ const unsigned long SHOW_DOCUMENT_TYPE = 0x00000200;
+ const unsigned long SHOW_DOCUMENT_FRAGMENT = 0x00000400;
+ const unsigned long SHOW_NOTATION = 0x00000800;
+
+ short acceptNode(in Node n);
+ };
+
+ // Introduced in DOM Level 2:
+ interface TreeWalker {
+ readonly attribute Node root;
+ readonly attribute unsigned long whatToShow;
+ readonly attribute NodeFilter filter;
+ readonly attribute boolean expandEntityReferences;
+ attribute Node currentNode;
+ // raises(dom::DOMException) on setting
+
+ Node parentNode();
+ Node firstChild();
+ Node lastChild();
+ Node previousSibling();
+ Node nextSibling();
+ Node previousNode();
+ Node nextNode();
+ };
+
+ // Introduced in DOM Level 2:
+ interface DocumentTraversal {
+ NodeIterator createNodeIterator(in Node root,
+ in unsigned long whatToShow,
+ in NodeFilter filter,
+ in boolean entityReferenceExpansion)
+ raises(dom::DOMException);
+ TreeWalker createTreeWalker(in Node root,
+ in unsigned long whatToShow,
+ in NodeFilter filter,
+ in boolean entityReferenceExpansion)
+ raises(dom::DOMException);
+ };
+};
+
+#endif // _TRAVERSAL_IDL_
+
diff --git a/src/dom/work/views.idl b/src/dom/work/views.idl
new file mode 100644
index 000000000..3cc74512c
--- /dev/null
+++ b/src/dom/work/views.idl
@@ -0,0 +1,254 @@
+/*
+ * Copyright (c) 2004 World Wide Web Consortium,
+ *
+ * (Massachusetts Institute of Technology, European Research Consortium for
+ * Informatics and Mathematics, Keio University). All Rights Reserved. This
+ * work is distributed under the W3C(r) Software License [1] 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.
+ *
+ * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+ */
+
+// File: http://www.w3.org/TR/2004/NOTE-DOM-Level-3-Views-20040226/views.idl
+
+#ifndef _VIEWS_IDL_
+#define _VIEWS_IDL_
+
+#include "dom.idl"
+
+#pragma prefix "dom.w3c.org"
+module views
+{
+
+ typedef dom::Node Node;
+ typedef dom::DOMString DOMString;
+
+ interface Segment;
+ interface VisualResource;
+ interface VisualCharacter;
+ interface VisualCharacterRun;
+ interface VisualFrame;
+ interface VisualImage;
+ interface VisualFormButton;
+ interface VisualFormField;
+
+ // Introduced in DOM Level 3:
+ interface View {
+ void select(in Node boundary,
+ in unsigned long offset,
+ in boolean extend,
+ in boolean add);
+ Segment createSegment();
+ boolean matchFirstSegment(inout Segment todo)
+ raises(dom::DOMException);
+ long getIntegerProperty(in DOMString name)
+ raises(dom::DOMException);
+ DOMString getStringProperty(in DOMString name)
+ raises(dom::DOMException);
+ boolean getBooleanProperty(in boolean name)
+ raises(dom::DOMException);
+ Node getContentPropertyNode(in DOMString name)
+ raises(dom::DOMException);
+ unsigned long getContentPropertyOffset(in DOMString name)
+ raises(dom::DOMException);
+ };
+
+ // Introduced in DOM Level 3:
+ interface Match {
+
+ // MatchTestGroup
+ const unsigned short IS_EQUAL = 0;
+ const unsigned short IS_NOT_EQUAL = 1;
+ const unsigned short INT_PRECEDES = 2;
+ const unsigned short INT_PRECEDES_OR_EQUALS = 3;
+ const unsigned short INT_FOLLOWS = 4;
+ const unsigned short INT_FOLLOWS_OR_EQUALS = 5;
+ const unsigned short STR_STARTS_WITH = 6;
+ const unsigned short STR_ENDS_WITH = 7;
+ const unsigned short STR_CONTAINS = 8;
+ const unsigned short SET_ANY = 9;
+ const unsigned short SET_ALL = 10;
+ const unsigned short SET_NOT_ANY = 11;
+ const unsigned short SET_NOT_ALL = 12;
+
+ readonly attribute unsigned short test;
+ };
+
+ // Introduced in DOM level 3:
+ interface MatchString : Match {
+ readonly attribute DOMString name;
+ readonly attribute DOMString value;
+ };
+
+ // Introduced in DOM level 3:
+ interface MatchInteger : Match {
+ readonly attribute DOMString name;
+ readonly attribute long value;
+ };
+
+ // Introduced in DOM level 3:
+ interface MatchBoolean : Match {
+ readonly attribute DOMString name;
+ readonly attribute boolean value;
+ };
+
+ // Introduced in DOM level 3:
+ interface MatchContent : Match {
+ readonly attribute DOMString name;
+ readonly attribute Node nodeArg;
+ readonly attribute unsigned long offset;
+ };
+
+ // Introduced in DOM level 3:
+ interface MatchSet : Match {
+ readonly attribute Node nodeArg;
+ void addMatch(in Match add);
+ Match getMatch(in unsigned long index);
+ };
+
+ // Introduced in DOM Level 3:
+ interface Item {
+ readonly attribute boolean exists;
+ readonly attribute DOMString name;
+ };
+
+ // Introduced in DOM Level 3:
+ interface StringItem : Item {
+ readonly attribute DOMString value;
+ };
+
+ // Introduced in DOM Level 3:
+ interface IntegerItem : Item {
+ readonly attribute long value;
+ };
+
+ // Introduced in DOM Level 3:
+ interface BooleanItem : Item {
+ attribute boolean value;
+ };
+
+ // Introduced in DOM Level 3:
+ interface ContentItem : Item {
+ attribute Node nodeArg;
+ attribute unsigned long offset;
+ };
+
+ interface VisualView {
+ readonly attribute DOMString fontScheme;
+ readonly attribute unsigned long width;
+ readonly attribute unsigned long height;
+ readonly attribute unsigned long horizontalDPI;
+ readonly attribute unsigned long verticalDPI;
+ VisualCharacter createVisualCharacter();
+ VisualCharacterRun createVisualCharacterRun();
+ VisualFrame createVisualFrame();
+ VisualImage createVisualImage();
+ VisualFormButton createVisualFormButton();
+ VisualFormField createVisualFormField();
+ void select(in Node boundary,
+ in unsigned long offset,
+ in boolean extend,
+ in boolean add);
+ void matchSegment(in VisualResource segment);
+ };
+
+ interface VisualResource {
+ };
+
+ interface VisualFont : VisualResource {
+ attribute DOMString matchFontName;
+ readonly attribute boolean exists;
+ readonly attribute DOMString fontName;
+ boolean getNext();
+ };
+
+ interface VisualSegment : VisualResource {
+ attribute boolean matchPosition;
+ attribute boolean matchInside;
+ attribute boolean matchContaining;
+ attribute long matchX;
+ attribute long matchY;
+ attribute long matchXR;
+ attribute long matchYR;
+ attribute boolean matchContent;
+ attribute boolean matchRange;
+ attribute Node matchNode;
+ attribute unsigned long matchOffset;
+ attribute Node matchNodeR;
+ attribute unsigned long matchOffsetR;
+ attribute boolean matchContainsSelected;
+ attribute boolean matchContainsVisible;
+ readonly attribute boolean exists;
+ readonly attribute Node startNode;
+ readonly attribute unsigned long startOffset;
+ readonly attribute Node endNode;
+ readonly attribute unsigned long endOffset;
+ readonly attribute long topOffset;
+ readonly attribute long bottomOffset;
+ readonly attribute long leftOffset;
+ readonly attribute long rightOffset;
+ readonly attribute unsigned long width;
+ readonly attribute unsigned long height;
+ readonly attribute boolean selected;
+ readonly attribute boolean visible;
+ readonly attribute unsigned long foregroundColor;
+ readonly attribute unsigned long backgroundColor;
+ readonly attribute DOMString fontName;
+ readonly attribute DOMString fontHeight;
+ boolean getNext();
+ };
+
+ interface VisualCharacter : VisualSegment {
+ };
+
+ interface VisualCharacterRun : VisualSegment {
+ };
+
+ interface VisualFrame : VisualSegment {
+ readonly attribute VisualSegment embedded;
+ };
+
+ interface VisualImage : VisualSegment {
+ readonly attribute DOMString imageURL;
+ readonly attribute boolean isLoaded;
+ };
+
+ interface VisualFormButton : VisualSegment {
+ readonly attribute boolean isPressed;
+ };
+
+ interface VisualFormField : VisualSegment {
+ readonly attribute DOMString formValue;
+ };
+
+ // Introduced in DOM Level 3:
+ interface Segment : Match {
+ attribute Match criteria;
+ attribute DOMString order;
+ void addItem(in Item add);
+ MatchString createMatchString(in unsigned short test,
+ in DOMString name,
+ in DOMString value);
+ MatchInteger createMatchInteger(in unsigned short test,
+ in DOMString name,
+ in long value);
+ MatchBoolean createMatchBoolean(in unsigned short test,
+ in DOMString name,
+ in boolean value);
+ MatchContent createMatchContent(in unsigned short test,
+ in DOMString name,
+ in unsigned long offset,
+ in Node nodeArg);
+ MatchSet createMatchSet(in unsigned short test);
+ StringItem createStringItem(in DOMString name);
+ IntegerItem createIntegerItem(in DOMString name);
+ BooleanItem createBooleanItem(in DOMString name);
+ ContentItem createContentItem(in DOMString name);
+ void getItem(in unsigned long index);
+ boolean getNext();
+ };
+};
+
+#endif // _VIEWS_IDL_
+
diff --git a/src/dom/work/xpath.idl b/src/dom/work/xpath.idl
new file mode 100644
index 000000000..066f064b0
--- /dev/null
+++ b/src/dom/work/xpath.idl
@@ -0,0 +1,115 @@
+/*
+ * Copyright (c) 2004 World Wide Web Consortium,
+ *
+ * (Massachusetts Institute of Technology, European Research Consortium for
+ * Informatics and Mathematics, Keio University). All Rights Reserved. This
+ * work is distributed under the W3C(r) Software License [1] 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.
+ *
+ * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+ */
+
+// File: http://www.w3.org/TR/2004/NOTE-DOM-Level-3-XPath-20040226/xpath.idl
+
+#ifndef _XPATH_IDL_
+#define _XPATH_IDL_
+
+#include "dom.idl"
+
+#pragma prefix "dom.w3c.org"
+module xpath
+{
+
+ typedef dom::DOMString DOMString;
+ typedef dom::Node Node;
+ typedef dom::DOMObject DOMObject;
+ typedef dom::Element Element;
+
+ interface XPathNSResolver;
+ interface XPathExpression;
+
+ exception XPathException {
+ unsigned short code;
+ };
+ // XPathExceptionCode
+ const unsigned short INVALID_EXPRESSION_ERR = 51;
+ const unsigned short TYPE_ERR = 52;
+
+
+ interface XPathEvaluator {
+ XPathExpression createExpression(in DOMString expression,
+ in XPathNSResolver resolver)
+ raises(XPathException,
+ dom::DOMException);
+ XPathNSResolver createNSResolver(in Node nodeResolver);
+ DOMObject evaluate(in DOMString expression,
+ in Node contextNode,
+ in XPathNSResolver resolver,
+ in unsigned short type,
+ in DOMObject result)
+ raises(XPathException,
+ dom::DOMException);
+ };
+
+ interface XPathExpression {
+ DOMObject evaluate(in Node contextNode,
+ in unsigned short type,
+ in DOMObject result)
+ raises(XPathException,
+ dom::DOMException);
+ };
+
+ interface XPathNSResolver {
+ DOMString lookupNamespaceURI(in DOMString prefix);
+ };
+
+ interface XPathResult {
+
+ // XPathResultType
+ const unsigned short ANY_TYPE = 0;
+ const unsigned short NUMBER_TYPE = 1;
+ const unsigned short STRING_TYPE = 2;
+ const unsigned short BOOLEAN_TYPE = 3;
+ const unsigned short UNORDERED_NODE_ITERATOR_TYPE = 4;
+ const unsigned short ORDERED_NODE_ITERATOR_TYPE = 5;
+ const unsigned short UNORDERED_NODE_SNAPSHOT_TYPE = 6;
+ const unsigned short ORDERED_NODE_SNAPSHOT_TYPE = 7;
+ const unsigned short ANY_UNORDERED_NODE_TYPE = 8;
+ const unsigned short FIRST_ORDERED_NODE_TYPE = 9;
+
+ readonly attribute unsigned short resultType;
+ readonly attribute double numberValue;
+ // raises(XPathException) on retrieval
+
+ readonly attribute DOMString stringValue;
+ // raises(XPathException) on retrieval
+
+ readonly attribute boolean booleanValue;
+ // raises(XPathException) on retrieval
+
+ readonly attribute Node singleNodeValue;
+ // raises(XPathException) on retrieval
+
+ readonly attribute boolean invalidIteratorState;
+ readonly attribute unsigned long snapshotLength;
+ // raises(XPathException) on retrieval
+
+ Node iterateNext()
+ raises(XPathException,
+ dom::DOMException);
+ Node snapshotItem(in unsigned long index)
+ raises(XPathException);
+ };
+
+ interface XPathNamespace : Node {
+
+ // XPathNodeType
+ const unsigned short XPATH_NAMESPACE_NODE = 13;
+
+ readonly attribute Element ownerElement;
+ };
+};
+
+#endif // _XPATH_IDL_
+
diff --git a/src/dom/work/xpathtests.cpp b/src/dom/work/xpathtests.cpp
new file mode 100644
index 000000000..65b832e71
--- /dev/null
+++ b/src/dom/work/xpathtests.cpp
@@ -0,0 +1,1290 @@
+/**
+ * Phoebe DOM Implementation.
+ *
+ * This is a C++ approximation of the W3C DOM model, which follows
+ * fairly closely the specifications in the various .idl files, copies of
+ * which are provided for reference. Most important is this one:
+ *
+ * http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/idl-definitions.html
+ *
+ * Authors:
+ * Bob Jamison
+ *
+ * Copyright (C) 2005 Bob Jamison
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+
+
+typedef struct
+{
+ char *xpathStr;
+ char *desc;
+ char *xml;
+} XpathTest;
+
+XpathTest xpathTests[] =
+{
+
+{
+"/AAA",
+"Select the root element AAA",
+" <AAA>"
+" <BBB/>"
+" <CCC/>"
+" <BBB/>"
+" <BBB/>"
+" <DDD>"
+" <BBB/>"
+" </DDD>"
+" <CCC/>"
+" </AAA>"
+},
+
+{
+"/AAA/CCC",
+"Select all elements CCC which are children of the root element AAA",
+" <AAA>"
+" <BBB/>"
+" <CCC/>"
+" <BBB/>"
+" <BBB/>"
+" <DDD>"
+" <BBB/>"
+" </DDD>"
+" <CCC/>"
+" </AAA>"
+},
+
+{
+"/AAA/DDD/BBB",
+"Select all elements BBB which are children of DDD which are children of the root element AAA",
+" <AAA>"
+" <BBB/>"
+" <CCC/>"
+" <BBB/>"
+" <BBB/>"
+" <DDD>"
+" <BBB/>"
+" </DDD>"
+" <CCC/>"
+" </AAA>"
+"//BBB",
+},
+
+{
+"Select all elements BBB",
+" <AAA>"
+" <BBB/>"
+" <CCC/>"
+" <BBB/>"
+" <DDD>"
+" <BBB/>"
+" </DDD>"
+" <CCC>"
+" <DDD>"
+" <BBB/>"
+" <BBB/>"
+" </DDD>"
+" </CCC>"
+" </AAA>"
+},
+
+{
+"//DDD/BBB",
+"Select all elements BBB which are children of DDD",
+" <AAA>"
+" <BBB/>"
+" <CCC/>"
+" <BBB/>"
+" <DDD>"
+" <BBB/>"
+" </DDD>"
+" <CCC>"
+" <DDD>"
+" <BBB/>"
+" <BBB/>"
+" </DDD>"
+" </CCC>"
+" </AAA>"
+},
+
+{
+"/AAA/CCC/DDD/*",
+"Select all elements enclosed by elements /AAA/CCC/DDD",
+" <AAA>"
+" <XXX>"
+" <DDD>"
+" <BBB/>"
+" <BBB/>"
+" <EEE/>"
+" <FFF/>"
+" </DDD>"
+" </XXX>"
+" <CCC>"
+" <DDD>"
+" <BBB/>"
+" <BBB/>"
+" <EEE/>"
+" <FFF/>"
+" </DDD>"
+" </CCC>"
+" <CCC>"
+" <BBB>"
+" <BBB>"
+" <BBB/>"
+" </BBB>"
+" </BBB>"
+" </CCC>"
+" </AAA>"
+},
+
+{
+"/*/*/*/BBB",
+"Select all elements BBB which have 3 ancestors",
+" <AAA>"
+" <XXX>"
+" <DDD>"
+" <BBB/>"
+" <BBB/>"
+" <EEE/>"
+" <FFF/>"
+" </DDD>"
+" </XXX>"
+" <CCC>"
+" <DDD>"
+" <BBB/>"
+" <BBB/>"
+" <EEE/>"
+" <FFF/>"
+" </DDD>"
+" </CCC>"
+" <CCC>"
+" <BBB>"
+" <BBB>"
+" <BBB/>"
+" </BBB>"
+" </BBB>"
+" </CCC>"
+" </AAA>"
+},
+
+{
+"//*",
+"Select all elements",
+" <AAA>"
+" <XXX>"
+" <DDD>"
+" <BBB/>"
+" <BBB/>"
+" <EEE/>"
+" <FFF/>"
+" </DDD>"
+" </XXX>"
+" <CCC>"
+" <DDD>"
+" <BBB/>"
+" <BBB/>"
+" <EEE/>"
+" <FFF/>"
+" </DDD>"
+" </CCC>"
+" <CCC>"
+" <BBB>"
+" <BBB>"
+" <BBB/>"
+" </BBB>"
+" </BBB>"
+" </CCC>"
+" </AAA>"
+},
+
+{
+"/AAA/BBB[1]",
+"Select the first BBB child of element AAA",
+" <AAA>"
+" <BBB/>"
+" <BBB/>"
+" <BBB/>"
+" <BBB/>"
+" </AAA>"
+},
+
+{
+"/AAA/BBB[last()]",
+"Select the last BBB child of element AAA",
+" <AAA>"
+" <BBB/>"
+" <BBB/>"
+" <BBB/>"
+" <BBB/>"
+" </AAA>"
+},
+
+{
+"//@id",
+"Select all attributes @id",
+" <AAA>"
+" <BBB id = 'b1'/>"
+" <BBB id = 'b2'/>"
+" <BBB name = 'bbb'/>"
+" <BBB/>"
+" </AAA>"
+},
+
+{
+"//BBB[@id]",
+"Select BBB elements which have attribute id",
+" <AAA>"
+" <BBB id = 'b1'/>"
+" <BBB id = 'b2'/>"
+" <BBB name = 'bbb'/>"
+" <BBB/>"
+" </AAA>"
+},
+
+{
+"//BBB[@name]",
+"Select BBB elements which have attribute name",
+" <AAA>"
+" <BBB id = 'b1'/>"
+" <BBB id = 'b2'/>"
+" <BBB name = 'bbb'/>"
+" <BBB/>"
+" </AAA>"
+},
+
+{
+"//BBB[@*]",
+"Select BBB elements which have any attribute",
+" <AAA>"
+" <BBB id = 'b1'/>"
+" <BBB id = 'b2'/>"
+" <BBB name = 'bbb'/>"
+" <BBB/>"
+" </AAA>"
+},
+
+{
+"//BBB[not(@*)]",
+"Select BBB elements without an attribute",
+" <AAA>"
+" <BBB id = 'b1'/>"
+" <BBB id = 'b2'/>"
+" <BBB name = 'bbb'/>"
+" <BBB/>"
+" </AAA>"
+},
+
+{
+"//BBB[@id='b1']",
+"Select BBB elements which have attribute id with value b1",
+" <AAA>"
+" <BBB id = 'b1'/>"
+" <BBB name = ' bbb '/>"
+" <BBB name = 'bbb'/>"
+" </AAA>"
+},
+
+{
+"//BBB[@name='bbb']",
+"Select BBB elements which have attribute name with value 'bbb'",
+" <AAA>"
+" <BBB id = 'b1'/>"
+" <BBB name = ' bbb '/>"
+" <BBB name = 'bbb'/>"
+" </AAA>"
+},
+
+{
+"//BBB[normalize-space(@name)='bbb']",
+"Select BBB elements which have attribute name with value bbb, leading and trailing spaces are removed before comparison",
+" <AAA>"
+" <BBB id = 'b1'/>"
+" <BBB name = ' bbb '/>"
+" <BBB name = 'bbb'/>"
+" </AAA>"
+},
+
+{
+"//*[count(BBB)=2]",
+"Select elements which have two children BBB",
+" <AAA>"
+" <CCC>"
+" <BBB/>"
+" <BBB/>"
+" <BBB/>"
+" </CCC>"
+" <DDD>"
+" <BBB/>"
+" <BBB/>"
+" </DDD>"
+" <EEE>"
+" <CCC/>"
+" <DDD/>"
+" </EEE>"
+" </AAA>"
+},
+
+{
+"//*[count(*)=2]",
+"Select elements which have 2 children",
+" <AAA>"
+" <CCC>"
+" <BBB/>"
+" <BBB/>"
+" <BBB/>"
+" </CCC>"
+" <DDD>"
+" <BBB/>"
+" <BBB/>"
+" </DDD>"
+" <EEE>"
+" <CCC/>"
+" <DDD/>"
+" </EEE>"
+" </AAA>"
+},
+
+{
+"//*[count(*)=3]",
+"Select elements which have 3 children",
+" <AAA>"
+" <CCC>"
+" <BBB/>"
+" <BBB/>"
+" <BBB/>"
+" </CCC>"
+" <DDD>"
+" <BBB/>"
+" <BBB/>"
+" </DDD>"
+" <EEE>"
+" <CCC/>"
+" <DDD/>"
+" </EEE>"
+" </AAA>"
+},
+
+{
+"//*[name()='BBB']",
+"Select all elements with name BBB, equivalent with //BBB",
+" <AAA>"
+" <BCC>"
+" <BBB/>"
+" <BBB/>"
+" <BBB/>"
+" </BCC>"
+" <DDB>"
+" <BBB/>"
+" <BBB/>"
+" </DDB>"
+" <BEC>"
+" <CCC/>"
+" <DBD/>"
+" </BEC>"
+" </AAA>"
+},
+
+{
+"//*[starts-with(name(),'B')]",
+"Select all elements name of which starts with letter B",
+" <AAA>"
+" <BCC>"
+" <BBB/>"
+" <BBB/>"
+" <BBB/>"
+" </BCC>"
+" <DDB>"
+" <BBB/>"
+" <BBB/>"
+" </DDB>"
+" <BEC>"
+" <CCC/>"
+" <DBD/>"
+" </BEC>"
+" </AAA>"
+},
+
+{
+"//*[contains(name(),'C')]",
+"Select all elements name of which contain letter C",
+" <AAA>"
+" <BCC>"
+" <BBB/>"
+" <BBB/>"
+" <BBB/>"
+" </BCC>"
+" <DDB>"
+" <BBB/>"
+" <BBB/>"
+" </DDB>"
+" <BEC>"
+" <CCC/>"
+" <DBD/>"
+" </BEC>"
+" </AAA>"
+},
+
+{
+"//*[string-length(name()) = 3]",
+"Select elements with three-letter name",
+" <AAA>"
+" <Q/>"
+" <SSSS/>"
+" <BB/>"
+" <CCC/>"
+" <DDDDDDDD/>"
+" <EEEE/>"
+" </AAA>"
+},
+
+{
+"//*[string-length(name()) < 3]",
+"Select elements name of which has one or two characters",
+" <AAA>"
+" <Q/>"
+" <SSSS/>"
+" <BB/>"
+" <CCC/>"
+" <DDDDDDDD/>"
+" <EEEE/>"
+" </AAA>"
+},
+
+{
+"//*[string-length(name()) > 3]",
+"Select elements with name longer than three characters",
+" <AAA>"
+" <Q/>"
+" <SSSS/>"
+" <BB/>"
+" <CCC/>"
+" <DDDDDDDD/>"
+" <EEEE/>"
+" </AAA>"
+},
+
+{
+"//CCC | //BBB",
+"Select all elements CCC and BBB",
+" <AAA>"
+" <BBB/>"
+" <CCC/>"
+" <DDD>"
+" <CCC/>"
+" </DDD>"
+" <EEE/>"
+" </AAA>"
+},
+
+{
+"/AAA/EEE | //BBB",
+"Select all elements BBB and elements EEE which are children of root element AAA",
+" <AAA>"
+" <BBB/>"
+" <CCC/>"
+" <DDD>"
+" <CCC/>"
+" </DDD>"
+" <EEE/>"
+" </AAA>"
+},
+
+{
+"/AAA/EEE | //DDD/CCC | /AAA | //BBB",
+"Number of combinations is not restricted",
+" <AAA>"
+" <BBB/>"
+" <CCC/>"
+" <DDD>"
+" <CCC/>"
+" </DDD>"
+" <EEE/>"
+" </AAA>"
+},
+
+{
+"/AAA",
+"Equivalent of /child::AAA",
+" <AAA>"
+" <BBB/>"
+" <CCC/>"
+" </AAA>"
+},
+
+{
+"/child::AAA",
+"Equivalent of /AAA",
+" <AAA>"
+" <BBB/>"
+" <CCC/>"
+" </AAA>"
+},
+
+{
+"/AAA/BBB",
+"Equivalent of /child::AAA/child::BBB",
+" <AAA>"
+" <BBB/>"
+" <CCC/>"
+" </AAA>"
+},
+
+{
+"/child::AAA/child::BBB",
+"Equivalent of /AAA/BBB",
+" <AAA>"
+" <BBB/>"
+" <CCC/>"
+" </AAA>"
+},
+
+{
+"/child::AAA/BBB",
+"Both possibilities can be combined",
+" <AAA>"
+" <BBB/>"
+" <CCC/>"
+" </AAA>"
+},
+
+{
+"/descendant::*",
+"Select all descendants of document root and therefore all elements",
+" <AAA>"
+" <BBB>"
+" <DDD>"
+" <CCC>"
+" <DDD/>"
+" <EEE/>"
+" </CCC>"
+" </DDD>"
+" </BBB>"
+" <CCC>"
+" <DDD>"
+" <EEE>"
+" <DDD>"
+" <FFF/>"
+" </DDD>"
+" </EEE>"
+" </DDD>"
+" </CCC>"
+" </AAA>"
+},
+
+{
+"/AAA/BBB/descendant::*",
+"Select all descendants of /AAA/BBB",
+" <AAA>"
+" <BBB>"
+" <DDD>"
+" <CCC>"
+" <DDD/>"
+" <EEE/>"
+" </CCC>"
+" </DDD>"
+" </BBB>"
+" <CCC>"
+" <DDD>"
+" <EEE>"
+" <DDD>"
+" <FFF/>"
+" </DDD>"
+" </EEE>"
+" </DDD>"
+" </CCC>"
+" </AAA>"
+},
+
+{
+"//CCC/descendant::*",
+"Select all elements which have CCC among its ancestors",
+" <AAA>"
+" <BBB>"
+" <DDD>"
+" <CCC>"
+" <DDD/>"
+" <EEE/>"
+" </CCC>"
+" </DDD>"
+" </BBB>"
+" <CCC>"
+" <DDD>"
+" <EEE>"
+" <DDD>"
+" <FFF/>"
+" </DDD>"
+" </EEE>"
+" </DDD>"
+" </CCC>"
+" </AAA>"
+},
+
+{
+"//CCC/descendant::DDD",
+"Select elements DDD which have CCC among its ancestors",
+" <AAA>"
+" <BBB>"
+" <DDD>"
+" <CCC>"
+" <DDD/>"
+" <EEE/>"
+" </CCC>"
+" </DDD>"
+" </BBB>"
+" <CCC>"
+" <DDD>"
+" <EEE>"
+" <DDD>"
+" <FFF/>"
+" </DDD>"
+" </EEE>"
+" </DDD>"
+" </CCC>"
+" </AAA>"
+},
+
+{
+"//DDD/parent::*",
+"Select all parents of DDD element",
+" <AAA>"
+" <BBB>"
+" <DDD>"
+" <CCC>"
+" <DDD/>"
+" <EEE/>"
+" </CCC>"
+" </DDD>"
+" </BBB>"
+" <CCC>"
+" <DDD>"
+" <EEE>"
+" <DDD>"
+" <FFF/>"
+" </DDD>"
+" </EEE>"
+" </DDD>"
+" </CCC>"
+" </AAA>"
+},
+
+{
+"/AAA/BBB/DDD/CCC/EEE/ancestor::*",
+"Select all elements given in this absolute path",
+" <AAA>"
+" <BBB>"
+" <DDD>"
+" <CCC>"
+" <DDD/>"
+" <EEE/>"
+" </CCC>"
+" </DDD>"
+" </BBB>"
+" <CCC>"
+" <DDD>"
+" <EEE>"
+" <DDD>"
+" <FFF/>"
+" </DDD>"
+" </EEE>"
+" </DDD>"
+" </CCC>"
+" </AAA>"
+},
+
+{
+"//FFF/ancestor::*",
+"Select ancestors of FFF element",
+" <AAA>"
+" <BBB>"
+" <DDD>"
+" <CCC>"
+" <DDD/>"
+" <EEE/>"
+" </CCC>"
+" </DDD>"
+" </BBB>"
+" <CCC>"
+" <DDD>"
+" <EEE>"
+" <DDD>"
+" <FFF/>"
+" </DDD>"
+" </EEE>"
+" </DDD>"
+" </CCC>"
+" </AAA>"
+},
+
+{
+"/AAA/BBB/following-sibling::*",
+"The following-sibling axis contains all the following siblings of the context node.",
+" <AAA>"
+" <BBB>"
+" <CCC/>"
+" <DDD/>"
+" </BBB>"
+" <XXX>"
+" <DDD>"
+" <EEE/>"
+" <DDD/>"
+" <CCC/>"
+" <FFF/>"
+" <FFF>"
+" <GGG/>"
+" </FFF>"
+" </DDD>"
+" </XXX>"
+" <CCC>"
+" <DDD/>"
+" </CCC>"
+" </AAA>"
+},
+
+{
+"//CCC/following-sibling::*",
+"The following-sibling axis contains all the following siblings of the context node.",
+" <AAA>"
+" <BBB>"
+" <CCC/>"
+" <DDD/>"
+" </BBB>"
+" <XXX>"
+" <DDD>"
+" <EEE/>"
+" <DDD/>"
+" <CCC/>"
+" <FFF/>"
+" <FFF>"
+" <GGG/>"
+" </FFF>"
+" </DDD>"
+" </XXX>"
+" <CCC>"
+" <DDD/>"
+" </CCC>"
+" </AAA>"
+},
+
+{
+"/AAA/XXX/preceding-sibling::*",
+"The preceding-sibling axis contains all the preceding siblings of the context node.",
+" <AAA>"
+" <BBB>"
+" <CCC/>"
+" <DDD/>"
+" </BBB>"
+" <XXX>"
+" <DDD>"
+" <EEE/>"
+" <DDD/>"
+" <CCC/>"
+" <FFF/>"
+" <FFF>"
+" <GGG/>"
+" </FFF>"
+" </DDD>"
+" </XXX>"
+" <CCC>"
+" <DDD/>"
+" </CCC>"
+" </AAA>"
+},
+
+{
+"//CCC/preceding-sibling::*",
+" <AAA>"
+" <BBB>"
+" <CCC/>"
+" <DDD/>"
+" </BBB>"
+" <XXX>"
+" <DDD>"
+" <EEE/>"
+" <DDD/>"
+" <CCC/>"
+" <FFF/>"
+" <FFF>"
+" <GGG/>"
+" </FFF>"
+" </DDD>"
+" </XXX>"
+" <CCC>"
+" <DDD/>"
+" </CCC>"
+" </AAA>"
+},
+
+{
+"/AAA/XXX/following::*",
+"Description",
+" <AAA>"
+" <BBB>"
+" <CCC/>"
+" <ZZZ>"
+" <DDD/>"
+" <DDD>"
+" <EEE/>"
+" </DDD>"
+" </ZZZ>"
+" <FFF>"
+" <GGG/>"
+" </FFF>"
+" </BBB>"
+" <XXX>"
+" <DDD>"
+" <EEE/>"
+" <DDD/>"
+" <CCC/>"
+" <FFF/>"
+" <FFF>"
+" <GGG/>"
+" </FFF>"
+" </DDD>"
+" </XXX>"
+" <CCC>"
+" <DDD/>"
+" </CCC>"
+" </AAA>"
+},
+
+{
+"//ZZZ/following::*",
+"Description",
+" <AAA>"
+" <BBB>"
+" <CCC/>"
+" <ZZZ>"
+" <DDD/>"
+" <DDD>"
+" <EEE/>"
+" </DDD>"
+" </ZZZ>"
+" <FFF>"
+" <GGG/>"
+" </FFF>"
+" </BBB>"
+" <XXX>"
+" <DDD>"
+" <EEE/>"
+" <DDD/>"
+" <CCC/>"
+" <FFF/>"
+" <FFF>"
+" <GGG/>"
+" </FFF>"
+" </DDD>"
+" </XXX>"
+" <CCC>"
+" <DDD/>"
+" </CCC>"
+" </AAA>"
+},
+
+{
+"/AAA/XXX/preceding::*",
+"Description",
+" <AAA>"
+" <BBB>"
+" <CCC/>"
+" <ZZZ>"
+" <DDD/>"
+" </ZZZ>"
+" </BBB>"
+" <XXX>"
+" <DDD>"
+" <EEE/>"
+" <DDD/>"
+" <CCC/>"
+" <FFF/>"
+" <FFF>"
+" <GGG/>"
+" </FFF>"
+" </DDD>"
+" </XXX>"
+" <CCC>"
+" <DDD/>"
+" </CCC>"
+" </AAA>"
+},
+
+{
+"//GGG/preceding::*",
+"Description",
+" <AAA>"
+" <BBB>"
+" <CCC/>"
+" <ZZZ>"
+" <DDD/>"
+" </ZZZ>"
+" </BBB>"
+" <XXX>"
+" <DDD>"
+" <EEE/>"
+" <DDD/>"
+" <CCC/>"
+" <FFF/>"
+" <FFF>"
+" <GGG/>"
+" </FFF>"
+" </DDD>"
+" </XXX>"
+" <CCC>"
+" <DDD/>"
+" </CCC>"
+" </AAA>"
+},
+
+{
+"/AAA/XXX/descendant-or-self::*",
+"Description",
+" <AAA>"
+" <BBB>"
+" <CCC/>"
+" <ZZZ>"
+" <DDD/>"
+" </ZZZ>"
+" </BBB>"
+" <XXX>"
+" <DDD>"
+" <EEE/>"
+" <DDD/>"
+" <CCC/>"
+" <FFF/>"
+" <FFF>"
+" <GGG/>"
+" </FFF>"
+" </DDD>"
+" </XXX>"
+" <CCC>"
+" <DDD/>"
+" </CCC>"
+" </AAA>"
+},
+
+{
+"//CCC/descendant-or-self::*",
+"Description",
+" <AAA>"
+" <BBB>"
+" <CCC/>"
+" <ZZZ>"
+" <DDD/>"
+" </ZZZ>"
+" </BBB>"
+" <XXX>"
+" <DDD>"
+" <EEE/>"
+" <DDD/>"
+" <CCC/>"
+" <FFF/>"
+" <FFF>"
+" <GGG/>"
+" </FFF>"
+" </DDD>"
+" </XXX>"
+" <CCC>"
+" <DDD/>"
+" </CCC>"
+" </AAA>"
+},
+
+{
+"/AAA/XXX/DDD/EEE/ancestor-or-self::*",
+"Description",
+" <AAA>"
+" <BBB>"
+" <CCC/>"
+" <ZZZ>"
+" <DDD/>"
+" </ZZZ>"
+" </BBB>"
+" <XXX>"
+" <DDD>"
+" <EEE/>"
+" <DDD/>"
+" <CCC/>"
+" <FFF/>"
+" <FFF>"
+" <GGG/>"
+" </FFF>"
+" </DDD>"
+" </XXX>"
+" <CCC>"
+" <DDD/>"
+" </CCC>"
+" </AAA>"
+},
+
+{
+"//GGG/ancestor-or-self::*",
+"Description",
+" <AAA>"
+" <BBB>"
+" <CCC/>"
+" <ZZZ>"
+" <DDD/>"
+" </ZZZ>"
+" </BBB>"
+" <XXX>"
+" <DDD>"
+" <EEE/>"
+" <DDD/>"
+" <CCC/>"
+" <FFF/>"
+" <FFF>"
+" <GGG/>"
+" </FFF>"
+" </DDD>"
+" </XXX>"
+" <CCC>"
+" <DDD/>"
+" </CCC>"
+" </AAA>"
+},
+
+{
+"//GGG/ancestor::*",
+"Description",
+" <AAA>"
+" <BBB>"
+" <CCC/>"
+" <ZZZ/>"
+" </BBB>"
+" <XXX>"
+" <DDD>"
+" <EEE/>"
+" <FFF>"
+" <HHH/>"
+" <GGG>"
+" <JJJ>"
+" <QQQ/>"
+" </JJJ>"
+" <JJJ/>"
+" </GGG>"
+" <HHH/>"
+" </FFF>"
+" </DDD>"
+" </XXX>"
+" <CCC>"
+" <DDD/>"
+" </CCC>"
+" </AAA>"
+},
+
+{
+"//GGG/descendant::*",
+"Description",
+" <AAA>"
+" <BBB>"
+" <CCC/>"
+" <ZZZ/>"
+" </BBB>"
+" <XXX>"
+" <DDD>"
+" <EEE/>"
+" <FFF>"
+" <HHH/>"
+" <GGG>"
+" <JJJ>"
+" <QQQ/>"
+" </JJJ>"
+" <JJJ/>"
+" </GGG>"
+" <HHH/>"
+" </FFF>"
+" </DDD>"
+" </XXX>"
+" <CCC>"
+" <DDD/>"
+" </CCC>"
+" </AAA>"
+},
+
+{
+"//GGG/following::*",
+"Description",
+" <AAA>"
+" <BBB>"
+" <CCC/>"
+" <ZZZ/>"
+" </BBB>"
+" <XXX>"
+" <DDD>"
+" <EEE/>"
+" <FFF>"
+" <HHH/>"
+" <GGG>"
+" <JJJ>"
+" <QQQ/>"
+" </JJJ>"
+" <JJJ/>"
+" </GGG>"
+" <HHH/>"
+" </FFF>"
+" </DDD>"
+" </XXX>"
+" <CCC>"
+" <DDD/>"
+" </CCC>"
+" </AAA>"
+},
+
+{
+"//GGG/preceding::*",
+"Description",
+" <AAA>"
+" <BBB>"
+" <CCC/>"
+" <ZZZ/>"
+" </BBB>"
+" <XXX>"
+" <DDD>"
+" <EEE/>"
+" <FFF>"
+" <HHH/>"
+" <GGG>"
+" <JJJ>"
+" <QQQ/>"
+" </JJJ>"
+" <JJJ/>"
+" </GGG>"
+" <HHH/>"
+" </FFF>"
+" </DDD>"
+" </XXX>"
+" <CCC>"
+" <DDD/>"
+" </CCC>"
+" </AAA>"
+},
+
+{
+"//GGG/self::*",
+"Description",
+" <AAA>"
+" <BBB>"
+" <CCC/>"
+" <ZZZ/>"
+" </BBB>"
+" <XXX>"
+" <DDD>"
+" <EEE/>"
+" <FFF>"
+" <HHH/>"
+" <GGG>"
+" <JJJ>"
+" <QQQ/>"
+" </JJJ>"
+" <JJJ/>"
+" </GGG>"
+" <HHH/>"
+" </FFF>"
+" </DDD>"
+" </XXX>"
+" <CCC>"
+" <DDD/>"
+" </CCC>"
+" </AAA>"
+},
+
+{
+"//GGG/ancestor::* | //GGG/descendant::* | //GGG/following::* | //GGG/preceding::* | //GGG/self::*",
+"description",
+" <AAA>"
+" <BBB>"
+" <CCC/>"
+" <ZZZ/>"
+" </BBB>"
+" <XXX>"
+" <DDD>"
+" <EEE/>"
+" <FFF>"
+" <HHH/>"
+" <GGG>"
+" <JJJ>"
+" <QQQ/>"
+" </JJJ>"
+" <JJJ/>"
+" </GGG>"
+" <HHH/>"
+" </FFF>"
+" </DDD>"
+" </XXX>"
+" <CCC>"
+" <DDD/>"
+" </CCC>"
+" </AAA>"
+},
+
+{
+"//BBB[position() mod 2 = 0 ]",
+"Select even BBB elements",
+" <AAA>"
+" <BBB/>"
+" <BBB/>"
+" <BBB/>"
+" <BBB/>"
+" <BBB/>"
+" <BBB/>"
+" <BBB/>"
+" <BBB/>"
+" <CCC/>"
+" <CCC/>"
+" <CCC/>"
+" </AAA>"
+},
+
+{
+"//BBB[ position() = floor(last() div 2 + 0.5) or position() = ceiling(last() div 2 + 0.5) ]",
+"Select middle BBB element(s)",
+" <AAA>"
+" <BBB/>"
+" <BBB/>"
+" <BBB/>"
+" <BBB/>"
+" <BBB/>"
+" <BBB/>"
+" <BBB/>"
+" <BBB/>"
+" <CCC/>"
+" <CCC/>"
+" <CCC/>"
+" </AAA>"
+},
+
+{
+"//CCC[ position() = floor(last() div 2 + 0.5) or position() = ceiling(last() div 2 + 0.5) ]",
+"Select middle CCC element(s)",
+" <AAA>"
+" <BBB/>"
+" <BBB/>"
+" <BBB/>"
+" <BBB/>"
+" <BBB/>"
+" <BBB/>"
+" <BBB/>"
+" <BBB/>"
+" <CCC/>"
+" <CCC/>"
+" <CCC/>"
+" </AAA>"
+}
+
+}; //end
+
+