From 554fd8c5195424bdbcabf5de30fdc183aba391bd Mon Sep 17 00:00:00 2001 From: upstream source tree Date: Sun, 15 Mar 2015 20:14:05 -0400 Subject: obtained gcc-4.6.4.tar.bz2 from upstream website; verified gcc-4.6.4.tar.bz2.sig; imported gcc-4.6.4 source tree from verified upstream tarball. downloading a git-generated archive based on the 'upstream' tag should provide you with a source tree that is binary identical to the one extracted from the above tarball. if you have obtained the source via the command 'git clone', however, do note that line-endings of files in your working directory might differ from line-endings of the respective files in the upstream repository. --- .../external/w3c_dom/org/w3c/dom/Attr.java | 275 +++ .../external/w3c_dom/org/w3c/dom/CDATASection.java | 54 + .../w3c_dom/org/w3c/dom/CharacterData.java | 153 ++ .../external/w3c_dom/org/w3c/dom/Comment.java | 30 + .../w3c_dom/org/w3c/dom/DOMConfiguration.java | 413 +++++ .../external/w3c_dom/org/w3c/dom/DOMError.java | 87 + .../w3c_dom/org/w3c/dom/DOMErrorHandler.java | 45 + .../external/w3c_dom/org/w3c/dom/DOMException.java | 131 ++ .../w3c_dom/org/w3c/dom/DOMImplementation.java | 136 ++ .../w3c_dom/org/w3c/dom/DOMImplementationList.java | 43 + .../org/w3c/dom/DOMImplementationSource.java | 58 + .../external/w3c_dom/org/w3c/dom/DOMLocator.java | 58 + .../w3c_dom/org/w3c/dom/DOMStringList.java | 50 + .../external/w3c_dom/org/w3c/dom/Document.java | 814 +++++++++ .../w3c_dom/org/w3c/dom/DocumentFragment.java | 53 + .../external/w3c_dom/org/w3c/dom/DocumentType.java | 83 + .../external/w3c_dom/org/w3c/dom/Element.java | 439 +++++ .../external/w3c_dom/org/w3c/dom/Entity.java | 90 + .../w3c_dom/org/w3c/dom/EntityReference.java | 43 + .../external/w3c_dom/org/w3c/dom/NameList.java | 68 + .../external/w3c_dom/org/w3c/dom/NamedNodeMap.java | 183 ++ .../external/w3c_dom/org/w3c/dom/Node.java | 900 ++++++++++ .../external/w3c_dom/org/w3c/dom/NodeList.java | 41 + .../external/w3c_dom/org/w3c/dom/Notation.java | 40 + .../w3c_dom/org/w3c/dom/ProcessingInstruction.java | 51 + .../external/w3c_dom/org/w3c/dom/Text.java | 126 ++ .../external/w3c_dom/org/w3c/dom/TypeInfo.java | 185 ++ .../w3c_dom/org/w3c/dom/UserDataHandler.java | 72 + .../dom/bootstrap/DOMImplementationRegistry.java | 387 +++++ .../w3c_dom/org/w3c/dom/css/CSS2Properties.java | 1777 ++++++++++++++++++++ .../w3c_dom/org/w3c/dom/css/CSSCharsetRule.java | 51 + .../w3c_dom/org/w3c/dom/css/CSSFontFaceRule.java | 28 + .../w3c_dom/org/w3c/dom/css/CSSImportRule.java | 44 + .../w3c_dom/org/w3c/dom/css/CSSMediaRule.java | 76 + .../w3c_dom/org/w3c/dom/css/CSSPageRule.java | 44 + .../w3c_dom/org/w3c/dom/css/CSSPrimitiveValue.java | 296 ++++ .../external/w3c_dom/org/w3c/dom/css/CSSRule.java | 97 ++ .../w3c_dom/org/w3c/dom/css/CSSRuleList.java | 43 + .../org/w3c/dom/css/CSSStyleDeclaration.java | 162 ++ .../w3c_dom/org/w3c/dom/css/CSSStyleRule.java | 47 + .../w3c_dom/org/w3c/dom/css/CSSStyleSheet.java | 85 + .../w3c_dom/org/w3c/dom/css/CSSUnknownRule.java | 22 + .../external/w3c_dom/org/w3c/dom/css/CSSValue.java | 71 + .../w3c_dom/org/w3c/dom/css/CSSValueList.java | 46 + .../external/w3c_dom/org/w3c/dom/css/Counter.java | 38 + .../org/w3c/dom/css/DOMImplementationCSS.java | 40 + .../w3c_dom/org/w3c/dom/css/DocumentCSS.java | 50 + .../org/w3c/dom/css/ElementCSSInlineStyle.java | 32 + .../external/w3c_dom/org/w3c/dom/css/RGBColor.java | 47 + .../external/w3c_dom/org/w3c/dom/css/Rect.java | 44 + .../external/w3c_dom/org/w3c/dom/css/ViewCSS.java | 43 + .../w3c_dom/org/w3c/dom/events/DocumentEvent.java | 56 + .../external/w3c_dom/org/w3c/dom/events/Event.java | 141 ++ .../w3c_dom/org/w3c/dom/events/EventException.java | 36 + .../w3c_dom/org/w3c/dom/events/EventListener.java | 41 + .../w3c_dom/org/w3c/dom/events/EventTarget.java | 102 ++ .../w3c_dom/org/w3c/dom/events/MouseEvent.java | 156 ++ .../w3c_dom/org/w3c/dom/events/MutationEvent.java | 108 ++ .../w3c_dom/org/w3c/dom/events/UIEvent.java | 58 + .../org/w3c/dom/html2/HTMLAnchorElement.java | 156 ++ .../org/w3c/dom/html2/HTMLAppletElement.java | 156 ++ .../w3c_dom/org/w3c/dom/html2/HTMLAreaElement.java | 111 ++ .../w3c_dom/org/w3c/dom/html2/HTMLBRElement.java | 31 + .../w3c_dom/org/w3c/dom/html2/HTMLBaseElement.java | 40 + .../org/w3c/dom/html2/HTMLBaseFontElement.java | 56 + .../w3c_dom/org/w3c/dom/html2/HTMLBodyElement.java | 94 ++ .../org/w3c/dom/html2/HTMLButtonElement.java | 88 + .../w3c_dom/org/w3c/dom/html2/HTMLCollection.java | 59 + .../org/w3c/dom/html2/HTMLDListElement.java | 31 + .../org/w3c/dom/html2/HTMLDirectoryElement.java | 32 + .../w3c_dom/org/w3c/dom/html2/HTMLDivElement.java | 31 + .../w3c_dom/org/w3c/dom/html2/HTMLDocument.java | 237 +++ .../w3c_dom/org/w3c/dom/html2/HTMLElement.java | 87 + .../org/w3c/dom/html2/HTMLFieldSetElement.java | 28 + .../w3c_dom/org/w3c/dom/html2/HTMLFontElement.java | 54 + .../w3c_dom/org/w3c/dom/html2/HTMLFormElement.java | 116 ++ .../org/w3c/dom/html2/HTMLFrameElement.java | 117 ++ .../org/w3c/dom/html2/HTMLFrameSetElement.java | 42 + .../w3c_dom/org/w3c/dom/html2/HTMLHRElement.java | 66 + .../w3c_dom/org/w3c/dom/html2/HTMLHeadElement.java | 31 + .../org/w3c/dom/html2/HTMLHeadingElement.java | 32 + .../w3c_dom/org/w3c/dom/html2/HTMLHtmlElement.java | 31 + .../org/w3c/dom/html2/HTMLIFrameElement.java | 137 ++ .../org/w3c/dom/html2/HTMLImageElement.java | 176 ++ .../org/w3c/dom/html2/HTMLInputElement.java | 303 ++++ .../org/w3c/dom/html2/HTMLIsIndexElement.java | 39 + .../w3c_dom/org/w3c/dom/html2/HTMLLIElement.java | 44 + .../org/w3c/dom/html2/HTMLLabelElement.java | 51 + .../org/w3c/dom/html2/HTMLLegendElement.java | 52 + .../w3c_dom/org/w3c/dom/html2/HTMLLinkElement.java | 116 ++ .../w3c_dom/org/w3c/dom/html2/HTMLMapElement.java | 36 + .../w3c_dom/org/w3c/dom/html2/HTMLMenuElement.java | 32 + .../w3c_dom/org/w3c/dom/html2/HTMLMetaElement.java | 63 + .../w3c_dom/org/w3c/dom/html2/HTMLModElement.java | 43 + .../org/w3c/dom/html2/HTMLOListElement.java | 53 + .../org/w3c/dom/html2/HTMLObjectElement.java | 230 +++ .../org/w3c/dom/html2/HTMLOptGroupElement.java | 43 + .../org/w3c/dom/html2/HTMLOptionElement.java | 104 ++ .../org/w3c/dom/html2/HTMLOptionsCollection.java | 68 + .../org/w3c/dom/html2/HTMLParagraphElement.java | 31 + .../org/w3c/dom/html2/HTMLParamElement.java | 67 + .../w3c_dom/org/w3c/dom/html2/HTMLPreElement.java | 31 + .../org/w3c/dom/html2/HTMLQuoteElement.java | 32 + .../org/w3c/dom/html2/HTMLScriptElement.java | 91 + .../org/w3c/dom/html2/HTMLSelectElement.java | 179 ++ .../org/w3c/dom/html2/HTMLStyleElement.java | 53 + .../org/w3c/dom/html2/HTMLTableCaptionElement.java | 31 + .../org/w3c/dom/html2/HTMLTableCellElement.java | 181 ++ .../org/w3c/dom/html2/HTMLTableColElement.java | 85 + .../org/w3c/dom/html2/HTMLTableElement.java | 254 +++ .../org/w3c/dom/html2/HTMLTableRowElement.java | 130 ++ .../org/w3c/dom/html2/HTMLTableSectionElement.java | 103 ++ .../org/w3c/dom/html2/HTMLTextAreaElement.java | 154 ++ .../org/w3c/dom/html2/HTMLTitleElement.java | 29 + .../org/w3c/dom/html2/HTMLUListElement.java | 42 + .../org/w3c/dom/ls/DOMImplementationLS.java | 122 ++ .../w3c_dom/org/w3c/dom/ls/LSException.java | 47 + .../external/w3c_dom/org/w3c/dom/ls/LSInput.java | 218 +++ .../w3c_dom/org/w3c/dom/ls/LSLoadEvent.java | 35 + .../external/w3c_dom/org/w3c/dom/ls/LSOutput.java | 106 ++ .../external/w3c_dom/org/w3c/dom/ls/LSParser.java | 466 +++++ .../w3c_dom/org/w3c/dom/ls/LSParserFilter.java | 172 ++ .../w3c_dom/org/w3c/dom/ls/LSProgressEvent.java | 48 + .../w3c_dom/org/w3c/dom/ls/LSResourceResolver.java | 81 + .../w3c_dom/org/w3c/dom/ls/LSSerializer.java | 436 +++++ .../w3c_dom/org/w3c/dom/ls/LSSerializerFilter.java | 63 + .../w3c_dom/org/w3c/dom/ranges/DocumentRange.java | 33 + .../external/w3c_dom/org/w3c/dom/ranges/Range.java | 416 +++++ .../w3c_dom/org/w3c/dom/ranges/RangeException.java | 39 + .../org/w3c/dom/stylesheets/DocumentStyle.java | 34 + .../w3c_dom/org/w3c/dom/stylesheets/LinkStyle.java | 31 + .../w3c_dom/org/w3c/dom/stylesheets/MediaList.java | 85 + .../org/w3c/dom/stylesheets/StyleSheet.java | 103 ++ .../org/w3c/dom/stylesheets/StyleSheetList.java | 42 + .../org/w3c/dom/traversal/DocumentTraversal.java | 93 + .../w3c_dom/org/w3c/dom/traversal/NodeFilter.java | 144 ++ .../org/w3c/dom/traversal/NodeIterator.java | 109 ++ .../w3c_dom/org/w3c/dom/traversal/TreeWalker.java | 179 ++ .../w3c_dom/org/w3c/dom/views/AbstractView.java | 27 + .../w3c_dom/org/w3c/dom/views/DocumentView.java | 30 + .../w3c_dom/org/w3c/dom/xpath/XPathEvaluator.java | 134 ++ .../w3c_dom/org/w3c/dom/xpath/XPathException.java | 39 + .../w3c_dom/org/w3c/dom/xpath/XPathExpression.java | 65 + .../w3c_dom/org/w3c/dom/xpath/XPathNSResolver.java | 34 + .../w3c_dom/org/w3c/dom/xpath/XPathNamespace.java | 67 + .../w3c_dom/org/w3c/dom/xpath/XPathResult.java | 214 +++ 146 files changed, 17510 insertions(+) create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/Attr.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/CDATASection.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/CharacterData.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/Comment.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/DOMConfiguration.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/DOMError.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/DOMErrorHandler.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/DOMException.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/DOMImplementation.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/DOMImplementationList.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/DOMImplementationSource.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/DOMLocator.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/DOMStringList.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/Document.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/DocumentFragment.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/DocumentType.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/Element.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/Entity.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/EntityReference.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/NameList.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/NamedNodeMap.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/Node.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/NodeList.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/Notation.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/ProcessingInstruction.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/Text.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/TypeInfo.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/UserDataHandler.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/bootstrap/DOMImplementationRegistry.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSS2Properties.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSCharsetRule.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSFontFaceRule.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSImportRule.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSMediaRule.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSPageRule.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSPrimitiveValue.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSRule.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSRuleList.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSStyleDeclaration.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSStyleRule.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSStyleSheet.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSUnknownRule.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSValue.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSValueList.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/css/Counter.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/css/DOMImplementationCSS.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/css/DocumentCSS.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/css/ElementCSSInlineStyle.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/css/RGBColor.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/css/Rect.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/css/ViewCSS.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/events/DocumentEvent.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/events/Event.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/events/EventException.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/events/EventListener.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/events/EventTarget.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/events/MouseEvent.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/events/MutationEvent.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/events/UIEvent.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLAnchorElement.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLAppletElement.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLAreaElement.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLBRElement.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLBaseElement.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLBaseFontElement.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLBodyElement.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLButtonElement.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLCollection.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLDListElement.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLDirectoryElement.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLDivElement.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLDocument.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLElement.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLFieldSetElement.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLFontElement.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLFormElement.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLFrameElement.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLFrameSetElement.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLHRElement.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLHeadElement.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLHeadingElement.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLHtmlElement.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLIFrameElement.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLImageElement.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLInputElement.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLIsIndexElement.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLLIElement.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLLabelElement.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLLegendElement.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLLinkElement.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLMapElement.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLMenuElement.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLMetaElement.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLModElement.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLOListElement.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLObjectElement.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLOptGroupElement.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLOptionElement.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLOptionsCollection.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLParagraphElement.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLParamElement.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLPreElement.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLQuoteElement.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLScriptElement.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLSelectElement.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLStyleElement.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLTableCaptionElement.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLTableCellElement.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLTableColElement.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLTableElement.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLTableRowElement.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLTableSectionElement.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLTextAreaElement.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLTitleElement.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLUListElement.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/ls/DOMImplementationLS.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/ls/LSException.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/ls/LSInput.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/ls/LSLoadEvent.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/ls/LSOutput.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/ls/LSParser.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/ls/LSParserFilter.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/ls/LSProgressEvent.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/ls/LSResourceResolver.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/ls/LSSerializer.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/ls/LSSerializerFilter.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/ranges/DocumentRange.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/ranges/Range.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/ranges/RangeException.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/stylesheets/DocumentStyle.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/stylesheets/LinkStyle.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/stylesheets/MediaList.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/stylesheets/StyleSheet.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/stylesheets/StyleSheetList.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/traversal/DocumentTraversal.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/traversal/NodeFilter.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/traversal/NodeIterator.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/traversal/TreeWalker.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/views/AbstractView.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/views/DocumentView.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/xpath/XPathEvaluator.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/xpath/XPathException.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/xpath/XPathExpression.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/xpath/XPathNSResolver.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/xpath/XPathNamespace.java create mode 100644 libjava/classpath/external/w3c_dom/org/w3c/dom/xpath/XPathResult.java (limited to 'libjava/classpath/external/w3c_dom/org/w3c') diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/Attr.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/Attr.java new file mode 100644 index 000000000..944045129 --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/Attr.java @@ -0,0 +1,275 @@ +/* + * 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 + */ + +package org.w3c.dom; + +/** + * The Attr interface represents an attribute in an + * Element object. Typically the allowable values for the + * attribute are defined in a schema associated with the document. + *

Attr objects inherit the Node interface, but + * since they are not actually child nodes of the element they describe, the + * DOM does not consider them part of the document tree. Thus, the + * Node attributes parentNode, + * previousSibling, and nextSibling have a + * null value for Attr objects. The DOM takes the + * view that attributes are properties of elements rather than having a + * separate identity from the elements they are associated with; this should + * make it more efficient to implement such features as default attributes + * associated with all elements of a given type. Furthermore, + * Attr nodes may not be immediate children of a + * DocumentFragment. However, they can be associated with + * Element nodes contained within a + * DocumentFragment. In short, users and implementors of the + * DOM need to be aware that Attr nodes have some things in + * common with other objects inheriting the Node interface, but + * they also are quite distinct. + *

The attribute's effective value is determined as follows: if this + * attribute has been explicitly assigned any value, that value is the + * attribute's effective value; otherwise, if there is a declaration for + * this attribute, and that declaration includes a default value, then that + * default value is the attribute's effective value; otherwise, the + * attribute does not exist on this element in the structure model until it + * has been explicitly added. Note that the Node.nodeValue + * attribute on the Attr instance can also be used to retrieve + * the string version of the attribute's value(s). + *

If the attribute was not explicitly given a value in the instance + * document but has a default value provided by the schema associated with + * the document, an attribute node will be created with + * specified set to false. Removing attribute + * nodes for which a default value is defined in the schema generates a new + * attribute node with the default value and specified set to + * false. If validation occurred while invoking + * Document.normalizeDocument(), attribute nodes with + * specified equals to false are recomputed + * according to the default attribute values provided by the schema. If no + * default value is associate with this attribute in the schema, the + * attribute node is discarded. + *

In XML, where the value of an attribute can contain entity references, + * the child nodes of the Attr node may be either + * Text or EntityReference nodes (when these are + * in use; see the description of EntityReference for + * discussion). + *

The DOM Core represents all attribute values as simple strings, even if + * the DTD or schema associated with the document declares them of some + * specific type such as tokenized. + *

The way attribute value normalization is performed by the DOM + * implementation depends on how much the implementation knows about the + * schema in use. Typically, the value and + * nodeValue attributes of an Attr node initially + * returns the normalized value given by the parser. It is also the case + * after Document.normalizeDocument() is called (assuming the + * right options have been set). But this may not be the case after + * mutation, independently of whether the mutation is performed by setting + * the string value directly or by changing the Attr child + * nodes. In particular, this is true when character + * references are involved, given that they are not represented in the DOM and they + * impact attribute value normalization. On the other hand, if the + * implementation knows about the schema in use when the attribute value is + * changed, and it is of a different type than CDATA, it may normalize it + * again at that time. This is especially true of specialized DOM + * implementations, such as SVG DOM implementations, which store attribute + * values in an internal form different from a string. + *

The following table gives some examples of the relations between the + * attribute value in the original document (parsed attribute), the value as + * exposed in the DOM, and the serialization of the value: + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
ExamplesParsed + * attribute valueInitial Attr.valueSerialized attribute value
+ * Character reference + *
"x²=5"
+ *
+ *
"x\u00b2=5"
+ *
+ *
"x²=5"
+ *
Built-in + * character entity + *
"y<6"
+ *
+ *
"y<6"
+ *
+ *
"y&lt;6"
+ *
Literal newline between + *
+ * "x=5&#10;y=6"
+ *
+ *
"x=5 y=6"
+ *
+ *
"x=5&#10;y=6"
+ *
Normalized newline between + *
"x=5
+ * y=6"
+ *
+ *
"x=5 y=6"
+ *
+ *
"x=5 y=6"
+ *
Entity e with literal newline + *
+ * <!ENTITY e '...&#10;...'> [...]> "x=5&e;y=6"
+ *
Dependent on Implementation and Load OptionsDependent on Implementation and Load/Save Options
+ *

See also the Document Object Model (DOM) Level 3 Core Specification. + */ +public interface Attr extends Node { + /** + * Returns the name of this attribute. If Node.localName is + * different from null, this attribute is a qualified name. + */ + public String getName(); + + /** + * True if this attribute was explicitly given a value in + * the instance document, false otherwise. If the + * application changed the value of this attribute node (even if it ends + * up having the same value as the default value) then it is set to + * true. The implementation may handle attributes with + * default values from other schemas similarly but applications should + * use Document.normalizeDocument() to guarantee this + * information is up-to-date. + */ + public boolean getSpecified(); + + /** + * On retrieval, the value of the attribute is returned as a string. + * Character and general entity references are replaced with their + * values. See also the method getAttribute on the + * Element interface. + *
On setting, this creates a Text node with the unparsed + * contents of the string, i.e. any characters that an XML processor + * would recognize as markup are instead treated as literal text. See + * also the method Element.setAttribute(). + *
Some specialized implementations, such as some [SVG 1.1] + * implementations, may do normalization automatically, even after + * mutation; in such case, the value on retrieval may differ from the + * value on setting. + */ + public String getValue(); + /** + * On retrieval, the value of the attribute is returned as a string. + * Character and general entity references are replaced with their + * values. See also the method getAttribute on the + * Element interface. + *
On setting, this creates a Text node with the unparsed + * contents of the string, i.e. any characters that an XML processor + * would recognize as markup are instead treated as literal text. See + * also the method Element.setAttribute(). + *
Some specialized implementations, such as some [SVG 1.1] + * implementations, may do normalization automatically, even after + * mutation; in such case, the value on retrieval may differ from the + * value on setting. + * @exception DOMException + * NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly. + */ + public void setValue(String value) + throws DOMException; + + /** + * The Element node this attribute is attached to or + * null if this attribute is not in use. + * @since DOM Level 2 + */ + public Element getOwnerElement(); + + /** + * The type information associated with this attribute. While the type + * information contained in this attribute is guarantee to be correct + * after loading the document or invoking + * Document.normalizeDocument(), schemaTypeInfo + * may not be reliable if the node was moved. + * @since DOM Level 3 + */ + public TypeInfo getSchemaTypeInfo(); + + /** + * Returns whether this attribute is known to be of type ID (i.e. to + * contain an identifier for its owner element) or not. When it is and + * its value is unique, the ownerElement of this attribute + * can be retrieved using the method Document.getElementById + * . The implementation could use several ways to determine if an + * attribute node is known to contain an identifier: + *

+ *
If validation occurred while invoking + * Document.normalizeDocument(), all user-determined ID + * attributes are reset and all attribute nodes ID information are then + * reevaluated in accordance to the schema used. As a consequence, if + * the Attr.schemaTypeInfo attribute contains an ID type, + * isId will always return true. + * @since DOM Level 3 + */ + public boolean isId(); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/CDATASection.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/CDATASection.java new file mode 100644 index 000000000..ce4b346eb --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/CDATASection.java @@ -0,0 +1,54 @@ +/* + * 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 + */ + +package org.w3c.dom; + +/** + * CDATA sections are used to escape blocks of text containing characters that + * would otherwise be regarded as markup. The only delimiter that is + * recognized in a CDATA section is the "]]>" string that ends the CDATA + * section. CDATA sections cannot be nested. Their primary purpose is for + * including material such as XML fragments, without needing to escape all + * the delimiters. + *

The CharacterData.data attribute holds the text that is + * contained by the CDATA section. Note that this may contain characters that need to be escaped outside of CDATA sections and + * that, depending on the character encoding ("charset") chosen for + * serialization, it may be impossible to write out some characters as part + * of a CDATA section. + *

The CDATASection interface inherits from the + * CharacterData interface through the Text + * interface. Adjacent CDATASection nodes are not merged by use + * of the normalize method of the Node interface. + *

No lexical check is done on the content of a CDATA section and it is + * therefore possible to have the character sequence "]]>" + * in the content, which is illegal in a CDATA section per section 2.7 of [XML 1.0]. The + * presence of this character sequence must generate a fatal error during + * serialization or the cdata section must be splitted before the + * serialization (see also the parameter "split-cdata-sections" + * in the DOMConfiguration interface). + *

Note: Because no markup is recognized within a + * CDATASection, character numeric references cannot be used as + * an escape mechanism when serializing. Therefore, action needs to be taken + * when serializing a CDATASection with a character encoding + * where some of the contained characters cannot be represented. Failure to + * do so would not produce well-formed XML. + *

Note: One potential solution in the serialization process is to + * end the CDATA section before the character, output the character using a + * character reference or entity reference, and open a new CDATA section for + * any further characters in the text node. Note, however, that some code + * conversion libraries at the time of writing do not return an error or + * exception when a character is missing from the encoding, making the task + * of ensuring that data is not corrupted on serialization more difficult. + *

See also the Document Object Model (DOM) Level 3 Core Specification. + */ +public interface CDATASection extends Text { +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/CharacterData.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/CharacterData.java new file mode 100644 index 000000000..37aa8dffa --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/CharacterData.java @@ -0,0 +1,153 @@ +/* + * 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 + */ + +package org.w3c.dom; + +/** + * The CharacterData interface extends Node with a set of + * attributes and methods for accessing character data in the DOM. For + * clarity this set is defined here rather than on each object that uses + * these attributes and methods. No DOM objects correspond directly to + * CharacterData, though Text and others do + * inherit the interface from it. All offsets in this interface + * start from 0. + *

As explained in the DOMString interface, text strings in + * the DOM are represented in UTF-16, i.e. as a sequence of 16-bit units. In + * the following, the term 16-bit units is used whenever necessary to + * indicate that indexing on CharacterData is done in 16-bit units. + *

See also the Document Object Model (DOM) Level 3 Core Specification. + */ +public interface CharacterData extends Node { + /** + * The character data of the node that implements this interface. The DOM + * implementation may not put arbitrary limits on the amount of data + * that may be stored in a CharacterData node. However, + * implementation limits may mean that the entirety of a node's data may + * not fit into a single DOMString. In such cases, the user + * may call substringData to retrieve the data in + * appropriately sized pieces. + * @exception DOMException + * DOMSTRING_SIZE_ERR: Raised when it would return more characters than + * fit in a DOMString variable on the implementation + * platform. + */ + public String getData() + throws DOMException; + /** + * The character data of the node that implements this interface. The DOM + * implementation may not put arbitrary limits on the amount of data + * that may be stored in a CharacterData node. However, + * implementation limits may mean that the entirety of a node's data may + * not fit into a single DOMString. In such cases, the user + * may call substringData to retrieve the data in + * appropriately sized pieces. + * @exception DOMException + * NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly. + */ + public void setData(String data) + throws DOMException; + + /** + * The number of 16-bit units that are available through data + * and the substringData method below. This may have the + * value zero, i.e., CharacterData nodes may be empty. + */ + public int getLength(); + + /** + * Extracts a range of data from the node. + * @param offset Start offset of substring to extract. + * @param count The number of 16-bit units to extract. + * @return The specified substring. If the sum of offset and + * count exceeds the length, then all 16-bit + * units to the end of the data are returned. + * @exception DOMException + * INDEX_SIZE_ERR: Raised if the specified offset is + * negative or greater than the number of 16-bit units in + * data, or if the specified count is + * negative. + *
DOMSTRING_SIZE_ERR: Raised if the specified range of text does + * not fit into a DOMString. + */ + public String substringData(int offset, + int count) + throws DOMException; + + /** + * Append the string to the end of the character data of the node. Upon + * success, data provides access to the concatenation of + * data and the DOMString specified. + * @param arg The DOMString to append. + * @exception DOMException + * NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. + */ + public void appendData(String arg) + throws DOMException; + + /** + * Insert a string at the specified 16-bit unit offset. + * @param offset The character offset at which to insert. + * @param arg The DOMString to insert. + * @exception DOMException + * INDEX_SIZE_ERR: Raised if the specified offset is + * negative or greater than the number of 16-bit units in + * data. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. + */ + public void insertData(int offset, + String arg) + throws DOMException; + + /** + * Remove a range of 16-bit units from the node. Upon success, + * data and length reflect the change. + * @param offset The offset from which to start removing. + * @param count The number of 16-bit units to delete. If the sum of + * offset and count exceeds + * length then all 16-bit units from offset + * to the end of the data are deleted. + * @exception DOMException + * INDEX_SIZE_ERR: Raised if the specified offset is + * negative or greater than the number of 16-bit units in + * data, or if the specified count is + * negative. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. + */ + public void deleteData(int offset, + int count) + throws DOMException; + + /** + * Replace the characters starting at the specified 16-bit unit offset + * with the specified string. + * @param offset The offset from which to start replacing. + * @param count The number of 16-bit units to replace. If the sum of + * offset and count exceeds + * length, then all 16-bit units to the end of the data + * are replaced; (i.e., the effect is the same as a remove + * method call with the same range, followed by an append + * method invocation). + * @param arg The DOMString with which the range must be + * replaced. + * @exception DOMException + * INDEX_SIZE_ERR: Raised if the specified offset is + * negative or greater than the number of 16-bit units in + * data, or if the specified count is + * negative. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. + */ + public void replaceData(int offset, + int count, + String arg) + throws DOMException; + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/Comment.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/Comment.java new file mode 100644 index 000000000..40b75274b --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/Comment.java @@ -0,0 +1,30 @@ +/* + * 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 + */ + +package org.w3c.dom; + +/** + * This interface inherits from CharacterData and represents the + * content of a comment, i.e., all the characters between the starting ' + * <!--' and ending '-->'. Note that this is + * the definition of a comment in XML, and, in practice, HTML, although some + * HTML tools may implement the full SGML comment structure. + *

No lexical check is done on the content of a comment and it is + * therefore possible to have the character sequence "--" + * (double-hyphen) in the content, which is illegal in a comment per section + * 2.5 of [XML 1.0]. The + * presence of this character sequence must generate a fatal error during + * serialization. + *

See also the Document Object Model (DOM) Level 3 Core Specification. + */ +public interface Comment extends CharacterData { +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/DOMConfiguration.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/DOMConfiguration.java new file mode 100644 index 000000000..d05257868 --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/DOMConfiguration.java @@ -0,0 +1,413 @@ +/* + * 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 + */ + +package org.w3c.dom; + +/** + * The DOMConfiguration interface represents the configuration + * of a document and maintains a table of recognized parameters. Using the + * configuration, it is possible to change + * Document.normalizeDocument() behavior, such as replacing the + * CDATASection nodes with Text nodes or + * specifying the type of the schema that must be used when the validation + * of the Document is requested. DOMConfiguration + * objects are also used in [DOM Level 3 Load and Save] + * in the DOMParser and DOMSerializer interfaces. + *

The parameter names used by the DOMConfiguration object + * are defined throughout the DOM Level 3 specifications. Names are + * case-insensitive. To avoid possible conflicts, as a convention, names + * referring to parameters defined outside the DOM specification should be + * made unique. Because parameters are exposed as properties in the , names + * are recommended to follow the section 5.16 Identifiers of [Unicode] with the addition of the character '-' (HYPHEN-MINUS) but it is not + * enforced by the DOM implementation. DOM Level 3 Core Implementations are + * required to recognize all parameters defined in this specification. Some + * parameter values may also be required to be supported by the + * implementation. Refer to the definition of the parameter to know if a + * value must be supported or not. + *

Note: Parameters are similar to features and properties used in + * SAX2 [SAX]. + *

The following list of parameters defined in the DOM: + *

+ *
+ * "canonical-form"
+ *
+ *
+ *
true
+ *
[optional] Canonicalize the document according to the rules specified in [Canonical XML], + * such as removing the DocumentType node (if any) from the + * tree, or removing superfluous namespace declarations from each element. + * Note that this is limited to what can be represented in the DOM; in + * particular, there is no way to specify the order of the attributes in the + * DOM. In addition, Setting this parameter to true will also + * set the state of the parameters listed below. Later changes to the state + * of one of those parameters will revert "canonical-form" back to + * false. Parameters set to false: "entities", " + * normalize-characters", "cdata-sections". Parameters set to + * true: "namespaces", "namespace-declarations", "well-formed", + * "element-content-whitespace". Other parameters are not changed unless + * explicitly specified in the description of the parameters.
+ *
+ * false
+ *
[required] (default)Do not canonicalize the document.
+ *
+ *
"cdata-sections"
+ *
+ *
+ *
+ * true
+ *
[required] (default)Keep CDATASection nodes in the document.
+ *
false
+ *
[required]Transform CDATASection nodes in the document into + * Text nodes. The new Text node is then combined + * with any adjacent Text node.
+ *
+ *
+ * "check-character-normalization"
+ *
+ *
+ *
true
+ *
[optional] Check if the characters in the document are fully + * normalized, as defined in appendix B of [XML 1.1]. When a + * sequence of characters is encountered that fails normalization checking, + * an error with the DOMError.type equals to + * "check-character-normalization-failure" is issued.
+ *
false
+ *
[required] (default)Do not check if characters are normalized.
+ *
+ *
"comments"
+ *
+ *
+ *
+ * true
+ *
[required] (default)Keep Comment nodes in the document.
+ *
false
+ *
[required]Discard Comment nodes in the document.
+ *
+ *
+ * "datatype-normalization"
+ *
+ *
+ *
true
+ *
[optional] Expose schema normalized values in the tree, such as XML + * Schema normalized values in the case of XML Schema. Since this parameter requires to have schema + * information, the "validate" parameter will also be set to + * true. Having this parameter activated when "validate" is + * false has no effect and no schema-normalization will happen. + *

Note: Since the document contains the result of the XML 1.0 + * processing, this parameter does not apply to attribute value + * normalization as defined in section 3.3.3 of [XML 1.0] and is only + * meant for schema languages other than Document Type Definition (DTD).

+ *
+ * false
+ *
[required] (default) Do not perform schema normalization on the tree.
+ *
+ *
+ * "element-content-whitespace"
+ *
+ *
+ *
true
+ *
[required] (default)Keep all whitespaces in the document.
+ *
false
+ *
[optional] Discard all Text nodes that contain whitespaces in element + * content, as described in + * [element content whitespace]. The implementation is expected to use the attribute + * Text.isElementContentWhitespace to determine if a + * Text node should be discarded or not.
+ *
+ *
"entities"
+ *
+ *
+ *
+ * true
+ *
[required] (default)Keep EntityReference nodes in the document.
+ *
+ * false
+ *
[required] Remove all EntityReference nodes from the document, + * putting the entity expansions directly in their place. Text + * nodes are normalized, as defined in Node.normalize. Only + * unexpanded entity references are kept in the document.
+ *
+ *

Note: This parameter does not affect Entity nodes.

+ *
+ * "error-handler"
+ *
[required] Contains a DOMErrorHandler object. If an error is + * encountered in the document, the implementation will call back the + * DOMErrorHandler registered using this parameter. The + * implementation may provide a default DOMErrorHandler object. + * When called, DOMError.relatedData will contain the closest + * node to where the error occurred. If the implementation is unable to + * determine the node where the error occurs, + * DOMError.relatedData will contain the Document + * node. Mutations to the document from within an error handler will result + * in implementation dependent behavior.
+ *
"infoset"
+ *
+ *
+ *
+ * true
+ *
[required]Keep in the document the information defined in the XML Information Set [XML Information Set] + * .This forces the following parameters to false: " + * validate-if-schema", "entities", "datatype-normalization", "cdata-sections + * ".This forces the following parameters to true: " + * namespace-declarations", "well-formed", "element-content-whitespace", " + * comments", "namespaces".Other parameters are not changed unless + * explicitly specified in the description of the parameters. Note that + * querying this parameter with getParameter returns + * true only if the individual parameters specified above are + * appropriately set.
+ *
false
+ *
Setting infoset to + * false has no effect.
+ *
+ *
"namespaces"
+ *
+ *
+ *
+ * true
+ *
[required] (default) Perform the namespace processing as defined in .
+ *
false
+ *
[optional] Do not perform the namespace processing.
+ *
+ *
+ * "namespace-declarations"
+ *
This parameter has no effect if the + * parameter "namespaces" is set to false. + *
+ *
true
+ *
[required] (default) Include namespace declaration attributes, specified or defaulted from + * the schema, in the document. See also the sections "Declaring Namespaces" + * in [XML Namespaces] + * and [XML Namespaces 1.1] + * .
+ *
false
+ *
[required]Discard all namespace declaration attributes. The namespace prefixes ( + * Node.prefix) are retained even if this parameter is set to + * false.
+ *
+ *
"normalize-characters"
+ *
+ *
+ *
true
+ *
[optional] Fully + * normalized the characters in the document as defined in appendix B of [XML 1.1].
+ *
+ * false
+ *
[required] (default)Do not perform character normalization.
+ *
+ *
"schema-location"
+ *
[optional] Represent a DOMString object containing a list of URIs, + * separated by whitespaces (characters matching the nonterminal + * production S defined in section 2.3 [XML 1.0]), that + * represents the schemas against which validation should occur, i.e. the + * current schema. The types of schemas referenced in this list must match + * the type specified with schema-type, otherwise the behavior + * of an implementation is undefined. The schemas specified using this + * property take precedence to the schema information specified in the + * document itself. For namespace aware schema, if a schema specified using + * this property and a schema specified in the document instance (i.e. using + * the schemaLocation attribute) in a schema document (i.e. + * using schema import mechanisms) share the same + * targetNamespace, the schema specified by the user using this + * property will be used. If two schemas specified using this property share + * the same targetNamespace or have no namespace, the behavior + * is implementation dependent. If no location has been provided, this + * parameter is null. + *

Note: The "schema-location" parameter is ignored + * unless the "schema-type" parameter value is set. It is strongly + * recommended that Document.documentURI will be set so that an + * implementation can successfully resolve any external entities referenced.

+ *
+ * "schema-type"
+ *
[optional] Represent a DOMString object containing an absolute URI + * and representing the type of the schema language used to validate a + * document against. Note that no lexical checking is done on the absolute + * URI. If this parameter is not set, a default value may be provided by + * the implementation, based on the schema languages supported and on the + * schema language used at load time. If no value is provided, this + * parameter is null. + *

Note: For XML Schema [XML Schema Part 1] + * , applications must use the value + * "http://www.w3.org/2001/XMLSchema". For XML DTD [XML 1.0], + * applications must use the value + * "http://www.w3.org/TR/REC-xml". Other schema languages are + * outside the scope of the W3C and therefore should recommend an absolute + * URI in order to use this method.

+ *
"split-cdata-sections"
+ *
+ *
+ *
+ * true
+ *
[required] (default)Split CDATA sections containing the CDATA section termination marker + * ']]>'. When a CDATA section is split a warning is issued with a + * DOMError.type equals to + * "cdata-sections-splitted" and + * DOMError.relatedData equals to the first + * CDATASection node in document order resulting from the split.
+ *
+ * false
+ *
[required]Signal an error if a CDATASection contains an + * unrepresentable character.
+ *
+ *
"validate"
+ *
+ *
+ *
true
+ *
[optional] Require the validation against a schema (i.e. XML schema, DTD, any + * other type or representation of schema) of the document as it is being + * normalized as defined by [XML 1.0]. If + * validation errors are found, or no schema was found, the error handler is + * notified. Schema-normalized values will not be exposed according to the + * schema in used unless the parameter "datatype-normalization" is + * true. This parameter will reevaluate: + *
    + *
  • Attribute nodes with + * Attr.specified equals to false, as specified in + * the description of the Attr interface; + *
  • + *
  • The value of the + * attribute Text.isElementContentWhitespace for all + * Text nodes; + *
  • + *
  • The value of the attribute + * Attr.isId for all Attr nodes; + *
  • + *
  • The attributes + * Element.schemaTypeInfo and Attr.schemaTypeInfo. + *
  • + *
+ *

Note: "validate-if-schema" and "validate" are mutually + * exclusive, setting one of them to true will set the other + * one to false. Applications should also consider setting the + * parameter "well-formed" to true, which is the default for + * that option, when validating the document.

+ *
false
+ *
[required] (default) Do not accomplish schema processing, including the internal subset + * processing. Default attribute values information are kept. Note that + * validation might still happen if "validate-if-schema" is true + * .
+ *
+ *
"validate-if-schema"
+ *
+ *
+ *
true
+ *
[optional]Enable validation only if a declaration for the document element can be + * found in a schema (independently of where it is found, i.e. XML schema, + * DTD, or any other type or representation of schema). If validation is + * enabled, this parameter has the same behavior as the parameter "validate" + * set to true. + *

Note: "validate-if-schema" and "validate" are mutually + * exclusive, setting one of them to true will set the other + * one to false.

+ *
false
+ *
[required] (default) No schema processing should be performed if the document has a schema, + * including internal subset processing. Default attribute values + * information are kept. Note that validation must still happen if "validate + * " is true.
+ *
+ *
"well-formed"
+ *
+ *
+ *
true
+ *
[required] (default) Check if all nodes are XML well formed according to the XML version in + * use in Document.xmlVersion: + *
    + *
  • check if the attribute + * Node.nodeName contains invalid characters according to its + * node type and generate a DOMError of type + * "wf-invalid-character-in-node-name", with a + * DOMError.SEVERITY_ERROR severity, if necessary; + *
  • + *
  • check if + * the text content inside Attr, Element, + * Comment, Text, CDATASection nodes + * for invalid characters and generate a DOMError of type + * "wf-invalid-character", with a + * DOMError.SEVERITY_ERROR severity, if necessary; + *
  • + *
  • check if + * the data inside ProcessingInstruction nodes for invalid + * characters and generate a DOMError of type + * "wf-invalid-character", with a + * DOMError.SEVERITY_ERROR severity, if necessary; + *
  • + *
+ *
+ * false
+ *
[optional] Do not check for XML well-formedness.
+ *
+ *
+ *

The resolution of the system identifiers associated with entities is + * done using Document.documentURI. However, when the feature + * "LS" defined in [DOM Level 3 Load and Save] + * is supported by the DOM implementation, the parameter + * "resource-resolver" can also be used on DOMConfiguration + * objects attached to Document nodes. If this parameter is + * set, Document.normalizeDocument() will invoke the resource + * resolver instead of using Document.documentURI. + *

See also the Document Object Model (DOM) Level 3 Core Specification. + * @since DOM Level 3 + */ +public interface DOMConfiguration { + /** + * Set the value of a parameter. + * @param name The name of the parameter to set. + * @param value The new value or null if the user wishes to + * unset the parameter. While the type of the value parameter is + * defined as DOMUserData, the object type must match the + * type defined by the definition of the parameter. For example, if + * the parameter is "error-handler", the value must be of type + * DOMErrorHandler. + * @exception DOMException + * NOT_FOUND_ERR: Raised when the parameter name is not recognized. + *
NOT_SUPPORTED_ERR: Raised when the parameter name is recognized + * but the requested value cannot be set. + *
TYPE_MISMATCH_ERR: Raised if the value type for this parameter + * name is incompatible with the expected value type. + */ + public void setParameter(String name, + Object value) + throws DOMException; + + /** + * Return the value of a parameter if known. + * @param name The name of the parameter. + * @return The current object associated with the specified parameter or + * null if no object has been associated or if the + * parameter is not supported. + * @exception DOMException + * NOT_FOUND_ERR: Raised when the parameter name is not recognized. + */ + public Object getParameter(String name) + throws DOMException; + + /** + * Check if setting a parameter to a specific value is supported. + * @param name The name of the parameter to check. + * @param value An object. if null, the returned value is + * true. + * @return true if the parameter could be successfully set + * to the specified value, or false if the parameter is + * not recognized or the requested value is not supported. This does + * not change the current value of the parameter itself. + */ + public boolean canSetParameter(String name, + Object value); + + /** + * The list of the parameters supported by this + * DOMConfiguration object and for which at least one value + * can be set by the application. Note that this list can also contain + * parameter names defined outside this specification. + */ + public DOMStringList getParameterNames(); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/DOMError.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/DOMError.java new file mode 100644 index 000000000..2634df37c --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/DOMError.java @@ -0,0 +1,87 @@ +/* + * 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 + */ + +package org.w3c.dom; + +/** + * DOMError is an interface that describes an error. + *

See also the Document Object Model (DOM) Level 3 Core Specification. + * @since DOM Level 3 + */ +public interface DOMError { + // ErrorSeverity + /** + * The severity of the error described by the DOMError is + * warning. A SEVERITY_WARNING will not cause the + * processing to stop, unless DOMErrorHandler.handleError() + * returns false. + */ + public static final short SEVERITY_WARNING = 1; + /** + * The severity of the error described by the DOMError is + * error. A SEVERITY_ERROR may not cause the processing to + * stop if the error can be recovered, unless + * DOMErrorHandler.handleError() returns false. + */ + public static final short SEVERITY_ERROR = 2; + /** + * The severity of the error described by the DOMError is + * fatal error. A SEVERITY_FATAL_ERROR will cause the + * normal processing to stop. The return value of + * DOMErrorHandler.handleError() is ignored unless the + * implementation chooses to continue, in which case the behavior + * becomes undefined. + */ + public static final short SEVERITY_FATAL_ERROR = 3; + + /** + * The severity of the error, either SEVERITY_WARNING, + * SEVERITY_ERROR, or SEVERITY_FATAL_ERROR. + */ + public short getSeverity(); + + /** + * An implementation specific string describing the error that occurred. + */ + public String getMessage(); + + /** + * A DOMString indicating which related data is expected in + * relatedData. Users should refer to the specification of + * the error in order to find its DOMString type and + * relatedData definitions if any. + *

Note: As an example, + * Document.normalizeDocument() does generate warnings when + * the "split-cdata-sections" parameter is in use. Therefore, the method + * generates a SEVERITY_WARNING with type + * "cdata-sections-splitted" and the first + * CDATASection node in document order resulting from the + * split is returned by the relatedData attribute. + */ + public String getType(); + + /** + * The related platform dependent exception if any. + */ + public Object getRelatedException(); + + /** + * The related DOMError.type dependent data if any. + */ + public Object getRelatedData(); + + /** + * The location of the error. + */ + public DOMLocator getLocation(); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/DOMErrorHandler.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/DOMErrorHandler.java new file mode 100644 index 000000000..7dcc90152 --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/DOMErrorHandler.java @@ -0,0 +1,45 @@ +/* + * 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 + */ + +package org.w3c.dom; + +/** + * DOMErrorHandler is a callback interface that the DOM + * implementation can call when reporting errors that happens while + * processing XML data, or when doing some other processing (e.g. validating + * a document). A DOMErrorHandler object can be attached to a + * Document using the "error-handler" on the + * DOMConfiguration interface. If more than one error needs to + * be reported during an operation, the sequence and numbers of the errors + * passed to the error handler are implementation dependent. + *

The application that is using the DOM implementation is expected to + * implement this interface. + *

See also the Document Object Model (DOM) Level 3 Core Specification. + * @since DOM Level 3 + */ +public interface DOMErrorHandler { + /** + * This method is called on the error handler when an error occurs. + *
If an exception is thrown from this method, it is considered to be + * equivalent of returning true. + * @param error The error object that describes the error. This object + * may be reused by the DOM implementation across multiple calls to + * the handleError method. + * @return If the handleError method returns + * false, the DOM implementation should stop the current + * processing when possible. If the method returns true, + * the processing may continue depending on + * DOMError.severity. + */ + public boolean handleError(DOMError error); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/DOMException.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/DOMException.java new file mode 100644 index 000000000..23c70c400 --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/DOMException.java @@ -0,0 +1,131 @@ +/* + * 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 + */ + +package org.w3c.dom; + +/** + * DOM operations only raise exceptions in "exceptional" circumstances, i.e., + * when an operation is impossible to perform (either for logical reasons, + * because data is lost, or because the implementation has become unstable). + * In general, DOM methods return specific error values in ordinary + * processing situations, such as out-of-bound errors when using + * NodeList. + *

Implementations should raise other exceptions under other circumstances. + * For example, implementations should raise an implementation-dependent + * exception if a null argument is passed when null + * was not expected. + *

Some languages and object systems do not support the concept of + * exceptions. For such systems, error conditions may be indicated using + * native error reporting mechanisms. For some bindings, for example, + * methods may return error codes similar to those listed in the + * corresponding method descriptions. + *

See also the Document Object Model (DOM) Level 3 Core Specification. + */ +public class DOMException extends RuntimeException { + public DOMException(short code, String message) { + super(message); + this.code = code; + } + public short code; + // ExceptionCode + /** + * If index or size is negative, or greater than the allowed value. + */ + public static final short INDEX_SIZE_ERR = 1; + /** + * If the specified range of text does not fit into a + * DOMString. + */ + public static final short DOMSTRING_SIZE_ERR = 2; + /** + * If any Node is inserted somewhere it doesn't belong. + */ + public static final short HIERARCHY_REQUEST_ERR = 3; + /** + * If a Node is used in a different document than the one + * that created it (that doesn't support it). + */ + public static final short WRONG_DOCUMENT_ERR = 4; + /** + * If an invalid or illegal character is specified, such as in an XML name. + */ + public static final short INVALID_CHARACTER_ERR = 5; + /** + * If data is specified for a Node which does not support + * data. + */ + public static final short NO_DATA_ALLOWED_ERR = 6; + /** + * If an attempt is made to modify an object where modifications are not + * allowed. + */ + public static final short NO_MODIFICATION_ALLOWED_ERR = 7; + /** + * If an attempt is made to reference a Node in a context + * where it does not exist. + */ + public static final short NOT_FOUND_ERR = 8; + /** + * If the implementation does not support the requested type of object or + * operation. + */ + public static final short NOT_SUPPORTED_ERR = 9; + /** + * If an attempt is made to add an attribute that is already in use + * elsewhere. + */ + public static final short INUSE_ATTRIBUTE_ERR = 10; + /** + * If an attempt is made to use an object that is not, or is no longer, + * usable. + * @since DOM Level 2 + */ + public static final short INVALID_STATE_ERR = 11; + /** + * If an invalid or illegal string is specified. + * @since DOM Level 2 + */ + public static final short SYNTAX_ERR = 12; + /** + * If an attempt is made to modify the type of the underlying object. + * @since DOM Level 2 + */ + public static final short INVALID_MODIFICATION_ERR = 13; + /** + * If an attempt is made to create or change an object in a way which is + * incorrect with regard to namespaces. + * @since DOM Level 2 + */ + public static final short NAMESPACE_ERR = 14; + /** + * If a parameter or an operation is not supported by the underlying + * object. + * @since DOM Level 2 + */ + public static final short INVALID_ACCESS_ERR = 15; + /** + * If a call to a method such as insertBefore or + * removeChild would make the Node invalid + * with respect to "partial validity", this exception would be raised + * and the operation would not be done. This code is used in [DOM Level 3 Validation] + * . Refer to this specification for further information. + * @since DOM Level 3 + */ + public static final short VALIDATION_ERR = 16; + /** + * If the type of an object is incompatible with the expected type of the + * parameter associated to the object. + * @since DOM Level 3 + */ + public static final short TYPE_MISMATCH_ERR = 17; + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/DOMImplementation.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/DOMImplementation.java new file mode 100644 index 000000000..9b0757433 --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/DOMImplementation.java @@ -0,0 +1,136 @@ +/* + * 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 + */ + +package org.w3c.dom; + +/** + * The DOMImplementation interface provides a number of methods + * for performing operations that are independent of any particular instance + * of the document object model. + *

See also the Document Object Model (DOM) Level 3 Core Specification. + */ +public interface DOMImplementation { + /** + * Test if the DOM implementation implements a specific feature and + * version, as specified in . + * @param feature The name of the feature to test. + * @param version This is the version number of the feature to test. + * @return true if the feature is implemented in the + * specified version, false otherwise. + */ + public boolean hasFeature(String feature, + String version); + + /** + * Creates an empty DocumentType node. Entity declarations + * and notations are not made available. Entity reference expansions and + * default attribute additions do not occur.. + * @param qualifiedName The qualified name of the document type to be + * created. + * @param publicId The external subset public identifier. + * @param systemId The external subset system identifier. + * @return A new DocumentType node with + * Node.ownerDocument set to null. + * @exception DOMException + * INVALID_CHARACTER_ERR: Raised if the specified qualified name is not + * an XML name according to [XML 1.0]. + *
NAMESPACE_ERR: Raised if the qualifiedName is + * malformed. + *
NOT_SUPPORTED_ERR: May be raised if the implementation does not + * support the feature "XML" and the language exposed through the + * Document does not support XML Namespaces (such as [HTML 4.01]). + * @since DOM Level 2 + */ + public DocumentType createDocumentType(String qualifiedName, + String publicId, + String systemId) + throws DOMException; + + /** + * Creates a DOM Document object of the specified type with its document + * element. + *
Note that based on the DocumentType given to create + * the document, the implementation may instantiate specialized + * Document objects that support additional features than + * the "Core", such as "HTML" [DOM Level 2 HTML] + * . On the other hand, setting the DocumentType after the + * document was created makes this very unlikely to happen. + * Alternatively, specialized Document creation methods, + * such as createHTMLDocument [DOM Level 2 HTML] + * , can be used to obtain specific types of Document + * objects. + * @param namespaceURI The namespace URI of the document element to + * create or null. + * @param qualifiedName The qualified name of the document element to be + * created or null. + * @param doctype The type of document to be created or null. + * When doctype is not null, its + * Node.ownerDocument attribute is set to the document + * being created. + * @return A new Document object with its document element. + * If the NamespaceURI, qualifiedName, and + * doctype are null, the returned + * Document is empty with no document element. + * @exception DOMException + * INVALID_CHARACTER_ERR: Raised if the specified qualified name is not + * an XML name according to [XML 1.0]. + *
NAMESPACE_ERR: Raised if the qualifiedName is + * malformed, if the qualifiedName has a prefix and the + * namespaceURI is null, or if the + * qualifiedName is null and the + * namespaceURI is different from null, or + * if the qualifiedName has a prefix that is "xml" and + * the namespaceURI is different from " + * http://www.w3.org/XML/1998/namespace" [XML Namespaces] + * , or if the DOM implementation does not support the + * "XML" feature but a non-null namespace URI was + * provided, since namespaces were defined by XML. + *
WRONG_DOCUMENT_ERR: Raised if doctype has already + * been used with a different document or was created from a different + * implementation. + *
NOT_SUPPORTED_ERR: May be raised if the implementation does not + * support the feature "XML" and the language exposed through the + * Document does not support XML Namespaces (such as [HTML 4.01]). + * @since DOM Level 2 + */ + public Document createDocument(String namespaceURI, + String qualifiedName, + DocumentType doctype) + throws DOMException; + + /** + * This method returns a specialized object which implements the + * specialized APIs of the specified feature and version, as specified + * in . The specialized object may also be obtained by using + * binding-specific casting methods but is not necessarily expected to, + * as discussed in . This method also allow the implementation to + * provide specialized objects which do not support the + * DOMImplementation interface. + * @param feature The name of the feature requested. Note that any plus + * sign "+" prepended to the name of the feature will be ignored since + * it is not significant in the context of this method. + * @param version This is the version number of the feature to test. + * @return Returns an object which implements the specialized APIs of + * the specified feature and version, if any, or null if + * there is no object which implements interfaces associated with that + * feature. If the DOMObject returned by this method + * implements the DOMImplementation interface, it must + * delegate to the primary core DOMImplementation and not + * return results inconsistent with the primary core + * DOMImplementation such as hasFeature, + * getFeature, etc. + * @since DOM Level 3 + */ + public Object getFeature(String feature, + String version); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/DOMImplementationList.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/DOMImplementationList.java new file mode 100644 index 000000000..877de6efe --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/DOMImplementationList.java @@ -0,0 +1,43 @@ +/* + * 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 + */ + +package org.w3c.dom; + +/** + * The DOMImplementationList interface provides the abstraction + * of an ordered collection of DOM implementations, without defining or + * constraining how this collection is implemented. The items in the + * DOMImplementationList are accessible via an integral index, + * starting from 0. + *

See also the Document Object Model (DOM) Level 3 Core Specification. + * @since DOM Level 3 + */ +public interface DOMImplementationList { + /** + * Returns the indexth item in the collection. If + * index is greater than or equal to the number of + * DOMImplementations in the list, this returns + * null. + * @param index Index into the collection. + * @return The DOMImplementation at the index + * th position in the DOMImplementationList, or + * null if that is not a valid index. + */ + public DOMImplementation item(int index); + + /** + * The number of DOMImplementations in the list. The range + * of valid child node indices is 0 to length-1 inclusive. + */ + public int getLength(); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/DOMImplementationSource.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/DOMImplementationSource.java new file mode 100644 index 000000000..1c5c0b2fe --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/DOMImplementationSource.java @@ -0,0 +1,58 @@ +/* + * 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 + */ + +package org.w3c.dom; + +/** + * This interface permits a DOM implementer to supply one or more + * implementations, based upon requested features and versions, as specified + * in . Each implemented DOMImplementationSource object is + * listed in the binding-specific list of available sources so that its + * DOMImplementation objects are made available. + *

See also the Document Object Model (DOM) Level 3 Core Specification. + * @since DOM Level 3 + */ +public interface DOMImplementationSource { + /** + * A method to request the first DOM implementation that supports the + * specified features. + * @param features A string that specifies which features and versions + * are required. This is a space separated list in which each feature + * is specified by its name optionally followed by a space and a + * version number. This method returns the first item of the list + * returned by getDOMImplementationList. As an example, + * the string "XML 3.0 Traversal +Events 2.0" will + * request a DOM implementation that supports the module "XML" for its + * 3.0 version, a module that support of the "Traversal" module for + * any version, and the module "Events" for its 2.0 version. The + * module "Events" must be accessible using the method + * Node.getFeature() and + * DOMImplementation.getFeature(). + * @return The first DOM implementation that support the desired + * features, or null if this source has none. + */ + public DOMImplementation getDOMImplementation(String features); + + /** + * A method to request a list of DOM implementations that support the + * specified features and versions, as specified in . + * @param features A string that specifies which features and versions + * are required. This is a space separated list in which each feature + * is specified by its name optionally followed by a space and a + * version number. This is something like: "XML 3.0 Traversal +Events + * 2.0" + * @return A list of DOM implementations that support the desired + * features. + */ + public DOMImplementationList getDOMImplementationList(String features); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/DOMLocator.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/DOMLocator.java new file mode 100644 index 000000000..50cd7d240 --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/DOMLocator.java @@ -0,0 +1,58 @@ +/* + * 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 + */ + +package org.w3c.dom; + +/** + * DOMLocator is an interface that describes a location (e.g. + * where an error occurred). + *

See also the Document Object Model (DOM) Level 3 Core Specification. + * @since DOM Level 3 + */ +public interface DOMLocator { + /** + * The line number this locator is pointing to, or -1 if + * there is no column number available. + */ + public int getLineNumber(); + + /** + * The column number this locator is pointing to, or -1 if + * there is no column number available. + */ + public int getColumnNumber(); + + /** + * The byte offset into the input source this locator is pointing to or + * -1 if there is no byte offset available. + */ + public int getByteOffset(); + + /** + * The UTF-16, as defined in [Unicode] and Amendment 1 of [ISO/IEC 10646], offset into the input source this locator is pointing to or + * -1 if there is no UTF-16 offset available. + */ + public int getUtf16Offset(); + + /** + * The node this locator is pointing to, or null if no node + * is available. + */ + public Node getRelatedNode(); + + /** + * The URI this locator is pointing to, or null if no URI is + * available. + */ + public String getUri(); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/DOMStringList.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/DOMStringList.java new file mode 100644 index 000000000..53a40964e --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/DOMStringList.java @@ -0,0 +1,50 @@ +/* + * 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 + */ + +package org.w3c.dom; + +/** + * The DOMStringList interface provides the abstraction of an + * ordered collection of DOMString values, without defining or + * constraining how this collection is implemented. The items in the + * DOMStringList are accessible via an integral index, starting + * from 0. + *

See also the Document Object Model (DOM) Level 3 Core Specification. + * @since DOM Level 3 + */ +public interface DOMStringList { + /** + * Returns the indexth item in the collection. If + * index is greater than or equal to the number of + * DOMStrings in the list, this returns null. + * @param index Index into the collection. + * @return The DOMString at the indexth + * position in the DOMStringList, or null if + * that is not a valid index. + */ + public String item(int index); + + /** + * The number of DOMStrings in the list. The range of valid + * child node indices is 0 to length-1 inclusive. + */ + public int getLength(); + + /** + * Test if a string is part of this DOMStringList. + * @param str The string to look for. + * @return true if the string has been found, + * false otherwise. + */ + public boolean contains(String str); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/Document.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/Document.java new file mode 100644 index 000000000..3193fa260 --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/Document.java @@ -0,0 +1,814 @@ +/* + * 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 + */ + +package org.w3c.dom; + +/** + * The Document interface represents the entire HTML or XML + * document. Conceptually, it is the root of the document tree, and provides + * the primary access to the document's data. + *

Since elements, text nodes, comments, processing instructions, etc. + * cannot exist outside the context of a Document, the + * Document interface also contains the factory methods needed + * to create these objects. The Node objects created have a + * ownerDocument attribute which associates them with the + * Document within whose context they were created. + *

See also the Document Object Model (DOM) Level 3 Core Specification. + */ +public interface Document extends Node { + /** + * The Document Type Declaration (see DocumentType) + * associated with this document. For XML documents without a document + * type declaration this returns null. For HTML documents, + * a DocumentType object may be returned, independently of + * the presence or absence of document type declaration in the HTML + * document. + *
This provides direct access to the DocumentType node, + * child node of this Document. This node can be set at + * document creation time and later changed through the use of child + * nodes manipulation methods, such as Node.insertBefore, + * or Node.replaceChild. Note, however, that while some + * implementations may instantiate different types of + * Document objects supporting additional features than the + * "Core", such as "HTML" [DOM Level 2 HTML] + * , based on the DocumentType specified at creation time, + * changing it afterwards is very unlikely to result in a change of the + * features supported. + * @version DOM Level 3 + */ + public DocumentType getDoctype(); + + /** + * The DOMImplementation object that handles this document. A + * DOM application may use objects from multiple implementations. + */ + public DOMImplementation getImplementation(); + + /** + * This is a convenience attribute that allows direct access to the child + * node that is the document element of the document. + */ + public Element getDocumentElement(); + + /** + * Creates an element of the type specified. Note that the instance + * returned implements the Element interface, so attributes + * can be specified directly on the returned object. + *
In addition, if there are known attributes with default values, + * Attr nodes representing them are automatically created + * and attached to the element. + *
To create an element with a qualified name and namespace URI, use + * the createElementNS method. + * @param tagName The name of the element type to instantiate. For XML, + * this is case-sensitive, otherwise it depends on the + * case-sensitivity of the markup language in use. In that case, the + * name is mapped to the canonical form of that markup by the DOM + * implementation. + * @return A new Element object with the + * nodeName attribute set to tagName, and + * localName, prefix, and + * namespaceURI set to null. + * @exception DOMException + * INVALID_CHARACTER_ERR: Raised if the specified name is not an XML + * name according to the XML version in use specified in the + * Document.xmlVersion attribute. + */ + public Element createElement(String tagName) + throws DOMException; + + /** + * Creates an empty DocumentFragment object. + * @return A new DocumentFragment. + */ + public DocumentFragment createDocumentFragment(); + + /** + * Creates a Text node given the specified string. + * @param data The data for the node. + * @return The new Text object. + */ + public Text createTextNode(String data); + + /** + * Creates a Comment node given the specified string. + * @param data The data for the node. + * @return The new Comment object. + */ + public Comment createComment(String data); + + /** + * Creates a CDATASection node whose value is the specified + * string. + * @param data The data for the CDATASection contents. + * @return The new CDATASection object. + * @exception DOMException + * NOT_SUPPORTED_ERR: Raised if this document is an HTML document. + */ + public CDATASection createCDATASection(String data) + throws DOMException; + + /** + * Creates a ProcessingInstruction node given the specified + * name and data strings. + * @param target The target part of the processing instruction.Unlike + * Document.createElementNS or + * Document.createAttributeNS, no namespace well-formed + * checking is done on the target name. Applications should invoke + * Document.normalizeDocument() with the parameter " + * namespaces" set to true in order to ensure that the + * target name is namespace well-formed. + * @param data The data for the node. + * @return The new ProcessingInstruction object. + * @exception DOMException + * INVALID_CHARACTER_ERR: Raised if the specified target is not an XML + * name according to the XML version in use specified in the + * Document.xmlVersion attribute. + *
NOT_SUPPORTED_ERR: Raised if this document is an HTML document. + */ + public ProcessingInstruction createProcessingInstruction(String target, + String data) + throws DOMException; + + /** + * Creates an Attr of the given name. Note that the + * Attr instance can then be set on an Element + * using the setAttributeNode method. + *
To create an attribute with a qualified name and namespace URI, use + * the createAttributeNS method. + * @param name The name of the attribute. + * @return A new Attr object with the nodeName + * attribute set to name, and localName, + * prefix, and namespaceURI set to + * null. The value of the attribute is the empty string. + * @exception DOMException + * INVALID_CHARACTER_ERR: Raised if the specified name is not an XML + * name according to the XML version in use specified in the + * Document.xmlVersion attribute. + */ + public Attr createAttribute(String name) + throws DOMException; + + /** + * Creates an EntityReference object. In addition, if the + * referenced entity is known, the child list of the + * EntityReference node is made the same as that of the + * corresponding Entity node. + *

Note: If any descendant of the Entity node has + * an unbound namespace prefix, the corresponding descendant of the + * created EntityReference node is also unbound; (its + * namespaceURI is null). The DOM Level 2 and + * 3 do not support any mechanism to resolve namespace prefixes in this + * case. + * @param name The name of the entity to reference.Unlike + * Document.createElementNS or + * Document.createAttributeNS, no namespace well-formed + * checking is done on the entity name. Applications should invoke + * Document.normalizeDocument() with the parameter " + * namespaces" set to true in order to ensure that the + * entity name is namespace well-formed. + * @return The new EntityReference object. + * @exception DOMException + * INVALID_CHARACTER_ERR: Raised if the specified name is not an XML + * name according to the XML version in use specified in the + * Document.xmlVersion attribute. + *
NOT_SUPPORTED_ERR: Raised if this document is an HTML document. + */ + public EntityReference createEntityReference(String name) + throws DOMException; + + /** + * Returns a NodeList of all the Elements in + * document order with a given tag name and are contained in the + * document. + * @param tagname The name of the tag to match on. The special value "*" + * matches all tags. For XML, the tagname parameter is + * case-sensitive, otherwise it depends on the case-sensitivity of the + * markup language in use. + * @return A new NodeList object containing all the matched + * Elements. + */ + public NodeList getElementsByTagName(String tagname); + + /** + * Imports a node from another document to this document, without altering + * or removing the source node from the original document; this method + * creates a new copy of the source node. The returned node has no + * parent; (parentNode is null). + *
For all nodes, importing a node creates a node object owned by the + * importing document, with attribute values identical to the source + * node's nodeName and nodeType, plus the + * attributes related to namespaces (prefix, + * localName, and namespaceURI). As in the + * cloneNode operation, the source node is not altered. + * User data associated to the imported node is not carried over. + * However, if any UserDataHandlers has been specified + * along with the associated data these handlers will be called with the + * appropriate parameters before this method returns. + *
Additional information is copied as appropriate to the + * nodeType, attempting to mirror the behavior expected if + * a fragment of XML or HTML source was copied from one document to + * another, recognizing that the two documents may have different DTDs + * in the XML case. The following list describes the specifics for each + * type of node. + *

+ *
ATTRIBUTE_NODE
+ *
The ownerElement attribute + * is set to null and the specified flag is + * set to true on the generated Attr. The + * descendants of the source Attr are recursively imported + * and the resulting nodes reassembled to form the corresponding subtree. + * Note that the deep parameter has no effect on + * Attr nodes; they always carry their children with them + * when imported.
+ *
DOCUMENT_FRAGMENT_NODE
+ *
If the deep option + * was set to true, the descendants of the source + * DocumentFragment are recursively imported and the + * resulting nodes reassembled under the imported + * DocumentFragment to form the corresponding subtree. + * Otherwise, this simply generates an empty + * DocumentFragment.
+ *
DOCUMENT_NODE
+ *
Document + * nodes cannot be imported.
+ *
DOCUMENT_TYPE_NODE
+ *
DocumentType + * nodes cannot be imported.
+ *
ELEMENT_NODE
+ *
Specified attribute nodes of the source element are imported, and the generated + * Attr nodes are attached to the generated + * Element. Default attributes are not copied, though if the document being imported into defines default + * attributes for this element name, those are assigned. If the + * importNode deep parameter was set to + * true, the descendants of the source element are + * recursively imported and the resulting nodes reassembled to form the + * corresponding subtree.
+ *
ENTITY_NODE
+ *
Entity nodes can be + * imported, however in the current release of the DOM the + * DocumentType is readonly. Ability to add these imported + * nodes to a DocumentType will be considered for addition + * to a future release of the DOM.On import, the publicId, + * systemId, and notationName attributes are + * copied. If a deep import is requested, the descendants + * of the the source Entity are recursively imported and + * the resulting nodes reassembled to form the corresponding subtree.
+ *
+ * ENTITY_REFERENCE_NODE
+ *
Only the EntityReference itself is + * copied, even if a deep import is requested, since the + * source and destination documents might have defined the entity + * differently. If the document being imported into provides a + * definition for this entity name, its value is assigned.
+ *
NOTATION_NODE
+ *
+ * Notation nodes can be imported, however in the current + * release of the DOM the DocumentType is readonly. Ability + * to add these imported nodes to a DocumentType will be + * considered for addition to a future release of the DOM.On import, the + * publicId and systemId attributes are copied. + * Note that the deep parameter has no effect on this type + * of nodes since they cannot have any children.
+ *
+ * PROCESSING_INSTRUCTION_NODE
+ *
The imported node copies its + * target and data values from those of the + * source node.Note that the deep parameter has no effect + * on this type of nodes since they cannot have any children.
+ *
TEXT_NODE, + * CDATA_SECTION_NODE, COMMENT_NODE
+ *
These three types of nodes inheriting + * from CharacterData copy their data and + * length attributes from those of the source node.Note + * that the deep parameter has no effect on these types of + * nodes since they cannot have any children.
+ *
+ * @param importedNode The node to import. + * @param deep If true, recursively import the subtree under + * the specified node; if false, import only the node + * itself, as explained above. This has no effect on nodes that cannot + * have any children, and on Attr, and + * EntityReference nodes. + * @return The imported node that belongs to this Document. + * @exception DOMException + * NOT_SUPPORTED_ERR: Raised if the type of node being imported is not + * supported. + *
INVALID_CHARACTER_ERR: Raised if one of the imported names is not + * an XML name according to the XML version in use specified in the + * Document.xmlVersion attribute. This may happen when + * importing an XML 1.1 [XML 1.1] element + * into an XML 1.0 document, for instance. + * @since DOM Level 2 + */ + public Node importNode(Node importedNode, + boolean deep) + throws DOMException; + + /** + * Creates an element of the given qualified name and namespace URI. + *
Per [XML Namespaces] + * , applications must use the value null as the + * namespaceURI parameter for methods if they wish to have no namespace. + * @param namespaceURI The namespace URI of the element to create. + * @param qualifiedName The qualified name of the element type to + * instantiate. + * @return A new Element object with the following + * attributes: + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
AttributeValue
Node.nodeName + * qualifiedName
Node.namespaceURI + * namespaceURI
Node.prefixprefix, extracted + * from qualifiedName, or null if there is + * no prefix
Node.localNamelocal name, extracted from + * qualifiedName
Element.tagName + * qualifiedName
+ * @exception DOMException + * INVALID_CHARACTER_ERR: Raised if the specified + * qualifiedName is not an XML name according to the XML + * version in use specified in the Document.xmlVersion + * attribute. + *
NAMESPACE_ERR: Raised if the qualifiedName is a + * malformed qualified name, if the qualifiedName has a + * prefix and the namespaceURI is null, or + * if the qualifiedName has a prefix that is "xml" and + * the namespaceURI is different from " + * http://www.w3.org/XML/1998/namespace" [XML Namespaces] + * , or if the qualifiedName or its prefix is "xmlns" and + * the namespaceURI is different from "http://www.w3.org/2000/xmlns/", or if the namespaceURI is "http://www.w3.org/2000/xmlns/" and neither the qualifiedName nor its prefix is "xmlns". + *
NOT_SUPPORTED_ERR: Always thrown if the current document does not + * support the "XML" feature, since namespaces were + * defined by XML. + * @since DOM Level 2 + */ + public Element createElementNS(String namespaceURI, + String qualifiedName) + throws DOMException; + + /** + * Creates an attribute of the given qualified name and namespace URI. + *
Per [XML Namespaces] + * , applications must use the value null as the + * namespaceURI parameter for methods if they wish to have + * no namespace. + * @param namespaceURI The namespace URI of the attribute to create. + * @param qualifiedName The qualified name of the attribute to + * instantiate. + * @return A new Attr object with the following attributes: + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
+ * AttributeValue
Node.nodeNamequalifiedName
+ * Node.namespaceURInamespaceURI
+ * Node.prefixprefix, extracted from + * qualifiedName, or null if there is no + * prefix
Node.localNamelocal name, extracted from + * qualifiedName
Attr.name + * qualifiedName
Node.nodeValuethe empty + * string
+ * @exception DOMException + * INVALID_CHARACTER_ERR: Raised if the specified + * qualifiedName is not an XML name according to the XML + * version in use specified in the Document.xmlVersion + * attribute. + *
NAMESPACE_ERR: Raised if the qualifiedName is a + * malformed qualified name, if the qualifiedName has a + * prefix and the namespaceURI is null, if + * the qualifiedName has a prefix that is "xml" and the + * namespaceURI is different from " + * http://www.w3.org/XML/1998/namespace", if the qualifiedName or its prefix is "xmlns" and the + * namespaceURI is different from "http://www.w3.org/2000/xmlns/", or if the namespaceURI is "http://www.w3.org/2000/xmlns/" and neither the qualifiedName nor its prefix is "xmlns". + *
NOT_SUPPORTED_ERR: Always thrown if the current document does not + * support the "XML" feature, since namespaces were + * defined by XML. + * @since DOM Level 2 + */ + public Attr createAttributeNS(String namespaceURI, + String qualifiedName) + throws DOMException; + + /** + * Returns a NodeList of all the Elements with a + * given local name and namespace URI in document order. + * @param namespaceURI The namespace URI of the elements to match on. The + * special value "*" matches all namespaces. + * @param localName The local name of the elements to match on. The + * special value "*" matches all local names. + * @return A new NodeList object containing all the matched + * Elements. + * @since DOM Level 2 + */ + public NodeList getElementsByTagNameNS(String namespaceURI, + String localName); + + /** + * Returns the Element that has an ID attribute with the + * given value. If no such element exists, this returns null + * . If more than one element has an ID attribute with that value, what + * is returned is undefined. + *
The DOM implementation is expected to use the attribute + * Attr.isId to determine if an attribute is of type ID. + *

Note: Attributes with the name "ID" or "id" are not of type + * ID unless so defined. + * @param elementId The unique id value for an element. + * @return The matching element or null if there is none. + * @since DOM Level 2 + */ + public Element getElementById(String elementId); + + /** + * An attribute specifying the encoding used for this document at the time + * of the parsing. This is null when it is not known, such + * as when the Document was created in memory. + * @since DOM Level 3 + */ + public String getInputEncoding(); + + /** + * An attribute specifying, as part of the XML declaration, the encoding of this document. This is null when + * unspecified or when it is not known, such as when the + * Document was created in memory. + * @since DOM Level 3 + */ + public String getXmlEncoding(); + + /** + * An attribute specifying, as part of the XML declaration, whether this document is standalone. This is false when + * unspecified. + *

Note: No verification is done on the value when setting + * this attribute. Applications should use + * Document.normalizeDocument() with the "validate" + * parameter to verify if the value matches the validity + * constraint for standalone document declaration as defined in [XML 1.0]. + * @since DOM Level 3 + */ + public boolean getXmlStandalone(); + /** + * An attribute specifying, as part of the XML declaration, whether this document is standalone. This is false when + * unspecified. + *

Note: No verification is done on the value when setting + * this attribute. Applications should use + * Document.normalizeDocument() with the "validate" + * parameter to verify if the value matches the validity + * constraint for standalone document declaration as defined in [XML 1.0]. + * @exception DOMException + * NOT_SUPPORTED_ERR: Raised if this document does not support the + * "XML" feature. + * @since DOM Level 3 + */ + public void setXmlStandalone(boolean xmlStandalone) + throws DOMException; + + /** + * An attribute specifying, as part of the XML declaration, the version number of this document. If there is no declaration and if + * this document supports the "XML" feature, the value is + * "1.0". If this document does not support the "XML" + * feature, the value is always null. Changing this + * attribute will affect methods that check for invalid characters in + * XML names. Application should invoke + * Document.normalizeDocument() in order to check for + * invalid characters in the Nodes that are already part of + * this Document. + *
DOM applications may use the + * DOMImplementation.hasFeature(feature, version) method + * with parameter values "XMLVersion" and "1.0" (respectively) to + * determine if an implementation supports [XML 1.0]. DOM + * applications may use the same method with parameter values + * "XMLVersion" and "1.1" (respectively) to determine if an + * implementation supports [XML 1.1]. In both + * cases, in order to support XML, an implementation must also support + * the "XML" feature defined in this specification. Document + * objects supporting a version of the "XMLVersion" feature must not + * raise a NOT_SUPPORTED_ERR exception for the same version + * number when using Document.xmlVersion. + * @since DOM Level 3 + */ + public String getXmlVersion(); + /** + * An attribute specifying, as part of the XML declaration, the version number of this document. If there is no declaration and if + * this document supports the "XML" feature, the value is + * "1.0". If this document does not support the "XML" + * feature, the value is always null. Changing this + * attribute will affect methods that check for invalid characters in + * XML names. Application should invoke + * Document.normalizeDocument() in order to check for + * invalid characters in the Nodes that are already part of + * this Document. + *
DOM applications may use the + * DOMImplementation.hasFeature(feature, version) method + * with parameter values "XMLVersion" and "1.0" (respectively) to + * determine if an implementation supports [XML 1.0]. DOM + * applications may use the same method with parameter values + * "XMLVersion" and "1.1" (respectively) to determine if an + * implementation supports [XML 1.1]. In both + * cases, in order to support XML, an implementation must also support + * the "XML" feature defined in this specification. Document + * objects supporting a version of the "XMLVersion" feature must not + * raise a NOT_SUPPORTED_ERR exception for the same version + * number when using Document.xmlVersion. + * @exception DOMException + * NOT_SUPPORTED_ERR: Raised if the version is set to a value that is + * not supported by this Document or if this document + * does not support the "XML" feature. + * @since DOM Level 3 + */ + public void setXmlVersion(String xmlVersion) + throws DOMException; + + /** + * An attribute specifying whether error checking is enforced or not. When + * set to false, the implementation is free to not test + * every possible error case normally defined on DOM operations, and not + * raise any DOMException on DOM operations or report + * errors while using Document.normalizeDocument(). In case + * of error, the behavior is undefined. This attribute is + * true by default. + * @since DOM Level 3 + */ + public boolean getStrictErrorChecking(); + /** + * An attribute specifying whether error checking is enforced or not. When + * set to false, the implementation is free to not test + * every possible error case normally defined on DOM operations, and not + * raise any DOMException on DOM operations or report + * errors while using Document.normalizeDocument(). In case + * of error, the behavior is undefined. This attribute is + * true by default. + * @since DOM Level 3 + */ + public void setStrictErrorChecking(boolean strictErrorChecking); + + /** + * The location of the document or null if undefined or if + * the Document was created using + * DOMImplementation.createDocument. No lexical checking is + * performed when setting this attribute; this could result in a + * null value returned when using Node.baseURI + * . + *
Beware that when the Document supports the feature + * "HTML" [DOM Level 2 HTML] + * , the href attribute of the HTML BASE element takes precedence over + * this attribute when computing Node.baseURI. + * @since DOM Level 3 + */ + public String getDocumentURI(); + /** + * The location of the document or null if undefined or if + * the Document was created using + * DOMImplementation.createDocument. No lexical checking is + * performed when setting this attribute; this could result in a + * null value returned when using Node.baseURI + * . + *
Beware that when the Document supports the feature + * "HTML" [DOM Level 2 HTML] + * , the href attribute of the HTML BASE element takes precedence over + * this attribute when computing Node.baseURI. + * @since DOM Level 3 + */ + public void setDocumentURI(String documentURI); + + /** + * Attempts to adopt a node from another document to this document. If + * supported, it changes the ownerDocument of the source + * node, its children, as well as the attached attribute nodes if there + * are any. If the source node has a parent it is first removed from the + * child list of its parent. This effectively allows moving a subtree + * from one document to another (unlike importNode() which + * create a copy of the source node instead of moving it). When it + * fails, applications should use Document.importNode() + * instead. Note that if the adopted node is already part of this + * document (i.e. the source and target document are the same), this + * method still has the effect of removing the source node from the + * child list of its parent, if any. The following list describes the + * specifics for each type of node. + *

+ *
ATTRIBUTE_NODE
+ *
The + * ownerElement attribute is set to null and + * the specified flag is set to true on the + * adopted Attr. The descendants of the source + * Attr are recursively adopted.
+ *
DOCUMENT_FRAGMENT_NODE
+ *
The + * descendants of the source node are recursively adopted.
+ *
DOCUMENT_NODE
+ *
+ * Document nodes cannot be adopted.
+ *
DOCUMENT_TYPE_NODE
+ *
+ * DocumentType nodes cannot be adopted.
+ *
ELEMENT_NODE
+ *
Specified attribute nodes of the source element are adopted. Default attributes + * are discarded, though if the document being adopted into defines + * default attributes for this element name, those are assigned. The + * descendants of the source element are recursively adopted.
+ *
ENTITY_NODE
+ *
+ * Entity nodes cannot be adopted.
+ *
ENTITY_REFERENCE_NODE
+ *
Only + * the EntityReference node itself is adopted, the + * descendants are discarded, since the source and destination documents + * might have defined the entity differently. If the document being + * imported into provides a definition for this entity name, its value + * is assigned.
+ *
NOTATION_NODE
+ *
Notation nodes cannot be + * adopted.
+ *
PROCESSING_INSTRUCTION_NODE, TEXT_NODE, CDATA_SECTION_NODE, + * COMMENT_NODE
+ *
These nodes can all be adopted. No specifics.
+ *
+ *

Note: Since it does not create new nodes unlike the + * Document.importNode() method, this method does not raise + * an INVALID_CHARACTER_ERR exception, and applications + * should use the Document.normalizeDocument() method to + * check if an imported name is not an XML name according to the XML + * version in use. + * @param source The node to move into this document. + * @return The adopted node, or null if this operation + * fails, such as when the source node comes from a different + * implementation. + * @exception DOMException + * NOT_SUPPORTED_ERR: Raised if the source node is of type + * DOCUMENT, DOCUMENT_TYPE. + *
NO_MODIFICATION_ALLOWED_ERR: Raised when the source node is + * readonly. + * @since DOM Level 3 + */ + public Node adoptNode(Node source) + throws DOMException; + + /** + * The configuration used when Document.normalizeDocument() + * is invoked. + * @since DOM Level 3 + */ + public DOMConfiguration getDomConfig(); + + /** + * This method acts as if the document was going through a save and load + * cycle, putting the document in a "normal" form. As a consequence, + * this method updates the replacement tree of + * EntityReference nodes and normalizes Text + * nodes, as defined in the method Node.normalize(). + *
Otherwise, the actual result depends on the features being set on + * the Document.domConfig object and governing what + * operations actually take place. Noticeably this method could also + * make the document namespace well-formed according to the algorithm + * described in , check the character normalization, remove the + * CDATASection nodes, etc. See + * DOMConfiguration for details. + *

// Keep in the document
+     * the information defined // in the XML Information Set (Java example)
+     * DOMConfiguration docConfig = myDocument.getDomConfig();
+     * docConfig.setParameter("infoset", Boolean.TRUE);
+     * myDocument.normalizeDocument();
+ * + *
Mutation events, when supported, are generated to reflect the + * changes occurring on the document. + *
If errors occur during the invocation of this method, such as an + * attempt to update a read-only node or a Node.nodeName + * contains an invalid character according to the XML version in use, + * errors or warnings (DOMError.SEVERITY_ERROR or + * DOMError.SEVERITY_WARNING) will be reported using the + * DOMErrorHandler object associated with the "error-handler + * " parameter. Note this method might also report fatal errors ( + * DOMError.SEVERITY_FATAL_ERROR) if an implementation + * cannot recover from an error. + * @since DOM Level 3 + */ + public void normalizeDocument(); + + /** + * Rename an existing node of type ELEMENT_NODE or + * ATTRIBUTE_NODE. + *
When possible this simply changes the name of the given node, + * otherwise this creates a new node with the specified name and + * replaces the existing node with the new node as described below. + *
If simply changing the name of the given node is not possible, the + * following operations are performed: a new node is created, any + * registered event listener is registered on the new node, any user + * data attached to the old node is removed from that node, the old node + * is removed from its parent if it has one, the children are moved to + * the new node, if the renamed node is an Element its + * attributes are moved to the new node, the new node is inserted at the + * position the old node used to have in its parent's child nodes list + * if it has one, the user data that was attached to the old node is + * attached to the new node. + *
When the node being renamed is an Element only the + * specified attributes are moved, default attributes originated from + * the DTD are updated according to the new element name. In addition, + * the implementation may update default attributes from other schemas. + * Applications should use Document.normalizeDocument() to + * guarantee these attributes are up-to-date. + *
When the node being renamed is an Attr that is + * attached to an Element, the node is first removed from + * the Element attributes map. Then, once renamed, either + * by modifying the existing node or creating a new one as described + * above, it is put back. + *
In addition, + * + * @param n The node to rename. + * @param namespaceURI The new namespace URI. + * @param qualifiedName The new qualified name. + * @return The renamed node. This is either the specified node or the new + * node that was created to replace the specified node. + * @exception DOMException + * NOT_SUPPORTED_ERR: Raised when the type of the specified node is + * neither ELEMENT_NODE nor ATTRIBUTE_NODE, + * or if the implementation does not support the renaming of the + * document element. + *
INVALID_CHARACTER_ERR: Raised if the new qualified name is not an + * XML name according to the XML version in use specified in the + * Document.xmlVersion attribute. + *
WRONG_DOCUMENT_ERR: Raised when the specified node was created + * from a different document than this document. + *
NAMESPACE_ERR: Raised if the qualifiedName is a + * malformed qualified name, if the qualifiedName has a + * prefix and the namespaceURI is null, or + * if the qualifiedName has a prefix that is "xml" and + * the namespaceURI is different from " + * http://www.w3.org/XML/1998/namespace" [XML Namespaces] + * . Also raised, when the node being renamed is an attribute, if the + * qualifiedName, or its prefix, is "xmlns" and the + * namespaceURI is different from "http://www.w3.org/2000/xmlns/". + * @since DOM Level 3 + */ + public Node renameNode(Node n, + String namespaceURI, + String qualifiedName) + throws DOMException; + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/DocumentFragment.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/DocumentFragment.java new file mode 100644 index 000000000..68739154e --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/DocumentFragment.java @@ -0,0 +1,53 @@ +/* + * 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 + */ + +package org.w3c.dom; + +/** + * DocumentFragment is a "lightweight" or "minimal" + * Document object. It is very common to want to be able to + * extract a portion of a document's tree or to create a new fragment of a + * document. Imagine implementing a user command like cut or rearranging a + * document by moving fragments around. It is desirable to have an object + * which can hold such fragments and it is quite natural to use a Node for + * this purpose. While it is true that a Document object could + * fulfill this role, a Document object can potentially be a + * heavyweight object, depending on the underlying implementation. What is + * really needed for this is a very lightweight object. + * DocumentFragment is such an object. + *

Furthermore, various operations -- such as inserting nodes as children + * of another Node -- may take DocumentFragment + * objects as arguments; this results in all the child nodes of the + * DocumentFragment being moved to the child list of this node. + *

The children of a DocumentFragment node are zero or more + * nodes representing the tops of any sub-trees defining the structure of + * the document. DocumentFragment nodes do not need to be + * well-formed XML documents (although they do need to follow the rules + * imposed upon well-formed XML parsed entities, which can have multiple top + * nodes). For example, a DocumentFragment might have only one + * child and that child node could be a Text node. Such a + * structure model represents neither an HTML document nor a well-formed XML + * document. + *

When a DocumentFragment is inserted into a + * Document (or indeed any other Node that may + * take children) the children of the DocumentFragment and not + * the DocumentFragment itself are inserted into the + * Node. This makes the DocumentFragment very + * useful when the user wishes to create nodes that are siblings; the + * DocumentFragment acts as the parent of these nodes so that + * the user can use the standard methods from the Node + * interface, such as Node.insertBefore and + * Node.appendChild. + *

See also the Document Object Model (DOM) Level 3 Core Specification. + */ +public interface DocumentFragment extends Node { +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/DocumentType.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/DocumentType.java new file mode 100644 index 000000000..785578171 --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/DocumentType.java @@ -0,0 +1,83 @@ +/* + * 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 + */ + +package org.w3c.dom; + +/** + * Each Document has a doctype attribute whose value + * is either null or a DocumentType object. The + * DocumentType interface in the DOM Core provides an interface + * to the list of entities that are defined for the document, and little + * else because the effect of namespaces and the various XML schema efforts + * on DTD representation are not clearly understood as of this writing. + *

DOM Level 3 doesn't support editing DocumentType nodes. + * DocumentType nodes are read-only. + *

See also the Document Object Model (DOM) Level 3 Core Specification. + */ +public interface DocumentType extends Node { + /** + * The name of DTD; i.e., the name immediately following the + * DOCTYPE keyword. + */ + public String getName(); + + /** + * A NamedNodeMap containing the general entities, both + * external and internal, declared in the DTD. Parameter entities are + * not contained. Duplicates are discarded. For example in: + *

<!DOCTYPE
+     * ex SYSTEM "ex.dtd" [ <!ENTITY foo "foo"> <!ENTITY bar
+     * "bar"> <!ENTITY bar "bar2"> <!ENTITY % baz "baz">
+     * ]> <ex/>
+ * the interface provides access to foo + * and the first declaration of bar but not the second + * declaration of bar or baz. Every node in + * this map also implements the Entity interface. + *
The DOM Level 2 does not support editing entities, therefore + * entities cannot be altered in any way. + */ + public NamedNodeMap getEntities(); + + /** + * A NamedNodeMap containing the notations declared in the + * DTD. Duplicates are discarded. Every node in this map also implements + * the Notation interface. + *
The DOM Level 2 does not support editing notations, therefore + * notations cannot be altered in any way. + */ + public NamedNodeMap getNotations(); + + /** + * The public identifier of the external subset. + * @since DOM Level 2 + */ + public String getPublicId(); + + /** + * The system identifier of the external subset. This may be an absolute + * URI or not. + * @since DOM Level 2 + */ + public String getSystemId(); + + /** + * The internal subset as a string, or null if there is none. + * This is does not contain the delimiting square brackets. + *

Note: The actual content returned depends on how much + * information is available to the implementation. This may vary + * depending on various parameters, including the XML processor used to + * build the document. + * @since DOM Level 2 + */ + public String getInternalSubset(); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/Element.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/Element.java new file mode 100644 index 000000000..beca7fc87 --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/Element.java @@ -0,0 +1,439 @@ +/* + * 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 + */ + +package org.w3c.dom; + +/** + * The Element interface represents an element in an HTML or XML + * document. Elements may have attributes associated with them; since the + * Element interface inherits from Node, the + * generic Node interface attribute attributes may + * be used to retrieve the set of all attributes for an element. There are + * methods on the Element interface to retrieve either an + * Attr object by name or an attribute value by name. In XML, + * where an attribute value may contain entity references, an + * Attr object should be retrieved to examine the possibly + * fairly complex sub-tree representing the attribute value. On the other + * hand, in HTML, where all attributes have simple string values, methods to + * directly access an attribute value can safely be used as a convenience. + *

Note: In DOM Level 2, the method normalize is + * inherited from the Node interface where it was moved. + *

See also the Document Object Model (DOM) Level 3 Core Specification. + */ +public interface Element extends Node { + /** + * The name of the element. If Node.localName is different + * from null, this attribute is a qualified name. For + * example, in: + *

 <elementExample id="demo"> ...
+     * </elementExample> , 
+ * tagName has the value + * "elementExample". Note that this is case-preserving in + * XML, as are all of the operations of the DOM. The HTML DOM returns + * the tagName of an HTML element in the canonical + * uppercase form, regardless of the case in the source HTML document. + */ + public String getTagName(); + + /** + * Retrieves an attribute value by name. + * @param name The name of the attribute to retrieve. + * @return The Attr value as a string, or the empty string + * if that attribute does not have a specified or default value. + */ + public String getAttribute(String name); + + /** + * Adds a new attribute. If an attribute with that name is already present + * in the element, its value is changed to be that of the value + * parameter. This value is a simple string; it is not parsed as it is + * being set. So any markup (such as syntax to be recognized as an + * entity reference) is treated as literal text, and needs to be + * appropriately escaped by the implementation when it is written out. + * In order to assign an attribute value that contains entity + * references, the user must create an Attr node plus any + * Text and EntityReference nodes, build the + * appropriate subtree, and use setAttributeNode to assign + * it as the value of an attribute. + *
To set an attribute with a qualified name and namespace URI, use + * the setAttributeNS method. + * @param name The name of the attribute to create or alter. + * @param value Value to set in string form. + * @exception DOMException + * INVALID_CHARACTER_ERR: Raised if the specified name is not an XML + * name according to the XML version in use specified in the + * Document.xmlVersion attribute. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. + */ + public void setAttribute(String name, + String value) + throws DOMException; + + /** + * Removes an attribute by name. If a default value for the removed + * attribute is defined in the DTD, a new attribute immediately appears + * with the default value as well as the corresponding namespace URI, + * local name, and prefix when applicable. The implementation may handle + * default values from other schemas similarly but applications should + * use Document.normalizeDocument() to guarantee this + * information is up-to-date. + *
If no attribute with this name is found, this method has no effect. + *
To remove an attribute by local name and namespace URI, use the + * removeAttributeNS method. + * @param name The name of the attribute to remove. + * @exception DOMException + * NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. + */ + public void removeAttribute(String name) + throws DOMException; + + /** + * Retrieves an attribute node by name. + *
To retrieve an attribute node by qualified name and namespace URI, + * use the getAttributeNodeNS method. + * @param name The name (nodeName) of the attribute to + * retrieve. + * @return The Attr node with the specified name ( + * nodeName) or null if there is no such + * attribute. + */ + public Attr getAttributeNode(String name); + + /** + * Adds a new attribute node. If an attribute with that name ( + * nodeName) is already present in the element, it is + * replaced by the new one. Replacing an attribute node by itself has no + * effect. + *
To add a new attribute node with a qualified name and namespace + * URI, use the setAttributeNodeNS method. + * @param newAttr The Attr node to add to the attribute list. + * @return If the newAttr attribute replaces an existing + * attribute, the replaced Attr node is returned, + * otherwise null is returned. + * @exception DOMException + * WRONG_DOCUMENT_ERR: Raised if newAttr was created from a + * different document than the one that created the element. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. + *
INUSE_ATTRIBUTE_ERR: Raised if newAttr is already an + * attribute of another Element object. The DOM user must + * explicitly clone Attr nodes to re-use them in other + * elements. + */ + public Attr setAttributeNode(Attr newAttr) + throws DOMException; + + /** + * Removes the specified attribute node. If a default value for the + * removed Attr node is defined in the DTD, a new node + * immediately appears with the default value as well as the + * corresponding namespace URI, local name, and prefix when applicable. + * The implementation may handle default values from other schemas + * similarly but applications should use + * Document.normalizeDocument() to guarantee this + * information is up-to-date. + * @param oldAttr The Attr node to remove from the attribute + * list. + * @return The Attr node that was removed. + * @exception DOMException + * NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. + *
NOT_FOUND_ERR: Raised if oldAttr is not an attribute + * of the element. + */ + public Attr removeAttributeNode(Attr oldAttr) + throws DOMException; + + /** + * Returns a NodeList of all descendant Elements + * with a given tag name, in document order. + * @param name The name of the tag to match on. The special value "*" + * matches all tags. + * @return A list of matching Element nodes. + */ + public NodeList getElementsByTagName(String name); + + /** + * Retrieves an attribute value by local name and namespace URI. + *
Per [XML Namespaces] + * , applications must use the value null as the + * namespaceURI parameter for methods if they wish to have + * no namespace. + * @param namespaceURI The namespace URI of the attribute to retrieve. + * @param localName The local name of the attribute to retrieve. + * @return The Attr value as a string, or the empty string + * if that attribute does not have a specified or default value. + * @exception DOMException + * NOT_SUPPORTED_ERR: May be raised if the implementation does not + * support the feature "XML" and the language exposed + * through the Document does not support XML Namespaces (such as [HTML 4.01]). + * @since DOM Level 2 + */ + public String getAttributeNS(String namespaceURI, + String localName) + throws DOMException; + + /** + * Adds a new attribute. If an attribute with the same local name and + * namespace URI is already present on the element, its prefix is + * changed to be the prefix part of the qualifiedName, and + * its value is changed to be the value parameter. This + * value is a simple string; it is not parsed as it is being set. So any + * markup (such as syntax to be recognized as an entity reference) is + * treated as literal text, and needs to be appropriately escaped by the + * implementation when it is written out. In order to assign an + * attribute value that contains entity references, the user must create + * an Attr node plus any Text and + * EntityReference nodes, build the appropriate subtree, + * and use setAttributeNodeNS or + * setAttributeNode to assign it as the value of an + * attribute. + *
Per [XML Namespaces] + * , applications must use the value null as the + * namespaceURI parameter for methods if they wish to have + * no namespace. + * @param namespaceURI The namespace URI of the attribute to create or + * alter. + * @param qualifiedName The qualified name of the attribute to create or + * alter. + * @param value The value to set in string form. + * @exception DOMException + * INVALID_CHARACTER_ERR: Raised if the specified qualified name is not + * an XML name according to the XML version in use specified in the + * Document.xmlVersion attribute. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. + *
NAMESPACE_ERR: Raised if the qualifiedName is + * malformed per the Namespaces in XML specification, if the + * qualifiedName has a prefix and the + * namespaceURI is null, if the + * qualifiedName has a prefix that is "xml" and the + * namespaceURI is different from " + * http://www.w3.org/XML/1998/namespace", if the qualifiedName or its prefix is "xmlns" and the + * namespaceURI is different from "http://www.w3.org/2000/xmlns/", or if the namespaceURI is "http://www.w3.org/2000/xmlns/" and neither the qualifiedName nor its prefix is "xmlns". + *
NOT_SUPPORTED_ERR: May be raised if the implementation does not + * support the feature "XML" and the language exposed + * through the Document does not support XML Namespaces (such as [HTML 4.01]). + * @since DOM Level 2 + */ + public void setAttributeNS(String namespaceURI, + String qualifiedName, + String value) + throws DOMException; + + /** + * Removes an attribute by local name and namespace URI. If a default + * value for the removed attribute is defined in the DTD, a new + * attribute immediately appears with the default value as well as the + * corresponding namespace URI, local name, and prefix when applicable. + * The implementation may handle default values from other schemas + * similarly but applications should use + * Document.normalizeDocument() to guarantee this + * information is up-to-date. + *
If no attribute with this local name and namespace URI is found, + * this method has no effect. + *
Per [XML Namespaces] + * , applications must use the value null as the + * namespaceURI parameter for methods if they wish to have + * no namespace. + * @param namespaceURI The namespace URI of the attribute to remove. + * @param localName The local name of the attribute to remove. + * @exception DOMException + * NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. + *
NOT_SUPPORTED_ERR: May be raised if the implementation does not + * support the feature "XML" and the language exposed + * through the Document does not support XML Namespaces (such as [HTML 4.01]). + * @since DOM Level 2 + */ + public void removeAttributeNS(String namespaceURI, + String localName) + throws DOMException; + + /** + * Retrieves an Attr node by local name and namespace URI. + *
Per [XML Namespaces] + * , applications must use the value null as the + * namespaceURI parameter for methods if they wish to have + * no namespace. + * @param namespaceURI The namespace URI of the attribute to retrieve. + * @param localName The local name of the attribute to retrieve. + * @return The Attr node with the specified attribute local + * name and namespace URI or null if there is no such + * attribute. + * @exception DOMException + * NOT_SUPPORTED_ERR: May be raised if the implementation does not + * support the feature "XML" and the language exposed + * through the Document does not support XML Namespaces (such as [HTML 4.01]). + * @since DOM Level 2 + */ + public Attr getAttributeNodeNS(String namespaceURI, + String localName) + throws DOMException; + + /** + * Adds a new attribute. If an attribute with that local name and that + * namespace URI is already present in the element, it is replaced by + * the new one. Replacing an attribute node by itself has no effect. + *
Per [XML Namespaces] + * , applications must use the value null as the + * namespaceURI parameter for methods if they wish to have + * no namespace. + * @param newAttr The Attr node to add to the attribute list. + * @return If the newAttr attribute replaces an existing + * attribute with the same local name and namespace URI, the replaced + * Attr node is returned, otherwise null is + * returned. + * @exception DOMException + * WRONG_DOCUMENT_ERR: Raised if newAttr was created from a + * different document than the one that created the element. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. + *
INUSE_ATTRIBUTE_ERR: Raised if newAttr is already an + * attribute of another Element object. The DOM user must + * explicitly clone Attr nodes to re-use them in other + * elements. + *
NOT_SUPPORTED_ERR: May be raised if the implementation does not + * support the feature "XML" and the language exposed + * through the Document does not support XML Namespaces (such as [HTML 4.01]). + * @since DOM Level 2 + */ + public Attr setAttributeNodeNS(Attr newAttr) + throws DOMException; + + /** + * Returns a NodeList of all the descendant + * Elements with a given local name and namespace URI in + * document order. + * @param namespaceURI The namespace URI of the elements to match on. The + * special value "*" matches all namespaces. + * @param localName The local name of the elements to match on. The + * special value "*" matches all local names. + * @return A new NodeList object containing all the matched + * Elements. + * @exception DOMException + * NOT_SUPPORTED_ERR: May be raised if the implementation does not + * support the feature "XML" and the language exposed + * through the Document does not support XML Namespaces (such as [HTML 4.01]). + * @since DOM Level 2 + */ + public NodeList getElementsByTagNameNS(String namespaceURI, + String localName) + throws DOMException; + + /** + * Returns true when an attribute with a given name is + * specified on this element or has a default value, false + * otherwise. + * @param name The name of the attribute to look for. + * @return true if an attribute with the given name is + * specified on this element or has a default value, false + * otherwise. + * @since DOM Level 2 + */ + public boolean hasAttribute(String name); + + /** + * Returns true when an attribute with a given local name and + * namespace URI is specified on this element or has a default value, + * false otherwise. + *
Per [XML Namespaces] + * , applications must use the value null as the + * namespaceURI parameter for methods if they wish to have + * no namespace. + * @param namespaceURI The namespace URI of the attribute to look for. + * @param localName The local name of the attribute to look for. + * @return true if an attribute with the given local name + * and namespace URI is specified or has a default value on this + * element, false otherwise. + * @exception DOMException + * NOT_SUPPORTED_ERR: May be raised if the implementation does not + * support the feature "XML" and the language exposed + * through the Document does not support XML Namespaces (such as [HTML 4.01]). + * @since DOM Level 2 + */ + public boolean hasAttributeNS(String namespaceURI, + String localName) + throws DOMException; + + /** + * The type information associated with this element. + * @since DOM Level 3 + */ + public TypeInfo getSchemaTypeInfo(); + + /** + * If the parameter isId is true, this method + * declares the specified attribute to be a user-determined ID attribute + * . This affects the value of Attr.isId and the behavior + * of Document.getElementById, but does not change any + * schema that may be in use, in particular this does not affect the + * Attr.schemaTypeInfo of the specified Attr + * node. Use the value false for the parameter + * isId to undeclare an attribute for being a + * user-determined ID attribute. + *
To specify an attribute by local name and namespace URI, use the + * setIdAttributeNS method. + * @param name The name of the attribute. + * @param isId Whether the attribute is a of type ID. + * @exception DOMException + * NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. + *
NOT_FOUND_ERR: Raised if the specified node is not an attribute + * of this element. + * @since DOM Level 3 + */ + public void setIdAttribute(String name, + boolean isId) + throws DOMException; + + /** + * If the parameter isId is true, this method + * declares the specified attribute to be a user-determined ID attribute + * . This affects the value of Attr.isId and the behavior + * of Document.getElementById, but does not change any + * schema that may be in use, in particular this does not affect the + * Attr.schemaTypeInfo of the specified Attr + * node. Use the value false for the parameter + * isId to undeclare an attribute for being a + * user-determined ID attribute. + * @param namespaceURI The namespace URI of the attribute. + * @param localName The local name of the attribute. + * @param isId Whether the attribute is a of type ID. + * @exception DOMException + * NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. + *
NOT_FOUND_ERR: Raised if the specified node is not an attribute + * of this element. + * @since DOM Level 3 + */ + public void setIdAttributeNS(String namespaceURI, + String localName, + boolean isId) + throws DOMException; + + /** + * If the parameter isId is true, this method + * declares the specified attribute to be a user-determined ID attribute + * . This affects the value of Attr.isId and the behavior + * of Document.getElementById, but does not change any + * schema that may be in use, in particular this does not affect the + * Attr.schemaTypeInfo of the specified Attr + * node. Use the value false for the parameter + * isId to undeclare an attribute for being a + * user-determined ID attribute. + * @param idAttr The attribute node. + * @param isId Whether the attribute is a of type ID. + * @exception DOMException + * NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. + *
NOT_FOUND_ERR: Raised if the specified node is not an attribute + * of this element. + * @since DOM Level 3 + */ + public void setIdAttributeNode(Attr idAttr, + boolean isId) + throws DOMException; + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/Entity.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/Entity.java new file mode 100644 index 000000000..fc89248d9 --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/Entity.java @@ -0,0 +1,90 @@ +/* + * 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 + */ + +package org.w3c.dom; + +/** + * This interface represents a known entity, either parsed or unparsed, in an + * XML document. Note that this models the entity itself not the entity declaration. + *

The nodeName attribute that is inherited from + * Node contains the name of the entity. + *

An XML processor may choose to completely expand entities before the + * structure model is passed to the DOM; in this case there will be no + * EntityReference nodes in the document tree. + *

XML does not mandate that a non-validating XML processor read and + * process entity declarations made in the external subset or declared in + * parameter entities. This means that parsed entities declared in the + * external subset need not be expanded by some classes of applications, and + * that the replacement text of the entity may not be available. When the + * replacement text is available, the corresponding Entity node's child list + * represents the structure of that replacement value. Otherwise, the child + * list is empty. + *

DOM Level 3 does not support editing Entity nodes; if a + * user wants to make changes to the contents of an Entity, + * every related EntityReference node has to be replaced in the + * structure model by a clone of the Entity's contents, and + * then the desired changes must be made to each of those clones instead. + * Entity nodes and all their descendants are readonly. + *

An Entity node does not have any parent. + *

Note: If the entity contains an unbound namespace prefix, the + * namespaceURI of the corresponding node in the + * Entity node subtree is null. The same is true + * for EntityReference nodes that refer to this entity, when + * they are created using the createEntityReference method of + * the Document interface. + *

See also the Document Object Model (DOM) Level 3 Core Specification. + */ +public interface Entity extends Node { + /** + * The public identifier associated with the entity if specified, and + * null otherwise. + */ + public String getPublicId(); + + /** + * The system identifier associated with the entity if specified, and + * null otherwise. This may be an absolute URI or not. + */ + public String getSystemId(); + + /** + * For unparsed entities, the name of the notation for the entity. For + * parsed entities, this is null. + */ + public String getNotationName(); + + /** + * An attribute specifying the encoding used for this entity at the time + * of parsing, when it is an external parsed entity. This is + * null if it an entity from the internal subset or if it + * is not known. + * @since DOM Level 3 + */ + public String getInputEncoding(); + + /** + * An attribute specifying, as part of the text declaration, the encoding + * of this entity, when it is an external parsed entity. This is + * null otherwise. + * @since DOM Level 3 + */ + public String getXmlEncoding(); + + /** + * An attribute specifying, as part of the text declaration, the version + * number of this entity, when it is an external parsed entity. This is + * null otherwise. + * @since DOM Level 3 + */ + public String getXmlVersion(); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/EntityReference.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/EntityReference.java new file mode 100644 index 000000000..66cc66168 --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/EntityReference.java @@ -0,0 +1,43 @@ +/* + * 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 + */ + +package org.w3c.dom; + +/** + * EntityReference nodes may be used to represent an entity + * reference in the tree. Note that character references and references to + * predefined entities are considered to be expanded by the HTML or XML + * processor so that characters are represented by their Unicode equivalent + * rather than by an entity reference. Moreover, the XML processor may + * completely expand references to entities while building the + * Document, instead of providing EntityReference + * nodes. If it does provide such nodes, then for an + * EntityReference node that represents a reference to a known + * entity an Entity exists, and the subtree of the + * EntityReference node is a copy of the Entity + * node subtree. However, the latter may not be true when an entity contains + * an unbound namespace prefix. In such a case, because the namespace prefix + * resolution depends on where the entity reference is, the descendants of + * the EntityReference node may be bound to different namespace + * URIs. When an EntityReference node represents a reference to + * an unknown entity, the node has no children and its replacement value, + * when used by Attr.value for example, is empty. + *

As for Entity nodes, EntityReference nodes and + * all their descendants are readonly. + *

Note: EntityReference nodes may cause element + * content and attribute value normalization problems when, such as in XML + * 1.0 and XML Schema, the normalization is performed after entity reference + * are expanded. + *

See also the Document Object Model (DOM) Level 3 Core Specification. + */ +public interface EntityReference extends Node { +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/NameList.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/NameList.java new file mode 100644 index 000000000..e94433f98 --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/NameList.java @@ -0,0 +1,68 @@ +/* + * 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 + */ + +package org.w3c.dom; + +/** + * The NameList interface provides the abstraction of an ordered + * collection of parallel pairs of name and namespace values (which could be + * null values), without defining or constraining how this collection is + * implemented. The items in the NameList are accessible via an + * integral index, starting from 0. + *

See also the Document Object Model (DOM) Level 3 Core Specification. + * @since DOM Level 3 + */ +public interface NameList { + /** + * Returns the indexth name item in the collection. + * @param index Index into the collection. + * @return The name at the indexth position in the + * NameList, or null if there is no name for + * the specified index or if the index is out of range. + */ + public String getName(int index); + + /** + * Returns the indexth namespaceURI item in the collection. + * @param index Index into the collection. + * @return The namespace URI at the indexth position in the + * NameList, or null if there is no name for + * the specified index or if the index is out of range. + */ + public String getNamespaceURI(int index); + + /** + * The number of pairs (name and namespaceURI) in the list. The range of + * valid child node indices is 0 to length-1 inclusive. + */ + public int getLength(); + + /** + * Test if a name is part of this NameList. + * @param str The name to look for. + * @return true if the name has been found, + * false otherwise. + */ + public boolean contains(String str); + + /** + * Test if the pair namespaceURI/name is part of this + * NameList. + * @param namespaceURI The namespace URI to look for. + * @param name The name to look for. + * @return true if the pair namespaceURI/name has been + * found, false otherwise. + */ + public boolean containsNS(String namespaceURI, + String name); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/NamedNodeMap.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/NamedNodeMap.java new file mode 100644 index 000000000..d74ace7a3 --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/NamedNodeMap.java @@ -0,0 +1,183 @@ +/* + * 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 + */ + +package org.w3c.dom; + +/** + * Objects implementing the NamedNodeMap interface are used to + * represent collections of nodes that can be accessed by name. Note that + * NamedNodeMap does not inherit from NodeList; + * NamedNodeMaps are not maintained in any particular order. + * Objects contained in an object implementing NamedNodeMap may + * also be accessed by an ordinal index, but this is simply to allow + * convenient enumeration of the contents of a NamedNodeMap, + * and does not imply that the DOM specifies an order to these Nodes. + *

NamedNodeMap objects in the DOM are live. + *

See also the Document Object Model (DOM) Level 3 Core Specification. + */ +public interface NamedNodeMap { + /** + * Retrieves a node specified by name. + * @param name The nodeName of a node to retrieve. + * @return A Node (of any type) with the specified + * nodeName, or null if it does not identify + * any node in this map. + */ + public Node getNamedItem(String name); + + /** + * Adds a node using its nodeName attribute. If a node with + * that name is already present in this map, it is replaced by the new + * one. Replacing a node by itself has no effect. + *
As the nodeName attribute is used to derive the name + * which the node must be stored under, multiple nodes of certain types + * (those that have a "special" string value) cannot be stored as the + * names would clash. This is seen as preferable to allowing nodes to be + * aliased. + * @param arg A node to store in this map. The node will later be + * accessible using the value of its nodeName attribute. + * @return If the new Node replaces an existing node the + * replaced Node is returned, otherwise null + * is returned. + * @exception DOMException + * WRONG_DOCUMENT_ERR: Raised if arg was created from a + * different document than the one that created this map. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly. + *
INUSE_ATTRIBUTE_ERR: Raised if arg is an + * Attr that is already an attribute of another + * Element object. The DOM user must explicitly clone + * Attr nodes to re-use them in other elements. + *
HIERARCHY_REQUEST_ERR: Raised if an attempt is made to add a node + * doesn't belong in this NamedNodeMap. Examples would include trying + * to insert something other than an Attr node into an Element's map + * of attributes, or a non-Entity node into the DocumentType's map of + * Entities. + */ + public Node setNamedItem(Node arg) + throws DOMException; + + /** + * Removes a node specified by name. When this map contains the attributes + * attached to an element, if the removed attribute is known to have a + * default value, an attribute immediately appears containing the + * default value as well as the corresponding namespace URI, local name, + * and prefix when applicable. + * @param name The nodeName of the node to remove. + * @return The node removed from this map if a node with such a name + * exists. + * @exception DOMException + * NOT_FOUND_ERR: Raised if there is no node named name in + * this map. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly. + */ + public Node removeNamedItem(String name) + throws DOMException; + + /** + * Returns the indexth item in the map. If index + * is greater than or equal to the number of nodes in this map, this + * returns null. + * @param index Index into this map. + * @return The node at the indexth position in the map, or + * null if that is not a valid index. + */ + public Node item(int index); + + /** + * The number of nodes in this map. The range of valid child node indices + * is 0 to length-1 inclusive. + */ + public int getLength(); + + /** + * Retrieves a node specified by local name and namespace URI. + *
Per [XML Namespaces] + * , applications must use the value null as the namespaceURI parameter + * for methods if they wish to have no namespace. + * @param namespaceURI The namespace URI of the node to retrieve. + * @param localName The local name of the node to retrieve. + * @return A Node (of any type) with the specified local + * name and namespace URI, or null if they do not + * identify any node in this map. + * @exception DOMException + * NOT_SUPPORTED_ERR: May be raised if the implementation does not + * support the feature "XML" and the language exposed through the + * Document does not support XML Namespaces (such as [HTML 4.01]). + * @since DOM Level 2 + */ + public Node getNamedItemNS(String namespaceURI, + String localName) + throws DOMException; + + /** + * Adds a node using its namespaceURI and + * localName. If a node with that namespace URI and that + * local name is already present in this map, it is replaced by the new + * one. Replacing a node by itself has no effect. + *
Per [XML Namespaces] + * , applications must use the value null as the namespaceURI parameter + * for methods if they wish to have no namespace. + * @param arg A node to store in this map. The node will later be + * accessible using the value of its namespaceURI and + * localName attributes. + * @return If the new Node replaces an existing node the + * replaced Node is returned, otherwise null + * is returned. + * @exception DOMException + * WRONG_DOCUMENT_ERR: Raised if arg was created from a + * different document than the one that created this map. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly. + *
INUSE_ATTRIBUTE_ERR: Raised if arg is an + * Attr that is already an attribute of another + * Element object. The DOM user must explicitly clone + * Attr nodes to re-use them in other elements. + *
HIERARCHY_REQUEST_ERR: Raised if an attempt is made to add a node + * doesn't belong in this NamedNodeMap. Examples would include trying + * to insert something other than an Attr node into an Element's map + * of attributes, or a non-Entity node into the DocumentType's map of + * Entities. + *
NOT_SUPPORTED_ERR: May be raised if the implementation does not + * support the feature "XML" and the language exposed through the + * Document does not support XML Namespaces (such as [HTML 4.01]). + * @since DOM Level 2 + */ + public Node setNamedItemNS(Node arg) + throws DOMException; + + /** + * Removes a node specified by local name and namespace URI. A removed + * attribute may be known to have a default value when this map contains + * the attributes attached to an element, as returned by the attributes + * attribute of the Node interface. If so, an attribute + * immediately appears containing the default value as well as the + * corresponding namespace URI, local name, and prefix when applicable. + *
Per [XML Namespaces] + * , applications must use the value null as the namespaceURI parameter + * for methods if they wish to have no namespace. + * @param namespaceURI The namespace URI of the node to remove. + * @param localName The local name of the node to remove. + * @return The node removed from this map if a node with such a local + * name and namespace URI exists. + * @exception DOMException + * NOT_FOUND_ERR: Raised if there is no node with the specified + * namespaceURI and localName in this map. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this map is readonly. + *
NOT_SUPPORTED_ERR: May be raised if the implementation does not + * support the feature "XML" and the language exposed through the + * Document does not support XML Namespaces (such as [HTML 4.01]). + * @since DOM Level 2 + */ + public Node removeNamedItemNS(String namespaceURI, + String localName) + throws DOMException; + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/Node.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/Node.java new file mode 100644 index 000000000..c9a6d0098 --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/Node.java @@ -0,0 +1,900 @@ +/* + * 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 + */ + +package org.w3c.dom; + +/** + * The Node interface is the primary datatype for the entire + * Document Object Model. It represents a single node in the document tree. + * While all objects implementing the Node interface expose + * methods for dealing with children, not all objects implementing the + * Node interface may have children. For example, + * Text nodes may not have children, and adding children to + * such nodes results in a DOMException being raised. + *

The attributes nodeName, nodeValue and + * attributes are included as a mechanism to get at node + * information without casting down to the specific derived interface. In + * cases where there is no obvious mapping of these attributes for a + * specific nodeType (e.g., nodeValue for an + * Element or attributes for a Comment + * ), this returns null. Note that the specialized interfaces + * may contain additional and more convenient mechanisms to get and set the + * relevant information. + *

The values of nodeName, + * nodeValue, and attributes vary according to the + * node type as follows: + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
InterfacenodeNamenodeValueattributes
+ * Attrsame as Attr.namesame as + * Attr.valuenull
CDATASection + * "#cdata-section"same as CharacterData.data, the + * content of the CDATA Sectionnull
Comment + * "#comment"same as CharacterData.data, the + * content of the commentnull
Document + * "#document"nullnull
+ * DocumentFragment"#document-fragment" + * nullnull
DocumentTypesame as + * DocumentType.namenullnull
+ * Elementsame as Element.tagNamenull + * NamedNodeMap
Entityentity namenull + * null
EntityReferencename of entity referenced + * nullnull
Notationnotation name + * nullnull
ProcessingInstructionsame + * as ProcessingInstruction.targetsame as + * ProcessingInstruction.datanull
Text + * "#text"same as CharacterData.data, the content + * of the text nodenull
+ *

See also the Document Object Model (DOM) Level 3 Core Specification. + */ +public interface Node { + // NodeType + /** + * The node is an Element. + */ + public static final short ELEMENT_NODE = 1; + /** + * The node is an Attr. + */ + public static final short ATTRIBUTE_NODE = 2; + /** + * The node is a Text node. + */ + public static final short TEXT_NODE = 3; + /** + * The node is a CDATASection. + */ + public static final short CDATA_SECTION_NODE = 4; + /** + * The node is an EntityReference. + */ + public static final short ENTITY_REFERENCE_NODE = 5; + /** + * The node is an Entity. + */ + public static final short ENTITY_NODE = 6; + /** + * The node is a ProcessingInstruction. + */ + public static final short PROCESSING_INSTRUCTION_NODE = 7; + /** + * The node is a Comment. + */ + public static final short COMMENT_NODE = 8; + /** + * The node is a Document. + */ + public static final short DOCUMENT_NODE = 9; + /** + * The node is a DocumentType. + */ + public static final short DOCUMENT_TYPE_NODE = 10; + /** + * The node is a DocumentFragment. + */ + public static final short DOCUMENT_FRAGMENT_NODE = 11; + /** + * The node is a Notation. + */ + public static final short NOTATION_NODE = 12; + + /** + * The name of this node, depending on its type; see the table above. + */ + public String getNodeName(); + + /** + * The value of this node, depending on its type; see the table above. + * When it is defined to be null, setting it has no effect, + * including if the node is read-only. + * @exception DOMException + * DOMSTRING_SIZE_ERR: Raised when it would return more characters than + * fit in a DOMString variable on the implementation + * platform. + */ + public String getNodeValue() + throws DOMException; + /** + * The value of this node, depending on its type; see the table above. + * When it is defined to be null, setting it has no effect, + * including if the node is read-only. + * @exception DOMException + * NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly and if + * it is not defined to be null. + */ + public void setNodeValue(String nodeValue) + throws DOMException; + + /** + * A code representing the type of the underlying object, as defined above. + */ + public short getNodeType(); + + /** + * The parent of this node. All nodes, except Attr, + * Document, DocumentFragment, + * Entity, and Notation may have a parent. + * However, if a node has just been created and not yet added to the + * tree, or if it has been removed from the tree, this is + * null. + */ + public Node getParentNode(); + + /** + * A NodeList that contains all children of this node. If + * there are no children, this is a NodeList containing no + * nodes. + */ + public NodeList getChildNodes(); + + /** + * The first child of this node. If there is no such node, this returns + * null. + */ + public Node getFirstChild(); + + /** + * The last child of this node. If there is no such node, this returns + * null. + */ + public Node getLastChild(); + + /** + * The node immediately preceding this node. If there is no such node, + * this returns null. + */ + public Node getPreviousSibling(); + + /** + * The node immediately following this node. If there is no such node, + * this returns null. + */ + public Node getNextSibling(); + + /** + * A NamedNodeMap containing the attributes of this node (if + * it is an Element) or null otherwise. + */ + public NamedNodeMap getAttributes(); + + /** + * The Document object associated with this node. This is + * also the Document object used to create new nodes. When + * this node is a Document or a DocumentType + * which is not used with any Document yet, this is + * null. + * @version DOM Level 2 + */ + public Document getOwnerDocument(); + + /** + * Inserts the node newChild before the existing child node + * refChild. If refChild is null, + * insert newChild at the end of the list of children. + *
If newChild is a DocumentFragment object, + * all of its children are inserted, in the same order, before + * refChild. If the newChild is already in the + * tree, it is first removed. + *

Note: Inserting a node before itself is implementation + * dependent. + * @param newChild The node to insert. + * @param refChild The reference node, i.e., the node before which the + * new node must be inserted. + * @return The node being inserted. + * @exception DOMException + * HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not + * allow children of the type of the newChild node, or if + * the node to insert is one of this node's ancestors or this node + * itself, or if this node is of type Document and the + * DOM application attempts to insert a second + * DocumentType or Element node. + *
WRONG_DOCUMENT_ERR: Raised if newChild was created + * from a different document than the one that created this node. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly or + * if the parent of the node being inserted is readonly. + *
NOT_FOUND_ERR: Raised if refChild is not a child of + * this node. + *
NOT_SUPPORTED_ERR: if this node is of type Document, + * this exception might be raised if the DOM implementation doesn't + * support the insertion of a DocumentType or + * Element node. + * @version DOM Level 3 + */ + public Node insertBefore(Node newChild, + Node refChild) + throws DOMException; + + /** + * Replaces the child node oldChild with newChild + * in the list of children, and returns the oldChild node. + *
If newChild is a DocumentFragment object, + * oldChild is replaced by all of the + * DocumentFragment children, which are inserted in the + * same order. If the newChild is already in the tree, it + * is first removed. + *

Note: Replacing a node with itself is implementation + * dependent. + * @param newChild The new node to put in the child list. + * @param oldChild The node being replaced in the list. + * @return The node replaced. + * @exception DOMException + * HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not + * allow children of the type of the newChild node, or if + * the node to put in is one of this node's ancestors or this node + * itself, or if this node is of type Document and the + * result of the replacement operation would add a second + * DocumentType or Element on the + * Document node. + *
WRONG_DOCUMENT_ERR: Raised if newChild was created + * from a different document than the one that created this node. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this node or the parent of + * the new node is readonly. + *
NOT_FOUND_ERR: Raised if oldChild is not a child of + * this node. + *
NOT_SUPPORTED_ERR: if this node is of type Document, + * this exception might be raised if the DOM implementation doesn't + * support the replacement of the DocumentType child or + * Element child. + * @version DOM Level 3 + */ + public Node replaceChild(Node newChild, + Node oldChild) + throws DOMException; + + /** + * Removes the child node indicated by oldChild from the list + * of children, and returns it. + * @param oldChild The node being removed. + * @return The node removed. + * @exception DOMException + * NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. + *
NOT_FOUND_ERR: Raised if oldChild is not a child of + * this node. + *
NOT_SUPPORTED_ERR: if this node is of type Document, + * this exception might be raised if the DOM implementation doesn't + * support the removal of the DocumentType child or the + * Element child. + * @version DOM Level 3 + */ + public Node removeChild(Node oldChild) + throws DOMException; + + /** + * Adds the node newChild to the end of the list of children + * of this node. If the newChild is already in the tree, it + * is first removed. + * @param newChild The node to add.If it is a + * DocumentFragment object, the entire contents of the + * document fragment are moved into the child list of this node + * @return The node added. + * @exception DOMException + * HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not + * allow children of the type of the newChild node, or if + * the node to append is one of this node's ancestors or this node + * itself, or if this node is of type Document and the + * DOM application attempts to append a second + * DocumentType or Element node. + *
WRONG_DOCUMENT_ERR: Raised if newChild was created + * from a different document than the one that created this node. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly or + * if the previous parent of the node being inserted is readonly. + *
NOT_SUPPORTED_ERR: if the newChild node is a child + * of the Document node, this exception might be raised + * if the DOM implementation doesn't support the removal of the + * DocumentType child or Element child. + * @version DOM Level 3 + */ + public Node appendChild(Node newChild) + throws DOMException; + + /** + * Returns whether this node has any children. + * @return Returns true if this node has any children, + * false otherwise. + */ + public boolean hasChildNodes(); + + /** + * Returns a duplicate of this node, i.e., serves as a generic copy + * constructor for nodes. The duplicate node has no parent ( + * parentNode is null) and no user data. User + * data associated to the imported node is not carried over. However, if + * any UserDataHandlers has been specified along with the + * associated data these handlers will be called with the appropriate + * parameters before this method returns. + *
Cloning an Element copies all attributes and their + * values, including those generated by the XML processor to represent + * defaulted attributes, but this method does not copy any children it + * contains unless it is a deep clone. This includes text contained in + * an the Element since the text is contained in a child + * Text node. Cloning an Attr directly, as + * opposed to be cloned as part of an Element cloning + * operation, returns a specified attribute (specified is + * true). Cloning an Attr always clones its + * children, since they represent its value, no matter whether this is a + * deep clone or not. Cloning an EntityReference + * automatically constructs its subtree if a corresponding + * Entity is available, no matter whether this is a deep + * clone or not. Cloning any other type of node simply returns a copy of + * this node. + *
Note that cloning an immutable subtree results in a mutable copy, + * but the children of an EntityReference clone are readonly + * . In addition, clones of unspecified Attr nodes are + * specified. And, cloning Document, + * DocumentType, Entity, and + * Notation nodes is implementation dependent. + * @param deep If true, recursively clone the subtree under + * the specified node; if false, clone only the node + * itself (and its attributes, if it is an Element). + * @return The duplicate node. + */ + public Node cloneNode(boolean deep); + + /** + * Puts all Text nodes in the full depth of the sub-tree + * underneath this Node, including attribute nodes, into a + * "normal" form where only structure (e.g., elements, comments, + * processing instructions, CDATA sections, and entity references) + * separates Text nodes, i.e., there are neither adjacent + * Text nodes nor empty Text nodes. This can + * be used to ensure that the DOM view of a document is the same as if + * it were saved and re-loaded, and is useful when operations (such as + * XPointer [XPointer] + * lookups) that depend on a particular document tree structure are to + * be used. If the parameter "normalize-characters" of the + * DOMConfiguration object attached to the + * Node.ownerDocument is true, this method + * will also fully normalize the characters of the Text + * nodes. + *

Note: In cases where the document contains + * CDATASections, the normalize operation alone may not be + * sufficient, since XPointers do not differentiate between + * Text nodes and CDATASection nodes. + * @version DOM Level 3 + */ + public void normalize(); + + /** + * Tests whether the DOM implementation implements a specific feature and + * that feature is supported by this node, as specified in . + * @param feature The name of the feature to test. + * @param version This is the version number of the feature to test. + * @return Returns true if the specified feature is + * supported on this node, false otherwise. + * @since DOM Level 2 + */ + public boolean isSupported(String feature, + String version); + + /** + * The namespace URI of this node, or null if it is + * unspecified (see ). + *
This is not a computed value that is the result of a namespace + * lookup based on an examination of the namespace declarations in + * scope. It is merely the namespace URI given at creation time. + *
For nodes of any type other than ELEMENT_NODE and + * ATTRIBUTE_NODE and nodes created with a DOM Level 1 + * method, such as Document.createElement(), this is always + * null. + *

Note: Per the Namespaces in XML Specification [XML Namespaces] + * an attribute does not inherit its namespace from the element it is + * attached to. If an attribute is not explicitly given a namespace, it + * simply has no namespace. + * @since DOM Level 2 + */ + public String getNamespaceURI(); + + /** + * The namespace prefix of this node, or null if it is + * unspecified. When it is defined to be null, setting it + * has no effect, including if the node is read-only. + *
Note that setting this attribute, when permitted, changes the + * nodeName attribute, which holds the qualified name, as + * well as the tagName and name attributes of + * the Element and Attr interfaces, when + * applicable. + *
Setting the prefix to null makes it unspecified, + * setting it to an empty string is implementation dependent. + *
Note also that changing the prefix of an attribute that is known to + * have a default value, does not make a new attribute with the default + * value and the original prefix appear, since the + * namespaceURI and localName do not change. + *
For nodes of any type other than ELEMENT_NODE and + * ATTRIBUTE_NODE and nodes created with a DOM Level 1 + * method, such as createElement from the + * Document interface, this is always null. + * @since DOM Level 2 + */ + public String getPrefix(); + /** + * The namespace prefix of this node, or null if it is + * unspecified. When it is defined to be null, setting it + * has no effect, including if the node is read-only. + *
Note that setting this attribute, when permitted, changes the + * nodeName attribute, which holds the qualified name, as + * well as the tagName and name attributes of + * the Element and Attr interfaces, when + * applicable. + *
Setting the prefix to null makes it unspecified, + * setting it to an empty string is implementation dependent. + *
Note also that changing the prefix of an attribute that is known to + * have a default value, does not make a new attribute with the default + * value and the original prefix appear, since the + * namespaceURI and localName do not change. + *
For nodes of any type other than ELEMENT_NODE and + * ATTRIBUTE_NODE and nodes created with a DOM Level 1 + * method, such as createElement from the + * Document interface, this is always null. + * @exception DOMException + * INVALID_CHARACTER_ERR: Raised if the specified prefix contains an + * illegal character according to the XML version in use specified in + * the Document.xmlVersion attribute. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. + *
NAMESPACE_ERR: Raised if the specified prefix is + * malformed per the Namespaces in XML specification, if the + * namespaceURI of this node is null, if the + * specified prefix is "xml" and the namespaceURI of this + * node is different from " + * http://www.w3.org/XML/1998/namespace", if this node is an attribute and the specified prefix is "xmlns" and + * the namespaceURI of this node is different from "http://www.w3.org/2000/xmlns/", or if this node is an attribute and the qualifiedName of + * this node is "xmlns" [XML Namespaces] + * . + * @since DOM Level 2 + */ + public void setPrefix(String prefix) + throws DOMException; + + /** + * Returns the local part of the qualified name of this node. + *
For nodes of any type other than ELEMENT_NODE and + * ATTRIBUTE_NODE and nodes created with a DOM Level 1 + * method, such as Document.createElement(), this is always + * null. + * @since DOM Level 2 + */ + public String getLocalName(); + + /** + * Returns whether this node (if it is an element) has any attributes. + * @return Returns true if this node has any attributes, + * false otherwise. + * @since DOM Level 2 + */ + public boolean hasAttributes(); + + /** + * The absolute base URI of this node or null if the + * implementation wasn't able to obtain an absolute URI. This value is + * computed as described in . However, when the Document + * supports the feature "HTML" [DOM Level 2 HTML] + * , the base URI is computed using first the value of the href + * attribute of the HTML BASE element if any, and the value of the + * documentURI attribute from the Document + * interface otherwise. + * @since DOM Level 3 + */ + public String getBaseURI(); + + // DocumentPosition + /** + * The two nodes are disconnected. Order between disconnected nodes is + * always implementation-specific. + */ + public static final short DOCUMENT_POSITION_DISCONNECTED = 0x01; + /** + * The second node precedes the reference node. + */ + public static final short DOCUMENT_POSITION_PRECEDING = 0x02; + /** + * The node follows the reference node. + */ + public static final short DOCUMENT_POSITION_FOLLOWING = 0x04; + /** + * The node contains the reference node. A node which contains is always + * preceding, too. + */ + public static final short DOCUMENT_POSITION_CONTAINS = 0x08; + /** + * The node is contained by the reference node. A node which is contained + * is always following, too. + */ + public static final short DOCUMENT_POSITION_CONTAINED_BY = 0x10; + /** + * The determination of preceding versus following is + * implementation-specific. + */ + public static final short DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = 0x20; + + /** + * Compares the reference node, i.e. the node on which this method is + * being called, with a node, i.e. the one passed as a parameter, with + * regard to their position in the document and according to the + * document order. + * @param other The node to compare against the reference node. + * @return Returns how the node is positioned relatively to the reference + * node. + * @exception DOMException + * NOT_SUPPORTED_ERR: when the compared nodes are from different DOM + * implementations that do not coordinate to return consistent + * implementation-specific results. + * @since DOM Level 3 + */ + public short compareDocumentPosition(Node other) + throws DOMException; + + /** + * This attribute returns the text content of this node and its + * descendants. When it is defined to be null, setting it + * has no effect. On setting, any possible children this node may have + * are removed and, if it the new string is not empty or + * null, replaced by a single Text node + * containing the string this attribute is set to. + *
On getting, no serialization is performed, the returned string + * does not contain any markup. No whitespace normalization is performed + * and the returned string does not contain the white spaces in element + * content (see the attribute + * Text.isElementContentWhitespace). Similarly, on setting, + * no parsing is performed either, the input string is taken as pure + * textual content. + *
The string returned is made of the text content of this node + * depending on its type, as defined below: + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Node typeContent
+ * ELEMENT_NODE, ATTRIBUTE_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, + * DOCUMENT_FRAGMENT_NODEconcatenation of the textContent + * attribute value of every child node, excluding COMMENT_NODE and + * PROCESSING_INSTRUCTION_NODE nodes. This is the empty string if the + * node has no children.
TEXT_NODE, CDATA_SECTION_NODE, COMMENT_NODE, + * PROCESSING_INSTRUCTION_NODEnodeValue
DOCUMENT_NODE, + * DOCUMENT_TYPE_NODE, NOTATION_NODEnull
+ * @exception DOMException + * DOMSTRING_SIZE_ERR: Raised when it would return more characters than + * fit in a DOMString variable on the implementation + * platform. + * @since DOM Level 3 + */ + public String getTextContent() + throws DOMException; + /** + * This attribute returns the text content of this node and its + * descendants. When it is defined to be null, setting it + * has no effect. On setting, any possible children this node may have + * are removed and, if it the new string is not empty or + * null, replaced by a single Text node + * containing the string this attribute is set to. + *
On getting, no serialization is performed, the returned string + * does not contain any markup. No whitespace normalization is performed + * and the returned string does not contain the white spaces in element + * content (see the attribute + * Text.isElementContentWhitespace). Similarly, on setting, + * no parsing is performed either, the input string is taken as pure + * textual content. + *
The string returned is made of the text content of this node + * depending on its type, as defined below: + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Node typeContent
+ * ELEMENT_NODE, ATTRIBUTE_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, + * DOCUMENT_FRAGMENT_NODEconcatenation of the textContent + * attribute value of every child node, excluding COMMENT_NODE and + * PROCESSING_INSTRUCTION_NODE nodes. This is the empty string if the + * node has no children.
TEXT_NODE, CDATA_SECTION_NODE, COMMENT_NODE, + * PROCESSING_INSTRUCTION_NODEnodeValue
DOCUMENT_NODE, + * DOCUMENT_TYPE_NODE, NOTATION_NODEnull
+ * @exception DOMException + * NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly. + * @since DOM Level 3 + */ + public void setTextContent(String textContent) + throws DOMException; + + /** + * Returns whether this node is the same node as the given one. + *
This method provides a way to determine whether two + * Node references returned by the implementation reference + * the same object. When two Node references are references + * to the same object, even if through a proxy, the references may be + * used completely interchangeably, such that all attributes have the + * same values and calling the same DOM method on either reference + * always has exactly the same effect. + * @param other The node to test against. + * @return Returns true if the nodes are the same, + * false otherwise. + * @since DOM Level 3 + */ + public boolean isSameNode(Node other); + + /** + * Look up the prefix associated to the given namespace URI, starting from + * this node. The default namespace declarations are ignored by this + * method. + *
See for details on the algorithm used by this method. + * @param namespaceURI The namespace URI to look for. + * @return Returns an associated namespace prefix if found or + * null if none is found. If more than one prefix are + * associated to the namespace prefix, the returned namespace prefix + * is implementation dependent. + * @since DOM Level 3 + */ + public String lookupPrefix(String namespaceURI); + + /** + * This method checks if the specified namespaceURI is the + * default namespace or not. + * @param namespaceURI The namespace URI to look for. + * @return Returns true if the specified + * namespaceURI is the default namespace, + * false otherwise. + * @since DOM Level 3 + */ + public boolean isDefaultNamespace(String namespaceURI); + + /** + * Look up the namespace URI associated to the given prefix, starting from + * this node. + *
See for details on the algorithm used by this method. + * @param prefix The prefix to look for. If this parameter is + * null, the method will return the default namespace URI + * if any. + * @return Returns the associated namespace URI or null if + * none is found. + * @since DOM Level 3 + */ + public String lookupNamespaceURI(String prefix); + + /** + * Tests whether two nodes are equal. + *
This method tests for equality of nodes, not sameness (i.e., + * whether the two nodes are references to the same object) which can be + * tested with Node.isSameNode(). All nodes that are the + * same will also be equal, though the reverse may not be true. + *
Two nodes are equal if and only if the following conditions are + * satisfied: + *

+ *
For two DocumentType nodes to be equal, the following + * conditions must also be satisfied: + * + *
On the other hand, the following do not affect equality: the + * ownerDocument, baseURI, and + * parentNode attributes, the specified + * attribute for Attr nodes, the schemaTypeInfo + * attribute for Attr and Element nodes, the + * Text.isElementContentWhitespace attribute for + * Text nodes, as well as any user data or event listeners + * registered on the nodes. + *

Note: As a general rule, anything not mentioned in the + * description above is not significant in consideration of equality + * checking. Note that future versions of this specification may take + * into account more attributes and implementations conform to this + * specification are expected to be updated accordingly. + * @param arg The node to compare equality with. + * @return Returns true if the nodes are equal, + * false otherwise. + * @since DOM Level 3 + */ + public boolean isEqualNode(Node arg); + + /** + * This method returns a specialized object which implements the + * specialized APIs of the specified feature and version, as specified + * in . The specialized object may also be obtained by using + * binding-specific casting methods but is not necessarily expected to, + * as discussed in . This method also allow the implementation to + * provide specialized objects which do not support the Node + * interface. + * @param feature The name of the feature requested. Note that any plus + * sign "+" prepended to the name of the feature will be ignored since + * it is not significant in the context of this method. + * @param version This is the version number of the feature to test. + * @return Returns an object which implements the specialized APIs of + * the specified feature and version, if any, or null if + * there is no object which implements interfaces associated with that + * feature. If the DOMObject returned by this method + * implements the Node interface, it must delegate to the + * primary core Node and not return results inconsistent + * with the primary core Node such as attributes, + * childNodes, etc. + * @since DOM Level 3 + */ + public Object getFeature(String feature, + String version); + + /** + * Associate an object to a key on this node. The object can later be + * retrieved from this node by calling getUserData with the + * same key. + * @param key The key to associate the object to. + * @param data The object to associate to the given key, or + * null to remove any existing association to that key. + * @param handler The handler to associate to that key, or + * null. + * @return Returns the DOMUserData previously associated to + * the given key on this node, or null if there was none. + * @since DOM Level 3 + */ + public Object setUserData(String key, + Object data, + UserDataHandler handler); + + /** + * Retrieves the object associated to a key on a this node. The object + * must first have been set to this node by calling + * setUserData with the same key. + * @param key The key the object is associated to. + * @return Returns the DOMUserData associated to the given + * key on this node, or null if there was none. + * @since DOM Level 3 + */ + public Object getUserData(String key); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/NodeList.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/NodeList.java new file mode 100644 index 000000000..4a98a9030 --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/NodeList.java @@ -0,0 +1,41 @@ +/* + * 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 + */ + +package org.w3c.dom; + +/** + * The NodeList interface provides the abstraction of an ordered + * collection of nodes, without defining or constraining how this collection + * is implemented. NodeList objects in the DOM are live. + *

The items in the NodeList are accessible via an integral + * index, starting from 0. + *

See also the Document Object Model (DOM) Level 3 Core Specification. + */ +public interface NodeList { + /** + * Returns the indexth item in the collection. If + * index is greater than or equal to the number of nodes in + * the list, this returns null. + * @param index Index into the collection. + * @return The node at the indexth position in the + * NodeList, or null if that is not a valid + * index. + */ + public Node item(int index); + + /** + * The number of nodes in the list. The range of valid child node indices + * is 0 to length-1 inclusive. + */ + public int getLength(); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/Notation.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/Notation.java new file mode 100644 index 000000000..a7ad40992 --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/Notation.java @@ -0,0 +1,40 @@ +/* + * 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 + */ + +package org.w3c.dom; + +/** + * This interface represents a notation declared in the DTD. A notation either + * declares, by name, the format of an unparsed entity (see section 4.7 of the XML 1.0 specification [XML 1.0]), or is + * used for formal declaration of processing instruction targets (see section 2.6 of the XML 1.0 specification [XML 1.0]). The + * nodeName attribute inherited from Node is set + * to the declared name of the notation. + *

The DOM Core does not support editing Notation nodes; they + * are therefore readonly. + *

A Notation node does not have any parent. + *

See also the Document Object Model (DOM) Level 3 Core Specification. + */ +public interface Notation extends Node { + /** + * The public identifier of this notation. If the public identifier was + * not specified, this is null. + */ + public String getPublicId(); + + /** + * The system identifier of this notation. If the system identifier was + * not specified, this is null. This may be an absolute URI + * or not. + */ + public String getSystemId(); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/ProcessingInstruction.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/ProcessingInstruction.java new file mode 100644 index 000000000..61b789231 --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/ProcessingInstruction.java @@ -0,0 +1,51 @@ +/* + * 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 + */ + +package org.w3c.dom; + +/** + * The ProcessingInstruction interface represents a "processing + * instruction", used in XML as a way to keep processor-specific information + * in the text of the document. + *

No lexical check is done on the content of a processing instruction and + * it is therefore possible to have the character sequence + * "?>" in the content, which is illegal a processing + * instruction per section 2.6 of [XML 1.0]. The + * presence of this character sequence must generate a fatal error during + * serialization. + *

See also the Document Object Model (DOM) Level 3 Core Specification. + */ +public interface ProcessingInstruction extends Node { + /** + * The target of this processing instruction. XML defines this as being + * the first token following the markup that begins the processing + * instruction. + */ + public String getTarget(); + + /** + * The content of this processing instruction. This is from the first non + * white space character after the target to the character immediately + * preceding the ?>. + */ + public String getData(); + /** + * The content of this processing instruction. This is from the first non + * white space character after the target to the character immediately + * preceding the ?>. + * @exception DOMException + * NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly. + */ + public void setData(String data) + throws DOMException; + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/Text.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/Text.java new file mode 100644 index 000000000..872c5499d --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/Text.java @@ -0,0 +1,126 @@ +/* + * 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 + */ + +package org.w3c.dom; + +/** + * The Text interface inherits from CharacterData + * and represents the textual content (termed character data in XML) of an Element or Attr. If there is no + * markup inside an element's content, the text is contained in a single + * object implementing the Text interface that is the only + * child of the element. If there is markup, it is parsed into the + * information items (elements, comments, etc.) and Text nodes + * that form the list of children of the element. + *

When a document is first made available via the DOM, there is only one + * Text node for each block of text. Users may create adjacent + * Text nodes that represent the contents of a given element + * without any intervening markup, but should be aware that there is no way + * to represent the separations between these nodes in XML or HTML, so they + * will not (in general) persist between DOM editing sessions. The + * Node.normalize() method merges any such adjacent + * Text objects into a single node for each block of text. + *

No lexical check is done on the content of a Text node + * and, depending on its position in the document, some characters must be + * escaped during serialization using character references; e.g. the + * characters "<&" if the textual content is part of an element or of + * an attribute, the character sequence "]]>" when part of an element, + * the quotation mark character " or the apostrophe character ' when part of + * an attribute. + *

See also the Document Object Model (DOM) Level 3 Core Specification. + */ +public interface Text extends CharacterData { + /** + * Breaks this node into two nodes at the specified offset, + * keeping both in the tree as siblings. After being split, this node + * will contain all the content up to the offset point. A + * new node of the same type, which contains all the content at and + * after the offset point, is returned. If the original + * node had a parent node, the new node is inserted as the next sibling + * of the original node. When the offset is equal to the + * length of this node, the new node has no data. + * @param offset The 16-bit unit offset at which to split, starting from + * 0. + * @return The new node, of the same type as this node. + * @exception DOMException + * INDEX_SIZE_ERR: Raised if the specified offset is negative or greater + * than the number of 16-bit units in data. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly. + */ + public Text splitText(int offset) + throws DOMException; + + /** + * Returns whether this text node contains + * element content whitespace, often abusively called "ignorable whitespace". The text node is + * determined to contain whitespace in element content during the load + * of the document or if validation occurs while using + * Document.normalizeDocument(). + * @since DOM Level 3 + */ + public boolean isElementContentWhitespace(); + + /** + * Returns all text of Text nodes logically-adjacent text + * nodes to this node, concatenated in document order. + *
For instance, in the example below wholeText on the + * Text node that contains "bar" returns "barfoo", while on + * the Text node that contains "foo" it returns "barfoo". + * @since DOM Level 3 + */ + public String getWholeText(); + + /** + * Replaces the text of the current node and all logically-adjacent text + * nodes with the specified text. All logically-adjacent text nodes are + * removed including the current node unless it was the recipient of the + * replacement text. + *
This method returns the node which received the replacement text. + * The returned node is: + *

+ *
For instance, in the above example calling + * replaceWholeText on the Text node that + * contains "bar" with "yo" in argument results in the following: + *
Where the nodes to be removed are read-only descendants of an + * EntityReference, the EntityReference must + * be removed instead of the read-only nodes. If any + * EntityReference to be removed has descendants that are + * not EntityReference, Text, or + * CDATASection nodes, the replaceWholeText + * method must fail before performing any modification of the document, + * raising a DOMException with the code + * NO_MODIFICATION_ALLOWED_ERR. + *
For instance, in the example below calling + * replaceWholeText on the Text node that + * contains "bar" fails, because the EntityReference node + * "ent" contains an Element node which cannot be removed. + * @param content The content of the replacing Text node. + * @return The Text node created with the specified content. + * @exception DOMException + * NO_MODIFICATION_ALLOWED_ERR: Raised if one of the Text + * nodes being replaced is readonly. + * @since DOM Level 3 + */ + public Text replaceWholeText(String content) + throws DOMException; + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/TypeInfo.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/TypeInfo.java new file mode 100644 index 000000000..d36f3cc37 --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/TypeInfo.java @@ -0,0 +1,185 @@ +/* + * 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 + */ + +package org.w3c.dom; + +/** + * The TypeInfo interface represents a type referenced from + * Element or Attr nodes, specified in the schemas + * associated with the document. The type is a pair of a namespace URI and + * name properties, and depends on the document's schema. + *

If the document's schema is an XML DTD [XML 1.0], the values + * are computed as follows: + *

+ *

If the document's schema is an XML Schema [XML Schema Part 1] + * , the values are computed as follows using the post-schema-validation + * infoset contributions (also called PSVI contributions): + *

+ *

Note: Other schema languages are outside the scope of the W3C + * and therefore should define how to represent their type systems using + * TypeInfo. + *

See also the Document Object Model (DOM) Level 3 Core Specification. + * @since DOM Level 3 + */ +public interface TypeInfo { + /** + * The name of a type declared for the associated element or attribute, + * or null if unknown. + */ + public String getTypeName(); + + /** + * The namespace of the type declared for the associated element or + * attribute or null if the element does not have + * declaration or if no namespace information is available. + */ + public String getTypeNamespace(); + + // DerivationMethods + /** + * If the document's schema is an XML Schema [XML Schema Part 1] + * , this constant represents the derivation by + * restriction if complex types are involved, or a + * restriction if simple types are involved. + *
The reference type definition is derived by restriction from the + * other type definition if the other type definition is the same as the + * reference type definition, or if the other type definition can be + * reached recursively following the {base type definition} property + * from the reference type definition, and all the derivation methods involved are restriction. + */ + public static final int DERIVATION_RESTRICTION = 0x00000001; + /** + * If the document's schema is an XML Schema [XML Schema Part 1] + * , this constant represents the derivation by + * extension. + *
The reference type definition is derived by extension from the + * other type definition if the other type definition can be reached + * recursively following the {base type definition} property from the + * reference type definition, and at least one of the derivation methods involved is an extension. + */ + public static final int DERIVATION_EXTENSION = 0x00000002; + /** + * If the document's schema is an XML Schema [XML Schema Part 1] + * , this constant represents the + * union if simple types are involved. + *
The reference type definition is derived by union from the other + * type definition if there exists two type definitions T1 and T2 such + * as the reference type definition is derived from T1 by + * DERIVATION_RESTRICTION or + * DERIVATION_EXTENSION, T2 is derived from the other type + * definition by DERIVATION_RESTRICTION, T1 has {variety} union, and one of the {member type definitions} is T2. Note that T1 could be + * the same as the reference type definition, and T2 could be the same + * as the other type definition. + */ + public static final int DERIVATION_UNION = 0x00000004; + /** + * If the document's schema is an XML Schema [XML Schema Part 1] + * , this constant represents the list. + *
The reference type definition is derived by list from the other + * type definition if there exists two type definitions T1 and T2 such + * as the reference type definition is derived from T1 by + * DERIVATION_RESTRICTION or + * DERIVATION_EXTENSION, T2 is derived from the other type + * definition by DERIVATION_RESTRICTION, T1 has {variety} list, and T2 is the {item type definition}. Note that T1 could be the same as + * the reference type definition, and T2 could be the same as the other + * type definition. + */ + public static final int DERIVATION_LIST = 0x00000008; + + /** + * This method returns if there is a derivation between the reference + * type definition, i.e. the TypeInfo on which the method + * is being called, and the other type definition, i.e. the one passed + * as parameters. + * @param typeNamespaceArg the namespace of the other type definition. + * @param typeNameArg the name of the other type definition. + * @param derivationMethod the type of derivation and conditions applied + * between two types, as described in the list of constants provided + * in this interface. + * @return If the document's schema is a DTD or no schema is associated + * with the document, this method will always return false + * . If the document's schema is an XML Schema, the method will + * true if the reference type definition is derived from + * the other type definition according to the derivation parameter. If + * the value of the parameter is 0 (no bit is set to + * 1 for the derivationMethod parameter), + * the method will return true if the other type + * definition can be reached by recursing any combination of {base + * type definition}, {item type definition}, or {member type + * definitions} from the reference type definition. + */ + public boolean isDerivedFrom(String typeNamespaceArg, + String typeNameArg, + int derivationMethod); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/UserDataHandler.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/UserDataHandler.java new file mode 100644 index 000000000..cf6ee5669 --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/UserDataHandler.java @@ -0,0 +1,72 @@ +/* + * 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 + */ + +package org.w3c.dom; + +/** + * When associating an object to a key on a node using + * Node.setUserData() the application can provide a handler + * that gets called when the node the object is associated to is being + * cloned, imported, or renamed. This can be used by the application to + * implement various behaviors regarding the data it associates to the DOM + * nodes. This interface defines that handler. + *

See also the Document Object Model (DOM) Level 3 Core Specification. + * @since DOM Level 3 + */ +public interface UserDataHandler { + // OperationType + /** + * The node is cloned, using Node.cloneNode(). + */ + public static final short NODE_CLONED = 1; + /** + * The node is imported, using Document.importNode(). + */ + public static final short NODE_IMPORTED = 2; + /** + * The node is deleted. + *

Note: This may not be supported or may not be reliable in + * certain environments, such as Java, where the implementation has no + * real control over when objects are actually deleted. + */ + public static final short NODE_DELETED = 3; + /** + * The node is renamed, using Document.renameNode(). + */ + public static final short NODE_RENAMED = 4; + /** + * The node is adopted, using Document.adoptNode(). + */ + public static final short NODE_ADOPTED = 5; + + /** + * This method is called whenever the node for which this handler is + * registered is imported or cloned. + *
DOM applications must not raise exceptions in a + * UserDataHandler. The effect of throwing exceptions from + * the handler is DOM implementation dependent. + * @param operation Specifies the type of operation that is being + * performed on the node. + * @param key Specifies the key for which this handler is being called. + * @param data Specifies the data for which this handler is being called. + * @param src Specifies the node being cloned, adopted, imported, or + * renamed. This is null when the node is being deleted. + * @param dst Specifies the node newly created if any, or + * null. + */ + public void handle(short operation, + String key, + Object data, + Node src, + Node dst); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/bootstrap/DOMImplementationRegistry.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/bootstrap/DOMImplementationRegistry.java new file mode 100644 index 000000000..5be8c3ab1 --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/bootstrap/DOMImplementationRegistry.java @@ -0,0 +1,387 @@ +/* + * 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 + */ + + +package org.w3c.dom.bootstrap; + +import java.util.StringTokenizer; +import java.util.Vector; +import org.w3c.dom.DOMImplementationSource; +import org.w3c.dom.DOMImplementationList; +import org.w3c.dom.DOMImplementation; +import java.io.InputStream; +import java.io.BufferedReader; +import java.io.InputStreamReader; +import java.security.AccessController; +import java.security.PrivilegedAction; + +/** + * A factory that enables applications to obtain instances of + * DOMImplementation. + * + *

+ * Example: + *

+ * + *
+ *  // get an instance of the DOMImplementation registry
+ *  DOMImplementationRegistry registry =
+ *       DOMImplementationRegistry.newInstance();
+ *  // get a DOM implementation the Level 3 XML module
+ *  DOMImplementation domImpl =
+ *       registry.getDOMImplementation("XML 3.0");
+ * 
+ * + *

+ * This provides an application with an implementation-independent starting + * point. DOM implementations may modify this class to meet new security + * standards or to provide *additional* fallbacks for the list of + * DOMImplementationSources. + *

+ * + * @see DOMImplementation + * @see DOMImplementationSource + * @since DOM Level 3 + */ +public final class DOMImplementationRegistry { + /** + * The system property to specify the + * DOMImplementationSource class names. + */ + public static final String PROPERTY = + "org.w3c.dom.DOMImplementationSourceList"; + + /** + * Default columns per line. + */ + private static final int DEFAULT_LINE_LENGTH = 80; + + /** + * The list of DOMImplementationSources. + */ + private Vector sources; + + /** + * Private constructor. + * @param srcs Vector List of DOMImplementationSources + */ + private DOMImplementationRegistry(final Vector srcs) { + sources = srcs; + } + + /** + * Obtain a new instance of a DOMImplementationRegistry. + * + + * The DOMImplementationRegistry is initialized by the + * application or the implementation, depending on the context, by + * first checking the value of the Java system property + * org.w3c.dom.DOMImplementationSourceList and + * the the service provider whose contents are at + * "META_INF/services/org.w3c.dom.DOMImplementationSourceList" + * The value of this property is a white-space separated list of + * names of availables classes implementing the + * DOMImplementationSource interface. Each class listed + * in the class name list is instantiated and any exceptions + * encountered are thrown to the application. + * + * @return an initialized instance of DOMImplementationRegistry + * @throws ClassNotFoundException + * If any specified class can not be found + * @throws InstantiationException + * If any specified class is an interface or abstract class + * @throws IllegalAccessException + * If the default constructor of a specified class is not accessible + * @throws ClassCastException + * If any specified class does not implement + * DOMImplementationSource + */ + public static DOMImplementationRegistry newInstance() + throws + ClassNotFoundException, + InstantiationException, + IllegalAccessException, + ClassCastException { + Vector sources = new Vector(); + + ClassLoader classLoader = getClassLoader(); + // fetch system property: + String p = getSystemProperty(PROPERTY); + + // + // if property is not specified then use contents of + // META_INF/org.w3c.dom.DOMImplementationSourceList from classpath + if (p == null) { + p = getServiceValue(classLoader); + } + if (p == null) { + // + // DOM Implementations can modify here to add *additional* fallback + // mechanisms to access a list of default DOMImplementationSources. + p = "gnu.xml.dom.ImplementationSource"; + } + if (p != null) { + StringTokenizer st = new StringTokenizer(p); + while (st.hasMoreTokens()) { + String sourceName = st.nextToken(); + // Use context class loader, falling back to Class.forName + // if and only if this fails... + Class sourceClass = null; + if (classLoader != null) { + sourceClass = classLoader.loadClass(sourceName); + } else { + sourceClass = Class.forName(sourceName); + } + DOMImplementationSource source = + (DOMImplementationSource) sourceClass.newInstance(); + sources.addElement(source); + } + } + return new DOMImplementationRegistry(sources); + } + + /** + * Return the first implementation that has the desired + * features, or null if none is found. + * + * @param features + * A string that specifies which features are required. This is + * a space separated list in which each feature is specified by + * its name optionally followed by a space and a version number. + * This is something like: "XML 1.0 Traversal +Events 2.0" + * @return An implementation that has the desired features, + * or null if none found. + */ + public DOMImplementation getDOMImplementation(final String features) { + int size = sources.size(); + String name = null; + for (int i = 0; i < size; i++) { + DOMImplementationSource source = + (DOMImplementationSource) sources.elementAt(i); + DOMImplementation impl = source.getDOMImplementation(features); + if (impl != null) { + return impl; + } + } + return null; + } + + /** + * Return a list of implementations that support the + * desired features. + * + * @param features + * A string that specifies which features are required. This is + * a space separated list in which each feature is specified by + * its name optionally followed by a space and a version number. + * This is something like: "XML 1.0 Traversal +Events 2.0" + * @return A list of DOMImplementations that support the desired features. + */ + public DOMImplementationList getDOMImplementationList(final String features) { + final Vector implementations = new Vector(); + int size = sources.size(); + for (int i = 0; i < size; i++) { + DOMImplementationSource source = + (DOMImplementationSource) sources.elementAt(i); + DOMImplementationList impls = + source.getDOMImplementationList(features); + for (int j = 0; j < impls.getLength(); j++) { + DOMImplementation impl = impls.item(j); + implementations.addElement(impl); + } + } + return new DOMImplementationList() { + public DOMImplementation item(final int index) { + if (index >= 0 && index < implementations.size()) { + try { + return (DOMImplementation) + implementations.elementAt(index); + } catch (ArrayIndexOutOfBoundsException e) { + return null; + } + } + return null; + } + + public int getLength() { + return implementations.size(); + } + }; + } + + /** + * Register an implementation. + * + * @param s The source to be registered, may not be null + */ + public void addSource(final DOMImplementationSource s) { + if (s == null) { + throw new NullPointerException(); + } + if (!sources.contains(s)) { + sources.addElement(s); + } + } + + /** + * + * Gets a class loader. + * + * @return A class loader, possibly null + */ + private static ClassLoader getClassLoader() { + try { + ClassLoader contextClassLoader = getContextClassLoader(); + + if (contextClassLoader != null) { + return contextClassLoader; + } + } catch (Exception e) { + // Assume that the DOM application is in a JRE 1.1, use the + // current ClassLoader + return DOMImplementationRegistry.class.getClassLoader(); + } + return DOMImplementationRegistry.class.getClassLoader(); + } + + /** + * This method attempts to return the first line of the resource + * META_INF/services/org.w3c.dom.DOMImplementationSourceList + * from the provided ClassLoader. + * + * @param classLoader classLoader, may not be null. + * @return first line of resource, or null + */ + private static String getServiceValue(final ClassLoader classLoader) { + String serviceId = "META-INF/services/" + PROPERTY; + // try to find services in CLASSPATH + try { + InputStream is = getResourceAsStream(classLoader, serviceId); + + if (is != null) { + BufferedReader rd; + try { + rd = + new BufferedReader(new InputStreamReader(is, "UTF-8"), + DEFAULT_LINE_LENGTH); + } catch (java.io.UnsupportedEncodingException e) { + rd = + new BufferedReader(new InputStreamReader(is), + DEFAULT_LINE_LENGTH); + } + String serviceValue = rd.readLine(); + rd.close(); + if (serviceValue != null && serviceValue.length() > 0) { + return serviceValue; + } + } + } catch (Exception ex) { + return null; + } + return null; + } + + /** + * A simple JRE (Java Runtime Environment) 1.1 test + * + * @return true if JRE 1.1 + */ + private static boolean isJRE11() { + try { + Class c = Class.forName("java.security.AccessController"); + // java.security.AccessController existed since 1.2 so, if no + // exception was thrown, the DOM application is running in a JRE + // 1.2 or higher + return false; + } catch (Exception ex) { + // ignore + } + return true; + } + + /** + * This method returns the ContextClassLoader or null if + * running in a JRE 1.1 + * + * @return The Context Classloader + */ + private static ClassLoader getContextClassLoader() { + return isJRE11() + ? null + : (ClassLoader) + AccessController.doPrivileged(new PrivilegedAction() { + public Object run() { + ClassLoader classLoader = null; + try { + classLoader = + Thread.currentThread().getContextClassLoader(); + } catch (SecurityException ex) { + } + return classLoader; + } + }); + } + + /** + * This method returns the system property indicated by the specified name + * after checking access control privileges. For a JRE 1.1, this check is + * not done. + * + * @param name the name of the system property + * @return the system property + */ + private static String getSystemProperty(final String name) { + return isJRE11() + ? (String) System.getProperty(name) + : (String) AccessController.doPrivileged(new PrivilegedAction() { + public Object run() { + return System.getProperty(name); + } + }); + } + + /** + * This method returns an Inputstream for the reading resource + * META_INF/services/org.w3c.dom.DOMImplementationSourceList after checking + * access control privileges. For a JRE 1.1, this check is not done. + * + * @param classLoader classLoader + * @param name the resource + * @return an Inputstream for the resource specified + */ + private static InputStream getResourceAsStream(final ClassLoader classLoader, + final String name) { + if (isJRE11()) { + InputStream ris; + if (classLoader == null) { + ris = ClassLoader.getSystemResourceAsStream(name); + } else { + ris = classLoader.getResourceAsStream(name); + } + return ris; + } else { + return (InputStream) + AccessController.doPrivileged(new PrivilegedAction() { + public Object run() { + InputStream ris; + if (classLoader == null) { + ris = + ClassLoader.getSystemResourceAsStream(name); + } else { + ris = classLoader.getResourceAsStream(name); + } + return ris; + } + }); + } + } +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSS2Properties.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSS2Properties.java new file mode 100644 index 000000000..238eea342 --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSS2Properties.java @@ -0,0 +1,1777 @@ +/* + * 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. + */ + +package org.w3c.dom.css; + +import org.w3c.dom.DOMException; + +/** + * The CSS2Properties interface represents a convenience + * mechanism for retrieving and setting properties within a + * CSSStyleDeclaration. The attributes of this interface + * correspond to all the properties specified in CSS2. Getting an attribute + * of this interface is equivalent to calling the + * getPropertyValue method of the + * CSSStyleDeclaration interface. Setting an attribute of this + * interface is equivalent to calling the setProperty method of + * the CSSStyleDeclaration interface. + *

A conformant implementation of the CSS module is not required to + * implement the CSS2Properties interface. If an implementation + * does implement this interface, the expectation is that language-specific + * methods can be used to cast from an instance of the + * CSSStyleDeclaration interface to the + * CSS2Properties interface. + *

If an implementation does implement this interface, it is expected to + * understand the specific syntax of the shorthand properties, and apply + * their semantics; when the margin property is set, for + * example, the marginTop, marginRight, + * marginBottom and marginLeft properties are + * actually being set by the underlying implementation. + *

When dealing with CSS "shorthand" properties, the shorthand properties + * should be decomposed into their component longhand properties as + * appropriate, and when querying for their value, the form returned should + * be the shortest form exactly equivalent to the declarations made in the + * ruleset. However, if there is no shorthand declaration that could be + * added to the ruleset without changing in any way the rules already + * declared in the ruleset (i.e., by adding longhand rules that were + * previously not declared in the ruleset), then the empty string should be + * returned for the shorthand property. + *

For example, querying for the font property should not + * return "normal normal normal 14pt/normal Arial, sans-serif", when "14pt + * Arial, sans-serif" suffices. (The normals are initial values, and are + * implied by use of the longhand property.) + *

If the values for all the longhand properties that compose a particular + * string are the initial values, then a string consisting of all the + * initial values should be returned (e.g. a border-width value + * of "medium" should be returned as such, not as ""). + *

For some shorthand properties that take missing values from other + * sides, such as the margin, padding, and + * border-[width|style|color] properties, the minimum number of + * sides possible should be used; i.e., "0px 10px" will be returned instead + * of "0px 10px 0px 10px". + *

If the value of a shorthand property can not be decomposed into its + * component longhand properties, as is the case for the font + * property with a value of "menu", querying for the values of the component + * longhand properties should return the empty string. + *

See also the Document Object Model (DOM) Level 2 Style Specification. + * @since DOM Level 2 + */ +public interface CSS2Properties { + /** + * See the azimuth property definition in CSS2. + */ + public String getAzimuth(); + /** + * See the azimuth property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setAzimuth(String azimuth) + throws DOMException; + + /** + * See the background property definition in CSS2. + */ + public String getBackground(); + /** + * See the background property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setBackground(String background) + throws DOMException; + + /** + * See the background-attachment property definition in CSS2. + */ + public String getBackgroundAttachment(); + /** + * See the background-attachment property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setBackgroundAttachment(String backgroundAttachment) + throws DOMException; + + /** + * See the background-color property definition in CSS2. + */ + public String getBackgroundColor(); + /** + * See the background-color property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setBackgroundColor(String backgroundColor) + throws DOMException; + + /** + * See the background-image property definition in CSS2. + */ + public String getBackgroundImage(); + /** + * See the background-image property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setBackgroundImage(String backgroundImage) + throws DOMException; + + /** + * See the background-position property definition in CSS2. + */ + public String getBackgroundPosition(); + /** + * See the background-position property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setBackgroundPosition(String backgroundPosition) + throws DOMException; + + /** + * See the background-repeat property definition in CSS2. + */ + public String getBackgroundRepeat(); + /** + * See the background-repeat property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setBackgroundRepeat(String backgroundRepeat) + throws DOMException; + + /** + * See the border property definition in CSS2. + */ + public String getBorder(); + /** + * See the border property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setBorder(String border) + throws DOMException; + + /** + * See the border-collapse property definition in CSS2. + */ + public String getBorderCollapse(); + /** + * See the border-collapse property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setBorderCollapse(String borderCollapse) + throws DOMException; + + /** + * See the border-color property definition in CSS2. + */ + public String getBorderColor(); + /** + * See the border-color property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setBorderColor(String borderColor) + throws DOMException; + + /** + * See the border-spacing property definition in CSS2. + */ + public String getBorderSpacing(); + /** + * See the border-spacing property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setBorderSpacing(String borderSpacing) + throws DOMException; + + /** + * See the border-style property definition in CSS2. + */ + public String getBorderStyle(); + /** + * See the border-style property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setBorderStyle(String borderStyle) + throws DOMException; + + /** + * See the border-top property definition in CSS2. + */ + public String getBorderTop(); + /** + * See the border-top property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setBorderTop(String borderTop) + throws DOMException; + + /** + * See the border-right property definition in CSS2. + */ + public String getBorderRight(); + /** + * See the border-right property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setBorderRight(String borderRight) + throws DOMException; + + /** + * See the border-bottom property definition in CSS2. + */ + public String getBorderBottom(); + /** + * See the border-bottom property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setBorderBottom(String borderBottom) + throws DOMException; + + /** + * See the border-left property definition in CSS2. + */ + public String getBorderLeft(); + /** + * See the border-left property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setBorderLeft(String borderLeft) + throws DOMException; + + /** + * See the border-top-color property definition in CSS2. + */ + public String getBorderTopColor(); + /** + * See the border-top-color property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setBorderTopColor(String borderTopColor) + throws DOMException; + + /** + * See the border-right-color property definition in CSS2. + */ + public String getBorderRightColor(); + /** + * See the border-right-color property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setBorderRightColor(String borderRightColor) + throws DOMException; + + /** + * See the border-bottom-color property definition in CSS2. + */ + public String getBorderBottomColor(); + /** + * See the border-bottom-color property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setBorderBottomColor(String borderBottomColor) + throws DOMException; + + /** + * See the border-left-color property definition in CSS2. + */ + public String getBorderLeftColor(); + /** + * See the border-left-color property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setBorderLeftColor(String borderLeftColor) + throws DOMException; + + /** + * See the border-top-style property definition in CSS2. + */ + public String getBorderTopStyle(); + /** + * See the border-top-style property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setBorderTopStyle(String borderTopStyle) + throws DOMException; + + /** + * See the border-right-style property definition in CSS2. + */ + public String getBorderRightStyle(); + /** + * See the border-right-style property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setBorderRightStyle(String borderRightStyle) + throws DOMException; + + /** + * See the border-bottom-style property definition in CSS2. + */ + public String getBorderBottomStyle(); + /** + * See the border-bottom-style property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setBorderBottomStyle(String borderBottomStyle) + throws DOMException; + + /** + * See the border-left-style property definition in CSS2. + */ + public String getBorderLeftStyle(); + /** + * See the border-left-style property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setBorderLeftStyle(String borderLeftStyle) + throws DOMException; + + /** + * See the border-top-width property definition in CSS2. + */ + public String getBorderTopWidth(); + /** + * See the border-top-width property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setBorderTopWidth(String borderTopWidth) + throws DOMException; + + /** + * See the border-right-width property definition in CSS2. + */ + public String getBorderRightWidth(); + /** + * See the border-right-width property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setBorderRightWidth(String borderRightWidth) + throws DOMException; + + /** + * See the border-bottom-width property definition in CSS2. + */ + public String getBorderBottomWidth(); + /** + * See the border-bottom-width property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setBorderBottomWidth(String borderBottomWidth) + throws DOMException; + + /** + * See the border-left-width property definition in CSS2. + */ + public String getBorderLeftWidth(); + /** + * See the border-left-width property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setBorderLeftWidth(String borderLeftWidth) + throws DOMException; + + /** + * See the border-width property definition in CSS2. + */ + public String getBorderWidth(); + /** + * See the border-width property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setBorderWidth(String borderWidth) + throws DOMException; + + /** + * See the bottom property definition in CSS2. + */ + public String getBottom(); + /** + * See the bottom property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setBottom(String bottom) + throws DOMException; + + /** + * See the caption-side property definition in CSS2. + */ + public String getCaptionSide(); + /** + * See the caption-side property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setCaptionSide(String captionSide) + throws DOMException; + + /** + * See the clear property definition in CSS2. + */ + public String getClear(); + /** + * See the clear property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setClear(String clear) + throws DOMException; + + /** + * See the clip property definition in CSS2. + */ + public String getClip(); + /** + * See the clip property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setClip(String clip) + throws DOMException; + + /** + * See the color property definition in CSS2. + */ + public String getColor(); + /** + * See the color property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setColor(String color) + throws DOMException; + + /** + * See the content property definition in CSS2. + */ + public String getContent(); + /** + * See the content property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setContent(String content) + throws DOMException; + + /** + * See the counter-increment property definition in CSS2. + */ + public String getCounterIncrement(); + /** + * See the counter-increment property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setCounterIncrement(String counterIncrement) + throws DOMException; + + /** + * See the counter-reset property definition in CSS2. + */ + public String getCounterReset(); + /** + * See the counter-reset property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setCounterReset(String counterReset) + throws DOMException; + + /** + * See the cue property definition in CSS2. + */ + public String getCue(); + /** + * See the cue property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setCue(String cue) + throws DOMException; + + /** + * See the cue-after property definition in CSS2. + */ + public String getCueAfter(); + /** + * See the cue-after property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setCueAfter(String cueAfter) + throws DOMException; + + /** + * See the cue-before property definition in CSS2. + */ + public String getCueBefore(); + /** + * See the cue-before property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setCueBefore(String cueBefore) + throws DOMException; + + /** + * See the cursor property definition in CSS2. + */ + public String getCursor(); + /** + * See the cursor property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setCursor(String cursor) + throws DOMException; + + /** + * See the direction property definition in CSS2. + */ + public String getDirection(); + /** + * See the direction property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setDirection(String direction) + throws DOMException; + + /** + * See the display property definition in CSS2. + */ + public String getDisplay(); + /** + * See the display property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setDisplay(String display) + throws DOMException; + + /** + * See the elevation property definition in CSS2. + */ + public String getElevation(); + /** + * See the elevation property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setElevation(String elevation) + throws DOMException; + + /** + * See the empty-cells property definition in CSS2. + */ + public String getEmptyCells(); + /** + * See the empty-cells property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setEmptyCells(String emptyCells) + throws DOMException; + + /** + * See the float property definition in CSS2. + */ + public String getCssFloat(); + /** + * See the float property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setCssFloat(String cssFloat) + throws DOMException; + + /** + * See the font property definition in CSS2. + */ + public String getFont(); + /** + * See the font property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setFont(String font) + throws DOMException; + + /** + * See the font-family property definition in CSS2. + */ + public String getFontFamily(); + /** + * See the font-family property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setFontFamily(String fontFamily) + throws DOMException; + + /** + * See the font-size property definition in CSS2. + */ + public String getFontSize(); + /** + * See the font-size property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setFontSize(String fontSize) + throws DOMException; + + /** + * See the font-size-adjust property definition in CSS2. + */ + public String getFontSizeAdjust(); + /** + * See the font-size-adjust property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setFontSizeAdjust(String fontSizeAdjust) + throws DOMException; + + /** + * See the font-stretch property definition in CSS2. + */ + public String getFontStretch(); + /** + * See the font-stretch property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setFontStretch(String fontStretch) + throws DOMException; + + /** + * See the font-style property definition in CSS2. + */ + public String getFontStyle(); + /** + * See the font-style property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setFontStyle(String fontStyle) + throws DOMException; + + /** + * See the font-variant property definition in CSS2. + */ + public String getFontVariant(); + /** + * See the font-variant property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setFontVariant(String fontVariant) + throws DOMException; + + /** + * See the font-weight property definition in CSS2. + */ + public String getFontWeight(); + /** + * See the font-weight property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setFontWeight(String fontWeight) + throws DOMException; + + /** + * See the height property definition in CSS2. + */ + public String getHeight(); + /** + * See the height property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setHeight(String height) + throws DOMException; + + /** + * See the left property definition in CSS2. + */ + public String getLeft(); + /** + * See the left property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setLeft(String left) + throws DOMException; + + /** + * See the letter-spacing property definition in CSS2. + */ + public String getLetterSpacing(); + /** + * See the letter-spacing property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setLetterSpacing(String letterSpacing) + throws DOMException; + + /** + * See the line-height property definition in CSS2. + */ + public String getLineHeight(); + /** + * See the line-height property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setLineHeight(String lineHeight) + throws DOMException; + + /** + * See the list-style property definition in CSS2. + */ + public String getListStyle(); + /** + * See the list-style property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setListStyle(String listStyle) + throws DOMException; + + /** + * See the list-style-image property definition in CSS2. + */ + public String getListStyleImage(); + /** + * See the list-style-image property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setListStyleImage(String listStyleImage) + throws DOMException; + + /** + * See the list-style-position property definition in CSS2. + */ + public String getListStylePosition(); + /** + * See the list-style-position property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setListStylePosition(String listStylePosition) + throws DOMException; + + /** + * See the list-style-type property definition in CSS2. + */ + public String getListStyleType(); + /** + * See the list-style-type property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setListStyleType(String listStyleType) + throws DOMException; + + /** + * See the margin property definition in CSS2. + */ + public String getMargin(); + /** + * See the margin property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setMargin(String margin) + throws DOMException; + + /** + * See the margin-top property definition in CSS2. + */ + public String getMarginTop(); + /** + * See the margin-top property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setMarginTop(String marginTop) + throws DOMException; + + /** + * See the margin-right property definition in CSS2. + */ + public String getMarginRight(); + /** + * See the margin-right property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setMarginRight(String marginRight) + throws DOMException; + + /** + * See the margin-bottom property definition in CSS2. + */ + public String getMarginBottom(); + /** + * See the margin-bottom property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setMarginBottom(String marginBottom) + throws DOMException; + + /** + * See the margin-left property definition in CSS2. + */ + public String getMarginLeft(); + /** + * See the margin-left property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setMarginLeft(String marginLeft) + throws DOMException; + + /** + * See the marker-offset property definition in CSS2. + */ + public String getMarkerOffset(); + /** + * See the marker-offset property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setMarkerOffset(String markerOffset) + throws DOMException; + + /** + * See the marks property definition in CSS2. + */ + public String getMarks(); + /** + * See the marks property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setMarks(String marks) + throws DOMException; + + /** + * See the max-height property definition in CSS2. + */ + public String getMaxHeight(); + /** + * See the max-height property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setMaxHeight(String maxHeight) + throws DOMException; + + /** + * See the max-width property definition in CSS2. + */ + public String getMaxWidth(); + /** + * See the max-width property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setMaxWidth(String maxWidth) + throws DOMException; + + /** + * See the min-height property definition in CSS2. + */ + public String getMinHeight(); + /** + * See the min-height property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setMinHeight(String minHeight) + throws DOMException; + + /** + * See the min-width property definition in CSS2. + */ + public String getMinWidth(); + /** + * See the min-width property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setMinWidth(String minWidth) + throws DOMException; + + /** + * See the orphans property definition in CSS2. + */ + public String getOrphans(); + /** + * See the orphans property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setOrphans(String orphans) + throws DOMException; + + /** + * See the outline property definition in CSS2. + */ + public String getOutline(); + /** + * See the outline property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setOutline(String outline) + throws DOMException; + + /** + * See the outline-color property definition in CSS2. + */ + public String getOutlineColor(); + /** + * See the outline-color property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setOutlineColor(String outlineColor) + throws DOMException; + + /** + * See the outline-style property definition in CSS2. + */ + public String getOutlineStyle(); + /** + * See the outline-style property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setOutlineStyle(String outlineStyle) + throws DOMException; + + /** + * See the outline-width property definition in CSS2. + */ + public String getOutlineWidth(); + /** + * See the outline-width property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setOutlineWidth(String outlineWidth) + throws DOMException; + + /** + * See the overflow property definition in CSS2. + */ + public String getOverflow(); + /** + * See the overflow property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setOverflow(String overflow) + throws DOMException; + + /** + * See the padding property definition in CSS2. + */ + public String getPadding(); + /** + * See the padding property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setPadding(String padding) + throws DOMException; + + /** + * See the padding-top property definition in CSS2. + */ + public String getPaddingTop(); + /** + * See the padding-top property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setPaddingTop(String paddingTop) + throws DOMException; + + /** + * See the padding-right property definition in CSS2. + */ + public String getPaddingRight(); + /** + * See the padding-right property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setPaddingRight(String paddingRight) + throws DOMException; + + /** + * See the padding-bottom property definition in CSS2. + */ + public String getPaddingBottom(); + /** + * See the padding-bottom property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setPaddingBottom(String paddingBottom) + throws DOMException; + + /** + * See the padding-left property definition in CSS2. + */ + public String getPaddingLeft(); + /** + * See the padding-left property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setPaddingLeft(String paddingLeft) + throws DOMException; + + /** + * See the page property definition in CSS2. + */ + public String getPage(); + /** + * See the page property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setPage(String page) + throws DOMException; + + /** + * See the page-break-after property definition in CSS2. + */ + public String getPageBreakAfter(); + /** + * See the page-break-after property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setPageBreakAfter(String pageBreakAfter) + throws DOMException; + + /** + * See the page-break-before property definition in CSS2. + */ + public String getPageBreakBefore(); + /** + * See the page-break-before property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setPageBreakBefore(String pageBreakBefore) + throws DOMException; + + /** + * See the page-break-inside property definition in CSS2. + */ + public String getPageBreakInside(); + /** + * See the page-break-inside property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setPageBreakInside(String pageBreakInside) + throws DOMException; + + /** + * See the pause property definition in CSS2. + */ + public String getPause(); + /** + * See the pause property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setPause(String pause) + throws DOMException; + + /** + * See the pause-after property definition in CSS2. + */ + public String getPauseAfter(); + /** + * See the pause-after property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setPauseAfter(String pauseAfter) + throws DOMException; + + /** + * See the pause-before property definition in CSS2. + */ + public String getPauseBefore(); + /** + * See the pause-before property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setPauseBefore(String pauseBefore) + throws DOMException; + + /** + * See the pitch property definition in CSS2. + */ + public String getPitch(); + /** + * See the pitch property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setPitch(String pitch) + throws DOMException; + + /** + * See the pitch-range property definition in CSS2. + */ + public String getPitchRange(); + /** + * See the pitch-range property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setPitchRange(String pitchRange) + throws DOMException; + + /** + * See the play-during property definition in CSS2. + */ + public String getPlayDuring(); + /** + * See the play-during property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setPlayDuring(String playDuring) + throws DOMException; + + /** + * See the position property definition in CSS2. + */ + public String getPosition(); + /** + * See the position property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setPosition(String position) + throws DOMException; + + /** + * See the quotes property definition in CSS2. + */ + public String getQuotes(); + /** + * See the quotes property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setQuotes(String quotes) + throws DOMException; + + /** + * See the richness property definition in CSS2. + */ + public String getRichness(); + /** + * See the richness property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setRichness(String richness) + throws DOMException; + + /** + * See the right property definition in CSS2. + */ + public String getRight(); + /** + * See the right property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setRight(String right) + throws DOMException; + + /** + * See the size property definition in CSS2. + */ + public String getSize(); + /** + * See the size property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setSize(String size) + throws DOMException; + + /** + * See the speak property definition in CSS2. + */ + public String getSpeak(); + /** + * See the speak property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setSpeak(String speak) + throws DOMException; + + /** + * See the speak-header property definition in CSS2. + */ + public String getSpeakHeader(); + /** + * See the speak-header property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setSpeakHeader(String speakHeader) + throws DOMException; + + /** + * See the speak-numeral property definition in CSS2. + */ + public String getSpeakNumeral(); + /** + * See the speak-numeral property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setSpeakNumeral(String speakNumeral) + throws DOMException; + + /** + * See the speak-punctuation property definition in CSS2. + */ + public String getSpeakPunctuation(); + /** + * See the speak-punctuation property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setSpeakPunctuation(String speakPunctuation) + throws DOMException; + + /** + * See the speech-rate property definition in CSS2. + */ + public String getSpeechRate(); + /** + * See the speech-rate property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setSpeechRate(String speechRate) + throws DOMException; + + /** + * See the stress property definition in CSS2. + */ + public String getStress(); + /** + * See the stress property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setStress(String stress) + throws DOMException; + + /** + * See the table-layout property definition in CSS2. + */ + public String getTableLayout(); + /** + * See the table-layout property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setTableLayout(String tableLayout) + throws DOMException; + + /** + * See the text-align property definition in CSS2. + */ + public String getTextAlign(); + /** + * See the text-align property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setTextAlign(String textAlign) + throws DOMException; + + /** + * See the text-decoration property definition in CSS2. + */ + public String getTextDecoration(); + /** + * See the text-decoration property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setTextDecoration(String textDecoration) + throws DOMException; + + /** + * See the text-indent property definition in CSS2. + */ + public String getTextIndent(); + /** + * See the text-indent property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setTextIndent(String textIndent) + throws DOMException; + + /** + * See the text-shadow property definition in CSS2. + */ + public String getTextShadow(); + /** + * See the text-shadow property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setTextShadow(String textShadow) + throws DOMException; + + /** + * See the text-transform property definition in CSS2. + */ + public String getTextTransform(); + /** + * See the text-transform property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setTextTransform(String textTransform) + throws DOMException; + + /** + * See the top property definition in CSS2. + */ + public String getTop(); + /** + * See the top property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setTop(String top) + throws DOMException; + + /** + * See the unicode-bidi property definition in CSS2. + */ + public String getUnicodeBidi(); + /** + * See the unicode-bidi property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setUnicodeBidi(String unicodeBidi) + throws DOMException; + + /** + * See the vertical-align property definition in CSS2. + */ + public String getVerticalAlign(); + /** + * See the vertical-align property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setVerticalAlign(String verticalAlign) + throws DOMException; + + /** + * See the visibility property definition in CSS2. + */ + public String getVisibility(); + /** + * See the visibility property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setVisibility(String visibility) + throws DOMException; + + /** + * See the voice-family property definition in CSS2. + */ + public String getVoiceFamily(); + /** + * See the voice-family property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setVoiceFamily(String voiceFamily) + throws DOMException; + + /** + * See the volume property definition in CSS2. + */ + public String getVolume(); + /** + * See the volume property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setVolume(String volume) + throws DOMException; + + /** + * See the white-space property definition in CSS2. + */ + public String getWhiteSpace(); + /** + * See the white-space property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setWhiteSpace(String whiteSpace) + throws DOMException; + + /** + * See the widows property definition in CSS2. + */ + public String getWidows(); + /** + * See the widows property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setWidows(String widows) + throws DOMException; + + /** + * See the width property definition in CSS2. + */ + public String getWidth(); + /** + * See the width property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setWidth(String width) + throws DOMException; + + /** + * See the word-spacing property definition in CSS2. + */ + public String getWordSpacing(); + /** + * See the word-spacing property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setWordSpacing(String wordSpacing) + throws DOMException; + + /** + * See the z-index property definition in CSS2. + */ + public String getZIndex(); + /** + * See the z-index property definition in CSS2. + * @exception DOMException + * SYNTAX_ERR: Raised if the new value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setZIndex(String zIndex) + throws DOMException; + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSCharsetRule.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSCharsetRule.java new file mode 100644 index 000000000..55dc6f8cc --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSCharsetRule.java @@ -0,0 +1,51 @@ +/* + * 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. + */ + +package org.w3c.dom.css; + +import org.w3c.dom.DOMException; + +/** + * The CSSCharsetRule interface represents a @charset rule in a + * CSS style sheet. The value of the encoding attribute does + * not affect the encoding of text data in the DOM objects; this encoding is + * always UTF-16. After a stylesheet is loaded, the value of the + * encoding attribute is the value found in the + * @charset rule. If there was no @charset in the + * original document, then no CSSCharsetRule is created. The + * value of the encoding attribute may also be used as a hint + * for the encoding used on serialization of the style sheet. + *

The value of the @charset rule (and therefore of the + * CSSCharsetRule) may not correspond to the encoding the + * document actually came in; character encoding information e.g. in an HTTP + * header, has priority (see CSS document representation) but this is not + * reflected in the CSSCharsetRule. + *

See also the Document Object Model (DOM) Level 2 Style Specification. + * @since DOM Level 2 + */ +public interface CSSCharsetRule extends CSSRule { + /** + * The encoding information used in this @charset rule. + */ + public String getEncoding(); + /** + * The encoding information used in this @charset rule. + * @exception DOMException + * SYNTAX_ERR: Raised if the specified encoding value has a syntax error + * and is unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this encoding rule is + * readonly. + */ + public void setEncoding(String encoding) + throws DOMException; + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSFontFaceRule.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSFontFaceRule.java new file mode 100644 index 000000000..e446ea8c5 --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSFontFaceRule.java @@ -0,0 +1,28 @@ +/* + * 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. + */ + +package org.w3c.dom.css; + +/** + * The CSSFontFaceRule interface represents a @font-face rule in + * a CSS style sheet. The @font-face rule is used to hold a set + * of font descriptions. + *

See also the Document Object Model (DOM) Level 2 Style Specification. + * @since DOM Level 2 + */ +public interface CSSFontFaceRule extends CSSRule { + /** + * The declaration-block of this rule. + */ + public CSSStyleDeclaration getStyle(); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSImportRule.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSImportRule.java new file mode 100644 index 000000000..3dee5d80b --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSImportRule.java @@ -0,0 +1,44 @@ +/* + * 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. + */ + +package org.w3c.dom.css; + +import org.w3c.dom.stylesheets.MediaList; + +/** + * The CSSImportRule interface represents a @import rule within + * a CSS style sheet. The @import rule is used to import style + * rules from other style sheets. + *

See also the Document Object Model (DOM) Level 2 Style Specification. + * @since DOM Level 2 + */ +public interface CSSImportRule extends CSSRule { + /** + * The location of the style sheet to be imported. The attribute will not + * contain the "url(...)" specifier around the URI. + */ + public String getHref(); + + /** + * A list of media types for which this style sheet may be used. + */ + public MediaList getMedia(); + + /** + * The style sheet referred to by this rule, if it has been loaded. The + * value of this attribute is null if the style sheet has + * not yet been loaded or if it will not be loaded (e.g. if the style + * sheet is for a media type not supported by the user agent). + */ + public CSSStyleSheet getStyleSheet(); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSMediaRule.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSMediaRule.java new file mode 100644 index 000000000..6e977923d --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSMediaRule.java @@ -0,0 +1,76 @@ +/* + * 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. + */ + +package org.w3c.dom.css; + +import org.w3c.dom.DOMException; +import org.w3c.dom.stylesheets.MediaList; + +/** + * The CSSMediaRule interface represents a @media rule in a CSS + * style sheet. A @media rule can be used to delimit style + * rules for specific media types. + *

See also the Document Object Model (DOM) Level 2 Style Specification. + * @since DOM Level 2 + */ +public interface CSSMediaRule extends CSSRule { + /** + * A list of media types for this rule. + */ + public MediaList getMedia(); + + /** + * A list of all CSS rules contained within the media block. + */ + public CSSRuleList getCssRules(); + + /** + * Used to insert a new rule into the media block. + * @param rule The parsable text representing the rule. For rule sets + * this contains both the selector and the style declaration. For + * at-rules, this specifies both the at-identifier and the rule + * content. + * @param index The index within the media block's rule collection of + * the rule before which to insert the specified rule. If the + * specified index is equal to the length of the media blocks's rule + * collection, the rule will be added to the end of the media block. + * @return The index within the media block's rule collection of the + * newly inserted rule. + * @exception DOMException + * HIERARCHY_REQUEST_ERR: Raised if the rule cannot be inserted at the + * specified index, e.g., if an @import rule is inserted + * after a standard rule set or other at-rule. + *
INDEX_SIZE_ERR: Raised if the specified index is not a valid + * insertion point. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this media rule is + * readonly. + *
SYNTAX_ERR: Raised if the specified rule has a syntax error and + * is unparsable. + */ + public int insertRule(String rule, + int index) + throws DOMException; + + /** + * Used to delete a rule from the media block. + * @param index The index within the media block's rule collection of + * the rule to remove. + * @exception DOMException + * INDEX_SIZE_ERR: Raised if the specified index does not correspond to + * a rule in the media rule list. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this media rule is + * readonly. + */ + public void deleteRule(int index) + throws DOMException; + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSPageRule.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSPageRule.java new file mode 100644 index 000000000..eb8f783f5 --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSPageRule.java @@ -0,0 +1,44 @@ +/* + * 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. + */ + +package org.w3c.dom.css; + +import org.w3c.dom.DOMException; + +/** + * The CSSPageRule interface represents a @page rule within a + * CSS style sheet. The @page rule is used to specify the + * dimensions, orientation, margins, etc. of a page box for paged media. + *

See also the Document Object Model (DOM) Level 2 Style Specification. + * @since DOM Level 2 + */ +public interface CSSPageRule extends CSSRule { + /** + * The parsable textual representation of the page selector for the rule. + */ + public String getSelectorText(); + /** + * The parsable textual representation of the page selector for the rule. + * @exception DOMException + * SYNTAX_ERR: Raised if the specified CSS string value has a syntax + * error and is unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this rule is readonly. + */ + public void setSelectorText(String selectorText) + throws DOMException; + + /** + * The declaration-block of this rule. + */ + public CSSStyleDeclaration getStyle(); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSPrimitiveValue.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSPrimitiveValue.java new file mode 100644 index 000000000..25f906a70 --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSPrimitiveValue.java @@ -0,0 +1,296 @@ +/* + * 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. + */ + +package org.w3c.dom.css; + +import org.w3c.dom.DOMException; + +/** + * The CSSPrimitiveValue interface represents a single CSS value + * . This interface may be used to determine the value of a specific style + * property currently set in a block or to set a specific style property + * explicitly within the block. An instance of this interface might be + * obtained from the getPropertyCSSValue method of the + * CSSStyleDeclaration interface. A + * CSSPrimitiveValue object only occurs in a context of a CSS + * property. + *

Conversions are allowed between absolute values (from millimeters to + * centimeters, from degrees to radians, and so on) but not between relative + * values. (For example, a pixel value cannot be converted to a centimeter + * value.) Percentage values can't be converted since they are relative to + * the parent value (or another property value). There is one exception for + * color percentage values: since a color percentage value is relative to + * the range 0-255, a color percentage value can be converted to a number; + * (see also the RGBColor interface). + *

See also the Document Object Model (DOM) Level 2 Style Specification. + * @since DOM Level 2 + */ +public interface CSSPrimitiveValue extends CSSValue { + // UnitTypes + /** + * The value is not a recognized CSS2 value. The value can only be + * obtained by using the cssText attribute. + */ + public static final short CSS_UNKNOWN = 0; + /** + * The value is a simple number. The value can be obtained by using the + * getFloatValue method. + */ + public static final short CSS_NUMBER = 1; + /** + * The value is a percentage. The value can be obtained by using the + * getFloatValue method. + */ + public static final short CSS_PERCENTAGE = 2; + /** + * The value is a length (ems). The value can be obtained by using the + * getFloatValue method. + */ + public static final short CSS_EMS = 3; + /** + * The value is a length (exs). The value can be obtained by using the + * getFloatValue method. + */ + public static final short CSS_EXS = 4; + /** + * The value is a length (px). The value can be obtained by using the + * getFloatValue method. + */ + public static final short CSS_PX = 5; + /** + * The value is a length (cm). The value can be obtained by using the + * getFloatValue method. + */ + public static final short CSS_CM = 6; + /** + * The value is a length (mm). The value can be obtained by using the + * getFloatValue method. + */ + public static final short CSS_MM = 7; + /** + * The value is a length (in). The value can be obtained by using the + * getFloatValue method. + */ + public static final short CSS_IN = 8; + /** + * The value is a length (pt). The value can be obtained by using the + * getFloatValue method. + */ + public static final short CSS_PT = 9; + /** + * The value is a length (pc). The value can be obtained by using the + * getFloatValue method. + */ + public static final short CSS_PC = 10; + /** + * The value is an angle (deg). The value can be obtained by using the + * getFloatValue method. + */ + public static final short CSS_DEG = 11; + /** + * The value is an angle (rad). The value can be obtained by using the + * getFloatValue method. + */ + public static final short CSS_RAD = 12; + /** + * The value is an angle (grad). The value can be obtained by using the + * getFloatValue method. + */ + public static final short CSS_GRAD = 13; + /** + * The value is a time (ms). The value can be obtained by using the + * getFloatValue method. + */ + public static final short CSS_MS = 14; + /** + * The value is a time (s). The value can be obtained by using the + * getFloatValue method. + */ + public static final short CSS_S = 15; + /** + * The value is a frequency (Hz). The value can be obtained by using the + * getFloatValue method. + */ + public static final short CSS_HZ = 16; + /** + * The value is a frequency (kHz). The value can be obtained by using the + * getFloatValue method. + */ + public static final short CSS_KHZ = 17; + /** + * The value is a number with an unknown dimension. The value can be + * obtained by using the getFloatValue method. + */ + public static final short CSS_DIMENSION = 18; + /** + * The value is a STRING. The value can be obtained by using the + * getStringValue method. + */ + public static final short CSS_STRING = 19; + /** + * The value is a URI. The value can be obtained by using the + * getStringValue method. + */ + public static final short CSS_URI = 20; + /** + * The value is an identifier. The value can be obtained by using the + * getStringValue method. + */ + public static final short CSS_IDENT = 21; + /** + * The value is a attribute function. The value can be obtained by using + * the getStringValue method. + */ + public static final short CSS_ATTR = 22; + /** + * The value is a counter or counters function. The value can be obtained + * by using the getCounterValue method. + */ + public static final short CSS_COUNTER = 23; + /** + * The value is a rect function. The value can be obtained by using the + * getRectValue method. + */ + public static final short CSS_RECT = 24; + /** + * The value is a RGB color. The value can be obtained by using the + * getRGBColorValue method. + */ + public static final short CSS_RGBCOLOR = 25; + + /** + * The type of the value as defined by the constants specified above. + */ + public short getPrimitiveType(); + + /** + * A method to set the float value with a specified unit. If the property + * attached with this value can not accept the specified unit or the + * float value, the value will be unchanged and a + * DOMException will be raised. + * @param unitType A unit code as defined above. The unit code can only + * be a float unit type (i.e. CSS_NUMBER, + * CSS_PERCENTAGE, CSS_EMS, + * CSS_EXS, CSS_PX, CSS_CM, + * CSS_MM, CSS_IN, CSS_PT, + * CSS_PC, CSS_DEG, CSS_RAD, + * CSS_GRAD, CSS_MS, CSS_S, + * CSS_HZ, CSS_KHZ, + * CSS_DIMENSION). + * @param floatValue The new float value. + * @exception DOMException + * INVALID_ACCESS_ERR: Raised if the attached property doesn't support + * the float value or the unit type. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setFloatValue(short unitType, + float floatValue) + throws DOMException; + + /** + * This method is used to get a float value in a specified unit. If this + * CSS value doesn't contain a float value or can't be converted into + * the specified unit, a DOMException is raised. + * @param unitType A unit code to get the float value. The unit code can + * only be a float unit type (i.e. CSS_NUMBER, + * CSS_PERCENTAGE, CSS_EMS, + * CSS_EXS, CSS_PX, CSS_CM, + * CSS_MM, CSS_IN, CSS_PT, + * CSS_PC, CSS_DEG, CSS_RAD, + * CSS_GRAD, CSS_MS, CSS_S, + * CSS_HZ, CSS_KHZ, + * CSS_DIMENSION). + * @return The float value in the specified unit. + * @exception DOMException + * INVALID_ACCESS_ERR: Raised if the CSS value doesn't contain a float + * value or if the float value can't be converted into the specified + * unit. + */ + public float getFloatValue(short unitType) + throws DOMException; + + /** + * A method to set the string value with the specified unit. If the + * property attached to this value can't accept the specified unit or + * the string value, the value will be unchanged and a + * DOMException will be raised. + * @param stringType A string code as defined above. The string code can + * only be a string unit type (i.e. CSS_STRING, + * CSS_URI, CSS_IDENT, and + * CSS_ATTR). + * @param stringValue The new string value. + * @exception DOMException + * INVALID_ACCESS_ERR: Raised if the CSS value doesn't contain a string + * value or if the string value can't be converted into the specified + * unit. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. + */ + public void setStringValue(short stringType, + String stringValue) + throws DOMException; + + /** + * This method is used to get the string value. If the CSS value doesn't + * contain a string value, a DOMException is raised. Some + * properties (like 'font-family' or 'voice-family') convert a + * whitespace separated list of idents to a string. + * @return The string value in the current unit. The current + * primitiveType can only be a string unit type (i.e. + * CSS_STRING, CSS_URI, + * CSS_IDENT and CSS_ATTR). + * @exception DOMException + * INVALID_ACCESS_ERR: Raised if the CSS value doesn't contain a string + * value. + */ + public String getStringValue() + throws DOMException; + + /** + * This method is used to get the Counter value. If this CSS value + * doesn't contain a counter value, a DOMException is + * raised. Modification to the corresponding style property can be + * achieved using the Counter interface. + * @return The Counter value. + * @exception DOMException + * INVALID_ACCESS_ERR: Raised if the CSS value doesn't contain a + * Counter value (e.g. this is not CSS_COUNTER). + */ + public Counter getCounterValue() + throws DOMException; + + /** + * This method is used to get the Rect value. If this CSS value doesn't + * contain a rect value, a DOMException is raised. + * Modification to the corresponding style property can be achieved + * using the Rect interface. + * @return The Rect value. + * @exception DOMException + * INVALID_ACCESS_ERR: Raised if the CSS value doesn't contain a Rect + * value. (e.g. this is not CSS_RECT). + */ + public Rect getRectValue() + throws DOMException; + + /** + * This method is used to get the RGB color. If this CSS value doesn't + * contain a RGB color value, a DOMException is raised. + * Modification to the corresponding style property can be achieved + * using the RGBColor interface. + * @return the RGB color value. + * @exception DOMException + * INVALID_ACCESS_ERR: Raised if the attached property can't return a + * RGB color value (e.g. this is not CSS_RGBCOLOR). + */ + public RGBColor getRGBColorValue() + throws DOMException; + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSRule.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSRule.java new file mode 100644 index 000000000..dfd98aed9 --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSRule.java @@ -0,0 +1,97 @@ +/* + * 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. + */ + +package org.w3c.dom.css; + +import org.w3c.dom.DOMException; + +/** + * The CSSRule interface is the abstract base interface for any + * type of CSS statement. This includes both rule sets and at-rules. An + * implementation is expected to preserve all rules specified in a CSS style + * sheet, even if the rule is not recognized by the parser. Unrecognized + * rules are represented using the CSSUnknownRule interface. + *

See also the Document Object Model (DOM) Level 2 Style Specification. + * @since DOM Level 2 + */ +public interface CSSRule { + // RuleType + /** + * The rule is a CSSUnknownRule. + */ + public static final short UNKNOWN_RULE = 0; + /** + * The rule is a CSSStyleRule. + */ + public static final short STYLE_RULE = 1; + /** + * The rule is a CSSCharsetRule. + */ + public static final short CHARSET_RULE = 2; + /** + * The rule is a CSSImportRule. + */ + public static final short IMPORT_RULE = 3; + /** + * The rule is a CSSMediaRule. + */ + public static final short MEDIA_RULE = 4; + /** + * The rule is a CSSFontFaceRule. + */ + public static final short FONT_FACE_RULE = 5; + /** + * The rule is a CSSPageRule. + */ + public static final short PAGE_RULE = 6; + + /** + * The type of the rule, as defined above. The expectation is that + * binding-specific casting methods can be used to cast down from an + * instance of the CSSRule interface to the specific + * derived interface implied by the type. + */ + public short getType(); + + /** + * The parsable textual representation of the rule. This reflects the + * current state of the rule and not its initial value. + */ + public String getCssText(); + /** + * The parsable textual representation of the rule. This reflects the + * current state of the rule and not its initial value. + * @exception DOMException + * SYNTAX_ERR: Raised if the specified CSS string value has a syntax + * error and is unparsable. + *
INVALID_MODIFICATION_ERR: Raised if the specified CSS string + * value represents a different type of rule than the current one. + *
HIERARCHY_REQUEST_ERR: Raised if the rule cannot be inserted at + * this point in the style sheet. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if the rule is readonly. + */ + public void setCssText(String cssText) + throws DOMException; + + /** + * The style sheet that contains this rule. + */ + public CSSStyleSheet getParentStyleSheet(); + + /** + * If this rule is contained inside another rule (e.g. a style rule + * inside an @media block), this is the containing rule. If this rule is + * not nested inside any other rules, this returns null. + */ + public CSSRule getParentRule(); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSRuleList.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSRuleList.java new file mode 100644 index 000000000..b875210cc --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSRuleList.java @@ -0,0 +1,43 @@ +/* + * 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. + */ + +package org.w3c.dom.css; + +/** + * The CSSRuleList interface provides the abstraction of an + * ordered collection of CSS rules. + *

The items in the CSSRuleList are accessible via an + * integral index, starting from 0. + *

See also the Document Object Model (DOM) Level 2 Style Specification. + * @since DOM Level 2 + */ +public interface CSSRuleList { + /** + * The number of CSSRules in the list. The range of valid + * child rule indices is 0 to length-1 + * inclusive. + */ + public int getLength(); + + /** + * Used to retrieve a CSS rule by ordinal index. The order in this + * collection represents the order of the rules in the CSS style sheet. + * If index is greater than or equal to the number of rules in the list, + * this returns null. + * @param index Index into the collection + * @return The style rule at the index position in the + * CSSRuleList, or null if that is not a + * valid index. + */ + public CSSRule item(int index); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSStyleDeclaration.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSStyleDeclaration.java new file mode 100644 index 000000000..91b9d9adf --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSStyleDeclaration.java @@ -0,0 +1,162 @@ +/* + * 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. + */ + +package org.w3c.dom.css; + +import org.w3c.dom.DOMException; + +/** + * The CSSStyleDeclaration interface represents a single CSS + * declaration block. This interface may be used to determine the style + * properties currently set in a block or to set style properties explicitly + * within the block. + *

While an implementation may not recognize all CSS properties within a + * CSS declaration block, it is expected to provide access to all specified + * properties in the style sheet through the CSSStyleDeclaration + * interface. Furthermore, implementations that support a specific level of + * CSS should correctly handle CSS shorthand properties for that level. For + * a further discussion of shorthand properties, see the + * CSS2Properties interface. + *

This interface is also used to provide a read-only access to the + * computed values of an element. See also the ViewCSS + * interface. The CSS Object Model doesn't provide an access to the + * specified or actual values of the CSS cascade. + *

See also the Document Object Model (DOM) Level 2 Style Specification. + * @since DOM Level 2 + */ +public interface CSSStyleDeclaration { + /** + * The parsable textual representation of the declaration block + * (excluding the surrounding curly braces). Setting this attribute will + * result in the parsing of the new value and resetting of all the + * properties in the declaration block including the removal or addition + * of properties. + */ + public String getCssText(); + /** + * The parsable textual representation of the declaration block + * (excluding the surrounding curly braces). Setting this attribute will + * result in the parsing of the new value and resetting of all the + * properties in the declaration block including the removal or addition + * of properties. + * @exception DOMException + * SYNTAX_ERR: Raised if the specified CSS string value has a syntax + * error and is unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this declaration is + * readonly or a property is readonly. + */ + public void setCssText(String cssText) + throws DOMException; + + /** + * Used to retrieve the value of a CSS property if it has been explicitly + * set within this declaration block. + * @param propertyName The name of the CSS property. See the CSS + * property index. + * @return Returns the value of the property if it has been explicitly + * set for this declaration block. Returns the empty string if the + * property has not been set. + */ + public String getPropertyValue(String propertyName); + + /** + * Used to retrieve the object representation of the value of a CSS + * property if it has been explicitly set within this declaration block. + * This method returns null if the property is a shorthand + * property. Shorthand property values can only be accessed and modified + * as strings, using the getPropertyValue and + * setProperty methods. + * @param propertyName The name of the CSS property. See the CSS + * property index. + * @return Returns the value of the property if it has been explicitly + * set for this declaration block. Returns null if the + * property has not been set. + */ + public CSSValue getPropertyCSSValue(String propertyName); + + /** + * Used to remove a CSS property if it has been explicitly set within + * this declaration block. + * @param propertyName The name of the CSS property. See the CSS + * property index. + * @return Returns the value of the property if it has been explicitly + * set for this declaration block. Returns the empty string if the + * property has not been set or the property name does not correspond + * to a known CSS property. + * @exception DOMException + * NO_MODIFICATION_ALLOWED_ERR: Raised if this declaration is readonly + * or the property is readonly. + */ + public String removeProperty(String propertyName) + throws DOMException; + + /** + * Used to retrieve the priority of a CSS property (e.g. the + * "important" qualifier) if the priority has been + * explicitly set in this declaration block. + * @param propertyName The name of the CSS property. See the CSS + * property index. + * @return A string representing the priority (e.g. + * "important") if the property has been explicitly set + * in this declaration block and has a priority specified. The empty + * string otherwise. + */ + public String getPropertyPriority(String propertyName); + + /** + * Used to set a property value and priority within this declaration + * block. setProperty permits to modify a property or add a + * new one in the declaration block. Any call to this method may modify + * the order of properties in the item method. + * @param propertyName The name of the CSS property. See the CSS + * property index. + * @param value The new value of the property. + * @param priority The new priority of the property (e.g. + * "important") or the empty string if none. + * @exception DOMException + * SYNTAX_ERR: Raised if the specified value has a syntax error and is + * unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this declaration is + * readonly or the property is readonly. + */ + public void setProperty(String propertyName, + String value, + String priority) + throws DOMException; + + /** + * The number of properties that have been explicitly set in this + * declaration block. The range of valid indices is 0 to length-1 + * inclusive. + */ + public int getLength(); + + /** + * Used to retrieve the properties that have been explicitly set in this + * declaration block. The order of the properties retrieved using this + * method does not have to be the order in which they were set. This + * method can be used to iterate over all properties in this declaration + * block. + * @param index Index of the property name to retrieve. + * @return The name of the property at this ordinal position. The empty + * string if no property exists at this position. + */ + public String item(int index); + + /** + * The CSS rule that contains this declaration block or null + * if this CSSStyleDeclaration is not attached to a + * CSSRule. + */ + public CSSRule getParentRule(); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSStyleRule.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSStyleRule.java new file mode 100644 index 000000000..e7377dcbe --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSStyleRule.java @@ -0,0 +1,47 @@ +/* + * 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. + */ + +package org.w3c.dom.css; + +import org.w3c.dom.DOMException; + +/** + * The CSSStyleRule interface represents a single rule set in a + * CSS style sheet. + *

See also the Document Object Model (DOM) Level 2 Style Specification. + * @since DOM Level 2 + */ +public interface CSSStyleRule extends CSSRule { + /** + * The textual representation of the selector for the rule set. The + * implementation may have stripped out insignificant whitespace while + * parsing the selector. + */ + public String getSelectorText(); + /** + * The textual representation of the selector for the rule set. The + * implementation may have stripped out insignificant whitespace while + * parsing the selector. + * @exception DOMException + * SYNTAX_ERR: Raised if the specified CSS string value has a syntax + * error and is unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this rule is readonly. + */ + public void setSelectorText(String selectorText) + throws DOMException; + + /** + * The declaration-block of this rule set. + */ + public CSSStyleDeclaration getStyle(); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSStyleSheet.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSStyleSheet.java new file mode 100644 index 000000000..c9538e436 --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSStyleSheet.java @@ -0,0 +1,85 @@ +/* + * 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. + */ + +package org.w3c.dom.css; + +import org.w3c.dom.DOMException; +import org.w3c.dom.stylesheets.StyleSheet; + +/** + * The CSSStyleSheet interface is a concrete interface used to + * represent a CSS style sheet i.e., a style sheet whose content type is + * "text/css". + *

See also the Document Object Model (DOM) Level 2 Style Specification. + * @since DOM Level 2 + */ +public interface CSSStyleSheet extends StyleSheet { + /** + * If this style sheet comes from an @import rule, the + * ownerRule attribute will contain the + * CSSImportRule. In that case, the ownerNode + * attribute in the StyleSheet interface will be + * null. If the style sheet comes from an element or a + * processing instruction, the ownerRule attribute will be + * null and the ownerNode attribute will + * contain the Node. + */ + public CSSRule getOwnerRule(); + + /** + * The list of all CSS rules contained within the style sheet. This + * includes both rule sets and at-rules. + */ + public CSSRuleList getCssRules(); + + /** + * Used to insert a new rule into the style sheet. The new rule now + * becomes part of the cascade. + * @param rule The parsable text representing the rule. For rule sets + * this contains both the selector and the style declaration. For + * at-rules, this specifies both the at-identifier and the rule + * content. + * @param index The index within the style sheet's rule list of the rule + * before which to insert the specified rule. If the specified index + * is equal to the length of the style sheet's rule collection, the + * rule will be added to the end of the style sheet. + * @return The index within the style sheet's rule collection of the + * newly inserted rule. + * @exception DOMException + * HIERARCHY_REQUEST_ERR: Raised if the rule cannot be inserted at the + * specified index e.g. if an @import rule is inserted + * after a standard rule set or other at-rule. + *
INDEX_SIZE_ERR: Raised if the specified index is not a valid + * insertion point. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this style sheet is + * readonly. + *
SYNTAX_ERR: Raised if the specified rule has a syntax error and + * is unparsable. + */ + public int insertRule(String rule, + int index) + throws DOMException; + + /** + * Used to delete a rule from the style sheet. + * @param index The index within the style sheet's rule list of the rule + * to remove. + * @exception DOMException + * INDEX_SIZE_ERR: Raised if the specified index does not correspond to + * a rule in the style sheet's rule list. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this style sheet is + * readonly. + */ + public void deleteRule(int index) + throws DOMException; + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSUnknownRule.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSUnknownRule.java new file mode 100644 index 000000000..d01c1ac27 --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSUnknownRule.java @@ -0,0 +1,22 @@ +/* + * 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. + */ + +package org.w3c.dom.css; + +/** + * The CSSUnknownRule interface represents an at-rule not + * supported by this user agent. + *

See also the Document Object Model (DOM) Level 2 Style Specification. + * @since DOM Level 2 + */ +public interface CSSUnknownRule extends CSSRule { +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSValue.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSValue.java new file mode 100644 index 000000000..3a43a17f1 --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSValue.java @@ -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. + */ + +package org.w3c.dom.css; + +import org.w3c.dom.DOMException; + +/** + * The CSSValue interface represents a simple or a complex + * value. A CSSValue object only occurs in a context of a CSS + * property. + *

See also the Document Object Model (DOM) Level 2 Style Specification. + * @since DOM Level 2 + */ +public interface CSSValue { + // UnitTypes + /** + * The value is inherited and the cssText contains "inherit". + */ + public static final short CSS_INHERIT = 0; + /** + * The value is a primitive value and an instance of the + * CSSPrimitiveValue interface can be obtained by using + * binding-specific casting methods on this instance of the + * CSSValue interface. + */ + public static final short CSS_PRIMITIVE_VALUE = 1; + /** + * The value is a CSSValue list and an instance of the + * CSSValueList interface can be obtained by using + * binding-specific casting methods on this instance of the + * CSSValue interface. + */ + public static final short CSS_VALUE_LIST = 2; + /** + * The value is a custom value. + */ + public static final short CSS_CUSTOM = 3; + + /** + * A string representation of the current value. + */ + public String getCssText(); + /** + * A string representation of the current value. + * @exception DOMException + * SYNTAX_ERR: Raised if the specified CSS string value has a syntax + * error (according to the attached property) or is unparsable. + *
INVALID_MODIFICATION_ERR: Raised if the specified CSS string + * value represents a different type of values than the values allowed + * by the CSS property. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this value is readonly. + */ + public void setCssText(String cssText) + throws DOMException; + + /** + * A code defining the type of the value as defined above. + */ + public short getCssValueType(); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSValueList.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSValueList.java new file mode 100644 index 000000000..4e29bfa3f --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/css/CSSValueList.java @@ -0,0 +1,46 @@ +/* + * 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. + */ + +package org.w3c.dom.css; + +/** + * The CSSValueList interface provides the abstraction of an + * ordered collection of CSS values. + *

Some properties allow an empty list into their syntax. In that case, + * these properties take the none identifier. So, an empty list + * means that the property has the value none. + *

The items in the CSSValueList are accessible via an + * integral index, starting from 0. + *

See also the Document Object Model (DOM) Level 2 Style Specification. + * @since DOM Level 2 + */ +public interface CSSValueList extends CSSValue { + /** + * The number of CSSValues in the list. The range of valid + * values of the indices is 0 to length-1 + * inclusive. + */ + public int getLength(); + + /** + * Used to retrieve a CSSValue by ordinal index. The order in + * this collection represents the order of the values in the CSS style + * property. If index is greater than or equal to the number of values + * in the list, this returns null. + * @param index Index into the collection. + * @return The CSSValue at the index position + * in the CSSValueList, or null if that is + * not a valid index. + */ + public CSSValue item(int index); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/css/Counter.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/css/Counter.java new file mode 100644 index 000000000..7bfcc79f8 --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/css/Counter.java @@ -0,0 +1,38 @@ +/* + * 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. + */ + +package org.w3c.dom.css; + +/** + * The Counter interface is used to represent any counter or + * counters function value. This interface reflects the values in the + * underlying style property. + *

See also the Document Object Model (DOM) Level 2 Style Specification. + * @since DOM Level 2 + */ +public interface Counter { + /** + * This attribute is used for the identifier of the counter. + */ + public String getIdentifier(); + + /** + * This attribute is used for the style of the list. + */ + public String getListStyle(); + + /** + * This attribute is used for the separator of the nested counters. + */ + public String getSeparator(); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/css/DOMImplementationCSS.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/css/DOMImplementationCSS.java new file mode 100644 index 000000000..90c6c135d --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/css/DOMImplementationCSS.java @@ -0,0 +1,40 @@ +/* + * 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. + */ + +package org.w3c.dom.css; + +import org.w3c.dom.DOMImplementation; +import org.w3c.dom.DOMException; + +/** + * This interface allows the DOM user to create a CSSStyleSheet + * outside the context of a document. There is no way to associate the new + * CSSStyleSheet with a document in DOM Level 2. + *

See also the Document Object Model (DOM) Level 2 Style Specification. + * @since DOM Level 2 + */ +public interface DOMImplementationCSS extends DOMImplementation { + /** + * Creates a new CSSStyleSheet. + * @param title The advisory title. See also the section. + * @param media The comma-separated list of media associated with the + * new style sheet. See also the section. + * @return A new CSS style sheet. + * @exception DOMException + * SYNTAX_ERR: Raised if the specified media string value has a syntax + * error and is unparsable. + */ + public CSSStyleSheet createCSSStyleSheet(String title, + String media) + throws DOMException; + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/css/DocumentCSS.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/css/DocumentCSS.java new file mode 100644 index 000000000..68a910754 --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/css/DocumentCSS.java @@ -0,0 +1,50 @@ +/* + * 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. + */ + +package org.w3c.dom.css; + +import org.w3c.dom.Element; +import org.w3c.dom.stylesheets.DocumentStyle; + +/** + * This interface represents a document with a CSS view. + *

The getOverrideStyle method provides a mechanism through + * which a DOM author could effect immediate change to the style of an + * element without modifying the explicitly linked style sheets of a + * document or the inline style of elements in the style sheets. This style + * sheet comes after the author style sheet in the cascade algorithm and is + * called override style sheet. The override style sheet takes precedence + * over author style sheets. An "!important" declaration still takes + * precedence over a normal declaration. Override, author, and user style + * sheets all may contain "!important" declarations. User "!important" rules + * take precedence over both override and author "!important" rules, and + * override "!important" rules take precedence over author "!important" + * rules. + *

The expectation is that an instance of the DocumentCSS + * interface can be obtained by using binding-specific casting methods on an + * instance of the Document interface. + *

See also the Document Object Model (DOM) Level 2 Style Specification. + * @since DOM Level 2 + */ +public interface DocumentCSS extends DocumentStyle { + /** + * This method is used to retrieve the override style declaration for a + * specified element and a specified pseudo-element. + * @param elt The element whose style is to be modified. This parameter + * cannot be null. + * @param pseudoElt The pseudo-element or null if none. + * @return The override style declaration. + */ + public CSSStyleDeclaration getOverrideStyle(Element elt, + String pseudoElt); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/css/ElementCSSInlineStyle.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/css/ElementCSSInlineStyle.java new file mode 100644 index 000000000..e1f25060c --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/css/ElementCSSInlineStyle.java @@ -0,0 +1,32 @@ +/* + * 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. + */ + +package org.w3c.dom.css; + +/** + * Inline style information attached to elements is exposed through the + * style attribute. This represents the contents of the STYLE + * attribute for HTML elements (or elements in other schemas or DTDs which + * use the STYLE attribute in the same way). The expectation is that an + * instance of the ElementCSSInlineStyle interface can be obtained by using + * binding-specific casting methods on an instance of the Element interface + * when the element supports inline CSS style informations. + *

See also the Document Object Model (DOM) Level 2 Style Specification. + * @since DOM Level 2 + */ +public interface ElementCSSInlineStyle { + /** + * The style attribute. + */ + public CSSStyleDeclaration getStyle(); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/css/RGBColor.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/css/RGBColor.java new file mode 100644 index 000000000..215e291da --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/css/RGBColor.java @@ -0,0 +1,47 @@ +/* + * 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. + */ + +package org.w3c.dom.css; + +/** + * The RGBColor interface is used to represent any RGB color + * value. This interface reflects the values in the underlying style + * property. Hence, modifications made to the CSSPrimitiveValue + * objects modify the style property. + *

A specified RGB color is not clipped (even if the number is outside the + * range 0-255 or 0%-100%). A computed RGB color is clipped depending on the + * device. + *

Even if a style sheet can only contain an integer for a color value, + * the internal storage of this integer is a float, and this can be used as + * a float in the specified or the computed style. + *

A color percentage value can always be converted to a number and vice + * versa. + *

See also the Document Object Model (DOM) Level 2 Style Specification. + * @since DOM Level 2 + */ +public interface RGBColor { + /** + * This attribute is used for the red value of the RGB color. + */ + public CSSPrimitiveValue getRed(); + + /** + * This attribute is used for the green value of the RGB color. + */ + public CSSPrimitiveValue getGreen(); + + /** + * This attribute is used for the blue value of the RGB color. + */ + public CSSPrimitiveValue getBlue(); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/css/Rect.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/css/Rect.java new file mode 100644 index 000000000..ffbf96547 --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/css/Rect.java @@ -0,0 +1,44 @@ +/* + * 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. + */ + +package org.w3c.dom.css; + +/** + * The Rect interface is used to represent any rect value. This + * interface reflects the values in the underlying style property. Hence, + * modifications made to the CSSPrimitiveValue objects modify + * the style property. + *

See also the Document Object Model (DOM) Level 2 Style Specification. + * @since DOM Level 2 + */ +public interface Rect { + /** + * This attribute is used for the top of the rect. + */ + public CSSPrimitiveValue getTop(); + + /** + * This attribute is used for the right of the rect. + */ + public CSSPrimitiveValue getRight(); + + /** + * This attribute is used for the bottom of the rect. + */ + public CSSPrimitiveValue getBottom(); + + /** + * This attribute is used for the left of the rect. + */ + public CSSPrimitiveValue getLeft(); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/css/ViewCSS.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/css/ViewCSS.java new file mode 100644 index 000000000..1db9ac44c --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/css/ViewCSS.java @@ -0,0 +1,43 @@ +/* + * 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. + */ + +package org.w3c.dom.css; + +import org.w3c.dom.Element; +import org.w3c.dom.views.AbstractView; + +/** + * This interface represents a CSS view. The getComputedStyle + * method provides a read only access to the computed values of an element. + *

The expectation is that an instance of the ViewCSS + * interface can be obtained by using binding-specific casting methods on an + * instance of the AbstractView interface. + *

Since a computed style is related to an Element node, if + * this element is removed from the document, the associated + * CSSStyleDeclaration and CSSValue related to + * this declaration are no longer valid. + *

See also the Document Object Model (DOM) Level 2 Style Specification. + * @since DOM Level 2 + */ +public interface ViewCSS extends AbstractView { + /** + * This method is used to get the computed style as it is defined in [CSS2]. + * @param elt The element whose style is to be computed. This parameter + * cannot be null. + * @param pseudoElt The pseudo-element or null if none. + * @return The computed style. The CSSStyleDeclaration is + * read-only and contains only absolute values. + */ + public CSSStyleDeclaration getComputedStyle(Element elt, + String pseudoElt); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/events/DocumentEvent.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/events/DocumentEvent.java new file mode 100644 index 000000000..55c838603 --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/events/DocumentEvent.java @@ -0,0 +1,56 @@ +/* + * 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. + */ + +package org.w3c.dom.events; + +import org.w3c.dom.DOMException; + +/** + * The DocumentEvent interface provides a mechanism by which the + * user can create an Event of a type supported by the implementation. It is + * expected that the DocumentEvent interface will be + * implemented on the same object which implements the Document + * interface in an implementation which supports the Event model. + *

See also the Document Object Model (DOM) Level 2 Events Specification. + * @since DOM Level 2 + */ +public interface DocumentEvent { + /** + * + * @param eventType The eventType parameter specifies the + * type of Event interface to be created. If the + * Event interface specified is supported by the + * implementation this method will return a new Event of + * the interface type requested. If the Event is to be + * dispatched via the dispatchEvent method the + * appropriate event init method must be called after creation in + * order to initialize the Event's values. As an example, + * a user wishing to synthesize some kind of UIEvent + * would call createEvent with the parameter "UIEvents". + * The initUIEvent method could then be called on the + * newly created UIEvent to set the specific type of + * UIEvent to be dispatched and set its context information.The + * createEvent method is used in creating + * Events when it is either inconvenient or unnecessary + * for the user to create an Event themselves. In cases + * where the implementation provided Event is + * insufficient, users may supply their own Event + * implementations for use with the dispatchEvent method. + * @return The newly created Event + * @exception DOMException + * NOT_SUPPORTED_ERR: Raised if the implementation does not support the + * type of Event interface requested + */ + public Event createEvent(String eventType) + throws DOMException; + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/events/Event.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/events/Event.java new file mode 100644 index 000000000..29a96c50a --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/events/Event.java @@ -0,0 +1,141 @@ +/* + * 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. + */ + +package org.w3c.dom.events; + +/** + * The Event interface is used to provide contextual information + * about an event to the handler processing the event. An object which + * implements the Event interface is generally passed as the + * first parameter to an event handler. More specific context information is + * passed to event handlers by deriving additional interfaces from + * Event which contain information directly relating to the + * type of event they accompany. These derived interfaces are also + * implemented by the object passed to the event listener. + *

See also the Document Object Model (DOM) Level 2 Events Specification. + * @since DOM Level 2 + */ +public interface Event { + // PhaseType + /** + * The current event phase is the capturing phase. + */ + public static final short CAPTURING_PHASE = 1; + /** + * The event is currently being evaluated at the target + * EventTarget. + */ + public static final short AT_TARGET = 2; + /** + * The current event phase is the bubbling phase. + */ + public static final short BUBBLING_PHASE = 3; + + /** + * The name of the event (case-insensitive). The name must be an XML name. + */ + public String getType(); + + /** + * Used to indicate the EventTarget to which the event was + * originally dispatched. + */ + public EventTarget getTarget(); + + /** + * Used to indicate the EventTarget whose + * EventListeners are currently being processed. This is + * particularly useful during capturing and bubbling. + */ + public EventTarget getCurrentTarget(); + + /** + * Used to indicate which phase of event flow is currently being + * evaluated. + */ + public short getEventPhase(); + + /** + * Used to indicate whether or not an event is a bubbling event. If the + * event can bubble the value is true, else the value is false. + */ + public boolean getBubbles(); + + /** + * Used to indicate whether or not an event can have its default action + * prevented. If the default action can be prevented the value is true, + * else the value is false. + */ + public boolean getCancelable(); + + /** + * Used to specify the time (in milliseconds relative to the epoch) at + * which the event was created. Due to the fact that some systems may + * not provide this information the value of timeStamp may + * be not available for all events. When not available, a value of 0 + * will be returned. Examples of epoch time are the time of the system + * start or 0:0:0 UTC 1st January 1970. + */ + public long getTimeStamp(); + + /** + * The stopPropagation method is used prevent further + * propagation of an event during event flow. If this method is called + * by any EventListener the event will cease propagating + * through the tree. The event will complete dispatch to all listeners + * on the current EventTarget before event flow stops. This + * method may be used during any stage of event flow. + */ + public void stopPropagation(); + + /** + * If an event is cancelable, the preventDefault method is + * used to signify that the event is to be canceled, meaning any default + * action normally taken by the implementation as a result of the event + * will not occur. If, during any stage of event flow, the + * preventDefault method is called the event is canceled. + * Any default action associated with the event will not occur. Calling + * this method for a non-cancelable event has no effect. Once + * preventDefault has been called it will remain in effect + * throughout the remainder of the event's propagation. This method may + * be used during any stage of event flow. + */ + public void preventDefault(); + + /** + * The initEvent method is used to initialize the value of an + * Event created through the DocumentEvent + * interface. This method may only be called before the + * Event has been dispatched via the + * dispatchEvent method, though it may be called multiple + * times during that phase if necessary. If called multiple times the + * final invocation takes precedence. If called from a subclass of + * Event interface only the values specified in the + * initEvent method are modified, all other attributes are + * left unchanged. + * @param eventTypeArg Specifies the event type. This type may be any + * event type currently defined in this specification or a new event + * type.. The string must be an XML name. Any new event type must not + * begin with any upper, lower, or mixed case version of the string + * "DOM". This prefix is reserved for future DOM event sets. It is + * also strongly recommended that third parties adding their own + * events use their own prefix to avoid confusion and lessen the + * probability of conflicts with other new events. + * @param canBubbleArg Specifies whether or not the event can bubble. + * @param cancelableArg Specifies whether or not the event's default + * action can be prevented. + */ + public void initEvent(String eventTypeArg, + boolean canBubbleArg, + boolean cancelableArg); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/events/EventException.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/events/EventException.java new file mode 100644 index 000000000..9a62f1fc5 --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/events/EventException.java @@ -0,0 +1,36 @@ +/* + * 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. + */ + +package org.w3c.dom.events; + +/** + * Event operations may throw an EventException as specified in + * their method descriptions. + *

See also the Document Object Model (DOM) Level 2 Events Specification. + * @since DOM Level 2 + */ +public class EventException extends RuntimeException { + public EventException(short code, String message) { + super(message); + this.code = code; + } + public short code; + // EventExceptionCode + /** + * If the Event's type was not specified by initializing the + * event before the method was called. Specification of the Event's type + * as null or an empty string will also trigger this + * exception. + */ + public static final short UNSPECIFIED_EVENT_TYPE_ERR = 0; + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/events/EventListener.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/events/EventListener.java new file mode 100644 index 000000000..1be3523fb --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/events/EventListener.java @@ -0,0 +1,41 @@ +/* + * 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. + */ + +package org.w3c.dom.events; + +/** + * The EventListener interface is the primary method for + * handling events. Users implement the EventListener interface + * and register their listener on an EventTarget using the + * AddEventListener method. The users should also remove their + * EventListener from its EventTarget after they + * have completed using the listener. + *

When a Node is copied using the cloneNode + * method the EventListeners attached to the source + * Node are not attached to the copied Node. If + * the user wishes the same EventListeners to be added to the + * newly created copy the user must add them manually. + *

See also the Document Object Model (DOM) Level 2 Events Specification. + * @since DOM Level 2 + */ +public interface EventListener { + /** + * This method is called whenever an event occurs of the type for which + * the EventListener interface was registered. + * @param evt The Event contains contextual information + * about the event. It also contains the stopPropagation + * and preventDefault methods which are used in + * determining the event's flow and default action. + */ + public void handleEvent(Event evt); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/events/EventTarget.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/events/EventTarget.java new file mode 100644 index 000000000..3b66a8deb --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/events/EventTarget.java @@ -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. + */ + +package org.w3c.dom.events; + +/** + * The EventTarget interface is implemented by all + * Nodes in an implementation which supports the DOM Event + * Model. Therefore, this interface can be obtained by using + * binding-specific casting methods on an instance of the Node + * interface. The interface allows registration and removal of + * EventListeners on an EventTarget and dispatch + * of events to that EventTarget. + *

See also the Document Object Model (DOM) Level 2 Events Specification. + * @since DOM Level 2 + */ +public interface EventTarget { + /** + * This method allows the registration of event listeners on the event + * target. If an EventListener is added to an + * EventTarget while it is processing an event, it will not + * be triggered by the current actions but may be triggered during a + * later stage of event flow, such as the bubbling phase. + *
If multiple identical EventListeners are registered + * on the same EventTarget with the same parameters the + * duplicate instances are discarded. They do not cause the + * EventListener to be called twice and since they are + * discarded they do not need to be removed with the + * removeEventListener method. + * @param type The event type for which the user is registering + * @param listener The listener parameter takes an interface + * implemented by the user which contains the methods to be called + * when the event occurs. + * @param useCapture If true, useCapture indicates that the + * user wishes to initiate capture. After initiating capture, all + * events of the specified type will be dispatched to the registered + * EventListener before being dispatched to any + * EventTargets beneath them in the tree. Events which + * are bubbling upward through the tree will not trigger an + * EventListener designated to use capture. + */ + public void addEventListener(String type, + EventListener listener, + boolean useCapture); + + /** + * This method allows the removal of event listeners from the event + * target. If an EventListener is removed from an + * EventTarget while it is processing an event, it will not + * be triggered by the current actions. EventListeners can + * never be invoked after being removed. + *
Calling removeEventListener with arguments which do + * not identify any currently registered EventListener on + * the EventTarget has no effect. + * @param type Specifies the event type of the EventListener + * being removed. + * @param listener The EventListener parameter indicates the + * EventListener to be removed. + * @param useCapture Specifies whether the EventListener + * being removed was registered as a capturing listener or not. If a + * listener was registered twice, one with capture and one without, + * each must be removed separately. Removal of a capturing listener + * does not affect a non-capturing version of the same listener, and + * vice versa. + */ + public void removeEventListener(String type, + EventListener listener, + boolean useCapture); + + /** + * This method allows the dispatch of events into the implementations + * event model. Events dispatched in this manner will have the same + * capturing and bubbling behavior as events dispatched directly by the + * implementation. The target of the event is the + * EventTarget on which dispatchEvent is + * called. + * @param evt Specifies the event type, behavior, and contextual + * information to be used in processing the event. + * @return The return value of dispatchEvent indicates + * whether any of the listeners which handled the event called + * preventDefault. If preventDefault was + * called the value is false, else the value is true. + * @exception EventException + * UNSPECIFIED_EVENT_TYPE_ERR: Raised if the Event's type + * was not specified by initializing the event before + * dispatchEvent was called. Specification of the + * Event's type as null or an empty string + * will also trigger this exception. + */ + public boolean dispatchEvent(Event evt) + throws EventException; + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/events/MouseEvent.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/events/MouseEvent.java new file mode 100644 index 000000000..67e20572f --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/events/MouseEvent.java @@ -0,0 +1,156 @@ +/* + * 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. + */ + +package org.w3c.dom.events; + +import org.w3c.dom.views.AbstractView; + +/** + * The MouseEvent interface provides specific contextual + * information associated with Mouse events. + *

The detail attribute inherited from UIEvent + * indicates the number of times a mouse button has been pressed and + * released over the same screen location during a user action. The + * attribute value is 1 when the user begins this action and increments by 1 + * for each full sequence of pressing and releasing. If the user moves the + * mouse between the mousedown and mouseup the value will be set to 0, + * indicating that no click is occurring. + *

In the case of nested elements mouse events are always targeted at the + * most deeply nested element. Ancestors of the targeted element may use + * bubbling to obtain notification of mouse events which occur within its + * descendent elements. + *

See also the Document Object Model (DOM) Level 2 Events Specification. + * @since DOM Level 2 + */ +public interface MouseEvent extends UIEvent { + /** + * The horizontal coordinate at which the event occurred relative to the + * origin of the screen coordinate system. + */ + public int getScreenX(); + + /** + * The vertical coordinate at which the event occurred relative to the + * origin of the screen coordinate system. + */ + public int getScreenY(); + + /** + * The horizontal coordinate at which the event occurred relative to the + * DOM implementation's client area. + */ + public int getClientX(); + + /** + * The vertical coordinate at which the event occurred relative to the DOM + * implementation's client area. + */ + public int getClientY(); + + /** + * Used to indicate whether the 'ctrl' key was depressed during the firing + * of the event. + */ + public boolean getCtrlKey(); + + /** + * Used to indicate whether the 'shift' key was depressed during the + * firing of the event. + */ + public boolean getShiftKey(); + + /** + * Used to indicate whether the 'alt' key was depressed during the firing + * of the event. On some platforms this key may map to an alternative + * key name. + */ + public boolean getAltKey(); + + /** + * Used to indicate whether the 'meta' key was depressed during the firing + * of the event. On some platforms this key may map to an alternative + * key name. + */ + public boolean getMetaKey(); + + /** + * During mouse events caused by the depression or release of a mouse + * button, button is used to indicate which mouse button + * changed state. The values for button range from zero to + * indicate the left button of the mouse, one to indicate the middle + * button if present, and two to indicate the right button. For mice + * configured for left handed use in which the button actions are + * reversed the values are instead read from right to left. + */ + public short getButton(); + + /** + * Used to identify a secondary EventTarget related to a UI + * event. Currently this attribute is used with the mouseover event to + * indicate the EventTarget which the pointing device + * exited and with the mouseout event to indicate the + * EventTarget which the pointing device entered. + */ + public EventTarget getRelatedTarget(); + + /** + * The initMouseEvent method is used to initialize the value + * of a MouseEvent created through the + * DocumentEvent interface. This method may only be called + * before the MouseEvent has been dispatched via the + * dispatchEvent method, though it may be called multiple + * times during that phase if necessary. If called multiple times, the + * final invocation takes precedence. + * @param typeArg Specifies the event type. + * @param canBubbleArg Specifies whether or not the event can bubble. + * @param cancelableArg Specifies whether or not the event's default + * action can be prevented. + * @param viewArg Specifies the Event's + * AbstractView. + * @param detailArg Specifies the Event's mouse click count. + * @param screenXArg Specifies the Event's screen x + * coordinate + * @param screenYArg Specifies the Event's screen y + * coordinate + * @param clientXArg Specifies the Event's client x + * coordinate + * @param clientYArg Specifies the Event's client y + * coordinate + * @param ctrlKeyArg Specifies whether or not control key was depressed + * during the Event. + * @param altKeyArg Specifies whether or not alt key was depressed during + * the Event. + * @param shiftKeyArg Specifies whether or not shift key was depressed + * during the Event. + * @param metaKeyArg Specifies whether or not meta key was depressed + * during the Event. + * @param buttonArg Specifies the Event's mouse button. + * @param relatedTargetArg Specifies the Event's related + * EventTarget. + */ + public void initMouseEvent(String typeArg, + boolean canBubbleArg, + boolean cancelableArg, + AbstractView viewArg, + int detailArg, + int screenXArg, + int screenYArg, + int clientXArg, + int clientYArg, + boolean ctrlKeyArg, + boolean altKeyArg, + boolean shiftKeyArg, + boolean metaKeyArg, + short buttonArg, + EventTarget relatedTargetArg); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/events/MutationEvent.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/events/MutationEvent.java new file mode 100644 index 000000000..2cbedb768 --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/events/MutationEvent.java @@ -0,0 +1,108 @@ +/* + * 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. + */ + +package org.w3c.dom.events; + +import org.w3c.dom.Node; + +/** + * The MutationEvent interface provides specific contextual + * information associated with Mutation events. + *

See also the Document Object Model (DOM) Level 2 Events Specification. + * @since DOM Level 2 + */ +public interface MutationEvent extends Event { + // attrChangeType + /** + * The Attr was modified in place. + */ + public static final short MODIFICATION = 1; + /** + * The Attr was just added. + */ + public static final short ADDITION = 2; + /** + * The Attr was just removed. + */ + public static final short REMOVAL = 3; + + /** + * relatedNode is used to identify a secondary node related + * to a mutation event. For example, if a mutation event is dispatched + * to a node indicating that its parent has changed, the + * relatedNode is the changed parent. If an event is + * instead dispatched to a subtree indicating a node was changed within + * it, the relatedNode is the changed node. In the case of + * the DOMAttrModified event it indicates the Attr node + * which was modified, added, or removed. + */ + public Node getRelatedNode(); + + /** + * prevValue indicates the previous value of the + * Attr node in DOMAttrModified events, and of the + * CharacterData node in DOMCharacterDataModified events. + */ + public String getPrevValue(); + + /** + * newValue indicates the new value of the Attr + * node in DOMAttrModified events, and of the CharacterData + * node in DOMCharacterDataModified events. + */ + public String getNewValue(); + + /** + * attrName indicates the name of the changed + * Attr node in a DOMAttrModified event. + */ + public String getAttrName(); + + /** + * attrChange indicates the type of change which triggered + * the DOMAttrModified event. The values can be MODIFICATION + * , ADDITION, or REMOVAL. + */ + public short getAttrChange(); + + /** + * The initMutationEvent method is used to initialize the + * value of a MutationEvent created through the + * DocumentEvent interface. This method may only be called + * before the MutationEvent has been dispatched via the + * dispatchEvent method, though it may be called multiple + * times during that phase if necessary. If called multiple times, the + * final invocation takes precedence. + * @param typeArg Specifies the event type. + * @param canBubbleArg Specifies whether or not the event can bubble. + * @param cancelableArg Specifies whether or not the event's default + * action can be prevented. + * @param relatedNodeArg Specifies the Event's related Node. + * @param prevValueArg Specifies the Event's + * prevValue attribute. This value may be null. + * @param newValueArg Specifies the Event's + * newValue attribute. This value may be null. + * @param attrNameArg Specifies the Event's + * attrName attribute. This value may be null. + * @param attrChangeArg Specifies the Event's + * attrChange attribute + */ + public void initMutationEvent(String typeArg, + boolean canBubbleArg, + boolean cancelableArg, + Node relatedNodeArg, + String prevValueArg, + String newValueArg, + String attrNameArg, + short attrChangeArg); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/events/UIEvent.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/events/UIEvent.java new file mode 100644 index 000000000..e3617c026 --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/events/UIEvent.java @@ -0,0 +1,58 @@ +/* + * 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. + */ + +package org.w3c.dom.events; + +import org.w3c.dom.views.AbstractView; + +/** + * The UIEvent interface provides specific contextual information + * associated with User Interface events. + *

See also the Document Object Model (DOM) Level 2 Events Specification. + * @since DOM Level 2 + */ +public interface UIEvent extends Event { + /** + * The view attribute identifies the AbstractView + * from which the event was generated. + */ + public AbstractView getView(); + + /** + * Specifies some detail information about the Event, + * depending on the type of event. + */ + public int getDetail(); + + /** + * The initUIEvent method is used to initialize the value of + * a UIEvent created through the DocumentEvent + * interface. This method may only be called before the + * UIEvent has been dispatched via the + * dispatchEvent method, though it may be called multiple + * times during that phase if necessary. If called multiple times, the + * final invocation takes precedence. + * @param typeArg Specifies the event type. + * @param canBubbleArg Specifies whether or not the event can bubble. + * @param cancelableArg Specifies whether or not the event's default + * action can be prevented. + * @param viewArg Specifies the Event's + * AbstractView. + * @param detailArg Specifies the Event's detail. + */ + public void initUIEvent(String typeArg, + boolean canBubbleArg, + boolean cancelableArg, + AbstractView viewArg, + int detailArg); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLAnchorElement.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLAnchorElement.java new file mode 100644 index 000000000..a3ec0b504 --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLAnchorElement.java @@ -0,0 +1,156 @@ +/* + * Copyright (c) 2003 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. + */ + +package org.w3c.dom.html2; + +/** + * The anchor element. See the A element definition in HTML 4.01. + *

See also the Document Object Model (DOM) Level 2 HTML Specification. + */ +public interface HTMLAnchorElement extends HTMLElement { + /** + * A single character access key to give access to the form control. See + * the accesskey attribute definition in HTML 4.01. + */ + public String getAccessKey(); + /** + * A single character access key to give access to the form control. See + * the accesskey attribute definition in HTML 4.01. + */ + public void setAccessKey(String accessKey); + + /** + * The character encoding of the linked resource. See the charset + * attribute definition in HTML 4.01. + */ + public String getCharset(); + /** + * The character encoding of the linked resource. See the charset + * attribute definition in HTML 4.01. + */ + public void setCharset(String charset); + + /** + * Comma-separated list of lengths, defining an active region geometry. + * See also shape for the shape of the region. See the + * coords attribute definition in HTML 4.01. + */ + public String getCoords(); + /** + * Comma-separated list of lengths, defining an active region geometry. + * See also shape for the shape of the region. See the + * coords attribute definition in HTML 4.01. + */ + public void setCoords(String coords); + + /** + * The absolute URI [IETF RFC 2396] of the linked resource. See the href attribute + * definition in HTML 4.01. + */ + public String getHref(); + /** + * The absolute URI [IETF RFC 2396] of the linked resource. See the href attribute + * definition in HTML 4.01. + */ + public void setHref(String href); + + /** + * Language code of the linked resource. See the hreflang attribute + * definition in HTML 4.01. + */ + public String getHreflang(); + /** + * Language code of the linked resource. See the hreflang attribute + * definition in HTML 4.01. + */ + public void setHreflang(String hreflang); + + /** + * Anchor name. See the name attribute definition in HTML 4.01. + */ + public String getName(); + /** + * Anchor name. See the name attribute definition in HTML 4.01. + */ + public void setName(String name); + + /** + * Forward link type. See the rel attribute definition in HTML 4.01. + */ + public String getRel(); + /** + * Forward link type. See the rel attribute definition in HTML 4.01. + */ + public void setRel(String rel); + + /** + * Reverse link type. See the rev attribute definition in HTML 4.01. + */ + public String getRev(); + /** + * Reverse link type. See the rev attribute definition in HTML 4.01. + */ + public void setRev(String rev); + + /** + * The shape of the active area. The coordinates are given by + * coords. See the shape attribute definition in HTML 4.01. + */ + public String getShape(); + /** + * The shape of the active area. The coordinates are given by + * coords. See the shape attribute definition in HTML 4.01. + */ + public void setShape(String shape); + + /** + * Index that represents the element's position in the tabbing order. See + * the tabindex attribute definition in HTML 4.01. + */ + public int getTabIndex(); + /** + * Index that represents the element's position in the tabbing order. See + * the tabindex attribute definition in HTML 4.01. + */ + public void setTabIndex(int tabIndex); + + /** + * Frame to render the resource in. See the target attribute definition in + * HTML 4.01. + */ + public String getTarget(); + /** + * Frame to render the resource in. See the target attribute definition in + * HTML 4.01. + */ + public void setTarget(String target); + + /** + * Advisory content type. See the type attribute definition in HTML 4.01. + */ + public String getType(); + /** + * Advisory content type. See the type attribute definition in HTML 4.01. + */ + public void setType(String type); + + /** + * Removes keyboard focus from this element. + */ + public void blur(); + + /** + * Gives keyboard focus to this element. + */ + public void focus(); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLAppletElement.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLAppletElement.java new file mode 100644 index 000000000..2e0fc153c --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLAppletElement.java @@ -0,0 +1,156 @@ +/* + * Copyright (c) 2003 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. + */ + +package org.w3c.dom.html2; + +/** + * An embedded Java applet. See the APPLET element definition in HTML 4.01. + * This element is deprecated in HTML 4.01. + *

See also the Document Object Model (DOM) Level 2 HTML Specification. + */ +public interface HTMLAppletElement extends HTMLElement { + /** + * Aligns this object (vertically or horizontally) with respect to its + * surrounding text. See the align attribute definition in HTML 4.01. + * This attribute is deprecated in HTML 4.01. + */ + public String getAlign(); + /** + * Aligns this object (vertically or horizontally) with respect to its + * surrounding text. See the align attribute definition in HTML 4.01. + * This attribute is deprecated in HTML 4.01. + */ + public void setAlign(String align); + + /** + * Alternate text for user agents not rendering the normal content of this + * element. See the alt attribute definition in HTML 4.01. This + * attribute is deprecated in HTML 4.01. + */ + public String getAlt(); + /** + * Alternate text for user agents not rendering the normal content of this + * element. See the alt attribute definition in HTML 4.01. This + * attribute is deprecated in HTML 4.01. + */ + public void setAlt(String alt); + + /** + * Comma-separated archive list. See the archive attribute definition in + * HTML 4.01. This attribute is deprecated in HTML 4.01. + */ + public String getArchive(); + /** + * Comma-separated archive list. See the archive attribute definition in + * HTML 4.01. This attribute is deprecated in HTML 4.01. + */ + public void setArchive(String archive); + + /** + * Applet class file. See the code attribute definition in HTML 4.01. This + * attribute is deprecated in HTML 4.01. + */ + public String getCode(); + /** + * Applet class file. See the code attribute definition in HTML 4.01. This + * attribute is deprecated in HTML 4.01. + */ + public void setCode(String code); + + /** + * Optional base URI [IETF RFC 2396] for applet. See the codebase attribute definition in + * HTML 4.01. This attribute is deprecated in HTML 4.01. + */ + public String getCodeBase(); + /** + * Optional base URI [IETF RFC 2396] for applet. See the codebase attribute definition in + * HTML 4.01. This attribute is deprecated in HTML 4.01. + */ + public void setCodeBase(String codeBase); + + /** + * Override height. See the height attribute definition in HTML 4.01. This + * attribute is deprecated in HTML 4.01. + */ + public String getHeight(); + /** + * Override height. See the height attribute definition in HTML 4.01. This + * attribute is deprecated in HTML 4.01. + */ + public void setHeight(String height); + + /** + * Horizontal space, in pixels, to the left and right of this image, + * applet, or object. See the hspace attribute definition in HTML 4.01. + * This attribute is deprecated in HTML 4.01. + * @version DOM Level 2 + */ + public int getHspace(); + /** + * Horizontal space, in pixels, to the left and right of this image, + * applet, or object. See the hspace attribute definition in HTML 4.01. + * This attribute is deprecated in HTML 4.01. + * @version DOM Level 2 + */ + public void setHspace(int hspace); + + /** + * The name of the applet. See the name attribute definition in HTML 4.01. + * This attribute is deprecated in HTML 4.01. + */ + public String getName(); + /** + * The name of the applet. See the name attribute definition in HTML 4.01. + * This attribute is deprecated in HTML 4.01. + */ + public void setName(String name); + + /** + * The value of the "object" attribute. See the object attribute definition + * in HTML 4.01. This attribute is deprecated in HTML 4.01. + * @version DOM Level 2 + */ + public String getObject(); + /** + * The value of the "object" attribute. See the object attribute definition + * in HTML 4.01. This attribute is deprecated in HTML 4.01. + * @version DOM Level 2 + */ + public void setObject(String object); + + /** + * Vertical space, in pixels, above and below this image, applet, or + * object. See the vspace attribute definition in HTML 4.01. This + * attribute is deprecated in HTML 4.01. + * @version DOM Level 2 + */ + public int getVspace(); + /** + * Vertical space, in pixels, above and below this image, applet, or + * object. See the vspace attribute definition in HTML 4.01. This + * attribute is deprecated in HTML 4.01. + * @version DOM Level 2 + */ + public void setVspace(int vspace); + + /** + * Override width. See the width attribute definition in HTML 4.01. This + * attribute is deprecated in HTML 4.01. + */ + public String getWidth(); + /** + * Override width. See the width attribute definition in HTML 4.01. This + * attribute is deprecated in HTML 4.01. + */ + public void setWidth(String width); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLAreaElement.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLAreaElement.java new file mode 100644 index 000000000..403b94d50 --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLAreaElement.java @@ -0,0 +1,111 @@ +/* + * Copyright (c) 2003 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. + */ + +package org.w3c.dom.html2; + +/** + * Client-side image map area definition. See the AREA element definition in + * HTML 4.01. + *

See also the Document Object Model (DOM) Level 2 HTML Specification. + */ +public interface HTMLAreaElement extends HTMLElement { + /** + * A single character access key to give access to the form control. See + * the accesskey attribute definition in HTML 4.01. + */ + public String getAccessKey(); + /** + * A single character access key to give access to the form control. See + * the accesskey attribute definition in HTML 4.01. + */ + public void setAccessKey(String accessKey); + + /** + * Alternate text for user agents not rendering the normal content of this + * element. See the alt attribute definition in HTML 4.01. + */ + public String getAlt(); + /** + * Alternate text for user agents not rendering the normal content of this + * element. See the alt attribute definition in HTML 4.01. + */ + public void setAlt(String alt); + + /** + * Comma-separated list of lengths, defining an active region geometry. + * See also shape for the shape of the region. See the + * coords attribute definition in HTML 4.01. + */ + public String getCoords(); + /** + * Comma-separated list of lengths, defining an active region geometry. + * See also shape for the shape of the region. See the + * coords attribute definition in HTML 4.01. + */ + public void setCoords(String coords); + + /** + * The URI [IETF RFC 2396] of the linked resource. See the href attribute definition in + * HTML 4.01. + */ + public String getHref(); + /** + * The URI [IETF RFC 2396] of the linked resource. See the href attribute definition in + * HTML 4.01. + */ + public void setHref(String href); + + /** + * Specifies that this area is inactive, i.e., has no associated action. + * See the nohref attribute definition in HTML 4.01. + */ + public boolean getNoHref(); + /** + * Specifies that this area is inactive, i.e., has no associated action. + * See the nohref attribute definition in HTML 4.01. + */ + public void setNoHref(boolean noHref); + + /** + * The shape of the active area. The coordinates are given by + * coords. See the shape attribute definition in HTML 4.01. + */ + public String getShape(); + /** + * The shape of the active area. The coordinates are given by + * coords. See the shape attribute definition in HTML 4.01. + */ + public void setShape(String shape); + + /** + * Index that represents the element's position in the tabbing order. See + * the tabindex attribute definition in HTML 4.01. + */ + public int getTabIndex(); + /** + * Index that represents the element's position in the tabbing order. See + * the tabindex attribute definition in HTML 4.01. + */ + public void setTabIndex(int tabIndex); + + /** + * Frame to render the resource in. See the target attribute definition in + * HTML 4.01. + */ + public String getTarget(); + /** + * Frame to render the resource in. See the target attribute definition in + * HTML 4.01. + */ + public void setTarget(String target); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLBRElement.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLBRElement.java new file mode 100644 index 000000000..74dbe1f3f --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLBRElement.java @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2003 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. + */ + +package org.w3c.dom.html2; + +/** + * Force a line break. See the BR element definition in HTML 4.01. + *

See also the Document Object Model (DOM) Level 2 HTML Specification. + */ +public interface HTMLBRElement extends HTMLElement { + /** + * Control flow of text around floats. See the clear attribute definition + * in HTML 4.01. This attribute is deprecated in HTML 4.01. + */ + public String getClear(); + /** + * Control flow of text around floats. See the clear attribute definition + * in HTML 4.01. This attribute is deprecated in HTML 4.01. + */ + public void setClear(String clear); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLBaseElement.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLBaseElement.java new file mode 100644 index 000000000..9dde9b3da --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLBaseElement.java @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2003 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. + */ + +package org.w3c.dom.html2; + +/** + * Document base URI [IETF RFC 2396]. See the BASE element definition in HTML 4.01. + *

See also the Document Object Model (DOM) Level 2 HTML Specification. + */ +public interface HTMLBaseElement extends HTMLElement { + /** + * The base URI [IETF RFC 2396]. See the href attribute definition in HTML 4.01. + */ + public String getHref(); + /** + * The base URI [IETF RFC 2396]. See the href attribute definition in HTML 4.01. + */ + public void setHref(String href); + + /** + * The default target frame. See the target attribute definition in HTML + * 4.01. + */ + public String getTarget(); + /** + * The default target frame. See the target attribute definition in HTML + * 4.01. + */ + public void setTarget(String target); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLBaseFontElement.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLBaseFontElement.java new file mode 100644 index 000000000..1ae8834d7 --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLBaseFontElement.java @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2003 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. + */ + +package org.w3c.dom.html2; + +/** + * Base font. See the BASEFONT element definition in HTML 4.01. This element + * is deprecated in HTML 4.01. + *

See also the Document Object Model (DOM) Level 2 HTML Specification. + */ +public interface HTMLBaseFontElement extends HTMLElement { + /** + * Font color. See the color attribute definition in HTML 4.01. This + * attribute is deprecated in HTML 4.01. + */ + public String getColor(); + /** + * Font color. See the color attribute definition in HTML 4.01. This + * attribute is deprecated in HTML 4.01. + */ + public void setColor(String color); + + /** + * Font face identifier. See the face attribute definition in HTML 4.01. + * This attribute is deprecated in HTML 4.01. + */ + public String getFace(); + /** + * Font face identifier. See the face attribute definition in HTML 4.01. + * This attribute is deprecated in HTML 4.01. + */ + public void setFace(String face); + + /** + * Computed font size. See the size attribute definition in HTML 4.01. + * This attribute is deprecated in HTML 4.01. + * @version DOM Level 2 + */ + public int getSize(); + /** + * Computed font size. See the size attribute definition in HTML 4.01. + * This attribute is deprecated in HTML 4.01. + * @version DOM Level 2 + */ + public void setSize(int size); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLBodyElement.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLBodyElement.java new file mode 100644 index 000000000..7e1aabe1f --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLBodyElement.java @@ -0,0 +1,94 @@ +/* + * Copyright (c) 2003 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. + */ + +package org.w3c.dom.html2; + +/** + * The HTML document body. This element is always present in the DOM API, even + * if the tags are not present in the source document. See the BODY element + * definition in HTML 4.01. + *

See also the Document Object Model (DOM) Level 2 HTML Specification. + */ +public interface HTMLBodyElement extends HTMLElement { + /** + * Color of active links (after mouse-button down, but before mouse-button + * up). See the alink attribute definition in HTML 4.01. This attribute + * is deprecated in HTML 4.01. + */ + public String getALink(); + /** + * Color of active links (after mouse-button down, but before mouse-button + * up). See the alink attribute definition in HTML 4.01. This attribute + * is deprecated in HTML 4.01. + */ + public void setALink(String aLink); + + /** + * URI [IETF RFC 2396] of the background texture tile image. See the background attribute + * definition in HTML 4.01. This attribute is deprecated in HTML 4.01. + */ + public String getBackground(); + /** + * URI [IETF RFC 2396] of the background texture tile image. See the background attribute + * definition in HTML 4.01. This attribute is deprecated in HTML 4.01. + */ + public void setBackground(String background); + + /** + * Document background color. See the bgcolor attribute definition in HTML + * 4.01. This attribute is deprecated in HTML 4.01. + */ + public String getBgColor(); + /** + * Document background color. See the bgcolor attribute definition in HTML + * 4.01. This attribute is deprecated in HTML 4.01. + */ + public void setBgColor(String bgColor); + + /** + * Color of links that are not active and unvisited. See the link + * attribute definition in HTML 4.01. This attribute is deprecated in + * HTML 4.01. + */ + public String getLink(); + /** + * Color of links that are not active and unvisited. See the link + * attribute definition in HTML 4.01. This attribute is deprecated in + * HTML 4.01. + */ + public void setLink(String link); + + /** + * Document text color. See the text attribute definition in HTML 4.01. + * This attribute is deprecated in HTML 4.01. + */ + public String getText(); + /** + * Document text color. See the text attribute definition in HTML 4.01. + * This attribute is deprecated in HTML 4.01. + */ + public void setText(String text); + + /** + * Color of links that have been visited by the user. See the vlink + * attribute definition in HTML 4.01. This attribute is deprecated in + * HTML 4.01. + */ + public String getVLink(); + /** + * Color of links that have been visited by the user. See the vlink + * attribute definition in HTML 4.01. This attribute is deprecated in + * HTML 4.01. + */ + public void setVLink(String vLink); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLButtonElement.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLButtonElement.java new file mode 100644 index 000000000..8e31b103c --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLButtonElement.java @@ -0,0 +1,88 @@ +/* + * Copyright (c) 2003 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. + */ + +package org.w3c.dom.html2; + +/** + * Push button. See the BUTTON element definition in HTML 4.01. + *

See also the Document Object Model (DOM) Level 2 HTML Specification. + */ +public interface HTMLButtonElement extends HTMLElement { + /** + * Returns the FORM element containing this control. Returns + * null if this control is not within the context of a + * form. + */ + public HTMLFormElement getForm(); + + /** + * A single character access key to give access to the form control. See + * the accesskey attribute definition in HTML 4.01. + */ + public String getAccessKey(); + /** + * A single character access key to give access to the form control. See + * the accesskey attribute definition in HTML 4.01. + */ + public void setAccessKey(String accessKey); + + /** + * The control is unavailable in this context. See the disabled attribute + * definition in HTML 4.01. + */ + public boolean getDisabled(); + /** + * The control is unavailable in this context. See the disabled attribute + * definition in HTML 4.01. + */ + public void setDisabled(boolean disabled); + + /** + * Form control or object name when submitted with a form. See the name + * attribute definition in HTML 4.01. + */ + public String getName(); + /** + * Form control or object name when submitted with a form. See the name + * attribute definition in HTML 4.01. + */ + public void setName(String name); + + /** + * Index that represents the element's position in the tabbing order. See + * the tabindex attribute definition in HTML 4.01. + */ + public int getTabIndex(); + /** + * Index that represents the element's position in the tabbing order. See + * the tabindex attribute definition in HTML 4.01. + */ + public void setTabIndex(int tabIndex); + + /** + * The type of button (all lower case). See the type attribute definition + * in HTML 4.01. + */ + public String getType(); + + /** + * The current form control value. See the value attribute definition in + * HTML 4.01. + */ + public String getValue(); + /** + * The current form control value. See the value attribute definition in + * HTML 4.01. + */ + public void setValue(String value); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLCollection.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLCollection.java new file mode 100644 index 000000000..d6ec5473f --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLCollection.java @@ -0,0 +1,59 @@ +/* + * Copyright (c) 2003 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. + */ + +package org.w3c.dom.html2; + +import org.w3c.dom.Node; + +/** + * An HTMLCollection is a list of nodes. An individual node may + * be accessed by either ordinal index or the node's name or + * id attributes. Collections in the HTML DOM are assumed to be + * live meaning that they are automatically updated when the underlying + * document is changed. + *

See also the Document Object Model (DOM) Level 2 HTML Specification. + */ +public interface HTMLCollection { + /** + * This attribute specifies the length or size of the list. + */ + public int getLength(); + + /** + * This method retrieves a node specified by ordinal index. Nodes are + * numbered in tree order (depth-first traversal order). + * @param index The index of the node to be fetched. The index origin is + * 0. + * @return The Node at the corresponding position upon + * success. A value of null is returned if the index is + * out of range. + */ + public Node item(int index); + + /** + * This method retrieves a Node using a name. With [HTML 4.01] + * documents, it first searches for a Node with a matching + * id attribute. If it doesn't find one, it then searches + * for a Node with a matching name attribute, + * but only on those elements that are allowed a name attribute. With [XHTML 1.0] + * documents, this method only searches for Nodes with a + * matching id attribute. This method is case insensitive + * in HTML documents and case sensitive in XHTML documents. + * @param name The name of the Node to be fetched. + * @return The Node with a name or + * id attribute whose value corresponds to the specified + * string. Upon failure (e.g., no node with this name exists), returns + * null. + */ + public Node namedItem(String name); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLDListElement.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLDListElement.java new file mode 100644 index 000000000..e6f17b6ad --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLDListElement.java @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2003 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. + */ + +package org.w3c.dom.html2; + +/** + * Definition list. See the DL element definition in HTML 4.01. + *

See also the Document Object Model (DOM) Level 2 HTML Specification. + */ +public interface HTMLDListElement extends HTMLElement { + /** + * Reduce spacing between list items. See the compact attribute definition + * in HTML 4.01. This attribute is deprecated in HTML 4.01. + */ + public boolean getCompact(); + /** + * Reduce spacing between list items. See the compact attribute definition + * in HTML 4.01. This attribute is deprecated in HTML 4.01. + */ + public void setCompact(boolean compact); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLDirectoryElement.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLDirectoryElement.java new file mode 100644 index 000000000..b66de037c --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLDirectoryElement.java @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2003 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. + */ + +package org.w3c.dom.html2; + +/** + * Directory list. See the DIR element definition in HTML 4.01. This element + * is deprecated in HTML 4.01. + *

See also the Document Object Model (DOM) Level 2 HTML Specification. + */ +public interface HTMLDirectoryElement extends HTMLElement { + /** + * Reduce spacing between list items. See the compact attribute definition + * in HTML 4.01. This attribute is deprecated in HTML 4.01. + */ + public boolean getCompact(); + /** + * Reduce spacing between list items. See the compact attribute definition + * in HTML 4.01. This attribute is deprecated in HTML 4.01. + */ + public void setCompact(boolean compact); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLDivElement.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLDivElement.java new file mode 100644 index 000000000..5f5c0dc88 --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLDivElement.java @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2003 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. + */ + +package org.w3c.dom.html2; + +/** + * Generic block container. See the DIV element definition in HTML 4.01. + *

See also the Document Object Model (DOM) Level 2 HTML Specification. + */ +public interface HTMLDivElement extends HTMLElement { + /** + * Horizontal text alignment. See the align attribute definition in HTML + * 4.01. This attribute is deprecated in HTML 4.01. + */ + public String getAlign(); + /** + * Horizontal text alignment. See the align attribute definition in HTML + * 4.01. This attribute is deprecated in HTML 4.01. + */ + public void setAlign(String align); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLDocument.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLDocument.java new file mode 100644 index 000000000..b038783f6 --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLDocument.java @@ -0,0 +1,237 @@ +/* + * Copyright (c) 2003 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. + */ + +package org.w3c.dom.html2; + +import org.w3c.dom.Document; +import org.w3c.dom.NodeList; +import org.w3c.dom.DOMException; + +/** + * An HTMLDocument is the root of the HTML hierarchy and holds + * the entire content. Besides providing access to the hierarchy, it also + * provides some convenience methods for accessing certain sets of + * information from the document. + *

The following properties have been deprecated in favor of the + * corresponding ones for the BODY element:alinkColorbackground + * bgColorfgColorlinkColorvlinkColorIn DOM Level 2, the method + * getElementById is inherited from the Document + * interface where it was moved to. + *

See also the Document Object Model (DOM) Level 2 HTML Specification. + */ +public interface HTMLDocument extends Document { + /** + * The title of a document as specified by the TITLE element + * in the head of the document. + */ + public String getTitle(); + /** + * The title of a document as specified by the TITLE element + * in the head of the document. + */ + public void setTitle(String title); + + /** + * Returns the URI [IETF RFC 2396] of the page that linked to this page. The value is an + * empty string if the user navigated to the page directly (not through + * a link, but, for example, via a bookmark). + */ + public String getReferrer(); + + /** + * The domain name of the server that served the document, or + * null if the server cannot be identified by a domain + * name. + */ + public String getDomain(); + + /** + * The absolute URI [IETF RFC 2396] of the document. + */ + public String getURL(); + + /** + * The element that contains the content for the document. In documents + * with BODY contents, returns the BODY + * element. In frameset documents, this returns the outermost + * FRAMESET element. + */ + public HTMLElement getBody(); + /** + * The element that contains the content for the document. In documents + * with BODY contents, returns the BODY + * element. In frameset documents, this returns the outermost + * FRAMESET element. + */ + public void setBody(HTMLElement body); + + /** + * A collection of all the IMG elements in a document. The + * behavior is limited to IMG elements for backwards + * compatibility. As suggested by [HTML 4.01], to include images, authors may use + * the OBJECT element or the IMG element. + * Therefore, it is recommended not to use this attribute to find the + * images in the document but getElementsByTagName with + * HTML 4.01 or getElementsByTagNameNS with XHTML 1.0. + */ + public HTMLCollection getImages(); + + /** + * A collection of all the OBJECT elements that include + * applets and APPLET (deprecated) elements in a document. + */ + public HTMLCollection getApplets(); + + /** + * A collection of all AREA elements and anchor ( + * A) elements in a document with a value for the + * href attribute. + */ + public HTMLCollection getLinks(); + + /** + * A collection of all the forms of a document. + */ + public HTMLCollection getForms(); + + /** + * A collection of all the anchor (A) elements in a document + * with a value for the name attribute. For reasons of + * backward compatibility, the returned set of anchors only contains + * those anchors created with the name attribute, not those + * created with the id attribute. Note that in [XHTML 1.0], the + * name attribute (see section 4.10) has no semantics and + * is only present for legacy user agents: the id attribute + * is used instead. Users should prefer the iterator mechanisms provided + * by [DOM Level 2 Traversal] instead. + */ + public HTMLCollection getAnchors(); + + /** + * This mutable string attribute denotes persistent state information + * that (1) is associated with the current frame or document and (2) is + * composed of information described by the cookies + * non-terminal of [IETF RFC 2965], Section 4.2.2. + *
If no persistent state information is available for the current + * frame or document document, then this property's value is an empty + * string. + *
When this attribute is read, all cookies are returned as a single + * string, with each cookie's name-value pair concatenated into a list + * of name-value pairs, each list item being separated by a ';' + * (semicolon). + *
When this attribute is set, the value it is set to should be a + * string that adheres to the cookie non-terminal of [IETF RFC 2965]; that + * is, it should be a single name-value pair followed by zero or more + * cookie attribute values. If no domain attribute is specified, then + * the domain attribute for the new value defaults to the host portion + * of an absolute URI [IETF RFC 2396] of the current frame or document. If no path + * attribute is specified, then the path attribute for the new value + * defaults to the absolute path portion of the URI [IETF RFC 2396] of the current + * frame or document. If no max-age attribute is specified, then the + * max-age attribute for the new value defaults to a user agent defined + * value. If a cookie with the specified name is already associated with + * the current frame or document, then the new value as well as the new + * attributes replace the old value and attributes. If a max-age + * attribute of 0 is specified for the new value, then any existing + * cookies of the specified name are removed from the cookie storage. + * See [IETF RFC 2965] for the semantics of persistent state item attribute value + * pairs. The precise nature of a user agent session is not defined by + * this specification. + */ + public String getCookie(); + /** + * This mutable string attribute denotes persistent state information + * that (1) is associated with the current frame or document and (2) is + * composed of information described by the cookies + * non-terminal of [IETF RFC 2965], Section 4.2.2. + *
If no persistent state information is available for the current + * frame or document document, then this property's value is an empty + * string. + *
When this attribute is read, all cookies are returned as a single + * string, with each cookie's name-value pair concatenated into a list + * of name-value pairs, each list item being separated by a ';' + * (semicolon). + *
When this attribute is set, the value it is set to should be a + * string that adheres to the cookie non-terminal of [IETF RFC 2965]; that + * is, it should be a single name-value pair followed by zero or more + * cookie attribute values. If no domain attribute is specified, then + * the domain attribute for the new value defaults to the host portion + * of an absolute URI [IETF RFC 2396] of the current frame or document. If no path + * attribute is specified, then the path attribute for the new value + * defaults to the absolute path portion of the URI [IETF RFC 2396] of the current + * frame or document. If no max-age attribute is specified, then the + * max-age attribute for the new value defaults to a user agent defined + * value. If a cookie with the specified name is already associated with + * the current frame or document, then the new value as well as the new + * attributes replace the old value and attributes. If a max-age + * attribute of 0 is specified for the new value, then any existing + * cookies of the specified name are removed from the cookie storage. + * See [IETF RFC 2965] for the semantics of persistent state item attribute value + * pairs. The precise nature of a user agent session is not defined by + * this specification. + * @exception DOMException + * SYNTAX_ERR: If the new value does not adhere to the cookie syntax + * specified by [IETF RFC 2965]. + */ + public void setCookie(String cookie) + throws DOMException; + + /** + * Open a document stream for writing. If a document exists in the target, + * this method clears it. This method and the ones following allow a + * user to add to or replace the structure model of a document using + * strings of unparsed HTML. At the time of writing alternate methods + * for providing similar functionality for both HTML and XML documents + * were being considered (see [DOM Level 3 Load and Save]). + */ + public void open(); + + /** + * Closes a document stream opened by open() and forces + * rendering. + */ + public void close(); + + /** + * Write a string of text to a document stream opened by + * open(). Note that the function will produce a document + * which is not necessarily driven by a DTD and therefore might be + * produce an invalid result in the context of the document. + * @param text The string to be parsed into some structure in the + * document structure model. + */ + public void write(String text); + + /** + * Write a string of text followed by a newline character to a document + * stream opened by open(). Note that the function will + * produce a document which is not necessarily driven by a DTD and + * therefore might be produce an invalid result in the context of the + * document + * @param text The string to be parsed into some structure in the + * document structure model. + */ + public void writeln(String text); + + /** + * With [HTML 4.01] documents, this method returns the (possibly empty) collection + * of elements whose name value is given by + * elementName. In [XHTML 1.0] documents, this methods only return the + * (possibly empty) collection of form controls with matching name. This + * method is case sensitive. + * @param elementName The name attribute value for an + * element. + * @return The matching elements. + */ + public NodeList getElementsByName(String elementName); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLElement.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLElement.java new file mode 100644 index 000000000..c6450301b --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLElement.java @@ -0,0 +1,87 @@ +/* + * Copyright (c) 2003 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. + */ + +package org.w3c.dom.html2; + +import org.w3c.dom.Element; + +/** + * All HTML element interfaces derive from this class. Elements that only + * expose the HTML core attributes are represented by the base + * HTMLElement interface. These elements are as follows: + * special: SUB, SUP, SPAN, BDOfont: TT, I, B, U, S, STRIKE, BIG, SMALL + * phrase: EM, STRONG, DFN, CODE, SAMP, KBD, VAR, CITE, ACRONYM, ABBRlist: + * DD, DTNOFRAMES, NOSCRIPTADDRESS, CENTERThe style attribute + * of an HTML element is accessible through the + * ElementCSSInlineStyle interface which is defined in the CSS + * module [DOM Level 2 Style Sheets and CSS]. + *

See also the Document Object Model (DOM) Level 2 HTML Specification. + */ +public interface HTMLElement extends Element { + /** + * The element's identifier. See the id attribute definition in HTML 4.01. + */ + public String getId(); + /** + * The element's identifier. See the id attribute definition in HTML 4.01. + */ + public void setId(String id); + + /** + * The element's advisory title. See the title attribute definition in + * HTML 4.01. + */ + public String getTitle(); + /** + * The element's advisory title. See the title attribute definition in + * HTML 4.01. + */ + public void setTitle(String title); + + /** + * Language code defined in RFC 1766. See the lang attribute definition in + * HTML 4.01. + */ + public String getLang(); + /** + * Language code defined in RFC 1766. See the lang attribute definition in + * HTML 4.01. + */ + public void setLang(String lang); + + /** + * Specifies the base direction of directionally neutral text and the + * directionality of tables. See the dir attribute definition in HTML + * 4.01. + */ + public String getDir(); + /** + * Specifies the base direction of directionally neutral text and the + * directionality of tables. See the dir attribute definition in HTML + * 4.01. + */ + public void setDir(String dir); + + /** + * The class attribute of the element. This attribute has been renamed due + * to conflicts with the "class" keyword exposed by many languages. See + * the class attribute definition in HTML 4.01. + */ + public String getClassName(); + /** + * The class attribute of the element. This attribute has been renamed due + * to conflicts with the "class" keyword exposed by many languages. See + * the class attribute definition in HTML 4.01. + */ + public void setClassName(String className); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLFieldSetElement.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLFieldSetElement.java new file mode 100644 index 000000000..f3bcb7df7 --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLFieldSetElement.java @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2003 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. + */ + +package org.w3c.dom.html2; + +/** + * Organizes form controls into logical groups. See the FIELDSET element + * definition in HTML 4.01. + *

See also the Document Object Model (DOM) Level 2 HTML Specification. + */ +public interface HTMLFieldSetElement extends HTMLElement { + /** + * Returns the FORM element containing this control. Returns + * null if this control is not within the context of a + * form. + */ + public HTMLFormElement getForm(); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLFontElement.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLFontElement.java new file mode 100644 index 000000000..aa6a2847b --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLFontElement.java @@ -0,0 +1,54 @@ +/* + * Copyright (c) 2003 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. + */ + +package org.w3c.dom.html2; + +/** + * Local change to font. See the FONT element definition in HTML 4.01. This + * element is deprecated in HTML 4.01. + *

See also the Document Object Model (DOM) Level 2 HTML Specification. + */ +public interface HTMLFontElement extends HTMLElement { + /** + * Font color. See the color attribute definition in HTML 4.01. This + * attribute is deprecated in HTML 4.01. + */ + public String getColor(); + /** + * Font color. See the color attribute definition in HTML 4.01. This + * attribute is deprecated in HTML 4.01. + */ + public void setColor(String color); + + /** + * Font face identifier. See the face attribute definition in HTML 4.01. + * This attribute is deprecated in HTML 4.01. + */ + public String getFace(); + /** + * Font face identifier. See the face attribute definition in HTML 4.01. + * This attribute is deprecated in HTML 4.01. + */ + public void setFace(String face); + + /** + * Font size. See the size attribute definition in HTML 4.01. This + * attribute is deprecated in HTML 4.01. + */ + public String getSize(); + /** + * Font size. See the size attribute definition in HTML 4.01. This + * attribute is deprecated in HTML 4.01. + */ + public void setSize(String size); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLFormElement.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLFormElement.java new file mode 100644 index 000000000..60ec7736f --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLFormElement.java @@ -0,0 +1,116 @@ +/* + * Copyright (c) 2003 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. + */ + +package org.w3c.dom.html2; + +/** + * The FORM element encompasses behavior similar to a collection + * and an element. It provides direct access to the contained form controls + * as well as the attributes of the form element. See the FORM element + * definition in HTML 4.01. + *

See also the Document Object Model (DOM) Level 2 HTML Specification. + */ +public interface HTMLFormElement extends HTMLElement { + /** + * Returns a collection of all form control elements in the form. + */ + public HTMLCollection getElements(); + + /** + * The number of form controls in the form. + */ + public int getLength(); + + /** + * Names the form. + */ + public String getName(); + /** + * Names the form. + */ + public void setName(String name); + + /** + * List of character sets supported by the server. See the accept-charset + * attribute definition in HTML 4.01. + */ + public String getAcceptCharset(); + /** + * List of character sets supported by the server. See the accept-charset + * attribute definition in HTML 4.01. + */ + public void setAcceptCharset(String acceptCharset); + + /** + * Server-side form handler. See the action attribute definition in HTML + * 4.01. + */ + public String getAction(); + /** + * Server-side form handler. See the action attribute definition in HTML + * 4.01. + */ + public void setAction(String action); + + /** + * The content type of the submitted form, generally + * "application/x-www-form-urlencoded". See the enctype attribute + * definition in HTML 4.01. The onsubmit even handler is not guaranteed + * to be triggered when invoking this method. The behavior is + * inconsistent for historical reasons and authors should not rely on a + * particular one. + */ + public String getEnctype(); + /** + * The content type of the submitted form, generally + * "application/x-www-form-urlencoded". See the enctype attribute + * definition in HTML 4.01. The onsubmit even handler is not guaranteed + * to be triggered when invoking this method. The behavior is + * inconsistent for historical reasons and authors should not rely on a + * particular one. + */ + public void setEnctype(String enctype); + + /** + * HTTP method [IETF RFC 2616] used to submit form. See the method attribute definition + * in HTML 4.01. + */ + public String getMethod(); + /** + * HTTP method [IETF RFC 2616] used to submit form. See the method attribute definition + * in HTML 4.01. + */ + public void setMethod(String method); + + /** + * Frame to render the resource in. See the target attribute definition in + * HTML 4.01. + */ + public String getTarget(); + /** + * Frame to render the resource in. See the target attribute definition in + * HTML 4.01. + */ + public void setTarget(String target); + + /** + * Submits the form. It performs the same action as a submit button. + */ + public void submit(); + + /** + * Restores a form element's default values. It performs the same action + * as a reset button. + */ + public void reset(); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLFrameElement.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLFrameElement.java new file mode 100644 index 000000000..dfe877f15 --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLFrameElement.java @@ -0,0 +1,117 @@ +/* + * Copyright (c) 2003 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. + */ + +package org.w3c.dom.html2; + +import org.w3c.dom.Document; + +/** + * Create a frame. See the FRAME element definition in HTML 4.01. + *

See also the Document Object Model (DOM) Level 2 HTML Specification. + */ +public interface HTMLFrameElement extends HTMLElement { + /** + * Request frame borders. See the frameborder attribute definition in HTML + * 4.01. + */ + public String getFrameBorder(); + /** + * Request frame borders. See the frameborder attribute definition in HTML + * 4.01. + */ + public void setFrameBorder(String frameBorder); + + /** + * URI [IETF RFC 2396] designating a long description of this image or frame. See the + * longdesc attribute definition in HTML 4.01. + */ + public String getLongDesc(); + /** + * URI [IETF RFC 2396] designating a long description of this image or frame. See the + * longdesc attribute definition in HTML 4.01. + */ + public void setLongDesc(String longDesc); + + /** + * Frame margin height, in pixels. See the marginheight attribute + * definition in HTML 4.01. + */ + public String getMarginHeight(); + /** + * Frame margin height, in pixels. See the marginheight attribute + * definition in HTML 4.01. + */ + public void setMarginHeight(String marginHeight); + + /** + * Frame margin width, in pixels. See the marginwidth attribute definition + * in HTML 4.01. + */ + public String getMarginWidth(); + /** + * Frame margin width, in pixels. See the marginwidth attribute definition + * in HTML 4.01. + */ + public void setMarginWidth(String marginWidth); + + /** + * The frame name (object of the target attribute). See the + * name attribute definition in HTML 4.01. + */ + public String getName(); + /** + * The frame name (object of the target attribute). See the + * name attribute definition in HTML 4.01. + */ + public void setName(String name); + + /** + * When true, forbid user from resizing frame. See the noresize attribute + * definition in HTML 4.01. + */ + public boolean getNoResize(); + /** + * When true, forbid user from resizing frame. See the noresize attribute + * definition in HTML 4.01. + */ + public void setNoResize(boolean noResize); + + /** + * Specify whether or not the frame should have scrollbars. See the + * scrolling attribute definition in HTML 4.01. + */ + public String getScrolling(); + /** + * Specify whether or not the frame should have scrollbars. See the + * scrolling attribute definition in HTML 4.01. + */ + public void setScrolling(String scrolling); + + /** + * A URI [IETF RFC 2396] designating the initial frame contents. See the src attribute + * definition in HTML 4.01. + */ + public String getSrc(); + /** + * A URI [IETF RFC 2396] designating the initial frame contents. See the src attribute + * definition in HTML 4.01. + */ + public void setSrc(String src); + + /** + * The document this frame contains, if there is any and it is available, + * or null otherwise. + * @since DOM Level 2 + */ + public Document getContentDocument(); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLFrameSetElement.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLFrameSetElement.java new file mode 100644 index 000000000..d2b9c34e9 --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLFrameSetElement.java @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2003 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. + */ + +package org.w3c.dom.html2; + +/** + * Create a grid of frames. See the FRAMESET element definition in HTML 4.01. + *

See also the Document Object Model (DOM) Level 2 HTML Specification. + */ +public interface HTMLFrameSetElement extends HTMLElement { + /** + * The number of columns of frames in the frameset. See the cols attribute + * definition in HTML 4.01. + */ + public String getCols(); + /** + * The number of columns of frames in the frameset. See the cols attribute + * definition in HTML 4.01. + */ + public void setCols(String cols); + + /** + * The number of rows of frames in the frameset. See the rows attribute + * definition in HTML 4.01. + */ + public String getRows(); + /** + * The number of rows of frames in the frameset. See the rows attribute + * definition in HTML 4.01. + */ + public void setRows(String rows); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLHRElement.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLHRElement.java new file mode 100644 index 000000000..d832bc3f0 --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLHRElement.java @@ -0,0 +1,66 @@ +/* + * Copyright (c) 2003 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. + */ + +package org.w3c.dom.html2; + +/** + * Create a horizontal rule. See the HR element definition in HTML 4.01. + *

See also the Document Object Model (DOM) Level 2 HTML Specification. + */ +public interface HTMLHRElement extends HTMLElement { + /** + * Align the rule on the page. See the align attribute definition in HTML + * 4.01. This attribute is deprecated in HTML 4.01. + */ + public String getAlign(); + /** + * Align the rule on the page. See the align attribute definition in HTML + * 4.01. This attribute is deprecated in HTML 4.01. + */ + public void setAlign(String align); + + /** + * Indicates to the user agent that there should be no shading in the + * rendering of this element. See the noshade attribute definition in + * HTML 4.01. This attribute is deprecated in HTML 4.01. + */ + public boolean getNoShade(); + /** + * Indicates to the user agent that there should be no shading in the + * rendering of this element. See the noshade attribute definition in + * HTML 4.01. This attribute is deprecated in HTML 4.01. + */ + public void setNoShade(boolean noShade); + + /** + * The height of the rule. See the size attribute definition in HTML 4.01. + * This attribute is deprecated in HTML 4.01. + */ + public String getSize(); + /** + * The height of the rule. See the size attribute definition in HTML 4.01. + * This attribute is deprecated in HTML 4.01. + */ + public void setSize(String size); + + /** + * The width of the rule. See the width attribute definition in HTML 4.01. + * This attribute is deprecated in HTML 4.01. + */ + public String getWidth(); + /** + * The width of the rule. See the width attribute definition in HTML 4.01. + * This attribute is deprecated in HTML 4.01. + */ + public void setWidth(String width); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLHeadElement.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLHeadElement.java new file mode 100644 index 000000000..85617a7ee --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLHeadElement.java @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2003 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. + */ + +package org.w3c.dom.html2; + +/** + * Document head information. See the HEAD element definition in HTML 4.01. + *

See also the Document Object Model (DOM) Level 2 HTML Specification. + */ +public interface HTMLHeadElement extends HTMLElement { + /** + * URI [IETF RFC 2396] designating a metadata profile. See the profile attribute + * definition in HTML 4.01. + */ + public String getProfile(); + /** + * URI [IETF RFC 2396] designating a metadata profile. See the profile attribute + * definition in HTML 4.01. + */ + public void setProfile(String profile); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLHeadingElement.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLHeadingElement.java new file mode 100644 index 000000000..291f5d87a --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLHeadingElement.java @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2003 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. + */ + +package org.w3c.dom.html2; + +/** + * For the H1 to H6 elements. See the H1 element + * definition in HTML 4.01. + *

See also the Document Object Model (DOM) Level 2 HTML Specification. + */ +public interface HTMLHeadingElement extends HTMLElement { + /** + * Horizontal text alignment. See the align attribute definition in HTML + * 4.01. This attribute is deprecated in HTML 4.01. + */ + public String getAlign(); + /** + * Horizontal text alignment. See the align attribute definition in HTML + * 4.01. This attribute is deprecated in HTML 4.01. + */ + public void setAlign(String align); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLHtmlElement.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLHtmlElement.java new file mode 100644 index 000000000..3601d7eb3 --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLHtmlElement.java @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2003 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. + */ + +package org.w3c.dom.html2; + +/** + * Root of an HTML document. See the HTML element definition in HTML 4.01. + *

See also the Document Object Model (DOM) Level 2 HTML Specification. + */ +public interface HTMLHtmlElement extends HTMLElement { + /** + * Version information about the document's DTD. See the version attribute + * definition in HTML 4.01. This attribute is deprecated in HTML 4.01. + */ + public String getVersion(); + /** + * Version information about the document's DTD. See the version attribute + * definition in HTML 4.01. This attribute is deprecated in HTML 4.01. + */ + public void setVersion(String version); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLIFrameElement.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLIFrameElement.java new file mode 100644 index 000000000..6106e62a2 --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLIFrameElement.java @@ -0,0 +1,137 @@ +/* + * Copyright (c) 2003 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. + */ + +package org.w3c.dom.html2; + +import org.w3c.dom.Document; + +/** + * Inline subwindows. See the IFRAME element definition in HTML 4.01. + *

See also the Document Object Model (DOM) Level 2 HTML Specification. + */ +public interface HTMLIFrameElement extends HTMLElement { + /** + * Aligns this object (vertically or horizontally) with respect to its + * surrounding text. See the align attribute definition in HTML 4.01. + * This attribute is deprecated in HTML 4.01. + */ + public String getAlign(); + /** + * Aligns this object (vertically or horizontally) with respect to its + * surrounding text. See the align attribute definition in HTML 4.01. + * This attribute is deprecated in HTML 4.01. + */ + public void setAlign(String align); + + /** + * Request frame borders. See the frameborder attribute definition in HTML + * 4.01. + */ + public String getFrameBorder(); + /** + * Request frame borders. See the frameborder attribute definition in HTML + * 4.01. + */ + public void setFrameBorder(String frameBorder); + + /** + * Frame height. See the height attribute definition in HTML 4.01. + */ + public String getHeight(); + /** + * Frame height. See the height attribute definition in HTML 4.01. + */ + public void setHeight(String height); + + /** + * URI [IETF RFC 2396] designating a long description of this image or frame. See the + * longdesc attribute definition in HTML 4.01. + */ + public String getLongDesc(); + /** + * URI [IETF RFC 2396] designating a long description of this image or frame. See the + * longdesc attribute definition in HTML 4.01. + */ + public void setLongDesc(String longDesc); + + /** + * Frame margin height, in pixels. See the marginheight attribute + * definition in HTML 4.01. + */ + public String getMarginHeight(); + /** + * Frame margin height, in pixels. See the marginheight attribute + * definition in HTML 4.01. + */ + public void setMarginHeight(String marginHeight); + + /** + * Frame margin width, in pixels. See the marginwidth attribute definition + * in HTML 4.01. + */ + public String getMarginWidth(); + /** + * Frame margin width, in pixels. See the marginwidth attribute definition + * in HTML 4.01. + */ + public void setMarginWidth(String marginWidth); + + /** + * The frame name (object of the target attribute). See the + * name attribute definition in HTML 4.01. + */ + public String getName(); + /** + * The frame name (object of the target attribute). See the + * name attribute definition in HTML 4.01. + */ + public void setName(String name); + + /** + * Specify whether or not the frame should have scrollbars. See the + * scrolling attribute definition in HTML 4.01. + */ + public String getScrolling(); + /** + * Specify whether or not the frame should have scrollbars. See the + * scrolling attribute definition in HTML 4.01. + */ + public void setScrolling(String scrolling); + + /** + * A URI [IETF RFC 2396] designating the initial frame contents. See the src attribute + * definition in HTML 4.01. + */ + public String getSrc(); + /** + * A URI [IETF RFC 2396] designating the initial frame contents. See the src attribute + * definition in HTML 4.01. + */ + public void setSrc(String src); + + /** + * Frame width. See the width attribute definition in HTML 4.01. + */ + public String getWidth(); + /** + * Frame width. See the width attribute definition in HTML 4.01. + */ + public void setWidth(String width); + + /** + * The document this frame contains, if there is any and it is available, + * or null otherwise. + * @since DOM Level 2 + */ + public Document getContentDocument(); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLImageElement.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLImageElement.java new file mode 100644 index 000000000..0a1d4b722 --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLImageElement.java @@ -0,0 +1,176 @@ +/* + * Copyright (c) 2003 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. + */ + +package org.w3c.dom.html2; + +/** + * Embedded image. See the IMG element definition in HTML 4.01. + *

See also the Document Object Model (DOM) Level 2 HTML Specification. + */ +public interface HTMLImageElement extends HTMLElement { + /** + * The name of the element (for backwards compatibility). + */ + public String getName(); + /** + * The name of the element (for backwards compatibility). + */ + public void setName(String name); + + /** + * Aligns this object (vertically or horizontally) with respect to its + * surrounding text. See the align attribute definition in HTML 4.01. + * This attribute is deprecated in HTML 4.01. + */ + public String getAlign(); + /** + * Aligns this object (vertically or horizontally) with respect to its + * surrounding text. See the align attribute definition in HTML 4.01. + * This attribute is deprecated in HTML 4.01. + */ + public void setAlign(String align); + + /** + * Alternate text for user agents not rendering the normal content of this + * element. See the alt attribute definition in HTML 4.01. + */ + public String getAlt(); + /** + * Alternate text for user agents not rendering the normal content of this + * element. See the alt attribute definition in HTML 4.01. + */ + public void setAlt(String alt); + + /** + * Width of border around image. See the border attribute definition in + * HTML 4.01. This attribute is deprecated in HTML 4.01. Note that the + * type of this attribute was DOMString in DOM Level 1 HTML [DOM Level 1] + * . + */ + public String getBorder(); + /** + * Width of border around image. See the border attribute definition in + * HTML 4.01. This attribute is deprecated in HTML 4.01. Note that the + * type of this attribute was DOMString in DOM Level 1 HTML [DOM Level 1] + * . + */ + public void setBorder(String border); + + /** + * Height of the image in pixels. See the height attribute definition in + * HTML 4.01. Note that the type of this attribute was + * DOMString in DOM Level 1 HTML [DOM Level 1]. + * @version DOM Level 2 + */ + public int getHeight(); + /** + * Height of the image in pixels. See the height attribute definition in + * HTML 4.01. Note that the type of this attribute was + * DOMString in DOM Level 1 HTML [DOM Level 1]. + * @version DOM Level 2 + */ + public void setHeight(int height); + + /** + * Horizontal space to the left and right of this image in pixels. See the + * hspace attribute definition in HTML 4.01. This attribute is + * deprecated in HTML 4.01. Note that the type of this attribute was + * DOMString in DOM Level 1 HTML [DOM Level 1]. + * @version DOM Level 2 + */ + public int getHspace(); + /** + * Horizontal space to the left and right of this image in pixels. See the + * hspace attribute definition in HTML 4.01. This attribute is + * deprecated in HTML 4.01. Note that the type of this attribute was + * DOMString in DOM Level 1 HTML [DOM Level 1]. + * @version DOM Level 2 + */ + public void setHspace(int hspace); + + /** + * Use server-side image map. See the ismap attribute definition in HTML + * 4.01. + */ + public boolean getIsMap(); + /** + * Use server-side image map. See the ismap attribute definition in HTML + * 4.01. + */ + public void setIsMap(boolean isMap); + + /** + * URI [IETF RFC 2396] designating a long description of this image or frame. See the + * longdesc attribute definition in HTML 4.01. + */ + public String getLongDesc(); + /** + * URI [IETF RFC 2396] designating a long description of this image or frame. See the + * longdesc attribute definition in HTML 4.01. + */ + public void setLongDesc(String longDesc); + + /** + * URI [IETF RFC 2396] designating the source of this image. See the src attribute + * definition in HTML 4.01. + */ + public String getSrc(); + /** + * URI [IETF RFC 2396] designating the source of this image. See the src attribute + * definition in HTML 4.01. + */ + public void setSrc(String src); + + /** + * Use client-side image map. See the usemap attribute definition in HTML + * 4.01. + */ + public String getUseMap(); + /** + * Use client-side image map. See the usemap attribute definition in HTML + * 4.01. + */ + public void setUseMap(String useMap); + + /** + * Vertical space above and below this image in pixels. See the vspace + * attribute definition in HTML 4.01. This attribute is deprecated in + * HTML 4.01. Note that the type of this attribute was "DOMString" in + * DOM Level 1 HTML [DOM Level 1]. + * @version DOM Level 2 + */ + public int getVspace(); + /** + * Vertical space above and below this image in pixels. See the vspace + * attribute definition in HTML 4.01. This attribute is deprecated in + * HTML 4.01. Note that the type of this attribute was "DOMString" in + * DOM Level 1 HTML [DOM Level 1]. + * @version DOM Level 2 + */ + public void setVspace(int vspace); + + /** + * The width of the image in pixels. See the width attribute definition in + * HTML 4.01. Note that the type of this attribute was + * DOMString in DOM Level 1 HTML [DOM Level 1]. + * @version DOM Level 2 + */ + public int getWidth(); + /** + * The width of the image in pixels. See the width attribute definition in + * HTML 4.01. Note that the type of this attribute was + * DOMString in DOM Level 1 HTML [DOM Level 1]. + * @version DOM Level 2 + */ + public void setWidth(int width); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLInputElement.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLInputElement.java new file mode 100644 index 000000000..c557e0bce --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLInputElement.java @@ -0,0 +1,303 @@ +/* + * Copyright (c) 2003 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. + */ + +package org.w3c.dom.html2; + +/** + * Form control.Depending upon the environment in which the page is being + * viewed, the value property may be read-only for the file upload input + * type. For the "password" input type, the actual value returned may be + * masked to prevent unauthorized use. See the INPUT element definition in [HTML 4.01]. + *

See also the Document Object Model (DOM) Level 2 HTML Specification. + */ +public interface HTMLInputElement extends HTMLElement { + /** + * When the type attribute of the element has the value + * "text", "file" or "password", this represents the HTML value + * attribute of the element. The value of this attribute does not change + * if the contents of the corresponding form control, in an interactive + * user agent, changes. See the value attribute definition in HTML 4.01. + */ + public String getDefaultValue(); + /** + * When the type attribute of the element has the value + * "text", "file" or "password", this represents the HTML value + * attribute of the element. The value of this attribute does not change + * if the contents of the corresponding form control, in an interactive + * user agent, changes. See the value attribute definition in HTML 4.01. + */ + public void setDefaultValue(String defaultValue); + + /** + * When type has the value "radio" or "checkbox", this + * represents the HTML checked attribute of the element. The value of + * this attribute does not change if the state of the corresponding form + * control, in an interactive user agent, changes. See the checked + * attribute definition in HTML 4.01. + */ + public boolean getDefaultChecked(); + /** + * When type has the value "radio" or "checkbox", this + * represents the HTML checked attribute of the element. The value of + * this attribute does not change if the state of the corresponding form + * control, in an interactive user agent, changes. See the checked + * attribute definition in HTML 4.01. + */ + public void setDefaultChecked(boolean defaultChecked); + + /** + * Returns the FORM element containing this control. Returns + * null if this control is not within the context of a + * form. + */ + public HTMLFormElement getForm(); + + /** + * A comma-separated list of content types that a server processing this + * form will handle correctly. See the accept attribute definition in + * HTML 4.01. + */ + public String getAccept(); + /** + * A comma-separated list of content types that a server processing this + * form will handle correctly. See the accept attribute definition in + * HTML 4.01. + */ + public void setAccept(String accept); + + /** + * A single character access key to give access to the form control. See + * the accesskey attribute definition in HTML 4.01. + */ + public String getAccessKey(); + /** + * A single character access key to give access to the form control. See + * the accesskey attribute definition in HTML 4.01. + */ + public void setAccessKey(String accessKey); + + /** + * Aligns this object (vertically or horizontally) with respect to its + * surrounding text. See the align attribute definition in HTML 4.01. + * This attribute is deprecated in HTML 4.01. + */ + public String getAlign(); + /** + * Aligns this object (vertically or horizontally) with respect to its + * surrounding text. See the align attribute definition in HTML 4.01. + * This attribute is deprecated in HTML 4.01. + */ + public void setAlign(String align); + + /** + * Alternate text for user agents not rendering the normal content of this + * element. See the alt attribute definition in HTML 4.01. + */ + public String getAlt(); + /** + * Alternate text for user agents not rendering the normal content of this + * element. See the alt attribute definition in HTML 4.01. + */ + public void setAlt(String alt); + + /** + * When the type attribute of the element has the value + * "radio" or "checkbox", this represents the current state of the form + * control, in an interactive user agent. Changes to this attribute + * change the state of the form control, but do not change the value of + * the HTML checked attribute of the INPUT element.During the handling + * of a click event on an input element with a type attribute that has + * the value "radio" or "checkbox", some implementations may change the + * value of this property before the event is being dispatched in the + * document. If the default action of the event is canceled, the value + * of the property may be changed back to its original value. This means + * that the value of this property during the handling of click events + * is implementation dependent. + */ + public boolean getChecked(); + /** + * When the type attribute of the element has the value + * "radio" or "checkbox", this represents the current state of the form + * control, in an interactive user agent. Changes to this attribute + * change the state of the form control, but do not change the value of + * the HTML checked attribute of the INPUT element.During the handling + * of a click event on an input element with a type attribute that has + * the value "radio" or "checkbox", some implementations may change the + * value of this property before the event is being dispatched in the + * document. If the default action of the event is canceled, the value + * of the property may be changed back to its original value. This means + * that the value of this property during the handling of click events + * is implementation dependent. + */ + public void setChecked(boolean checked); + + /** + * The control is unavailable in this context. See the disabled attribute + * definition in HTML 4.01. + */ + public boolean getDisabled(); + /** + * The control is unavailable in this context. See the disabled attribute + * definition in HTML 4.01. + */ + public void setDisabled(boolean disabled); + + /** + * Maximum number of characters for text fields, when type + * has the value "text" or "password". See the maxlength attribute + * definition in HTML 4.01. + */ + public int getMaxLength(); + /** + * Maximum number of characters for text fields, when type + * has the value "text" or "password". See the maxlength attribute + * definition in HTML 4.01. + */ + public void setMaxLength(int maxLength); + + /** + * Form control or object name when submitted with a form. See the name + * attribute definition in HTML 4.01. + */ + public String getName(); + /** + * Form control or object name when submitted with a form. See the name + * attribute definition in HTML 4.01. + */ + public void setName(String name); + + /** + * This control is read-only. Relevant only when type has the + * value "text" or "password". See the readonly attribute definition in + * HTML 4.01. + */ + public boolean getReadOnly(); + /** + * This control is read-only. Relevant only when type has the + * value "text" or "password". See the readonly attribute definition in + * HTML 4.01. + */ + public void setReadOnly(boolean readOnly); + + /** + * Size information. The precise meaning is specific to each type of + * field. See the size attribute definition in HTML 4.01. + * @version DOM Level 2 + */ + public int getSize(); + /** + * Size information. The precise meaning is specific to each type of + * field. See the size attribute definition in HTML 4.01. + * @version DOM Level 2 + */ + public void setSize(int size); + + /** + * When the type attribute has the value "image", this + * attribute specifies the location of the image to be used to decorate + * the graphical submit button. See the src attribute definition in HTML + * 4.01. + */ + public String getSrc(); + /** + * When the type attribute has the value "image", this + * attribute specifies the location of the image to be used to decorate + * the graphical submit button. See the src attribute definition in HTML + * 4.01. + */ + public void setSrc(String src); + + /** + * Index that represents the element's position in the tabbing order. See + * the tabindex attribute definition in HTML 4.01. + */ + public int getTabIndex(); + /** + * Index that represents the element's position in the tabbing order. See + * the tabindex attribute definition in HTML 4.01. + */ + public void setTabIndex(int tabIndex); + + /** + * The type of control created (all lower case). See the type attribute + * definition in HTML 4.01. + * @version DOM Level 2 + */ + public String getType(); + /** + * The type of control created (all lower case). See the type attribute + * definition in HTML 4.01. + * @version DOM Level 2 + */ + public void setType(String type); + + /** + * Use client-side image map. See the usemap attribute definition in HTML + * 4.01. + */ + public String getUseMap(); + /** + * Use client-side image map. See the usemap attribute definition in HTML + * 4.01. + */ + public void setUseMap(String useMap); + + /** + * When the type attribute of the element has the value + * "text", "file" or "password", this represents the current contents of + * the corresponding form control, in an interactive user agent. + * Changing this attribute changes the contents of the form control, but + * does not change the value of the HTML value attribute of the element. + * When the type attribute of the element has the value + * "button", "hidden", "submit", "reset", "image", "checkbox" or + * "radio", this represents the HTML value attribute of the element. See + * the value attribute definition in HTML 4.01. + */ + public String getValue(); + /** + * When the type attribute of the element has the value + * "text", "file" or "password", this represents the current contents of + * the corresponding form control, in an interactive user agent. + * Changing this attribute changes the contents of the form control, but + * does not change the value of the HTML value attribute of the element. + * When the type attribute of the element has the value + * "button", "hidden", "submit", "reset", "image", "checkbox" or + * "radio", this represents the HTML value attribute of the element. See + * the value attribute definition in HTML 4.01. + */ + public void setValue(String value); + + /** + * Removes keyboard focus from this element. + */ + public void blur(); + + /** + * Gives keyboard focus to this element. + */ + public void focus(); + + /** + * Select the contents of the text area. For INPUT elements + * whose type attribute has one of the following values: + * "text", "file", or "password". + */ + public void select(); + + /** + * Simulate a mouse-click. For INPUT elements whose + * type attribute has one of the following values: + * "button", "checkbox", "radio", "reset", or "submit". + */ + public void click(); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLIsIndexElement.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLIsIndexElement.java new file mode 100644 index 000000000..f1b4b7478 --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLIsIndexElement.java @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2003 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. + */ + +package org.w3c.dom.html2; + +/** + * This element is used for single-line text input. See the ISINDEX element + * definition in HTML 4.01. This element is deprecated in HTML 4.01. + *

See also the Document Object Model (DOM) Level 2 HTML Specification. + */ +public interface HTMLIsIndexElement extends HTMLElement { + /** + * Returns the FORM element containing this control. Returns + * null if this control is not within the context of a + * form. + */ + public HTMLFormElement getForm(); + + /** + * The prompt message. See the prompt attribute definition in HTML 4.01. + * This attribute is deprecated in HTML 4.01. + */ + public String getPrompt(); + /** + * The prompt message. See the prompt attribute definition in HTML 4.01. + * This attribute is deprecated in HTML 4.01. + */ + public void setPrompt(String prompt); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLLIElement.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLLIElement.java new file mode 100644 index 000000000..3a69f5e9e --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLLIElement.java @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2003 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. + */ + +package org.w3c.dom.html2; + +/** + * List item. See the LI element definition in HTML 4.01. + *

See also the Document Object Model (DOM) Level 2 HTML Specification. + */ +public interface HTMLLIElement extends HTMLElement { + /** + * List item bullet style. See the type attribute definition in HTML 4.01. + * This attribute is deprecated in HTML 4.01. + */ + public String getType(); + /** + * List item bullet style. See the type attribute definition in HTML 4.01. + * This attribute is deprecated in HTML 4.01. + */ + public void setType(String type); + + /** + * Reset sequence number when used in OL. See the value + * attribute definition in HTML 4.01. This attribute is deprecated in + * HTML 4.01. + */ + public int getValue(); + /** + * Reset sequence number when used in OL. See the value + * attribute definition in HTML 4.01. This attribute is deprecated in + * HTML 4.01. + */ + public void setValue(int value); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLLabelElement.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLLabelElement.java new file mode 100644 index 000000000..ef1a10aea --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLLabelElement.java @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2003 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. + */ + +package org.w3c.dom.html2; + +/** + * Form field label text. See the LABEL element definition in HTML 4.01. + *

See also the Document Object Model (DOM) Level 2 HTML Specification. + */ +public interface HTMLLabelElement extends HTMLElement { + /** + * Returns the FORM element containing this control. Returns + * null if this control is not within the context of a + * form. + */ + public HTMLFormElement getForm(); + + /** + * A single character access key to give access to the form control. See + * the accesskey attribute definition in HTML 4.01. + */ + public String getAccessKey(); + /** + * A single character access key to give access to the form control. See + * the accesskey attribute definition in HTML 4.01. + */ + public void setAccessKey(String accessKey); + + /** + * This attribute links this label with another form control by + * id attribute. See the for attribute definition in HTML + * 4.01. + */ + public String getHtmlFor(); + /** + * This attribute links this label with another form control by + * id attribute. See the for attribute definition in HTML + * 4.01. + */ + public void setHtmlFor(String htmlFor); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLLegendElement.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLLegendElement.java new file mode 100644 index 000000000..774a11640 --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLLegendElement.java @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2003 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. + */ + +package org.w3c.dom.html2; + +/** + * Provides a caption for a FIELDSET grouping. See the LEGEND + * element definition in HTML 4.01. + *

See also the Document Object Model (DOM) Level 2 HTML Specification. + */ +public interface HTMLLegendElement extends HTMLElement { + /** + * Returns the FORM element containing this control. Returns + * null if this control is not within the context of a + * form. + */ + public HTMLFormElement getForm(); + + /** + * A single character access key to give access to the form control. See + * the accesskey attribute definition in HTML 4.01. + */ + public String getAccessKey(); + /** + * A single character access key to give access to the form control. See + * the accesskey attribute definition in HTML 4.01. + */ + public void setAccessKey(String accessKey); + + /** + * Text alignment relative to FIELDSET. See the align + * attribute definition in HTML 4.01. This attribute is deprecated in + * HTML 4.01. + */ + public String getAlign(); + /** + * Text alignment relative to FIELDSET. See the align + * attribute definition in HTML 4.01. This attribute is deprecated in + * HTML 4.01. + */ + public void setAlign(String align); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLLinkElement.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLLinkElement.java new file mode 100644 index 000000000..8210a4a35 --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLLinkElement.java @@ -0,0 +1,116 @@ +/* + * Copyright (c) 2003 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. + */ + +package org.w3c.dom.html2; + +/** + * The LINK element specifies a link to an external resource, and + * defines this document's relationship to that resource (or vice versa). + * See the LINK element definition in HTML 4.01 (see also the + * LinkStyle interface in the StyleSheet module [DOM Level 2 Style Sheets and CSS]). + *

See also the Document Object Model (DOM) Level 2 HTML Specification. + */ +public interface HTMLLinkElement extends HTMLElement { + /** + * Enables/disables the link. This is currently only used for style sheet + * links, and may be used to activate or deactivate style sheets. + */ + public boolean getDisabled(); + /** + * Enables/disables the link. This is currently only used for style sheet + * links, and may be used to activate or deactivate style sheets. + */ + public void setDisabled(boolean disabled); + + /** + * The character encoding of the resource being linked to. See the charset + * attribute definition in HTML 4.01. + */ + public String getCharset(); + /** + * The character encoding of the resource being linked to. See the charset + * attribute definition in HTML 4.01. + */ + public void setCharset(String charset); + + /** + * The URI [IETF RFC 2396] of the linked resource. See the href attribute definition in + * HTML 4.01. + */ + public String getHref(); + /** + * The URI [IETF RFC 2396] of the linked resource. See the href attribute definition in + * HTML 4.01. + */ + public void setHref(String href); + + /** + * Language code of the linked resource. See the hreflang attribute + * definition in HTML 4.01. + */ + public String getHreflang(); + /** + * Language code of the linked resource. See the hreflang attribute + * definition in HTML 4.01. + */ + public void setHreflang(String hreflang); + + /** + * Designed for use with one or more target media. See the media attribute + * definition in HTML 4.01. + */ + public String getMedia(); + /** + * Designed for use with one or more target media. See the media attribute + * definition in HTML 4.01. + */ + public void setMedia(String media); + + /** + * Forward link type. See the rel attribute definition in HTML 4.01. + */ + public String getRel(); + /** + * Forward link type. See the rel attribute definition in HTML 4.01. + */ + public void setRel(String rel); + + /** + * Reverse link type. See the rev attribute definition in HTML 4.01. + */ + public String getRev(); + /** + * Reverse link type. See the rev attribute definition in HTML 4.01. + */ + public void setRev(String rev); + + /** + * Frame to render the resource in. See the target attribute definition in + * HTML 4.01. + */ + public String getTarget(); + /** + * Frame to render the resource in. See the target attribute definition in + * HTML 4.01. + */ + public void setTarget(String target); + + /** + * Advisory content type. See the type attribute definition in HTML 4.01. + */ + public String getType(); + /** + * Advisory content type. See the type attribute definition in HTML 4.01. + */ + public void setType(String type); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLMapElement.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLMapElement.java new file mode 100644 index 000000000..b1f78682a --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLMapElement.java @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2003 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. + */ + +package org.w3c.dom.html2; + +/** + * Client-side image map. See the MAP element definition in HTML 4.01. + *

See also the Document Object Model (DOM) Level 2 HTML Specification. + */ +public interface HTMLMapElement extends HTMLElement { + /** + * The list of areas defined for the image map. + */ + public HTMLCollection getAreas(); + + /** + * Names the map (for use with usemap). See the name + * attribute definition in HTML 4.01. + */ + public String getName(); + /** + * Names the map (for use with usemap). See the name + * attribute definition in HTML 4.01. + */ + public void setName(String name); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLMenuElement.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLMenuElement.java new file mode 100644 index 000000000..17e81c597 --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLMenuElement.java @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2003 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. + */ + +package org.w3c.dom.html2; + +/** + * Menu list. See the MENU element definition in HTML 4.01. This element is + * deprecated in HTML 4.01. + *

See also the Document Object Model (DOM) Level 2 HTML Specification. + */ +public interface HTMLMenuElement extends HTMLElement { + /** + * Reduce spacing between list items. See the compact attribute definition + * in HTML 4.01. This attribute is deprecated in HTML 4.01. + */ + public boolean getCompact(); + /** + * Reduce spacing between list items. See the compact attribute definition + * in HTML 4.01. This attribute is deprecated in HTML 4.01. + */ + public void setCompact(boolean compact); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLMetaElement.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLMetaElement.java new file mode 100644 index 000000000..a56fed5fc --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLMetaElement.java @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2003 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. + */ + +package org.w3c.dom.html2; + +/** + * This contains generic meta-information about the document. See the META + * element definition in HTML 4.01. + *

See also the Document Object Model (DOM) Level 2 HTML Specification. + */ +public interface HTMLMetaElement extends HTMLElement { + /** + * Associated information. See the content attribute definition in HTML + * 4.01. + */ + public String getContent(); + /** + * Associated information. See the content attribute definition in HTML + * 4.01. + */ + public void setContent(String content); + + /** + * HTTP response header name [IETF RFC 2616]. See the http-equiv attribute definition in + * HTML 4.01. + */ + public String getHttpEquiv(); + /** + * HTTP response header name [IETF RFC 2616]. See the http-equiv attribute definition in + * HTML 4.01. + */ + public void setHttpEquiv(String httpEquiv); + + /** + * Meta information name. See the name attribute definition in HTML 4.01. + */ + public String getName(); + /** + * Meta information name. See the name attribute definition in HTML 4.01. + */ + public void setName(String name); + + /** + * Select form of content. See the scheme attribute definition in HTML + * 4.01. + */ + public String getScheme(); + /** + * Select form of content. See the scheme attribute definition in HTML + * 4.01. + */ + public void setScheme(String scheme); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLModElement.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLModElement.java new file mode 100644 index 000000000..f7659f092 --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLModElement.java @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2003 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. + */ + +package org.w3c.dom.html2; + +/** + * Notice of modification to part of a document. See the INS and DEL element + * definitions in HTML 4.01. + *

See also the Document Object Model (DOM) Level 2 HTML Specification. + */ +public interface HTMLModElement extends HTMLElement { + /** + * A URI [IETF RFC 2396] designating a document that describes the reason for the change. + * See the cite attribute definition in HTML 4.01. + */ + public String getCite(); + /** + * A URI [IETF RFC 2396] designating a document that describes the reason for the change. + * See the cite attribute definition in HTML 4.01. + */ + public void setCite(String cite); + + /** + * The date and time of the change. See the datetime attribute definition + * in HTML 4.01. + */ + public String getDateTime(); + /** + * The date and time of the change. See the datetime attribute definition + * in HTML 4.01. + */ + public void setDateTime(String dateTime); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLOListElement.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLOListElement.java new file mode 100644 index 000000000..298d47439 --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLOListElement.java @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2003 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. + */ + +package org.w3c.dom.html2; + +/** + * Ordered list. See the OL element definition in HTML 4.01. + *

See also the Document Object Model (DOM) Level 2 HTML Specification. + */ +public interface HTMLOListElement extends HTMLElement { + /** + * Reduce spacing between list items. See the compact attribute definition + * in HTML 4.01. This attribute is deprecated in HTML 4.01. + */ + public boolean getCompact(); + /** + * Reduce spacing between list items. See the compact attribute definition + * in HTML 4.01. This attribute is deprecated in HTML 4.01. + */ + public void setCompact(boolean compact); + + /** + * Starting sequence number. See the start attribute definition in HTML + * 4.01. This attribute is deprecated in HTML 4.01. + */ + public int getStart(); + /** + * Starting sequence number. See the start attribute definition in HTML + * 4.01. This attribute is deprecated in HTML 4.01. + */ + public void setStart(int start); + + /** + * Numbering style. See the type attribute definition in HTML 4.01. This + * attribute is deprecated in HTML 4.01. + */ + public String getType(); + /** + * Numbering style. See the type attribute definition in HTML 4.01. This + * attribute is deprecated in HTML 4.01. + */ + public void setType(String type); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLObjectElement.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLObjectElement.java new file mode 100644 index 000000000..e49af5f03 --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLObjectElement.java @@ -0,0 +1,230 @@ +/* + * Copyright (c) 2003 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. + */ + +package org.w3c.dom.html2; + +import org.w3c.dom.Document; + +/** + * Generic embedded object.In principle, all properties on the object element + * are read-write but in some environments some properties may be read-only + * once the underlying object is instantiated. See the OBJECT element + * definition in [HTML 4.01]. + *

See also the Document Object Model (DOM) Level 2 HTML Specification. + */ +public interface HTMLObjectElement extends HTMLElement { + /** + * Returns the FORM element containing this control. Returns + * null if this control is not within the context of a + * form. + */ + public HTMLFormElement getForm(); + + /** + * Applet class file. See the code attribute for + * HTMLAppletElement. + */ + public String getCode(); + /** + * Applet class file. See the code attribute for + * HTMLAppletElement. + */ + public void setCode(String code); + + /** + * Aligns this object (vertically or horizontally) with respect to its + * surrounding text. See the align attribute definition in HTML 4.01. + * This attribute is deprecated in HTML 4.01. + */ + public String getAlign(); + /** + * Aligns this object (vertically or horizontally) with respect to its + * surrounding text. See the align attribute definition in HTML 4.01. + * This attribute is deprecated in HTML 4.01. + */ + public void setAlign(String align); + + /** + * Space-separated list of archives. See the archive attribute definition + * in HTML 4.01. + */ + public String getArchive(); + /** + * Space-separated list of archives. See the archive attribute definition + * in HTML 4.01. + */ + public void setArchive(String archive); + + /** + * Width of border around the object. See the border attribute definition + * in HTML 4.01. This attribute is deprecated in HTML 4.01. + */ + public String getBorder(); + /** + * Width of border around the object. See the border attribute definition + * in HTML 4.01. This attribute is deprecated in HTML 4.01. + */ + public void setBorder(String border); + + /** + * Base URI [IETF RFC 2396] for classid, data, and + * archive attributes. See the codebase attribute definition + * in HTML 4.01. + */ + public String getCodeBase(); + /** + * Base URI [IETF RFC 2396] for classid, data, and + * archive attributes. See the codebase attribute definition + * in HTML 4.01. + */ + public void setCodeBase(String codeBase); + + /** + * Content type for data downloaded via classid attribute. + * See the codetype attribute definition in HTML 4.01. + */ + public String getCodeType(); + /** + * Content type for data downloaded via classid attribute. + * See the codetype attribute definition in HTML 4.01. + */ + public void setCodeType(String codeType); + + /** + * A URI [IETF RFC 2396] specifying the location of the object's data. See the data + * attribute definition in HTML 4.01. + */ + public String getData(); + /** + * A URI [IETF RFC 2396] specifying the location of the object's data. See the data + * attribute definition in HTML 4.01. + */ + public void setData(String data); + + /** + * Declare (for future reference), but do not instantiate, this object. + * See the declare attribute definition in HTML 4.01. + */ + public boolean getDeclare(); + /** + * Declare (for future reference), but do not instantiate, this object. + * See the declare attribute definition in HTML 4.01. + */ + public void setDeclare(boolean declare); + + /** + * Override height. See the height attribute definition in HTML 4.01. + */ + public String getHeight(); + /** + * Override height. See the height attribute definition in HTML 4.01. + */ + public void setHeight(String height); + + /** + * Horizontal space, in pixels, to the left and right of this image, + * applet, or object. See the hspace attribute definition in HTML 4.01. + * This attribute is deprecated in HTML 4.01. + */ + public int getHspace(); + /** + * Horizontal space, in pixels, to the left and right of this image, + * applet, or object. See the hspace attribute definition in HTML 4.01. + * This attribute is deprecated in HTML 4.01. + */ + public void setHspace(int hspace); + + /** + * Form control or object name when submitted with a form. See the name + * attribute definition in HTML 4.01. + */ + public String getName(); + /** + * Form control or object name when submitted with a form. See the name + * attribute definition in HTML 4.01. + */ + public void setName(String name); + + /** + * Message to render while loading the object. See the standby attribute + * definition in HTML 4.01. + */ + public String getStandby(); + /** + * Message to render while loading the object. See the standby attribute + * definition in HTML 4.01. + */ + public void setStandby(String standby); + + /** + * Index that represents the element's position in the tabbing order. See + * the tabindex attribute definition in HTML 4.01. + */ + public int getTabIndex(); + /** + * Index that represents the element's position in the tabbing order. See + * the tabindex attribute definition in HTML 4.01. + */ + public void setTabIndex(int tabIndex); + + /** + * Content type for data downloaded via data attribute. See + * the type attribute definition in HTML 4.01. + */ + public String getType(); + /** + * Content type for data downloaded via data attribute. See + * the type attribute definition in HTML 4.01. + */ + public void setType(String type); + + /** + * Use client-side image map. See the usemap attribute definition in HTML + * 4.01. + */ + public String getUseMap(); + /** + * Use client-side image map. See the usemap attribute definition in HTML + * 4.01. + */ + public void setUseMap(String useMap); + + /** + * Vertical space, in pixels, above and below this image, applet, or + * object. See the vspace attribute definition in HTML 4.01. This + * attribute is deprecated in HTML 4.01. + */ + public int getVspace(); + /** + * Vertical space, in pixels, above and below this image, applet, or + * object. See the vspace attribute definition in HTML 4.01. This + * attribute is deprecated in HTML 4.01. + */ + public void setVspace(int vspace); + + /** + * Override width. See the width attribute definition in HTML 4.01. + */ + public String getWidth(); + /** + * Override width. See the width attribute definition in HTML 4.01. + */ + public void setWidth(String width); + + /** + * The document this object contains, if there is any and it is available, + * or null otherwise. + * @since DOM Level 2 + */ + public Document getContentDocument(); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLOptGroupElement.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLOptGroupElement.java new file mode 100644 index 000000000..8e680a23c --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLOptGroupElement.java @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2003 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. + */ + +package org.w3c.dom.html2; + +/** + * Group options together in logical subdivisions. See the OPTGROUP element + * definition in HTML 4.01. + *

See also the Document Object Model (DOM) Level 2 HTML Specification. + */ +public interface HTMLOptGroupElement extends HTMLElement { + /** + * The control is unavailable in this context. See the disabled attribute + * definition in HTML 4.01. + */ + public boolean getDisabled(); + /** + * The control is unavailable in this context. See the disabled attribute + * definition in HTML 4.01. + */ + public void setDisabled(boolean disabled); + + /** + * Assigns a label to this option group. See the label attribute definition + * in HTML 4.01. + */ + public String getLabel(); + /** + * Assigns a label to this option group. See the label attribute definition + * in HTML 4.01. + */ + public void setLabel(String label); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLOptionElement.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLOptionElement.java new file mode 100644 index 000000000..fe932ca87 --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLOptionElement.java @@ -0,0 +1,104 @@ +/* + * Copyright (c) 2003 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. + */ + +package org.w3c.dom.html2; + +/** + * A selectable choice. See the OPTION element definition in HTML 4.01. + *

See also the Document Object Model (DOM) Level 2 HTML Specification. + */ +public interface HTMLOptionElement extends HTMLElement { + /** + * Returns the FORM element containing this control. Returns + * null if this control is not within the context of a + * form. + */ + public HTMLFormElement getForm(); + + /** + * Represents the value of the HTML selected attribute. The value of this + * attribute does not change if the state of the corresponding form + * control, in an interactive user agent, changes. See the selected + * attribute definition in HTML 4.01. + * @version DOM Level 2 + */ + public boolean getDefaultSelected(); + /** + * Represents the value of the HTML selected attribute. The value of this + * attribute does not change if the state of the corresponding form + * control, in an interactive user agent, changes. See the selected + * attribute definition in HTML 4.01. + * @version DOM Level 2 + */ + public void setDefaultSelected(boolean defaultSelected); + + /** + * The text contained within the option element. + */ + public String getText(); + + /** + * The index of this OPTION in its parent SELECT + * , starting from 0. + * @version DOM Level 2 + */ + public int getIndex(); + + /** + * The control is unavailable in this context. See the disabled attribute + * definition in HTML 4.01. + */ + public boolean getDisabled(); + /** + * The control is unavailable in this context. See the disabled attribute + * definition in HTML 4.01. + */ + public void setDisabled(boolean disabled); + + /** + * Option label for use in hierarchical menus. See the label attribute + * definition in HTML 4.01. + */ + public String getLabel(); + /** + * Option label for use in hierarchical menus. See the label attribute + * definition in HTML 4.01. + */ + public void setLabel(String label); + + /** + * Represents the current state of the corresponding form control, in an + * interactive user agent. Changing this attribute changes the state of + * the form control, but does not change the value of the HTML selected + * attribute of the element. + */ + public boolean getSelected(); + /** + * Represents the current state of the corresponding form control, in an + * interactive user agent. Changing this attribute changes the state of + * the form control, but does not change the value of the HTML selected + * attribute of the element. + */ + public void setSelected(boolean selected); + + /** + * The current form control value. See the value attribute definition in + * HTML 4.01. + */ + public String getValue(); + /** + * The current form control value. See the value attribute definition in + * HTML 4.01. + */ + public void setValue(String value); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLOptionsCollection.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLOptionsCollection.java new file mode 100644 index 000000000..a28c5ac27 --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLOptionsCollection.java @@ -0,0 +1,68 @@ +/* + * Copyright (c) 2003 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. + */ + +package org.w3c.dom.html2; + +import org.w3c.dom.Node; +import org.w3c.dom.DOMException; + +/** + * An HTMLOptionsCollection is a list of nodes representing HTML + * option element. An individual node may be accessed by either ordinal + * index or the node's name or id attributes. + * Collections in the HTML DOM are assumed to be live meaning that they are + * automatically updated when the underlying document is changed. + *

See also the Document Object Model (DOM) Level 2 HTML Specification. + * @since DOM Level 2 + */ +public interface HTMLOptionsCollection { + /** + * This attribute specifies the length or size of the list. + */ + public int getLength(); + /** + * This attribute specifies the length or size of the list. + * @exception DOMException + * NOT_SUPPORTED_ERR: if setting the length is not allowed by the + * implementation. + */ + public void setLength(int length) + throws DOMException; + + /** + * This method retrieves a node specified by ordinal index. Nodes are + * numbered in tree order (depth-first traversal order). + * @param index The index of the node to be fetched. The index origin is + * 0. + * @return The Node at the corresponding position upon + * success. A value of null is returned if the index is + * out of range. + */ + public Node item(int index); + + /** + * This method retrieves a Node using a name. It first + * searches for a Node with a matching id + * attribute. If it doesn't find one, it then searches for a + * Node with a matching name attribute, but + * only on those elements that are allowed a name attribute. This method + * is case insensitive in HTML documents and case sensitive in XHTML + * documents. + * @param name The name of the Node to be fetched. + * @return The Node with a name or + * id attribute whose value corresponds to the specified + * string. Upon failure (e.g., no node with this name exists), returns + * null. + */ + public Node namedItem(String name); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLParagraphElement.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLParagraphElement.java new file mode 100644 index 000000000..b59f505f9 --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLParagraphElement.java @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2003 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. + */ + +package org.w3c.dom.html2; + +/** + * Paragraphs. See the P element definition in HTML 4.01. + *

See also the Document Object Model (DOM) Level 2 HTML Specification. + */ +public interface HTMLParagraphElement extends HTMLElement { + /** + * Horizontal text alignment. See the align attribute definition in HTML + * 4.01. This attribute is deprecated in HTML 4.01. + */ + public String getAlign(); + /** + * Horizontal text alignment. See the align attribute definition in HTML + * 4.01. This attribute is deprecated in HTML 4.01. + */ + public void setAlign(String align); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLParamElement.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLParamElement.java new file mode 100644 index 000000000..33f5f7788 --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLParamElement.java @@ -0,0 +1,67 @@ +/* + * Copyright (c) 2003 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. + */ + +package org.w3c.dom.html2; + +/** + * Parameters fed to the OBJECT element. See the PARAM element + * definition in HTML 4.01. + *

See also the Document Object Model (DOM) Level 2 HTML Specification. + */ +public interface HTMLParamElement extends HTMLElement { + /** + * The name of a run-time parameter. See the name attribute definition in + * HTML 4.01. + */ + public String getName(); + /** + * The name of a run-time parameter. See the name attribute definition in + * HTML 4.01. + */ + public void setName(String name); + + /** + * Content type for the value attribute when + * valuetype has the value "ref". See the type attribute + * definition in HTML 4.01. + */ + public String getType(); + /** + * Content type for the value attribute when + * valuetype has the value "ref". See the type attribute + * definition in HTML 4.01. + */ + public void setType(String type); + + /** + * The value of a run-time parameter. See the value attribute definition + * in HTML 4.01. + */ + public String getValue(); + /** + * The value of a run-time parameter. See the value attribute definition + * in HTML 4.01. + */ + public void setValue(String value); + + /** + * Information about the meaning of the value attribute + * value. See the valuetype attribute definition in HTML 4.01. + */ + public String getValueType(); + /** + * Information about the meaning of the value attribute + * value. See the valuetype attribute definition in HTML 4.01. + */ + public void setValueType(String valueType); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLPreElement.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLPreElement.java new file mode 100644 index 000000000..2d39837ed --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLPreElement.java @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2003 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. + */ + +package org.w3c.dom.html2; + +/** + * Preformatted text. See the PRE element definition in HTML 4.01. + *

See also the Document Object Model (DOM) Level 2 HTML Specification. + */ +public interface HTMLPreElement extends HTMLElement { + /** + * Fixed width for content. See the width attribute definition in HTML + * 4.01. This attribute is deprecated in HTML 4.01. + */ + public int getWidth(); + /** + * Fixed width for content. See the width attribute definition in HTML + * 4.01. This attribute is deprecated in HTML 4.01. + */ + public void setWidth(int width); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLQuoteElement.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLQuoteElement.java new file mode 100644 index 000000000..aba49746e --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLQuoteElement.java @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2003 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. + */ + +package org.w3c.dom.html2; + +/** + * For the Q and BLOCKQUOTE elements. See the Q + * element definition in HTML 4.01. + *

See also the Document Object Model (DOM) Level 2 HTML Specification. + */ +public interface HTMLQuoteElement extends HTMLElement { + /** + * A URI [IETF RFC 2396] designating a source document or message. See the cite attribute + * definition in HTML 4.01. + */ + public String getCite(); + /** + * A URI [IETF RFC 2396] designating a source document or message. See the cite attribute + * definition in HTML 4.01. + */ + public void setCite(String cite); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLScriptElement.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLScriptElement.java new file mode 100644 index 000000000..226b394a9 --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLScriptElement.java @@ -0,0 +1,91 @@ +/* + * Copyright (c) 2003 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. + */ + +package org.w3c.dom.html2; + +/** + * Script statements. See the SCRIPT element definition in HTML 4.01. + *

See also the Document Object Model (DOM) Level 2 HTML Specification. + */ +public interface HTMLScriptElement extends HTMLElement { + /** + * The script content of the element. + */ + public String getText(); + /** + * The script content of the element. + */ + public void setText(String text); + + /** + * Reserved for future use. + */ + public String getHtmlFor(); + /** + * Reserved for future use. + */ + public void setHtmlFor(String htmlFor); + + /** + * Reserved for future use. + */ + public String getEvent(); + /** + * Reserved for future use. + */ + public void setEvent(String event); + + /** + * The character encoding of the linked resource. See the charset + * attribute definition in HTML 4.01. + */ + public String getCharset(); + /** + * The character encoding of the linked resource. See the charset + * attribute definition in HTML 4.01. + */ + public void setCharset(String charset); + + /** + * Indicates that the user agent can defer processing of the script. See + * the defer attribute definition in HTML 4.01. + */ + public boolean getDefer(); + /** + * Indicates that the user agent can defer processing of the script. See + * the defer attribute definition in HTML 4.01. + */ + public void setDefer(boolean defer); + + /** + * URI [IETF RFC 2396] designating an external script. See the src attribute definition + * in HTML 4.01. + */ + public String getSrc(); + /** + * URI [IETF RFC 2396] designating an external script. See the src attribute definition + * in HTML 4.01. + */ + public void setSrc(String src); + + /** + * The content type of the script language. See the type attribute + * definition in HTML 4.01. + */ + public String getType(); + /** + * The content type of the script language. See the type attribute + * definition in HTML 4.01. + */ + public void setType(String type); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLSelectElement.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLSelectElement.java new file mode 100644 index 000000000..98dbc836d --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLSelectElement.java @@ -0,0 +1,179 @@ +/* + * Copyright (c) 2003 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. + */ + +package org.w3c.dom.html2; + +import org.w3c.dom.DOMException; + +/** + * The select element allows the selection of an option. The contained options + * can be directly accessed through the select element as a collection. See + * the SELECT element definition in HTML 4.01. + *

See also the Document Object Model (DOM) Level 2 HTML Specification. + */ +public interface HTMLSelectElement extends HTMLElement { + /** + * The type of this form control. This is the string "select-multiple" + * when the multiple attribute is true and the string + * "select-one" when false. + */ + public String getType(); + + /** + * The ordinal index of the selected option, starting from 0. The value -1 + * is returned if no element is selected. If multiple options are + * selected, the index of the first selected option is returned. + */ + public int getSelectedIndex(); + /** + * The ordinal index of the selected option, starting from 0. The value -1 + * is returned if no element is selected. If multiple options are + * selected, the index of the first selected option is returned. + */ + public void setSelectedIndex(int selectedIndex); + + /** + * The current form control value (i.e. the value of the currently + * selected option), if multiple options are selected this is the value + * of the first selected option. + */ + public String getValue(); + /** + * The current form control value (i.e. the value of the currently + * selected option), if multiple options are selected this is the value + * of the first selected option. + */ + public void setValue(String value); + + /** + * The number of options in this SELECT. + * @version DOM Level 2 + */ + public int getLength(); + /** + * The number of options in this SELECT. + * @exception DOMException + * NOT_SUPPORTED_ERR: if setting the length is not allowed by the + * implementation. + * @version DOM Level 2 + */ + public void setLength(int length) + throws DOMException; + + /** + * Returns the FORM element containing this control. Returns + * null if this control is not within the context of a + * form. + */ + public HTMLFormElement getForm(); + + /** + * The collection of OPTION elements contained by this + * element. + * @version DOM Level 2 + */ + public HTMLOptionsCollection getOptions(); + + /** + * The control is unavailable in this context. See the disabled attribute + * definition in HTML 4.01. + */ + public boolean getDisabled(); + /** + * The control is unavailable in this context. See the disabled attribute + * definition in HTML 4.01. + */ + public void setDisabled(boolean disabled); + + /** + * If true, multiple OPTION elements may be selected in this + * SELECT. See the multiple attribute definition in HTML + * 4.01. + */ + public boolean getMultiple(); + /** + * If true, multiple OPTION elements may be selected in this + * SELECT. See the multiple attribute definition in HTML + * 4.01. + */ + public void setMultiple(boolean multiple); + + /** + * Form control or object name when submitted with a form. See the name + * attribute definition in HTML 4.01. + */ + public String getName(); + /** + * Form control or object name when submitted with a form. See the name + * attribute definition in HTML 4.01. + */ + public void setName(String name); + + /** + * Number of visible rows. See the size attribute definition in HTML 4.01. + */ + public int getSize(); + /** + * Number of visible rows. See the size attribute definition in HTML 4.01. + */ + public void setSize(int size); + + /** + * Index that represents the element's position in the tabbing order. See + * the tabindex attribute definition in HTML 4.01. + */ + public int getTabIndex(); + /** + * Index that represents the element's position in the tabbing order. See + * the tabindex attribute definition in HTML 4.01. + */ + public void setTabIndex(int tabIndex); + + /** + * Add a new element to the collection of OPTION elements for + * this SELECT. This method is the equivalent of the + * appendChild method of the Node interface if + * the before parameter is null. It is + * equivalent to the insertBefore method on the parent of + * before in all other cases. This method may have no + * effect if the new element is not an OPTION or an + * OPTGROUP. + * @param element The element to add. + * @param before The element to insert before, or null for + * the tail of the list. + * @exception DOMException + * NOT_FOUND_ERR: Raised if before is not a descendant of + * the SELECT element. + */ + public void add(HTMLElement element, + HTMLElement before) + throws DOMException; + + /** + * Remove an element from the collection of OPTION elements + * for this SELECT. Does nothing if no element has the + * given index. + * @param index The index of the item to remove, starting from 0. + */ + public void remove(int index); + + /** + * Removes keyboard focus from this element. + */ + public void blur(); + + /** + * Gives keyboard focus to this element. + */ + public void focus(); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLStyleElement.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLStyleElement.java new file mode 100644 index 000000000..2512d63a6 --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLStyleElement.java @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2003 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. + */ + +package org.w3c.dom.html2; + +/** + * Style information. See the STYLE element definition in HTML 4.01, the CSS + * module [DOM Level 2 Style Sheets and CSS] and the LinkStyle interface in the StyleSheets + * module [DOM Level 2 Style Sheets and CSS]. + *

See also the Document Object Model (DOM) Level 2 HTML Specification. + */ +public interface HTMLStyleElement extends HTMLElement { + /** + * Enables/disables the style sheet. + */ + public boolean getDisabled(); + /** + * Enables/disables the style sheet. + */ + public void setDisabled(boolean disabled); + + /** + * Designed for use with one or more target media. See the media attribute + * definition in HTML 4.01. + */ + public String getMedia(); + /** + * Designed for use with one or more target media. See the media attribute + * definition in HTML 4.01. + */ + public void setMedia(String media); + + /** + * The content type of the style sheet language. See the type attribute + * definition in HTML 4.01. + */ + public String getType(); + /** + * The content type of the style sheet language. See the type attribute + * definition in HTML 4.01. + */ + public void setType(String type); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLTableCaptionElement.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLTableCaptionElement.java new file mode 100644 index 000000000..47466e9e9 --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLTableCaptionElement.java @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2003 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. + */ + +package org.w3c.dom.html2; + +/** + * Table caption See the CAPTION element definition in HTML 4.01. + *

See also the Document Object Model (DOM) Level 2 HTML Specification. + */ +public interface HTMLTableCaptionElement extends HTMLElement { + /** + * Caption alignment with respect to the table. See the align attribute + * definition in HTML 4.01. This attribute is deprecated in HTML 4.01. + */ + public String getAlign(); + /** + * Caption alignment with respect to the table. See the align attribute + * definition in HTML 4.01. This attribute is deprecated in HTML 4.01. + */ + public void setAlign(String align); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLTableCellElement.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLTableCellElement.java new file mode 100644 index 000000000..2e4db7095 --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLTableCellElement.java @@ -0,0 +1,181 @@ +/* + * Copyright (c) 2003 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. + */ + +package org.w3c.dom.html2; + +/** + * The object used to represent the TH and TD + * elements. See the TD element definition in HTML 4.01. + *

See also the Document Object Model (DOM) Level 2 HTML Specification. + */ +public interface HTMLTableCellElement extends HTMLElement { + /** + * The index of this cell in the row, starting from 0. This index is in + * document tree order and not display order. + */ + public int getCellIndex(); + + /** + * Abbreviation for header cells. See the abbr attribute definition in + * HTML 4.01. + */ + public String getAbbr(); + /** + * Abbreviation for header cells. See the abbr attribute definition in + * HTML 4.01. + */ + public void setAbbr(String abbr); + + /** + * Horizontal alignment of data in cell. See the align attribute definition + * in HTML 4.01. + */ + public String getAlign(); + /** + * Horizontal alignment of data in cell. See the align attribute definition + * in HTML 4.01. + */ + public void setAlign(String align); + + /** + * Names group of related headers. See the axis attribute definition in + * HTML 4.01. + */ + public String getAxis(); + /** + * Names group of related headers. See the axis attribute definition in + * HTML 4.01. + */ + public void setAxis(String axis); + + /** + * Cell background color. See the bgcolor attribute definition in HTML + * 4.01. This attribute is deprecated in HTML 4.01. + */ + public String getBgColor(); + /** + * Cell background color. See the bgcolor attribute definition in HTML + * 4.01. This attribute is deprecated in HTML 4.01. + */ + public void setBgColor(String bgColor); + + /** + * Alignment character for cells in a column. See the char attribute + * definition in HTML 4.01. + */ + public String getCh(); + /** + * Alignment character for cells in a column. See the char attribute + * definition in HTML 4.01. + */ + public void setCh(String ch); + + /** + * Offset of alignment character. See the charoff attribute definition in + * HTML 4.01. + */ + public String getChOff(); + /** + * Offset of alignment character. See the charoff attribute definition in + * HTML 4.01. + */ + public void setChOff(String chOff); + + /** + * Number of columns spanned by cell. See the colspan attribute definition + * in HTML 4.01. + */ + public int getColSpan(); + /** + * Number of columns spanned by cell. See the colspan attribute definition + * in HTML 4.01. + */ + public void setColSpan(int colSpan); + + /** + * List of id attribute values for header cells. See the + * headers attribute definition in HTML 4.01. + */ + public String getHeaders(); + /** + * List of id attribute values for header cells. See the + * headers attribute definition in HTML 4.01. + */ + public void setHeaders(String headers); + + /** + * Cell height. See the height attribute definition in HTML 4.01. This + * attribute is deprecated in HTML 4.01. + */ + public String getHeight(); + /** + * Cell height. See the height attribute definition in HTML 4.01. This + * attribute is deprecated in HTML 4.01. + */ + public void setHeight(String height); + + /** + * Suppress word wrapping. See the nowrap attribute definition in HTML + * 4.01. This attribute is deprecated in HTML 4.01. + */ + public boolean getNoWrap(); + /** + * Suppress word wrapping. See the nowrap attribute definition in HTML + * 4.01. This attribute is deprecated in HTML 4.01. + */ + public void setNoWrap(boolean noWrap); + + /** + * Number of rows spanned by cell. See the rowspan attribute definition in + * HTML 4.01. + */ + public int getRowSpan(); + /** + * Number of rows spanned by cell. See the rowspan attribute definition in + * HTML 4.01. + */ + public void setRowSpan(int rowSpan); + + /** + * Scope covered by header cells. See the scope attribute definition in + * HTML 4.01. + */ + public String getScope(); + /** + * Scope covered by header cells. See the scope attribute definition in + * HTML 4.01. + */ + public void setScope(String scope); + + /** + * Vertical alignment of data in cell. See the valign attribute definition + * in HTML 4.01. + */ + public String getVAlign(); + /** + * Vertical alignment of data in cell. See the valign attribute definition + * in HTML 4.01. + */ + public void setVAlign(String vAlign); + + /** + * Cell width. See the width attribute definition in HTML 4.01. This + * attribute is deprecated in HTML 4.01. + */ + public String getWidth(); + /** + * Cell width. See the width attribute definition in HTML 4.01. This + * attribute is deprecated in HTML 4.01. + */ + public void setWidth(String width); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLTableColElement.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLTableColElement.java new file mode 100644 index 000000000..57bb35cfc --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLTableColElement.java @@ -0,0 +1,85 @@ +/* + * Copyright (c) 2003 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. + */ + +package org.w3c.dom.html2; + +/** + * Regroups the COL and COLGROUP elements. See the + * COL element definition in HTML 4.01. + *

See also the Document Object Model (DOM) Level 2 HTML Specification. + */ +public interface HTMLTableColElement extends HTMLElement { + /** + * Horizontal alignment of cell data in column. See the align attribute + * definition in HTML 4.01. + */ + public String getAlign(); + /** + * Horizontal alignment of cell data in column. See the align attribute + * definition in HTML 4.01. + */ + public void setAlign(String align); + + /** + * Alignment character for cells in a column. See the char attribute + * definition in HTML 4.01. + */ + public String getCh(); + /** + * Alignment character for cells in a column. See the char attribute + * definition in HTML 4.01. + */ + public void setCh(String ch); + + /** + * Offset of alignment character. See the charoff attribute definition in + * HTML 4.01. + */ + public String getChOff(); + /** + * Offset of alignment character. See the charoff attribute definition in + * HTML 4.01. + */ + public void setChOff(String chOff); + + /** + * Indicates the number of columns in a group or affected by a grouping. + * See the span attribute definition in HTML 4.01. + */ + public int getSpan(); + /** + * Indicates the number of columns in a group or affected by a grouping. + * See the span attribute definition in HTML 4.01. + */ + public void setSpan(int span); + + /** + * Vertical alignment of cell data in column. See the valign attribute + * definition in HTML 4.01. + */ + public String getVAlign(); + /** + * Vertical alignment of cell data in column. See the valign attribute + * definition in HTML 4.01. + */ + public void setVAlign(String vAlign); + + /** + * Default column width. See the width attribute definition in HTML 4.01. + */ + public String getWidth(); + /** + * Default column width. See the width attribute definition in HTML 4.01. + */ + public void setWidth(String width); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLTableElement.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLTableElement.java new file mode 100644 index 000000000..ae15deb77 --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLTableElement.java @@ -0,0 +1,254 @@ +/* + * Copyright (c) 2003 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. + */ + +package org.w3c.dom.html2; + +import org.w3c.dom.DOMException; + +/** + * The create* and delete* methods on the table allow authors to construct and + * modify tables. [HTML 4.01] specifies that only one of each of the + * CAPTION, THEAD, and TFOOT elements + * may exist in a table. Therefore, if one exists, and the createTHead() or + * createTFoot() method is called, the method returns the existing THead or + * TFoot element. See the TABLE element definition in HTML 4.01. + *

See also the Document Object Model (DOM) Level 2 HTML Specification. + */ +public interface HTMLTableElement extends HTMLElement { + /** + * Returns the table's CAPTION, or void if none exists. + * @version DOM Level 2 + */ + public HTMLTableCaptionElement getCaption(); + /** + * Returns the table's CAPTION, or void if none exists. + * @exception DOMException + * HIERARCHY_REQUEST_ERR: if the element is not a CAPTION. + * @version DOM Level 2 + */ + public void setCaption(HTMLTableCaptionElement caption) + throws DOMException; + + /** + * Returns the table's THEAD, or null if none + * exists. + * @version DOM Level 2 + */ + public HTMLTableSectionElement getTHead(); + /** + * Returns the table's THEAD, or null if none + * exists. + * @exception DOMException + * HIERARCHY_REQUEST_ERR: if the element is not a THEAD. + * @version DOM Level 2 + */ + public void setTHead(HTMLTableSectionElement tHead) + throws DOMException; + + /** + * Returns the table's TFOOT, or null if none + * exists. + * @version DOM Level 2 + */ + public HTMLTableSectionElement getTFoot(); + /** + * Returns the table's TFOOT, or null if none + * exists. + * @exception DOMException + * HIERARCHY_REQUEST_ERR: if the element is not a TFOOT. + * @version DOM Level 2 + */ + public void setTFoot(HTMLTableSectionElement tFoot) + throws DOMException; + + /** + * Returns a collection of all the rows in the table, including all in + * THEAD, TFOOT, all TBODY + * elements. + */ + public HTMLCollection getRows(); + + /** + * Returns a collection of the table bodies (including implicit ones). + */ + public HTMLCollection getTBodies(); + + /** + * Specifies the table's position with respect to the rest of the + * document. See the align attribute definition in HTML 4.01. This + * attribute is deprecated in HTML 4.01. + */ + public String getAlign(); + /** + * Specifies the table's position with respect to the rest of the + * document. See the align attribute definition in HTML 4.01. This + * attribute is deprecated in HTML 4.01. + */ + public void setAlign(String align); + + /** + * Cell background color. See the bgcolor attribute definition in HTML + * 4.01. This attribute is deprecated in HTML 4.01. + */ + public String getBgColor(); + /** + * Cell background color. See the bgcolor attribute definition in HTML + * 4.01. This attribute is deprecated in HTML 4.01. + */ + public void setBgColor(String bgColor); + + /** + * The width of the border around the table. See the border attribute + * definition in HTML 4.01. + */ + public String getBorder(); + /** + * The width of the border around the table. See the border attribute + * definition in HTML 4.01. + */ + public void setBorder(String border); + + /** + * Specifies the horizontal and vertical space between cell content and + * cell borders. See the cellpadding attribute definition in HTML 4.01. + */ + public String getCellPadding(); + /** + * Specifies the horizontal and vertical space between cell content and + * cell borders. See the cellpadding attribute definition in HTML 4.01. + */ + public void setCellPadding(String cellPadding); + + /** + * Specifies the horizontal and vertical separation between cells. See the + * cellspacing attribute definition in HTML 4.01. + */ + public String getCellSpacing(); + /** + * Specifies the horizontal and vertical separation between cells. See the + * cellspacing attribute definition in HTML 4.01. + */ + public void setCellSpacing(String cellSpacing); + + /** + * Specifies which external table borders to render. See the frame + * attribute definition in HTML 4.01. + */ + public String getFrame(); + /** + * Specifies which external table borders to render. See the frame + * attribute definition in HTML 4.01. + */ + public void setFrame(String frame); + + /** + * Specifies which internal table borders to render. See the rules + * attribute definition in HTML 4.01. + */ + public String getRules(); + /** + * Specifies which internal table borders to render. See the rules + * attribute definition in HTML 4.01. + */ + public void setRules(String rules); + + /** + * Description about the purpose or structure of a table. See the summary + * attribute definition in HTML 4.01. + */ + public String getSummary(); + /** + * Description about the purpose or structure of a table. See the summary + * attribute definition in HTML 4.01. + */ + public void setSummary(String summary); + + /** + * Specifies the desired table width. See the width attribute definition + * in HTML 4.01. + */ + public String getWidth(); + /** + * Specifies the desired table width. See the width attribute definition + * in HTML 4.01. + */ + public void setWidth(String width); + + /** + * Create a table header row or return an existing one. + * @return A new table header element (THEAD). + */ + public HTMLElement createTHead(); + + /** + * Delete the header from the table, if one exists. + */ + public void deleteTHead(); + + /** + * Create a table footer row or return an existing one. + * @return A footer element (TFOOT). + */ + public HTMLElement createTFoot(); + + /** + * Delete the footer from the table, if one exists. + */ + public void deleteTFoot(); + + /** + * Create a new table caption object or return an existing one. + * @return A CAPTION element. + */ + public HTMLElement createCaption(); + + /** + * Delete the table caption, if one exists. + */ + public void deleteCaption(); + + /** + * Insert a new empty row in the table. The new row is inserted + * immediately before and in the same section as the current + * indexth row in the table. If index is -1 or + * equal to the number of rows, the new row is appended. In addition, + * when the table is empty the row is inserted into a TBODY + * which is created and inserted into the table.A table row cannot be + * empty according to [HTML 4.01]. + * @param index The row number where to insert a new row. This index + * starts from 0 and is relative to the logical order (not document + * order) of all the rows contained inside the table. + * @return The newly created row. + * @exception DOMException + * INDEX_SIZE_ERR: Raised if the specified index is greater than the + * number of rows or if the index is a negative number other than -1. + * @version DOM Level 2 + */ + public HTMLElement insertRow(int index) + throws DOMException; + + /** + * Delete a table row. + * @param index The index of the row to be deleted. This index starts + * from 0 and is relative to the logical order (not document order) of + * all the rows contained inside the table. If the index is -1 the + * last row in the table is deleted. + * @exception DOMException + * INDEX_SIZE_ERR: Raised if the specified index is greater than or + * equal to the number of rows or if the index is a negative number + * other than -1. + * @version DOM Level 2 + */ + public void deleteRow(int index) + throws DOMException; + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLTableRowElement.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLTableRowElement.java new file mode 100644 index 000000000..8c3618f39 --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLTableRowElement.java @@ -0,0 +1,130 @@ +/* + * Copyright (c) 2003 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. + */ + +package org.w3c.dom.html2; + +import org.w3c.dom.DOMException; + +/** + * A row in a table. See the TR element definition in HTML 4.01. + *

See also the Document Object Model (DOM) Level 2 HTML Specification. + */ +public interface HTMLTableRowElement extends HTMLElement { + /** + * This is in logical order and not in document order. The + * rowIndex does take into account sections ( + * THEAD, TFOOT, or TBODY) within + * the table, placing THEAD rows first in the index, + * followed by TBODY rows, followed by TFOOT + * rows. + * @version DOM Level 2 + */ + public int getRowIndex(); + + /** + * The index of this row, relative to the current section ( + * THEAD, TFOOT, or TBODY), + * starting from 0. + * @version DOM Level 2 + */ + public int getSectionRowIndex(); + + /** + * The collection of cells in this row. + * @version DOM Level 2 + */ + public HTMLCollection getCells(); + + /** + * Horizontal alignment of data within cells of this row. See the align + * attribute definition in HTML 4.01. + */ + public String getAlign(); + /** + * Horizontal alignment of data within cells of this row. See the align + * attribute definition in HTML 4.01. + */ + public void setAlign(String align); + + /** + * Background color for rows. See the bgcolor attribute definition in HTML + * 4.01. This attribute is deprecated in HTML 4.01. + */ + public String getBgColor(); + /** + * Background color for rows. See the bgcolor attribute definition in HTML + * 4.01. This attribute is deprecated in HTML 4.01. + */ + public void setBgColor(String bgColor); + + /** + * Alignment character for cells in a column. See the char attribute + * definition in HTML 4.01. + */ + public String getCh(); + /** + * Alignment character for cells in a column. See the char attribute + * definition in HTML 4.01. + */ + public void setCh(String ch); + + /** + * Offset of alignment character. See the charoff attribute definition in + * HTML 4.01. + */ + public String getChOff(); + /** + * Offset of alignment character. See the charoff attribute definition in + * HTML 4.01. + */ + public void setChOff(String chOff); + + /** + * Vertical alignment of data within cells of this row. See the valign + * attribute definition in HTML 4.01. + */ + public String getVAlign(); + /** + * Vertical alignment of data within cells of this row. See the valign + * attribute definition in HTML 4.01. + */ + public void setVAlign(String vAlign); + + /** + * Insert an empty TD cell into this row. If + * index is -1 or equal to the number of cells, the new + * cell is appended. + * @param index The place to insert the cell, starting from 0. + * @return The newly created cell. + * @exception DOMException + * INDEX_SIZE_ERR: Raised if the specified index is greater + * than the number of cells or if the index is a negative number other + * than -1. + * @version DOM Level 2 + */ + public HTMLElement insertCell(int index) + throws DOMException; + + /** + * Delete a cell from the current row. + * @param index The index of the cell to delete, starting from 0. If the + * index is -1 the last cell in the row is deleted. + * @exception DOMException + * INDEX_SIZE_ERR: Raised if the specified index is greater + * than or equal to the number of cells or if the index is a negative + * number other than -1. + * @version DOM Level 2 + */ + public void deleteCell(int index) + throws DOMException; + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLTableSectionElement.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLTableSectionElement.java new file mode 100644 index 000000000..5e3d6e53f --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLTableSectionElement.java @@ -0,0 +1,103 @@ +/* + * Copyright (c) 2003 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. + */ + +package org.w3c.dom.html2; + +import org.w3c.dom.DOMException; + +/** + * The THEAD, TFOOT, and TBODY + * elements. + *

See also the Document Object Model (DOM) Level 2 HTML Specification. + */ +public interface HTMLTableSectionElement extends HTMLElement { + /** + * Horizontal alignment of data in cells. See the align + * attribute for HTMLTheadElement for details. + */ + public String getAlign(); + /** + * Horizontal alignment of data in cells. See the align + * attribute for HTMLTheadElement for details. + */ + public void setAlign(String align); + + /** + * Alignment character for cells in a column. See the char attribute + * definition in HTML 4.01. + */ + public String getCh(); + /** + * Alignment character for cells in a column. See the char attribute + * definition in HTML 4.01. + */ + public void setCh(String ch); + + /** + * Offset of alignment character. See the charoff attribute definition in + * HTML 4.01. + */ + public String getChOff(); + /** + * Offset of alignment character. See the charoff attribute definition in + * HTML 4.01. + */ + public void setChOff(String chOff); + + /** + * Vertical alignment of data in cells. See the valign + * attribute for HTMLTheadElement for details. + */ + public String getVAlign(); + /** + * Vertical alignment of data in cells. See the valign + * attribute for HTMLTheadElement for details. + */ + public void setVAlign(String vAlign); + + /** + * The collection of rows in this table section. + */ + public HTMLCollection getRows(); + + /** + * Insert a row into this section. The new row is inserted immediately + * before the current indexth row in this section. If + * index is -1 or equal to the number of rows in this + * section, the new row is appended. + * @param index The row number where to insert a new row. This index + * starts from 0 and is relative only to the rows contained inside + * this section, not all the rows in the table. + * @return The newly created row. + * @exception DOMException + * INDEX_SIZE_ERR: Raised if the specified index is greater than the + * number of rows of if the index is a negative number other than -1. + * @version DOM Level 2 + */ + public HTMLElement insertRow(int index) + throws DOMException; + + /** + * Delete a row from this section. + * @param index The index of the row to be deleted, or -1 to delete the + * last row. This index starts from 0 and is relative only to the rows + * contained inside this section, not all the rows in the table. + * @exception DOMException + * INDEX_SIZE_ERR: Raised if the specified index is greater than or + * equal to the number of rows or if the index is a negative number + * other than -1. + * @version DOM Level 2 + */ + public void deleteRow(int index) + throws DOMException; + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLTextAreaElement.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLTextAreaElement.java new file mode 100644 index 000000000..caabe4a19 --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLTextAreaElement.java @@ -0,0 +1,154 @@ +/* + * Copyright (c) 2003 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. + */ + +package org.w3c.dom.html2; + +/** + * Multi-line text field. See the TEXTAREA element definition in HTML 4.01. + *

See also the Document Object Model (DOM) Level 2 HTML Specification. + */ +public interface HTMLTextAreaElement extends HTMLElement { + /** + * Represents the contents of the element. The value of this attribute + * does not change if the contents of the corresponding form control, in + * an interactive user agent, changes. + * @version DOM Level 2 + */ + public String getDefaultValue(); + /** + * Represents the contents of the element. The value of this attribute + * does not change if the contents of the corresponding form control, in + * an interactive user agent, changes. + * @version DOM Level 2 + */ + public void setDefaultValue(String defaultValue); + + /** + * Returns the FORM element containing this control. Returns + * null if this control is not within the context of a + * form. + */ + public HTMLFormElement getForm(); + + /** + * A single character access key to give access to the form control. See + * the accesskey attribute definition in HTML 4.01. + */ + public String getAccessKey(); + /** + * A single character access key to give access to the form control. See + * the accesskey attribute definition in HTML 4.01. + */ + public void setAccessKey(String accessKey); + + /** + * Width of control (in characters). See the cols attribute definition in + * HTML 4.01. + */ + public int getCols(); + /** + * Width of control (in characters). See the cols attribute definition in + * HTML 4.01. + */ + public void setCols(int cols); + + /** + * The control is unavailable in this context. See the disabled attribute + * definition in HTML 4.01. + */ + public boolean getDisabled(); + /** + * The control is unavailable in this context. See the disabled attribute + * definition in HTML 4.01. + */ + public void setDisabled(boolean disabled); + + /** + * Form control or object name when submitted with a form. See the name + * attribute definition in HTML 4.01. + */ + public String getName(); + /** + * Form control or object name when submitted with a form. See the name + * attribute definition in HTML 4.01. + */ + public void setName(String name); + + /** + * This control is read-only. See the readonly attribute definition in + * HTML 4.01. + */ + public boolean getReadOnly(); + /** + * This control is read-only. See the readonly attribute definition in + * HTML 4.01. + */ + public void setReadOnly(boolean readOnly); + + /** + * Number of text rows. See the rows attribute definition in HTML 4.01. + */ + public int getRows(); + /** + * Number of text rows. See the rows attribute definition in HTML 4.01. + */ + public void setRows(int rows); + + /** + * Index that represents the element's position in the tabbing order. See + * the tabindex attribute definition in HTML 4.01. + */ + public int getTabIndex(); + /** + * Index that represents the element's position in the tabbing order. See + * the tabindex attribute definition in HTML 4.01. + */ + public void setTabIndex(int tabIndex); + + /** + * The type of this form control. This the string "textarea". + */ + public String getType(); + + /** + * Represents the current contents of the corresponding form control, in + * an interactive user agent. Changing this attribute changes the + * contents of the form control, but does not change the contents of the + * element. If the entirety of the data can not fit into a single + * DOMString, the implementation may truncate the data. + */ + public String getValue(); + /** + * Represents the current contents of the corresponding form control, in + * an interactive user agent. Changing this attribute changes the + * contents of the form control, but does not change the contents of the + * element. If the entirety of the data can not fit into a single + * DOMString, the implementation may truncate the data. + */ + public void setValue(String value); + + /** + * Removes keyboard focus from this element. + */ + public void blur(); + + /** + * Gives keyboard focus to this element. + */ + public void focus(); + + /** + * Select the contents of the TEXTAREA. + */ + public void select(); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLTitleElement.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLTitleElement.java new file mode 100644 index 000000000..a86b3a926 --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLTitleElement.java @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2003 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. + */ + +package org.w3c.dom.html2; + +/** + * The document title. See the TITLE element definition in HTML 4.01. + *

See also the Document Object Model (DOM) Level 2 HTML Specification. + */ +public interface HTMLTitleElement extends HTMLElement { + /** + * The specified title as a string. + */ + public String getText(); + /** + * The specified title as a string. + */ + public void setText(String text); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLUListElement.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLUListElement.java new file mode 100644 index 000000000..e5828fd39 --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/html2/HTMLUListElement.java @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2003 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. + */ + +package org.w3c.dom.html2; + +/** + * Unordered list. See the UL element definition in HTML 4.01. + *

See also the Document Object Model (DOM) Level 2 HTML Specification. + */ +public interface HTMLUListElement extends HTMLElement { + /** + * Reduce spacing between list items. See the compact attribute definition + * in HTML 4.01. This attribute is deprecated in HTML 4.01. + */ + public boolean getCompact(); + /** + * Reduce spacing between list items. See the compact attribute definition + * in HTML 4.01. This attribute is deprecated in HTML 4.01. + */ + public void setCompact(boolean compact); + + /** + * Bullet style. See the type attribute definition in HTML 4.01. This + * attribute is deprecated in HTML 4.01. + */ + public String getType(); + /** + * Bullet style. See the type attribute definition in HTML 4.01. This + * attribute is deprecated in HTML 4.01. + */ + public void setType(String type); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/ls/DOMImplementationLS.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/ls/DOMImplementationLS.java new file mode 100644 index 000000000..4d1b0971d --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/ls/DOMImplementationLS.java @@ -0,0 +1,122 @@ +/* + * 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 + */ + +package org.w3c.dom.ls; + +import org.w3c.dom.DOMException; + +/** + * DOMImplementationLS contains the factory methods for creating + * Load and Save objects. + *

The expectation is that an instance of the + * DOMImplementationLS interface can be obtained by using + * binding-specific casting methods on an instance of the + * DOMImplementation interface or, if the Document + * supports the feature "Core" version "3.0" + * defined in [DOM Level 3 Core] + * , by using the method DOMImplementation.getFeature with + * parameter values "LS" (or "LS-Async") and + * "3.0" (respectively). + *

See also the Document Object Model (DOM) Level 3 Load +and Save Specification. + */ +public interface DOMImplementationLS { + // DOMImplementationLSMode + /** + * Create a synchronous LSParser. + */ + public static final short MODE_SYNCHRONOUS = 1; + /** + * Create an asynchronous LSParser. + */ + public static final short MODE_ASYNCHRONOUS = 2; + + /** + * Create a new LSParser. The newly constructed parser may + * then be configured by means of its DOMConfiguration + * object, and used to parse documents by means of its parse + * method. + * @param mode The mode argument is either + * MODE_SYNCHRONOUS or MODE_ASYNCHRONOUS, if + * mode is MODE_SYNCHRONOUS then the + * LSParser that is created will operate in synchronous + * mode, if it's MODE_ASYNCHRONOUS then the + * LSParser that is created will operate in asynchronous + * mode. + * @param schemaType An absolute URI representing the type of the schema + * language used during the load of a Document using the + * newly created LSParser. Note that no lexical checking + * is done on the absolute URI. In order to create a + * LSParser for any kind of schema types (i.e. the + * LSParser will be free to use any schema found), use the value + * null. + *

Note: For W3C XML Schema [XML Schema Part 1] + * , applications must use the value + * "http://www.w3.org/2001/XMLSchema". For XML DTD [XML 1.0], + * applications must use the value + * "http://www.w3.org/TR/REC-xml". Other Schema languages + * are outside the scope of the W3C and therefore should recommend an + * absolute URI in order to use this method. + * @return The newly created LSParser object. This + * LSParser is either synchronous or asynchronous + * depending on the value of the mode argument. + *

Note: By default, the newly created LSParser + * does not contain a DOMErrorHandler, i.e. the value of + * the " + * error-handler" configuration parameter is null. However, implementations + * may provide a default error handler at creation time. In that case, + * the initial value of the "error-handler" configuration + * parameter on the new LSParser object contains a + * reference to the default error handler. + * @exception DOMException + * NOT_SUPPORTED_ERR: Raised if the requested mode or schema type is + * not supported. + */ + public LSParser createLSParser(short mode, + String schemaType) + throws DOMException; + + /** + * Create a new LSSerializer object. + * @return The newly created LSSerializer object. + *

Note: By default, the newly created + * LSSerializer has no DOMErrorHandler, i.e. + * the value of the "error-handler" configuration + * parameter is null. However, implementations may + * provide a default error handler at creation time. In that case, the + * initial value of the "error-handler" configuration + * parameter on the new LSSerializer object contains a + * reference to the default error handler. + */ + public LSSerializer createLSSerializer(); + + /** + * Create a new empty input source object where + * LSInput.characterStream, LSInput.byteStream + * , LSInput.stringData LSInput.systemId, + * LSInput.publicId, LSInput.baseURI, and + * LSInput.encoding are null, and + * LSInput.certifiedText is false. + * @return The newly created input object. + */ + public LSInput createLSInput(); + + /** + * Create a new empty output destination object where + * LSOutput.characterStream, + * LSOutput.byteStream, LSOutput.systemId, + * LSOutput.encoding are null. + * @return The newly created output object. + */ + public LSOutput createLSOutput(); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/ls/LSException.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/ls/LSException.java new file mode 100644 index 000000000..677ad385c --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/ls/LSException.java @@ -0,0 +1,47 @@ +/* + * 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 + */ + +package org.w3c.dom.ls; + +/** + * Parser or write operations may throw an LSException if the + * processing is stopped. The processing can be stopped due to a + * DOMError with a severity of + * DOMError.SEVERITY_FATAL_ERROR or a non recovered + * DOMError.SEVERITY_ERROR, or if + * DOMErrorHandler.handleError() returned false. + *

Note: As suggested in the definition of the constants in the + * DOMError interface, a DOM implementation may choose to + * continue after a fatal error, but the resulting DOM tree is then + * implementation dependent. + *

See also the Document Object Model (DOM) Level 3 Load +and Save Specification. + */ +public class LSException extends RuntimeException { + public LSException(short code, String message) { + super(message); + this.code = code; + } + public short code; + // LSExceptionCode + /** + * If an attempt was made to load a document, or an XML Fragment, using + * LSParser and the processing has been stopped. + */ + public static final short PARSE_ERR = 81; + /** + * If an attempt was made to serialize a Node using + * LSSerializer and the processing has been stopped. + */ + public static final short SERIALIZE_ERR = 82; + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/ls/LSInput.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/ls/LSInput.java new file mode 100644 index 000000000..bba1792cd --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/ls/LSInput.java @@ -0,0 +1,218 @@ +/* + * 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 + */ + +package org.w3c.dom.ls; + +/** + * This interface represents an input source for data. + *

This interface allows an application to encapsulate information about + * an input source in a single object, which may include a public + * identifier, a system identifier, a byte stream (possibly with a specified + * encoding), a base URI, and/or a character stream. + *

The exact definitions of a byte stream and a character stream are + * binding dependent. + *

The application is expected to provide objects that implement this + * interface whenever such objects are needed. The application can either + * provide its own objects that implement this interface, or it can use the + * generic factory method DOMImplementationLS.createLSInput() + * to create objects that implement this interface. + *

The LSParser will use the LSInput object to + * determine how to read data. The LSParser will look at the + * different inputs specified in the LSInput in the following + * order to know which one to read from, the first one that is not null and + * not an empty string will be used: + *

    + *
  1. LSInput.characterStream + *
  2. + *
  3. + * LSInput.byteStream + *
  4. + *
  5. LSInput.stringData + *
  6. + *
  7. + * LSInput.systemId + *
  8. + *
  9. LSInput.publicId + *
  10. + *
+ *

If all inputs are null, the LSParser will report a + * DOMError with its DOMError.type set to + * "no-input-specified" and its DOMError.severity + * set to DOMError.SEVERITY_FATAL_ERROR. + *

LSInput objects belong to the application. The DOM + * implementation will never modify them (though it may make copies and + * modify the copies, if necessary). + *

See also the Document Object Model (DOM) Level 3 Load +and Save Specification. + */ +public interface LSInput { + /** + * An attribute of a language and binding dependent type that represents + * a stream of 16-bit units. The application must encode the stream + * using UTF-16 (defined in [Unicode] and in [ISO/IEC 10646]). It is not a requirement to have an XML declaration when + * using character streams. If an XML declaration is present, the value + * of the encoding attribute will be ignored. + */ + public java.io.Reader getCharacterStream(); + /** + * An attribute of a language and binding dependent type that represents + * a stream of 16-bit units. The application must encode the stream + * using UTF-16 (defined in [Unicode] and in [ISO/IEC 10646]). It is not a requirement to have an XML declaration when + * using character streams. If an XML declaration is present, the value + * of the encoding attribute will be ignored. + */ + public void setCharacterStream(java.io.Reader characterStream); + + /** + * An attribute of a language and binding dependent type that represents + * a stream of bytes. + *
If the application knows the character encoding of the byte + * stream, it should set the encoding attribute. Setting the encoding in + * this way will override any encoding specified in an XML declaration + * in the data. + */ + public java.io.InputStream getByteStream(); + /** + * An attribute of a language and binding dependent type that represents + * a stream of bytes. + *
If the application knows the character encoding of the byte + * stream, it should set the encoding attribute. Setting the encoding in + * this way will override any encoding specified in an XML declaration + * in the data. + */ + public void setByteStream(java.io.InputStream byteStream); + + /** + * String data to parse. If provided, this will always be treated as a + * sequence of 16-bit units (UTF-16 encoded characters). It is not a + * requirement to have an XML declaration when using + * stringData. If an XML declaration is present, the value + * of the encoding attribute will be ignored. + */ + public String getStringData(); + /** + * String data to parse. If provided, this will always be treated as a + * sequence of 16-bit units (UTF-16 encoded characters). It is not a + * requirement to have an XML declaration when using + * stringData. If an XML declaration is present, the value + * of the encoding attribute will be ignored. + */ + public void setStringData(String stringData); + + /** + * The system identifier, a URI reference [IETF RFC 2396], for this + * input source. The system identifier is optional if there is a byte + * stream, a character stream, or string data. It is still useful to + * provide one, since the application will use it to resolve any + * relative URIs and can include it in error messages and warnings. (The + * LSParser will only attempt to fetch the resource identified by the + * URI reference if there is no other input available in the input + * source.) + *
If the application knows the character encoding of the object + * pointed to by the system identifier, it can set the encoding using + * the encoding attribute. + *
If the specified system ID is a relative URI reference (see + * section 5 in [IETF RFC 2396]), the DOM + * implementation will attempt to resolve the relative URI with the + * baseURI as the base, if that fails, the behavior is + * implementation dependent. + */ + public String getSystemId(); + /** + * The system identifier, a URI reference [IETF RFC 2396], for this + * input source. The system identifier is optional if there is a byte + * stream, a character stream, or string data. It is still useful to + * provide one, since the application will use it to resolve any + * relative URIs and can include it in error messages and warnings. (The + * LSParser will only attempt to fetch the resource identified by the + * URI reference if there is no other input available in the input + * source.) + *
If the application knows the character encoding of the object + * pointed to by the system identifier, it can set the encoding using + * the encoding attribute. + *
If the specified system ID is a relative URI reference (see + * section 5 in [IETF RFC 2396]), the DOM + * implementation will attempt to resolve the relative URI with the + * baseURI as the base, if that fails, the behavior is + * implementation dependent. + */ + public void setSystemId(String systemId); + + /** + * The public identifier for this input source. This may be mapped to an + * input source using an implementation dependent mechanism (such as + * catalogues or other mappings). The public identifier, if specified, + * may also be reported as part of the location information when errors + * are reported. + */ + public String getPublicId(); + /** + * The public identifier for this input source. This may be mapped to an + * input source using an implementation dependent mechanism (such as + * catalogues or other mappings). The public identifier, if specified, + * may also be reported as part of the location information when errors + * are reported. + */ + public void setPublicId(String publicId); + + /** + * The base URI to be used (see section 5.1.4 in [IETF RFC 2396]) for + * resolving a relative systemId to an absolute URI. + *
If, when used, the base URI is itself a relative URI, an empty + * string, or null, the behavior is implementation dependent. + */ + public String getBaseURI(); + /** + * The base URI to be used (see section 5.1.4 in [IETF RFC 2396]) for + * resolving a relative systemId to an absolute URI. + *
If, when used, the base URI is itself a relative URI, an empty + * string, or null, the behavior is implementation dependent. + */ + public void setBaseURI(String baseURI); + + /** + * The character encoding, if known. The encoding must be a string + * acceptable for an XML encoding declaration ([XML 1.0] section + * 4.3.3 "Character Encoding in Entities"). + *
This attribute has no effect when the application provides a + * character stream or string data. For other sources of input, an + * encoding specified by means of this attribute will override any + * encoding specified in the XML declaration or the Text declaration, or + * an encoding obtained from a higher level protocol, such as HTTP [IETF RFC 2616]. + */ + public String getEncoding(); + /** + * The character encoding, if known. The encoding must be a string + * acceptable for an XML encoding declaration ([XML 1.0] section + * 4.3.3 "Character Encoding in Entities"). + *
This attribute has no effect when the application provides a + * character stream or string data. For other sources of input, an + * encoding specified by means of this attribute will override any + * encoding specified in the XML declaration or the Text declaration, or + * an encoding obtained from a higher level protocol, such as HTTP [IETF RFC 2616]. + */ + public void setEncoding(String encoding); + + /** + * If set to true, assume that the input is certified (see section 2.13 + * in [XML 1.1]) when + * parsing [XML 1.1]. + */ + public boolean getCertifiedText(); + /** + * If set to true, assume that the input is certified (see section 2.13 + * in [XML 1.1]) when + * parsing [XML 1.1]. + */ + public void setCertifiedText(boolean certifiedText); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/ls/LSLoadEvent.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/ls/LSLoadEvent.java new file mode 100644 index 000000000..0140b4123 --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/ls/LSLoadEvent.java @@ -0,0 +1,35 @@ +/* + * 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 + */ + +package org.w3c.dom.ls; + +import org.w3c.dom.Document; +import org.w3c.dom.events.Event; + +/** + * This interface represents a load event object that signals the completion + * of a document load. + *

See also the Document Object Model (DOM) Level 3 Load +and Save Specification. + */ +public interface LSLoadEvent extends Event { + /** + * The document that finished loading. + */ + public Document getNewDocument(); + + /** + * The input source that was parsed. + */ + public LSInput getInput(); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/ls/LSOutput.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/ls/LSOutput.java new file mode 100644 index 000000000..789b95a93 --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/ls/LSOutput.java @@ -0,0 +1,106 @@ +/* + * 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 + */ + +package org.w3c.dom.ls; + +/** + * This interface represents an output destination for data. + *

This interface allows an application to encapsulate information about + * an output destination in a single object, which may include a URI, a byte + * stream (possibly with a specified encoding), a base URI, and/or a + * character stream. + *

The exact definitions of a byte stream and a character stream are + * binding dependent. + *

The application is expected to provide objects that implement this + * interface whenever such objects are needed. The application can either + * provide its own objects that implement this interface, or it can use the + * generic factory method DOMImplementationLS.createLSOutput() + * to create objects that implement this interface. + *

The LSSerializer will use the LSOutput object + * to determine where to serialize the output to. The + * LSSerializer will look at the different outputs specified in + * the LSOutput in the following order to know which one to + * output to, the first one that is not null and not an empty string will be + * used: + *

    + *
  1. LSOutput.characterStream + *
  2. + *
  3. + * LSOutput.byteStream + *
  4. + *
  5. LSOutput.systemId + *
  6. + *
+ *

LSOutput objects belong to the application. The DOM + * implementation will never modify them (though it may make copies and + * modify the copies, if necessary). + *

See also the Document Object Model (DOM) Level 3 Load +and Save Specification. + */ +public interface LSOutput { + /** + * An attribute of a language and binding dependent type that represents + * a writable stream to which 16-bit units can be output. + */ + public java.io.Writer getCharacterStream(); + /** + * An attribute of a language and binding dependent type that represents + * a writable stream to which 16-bit units can be output. + */ + public void setCharacterStream(java.io.Writer characterStream); + + /** + * An attribute of a language and binding dependent type that represents + * a writable stream of bytes. + */ + public java.io.OutputStream getByteStream(); + /** + * An attribute of a language and binding dependent type that represents + * a writable stream of bytes. + */ + public void setByteStream(java.io.OutputStream byteStream); + + /** + * The system identifier, a URI reference [IETF RFC 2396], for this + * output destination. + *
If the system ID is a relative URI reference (see section 5 in [IETF RFC 2396]), the + * behavior is implementation dependent. + */ + public String getSystemId(); + /** + * The system identifier, a URI reference [IETF RFC 2396], for this + * output destination. + *
If the system ID is a relative URI reference (see section 5 in [IETF RFC 2396]), the + * behavior is implementation dependent. + */ + public void setSystemId(String systemId); + + /** + * The character encoding to use for the output. The encoding must be a + * string acceptable for an XML encoding declaration ([XML 1.0] section + * 4.3.3 "Character Encoding in Entities"), it is recommended that + * character encodings registered (as charsets) with the Internet + * Assigned Numbers Authority [IANA-CHARSETS] + * should be referred to using their registered names. + */ + public String getEncoding(); + /** + * The character encoding to use for the output. The encoding must be a + * string acceptable for an XML encoding declaration ([XML 1.0] section + * 4.3.3 "Character Encoding in Entities"), it is recommended that + * character encodings registered (as charsets) with the Internet + * Assigned Numbers Authority [IANA-CHARSETS] + * should be referred to using their registered names. + */ + public void setEncoding(String encoding); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/ls/LSParser.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/ls/LSParser.java new file mode 100644 index 000000000..41781fa33 --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/ls/LSParser.java @@ -0,0 +1,466 @@ +/* + * 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 + */ + +package org.w3c.dom.ls; + +import org.w3c.dom.Document; +import org.w3c.dom.DOMConfiguration; +import org.w3c.dom.Node; +import org.w3c.dom.DOMException; + +/** + * An interface to an object that is able to build, or augment, a DOM tree + * from various input sources. + *

LSParser provides an API for parsing XML and building the + * corresponding DOM document structure. A LSParser instance + * can be obtained by invoking the + * DOMImplementationLS.createLSParser() method. + *

As specified in [DOM Level 3 Core] + * , when a document is first made available via the LSParser: + *

+ *

Asynchronous LSParser objects are expected to also + * implement the events::EventTarget interface so that event + * listeners can be registered on asynchronous LSParser + * objects. + *

Events supported by asynchronous LSParser objects are: + *

+ *
load
+ *
+ * The LSParser finishes to load the document. See also the + * definition of the LSLoadEvent interface.
+ *
progress
+ *
The + * LSParser signals progress as data is parsed. This + * specification does not attempt to define exactly when progress events + * should be dispatched. That is intentionally left as + * implementation-dependent. Here is one example of how an application might + * dispatch progress events: Once the parser starts receiving data, a + * progress event is dispatched to indicate that the parsing starts. From + * there on, a progress event is dispatched for every 4096 bytes of data + * that is received and processed. This is only one example, though, and + * implementations can choose to dispatch progress events at any time while + * parsing, or not dispatch them at all. See also the definition of the + * LSProgressEvent interface.
+ *
+ *

Note: All events defined in this specification use the + * namespace URI "http://www.w3.org/2002/DOMLS". + *

While parsing an input source, errors are reported to the application + * through the error handler (LSParser.domConfig's " + * error-handler" parameter). This specification does in no way try to define all possible + * errors that can occur while parsing XML, or any other markup, but some + * common error cases are defined. The types (DOMError.type) of + * errors and warnings defined by this specification are: + *

+ *
+ * "check-character-normalization-failure" [error]
+ *
Raised if + * the parameter " + * check-character-normalization" is set to true and a string is encountered that fails normalization + * checking.
+ *
"doctype-not-allowed" [fatal]
+ *
Raised if the + * configuration parameter "disallow-doctype" is set to true + * and a doctype is encountered.
+ *
"no-input-specified" [fatal]
+ *
+ * Raised when loading a document and no input is specified in the + * LSInput object.
+ *
+ * "pi-base-uri-not-preserved" [warning]
+ *
Raised if a processing + * instruction is encountered in a location where the base URI of the + * processing instruction can not be preserved. One example of a case where + * this warning will be raised is if the configuration parameter " + * entities" is set to false and the following XML file is parsed: + *
+ * <!DOCTYPE root [ <!ENTITY e SYSTEM 'subdir/myentity.ent' ]>
+ * <root> &e; </root>
+ * And subdir/myentity.ent + * contains: + *
<one> <two/> </one> <?pi 3.14159?>
+ * <more/>
+ *
+ *
"unbound-prefix-in-entity" [warning]
+ *
An + * implementation dependent warning that may be raised if the configuration + * parameter " + * namespaces" is set to true and an unbound namespace prefix is + * encountered in an entity's replacement text. Raising this warning is not + * enforced since some existing parsers may not recognize unbound namespace + * prefixes in the replacement text of entities.
+ *
+ * "unknown-character-denormalization" [fatal]
+ *
Raised if the + * configuration parameter "ignore-unknown-character-denormalizations" is + * set to false and a character is encountered for which the + * processor cannot determine the normalization properties.
+ *
+ * "unsupported-encoding" [fatal]
+ *
Raised if an unsupported + * encoding is encountered.
+ *
"unsupported-media-type" [fatal]
+ *
+ * Raised if the configuration parameter "supported-media-types-only" is set + * to true and an unsupported media type is encountered.
+ *
+ *

In addition to raising the defined errors and warnings, implementations + * are expected to raise implementation specific errors and warnings for any + * other error and warning cases such as IO errors (file not found, + * permission denied,...), XML well-formedness errors, and so on. + *

See also the Document Object Model (DOM) Level 3 Load +and Save Specification. + */ +public interface LSParser { + /** + * The DOMConfiguration object used when parsing an input + * source. This DOMConfiguration is specific to the parse + * operation. No parameter values from this DOMConfiguration + * object are passed automatically to the DOMConfiguration + * object on the Document that is created, or used, by the + * parse operation. The DOM application is responsible for passing any + * needed parameter values from this DOMConfiguration + * object to the DOMConfiguration object referenced by the + * Document object. + *
In addition to the parameters recognized in on the + * DOMConfiguration interface defined in [DOM Level 3 Core] + * , the DOMConfiguration objects for LSParser + * add or modify the following parameters: + *

+ *
+ * "charset-overrides-xml-encoding"
+ *
+ *
+ *
true
+ *
[optional] (default) If a higher level protocol such as HTTP [IETF RFC 2616] provides an + * indication of the character encoding of the input stream being + * processed, that will override any encoding specified in the XML + * declaration or the Text declaration (see also section 4.3.3, + * "Character Encoding in Entities", in [XML 1.0]). + * Explicitly setting an encoding in the LSInput overrides + * any encoding from the protocol.
+ *
false
+ *
[required] The parser ignores any character set encoding information from + * higher-level protocols.
+ *
+ *
"disallow-doctype"
+ *
+ *
+ *
+ * true
+ *
[optional] Throw a fatal "doctype-not-allowed" error if a doctype node is found while parsing the document. This is + * useful when dealing with things like SOAP envelopes where doctype + * nodes are not allowed.
+ *
false
+ *
[required] (default) Allow doctype nodes in the document.
+ *
+ *
+ * "ignore-unknown-character-denormalizations"
+ *
+ *
+ *
+ * true
+ *
[required] (default) If, while verifying full normalization when [XML 1.1] is + * supported, a processor encounters characters for which it cannot + * determine the normalization properties, then the processor will + * ignore any possible denormalizations caused by these characters. + * This parameter is ignored for [XML 1.0].
+ *
+ * false
+ *
[optional] Report an fatal "unknown-character-denormalization" error if a character is encountered for which the processor cannot + * determine the normalization properties.
+ *
+ *
"infoset"
+ *
See + * the definition of DOMConfiguration for a description of + * this parameter. Unlike in [DOM Level 3 Core] + * , this parameter will default to true for + * LSParser.
+ *
"namespaces"
+ *
+ *
+ *
true
+ *
[required] (default) Perform the namespace processing as defined in [XML Namespaces] + * and [XML Namespaces 1.1] + * .
+ *
false
+ *
[optional] Do not perform the namespace processing.
+ *
+ *
+ * "resource-resolver"
+ *
[required] A reference to a LSResourceResolver object, or null. If + * the value of this parameter is not null when an external resource + * (such as an external XML entity or an XML schema location) is + * encountered, the implementation will request that the + * LSResourceResolver referenced in this parameter resolves + * the resource.
+ *
"supported-media-types-only"
+ *
+ *
+ *
+ * true
+ *
[optional] Check that the media type of the parsed resource is a supported media + * type. If an unsupported media type is encountered, a fatal error of + * type "unsupported-media-type" will be raised. The media types defined in [IETF RFC 3023] must always + * be accepted.
+ *
false
+ *
[required] (default) Accept any media type.
+ *
+ *
"validate"
+ *
See the definition of + * DOMConfiguration for a description of this parameter. + * Unlike in [DOM Level 3 Core] + * , the processing of the internal subset is always accomplished, even + * if this parameter is set to false.
+ *
+ * "validate-if-schema"
+ *
See the definition of + * DOMConfiguration for a description of this parameter. + * Unlike in [DOM Level 3 Core] + * , the processing of the internal subset is always accomplished, even + * if this parameter is set to false.
+ *
+ * "well-formed"
+ *
See the definition of + * DOMConfiguration for a description of this parameter. + * Unlike in [DOM Level 3 Core] + * , this parameter cannot be set to false.
+ *
+ */ + public DOMConfiguration getDomConfig(); + + /** + * When a filter is provided, the implementation will call out to the + * filter as it is constructing the DOM tree structure. The filter can + * choose to remove elements from the document being constructed, or to + * terminate the parsing early. + *
The filter is invoked after the operations requested by the + * DOMConfiguration parameters have been applied. For + * example, if " + * validate" is set to true, the validation is done before invoking the + * filter. + */ + public LSParserFilter getFilter(); + /** + * When a filter is provided, the implementation will call out to the + * filter as it is constructing the DOM tree structure. The filter can + * choose to remove elements from the document being constructed, or to + * terminate the parsing early. + *
The filter is invoked after the operations requested by the + * DOMConfiguration parameters have been applied. For + * example, if " + * validate" is set to true, the validation is done before invoking the + * filter. + */ + public void setFilter(LSParserFilter filter); + + /** + * true if the LSParser is asynchronous, + * false if it is synchronous. + */ + public boolean getAsync(); + + /** + * true if the LSParser is currently busy + * loading a document, otherwise false. + */ + public boolean getBusy(); + + /** + * Parse an XML document from a resource identified by a + * LSInput. + * @param input The LSInput from which the source of the + * document is to be read. + * @return If the LSParser is a synchronous + * LSParser, the newly created and populated + * Document is returned. If the LSParser is + * asynchronous, null is returned since the document + * object may not yet be constructed when this method returns. + * @exception DOMException + * INVALID_STATE_ERR: Raised if the LSParser's + * LSParser.busy attribute is true. + * @exception LSException + * PARSE_ERR: Raised if the LSParser was unable to load + * the XML document. DOM applications should attach a + * DOMErrorHandler using the parameter " + * error-handler" if they wish to get details on the error. + */ + public Document parse(LSInput input) + throws DOMException, LSException; + + /** + * Parse an XML document from a location identified by a URI reference [IETF RFC 2396]. If the URI + * contains a fragment identifier (see section 4.1 in [IETF RFC 2396]), the + * behavior is not defined by this specification, future versions of + * this specification may define the behavior. + * @param uri The location of the XML document to be read. + * @return If the LSParser is a synchronous + * LSParser, the newly created and populated + * Document is returned, or null if an error + * occured. If the LSParser is asynchronous, + * null is returned since the document object may not yet + * be constructed when this method returns. + * @exception DOMException + * INVALID_STATE_ERR: Raised if the LSParser.busy + * attribute is true. + * @exception LSException + * PARSE_ERR: Raised if the LSParser was unable to load + * the XML document. DOM applications should attach a + * DOMErrorHandler using the parameter " + * error-handler" if they wish to get details on the error. + */ + public Document parseURI(String uri) + throws DOMException, LSException; + + // ACTION_TYPES + /** + * Append the result of the parse operation as children of the context + * node. For this action to work, the context node must be an + * Element or a DocumentFragment. + */ + public static final short ACTION_APPEND_AS_CHILDREN = 1; + /** + * Replace all the children of the context node with the result of the + * parse operation. For this action to work, the context node must be an + * Element, a Document, or a + * DocumentFragment. + */ + public static final short ACTION_REPLACE_CHILDREN = 2; + /** + * Insert the result of the parse operation as the immediately preceding + * sibling of the context node. For this action to work the context + * node's parent must be an Element or a + * DocumentFragment. + */ + public static final short ACTION_INSERT_BEFORE = 3; + /** + * Insert the result of the parse operation as the immediately following + * sibling of the context node. For this action to work the context + * node's parent must be an Element or a + * DocumentFragment. + */ + public static final short ACTION_INSERT_AFTER = 4; + /** + * Replace the context node with the result of the parse operation. For + * this action to work, the context node must have a parent, and the + * parent must be an Element or a + * DocumentFragment. + */ + public static final short ACTION_REPLACE = 5; + + /** + * Parse an XML fragment from a resource identified by a + * LSInput and insert the content into an existing document + * at the position specified with the context and + * action arguments. When parsing the input stream, the + * context node (or its parent, depending on where the result will be + * inserted) is used for resolving unbound namespace prefixes. The + * context node's ownerDocument node (or the node itself if + * the node of type DOCUMENT_NODE) is used to resolve + * default attributes and entity references. + *
As the new data is inserted into the document, at least one + * mutation event is fired per new immediate child or sibling of the + * context node. + *
If the context node is a Document node and the action + * is ACTION_REPLACE_CHILDREN, then the document that is + * passed as the context node will be changed such that its + * xmlEncoding, documentURI, + * xmlVersion, inputEncoding, + * xmlStandalone, and all other such attributes are set to + * what they would be set to if the input source was parsed using + * LSParser.parse(). + *
This method is always synchronous, even if the + * LSParser is asynchronous (LSParser.async is + * true). + *
If an error occurs while parsing, the caller is notified through + * the ErrorHandler instance associated with the " + * error-handler" parameter of the DOMConfiguration. + *
When calling parseWithContext, the values of the + * following configuration parameters will be ignored and their default + * values will always be used instead: " + * validate", " + * validate-if-schema", and " + * element-content-whitespace". Other parameters will be treated normally, and the parser is expected + * to call the LSParserFilter just as if a whole document + * was parsed. + * @param input The LSInput from which the source document + * is to be read. The source document must be an XML fragment, i.e. + * anything except a complete XML document (except in the case where + * the context node of type DOCUMENT_NODE, and the action + * is ACTION_REPLACE_CHILDREN), a DOCTYPE (internal + * subset), entity declaration(s), notation declaration(s), or XML or + * text declaration(s). + * @param contextArg The node that is used as the context for the data + * that is being parsed. This node must be a Document + * node, a DocumentFragment node, or a node of a type + * that is allowed as a child of an Element node, e.g. it + * cannot be an Attribute node. + * @param action This parameter describes which action should be taken + * between the new set of nodes being inserted and the existing + * children of the context node. The set of possible actions is + * defined in ACTION_TYPES above. + * @return Return the node that is the result of the parse operation. If + * the result is more than one top-level node, the first one is + * returned. + * @exception DOMException + * HIERARCHY_REQUEST_ERR: Raised if the content cannot replace, be + * inserted before, after, or as a child of the context node (see also + * Node.insertBefore or Node.replaceChild in [DOM Level 3 Core] + * ). + *
NOT_SUPPORTED_ERR: Raised if the LSParser doesn't + * support this method, or if the context node is of type + * Document and the DOM implementation doesn't support + * the replacement of the DocumentType child or + * Element child. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if the context node is a + * read only node and the content is being appended to its child list, + * or if the parent node of the context node is read only node and the + * content is being inserted in its child list. + *
INVALID_STATE_ERR: Raised if the LSParser.busy + * attribute is true. + * @exception LSException + * PARSE_ERR: Raised if the LSParser was unable to load + * the XML fragment. DOM applications should attach a + * DOMErrorHandler using the parameter " + * error-handler" if they wish to get details on the error. + */ + public Node parseWithContext(LSInput input, + Node contextArg, + short action) + throws DOMException, LSException; + + /** + * Abort the loading of the document that is currently being loaded by + * the LSParser. If the LSParser is currently + * not busy, a call to this method does nothing. + */ + public void abort(); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/ls/LSParserFilter.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/ls/LSParserFilter.java new file mode 100644 index 000000000..00db4d3c2 --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/ls/LSParserFilter.java @@ -0,0 +1,172 @@ +/* + * 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 + */ + +package org.w3c.dom.ls; + +import org.w3c.dom.Node; +import org.w3c.dom.Element; + +/** + * LSParserFilters provide applications the ability to examine + * nodes as they are being constructed while parsing. As each node is + * examined, it may be modified or removed, or the entire parse may be + * terminated early. + *

At the time any of the filter methods are called by the parser, the + * owner Document and DOMImplementation objects exist and are accessible. + * The document element is never passed to the LSParserFilter + * methods, i.e. it is not possible to filter out the document element. + * Document, DocumentType, Notation, + * Entity, and Attr nodes are never passed to the + * acceptNode method on the filter. The child nodes of an + * EntityReference node are passed to the filter if the + * parameter " + * entities" is set to false. Note that, as described by the parameter " + * entities", unexpanded entity reference nodes are never discarded and are always + * passed to the filter. + *

All validity checking while parsing a document occurs on the source + * document as it appears on the input stream, not on the DOM document as it + * is built in memory. With filters, the document in memory may be a subset + * of the document on the stream, and its validity may have been affected by + * the filtering. + *

All default attributes must be present on elements when the elements + * are passed to the filter methods. All other default content must be + * passed to the filter methods. + *

DOM applications must not raise exceptions in a filter. The effect of + * throwing exceptions from a filter is DOM implementation dependent. + *

See also the Document Object Model (DOM) Level 3 Load +and Save Specification. + */ +public interface LSParserFilter { + // Constants returned by startElement and acceptNode + /** + * Accept the node. + */ + public static final short FILTER_ACCEPT = 1; + /** + * Reject the node and its children. + */ + public static final short FILTER_REJECT = 2; + /** + * Skip this single node. The children of this node will still be + * considered. + */ + public static final short FILTER_SKIP = 3; + /** + * Interrupt the normal processing of the document. + */ + public static final short FILTER_INTERRUPT = 4; + + /** + * The parser will call this method after each Element start + * tag has been scanned, but before the remainder of the + * Element is processed. The intent is to allow the + * element, including any children, to be efficiently skipped. Note that + * only element nodes are passed to the startElement + * function. + *
The element node passed to startElement for filtering + * will include all of the Element's attributes, but none of the + * children nodes. The Element may not yet be in place in the document + * being constructed (it may not have a parent node.) + *
A startElement filter function may access or change + * the attributes for the Element. Changing Namespace declarations will + * have no effect on namespace resolution by the parser. + *
For efficiency, the Element node passed to the filter may not be + * the same one as is actually placed in the tree if the node is + * accepted. And the actual node (node object identity) may be reused + * during the process of reading in and filtering a document. + * @param elementArg The newly encountered element. At the time this + * method is called, the element is incomplete - it will have its + * attributes, but no children. + * @return + *

Returning + * any other values will result in unspecified behavior. + */ + public short startElement(Element elementArg); + + /** + * This method will be called by the parser at the completion of the + * parsing of each node. The node and all of its descendants will exist + * and be complete. The parent node will also exist, although it may be + * incomplete, i.e. it may have additional children that have not yet + * been parsed. Attribute nodes are never passed to this function. + *
From within this method, the new node may be freely modified - + * children may be added or removed, text nodes modified, etc. The state + * of the rest of the document outside this node is not defined, and the + * affect of any attempt to navigate to, or to modify any other part of + * the document is undefined. + *
For validating parsers, the checks are made on the original + * document, before any modification by the filter. No validity checks + * are made on any document modifications made by the filter. + *
If this new node is rejected, the parser might reuse the new node + * and any of its descendants. + * @param nodeArg The newly constructed element. At the time this method + * is called, the element is complete - it has all of its children + * (and their children, recursively) and attributes, and is attached + * as a child to its parent. + * @return + * + */ + public short acceptNode(Node nodeArg); + + /** + * Tells the LSParser what types of nodes to show to the + * method LSParserFilter.acceptNode. If a node is not shown + * to the filter using this attribute, it is automatically included in + * the DOM document being built. See NodeFilter for + * definition of the constants. The constants SHOW_ATTRIBUTE + * , SHOW_DOCUMENT, SHOW_DOCUMENT_TYPE, + * SHOW_NOTATION, SHOW_ENTITY, and + * SHOW_DOCUMENT_FRAGMENT are meaningless here. Those nodes + * will never be passed to LSParserFilter.acceptNode. + *
The constants used here are defined in [DOM Level 2 Traversal and Range] + * . + */ + public int getWhatToShow(); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/ls/LSProgressEvent.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/ls/LSProgressEvent.java new file mode 100644 index 000000000..adf7b098c --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/ls/LSProgressEvent.java @@ -0,0 +1,48 @@ +/* + * 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 + */ + +package org.w3c.dom.ls; + +import org.w3c.dom.events.Event; + +/** + * This interface represents a progress event object that notifies the + * application about progress as a document is parsed. It extends the + * Event interface defined in [DOM Level 3 Events] + * . + *

The units used for the attributes position and + * totalSize are not specified and can be implementation and + * input dependent. + *

See also the Document Object Model (DOM) Level 3 Load +and Save Specification. + */ +public interface LSProgressEvent extends Event { + /** + * The input source that is being parsed. + */ + public LSInput getInput(); + + /** + * The current position in the input source, including all external + * entities and other resources that have been read. + */ + public int getPosition(); + + /** + * The total size of the document including all external resources, this + * number might change as a document is being parsed if references to + * more external resources are seen. A value of 0 is + * returned if the total size cannot be determined or estimated. + */ + public int getTotalSize(); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/ls/LSResourceResolver.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/ls/LSResourceResolver.java new file mode 100644 index 000000000..5301beb8f --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/ls/LSResourceResolver.java @@ -0,0 +1,81 @@ +/* + * 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 + */ + +package org.w3c.dom.ls; + +/** + * LSResourceResolver provides a way for applications to + * redirect references to external resources. + *

Applications needing to implement custom handling for external + * resources can implement this interface and register their implementation + * by setting the "resource-resolver" parameter of + * DOMConfiguration objects attached to LSParser + * and LSSerializer. It can also be register on + * DOMConfiguration objects attached to Document + * if the "LS" feature is supported. + *

The LSParser will then allow the application to intercept + * any external entities, including the external DTD subset and external + * parameter entities, before including them. The top-level document entity + * is never passed to the resolveResource method. + *

Many DOM applications will not need to implement this interface, but it + * will be especially useful for applications that build XML documents from + * databases or other specialized input sources, or for applications that + * use URNs. + *

Note: LSResourceResolver is based on the SAX2 [SAX] EntityResolver + * interface. + *

See also the Document Object Model (DOM) Level 3 Load +and Save Specification. + */ +public interface LSResourceResolver { + /** + * Allow the application to resolve external resources. + *
The LSParser will call this method before opening any + * external resource, including the external DTD subset, external + * entities referenced within the DTD, and external entities referenced + * within the document element (however, the top-level document entity + * is not passed to this method). The application may then request that + * the LSParser resolve the external resource itself, that + * it use an alternative URI, or that it use an entirely different input + * source. + *
Application writers can use this method to redirect external + * system identifiers to secure and/or local URI, to look up public + * identifiers in a catalogue, or to read an entity from a database or + * other input source (including, for example, a dialog box). + * @param type The type of the resource being resolved. For XML [XML 1.0] resources + * (i.e. entities), applications must use the value + * "http://www.w3.org/TR/REC-xml". For XML Schema [XML Schema Part 1] + * , applications must use the value + * "http://www.w3.org/2001/XMLSchema". Other types of + * resources are outside the scope of this specification and therefore + * should recommend an absolute URI in order to use this method. + * @param namespaceURI The namespace of the resource being resolved, + * e.g. the target namespace of the XML Schema [XML Schema Part 1] + * when resolving XML Schema resources. + * @param publicId The public identifier of the external entity being + * referenced, or null if no public identifier was + * supplied or if the resource is not an entity. + * @param systemId The system identifier, a URI reference [IETF RFC 2396], of the + * external resource being referenced, or null if no + * system identifier was supplied. + * @param baseURI The absolute base URI of the resource being parsed, or + * null if there is no base URI. + * @return A LSInput object describing the new input + * source, or null to request that the parser open a + * regular URI connection to the resource. + */ + public LSInput resolveResource(String type, + String namespaceURI, + String publicId, + String systemId, + String baseURI); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/ls/LSSerializer.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/ls/LSSerializer.java new file mode 100644 index 000000000..2a6fb6ff4 --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/ls/LSSerializer.java @@ -0,0 +1,436 @@ +/* + * 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 + */ + +package org.w3c.dom.ls; + +import org.w3c.dom.DOMConfiguration; +import org.w3c.dom.Node; +import org.w3c.dom.DOMException; + +/** + * A LSSerializer provides an API for serializing (writing) a + * DOM document out into XML. The XML data is written to a string or an + * output stream. Any changes or fixups made during the serialization affect + * only the serialized data. The Document object and its + * children are never altered by the serialization operation. + *

During serialization of XML data, namespace fixup is done as defined in [DOM Level 3 Core] + * , Appendix B. [DOM Level 2 Core] + * allows empty strings as a real namespace URI. If the + * namespaceURI of a Node is empty string, the + * serialization will treat them as null, ignoring the prefix + * if any. + *

LSSerializer accepts any node type for serialization. For + * nodes of type Document or Entity, well-formed + * XML will be created when possible (well-formedness is guaranteed if the + * document or entity comes from a parse operation and is unchanged since it + * was created). The serialized output for these node types is either as a + * XML document or an External XML Entity, respectively, and is acceptable + * input for an XML parser. For all other types of nodes the serialized form + * is implementation dependent. + *

Within a Document, DocumentFragment, or + * Entity being serialized, Nodes are processed as + * follows + *

+ *

Note: The serialization of a Node does not always + * generate a well-formed XML document, i.e. a LSParser might + * throw fatal errors when parsing the resulting serialization. + *

Within the character data of a document (outside of markup), any + * characters that cannot be represented directly are replaced with + * character references. Occurrences of '<' and '&' are replaced by + * the predefined entities &lt; and &amp;. The other predefined + * entities (&gt;, &apos;, and &quot;) might not be used, except + * where needed (e.g. using &gt; in cases such as ']]>'). Any + * characters that cannot be represented directly in the output character + * encoding are serialized as numeric character references (and since + * character encoding standards commonly use hexadecimal representations of + * characters, using the hexadecimal representation when serializing + * character references is encouraged). + *

To allow attribute values to contain both single and double quotes, the + * apostrophe or single-quote character (') may be represented as + * "&apos;", and the double-quote character (") as "&quot;". New + * line characters and other characters that cannot be represented directly + * in attribute values in the output character encoding are serialized as a + * numeric character reference. + *

Within markup, but outside of attributes, any occurrence of a character + * that cannot be represented in the output character encoding is reported + * as a DOMError fatal error. An example would be serializing + * the element <LaCa\u00f1ada/> with encoding="us-ascii". + * This will result with a generation of a DOMError + * "wf-invalid-character-in-node-name" (as proposed in " + * well-formed"). + *

When requested by setting the parameter " + * normalize-characters" on LSSerializer to true, character normalization is + * performed according to the definition of fully + * normalized characters included in appendix E of [XML 1.1] on all + * data to be serialized, both markup and character data. The character + * normalization process affects only the data as it is being written; it + * does not alter the DOM's view of the document after serialization has + * completed. + *

Implementations are required to support the encodings "UTF-8", + * "UTF-16", "UTF-16BE", and "UTF-16LE" to guarantee that data is + * serializable in all encodings that are required to be supported by all + * XML parsers. When the encoding is UTF-8, whether or not a byte order mark + * is serialized, or if the output is big-endian or little-endian, is + * implementation dependent. When the encoding is UTF-16, whether or not the + * output is big-endian or little-endian is implementation dependent, but a + * Byte Order Mark must be generated for non-character outputs, such as + * LSOutput.byteStream or LSOutput.systemId. If + * the Byte Order Mark is not generated, a "byte-order-mark-needed" warning + * is reported. When the encoding is UTF-16LE or UTF-16BE, the output is + * big-endian (UTF-16BE) or little-endian (UTF-16LE) and the Byte Order Mark + * is not be generated. In all cases, the encoding declaration, if + * generated, will correspond to the encoding used during the serialization + * (e.g. encoding="UTF-16" will appear if UTF-16 was + * requested). + *

Namespaces are fixed up during serialization, the serialization process + * will verify that namespace declarations, namespace prefixes and the + * namespace URI associated with elements and attributes are consistent. If + * inconsistencies are found, the serialized form of the document will be + * altered to remove them. The method used for doing the namespace fixup + * while serializing a document is the algorithm defined in Appendix B.1, + * "Namespace normalization", of [DOM Level 3 Core] + * . + *

While serializing a document, the parameter "discard-default-content" + * controls whether or not non-specified data is serialized. + *

While serializing, errors and warnings are reported to the application + * through the error handler (LSSerializer.domConfig's " + * error-handler" parameter). This specification does in no way try to define all possible + * errors and warnings that can occur while serializing a DOM node, but some + * common error and warning cases are defined. The types ( + * DOMError.type) of errors and warnings defined by this + * specification are: + *

+ *
"no-output-specified" [fatal]
+ *
Raised when + * writing to a LSOutput if no output is specified in the + * LSOutput.
+ *
+ * "unbound-prefix-in-entity-reference" [fatal]
+ *
Raised if the + * configuration parameter " + * namespaces" is set to true and an entity whose replacement text + * contains unbound namespace prefixes is referenced in a location where + * there are no bindings for the namespace prefixes.
+ *
+ * "unsupported-encoding" [fatal]
+ *
Raised if an unsupported + * encoding is encountered.
+ *
+ *

In addition to raising the defined errors and warnings, implementations + * are expected to raise implementation specific errors and warnings for any + * other error and warning cases such as IO errors (file not found, + * permission denied,...) and so on. + *

See also the Document Object Model (DOM) Level 3 Load +and Save Specification. + */ +public interface LSSerializer { + /** + * The DOMConfiguration object used by the + * LSSerializer when serializing a DOM node. + *
In addition to the parameters recognized by the + * DOMConfiguration interface defined in [DOM Level 3 Core] + * , the DOMConfiguration objects for + * LSSerializer adds, or modifies, the following + * parameters: + *

+ *
"canonical-form"
+ *
+ *
+ *
true
+ *
[optional] Writes the document according to the rules specified in [Canonical XML]. + * In addition to the behavior described in " + * canonical-form" [DOM Level 3 Core] + * , setting this parameter to true will set the parameters + * "format-pretty-print", "discard-default-content", and "xml-declaration + * ", to false. Setting one of those parameters to + * true will set this parameter to false. + * Serializing an XML 1.1 document when "canonical-form" is + * true will generate a fatal error.
+ *
false
+ *
[required] (default) Do not canonicalize the output.
+ *
+ *
"discard-default-content"
+ *
+ *
+ *
+ * true
+ *
[required] (default) Use the Attr.specified attribute to decide what attributes + * should be discarded. Note that some implementations might use + * whatever information available to the implementation (i.e. XML + * schema, DTD, the Attr.specified attribute, and so on) to + * determine what attributes and content to discard if this parameter is + * set to true.
+ *
false
+ *
[required]Keep all attributes and all content.
+ *
+ *
"format-pretty-print"
+ *
+ *
+ *
+ * true
+ *
[optional] Formatting the output by adding whitespace to produce a pretty-printed, + * indented, human-readable form. The exact form of the transformations + * is not specified by this specification. Pretty-printing changes the + * content of the document and may affect the validity of the document, + * validating implementations should preserve validity.
+ *
+ * false
+ *
[required] (default) Don't pretty-print the result.
+ *
+ *
+ * "ignore-unknown-character-denormalizations"
+ *
+ *
+ *
+ * true
+ *
[required] (default) If, while verifying full normalization when [XML 1.1] is + * supported, a character is encountered for which the normalization + * properties cannot be determined, then raise a + * "unknown-character-denormalization" warning (instead of + * raising an error, if this parameter is not set) and ignore any + * possible denormalizations caused by these characters.
+ *
+ * false
+ *
[optional] Report a fatal error if a character is encountered for which the + * processor cannot determine the normalization properties.
+ *
+ *
+ * "normalize-characters"
+ *
This parameter is equivalent to + * the one defined by DOMConfiguration in [DOM Level 3 Core] + * . Unlike in the Core, the default value for this parameter is + * true. While DOM implementations are not required to + * support fully + * normalizing the characters in the document according to appendix E of [XML 1.1], this + * parameter must be activated by default if supported.
+ *
+ * "xml-declaration"
+ *
+ *
+ *
true
+ *
[required] (default) If a Document, Element, or Entity + * node is serialized, the XML declaration, or text declaration, should + * be included. The version (Document.xmlVersion if the + * document is a Level 3 document and the version is non-null, otherwise + * use the value "1.0"), and the output encoding (see + * LSSerializer.write for details on how to find the output + * encoding) are specified in the serialized XML declaration.
+ *
+ * false
+ *
[required] Do not serialize the XML and text declarations. Report a + * "xml-declaration-needed" warning if this will cause + * problems (i.e. the serialized data is of an XML version other than [XML 1.0], or an + * encoding would be needed to be able to re-parse the serialized data).
+ *
+ *
+ */ + public DOMConfiguration getDomConfig(); + + /** + * The end-of-line sequence of characters to be used in the XML being + * written out. Any string is supported, but XML treats only a certain + * set of characters sequence as end-of-line (See section 2.11, + * "End-of-Line Handling" in [XML 1.0], if the + * serialized content is XML 1.0 or section 2.11, "End-of-Line Handling" + * in [XML 1.1], if the + * serialized content is XML 1.1). Using other character sequences than + * the recommended ones can result in a document that is either not + * serializable or not well-formed). + *
On retrieval, the default value of this attribute is the + * implementation specific default end-of-line sequence. DOM + * implementations should choose the default to match the usual + * convention for text files in the environment being used. + * Implementations must choose a default sequence that matches one of + * those allowed by XML 1.0 or XML 1.1, depending on the serialized + * content. Setting this attribute to null will reset its + * value to the default value. + *
+ */ + public String getNewLine(); + /** + * The end-of-line sequence of characters to be used in the XML being + * written out. Any string is supported, but XML treats only a certain + * set of characters sequence as end-of-line (See section 2.11, + * "End-of-Line Handling" in [XML 1.0], if the + * serialized content is XML 1.0 or section 2.11, "End-of-Line Handling" + * in [XML 1.1], if the + * serialized content is XML 1.1). Using other character sequences than + * the recommended ones can result in a document that is either not + * serializable or not well-formed). + *
On retrieval, the default value of this attribute is the + * implementation specific default end-of-line sequence. DOM + * implementations should choose the default to match the usual + * convention for text files in the environment being used. + * Implementations must choose a default sequence that matches one of + * those allowed by XML 1.0 or XML 1.1, depending on the serialized + * content. Setting this attribute to null will reset its + * value to the default value. + *
+ */ + public void setNewLine(String newLine); + + /** + * When the application provides a filter, the serializer will call out + * to the filter before serializing each Node. The filter implementation + * can choose to remove the node from the stream or to terminate the + * serialization early. + *
The filter is invoked after the operations requested by the + * DOMConfiguration parameters have been applied. For + * example, CDATA sections won't be passed to the filter if " + * cdata-sections" is set to false. + */ + public LSSerializerFilter getFilter(); + /** + * When the application provides a filter, the serializer will call out + * to the filter before serializing each Node. The filter implementation + * can choose to remove the node from the stream or to terminate the + * serialization early. + *
The filter is invoked after the operations requested by the + * DOMConfiguration parameters have been applied. For + * example, CDATA sections won't be passed to the filter if " + * cdata-sections" is set to false. + */ + public void setFilter(LSSerializerFilter filter); + + /** + * Serialize the specified node as described above in the general + * description of the LSSerializer interface. The output is + * written to the supplied LSOutput. + *
When writing to a LSOutput, the encoding is found by + * looking at the encoding information that is reachable through the + * LSOutput and the item to be written (or its owner + * document) in this order: + *
    + *
  1. LSOutput.encoding, + *
  2. + *
  3. + * Document.inputEncoding, + *
  4. + *
  5. + * Document.xmlEncoding. + *
  6. + *
+ *
If no encoding is reachable through the above properties, a + * default encoding of "UTF-8" will be used. If the specified encoding + * is not supported an "unsupported-encoding" fatal error is raised. + *
If no output is specified in the LSOutput, a + * "no-output-specified" fatal error is raised. + *
The implementation is responsible of associating the appropriate + * media type with the serialized data. + *
When writing to a HTTP URI, a HTTP PUT is performed. When writing + * to other types of URIs, the mechanism for writing the data to the URI + * is implementation dependent. + * @param nodeArg The node to serialize. + * @param destination The destination for the serialized DOM. + * @return Returns true if node was + * successfully serialized. Return false in case the + * normal processing stopped but the implementation kept serializing + * the document; the result of the serialization being implementation + * dependent then. + * @exception LSException + * SERIALIZE_ERR: Raised if the LSSerializer was unable to + * serialize the node. DOM applications should attach a + * DOMErrorHandler using the parameter " + * error-handler" if they wish to get details on the error. + */ + public boolean write(Node nodeArg, + LSOutput destination) + throws LSException; + + /** + * A convenience method that acts as if LSSerializer.write + * was called with a LSOutput with no encoding specified + * and LSOutput.systemId set to the uri + * argument. + * @param nodeArg The node to serialize. + * @param uri The URI to write to. + * @return Returns true if node was + * successfully serialized. Return false in case the + * normal processing stopped but the implementation kept serializing + * the document; the result of the serialization being implementation + * dependent then. + * @exception LSException + * SERIALIZE_ERR: Raised if the LSSerializer was unable to + * serialize the node. DOM applications should attach a + * DOMErrorHandler using the parameter " + * error-handler" if they wish to get details on the error. + */ + public boolean writeToURI(Node nodeArg, + String uri) + throws LSException; + + /** + * Serialize the specified node as described above in the general + * description of the LSSerializer interface. The output is + * written to a DOMString that is returned to the caller. + * The encoding used is the encoding of the DOMString type, + * i.e. UTF-16. Note that no Byte Order Mark is generated in a + * DOMString object. + * @param nodeArg The node to serialize. + * @return Returns the serialized data. + * @exception DOMException + * DOMSTRING_SIZE_ERR: Raised if the resulting string is too long to + * fit in a DOMString. + * @exception LSException + * SERIALIZE_ERR: Raised if the LSSerializer was unable to + * serialize the node. DOM applications should attach a + * DOMErrorHandler using the parameter " + * error-handler" if they wish to get details on the error. + */ + public String writeToString(Node nodeArg) + throws DOMException, LSException; + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/ls/LSSerializerFilter.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/ls/LSSerializerFilter.java new file mode 100644 index 000000000..b04655677 --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/ls/LSSerializerFilter.java @@ -0,0 +1,63 @@ +/* + * 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 + */ + +package org.w3c.dom.ls; + +import org.w3c.dom.traversal.NodeFilter; + +/** + * LSSerializerFilters provide applications the ability to + * examine nodes as they are being serialized and decide what nodes should + * be serialized or not. The LSSerializerFilter interface is + * based on the NodeFilter interface defined in [DOM Level 2 Traversal and Range] + * . + *

Document, DocumentType, + * DocumentFragment, Notation, Entity + * , and children of Attr nodes are not passed to the filter. + * The child nodes of an EntityReference node are only passed + * to the filter if the EntityReference node is skipped by the + * method LSParserFilter.acceptNode(). + *

When serializing an Element, the element is passed to the + * filter before any of its attributes are passed to the filter. Namespace + * declaration attributes, and default attributes (except in the case when " + * discard-default-content" is set to false), are never passed + * to the filter. + *

The result of any attempt to modify a node passed to a + * LSSerializerFilter is implementation dependent. + *

DOM applications must not raise exceptions in a filter. The effect of + * throwing exceptions from a filter is DOM implementation dependent. + *

For efficiency, a node passed to the filter may not be the same as the + * one that is actually in the tree. And the actual node (node object + * identity) may be reused during the process of filtering and serializing a + * document. + *

See also the Document Object Model (DOM) Level 3 Load +and Save Specification. + */ +public interface LSSerializerFilter extends NodeFilter { + /** + * Tells the LSSerializer what types of nodes to show to the + * filter. If a node is not shown to the filter using this attribute, it + * is automatically serialized. See NodeFilter for + * definition of the constants. The constants SHOW_DOCUMENT + * , SHOW_DOCUMENT_TYPE, SHOW_DOCUMENT_FRAGMENT + * , SHOW_NOTATION, and SHOW_ENTITY are + * meaningless here, such nodes will never be passed to a + * LSSerializerFilter. + *
Unlike [DOM Level 2 Traversal and Range] + * , the SHOW_ATTRIBUTE constant indicates that the + * Attr nodes are shown and passed to the filter. + *
The constants used here are defined in [DOM Level 2 Traversal and Range] + * . + */ + public int getWhatToShow(); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/ranges/DocumentRange.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/ranges/DocumentRange.java new file mode 100644 index 000000000..de56e07d6 --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/ranges/DocumentRange.java @@ -0,0 +1,33 @@ +/* + * 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. + */ + +package org.w3c.dom.ranges; + +/** + *

See also the Document Object Model (DOM) Level 2 Traversal and Range Specification. + * @since DOM Level 2 + */ +public interface DocumentRange { + /** + * This interface can be obtained from the object implementing the + * Document interface using binding-specific casting + * methods. + * @return The initial state of the Range returned from this method is + * such that both of its boundary-points are positioned at the + * beginning of the corresponding Document, before any content. The + * Range returned can only be used to select content associated with + * this Document, or with DocumentFragments and Attrs for which this + * Document is the ownerDocument. + */ + public Range createRange(); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/ranges/Range.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/ranges/Range.java new file mode 100644 index 000000000..9e1957883 --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/ranges/Range.java @@ -0,0 +1,416 @@ +/* + * 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. + */ + +package org.w3c.dom.ranges; + +import org.w3c.dom.Node; +import org.w3c.dom.DOMException; +import org.w3c.dom.DocumentFragment; + +/** + *

See also the Document Object Model (DOM) Level 2 Traversal and Range Specification. + * @since DOM Level 2 + */ +public interface Range { + /** + * Node within which the Range begins + * @exception DOMException + * INVALID_STATE_ERR: Raised if detach() has already been + * invoked on this object. + */ + public Node getStartContainer() + throws DOMException; + + /** + * Offset within the starting node of the Range. + * @exception DOMException + * INVALID_STATE_ERR: Raised if detach() has already been + * invoked on this object. + */ + public int getStartOffset() + throws DOMException; + + /** + * Node within which the Range ends + * @exception DOMException + * INVALID_STATE_ERR: Raised if detach() has already been + * invoked on this object. + */ + public Node getEndContainer() + throws DOMException; + + /** + * Offset within the ending node of the Range. + * @exception DOMException + * INVALID_STATE_ERR: Raised if detach() has already been + * invoked on this object. + */ + public int getEndOffset() + throws DOMException; + + /** + * TRUE if the Range is collapsed + * @exception DOMException + * INVALID_STATE_ERR: Raised if detach() has already been + * invoked on this object. + */ + public boolean getCollapsed() + throws DOMException; + + /** + * The deepest common ancestor container of the Range's two + * boundary-points. + * @exception DOMException + * INVALID_STATE_ERR: Raised if detach() has already been + * invoked on this object. + */ + public Node getCommonAncestorContainer() + throws DOMException; + + /** + * Sets the attributes describing the start of the Range. + * @param refNode The refNode value. This parameter must be + * different from null. + * @param offset The startOffset value. + * @exception RangeException + * INVALID_NODE_TYPE_ERR: Raised if refNode or an ancestor + * of refNode is an Entity, Notation, or DocumentType + * node. + * @exception DOMException + * INDEX_SIZE_ERR: Raised if offset is negative or greater + * than the number of child units in refNode. Child units + * are 16-bit units if refNode is a type of CharacterData + * node (e.g., a Text or Comment node) or a ProcessingInstruction + * node. Child units are Nodes in all other cases. + *
INVALID_STATE_ERR: Raised if detach() has already + * been invoked on this object. + *
WRONG_DOCUMENT_ERR: Raised if refNode was created + * from a different document than the one that created this range. + */ + public void setStart(Node refNode, + int offset) + throws RangeException, DOMException; + + /** + * Sets the attributes describing the end of a Range. + * @param refNode The refNode value. This parameter must be + * different from null. + * @param offset The endOffset value. + * @exception RangeException + * INVALID_NODE_TYPE_ERR: Raised if refNode or an ancestor + * of refNode is an Entity, Notation, or DocumentType + * node. + * @exception DOMException + * INDEX_SIZE_ERR: Raised if offset is negative or greater + * than the number of child units in refNode. Child units + * are 16-bit units if refNode is a type of CharacterData + * node (e.g., a Text or Comment node) or a ProcessingInstruction + * node. Child units are Nodes in all other cases. + *
INVALID_STATE_ERR: Raised if detach() has already + * been invoked on this object. + *
WRONG_DOCUMENT_ERR: Raised if refNode was created + * from a different document than the one that created this range. + */ + public void setEnd(Node refNode, + int offset) + throws RangeException, DOMException; + + /** + * Sets the start position to be before a node + * @param refNode Range starts before refNode + * @exception RangeException + * INVALID_NODE_TYPE_ERR: Raised if the root container of + * refNode is not an Attr, Document, or DocumentFragment + * node or if refNode is a Document, DocumentFragment, + * Attr, Entity, or Notation node. + * @exception DOMException + * INVALID_STATE_ERR: Raised if detach() has already been + * invoked on this object. + *
WRONG_DOCUMENT_ERR: Raised if refNode was created + * from a different document than the one that created this range. + */ + public void setStartBefore(Node refNode) + throws RangeException, DOMException; + + /** + * Sets the start position to be after a node + * @param refNode Range starts after refNode + * @exception RangeException + * INVALID_NODE_TYPE_ERR: Raised if the root container of + * refNode is not an Attr, Document, or DocumentFragment + * node or if refNode is a Document, DocumentFragment, + * Attr, Entity, or Notation node. + * @exception DOMException + * INVALID_STATE_ERR: Raised if detach() has already been + * invoked on this object. + *
WRONG_DOCUMENT_ERR: Raised if refNode was created + * from a different document than the one that created this range. + */ + public void setStartAfter(Node refNode) + throws RangeException, DOMException; + + /** + * Sets the end position to be before a node. + * @param refNode Range ends before refNode + * @exception RangeException + * INVALID_NODE_TYPE_ERR: Raised if the root container of + * refNode is not an Attr, Document, or DocumentFragment + * node or if refNode is a Document, DocumentFragment, + * Attr, Entity, or Notation node. + * @exception DOMException + * INVALID_STATE_ERR: Raised if detach() has already been + * invoked on this object. + *
WRONG_DOCUMENT_ERR: Raised if refNode was created + * from a different document than the one that created this range. + */ + public void setEndBefore(Node refNode) + throws RangeException, DOMException; + + /** + * Sets the end of a Range to be after a node + * @param refNode Range ends after refNode. + * @exception RangeException + * INVALID_NODE_TYPE_ERR: Raised if the root container of + * refNode is not an Attr, Document or DocumentFragment + * node or if refNode is a Document, DocumentFragment, + * Attr, Entity, or Notation node. + * @exception DOMException + * INVALID_STATE_ERR: Raised if detach() has already been + * invoked on this object. + *
WRONG_DOCUMENT_ERR: Raised if refNode was created + * from a different document than the one that created this range. + */ + public void setEndAfter(Node refNode) + throws RangeException, DOMException; + + /** + * Collapse a Range onto one of its boundary-points + * @param toStart If TRUE, collapses the Range onto its start; if FALSE, + * collapses it onto its end. + * @exception DOMException + * INVALID_STATE_ERR: Raised if detach() has already been + * invoked on this object. + */ + public void collapse(boolean toStart) + throws DOMException; + + /** + * Select a node and its contents + * @param refNode The node to select. + * @exception RangeException + * INVALID_NODE_TYPE_ERR: Raised if an ancestor of refNode + * is an Entity, Notation or DocumentType node or if + * refNode is a Document, DocumentFragment, Attr, Entity, + * or Notation node. + * @exception DOMException + * INVALID_STATE_ERR: Raised if detach() has already been + * invoked on this object. + *
WRONG_DOCUMENT_ERR: Raised if refNode was created + * from a different document than the one that created this range. + */ + public void selectNode(Node refNode) + throws RangeException, DOMException; + + /** + * Select the contents within a node + * @param refNode Node to select from + * @exception RangeException + * INVALID_NODE_TYPE_ERR: Raised if refNode or an ancestor + * of refNode is an Entity, Notation or DocumentType node. + * @exception DOMException + * INVALID_STATE_ERR: Raised if detach() has already been + * invoked on this object. + *
WRONG_DOCUMENT_ERR: Raised if refNode was created + * from a different document than the one that created this range. + */ + public void selectNodeContents(Node refNode) + throws RangeException, DOMException; + + // CompareHow + /** + * Compare start boundary-point of sourceRange to start + * boundary-point of Range on which compareBoundaryPoints + * is invoked. + */ + public static final short START_TO_START = 0; + /** + * Compare start boundary-point of sourceRange to end + * boundary-point of Range on which compareBoundaryPoints + * is invoked. + */ + public static final short START_TO_END = 1; + /** + * Compare end boundary-point of sourceRange to end + * boundary-point of Range on which compareBoundaryPoints + * is invoked. + */ + public static final short END_TO_END = 2; + /** + * Compare end boundary-point of sourceRange to start + * boundary-point of Range on which compareBoundaryPoints + * is invoked. + */ + public static final short END_TO_START = 3; + + /** + * Compare the boundary-points of two Ranges in a document. + * @param how A code representing the type of comparison, as defined + * above. + * @param sourceRange The Range on which this current + * Range is compared to. + * @return -1, 0 or 1 depending on whether the corresponding + * boundary-point of the Range is respectively before, equal to, or + * after the corresponding boundary-point of sourceRange. + * @exception DOMException + * WRONG_DOCUMENT_ERR: Raised if the two Ranges are not in the same + * Document or DocumentFragment. + *
INVALID_STATE_ERR: Raised if detach() has already + * been invoked on this object. + */ + public short compareBoundaryPoints(short how, + Range sourceRange) + throws DOMException; + + /** + * Removes the contents of a Range from the containing document or + * document fragment without returning a reference to the removed + * content. + * @exception DOMException + * NO_MODIFICATION_ALLOWED_ERR: Raised if any portion of the content of + * the Range is read-only or any of the nodes that contain any of the + * content of the Range are read-only. + *
INVALID_STATE_ERR: Raised if detach() has already + * been invoked on this object. + */ + public void deleteContents() + throws DOMException; + + /** + * Moves the contents of a Range from the containing document or document + * fragment to a new DocumentFragment. + * @return A DocumentFragment containing the extracted contents. + * @exception DOMException + * NO_MODIFICATION_ALLOWED_ERR: Raised if any portion of the content of + * the Range is read-only or any of the nodes which contain any of the + * content of the Range are read-only. + *
HIERARCHY_REQUEST_ERR: Raised if a DocumentType node would be + * extracted into the new DocumentFragment. + *
INVALID_STATE_ERR: Raised if detach() has already + * been invoked on this object. + */ + public DocumentFragment extractContents() + throws DOMException; + + /** + * Duplicates the contents of a Range + * @return A DocumentFragment that contains content equivalent to this + * Range. + * @exception DOMException + * HIERARCHY_REQUEST_ERR: Raised if a DocumentType node would be + * extracted into the new DocumentFragment. + *
INVALID_STATE_ERR: Raised if detach() has already + * been invoked on this object. + */ + public DocumentFragment cloneContents() + throws DOMException; + + /** + * Inserts a node into the Document or DocumentFragment at the start of + * the Range. If the container is a Text node, this will be split at the + * start of the Range (as if the Text node's splitText method was + * performed at the insertion point) and the insertion will occur + * between the two resulting Text nodes. Adjacent Text nodes will not be + * automatically merged. If the node to be inserted is a + * DocumentFragment node, the children will be inserted rather than the + * DocumentFragment node itself. + * @param newNode The node to insert at the start of the Range + * @exception DOMException + * NO_MODIFICATION_ALLOWED_ERR: Raised if an ancestor container of the + * start of the Range is read-only. + *
WRONG_DOCUMENT_ERR: Raised if newNode and the + * container of the start of the Range were not created from the same + * document. + *
HIERARCHY_REQUEST_ERR: Raised if the container of the start of + * the Range is of a type that does not allow children of the type of + * newNode or if newNode is an ancestor of + * the container. + *
INVALID_STATE_ERR: Raised if detach() has already + * been invoked on this object. + * @exception RangeException + * INVALID_NODE_TYPE_ERR: Raised if newNode is an Attr, + * Entity, Notation, or Document node. + */ + public void insertNode(Node newNode) + throws DOMException, RangeException; + + /** + * Reparents the contents of the Range to the given node and inserts the + * node at the position of the start of the Range. + * @param newParent The node to surround the contents with. + * @exception DOMException + * NO_MODIFICATION_ALLOWED_ERR: Raised if an ancestor container of + * either boundary-point of the Range is read-only. + *
WRONG_DOCUMENT_ERR: Raised if newParent and the + * container of the start of the Range were not created from the same + * document. + *
HIERARCHY_REQUEST_ERR: Raised if the container of the start of + * the Range is of a type that does not allow children of the type of + * newParent or if newParent is an ancestor + * of the container or if node would end up with a child + * node of a type not allowed by the type of node. + *
INVALID_STATE_ERR: Raised if detach() has already + * been invoked on this object. + * @exception RangeException + * BAD_BOUNDARYPOINTS_ERR: Raised if the Range partially selects a + * non-text node. + *
INVALID_NODE_TYPE_ERR: Raised if node is an Attr, + * Entity, DocumentType, Notation, Document, or DocumentFragment node. + */ + public void surroundContents(Node newParent) + throws DOMException, RangeException; + + /** + * Produces a new Range whose boundary-points are equal to the + * boundary-points of the Range. + * @return The duplicated Range. + * @exception DOMException + * INVALID_STATE_ERR: Raised if detach() has already been + * invoked on this object. + */ + public Range cloneRange() + throws DOMException; + + /** + * Returns the contents of a Range as a string. This string contains only + * the data characters, not any markup. + * @return The contents of the Range. + * @exception DOMException + * INVALID_STATE_ERR: Raised if detach() has already been + * invoked on this object. + */ + public String toString() + throws DOMException; + + /** + * Called to indicate that the Range is no longer in use and that the + * implementation may relinquish any resources associated with this + * Range. Subsequent calls to any methods or attribute getters on this + * Range will result in a DOMException being thrown with an + * error code of INVALID_STATE_ERR. + * @exception DOMException + * INVALID_STATE_ERR: Raised if detach() has already been + * invoked on this object. + */ + public void detach() + throws DOMException; + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/ranges/RangeException.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/ranges/RangeException.java new file mode 100644 index 000000000..2dee8195b --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/ranges/RangeException.java @@ -0,0 +1,39 @@ +/* + * 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. + */ + +package org.w3c.dom.ranges; + +/** + * Range operations may throw a RangeException as specified in + * their method descriptions. + *

See also the Document Object Model (DOM) Level 2 Traversal and Range Specification. + * @since DOM Level 2 + */ +public class RangeException extends RuntimeException { + public RangeException(short code, String message) { + super(message); + this.code = code; + } + public short code; + // RangeExceptionCode + /** + * If the boundary-points of a Range do not meet specific requirements. + */ + public static final short BAD_BOUNDARYPOINTS_ERR = 1; + /** + * If the container of an boundary-point of a Range is being set to either + * a node of an invalid type or a node with an ancestor of an invalid + * type. + */ + public static final short INVALID_NODE_TYPE_ERR = 2; + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/stylesheets/DocumentStyle.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/stylesheets/DocumentStyle.java new file mode 100644 index 000000000..ecfba994c --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/stylesheets/DocumentStyle.java @@ -0,0 +1,34 @@ +/* + * 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. + */ + +package org.w3c.dom.stylesheets; + +/** + * The DocumentStyle interface provides a mechanism by which the + * style sheets embedded in a document can be retrieved. The expectation is + * that an instance of the DocumentStyle interface can be + * obtained by using binding-specific casting methods on an instance of the + * Document interface. + *

See also the Document Object Model (DOM) Level 2 Style Specification. + * @since DOM Level 2 + */ +public interface DocumentStyle { + /** + * A list containing all the style sheets explicitly linked into or + * embedded in a document. For HTML documents, this includes external + * style sheets, included via the HTML LINK element, and inline STYLE + * elements. In XML, this includes external style sheets, included via + * style sheet processing instructions (see [XML StyleSheet]). + */ + public StyleSheetList getStyleSheets(); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/stylesheets/LinkStyle.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/stylesheets/LinkStyle.java new file mode 100644 index 000000000..c7560d647 --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/stylesheets/LinkStyle.java @@ -0,0 +1,31 @@ +/* + * 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. + */ + +package org.w3c.dom.stylesheets; + +/** + * The LinkStyle interface provides a mechanism by which a style + * sheet can be retrieved from the node responsible for linking it into a + * document. An instance of the LinkStyle interface can be + * obtained using binding-specific casting methods on an instance of a + * linking node (HTMLLinkElement, HTMLStyleElement + * or ProcessingInstruction in DOM Level 2). + *

See also the Document Object Model (DOM) Level 2 Style Specification. + * @since DOM Level 2 + */ +public interface LinkStyle { + /** + * The style sheet. + */ + public StyleSheet getSheet(); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/stylesheets/MediaList.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/stylesheets/MediaList.java new file mode 100644 index 000000000..000c90c43 --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/stylesheets/MediaList.java @@ -0,0 +1,85 @@ +/* + * 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. + */ + +package org.w3c.dom.stylesheets; + +import org.w3c.dom.DOMException; + +/** + * The MediaList interface provides the abstraction of an + * ordered collection of media, without defining or constraining how this + * collection is implemented. An empty list is the same as a list that + * contains the medium "all". + *

The items in the MediaList are accessible via an integral + * index, starting from 0. + *

See also the Document Object Model (DOM) Level 2 Style Specification. + * @since DOM Level 2 + */ +public interface MediaList { + /** + * The parsable textual representation of the media list. This is a + * comma-separated list of media. + */ + public String getMediaText(); + /** + * The parsable textual representation of the media list. This is a + * comma-separated list of media. + * @exception DOMException + * SYNTAX_ERR: Raised if the specified string value has a syntax error + * and is unparsable. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this media list is + * readonly. + */ + public void setMediaText(String mediaText) + throws DOMException; + + /** + * The number of media in the list. The range of valid media is + * 0 to length-1 inclusive. + */ + public int getLength(); + + /** + * Returns the indexth in the list. If index is + * greater than or equal to the number of media in the list, this + * returns null. + * @param index Index into the collection. + * @return The medium at the indexth position in the + * MediaList, or null if that is not a valid + * index. + */ + public String item(int index); + + /** + * Deletes the medium indicated by oldMedium from the list. + * @param oldMedium The medium to delete in the media list. + * @exception DOMException + * NO_MODIFICATION_ALLOWED_ERR: Raised if this list is readonly. + *
NOT_FOUND_ERR: Raised if oldMedium is not in the + * list. + */ + public void deleteMedium(String oldMedium) + throws DOMException; + + /** + * Adds the medium newMedium to the end of the list. If the + * newMedium is already used, it is first removed. + * @param newMedium The new medium to add. + * @exception DOMException + * INVALID_CHARACTER_ERR: If the medium contains characters that are + * invalid in the underlying style language. + *
NO_MODIFICATION_ALLOWED_ERR: Raised if this list is readonly. + */ + public void appendMedium(String newMedium) + throws DOMException; + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/stylesheets/StyleSheet.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/stylesheets/StyleSheet.java new file mode 100644 index 000000000..828902817 --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/stylesheets/StyleSheet.java @@ -0,0 +1,103 @@ +/* + * 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. + */ + +package org.w3c.dom.stylesheets; + +import org.w3c.dom.Node; + +/** + * The StyleSheet interface is the abstract base interface for + * any type of style sheet. It represents a single style sheet associated + * with a structured document. In HTML, the StyleSheet interface represents + * either an external style sheet, included via the HTML LINK element, or + * an inline STYLE element. In XML, this interface represents an external + * style sheet, included via a style sheet processing instruction. + *

See also the Document Object Model (DOM) Level 2 Style Specification. + * @since DOM Level 2 + */ +public interface StyleSheet { + /** + * This specifies the style sheet language for this style sheet. The + * style sheet language is specified as a content type (e.g. + * "text/css"). The content type is often specified in the + * ownerNode. Also see the type attribute definition for + * the LINK element in HTML 4.0, and the type + * pseudo-attribute for the XML style sheet processing instruction. + */ + public String getType(); + + /** + * false if the style sheet is applied to the document. + * true if it is not. Modifying this attribute may cause a + * new resolution of style for the document. A stylesheet only applies + * if both an appropriate medium definition is present and the disabled + * attribute is false. So, if the media doesn't apply to the current + * user agent, the disabled attribute is ignored. + */ + public boolean getDisabled(); + /** + * false if the style sheet is applied to the document. + * true if it is not. Modifying this attribute may cause a + * new resolution of style for the document. A stylesheet only applies + * if both an appropriate medium definition is present and the disabled + * attribute is false. So, if the media doesn't apply to the current + * user agent, the disabled attribute is ignored. + */ + public void setDisabled(boolean disabled); + + /** + * The node that associates this style sheet with the document. For HTML, + * this may be the corresponding LINK or STYLE + * element. For XML, it may be the linking processing instruction. For + * style sheets that are included by other style sheets, the value of + * this attribute is null. + */ + public Node getOwnerNode(); + + /** + * For style sheet languages that support the concept of style sheet + * inclusion, this attribute represents the including style sheet, if + * one exists. If the style sheet is a top-level style sheet, or the + * style sheet language does not support inclusion, the value of this + * attribute is null. + */ + public StyleSheet getParentStyleSheet(); + + /** + * If the style sheet is a linked style sheet, the value of its attribute + * is its location. For inline style sheets, the value of this attribute + * is null. See the href attribute definition for the + * LINK element in HTML 4.0, and the href pseudo-attribute + * for the XML style sheet processing instruction. + */ + public String getHref(); + + /** + * The advisory title. The title is often specified in the + * ownerNode. See the title attribute definition for the + * LINK element in HTML 4.0, and the title pseudo-attribute + * for the XML style sheet processing instruction. + */ + public String getTitle(); + + /** + * The intended destination media for style information. The media is + * often specified in the ownerNode. If no media has been + * specified, the MediaList will be empty. See the media + * attribute definition for the LINK element in HTML 4.0, + * and the media pseudo-attribute for the XML style sheet processing + * instruction . Modifying the media list may cause a change to the + * attribute disabled. + */ + public MediaList getMedia(); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/stylesheets/StyleSheetList.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/stylesheets/StyleSheetList.java new file mode 100644 index 000000000..6bb085fca --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/stylesheets/StyleSheetList.java @@ -0,0 +1,42 @@ +/* + * 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. + */ + +package org.w3c.dom.stylesheets; + +/** + * The StyleSheetList interface provides the abstraction of an + * ordered collection of style sheets. + *

The items in the StyleSheetList are accessible via an + * integral index, starting from 0. + *

See also the Document Object Model (DOM) Level 2 Style Specification. + * @since DOM Level 2 + */ +public interface StyleSheetList { + /** + * The number of StyleSheets in the list. The range of valid + * child stylesheet indices is 0 to length-1 + * inclusive. + */ + public int getLength(); + + /** + * Used to retrieve a style sheet by ordinal index. If index is greater + * than or equal to the number of style sheets in the list, this returns + * null. + * @param index Index into the collection + * @return The style sheet at the index position in the + * StyleSheetList, or null if that is not a + * valid index. + */ + public StyleSheet item(int index); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/traversal/DocumentTraversal.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/traversal/DocumentTraversal.java new file mode 100644 index 000000000..e68d656f2 --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/traversal/DocumentTraversal.java @@ -0,0 +1,93 @@ +/* + * 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. + */ + +package org.w3c.dom.traversal; + +import org.w3c.dom.Node; +import org.w3c.dom.DOMException; + +/** + * DocumentTraversal contains methods that create + * NodeIterators and TreeWalkers to traverse a + * node and its children in document order (depth first, pre-order + * traversal, which is equivalent to the order in which the start tags occur + * in the text representation of the document). In DOMs which support the + * Traversal feature, DocumentTraversal will be implemented by + * the same objects that implement the Document interface. + *

See also the Document Object Model (DOM) Level 2 Traversal and Range Specification. + * @since DOM Level 2 + */ +public interface DocumentTraversal { + /** + * Create a new NodeIterator over the subtree rooted at the + * specified node. + * @param root The node which will be iterated together with its + * children. The NodeIterator is initially positioned + * just before this node. The whatToShow flags and the + * filter, if any, are not considered when setting this position. The + * root must not be null. + * @param whatToShow This flag specifies which node types may appear in + * the logical view of the tree presented by the + * NodeIterator. See the description of + * NodeFilter for the set of possible SHOW_ + * values.These flags can be combined using OR. + * @param filter The NodeFilter to be used with this + * NodeIterator, or null to indicate no + * filter. + * @param entityReferenceExpansion The value of this flag determines + * whether entity reference nodes are expanded. + * @return The newly created NodeIterator. + * @exception DOMException + * NOT_SUPPORTED_ERR: Raised if the specified root is + * null. + */ + public NodeIterator createNodeIterator(Node root, + int whatToShow, + NodeFilter filter, + boolean entityReferenceExpansion) + throws DOMException; + + /** + * Create a new TreeWalker over the subtree rooted at the + * specified node. + * @param root The node which will serve as the root for the + * TreeWalker. The whatToShow flags and the + * NodeFilter are not considered when setting this value; + * any node type will be accepted as the root. The + * currentNode of the TreeWalker is + * initialized to this node, whether or not it is visible. The + * root functions as a stopping point for traversal + * methods that look upward in the document structure, such as + * parentNode and nextNode. The root must + * not be null. + * @param whatToShow This flag specifies which node types may appear in + * the logical view of the tree presented by the + * TreeWalker. See the description of + * NodeFilter for the set of possible SHOW_ + * values.These flags can be combined using OR. + * @param filter The NodeFilter to be used with this + * TreeWalker, or null to indicate no filter. + * @param entityReferenceExpansion If this flag is false, the contents of + * EntityReference nodes are not presented in the logical + * view. + * @return The newly created TreeWalker. + * @exception DOMException + * NOT_SUPPORTED_ERR: Raised if the specified root is + * null. + */ + public TreeWalker createTreeWalker(Node root, + int whatToShow, + NodeFilter filter, + boolean entityReferenceExpansion) + throws DOMException; + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/traversal/NodeFilter.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/traversal/NodeFilter.java new file mode 100644 index 000000000..554775078 --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/traversal/NodeFilter.java @@ -0,0 +1,144 @@ +/* + * 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. + */ + +package org.w3c.dom.traversal; + +import org.w3c.dom.Node; + +/** + * Filters are objects that know how to "filter out" nodes. If a + * NodeIterator or TreeWalker is given a + * NodeFilter, it applies the filter before it returns the next + * node. If the filter says to accept the node, the traversal logic returns + * it; otherwise, traversal looks for the next node and pretends that the + * node that was rejected was not there. + *

The DOM does not provide any filters. NodeFilter is just an + * interface that users can implement to provide their own filters. + *

NodeFilters do not need to know how to traverse from node + * to node, nor do they need to know anything about the data structure that + * is being traversed. This makes it very easy to write filters, since the + * only thing they have to know how to do is evaluate a single node. One + * filter may be used with a number of different kinds of traversals, + * encouraging code reuse. + *

See also the Document Object Model (DOM) Level 2 Traversal and Range Specification. + * @since DOM Level 2 + */ +public interface NodeFilter { + // Constants returned by acceptNode + /** + * Accept the node. Navigation methods defined for + * NodeIterator or TreeWalker will return this + * node. + */ + public static final short FILTER_ACCEPT = 1; + /** + * Reject the node. Navigation methods defined for + * NodeIterator or TreeWalker will not return + * this node. For TreeWalker, the children of this node + * will also be rejected. NodeIterators treat this as a + * synonym for FILTER_SKIP. + */ + public static final short FILTER_REJECT = 2; + /** + * Skip this single node. Navigation methods defined for + * NodeIterator or TreeWalker will not return + * this node. For both NodeIterator and + * TreeWalker, the children of this node will still be + * considered. + */ + public static final short FILTER_SKIP = 3; + + // Constants for whatToShow + /** + * Show all Nodes. + */ + public static final int SHOW_ALL = 0xFFFFFFFF; + /** + * Show Element nodes. + */ + public static final int SHOW_ELEMENT = 0x00000001; + /** + * Show Attr nodes. This is meaningful only when creating an + * NodeIterator or TreeWalker with an + * attribute node as its root; in this case, it means that + * the attribute node will appear in the first position of the iteration + * or traversal. Since attributes are never children of other nodes, + * they do not appear when traversing over the document tree. + */ + public static final int SHOW_ATTRIBUTE = 0x00000002; + /** + * Show Text nodes. + */ + public static final int SHOW_TEXT = 0x00000004; + /** + * Show CDATASection nodes. + */ + public static final int SHOW_CDATA_SECTION = 0x00000008; + /** + * Show EntityReference nodes. + */ + public static final int SHOW_ENTITY_REFERENCE = 0x00000010; + /** + * Show Entity nodes. This is meaningful only when creating + * an NodeIterator or TreeWalker with an + * Entity node as its root; in this case, it + * means that the Entity node will appear in the first + * position of the traversal. Since entities are not part of the + * document tree, they do not appear when traversing over the document + * tree. + */ + public static final int SHOW_ENTITY = 0x00000020; + /** + * Show ProcessingInstruction nodes. + */ + public static final int SHOW_PROCESSING_INSTRUCTION = 0x00000040; + /** + * Show Comment nodes. + */ + public static final int SHOW_COMMENT = 0x00000080; + /** + * Show Document nodes. + */ + public static final int SHOW_DOCUMENT = 0x00000100; + /** + * Show DocumentType nodes. + */ + public static final int SHOW_DOCUMENT_TYPE = 0x00000200; + /** + * Show DocumentFragment nodes. + */ + public static final int SHOW_DOCUMENT_FRAGMENT = 0x00000400; + /** + * Show Notation nodes. This is meaningful only when creating + * an NodeIterator or TreeWalker with a + * Notation node as its root; in this case, it + * means that the Notation node will appear in the first + * position of the traversal. Since notations are not part of the + * document tree, they do not appear when traversing over the document + * tree. + */ + public static final int SHOW_NOTATION = 0x00000800; + + /** + * Test whether a specified node is visible in the logical view of a + * TreeWalker or NodeIterator. This function + * will be called by the implementation of TreeWalker and + * NodeIterator; it is not normally called directly from + * user code. (Though you could do so if you wanted to use the same + * filter to guide your own application logic.) + * @param n The node to check to see if it passes the filter or not. + * @return A constant to determine whether the node is accepted, + * rejected, or skipped, as defined above. + */ + public short acceptNode(Node n); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/traversal/NodeIterator.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/traversal/NodeIterator.java new file mode 100644 index 000000000..40deef2f3 --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/traversal/NodeIterator.java @@ -0,0 +1,109 @@ +/* + * 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. + */ + +package org.w3c.dom.traversal; + +import org.w3c.dom.Node; +import org.w3c.dom.DOMException; + +/** + * NodeIterators are used to step through a set of nodes, e.g. + * the set of nodes in a NodeList, the document subtree + * governed by a particular Node, the results of a query, or + * any other set of nodes. The set of nodes to be iterated is determined by + * the implementation of the NodeIterator. DOM Level 2 + * specifies a single NodeIterator implementation for + * document-order traversal of a document subtree. Instances of these + * NodeIterators are created by calling + * DocumentTraversal.createNodeIterator(). + *

See also the Document Object Model (DOM) Level 2 Traversal and Range Specification. + * @since DOM Level 2 + */ +public interface NodeIterator { + /** + * The root node of the NodeIterator, as specified when it + * was created. + */ + public Node getRoot(); + + /** + * This attribute determines which node types are presented via the + * NodeIterator. The available set of constants is defined + * in the NodeFilter interface. Nodes not accepted by + * whatToShow will be skipped, but their children may still + * be considered. Note that this skip takes precedence over the filter, + * if any. + */ + public int getWhatToShow(); + + /** + * The NodeFilter used to screen nodes. + */ + public NodeFilter getFilter(); + + /** + * The value of this flag determines whether the children of entity + * reference nodes are visible to the NodeIterator. If + * false, these children and their descendants will be rejected. Note + * that this rejection takes precedence over whatToShow and + * the filter. Also note that this is currently the only situation where + * NodeIterators may reject a complete subtree rather than + * skipping individual nodes. + *
+ *
To produce a view of the document that has entity references + * expanded and does not expose the entity reference node itself, use + * the whatToShow flags to hide the entity reference node + * and set expandEntityReferences to true when creating the + * NodeIterator. To produce a view of the document that has + * entity reference nodes but no entity expansion, use the + * whatToShow flags to show the entity reference node and + * set expandEntityReferences to false. + */ + public boolean getExpandEntityReferences(); + + /** + * Returns the next node in the set and advances the position of the + * NodeIterator in the set. After a + * NodeIterator is created, the first call to + * nextNode() returns the first node in the set. + * @return The next Node in the set being iterated over, or + * null if there are no more members in that set. + * @exception DOMException + * INVALID_STATE_ERR: Raised if this method is called after the + * detach method was invoked. + */ + public Node nextNode() + throws DOMException; + + /** + * Returns the previous node in the set and moves the position of the + * NodeIterator backwards in the set. + * @return The previous Node in the set being iterated over, + * or null if there are no more members in that set. + * @exception DOMException + * INVALID_STATE_ERR: Raised if this method is called after the + * detach method was invoked. + */ + public Node previousNode() + throws DOMException; + + /** + * Detaches the NodeIterator from the set which it iterated + * over, releasing any computational resources and placing the + * NodeIterator in the INVALID state. After + * detach has been invoked, calls to nextNode + * or previousNode will raise the exception + * INVALID_STATE_ERR. + */ + public void detach(); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/traversal/TreeWalker.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/traversal/TreeWalker.java new file mode 100644 index 000000000..74527f30d --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/traversal/TreeWalker.java @@ -0,0 +1,179 @@ +/* + * 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. + */ + +package org.w3c.dom.traversal; + +import org.w3c.dom.Node; +import org.w3c.dom.DOMException; + +/** + * TreeWalker objects are used to navigate a document tree or + * subtree using the view of the document defined by their + * whatToShow flags and filter (if any). Any function which + * performs navigation using a TreeWalker will automatically + * support any view defined by a TreeWalker. + *

Omitting nodes from the logical view of a subtree can result in a + * structure that is substantially different from the same subtree in the + * complete, unfiltered document. Nodes that are siblings in the + * TreeWalker view may be children of different, widely + * separated nodes in the original view. For instance, consider a + * NodeFilter that skips all nodes except for Text nodes and + * the root node of a document. In the logical view that results, all text + * nodes will be siblings and appear as direct children of the root node, no + * matter how deeply nested the structure of the original document. + *

See also the Document Object Model (DOM) Level 2 Traversal and Range Specification. + * @since DOM Level 2 + */ +public interface TreeWalker { + /** + * The root node of the TreeWalker, as specified + * when it was created. + */ + public Node getRoot(); + + /** + * This attribute determines which node types are presented via the + * TreeWalker. The available set of constants is defined in + * the NodeFilter interface. Nodes not accepted by + * whatToShow will be skipped, but their children may still + * be considered. Note that this skip takes precedence over the filter, + * if any. + */ + public int getWhatToShow(); + + /** + * The filter used to screen nodes. + */ + public NodeFilter getFilter(); + + /** + * The value of this flag determines whether the children of entity + * reference nodes are visible to the TreeWalker. If false, + * these children and their descendants will be rejected. Note that + * this rejection takes precedence over whatToShow and the + * filter, if any. + *
To produce a view of the document that has entity references + * expanded and does not expose the entity reference node itself, use + * the whatToShow flags to hide the entity reference node + * and set expandEntityReferences to true when creating the + * TreeWalker. To produce a view of the document that has + * entity reference nodes but no entity expansion, use the + * whatToShow flags to show the entity reference node and + * set expandEntityReferences to false. + */ + public boolean getExpandEntityReferences(); + + /** + * The node at which the TreeWalker is currently positioned. + *
Alterations to the DOM tree may cause the current node to no longer + * be accepted by the TreeWalker's associated filter. + * currentNode may also be explicitly set to any node, + * whether or not it is within the subtree specified by the + * root node or would be accepted by the filter and + * whatToShow flags. Further traversal occurs relative to + * currentNode even if it is not part of the current view, + * by applying the filters in the requested direction; if no traversal + * is possible, currentNode is not changed. + */ + public Node getCurrentNode(); + /** + * The node at which the TreeWalker is currently positioned. + *
Alterations to the DOM tree may cause the current node to no longer + * be accepted by the TreeWalker's associated filter. + * currentNode may also be explicitly set to any node, + * whether or not it is within the subtree specified by the + * root node or would be accepted by the filter and + * whatToShow flags. Further traversal occurs relative to + * currentNode even if it is not part of the current view, + * by applying the filters in the requested direction; if no traversal + * is possible, currentNode is not changed. + * @exception DOMException + * NOT_SUPPORTED_ERR: Raised if an attempt is made to set + * currentNode to null. + */ + public void setCurrentNode(Node currentNode) + throws DOMException; + + /** + * Moves to and returns the closest visible ancestor node of the current + * node. If the search for parentNode attempts to step + * upward from the TreeWalker's root node, or + * if it fails to find a visible ancestor node, this method retains the + * current position and returns null. + * @return The new parent node, or null if the current node + * has no parent in the TreeWalker's logical view. + */ + public Node parentNode(); + + /** + * Moves the TreeWalker to the first visible child of the + * current node, and returns the new node. If the current node has no + * visible children, returns null, and retains the current + * node. + * @return The new node, or null if the current node has no + * visible children in the TreeWalker's logical view. + */ + public Node firstChild(); + + /** + * Moves the TreeWalker to the last visible child of the + * current node, and returns the new node. If the current node has no + * visible children, returns null, and retains the current + * node. + * @return The new node, or null if the current node has no + * children in the TreeWalker's logical view. + */ + public Node lastChild(); + + /** + * Moves the TreeWalker to the previous sibling of the + * current node, and returns the new node. If the current node has no + * visible previous sibling, returns null, and retains the + * current node. + * @return The new node, or null if the current node has no + * previous sibling. in the TreeWalker's logical view. + */ + public Node previousSibling(); + + /** + * Moves the TreeWalker to the next sibling of the current + * node, and returns the new node. If the current node has no visible + * next sibling, returns null, and retains the current node. + * @return The new node, or null if the current node has no + * next sibling. in the TreeWalker's logical view. + */ + public Node nextSibling(); + + /** + * Moves the TreeWalker to the previous visible node in + * document order relative to the current node, and returns the new + * node. If the current node has no previous node, or if the search for + * previousNode attempts to step upward from the + * TreeWalker's root node, returns + * null, and retains the current node. + * @return The new node, or null if the current node has no + * previous node in the TreeWalker's logical view. + */ + public Node previousNode(); + + /** + * Moves the TreeWalker to the next visible node in document + * order relative to the current node, and returns the new node. If the + * current node has no next node, or if the search for nextNode attempts + * to step upward from the TreeWalker's root + * node, returns null, and retains the current node. + * @return The new node, or null if the current node has no + * next node in the TreeWalker's logical view. + */ + public Node nextNode(); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/views/AbstractView.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/views/AbstractView.java new file mode 100644 index 000000000..b024cc780 --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/views/AbstractView.java @@ -0,0 +1,27 @@ +/* + * 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. + */ + +package org.w3c.dom.views; + +/** + * A base interface that all views shall derive from. + *

See also the Document Object Model (DOM) Level 2 Views Specification. + * @since DOM Level 2 + */ +public interface AbstractView { + /** + * The source DocumentView of which this is an + * AbstractView. + */ + public DocumentView getDocument(); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/views/DocumentView.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/views/DocumentView.java new file mode 100644 index 000000000..37dfbe1a3 --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/views/DocumentView.java @@ -0,0 +1,30 @@ +/* + * 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. + */ + +package org.w3c.dom.views; + +/** + * The DocumentView interface is implemented by + * Document objects in DOM implementations supporting DOM + * Views. It provides an attribute to retrieve the default view of a + * document. + *

See also the Document Object Model (DOM) Level 2 Views Specification. + * @since DOM Level 2 + */ +public interface DocumentView { + /** + * The default AbstractView for this Document, + * or null if none available. + */ + public AbstractView getDefaultView(); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/xpath/XPathEvaluator.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/xpath/XPathEvaluator.java new file mode 100644 index 000000000..848c67329 --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/xpath/XPathEvaluator.java @@ -0,0 +1,134 @@ +/* + * 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 + */ + +package org.w3c.dom.xpath; + +import org.w3c.dom.Node; +import org.w3c.dom.DOMException; + +/** + * The evaluation of XPath expressions is provided by + * XPathEvaluator. In a DOM implementation which supports the + * XPath 3.0 feature, as described above, the XPathEvaluator + * interface will be implemented on the same object which implements the + * Document interface permitting it to be obtained by the usual + * binding-specific method such as casting or by using the DOM Level 3 + * getInterface method. In this case the implementation obtained from the + * Document supports the XPath DOM module and is compatible with the XPath + * 1.0 specification. + *

Evaluation of expressions with specialized extension functions or + * variables may not work in all implementations and is, therefore, not + * portable. XPathEvaluator implementations may be available + * from other sources that could provide specific support for specialized + * extension functions or variables as would be defined by other + * specifications. + *

See also the Document Object Model (DOM) Level 3 XPath Specification. + */ +public interface XPathEvaluator { + /** + * Creates a parsed XPath expression with resolved namespaces. This is + * useful when an expression will be reused in an application since it + * makes it possible to compile the expression string into a more + * efficient internal form and preresolve all namespace prefixes which + * occur within the expression. + * @param expression The XPath expression string to be parsed. + * @param resolver The resolver permits translation of all + * prefixes, including the xml namespace prefix, within + * the XPath expression into appropriate namespace URIs. If this is + * specified as null, any namespace prefix within the + * expression will result in DOMException being thrown + * with the code NAMESPACE_ERR. + * @return The compiled form of the XPath expression. + * @exception XPathException + * INVALID_EXPRESSION_ERR: Raised if the expression is not legal + * according to the rules of the XPathEvaluator. + * @exception DOMException + * NAMESPACE_ERR: Raised if the expression contains namespace prefixes + * which cannot be resolved by the specified + * XPathNSResolver. + */ + public XPathExpression createExpression(String expression, + XPathNSResolver resolver) + throws XPathException, DOMException; + + /** + * Adapts any DOM node to resolve namespaces so that an XPath expression + * can be easily evaluated relative to the context of the node where it + * appeared within the document. This adapter works like the DOM Level 3 + * method lookupNamespaceURI on nodes in resolving the + * namespaceURI from a given prefix using the current information + * available in the node's hierarchy at the time lookupNamespaceURI is + * called. also correctly resolving the implicit xml prefix. + * @param nodeResolver The node to be used as a context for namespace + * resolution. + * @return XPathNSResolver which resolves namespaces with + * respect to the definitions in scope for a specified node. + */ + public XPathNSResolver createNSResolver(Node nodeResolver); + + /** + * Evaluates an XPath expression string and returns a result of the + * specified type if possible. + * @param expression The XPath expression string to be parsed and + * evaluated. + * @param contextNode The context is context node for the + * evaluation of this XPath expression. If the XPathEvaluator was + * obtained by casting the Document then this must be + * owned by the same document and must be a Document, + * Element, Attribute, Text, + * CDATASection, Comment, + * ProcessingInstruction, or XPathNamespace + * node. If the context node is a Text or a + * CDATASection, then the context is interpreted as the + * whole logical text node as seen by XPath, unless the node is empty + * in which case it may not serve as the XPath context. + * @param resolver The resolver permits translation of all + * prefixes, including the xml namespace prefix, within + * the XPath expression into appropriate namespace URIs. If this is + * specified as null, any namespace prefix within the + * expression will result in DOMException being thrown + * with the code NAMESPACE_ERR. + * @param type If a specific type is specified, then the + * result will be returned as the corresponding type.For XPath 1.0 + * results, this must be one of the codes of the + * XPathResult interface. + * @param result The result specifies a specific result + * object which may be reused and returned by this method. If this is + * specified as nullor the implementation does not reuse + * the specified result, a new result object will be constructed and + * returned.For XPath 1.0 results, this object will be of type + * XPathResult. + * @return The result of the evaluation of the XPath expression.For XPath + * 1.0 results, this object will be of type XPathResult. + * @exception XPathException + * INVALID_EXPRESSION_ERR: Raised if the expression is not legal + * according to the rules of the XPathEvaluatori + *
TYPE_ERR: Raised if the result cannot be converted to return the + * specified type. + * @exception DOMException + * NAMESPACE_ERR: Raised if the expression contains namespace prefixes + * which cannot be resolved by the specified + * XPathNSResolver. + *
WRONG_DOCUMENT_ERR: The Node is from a document that is not + * supported by this XPathEvaluator. + *
NOT_SUPPORTED_ERR: The Node is not a type permitted as an XPath + * context node or the request type is not permitted by this + * XPathEvaluator. + */ + public Object evaluate(String expression, + Node contextNode, + XPathNSResolver resolver, + short type, + Object result) + throws XPathException, DOMException; + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/xpath/XPathException.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/xpath/XPathException.java new file mode 100644 index 000000000..6b13cdf00 --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/xpath/XPathException.java @@ -0,0 +1,39 @@ +/* + * 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 + */ + +package org.w3c.dom.xpath; + +/** + * A new exception has been created for exceptions specific to these XPath + * interfaces. + *

See also the Document Object Model (DOM) Level 3 XPath Specification. + */ +public class XPathException extends RuntimeException { + public XPathException(short code, String message) { + super(message); + this.code = code; + } + public short code; + // XPathExceptionCode + /** + * If the expression has a syntax error or otherwise is not a legal + * expression according to the rules of the specific + * XPathEvaluator or contains specialized extension + * functions or variables not supported by this implementation. + */ + public static final short INVALID_EXPRESSION_ERR = 51; + /** + * If the expression cannot be converted to return the specified type. + */ + public static final short TYPE_ERR = 52; + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/xpath/XPathExpression.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/xpath/XPathExpression.java new file mode 100644 index 000000000..ab5d28c43 --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/xpath/XPathExpression.java @@ -0,0 +1,65 @@ +/* + * 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 + */ + +package org.w3c.dom.xpath; + +import org.w3c.dom.Node; +import org.w3c.dom.DOMException; + +/** + * The XPathExpression interface represents a parsed and resolved + * XPath expression. + *

See also the Document Object Model (DOM) Level 3 XPath Specification. + */ +public interface XPathExpression { + /** + * Evaluates this XPath expression and returns a result. + * @param contextNode The context is context node for the + * evaluation of this XPath expression.If the XPathEvaluator was + * obtained by casting the Document then this must be + * owned by the same document and must be a Document, + * Element, Attribute, Text, + * CDATASection, Comment, + * ProcessingInstruction, or XPathNamespace + * node.If the context node is a Text or a + * CDATASection, then the context is interpreted as the + * whole logical text node as seen by XPath, unless the node is empty + * in which case it may not serve as the XPath context. + * @param type If a specific type is specified, then the + * result will be coerced to return the specified type relying on + * XPath conversions and fail if the desired coercion is not possible. + * This must be one of the type codes of XPathResult. + * @param result The result specifies a specific result + * object which may be reused and returned by this method. If this is + * specified as nullor the implementation does not reuse + * the specified result, a new result object will be constructed and + * returned.For XPath 1.0 results, this object will be of type + * XPathResult. + * @return The result of the evaluation of the XPath expression.For XPath + * 1.0 results, this object will be of type XPathResult. + * @exception XPathException + * TYPE_ERR: Raised if the result cannot be converted to return the + * specified type. + * @exception DOMException + * WRONG_DOCUMENT_ERR: The Node is from a document that is not supported + * by the XPathEvaluator that created this XPathExpression + * . + *
NOT_SUPPORTED_ERR: The Node is not a type permitted as an XPath + * context node or the request type is not permitted by this + * XPathExpression. + */ + public Object evaluate(Node contextNode, + short type, + Object result) + throws XPathException, DOMException; + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/xpath/XPathNSResolver.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/xpath/XPathNSResolver.java new file mode 100644 index 000000000..5ce068de9 --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/xpath/XPathNSResolver.java @@ -0,0 +1,34 @@ +/* + * 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 + */ + +package org.w3c.dom.xpath; + +/** + * The XPathNSResolver interface permit prefix + * strings in the expression to be properly bound to + * namespaceURI strings. XPathEvaluator can + * construct an implementation of XPathNSResolver from a node, + * or the interface may be implemented by any application. + *

See also the Document Object Model (DOM) Level 3 XPath Specification. + */ +public interface XPathNSResolver { + /** + * Look up the namespace URI associated to the given namespace prefix. The + * XPath evaluator must never call this with a null or + * empty argument, because the result of doing this is undefined. + * @param prefix The prefix to look for. + * @return Returns the associated namespace URI or null if + * none is found. + */ + public String lookupNamespaceURI(String prefix); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/xpath/XPathNamespace.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/xpath/XPathNamespace.java new file mode 100644 index 000000000..d644051f2 --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/xpath/XPathNamespace.java @@ -0,0 +1,67 @@ +/* + * 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 + */ + +package org.w3c.dom.xpath; + +import org.w3c.dom.Element; +import org.w3c.dom.Node; + +/** + * The XPathNamespace interface is returned by + * XPathResult interfaces to represent the XPath namespace node + * type that DOM lacks. There is no public constructor for this node type. + * Attempts to place it into a hierarchy or a NamedNodeMap result in a + * DOMException with the code HIERARCHY_REQUEST_ERR + * . This node is read only, so methods or setting of attributes that would + * mutate the node result in a DOMException with the code + * NO_MODIFICATION_ALLOWED_ERR. + *

The core specification describes attributes of the Node + * interface that are different for different node types but does not + * describe XPATH_NAMESPACE_NODE, so here is a description of + * those attributes for this node type. All attributes of Node + * not described in this section have a null or + * false value. + *

ownerDocument matches the ownerDocument of the + * ownerElement even if the element is later adopted. + *

nodeName is always the string "#namespace". + *

prefix is the prefix of the namespace represented by the + * node. + *

localName is the same as prefix. + *

nodeType is equal to XPATH_NAMESPACE_NODE. + *

namespaceURI is the namespace URI of the namespace + * represented by the node. + *

nodeValue is the same as namespaceURI. + *

adoptNode, cloneNode, and + * importNode fail on this node type by raising a + * DOMException with the code NOT_SUPPORTED_ERR. + *

Note: In future versions of the XPath specification, the + * definition of a namespace node may be changed incomatibly, in which case + * incompatible changes to field values may be required to implement + * versions beyond XPath 1.0. + *

See also the Document Object Model (DOM) Level 3 XPath Specification. + */ +public interface XPathNamespace extends Node { + // XPathNodeType + /** + * The node is a Namespace. + */ + public static final short XPATH_NAMESPACE_NODE = 13; + + /** + * The Element on which the namespace was in scope when it + * was requested. This does not change on a returned namespace node even + * if the document changes such that the namespace goes out of scope on + * that element and this node is no longer found there by XPath. + */ + public Element getOwnerElement(); + +} diff --git a/libjava/classpath/external/w3c_dom/org/w3c/dom/xpath/XPathResult.java b/libjava/classpath/external/w3c_dom/org/w3c/dom/xpath/XPathResult.java new file mode 100644 index 000000000..06fd29dac --- /dev/null +++ b/libjava/classpath/external/w3c_dom/org/w3c/dom/xpath/XPathResult.java @@ -0,0 +1,214 @@ +/* + * 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 + */ + +package org.w3c.dom.xpath; + +import org.w3c.dom.Node; +import org.w3c.dom.DOMException; + +/** + * The XPathResult interface represents the result of the + * evaluation of an XPath 1.0 expression within the context of a particular + * node. Since evaluation of an XPath expression can result in various + * result types, this object makes it possible to discover and manipulate + * the type and value of the result. + *

See also the Document Object Model (DOM) Level 3 XPath Specification. + */ +public interface XPathResult { + // XPathResultType + /** + * This code does not represent a specific type. An evaluation of an XPath + * expression will never produce this type. If this type is requested, + * then the evaluation returns whatever type naturally results from + * evaluation of the expression. + *
If the natural result is a node set when ANY_TYPE was + * requested, then UNORDERED_NODE_ITERATOR_TYPE is always + * the resulting type. Any other representation of a node set must be + * explicitly requested. + */ + public static final short ANY_TYPE = 0; + /** + * The result is a number as defined by [XPath 1.0]. + * Document modification does not invalidate the number, but may mean + * that reevaluation would not yield the same number. + */ + public static final short NUMBER_TYPE = 1; + /** + * The result is a string as defined by [XPath 1.0]. + * Document modification does not invalidate the string, but may mean + * that the string no longer corresponds to the current document. + */ + public static final short STRING_TYPE = 2; + /** + * The result is a boolean as defined by [XPath 1.0]. + * Document modification does not invalidate the boolean, but may mean + * that reevaluation would not yield the same boolean. + */ + public static final short BOOLEAN_TYPE = 3; + /** + * The result is a node set as defined by [XPath 1.0] that + * will be accessed iteratively, which may not produce nodes in a + * particular order. Document modification invalidates the iteration. + *
This is the default type returned if the result is a node set and + * ANY_TYPE is requested. + */ + public static final short UNORDERED_NODE_ITERATOR_TYPE = 4; + /** + * The result is a node set as defined by [XPath 1.0] that + * will be accessed iteratively, which will produce document-ordered + * nodes. Document modification invalidates the iteration. + */ + public static final short ORDERED_NODE_ITERATOR_TYPE = 5; + /** + * The result is a node set as defined by [XPath 1.0] that + * will be accessed as a snapshot list of nodes that may not be in a + * particular order. Document modification does not invalidate the + * snapshot but may mean that reevaluation would not yield the same + * snapshot and nodes in the snapshot may have been altered, moved, or + * removed from the document. + */ + public static final short UNORDERED_NODE_SNAPSHOT_TYPE = 6; + /** + * The result is a node set as defined by [XPath 1.0] that + * will be accessed as a snapshot list of nodes that will be in original + * document order. Document modification does not invalidate the + * snapshot but may mean that reevaluation would not yield the same + * snapshot and nodes in the snapshot may have been altered, moved, or + * removed from the document. + */ + public static final short ORDERED_NODE_SNAPSHOT_TYPE = 7; + /** + * The result is a node set as defined by [XPath 1.0] and + * will be accessed as a single node, which may be nullif + * the node set is empty. Document modification does not invalidate the + * node, but may mean that the result node no longer corresponds to the + * current document. This is a convenience that permits optimization + * since the implementation can stop once any node in the resulting set + * has been found. + *
If there is more than one node in the actual result, the single + * node returned might not be the first in document order. + */ + public static final short ANY_UNORDERED_NODE_TYPE = 8; + /** + * The result is a node set as defined by [XPath 1.0] and + * will be accessed as a single node, which may be null if + * the node set is empty. Document modification does not invalidate the + * node, but may mean that the result node no longer corresponds to the + * current document. This is a convenience that permits optimization + * since the implementation can stop once the first node in document + * order of the resulting set has been found. + *
If there are more than one node in the actual result, the single + * node returned will be the first in document order. + */ + public static final short FIRST_ORDERED_NODE_TYPE = 9; + + /** + * A code representing the type of this result, as defined by the type + * constants. + */ + public short getResultType(); + + /** + * The value of this number result. If the native double type of the DOM + * binding does not directly support the exact IEEE 754 result of the + * XPath expression, then it is up to the definition of the binding to + * specify how the XPath number is converted to the native binding + * number. + * @exception XPathException + * TYPE_ERR: raised if resultType is not + * NUMBER_TYPE. + */ + public double getNumberValue() + throws XPathException; + + /** + * The value of this string result. + * @exception XPathException + * TYPE_ERR: raised if resultType is not + * STRING_TYPE. + */ + public String getStringValue() + throws XPathException; + + /** + * The value of this boolean result. + * @exception XPathException + * TYPE_ERR: raised if resultType is not + * BOOLEAN_TYPE. + */ + public boolean getBooleanValue() + throws XPathException; + + /** + * The value of this single node result, which may be null. + * @exception XPathException + * TYPE_ERR: raised if resultType is not + * ANY_UNORDERED_NODE_TYPE or + * FIRST_ORDERED_NODE_TYPE. + */ + public Node getSingleNodeValue() + throws XPathException; + + /** + * Signifies that the iterator has become invalid. True if + * resultType is UNORDERED_NODE_ITERATOR_TYPE + * or ORDERED_NODE_ITERATOR_TYPE and the document has been + * modified since this result was returned. + */ + public boolean getInvalidIteratorState(); + + /** + * The number of nodes in the result snapshot. Valid values for + * snapshotItem indices are 0 to + * snapshotLength-1 inclusive. + * @exception XPathException + * TYPE_ERR: raised if resultType is not + * UNORDERED_NODE_SNAPSHOT_TYPE or + * ORDERED_NODE_SNAPSHOT_TYPE. + */ + public int getSnapshotLength() + throws XPathException; + + /** + * Iterates and returns the next node from the node set or + * nullif there are no more nodes. + * @return Returns the next node. + * @exception XPathException + * TYPE_ERR: raised if resultType is not + * UNORDERED_NODE_ITERATOR_TYPE or + * ORDERED_NODE_ITERATOR_TYPE. + * @exception DOMException + * INVALID_STATE_ERR: The document has been mutated since the result was + * returned. + */ + public Node iterateNext() + throws XPathException, DOMException; + + /** + * Returns the indexth item in the snapshot collection. If + * index is greater than or equal to the number of nodes in + * the list, this method returns null. Unlike the iterator + * result, the snapshot does not become invalid, but may not correspond + * to the current document if it is mutated. + * @param index Index into the snapshot collection. + * @return The node at the indexth position in the + * NodeList, or null if that is not a valid + * index. + * @exception XPathException + * TYPE_ERR: raised if resultType is not + * UNORDERED_NODE_SNAPSHOT_TYPE or + * ORDERED_NODE_SNAPSHOT_TYPE. + */ + public Node snapshotItem(int index) + throws XPathException; + +} -- cgit v1.2.3