Commit 9ecd0347 by Tom Tromey Committed by Tom Tromey

Makefile.am: New file.

	* external/w3c_dom/Makefile.am: New file.
	* external/w3c_dom/Makefile.in: New file.
	* external/sax/Makefile.am: New file.
	* external/sax/Makefile.in: New file.
	* external/Makefile.in: New file.
	* external/Makefile.am: New file.
	* external/README: New file from Classpath.
	* configure, aclocal.m4, Makefile.in: Rebuilt.
	* configure.ac (AC_CONFIG_FILES): Create new Makefiles.
	* Makefile.am (SUBDIRS): Added external.
	(toolexeclib_LTLIBRARIES): Removed lib-org-xml-sax.la,
	lib-org-w3c-dom.la, lib-org-ietf-gss.la.
	(BOOTCLASSPATH): New variable.
	(AM_GCJFLAGS): Use it.
	(gnu_xml_source_files): New variable.
	(libgcj_la_SOURCES): Use it.
	(libgcj_la_LDADD): Include new convenience libraries.
	(lib_org_ietf_jgss_la_SOURCES): Removed.
	(lib_org_ietf_jgss_la_DEPENDENCIES): Likewise.
	(lib_org_ietf_jgss_la_LIBADD): Likewise.
	(lib_org_w3c_dom_la_SOURCES): Removed.
	(lib_org_w3c_dom_la_DEPENDENCIES): Likewise.
	(lib_org_w3c_dom_la_LIBADD): Likewise.
	(lib_org_xml_sax_la_SOURCES): Removed.
	(lib_org_xml_sax_la_DEPENDENCIES): Likewise.
	(lib_org_xml_sax_la_LIBADD): Likewise.
	(all_java_source_files): Updated.
	(property_files): Likewise.
	(libgcj-@gcc_version@.jar): Include classes from external/.
	(javax_source_files): Updated.
	(ordinary_java_source_files): Updated.
	* javax/xml/XMLConstants.java,
	javax/xml/datatype/DatatypeConfigurationException.java,
	javax/xml/datatype/DatatypeConstants.java,
	javax/xml/datatype/DatatypeFactory.java,
	javax/xml/datatype/Duration.java,
	javax/xml/datatype/XMLGregorianCalendar.java,
	javax/xml/datatype/package.html,
	javax/xml/namespace/NamespaceContext.java,
	javax/xml/namespace/QName.java, javax/xml/namespace/package.html,
	javax/xml/parsers/DocumentBuilder.java,
	javax/xml/parsers/DocumentBuilderFactory.java,
	javax/xml/parsers/FactoryConfigurationError.java,
	javax/xml/parsers/ParserConfigurationException.java,
	javax/xml/parsers/SAXParser.java,
	javax/xml/parsers/SAXParserFactory.java,
	javax/xml/parsers/package.html,
	javax/xml/transform/ErrorListener.java,
	javax/xml/transform/OutputKeys.java,
	javax/xml/transform/Result.java, javax/xml/transform/Source.java,
	javax/xml/transform/SourceLocator.java,
	javax/xml/transform/Templates.java,
	javax/xml/transform/Transformer.java,
	javax/xml/transform/TransformerConfigurationException.java,
	javax/xml/transform/TransformerException.java,
	javax/xml/transform/TransformerFactory.java,
	javax/xml/transform/TransformerFactoryConfigurationError.java,
	javax/xml/transform/URIResolver.java,
	javax/xml/transform/package.html,
	javax/xml/transform/dom/DOMLocator.java,
	javax/xml/transform/dom/DOMResult.java,
	javax/xml/transform/dom/DOMSource.java,
	javax/xml/transform/dom/package.html,
	javax/xml/transform/sax/SAXResult.java,
	javax/xml/transform/sax/SAXSource.java,
	javax/xml/transform/sax/SAXTransformerFactory.java,
	javax/xml/transform/sax/TemplatesHandler.java,
	javax/xml/transform/sax/TransformerHandler.java,
	javax/xml/transform/sax/package.html,
	javax/xml/transform/stream/StreamResult.java,
	javax/xml/transform/stream/StreamSource.java,
	javax/xml/transform/stream/package.html,
	javax/xml/validation/Schema.java,
	javax/xml/validation/SchemaFactory.java,
	javax/xml/validation/TypeInfoProvider.java,
	javax/xml/validation/Validator.java,
	javax/xml/validation/ValidatorHandler.java,
	javax/xml/validation/package.html, javax/xml/xpath/XPath.java,
	javax/xml/xpath/XPathConstants.java,
	javax/xml/xpath/XPathException.java,
	javax/xml/xpath/XPathExpression.java,
	javax/xml/xpath/XPathExpressionException.java,
	javax/xml/xpath/XPathFactory.java,
	javax/xml/xpath/XPathFactoryConfigurationException.java,
	javax/xml/xpath/XPathFunction.java,
	javax/xml/xpath/XPathFunctionException.java,
	javax/xml/xpath/XPathFunctionResolver.java,
	javax/xml/xpath/XPathVariableResolver.java,
	javax/xml/xpath/package.html: New files, from GNU JAXP.
	* org/w3c/dom/Attr.java, org/w3c/dom/CDATASection.java,
	org/w3c/dom/CharacterData.java, org/w3c/dom/Comment.java,
	org/w3c/dom/DOMException.java, org/w3c/dom/DOMImplementation.java,
	org/w3c/dom/Document.java, org/w3c/dom/DocumentFragment.java,
	org/w3c/dom/DocumentType.java, org/w3c/dom/Element.java,
	org/w3c/dom/Entity.java, org/w3c/dom/EntityReference.java,
	org/w3c/dom/NamedNodeMap.java, org/w3c/dom/Node.java,
	org/w3c/dom/NodeList.java, org/w3c/dom/Notation.java,
	org/w3c/dom/ProcessingInstruction.java, org/w3c/dom/Text.java,
	org/w3c/dom/ranges/DocumentRange.java,
	org/w3c/dom/ranges/Range.java,
	org/w3c/dom/ranges/RangeException.java,
	org/w3c/dom/traversal/DocumentTraversal.java,
	org/w3c/dom/traversal/NodeFilter.java,
	org/w3c/dom/traversal/NodeIterator.java,
	org/w3c/dom/traversal/TreeWalker.java,
	org/xml/sax/AttributeList.java, org/xml/sax/Attributes.java,
	org/xml/sax/ContentHandler.java, org/xml/sax/DTDHandler.java,
	org/xml/sax/DocumentHandler.java, org/xml/sax/EntityResolver.java,
	org/xml/sax/ErrorHandler.java, org/xml/sax/HandlerBase.java,
	org/xml/sax/InputSource.java, org/xml/sax/Locator.java,
	org/xml/sax/Parser.java, org/xml/sax/SAXException.java,
	org/xml/sax/SAXNotRecognizedException.java,
	org/xml/sax/SAXNotSupportedException.java,
	org/xml/sax/SAXParseException.java, org/xml/sax/XMLFilter.java,
	org/xml/sax/XMLReader.java, org/xml/sax/package.html,
	org/xml/sax/ext/DeclHandler.java,
	org/xml/sax/ext/LexicalHandler.java, org/xml/sax/ext/package.html,
	org/xml/sax/helpers/AttributeListImpl.java,
	org/xml/sax/helpers/AttributesImpl.java,
	org/xml/sax/helpers/DefaultHandler.java,
	org/xml/sax/helpers/LocatorImpl.java,
	org/xml/sax/helpers/NamespaceSupport.java,
	org/xml/sax/helpers/NewInstance.java,
	org/xml/sax/helpers/ParserAdapter.java,
	org/xml/sax/helpers/ParserFactory.java,
	org/xml/sax/helpers/XMLFilterImpl.java,
	org/xml/sax/helpers/XMLReaderAdapter.java,
	org/xml/sax/helpers/XMLReaderFactory.java,
	org/xml/sax/helpers/package.html: Moved to external/.
	* external/sax/README,
	external/sax/org/xml/sax/AttributeList.java,
	external/sax/org/xml/sax/Attributes.java,
	external/sax/org/xml/sax/ContentHandler.java,
	external/sax/org/xml/sax/DTDHandler.java,
	external/sax/org/xml/sax/DocumentHandler.java,
	external/sax/org/xml/sax/EntityResolver.java,
	external/sax/org/xml/sax/ErrorHandler.java,
	external/sax/org/xml/sax/HandlerBase.java,
	external/sax/org/xml/sax/InputSource.java,
	external/sax/org/xml/sax/Locator.java,
	external/sax/org/xml/sax/Parser.java,
	external/sax/org/xml/sax/SAXException.java,
	external/sax/org/xml/sax/SAXNotRecognizedException.java,
	external/sax/org/xml/sax/SAXNotSupportedException.java,
	external/sax/org/xml/sax/SAXParseException.java,
	external/sax/org/xml/sax/XMLFilter.java,
	external/sax/org/xml/sax/XMLReader.java,
	external/sax/org/xml/sax/package.html,
	external/sax/org/xml/sax/ext/Attributes2.java,
	external/sax/org/xml/sax/ext/Attributes2Impl.java,
	external/sax/org/xml/sax/ext/DeclHandler.java,
	external/sax/org/xml/sax/ext/DefaultHandler2.java,
	external/sax/org/xml/sax/ext/EntityResolver2.java,
	external/sax/org/xml/sax/ext/LexicalHandler.java,
	external/sax/org/xml/sax/ext/Locator2.java,
	external/sax/org/xml/sax/ext/Locator2Impl.java,
	external/sax/org/xml/sax/ext/package.html,
	external/sax/org/xml/sax/helpers/AttributeListImpl.java,
	external/sax/org/xml/sax/helpers/AttributesImpl.java,
	external/sax/org/xml/sax/helpers/DefaultHandler.java,
	external/sax/org/xml/sax/helpers/LocatorImpl.java,
	external/sax/org/xml/sax/helpers/NamespaceSupport.java,
	external/sax/org/xml/sax/helpers/NewInstance.java,
	external/sax/org/xml/sax/helpers/ParserAdapter.java,
	external/sax/org/xml/sax/helpers/ParserFactory.java,
	external/sax/org/xml/sax/helpers/XMLFilterImpl.java,
	external/sax/org/xml/sax/helpers/XMLReaderAdapter.java,
	external/sax/org/xml/sax/helpers/XMLReaderFactory.java,
	external/sax/org/xml/sax/helpers/package.html,
	external/w3c_dom/COPYRIGHT.html, external/w3c_dom/README,
	external/w3c_dom/org/w3c/dom/Attr.java,
	external/w3c_dom/org/w3c/dom/CDATASection.java,
	external/w3c_dom/org/w3c/dom/CharacterData.java,
	external/w3c_dom/org/w3c/dom/Comment.java,
	external/w3c_dom/org/w3c/dom/DOMConfiguration.java,
	external/w3c_dom/org/w3c/dom/DOMError.java,
	external/w3c_dom/org/w3c/dom/DOMErrorHandler.java,
	external/w3c_dom/org/w3c/dom/DOMException.java,
	external/w3c_dom/org/w3c/dom/DOMImplementation.java,
	external/w3c_dom/org/w3c/dom/DOMImplementationList.java,
	external/w3c_dom/org/w3c/dom/DOMImplementationSource.java,
	external/w3c_dom/org/w3c/dom/DOMLocator.java,
	external/w3c_dom/org/w3c/dom/DOMStringList.java,
	external/w3c_dom/org/w3c/dom/Document.java,
	external/w3c_dom/org/w3c/dom/DocumentFragment.java,
	external/w3c_dom/org/w3c/dom/DocumentType.java,
	external/w3c_dom/org/w3c/dom/Element.java,
	external/w3c_dom/org/w3c/dom/Entity.java,
	external/w3c_dom/org/w3c/dom/EntityReference.java,
	external/w3c_dom/org/w3c/dom/NameList.java,
	external/w3c_dom/org/w3c/dom/NamedNodeMap.java,
	external/w3c_dom/org/w3c/dom/Node.java,
	external/w3c_dom/org/w3c/dom/NodeList.java,
	external/w3c_dom/org/w3c/dom/Notation.java,
	external/w3c_dom/org/w3c/dom/ProcessingInstruction.java,
	external/w3c_dom/org/w3c/dom/Text.java,
	external/w3c_dom/org/w3c/dom/TypeInfo.java,
	external/w3c_dom/org/w3c/dom/UserDataHandler.java,
	external/w3c_dom/org/w3c/dom/bootstrap/DOMImplementationRegistry.java,
	external/w3c_dom/org/w3c/dom/css/CSS2Properties.java,
	external/w3c_dom/org/w3c/dom/css/CSSCharsetRule.java,
	external/w3c_dom/org/w3c/dom/css/CSSFontFaceRule.java,
	external/w3c_dom/org/w3c/dom/css/CSSImportRule.java,
	external/w3c_dom/org/w3c/dom/css/CSSMediaRule.java,
	external/w3c_dom/org/w3c/dom/css/CSSPageRule.java,
	external/w3c_dom/org/w3c/dom/css/CSSPrimitiveValue.java,
	external/w3c_dom/org/w3c/dom/css/CSSRule.java,
	external/w3c_dom/org/w3c/dom/css/CSSRuleList.java,
	external/w3c_dom/org/w3c/dom/css/CSSStyleDeclaration.java,
	external/w3c_dom/org/w3c/dom/css/CSSStyleRule.java,
	external/w3c_dom/org/w3c/dom/css/CSSStyleSheet.java,
	external/w3c_dom/org/w3c/dom/css/CSSUnknownRule.java,
	external/w3c_dom/org/w3c/dom/css/CSSValue.java,
	external/w3c_dom/org/w3c/dom/css/CSSValueList.java,
	external/w3c_dom/org/w3c/dom/css/Counter.java,
	external/w3c_dom/org/w3c/dom/css/DOMImplementationCSS.java,
	external/w3c_dom/org/w3c/dom/css/DocumentCSS.java,
	external/w3c_dom/org/w3c/dom/css/ElementCSSInlineStyle.java,
	external/w3c_dom/org/w3c/dom/css/RGBColor.java,
	external/w3c_dom/org/w3c/dom/css/Rect.java,
	external/w3c_dom/org/w3c/dom/css/ViewCSS.java,
	external/w3c_dom/org/w3c/dom/events/DocumentEvent.java,
	external/w3c_dom/org/w3c/dom/events/Event.java,
	external/w3c_dom/org/w3c/dom/events/EventException.java,
	external/w3c_dom/org/w3c/dom/events/EventListener.java,
	external/w3c_dom/org/w3c/dom/events/EventTarget.java,
	external/w3c_dom/org/w3c/dom/events/MouseEvent.java,
	external/w3c_dom/org/w3c/dom/events/MutationEvent.java,
	external/w3c_dom/org/w3c/dom/events/UIEvent.java,
	external/w3c_dom/org/w3c/dom/html2/HTMLAnchorElement.java,
	external/w3c_dom/org/w3c/dom/html2/HTMLAppletElement.java,
	external/w3c_dom/org/w3c/dom/html2/HTMLAreaElement.java,
	external/w3c_dom/org/w3c/dom/html2/HTMLBRElement.java,
	external/w3c_dom/org/w3c/dom/html2/HTMLBaseElement.java,
	external/w3c_dom/org/w3c/dom/html2/HTMLBaseFontElement.java,
	external/w3c_dom/org/w3c/dom/html2/HTMLBodyElement.java,
	external/w3c_dom/org/w3c/dom/html2/HTMLButtonElement.java,
	external/w3c_dom/org/w3c/dom/html2/HTMLCollection.java,
	external/w3c_dom/org/w3c/dom/html2/HTMLDListElement.java,
	external/w3c_dom/org/w3c/dom/html2/HTMLDirectoryElement.java,
	external/w3c_dom/org/w3c/dom/html2/HTMLDivElement.java,
	external/w3c_dom/org/w3c/dom/html2/HTMLDocument.java,
	external/w3c_dom/org/w3c/dom/html2/HTMLElement.java,
	external/w3c_dom/org/w3c/dom/html2/HTMLFieldSetElement.java,
	external/w3c_dom/org/w3c/dom/html2/HTMLFontElement.java,
	external/w3c_dom/org/w3c/dom/html2/HTMLFormElement.java,
	external/w3c_dom/org/w3c/dom/html2/HTMLFrameElement.java,
	external/w3c_dom/org/w3c/dom/html2/HTMLFrameSetElement.java,
	external/w3c_dom/org/w3c/dom/html2/HTMLHRElement.java,
	external/w3c_dom/org/w3c/dom/html2/HTMLHeadElement.java,
	external/w3c_dom/org/w3c/dom/html2/HTMLHeadingElement.java,
	external/w3c_dom/org/w3c/dom/html2/HTMLHtmlElement.java,
	external/w3c_dom/org/w3c/dom/html2/HTMLIFrameElement.java,
	external/w3c_dom/org/w3c/dom/html2/HTMLImageElement.java,
	external/w3c_dom/org/w3c/dom/html2/HTMLInputElement.java,
	external/w3c_dom/org/w3c/dom/html2/HTMLIsIndexElement.java,
	external/w3c_dom/org/w3c/dom/html2/HTMLLIElement.java,
	external/w3c_dom/org/w3c/dom/html2/HTMLLabelElement.java,
	external/w3c_dom/org/w3c/dom/html2/HTMLLegendElement.java,
	external/w3c_dom/org/w3c/dom/html2/HTMLLinkElement.java,
	external/w3c_dom/org/w3c/dom/html2/HTMLMapElement.java,
	external/w3c_dom/org/w3c/dom/html2/HTMLMenuElement.java,
	external/w3c_dom/org/w3c/dom/html2/HTMLMetaElement.java,
	external/w3c_dom/org/w3c/dom/html2/HTMLModElement.java,
	external/w3c_dom/org/w3c/dom/html2/HTMLOListElement.java,
	external/w3c_dom/org/w3c/dom/html2/HTMLObjectElement.java,
	external/w3c_dom/org/w3c/dom/html2/HTMLOptGroupElement.java,
	external/w3c_dom/org/w3c/dom/html2/HTMLOptionElement.java,
	external/w3c_dom/org/w3c/dom/html2/HTMLOptionsCollection.java,
	external/w3c_dom/org/w3c/dom/html2/HTMLParagraphElement.java,
	external/w3c_dom/org/w3c/dom/html2/HTMLParamElement.java,
	external/w3c_dom/org/w3c/dom/html2/HTMLPreElement.java,
	external/w3c_dom/org/w3c/dom/html2/HTMLQuoteElement.java,
	external/w3c_dom/org/w3c/dom/html2/HTMLScriptElement.java,
	external/w3c_dom/org/w3c/dom/html2/HTMLSelectElement.java,
	external/w3c_dom/org/w3c/dom/html2/HTMLStyleElement.java,
	external/w3c_dom/org/w3c/dom/html2/HTMLTableCaptionElement.java,
	external/w3c_dom/org/w3c/dom/html2/HTMLTableCellElement.java,
	external/w3c_dom/org/w3c/dom/html2/HTMLTableColElement.java,
	external/w3c_dom/org/w3c/dom/html2/HTMLTableElement.java,
	external/w3c_dom/org/w3c/dom/html2/HTMLTableRowElement.java,
	external/w3c_dom/org/w3c/dom/html2/HTMLTableSectionElement.java,
	external/w3c_dom/org/w3c/dom/html2/HTMLTextAreaElement.java,
	external/w3c_dom/org/w3c/dom/html2/HTMLTitleElement.java,
	external/w3c_dom/org/w3c/dom/html2/HTMLUListElement.java,
	external/w3c_dom/org/w3c/dom/ls/DOMImplementationLS.java,
	external/w3c_dom/org/w3c/dom/ls/LSException.java,
	external/w3c_dom/org/w3c/dom/ls/LSInput.java,
	external/w3c_dom/org/w3c/dom/ls/LSLoadEvent.java,
	external/w3c_dom/org/w3c/dom/ls/LSOutput.java,
	external/w3c_dom/org/w3c/dom/ls/LSParser.java,
	external/w3c_dom/org/w3c/dom/ls/LSParserFilter.java,
	external/w3c_dom/org/w3c/dom/ls/LSProgressEvent.java,
	external/w3c_dom/org/w3c/dom/ls/LSResourceResolver.java,
	external/w3c_dom/org/w3c/dom/ls/LSSerializer.java,
	external/w3c_dom/org/w3c/dom/ls/LSSerializerFilter.java,
	external/w3c_dom/org/w3c/dom/ranges/DocumentRange.java,
	external/w3c_dom/org/w3c/dom/ranges/Range.java,
	external/w3c_dom/org/w3c/dom/ranges/RangeException.java,
	external/w3c_dom/org/w3c/dom/stylesheets/DocumentStyle.java,
	external/w3c_dom/org/w3c/dom/stylesheets/LinkStyle.java,
	external/w3c_dom/org/w3c/dom/stylesheets/MediaList.java,
	external/w3c_dom/org/w3c/dom/stylesheets/StyleSheet.java,
	external/w3c_dom/org/w3c/dom/stylesheets/StyleSheetList.java,
	external/w3c_dom/org/w3c/dom/traversal/DocumentTraversal.java,
	external/w3c_dom/org/w3c/dom/traversal/NodeFilter.java,
	external/w3c_dom/org/w3c/dom/traversal/NodeIterator.java,
	external/w3c_dom/org/w3c/dom/traversal/TreeWalker.java,
	external/w3c_dom/org/w3c/dom/views/AbstractView.java,
	external/w3c_dom/org/w3c/dom/views/DocumentView.java,
	external/w3c_dom/org/w3c/dom/xpath/XPathEvaluator.java,
	external/w3c_dom/org/w3c/dom/xpath/XPathException.java,
	external/w3c_dom/org/w3c/dom/xpath/XPathExpression.java,
	external/w3c_dom/org/w3c/dom/xpath/XPathNSResolver.java,
	external/w3c_dom/org/w3c/dom/xpath/XPathNamespace.java,
	external/w3c_dom/org/w3c/dom/xpath/XPathResult.java: New files
	from Classpath.

From-SVN: r94577
parent c1c5b5e3
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -16316,7 +16316,7 @@ here=`${PWDCMD-pwd}`
# We get this from the environment.
ac_config_files="$ac_config_files Makefile libgcj.pc libgcj.spec libgcj-test.spec gnu/classpath/Configuration.java gcj/Makefile include/Makefile testsuite/Makefile"
ac_config_files="$ac_config_files Makefile libgcj.pc libgcj.spec libgcj-test.spec gnu/classpath/Configuration.java gcj/Makefile include/Makefile testsuite/Makefile external/Makefile external/sax/Makefile external/w3c_dom/Makefile"
ac_config_commands="$ac_config_commands default"
......@@ -17040,6 +17040,9 @@ do
"gcj/Makefile" ) CONFIG_FILES="$CONFIG_FILES gcj/Makefile" ;;
"include/Makefile" ) CONFIG_FILES="$CONFIG_FILES include/Makefile" ;;
"testsuite/Makefile" ) CONFIG_FILES="$CONFIG_FILES testsuite/Makefile" ;;
"external/Makefile" ) CONFIG_FILES="$CONFIG_FILES external/Makefile" ;;
"external/sax/Makefile" ) CONFIG_FILES="$CONFIG_FILES external/sax/Makefile" ;;
"external/w3c_dom/Makefile" ) CONFIG_FILES="$CONFIG_FILES external/w3c_dom/Makefile" ;;
"include/platform.h" ) CONFIG_LINKS="$CONFIG_LINKS include/platform.h:include/$PLATFORMH" ;;
"java/io/natFile.cc" ) CONFIG_LINKS="$CONFIG_LINKS java/io/natFile.cc:java/io/natFile${FILE-${PLATFORM}}.cc" ;;
"java/lang/ConcreteProcess.java" ) CONFIG_LINKS="$CONFIG_LINKS java/lang/ConcreteProcess.java:java/lang/${PLATFORM}Process.java" ;;
......
......@@ -1389,6 +1389,9 @@ gnu/classpath/Configuration.java
gcj/Makefile
include/Makefile
testsuite/Makefile
external/Makefile
external/sax/Makefile
external/w3c_dom/Makefile
])
AC_CONFIG_COMMANDS([default],
......
## Input file for automake to generate the Makefile.in used by configure
SUBDIRS = sax w3c_dom
# Work around what appears to be a GNU make bug handling MAKEFLAGS
# values defined in terms of make variables, as is the case for CC and
# friends when we are called from the top level Makefile.
AM_MAKEFLAGS = \
"AR_FLAGS=$(AR_FLAGS)" \
"CC_FOR_BUILD=$(CC_FOR_BUILD)" \
"CFLAGS=$(CFLAGS)" \
"CXXFLAGS=$(CXXFLAGS)" \
"CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
"CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
"INSTALL=$(INSTALL)" \
"INSTALL_DATA=$(INSTALL_DATA)" \
"INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
"INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
"LDFLAGS=$(LDFLAGS)" \
"LIBCFLAGS=$(LIBCFLAGS)" \
"LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
"MAKE=$(MAKE)" \
"MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
"PICFLAG=$(PICFLAG)" \
"PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
"SHELL=$(SHELL)" \
"EXPECT=$(EXPECT)" \
"RUNTEST=$(RUNTEST)" \
"RUNTESTFLAGS=$(RUNTESTFLAGS)" \
"exec_prefix=$(exec_prefix)" \
"infodir=$(infodir)" \
"libdir=$(libdir)" \
"prefix=$(prefix)" \
"tooldir=$(tooldir)" \
"AR=$(AR)" \
"AS=$(AS)" \
"CC=$(CC)" \
"CXX=$(CXX)" \
"LD=$(LD)" \
"LIBCFLAGS=$(LIBCFLAGS)" \
"NM=$(NM)" \
"PICFLAG=$(PICFLAG)" \
"RANLIB=$(RANLIB)" \
"DESTDIR=$(DESTDIR)"
This directory contains libraries maintained externally to GNU Classpath.
See the README files in the subdirectories for more information.
## Process this file with automake to produce Makefile.in.
AUTOMAKE_OPTIONS = foreign subdir-objects
## The compiler with whatever flags we want for both -c and -C
## compiles.
GCJ_WITH_FLAGS = $(GCJ) --encoding=UTF-8 -Wno-deprecated -fbootclasspath=$(BOOTCLASSPATH)
BOOTCLASSPATH = $(here)'$(CLASSPATH_SEPARATOR)'$(srcdir)'$(CLASSPATH_SEPARATOR)'$(top_srcdir)'$(CLASSPATH_SEPARATOR)'$(top_builddir)
AM_GCJFLAGS = \
-B$(top_builddir) \
@LIBGCJ_JAVAFLAGS@ \
-fclasspath= -fbootclasspath=$(BOOTCLASSPATH) \
--encoding=UTF-8 \
-Wno-deprecated
all-local: classes.stamp
classes.stamp: $(libsax_convenience_la_SOURCES)
here=`pwd`; cd $(srcdir); \
$(GCJ_WITH_FLAGS) -C -d $$here $(libsax_convenience_la_SOURCES)
echo > classes.stamp
mostlyclean-local:
find . -name '*.class' | xargs rm
rm classes.stamp
noinst_LTLIBRARIES = libsax_convenience.la
libsax_convenience_la_SOURCES = \
org/xml/sax/SAXNotSupportedException.java \
org/xml/sax/helpers/NamespaceSupport.java \
org/xml/sax/helpers/AttributesImpl.java \
org/xml/sax/helpers/LocatorImpl.java \
org/xml/sax/helpers/DefaultHandler.java \
org/xml/sax/helpers/AttributeListImpl.java \
org/xml/sax/helpers/ParserFactory.java \
org/xml/sax/helpers/NewInstance.java \
org/xml/sax/helpers/XMLFilterImpl.java \
org/xml/sax/helpers/ParserAdapter.java \
org/xml/sax/helpers/XMLReaderAdapter.java \
org/xml/sax/helpers/XMLReaderFactory.java \
org/xml/sax/HandlerBase.java \
org/xml/sax/SAXException.java \
org/xml/sax/ContentHandler.java \
org/xml/sax/SAXNotRecognizedException.java \
org/xml/sax/ErrorHandler.java \
org/xml/sax/AttributeList.java \
org/xml/sax/Locator.java \
org/xml/sax/Attributes.java \
org/xml/sax/SAXParseException.java \
org/xml/sax/XMLFilter.java \
org/xml/sax/EntityResolver.java \
org/xml/sax/XMLReader.java \
org/xml/sax/ext/Locator2.java \
org/xml/sax/ext/LexicalHandler.java \
org/xml/sax/ext/Attributes2Impl.java \
org/xml/sax/ext/DeclHandler.java \
org/xml/sax/ext/Attributes2.java \
org/xml/sax/ext/EntityResolver2.java \
org/xml/sax/ext/Locator2Impl.java \
org/xml/sax/ext/DefaultHandler2.java \
org/xml/sax/InputSource.java \
org/xml/sax/DocumentHandler.java \
org/xml/sax/DTDHandler.java \
org/xml/sax/Parser.java
Simple API for XML (SAX), a standard application interface for processing XML.
SAX is not maintained as part of GNU Classpath, but is used with GNU Classpath.
Last imported version sax2r3 final from http://www.saxproject.org/
All files are distributed with the following short notice:
NO WARRANTY! This class is in the Public Domain.
The www.saxproject.org explains:
Copyright Status
SAX is free!
In fact, it's not possible to own a license to SAX, since it's been
placed in the public domain.
No Warranty
Because SAX is released to the public domain, there is no warranty
for the design or for the software implementation, to the extent
permitted by applicable law. Except when otherwise stated in writing
the copyright holders and/or other parties provide SAX "as is" without
warranty of any kind, either expressed or implied, including, but not
limited to, the implied warranties of merchantability and fitness for
a particular purpose. The entire risk as to the quality and
performance of SAX is with you. Should SAX prove defective, you assume
the cost of all necessary servicing, repair or correction.
In no event unless required by applicable law or agreed to in
writing will any copyright holder, or any other party who may modify
and/or redistribute SAX, be liable to you for damages, including any
general, special, incidental or consequential damages arising out of
the use or inability to use SAX (including but not limited to loss of
data or data being rendered inaccurate or losses sustained by you or
third parties or a failure of the SAX to operate with any other
programs), even if such holder or other party has been advised of the
possibility of such damages.
Copyright Disclaimers
This page includes statements to that effect by David Megginson, who
would have been able to claim copyright for the original work.
SAX 1.0
Version 1.0 of the Simple API for XML (SAX), created collectively by
the membership of the XML-DEV mailing list, is hereby released into
the public domain.
No one owns SAX: you may use it freely in both commercial and
non-commercial applications, bundle it with your software
distribution, include it on a CD-ROM, list the source code in a book,
mirror the documentation at your own web site, or use it in any other
way you see fit.
David Megginson, sax@megginson.com
1998-05-11
SAX 2.0
I hereby abandon any property rights to SAX 2.0 (the Simple API for
XML), and release all of the SAX 2.0 source code, compiled code, and
documentation contained in this distribution into the Public
Domain. SAX comes with NO WARRANTY or guarantee of fitness for any
purpose.
David Megginson, david@megginson.com
2000-05-05
// SAX Attribute List Interface.
// http://www.saxproject.org
// No warranty; no copyright -- use this as you will.
// $Id: AttributeList.java,v 1.3.2.3 2002/01/29 21:34:14 dbrownell Exp $
// $Id: AttributeList.java,v 1.1 2004/12/23 22:38:42 mark Exp $
package org.xml.sax;
......@@ -181,7 +181,7 @@ public interface AttributeList {
* <p>If the attribute name has a namespace prefix in the document,
* the application must include the prefix here.</p>
*
* @param i The index of the attribute in the list.
* @param name the name of the attribute to return
* @return The attribute value as a string, or null if
* no such attribute exists.
* @see #getValue(int)
......
......@@ -2,9 +2,7 @@
// http://www.saxproject.org
// Written by David Megginson
// NO WARRANTY! This class is in the public domain.
// $Id: Attributes.java,v 1.5.2.4 2002/01/29 21:34:14 dbrownell Exp $
// $Id: Attributes.java,v 1.1 2004/12/23 22:38:42 mark Exp $
package org.xml.sax;
......@@ -34,18 +32,25 @@ package org.xml.sax;
* the <code>http://xml.org/sax/features/namespace-prefixes</code>
* feature is set to <var>true</var> (it is <var>false</var> by
* default).
* Because SAX2 conforms to the "Namespaces in XML" specification,
* it does not give namespace declaration attributes a namespace URI.
* Some other W3C specifications are in conflict with that, expecting
* these declarations to be in a namespace.
* Handler code may need to resolve that conflict.
* Because SAX2 conforms to the original "Namespaces in XML"
* recommendation, it normally does not
* give namespace declaration attributes a namespace URI.
* </p>
*
* <p>If the namespace-prefixes feature (see above) is <var>false</var>,
* access by qualified name may not be available; if the
* <code>http://xml.org/sax/features/namespaces</code>
* feature is <var>false</var>, access by Namespace-qualified names
* may not be available.</p>
* <p>Some SAX2 parsers may support using an optional feature flag
* (<code>http://xml.org/sax/features/xmlns-uris</code>) to request
* that those attributes be given URIs, conforming to a later
* backwards-incompatible revision of that recommendation. (The
* attribute's "local name" will be the prefix, or "xmlns" when
* defining a default element namespace.) For portability, handler
* code should always resolve that conflict, rather than requiring
* parsers that can change the setting of that feature flag. </p>
*
* <p>If the namespace-prefixes feature (see above) is
* <var>false</var>, access by qualified name may not be available; if
* the <code>http://xml.org/sax/features/namespaces</code> feature is
* <var>false</var>, access by Namespace-qualified names may not be
* available.</p>
*
* <p>This interface replaces the now-deprecated SAX1 {@link
* org.xml.sax.AttributeList AttributeList} interface, which does not
......@@ -111,10 +116,10 @@ public interface Attributes
/**
* Look up an attribute's XML 1.0 qualified name by index.
* Look up an attribute's XML qualified (prefixed) name by index.
*
* @param index The attribute index (zero-based).
* @return The XML 1.0 qualified name, or the empty string
* @return The XML qualified name, or the empty string
* if none is available, or null if the index
* is out of range.
* @see #getLength
......@@ -131,7 +136,7 @@ public interface Attributes
*
* <p>If the parser has not read a declaration for the attribute,
* or if the parser does not report attribute types, then it must
* return the value "CDATA" as stated in the XML 1.0 Recommentation
* return the value "CDATA" as stated in the XML 1.0 Recommendation
* (clause 3.3.3, "Attribute-Value Normalization").</p>
*
* <p>For an enumerated attribute that is not a notation, the
......@@ -180,7 +185,7 @@ public interface Attributes
/**
* Look up the index of an attribute by XML 1.0 qualified name.
* Look up the index of an attribute by XML qualified (prefixed) name.
*
* @param qName The qualified (prefixed) name.
* @return The index of the attribute, or -1 if it does not
......@@ -206,12 +211,12 @@ public interface Attributes
/**
* Look up an attribute's type by XML 1.0 qualified name.
* Look up an attribute's type by XML qualified (prefixed) name.
*
* <p>See {@link #getType(int) getType(int)} for a description
* of the possible types.</p>
*
* @param qName The XML 1.0 qualified name.
* @param qName The XML qualified name.
* @return The attribute type as a string, or null if the
* attribute is not in the list or if qualified names
* are not available.
......@@ -235,12 +240,12 @@ public interface Attributes
/**
* Look up an attribute's value by XML 1.0 qualified name.
* Look up an attribute's value by XML qualified (prefixed) name.
*
* <p>See {@link #getValue(int) getValue(int)} for a description
* of the possible values.</p>
*
* @param qName The XML 1.0 qualified name.
* @param qName The XML qualified name.
* @return The attribute value as a string, or null if the
* attribute is not in the list or if qualified names
* are not available.
......
// SAX DTD handler.
// http://www.saxproject.org
// No warranty; no copyright -- use this as you will.
// $Id: DTDHandler.java,v 1.5.2.4 2002/01/29 21:34:14 dbrownell Exp $
// $Id: DTDHandler.java,v 1.1 2004/12/23 22:38:42 mark Exp $
package org.xml.sax;
......
// SAX document handler.
// http://www.saxproject.org
// No warranty; no copyright -- use this as you will.
// $Id: DocumentHandler.java,v 1.3.2.3 2002/01/29 21:34:14 dbrownell Exp $
// $Id: DocumentHandler.java,v 1.1 2004/12/23 22:38:42 mark Exp $
package org.xml.sax;
......
// SAX entity resolver.
// http://www.saxproject.org
// No warranty; no copyright -- use this as you will.
// $Id: EntityResolver.java,v 1.7.2.3 2002/01/29 21:34:14 dbrownell Exp $
// $Id: EntityResolver.java,v 1.1 2004/12/23 22:38:42 mark Exp $
package org.xml.sax;
......
// SAX error handler.
// http://www.saxproject.org
// No warranty; no copyright -- use this as you will.
// $Id: ErrorHandler.java,v 1.4.2.3 2002/01/29 21:34:14 dbrownell Exp $
// $Id: ErrorHandler.java,v 1.1 2004/12/23 22:38:42 mark Exp $
package org.xml.sax;
......@@ -24,20 +24,25 @@ package org.xml.sax;
* through this interface.</p>
*
* <p><strong>WARNING:</strong> If an application does <em>not</em>
* register an ErrorHandler, XML parsing errors will go unreported
* and bizarre behaviour may result.</p>
* register an ErrorHandler, XML parsing errors will go unreported,
* except that <em>SAXParseException</em>s will be thrown for fatal errors.
* In order to detect validity errors, an ErrorHandler that does something
* with {@link #error error()} calls must be registered.</p>
*
* <p>For XML processing errors, a SAX driver must use this interface
* instead of throwing an exception: it is up to the application
* in preference to throwing an exception: it is up to the application
* to decide whether to throw an exception for different types of
* errors and warnings. Note, however, that there is no requirement that
* the parser continue to provide useful information after a call to
* {@link #fatalError fatalError} (in other words, a SAX driver class
* could catch an exception and report a fatalError).</p>
* the parser continue to report additional errors after a call to
* {@link #fatalError fatalError}. In other words, a SAX driver class
* may throw an exception after reporting any fatalError.
* Also parsers may throw appropriate exceptions for non-XML errors.
* For example, {@link XMLReader#parse XMLReader.parse()} would throw
* an IOException for errors accessing entities or the document.</p>
*
* @since SAX 1.0
* @author David Megginson
* @version 2.0.1 (sax2r2)
* @version 2.0.1+ (sax2r3pre1)
* @see org.xml.sax.XMLReader#setErrorHandler
* @see org.xml.sax.SAXParseException
*/
......@@ -48,8 +53,9 @@ public interface ErrorHandler {
* Receive notification of a warning.
*
* <p>SAX parsers will use this method to report conditions that
* are not errors or fatal errors as defined by the XML 1.0
* recommendation. The default behaviour is to take no action.</p>
* are not errors or fatal errors as defined by the XML
* recommendation. The default behaviour is to take no
* action.</p>
*
* <p>The SAX parser must continue to provide normal parsing events
* after invoking this method: it should still be possible for the
......@@ -77,12 +83,12 @@ public interface ErrorHandler {
* validity constraint. The default behaviour is to take no
* action.</p>
*
* <p>The SAX parser must continue to provide normal parsing events
* after invoking this method: it should still be possible for the
* application to process the document through to the end. If the
* application cannot do so, then the parser should report a fatal
* error even if the XML 1.0 recommendation does not require it to
* do so.</p>
* <p>The SAX parser must continue to provide normal parsing
* events after invoking this method: it should still be possible
* for the application to process the document through to the end.
* If the application cannot do so, then the parser should report
* a fatal error even if the XML recommendation does not require
* it to do so.</p>
*
* <p>Filters may use this method to report other, non-XML errors
* as well.</p>
......@@ -100,6 +106,14 @@ public interface ErrorHandler {
/**
* Receive notification of a non-recoverable error.
*
* <p><strong>There is an apparent contradiction between the
* documentation for this method and the documentation for {@link
* org.xml.sax.ContentHandler#endDocument}. Until this ambiguity
* is resolved in a future major release, clients should make no
* assumptions about whether endDocument() will or will not be
* invoked when the parser has reported a fatalError() or thrown
* an exception.</strong></p>
*
* <p>This corresponds to the definition of "fatal error" in
* section 1.2 of the W3C XML 1.0 Recommendation. For example, a
* parser would use this callback to report the violation of a
......@@ -107,7 +121,7 @@ public interface ErrorHandler {
*
* <p>The application must assume that the document is unusable
* after the parser has invoked this method, and should continue
* (if at all) only for the sake of collecting addition error
* (if at all) only for the sake of collecting additional error
* messages: in fact, SAX parsers are free to stop reporting any
* other events once this method has been invoked.</p>
*
......
// SAX default handler base class.
// http://www.saxproject.org
// No warranty; no copyright -- use this as you will.
// $Id: HandlerBase.java,v 1.3.2.3 2002/01/29 21:34:14 dbrownell Exp $
// $Id: HandlerBase.java,v 1.1 2004/12/23 22:38:42 mark Exp $
package org.xml.sax;
......@@ -213,8 +213,7 @@ public class HandlerBase
* each element (such as finalising a tree node or writing
* output to a file).</p>
*
* @param name The element type name.
* @param attributes The specified or defaulted attributes.
* @param name the element name
* @exception org.xml.sax.SAXException Any SAX exception, possibly
* wrapping another exception.
* @see org.xml.sax.DocumentHandler#endElement
......
// SAX input source.
// http://www.saxproject.org
// No warranty; no copyright -- use this as you will.
// $Id: InputSource.java,v 1.5.2.4 2002/01/29 21:34:14 dbrownell Exp $
// $Id: InputSource.java,v 1.1 2004/12/23 22:38:42 mark Exp $
package org.xml.sax;
......
// SAX locator interface for document events.
// http://www.saxproject.org
// No warranty; no copyright -- use this as you will.
// $Id: Locator.java,v 1.4.2.5 2002/01/29 21:34:14 dbrownell Exp $
// $Id: Locator.java,v 1.1 2004/12/23 22:38:42 mark Exp $
package org.xml.sax;
......
// SAX parser interface.
// http://www.saxproject.org
// No warranty; no copyright -- use this as you will.
// $Id: Parser.java,v 1.3.2.3 2002/01/29 21:34:14 dbrownell Exp $
// $Id: Parser.java,v 1.1 2004/12/23 22:38:42 mark Exp $
package org.xml.sax;
......
// SAX exception class.
// http://www.saxproject.org
// No warranty; no copyright -- use this as you will.
// $Id: SAXException.java,v 1.4.2.4 2002/01/29 21:34:14 dbrownell Exp $
// $Id: SAXException.java,v 1.1 2004/12/23 22:38:42 mark Exp $
package org.xml.sax;
......
......@@ -2,9 +2,7 @@
// http://www.saxproject.org
// Written by David Megginson
// NO WARRANTY! This class is in the Public Domain.
// $Id: SAXNotRecognizedException.java,v 1.4.2.3 2002/01/29 21:34:14 dbrownell Exp $
// $Id: SAXNotRecognizedException.java,v 1.1 2004/12/23 22:38:42 mark Exp $
package org.xml.sax;
......
......@@ -2,9 +2,7 @@
// http://www.saxproject.org
// Written by David Megginson
// NO WARRANTY! This class is in the Public Domain.
// $Id: SAXNotSupportedException.java,v 1.4.2.3 2002/01/29 21:34:14 dbrownell Exp $
// $Id: SAXNotSupportedException.java,v 1.1 2004/12/23 22:38:42 mark Exp $
package org.xml.sax;
......
// SAX exception class.
// http://www.saxproject.org
// No warranty; no copyright -- use this as you will.
// $Id: SAXParseException.java,v 1.3.2.5 2002/01/29 21:34:14 dbrownell Exp $
// $Id: SAXParseException.java,v 1.1 2004/12/23 22:38:42 mark Exp $
package org.xml.sax;
......@@ -104,9 +104,9 @@ public class SAXParseException extends SAXException {
*
*
* @param message The error or warning message.
* @param publicId The public identifer of the entity that generated
* @param publicId The public identifier of the entity that generated
* the error or warning.
* @param systemId The system identifer of the entity that generated
* @param systemId The system identifier of the entity that generated
* the error or warning.
* @param lineNumber The line number of the end of the text that
* caused the error or warning.
......@@ -135,9 +135,9 @@ public class SAXParseException extends SAXException {
*
* @param message The error or warning message, or null to use
* the message from the embedded exception.
* @param publicId The public identifer of the entity that generated
* @param publicId The public identifier of the entity that generated
* the error or warning.
* @param systemId The system identifer of the entity that generated
* @param systemId The system identifier of the entity that generated
* the error or warning.
* @param lineNumber The line number of the end of the text that
* caused the error or warning.
......@@ -231,7 +231,6 @@ public class SAXParseException extends SAXException {
return this.columnNumber;
}
//////////////////////////////////////////////////////////////////////
// Internal state.
......
......@@ -2,9 +2,7 @@
// http://www.saxproject.org
// Written by David Megginson
// NO WARRANTY! This class is in the Public Domain.
// $Id: XMLFilter.java,v 1.3.2.3 2002/01/29 21:34:14 dbrownell Exp $
// $Id: XMLFilter.java,v 1.1 2004/12/23 22:38:42 mark Exp $
package org.xml.sax;
......
......@@ -2,8 +2,7 @@
// http://www.saxproject.org
// Written by David Megginson
// NO WARRANTY! This class is in the Public Domain.
// $Id: XMLReader.java,v 1.3.2.5 2002/01/29 21:34:14 dbrownell Exp $
// $Id: XMLReader.java,v 1.1 2004/12/23 22:38:42 mark Exp $
package org.xml.sax;
......@@ -53,7 +52,7 @@ import java.io.IOException;
*
* @since SAX 2.0
* @author David Megginson
* @version 2.0.1 (sax2r2)
* @version 2.0.1+ (sax2r3pre1)
* @see org.xml.sax.XMLFilter
* @see org.xml.sax.helpers.ParserAdapter
* @see org.xml.sax.helpers.XMLReaderAdapter
......@@ -342,7 +341,14 @@ public interface XMLReader
* progress (they should create a new XMLReader instead for each
* nested XML document). Once a parse is complete, an
* application may reuse the same XMLReader object, possibly with a
* different input source.</p>
* different input source.
* Configuration of the XMLReader object (such as handler bindings and
* values established for feature flags and properties) is unchanged
* by completion of a parse, unless the definition of that aspect of
* the configuration explicitly specifies other behavior.
* (For example, feature flags or properties exposing
* characteristics of the document being parsed.)
* </p>
*
* <p>During the parse, the XMLReader will provide information
* about the XML document through the registered event
......@@ -352,7 +358,7 @@ public interface XMLReader
* has ended. If a client application wants to terminate
* parsing early, it should throw an exception.</p>
*
* @param source The input source for the top-level of the
* @param input The input source for the top-level of the
* XML document.
* @exception org.xml.sax.SAXException Any SAX exception, possibly
* wrapping another exception.
......
// Attributes2.java - extended Attributes
// http://www.saxproject.org
// Public Domain: no warranty.
// $Id: Attributes2.java,v 1.1 2004/12/23 22:38:42 mark Exp $
package org.xml.sax.ext;
import org.xml.sax.Attributes;
/**
* SAX2 extension to augment the per-attribute information
* provided though {@link Attributes}.
* If an implementation supports this extension, the attributes
* provided in {@link org.xml.sax.ContentHandler#startElement
* ContentHandler.startElement() } will implement this interface,
* and the <em>http://xml.org/sax/features/use-attributes2</em>
* feature flag will have the value <em>true</em>.
*
* <blockquote>
* <em>This module, both source code and documentation, is in the
* Public Domain, and comes with <strong>NO WARRANTY</strong>.</em>
* </blockquote>
*
* <p> XMLReader implementations are not required to support this
* information, and it is not part of core-only SAX2 distributions.</p>
*
* <p>Note that if an attribute was defaulted (<em>!isSpecified()</em>)
* it will of necessity also have been declared (<em>isDeclared()</em>)
* in the DTD.
* Similarly if an attribute's type is anything except CDATA, then it
* must have been declared.
* </p>
*
* @since SAX 2.0 (extensions 1.1 alpha)
* @author David Brownell
* @version TBS
*/
public interface Attributes2 extends Attributes
{
/**
* Returns false unless the attribute was declared in the DTD.
* This helps distinguish two kinds of attributes that SAX reports
* as CDATA: ones that were declared (and hence are usually valid),
* and those that were not (and which are never valid).
*
* @param index The attribute index (zero-based).
* @return true if the attribute was declared in the DTD,
* false otherwise.
* @exception java.lang.ArrayIndexOutOfBoundsException When the
* supplied index does not identify an attribute.
*/
public boolean isDeclared (int index);
/**
* Returns false unless the attribute was declared in the DTD.
* This helps distinguish two kinds of attributes that SAX reports
* as CDATA: ones that were declared (and hence are usually valid),
* and those that were not (and which are never valid).
*
* @param qName The XML qualified (prefixed) name.
* @return true if the attribute was declared in the DTD,
* false otherwise.
* @exception java.lang.IllegalArgumentException When the
* supplied name does not identify an attribute.
*/
public boolean isDeclared (String qName);
/**
* Returns false unless the attribute was declared in the DTD.
* This helps distinguish two kinds of attributes that SAX reports
* as CDATA: ones that were declared (and hence are usually valid),
* and those that were not (and which are never valid).
*
* <p>Remember that since DTDs do not "understand" namespaces, the
* namespace URI associated with an attribute may not have come from
* the DTD. The declaration will have applied to the attribute's
* <em>qName</em>.
*
* @param uri The Namespace URI, or the empty string if
* the name has no Namespace URI.
* @param localName The attribute's local name.
* @return true if the attribute was declared in the DTD,
* false otherwise.
* @exception java.lang.IllegalArgumentException When the
* supplied names do not identify an attribute.
*/
public boolean isDeclared (String uri, String localName);
/**
* Returns true unless the attribute value was provided
* by DTD defaulting.
*
* @param index The attribute index (zero-based).
* @return true if the value was found in the XML text,
* false if the value was provided by DTD defaulting.
* @exception java.lang.ArrayIndexOutOfBoundsException When the
* supplied index does not identify an attribute.
*/
public boolean isSpecified (int index);
/**
* Returns true unless the attribute value was provided
* by DTD defaulting.
*
* <p>Remember that since DTDs do not "understand" namespaces, the
* namespace URI associated with an attribute may not have come from
* the DTD. The declaration will have applied to the attribute's
* <em>qName</em>.
*
* @param uri The Namespace URI, or the empty string if
* the name has no Namespace URI.
* @param localName The attribute's local name.
* @return true if the value was found in the XML text,
* false if the value was provided by DTD defaulting.
* @exception java.lang.IllegalArgumentException When the
* supplied names do not identify an attribute.
*/
public boolean isSpecified (String uri, String localName);
/**
* Returns true unless the attribute value was provided
* by DTD defaulting.
*
* @param qName The XML qualified (prefixed) name.
* @return true if the value was found in the XML text,
* false if the value was provided by DTD defaulting.
* @exception java.lang.IllegalArgumentException When the
* supplied name does not identify an attribute.
*/
public boolean isSpecified (String qName);
}
// Attributes2Impl.java - extended AttributesImpl
// http://www.saxproject.org
// Public Domain: no warranty.
// $Id: Attributes2Impl.java,v 1.1 2004/12/23 22:38:42 mark Exp $
package org.xml.sax.ext;
import org.xml.sax.Attributes;
import org.xml.sax.helpers.AttributesImpl;
/**
* SAX2 extension helper for additional Attributes information,
* implementing the {@link Attributes2} interface.
*
* <blockquote>
* <em>This module, both source code and documentation, is in the
* Public Domain, and comes with <strong>NO WARRANTY</strong>.</em>
* </blockquote>
*
* <p>This is not part of core-only SAX2 distributions.</p>
*
* <p>The <em>specified</em> flag for each attribute will always
* be true, unless it has been set to false in the copy constructor
* or using {@link #setSpecified}.
* Similarly, the <em>declared</em> flag for each attribute will
* always be false, except for defaulted attributes (<em>specified</em>
* is false), non-CDATA attributes, or when it is set to true using
* {@link #setDeclared}.
* If you change an attribute's type by hand, you may need to modify
* its <em>declared</em> flag to match.
* </p>
*
* @since SAX 2.0 (extensions 1.1 alpha)
* @author David Brownell
* @version TBS
*/
public class Attributes2Impl extends AttributesImpl implements Attributes2
{
private boolean declared [];
private boolean specified [];
/**
* Construct a new, empty Attributes2Impl object.
*/
public Attributes2Impl () { }
/**
* Copy an existing Attributes or Attributes2 object.
* If the object implements Attributes2, values of the
* <em>specified</em> and <em>declared</em> flags for each
* attribute are copied.
* Otherwise the flag values are defaulted to assume no DTD was used,
* unless there is evidence to the contrary (such as attributes with
* type other than CDATA, which must have been <em>declared</em>).
*
* <p>This constructor is especially useful inside a
* {@link org.xml.sax.ContentHandler#startElement startElement} event.</p>
*
* @param atts The existing Attributes object.
*/
public Attributes2Impl (Attributes atts)
{
super (atts);
}
////////////////////////////////////////////////////////////////////
// Implementation of Attributes2
////////////////////////////////////////////////////////////////////
/**
* Returns the current value of the attribute's "declared" flag.
*/
// javadoc mostly from interface
public boolean isDeclared (int index)
{
if (index < 0 || index >= getLength ())
throw new ArrayIndexOutOfBoundsException (
"No attribute at index: " + index);
return declared [index];
}
/**
* Returns the current value of the attribute's "declared" flag.
*/
// javadoc mostly from interface
public boolean isDeclared (String uri, String localName)
{
int index = getIndex (uri, localName);
if (index < 0)
throw new IllegalArgumentException (
"No such attribute: local=" + localName
+ ", namespace=" + uri);
return declared [index];
}
/**
* Returns the current value of the attribute's "declared" flag.
*/
// javadoc mostly from interface
public boolean isDeclared (String qName)
{
int index = getIndex (qName);
if (index < 0)
throw new IllegalArgumentException (
"No such attribute: " + qName);
return declared [index];
}
/**
* Returns the current value of an attribute's "specified" flag.
*
* @param index The attribute index (zero-based).
* @return current flag value
* @exception java.lang.ArrayIndexOutOfBoundsException When the
* supplied index does not identify an attribute.
*/
public boolean isSpecified (int index)
{
if (index < 0 || index >= getLength ())
throw new ArrayIndexOutOfBoundsException (
"No attribute at index: " + index);
return specified [index];
}
/**
* Returns the current value of an attribute's "specified" flag.
*
* @param uri The Namespace URI, or the empty string if
* the name has no Namespace URI.
* @param localName The attribute's local name.
* @return current flag value
* @exception java.lang.IllegalArgumentException When the
* supplied names do not identify an attribute.
*/
public boolean isSpecified (String uri, String localName)
{
int index = getIndex (uri, localName);
if (index < 0)
throw new IllegalArgumentException (
"No such attribute: local=" + localName
+ ", namespace=" + uri);
return specified [index];
}
/**
* Returns the current value of an attribute's "specified" flag.
*
* @param qName The XML qualified (prefixed) name.
* @return current flag value
* @exception java.lang.IllegalArgumentException When the
* supplied name does not identify an attribute.
*/
public boolean isSpecified (String qName)
{
int index = getIndex (qName);
if (index < 0)
throw new IllegalArgumentException (
"No such attribute: " + qName);
return specified [index];
}
////////////////////////////////////////////////////////////////////
// Manipulators
////////////////////////////////////////////////////////////////////
/**
* Copy an entire Attributes object. The "specified" flags are
* assigned as true, and "declared" flags as false (except when
* an attribute's type is not CDATA),
* unless the object is an Attributes2 object.
* In that case those flag values are all copied.
*
* @see AttributesImpl#setAttributes
*/
public void setAttributes (Attributes atts)
{
int length = atts.getLength ();
super.setAttributes (atts);
declared = new boolean [length];
specified = new boolean [length];
if (atts instanceof Attributes2) {
Attributes2 a2 = (Attributes2) atts;
for (int i = 0; i < length; i++) {
declared [i] = a2.isDeclared (i);
specified [i] = a2.isSpecified (i);
}
} else {
for (int i = 0; i < length; i++) {
declared [i] = !"CDATA".equals (atts.getType (i));
specified [i] = true;
}
}
}
/**
* Add an attribute to the end of the list, setting its
* "specified" flag to true. To set that flag's value
* to false, use {@link #setSpecified}.
*
* <p>Unless the attribute <em>type</em> is CDATA, this attribute
* is marked as being declared in the DTD. To set that flag's value
* to true for CDATA attributes, use {@link #setDeclared}.
*
* @see AttributesImpl#addAttribute
*/
public void addAttribute (String uri, String localName, String qName,
String type, String value)
{
super.addAttribute (uri, localName, qName, type, value);
int length = getLength ();
if (length < specified.length) {
boolean newFlags [];
newFlags = new boolean [length];
System.arraycopy (declared, 0, newFlags, 0, declared.length);
declared = newFlags;
newFlags = new boolean [length];
System.arraycopy (specified, 0, newFlags, 0, specified.length);
specified = newFlags;
}
specified [length - 1] = true;
declared [length - 1] = !"CDATA".equals (type);
}
// javadoc entirely from superclass
public void removeAttribute (int index)
{
int origMax = getLength () - 1;
super.removeAttribute (index);
if (index != origMax) {
System.arraycopy (declared, index + 1, declared, index,
origMax - index);
System.arraycopy (specified, index + 1, specified, index,
origMax - index);
}
}
/**
* Assign a value to the "declared" flag of a specific attribute.
* This is normally needed only for attributes of type CDATA,
* including attributes whose type is changed to or from CDATA.
*
* @param index The index of the attribute (zero-based).
* @param value The desired flag value.
* @exception java.lang.ArrayIndexOutOfBoundsException When the
* supplied index does not identify an attribute.
* @see #setType
*/
public void setDeclared (int index, boolean value)
{
if (index < 0 || index >= getLength ())
throw new ArrayIndexOutOfBoundsException (
"No attribute at index: " + index);
declared [index] = value;
}
/**
* Assign a value to the "specified" flag of a specific attribute.
* This is the only way this flag can be cleared, except clearing
* by initialization with the copy constructor.
*
* @param index The index of the attribute (zero-based).
* @param value The desired flag value.
* @exception java.lang.ArrayIndexOutOfBoundsException When the
* supplied index does not identify an attribute.
*/
public void setSpecified (int index, boolean value)
{
if (index < 0 || index >= getLength ())
throw new ArrayIndexOutOfBoundsException (
"No attribute at index: " + index);
specified [index] = value;
}
}
// DeclHandler.java - Optional handler for DTD declaration events.
// http://www.saxproject.org
// Public Domain: no warranty.
// $Id: DeclHandler.java,v 1.2.2.5 2002/01/29 21:34:14 dbrownell Exp $
// $Id: DeclHandler.java,v 1.1 2004/12/23 22:38:42 mark Exp $
package org.xml.sax.ext;
......@@ -125,11 +125,14 @@ public interface DeclHandler
* <p>Only the effective (first) declaration for each entity
* will be reported.</p>
*
* <p>If the system identifier is a URL, the parser must resolve it
* fully before passing it to the application.</p>
*
* @param name The name of the entity. If it is a parameter
* entity, the name will begin with '%'.
* @param publicId The declared public identifier of the entity, or
* null if none was declared.
* @param systemId The declared system identifier of the entity.
* @param publicId The entity's public identifier, or null if none
* was given.
* @param systemId The entity's system identifier.
* @exception SAXException The application may raise an exception.
* @see #internalEntityDecl
* @see org.xml.sax.DTDHandler#unparsedEntityDecl
......
// DefaultHandler2.java - extended DefaultHandler
// http://www.saxproject.org
// Public Domain: no warranty.
// $Id: DefaultHandler2.java,v 1.1 2004/12/23 22:38:42 mark Exp $
package org.xml.sax.ext;
import java.io.IOException;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
import org.xml.sax.helpers.DefaultHandler;
/**
* This class extends the SAX2 base handler class to support the
* SAX2 {@link LexicalHandler}, {@link DeclHandler}, and
* {@link EntityResolver2} extensions. Except for overriding the
* original SAX1 {@link DefaultHandler#resolveEntity resolveEntity()}
* method the added handler methods just return. Subclassers may
* override everything on a method-by-method basis.
*
* <blockquote>
* <em>This module, both source code and documentation, is in the
* Public Domain, and comes with <strong>NO WARRANTY</strong>.</em>
* </blockquote>
*
* <p> <em>Note:</em> this class might yet learn that the
* <em>ContentHandler.setDocumentLocator()</em> call might be passed a
* {@link Locator2} object, and that the
* <em>ContentHandler.startElement()</em> call might be passed a
* {@link Attributes2} object.
*
* @since SAX 2.0 (extensions 1.1 alpha)
* @author David Brownell
* @version TBS
*/
public class DefaultHandler2 extends DefaultHandler
implements LexicalHandler, DeclHandler, EntityResolver2
{
/** Constructs a handler which ignores all parsing events. */
public DefaultHandler2 () { }
// SAX2 ext-1.0 LexicalHandler
public void startCDATA ()
throws SAXException
{}
public void endCDATA ()
throws SAXException
{}
public void startDTD (String name, String publicId, String systemId)
throws SAXException
{}
public void endDTD ()
throws SAXException
{}
public void startEntity (String name)
throws SAXException
{}
public void endEntity (String name)
throws SAXException
{}
public void comment (char ch [], int start, int length)
throws SAXException
{ }
// SAX2 ext-1.0 DeclHandler
public void attributeDecl (String eName, String aName,
String type, String mode, String value)
throws SAXException
{}
public void elementDecl (String name, String model)
throws SAXException
{}
public void externalEntityDecl (String name,
String publicId, String systemId)
throws SAXException
{}
public void internalEntityDecl (String name, String value)
throws SAXException
{}
// SAX2 ext-1.1 EntityResolver2
/**
* Tells the parser that if no external subset has been declared
* in the document text, none should be used.
*/
public InputSource getExternalSubset (String name, String baseURI)
throws SAXException, IOException
{ return null; }
/**
* Tells the parser to resolve the systemId against the baseURI
* and read the entity text from that resulting absolute URI.
* Note that because the older
* {@link DefaultHandler#resolveEntity DefaultHandler.resolveEntity()},
* method is overridden to call this one, this method may sometimes
* be invoked with null <em>name</em> and <em>baseURI</em>, and
* with the <em>systemId</em> already absolutized.
*/
public InputSource resolveEntity (String name, String publicId,
String baseURI, String systemId)
throws SAXException, IOException
{ return null; }
// SAX1 EntityResolver
/**
* Invokes
* {@link EntityResolver2#resolveEntity EntityResolver2.resolveEntity()}
* with null entity name and base URI.
* You only need to override that method to use this class.
*/
public InputSource resolveEntity (String publicId, String systemId)
throws SAXException, IOException
{ return resolveEntity (null, publicId, null, systemId); }
}
// EntityResolver2.java - Extended SAX entity resolver.
// http://www.saxproject.org
// No warranty; no copyright -- use this as you will.
// $Id: EntityResolver2.java,v 1.1 2004/12/23 22:38:42 mark Exp $
package org.xml.sax.ext;
import java.io.IOException;
import org.xml.sax.EntityResolver;
import org.xml.sax.InputSource;
import org.xml.sax.XMLReader;
import org.xml.sax.SAXException;
/**
* Extended interface for mapping external entity references to input
* sources, or providing a missing external subset. The
* {@link XMLReader#setEntityResolver XMLReader.setEntityResolver()} method
* is used to provide implementations of this interface to parsers.
* When a parser uses the methods in this interface, the
* {@link EntityResolver2#resolveEntity EntityResolver2.resolveEntity()}
* method (in this interface) is used <em>instead of</em> the older (SAX 1.0)
* {@link EntityResolver#resolveEntity EntityResolver.resolveEntity()} method.
*
* <blockquote>
* <em>This module, both source code and documentation, is in the
* Public Domain, and comes with <strong>NO WARRANTY</strong>.</em>
* </blockquote>
*
* <p>If a SAX application requires the customized handling which this
* interface defines for external entities, it must ensure that it uses
* an XMLReader with the
* <em>http://xml.org/sax/features/use-entity-resolver2</em> feature flag
* set to <em>true</em> (which is its default value when the feature is
* recognized). If that flag is unrecognized, or its value is false,
* or the resolver does not implement this interface, then only the
* {@link EntityResolver} method will be used.
* </p>
*
* <p>That supports three categories of application that modify entity
* resolution. <em>Old Style</em> applications won't know about this interface;
* they will provide an EntityResolver.
* <em>Transitional Mode</em> provide an EntityResolver2 and automatically
* get the benefit of its methods in any systems (parsers or other tools)
* supporting it, due to polymorphism.
* Both <em>Old Style</em> and <em>Transitional Mode</em> applications will
* work with any SAX2 parser.
* <em>New style</em> applications will fail to run except on SAX2 parsers
* that support this particular feature.
* They will insist that feature flag have a value of "true", and the
* EntityResolver2 implementation they provide might throw an exception
* if the original SAX 1.0 style entity resolution method is invoked.
* </p>
*
* @see org.xml.sax.XMLReader#setEntityResolver
*
* @since SAX 2.0 (extensions 1.1 alpha)
* @author David Brownell
* @version TBD
*/
public interface EntityResolver2 extends EntityResolver
{
/**
* Allows applications to provide an external subset for documents
* that don't explicitly define one. Documents with DOCTYPE declarations
* that omit an external subset can thus augment the declarations
* available for validation, entity processing, and attribute processing
* (normalization, defaulting, and reporting types including ID).
* This augmentation is reported
* through the {@link LexicalHandler#startDTD startDTD()} method as if
* the document text had originally included the external subset;
* this callback is made before any internal subset data or errors
* are reported.</p>
*
* <p>This method can also be used with documents that have no DOCTYPE
* declaration. When the root element is encountered,
* but no DOCTYPE declaration has been seen, this method is
* invoked. If it returns a value for the external subset, that root
* element is declared to be the root element, giving the effect of
* splicing a DOCTYPE declaration at the end the prolog of a document
* that could not otherwise be valid. The sequence of parser callbacks
* in that case logically resembles this:</p>
*
* <pre>
* ... comments and PIs from the prolog (as usual)
* startDTD ("rootName", source.getPublicId (), source.getSystemId ());
* startEntity ("[dtd]");
* ... declarations, comments, and PIs from the external subset
* endEntity ("[dtd]");
* endDTD ();
* ... then the rest of the document (as usual)
* startElement (..., "rootName", ...);
* </pre>
*
* <p>Note that the InputSource gets no further resolution.
* Implementations of this method may wish to invoke
* {@link #resolveEntity resolveEntity()} to gain benefits such as use
* of local caches of DTD entities. Also, this method will never be
* used by a (non-validating) processor that is not including external
* parameter entities. </p>
*
* <p>Uses for this method include facilitating data validation when
* interoperating with XML processors that would always require
* undesirable network accesses for external entities, or which for
* other reasons adopt a "no DTDs" policy.
* Non-validation motives include forcing documents to include DTDs so
* that attributes are handled consistently.
* For example, an XPath processor needs to know which attibutes have
* type "ID" before it can process a widely used type of reference.</p>
*
* <p><strong>Warning:</strong> Returning an external subset modifies
* the input document. By providing definitions for general entities,
* it can make a malformed document appear to be well formed.
* </p>
*
* @param name Identifies the document root element. This name comes
* from a DOCTYPE declaration (where available) or from the actual
* root element.
* @param baseURI The document's base URI, serving as an additional
* hint for selecting the external subset. This is always an absolute
* URI, unless it is null because the XMLReader was given an InputSource
* without one.
*
* @return An InputSource object describing the new external subset
* to be used by the parser, or null to indicate that no external
* subset is provided.
*
* @exception SAXException Any SAX exception, possibly wrapping
* another exception.
* @exception IOException Probably indicating a failure to create
* a new InputStream or Reader, or an illegal URL.
*/
public InputSource getExternalSubset (String name, String baseURI)
throws SAXException, IOException;
/**
* Allows applications to map references to external entities into input
* sources, or tell the parser it should use conventional URI resolution.
* This method is only called for external entities which have been
* properly declared.
* This method provides more flexibility than the {@link EntityResolver}
* interface, supporting implementations of more complex catalogue
* schemes such as the one defined by the <a href=
"http://www.oasis-open.org/committees/entity/spec-2001-08-06.html"
>OASIS XML Catalogs</a> specification.</p>
*
* <p>Parsers configured to use this resolver method will call it
* to determine the input source to use for any external entity
* being included because of a reference in the XML text.
* That excludes the document entity, and any external entity returned
* by {@link #getExternalSubset getExternalSubset()}.
* When a (non-validating) processor is configured not to include
* a class of entities (parameter or general) through use of feature
* flags, this method is not invoked for such entities. </p>
*
* <p>Note that the entity naming scheme used here is the same one
* used in the {@link LexicalHandler}, or in the {@link
org.xml.sax.ContentHandler#skippedEntity
ContentHandler.skippedEntity()}
* method. </p>
*
* @param name Identifies the external entity being resolved.
* Either "[dtd]" for the external subset, or a name starting
* with "%" to indicate a parameter entity, or else the name of
* a general entity. This is never null when invoked by a SAX2
* parser.
* @param publicId The public identifier of the external entity being
* referenced (normalized as required by the XML specification), or
* null if none was supplied.
* @param baseURI The URI with respect to which relative systemIDs
* are interpreted. This is always an absolute URI, unless it is
* null (likely because the XMLReader was given an InputSource without
* one). This URI is defined by the XML specification to be the one
* associated with the "&lt;" starting the relevant declaration.
* @param systemId The system identifier of the external entity
* being referenced; either a relative or absolute URI.
* This is never null when invoked by a SAX2 parser; only declared
* entities, and any external subset, are resolved by such parsers.
*
* @return An InputSource object describing the new input source to
* be used by the parser. Returning null directs the parser to
* resolve the system ID against the base URI and open a connection
* to resulting URI.
*
* @exception SAXException Any SAX exception, possibly wrapping
* another exception.
* @exception IOException Probably indicating a failure to create
* a new InputStream or Reader, or an illegal URL.
*/
public InputSource resolveEntity (
String name,
String publicId,
String baseURI,
String systemId
) throws SAXException, IOException;
}
// LexicalHandler.java - optional handler for lexical parse events.
// http://www.saxproject.org
// Public Domain: no warranty.
// $Id: LexicalHandler.java,v 1.2.2.4 2002/01/29 21:34:14 dbrownell Exp $
// $Id: LexicalHandler.java,v 1.1 2004/12/23 22:38:42 mark Exp $
package org.xml.sax.ext;
......
// Locator2.java - extended Locator
// http://www.saxproject.org
// Public Domain: no warranty.
// $Id: Locator2.java,v 1.1 2004/12/23 22:38:42 mark Exp $
package org.xml.sax.ext;
import org.xml.sax.Locator;
/**
* SAX2 extension to augment the entity information provided
* though a {@link Locator}.
* If an implementation supports this extension, the Locator
* provided in {@link org.xml.sax.ContentHandler#setDocumentLocator
* ContentHandler.setDocumentLocator() } will implement this
* interface, and the
* <em>http://xml.org/sax/features/use-locator2</em> feature
* flag will have the value <em>true</em>.
*
* <blockquote>
* <em>This module, both source code and documentation, is in the
* Public Domain, and comes with <strong>NO WARRANTY</strong>.</em>
* </blockquote>
*
* <p> XMLReader implementations are not required to support this
* information, and it is not part of core-only SAX2 distributions.</p>
*
* @since SAX 2.0 (extensions 1.1 alpha)
* @author David Brownell
* @version TBS
*/
public interface Locator2 extends Locator
{
/**
* Returns the version of XML used for the entity. This will
* normally be the identifier from the current entity's
* <em>&lt;?xml&nbsp;version='...'&nbsp;...?&gt;</em> declaration,
* or be defaulted by the parser.
*
* @return Identifier for the XML version being used to interpret
* the entity's text, or null if that information is not yet
* available in the current parsing state.
*/
public String getXMLVersion ();
/**
* Returns the name of the character encoding for the entity.
* If the encoding was declared externally (for example, in a MIME
* Content-Type header), that will be the name returned. Else if there
* was an <em>&lt;?xml&nbsp;...encoding='...'?&gt;</em> declaration at
* the start of the document, that encoding name will be returned.
* Otherwise the encoding will been inferred (normally to be UTF-8, or
* some UTF-16 variant), and that inferred name will be returned.
*
* <p>When an {@link org.xml.sax.InputSource InputSource} is used
* to provide an entity's character stream, this method returns the
* encoding provided in that input stream.
*
* <p> Note that some recent W3C specifications require that text
* in some encodings be normalized, using Unicode Normalization
* Form C, before processing. Such normalization must be performed
* by applications, and would normally be triggered based on the
* value returned by this method.
*
* <p> Encoding names may be those used by the underlying JVM,
* and comparisons should be case-insensitive.
*
* @return Name of the character encoding being used to interpret
* * the entity's text, or null if this was not provided for a *
* character stream passed through an InputSource or is otherwise
* not yet available in the current parsing state.
*/
public String getEncoding ();
}
// Locator2Impl.java - extended LocatorImpl
// http://www.saxproject.org
// Public Domain: no warranty.
// $Id: Locator2Impl.java,v 1.1 2004/12/23 22:38:42 mark Exp $
package org.xml.sax.ext;
import org.xml.sax.Locator;
import org.xml.sax.helpers.LocatorImpl;
/**
* SAX2 extension helper for holding additional Entity information,
* implementing the {@link Locator2} interface.
*
* <blockquote>
* <em>This module, both source code and documentation, is in the
* Public Domain, and comes with <strong>NO WARRANTY</strong>.</em>
* </blockquote>
*
* <p> This is not part of core-only SAX2 distributions.</p>
*
* @since SAX 2.0.2
* @author David Brownell
* @version TBS
*/
public class Locator2Impl extends LocatorImpl implements Locator2
{
private String encoding;
private String version;
/**
* Construct a new, empty Locator2Impl object.
* This will not normally be useful, since the main purpose
* of this class is to make a snapshot of an existing Locator.
*/
public Locator2Impl () { }
/**
* Copy an existing Locator or Locator2 object.
* If the object implements Locator2, values of the
* <em>encoding</em> and <em>version</em>strings are copied,
* otherwise they set to <em>null</em>.
*
* @param locator The existing Locator object.
*/
public Locator2Impl (Locator locator)
{
super (locator);
if (locator instanceof Locator2) {
Locator2 l2 = (Locator2) locator;
version = l2.getXMLVersion ();
encoding = l2.getEncoding ();
}
}
////////////////////////////////////////////////////////////////////
// Locator2 method implementations
////////////////////////////////////////////////////////////////////
/**
* Returns the current value of the version property.
*
* @see #setXMLVersion
*/
public String getXMLVersion ()
{ return version; }
/**
* Returns the current value of the encoding property.
*
* @see #setEncoding
*/
public String getEncoding ()
{ return encoding; }
////////////////////////////////////////////////////////////////////
// Setters
////////////////////////////////////////////////////////////////////
/**
* Assigns the current value of the version property.
*
* @param version the new "version" value
* @see #getXMLVersion
*/
public void setXMLVersion (String version)
{ this.version = version; }
/**
* Assigns the current value of the encoding property.
*
* @param encoding the new "encoding" value
* @see #getEncoding
*/
public void setEncoding (String encoding)
{ this.encoding = encoding; }
}
<HTML><HEAD>
<!-- $Id: package.html,v 1.1 2004/12/23 22:38:42 mark Exp $ -->
</HEAD><BODY>
<p>
This package contains interfaces to optional SAX2 handlers.
This package contains interfaces to SAX2 facilities that
conformant SAX drivers won't necessarily support.
<p>See <a href='http://www.saxproject.org'>http://www.saxproject.org</a>
for more information about SAX.</p>
<p>
The package is independent of the SAX2 core, though the functionality
exposed generally needs to be implemented within a parser.
<p> This package is independent of the SAX2 core, though the functionality
exposed generally needs to be implemented within a parser core.
That independence has several consequences:</p>
<ul>
<li>SAX2 drivers are <em>not</em> required to recognize these handlers,
and you cannot assume that the class files will be present in every SAX2
<li>SAX2 drivers are <em>not</em> required to recognize these handlers.
</li>
<li>You cannot assume that the class files will be present in every SAX2
installation.</li>
<li>This package may be updated independently of SAX2 (i.e. new
handlers may be added without updating SAX2 itself).</li>
handlers and classes may be added without updating SAX2 itself).</li>
<li>The handlers are not implemented by the SAX2
<li>The new handlers are not implemented by the SAX2
<code>org.xml.sax.helpers.DefaultHandler</code> or
<code>org.xml.sax.helpers.XMLFilterImpl</code> classes.
You can subclass these if you need such behaviour.</li>
You can subclass these if you need such behavior, or
use the helper classes found here.</li>
<li>The handlers need to be registered differently than regular SAX2
<li>The handlers need to be registered differently than core SAX2
handlers.</li>
</ul>
......@@ -37,13 +40,7 @@ designed both to allow SAX parsers to pass certain types of information
to applications, and to serve as a simple model for other SAX2 parser
extension packages. Not all such extension packages should need to
be recognized directly by parsers, however.
As an example, most schema systems can be cleanly layered on top
As an example, most validation systems can be cleanly layered on top
of parsers supporting the standardized SAX2 interfaces. </p>
<p><strong>NOTE:</strong> this package alone does add any
functionality; it simply provides optional interfaces for SAX2 drivers
to use. You must use a SAX2 driver that recognizes these interfaces if
you actually want to have access to lexical and declaration
information.</p>
</BODY></HTML>
// SAX default implementation for AttributeList.
// http://www.saxproject.org
// No warranty; no copyright -- use this as you will.
// $Id: AttributeListImpl.java,v 1.3.2.3 2002/01/29 21:34:14 dbrownell Exp $
// $Id: AttributeListImpl.java,v 1.1 2004/12/23 22:38:42 mark Exp $
package org.xml.sax.helpers;
......
......@@ -2,9 +2,7 @@
// http://www.saxproject.org
// Written by David Megginson
// NO WARRANTY! This class is in the public domain.
// $Id: AttributesImpl.java,v 1.6.2.3 2002/01/29 21:34:14 dbrownell Exp $
// $Id: AttributesImpl.java,v 1.1 2004/12/23 22:38:42 mark Exp $
package org.xml.sax.helpers;
......
......@@ -2,8 +2,7 @@
// http://www.saxproject.org
// Written by David Megginson
// NO WARRANTY! This class is in the public domain.
// $Id: DefaultHandler.java,v 1.5.2.3 2002/01/29 21:34:14 dbrownell Exp $
// $Id: DefaultHandler.java,v 1.1 2004/12/23 22:38:42 mark Exp $
package org.xml.sax.helpers;
......@@ -262,7 +261,7 @@ public class DefaultHandler
* performed.
* @param qName The qualified name (with prefix), or the
* empty string if qualified names are not available.
* @param atts The attributes attached to the element. If
* @param attributes The attributes attached to the element. If
* there are no attributes, it shall be an empty
* Attributes object.
* @exception org.xml.sax.SAXException Any SAX exception, possibly
......
// SAX default implementation for Locator.
// http://www.saxproject.org
// No warranty; no copyright -- use this as you will.
// $Id: LocatorImpl.java,v 1.3.2.3 2002/01/29 21:34:14 dbrownell Exp $
// $Id: LocatorImpl.java,v 1.1 2004/12/23 22:38:42 mark Exp $
package org.xml.sax.helpers;
......
......@@ -3,8 +3,7 @@
// Written by Edwin Goei, edwingo@apache.org
// and by David Brownell, dbrownell@users.sourceforge.net
// NO WARRANTY! This class is in the Public Domain.
// $Id: NewInstance.java,v 1.1.2.4 2002/01/29 21:34:14 dbrownell Exp $
// $Id: NewInstance.java,v 1.1 2004/12/23 22:38:42 mark Exp $
package org.xml.sax.helpers;
......
......@@ -2,8 +2,7 @@
// http://www.saxproject.org
// Written by David Megginson
// NO WARRANTY! This class is in the public domain.
// $Id: ParserAdapter.java,v 1.8.2.4 2002/01/29 21:34:14 dbrownell Exp $
// $Id: ParserAdapter.java,v 1.1 2004/12/23 22:38:42 mark Exp $
package org.xml.sax.helpers;
......@@ -159,6 +158,7 @@ public class ParserAdapter implements XMLReader, DocumentHandler
private final static String FEATURES = "http://xml.org/sax/features/";
private final static String NAMESPACES = FEATURES + "namespaces";
private final static String NAMESPACE_PREFIXES = FEATURES + "namespace-prefixes";
private final static String XMLNS_URIs = FEATURES + "xmlns-uris";
/**
......@@ -190,6 +190,9 @@ public class ParserAdapter implements XMLReader, DocumentHandler
if (!prefixes && !namespaces) {
namespaces = true;
}
} else if (name.equals(XMLNS_URIs)) {
checkNotParsing("feature", name);
uris = value;
} else {
throw new SAXNotRecognizedException("Feature: " + name);
}
......@@ -217,6 +220,8 @@ public class ParserAdapter implements XMLReader, DocumentHandler
return namespaces;
} else if (name.equals(NAMESPACE_PREFIXES)) {
return prefixes;
} else if (name.equals(XMLNS_URIs)) {
return uris;
} else {
throw new SAXNotRecognizedException("Feature: " + name);
}
......@@ -290,7 +295,7 @@ public class ParserAdapter implements XMLReader, DocumentHandler
/**
* Set the DTD handler.
*
* @param resolver The new DTD handler.
* @param handler the new DTD handler
* @see org.xml.sax.XMLReader#setEntityResolver
*/
public void setDTDHandler (DTDHandler handler)
......@@ -302,7 +307,7 @@ public class ParserAdapter implements XMLReader, DocumentHandler
/**
* Return the current DTD handler.
*
* @return The current DTD handler, or null if none was supplied.
* @return the current DTD handler, or null if none was supplied
* @see org.xml.sax.XMLReader#getEntityResolver
*/
public DTDHandler getDTDHandler ()
......@@ -314,7 +319,7 @@ public class ParserAdapter implements XMLReader, DocumentHandler
/**
* Set the content handler.
*
* @param resolver The new content handler.
* @param handler the new content handler
* @see org.xml.sax.XMLReader#setEntityResolver
*/
public void setContentHandler (ContentHandler handler)
......@@ -338,7 +343,7 @@ public class ParserAdapter implements XMLReader, DocumentHandler
/**
* Set the error handler.
*
* @param resolver The new error handler.
* @param handler The new error handler.
* @see org.xml.sax.XMLReader#setEntityResolver
*/
public void setErrorHandler (ErrorHandler handler)
......@@ -405,7 +410,7 @@ public class ParserAdapter implements XMLReader, DocumentHandler
}
////////////////////////////////////////////////////////////////////
// Implementation of org.xml.sax.DocumentHandler.
////////////////////////////////////////////////////////////////////
......@@ -468,7 +473,7 @@ public class ParserAdapter implements XMLReader, DocumentHandler
* <p>If necessary, perform Namespace processing.</p>
*
* @param qName The qualified (prefixed) name.
* @param qAtts The XML 1.0 attribute list (with qnames).
* @param qAtts The XML attribute list (with qnames).
* @exception SAXException The client may raise a
* processing exception.
*/
......@@ -547,13 +552,21 @@ public class ParserAdapter implements XMLReader, DocumentHandler
// (and similarly named) attributes ... ignore
prefix = null;
} else {
prefix = attQName.substring(n+1);
prefix = attQName.substring(6);
}
// Yes, decl: report or prune
if (prefix != null) {
if (prefixes)
atts.addAttribute("", "", attQName.intern(),
type, value);
if (prefixes) {
if (uris)
// note funky case: localname can be null
// when declaring the default prefix, and
// yet the uri isn't null.
atts.addAttribute (nsSupport.XMLNS, prefix,
attQName.intern(), type, value);
else
atts.addAttribute ("", "",
attQName.intern(), type, value);
}
continue;
}
}
......@@ -691,7 +704,13 @@ public class ParserAdapter implements XMLReader, DocumentHandler
*/
private void setupParser ()
{
// catch an illegal "nonsense" state.
if (!prefixes && !namespaces)
throw new IllegalStateException ();
nsSupport.reset();
if (uris)
nsSupport.setNamespaceDeclUris (true);
if (entityResolver != null) {
parser.setEntityResolver(entityResolver);
......@@ -809,6 +828,7 @@ public class ParserAdapter implements XMLReader, DocumentHandler
// Features
private boolean namespaces = true;
private boolean prefixes = false;
private boolean uris = false;
// Properties
......
// SAX parser factory.
// http://www.saxproject.org
// No warranty; no copyright -- use this as you will.
// $Id: ParserFactory.java,v 1.4.2.3 2002/01/29 21:34:14 dbrownell Exp $
// $Id: ParserFactory.java,v 1.1 2004/12/23 22:38:42 mark Exp $
package org.xml.sax.helpers;
......
......@@ -2,8 +2,7 @@
// http://www.saxproject.org
// Written by David Megginson
// NO WARRANTY! This class is in the Public Domain.
// $Id: XMLFilterImpl.java,v 1.3.2.7 2002/01/29 21:34:14 dbrownell Exp $
// $Id: XMLFilterImpl.java,v 1.1 2004/12/23 22:38:42 mark Exp $
package org.xml.sax.helpers;
......@@ -254,7 +253,7 @@ public class XMLFilterImpl
/**
* Set the DTD event handler.
*
* @param resolver The new DTD handler.
* @param handler the new DTD handler
*/
public void setDTDHandler (DTDHandler handler)
{
......@@ -276,7 +275,7 @@ public class XMLFilterImpl
/**
* Set the content event handler.
*
* @param resolver The new content handler.
* @param handler the new content handler
*/
public void setContentHandler (ContentHandler handler)
{
......@@ -298,7 +297,7 @@ public class XMLFilterImpl
/**
* Set the error event handler.
*
* @param handle The new error handler.
* @param handler the new error handler
*/
public void setErrorHandler (ErrorHandler handler)
{
......
......@@ -2,8 +2,7 @@
// http://www.saxproject.org
// Written by David Megginson
// NO WARRANTY! This class is in the public domain.
// $Id: XMLReaderAdapter.java,v 1.5.2.3 2002/01/29 21:34:15 dbrownell Exp $
// $Id: XMLReaderAdapter.java,v 1.1 2004/12/23 22:38:42 mark Exp $
package org.xml.sax.helpers;
......@@ -108,7 +107,7 @@ public class XMLReaderAdapter implements Parser, ContentHandler
}
////////////////////////////////////////////////////////////////////
// Implementation of org.xml.sax.Parser.
////////////////////////////////////////////////////////////////////
......@@ -120,7 +119,7 @@ public class XMLReaderAdapter implements Parser, ContentHandler
* <p>This is not supported in SAX2, and will always throw
* an exception.</p>
*
* @param The locale for error reporting.
* @param locale the locale for error reporting.
* @see org.xml.sax.Parser#setLocale
* @exception org.xml.sax.SAXException Thrown unless overridden.
*/
......
......@@ -3,8 +3,7 @@
// Written by David Megginson
// and by David Brownell
// NO WARRANTY! This class is in the Public Domain.
// $Id: XMLReaderFactory.java,v 1.5.2.4 2002/01/29 21:34:15 dbrownell Exp $
// $Id: XMLReaderFactory.java,v 1.1 2004/12/23 22:38:42 mark Exp $
package org.xml.sax.helpers;
import java.io.BufferedReader;
......@@ -110,7 +109,7 @@ final public class XMLReaderFactory
// 1. try the JVM-instance-wide system property
try { className = System.getProperty (property); }
catch (Exception e) { /* normally fails for applets */ }
catch (RuntimeException e) { /* normally fails for applets */ }
// 2. if that fails, try META-INF/services/
if (className == null) {
......
<HTML><HEAD>
<!-- $Id: package.html,v 1.3.2.1 2001/11/09 20:32:58 dbrownell Exp $ -->
<!-- $Id: package.html,v 1.1 2004/12/23 22:38:42 mark Exp $ -->
</HEAD><BODY>
<p>This package contains "helper" classes, including
......
<html><head>
<!-- $Id: package.html,v 1.2.2.2 2002/01/12 21:42:21 dbrownell Exp $ -->
<!-- $Id: package.html,v 1.1 2004/12/23 22:38:42 mark Exp $ -->
</head><body>
<p> This package provides the core SAX APIs.
Some SAX1 APIs are deprecated to encourage integration of
namespace-awareness into designs of new applications
and into maintainance of existing infrastructure. </p>
and into maintenance of existing infrastructure. </p>
<p>See <a href='http://www.saxproject.org'>http://www.saxproject.org</a>
for more information about SAX.</p>
......@@ -29,68 +27,194 @@ Currently defined standard feature URIs have the prefix
<table border="1" cellpadding="3" cellspacing="0" width="100%">
<tr align="center" bgcolor="#ccccff">
<th>Feature ID</th>
<th>Access</th>
<th>Default</th>
<th>Description</th>
</tr>
<tr>
<td>external-general-entities</td>
<td><em>read/write</em></td>
<td><em>unspecified</em></td>
<td> Reports whether this parser processes external
general entities; always true if validating</td>
general entities; always true if validating.
</td>
</tr>
<tr>
<td>external-parameter-entities</td>
<td><em>read/write</em></td>
<td><em>unspecified</em></td>
<td> Reports whether this parser processes external
parameter entities; always true if validating</td>
parameter entities; always true if validating.
</td>
</tr>
<tr>
<td>is-standalone</td>
<td>(parsing) <em>read-only</em>, (not parsing) <em>none</em></td>
<td>not applicable</td>
<td> May be examined only during a parse, after the
<em>startDocument()</em> callback has been completed; read-only.
The value is true if the document specified standalone="yes" in
its XML declaration, and otherwise is false.
</td>
</tr>
<tr>
<td>lexical-handler/parameter-entities</td>
<td><em>read/write</em></td>
<td><em>unspecified</em></td>
<td> true indicates that the LexicalHandler will report the
beginning and end of parameter entities
</td>
<td> A value of "true" indicates that the LexicalHandler will report
the beginning and end of parameter entities.
</td>
</tr>
<tr>
<td>namespaces</td>
<td><em>read/write</em></td>
<td>true</td>
<td> true indicates namespace URIs and unprefixed local names
for element and attribute names will be available </td>
<td> A value of "true" indicates namespace URIs and unprefixed local names
for element and attribute names will be available.
</td>
</tr>
<tr>
<td>namespace-prefixes</td>
<td><em>read/write</em></td>
<td>false</td>
<td> true indicates XML 1.0 names (with prefixes) and attributes
(including <em>xmlns*</em> attributes) will be available </td>
<td> A value of "true" indicates that XML qualified names (with prefixes) and
attributes (including <em>xmlns*</em> attributes) will be available.
</td>
</tr>
<tr>
<td>resolve-dtd-uris</td>
<td><em>read/write</em></td>
<td><em>true</em></td>
<td> A value of "true" indicates that system IDs in declarations will
be absolutized (relative to their base URIs) before reporting.
(That is the default behavior for all SAX2 XML parsers.)
A value of "false" indicates those IDs will not be absolutized;
parsers will provide the base URI from
<em>Locator.getSystemId()</em>.
This applies to system IDs passed in <ul>
<li><em>DTDHandler.notationDecl()</em>,
<li><em>DTDHandler.unparsedEntityDecl()</em>, and
<li><em>DeclHandler.externalEntityDecl()</em>.
</ul>
It does not apply to <em>EntityResolver.resolveEntity()</em>,
which is not used to report declarations, or to
<em>LexicalHandler.startDTD()</em>, which already provides
the non-absolutized URI.
</td>
</tr>
<tr>
<td>string-interning</td>
<td><em>read/write</em></td>
<td><em>unspecified</em></td>
<td> true if all XML names (for elements, prefixes, attributes,
entities, notations, and local names),
<td> Has a value of "true" if all XML names (for elements, prefixes,
attributes, entities, notations, and local names),
as well as Namespace URIs, will have been interned
using <em>java.lang.String.intern</em>. This supports fast
testing of equality/inequality against string constants.</td>
testing of equality/inequality against string constants,
rather than forcing slower calls to <em>String.equals()</em>.
</td>
</tr>
<tr>
<td>unicode-normalization-checking</td>
<td><em>read/write</em></td>
<td><em>false</em></td>
<td> Controls whether the parser reports Unicode normalization
errors as described in section 2.13 and Appendix B of the
XML 1.1 Recommendation. If true, Unicode normalization
errors are reported using the ErrorHandler.error() callback.
Such errors are not fatal in themselves (though, obviously,
other Unicode-related encoding errors may be).
</td>
</tr>
<tr>
<td>use-attributes2</td>
<td><em>read-only</em></td>
<td>not applicable</td>
<td> Returns "true" if the <em>Attributes</em> objects passed by
this parser in <em>ContentHandler.startElement()</em>
implement the <a href="ext/Attributes2.html"
><em>org.xml.sax.ext.Attributes2</em></a> interface.
That interface exposes additional DTD-related information,
such as whether the attribute was specified in the
source text rather than defaulted.
</td>
</tr>
<tr>
<td>use-locator2</td>
<td><em>read-only</em></td>
<td>not applicable</td>
<td> Returns "true" if the <em>Locator</em> objects passed by
this parser in <em>ContentHandler.setDocumentLocator()</em>
implement the <a href="ext/Locator2.html"
><em>org.xml.sax.ext.Locator2</em></a> interface.
That interface exposes additional entity information,
such as the character encoding and XML version used.
</td>
</tr>
<tr>
<td>use-entity-resolver2</td>
<td><em>read/write</em></td>
<td><em>true</em></td>
<td> Returns "true" if, when <em>setEntityResolver</em> is given
an object implementing the <a href="ext/EntityResolver2.html"
><em>org.xml.sax.ext.EntityResolver2</em></a> interface,
those new methods will be used.
Returns "false" to indicate that those methods will not be used.
</td>
</tr>
<tr>
<td>validation</td>
<td><em>read/write</em></td>
<td><em>unspecified</em></td>
<td> controls whether the parser is reporting all validity
errors; if true, all external entities will be read. </td>
<td> Controls whether the parser is reporting all validity
errors; if true, all external entities will be read.
</td>
</tr>
<tr>
<td>xmlns-uris</td>
<td><em>read/write</em></td>
<td><em>false</em></td>
<td> Controls whether, when the <em>namespace-prefixes</em> feature
is set, the parser treats namespace declaration attributes as
being in the <em>http://www.w3.org/2000/xmlns/</em> namespace.
By default, SAX2 conforms to the original "Namespaces in XML"
Recommendation, which explicitly states that such attributes are
not in any namespace.
Setting this optional flag to "true" makes the SAX2 events conform to
a later backwards-incompatible revision of that recommendation,
placing those attributes in a namespace.
</td>
</tr>
<tr>
<td>xml-1.1</td>
<td><em>read-only</em></td>
<td>not applicable</td>
<td> Returns "true" if the parser supports both XML 1.1 and XML 1.0.
Returns "false" if the parser supports only XML 1.0.
</td>
</tr>
</table>
<p> Support for the default values of the
<em>namespaces</em> and <em>namespace-prefixes</em>
properties is required.
Support for any other feature flags is entirely optional.
</p>
<p> For default values not specified by SAX2,
......@@ -129,6 +253,15 @@ the standard property URIs have the prefix
</tr>
<tr>
<td>document-xml-version</td>
<td> May be examined only during a parse, after the startDocument()
callback has been completed; read-only. This property is a
literal string describing the actual XML version of the document,
such as "1.0" or "1.1".
</td>
</tr>
<tr>
<td>dom-node</td>
<td> For "DOM Walker" style parsers, which ignore their
<em>parser.parse()</em> parameters, this is used to
......@@ -141,7 +274,7 @@ the standard property URIs have the prefix
<tr>
<td>lexical-handler</td>
<td> Used to see some syntax events that are essential in some
applications: comments, CDATA delimeters, selected general
applications: comments, CDATA delimiters, selected general
entity inclusions, and the start and end of the DTD
(and declaration of document element name).
The Object must implement <a href="ext/LexicalHandler.html"
......@@ -161,4 +294,4 @@ the standard property URIs have the prefix
XMLReader implementations need not support them.
</p>
</body></html>
</body></html>
\ No newline at end of file
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
<title>W3C IPR SOFTWARE NOTICE</title>
<style type="text/css">
<!--
html, body { background: #fff; color: #000; } /* body for Windows IE3 */
-->
</style>
</head>
<body>
<h1>
W3C IPR SOFTWARE NOTICE
</h1>
<h3>
Copyright &copy; 2002 <a href="http://www.w3.org/">World Wide Web
Consortium</a>, (<a href="http://www.lcs.mit.edu/">Massachusetts
Institute of Technology</a>, <a href="http://www.inria.fr/">Institut
National de Recherche en Informatique et en Automatique</a>, <a
href="http://www.keio.ac.jp/">Keio University</a>). All Rights
Reserved.
</h3>
<p>
The DOM bindings are published under the W3C Software Copyright Notice
and License. The software license requires "Notice of any changes or
modifications to the W3C files, including the date changes were made."
Consequently, modified versions of the DOM bindings must document that
they do not conform to the W3C standard; in the case of the IDL
definitions, the pragma prefix can no longer be 'w3c.org'; in the case of
the Java language binding, the package names can no longer be in the
'org.w3c' package.
</p>
<p>
<b>Note:</b> The original version of the W3C Software Copyright Notice
and License could be found at <a
href='http://www.w3.org/Consortium/Legal/copyright-software-19980720'>http://www.w3.org/Consortium/Legal/copyright-software-19980720</a>
</p>
<h3>
Copyright &copy; 1994-2002 <a href="http://www.w3.org/">World Wide Web
Consortium</a>, (<a href="http://www.lcs.mit.edu/">Massachusetts
Institute of Technology</a>, <a href="http://www.inria.fr/">Institut
National de Recherche en Informatique et en Automatique</a>, <a
href="http://www.keio.ac.jp/">Keio University</a>). All Rights
Reserved. http://www.w3.org/Consortium/Legal/
</h3>
<p>
This W3C work (including software, documents, or other related items) is
being provided by the copyright holders under the following license. By
obtaining, using and/or copying this work, you (the licensee) agree that
you have read, understood, and will comply with the following terms and
conditions:
</p>
<p>
Permission to use, copy, and modify this software and its documentation,
with or without modification,&nbsp; for any purpose and without fee or
royalty is hereby granted, provided that you include the following on ALL
copies of the software and documentation or portions thereof, including
modifications, that you make:
</p>
<ol>
<li>
The full text of this NOTICE in a location viewable to users of the
redistributed or derivative work.
</li>
<li>
Any pre-existing intellectual property disclaimers, notices, or terms
and conditions. If none exist, a short notice of the following form
(hypertext is preferred, text is permitted) should be used within the
body of any redistributed or derivative code: "Copyright &copy;
[$date-of-software] <a href="http://www.w3.org/">World Wide Web
Consortium</a>, (<a href="http://www.lcs.mit.edu/">Massachusetts
Institute of Technology</a>, <a href="http://www.inria.fr/">Institut
National de Recherche en Informatique et en Automatique</a>, <a
href="http://www.keio.ac.jp/">Keio University</a>). All Rights
Reserved. http://www.w3.org/Consortium/Legal/"
</li>
<li>
Notice of any changes or modifications to the W3C files, including the
date changes were made. (We recommend you provide URIs to the location
from which the code is derived.)
</li>
</ol>
<p>
THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT
HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS
FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE OR
DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS,
TRADEMARKS OR OTHER RIGHTS.
</p>
<p>
COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR
DOCUMENTATION.
</p>
<p>
The name and trademarks of copyright holders may NOT be used in
advertising or publicity pertaining to the software without specific,
written prior permission. Title to copyright in this software and any
associated documentation will at all times remain with copyright
holders.
</p>
</body>
</html>
## Process this file with automake to produce Makefile.in.
AUTOMAKE_OPTIONS = foreign subdir-objects
## The compiler with whatever flags we want for both -c and -C
## compiles.
GCJ_WITH_FLAGS = $(GCJ) --encoding=UTF-8 -Wno-deprecated -fbootclasspath=$(BOOTCLASSPATH)
BOOTCLASSPATH = $(here)'$(CLASSPATH_SEPARATOR)'$(srcdir)'$(CLASSPATH_SEPARATOR)'$(top_srcdir)'$(CLASSPATH_SEPARATOR)'$(top_builddir)
AM_GCJFLAGS = \
-B$(top_builddir) \
@LIBGCJ_JAVAFLAGS@ \
-fclasspath= -fbootclasspath=$(BOOTCLASSPATH) \
--encoding=UTF-8 \
-Wno-deprecated
all-local: classes.stamp
classes.stamp: $(libw3c_convenience_la_SOURCES)
here=`pwd`; cd $(srcdir); \
$(GCJ_WITH_FLAGS) -C -d $$here $(libw3c_convenience_la_SOURCES)
echo > classes.stamp
mostlyclean-local:
find . -name '*.class' | xargs rm
rm classes.stamp
noinst_LTLIBRARIES = libw3c_convenience.la
libw3c_convenience_la_SOURCES = \
org/w3c/dom/xpath/XPathNamespace.java \
org/w3c/dom/xpath/XPathResult.java \
org/w3c/dom/xpath/XPathException.java \
org/w3c/dom/xpath/XPathExpression.java \
org/w3c/dom/xpath/XPathNSResolver.java \
org/w3c/dom/xpath/XPathEvaluator.java \
org/w3c/dom/DOMException.java \
org/w3c/dom/Comment.java \
org/w3c/dom/stylesheets/DocumentStyle.java \
org/w3c/dom/stylesheets/MediaList.java \
org/w3c/dom/stylesheets/LinkStyle.java \
org/w3c/dom/stylesheets/StyleSheet.java \
org/w3c/dom/stylesheets/StyleSheetList.java \
org/w3c/dom/Attr.java \
org/w3c/dom/Notation.java \
org/w3c/dom/TypeInfo.java \
org/w3c/dom/html2/HTMLIsIndexElement.java \
org/w3c/dom/html2/HTMLTableColElement.java \
org/w3c/dom/html2/HTMLLinkElement.java \
org/w3c/dom/html2/HTMLTitleElement.java \
org/w3c/dom/html2/HTMLBRElement.java \
org/w3c/dom/html2/HTMLHeadElement.java \
org/w3c/dom/html2/HTMLHtmlElement.java \
org/w3c/dom/html2/HTMLScriptElement.java \
org/w3c/dom/html2/HTMLTableRowElement.java \
org/w3c/dom/html2/HTMLOptionsCollection.java \
org/w3c/dom/html2/HTMLTableCellElement.java \
org/w3c/dom/html2/HTMLDListElement.java \
org/w3c/dom/html2/HTMLFieldSetElement.java \
org/w3c/dom/html2/HTMLImageElement.java \
org/w3c/dom/html2/HTMLHRElement.java \
org/w3c/dom/html2/HTMLModElement.java \
org/w3c/dom/html2/HTMLHeadingElement.java \
org/w3c/dom/html2/HTMLTableElement.java \
org/w3c/dom/html2/HTMLAreaElement.java \
org/w3c/dom/html2/HTMLOptGroupElement.java \
org/w3c/dom/html2/HTMLIFrameElement.java \
org/w3c/dom/html2/HTMLDirectoryElement.java \
org/w3c/dom/html2/HTMLParamElement.java \
org/w3c/dom/html2/HTMLLegendElement.java \
org/w3c/dom/html2/HTMLFrameElement.java \
org/w3c/dom/html2/HTMLFormElement.java \
org/w3c/dom/html2/HTMLStyleElement.java \
org/w3c/dom/html2/HTMLFrameSetElement.java \
org/w3c/dom/html2/HTMLCollection.java \
org/w3c/dom/html2/HTMLAnchorElement.java \
org/w3c/dom/html2/HTMLLabelElement.java \
org/w3c/dom/html2/HTMLBodyElement.java \
org/w3c/dom/html2/HTMLOptionElement.java \
org/w3c/dom/html2/HTMLTableSectionElement.java \
org/w3c/dom/html2/HTMLAppletElement.java \
org/w3c/dom/html2/HTMLSelectElement.java \
org/w3c/dom/html2/HTMLMetaElement.java \
org/w3c/dom/html2/HTMLMenuElement.java \
org/w3c/dom/html2/HTMLDivElement.java \
org/w3c/dom/html2/HTMLLIElement.java \
org/w3c/dom/html2/HTMLFontElement.java \
org/w3c/dom/html2/HTMLOListElement.java \
org/w3c/dom/html2/HTMLBaseFontElement.java \
org/w3c/dom/html2/HTMLElement.java \
org/w3c/dom/html2/HTMLTableCaptionElement.java \
org/w3c/dom/html2/HTMLTextAreaElement.java \
org/w3c/dom/html2/HTMLPreElement.java \
org/w3c/dom/html2/HTMLObjectElement.java \
org/w3c/dom/html2/HTMLBaseElement.java \
org/w3c/dom/html2/HTMLUListElement.java \
org/w3c/dom/html2/HTMLMapElement.java \
org/w3c/dom/html2/HTMLParagraphElement.java \
org/w3c/dom/html2/HTMLButtonElement.java \
org/w3c/dom/html2/HTMLQuoteElement.java \
org/w3c/dom/html2/HTMLInputElement.java \
org/w3c/dom/html2/HTMLDocument.java \
org/w3c/dom/ls/LSParser.java \
org/w3c/dom/ls/LSSerializerFilter.java \
org/w3c/dom/ls/LSLoadEvent.java \
org/w3c/dom/ls/DOMImplementationLS.java \
org/w3c/dom/ls/LSException.java \
org/w3c/dom/ls/LSSerializer.java \
org/w3c/dom/ls/LSResourceResolver.java \
org/w3c/dom/ls/LSOutput.java \
org/w3c/dom/ls/LSInput.java \
org/w3c/dom/ls/LSProgressEvent.java \
org/w3c/dom/ls/LSParserFilter.java \
org/w3c/dom/DOMLocator.java \
org/w3c/dom/DOMStringList.java \
org/w3c/dom/DocumentFragment.java \
org/w3c/dom/events/MutationEvent.java \
org/w3c/dom/events/UIEvent.java \
org/w3c/dom/events/EventListener.java \
org/w3c/dom/events/Event.java \
org/w3c/dom/events/MouseEvent.java \
org/w3c/dom/events/EventTarget.java \
org/w3c/dom/events/DocumentEvent.java \
org/w3c/dom/events/EventException.java \
org/w3c/dom/EntityReference.java \
org/w3c/dom/DOMErrorHandler.java \
org/w3c/dom/views/AbstractView.java \
org/w3c/dom/views/DocumentView.java \
org/w3c/dom/DOMError.java \
org/w3c/dom/bootstrap/DOMImplementationRegistry.java \
org/w3c/dom/traversal/TreeWalker.java \
org/w3c/dom/traversal/NodeFilter.java \
org/w3c/dom/traversal/DocumentTraversal.java \
org/w3c/dom/traversal/NodeIterator.java \
org/w3c/dom/CharacterData.java \
org/w3c/dom/DOMConfiguration.java \
org/w3c/dom/css/CSSRule.java \
org/w3c/dom/css/Rect.java \
org/w3c/dom/css/CSSStyleSheet.java \
org/w3c/dom/css/CSSFontFaceRule.java \
org/w3c/dom/css/CSSPrimitiveValue.java \
org/w3c/dom/css/CSSRuleList.java \
org/w3c/dom/css/ViewCSS.java \
org/w3c/dom/css/CSSStyleRule.java \
org/w3c/dom/css/CSSUnknownRule.java \
org/w3c/dom/css/RGBColor.java \
org/w3c/dom/css/ElementCSSInlineStyle.java \
org/w3c/dom/css/CSSMediaRule.java \
org/w3c/dom/css/CSS2Properties.java \
org/w3c/dom/css/CSSValue.java \
org/w3c/dom/css/CSSStyleDeclaration.java \
org/w3c/dom/css/DOMImplementationCSS.java \
org/w3c/dom/css/CSSCharsetRule.java \
org/w3c/dom/css/Counter.java \
org/w3c/dom/css/CSSPageRule.java \
org/w3c/dom/css/DocumentCSS.java \
org/w3c/dom/css/CSSValueList.java \
org/w3c/dom/css/CSSImportRule.java \
org/w3c/dom/NameList.java \
org/w3c/dom/Element.java \
org/w3c/dom/Document.java \
org/w3c/dom/ranges/Range.java \
org/w3c/dom/ranges/RangeException.java \
org/w3c/dom/ranges/DocumentRange.java \
org/w3c/dom/DOMImplementationList.java \
org/w3c/dom/Entity.java \
org/w3c/dom/UserDataHandler.java \
org/w3c/dom/DOMImplementation.java \
org/w3c/dom/CDATASection.java \
org/w3c/dom/ProcessingInstruction.java \
org/w3c/dom/Node.java \
org/w3c/dom/NamedNodeMap.java \
org/w3c/dom/NodeList.java \
org/w3c/dom/Text.java \
org/w3c/dom/DocumentType.java \
org/w3c/dom/DOMImplementationSource.java
Bindings for the Document Object Model (DOM).
DOM is not maintained as part of GNU Classpath, but is used with GNU Classpath.
The packages includes are:
Document Object Model (DOM) Level 3 Core Specification
http://www.w3.org/TR/DOM-Level-3-Core/
(07 April 2004)
Document Object Model (DOM) Level 3 Load and Save Specification
http://www.w3.org/TR/DOM-Level-3-LS/
(07 April 2004)
Document Object Model (DOM) Level 2 Events Specification
http://www.w3.org/TR/DOM-Level-2-Events/
(13 November 2000)
Latest errata: 20021016
Document Object Model (DOM) Level 2 Views Specification
http://www.w3.org/TR/DOM-Level-2-Views/
(13 November 2000)
Latest errata: 20021016
Document Object Model (DOM) Level 2 Style Specification
http://www.w3.org/TR/DOM-Level-2-Style/
(13 November 2000)
Latest errata: 20021016
Document Object Model (DOM) Level 2 Traversal and Range Specification
http://www.w3.org/TR/DOM-Level-2-Traversal-Range/
(13 November 2000)
Latest errata: 20021016
Document Object Model (DOM) Level 2 HTML Specification
http://www.w3.org/TR/DOM-Level-2-HTML/
(09 January 2003)
Document Object Model (DOM) Level 3 XPath Specification
http://www.w3.org/TR/DOM-Level-3-XPath/
(26 February 2004)
Errata can be found at:
http://www.w3.org/2000/11/DOM-Level-2-errata
http://www.w3.org/2004/01/DOM-Level-3-errata
The only change to the sources is setting the additional fallback for
org.w3c.dom.bootstrap.DOMImplementationRegistry.newInstance() to
gnu.xml.dom.ImplementationSource.
When importing new versions don't forget to update the Makefile.am
to list any new files (or to remove old ones).
All files are distributed under the following
W3C Software Short Notice:
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
Permission to copy, modify, and distribute this software and its
documentation, with or without modification, for any purpose and
without fee or royalty is hereby granted, provided that you include
the following on ALL copies of the software and documentation or
portions thereof, including modifications:
1. The full text of this NOTICE in a location viewable to users of
the redistributed or derivative work.
2. Any pre-existing intellectual property disclaimers, notices, or
terms and conditions. If none exist, the W3C Software Short Notice
should be included (hypertext is preferred, text is permitted) within
the body of any redistributed or derivative code.
3. Notice of any changes or modifications to the files, including
the date changes were made. (We recommend you provide URIs to the
location from which the code is derived.)
THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT
HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS
FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE OR
DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS,
TRADEMARKS OR OTHER RIGHTS.
COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL
OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR
DOCUMENTATION.
The name and trademarks of copyright holders may NOT be used in
advertising or publicity pertaining to the software without specific,
written prior permission. Title to copyright in this software and any
associated documentation will at all times remain with copyright
holders.
/*
* 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 "]]&gt;" 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.
* <p>The <code>CharacterData.data</code> attribute holds the text that is
* contained by the CDATA section. Note that this <em>may</em> 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.
* <p>The <code>CDATASection</code> interface inherits from the
* <code>CharacterData</code> interface through the <code>Text</code>
* interface. Adjacent <code>CDATASection</code> nodes are not merged by use
* of the <code>normalize</code> method of the <code>Node</code> interface.
* <p> No lexical check is done on the content of a CDATA section and it is
* therefore possible to have the character sequence <code>"]]&gt;"</code>
* in the content, which is illegal in a CDATA section per section 2.7 of [<a href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>]. 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 <code>"split-cdata-sections"</code>
* in the <code>DOMConfiguration</code> interface).
* <p ><b>Note:</b> Because no markup is recognized within a
* <code>CDATASection</code>, character numeric references cannot be used as
* an escape mechanism when serializing. Therefore, action needs to be taken
* when serializing a <code>CDATASection</code> with a character encoding
* where some of the contained characters cannot be represented. Failure to
* do so would not produce well-formed XML.
* <p ><b>Note:</b> 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.
* <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>Document Object Model (DOM) Level 3 Core Specification</a>.
*/
public interface CDATASection extends Text {
}
/*
* 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 <code>CharacterData</code> and represents the
* content of a comment, i.e., all the characters between the starting '
* <code>&lt;!--</code>' and ending '<code>--&gt;</code>'. 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.
* <p> No lexical check is done on the content of a comment and it is
* therefore possible to have the character sequence <code>"--"</code>
* (double-hyphen) in the content, which is illegal in a comment per section
* 2.5 of [<a href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>]. The
* presence of this character sequence must generate a fatal error during
* serialization.
* <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>Document Object Model (DOM) Level 3 Core Specification</a>.
*/
public interface Comment extends CharacterData {
}
/*
* 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;
/**
* <code>DOMError</code> is an interface that describes an error.
* <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>Document Object Model (DOM) Level 3 Core Specification</a>.
* @since DOM Level 3
*/
public interface DOMError {
// ErrorSeverity
/**
* The severity of the error described by the <code>DOMError</code> is
* warning. A <code>SEVERITY_WARNING</code> will not cause the
* processing to stop, unless <code>DOMErrorHandler.handleError()</code>
* returns <code>false</code>.
*/
public static final short SEVERITY_WARNING = 1;
/**
* The severity of the error described by the <code>DOMError</code> is
* error. A <code>SEVERITY_ERROR</code> may not cause the processing to
* stop if the error can be recovered, unless
* <code>DOMErrorHandler.handleError()</code> returns <code>false</code>.
*/
public static final short SEVERITY_ERROR = 2;
/**
* The severity of the error described by the <code>DOMError</code> is
* fatal error. A <code>SEVERITY_FATAL_ERROR</code> will cause the
* normal processing to stop. The return value of
* <code>DOMErrorHandler.handleError()</code> 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 <code>SEVERITY_WARNING</code>,
* <code>SEVERITY_ERROR</code>, or <code>SEVERITY_FATAL_ERROR</code>.
*/
public short getSeverity();
/**
* An implementation specific string describing the error that occurred.
*/
public String getMessage();
/**
* A <code>DOMString</code> indicating which related data is expected in
* <code>relatedData</code>. Users should refer to the specification of
* the error in order to find its <code>DOMString</code> type and
* <code>relatedData</code> definitions if any.
* <p ><b>Note:</b> As an example,
* <code>Document.normalizeDocument()</code> does generate warnings when
* the "split-cdata-sections" parameter is in use. Therefore, the method
* generates a <code>SEVERITY_WARNING</code> with <code>type</code>
* <code>"cdata-sections-splitted"</code> and the first
* <code>CDATASection</code> node in document order resulting from the
* split is returned by the <code>relatedData</code> attribute.
*/
public String getType();
/**
* The related platform dependent exception if any.
*/
public Object getRelatedException();
/**
* The related <code>DOMError.type</code> dependent data if any.
*/
public Object getRelatedData();
/**
* The location of the error.
*/
public DOMLocator getLocation();
}
/*
* 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;
/**
* <code>DOMErrorHandler</code> 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 <code>DOMErrorHandler</code> object can be attached to a
* <code>Document</code> using the "error-handler" on the
* <code>DOMConfiguration</code> 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.
* <p> The application that is using the DOM implementation is expected to
* implement this interface.
* <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>Document Object Model (DOM) Level 3 Core Specification</a>.
* @since DOM Level 3
*/
public interface DOMErrorHandler {
/**
* This method is called on the error handler when an error occurs.
* <br> If an exception is thrown from this method, it is considered to be
* equivalent of returning <code>true</code>.
* @param error The error object that describes the error. This object
* may be reused by the DOM implementation across multiple calls to
* the <code>handleError</code> method.
* @return If the <code>handleError</code> method returns
* <code>false</code>, the DOM implementation should stop the current
* processing when possible. If the method returns <code>true</code>,
* the processing may continue depending on
* <code>DOMError.severity</code>.
*/
public boolean handleError(DOMError error);
}
/*
* 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 <code>DOMImplementation</code> interface provides a number of methods
* for performing operations that are independent of any particular instance
* of the document object model.
* <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>Document Object Model (DOM) Level 3 Core Specification</a>.
*/
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 <code>true</code> if the feature is implemented in the
* specified version, <code>false</code> otherwise.
*/
public boolean hasFeature(String feature,
String version);
/**
* Creates an empty <code>DocumentType</code> 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 <code>DocumentType</code> node with
* <code>Node.ownerDocument</code> set to <code>null</code>.
* @exception DOMException
* INVALID_CHARACTER_ERR: Raised if the specified qualified name is not
* an XML name according to [<a href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>].
* <br>NAMESPACE_ERR: Raised if the <code>qualifiedName</code> is
* malformed.
* <br>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 [<a href='http://www.w3.org/TR/1999/REC-html401-19991224/'>HTML 4.01</a>]).
* @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.
* <br>Note that based on the <code>DocumentType</code> given to create
* the document, the implementation may instantiate specialized
* <code>Document</code> objects that support additional features than
* the "Core", such as "HTML" [<a href='http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109'>DOM Level 2 HTML</a>]
* . On the other hand, setting the <code>DocumentType</code> after the
* document was created makes this very unlikely to happen.
* Alternatively, specialized <code>Document</code> creation methods,
* such as <code>createHTMLDocument</code> [<a href='http://www.w3.org/TR/2003/REC-DOM-Level-2-HTML-20030109'>DOM Level 2 HTML</a>]
* , can be used to obtain specific types of <code>Document</code>
* objects.
* @param namespaceURI The namespace URI of the document element to
* create or <code>null</code>.
* @param qualifiedName The qualified name of the document element to be
* created or <code>null</code>.
* @param doctype The type of document to be created or <code>null</code>.
* When <code>doctype</code> is not <code>null</code>, its
* <code>Node.ownerDocument</code> attribute is set to the document
* being created.
* @return A new <code>Document</code> object with its document element.
* If the <code>NamespaceURI</code>, <code>qualifiedName</code>, and
* <code>doctype</code> are <code>null</code>, the returned
* <code>Document</code> is empty with no document element.
* @exception DOMException
* INVALID_CHARACTER_ERR: Raised if the specified qualified name is not
* an XML name according to [<a href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>].
* <br>NAMESPACE_ERR: Raised if the <code>qualifiedName</code> is
* malformed, if the <code>qualifiedName</code> has a prefix and the
* <code>namespaceURI</code> is <code>null</code>, or if the
* <code>qualifiedName</code> is <code>null</code> and the
* <code>namespaceURI</code> is different from <code>null</code>, or
* if the <code>qualifiedName</code> has a prefix that is "xml" and
* the <code>namespaceURI</code> is different from "<a href='http://www.w3.org/XML/1998/namespace'>
* http://www.w3.org/XML/1998/namespace</a>" [<a href='http://www.w3.org/TR/1999/REC-xml-names-19990114/'>XML Namespaces</a>]
* , or if the DOM implementation does not support the
* <code>"XML"</code> feature but a non-null namespace URI was
* provided, since namespaces were defined by XML.
* <br>WRONG_DOCUMENT_ERR: Raised if <code>doctype</code> has already
* been used with a different document or was created from a different
* implementation.
* <br>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 [<a href='http://www.w3.org/TR/1999/REC-html401-19991224/'>HTML 4.01</a>]).
* @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
* <code>DOMImplementation</code> 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 <code>null</code> if
* there is no object which implements interfaces associated with that
* feature. If the <code>DOMObject</code> returned by this method
* implements the <code>DOMImplementation</code> interface, it must
* delegate to the primary core <code>DOMImplementation</code> and not
* return results inconsistent with the primary core
* <code>DOMImplementation</code> such as <code>hasFeature</code>,
* <code>getFeature</code>, etc.
* @since DOM Level 3
*/
public Object getFeature(String feature,
String version);
}
/*
* 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 <code>DOMImplementationList</code> interface provides the abstraction
* of an ordered collection of DOM implementations, without defining or
* constraining how this collection is implemented. The items in the
* <code>DOMImplementationList</code> are accessible via an integral index,
* starting from 0.
* <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>Document Object Model (DOM) Level 3 Core Specification</a>.
* @since DOM Level 3
*/
public interface DOMImplementationList {
/**
* Returns the <code>index</code>th item in the collection. If
* <code>index</code> is greater than or equal to the number of
* <code>DOMImplementation</code>s in the list, this returns
* <code>null</code>.
* @param index Index into the collection.
* @return The <code>DOMImplementation</code> at the <code>index</code>
* th position in the <code>DOMImplementationList</code>, or
* <code>null</code> if that is not a valid index.
*/
public DOMImplementation item(int index);
/**
* The number of <code>DOMImplementation</code>s in the list. The range
* of valid child node indices is 0 to <code>length-1</code> inclusive.
*/
public int getLength();
}
/*
* 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 <code>DOMImplementationSource</code> object is
* listed in the binding-specific list of available sources so that its
* <code>DOMImplementation</code> objects are made available.
* <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>Document Object Model (DOM) Level 3 Core Specification</a>.
* @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 <code>getDOMImplementationList</code>. As an example,
* the string <code>"XML 3.0 Traversal +Events 2.0"</code> 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
* <code>Node.getFeature()</code> and
* <code>DOMImplementation.getFeature()</code>.
* @return The first DOM implementation that support the desired
* features, or <code>null</code> 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);
}
/*
* 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;
/**
* <code>DOMLocator</code> is an interface that describes a location (e.g.
* where an error occurred).
* <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>Document Object Model (DOM) Level 3 Core Specification</a>.
* @since DOM Level 3
*/
public interface DOMLocator {
/**
* The line number this locator is pointing to, or <code>-1</code> if
* there is no column number available.
*/
public int getLineNumber();
/**
* The column number this locator is pointing to, or <code>-1</code> if
* there is no column number available.
*/
public int getColumnNumber();
/**
* The byte offset into the input source this locator is pointing to or
* <code>-1</code> 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
* <code>-1</code> if there is no UTF-16 offset available.
*/
public int getUtf16Offset();
/**
* The node this locator is pointing to, or <code>null</code> if no node
* is available.
*/
public Node getRelatedNode();
/**
* The URI this locator is pointing to, or <code>null</code> if no URI is
* available.
*/
public String getUri();
}
/*
* 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 <code>DOMStringList</code> interface provides the abstraction of an
* ordered collection of <code>DOMString</code> values, without defining or
* constraining how this collection is implemented. The items in the
* <code>DOMStringList</code> are accessible via an integral index, starting
* from 0.
* <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>Document Object Model (DOM) Level 3 Core Specification</a>.
* @since DOM Level 3
*/
public interface DOMStringList {
/**
* Returns the <code>index</code>th item in the collection. If
* <code>index</code> is greater than or equal to the number of
* <code>DOMString</code>s in the list, this returns <code>null</code>.
* @param index Index into the collection.
* @return The <code>DOMString</code> at the <code>index</code>th
* position in the <code>DOMStringList</code>, or <code>null</code> if
* that is not a valid index.
*/
public String item(int index);
/**
* The number of <code>DOMString</code>s in the list. The range of valid
* child node indices is 0 to <code>length-1</code> inclusive.
*/
public int getLength();
/**
* Test if a string is part of this <code>DOMStringList</code>.
* @param str The string to look for.
* @return <code>true</code> if the string has been found,
* <code>false</code> otherwise.
*/
public boolean contains(String str);
}
/*
* 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;
/**
* <code>DocumentFragment</code> is a "lightweight" or "minimal"
* <code>Document</code> 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 <code>Document</code> object could
* fulfill this role, a <code>Document</code> object can potentially be a
* heavyweight object, depending on the underlying implementation. What is
* really needed for this is a very lightweight object.
* <code>DocumentFragment</code> is such an object.
* <p>Furthermore, various operations -- such as inserting nodes as children
* of another <code>Node</code> -- may take <code>DocumentFragment</code>
* objects as arguments; this results in all the child nodes of the
* <code>DocumentFragment</code> being moved to the child list of this node.
* <p>The children of a <code>DocumentFragment</code> node are zero or more
* nodes representing the tops of any sub-trees defining the structure of
* the document. <code>DocumentFragment</code> 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 <code>DocumentFragment</code> might have only one
* child and that child node could be a <code>Text</code> node. Such a
* structure model represents neither an HTML document nor a well-formed XML
* document.
* <p>When a <code>DocumentFragment</code> is inserted into a
* <code>Document</code> (or indeed any other <code>Node</code> that may
* take children) the children of the <code>DocumentFragment</code> and not
* the <code>DocumentFragment</code> itself are inserted into the
* <code>Node</code>. This makes the <code>DocumentFragment</code> very
* useful when the user wishes to create nodes that are siblings; the
* <code>DocumentFragment</code> acts as the parent of these nodes so that
* the user can use the standard methods from the <code>Node</code>
* interface, such as <code>insertBefore</code> and <code>appendChild</code>.
* <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113'>Document Object Model (DOM) Level 2 Core Specification</a>.
*/
public interface DocumentFragment extends Node {
}
/*
* 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;
/**
* <code>DocumentFragment</code> is a "lightweight" or "minimal"
* <code>Document</code> 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 <code>Document</code> object could
* fulfill this role, a <code>Document</code> object can potentially be a
* heavyweight object, depending on the underlying implementation. What is
* really needed for this is a very lightweight object.
* <code>DocumentFragment</code> is such an object.
* <p>Furthermore, various operations -- such as inserting nodes as children
* of another <code>Node</code> -- may take <code>DocumentFragment</code>
* objects as arguments; this results in all the child nodes of the
* <code>DocumentFragment</code> being moved to the child list of this node.
* <p>The children of a <code>DocumentFragment</code> node are zero or more
* nodes representing the tops of any sub-trees defining the structure of
* the document. <code>DocumentFragment</code> 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 <code>DocumentFragment</code> might have only one
* child and that child node could be a <code>Text</code> node. Such a
* structure model represents neither an HTML document nor a well-formed XML
* document.
* <p>When a <code>DocumentFragment</code> is inserted into a
* <code>Document</code> (or indeed any other <code>Node</code> that may
* take children) the children of the <code>DocumentFragment</code> and not
* the <code>DocumentFragment</code> itself are inserted into the
* <code>Node</code>. This makes the <code>DocumentFragment</code> very
* useful when the user wishes to create nodes that are siblings; the
* <code>DocumentFragment</code> acts as the parent of these nodes so that
* the user can use the standard methods from the <code>Node</code>
* interface, such as <code>Node.insertBefore</code> and
* <code>Node.appendChild</code>.
* <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>Document Object Model (DOM) Level 3 Core Specification</a>.
*/
public interface DocumentFragment extends Node {
}
/*
* 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;
/**
* Each <code>Document</code> has a <code>doctype</code> attribute whose value
* is either <code>null</code> or a <code>DocumentType</code> object. The
* <code>DocumentType</code> 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.
* <p>The DOM Level 2 doesn't support editing <code>DocumentType</code> nodes.
* <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113'>Document Object Model (DOM) Level 2 Core Specification</a>.
*/
public interface DocumentType extends Node {
/**
* The name of DTD; i.e., the name immediately following the
* <code>DOCTYPE</code> keyword.
*/
public String getName();
/**
* A <code>NamedNodeMap</code> containing the general entities, both
* external and internal, declared in the DTD. Parameter entities are
* not contained. Duplicates are discarded. For example in:
* <pre>&lt;!DOCTYPE
* ex SYSTEM "ex.dtd" [ &lt;!ENTITY foo "foo"&gt; &lt;!ENTITY bar
* "bar"&gt; &lt;!ENTITY bar "bar2"&gt; &lt;!ENTITY % baz "baz"&gt;
* ]&gt; &lt;ex/&gt;</pre>
* the interface provides access to <code>foo</code>
* and the first declaration of <code>bar</code> but not the second
* declaration of <code>bar</code> or <code>baz</code>. Every node in
* this map also implements the <code>Entity</code> interface.
* <br>The DOM Level 2 does not support editing entities, therefore
* <code>entities</code> cannot be altered in any way.
*/
public NamedNodeMap getEntities();
/**
* A <code>NamedNodeMap</code> containing the notations declared in the
* DTD. Duplicates are discarded. Every node in this map also implements
* the <code>Notation</code> interface.
* <br>The DOM Level 2 does not support editing notations, therefore
* <code>notations</code> 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.
* @since DOM Level 2
*/
public String getSystemId();
/**
* The internal subset as a string.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();
}
/*
* 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 <code>Document</code> has a <code>doctype</code> attribute whose value
* is either <code>null</code> or a <code>DocumentType</code> object. The
* <code>DocumentType</code> 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.
* <p>DOM Level 3 doesn't support editing <code>DocumentType</code> nodes.
* <code>DocumentType</code> nodes are read-only.
* <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>Document Object Model (DOM) Level 3 Core Specification</a>.
*/
public interface DocumentType extends Node {
/**
* The name of DTD; i.e., the name immediately following the
* <code>DOCTYPE</code> keyword.
*/
public String getName();
/**
* A <code>NamedNodeMap</code> containing the general entities, both
* external and internal, declared in the DTD. Parameter entities are
* not contained. Duplicates are discarded. For example in:
* <pre>&lt;!DOCTYPE
* ex SYSTEM "ex.dtd" [ &lt;!ENTITY foo "foo"&gt; &lt;!ENTITY bar
* "bar"&gt; &lt;!ENTITY bar "bar2"&gt; &lt;!ENTITY % baz "baz"&gt;
* ]&gt; &lt;ex/&gt;</pre>
* the interface provides access to <code>foo</code>
* and the first declaration of <code>bar</code> but not the second
* declaration of <code>bar</code> or <code>baz</code>. Every node in
* this map also implements the <code>Entity</code> interface.
* <br>The DOM Level 2 does not support editing entities, therefore
* <code>entities</code> cannot be altered in any way.
*/
public NamedNodeMap getEntities();
/**
* A <code>NamedNodeMap</code> containing the notations declared in the
* DTD. Duplicates are discarded. Every node in this map also implements
* the <code>Notation</code> interface.
* <br>The DOM Level 2 does not support editing notations, therefore
* <code>notations</code> 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 <code>null</code> if there is none.
* This is does not contain the delimiting square brackets.
* <p ><b>Note:</b> 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();
}
/*
* 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 <em>not</em> the entity declaration.
* <p>The <code>nodeName</code> attribute that is inherited from
* <code>Node</code> contains the name of the entity.
* <p>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
* <code>EntityReference</code> nodes in the document tree.
* <p>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 <a href='http://www.w3.org/TR/2004/REC-xml-20040204#intern-replacement'>
* replacement text</a> is available, the corresponding <code>Entity</code> node's child list
* represents the structure of that replacement value. Otherwise, the child
* list is empty.
* <p>DOM Level 3 does not support editing <code>Entity</code> nodes; if a
* user wants to make changes to the contents of an <code>Entity</code>,
* every related <code>EntityReference</code> node has to be replaced in the
* structure model by a clone of the <code>Entity</code>'s contents, and
* then the desired changes must be made to each of those clones instead.
* <code>Entity</code> nodes and all their descendants are readonly.
* <p>An <code>Entity</code> node does not have any parent.
* <p ><b>Note:</b> If the entity contains an unbound namespace prefix, the
* <code>namespaceURI</code> of the corresponding node in the
* <code>Entity</code> node subtree is <code>null</code>. The same is true
* for <code>EntityReference</code> nodes that refer to this entity, when
* they are created using the <code>createEntityReference</code> method of
* the <code>Document</code> interface.
* <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>Document Object Model (DOM) Level 3 Core Specification</a>.
*/
public interface Entity extends Node {
/**
* The public identifier associated with the entity if specified, and
* <code>null</code> otherwise.
*/
public String getPublicId();
/**
* The system identifier associated with the entity if specified, and
* <code>null</code> 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 <code>null</code>.
*/
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
* <code>null</code> 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
* <code>null</code> 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
* <code>null</code> otherwise.
* @since DOM Level 3
*/
public String getXmlVersion();
}
/*
* 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;
/**
* <code>EntityReference</code> 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
* <code>Document</code>, instead of providing <code>EntityReference</code>
* nodes. If it does provide such nodes, then for an
* <code>EntityReference</code> node that represents a reference to a known
* entity an <code>Entity</code> exists, and the subtree of the
* <code>EntityReference</code> node is a copy of the <code>Entity</code>
* 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 <code>EntityReference</code> node may be bound to different namespace
* URIs. When an <code>EntityReference</code> node represents a reference to
* an unknown entity, the node has no children and its replacement value,
* when used by <code>Attr.value</code> for example, is empty.
* <p>As for <code>Entity</code> nodes, <code>EntityReference</code> nodes and
* all their descendants are readonly.
* <p ><b>Note:</b> <code>EntityReference</code> 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.
* <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>Document Object Model (DOM) Level 3 Core Specification</a>.
*/
public interface EntityReference extends Node {
}
/*
* 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 <code>NameList</code> 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 <code>NameList</code> are accessible via an
* integral index, starting from 0.
* <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>Document Object Model (DOM) Level 3 Core Specification</a>.
* @since DOM Level 3
*/
public interface NameList {
/**
* Returns the <code>index</code>th name item in the collection.
* @param index Index into the collection.
* @return The name at the <code>index</code>th position in the
* <code>NameList</code>, or <code>null</code> if there is no name for
* the specified index or if the index is out of range.
*/
public String getName(int index);
/**
* Returns the <code>index</code>th namespaceURI item in the collection.
* @param index Index into the collection.
* @return The namespace URI at the <code>index</code>th position in the
* <code>NameList</code>, or <code>null</code> 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 <code>length-1</code> inclusive.
*/
public int getLength();
/**
* Test if a name is part of this <code>NameList</code>.
* @param str The name to look for.
* @return <code>true</code> if the name has been found,
* <code>false</code> otherwise.
*/
public boolean contains(String str);
/**
* Test if the pair namespaceURI/name is part of this
* <code>NameList</code>.
* @param namespaceURI The namespace URI to look for.
* @param name The name to look for.
* @return <code>true</code> if the pair namespaceURI/name has been
* found, <code>false</code> otherwise.
*/
public boolean containsNS(String namespaceURI,
String name);
}
/*
* 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;
/**
* The <code>NodeList</code> interface provides the abstraction of an ordered
* collection of nodes, without defining or constraining how this collection
* is implemented. <code>NodeList</code> objects in the DOM are live.
* <p>The items in the <code>NodeList</code> are accessible via an integral
* index, starting from 0.
* <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113'>Document Object Model (DOM) Level 2 Core Specification</a>.
*/
public interface NodeList {
/**
* Returns the <code>index</code>th item in the collection. If
* <code>index</code> is greater than or equal to the number of nodes in
* the list, this returns <code>null</code>.
* @param indexIndex into the collection.
* @return The node at the <code>index</code>th position in the
* <code>NodeList</code>, or <code>null</code> 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 <code>length-1</code> inclusive.
*/
public int getLength();
}
/*
* 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 <code>NodeList</code> interface provides the abstraction of an ordered
* collection of nodes, without defining or constraining how this collection
* is implemented. <code>NodeList</code> objects in the DOM are live.
* <p>The items in the <code>NodeList</code> are accessible via an integral
* index, starting from 0.
* <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>Document Object Model (DOM) Level 3 Core Specification</a>.
*/
public interface NodeList {
/**
* Returns the <code>index</code>th item in the collection. If
* <code>index</code> is greater than or equal to the number of nodes in
* the list, this returns <code>null</code>.
* @param index Index into the collection.
* @return The node at the <code>index</code>th position in the
* <code>NodeList</code>, or <code>null</code> 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 <code>length-1</code> inclusive.
*/
public int getLength();
}
/*
* 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 <a href='http://www.w3.org/TR/2004/REC-xml-20040204#Notations'>section 4.7</a> of the XML 1.0 specification [<a href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>]), or is
* used for formal declaration of processing instruction targets (see <a href='http://www.w3.org/TR/2004/REC-xml-20040204#sec-pi'>section 2.6</a> of the XML 1.0 specification [<a href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>]). The
* <code>nodeName</code> attribute inherited from <code>Node</code> is set
* to the declared name of the notation.
* <p>The DOM Core does not support editing <code>Notation</code> nodes; they
* are therefore readonly.
* <p>A <code>Notation</code> node does not have any parent.
* <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>Document Object Model (DOM) Level 3 Core Specification</a>.
*/
public interface Notation extends Node {
/**
* The public identifier of this notation. If the public identifier was
* not specified, this is <code>null</code>.
*/
public String getPublicId();
/**
* The system identifier of this notation. If the system identifier was
* not specified, this is <code>null</code>. This may be an absolute URI
* or not.
*/
public String getSystemId();
}
/*
* 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;
/**
* The <code>ProcessingInstruction</code> interface represents a "processing
* instruction", used in XML as a way to keep processor-specific information
* in the text of the document.
* <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113'>Document Object Model (DOM) Level 2 Core Specification</a>.
*/
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 <code>?&gt;</code>.
* @exception DOMException
* NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
*/
public String getData();
public void setData(String data)
throws DOMException;
}
/*
* 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 <code>ProcessingInstruction</code> interface represents a "processing
* instruction", used in XML as a way to keep processor-specific information
* in the text of the document.
* <p> No lexical check is done on the content of a processing instruction and
* it is therefore possible to have the character sequence
* <code>"?&gt;"</code> in the content, which is illegal a processing
* instruction per section 2.6 of [<a href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>]. The
* presence of this character sequence must generate a fatal error during
* serialization.
* <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>Document Object Model (DOM) Level 3 Core Specification</a>.
*/
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 <code>?&gt;</code>.
*/
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 <code>?&gt;</code>.
* @exception DOMException
* NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
*/
public void setData(String data)
throws DOMException;
}
/*
* 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 <code>Text</code> interface inherits from <code>CharacterData</code>
* and represents the textual content (termed <a href='http://www.w3.org/TR/2004/REC-xml-20040204#syntax'>character data</a> in XML) of an <code>Element</code> or <code>Attr</code>. If there is no
* markup inside an element's content, the text is contained in a single
* object implementing the <code>Text</code> interface that is the only
* child of the element. If there is markup, it is parsed into the
* information items (elements, comments, etc.) and <code>Text</code> nodes
* that form the list of children of the element.
* <p>When a document is first made available via the DOM, there is only one
* <code>Text</code> node for each block of text. Users may create adjacent
* <code>Text</code> 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
* <code>Node.normalize()</code> method merges any such adjacent
* <code>Text</code> objects into a single node for each block of text.
* <p> No lexical check is done on the content of a <code>Text</code> node
* and, depending on its position in the document, some characters must be
* escaped during serialization using character references; e.g. the
* characters "&lt;&amp;" if the textual content is part of an element or of
* an attribute, the character sequence "]]&gt;" when part of an element,
* the quotation mark character " or the apostrophe character ' when part of
* an attribute.
* <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>Document Object Model (DOM) Level 3 Core Specification</a>.
*/
public interface Text extends CharacterData {
/**
* Breaks this node into two nodes at the specified <code>offset</code>,
* keeping both in the tree as siblings. After being split, this node
* will contain all the content up to the <code>offset</code> point. A
* new node of the same type, which contains all the content at and
* after the <code>offset</code> 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 <code>offset</code> 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
* <code>0</code>.
* @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 <code>data</code>.
* <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
*/
public Text splitText(int offset)
throws DOMException;
/**
* Returns whether this text node contains <a href='http://www.w3.org/TR/2004/REC-xml-infoset-20040204#infoitem.character'>
* element content whitespace</a>, 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
* <code>Document.normalizeDocument()</code>.
* @since DOM Level 3
*/
public boolean isElementContentWhitespace();
/**
* Returns all text of <code>Text</code> nodes logically-adjacent text
* nodes to this node, concatenated in document order.
* <br>For instance, in the example below <code>wholeText</code> on the
* <code>Text</code> node that contains "bar" returns "barfoo", while on
* the <code>Text</code> 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.
* <br>This method returns the node which received the replacement text.
* The returned node is:
* <ul>
* <li><code>null</code>, when the replacement text is
* the empty string;
* </li>
* <li>the current node, except when the current node is
* read-only;
* </li>
* <li> a new <code>Text</code> node of the same type (
* <code>Text</code> or <code>CDATASection</code>) as the current node
* inserted at the location of the replacement.
* </li>
* </ul>
* <br>For instance, in the above example calling
* <code>replaceWholeText</code> on the <code>Text</code> node that
* contains "bar" with "yo" in argument results in the following:
* <br>Where the nodes to be removed are read-only descendants of an
* <code>EntityReference</code>, the <code>EntityReference</code> must
* be removed instead of the read-only nodes. If any
* <code>EntityReference</code> to be removed has descendants that are
* not <code>EntityReference</code>, <code>Text</code>, or
* <code>CDATASection</code> nodes, the <code>replaceWholeText</code>
* method must fail before performing any modification of the document,
* raising a <code>DOMException</code> with the code
* <code>NO_MODIFICATION_ALLOWED_ERR</code>.
* <br>For instance, in the example below calling
* <code>replaceWholeText</code> on the <code>Text</code> node that
* contains "bar" fails, because the <code>EntityReference</code> node
* "ent" contains an <code>Element</code> node which cannot be removed.
* @param content The content of the replacing <code>Text</code> node.
* @return The <code>Text</code> node created with the specified content.
* @exception DOMException
* NO_MODIFICATION_ALLOWED_ERR: Raised if one of the <code>Text</code>
* nodes being replaced is readonly.
* @since DOM Level 3
*/
public Text replaceWholeText(String content)
throws DOMException;
}
/*
* 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 <code>TypeInfo</code> interface represents a type referenced from
* <code>Element</code> or <code>Attr</code> 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.
* <p> If the document's schema is an XML DTD [<a href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>], the values
* are computed as follows:
* <ul>
* <li> If this type is referenced from an
* <code>Attr</code> node, <code>typeNamespace</code> is
* <code>"http://www.w3.org/TR/REC-xml"</code> and <code>typeName</code>
* represents the <b>[attribute type]</b> property in the [<a href='http://www.w3.org/TR/2004/REC-xml-infoset-20040204/'>XML Information Set</a>]
* . If there is no declaration for the attribute, <code>typeNamespace</code>
* and <code>typeName</code> are <code>null</code>.
* </li>
* <li> If this type is
* referenced from an <code>Element</code> node, <code>typeNamespace</code>
* and <code>typeName</code> are <code>null</code>.
* </li>
* </ul>
* <p> If the document's schema is an XML Schema [<a href='http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/'>XML Schema Part 1</a>]
* , the values are computed as follows using the post-schema-validation
* infoset contributions (also called PSVI contributions):
* <ul>
* <li> If the <b>[validity]</b> property exists AND is <em>"invalid"</em> or <em>"notKnown"</em>: the {target namespace} and {name} properties of the declared type if
* available, otherwise <code>null</code>.
* <p ><b>Note:</b> At the time of writing, the XML Schema specification does
* not require exposing the declared type. Thus, DOM implementations might
* choose not to provide type information if validity is not valid.
* </li>
* <li> If the <b>[validity]</b> property exists and is <em>"valid"</em>:
* <ol>
* <li> If <b>[member type definition]</b> exists:
* <ol>
* <li>If {name} is not absent, then expose {name} and {target
* namespace} properties of the <b>[member type definition]</b> property;
* </li>
* <li>Otherwise, expose the namespace and local name of the
* corresponding anonymous type name.
* </li>
* </ol>
* </li>
* <li> If the <b>[type definition]</b> property exists:
* <ol>
* <li>If {name} is not absent, then expose {name} and {target
* namespace} properties of the <b>[type definition]</b> property;
* </li>
* <li>Otherwise, expose the namespace and local name of the
* corresponding anonymous type name.
* </li>
* </ol>
* </li>
* <li> If the <b>[member type definition anonymous]</b> exists:
* <ol>
* <li>If it is false, then expose <b>[member type definition name]</b> and <b>[member type definition namespace]</b> properties;
* </li>
* <li>Otherwise, expose the namespace and local name of the
* corresponding anonymous type name.
* </li>
* </ol>
* </li>
* <li> If the <b>[type definition anonymous]</b> exists:
* <ol>
* <li>If it is false, then expose <b>[type definition name]</b> and <b>[type definition namespace]</b> properties;
* </li>
* <li>Otherwise, expose the namespace and local name of the
* corresponding anonymous type name.
* </li>
* </ol>
* </li>
* </ol>
* </li>
* </ul>
* <p ><b>Note:</b> Other schema languages are outside the scope of the W3C
* and therefore should define how to represent their type systems using
* <code>TypeInfo</code>.
* <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>Document Object Model (DOM) Level 3 Core Specification</a>.
* @since DOM Level 3
*/
public interface TypeInfo {
/**
* The name of a type declared for the associated element or attribute,
* or <code>null</code> if unknown.
*/
public String getTypeName();
/**
* The namespace of the type declared for the associated element or
* attribute or <code>null</code> 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 [<a href='http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/'>XML Schema Part 1</a>]
* , this constant represents the derivation by <a href='http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#key-typeRestriction'>
* restriction</a> if complex types are involved, or a <a href='http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#element-restriction'>
* restriction</a> if simple types are involved.
* <br> 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 <em>derivation methods</em> involved are restriction.
*/
public static final int DERIVATION_RESTRICTION = 0x00000001;
/**
* If the document's schema is an XML Schema [<a href='http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/'>XML Schema Part 1</a>]
* , this constant represents the derivation by <a href='http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#key-typeExtension'>
* extension</a>.
* <br> 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 <em>derivation methods</em> involved is an extension.
*/
public static final int DERIVATION_EXTENSION = 0x00000002;
/**
* If the document's schema is an XML Schema [<a href='http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/'>XML Schema Part 1</a>]
* , this constant represents the <a href='http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#element-union'>
* union</a> if simple types are involved.
* <br> 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
* <code>DERIVATION_RESTRICTION</code> or
* <code>DERIVATION_EXTENSION</code>, T2 is derived from the other type
* definition by <code>DERIVATION_RESTRICTION</code>, T1 has {variety} <em>union</em>, 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 [<a href='http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/'>XML Schema Part 1</a>]
* , this constant represents the <a href='http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#element-list'>list</a>.
* <br> 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
* <code>DERIVATION_RESTRICTION</code> or
* <code>DERIVATION_EXTENSION</code>, T2 is derived from the other type
* definition by <code>DERIVATION_RESTRICTION</code>, T1 has {variety} <em>list</em>, 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 <code>TypeInfo</code> 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 <code>false</code>
* . If the document's schema is an XML Schema, the method will
* <code>true</code> if the reference type definition is derived from
* the other type definition according to the derivation parameter. If
* the value of the parameter is <code>0</code> (no bit is set to
* <code>1</code> for the <code>derivationMethod</code> parameter),
* the method will return <code>true</code> 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);
}
/*
* 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
* <code>Node.setUserData()</code> 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.
* <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>Document Object Model (DOM) Level 3 Core Specification</a>.
* @since DOM Level 3
*/
public interface UserDataHandler {
// OperationType
/**
* The node is cloned, using <code>Node.cloneNode()</code>.
*/
public static final short NODE_CLONED = 1;
/**
* The node is imported, using <code>Document.importNode()</code>.
*/
public static final short NODE_IMPORTED = 2;
/**
* The node is deleted.
* <p ><b>Note:</b> 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 <code>Document.renameNode()</code>.
*/
public static final short NODE_RENAMED = 4;
/**
* The node is adopted, using <code>Document.adoptNode()</code>.
*/
public static final short NODE_ADOPTED = 5;
/**
* This method is called whenever the node for which this handler is
* registered is imported or cloned.
* <br> DOM applications must not raise exceptions in a
* <code>UserDataHandler</code>. 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 <code>null</code> when the node is being deleted.
* @param dst Specifies the node newly created if any, or
* <code>null</code>.
*/
public void handle(short operation,
String key,
Object data,
Node src,
Node dst);
}
/*
* 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 <code>CSSCharsetRule</code> interface represents a @charset rule in a
* CSS style sheet. The value of the <code>encoding</code> 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
* <code>encoding</code> attribute is the value found in the
* <code>@charset</code> rule. If there was no <code>@charset</code> in the
* original document, then no <code>CSSCharsetRule</code> is created. The
* value of the <code>encoding</code> attribute may also be used as a hint
* for the encoding used on serialization of the style sheet.
* <p> The value of the @charset rule (and therefore of the
* <code>CSSCharsetRule</code>) 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 <code>CSSCharsetRule</code>.
* <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113'>Document Object Model (DOM) Level 2 Style Specification</a>.
* @since DOM Level 2
*/
public interface CSSCharsetRule extends CSSRule {
/**
* The encoding information used in this <code>@charset</code> rule.
*/
public String getEncoding();
/**
* The encoding information used in this <code>@charset</code> rule.
* @exception DOMException
* SYNTAX_ERR: Raised if the specified encoding value has a syntax error
* and is unparsable.
* <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this encoding rule is
* readonly.
*/
public void setEncoding(String encoding)
throws DOMException;
}
/*
* 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 <code>CSSFontFaceRule</code> interface represents a @font-face rule in
* a CSS style sheet. The <code>@font-face</code> rule is used to hold a set
* of font descriptions.
* <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113'>Document Object Model (DOM) Level 2 Style Specification</a>.
* @since DOM Level 2
*/
public interface CSSFontFaceRule extends CSSRule {
/**
* The declaration-block of this rule.
*/
public CSSStyleDeclaration getStyle();
}
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment